/* HPC Navigator website.
   A navigator's chart of one cluster: warm chart paper with a faint graticule, navy ink, an
   editorial serif for headings, sea teal for what the software does and chart magenta for
   anything that waits on the researcher's decision. Sharp corners, hairline rules and stamped
   labels, like a printed field guide. Dark mode is a night chart, chosen step by step. */

:root {
  --paper: #f5f1e8;
  --paper-2: #ede6d6;
  --surface: #fffdf8;
  --surface-2: #f8f4ea;
  --ink: #1c2733;
  --ink-2: #33414f;
  --muted: #5b6470;
  --faint: #8a8f94;
  --line: #ddd3c0;
  --line-2: #c4b89f;
  --go: #12627a;
  --go-2: #0d4d60;
  --go-soft: #dcebef;
  --yes: #a3195b;
  --yes-2: #85114a;
  --yes-soft: #f6e1ea;
  --stop: #b3261e;
  --stop-soft: #f7e0dc;
  --warn: #8a5300;
  --warn-soft: #f8ead0;
  --ok: #2c6a3b;
  --ok-soft: #e1eee0;
  --grid: rgba(28, 39, 51, 0.05);
  --grid-2: rgba(28, 39, 51, 0.09);
  --contour: rgba(18, 98, 122, 0.16);
  --term: #172230;
  --term-2: #1f2c3b;
  --term-ink: #e9e3d4;
  --term-dim: #93a1af;
  --term-go: #8fd3e3;
  --term-yes: #f4a3c6;
  --term-ok: #a6dba8;
  --shadow: 0 1px 0 rgba(28, 39, 51, 0.04), 0 18px 40px -18px rgba(28, 39, 51, 0.28);
  --shadow-sm: 0 1px 0 rgba(28, 39, 51, 0.05), 0 6px 16px -10px rgba(28, 39, 51, 0.3);
  --bar-without: #c27a2c;
  --bar-with: #00799c;
  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1620;
    --paper-2: #121c27;
    --surface: #15202b;
    --surface-2: #192532;
    --ink: #ece6d8;
    --ink-2: #d2ccbf;
    --muted: #a6aeb8;
    --faint: #7c8692;
    --line: #283645;
    --line-2: #3a4a5c;
    --go: #82c8db;
    --go-2: #a9dbe8;
    --go-soft: #133240;
    --yes: #ff86bb;
    --yes-2: #ffa6cd;
    --yes-soft: #3b1529;
    --stop: #ff8a7d;
    --stop-soft: #3d1a17;
    --warn: #f0b860;
    --warn-soft: #36280f;
    --ok: #93d29c;
    --ok-soft: #173020;
    --grid: rgba(236, 230, 216, 0.035);
    --grid-2: rgba(236, 230, 216, 0.06);
    --contour: rgba(130, 200, 219, 0.13);
    --term: #0a1118;
    --term-2: #111b25;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.3), 0 6px 16px -10px rgba(0, 0, 0, 0.7);
    --bar-without: #c9833a;
    --bar-with: #1b9cc4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1620;
  --paper-2: #121c27;
  --surface: #15202b;
  --surface-2: #192532;
  --ink: #ece6d8;
  --ink-2: #d2ccbf;
  --muted: #a6aeb8;
  --faint: #7c8692;
  --line: #283645;
  --line-2: #3a4a5c;
  --go: #82c8db;
  --go-2: #a9dbe8;
  --go-soft: #133240;
  --yes: #ff86bb;
  --yes-2: #ffa6cd;
  --yes-soft: #3b1529;
  --stop: #ff8a7d;
  --stop-soft: #3d1a17;
  --warn: #f0b860;
  --warn-soft: #36280f;
  --ok: #93d29c;
  --ok-soft: #173020;
  --grid: rgba(236, 230, 216, 0.035);
  --grid-2: rgba(236, 230, 216, 0.06);
  --contour: rgba(130, 200, 219, 0.13);
  --term: #0a1118;
  --term-2: #111b25;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.3), 0 6px 16px -10px rgba(0, 0, 0, 0.7);
  --bar-without: #c9833a;
  --bar-with: #1b9cc4;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--go); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--go-2); }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.05em 0.35em;
  border-radius: 2px;
  white-space: nowrap;
}
::selection { background: var(--yes-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yes); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Stamped label: mono, small caps-like */
.stamp {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stamp b { color: var(--go); font-weight: 600; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 11px; border-radius: 2px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--yes); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.menu-btn { display: none; }
.course { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--yes); transition: width 0.1s linear; }

@media (max-width: 1120px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .head-actions { margin-left: auto; }
  .site-head.open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    box-shadow: var(--shadow);
  }
  .site-head.open .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .site-head.open .nav a[aria-current="page"] { box-shadow: none; color: var(--yes); }
  .head-actions .btn-sm { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-size: 16px; font-weight: 600; line-height: 1;
  padding: 14px 20px; border-radius: var(--radius); border: 1px solid var(--ink); white-space: nowrap;
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { color: var(--paper); transform: translateY(-1px); box-shadow: 4px 4px 0 var(--yes); }
.btn svg { width: 16px; height: 16px; flex: none; max-width: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--line-2); }
.btn.yes { background: var(--yes); border-color: var(--yes); color: #fff; }
.btn.yes:hover { box-shadow: 4px 4px 0 var(--ink); color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.text-link::after { content: "→"; transition: transform 0.15s ease; }
.text-link:hover::after { transform: translateX(3px); }

/* ---------- Backgrounds ---------- */
.graticule {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-2) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--contour); }
.hero .rose { position: absolute; right: -120px; top: -90px; width: 520px; height: 520px; color: var(--grid-2); pointer-events: none; animation: spin 240s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero .rose { animation: none; } }
.hero-inner { position: relative; padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow .pill {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-2); padding: 4px 9px; border-radius: 2px; color: var(--ink-2); background: var(--surface);
}
.eyebrow .pill.new { border-color: var(--yes); color: var(--yes); }
.hero h1 { font-size: clamp(42px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 24px; }
.hero h1 em { color: var(--yes); font-style: italic; font-weight: 500; }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 36em; margin-bottom: 30px; line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 30px; }
.works-with { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--muted); }
.works-with .stamp { margin-right: 2px; }
.works-with span.chip { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.works-with span.chip::before { content: ""; width: 6px; height: 6px; background: var(--go); transform: rotate(45deg); }
.works-with span.chip.next::before { background: transparent; border: 1px solid var(--go); }

/* ---------- Hero app mock ---------- */
.app {
  position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: var(--shadow), 10px 10px 0 -1px var(--paper-2), 10px 10px 0 0 var(--line);
  overflow: hidden; font-size: 13.5px; line-height: 1.45;
}
.app-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.app-bar .title { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.app-bar .replay { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); background: none; border: 1px solid var(--line); padding: 3px 8px; border-radius: 2px; cursor: pointer; }
.app-bar .replay:hover { color: var(--ink); border-color: var(--line-2); }
.app-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 440px; }
.pane-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pane-h .live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); }
.pane-h .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.chat { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.chat-log { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.msg { max-width: 92%; opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.35s ease; }
.msg.hidden { opacity: 0; transform: translateY(6px); }
.msg.you { align-self: flex-end; background: var(--ink); color: var(--paper); padding: 8px 11px; border-radius: 10px 10px 2px 10px; }
.msg.agent { align-self: flex-start; color: var(--ink-2); }
.msg.agent .who { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 3px; }
.msg .cmd { display: block; margin-top: 6px; background: var(--term); color: var(--term-ink); font-family: var(--mono); font-size: 11.5px; padding: 7px 9px; border-radius: 3px; white-space: pre-wrap; word-break: break-word; }
.msg .cmd .p { color: var(--term-go); }
.msg .out { display: block; margin-top: 4px; border-left: 2px solid var(--yes); padding: 3px 0 3px 9px; color: var(--ink); font-size: 12.5px; }
.msg .out.ok { border-left-color: var(--ok); }
.msg .out b { color: var(--yes); font-weight: 700; }
.msg .out.ok b { color: var(--ok); }
.typing { display: inline-flex; gap: 3px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.4; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 1; } }
.chat-input { margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--faint); font-size: 12.5px; background: var(--surface-2); }

.dash { background: var(--paper); min-width: 0; display: flex; flex-direction: column; }
.dash-nav { display: flex; gap: 12px; padding: 8px 14px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; overflow: hidden; }
.dash-nav b { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--go); padding-bottom: 2px; }
.dash-nav .badge { background: var(--stop); color: #fff; border-radius: 8px; padding: 0 5px; font-size: 10px; margin-left: 2px; }
.dash-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.status-row span { font-size: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 2px 8px; background: var(--surface); color: var(--ink-2); }
.status-row span.good { background: var(--ok-soft); border-color: transparent; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.5s ease, padding 0.4s ease, margin 0.4s ease, border-color 0.4s ease; }
.card h5 { margin: 0 0 6px; font-family: var(--body); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.approval { border-left: 3px solid var(--yes); background: var(--yes-soft); overflow: hidden; }
.approval.hidden, .verdict.hidden { opacity: 0; transform: translateY(-4px); max-height: 0 !important; padding-top: 0; padding-bottom: 0; margin-top: -10px; border-color: transparent; }
.approval { max-height: 180px; }
.approval p { margin: 0 0 6px; font-size: 12.5px; color: var(--ink); }
.approval p strong { font-weight: 700; }
.approval .why { font-size: 11.5px; color: var(--muted); }
.approval .acts { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.approval .acts span.b { border: 1px solid var(--yes); color: var(--yes); background: var(--surface); padding: 2px 8px; border-radius: 3px; font-weight: 700; }
.approval .acts span.b2 { border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); padding: 2px 8px; border-radius: 3px; }
.approval.done { border-left-color: var(--ok); background: var(--ok-soft); }
.verdict { border-left: 3px solid var(--warn); max-height: 120px; overflow: hidden; font-size: 12px; }
.verdict b { color: var(--ink); }
.verdict .fix { color: var(--muted); display: block; margin-top: 2px; }
.jobs { display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; transition: opacity 0.4s ease, background 0.6s ease; }
.job:last-child { border-bottom: 0; padding-bottom: 2px; }
.job .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); }
.job .dot.wait { background: transparent; border: 1.5px solid var(--muted); }
.job .name { font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.job .jst { grid-column: 2; color: var(--muted); font-size: 11.5px; }
.job .meter { grid-column: 2; height: 4px; margin-top: 4px; background: var(--go-soft); border-radius: 2px; overflow: hidden; }
.job .meter i { display: block; height: 100%; width: 0; background: var(--go); border-radius: 2px; transition: width 1.2s ease; }
.job.new { background: color-mix(in srgb, var(--go-soft) 60%, transparent); }
.job.hidden { display: none; }
.activity { font-size: 11.5px; color: var(--muted); }
.activity div { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: 3px 0; transition: opacity 0.4s ease; }
.activity div.hidden { display: none; }
.activity time { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.activity em { font-style: normal; color: var(--ink-2); font-weight: 600; }

.sysdialog-layer { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14, 22, 32, 0.38); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; backdrop-filter: blur(1.5px); z-index: 3; }
.sysdialog-layer.show { opacity: 1; }
.sysdialog {
  width: min(300px, 86%); background: #f4f2ee; color: #1c1c1e; border-radius: 14px; padding: 20px 20px 16px; text-align: center;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.55), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; transform: scale(0.94); transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2);
}
.sysdialog-layer.show .sysdialog { transform: scale(1); }
.sysdialog .fp { width: 54px; height: 54px; margin: 0 auto 10px; color: #c2185b; }
.sysdialog .fp .scan { stroke-dasharray: 160; stroke-dashoffset: 160; }
.sysdialog-layer.scan .fp .scan { animation: scan 1.1s ease forwards; }
@keyframes scan { to { stroke-dashoffset: 0; } }
.sysdialog strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.sysdialog p { font-size: 12px; margin: 0 0 12px; color: #3a3a3c; line-height: 1.4; }
.sysdialog .note { font-size: 10.5px; color: #6b6b70; margin: 0; padding-top: 10px; border-top: 1px solid #ddd; }
.sysdialog .done-mark { display: none; color: #2c6a3b; font-weight: 700; font-size: 12.5px; margin-bottom: 8px; }
.sysdialog-layer.ok .done-mark { display: block; }
.hero-caption { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }

@media (max-width: 640px) {
  .app-body { grid-template-columns: 1fr; min-height: 0; }
  .chat { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-log { min-height: 330px; }
  .dash-nav span.opt { display: none; }
  .app { box-shadow: var(--shadow); }
  .sysdialog-layer { place-items: start center; padding-top: 150px; }
}

/* ---------- Property ribbon ---------- */
.ribbon { border-bottom: 1px solid var(--line); background: var(--surface); }
.ribbon .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ribbon .item { padding: 22px 22px 22px 0; display: flex; gap: 14px; align-items: flex-start; }
.ribbon .item + .item { padding-left: 22px; border-left: 1px solid var(--line); }
.ribbon svg { width: 26px; height: 26px; color: var(--go); flex: none; margin-top: 2px; }
.ribbon strong { display: block; font-size: 15.5px; color: var(--ink); line-height: 1.3; }
.ribbon span { font-size: 14px; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) {
  .ribbon .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ribbon .item:nth-child(3) { padding-left: 0; border-left: 0; }
  .ribbon .item:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .ribbon .wrap { grid-template-columns: 1fr; }
  .ribbon .item, .ribbon .item + .item { padding: 16px 0; border-left: 0; }
  .ribbon .item + .item { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.band { padding: clamp(64px, 9vw, 112px) 0; border-bottom: 1px solid var(--line); position: relative; }
.band.wash { background: var(--paper-2); }
.band.night { background: var(--term); color: var(--term-ink); border-bottom-color: #000; }
.band.night .stamp { color: var(--term-dim); }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.waypoint { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.waypoint::before { content: ""; width: 9px; height: 9px; border: 1.5px solid var(--yes); transform: rotate(45deg); }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.02em; margin-bottom: 16px; }
.sec-head h2 em { font-style: italic; color: var(--yes); }
.sec-head p { font-size: clamp(17px, 1.4vw, 19.5px); color: var(--ink-2); margin: 0; }
.band.night .sec-head p { color: var(--term-dim); }
.band.night h2 em { color: var(--term-yes); }
.sub-h { font-family: var(--display); font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 12px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.panel h3 { font-size: 22px; margin-bottom: 8px; }
.panel p { color: var(--ink-2); font-size: 15.5px; }
.panel p:last-child { margin-bottom: 0; }
.panel .stamp { display: block; margin-bottom: 10px; }

/* ---------- Problem section ---------- */
.problem-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.problem-intro .quote { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); line-height: 1.2; font-style: italic; color: var(--ink); margin: 0; }
.problem-intro .quote span { color: var(--yes); }
@media (max-width: 860px) { .problem-intro { grid-template-columns: 1fr; gap: 20px; } }
.hazards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); }
.hazards .col { padding: 28px; }
.hazards .col + .col { border-left: 1px solid var(--line); }
@media (max-width: 760px) { .hazards { grid-template-columns: 1fr; } .hazards .col + .col { border-left: 0; border-top: 1px solid var(--line); } }
.hazards h3 { font-size: 23px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.hazards ul { list-style: none; margin: 0; padding: 0; }
.hazards li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px dashed var(--line); color: var(--ink-2); font-size: 15.5px; }
.hazards li:first-child { border-top: 0; padding-top: 0; }
.hazards li svg { width: 20px; height: 20px; color: var(--stop); margin-top: 2px; }
.hazards li strong { color: var(--ink); }

/* ---------- Division of labour: Figure 1, drawn by tools/make_fig1.py ---------- */
.fig1 { margin: 0; }
.fig1-scroll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(10px, 1.6vw, 18px); overflow-x: auto; }
.fig1 svg { display: block; width: 100%; height: auto; min-width: 720px; }
.fig1 .figcap { margin-top: 12px; }
.fig1 text { font-family: var(--body); }
.f1-bg { fill: var(--surface); }
.f1-lane { fill: var(--surface-2); }
.f1-lane2 { fill: transparent; }
.f1-sep { stroke: var(--line-2); stroke-width: .6; stroke-dasharray: 2 2; fill: none; }
.fig1 .f1-pt { font-family: var(--display); font-size: 9.5px; font-weight: 500; fill: var(--ink); }
.fig1 .f1-pt.f1-go { fill: var(--go); font-style: italic; }
.fig1 .f1-lanel { font-family: var(--mono); font-size: 5.4px; font-weight: 600; fill: var(--muted); letter-spacing: .5px; }
.f1-bx { fill: var(--surface-2); stroke: var(--line-2); stroke-width: .7; }
.f1-bx.f1-you { fill: var(--surface); stroke: var(--yes); stroke-width: 1; }
.f1-bx.f1-sch { fill: var(--paper-2); stroke: var(--line-2); }
.f1-bx.f1-hn { fill: var(--go-soft); stroke: var(--go); stroke-width: 1.5; }
.f1-bx.f1-chip { fill: var(--surface); stroke: var(--go); stroke-width: .8; }
.fig1 .f1-t { font-size: 7.3px; font-weight: 700; fill: var(--ink); }
.fig1 .f1-t.f1-go { fill: var(--go); }
.fig1 .f1-s { font-size: 6.3px; fill: var(--muted); }
.fig1 .f1-s.f1-acc { fill: var(--yes); font-weight: 700; }
.fig1 .f1-s.f1-go { fill: var(--go); font-weight: 700; }
.fig1 .f1-s.f1-warn { fill: var(--warn); }
.fig1 .f1-code { font-family: var(--mono); font-size: 6.3px; fill: var(--ink); }
.f1-ar { stroke: var(--faint); stroke-width: .9; fill: none; }
.f1-ar.f1-acc { stroke: var(--yes); stroke-width: 1.3; }
.f1-ar.f1-dash { stroke-dasharray: 3.5 2.2; }
.f1-ar.f1-dot { stroke-dasharray: .1 2.2; stroke-linecap: round; stroke-width: 1.2; }
.f1-hd { fill: var(--faint); }
.f1-hd.f1-acc { fill: var(--yes); }
.f1-ic { fill: none; stroke: var(--muted); stroke-width: .8; stroke-linecap: round; stroke-linejoin: round; }
.f1-ic.f1-acc { stroke: var(--yes); }
.f1-ic.f1-go { stroke: var(--go); }
.f1-ic.f1-warn { stroke: var(--warn); }
.f1-foot { fill: var(--surface-2); }
.f1-foot.f1-warn { fill: var(--warn-soft); }
.f1-foot.f1-go { fill: var(--go-soft); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 32px; border: 1px solid var(--line); background: var(--surface); }
.split > div { padding: 26px 28px; }
.split > div + div { border-left: 1px solid var(--line); background: color-mix(in srgb, var(--go-soft) 45%, var(--surface)); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } .split > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.split h3 { font-size: 22px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.split h3 svg { width: 22px; height: 22px; color: var(--go); }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 6px 0 6px 26px; color: var(--ink-2); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 14px; width: 8px; height: 8px; border: 1.5px solid var(--go); transform: rotate(45deg); }
.split-foot { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* ---------- Architecture ---------- */
.arch-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(14px, 2.4vw, 28px); overflow-x: auto; }
.arch { min-width: 760px; width: 100%; height: auto; }
.arch text { font-family: var(--body); fill: var(--ink); }
.arch .zone { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 5 5; }
.arch .zone-l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; fill: var(--muted); }
.arch .node { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.2; }
.arch .node.core { fill: var(--go-soft); stroke: var(--go); stroke-width: 2; }
.arch .node.you { fill: var(--yes-soft); stroke: var(--yes); stroke-width: 1.4; }
.arch .t { font-size: 14px; font-weight: 700; }
.arch .s { font-size: 12px; fill: var(--muted); }
.arch .flow { stroke: var(--go); stroke-width: 1.6; fill: none; }
.arch .flow.anim { stroke-dasharray: 5 6; animation: march 1.6s linear infinite; }
@keyframes march { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .arch .flow.anim { animation: none; } }
.arch .hd { fill: var(--go); }
.arch .flow.yes { stroke: var(--yes); }
.arch .hd.yes { fill: var(--yes); }
.arch-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 26px; }
@media (max-width: 820px) { .arch-notes { grid-template-columns: 1fr; } }
.arch-notes div { border-top: 2px solid var(--ink); padding-top: 12px; }
.arch-notes strong { display: block; margin-bottom: 4px; font-size: 16px; }
.arch-notes p { margin: 0; color: var(--ink-2); font-size: 15px; }
.scroll-hint { display: none; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
@media (max-width: 820px) { .scroll-hint { display: block; } }

/* ---------- Goals ---------- */
.goal-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); }
.goal-index a { display: block; padding: 22px 22px 20px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); transition: background 0.2s ease; position: relative; }
.goal-index a:first-child { border-left: 0; }
.goal-index a:hover { background: var(--surface-2); color: var(--ink); }
.goal-index a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--go); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.goal-index a:hover::after { transform: scaleX(1); }
.goal-index .n { font-family: var(--mono); font-size: 12px; color: var(--yes); }
.goal-index h3 { font-size: 25px; margin: 6px 0 6px; }
.goal-index p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .goal-index { grid-template-columns: 1fr 1fr; } .goal-index a:nth-child(3) { border-left: 0; } .goal-index a:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .goal-index { grid-template-columns: 1fr; } .goal-index a { border-left: 0; } .goal-index a + a { border-top: 1px solid var(--line); } }

.goal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 40px; }
.goal-head .big { font-family: var(--display); font-size: clamp(64px, 10vw, 128px); line-height: 0.8; color: transparent; -webkit-text-stroke: 1px var(--line-2); font-style: italic; user-select: none; }
@media (max-width: 640px) { .goal-head { grid-template-columns: 1fr; } .goal-head .big { display: none; } }

.feature-row { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(48px, 7vw, 84px); }
.feature-row.flip > :first-child { order: 2; }
@media (max-width: 880px) { .feature-row { grid-template-columns: 1fr; } .feature-row.flip > :first-child { order: 0; } }
.feature-row h3 { font-size: clamp(26px, 2.8vw, 34px); margin-bottom: 14px; }
.feature-row p { color: var(--ink-2); }
.feature-row .ticks { margin-top: 6px; }

/* States translation */
.states { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.states-h { display: grid; grid-template-columns: minmax(0, 0.9fr) 30px minmax(0, 1.1fr); padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.state { display: grid; grid-template-columns: minmax(0, 0.9fr) 30px minmax(0, 1.1fr); align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.state:first-of-type { border-top: 0; }
.state .raw { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.state .raw small { display: block; font-size: 11.5px; color: var(--faint); }
.state .arrow { color: var(--faint); text-align: center; }
.state .plain { font-weight: 600; color: var(--ink); font-size: 15px; line-height: 1.35; }
.state .plain small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.state .plain .ic { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--stop); }
.state .plain .ic.w { background: var(--warn); }
.state .plain .ic.g { background: var(--go); }

/* Setup chat */
.setup-chat { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; box-shadow: var(--shadow-sm); }
.setup-chat .q { align-self: flex-start; max-width: 88%; color: var(--ink-2); }
.setup-chat .q .who { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.setup-chat .choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.setup-chat .choices span { border: 1px solid var(--line-2); border-radius: 14px; padding: 2px 10px; font-size: 13px; color: var(--ink-2); }
.setup-chat .choices span.on { border-color: var(--go); background: var(--go-soft); color: var(--ink); font-weight: 600; }
.setup-chat .a { align-self: flex-end; background: var(--ink); color: var(--paper); padding: 7px 12px; border-radius: 10px 10px 2px 10px; max-width: 80%; }
.setup-chat .sys { font-family: var(--mono); font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.setup-chat .sys .ok { color: var(--ok); }
.setup-chat .sys .warn { color: var(--warn); }

/* Terminal-like block */
.term { background: var(--term); color: var(--term-ink); border-radius: 6px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; overflow: hidden; box-shadow: var(--shadow-sm); }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--term-2); color: var(--term-dim); font-size: 11.5px; letter-spacing: 0.04em; }
.term-bar .dots i { background: #3a4757; }
.term pre { margin: 0; padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: inherit; }
.term .c { color: var(--term-dim); }
.term .p { color: var(--term-go); }
.term .y { color: var(--term-yes); }
.term .g { color: var(--term-ok); }
.term .w { color: #f2c27a; }

/* Browser frame for the real screenshot */
.browser { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar .url { flex: 1; font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser .shot { position: relative; max-height: 640px; overflow: hidden; background: #f6f6f4; }
.browser .shot img { width: 100%; height: auto; }
.browser .shot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, var(--surface)); }
.figcap { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.figcap b { color: var(--ink-2); }

/* Activity record */
.record { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.record-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.record-h strong { font-family: var(--display); font-size: 19px; font-weight: 500; }
.record ol { list-style: none; margin: 0; padding: 6px 18px 10px; }
.record li { display: grid; grid-template-columns: 50px 74px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.record li:first-child { border-top: 0; }
.record time { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.record .who { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; padding: 1px 6px; border-radius: 2px; text-align: center; background: var(--go-soft); color: var(--go); }
.record .who.you { background: var(--yes-soft); color: var(--yes); }
.record .who.job { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.record .who.alert { background: var(--warn-soft); color: var(--warn); }
.record .what { color: var(--ink-2); min-width: 0; }
.record .what code { white-space: normal; word-break: break-word; }
.record .what q { color: var(--muted); font-style: italic; }
.record-f { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.record-f .stopall { border: 1px solid var(--stop); color: var(--stop); padding: 4px 10px; border-radius: 3px; font-weight: 600; font-size: 13px; }
@media (max-width: 520px) { .record li { grid-template-columns: 44px minmax(0, 1fr); } .record li .what { grid-column: 1 / -1; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid var(--line-2); background: var(--surface); border-radius: 2px; padding: 5px 10px; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.chips span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.chips.lock span::before { width: 10px; height: 12px; border-radius: 0; background: var(--go); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 0 1 6 0V5h1v7H1V5zm1.4 0h3.2V3.5a1.6 1.6 0 0 0-3.2 0z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 0 1 6 0V5h1v7H1V5zm1.4 0h3.2V3.5a1.6 1.6 0 0 0-3.2 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.chips.plain span::before { display: none; }

/* Waste forms */
.waste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); margin-bottom: 48px; }
.waste div { padding: 20px; border-left: 1px solid var(--line); }
.waste div:first-child { border-left: 0; }
.waste .n { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--bar-without); font-style: italic; }
.waste strong { display: block; margin: 8px 0 4px; font-size: 16px; }
.waste p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
@media (max-width: 900px) { .waste { grid-template-columns: 1fr 1fr; } .waste div:nth-child(3) { border-left: 0; } .waste div:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .waste { grid-template-columns: 1fr; } .waste div { border-left: 0 !important; } .waste div + div { border-top: 1px solid var(--line); } }

/* Lifecycle */
.lifecycle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; position: relative; margin-bottom: 56px; }
.lifecycle::before { content: ""; position: absolute; left: 16px; right: 16px; top: 15px; border-top: 1.5px dashed var(--line-2); }
.lifecycle > div { position: relative; padding: 0 22px 0 0; }
.lifecycle .pin { width: 32px; height: 32px; border-radius: 50%; background: var(--paper-2); border: 1.5px solid var(--go); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--go); margin-bottom: 14px; position: relative; }
.band:not(.wash) .lifecycle .pin { background: var(--paper); }
.lifecycle h4 { font-family: var(--display); font-size: 22px; margin-bottom: 6px; }
.lifecycle p { color: var(--ink-2); font-size: 15px; margin: 0; }
@media (max-width: 800px) {
  .lifecycle { grid-template-columns: 1fr; gap: 22px; }
  .lifecycle::before { left: 15px; right: auto; top: 16px; bottom: 16px; border-top: 0; border-left: 1.5px dashed var(--line-2); }
  .lifecycle > div { padding-left: 50px; }
  .lifecycle .pin { position: absolute; left: 0; top: 0; }
}

/* Verdicts */
.verdicts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .verdicts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .verdicts { grid-template-columns: 1fr; } }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.vcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.vcard header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vcard h4 { font-family: var(--display); font-size: 21px; }
.vcard .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; white-space: nowrap; }
.tag.bad { background: var(--stop-soft); color: var(--stop); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.good { background: var(--ok-soft); color: var(--ok); }
.vcard svg { width: 100%; height: 58px; }
.vcard svg .base { stroke: var(--line); stroke-width: 1; }
.vcard svg .ln { stroke: var(--go); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.vcard svg .ar { fill: var(--go); opacity: 0.1; }
.vcard svg .ln.dash { stroke-dasharray: 3 5; stroke: var(--faint); }
.vcard svg .t { font-family: var(--mono); font-size: 10px; fill: var(--faint); }
.vcard .sig { font-size: 14px; color: var(--muted); margin: 0; }
.vcard .fix { font-size: 14.5px; color: var(--ink); margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.vcard .fix b { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--go); margin-right: 6px; font-weight: 600; }
.shared-note { margin-top: 20px; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--go); background: var(--surface); font-size: 15px; color: var(--ink-2); }
.shared-note svg { width: 22px; height: 22px; color: var(--go); }

/* Guards */
.guards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 880px) { .guards { grid-template-columns: 1fr; } }
.guard-list { display: grid; gap: 10px; }
.guard { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.guard .gi { width: 40px; height: 40px; border-radius: 50%; background: var(--go-soft); color: var(--go); display: grid; place-items: center; }
.guard .gi svg { width: 20px; height: 20px; }
.guard strong { display: block; font-size: 16px; }
.guard span { font-size: 14.5px; color: var(--muted); }

/* Approval flow */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; margin: 8px 0 40px; }
.flow > div { position: relative; padding: 18px 16px 18px 0; }
.flow > div::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--go); color: var(--go); font-family: var(--mono); font-size: 13px; background: var(--paper); position: relative; z-index: 1; margin-bottom: 12px; }
.band.wash .flow > div::before { background: var(--paper-2); }
.flow > div::after { content: ""; position: absolute; top: 33px; left: 30px; right: 0; border-top: 1.5px dashed var(--line-2); }
.flow > div:last-child::after { display: none; }
.flow > div.you::before { border-color: var(--yes); color: #fff; background: var(--yes); }
.flow strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.flow span { font-size: 14px; color: var(--muted); display: block; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow > div { padding: 0 0 18px 46px; }
  .flow > div::before { position: absolute; left: 0; top: 0; }
  .flow > div::after { top: 30px; bottom: 0; left: 15px; right: auto; border-top: 0; border-left: 1.5px dashed var(--line-2); }
}

.touch {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); border-radius: 6px; padding: 26px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: center;
}
@media (max-width: 560px) { .touch { grid-template-columns: 1fr; text-align: left; } }
.touch .fp-big { width: 110px; height: 110px; color: var(--yes); }
.touch .fp-big .scan { stroke-dasharray: 160; stroke-dashoffset: 160; animation: scan 2.4s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .touch .fp-big .scan { animation: none; stroke-dashoffset: 0; } }
.touch h3 { font-size: 26px; margin-bottom: 8px; }
.touch p { color: var(--ink-2); margin: 0 0 8px; font-size: 15.5px; }
.os-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.os-row span { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-radius: 2px; padding: 3px 8px; color: var(--ink-2); background: var(--surface); }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--yes); background: var(--surface); padding: 20px 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout h4 { font-family: var(--display); font-size: 21px; margin-bottom: 6px; }
.callout p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.callout.honest { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }

/* ---------- Knowledge ---------- */
.layers { position: relative; display: grid; gap: 0; }
.layer { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); background: var(--surface); margin-top: -1px; position: relative; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.layer:hover { transform: translateX(6px); box-shadow: -6px 0 0 var(--go); z-index: 2; }
.layer > div { padding: 16px 18px; }
.layer > div + div { border-left: 1px solid var(--line); }
.layer .ln { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); }
.layer .ln b { font-family: var(--mono); font-size: 11.5px; color: var(--yes); letter-spacing: 0.06em; }
.layer .ln strong { font-family: var(--display); font-size: 20px; font-weight: 500; line-height: 1.15; }
.layer .ln span { font-size: 13px; color: var(--muted); }
.layer p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.layer-h { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); }
.layer-h div { padding: 0 18px 10px; }
.layer-h div:first-child { padding-left: 0; }
@media (max-width: 820px) {
  .layer, .layer-h { grid-template-columns: 1fr; }
  .layer-h { display: none; }
  .layer > div + div { border-left: 0; border-top: 1px dashed var(--line); }
  .layer > div:nth-child(2)::before { content: "Entries, read by code"; }
  .layer > div:nth-child(3)::before { content: "How-to pages, read by your agent"; }
  .layer > div:nth-child(n+2)::before { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
}
.override { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.override svg { width: 18px; height: 18px; color: var(--go); }

.sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.src { border: 1px solid var(--line); background: var(--surface); padding: 14px 16px; border-radius: var(--radius); }
.src code { display: inline-block; font-size: 12px; margin-bottom: 6px; }
.src p { margin: 0; font-size: 14px; color: var(--ink-2); }
.src.inferred { border-style: dashed; }
.src.inferred p { color: var(--muted); }

.grow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.grow div { background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius); position: relative; }
.grow div.you { border-color: var(--yes); background: color-mix(in srgb, var(--yes-soft) 50%, var(--surface)); }
.grow b { font-family: var(--mono); font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; letter-spacing: 0.05em; }
.grow strong { display: block; font-size: 15px; margin-bottom: 4px; }
.grow span { font-size: 13.5px; color: var(--muted); display: block; line-height: 1.4; }
@media (max-width: 900px) { .grow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grow { grid-template-columns: 1fr; } }

.facts-q { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 44px; }
@media (max-width: 860px) { .facts-q { grid-template-columns: 1fr; } }
.facts-q blockquote { margin: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--display); font-size: 20px; line-height: 1.3; font-style: italic; }
.facts-q blockquote small { display: block; font-family: var(--body); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- Beyond ---------- */
.badge { font-family: var(--mono); font-size: 11.5px; padding: 2px 8px; border-radius: 2px; white-space: nowrap; }
.badge.live { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-2); }
.sched { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 40px; }
@media (max-width: 900px) { .sched { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sched { grid-template-columns: 1fr; } }
.sched div { padding: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.sched div.live { border-color: var(--go); box-shadow: inset 0 3px 0 var(--go); }
.sched h4 { font-family: var(--display); font-size: 22px; margin: 8px 0 6px; }
.sched p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.domain { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .domain { grid-template-columns: 1fr; } }
.samples { display: grid; gap: 8px; margin: 12px 0 4px; }
.samples div { display: grid; grid-template-columns: 74px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.samples .bar { height: 8px; background: var(--go-soft); border-radius: 4px; overflow: hidden; }
.samples .bar i { display: block; height: 100%; background: var(--go); border-radius: 4px; }
.samples span:last-child { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- Get started ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line-2); margin-bottom: 26px; overflow-x: auto; }
.tabs button { font: inherit; font-size: 15.5px; font-weight: 600; background: none; border: 0; padding: 12px 18px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--yes); }
.tabs button:hover { color: var(--ink); }
.tabpanel[hidden] { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: st; }
.steps > li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps > li:first-child { border-top: 0; padding-top: 0; }
.steps > li::before { counter-increment: st; content: counter(st, decimal-leading-zero); font-family: var(--display); font-size: 34px; font-style: italic; line-height: 1; color: var(--yes); }
.steps h4 { font-family: var(--display); font-size: 23px; margin-bottom: 6px; }
.steps p { color: var(--ink-2); margin: 0 0 10px; font-size: 15.5px; }
.steps p:last-child { margin-bottom: 0; }
.prompt { display: flex; align-items: stretch; border: 1px solid var(--ink); background: var(--surface); border-radius: var(--radius); overflow: hidden; margin: 8px 0 4px; box-shadow: 4px 4px 0 var(--yes-soft); }
.prompt .ptext { flex: 1; padding: 14px 16px; font-size: 16px; color: var(--ink); }
.prompt .ptext::before { content: "You  "; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yes); margin-right: 6px; }
.copy { font: inherit; font-size: 13px; font-weight: 600; background: var(--ink); color: var(--paper); border: 0; padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.copy:hover { background: var(--yes); }
.copy svg { width: 14px; height: 14px; }
.term .copy { position: absolute; right: 8px; top: 7px; background: transparent; border: 1px solid #3a4757; color: var(--term-dim); padding: 3px 9px; font-size: 11.5px; border-radius: 2px; }
.term .copy:hover { color: var(--term-ink); border-color: var(--term-dim); background: transparent; }
.term { position: relative; }
.needs { display: grid; gap: 14px; }
.needs .panel { padding: 20px; }
.needs h4 { font-family: var(--display); font-size: 20px; margin-bottom: 6px; }
.needs ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.needs li { margin: 4px 0; }
.start-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .start-grid { grid-template-columns: 1fr; } }
.ask-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ask-list span { font-family: var(--display); font-style: italic; font-size: 17px; background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 16px; color: var(--ink-2); }

/* ---------- Paper ---------- */
.paper { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 820px) { .paper { grid-template-columns: 1fr; } }
.paper-cover {
  aspect-ratio: 8.5 / 11; background: #fffefb; color: #1a1a1a; border: 1px solid var(--line-2); box-shadow: var(--shadow), 8px 8px 0 -1px var(--paper-2), 8px 8px 0 0 var(--line-2), 16px 16px 0 -1px var(--paper-2), 16px 16px 0 0 var(--line);
  padding: 9% 9%; display: flex; flex-direction: column; gap: 6px; max-width: 340px; transform: rotate(-1.5deg); transition: transform 0.3s ease;
}
.paper-cover:hover { transform: rotate(0deg) translateY(-4px); }
.paper-cover .pt { font-family: "Linux Libertine", Georgia, serif; font-size: clamp(14px, 1.6vw, 18px); font-weight: 700; line-height: 1.2; text-align: center; }
.paper-cover .pa { font-family: Georgia, serif; font-size: 11px; text-align: center; color: #333; margin-bottom: 8px; }
.paper-cover .ab { font-family: Georgia, serif; font-size: 7px; line-height: 1.45; color: #444; text-align: justify; }
.paper-cover .ab b { display: block; font-size: 7.5px; margin-bottom: 2px; }
.paper-cover .fig { flex: 1; min-height: 50px; margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 7%; }
.paper-cover .fig i { display: block; background: repeating-linear-gradient(#d9d6cf 0 1.5px, transparent 1.5px 6px); }
.paper-cover .fig i:first-child { background: linear-gradient(#eceae4, #eceae4) top / 100% 34% no-repeat, repeating-linear-gradient(#d9d6cf 0 1.5px, transparent 1.5px 6px) bottom / 100% 60% no-repeat; }
.paper h3 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 10px; }
.paper .authors { color: var(--muted); margin-bottom: 18px; }
.paper .abstract { color: var(--ink-2); font-size: 16px; }
.paper .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.bib { margin-top: 18px; display: none; }
.bib.show { display: block; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
@media (max-width: 820px) { .faq { grid-template-columns: 1fr; } }
.faq details { border-top: 1px solid var(--line-2); padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 34px 18px 0; position: relative; font-family: var(--display); font-size: 21px; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--body); font-size: 22px; color: var(--yes); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); font-size: 15.5px; margin: 0 0 18px; }

/* ---------- Closing & footer ---------- */
.closing { background: var(--term); color: var(--term-ink); position: relative; overflow: hidden; }
.closing .graticule-dark { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 32px 32px; }
.closing .wrap { position: relative; padding-top: clamp(64px, 9vw, 104px); padding-bottom: clamp(64px, 9vw, 104px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .closing .wrap { grid-template-columns: 1fr; } }
.closing h2 { font-size: clamp(36px, 5vw, 60px); color: var(--term-ink); letter-spacing: -0.02em; margin-bottom: 14px; }
.closing h2 em { color: var(--term-yes); }
.closing p { color: var(--term-dim); font-size: 18px; margin: 0; max-width: 34em; }
.closing .acts { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.closing .btn { background: var(--term-ink); color: var(--term); border-color: var(--term-ink); }
.closing .btn:hover { color: var(--term); box-shadow: 4px 4px 0 var(--term-yes); }
.closing .btn.ghost { background: transparent; color: var(--term-ink); border-color: #3a4757; }
.closing .btn.ghost:hover { color: var(--term-ink); border-color: var(--term-ink); box-shadow: 4px 4px 0 #3a4757; }

.site-foot { background: var(--paper); border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14.5px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h5 { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; font-weight: 600; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 6px 0; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid p { margin: 10px 0 0; max-width: 30em; }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* ---------- Apollo page ---------- */
.apollo-hero .hero-grid { align-items: center; }
.apollo-hero h1 { font-size: clamp(40px, 5.4vw, 66px); }
.apollo-card { background: var(--term); color: var(--term-ink); border-radius: 6px; padding: 26px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.apollo-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 22px 22px; }
.apollo-card > * { position: relative; }
.apollo-card .stamp { color: var(--term-dim); }
.apollo-card .nodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 18px; }
.apollo-card .node { border: 1px solid #33465a; border-radius: 4px; padding: 10px; background: rgba(255,255,255,0.02); }
.apollo-card .node b { font-family: var(--mono); font-size: 11px; color: var(--term-dim); display: block; margin-bottom: 8px; letter-spacing: 0.06em; }
.apollo-card .gpus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.apollo-card .gpus i { aspect-ratio: 1; border-radius: 2px; background: #22384a; border: 1px solid #2f4d63; display: block; transition: background 0.6s ease; }
.apollo-card .gpus i.on { background: var(--term-go); border-color: var(--term-go); }
.apollo-card .gpus i.fr { background: linear-gradient(135deg, var(--term-go) 0 30%, #22384a 30%); }
.apollo-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0; }
.apollo-card dt { font-family: var(--mono); font-size: 11px; color: var(--term-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.apollo-card dd { margin: 2px 0 0; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.apollo-card dd small { font-family: var(--body); font-size: 13px; color: var(--term-dim); display: block; margin-top: 2px; }
.apollo-card .src-note { margin-top: 16px; font-size: 12px; color: var(--term-dim); }

.journey { display: grid; gap: 0; counter-reset: j; }
.jstep { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 0.9fr); gap: 28px; padding: 32px 0; border-top: 1px solid var(--line); align-items: start; }
.jstep:first-child { border-top: 0; padding-top: 0; }
.jstep .jn { font-family: var(--display); font-size: 56px; font-style: italic; line-height: 0.9; color: var(--yes); }
.jstep .jn small { display: block; font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.jstep h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 10px; }
.jstep p { color: var(--ink-2); font-size: 16px; }
.jstep ol, .jstep ul { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.jstep li { margin: 5px 0; }
.who-tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; margin-bottom: 10px; }
.who-tag.you { background: var(--yes-soft); color: var(--yes); }
.who-tag.agent { background: var(--go-soft); color: var(--go); }
.who-tag.sih { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 900px) { .jstep { grid-template-columns: 60px minmax(0, 1fr); } .jstep > :last-child { grid-column: 2; } .jstep .jn { font-size: 44px; } }
@media (max-width: 520px) { .jstep { grid-template-columns: 1fr; gap: 12px; } .jstep > :last-child { grid-column: 1; } }

.compare { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { border-top: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.compare thead th.hn { color: var(--go); }
.compare td:first-child { font-weight: 700; color: var(--ink); width: 18%; }
.compare td { color: var(--ink-2); }
.compare td.hn { background: color-mix(in srgb, var(--go-soft) 40%, var(--surface)); color: var(--ink); }
@media (max-width: 720px) {
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100% !important; }
  .compare thead { display: none; }
  .compare tr { border-top: 1px solid var(--line-2); padding: 8px 0; }
  .compare td { border-top: 0; padding: 6px 16px; }
  .compare td:nth-child(2)::before { content: "Apollo: "; font-weight: 700; color: var(--muted); }
  .compare td:nth-child(3)::before { content: "HPC Navigator: "; font-weight: 700; color: var(--go); }
}

.factcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .factcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .factcards { grid-template-columns: 1fr; } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.fact p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.5; }
.fact footer { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.srctag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 7px; border-radius: 2px; }
.srctag.docs { background: var(--go-soft); color: var(--go); }
.srctag.observed { background: var(--ok-soft); color: var(--ok); }
.srctag.inferred { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); }

.ack { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--go); padding: 20px 22px; border-radius: 0 var(--radius) var(--radius) 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.ack blockquote { margin: 0; font-family: var(--display); font-size: 19px; line-height: 1.4; font-style: italic; color: var(--ink); }
.ack .copy { padding: 10px 14px; border-radius: var(--radius); }
@media (max-width: 620px) { .ack { grid-template-columns: 1fr; } .ack .copy { justify-self: start; } }

.help-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .help-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .help-cards { grid-template-columns: 1fr; } }
.help-cards a { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.help-cards a:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--yes-soft); border-color: var(--ink); color: var(--ink); }
.help-cards strong { font-family: var(--display); font-size: 21px; font-weight: 500; }
.help-cards span { font-size: 14.5px; color: var(--muted); }
.help-cards em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--go); margin-top: auto; padding-top: 8px; word-break: break-all; }

/* ---------- Reveal on scroll (only with JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

@media print {
  .site-head, .closing, .hero .rose, .replay { display: none; }
  body { background: #fff; }
}

/* Wide feature row: text on top, figure full width */
.feature-row.wide { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: end; }
.feature-row.wide > figure { grid-column: 1 / -1; }
@media (max-width: 880px) { .feature-row.wide { grid-template-columns: 1fr; } }
