:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --rule: #e5e7eb;
  --soft: #f3f4f6;
  --shape: #e2e8f0;
  --dots: #d1d5db;
  --night: #16223a;
  --sleep: #2456d6;
  --wait: #e07a2d;
  --ok: #15803d;
  --ok-soft: #e7f5ec;
  --wait-soft: #fdf1e6;
  --sleep-soft: #e9effc;
  --col: 820px;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
.mono, .results td.num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.9em; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 56px; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.scrolled { border-color: var(--rule); }
.wordmark img { display: block; }
.wordmark { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav nav a { margin-left: 30px; font-size: 14.5px; text-decoration: none; color: var(--text); }
.nav nav a:hover { color: var(--ink); }

/* hero: the title lines up with the text column, as on the reference pages */
.hero { position: relative; margin: 4px 14px 0; border-radius: 12px; overflow: hidden; background: var(--night); }
.hero img { display: block; width: 100%; height: min(70vh, 600px); object-fit: cover; object-position: 70% 58%; animation: drift 44s ease-in-out infinite alternate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero img.still { animation: none; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06) translateX(-1%); } }
.hero-text { position: absolute; left: 0; right: 0; bottom: 44px; color: #fff; }
.hero-kicker { margin: 0 0 6px; font-size: 16px; }
.hero h1 { margin: 0; font-family: var(--head); font-size: clamp(42px, 5.4vw, 60px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.hero-sub { margin: 14px 0 0; font-size: 17px; line-height: 1.5; }

/* column and type */
.col { max-width: var(--col); margin: 0 auto; padding: 0 24px; }
section.col, section.band { margin-top: 88px; scroll-margin-top: 76px; }
.intro { margin-top: 64px !important; }
h2 { font-family: var(--head); font-size: 27px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; color: var(--ink); margin: 0 0 18px; }
h3 { font-family: var(--head); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
p { margin: 0 0 18px; }
.sub { color: var(--muted); margin: 4px 0 14px; font-size: 14.5px; }
.note { color: var(--muted); font-size: 14.5px; margin-top: 14px; }
.fig-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 56px; }

.links { margin-top: 26px; }
.links a { background: var(--card); display: inline-block; margin-right: 12px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 16px; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.links a:first-child { background: var(--ink); color: #fff; border-color: var(--ink); }
.links a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* key numbers */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; border-top: 1px solid var(--rule); }
.stats div { padding: 26px 24px 0 0; }
.stats div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.stats strong { display: block; font-size: 44px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.stats span { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--muted); max-width: 220px; }

/* toggles */
.toggle { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; }
.toggle button { font: inherit; font-size: 13.5px; padding: 6px 14px; background: none; color: var(--text); border: 0; border-radius: 6px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.toggle button.on { background: var(--ink); color: #fff; }

/* showcase */
.apps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 26px 0 0; }
.apps button { font: inherit; font-size: 14px; padding: 9px 4px; text-align: center; background: var(--soft); border: 0; border-radius: 8px; color: var(--text); cursor: pointer; transition: background 0.2s, color 0.2s; }
.apps button:hover { color: var(--ink); }
.apps button.on { background: var(--ink); color: #fff; }
.stage { max-width: var(--col); margin: 18px auto 0; padding: 0 24px; }
.window { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--card); }
.bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--soft); border-bottom: 1px solid var(--rule); }
.bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--dots); }
.bar span { margin-left: 14px; font-size: 12.5px; color: var(--muted); background: var(--card); border-radius: 6px; padding: 2px 12px; }
.screen { position: relative; aspect-ratio: 16 / 10; width: 100%; background: #111; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: opacity 0.22s linear; }
#shot-b { opacity: 0; }
.screen.flip #shot-b { opacity: 1; }
.ask { margin-top: 22px; }
.ask-label { font-size: 13px; color: var(--muted); }
.ask p::before { content: "\201C"; }
.ask p::after { content: "\201D"; }
.ask p { margin: 2px 0 0; font-size: 20px; line-height: 1.45; color: var(--ink); min-height: 58px; }
.player { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
#play { font: inherit; font-size: 14px; padding: 7px 18px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; cursor: pointer; min-width: 78px; }
#clock { color: var(--muted); white-space: nowrap; }
.status { font-size: 15px; color: var(--muted); transition: color 0.3s; }
.status.hit { color: var(--ok); font-weight: 500; }

#timeline .ev line { stroke: var(--rule); transition: stroke 0.3s; }
#timeline .hit-text { font-size: 12px; }
#timeline .ev text { font-size: 11.5px; fill: var(--muted); opacity: 0; transition: opacity 0.4s; }
#timeline .ev.on line { stroke: var(--faint); }
#timeline .ev.on text { opacity: 1; }
#timeline .hit-dot { opacity: 0.35; transition: opacity 0.3s; }
#timeline .hit-text { opacity: 0.55; transition: opacity 0.3s; }
#timeline.met .hit-dot, #timeline.met .hit-text { opacity: 1; }

/* how it works */
.story { margin: 26px 0 0; }
.story .beam { transform-origin: 40px -10px; animation: sweep 6s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
.story .eyes { animation: blink 6s infinite; transform-origin: 20px -14px; }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
.story .hand { transform-box: view-box; transform-origin: 30px 158px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.story .row { animation: arrive 6s ease-out infinite; opacity: 0; }
.story .r1 { animation-delay: 0s; } .story .r2 { animation-delay: 1.3s; } .story .r3 { animation-delay: 2.6s; } .story .r4 { animation-delay: 3.9s; }
@keyframes arrive { 0% { opacity: 0; transform: translateY(8px); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.scoring { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 34px; }
.scoring div { background: var(--soft); border-radius: 10px; padding: 16px 18px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.scoring strong { display: block; font-size: 15.5px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.scoring .s-ok { background: var(--ok-soft); color: #3f6b52; } .scoring .s-ok strong { color: #14693d; }
.scoring .s-time { background: var(--sleep-soft); color: #4a5f8f; } .scoring .s-time strong { color: #1f47b3; }
.scoring .s-cost { background: var(--wait-soft); color: #8a6442; } .scoring .s-cost strong { color: #b55a17; }
.legend { display: flex; gap: 18px; font-size: 14px; color: var(--text); }
.legend .dot { margin-right: 7px; }
/* tool comparison: two copies of one feed, one agent on a timer and one woken by changes */
.duel-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.duel-ctl button { font: inherit; font-size: 13.5px; padding: 7px 14px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; cursor: pointer; transition: opacity 0.2s; }
.duel-ctl button.ghost { background: var(--soft); color: var(--text); }
.duel-ctl button:disabled { opacity: 0.35; cursor: default; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 26px; }
.pane { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--card); transition: box-shadow 0.25s, border-color 0.25s; }
.pane.look { border-color: var(--sleep); box-shadow: 0 0 0 3px var(--sleep-soft); }
.pane.woke { border-color: var(--wait); box-shadow: 0 0 0 3px var(--wait-soft); }
.pane.asleep .feed { opacity: 0.45; }
.pane-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; background: var(--soft); border-bottom: 1px solid var(--rule); font-size: 14px; }
.pane-head strong { font-weight: 500; color: var(--ink); font-size: 15px; }
.calls { color: var(--muted); } .calls b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.feed { list-style: none; margin: 0; padding: 10px 12px; height: 262px; overflow: hidden; transition: opacity 0.4s; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; border: 1.5px solid transparent; animation: drop 0.4s ease-out; }
.feed li img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.feed li div { min-width: 0; font-size: 14px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed li b { display: block; font-weight: 500; color: var(--ink); }
.feed li.diff { border-color: var(--wait); background: var(--wait-soft); }
.feed li.diff.yes, .feed li.found { border-color: var(--ok); background: var(--ok-soft); }
.feed li.diff::after { content: "new"; margin-left: auto; font-size: 12px; color: var(--wait); padding: 0 6px; }
.feed li.diff.yes::after { color: var(--ok); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.pane-foot { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--rule); font-size: 14px; min-height: 62px; color: var(--text); }
.pill-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pane.done .pane-foot { color: var(--ok); font-weight: 500; }
.code { margin-top: 6px; }
.prompts { margin-top: 22px; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.prompts div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--rule); align-items: center; }
.prompts div:last-child { border-bottom: 0; }
.prompts span { display: flex; flex-wrap: wrap; gap: 6px; }
.prompts span b { font-size: 13px; font-weight: 500; padding: 3px 9px; border-radius: 6px; }
.k-passive { background: var(--sleep-soft); color: #1f47b3; }
.k-active { background: var(--wait-soft); color: #b55a17; }
.k-absolute { background: var(--ok-soft); color: #14693d; }
.k-relative { background: #f1eafb; color: #6b3fa8; }
.k-no-op { background: var(--soft); color: var(--text); }
.prompts span small { flex-basis: 100%; font-size: 13px; color: var(--muted); margin-top: 2px; }
.prompts p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text); }

/* charts */
.chart { margin-top: 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: Inter, sans-serif; font-size: 13px; fill: var(--muted); }
.chart .lab { fill: var(--ink); font-size: 14px; }
.grid { stroke: var(--rule); stroke-width: 1; }
.axis { stroke: var(--faint); stroke-width: 1; }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.3s cubic-bezier(.4,0,.2,1); }
.in .draw { stroke-dashoffset: 0; }
.pop { opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: center; transition: opacity 0.5s, transform 0.5s cubic-bezier(.3,1.4,.5,1); }
.in .pop { opacity: 1; transform: none; }
.fade { opacity: 0; transition: opacity 0.7s 0.5s; }
.in .fade { opacity: 1; }
.tk { opacity: 0; transition: opacity 0.25s; }
.in .tk { opacity: 1; }
.bar-r { transition: width 0.9s cubic-bezier(.4,0,.2,1); }

/* tables */
.results { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 16px; color: var(--ink); }
.results th { text-align: left; font-weight: 400; font-size: 14px; color: var(--muted); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.results td { padding: 15px 0; border-bottom: 1px solid var(--rule); }
.results th.num, .results td.num { text-align: right; }
.results td.rank { width: 46px; color: var(--muted); }
.results td.tool { color: var(--text); }
.results .best { color: var(--ok); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 9px; }

/* mosaic of synthetic media */
.mosaic { display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-flow: dense; gap: 6px; max-width: var(--col); margin: 22px auto 0; padding: 0 24px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--soft); cursor: pointer; transition: opacity 0.35s, transform 0.35s; }
.tile.big { grid-column: span 2; grid-row: span 2; }
@media (min-width: 701px) {
  .tile.big:nth-of-type(2) { grid-area: 1 / 2 / span 2 / span 2; }
  .tile.big:nth-of-type(10) { grid-area: 2 / 6 / span 2 / span 2; }
  .tile.big:nth-of-type(21) { grid-area: 4 / 4 / span 2 / span 2; }
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.8s, transform 0.5s; }
.tile img.next { opacity: 0; }
.tile.swap img.next { opacity: 1; }
.tile:hover img { transform: scale(1.06); }
.mosaic.filtered .tile:not(.match) { opacity: 0.1; }
.mosaic:hover .tile:not(:hover) { opacity: 0.55; }
.mosaic.filtered:hover .tile:not(.match) { opacity: 0.1; }
#mosaic-cap { min-height: 24px; margin-top: 16px; }
#mosaic-cap strong { color: var(--ink); font-weight: 500; }
#tasks .toggle { margin-top: 8px; }

/* paper */
.paper-title { font-size: 20px; color: var(--ink); margin: 0 0 10px; }
.authors { margin: 0; color: var(--ink); }
.affil { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.cite-h { margin-top: 48px; margin-bottom: 14px; }
.bibwrap { position: relative; }
.bib { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; line-height: 1.65; background: var(--soft); border-radius: 10px; padding: 20px 22px; overflow-x: auto; margin: 0; color: var(--ink); }
#copy { position: absolute; top: 12px; right: 12px; font: inherit; font-size: 13px; padding: 5px 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; color: var(--text); }
sup { font-size: 0.68em; color: var(--muted); }

.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 110px; padding-top: 22px; padding-bottom: 48px; border-top: 1px solid var(--rule); }

@media (max-width: 700px) {
  .nav { padding: 14px 18px; }
  .nav nav a { margin-left: 14px; font-size: 13px; }
  .hero { margin: 4px 8px 0; }
  .hero-text { bottom: 24px; }
  section.col, section.band { margin-top: 68px; }
  .scoring { grid-template-columns: 1fr; }
  .duel { grid-template-columns: 1fr; }
  .nav nav a:not(:last-child) { display: none; }
  .chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .chart svg { min-width: 620px; }
  #types svg, #lanes svg { min-width: 560px; }
  .player { flex-wrap: wrap; gap: 10px 16px; }
  .status { flex-basis: 100%; }
  .results td.num, .results th.num { padding-left: 12px; }
  .results td.rank { width: 26px; }
  .ask p { font-size: 18px; min-height: 0; }
  .stats strong { font-size: 38px; }
  .stats { grid-template-columns: 1fr; }
  .stats div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 22px; }
  .apps { grid-template-columns: repeat(2, 1fr); }
  .mosaic { grid-template-columns: repeat(4, 1fr); }
  #tasks .toggle { flex-wrap: wrap; }
  .prompts div { grid-template-columns: 1fr; gap: 6px; }
  .results { font-size: 14.5px; }
  .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero img, .story .beam, .story .hand, .story .eyes { animation: none; }
  .story .row { animation: none; opacity: 1; }
  .draw, .pop, .fade, .bar-r, .screen img, .tile img { transition: none; }
}
[data-variant="b"] .toggle, [data-variant="b"] .nav nav, [data-variant="b"] #copy { font-family: Inter, sans-serif; }
.chart + p, .results + p { margin-top: 22px; }
