:root {
  --paper: #f7f6f1;
  --paper-bright: #fffefa;
  --ink: #171918;
  --muted: #5d625f;
  --line: #c9cbc5;
  --teal: #007a76;
  --coral: #ff614f;
  --lime: #a7cc00;
  --panel: #202321;
  --panel-text: #f6f5ef;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header, main, footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  width: 25px;
  height: 25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 2px;
  border: 1px solid var(--ink);
  padding: 4px;
}

.brand-mark i { display: block; background: var(--ink); }
.brand-mark i:nth-child(1) { height: 40%; background: var(--teal); }
.brand-mark i:nth-child(2) { height: 100%; background: var(--coral); }
.brand-mark i:nth-child(3) { height: 68%; background: var(--lime); }

nav { display: flex; align-items: center; gap: 30px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--ink); }
.nav-github { border-left: 1px solid var(--line); padding-left: 30px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(460px, 1.04fr);
  gap: clamp(42px, 5vw, 72px);
  align-items: center;
  padding: 46px 0 52px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(167, 204, 0, 0.18);
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: 0; line-height: 1.08; }
h1 { margin-bottom: 22px; font-size: clamp(48px, 5.3vw, 72px); max-width: 760px; }
h2 { margin-bottom: 18px; font-size: clamp(36px, 4.2vw, 58px); max-width: 820px; }
h3 { margin-bottom: 10px; font-size: 19px; }

.lede {
  max-width: 650px;
  margin-bottom: 32px;
  color: #3f4441;
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0 20px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); }
.button:active { transform: translateY(0); box-shadow: none; }
.button-primary { background: var(--ink); color: white; }
.button-secondary { background: transparent; color: var(--ink); }
.copy-feedback { min-height: 24px; margin: 12px 0 0; color: var(--teal); font-size: 14px; font-weight: 700; }

.service-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.service-facts li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 0; background: var(--teal); }
.hero-visual { margin: 0; }
.hero-visual img { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--paper-bright); }
.hero-visual figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: right; }

.band { padding: 104px 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 850px; margin-bottom: 64px; }
.section-heading > p:not(.eyebrow) { color: var(--muted); font-size: 18px; max-width: 720px; }

.principle-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.principle-list li { min-height: 245px; padding: 28px 32px 32px 0; }
.principle-list li + li { border-left: 1px solid var(--line); padding-left: 32px; }
.principle-list p { margin-bottom: 0; color: var(--muted); max-width: 310px; }
.step-number { display: block; margin-bottom: 60px; color: var(--teal); font-family: ui-monospace, monospace; font-size: 13px; font-weight: 800; }

.setup-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr); gap: 56px; align-items: start; }
.audience-label { display: inline-block; margin-bottom: 28px; padding-bottom: 5px; border-bottom: 3px solid var(--coral); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.audience-label-dark { color: var(--panel-text); border-color: var(--lime); }
.human-steps > ol { margin: 0; padding: 0; list-style: none; }
.human-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 16px; padding: 0 0 24px; }
.human-steps li > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--ink); font-size: 12px; font-weight: 800; }
.human-steps h3 { margin: 2px 0 7px; }
.human-steps p { margin-bottom: 0; color: var(--muted); }
.request-template { margin: 4px 0 20px; overflow: hidden; border: 1px solid var(--ink); border-radius: 6px; background: #fff; }
.request-template .brief-toolbar { min-height: auto; padding: 14px 16px; border-bottom-color: var(--ink); background: var(--panel); color: var(--panel-text); }
.request-template .brief-toolbar h3 { margin: 0; font-size: 16px; }
.request-template pre { margin: 0; padding: 16px; overflow-x: auto; white-space: pre-wrap; color: var(--ink); font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.text-action { padding: 0 0 4px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); font-weight: 750; cursor: pointer; }
.text-action:hover { border-bottom-color: var(--teal); color: var(--teal); }

.agent-brief { overflow: hidden; border-radius: 6px; background: var(--panel); color: var(--panel-text); box-shadow: 10px 10px 0 var(--coral); }
.brief-toolbar { min-height: 106px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid #444844; }
.brief-toolbar .audience-label { margin-bottom: 12px; }
.brief-toolbar h3 { margin: 0; font-size: 22px; }
.copy-button { min-width: 70px; height: 38px; border: 1px solid #747a75; border-radius: 4px; background: transparent; color: white; font-size: 13px; font-weight: 750; cursor: pointer; }
.copy-button:hover { border-color: var(--lime); color: var(--lime); }
.agent-brief pre { margin: 0; padding: 28px 26px 32px; overflow-x: auto; white-space: pre-wrap; color: #dfe3df; font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; }

.compact-heading { margin-bottom: 48px; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.boundary-grid > div { border-top: 1px solid var(--ink); padding-top: 24px; }
.boundary-grid p { color: var(--muted); margin-bottom: 0; }
.boundary-swatch { display: block; width: 32px; height: 8px; margin-bottom: 32px; }
.swatch-teal { background: var(--teal); }
.swatch-coral { background: var(--coral); }
.swatch-lime { background: var(--lime); }

.final-cta { padding: 110px 0 120px; border-top: 1px solid var(--line); }
.final-cta h2 { max-width: 650px; }
footer { min-height: 150px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; border-top: 1px solid var(--ink); color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--ink); }
footer p { margin: 0; }
footer div { display: flex; gap: 20px; }
footer a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

@media (max-width: 900px) {
  .site-header, main, footer { width: min(calc(100% - 32px), var(--max-width)); }
  nav a:not(.nav-github) { display: none; }
  .nav-github { border: 0; padding-left: 0; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 56px 0 72px; }
  .hero-copy, .hero-visual { max-width: 720px; }
  .principle-list { grid-template-columns: 1fr; }
  .principle-list li { min-height: 0; padding: 28px 0; }
  .principle-list li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .step-number { margin-bottom: 28px; }
  .setup-grid, .boundary-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; align-content: center; padding: 32px 0; gap: 16px; }
}

@media (max-width: 560px) {
  .site-header { min-height: 62px; }
  .hero { padding-top: 42px; gap: 36px; }
  h1 { font-size: 46px; }
  h2 { font-size: 36px; }
  .lede { font-size: 18px; }
  .hero-actions { align-items: stretch; }
  .button { width: 100%; text-align: center; }
  .service-facts { display: grid; }
  .band { padding: 72px 0; }
  .section-heading { margin-bottom: 42px; }
  .setup-grid { gap: 44px; }
  .agent-brief { box-shadow: 6px 6px 0 var(--coral); }
  .brief-toolbar, .agent-brief pre { padding-left: 18px; padding-right: 18px; }
  footer div { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
