:root {
  --bg: #F7F9FC; --surface: #FFFFFF; --soft: #F1F5F9;
  --text: #0F172A; --text-2: #475569; --text-3: #64748B; --border: #D8DEE8;
  --accent: #2563EB; --accent-2: #0F766E; --success: #128A5B; --warning: #B7791F;
  --dark: #0B1220; --dark-text: #E5E7EB; --dark-blue: #8FB3FF; --dark-teal: #7DD3B0; --dark-amber: #FBBF77;
  --panel-border: #334155; --chat-bg: #E9EEF4; --msg-out: #DCF3D6; --msg-button: #EEF3FA;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px; --radius-lg: 14px; --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; }
.skip-link:focus { left: 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding-block: 72px; }
.section--tight { padding-block: 40px; }
.eyebrow, .mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--accent); margin: 0 0 12px; }
.h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; letter-spacing: -.02em; font-weight: 650; margin: 0 0 20px; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.01em; font-weight: 650; margin: 0 0 16px; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--text-2); max-width: 62ch; margin: 0 0 24px; }
.muted { color: var(--text-3); font-size: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card--feature { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: center; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.tag { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--text-2); }
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 28px 0; }
.facts--outcomes { margin-bottom: 40px; }
.metric { background: var(--soft); border-radius: var(--radius); padding: 16px; }
.metric__value { display: block; font-size: 22px; font-weight: 650; }
.metric__label { display: block; font-size: 14px; color: var(--text-2); }
.metric--bad .metric__value { color: var(--warning); }
.metric--good .metric__value { color: var(--success); }
.panel-dark { background: var(--dark); color: var(--dark-text); border-radius: var(--radius-lg); padding: 18px 20px; font: 13px/1.75 var(--mono); }
.term-line { display: block; }
.term-key--panel { color: var(--dark-blue); }
.term-key--agent { color: var(--dark-teal); }
.term-key--chat { color: var(--dark-amber); }
.term-yes { display: inline-block; border: 1px solid var(--dark-teal); color: var(--dark-teal); border-radius: 4px; padding: 0 8px; transition: background .25s ease, color .25s ease; }
.term-yes.is-on { background: var(--dark-teal); color: var(--dark); }
.replay { margin-top: 12px; font: 13px var(--font); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; color: var(--text-2); cursor: pointer; }
.panel-dark .replay { border-color: var(--panel-border); color: var(--dark-text); }
.numbered { display: grid; grid-template-columns: 56px 1fr; gap: 16px; border-top: 1px solid var(--border); padding-top: 24px; }
.numbered > div { min-width: 0; }
.numbered__n { font: 600 20px var(--mono); color: var(--accent); }
article + article { margin-top: 56px; }
.grid-3 > article + article { margin-top: 0; }
.card--feature + .grid-3 { margin-top: 20px; }
.grid-3 > article.card { display: flex; flex-direction: column; }
.card__link { margin-top: auto; padding-top: 16px; }
.figure { margin: 24px 0; }
.figure img { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.figure figcaption { font-size: 14px; color: var(--text-3); margin-top: 8px; }
.callouts { counter-reset: callout; list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; align-content: start; }
.callouts li { counter-increment: callout; display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--text-2); }
.callouts li::before { content: counter(callout); width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font: 600 13px/24px var(--font); text-align: center; }
.phone { width: min(100%, 340px); background: var(--dark); border-radius: 28px; padding: 12px; margin-inline: auto; }
.phone__screen { background: var(--chat-bg); border-radius: 18px; padding: 14px 10px; display: grid; gap: 8px; min-height: 420px; align-content: start; }
.msg { max-width: 88%; padding: 8px 10px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; background: var(--surface); color: var(--text); }
.msg--in { justify-self: start; }
.msg--out { justify-self: end; background: var(--msg-out); }
.msg__buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 4px; margin-top: 6px; }
.msg__button { font-size: 13px; text-align: center; padding: 5px 4px; border-radius: 8px; background: var(--msg-button); color: var(--accent); transition: background .25s ease, color .25s ease; }
.msg__button.is-on { background: var(--accent); color: #FFFFFF; }
.diagram-scroll { overflow-x: auto; }
.diagram { width: 100%; height: auto; }
.diagram .node rect { fill: var(--surface); stroke: var(--border); }
.diagram .node--dark rect { fill: var(--dark); stroke: var(--dark); }
.diagram text { font: 15px var(--font); fill: var(--text); }
.diagram .node--dark text { fill: var(--dark-text); }
.diagram .edge { stroke: var(--accent); stroke-width: 2; fill: none; stroke-dasharray: 6 6; }
.table-scroll { overflow-x: auto; margin: 16px 0 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; line-height: 1.45; overflow-wrap: break-word; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table th { font: 600 13px var(--mono); letter-spacing: .02em; color: var(--text-2); background: var(--soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { white-space: nowrap; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.builder > * { min-width: 0; }
.builder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.builder-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; align-content: center; gap: 6px 12px; background: var(--soft); border: 1px dashed var(--text-3); border-radius: var(--radius); padding: 10px 12px; }
.builder-block--header { min-height: 48px; }
.builder-block--hero { min-height: 120px; }
.builder-block--benefits { min-height: 80px; }
.builder-block--faq { min-height: 64px; }
.builder-block--game { min-height: 96px; }
.builder-block--form { min-height: 88px; }
.builder-block--footer { min-height: 40px; }
.builder-block.is-filled { border-style: solid; border-color: var(--border); border-left: 4px solid var(--accent); }
.builder-block__name { font: 600 14px/1.3 var(--mono); color: var(--text); }
.builder-block__controls { display: flex; flex-wrap: wrap; gap: 4px; }
.builder-block__copy { grid-column: 1 / -1; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.builder-block__copy:empty { display: none; }
.builder-btn { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font: 600 16px/1 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.builder-btn:hover { border-color: var(--text-3); }
.builder-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.builder-btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.builder-btn[aria-disabled="true"]:focus-visible { opacity: 1; }
.builder-panel { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.builder-panel .btn { justify-content: center; font: 600 15px var(--font); cursor: pointer; }
[data-builder-demo]:not(.is-ready) { grid-template-columns: 1fr; }
[data-builder-demo]:not(.is-ready) .builder-panel { display: none; }
[data-builder-qa] { margin: 0; display: inline-flex; align-items: center; gap: 8px; justify-self: start; font: 600 14px var(--font); color: var(--text); background: var(--soft); border: 1px solid var(--qa, var(--border)); border-radius: 999px; padding: 4px 12px; }
[data-builder-qa]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--qa, var(--text-3)); }
[data-builder-qa][data-state="passed"] { --qa: var(--success); }
[data-builder-qa][data-state="missing-copy"] { --qa: var(--warning); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 14px; }
.site-header__name { font-weight: 650; color: var(--text); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer__inner { padding-block: 28px; display: grid; gap: 4px; }
.site-footer p { margin: 0; }

html:not(.motion-ready) [data-replay] { display: none; }
.motion-ready [data-step]:not(.is-on):not([data-highlight]) { opacity: 0; transform: translateY(4px); }
[data-step]:not([data-highlight]) { transition: opacity .35s ease, transform .35s ease; }
.diagram .edge[data-step].is-on { animation: flow 1.2s linear 1; }
@keyframes flow { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-step], .term-yes, .msg__button, .diagram .edge[data-step].is-on { transition: none; animation: none; }
  .motion-ready [data-step]:not(.is-on):not([data-highlight]) { opacity: 1; transform: none; }
}
@media (max-width: 720px) {
  .section { padding-block: 48px; }
  .numbered { grid-template-columns: 1fr; }
  .phone__screen { min-height: 0; }
  .diagram { min-width: 720px; }
  .builder { grid-template-columns: 1fr; }
  .builder-block { grid-template-columns: 1fr; }
}
@media print {
  .motion-ready [data-step]:not(.is-on):not([data-highlight]) { opacity: 1; transform: none; }
  .replay { display: none; }
  .panel-dark { background: none; color: var(--text); border: 1px solid var(--border); }
  .term-key--panel, .term-key--agent, .term-key--chat { color: var(--text); font-weight: 600; }
  .diagram { min-width: 0; }
  .diagram-scroll { overflow: visible; }
  .table-scroll { overflow: visible; }
  .table { min-width: 0; }
  .builder { grid-template-columns: 1fr; }
  .builder-panel, .builder-block__controls { display: none; }
  .facts--outcomes, .metric { break-inside: avoid; }
}
