/* Hallmark · shape: Workbench (draw 2777bf) · genre: modern-minimal · theme: brand, CCA's own tokens (docs/visual-identity.md, config/themes.json) · redesign: full · job: try
 * hero: Counter (/), Banner (/how.html), Banner (/verify.html), Banner (/editions.html), Banner (/download.html), Banner (/opensource.html), Banner (/blog.html) · nav: slab, keylined cells across the top
 * footer: colophon block, a title block of the project's facts · imagery: the product, captures from the 1.0.2-sol interface · signature: the real app window, its three panes measured with dimension strings
 * brand: light paper from CCA 亮色, one night band from CCA 暗色, the light-ground mark from docs/brand-1.0.md · axes: light/neo-grotesk/cool · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, a product page argues less than an essay; the hero argues with the measured window and the exit codes instead of adjectives */
/* Hallmark · hero-review: in-thread · 2 findings · 2 resolved: the window grew to 60% of the fold and bleeds into the gutter */
/* Hallmark · dismissed 67 · the flagged blog summaries are Chinese sentences whose only Latin is the acronym AI; nothing is uppercased or tracked */
/* Hallmark · dismissed 49 · the tour's tabs carry a bold name and the sentence that says what the window shows; the names never wrap */
/* Hallmark · answered F4 · the night band's button is the same primary in the CCA 暗色 palette; each screen holds one filled button */
/* Hallmark · answered F15 · two gaps: 32px between grid columns, 64px between a split's text and its picture */
/* Hallmark · answered F21 · stage lists, edition and download items sit straight under the page title and are items, not sections */
/* Hallmark · waive 44c · measured at 1440 x 900 over HTTP: the hero runs 65 to 837 and the next section starts at 837 · the linter ends the hero at the text column (697); the window beside it reaches 755 */
/* Hallmark · waive 79 · measured at 1440 x 900 over HTTP: the window, the hero's lowest content, ends at 755 and the hero's foot is at 837 · 82px of air under the window, the text column is centred on it */
/* Hallmark · dismissed 77 · blog.html is an index page: its title, then every post as a row; a post list needs no more sections */
/* Hallmark · dropped .reveal and the reveal observer · the brand keeps motion for state; every block is simply there *//* Hallmark · dropped the old bento's card headings (更多審查者, 檢查點與回滾, 暗色與亮色 and others) · each fact now lives in a row, the members register or the tour, as text rather than a heading */
/* Hallmark · dropped cca-mark.svg in the chrome, ledger.webp on the home page · the light ground takes the brand's dark mark; the ledger stays on how.html */
/* Hallmark · dropped the announcement pill, the tool strip, the figure row, the theme swatches and the closing slogan · the latest release has its own section, the tools sit in the members register, the figures moved into their sections */

:root {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.25rem;
  --text-display-s: clamp(2.25rem, 4vw + 0.5rem, 3.75rem); --text-display: clamp(2.75rem, 5vw + 1rem, 5.25rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.25rem); --text-title: clamp(1.25rem, 0.75vw + 0.875rem, 1.5625rem); --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.3125rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
  --z-base: 1; --z-raised: 10; --z-sticky-nav: 300; --z-modal: 400;
  --nav-h: 64px; --tick: 12px; --rule-hair: 1px; --rule-heavy: 2px; --radius-sm: 6px; --radius: 10px;

  /* CCA 亮色, config/themes.json: the page itself */
  --color-paper: #fafbfc; --color-paper-2: #f0f3f5; --color-paper-3: #e7ebee;
  --color-ink: #1b242c; --color-ink-2: #34414c; --color-muted: #55626d;
  --color-rule: #c6d0d8; --color-rule-2: #dbe3e9;
  --color-accent: #2563c4; --color-accent-hover: #1f5fbf; --color-accent-ink: #fafbfc; --color-focus: #2563c4;
  --color-accent-wash: #dbe7f8;
  --color-ok: #2c8a57; --color-bad: #c8363f;
  /* CCA 暗色, ui/app.css :root: the one night band and the captures' frames */
  --color-night: #0b0f13; --color-night-2: #12181e; --color-night-3: #161e26;
  --color-night-head: #edf2f6; --color-night-text: #c8d2db; --color-night-muted: #8796a4; --color-night-rule: #2b3844;
  --color-night-accent: #6fb1ff; --color-night-accent-ink: #0a1726;
  /* members, ui/app.css */
  --claude: #df7a56; --codex: #17a984; --gemini: #a68cff; --cursor: #c3ccd6; --local1: #e464ac; --local2: #e0a458; --star: #f4c04a; --avatar-eye: #160f22;
  --color-scrim: rgba(5, 8, 11, 0.86);

  --font-display: "Geist", "Noto Sans TC", "Microsoft JhengHei UI", sans-serif;
  --font-body: "Geist", "Noto Sans TC", "Microsoft JhengHei UI", sans-serif;
  --font-outlier: "Geist Mono", "Noto Sans TC", ui-monospace, monospace;
}

@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans TC"; src: url("fonts/noto-sans-tc.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule) var(--color-paper); scroll-padding-top: var(--space-3xl); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.6; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); font-synthesis: none; }
::selection { background: var(--color-accent-wash); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: break-word; min-width: 0; text-wrap: balance; word-break: keep-all; color: var(--color-ink); }
h1 { max-width: 20ch; font-size: var(--text-display); line-height: 1.04; }
h2 { max-width: 30ch; font-size: var(--text-section); }
h3 { max-width: 40ch; font-size: var(--text-title); line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: var(--text-lg); line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 65ch; }
ul, ol { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input { font: inherit; }
code, kbd, pre { font-family: var(--font-outlier); font-size: 0.92em; }
:not(pre) > code { padding: 0 var(--space-2xs); border-radius: var(--radius-sm); background: var(--color-paper-3); color: var(--color-ink); overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
b, strong { font-weight: 600; }
.lead { font-size: var(--text-lead); line-height: 1.5; max-width: 52ch; color: var(--color-ink-2); }
.small { font-size: var(--text-sm); color: var(--color-muted); max-width: 72ch; }
.link { color: var(--color-accent); font-weight: 500; text-decoration: underline; text-decoration-color: var(--color-accent-wash); text-decoration-thickness: 2px; }
.link:hover { text-decoration-color: var(--color-accent); }
.link svg.i { display: none; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.skip { position: absolute; left: var(--space-md); top: calc(var(--space-2xl) * -1); z-index: var(--z-modal); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius-sm); }
.skip:focus { top: var(--space-md); }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--section-gap-s) 0; }
.sec.far { padding-top: var(--section-gap); }
.sec.tight { padding-top: var(--space-2xl); }
main > .sec:last-child { padding-bottom: var(--section-gap-s); }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-sm); background: transparent; color: var(--color-ink); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.btn:hover { background: var(--color-paper-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn-sm { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.copy-btn { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 44px; padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-paper); color: var(--color-ink); font-size: var(--text-sm); cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.copy-btn:hover { border-color: var(--color-ink); }
.copy-btn:active { transform: translateY(1px); }
.copy-btn.done { border-color: var(--color-accent); color: var(--color-accent); }

/* ---- nav: one slab of keylined cells ---- */
.nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
.nav-bar { display: flex; align-items: stretch; min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: var(--space-xs); font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.02em; color: var(--color-ink); text-decoration: none; }
.nav .brand { padding-right: var(--space-lg); border-right: var(--rule-hair) solid var(--color-rule); }
.links { display: flex; align-items: stretch; padding-left: var(--space-xs); font-size: var(--text-sm); }
.links a { display: flex; align-items: center; padding: 0 var(--space-sm); border-bottom: var(--rule-heavy) solid transparent; margin-bottom: calc(var(--rule-hair) * -1); color: var(--color-muted); font-weight: 500; text-decoration: none; white-space: nowrap; transition: color var(--dur-short) var(--ease-out); }
.links a:hover { color: var(--color-ink); }
.links a[aria-current="page"] { color: var(--color-ink); border-bottom-color: var(--color-accent); }
.nav-end { display: flex; align-items: center; gap: var(--space-sm); margin-left: auto; padding-left: var(--space-lg); border-left: var(--rule-hair) solid var(--color-rule); }
.gh { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.gh:hover { color: var(--color-ink); }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-paper); color: var(--color-ink); cursor: pointer; }
.menu-btn:hover { border-color: var(--color-ink); }
.menu-btn:active { transform: translateY(1px); }

/* ---- type helpers for sections ---- */
.head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap-columns); align-items: end; margin-bottom: var(--space-2xl); }
.head .lead { padding-bottom: var(--space-2xs); }
.head.stack { display: block; }
.head.stack .lead { margin-top: var(--space-md); }

/* ---- hero: the counter beside the measured window ---- */
.hero { padding-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 15fr); column-gap: var(--space-2xl); align-items: center; min-height: calc(100svh - var(--nav-h) - var(--space-2xl)); padding-block: var(--space-lg); }
.hero-text h1 { max-width: 6.2em; font-size: clamp(2.75rem, 4.4vw + 0.5rem, 4.75rem); }
.hero-text .lead { margin-top: var(--space-lg); }
.hero-text .actions { margin-top: var(--space-xl); }
.files { width: 100%; margin-top: var(--space-xl); border-collapse: collapse; font-size: var(--text-sm); }
.files th, .files td { padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); text-align: left; vertical-align: baseline; }
.files tr:last-child th, .files tr:last-child td { border-bottom: var(--rule-hair) solid var(--color-rule); }
.files th { width: 5.5em; font-weight: 500; color: var(--color-ink); }
.files td { color: var(--color-muted); }
.files td code { padding: 0; background: none; color: var(--color-ink-2); overflow-wrap: anywhere; }
.files td.num { text-align: right; white-space: nowrap; padding-left: var(--space-sm); }
.specs { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin-top: var(--space-md); list-style: none; font-size: var(--text-sm); color: var(--color-muted); }
.specs a { color: var(--color-ink-2); }
.hero-shot { margin: 0 calc(var(--gutter) * -1) 0 0; min-width: 0; }
.hero-shot figcaption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }

/* dimension strings: a hairline, a 45 degree tick at each end, the value above */
.dims { position: relative; height: var(--space-xl); margin-bottom: var(--space-sm); }
.dims .pane { position: absolute; bottom: 0; left: var(--x); width: var(--w); padding: 0 var(--space-2xs) var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-ink-2); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.dims .pane::before, .dims .pane::after { content: ""; position: absolute; bottom: calc(var(--tick) / -2); width: var(--rule-hair); height: var(--tick); background: var(--color-ink-2); transform: rotate(45deg); }
.dims .pane::before { left: 0; }
.dims .pane::after { right: 0; }

/* ---- product captures ---- */
.shot { position: relative; border-radius: var(--radius); background: var(--color-night); }
.shot .in { position: relative; overflow: hidden; border-radius: var(--radius); outline: var(--rule-hair) solid var(--color-night-rule); outline-offset: calc(var(--rule-hair) * -1); }
.shot img { width: 100%; }
.preview-open { position: absolute; right: var(--space-sm); bottom: var(--space-sm); z-index: var(--z-raised); min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-night-rule); border-radius: var(--radius-sm); background: var(--color-night-2); color: var(--color-night-head); font-size: var(--text-sm); font-weight: 500; cursor: zoom-in; opacity: 0; transition: opacity var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.shot:hover .preview-open, .preview-open:focus-visible { opacity: 1; }
.preview-open:hover { background: var(--color-night-3); }
.preview-open:active { transform: translateY(1px); }
@media (hover: none) { .preview-open { opacity: 1; } }
.plate { margin: 0; min-width: 0; }
.plate figcaption { margin-top: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); max-width: 60ch; }
.plate figcaption h3 { margin-bottom: var(--space-xs); color: var(--color-ink); font-size: var(--text-title); }
.plate figcaption p + p { margin-top: var(--space-xs); }

.image-viewer { width: min(100% - var(--space-xl), 1600px); max-width: none; max-height: calc(100dvh - var(--space-xl)); padding: 0; border: var(--rule-hair) solid var(--color-night-rule); border-radius: var(--radius); background: var(--color-night); color: var(--color-night-text); overflow: auto; }
.image-viewer::backdrop { background: var(--color-scrim); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-night-2); border-bottom: var(--rule-hair) solid var(--color-night-rule); font-size: var(--text-sm); }
.viewer-close { min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-night-rule); border-radius: var(--radius-sm); background: var(--color-night-3); color: var(--color-night-head); cursor: pointer; }
.viewer-close:hover { border-color: var(--color-night-muted); }
.viewer-close:active { transform: translateY(1px); }
.image-viewer img { width: 100%; }
body.viewing-image { overflow: hidden; }

/* ---- elevation: two sides parted by one heavy line ---- */
.elevation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: var(--rule-heavy) solid var(--color-ink); }
.elevation > div { padding: var(--space-xl) var(--space-xl) var(--space-xl) 0; }
.elevation > div + div { padding-left: var(--space-xl); border-left: var(--rule-heavy) solid var(--color-ink); }
.side { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.exit-code { margin-top: var(--space-xs); font-family: var(--font-outlier); font-size: var(--text-display-s); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; color: var(--color-ink); }
.exit-code.ok { color: var(--color-ok); }
.exit-code.red { color: var(--color-bad); }
.elevation .code { margin-top: var(--space-md); }
.elevation p:not(.side):not(.exit-code) { margin-top: var(--space-md); color: var(--color-ink-2); max-width: 46ch; }

/* ---- rows: a title on the left, its line on the right ---- */
.rows { margin: 0; border-top: var(--rule-hair) solid var(--color-rule); }
.rows > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap-columns); padding: var(--space-lg) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.rows dt { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em; line-height: 1.35; }
.rows dd { margin: 0; color: var(--color-ink-2); max-width: 64ch; }
.split .rows > div { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2xs); padding: var(--space-md) 0; }
.split .rows dt { font-size: var(--text-md); }
.rows .aside { display: block; margin-top: var(--space-xs); color: var(--color-muted); font-size: var(--text-sm); }
.checklist { margin-top: var(--space-xl); list-style: none; border-top: var(--rule-hair) solid var(--color-rule); }
.checklist li { padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); }

/* ---- a run of stages along one dimension string ---- */
.run { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: var(--gap-columns); list-style: none; counter-reset: stage; position: relative; padding-top: var(--space-xl); }
.run::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: var(--rule-hair) solid var(--color-ink-2); }
.run > li { position: relative; counter-increment: stage; min-width: 0; }
.run > li::before { content: ""; position: absolute; top: calc(var(--space-xl) * -1 - var(--tick) / 2); left: 0; width: var(--rule-hair); height: var(--tick); background: var(--color-ink-2); transform: rotate(45deg); }
.run > li:last-child::after { content: ""; position: absolute; top: calc(var(--space-xl) * -1 - var(--tick) / 2); right: calc(var(--gap-columns) * 0); width: var(--rule-hair); height: var(--tick); background: var(--color-ink-2); transform: rotate(45deg); }
.run h3 { display: flex; align-items: baseline; gap: var(--space-sm); }
.run h3::before { content: counter(stage); font-family: var(--font-outlier); font-weight: 500; font-size: var(--text-md); color: var(--color-muted); }
.run .who { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-sm); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.run .who code { background: none; padding: 0; color: var(--color-ink-2); }
.run p:not(.who) { margin-top: var(--space-sm); color: var(--color-ink-2); }
.loop-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap-columns); align-items: center; margin-bottom: var(--space-2xl); }
.mark-study { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-lg); align-items: center; margin: 0; }
.mark-tile { display: grid; place-items: center; width: 96px; height: 96px; border-radius: var(--radius); background: var(--color-night); }
.mark-tile svg { width: 64px; height: 64px; }
.mark-a { stroke: var(--color-night-head); }
.mark-b { stroke: var(--color-night-accent); }
.mark-study figcaption { font-size: var(--text-sm); color: var(--color-muted); }
.loop-note { margin-top: var(--space-xl); padding: var(--space-lg) 0 0; border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); max-width: 72ch; }
.loop-note b { color: var(--color-ink); }
.after-run { margin-top: var(--space-xl); }

/* ---- registers: tables with rules only ---- */
.table-wrap { overflow-x: auto; }
.register { width: 100%; border-collapse: collapse; }
.register th, .register td { padding: var(--space-md) var(--space-lg) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); text-align: left; vertical-align: top; }
.register thead th { padding-top: 0; border-bottom: var(--rule-heavy) solid var(--color-ink); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.register tbody th { font-weight: 600; white-space: nowrap; }
.register tbody th .avatar { margin-right: var(--space-xs); vertical-align: -6px; }
.register td { color: var(--color-ink-2); }
.register td:last-child, .register th:last-child { padding-right: 0; }
.register.slots tbody th { font-family: var(--font-outlier); font-weight: 500; color: var(--color-muted); width: 4em; }
.register code { white-space: nowrap; }
.register.wide td:last-child { width: 55%; }

/* ---- avatars: the app's droplet, the user's star ---- */
.avatar { display: inline-block; width: 28px; height: 28px; flex-shrink: 0; color: var(--k); }
.avatar svg { width: 100%; height: 100%; }
.avatar .eye { fill: var(--avatar-eye); }
.avatar.c { --k: var(--claude); } .avatar.g { --k: var(--codex); } .avatar.gm { --k: var(--gemini); } .avatar.cu { --k: var(--cursor); }
.avatar.l1 { --k: var(--local1); } .avatar.l2 { --k: var(--local2); } .avatar.u { --k: var(--star); }

/* ---- the tour: a list of states beside the window it changes ---- */
.tabs { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap-columns); align-items: start; }
.tablist { display: flex; flex-direction: column; border-top: var(--rule-hair) solid var(--color-rule); }
.tab { display: block; width: 100%; padding: var(--space-lg) var(--space-md) var(--space-lg) var(--space-lg); border: 0; border-bottom: var(--rule-hair) solid var(--color-rule); border-left: var(--rule-heavy) solid transparent; background: transparent; color: var(--color-muted); text-align: left; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.tab b { display: block; margin-bottom: var(--space-2xs); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--color-ink); letter-spacing: -0.01em; }
.tab-line { display: block; font-size: var(--text-sm); line-height: 1.55; }
.tab:hover { background: var(--color-paper-2); }
.tab:active { background: var(--color-paper-3); }
.tab[aria-selected="true"] { border-left-color: var(--color-accent); background: var(--color-paper-2); color: var(--color-ink-2); }
.tab:focus-visible { outline-offset: -2px; }
.panels { min-width: 0; display: grid; gap: var(--space-lg); }
.tabs.ready .panels { display: block; }

/* ---- the latest release: one large capture, two beside it ---- */
.gallery { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: var(--gap-columns); align-items: start; }
.gallery-side { display: grid; gap: var(--space-xl); }
.gallery-side .plate figcaption h3 { font-size: var(--text-lg); }

/* ---- splits ---- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-2xl); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.split.flip > :first-child { order: 2; }
.split .head { display: block; margin-bottom: 0; }
.split .head .lead { margin-top: var(--space-md); }
.split h2 + .rows, .split .head + .rows { margin-top: var(--space-xl); }
.split > div > .lead + .lead { margin-top: var(--space-md); }
.split > div > h2 + .lead { margin-top: var(--space-md); }

/* ---- cells: two to four keylined items ---- */
.cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--rule-hair) solid var(--color-rule); border-left: var(--rule-hair) solid var(--color-rule); }
.cells.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cell { padding: var(--space-xl); border-right: var(--rule-hair) solid var(--color-rule); border-bottom: var(--rule-hair) solid var(--color-rule); }
.cell h3 { font-size: var(--text-lg); }
.cell p { margin-top: var(--space-sm); color: var(--color-ink-2); }
.cell-note { color: var(--color-muted); font-size: var(--text-sm); }
.cell .link { display: inline-block; margin-top: var(--space-md); }

/* ---- notes, code, terminal ---- */
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); margin-top: var(--space-xl); padding: var(--space-lg); border: var(--rule-hair) solid var(--color-rule); border-left: var(--rule-heavy) solid var(--color-ink); border-radius: var(--radius-sm); }
.note svg.i { margin-top: var(--space-2xs); }
.note h3 { font-size: var(--text-md); }
.note p { margin-top: var(--space-2xs); color: var(--color-ink-2); }
.code { border: var(--rule-hair) solid var(--color-night-rule); border-radius: var(--radius); background: var(--color-night); color: var(--color-night-text); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md); border-bottom: var(--rule-hair) solid var(--color-night-rule); font-size: var(--text-sm); color: var(--color-night-muted); }
.code .copy-btn { background: transparent; border-color: var(--color-night-rule); color: var(--color-night-text); }
.code .copy-btn:hover { border-color: var(--color-night-muted); }
.code pre { margin: 0; padding: var(--space-md); overflow-x: auto; line-height: 1.65; }
.elevation .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.code pre code { padding: 0; background: none; color: inherit; overflow-wrap: normal; }
.code .dim { color: var(--color-night-muted); }
.cli { margin-top: var(--space-lg); padding: var(--space-md) var(--space-lg); border-radius: var(--radius); background: var(--color-night-2); border: var(--rule-hair) solid var(--color-night-rule); font-family: var(--font-outlier); font-size: var(--text-sm); color: var(--color-night-text); overflow-x: auto; }
.cli .prompt { color: var(--color-night-muted); }
.cli .cmd { color: var(--color-night-head); }
.cli-row { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: var(--space-md); padding-top: var(--space-xs); }
.cli-row span:first-child { color: var(--color-night-accent); white-space: nowrap; }
.cli-row span:last-child { font-family: var(--font-body); color: var(--color-night-muted); }

/* ---- the night band: CCA 暗色 ---- */
.band { margin-top: var(--section-gap-s); padding: var(--section-gap-s) 0; background: var(--color-night); color: var(--color-night-text); }
main > .band:last-child { padding-bottom: var(--section-gap-s); }
.band h2, .band h3, .band .rows dt { color: var(--color-night-head); }
.band .lead { color: var(--color-night-text); }
.band .small { color: var(--color-night-muted); }
.band .btn { border-color: var(--color-night-head); color: var(--color-night-head); }
.band .btn:hover { background: var(--color-night-3); }
.band .btn-primary { background: var(--color-night-accent); border-color: var(--color-night-accent); color: var(--color-night-accent-ink); }
.band .btn-primary:hover { background: var(--color-night-head); border-color: var(--color-night-head); }
.band .elevation { border-top-color: var(--color-night-rule); }
.band .elevation > div + div { border-left-color: var(--color-night-rule); }
.band .elevation p:not(.side) { color: var(--color-night-text); }
.band :focus-visible { outline-color: var(--color-night-accent); }
.band .shot { outline: var(--rule-hair) solid var(--color-night-rule); }
.band-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap-columns); align-items: end; }
.band-grid .actions { margin-top: var(--space-lg); }
.shells h3 { display: flex; align-items: center; gap: var(--space-xs); }
.shells h3 + p { margin-top: var(--space-sm); }
.shells .shot { margin-top: var(--space-lg); }
.close-foot { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap-columns); align-items: center; margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: var(--rule-hair) solid var(--color-night-rule); }
.close-foot .actions { justify-content: flex-end; }

/* ---- inner page heads ---- */
.pagehead { padding-top: var(--space-3xl); padding-bottom: var(--space-xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.pagehead h1 { font-size: var(--text-display-s); max-width: 18ch; }
.pagehead .lead { margin-top: var(--space-lg); }
.pagehead .meta { margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.pagehead + .sec { padding-top: var(--space-3xl); }
.pagehead-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--space-2xl); align-items: end; }
.pagehead-grid .actions { margin-top: var(--space-xl); }

/* ---- downloads ---- */
.dl-list { border-top: var(--rule-heavy) solid var(--color-ink); }
.dl { display: grid; grid-template-columns: minmax(0, 7fr) auto; column-gap: var(--gap-columns); row-gap: var(--space-md); align-items: center; padding: var(--space-xl) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.dl h3 { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-title); max-width: none; }
.dl-head p { margin-top: var(--space-xs); color: var(--color-ink-2); }
.dl-file { font-size: var(--text-sm); color: var(--color-muted); }
.hash { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; font-size: var(--text-sm); color: var(--color-muted); }
.hash code { padding: 0; background: none; color: var(--color-ink-2); overflow-wrap: anywhere; min-width: 0; flex: 1 1 24em; }

/* ---- editions ---- */
.editions { border-top: var(--rule-heavy) solid var(--color-ink); }
.edition { display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: var(--gap-columns); padding: var(--space-xl) 0; border-bottom: var(--rule-hair) solid var(--color-rule); align-items: start; }
.edition img { width: 80px; height: 80px; }
.edition.main { grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; }
.edition.main img { width: 128px; height: 128px; }
.edition h3 { max-width: none; }
.edition p { margin-top: var(--space-xs); color: var(--color-ink-2); max-width: 64ch; }
.status { display: inline-block; margin-top: var(--space-xs); padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.status.live { border-color: var(--color-ink-2); color: var(--color-ink); }

/* ---- open source ---- */
.repo { padding: var(--space-xl); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius); background: var(--color-paper-2); }
.repo-name { display: flex; align-items: center; gap: var(--space-xs); font-weight: 600; }
.repo > p + p { margin-top: var(--space-sm); color: var(--color-ink-2); }
.langs { display: flex; height: var(--space-xs); margin-top: var(--space-lg); overflow: hidden; border-radius: var(--radius-sm); gap: var(--space-3xs); }
.langs i { display: block; background: var(--color-ink); }
.langs i:nth-child(2) { background: var(--color-ink-2); } .langs i:nth-child(3) { background: var(--color-muted); }
.langs i:nth-child(4) { background: var(--color-rule); } .langs i:nth-child(5) { background: var(--color-rule-2); }
.langs-key { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.repo-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--space-lg) 0 0; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.repo-meta dd { margin: 0; font-weight: 600; color: var(--color-ink); }
.checks-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.checks-head img { height: 20px; width: auto; }

/* ---- long documents: policies and posts ---- */
.doc { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--space-2xl); align-items: start; }
.doc.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.toc { position: sticky; top: calc(var(--nav-h) + var(--space-lg)); font-size: var(--text-sm); }
.toc > p { padding-bottom: var(--space-xs); border-bottom: var(--rule-heavy) solid var(--color-ink); font-weight: 600; }
.toc ol { list-style: none; }
.toc a { display: block; padding: var(--space-xs) 0 var(--space-xs) var(--space-sm); border-left: var(--rule-heavy) solid transparent; color: var(--color-muted); text-decoration: none; }
.toc a:hover { color: var(--color-ink); }
.toc a[aria-current="true"] { border-left-color: var(--color-accent); color: var(--color-ink); }
.doc-body { max-width: 72ch; min-width: 0; }
.doc-body > section + section { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.doc-body h2 { font-size: var(--text-title); max-width: none; }
.doc-body h3 { margin-top: var(--space-xl); font-size: var(--text-lg); }
.doc-body h4 { margin-top: var(--space-lg); }
.doc-body p, .doc-body li { line-height: 1.75; }
.doc-body h2 + p, .doc-body h3 + p, .doc-body h4 + p, .doc-body h2 + ul, .doc-body h2 + dl { margin-top: var(--space-md); }
.doc-body p + p, .doc-body p + ul, .doc-body ul + p, .doc-body p + ol, .doc-body ol + p, .doc-body dl + p, .doc-body p + dl { margin-top: var(--space-md); }
.doc-body a:not(.btn):not(.link) { color: var(--color-accent); }
.doc-body ul:not([class]), .doc-body ol:not([class]), .bullets { padding-left: var(--space-lg); }
.doc-body ul:not([class]) li + li, .doc-body ol:not([class]) li + li, .bullets li + li { margin-top: var(--space-xs); }
.bullets.yes li::marker, .bullets.no li::marker { color: var(--color-muted); }
.kv { margin: var(--space-md) 0 0; border-top: var(--rule-hair) solid var(--color-rule); }
.kv > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap-columns); padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.kv dt { font-weight: 600; overflow-wrap: anywhere; }
.kv dd { margin: 0; color: var(--color-ink-2); }
.steps-doc { margin-top: var(--space-md); padding-left: var(--space-lg); }
.steps-doc li + li { margin-top: var(--space-sm); }
.steps-doc b, .steps-doc span { display: block; }
.steps-doc span { color: var(--color-ink-2); }
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); margin-top: var(--space-lg); }
.scope-head { display: flex; align-items: center; gap: var(--space-xs); padding-bottom: var(--space-xs); margin-bottom: var(--space-md); border-bottom: var(--rule-heavy) solid var(--color-ink); font-weight: 600; }
.doc-body .actions { margin-top: var(--space-xl); }
.doc-body .note { margin-top: var(--space-lg); }
.doc-body .shot { margin-top: var(--space-lg); }
.summary { margin-top: var(--space-xl); }
.article-author { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-lg); font-size: var(--text-sm); }
.article-author img { width: 48px; height: 48px; border-radius: 50%; }
.article-author a { font-weight: 600; text-decoration: none; }
.article-author p { color: var(--color-muted); }

/* ---- blog ---- */
.post-list { border-top: var(--rule-heavy) solid var(--color-ink); }
.post-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr) auto; column-gap: var(--gap-columns); align-items: start; padding: var(--space-xl) 0; border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink); text-decoration: none; transition: background-color var(--dur-short) var(--ease-out); }
.post-row:hover { background: var(--color-paper-2); }
.post-row:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--color-accent); }
.post-date { font-size: var(--text-sm); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.post-main { display: grid; gap: var(--space-xs); min-width: 0; }
.post-main b { font-family: var(--font-display); font-size: var(--text-title); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; word-break: keep-all; overflow-wrap: break-word; }
.post-main { font-size: var(--text-md); }
.post-sum { font-size: var(--text-md); color: var(--color-ink-2); max-width: 64ch; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.chips em { font-style: normal; }
.chip { display: inline-block; padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
.post-go { color: var(--color-muted); padding-top: var(--space-2xs); }
.empty { padding: var(--space-3xl) 0; text-align: center; color: var(--color-muted); }
.crumb { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.crumb a { color: var(--color-accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.post-head h1 { max-width: 24ch; }
.post-body > * + * { margin-top: var(--space-md); }
.post-body > h2 { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-title); max-width: none; }
.post-body > h3 { margin-top: var(--space-xl); font-size: var(--text-lg); }
.post-body > h4 { margin-top: var(--space-lg); }
.post-body figure { margin: var(--space-xl) 0; }
.post-body figure img { border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius); background: var(--color-paper-2); }
.post-body figcaption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.post-body blockquote { margin: var(--space-lg) 0; padding-left: var(--space-lg); border-left: var(--rule-heavy) solid var(--color-ink); color: var(--color-ink-2); }
.post-body .table-wrap { margin: var(--space-lg) 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.post-body th, .post-body td { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); text-align: left; vertical-align: top; }
.post-body thead th { border-bottom: var(--rule-heavy) solid var(--color-ink); font-weight: 500; color: var(--color-muted); white-space: nowrap; }
.post-body .code { margin: var(--space-lg) 0; }
.post-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); border-top: var(--rule-heavy) solid var(--color-ink); }
.post-stats > div { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.post-stats b { display: block; font-family: var(--font-display); font-size: var(--text-title); font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--text-sm); color: var(--color-muted); }
.timeline { list-style: none; border-left: var(--rule-hair) solid var(--color-rule); padding-left: var(--space-lg); }
.tl-item { position: relative; display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: var(--space-md); padding: var(--space-sm) 0; }
.tl-dot { position: absolute; left: calc(var(--space-lg) * -1 - 4px); top: var(--space-md); width: 7px; height: 7px; border: var(--rule-hair) solid var(--color-ink-2); background: var(--color-paper); transform: rotate(45deg); }
.tl-date { font-size: var(--text-sm); color: var(--color-muted); }
.tl-card h4 { font-size: var(--text-md); }
.tl-card p { margin-top: var(--space-2xs); color: var(--color-ink-2); }
.tl-tags { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-xs); }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); margin-top: var(--space-3xl); }
.pn { display: block; padding: var(--space-lg) 0; border-top: var(--rule-heavy) solid var(--color-ink); color: var(--color-ink); text-decoration: none; }
.pn .in { display: grid; gap: var(--space-2xs); }
.pn small { font-size: var(--text-sm); color: var(--color-muted); }
.pn b { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: 1.35; }
.pn-date { font-size: var(--text-sm); color: var(--color-muted); }
.pn:hover b { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }
.post-nav > a:last-child:not(:first-child) { text-align: right; }
.draft-flag { display: inline-block; margin-right: var(--space-xs); padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-ink-2); border-radius: var(--radius-sm); font-size: var(--text-sm); font-style: normal; }
.draft-banner { margin-top: var(--space-lg); padding: var(--space-sm) var(--space-md); border: var(--rule-hair) solid var(--color-ink-2); border-radius: var(--radius-sm); font-size: var(--text-sm); }

/* ---- 404 ---- */
.lost { padding-block: var(--space-4xl) var(--section-gap-s); }
.code404 { font-family: var(--font-outlier); font-size: clamp(5rem, 14vw, 10rem); font-weight: 500; line-height: 1; letter-spacing: -0.04em; }
.lost h1 { margin-top: var(--space-lg); font-size: var(--text-section); }
.lost .lead { margin-top: var(--space-md); }
.lost .actions { margin-top: var(--space-xl); }

/* ---- footer: a title block ---- */
.footer { margin-top: var(--section-gap-s); border-top: var(--rule-heavy) solid var(--color-ink); background: var(--color-paper-2); }
.band + .footer, main:has(> .band:last-child) + .footer { margin-top: 0; }
.colophon { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); border-left: var(--rule-hair) solid var(--color-rule); }
.colophon > * { padding: var(--space-xl) var(--space-lg); border-right: var(--rule-hair) solid var(--color-rule); border-bottom: var(--rule-hair) solid var(--color-rule); min-width: 0; }
.colophon { font-size: var(--text-sm); }
.colophon > p { color: var(--color-ink-2); line-height: 1.7; max-width: none; }
.facts-cell { margin: 0; display: grid; gap: var(--space-sm); font-size: var(--text-sm); }
.facts-cell dt { color: var(--color-muted); }
.facts-cell dd { margin: 0; font-weight: 600; }
.foot-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); font-size: var(--text-sm); }
.foot-links a { color: var(--color-ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--color-ink); text-decoration: underline; }
.legal { padding-block: var(--space-md) var(--space-xl); font-size: var(--text-sm); color: var(--color-muted); }

/* ---- responsive ---- */
@media (max-width: 1200px) {
  .links a { padding: 0 var(--space-xs); }
  .gh span { display: none; }
}
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2xl); min-height: 0; }
  .hero-shot { margin-right: 0; }
  .hero-text h1 { max-width: 12em; }
  .gallery { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2xl); }
  .gallery-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); }
  .run { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-xl); }
  .run > li:last-child::after { display: none; }
}
@media (max-width: 860px) {
  :root { --gutter: 24px; --section-gap-s: 80px; --section-gap: 96px; --section-gap-l: 120px; }
  .menu-btn { display: inline-flex; }
  .js .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: var(--space-xs) var(--gutter) var(--space-md); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .js .links a { min-height: 48px; border-bottom: 0; border-left: var(--rule-heavy) solid transparent; padding-left: var(--space-sm); }
  .js .links a[aria-current="page"] { border-left-color: var(--color-accent); }
  body.nav-open .links { display: flex; }
  html:not(.js) .nav-bar { flex-wrap: wrap; }
  html:not(.js) .links { order: 3; width: 100%; flex-wrap: wrap; padding: 0 0 var(--space-xs); border-top: var(--rule-hair) solid var(--color-rule); }
  html:not(.js) .links a { min-height: 44px; }
  .nav .brand { border-right: 0; }
  .nav-end { border-left: 0; }
  .head, .loop-head, .band-grid, .close-foot, .pagehead-grid, .split, .split.flip, .tabs, .doc { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-lg); }
  .split.flip > :first-child { order: 0; }
  .split, .split.flip { row-gap: var(--space-xl); }
  .close-foot .actions { justify-content: flex-start; }
  .toc { position: static; }
  .elevation { grid-template-columns: minmax(0, 1fr); }
  .elevation > div { padding: var(--space-xl) 0; }
  .elevation > div + div { padding-left: 0; border-left: 0; border-top: var(--rule-heavy) solid var(--color-ink); }
  .band .elevation > div + div { border-top-color: var(--color-night-rule); }
  .rows > div { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2xs); }
  .colophon { grid-template-columns: minmax(0, 1fr); }
  .cells.three { grid-template-columns: minmax(0, 1fr); }
  .scope { grid-template-columns: minmax(0, 1fr); }
  .post-row { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xs); }
  .post-go { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --section-gap-s: 64px; --section-gap: 72px; --section-gap-l: 96px; --gap-columns: 16px; }
  .dims { display: none; }
  .run { grid-template-columns: minmax(0, 1fr); }
  .gallery-side { grid-template-columns: minmax(0, 1fr); }
  .cells { grid-template-columns: minmax(0, 1fr); }
  .cell { padding: var(--space-lg); }
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl .btn { justify-self: start; }
  .edition, .edition.main { grid-template-columns: 64px minmax(0, 1fr); column-gap: var(--space-md); }
  .edition img, .edition.main img { width: 64px; height: 64px; }
  .edition.main > :last-child { grid-column: 1 / -1; margin-top: var(--space-md); }
  .register thead { display: none; }
  .register tr { display: block; padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
  .register th, .register td { display: block; padding: 0; border: 0; white-space: normal; }
  .register td { margin-top: var(--space-2xs); }
  .register.slots tbody th { width: auto; }
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav > a:last-child:not(:first-child) { text-align: left; }
  .cli-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .files td code { font-size: var(--text-xs); }
  .repo-meta { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn:active, .copy-btn:active, .menu-btn:active, .preview-open:active, .viewer-close:active { transform: none; }
}
@media print {
  .nav, .footer, .preview-open { display: none; }
}
