/* Design system. Read top to bottom: fonts, tokens, base, chrome, components, landing, view,
   long-form pages, validation block. One accent (amber: SPHEREx, the predicted track, actions);
   cyan, violet and green appear only where they encode data (WISE and measured positions, Gaia,
   agreement). Serif for headlines and verdicts, sans for reading, mono for numbers and labels. */

/* Fonts: vendored, latin subset (vendor/README.md has sources, licences and hashes). */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("vendor/fonts/newsreader-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("vendor/fonts/newsreader-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("vendor/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("vendor/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Ground and ink: a neutral near-black and a warm paper white. */
  --bg: #0b0c0e;
  --surface: #111316;
  --surface-2: #17191d;
  --field: #08090a;
  --line: #24272c;
  --line-strong: #383c43;
  --ink: #edebe5;
  --ink-2: #bcbab3;
  --muted: #8d8c86;
  --image-bg: #050608;
  /* Meaning. */
  --accent: #ffb547;
  --accent-ink: #1a1205;
  --accent-soft: #2a2114;
  --wise: #56d8ec;
  --gaia: #c8a2ff;
  --good: #86d993;
  --bad: #ff8b7a;
  --good-soft: #14231a;
  --bad-soft: #2a1614;

  /* Type: 12 / 13 / 15 / 17 / 21 / 28 / 40. */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.3125rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.5rem;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Space: a 4px grid. */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;

  --r: 4px;
  --r-lg: 8px;
  --control-h: 36px;
  --page: 1200px;
  --measure: 40rem;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: dark;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s4); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-base)/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 120ms var(--ease); }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { margin: 0 0 var(--s2); line-height: 1.2; text-wrap: balance; }
h1 { font: 500 var(--fs-xl)/1.12 var(--serif); letter-spacing: -0.015em; }
h2 { font: 500 var(--fs-lg)/1.2 var(--serif); letter-spacing: -0.01em; }
h3 { font: 600 var(--fs-base)/1.3 var(--sans); }
p { margin: 0 0 var(--s2); text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: rgba(255, 181, 71, 0.3); }
.sr-only, .offscreen { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: var(--s2) var(--s4); z-index: 10; border-radius: var(--r); }
.skip:focus { left: var(--s4); top: var(--s2); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.mono, output, table, .facts dd, .readout, .tl-year, .strip-label, .zoom-out, .motion-words, .verdict-line, .motion-headline, .num, .vtile-value, .score-value, .sum-value, .sr-stat-v { font-variant-numeric: lining-nums tabular-nums; }
/* The instrument label: small mono capitals over a value or a section. */
.label, .eyebrow, .motion-label, legend, .group-h, .vtile-label, .facts dt, .stat dt { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Chrome */
header.site, footer.site, main { max-width: var(--page); margin: 0 auto; padding-inline: var(--s5); }
header.site { min-height: 60px; padding-block: var(--s3); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: var(--s2); color: var(--ink); text-decoration: none; }
.brand-mark { display: block; width: 26px; height: 26px; flex: none; color: var(--ink); }
.wordmark { font: 500 1.375rem/1 var(--serif); letter-spacing: -0.01em; }
.wordmark-x { color: var(--accent); }
.tagline { margin: 0; flex: 1; color: var(--muted); font: italic 400 var(--fs-base)/1.3 var(--serif); }
nav { display: flex; gap: var(--s5); }
nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); padding: var(--s1) 0; border-bottom: 1px solid transparent; transition: color 120ms var(--ease), border-color 120ms var(--ease); }
nav a:hover { color: var(--ink); }
.nav-short { display: none; }
nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
main { padding-block: var(--s5) var(--s7); }
main:focus { outline: none; }
footer.site { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s5) var(--s7); margin-top: var(--s7); padding-block: var(--s6) var(--s7); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); line-height: 1.6; }
footer.site p { margin: 0 0 var(--s2); max-width: 30rem; }
footer.site .foot-name { color: var(--ink); margin-bottom: var(--s3); }
footer.site .wordmark { font-size: 1.125rem; }
footer.site h2 { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); }
footer.site ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s1); }

/* Components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.btn { appearance: none; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: var(--r); padding: 0 var(--s3); font: 500 var(--fs-sm)/1 var(--sans); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--control-h); white-space: nowrap; transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease); }
.btn:hover { background: #1f2227; border-color: #4b505a; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #ffc56b; border-color: #ffc56b; }
.btn.icon { width: var(--control-h); min-width: var(--control-h); padding: 0; }
.btn svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.btn[hidden] { display: none; }
.row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.linkish { appearance: none; background: none; border: 0; padding: 2px 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: var(--accent); }
.banner, .notice { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--r); padding: var(--s3) var(--s4); color: var(--ink-2); font-size: var(--fs-sm); }
.banner { margin: 0 0 var(--s5); color: var(--ink); }
.banner ul { margin: 0; padding-left: var(--s4); }
.notice { margin-top: var(--s3); background: var(--surface-2); }
.notice p { margin: 0 0 var(--s2); }
.notice.degraded { margin: 0 0 var(--s4); }
.notice.field-note { margin: 0 0 var(--s4); color: var(--ink); font-size: var(--fs-base); }
.hatch-legend { margin: var(--s2) 0 0; }
.check { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); min-height: 28px; }
.check input, .chip input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
.check:has(input:disabled) { color: var(--muted); cursor: default; }
.swatch { width: 12px; height: 2px; display: inline-block; }
.field { display: grid; gap: var(--s1); margin-bottom: var(--s3); min-width: 0; }
.field label { font-weight: 500; font-size: var(--fs-sm); color: var(--ink); }
.field p { margin: 0; font-size: var(--fs-xs); }
input[type="text"], select, textarea { width: 100%; min-width: 0; background: var(--field); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); padding: var(--s2) var(--s3); font: var(--fs-base) var(--sans); min-height: var(--control-h); transition: border-color 120ms var(--ease); }
input[type="text"]:hover, select:hover, textarea:hover { border-color: #4b505a; }
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder { color: #666a72; }
select { height: var(--control-h); padding-block: 0; }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
input[type="range"] { accent-color: var(--accent); width: 120px; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); min-width: 0; }
legend { padding: 0; margin-bottom: var(--s2); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; max-width: 100%; }
.seg { appearance: none; flex: 1 1 auto; border: 0; background: var(--surface-2); color: var(--ink-2); padding: 0 var(--s3); font: 500 var(--fs-sm)/1.2 var(--sans); cursor: pointer; min-height: 34px; transition: background-color 120ms var(--ease), color 120ms var(--ease); }
.seg:hover { color: var(--ink); background: #1f2227; }
.seg[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.seg:focus-visible { outline-offset: -2px; }
/* Status chips: one vocabulary everywhere (agrees, refused, differs, no check). */
.badge, .vtag, .tag { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px var(--s2) 1px 7px; font: 500 var(--fs-xs)/1.5 var(--sans); white-space: nowrap; color: var(--ink-2); }
.badge::before, .vtag::before, .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.v-pass, .badge.conf-high, .tone-good { color: var(--good); border-color: rgba(134, 217, 147, 0.45); }
.v-fail, .badge.conf-low, .tone-bad { color: var(--bad); border-color: rgba(255, 139, 122, 0.5); }
.v-refused, .badge.conf-medium, .tone-warn { color: var(--accent); border-color: rgba(255, 181, 71, 0.5); }
.v-not_applicable, .badge.neutral, .tone-quiet, .v-provisional { color: var(--ink-2); }
.v-provisional { border-style: dashed; border-color: var(--muted); }
.verdict-provisional { color: var(--ink-2); font-size: var(--fs-sm); }
.v-not_applicable::before, .tone-quiet::before { background: none; box-shadow: inset 0 0 0 1px currentColor; }
/* Disclosures: a chevron, the label, and nothing else until opened. */
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: var(--fs-sm); }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 6px; height: 6px; margin: 0 3px 0 1px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform 150ms var(--ease); flex: none; }
details[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
details > summary:hover { color: var(--ink); }
details > summary h2, details > summary h3 { display: inline; margin: 0; }
/* Tables */
.table-wrap, .val-scroll { overflow: auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.table-wrap { max-height: 320px; }
table { border-collapse: collapse; font: var(--fs-sm)/1.4 var(--sans); }
th, td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); text-align: right; }
/* Column heads keep their case: capitals would turn µJy into MJy. */
thead th { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.02em; color: var(--muted); border-bottom-color: var(--line-strong); vertical-align: bottom; position: sticky; top: 0; background: var(--surface); }
td { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); }
tbody tr:hover td, tbody tr:hover th { background: rgba(255, 255, 255, 0.02); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s4); margin: 0; font-size: var(--fs-sm); align-items: baseline; }
.facts dd { margin: 0; overflow-wrap: anywhere; color: var(--ink-2); }
/* Frames for pixel data: square, hard-edged, never smoothed. */
canvas.stage, .thumb, .strip-canvas, .strip-blank, .fc-canvas, .starter-thumb { image-rendering: pixelated; image-rendering: crisp-edges; background: var(--image-bg); }

/* Status: loading, errors */
.status { max-width: 560px; margin: var(--s8) auto; text-align: center; padding: var(--s6) var(--s5); }
.status h1 { font-size: var(--fs-lg); }
.status p + p { margin-top: var(--s4); }
.status.error { border-top: 2px solid var(--bad); }
.spinner { width: 20px; height: 20px; margin: 0 auto var(--s4); border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
progress.live-progress { appearance: none; -webkit-appearance: none; height: 4px; border: 0; border-radius: 2px; background: var(--line); overflow: hidden; margin: var(--s2) 0 var(--s3); }
progress.live-progress::-webkit-progress-bar { background: var(--line); }
progress.live-progress::-webkit-progress-value { background: var(--accent); transition: width 300ms var(--ease); }
progress.live-progress::-moz-progress-bar { background: var(--accent); }
.live-stage { color: var(--ink-2); font-size: var(--fs-sm); }

/* Landing: hero */
.landing { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
.landing > section > h2 { font-size: var(--fs-xl); margin-bottom: var(--s2); }
.section-lede { color: var(--ink-2); max-width: var(--measure); margin-bottom: var(--s5); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: var(--s6) var(--s8); align-items: start; padding-top: var(--s4); }
.hero h1 { font-size: clamp(2.25rem, 4.4vw, 3.25rem); font-weight: 400; line-height: 1.04; letter-spacing: -0.025em; max-width: 13ch; margin: var(--s3) 0 var(--s5); }
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: var(--fs-md); line-height: 1.6; color: var(--ink-2); max-width: 35rem; margin-bottom: var(--s5); }
.lede strong { color: var(--ink); font-weight: 500; }
.hero-note { max-width: 35rem; margin-top: var(--s4); }
/* Judge-critique additions, kept together: who the tool is for (under the question), the one-line
   proof by the Check form, the heading over the archive row, Simple's share row. */
.hero-who { font-size: var(--fs-md); line-height: 1.5; color: var(--ink); max-width: 35rem; margin: calc(-1 * var(--s3)) 0 var(--s4); }
.hero-proof { margin: var(--s3) 0 var(--s4); }
.hero-proof a { color: var(--ink-2); }
.archives-h { margin: 0 0 var(--s1); }
body.mode-simple .archive-note:not([hidden]) ~ .archives .archives-h { display: none; }
.simple-share { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; margin: 0 0 var(--s3); }
@media (max-width: 860px) { .hero .hero-who { order: -2; margin: calc(-1 * var(--s2)) 0 0; } }
.hero-visual { display: grid; gap: var(--s3); justify-items: stretch; min-width: 0; }
.hero-stage { position: relative; width: 100%; }
.hero-stage canvas.stage { cursor: default; touch-action: auto; }
.hero-play { position: absolute; right: var(--s2); bottom: var(--s2); }
.hero-readout { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r); }
.hero-readout > div { padding: var(--s3) var(--s4); min-width: 0; }
.hero-readout > div + div { border-left: 1px solid var(--line); }
.hero-readout dt { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero-readout dd { margin: 2px 0 0; }
.readout-value { display: block; font: 500 var(--fs-lg)/1.2 var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.readout-sub { display: block; font-size: var(--fs-xs); color: var(--ink-2); }
.readout-sub.ok { color: var(--good); }
.hero-caption { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.hero-visual > .btn { justify-self: start; }

/* Landing: the check form */
.check-form { scroll-margin-top: var(--s5); max-width: 35rem; }
.search { display: grid; gap: var(--s3); }
.search .segmented { justify-self: start; }
.search .seg { min-height: 28px; font-size: var(--fs-xs); }
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: end; }
.search-line .field { margin: 0; }
.search-line input { min-height: 44px; font-size: var(--fs-md); }
.search-line .btn { min-height: 44px; padding-inline: var(--s4); font-size: var(--fs-base); }
.search .field > p { color: var(--muted); }
.search-more > summary { font-size: var(--fs-xs); }
.search-more[open] > summary { margin-bottom: var(--s3); }
.row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 var(--s3); align-items: start; }
.form-msg { margin: 0; color: var(--ink); font-size: var(--fs-sm); border-left: 2px solid var(--accent); padding-left: var(--s3); }
.form-msg:empty { display: none; }

/* Landing: scoreboard strip */
.scorestrip { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: var(--s5) var(--s7); align-items: center; padding: var(--s5) 0; border-block: 1px solid var(--line); }
.scorestrip h2 { font-size: var(--fs-lg); margin: 0 0 var(--s1); }
.scorestrip p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); max-width: 26rem; }
.score-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); margin: 0; }
.score { min-width: 0; }
.score dt { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.score dd { margin: 0; }
.score-value { display: block; font: 400 var(--fs-2xl)/1.1 var(--serif); letter-spacing: -0.02em; color: var(--ink); }
.score-value small { font-size: 0.45em; letter-spacing: 0; color: var(--ink-2); }
.score-sub { display: block; font-size: var(--fs-xs); color: var(--ink-2); }
.score-sub .fail { color: var(--bad); }

/* Landing: start with these three */
.starters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.starter { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s4); height: 100%; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; transition: border-color 120ms var(--ease), background-color 120ms var(--ease); }
.starter:hover { border-color: #4b505a; background: var(--surface-2); }
.starter-thumb { width: 112px; height: 112px; border: 1px solid var(--line-strong); border-radius: 2px; object-fit: cover; }
.starter-kicker { margin: 0 0 var(--s1); }
.starter h3 { font: 500 var(--fs-lg)/1.2 var(--serif); margin: 0 0 var(--s1); }
.starter p { margin: 0 0 var(--s2); font-size: var(--fs-sm); color: var(--ink-2); }
.starter .go { color: var(--ink); font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.starter:hover .go { text-decoration-color: var(--accent); }

/* Landing: the gallery as a ledger of results */
.gallery-group + .gallery-group { margin-top: var(--s6); }
.group-h { margin: 0 0 var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line-strong); display: flex; justify-content: space-between; gap: var(--s4); }
.gallery { list-style: none; margin: 0; padding: 0; }
.gallery > li { border-bottom: 1px solid var(--line); }
.target-card { display: grid; grid-template-columns: 56px minmax(0, 1.5fr) minmax(0, 1.3fr) 236px; gap: var(--s2) var(--s5); align-items: center; padding: var(--s3) var(--s2); color: var(--ink); text-decoration: none; transition: background-color 120ms var(--ease); }
.target-card:hover { background: var(--surface); }
.target-card h3 { font: 500 var(--fs-md)/1.25 var(--serif); margin: 0; }
.target-card:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.target-body { min-width: 0; }
.target-body p { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb { width: 56px; height: 56px; flex: none; border-radius: 2px; border: 1px solid var(--line-strong); object-fit: cover; }
.thumb.empty { visibility: hidden; }
.types { display: grid; gap: 2px; margin: 0; font-size: var(--fs-sm); color: var(--muted); min-width: 0; }
.types[hidden] { display: none; }
.types span { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: var(--s2); align-items: baseline; }
.types b { color: var(--ink); font-weight: 500; }
.types b.none { color: var(--ink-2); font-weight: 400; }
.card-marks { display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: flex-end; }

/* View: head and verdict strip */
.view { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); }
.view > * { grid-column: 1 / -1; min-width: 0; }
.view > .view-head { grid-column: 1; }
.view > .actions { grid-column: 2; align-self: end; }
.eyebrow { margin: 0 0 var(--s2); }
.view-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 400; margin-bottom: var(--s2); }
.coords { color: var(--ink-2); margin: 0 0 var(--s2); overflow-wrap: anywhere; font-size: var(--fs-sm); }
.blurb { color: var(--ink-2); max-width: 46rem; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: flex-end; max-width: 26rem; }
.action-status { color: var(--ink-2); font-size: var(--fs-sm); flex-basis: 100%; text-align: right; }
.action-status:empty { display: none; }
.verdict-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s3); }
.vtile { display: grid; gap: 2px; align-content: start; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--r); color: var(--ink); text-decoration: none; min-width: 0; transition: background-color 120ms var(--ease), border-color 120ms var(--ease); }
.vtile:hover { background: var(--surface-2); }
.vtile.good { border-left-color: var(--good); }
.vtile.warn { border-left-color: var(--accent); }
.vtile.bad { border-left-color: var(--bad); }
.vtile.calm { border-left-style: dashed; border-left-color: var(--muted); }
.vtile-label { display: flex; justify-content: space-between; gap: var(--s2); }
.vtile-label::after { content: "↓"; content: "↓" / ""; color: var(--line-strong); transition: color 120ms var(--ease); }
.vtile:hover .vtile-label::after { color: var(--accent); }
.vtile-value { font: 500 var(--fs-lg)/1.25 var(--serif); letter-spacing: -0.01em; }
.vtile-sub { font-size: var(--fs-sm); color: var(--ink-2); }
.vtile.good .vtile-sub b { color: var(--good); font-weight: 500; }
.vtile.warn .vtile-sub b { color: var(--accent); font-weight: 500; }
.vtile.bad .vtile-sub b { color: var(--bad); font-weight: 500; }

/* View: blink on the left, readouts on the right */
.view-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 12fr); gap: var(--s4); align-items: start; }
.side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); min-width: 0; }
.blink { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); min-width: 0; }
.card > h2, .card > summary h2 { font-size: var(--fs-lg); }
.card-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); margin-bottom: var(--s1); }
.card-h h2 { margin: 0; }
.stage-wrap { position: relative; width: 100%; margin: 0 auto; }
canvas.stage { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 2px; border: 1px solid var(--line-strong); touch-action: pan-y; cursor: crosshair; }
.controls { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.controls .spacer { flex: 1; }
.ctl { display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: var(--fs-sm); }
.ctl select { width: auto; }
.readout { color: var(--muted); margin: 0; min-height: 1.5em; overflow-wrap: anywhere; font-size: var(--fs-xs); }
.frame-card { padding: 0; border: 0; background: none; }
.this-frame { border-top: 1px solid var(--line); padding-top: var(--s3); }
.this-frame > .label { margin-bottom: var(--s2); }
.presets-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.presets-box > .label { margin: 0; }
.segmented.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.frame-warnings { margin: var(--s2) 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: var(--fs-sm); }
.frame-warnings li { border-left: 2px solid var(--accent); padding-left: var(--s3); }
.chips { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s2); min-height: 30px; border-radius: var(--r); border: 1px solid var(--line); border-left-width: 2px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; background: var(--field); }
.chip:hover { border-color: var(--line-strong); }
.chip:has(input:checked) { color: var(--ink); }
.chip.wise { border-left-color: var(--wise); }
.chip.spx { border-left-color: var(--accent); }
.preset-help { margin: 0; }
.more-controls { border-top: 1px solid var(--line); padding-top: var(--s3); }
.more-controls[open] > summary { margin-bottom: var(--s3); }
.more-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.view-controls { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.view-controls .follow-note { flex-basis: 100%; margin: 0; font-size: var(--fs-xs); }
.view-controls input[type="range"] { width: 160px; }
.zoom-out { display: inline-block; min-width: 3.2em; color: var(--ink); font-family: var(--mono); font-size: var(--fs-xs); }
.keys { margin: 0; font-size: var(--fs-xs); }
.flag-badge:not([hidden]) { position: absolute; bottom: var(--s2); left: var(--s2); max-width: calc(100% - 16px); display: inline-block; white-space: nowrap; background: rgba(11, 12, 14, 0.9); border: 1px solid var(--accent); color: var(--accent); border-radius: var(--r); padding: 2px var(--s2); font: 500 var(--fs-xs) var(--sans); cursor: help; }
.flag-tip { display: none; position: absolute; left: 0; bottom: calc(100% + 6px); white-space: normal; width: min(320px, 80vw); background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r); padding: var(--s2) var(--s3); font-weight: 400; font-size: var(--fs-sm); z-index: 2; }
.flag-badge:hover .flag-tip, .flag-badge:focus .flag-tip { display: block; }
.gap-cue { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); margin: 0; padding: var(--s1) var(--s3); border-radius: var(--r); background: rgba(11, 12, 14, 0.9); border: 1px solid var(--accent); color: var(--accent); font: 500 var(--fs-md) var(--serif); pointer-events: none; white-space: nowrap; }
.gap-cue[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .gap-cue:not([hidden]) { animation: cue-in 200ms var(--ease); } }
@keyframes cue-in { from { opacity: 0; } }

/* Timeline */
.timeline { padding: var(--s5) var(--s3) var(--s5); cursor: pointer; touch-action: none; border-radius: var(--r); }
.tl-track { position: relative; height: 26px; border-bottom: 1px solid var(--line-strong); }
.tl-year { position: absolute; bottom: -1.35rem; transform: translateX(-50%); font: var(--fs-xs) var(--mono); color: var(--muted); }
.tl-tick { position: absolute; bottom: 0; width: 2px; height: 8px; margin-left: -1px; background: var(--line-strong); }
.tl-tick.on.wise { background: var(--wise); height: 14px; }
.tl-tick.on.spx { background: var(--accent); height: 14px; }
.tl-tick.warn::after { content: ""; position: absolute; top: -5px; left: -1px; width: 4px; height: 3px; background: var(--bad); }
.tl-tick.now { height: 22px; width: 2px; background: var(--ink) !important; }
.tl-handover { position: absolute; top: -1.3rem; bottom: 0; border-left: 1px dashed var(--muted); }
.tl-handover span { position: absolute; top: -0.25rem; right: 4px; white-space: nowrap; font: var(--fs-xs) var(--mono); color: var(--muted); }
.tl-cursor { position: absolute; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.tl-gap { position: absolute; bottom: 0; height: 26px; background: repeating-linear-gradient(135deg, rgba(141, 140, 134, 0.16) 0 3px, transparent 3px 7px); }
.tl-gap span { position: absolute; top: -1.3rem; left: 0; font: var(--fs-xs) var(--mono); color: var(--muted); white-space: nowrap; }

/* Compare, band strip, false colour */
.blink-tools { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
.compare-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); justify-items: start; }
.cmp-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); width: 100%; }
.cmp-panel[hidden] { display: none; }
.cmp-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: center; }
.cmp-pick label { font-weight: 600; color: var(--ink-2); font-family: var(--mono); }
.cmp-msg { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.cmp-msg.warn { color: var(--accent); }
.band-strip { border-top: 1px solid var(--line); padding-top: var(--s3); container-type: inline-size; }
@container (max-width: 640px) { .strip-label .unit { display: none; } }
.band-strip h3 { margin: 0 0 var(--s1); }
.band-strip p { margin: var(--s1) 0; }
.strip-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); margin: var(--s2) 0; }
.strip-cell { appearance: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; justify-items: center; overflow: hidden; padding: var(--s1) var(--s1) var(--s2); background: var(--field); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); font: var(--fs-xs) var(--sans); cursor: pointer; min-width: 0; transition: border-color 120ms var(--ease); }
.strip-cell:hover { border-color: #4b505a; }
.strip-cell[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.strip-cell.empty { cursor: default; opacity: 0.6; }
.strip-canvas, .strip-blank { width: 100%; aspect-ratio: 1 / 1; border-radius: 2px; }
.strip-blank { display: grid; place-items: center; color: var(--muted); }
.strip-label { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: -0.02em; white-space: nowrap; color: var(--ink); }
.strip-det.yes { color: var(--ink); font-weight: 500; }
.strip-det.no { color: var(--muted); }
.fc-check { margin-top: var(--s1); }
.fc-why { margin: var(--s1) 0; }
.fc-figure { margin: var(--s2) 0 0; display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: var(--s3); align-items: start; }
.fc-figure[hidden] { display: none; }
.fc-figure figcaption { margin: 0; }
.fc-canvas { width: 100%; aspect-ratio: 1 / 1; border-radius: 2px; background: #000; }

/* Motion readout */
.motion { scroll-margin-top: var(--s4); }
.motion-headline { font: 500 var(--fs-lg)/1.3 var(--serif); letter-spacing: -0.005em; margin: 0 0 var(--s3); color: var(--ink); border-left: 3px solid var(--line-strong); padding-left: var(--s4); }
.motion-headline.agree { border-color: var(--good); }
.motion-headline.differ { border-color: var(--bad); }
.motion-headline.unmeasured { color: var(--ink-2); }
.motion-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s5); }
.motion-row { display: grid; gap: 2px; padding: var(--s3) 0; border-top: 1px solid var(--line); align-content: start; }
.motion-words { font-size: var(--fs-base); font-weight: 500; color: var(--ink); line-height: 1.35; }
.gaia-row .small { color: var(--ink-2); }
.more-evidence { border-top: 1px solid var(--line); padding-top: var(--s3); }
.more-evidence[open] > summary { margin-bottom: var(--s1); }
.vetting .motion-row:first-child { border-top: 0; }

/* Spectrum */
.spectrum { scroll-margin-top: var(--s4); }
.verdict { border-left: 3px solid var(--line-strong); padding: 0 0 0 var(--s4); margin-bottom: var(--s4); }
.verdict > :last-child { margin-bottom: 0; }
.verdict.conf-high { border-color: var(--good); }
.verdict.conf-medium, .verdict.refused { border-color: var(--accent); }
.verdict.conf-low { border-color: var(--bad); }
.verdict.neutral { border-color: var(--muted); }
.verdict.provisional { border-left-style: dashed; border-color: var(--muted); }
.verdict-line { font: 500 var(--fs-lg)/1.3 var(--serif); letter-spacing: -0.005em; color: var(--ink); margin-bottom: var(--s2); }
.verdict-published { color: var(--ink-2); font-size: var(--fs-sm); }
.verdict-published b { color: var(--ink); font-weight: 500; }
.verdict-reason, .verdict-pair { color: var(--ink); }
.verdict-passes { color: var(--ink-2); font-size: var(--fs-sm); }
.match-details { margin: var(--s2) 0 0; color: var(--ink-2); }
.match-details[open] > summary { margin-bottom: var(--s2); }
.match-details dd { overflow-wrap: anywhere; }
.howto { margin-top: var(--s3); color: var(--ink-2); font-size: var(--fs-sm); }
.howto[open] > summary { margin-bottom: var(--s2); }
.spec-controls { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; margin-bottom: var(--s2); }
.spec-plot { width: 100%; height: 380px; min-width: 0; }
.flag-note, .gap-note { margin: var(--s1) 0 0; }
.spec-after { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.spec-after .small { flex: 1 1 14rem; margin: 0; }

/* Solar System body mode */
.sub-h { font: 600 var(--fs-base)/1.3 var(--sans); margin: var(--s5) 0 var(--s2); }
.depth-table { max-height: none; }
.depth-table table { width: 100%; }
.depth-table td:first-child, .depth-table th:first-child, .depth-table td:nth-child(2), .depth-table th:nth-child(2) { text-align: left; }
.depth-table td:first-child, .depth-table td:nth-child(3) { white-space: nowrap; }
.depth-table td:nth-child(2) { font-family: var(--sans); }
.motion .facts + p { margin-top: var(--s3); }
.depth-table td.strong { color: var(--ink); }
.body-cell { margin: 0; cursor: default; }
.body-cell:hover { border-color: var(--line); }
.planet-x { border-left: 3px solid var(--accent); padding-left: var(--s4); margin-top: var(--s5); }
.planet-x .sub-h { margin-top: 0; }

/* Check the data: notes, rejected frames, sky map, links, limits */
.trust { scroll-margin-top: var(--s4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding-top: var(--s5); border-top: 1px solid var(--line); }
.trust > h2 { font-size: var(--fs-xl); margin: 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.trust-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); min-width: 0; }
.notes { font-size: var(--fs-sm); }
.notes h2 { margin-bottom: var(--s3); }
.notes-lines { list-style: none; margin: 0 0 var(--s3); padding: 0; color: var(--ink); display: grid; gap: var(--s2); }
.notes-lines li { border-left: 2px solid var(--accent); padding-left: var(--s3); }
.notes-more { color: var(--muted); }
.notes-more ul { margin: var(--s2) 0 0; padding-left: var(--s4); }
.notes-more li { margin-bottom: var(--s1); }
.notes-degraded { margin: var(--s2) 0 0; }
.rej-part { margin-top: var(--s3); }
.rej-part h3 { font-size: var(--fs-sm); margin: 0 0 var(--s1); }
.rej-part p { margin: 0 0 var(--s1); }
.rej-list { margin: 0; padding-left: var(--s4); font-size: var(--fs-sm); color: var(--ink-2); }
.rej-list li { margin-bottom: 2px; }
.rej-list.frames { list-style: none; padding-left: 0; }
.links ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); }
.links li { display: grid; gap: 0; }
.links .small { font-size: var(--fs-xs); }
.honesty ul { margin: var(--s3) 0 0; padding-left: var(--s4); color: var(--ink-2); max-width: 62rem; columns: 2; column-gap: var(--s7); font-size: var(--fs-sm); }
.honesty li { margin-bottom: var(--s2); break-inside: avoid; }
.credits { color: var(--muted); font-size: var(--fs-xs); }
.credits h2 { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.credits ul { padding-left: var(--s4); margin: 0 0 var(--s2); }
.dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-lg); width: min(600px, calc(100vw - 2rem)); padding: var(--s5); }
.dialog::backdrop { background: rgba(5, 6, 8, 0.72); }
.dialog textarea { margin: var(--s2) 0 var(--s3); resize: vertical; font-size: var(--fs-xs); }
.embed-link { text-align: center; font-size: var(--fs-sm); }

/* All-sky locator */
.locator h2 { margin-bottom: var(--s3); }
.locator-map { display: block; width: 100%; max-width: 340px; min-width: 220px; height: auto; margin: 0 auto; }
.lm-sky { fill: var(--image-bg); }
.lm-grid { fill: none; stroke: #262a31; stroke-width: 0.4; }
.lm-band { fill: #bcbab3; fill-opacity: 0.22; stroke: none; }
.lm-band-wide { fill-opacity: 0.09; }
.lm-plane { fill: none; stroke: #bcbab3; stroke-opacity: 0.3; stroke-width: 0.5; }
.lm-ecliptic { fill: none; stroke: var(--gaia); stroke-opacity: 0.8; stroke-width: 0.8; stroke-dasharray: 3 2.5; }
.lm-star { fill: var(--ink); fill-opacity: 0.7; }
.lm-frame { fill: none; stroke: var(--line-strong); stroke-width: 0.8; }
.lm-label { fill: var(--muted); font: 8px var(--sans); paint-order: stroke; stroke: var(--image-bg); stroke-width: 2px; }
.lm-gc { fill: none; stroke: var(--ink-2); stroke-width: 0.9; }
.lm-here-ring { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.lm-here-dot { fill: var(--accent); stroke: var(--image-bg); stroke-width: 0.8; }
.lm-target { cursor: pointer; }
.lm-hit { fill: transparent; }
.lm-target-dot { fill: var(--wise); fill-opacity: 0.6; stroke: var(--image-bg); stroke-width: 0.6; }
.lm-target-name { fill: var(--ink); font: 600 8.5px var(--sans); paint-order: stroke; stroke: var(--image-bg); stroke-width: 2.5px; opacity: 0; pointer-events: none; }
.lm-target:hover .lm-target-name, .lm-target:focus .lm-target-name, .lm-target:focus-visible .lm-target-name { opacity: 1; }
.lm-target:hover .lm-target-dot, .lm-target:focus-visible .lm-target-dot { fill-opacity: 1; stroke: var(--ink); }
.lm-target:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.locator-key { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); list-style: none; margin: var(--s3) 0 var(--s2); padding: 0; font-size: var(--fs-xs); }
.locator-key li[hidden] { display: none; }
.lm-swatch { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 2px; vertical-align: -1px; }
.lm-key-here { background: var(--accent); border-radius: 50%; width: 8px; height: 8px; }
.lm-key-band { background: rgba(188, 186, 179, 0.35); }
.lm-key-ecl { height: 0; border-top: 2px dashed var(--gaia); border-radius: 0; vertical-align: 2px; }
.lm-key-target { background: var(--wise); border-radius: 50%; width: 7px; height: 7px; opacity: 0.7; }
.locator-context { color: var(--ink); margin: var(--s2) 0; font-size: var(--fs-sm); }

/* Embed mode: the view only. The checks on the data stay on the full page, one link away. */
body.embed .chrome, body.embed .trust-grid, body.embed .trust > h2 { display: none !important; }
body.embed .trust { border-top: 0; padding-top: 0; }
body.embed main { padding: var(--s2); }
body.embed .view { gap: var(--s3); }

/* Long-form pages (Planet X, blind search, validation): one column, the conclusion first. */
.page > * { max-width: 1000px; }
.val > :not(.card) { max-width: 1000px; }
.page > h1, .val > h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 400; margin: var(--s4) 0 var(--s4); }
.page > section, .page > .sr-source { margin-bottom: var(--s5); }
.answer { font: 400 var(--fs-lg)/1.45 var(--serif); color: var(--ink); max-width: 44rem; margin: 0 0 var(--s5); padding-left: var(--s4); border-left: 3px solid var(--accent); }
.prose { max-width: 44rem; }
.prose p { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.65; margin-bottom: var(--s3); }
.prose p.small { font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.prose h2 { margin-top: var(--s5); }
.prose .mono { color: var(--ink); }
.page .card > h2, .val .card > h2 { margin-bottom: var(--s3); }
.page .card p, .val .card p { max-width: 52rem; }
.page .card > p:not(.small), .val .card > p:not(.small) { color: var(--ink-2); }
.page .table-wrap { max-height: none; }
.page .table-wrap table { width: 100%; }
.page tbody th { text-align: left; color: var(--ink); font-weight: 500; position: static; background: none; white-space: nowrap; vertical-align: top; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 0; border-block: 1px solid var(--line); }
.stat { padding: var(--s4) var(--s5) var(--s4) 0; min-width: 0; }
.stat + .stat { padding-left: var(--s5); border-left: 1px solid var(--line); }
.stat dd { margin: var(--s1) 0 0; display: flex; flex-direction: column; gap: 2px; }
.stat-v { color: var(--ink); font: 400 var(--fs-xl)/1.15 var(--serif); letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.plot { width: 100%; min-height: 420px; }
.page .card h3 { margin: var(--s5) 0 var(--s2); }
.p9-statement { font: 400 var(--fs-md)/1.55 var(--serif); color: var(--ink); max-width: 52rem; margin-bottom: var(--s4); }
.p9 .stat-grid { margin-bottom: var(--s3); }
.p9-peak { border-left: 3px solid var(--line-strong); padding-left: var(--s4); margin-top: var(--s3); max-width: 52rem; }
.p9-peak p { margin-bottom: var(--s2); }
.refs ol { padding-left: var(--s5); color: var(--ink-2); max-width: 52rem; }
.refs li { margin-bottom: var(--s1); }

@media (max-width: 1000px) {
  .view-grid { grid-template-columns: minmax(0, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .starters { grid-template-columns: minmax(0, 1fr); }
  .scorestrip { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  /* On a phone: the question, then the blink (the thing to see), then the words and the box. */
  .hero-text { display: contents; }
  .hero h1 { order: -2; margin: 0; }
  .hero-visual { order: -1; }
  .hero-eyebrow, .hero-target { display: none; }
  .hero .lede, .hero .check-form, .hero-note { margin-bottom: 0; margin-top: 0; }
  /* On a phone the share buttons come after the blink and the answers, not before the image. */
  .view { grid-template-columns: minmax(0, 1fr); }
  .view > .view-head, .view > .actions { grid-column: 1; }
  .view > .view-grid { order: 1; }
  .view > .actions { order: 2; max-width: none; }
  .view > .trust { order: 3; }
  .view > .embed-link { order: 4; }
  .actions { justify-content: flex-start; }
  .action-status { text-align: left; }
  .tagline { display: none; }
  header.site nav { flex: 1; justify-content: flex-end; }
  footer.site { grid-template-columns: minmax(0, 1fr); }
  .target-card { grid-template-columns: 56px minmax(0, 1fr); }
  .target-card .types, .target-card .card-marks { grid-column: 2; justify-content: flex-start; }
  .honesty ul { columns: 1; }
}
@media (max-width: 640px) {
  header.site, footer.site, main { padding-inline: var(--s4); }
  main { padding-block: var(--s4) var(--s6); }
  header.site { gap: var(--s1) var(--s5); }
  /* Five links on one line under the brand; on a screen too narrow even for that they
     scroll sideways inside the bar rather than wrap. */
  header.site nav { flex: none; width: 100%; justify-content: space-between; gap: var(--s3); overflow-x: auto; scrollbar-width: none; }
  header.site nav::-webkit-scrollbar { display: none; }
  header.site nav a { white-space: nowrap; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .landing { gap: var(--s6); }
  .card { padding: var(--s4); }
  .verdict-strip { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .vtile { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0 var(--s3); padding: var(--s2) var(--s3); }
  .vtile-label { grid-row: span 2; align-self: start; padding-top: 5px; }
  .vtile-label::after { content: none; }
  .vtile-value { font-size: var(--fs-md); }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .strip-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chip-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .motion-pair { grid-template-columns: minmax(0, 1fr); }
  .spec-plot { height: 340px; }
  .segmented { display: flex; width: 100%; }
  .search .segmented { width: auto; }
  .search-line { grid-template-columns: minmax(0, 1fr); }
  .score-tiles { gap: var(--s3); }
  .score-value { font-size: var(--fs-xl); }
  .starter { grid-template-columns: 88px minmax(0, 1fr); }
  .starter-thumb { width: 88px; height: 88px; }
  .fc-figure { grid-template-columns: minmax(0, 1fr); }
  .plot { min-height: 340px; }
  .prose p { font-size: var(--fs-base); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat { padding: var(--s3) var(--s3) var(--s3) 0; border-left: 0; }
  .stat-v { font-size: var(--fs-lg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 3s; }
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* === validation page (web/validation.html) === */
.val { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); margin: 0; }
.val > h1 { margin-bottom: 0; }
.val .answer { margin: 0; }
.sum-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 0 0 var(--s4); border-block: 1px solid var(--line); }
.sum-cell { display: flex; flex-direction: column; gap: 2px; padding: var(--s4) var(--s4) var(--s4) 0; min-width: 0; }
.sum-cell + .sum-cell { padding-left: var(--s5); border-left: 1px solid var(--line); }
.sum-value { font: 400 var(--fs-2xl)/1.1 var(--serif); letter-spacing: -0.02em; }
.sum-value small { font-size: 0.45em; letter-spacing: 0; color: var(--ink-2); }
.sum-extra { font-size: var(--fs-sm); color: var(--ink-2); }
.sum-extra .fail { color: var(--bad); }
.rules { margin: 0 0 var(--s3); padding-left: var(--s5); color: var(--ink-2); font-size: var(--fs-sm); max-width: 52rem; }
.rules li { margin-bottom: var(--s1); }
.rules strong { color: var(--ink); font-weight: 600; }
.val-table { width: 100%; min-width: 640px; }
.val-table th, .val-table td { text-align: left; vertical-align: top; padding: var(--s2) 6px; position: static; }
.val-table th:first-child, .val-table td:first-child { padding-left: var(--s2); }
.val-table td { font-family: var(--sans); font-size: var(--fs-sm); }
.val-table thead th { background: transparent; }
.val-table td.num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: var(--fs-xs); }
.val-table td.bad { color: var(--bad); }
.val-table td.dim { color: var(--muted); }
.val-table th.name { color: var(--ink); font: 500 var(--fs-sm)/1.4 var(--sans); white-space: nowrap; }
.val-table td:last-child .vtag { white-space: nowrap; }
.val-table .group-row th { padding-top: var(--s5); font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--line-strong); background: transparent; }
.val-table tr.has-why > * { border-bottom: 0; padding-bottom: 2px; }
.val-table .why-row td { padding: 0 var(--s2) var(--s3); color: var(--muted); font-size: var(--fs-sm); white-space: normal; }
/* The sentence stays in view while a wide table scrolls sideways on a phone. */
.val-table .why { position: sticky; left: var(--s2); max-width: min(56rem, calc(100vw - 5rem)); }
.val-table .why-row:hover td { background: none; }
.verdict-cell .vtag + .vtag { margin-left: var(--s1); }
.val-notes { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.val-notes h3 { margin-bottom: var(--s1); }
.val-notes ul { margin: 0; padding-left: var(--s5); font-size: var(--fs-sm); color: var(--ink-2); max-width: 56rem; }
.val-notes li { margin-bottom: var(--s1); }
.val-notes strong { color: var(--ink); font-weight: 600; }
.val-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Wide tables scroll inside their card; a shadow at an edge says there is more that way.
   The covers use the card colour, so they hide the shadows only when scrolled to that end. */
.val-scroll, .table-wrap {
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 32px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.75), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.75), transparent) right / 14px 100% no-repeat scroll;
}
@media (max-width: 640px) {
  .sum-cell, .sum-cell + .sum-cell { padding: var(--s3) var(--s3) var(--s3) 0; border-left: 0; }
  .sum-value { font-size: var(--fs-xl); }
}
/* Known bodies recovered: fraction bar with its 95% interval as a line */
.rec-limit { margin: 0 0 var(--s3); max-width: 52rem; color: var(--ink); font: 400 var(--fs-md)/1.5 var(--serif); }
.rec-table { min-width: 560px; }
.rec-table td.num, .rec-table th.name { vertical-align: middle; }
.rec-table th.name { font-family: var(--mono); font-size: var(--fs-xs); }
.rec-cell { white-space: nowrap; vertical-align: middle; }
.rec-bar { position: relative; display: inline-block; width: 140px; height: 8px; vertical-align: middle; background: var(--line); border-radius: 1px; }
.rec-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--good); opacity: 0.55; border-radius: 1px; }
.rec-ci { position: absolute; top: 3px; height: 2px; background: var(--ink); }
.rec-ci::before, .rec-ci::after { content: ""; position: absolute; top: -3px; width: 1px; height: 8px; background: var(--ink); }
.rec-ci::before { left: 0; }
.rec-ci::after { right: 0; }
.rec-cell .num { display: inline-block; min-width: 3.2em; text-align: right; font-family: var(--mono); font-size: var(--fs-xs); }
/* === end validation page === */

/* === brightness over time (js/variability.js) === */
.var-plot { width: 100%; height: 360px; min-width: 0; }
.var-summary { font-size: var(--fs-md); max-width: 70ch; margin-bottom: var(--s2); }
.var-limit { max-width: 70ch; }
@media (max-width: 860px) { .view > .variability { order: 1; } }
@media (max-width: 640px) { .var-plot { height: 340px; } }

/* The Simple | Advanced switch in the header rail (js/mode.js) and its one-time hint. */
.mode-switch { position: relative; display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.mode-switch > button { appearance: none; border: 0; background: none; color: var(--ink-2); font: 500 var(--fs-xs)/1 var(--sans); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 28px; }
.mode-switch > button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.mode-switch > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-hint { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; margin: 0; display: flex; align-items: center; gap: 2px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--accent); border-radius: var(--r); box-shadow: 0 6px 18px rgb(0 0 0 / 0.4); font-size: var(--fs-xs); }
.mode-hint[hidden] { display: none; }
.mode-hint::before { content: ''; position: absolute; top: -6px; right: 22px; width: 10px; height: 10px; background: var(--surface-2); border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); transform: rotate(45deg); }
.mode-hint button { appearance: none; border: 0; background: none; color: var(--ink); font: inherit; padding: 6px 8px; cursor: pointer; }
.mode-hint .mode-hint-x { color: var(--muted); }
.mode-hint.in { animation: hint-in 400ms var(--ease) both; }
@keyframes hint-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  header.site .brand { order: 0; }
  header.site .mode-switch { order: 1; margin-left: auto; }
  header.site nav { order: 2; }
  .mode-hint { top: calc(100% + 46px); } /* below the nav row, so no link sits under it */
}
.mode-hint { pointer-events: none; }
.mode-hint button { pointer-events: auto; }

/* Archive uptime (js/archivestatus.js, js/status.js). By the Check form: Simple shows only a
   sentence, written only when something is failing; Advanced shows a compact row that opens a
   panel over the page. Marks carry the state by shape as well as colour (round: answering,
   diamond: slow, cross: down); blocks by height and fill. */
.archives { margin-top: var(--s3); font-size: var(--fs-sm); color: var(--ink-2); }
.archives-simple, .archive-note { margin: var(--s2) 0 0; }
.archives-simple { margin-bottom: var(--s3); }
body.mode-simple .archives-adv, body:not(.mode-simple) .archives-simple, body.mode-simple .status-adv { display: none; }
.archive-note:not([hidden]) ~ .archives .archives-simple { display: none; }
.arch-dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; vertical-align: 0; border-radius: 50%; background: var(--good); }
.arch-dot.arch-slow { border-radius: 1px; transform: rotate(45deg) scale(0.85); background: var(--accent); }
.arch-dot.arch-down { border-radius: 0; background: var(--bad); clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
.arch-box { position: relative; }
.arch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s3); max-width: 100%; padding: var(--s1) 0; border: 0; background: none; color: inherit; font: inherit; font-size: var(--fs-xs); text-align: left; cursor: pointer; }
.arch-item { white-space: nowrap; }
.arch-item .arch-word { color: var(--ink); font-weight: 500; }
.arch-count { display: none; }
.arch-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: min(26rem, calc(100vw - 32px)); padding: var(--s3) var(--s4); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 8px 24px rgb(0 0 0 / 0.5); }
.arch-panel.arch-up { top: auto; bottom: calc(100% + 4px); }
.arch-panel-list { list-style: none; padding: 0; margin: var(--s2) 0; }
.arch-panel-list li { margin: 0 0 var(--s1); }
@media (max-width: 600px) {
  .arch-item.arch-up .arch-name { display: none; }
  .arch-item.arch-up .arch-dot { margin-right: 0; }
  .arch-count { display: inline; color: var(--muted); }
}
.status-page .card > p + h2 { margin-top: var(--s5); }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-row { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.status-row p { margin: 0 0 var(--s1); }
.arch-blocks { display: flex; align-items: flex-end; gap: 2px; height: 22px; margin: var(--s2) 0; max-width: 100%; }
/* Every block is a full-height target; a half or low bar is drawn inside it from the bottom.
   min-width 8px: at 390 px the card's content box is 324 px (390 - 2x16 main - 2x1 border - 2x16 padding),
   and 30 blocks take 30x8 + 29x2 gap = 298 px. */
.arch-block { flex: 1 1 0; min-width: 8px; max-width: 16px; height: 22px; padding: 0; border: 0; border-radius: 1px; cursor: pointer; }
.arch-block.h-up { height: 22px; background: var(--good); }
.arch-block.h-mixed { background: linear-gradient(to top, var(--accent) 12px, transparent 12px); }
.arch-block.h-down { background: linear-gradient(to top, var(--bad) 4px, transparent 4px); }
.arch-block.h-none { height: 22px; background: none; box-sizing: border-box; border: 1px solid var(--line-strong); }
.arch-block[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.arch-detail:not(:empty) { margin: var(--s2) 0 0; padding: var(--s3); background: var(--surface-2); border-radius: var(--r); }
.arch-checks { margin: var(--s2) 0 0; padding-left: var(--s4); }

/* === Usability fixes (keepinview.js, quick overlays, phone hint, strip lead). Kept as one block. === */
.stage-wrap { scroll-margin-top: var(--s3); scroll-margin-bottom: var(--s3); }
.quick-layers { display: inline-flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.band-strip .strip-lead { margin-bottom: 0; }
@media (max-width: 640px) {
  /* Tucked under the header rule, at the right where the eyebrow line is empty; compact so it ends above the title. */
  .mode-hint { top: calc(100% + 40px); }
  .mode-hint button { padding: 4px 6px; }
  .mode-hint::before { display: none; } /* the tail would point at a nav link, not the switch */
}
/* === End usability fixes. === */
