/* Pair Desk homepage.
   Concept: the desk itself. The page is the app's warm paper (graphite in dark mode) with its one
   deep-teal accent; the loop in the hero is a dark desktop with three panes side by side: the
   agent's session, the check on the desk, and the game. Pair Desk's status colours are the
   recurring mark: the row of status dots under every section heading follows the life of a check.
   Tokens mirror web/app.css. No external fonts or requests. */

:root {
  --page: #f3f1ec;
  --surface: #fbfaf7;
  --surface-2: #eeebe4;
  --ink: #1e1c19;
  --ink-2: #4a463f;
  --muted: #736d62;
  --line: #ddd8cd;
  --accent: #2f5d62;
  --accent-hover: #264e52;
  --accent-ink: #f4f2ed;
  --accent-soft: #dcebea;
  --code-bg: #1b1d20;
  --code-ink: #e6e2d9;
  --shadow: 0 1px 2px rgba(40, 32, 20, .06), 0 10px 30px rgba(40, 32, 20, .10);

  /* status colours, from the app */
  --reported: #5a3eb0;
  --open: #1f5ea6;
  --in_progress: #8a5700;
  --auto_check: #24627d;
  --to_check: #0a6a5b;
  --passed: #22773a;
  --failed: #b1261d;

  /* the desktop in the hero, identical in both themes */
  --desk: #141517;
  --desk-2: #1b1d20;
  --desk-3: #23262a;
  --desk-line: #2f3338;
  --desk-ink: #ebe8e1;
  --desk-ink-2: #9a958b;
  --d-teal: #6db3b8;
  --d-to_check: #6fdcc6; --d-to_check-bg: #163631;
  --d-failed: #f59a90;   --d-failed-bg: #42201d;
  --d-passed: #86d898;   --d-passed-bg: #1b3322;
  --d-p1: #f3a14c;
  --d-violet: #b9a6f5;

  --display: "Segoe UI Variable Display", "SF Pro Display", -apple-system, "Segoe UI", system-ui, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, ui-monospace, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141517;
    --surface: #1b1d20;
    --surface-2: #23262a;
    --ink: #ebe8e1;
    --ink-2: #cdc9c0;
    --muted: #9a958b;
    --line: #2f3338;
    --accent: #6db3b8;
    --accent-hover: #86c4c8;
    --accent-ink: #0f1a1b;
    --accent-soft: #1f3638;
    --code-bg: #0f1012;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --reported: #b9a6f5;
    --open: #8dbbf2;
    --in_progress: #f0c56e;
    --auto_check: #8ac9ed;
    --to_check: #6fdcc6;
    --passed: #86d898;
    --failed: #f59a90;
    --desk: #0d0e10;
    --desk-2: #17191c;
    --desk-3: #1f2226;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

code, kbd { font-family: var(--mono); font-size: .86em; }
:not(pre) > code {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  padding: .08em .35em;
  border-radius: 4px;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 .35em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  text-align: center;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.015em; }
h2 { font-size: clamp(1.8rem, 3.3vw, 2.5rem); font-weight: 650; max-width: 24ch; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* the status row under section headings: reported, open, in progress, auto check, to check, passed */
.band h2::after, .trio h2::after {
  content: "";
  display: block;
  width: 110px; height: 8px;
  margin-top: 18px;
  background:
    radial-gradient(circle 4px at 4px 4px, var(--reported) 98%, transparent) 0 0 / 22px 8px no-repeat,
    radial-gradient(circle 4px at 4px 4px, var(--open) 98%, transparent) 20px 0 / 22px 8px no-repeat,
    radial-gradient(circle 4px at 4px 4px, var(--in_progress) 98%, transparent) 40px 0 / 22px 8px no-repeat,
    radial-gradient(circle 4px at 4px 4px, var(--auto_check) 98%, transparent) 60px 0 / 22px 8px no-repeat,
    radial-gradient(circle 4px at 4px 4px, var(--to_check) 98%, transparent) 80px 0 / 22px 8px no-repeat,
    radial-gradient(circle 4px at 4px 4px, var(--passed) 98%, transparent) 100px 0 / 22px 8px no-repeat;
}
.trio h2::after { margin-top: 14px; transform: scale(.8); transform-origin: left; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */

.top {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 700 1.2rem/1 var(--display); letter-spacing: -.01em;
}
.top nav { display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: flex-end; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: .96rem; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }
.top nav .nav-gh {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}
@media (max-width: 760px) { .top nav a:not(.nav-gh):not([href="#install"]) { display: none; } }

/* ---------- hero ---------- */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 44px);
}
.hero-copy { max-width: 880px; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .82rem;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-to_check { color: var(--to_check); background: color-mix(in srgb, var(--to_check) 14%, transparent); }

.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 60ch; margin: 24px 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.works { color: var(--muted); font-size: .95rem; margin: 0; }
.works b { color: var(--ink-2); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 600 1rem/1.2 var(--text);
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; }

/* ---------- the loop ---------- */

.loop {
  max-width: calc(var(--wrap) + 80px);
  margin: 0 auto;
  padding: 0 clamp(8px, 2vw, 20px) clamp(40px, 6vw, 72px);
}
.stage {
  margin: 0;
  background:
    radial-gradient(ellipse 50% 60% at 82% 10%, rgb(109 179 184 / .14), transparent 70%),
    linear-gradient(175deg, var(--desk-2), var(--desk) 70%);
  color: var(--desk-ink);
  border: 1px solid var(--desk-line);
  border-radius: 22px;
  padding: clamp(14px, 2.2vw, 26px);
  box-shadow: 0 30px 80px -30px rgba(20, 16, 10, .45);
}
.stage :focus-visible { outline-color: var(--d-teal); }

.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.steps button {
  display: inline-flex; align-items: center; gap: 9px;
  font: 600 .93rem/1 var(--text);
  color: var(--desk-ink-2);
  background: transparent;
  border: 1px solid var(--desk-line);
  border-radius: 999px;
  padding: 8px 15px 8px 8px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.steps button span {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--desk-3); color: var(--desk-ink);
  font-size: .78rem;
}
.steps button:hover { color: var(--desk-ink); border-color: var(--desk-ink-2); }
.steps button[aria-pressed="true"] { color: var(--desk-ink); background: var(--desk-3); border-color: var(--d-teal); }
.steps button[aria-pressed="true"] span { background: var(--d-teal); color: #0f1a1b; }
.steps .play { margin-left: auto; padding: 8px; width: 40px; height: 40px; justify-content: center; }
.steps .play span { background: transparent; width: 14px; height: 14px; border-radius: 0; position: relative; }
.steps .play span::before {
  content: ""; position: absolute; inset: 0;
  background: var(--desk-ink);
  clip-path: polygon(15% 0, 100% 50%, 15% 100%);
}
.steps .play[aria-pressed="true"] span::before { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
html:not(.js) .steps .play { display: none; }

.panes {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.05fr;
  gap: clamp(10px, 1.4vw, 16px);
}
@media (max-width: 1020px) { .panes { grid-template-columns: 1fr 1fr; } .pane-game { grid-column: 1 / -1; } }
@media (max-width: 680px) { .panes { grid-template-columns: 1fr; } }

.pane {
  background: var(--desk-2);
  border: 1px solid var(--desk-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 360px;
}
.pane-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  font: 500 .78rem/1.2 var(--mono);
  color: var(--desk-ink-2);
  border-bottom: 1px solid var(--desk-line);
  background: var(--desk-3);
}
.pane-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d-teal); }
.pane-agent .pane-head .dot { background: var(--d-p1); }
.pane-game .pane-head .dot { background: var(--d-passed); }

/* agent */
.term { padding: 12px 14px 14px; font: 400 .79rem/1.55 var(--mono); color: var(--desk-ink); flex: 1; }
.term .ln { margin: 0; overflow-wrap: anywhere; }
.term .p { color: var(--d-teal); }
.term .c { color: var(--desk-ink-2); }
.term .t { color: var(--d-violet); }
.term .s { color: #e8cf9a; }
.term .dim { color: var(--desk-ink-2); }
.term .ok { color: var(--d-passed); }
.term .no { color: var(--d-failed); }
.term .hook {
  margin: 8px 0 6px;
  padding: 7px 9px;
  border-left: 3px solid var(--d-failed);
  background: color-mix(in srgb, var(--d-failed-bg) 70%, transparent);
  border-radius: 0 6px 6px 0;
}
.term .caret i {
  display: inline-block; width: .55em; height: 1.05em; vertical-align: -.18em;
  background: var(--desk-ink);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* step visibility: .sN lines appear from step N on; .s-showN only in step N */
.js .stage .ln { display: none; }
.js .stage[data-step="1"] .ln.s1, .js .stage[data-step="2"] .ln.s2,
.js .stage[data-step="3"] .ln.s3, .js .stage[data-step="4"] .ln.s4 { display: block; }
.js .stage [class*="s-show"] { display: none; }
.js .stage[data-step="1"] .s-show1, .js .stage[data-step="2"] .s-show2,
.js .stage[data-step="3"] .s-show3, .js .stage[data-step="4"] .s-show4 { display: revert; }
/* lines that appear in the current step fade in */
.js .stage[data-step="3"] .ln.s3:not(.s1), .js .stage[data-step="4"] .ln.s4:not(.s3) { animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

/* without JS: show the finished story, every line once, step 1's card */
html:not(.js) .stage .s-show2, html:not(.js) .stage .s-show3, html:not(.js) .stage .s-show4 { display: none; }
html:not(.js) .stage .steps button:not(.play) { pointer-events: none; }

/* desk card */
.pane-desk { background: color-mix(in srgb, var(--desk-2) 85%, #2f5d62); }
.card {
  margin: 14px;
  padding: 16px;
  background: var(--desk-2);
  border: 1px solid var(--desk-line);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: .9rem;
}
.card-top { display: flex; align-items: center; gap: 10px; }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 .78rem/1 var(--text);
  padding: 5px 10px 5px 8px; border-radius: 999px;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-to_check { color: var(--d-to_check); background: var(--d-to_check-bg); }
.st-failed { color: var(--d-failed); background: var(--d-failed-bg); }
.st-passed { color: var(--d-passed); background: var(--d-passed-bg); }
.js .stage[data-step="3"] .st-failed, .js .stage[data-step="4"] .st-passed { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.id { font: 500 .78rem var(--mono); color: var(--desk-ink-2); }
.prio { margin-left: auto; font: 600 .7rem/1 var(--mono); color: var(--d-p1); border: 1px solid currentColor; border-radius: 4px; padding: 2px 4px; }
.card-title { font-size: 1.05rem; color: var(--desk-ink); letter-spacing: -.005em; }
.plan { display: flex; align-items: center; gap: 10px; font: 600 .72rem/1 var(--text); color: var(--desk-ink-2); text-transform: uppercase; letter-spacing: .06em; }
.plan b { color: var(--desk-ink); }
.bar { flex: 1; max-width: 140px; height: 4px; background: var(--desk-3); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--d-passed); border-radius: 2px; }
.js .stage[data-step="3"] .bar i { width: 75%; background: var(--d-p1); }
.where {
  background: linear-gradient(160deg, color-mix(in srgb, #2f5d62 35%, var(--desk-2)), var(--desk-2));
  border: 1px solid var(--desk-line);
  border-radius: 10px;
  padding: 10px;
}
.where code {
  display: block;
  font-size: .74rem;
  background: var(--desk);
  border: 1px solid var(--desk-line);
  border-radius: 7px;
  padding: 8px 9px;
  color: var(--desk-ink);
  overflow-wrap: anywhere;
}
.where-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.mini {
  font: 600 .74rem/1 var(--text);
  border: 1px solid var(--desk-line);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--desk-ink);
}
.mini-send { background: var(--d-teal); color: #0f1a1b; border-color: var(--d-teal); }
.picked { font-size: .74rem; color: var(--desk-ink-2); }
.picked b { color: var(--d-to_check); font-weight: 600; }
.note {
  border-left: 3px solid var(--d-failed);
  background: color-mix(in srgb, var(--d-failed-bg) 60%, transparent);
  border-radius: 0 8px 8px 0;
  padding: 8px 10px;
  font-size: .84rem;
  position: relative;
}
.note p { margin: 3px 0 0; color: var(--desk-ink); }
.note .who { font-weight: 600; }
.note .verdict { font: 700 .7rem var(--mono); color: var(--d-failed); letter-spacing: .04em; }
.note-pass { border-left-color: var(--d-passed); background: color-mix(in srgb, var(--d-passed-bg) 60%, transparent); }
.note .verdict-ok { color: var(--d-passed); }
.thumb {
  position: absolute; right: 8px; top: 8px;
  width: 54px; height: 34px;
  border-radius: 5px; border: 1px solid var(--desk-line);
  background: linear-gradient(#3a2a4a, #a8553a 70%, #3b2a22 71%);
  overflow: hidden;
}
.thumb i { position: absolute; left: 30px; top: 18px; width: 12px; height: 7px; background: #ffb347; }
.verdicts { display: flex; gap: 8px; margin-top: auto; }
.v {
  flex: 1; text-align: center;
  font: 600 .82rem/1 var(--text);
  padding: 9px 8px; border-radius: 8px;
  border: 1px solid var(--desk-line);
}
.v-pass { color: var(--d-passed); background: var(--d-passed-bg); border-color: color-mix(in srgb, var(--d-passed) 40%, transparent); }
.v-fail { color: var(--d-failed); background: var(--d-failed-bg); border-color: color-mix(in srgb, var(--d-failed) 40%, transparent); }
/* the button being pressed in this step */
.js .stage[data-step="2"] [data-press~="2"], .js .stage[data-step="3"] [data-press~="3"], .js .stage[data-step="4"] [data-press~="4"] {
  box-shadow: 0 0 0 2px var(--desk-2), 0 0 0 4px currentColor;
  animation: press .5s ease .2s both;
}
.js .stage[data-step="2"] .mini-send, .js .stage[data-step="4"] .mini-send { color: #0f1a1b; box-shadow: 0 0 0 2px var(--desk-2), 0 0 0 4px var(--d-teal); }
@keyframes press { 40% { transform: scale(.94); } }

/* game */
.game { position: relative; flex: 1; display: flex; flex-direction: column; background: #120d14; }
.world { width: 100%; flex: 1; min-height: 220px; display: block; }
.sky-a { stop-color: #1d2540; transition: stop-color .8s; }
.sky-b { stop-color: #3b4f6e; transition: stop-color .8s; }
.sun { fill: #f5f0d8; transition: fill .8s, transform 1s; transform-box: fill-box; transform-origin: center; }
.ridge-far { fill: #2b3550; transition: fill .8s; }
.volcano { fill: #241c26; }
.crater { fill: #ff7a2c; opacity: .8; }
.flows path { transition: opacity .5s; }
.tip-round { opacity: 0; }
.glow circle { fill: #ffb347; opacity: .25; }
.glow-east { opacity: 0 !important; transition: opacity .5s; }
.js .stage[data-step="4"] .glow-east { opacity: .25 !important; }
.mark { fill: none; stroke: var(--d-to_check); stroke-width: 2; stroke-dasharray: 4 5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.player { fill: var(--d-to_check); transform: translate(70px, 262px); transition: transform 0s; }
.player path { stroke: #0d1513; stroke-width: 1.5; }
/* dusk once the /time 17:30 has run */
.js .stage[data-step="2"] .sky-a, .js .stage[data-step="3"] .sky-a, .js .stage[data-step="4"] .sky-a { stop-color: #33224a; }
.js .stage[data-step="2"] .sky-b, .js .stage[data-step="3"] .sky-b, .js .stage[data-step="4"] .sky-b { stop-color: #d8774a; }
.js .stage[data-step="2"] .sun, .js .stage[data-step="3"] .sun, .js .stage[data-step="4"] .sun { fill: #ffcf7a; transform: translateY(66px); }
.js .stage[data-step="2"] .ridge-far, .js .stage[data-step="3"] .ridge-far, .js .stage[data-step="4"] .ridge-far { fill: #4a2f45; }
/* the teleport */
.js .stage[data-step="2"] .player, .js .stage[data-step="3"] .player, .js .stage[data-step="4"] .player { transform: translate(276px, 236px) rotate(-62deg); }
.js .stage[data-step="2"] .mark, .js .stage[data-step="3"] .mark { opacity: 1; animation: spin 6s linear infinite; }
.js .stage[data-step="3"] .mark { stroke: var(--d-failed); }
.js .stage[data-step="4"] .mark { opacity: 1; stroke: var(--d-passed); stroke-dasharray: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.js .stage[data-step="4"] .tip-square { opacity: 0; }
.js .stage[data-step="4"] .tip-round { opacity: 1; }
.flash { position: absolute; inset: 0; background: #e7fff9; opacity: 0; pointer-events: none; }
.js .stage[data-step="2"] .flash, .js .stage.again .flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }
.console {
  font: 400 .76rem/1.5 var(--mono);
  color: #cfe9e2;
  background: rgb(8 10 12 / .85);
  border-top: 1px solid var(--desk-line);
  padding: 8px 12px;
  min-height: 2.6em;
}
.console p { margin: 0; overflow-wrap: anywhere; }
.console .p { color: var(--d-to_check); }
.js .console p { display: none; }
.js .stage[data-step="1"] .console .s1, .js .stage[data-step="2"] .console .s2,
.js .stage[data-step="3"] .console .s3, .js .stage[data-step="4"] .console .s4 { display: block; }
html:not(.js) .console .s2 { display: none; }

.stage figcaption {
  margin: 18px 4px 0;
  min-height: 3.2em;
  font-size: 1.05rem;
  color: var(--desk-ink);
  max-width: 78ch;
}
.stage figcaption b { color: var(--d-to_check); font-weight: 600; }
.stage-note { margin: 8px 4px 0; font-size: .82rem; color: var(--desk-ink-2); }

@media (prefers-reduced-motion: reduce) {
  .stage *, .stage *::before { animation: none !important; transition: none !important; }
}

/* ---------- bands ---------- */

main > .band {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
}
.band-head { margin-bottom: 36px; }
.intro { color: var(--ink-2); max-width: 66ch; margin: 18px 0 0; font-size: 1.1rem; }

.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split-rev { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) {
  .split, .split-rev { grid-template-columns: 1fr; }
  .split-rev .prose { order: -1; }
}
.prose h2 { margin-bottom: 26px; }
.prose p { color: var(--ink-2); max-width: 62ch; }

/* screenshot viewer */
.viewer { margin: 0; }
.viewer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.views, .themes {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
}
.views button, .themes button {
  font: 600 .92rem/1 var(--text);
  color: var(--ink-2);
  background: transparent;
  border: 0; border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
.views button:hover, .themes button:hover { color: var(--ink); }
.views button[aria-pressed="true"], .themes button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
html:not(.js) .views, html:not(.js) .themes { display: none; }
.window {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.window img { width: 100%; }
.viewer figcaption { margin-top: 14px; color: var(--ink-2); min-height: 1.6em; }
.shot-note { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* feature list */
.spec {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.spec > div {
  padding: 22px 24px 24px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt { font: 600 1.04rem/1.3 var(--display); margin-bottom: 8px; }
.spec dt::before {
  content: "";
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 9px; vertical-align: .12em;
  background: var(--to_check);
}
.spec > div:nth-child(6n+1) dt::before { background: var(--reported); }
.spec > div:nth-child(6n+2) dt::before { background: var(--open); }
.spec > div:nth-child(6n+3) dt::before { background: var(--in_progress); }
.spec > div:nth-child(6n+4) dt::before { background: var(--auto_check); }
.spec > div:nth-child(6n+6) dt::before { background: var(--passed); }
.spec dd { margin: 0; color: var(--ink-2); font-size: .98rem; }

/* code cards */
.term-card {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--code-ink) 12%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.term-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid color-mix(in srgb, var(--code-ink) 10%, transparent); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: color-mix(in srgb, var(--code-ink) 22%, transparent); }
.term-card pre, .dl pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  font: 400 .84rem/1.6 var(--mono);
}
.term-card code, .dl pre code { font-size: inherit; }
pre .c, pre .dim { color: color-mix(in srgb, var(--code-ink) 55%, transparent); }
pre .k { color: #8fd3d8; }
pre .s { color: #e8cf9a; }
pre .good { color: #86d898; }
pre .bad { color: #f59a90; }

/* agents */
.agents {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
}
.agents li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.agents h3 { margin-bottom: 8px; }
.agents p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* trio */
main > .trio {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px);
}
.trio h2 { font-size: 1.4rem; margin-bottom: 14px; }
.trio p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { main > .trio { grid-template-columns: 1fr; } }

/* install */
.dl-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
@media (max-width: 900px) { .dl-grid { grid-template-columns: 1fr; } }
.dl {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  min-width: 0;
}
.dl h3 { margin-bottom: 16px; font-size: 1.25rem; }
.dl pre {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dl-sub { color: var(--ink-2); font-size: .95rem; margin: 16px 0 0; }
.dl .cta { margin: 20px 0 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.tabs button {
  font: 600 .88rem/1 var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
html:not(.js) .tabs { display: none; }
.js .tab-panels pre[hidden] { display: none; }
html:not(.js) .tab-panels pre + pre { margin-top: 8px; }

/* ---------- footer and doc pages ---------- */

.foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  color: var(--muted); font-size: .92rem;
}
.foot p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.foot img { display: inline-block; vertical-align: -4px; margin-right: 6px; }
.foot p:first-child { display: block; }
.foot .legal { flex-basis: 100%; display: block; font-size: .8rem; max-width: 90ch; }

.doc { max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 28px; }
.doc h2 { font-size: 1.35rem; margin: 32px 0 10px; }
.doc p { color: var(--ink-2); }
