/* Semantic Playback — site styles.
   Scales (Refactoring UI): spacing 4 8 12 16 24 32 48 64 96 128 · type 12 14 16 18 20 24 30 36 48 60. */
:root {
  --bg: #ffffff;
  --bg-2: #f7f7fa;
  --surface: #f3f3f7;
  --surface-2: #e9e9f0;
  --line: #e3e3ea;
  --line-2: #cfd0da;
  --text: #161d26;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --aws: #ff9900;
  --aws-text: #b35c00;
  --tv: #1d8102;
  --server: #0972d3;
  --violet: #7a4fd1;
  --llm: #7a4fd1;
  --danger: #c7362b;
  --ink: #161d26;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-1: 0 1px 2px hsla(220 30% 10% / .08);
  --shadow-3: 0 12px 28px hsla(220 30% 10% / .10);
  --shadow-4: 0 30px 60px hsla(225 40% 20% / .22);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
q { quotes: "“" "”"; color: var(--text); }
code { font-family: var(--mono); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--text-2); }
.fine { color: var(--text-3); font-size: 14px; line-height: 1.5; }
.center { text-align: center; justify-content: center; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--aws); color: #111; box-shadow: 0 8px 24px hsla(36 100% 50% / .25); }
.btn-ghost { background: hsla(214 30% 100% / .04); border-color: var(--line-2); color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #ffad33; }
  .btn-ghost:hover { background: hsla(214 30% 100% / .08); border-color: hsl(215 16% 36%); }
}
.btn .ic { width: 18px; height: 18px; }
.btn-primary .ic use[href="#i-play"], .btn .ic use[href="#i-play"] { fill: currentColor; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--aws); font-weight: 600; text-decoration: none; font-size: 14px; }
.link .ic { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) { .link:hover .ic { transform: translateX(3px); } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: hsla(215 32% 7% / .72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid hsla(215 18% 21% / .6); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #ff9900 0%, #f0b13a 35%, #22b8d9 100%); display: grid; place-items: center; box-shadow: inset 0 1px 0 hsla(0 0% 100% / .35), var(--shadow-1); }
.logo svg { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 200ms ease, background-color 200ms ease; }
@media (hover: hover) { .nav-links a:hover { color: var(--text); background: hsla(214 30% 100% / .05); } }
@media (max-width: 860px) { .nav-links { display: none; } .nav-gh { margin-left: auto; } }
@media (max-width: 520px) { .nav-gh { display: none; } .nav .btn-primary { margin-left: auto; } }

/* Hero */
.hero { position: relative; padding: 64px 0 48px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 760px; background: radial-gradient(600px 380px at 78% 30%, hsla(194 80% 45% / .16), transparent 70%), radial-gradient(520px 340px at 18% 10%, hsla(36 100% 50% / .10), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.12fr; gap: 64px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: hsla(214 30% 100% / .03); color: var(--text-2); font-size: 14px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aws); box-shadow: 0 0 0 4px hsla(36 100% 50% / .18); }
.hero h1 { margin-top: 24px; font-size: clamp(36px, 5.2vw, 60px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
.lede { margin-top: 24px; font-size: 20px; line-height: 1.55; color: var(--text-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .fine { margin-top: 24px; max-width: 36em; }

.hero-stage { position: relative; padding-bottom: 32px; }
.tv { position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(180deg, hsl(215 14% 20%), hsl(215 18% 9%)); box-shadow: var(--shadow-4), inset 0 1px 0 hsla(0 0% 100% / .08); }
.tv-screen { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.tv-screen video { width: 100%; height: 100%; object-fit: cover; }
.tv-stand { width: 34%; height: 14px; margin: 0 auto; background: linear-gradient(180deg, hsl(215 14% 16%), hsl(215 18% 8%)); border-radius: 0 0 12px 12px; }
.tv-bubble {
  position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px; background: hsla(215 30% 8% / .82); backdrop-filter: blur(8px);
  border: 1px solid hsla(36 100% 50% / .45); font-size: 15px; font-weight: 500; color: var(--text);
  opacity: 0; transform: translateY(-6px) scale(0.97); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.tv-bubble.on { opacity: 1; transform: none; }
.tv-bubble .ic { color: var(--aws); }
.remote { position: absolute; right: -14px; bottom: -6px; width: 58px; height: 190px; border-radius: 30px; background: linear-gradient(180deg, hsl(215 12% 22%), hsl(215 16% 11%)); box-shadow: var(--shadow-3), inset 0 1px 0 hsla(0 0% 100% / .1); display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 16px; transform: rotate(8deg); }
.remote-mic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: hsl(215 14% 28%); color: #8fd3ff; }
.remote-mic .ic { width: 16px; height: 16px; }
.remote.listening .remote-mic { color: #111; background: #8fd3ff; box-shadow: 0 0 0 6px hsla(200 90% 75% / .18); }
.remote-ring { width: 40px; height: 40px; border-radius: 50%; border: 3px solid hsl(215 12% 30%); display: grid; place-items: center; }
.remote-ring i { width: 14px; height: 14px; border-radius: 50%; background: hsl(215 12% 30%); }
.remote-row { display: flex; gap: 6px; }
.remote-row i { width: 10px; height: 10px; border-radius: 50%; background: hsl(215 12% 30%); }
.hero-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; max-width: calc(100% - 56px); }
.hero-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); opacity: 0; transform: translateY(6px); transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); }
.hero-steps li.on { opacity: 1; transform: none; }
.hero-steps li i { width: 8px; height: 8px; border-radius: 50%; }
.hero-steps li b { font-family: var(--mono); font-weight: 500; color: var(--text-3); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 64px 0 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--line); }
.stats > div { background: var(--bg-2); padding: 24px; }
.stats dt { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.stats dd { margin: 8px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* Strip */
.strip { border-block: 1px solid var(--line); background: var(--bg-2); }
.strip-in { display: flex; align-items: center; gap: 24px; padding: 18px 0; }
.strip-label { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.strip li { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.strip li .ic { color: var(--text-3); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { color: var(--aws); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.section-head h2 { margin-top: 12px; font-size: clamp(30px, 3.6vw, 48px); font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.sub { margin-top: 16px; color: var(--text-2); font-size: 18px; line-height: 1.6; max-width: 40em; }

/* Problem */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-card { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.compare-card p:last-child { color: var(--text-2); margin-top: 16px; }
.compare-tag { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.bad .compare-tag { color: var(--danger); }
.good .compare-tag { color: var(--tv); }
.good { border-color: hsla(126 55% 59% / .35); background: linear-gradient(180deg, hsla(126 55% 59% / .06), transparent 60%), var(--surface); }
.scrub { margin-top: 20px; height: 44px; position: relative; }
.scrub-bar { position: absolute; left: 0; right: 0; top: 18px; height: 6px; border-radius: 3px; background: var(--line-2); }
.scrub-head { position: absolute; top: -5px; left: var(--x); width: 16px; height: 16px; border-radius: 50%; background: var(--text); animation: scrub 3.2s var(--ease-io) infinite; }
@keyframes scrub { 0% { left: 70% } 20% { left: 30% } 38% { left: 52% } 55% { left: 44% } 72% { left: 49% } 100% { left: 70% } }
.scrub-marks i { position: absolute; top: 30px; left: var(--x); width: 2px; height: 10px; background: var(--line-2); }
.said { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 10px 16px; border-radius: 999px; background: var(--bg); border: 1px solid hsla(36 100% 50% / .45); font-weight: 500; }
.said .ic { color: var(--aws); }

.index-card { margin-top: 16px; padding: 32px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.index-top { display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.index-top h3 { font-size: 20px; font-weight: 600; }
.index-top .muted { margin-top: 8px; max-width: 46em; font-size: 15px; }
.index-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; min-width: min(320px, 100%); border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--text-3); transition: border-color 200ms ease, box-shadow 200ms ease; }
.index-search:focus-within { border-color: var(--aws); box-shadow: 0 0 0 4px hsla(36 100% 50% / .15); }
.index-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.index-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; font-size: 13px; color: var(--text-2); }
.index-legend span { display: inline-flex; align-items: center; gap: 6px; }
.index-legend i { width: 10px; height: 10px; border-radius: 3px; }
.timeline { position: relative; height: 72px; margin-top: 16px; border-radius: 12px; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%), var(--bg); border: 1px solid var(--line); }
.tick { position: absolute; bottom: 10px; width: max(4px, var(--w)); height: var(--h); left: var(--x); border-radius: 3px; background: var(--c); opacity: .85; border: 0; padding: 0; cursor: pointer; transition: transform 160ms var(--ease-out), opacity 200ms ease, box-shadow 200ms ease; transform-origin: bottom; }
.timeline.searching .tick { opacity: .15; }
.timeline.searching .tick.hit { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.tick.sel { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
@media (hover: hover) { .tick:hover { transform: scaleY(1.15); opacity: 1; } }
.timeline-axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.index-detail { margin-top: 16px; min-height: 72px; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 15px; }
.index-detail b { display: block; font-weight: 600; }
.index-detail .meta { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.index-detail .tag { padding: 2px 8px; border-radius: 6px; font-family: "Geist", sans-serif; font-size: 12px; font-weight: 600; color: #111; background: var(--c); }
.index-detail p { color: var(--text-2); margin-top: 4px; }
.index-card > .fine { margin-top: 12px; }

/* Demo */
.demo-tabs { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.demo-tabs button { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 500; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background-color 200ms ease, color 200ms ease; }
.demo-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-1); }
.demo-tabs .ic { width: 16px; height: 16px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; transition: transform 160ms var(--ease-out), border-color 200ms ease, background-color 200ms ease; }
.chip:active { transform: scale(0.97); }
.chip .ic { width: 16px; height: 16px; color: var(--text-3); }
.chip[aria-pressed="true"] { border-color: var(--aws); background: hsla(36 100% 50% / .1); }
.chip[aria-pressed="true"] .ic { color: var(--aws); }
@media (hover: hover) { .chip:hover { border-color: hsl(215 16% 40%); } }
.demo-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; }
.tv-flat { padding: 8px; border-radius: 16px; }
.sound, .replay { position: absolute; bottom: 12px; height: 36px; border-radius: 999px; border: 1px solid hsla(0 0% 100% / .18); background: hsla(215 30% 8% / .72); backdrop-filter: blur(8px); color: var(--text); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.sound { left: 12px; padding: 0 12px; }
.replay { right: 12px; width: 36px; justify-content: center; }
.sound:active, .replay:active { transform: scale(0.95); }
.captions { margin-top: 16px; display: grid; gap: 8px; min-height: 88px; }
.cap { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.5; opacity: 0; transform: translateY(4px); transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); }
.cap.on { opacity: 1; transform: none; }
.cap-who { flex: none; margin-top: 2px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #111; }
.cap-you { background: var(--aws); }
.cap-tv { background: var(--server); }

.trace { border-radius: var(--radius-lg); background: hsl(215 30% 6%); border: 1px solid var(--line); padding: 16px; min-height: 100%; display: flex; flex-direction: column; }
.trace-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 12px; }
.trace-title { color: var(--aws); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.trace-clock { font-family: var(--mono); font-size: 18px; color: var(--tv); font-variant-numeric: tabular-nums; }
.route { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 4px 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-server { background: hsla(191 73% 49% / .14); color: #7fdcf0; }
.pill-llm { background: hsla(252 100% 76% / .16); color: #c3b6ff; }
.pill-time { background: var(--surface-2); color: var(--text-2); font-family: var(--mono); font-weight: 500; }
.trace-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; align-content: start; }
.row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.row.on { opacity: 1; transform: none; }
.row-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--k); color: var(--k); }
.row-ic .ic { width: 16px; height: 16px; }
.row-t { font-size: 14px; font-weight: 600; color: var(--k); line-height: 1.35; }
.row-d { font-size: 13px; color: var(--text-2); line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.row-ms { font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; padding-top: 2px; }
.row.k-aws, .k-aws { --k: var(--aws); }
.row.k-tv, .k-tv { --k: var(--tv); }
.row.k-server, .k-server { --k: var(--server); }
.row.k-llm, .k-llm { --k: var(--llm); }
.row.gap { background: none; border: 1px dashed var(--line-2); grid-template-columns: 1fr; text-align: center; color: var(--llm); font-size: 13px; padding: 8px; }
.trace-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 4px 2px; font-size: 12px; color: var(--text-3); }
.trace-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trace-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.demo > .fine { margin-top: 24px; max-width: 54em; margin-inline: auto; }

/* Loop */
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: loop; }
.loop li { position: relative; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.loop li:not(:last-child)::after { content: ""; position: absolute; right: -10px; top: 38px; width: 8px; height: 8px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: rotate(45deg); }
.loop-n { position: absolute; top: 16px; right: 18px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.loop-ic { width: 40px; height: 40px; padding: 10px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.loop h3 { font-size: 18px; font-weight: 600; }
.loop p { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.loop code { margin-top: auto; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; line-height: 1.6; color: var(--c); }
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.lane { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.lane-fast { border-top: 2px solid var(--server); }
.lane-agent { border-top: 2px solid var(--llm); }
.lane-head { display: flex; justify-content: space-between; align-items: center; }
.lane-time { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.lane h3 { margin-top: 16px; font-size: 20px; font-weight: 600; }
.lane > p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.lane-ex { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.lane-ex li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.lane-ex b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--text-3); white-space: nowrap; padding-top: 2px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { text-align: left; padding: 0; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform 200ms var(--ease-out), border-color 200ms ease, box-shadow 200ms ease; }
.feat:active { transform: scale(0.985); }
@media (hover: hover) { .feat:hover { border-color: var(--line-2); box-shadow: var(--shadow-3); } }
.feat-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.feat-media img, .feat-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat-media video { opacity: 0; transition: opacity 240ms ease; }
.feat.playing .feat-media video { opacity: 1; }
.feat-said { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: hsla(215 30% 8% / .8); backdrop-filter: blur(6px); font-size: 13px; font-weight: 500; }
.feat-said .ic { width: 14px; height: 14px; color: var(--aws); }
.feat-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.feat-body h3 { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.feat-body h3 .ic { color: var(--c); }
.feat-body p { font-size: 15px; color: var(--text-2); line-height: 1.55; }
.feat-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.tagp { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }

/* Architecture */
.arch { display: grid; grid-template-columns: 1fr; gap: 16px; }
.arch-diagram { position: relative; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.arch-diagram svg { display: block; width: 100%; min-width: 720px; height: auto; }
.arch-panel ul { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.node { cursor: pointer; }
.node rect.box { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.2; transition: stroke 200ms ease, fill 200ms ease; }
.node text { fill: var(--text); font-family: "Geist", sans-serif; }
.node .t { font-size: 13px; font-weight: 600; }
.node .s { font-size: 11px; fill: var(--text-3); }
.node .nic { fill: none; stroke: var(--nc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.node .ring { fill: none; stroke: var(--nc); stroke-width: 1.2; opacity: .55; }
.node:focus { outline: none; }
.node:focus-visible rect.box, .node.sel rect.box { stroke: var(--nc); fill: color-mix(in srgb, var(--nc) 10%, var(--bg)); }
@media (hover: hover) { .node:hover rect.box { stroke: var(--nc); } }
.edge { fill: none; stroke: var(--line-2); stroke-width: 1.4; }
.edge.flow { stroke: var(--aws); stroke-dasharray: 4 6; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.arch-panel { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.arch-panel .kicker { color: var(--nc, var(--aws)); }
.arch-panel h3 { margin-top: 8px; font-size: 22px; font-weight: 600; }
.arch-panel p { margin-top: 12px; color: var(--text-2); font-size: 15px; }
.arch-panel ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.arch-panel li { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); }
.arch-panel li .ic { color: var(--nc, var(--aws)); width: 16px; height: 16px; margin-top: 3px; }
.arch-panel code { font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); color: var(--text); }
.ingest { margin-top: 16px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.ingest-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.ingest-flow { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ingest-flow li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.ingest-flow li .ic { width: 16px; height: 16px; color: var(--aws); }
.ingest-flow li:not(:last-child)::after { content: "→"; margin-left: 8px; color: var(--text-3); }

/* Accessibility */
.a11y { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.a11y-demo { padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.a11y-toggle { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 16px; }
.seg { height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font-weight: 500; font-size: 14px; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.seg.on { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-1); }
.a11y-tv { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.a11y-tv img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.a11y-settings { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: hsla(215 30% 8% / .86); backdrop-filter: blur(8px); font-size: 12px; min-width: 190px; }
.a11y-settings span { color: var(--text-3); }
.a11y-settings b { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-weight: 500; }
.sw { width: 26px; height: 15px; border-radius: 999px; background: var(--tv); position: relative; }
.sw::after { content: ""; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.a11y-cap { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); padding: 6px 12px; border-radius: 6px; background: hsla(0 0% 0% / .78); font-size: clamp(13px, 1.6vw, 17px); white-space: nowrap; transition: opacity 260ms ease, filter 260ms ease; }
.a11y-note { position: absolute; left: 12px; bottom: 12px; right: 12px; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: hsla(0 70% 40% / .82); transition: opacity 260ms ease; }
.a11y-note.ok { background: hsla(126 50% 28% / .88); }
.a11y-tv[data-state="before"] .a11y-cap, .a11y-tv[data-state="before"] .after-only,
.a11y-tv[data-state="after"] .before-only { opacity: 0; }
.a11y-tv[data-state="after"] .a11y-cap { bottom: 26%; }
.contribs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contribs li { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.contrib-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #111; background: var(--aws); }
.contribs h3 { font-size: 18px; font-weight: 600; }
.contribs p { margin: 6px 0 10px; color: var(--text-2); font-size: 15px; }

/* Honest stack */
.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.svc { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.svc-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: hsla(36 100% 50% / .12); color: var(--aws); }
.svc.blocked .svc-ic { background: hsla(214 16% 60% / .12); color: var(--text-3); }
.svc h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc p { margin-top: 4px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.st { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; }
.st-live { color: #0d2a10; background: var(--tv); }
.st-blocked { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.numbers > div { padding: 20px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.numbers b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.numbers span { display: block; margin-top: 6px; color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq details { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 20px; line-height: 1; transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 20px; color: var(--text-2); font-size: 15px; }

/* Final + footer */
.final { padding: 128px 0; text-align: center; background: radial-gradient(600px 300px at 50% 0%, hsla(36 100% 50% / .10), transparent 70%); }
.final h2 { font-size: clamp(30px, 4.4vw, 56px); font-weight: 600; letter-spacing: -0.035em; }
.final h2 span { color: var(--aws); }
.final .cta-row { margin-top: 40px; }
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg-2); }
.footer-in { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-in > div:first-child { max-width: 360px; }
.footer-in .muted { margin-top: 12px; font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: auto minmax(0, 420px); gap: 48px; }
.footer-cols div { display: grid; gap: 8px; align-content: start; font-size: 14px; }
.footer-cols b { font-size: 13px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.footer-cols a { color: var(--text-2); text-decoration: none; }
@media (hover: hover) { .footer-cols a:hover { color: var(--text); } }
.footer-cols span { color: var(--text-2); }
.legal { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }

/* Film dialog */
.film { width: min(1100px, 100vw - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: #000; overflow: visible; }
.film::backdrop { background: hsla(215 40% 3% / .82); backdrop-filter: blur(6px); }
.film[open] { animation: pop 280ms var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } }
.film video { width: 100%; border-radius: 16px; }
.film-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1080px) {
  .loop { grid-template-columns: repeat(2, 1fr); }
  .loop li::after { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero-grid, .demo-body, .arch, .a11y, .compare, .lanes { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .hero-grid { gap: 40px; }
  .stats, .numbers { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .lede { font-size: 18px; }
  .sub { font-size: 16px; }
  .loop, .features, .stack { grid-template-columns: 1fr; }
  .stats > div { padding: 16px; }
  .stats dt { font-size: 24px; }
  .index-card { padding: 20px; }
  .remote { display: none; }
  .hero-steps { max-width: 100%; }
  .strip-in { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn { height: 44px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .lane-ex li { flex-direction: column; gap: 2px; }
  .a11y-settings { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms ease; }
  .scrub-head, .edge.flow { animation: none; }
  .row, .cap, .hero-steps li, .tv-bubble { transform: none; }
}


/* ---------------------------------------------------------------- light theme (AWS-inspired: white page, ink text,
   light-grey rounded cards, dark pill buttons, soft lavender-blue gradients, orange used sparingly) */
h1, h2 { font-weight: 500 !important; }
.kicker, .contribs .link, .link { color: var(--aws-text); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: #2b3542; } .btn-ghost:hover { background: var(--surface); border-color: var(--line-2); } }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--text); }
.nav { background: hsla(0 0% 100% / .86); border-bottom-color: var(--line); }
.nav-links a { color: var(--text-2); }
@media (hover: hover) { .nav-links a:hover { background: var(--surface); } }
.logo svg path { fill: #fff; }
.hero { background: linear-gradient(160deg, #eceafc 0%, #e4ebfb 38%, #dfe9fb 60%, #fff 100%); }
.hero::before { background: radial-gradient(520px 340px at 85% 25%, hsla(267 80% 70% / .28), transparent 70%), radial-gradient(460px 300px at 10% 0%, hsla(36 100% 60% / .16), transparent 70%); }
.eyebrow { background: hsla(0 0% 100% / .7); border-color: hsla(225 30% 70% / .5); }
.dot { box-shadow: 0 0 0 4px hsla(36 100% 50% / .22); }
.lede q, q { color: var(--text); font-weight: 500; }
.tv { background: linear-gradient(180deg, #2a313b, #0f141a); }
.tv-stand { background: linear-gradient(180deg, #2a313b, #11161d); }
.remote { background: linear-gradient(180deg, #313945, #141a21); }
.hero-steps li { background: #fff; box-shadow: var(--shadow-1); }
.stats { background: var(--line); }
.stats > div { background: #fff; }
.strip { background: #fff; }
.section-alt { background: var(--bg-2); }
.compare-card, .index-card, .lane, .loop li, .feat, .arch-diagram, .arch-panel, .ingest, .a11y-demo, .contribs li, .svc, .faq details { background: var(--surface); border-color: transparent; }
.section-alt .compare-card, .section-alt .index-card, .section-alt .lane, .section-alt .loop li, .section-alt .feat, .section-alt .a11y-demo, .section-alt .contribs li, .section-alt .svc, .section-alt .faq details { background: #fff; border-color: var(--line); }
.good { background: linear-gradient(180deg, hsla(110 60% 40% / .07), transparent 60%), var(--surface); border-color: hsla(110 60% 30% / .25); }
.scrub-head { background: var(--ink); }
.said { background: #fff; border-color: hsla(36 100% 45% / .55); }
.index-search, .index-detail, .lane-ex li, .loop code, .ingest-flow li, .demo-tabs, .a11y-toggle { background: #fff; }
.timeline { background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%), #fff; }
.tick.sel, .timeline.searching .tick.hit { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.tick.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.index-detail .tag, .cap-who, .contrib-n { color: #fff; }
.contrib-n { background: var(--ink); }
.demo-tabs button[aria-selected="true"], .seg.on { background: var(--ink); color: #fff; }
.chip { background: #fff; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .ic { color: var(--aws); }
.cap { background: #fff; border-color: var(--line); }
.cap-you { background: #b35c00; }
.cap-tv { background: var(--server); }
.pill-server { background: hsla(209 92% 43% / .12); color: #0757a1; }
.pill-llm { background: hsla(260 60% 56% / .14); color: #5b33ad; }
.pill-time { background: var(--surface-2); color: var(--text-2); }
.loop-ic { background: color-mix(in srgb, var(--c) 12%, #fff); }
.lane-fast { border-top: 3px solid var(--server); }
.lane-agent { border-top: 3px solid var(--llm); }
.tagp { background: #fff; border: 1px solid var(--line); }
.section-alt .tagp { background: var(--surface); border-color: transparent; }
.feat-said { background: hsla(220 30% 10% / .72); color: #fff; }
.node rect.box { fill: #fff; stroke: var(--line-2); }
.node.sel rect.box, .node:focus-visible rect.box { fill: color-mix(in srgb, var(--nc) 8%, #fff); }
.edge { stroke: #b9bcc9; }
.edge.flow { stroke: #ff9900; }
.arch-panel code { background: #fff; }
.ingest-flow li .ic { color: #b35c00; }
.svc-ic { background: hsla(36 100% 50% / .16); color: #b35c00; }
.svc.blocked .svc-ic { background: var(--surface-2); }
.st-live { color: #fff; background: var(--tv); }
.st-blocked { background: #fff; }
.numbers > div { background: #fff; border-color: var(--line); }
.faq summary::after { color: var(--text-3); }
.final { background: linear-gradient(160deg, #eceafc 0%, #e4ebfb 55%, #fff 100%); }
.final h2 span { color: #b35c00; }
.footer { background: var(--bg-2); }
.film { background: #000; }
.film::backdrop { background: hsla(220 30% 10% / .7); }
.film-close { background: #fff; color: var(--ink); }
.a11y-note { color: #fff; }
.a11y-settings, .a11y-cap { color: #fff; }

/* The trace is a console: it keeps its dark palette. */
.trace {
  --surface: #1b222c; --surface-2: #26303c; --line: #2b3440; --line-2: #3a4553;
  --text: #f2f4f7; --text-2: #b9c3d0; --text-3: #8d9aab;
  --aws: #ff9900; --tv: #5fd068; --server: #22b8d9; --llm: #a48dff;
  background: #10151c; border-color: #10151c; color: var(--text); box-shadow: var(--shadow-3);
}
.trace .pill-server { background: hsla(191 73% 49% / .16); color: #7fdcf0; }
.trace .pill-llm { background: hsla(252 100% 76% / .18); color: #c3b6ff; }
.trace .trace-title { color: #ff9900; }
.trace .trace-clock { color: #5fd068; }
.hero-steps li i[style*="--tv"] { }
.sound, .replay, .tv-bubble { color: #fff; }
.loop li[style*="--aws"] { --c: #b35c00 !important; }
