/* Conform Labs — site styles. Tokens mirror brand/tokens.json (v1). */

:root {
  color-scheme: light;
  --paper: #F2EFE8;
  --paper-raised: #FAF8F4;
  --paper-sunk: #E6E2D8;
  --ink: #14161A;
  --ink-muted: #5C5E62;
  --rule: #D6D1C6;
  --rule-strong: #8A867D;
  --tally: #E5481B;
  --tally-text: #B5360F;
  --tally-tint: #F6D5C7;
  --on-tally: #14161A;
  --focus: #B5360F;
  --verified: #0F6B3E;
  --changed: #8A5A00;
  --refused: #B42318;
  --product-surehand: #14874F;
  --shadow-menu: 0 6px 24px rgba(20,22,26,0.14);

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --radius-sm: 2px; --radius-md: 4px;
  --measure: 65ch;
  --page: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #14161A;
    --paper-raised: #1C1F24;
    --paper-sunk: #0D0E11;
    --ink: #F2EFE8;
    --ink-muted: #A6A49D;
    --rule: #2C3036;
    --rule-strong: #6E727A;
    --tally: #FF6A3D;
    --tally-text: #FF8A5C;
    --tally-tint: #3A1F16;
    --focus: #FF8A5C;
    --verified: #3DD68C;
    --changed: #E8B34A;
    --refused: #FF7A6B;
    --product-surehand: #3DD68C;
    --shadow-menu: 0 6px 24px rgba(0,0,0,0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14161A;
  --paper-raised: #1C1F24;
  --paper-sunk: #0D0E11;
  --ink: #F2EFE8;
  --ink-muted: #A6A49D;
  --rule: #2C3036;
  --rule-strong: #6E727A;
  --tally: #FF6A3D;
  --tally-text: #FF8A5C;
  --tally-tint: #3A1F16;
  --focus: #FF8A5C;
  --verified: #3DD68C;
  --changed: #E8B34A;
  --refused: #FF7A6B;
  --product-surehand: #3DD68C;
  --shadow-menu: 0 6px 24px rgba(0,0,0,0.5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/24px var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--tally-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--paper); }
::selection { background: var(--tally-tint); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
p { margin: 0 0 var(--space-4); }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); }
code, kbd, samp { font: 400 13px/20px var(--mono); }
p code, li code, td code { background: var(--paper-sunk); padding: 1px 5px; overflow-wrap: anywhere; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper-raised); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type styles ---------- */
.display-xl { font: 600 clamp(42px, 5.6vw, 76px)/1.02 var(--display); letter-spacing: -0.022em; text-wrap: balance; }
.display { font: 600 clamp(34px, 4.6vw, 48px)/1.08 var(--display); letter-spacing: -0.015em; }
.heading { font: 600 clamp(24px, 2.6vw, 28px)/34px var(--display); letter-spacing: -0.01em; }
.title { font: 600 20px/28px var(--display); }
.body-lg { font-size: 18px; line-height: 28px; }
.small { font-size: 13px; line-height: 20px; }
.muted { color: var(--ink-muted); }
.label {
  font: 500 11px/16px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.label--tally { color: var(--tally-text); }
.timecode { font: 500 15px/20px var(--mono); font-variant-numeric: tabular-nums; }
.measure { max-width: var(--measure); }
.em { color: var(--tally-text); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--rule); }
.section--flush { border-top: 0; }
.section-head { display: grid; gap: var(--space-4); margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.section-head .body-lg { color: var(--ink-muted); margin: 0; }
.grid { display: grid; gap: var(--space-6); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* Ruled grid: cells separated by hairlines, no gaps, no shadows */
.ruled { display: grid; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.ruled > * { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: var(--space-6); min-width: 0; }
.ruled.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ruled.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ruled.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .ruled.cols-3, .ruled.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ruled.cols-2, .ruled.cols-3, .ruled.cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); height: 64px; }
.brand-link { display: inline-flex; align-items: center; flex: none; }
.brand-link img { height: 28px; width: auto; }
.logo-ink { display: none; }
:root[data-theme="dark"] .logo-ivory { display: none; }
:root[data-theme="dark"] .logo-ink { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-ivory { display: none; }
  :root:not([data-theme="light"]) .logo-ink { display: block; }
}
.nav { display: flex; align-items: center; gap: var(--space-1); }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 14px; line-height: 20px;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--paper-sunk); }
.nav a[aria-current="page"] { color: var(--tally-text); box-shadow: inset 0 -2px 0 var(--tally-text); border-radius: 0; }
.nav-tools { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  background: transparent; color: var(--ink); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--paper-sunk); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-raised); border-bottom: 1px solid var(--rule);
    padding: var(--space-2) var(--gutter) var(--space-4);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); border-radius: 0; font-size: 16px; }
  .nav a:hover { background: transparent; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav .btn { margin-top: var(--space-4); justify-content: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font: 600 15px/24px var(--text); text-decoration: none;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong); color: var(--ink); background: transparent;
  cursor: pointer; transition: background-color 120ms linear, border-color 120ms linear;
  white-space: nowrap;
}
.btn:hover { background: var(--paper-sunk); text-decoration: none; }
.btn--primary { background: var(--tally); border-color: var(--tally); color: var(--on-tally); }
.btn--primary:hover { background: color-mix(in srgb, var(--tally) 88%, var(--ink)); border-color: transparent; }
.btn--sm { font-size: 14px; padding: 6px 12px; line-height: 20px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- status glyphs (filled / hollow / crossed) ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.glyph { display: inline-block; width: 10px; height: 10px; flex: none; position: relative; }
.glyph--verified { background: var(--verified); }
.glyph--changed { border: 2px solid var(--changed); }
.glyph--refused { border: 2px solid var(--refused); }
.glyph--refused::before, .glyph--refused::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  background: var(--refused); transform: translate(-50%, -50%) rotate(45deg);
}
.glyph--refused::after { transform: translate(-50%, -50%) rotate(-45deg); }
.status--verified { color: var(--verified); }
.status--changed { color: var(--changed); }
.status--refused { color: var(--refused); }

/* ---------- machine output (paper-sunk) ---------- */
.console {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  font: 400 13px/22px var(--mono);
  color: var(--ink);
  min-width: 0;
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: 10px var(--space-4); border-bottom: 1px solid var(--rule);
}
.console-bar .label { color: var(--ink-muted); }
.console-body { padding: var(--space-4); overflow-x: auto; white-space: pre; tab-size: 2; }
.console-body .k { color: var(--ink-muted); }
.console-body .add { color: var(--verified); }
.console-body .mod { color: var(--changed); }
.console-body .del { color: var(--refused); }
.console-body .t { color: var(--tally-text); }
.console-body .hl { background: var(--tally-tint); }
.console-foot { padding: 10px var(--space-4); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }

/* Line-by-line reveal for the hero report (first load only, motion-safe) */
.reveal .line { opacity: 0; }
.reveal.run .line { animation: line-in 120ms linear forwards; animation-delay: calc(var(--i) * 90ms + 420ms); }
@keyframes line-in { to { opacity: 1; } }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { margin: var(--space-4) 0 var(--space-6); }
.hero h1 span { display: block; }
.hero h1 .em-line { color: var(--ink-muted); }
.hero .body-lg { color: var(--ink-muted); max-width: 52ch; margin-bottom: var(--space-8); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-8); }
.hero-meta span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-meta span::before { content: ""; width: 6px; height: 6px; background: var(--tally); }

/* Registration mark */
.regmark { width: 100%; height: auto; overflow: visible; }
.regmark .c { fill: none; stroke: var(--ink); stroke-width: 18; }
.regmark .hair { stroke: var(--tally); stroke-width: 6; fill: none; }
.regmark .anchor { fill: none; stroke: var(--tally); stroke-width: 6; }
.regmark.animate .hair { stroke-dasharray: 66; stroke-dashoffset: 66; animation: draw 160ms linear forwards; }
.regmark.animate .anchor { opacity: 0; transform-origin: 100px 100px; transform: scale(0); animation: snap 80ms linear 160ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes snap { to { opacity: 1; transform: scale(1); } }

.eyebrow-mark { display: inline-flex; align-items: center; gap: var(--space-3); }
.eyebrow-mark svg { width: 28px; height: 28px; }

/* ---------- cards / panels ---------- */
.panel { background: var(--paper-raised); border: 1px solid var(--rule); padding: var(--space-6); min-width: 0; }
.panel h3 { margin-bottom: var(--space-2); }
.panel p:last-child { margin-bottom: 0; }
.cell-num { font: 500 11px/16px var(--mono); letter-spacing: 0.08em; color: var(--tally-text); margin-bottom: var(--space-6); display: block; }
.ruled h3 { margin-bottom: var(--space-2); }
.ruled p { color: var(--ink-muted); margin: 0; }

/* Product block */
.product {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--rule); background: var(--paper-raised);
}
.product > * { padding: clamp(24px, 4vw, 48px); min-width: 0; }
.product > * + * { border-left: 1px solid var(--rule); }
@media (max-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr); }
  .product > * + * { border-left: 0; border-top: 1px solid var(--rule); }
}
.product-lockup { width: min(100%, 420px); height: auto; }
.lockup-dark { display: none; }
:root[data-theme="dark"] .lockup-light { display: none; }
:root[data-theme="dark"] .lockup-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup-light { display: none; }
  :root:not([data-theme="light"]) .lockup-dark { display: block; }
}
.endorse { width: 208px; height: auto; margin-top: var(--space-3); }
.product-brand { width: min(100%, 420px); }
.product-brand .product-lockup { width: 100%; }
.product-brand .endorse { width: 38%; margin: 2px 0 0 21.2%; }
.product-tag { display: inline-flex; align-items: center; gap: var(--space-2); }
.product-tag::before { content: ""; width: 10px; height: 10px; background: var(--product-surehand); }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.facts li { display: flex; justify-content: space-between; gap: var(--space-4); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts li > span:first-child { color: var(--ink-muted); }
.facts li > span:last-child { text-align: right; font-weight: 600; }

/* Checklist */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.checks li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.checks li::before { content: ""; width: 10px; height: 10px; background: var(--tally); transform: translateY(1px); }
.checks.hollow li::before { background: transparent; border: 2px solid var(--rule-strong); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--paper-raised); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 24px; }
th { text-align: left; font: 500 11px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); padding: 12px var(--space-4); border-bottom: 1px solid var(--rule); background: var(--paper); }
td { padding: 14px var(--space-4); border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
tr.selected td { background: var(--tally-tint); }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-6) 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: "0" counter(step); font: 500 15px/28px var(--mono); color: var(--tally-text); font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: var(--space-2); }
.steps p { margin: 0; color: var(--ink-muted); }

/* Timeline illustration (conform) */
.conform-figure { border: 1px solid var(--rule); background: var(--paper-raised); padding: var(--space-6); }
.conform-figure svg { width: 100%; height: auto; }
.tl-track { fill: var(--paper-sunk); stroke: var(--rule); stroke-width: 1; }
.tl-clip { fill: var(--paper-raised); stroke: var(--rule-strong); stroke-width: 1; }
.tl-clip--online { fill: var(--ink); stroke: none; }
.tl-cut { stroke: var(--tally); stroke-width: 2; }
.tl-text { font: 500 11px var(--mono); letter-spacing: 0.08em; fill: var(--ink-muted); }
.tl-tc { font: 500 11px var(--mono); fill: var(--ink); }
.tl-hair { stroke: var(--tally); stroke-width: 1.5; fill: none; }

/* Pillars */
.pillar { display: flex; flex-direction: column; gap: var(--space-3); }
.pillar .checks { margin-top: var(--space-3); color: var(--ink); }
.pillar .checks li { color: var(--ink); }

/* Quote / statement */
.statement { font: 600 clamp(26px, 3.4vw, 40px)/1.18 var(--display); letter-spacing: -0.015em; max-width: 26ch; }
.statement .em { color: var(--tally-text); }

/* Feature with console */
.feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--rule); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature h3 { margin: var(--space-3) 0 var(--space-3); }
.feature p { color: var(--ink-muted); }
@media (max-width: 900px) { .feature { grid-template-columns: minmax(0, 1fr); } }

/* Compat strip */
.compat { display: flex; flex-wrap: wrap; border: 1px solid var(--rule); }
.compat > div { flex: 1 1 180px; padding: var(--space-6); border-right: 1px solid var(--rule); min-width: 0; }
.compat > div:last-child { border-right: 0; }
@media (max-width: 760px) { .compat > div { border-right: 0; border-bottom: 1px solid var(--rule); } .compat > div:last-child { border-bottom: 0; } }
.compat .title { margin-top: var(--space-2); }

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-strong); }
.roadmap li { position: relative; padding: 0 0 var(--space-8) var(--space-8); }
.roadmap li:last-child { padding-bottom: 0; }
.roadmap li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; background: var(--paper); border: 2px solid var(--rule-strong); }
.roadmap li.now::before { background: var(--tally); border-color: var(--tally); }
.roadmap li.next::before { border-color: var(--tally); }
.roadmap h3 { margin: var(--space-1) 0 var(--space-2); }
.roadmap p { color: var(--ink-muted); margin: 0; max-width: 60ch; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--space-6) 40px var(--space-6) 0; position: relative;
  font: 600 18px/28px var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border: 2px solid var(--ink); transform: translateY(-50%);
}
.faq details[open] summary::after { background: var(--tally); border-color: var(--tally); }
.faq details > div { padding: 0 0 var(--space-6); color: var(--ink-muted); max-width: var(--measure); }
.faq details > div p:last-child { margin: 0; }

/* Brand page */
.swatch { border: 1px solid var(--rule); background: var(--paper-raised); min-width: 0; }
.swatch-chip { height: 96px; border-bottom: 1px solid var(--rule); }
.swatch-meta { padding: var(--space-3) var(--space-4); display: grid; gap: 2px; }
.swatch-meta code { color: var(--ink-muted); font-size: 12px; }
.asset { border: 1px solid var(--rule); display: flex; flex-direction: column; min-width: 0; }
.asset-view { display: grid; place-items: center; padding: var(--space-8); min-height: 200px; }
.asset-view img { max-height: 120px; width: auto; }
.asset-view.on-ivory { background: #F2EFE8; }
.asset-view.on-ink { background: #14161A; }
.asset-meta { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; background: var(--paper-raised); }
.asset-meta a { font: 500 12px/16px var(--mono); }
.specimen { border-top: 1px solid var(--rule); padding: var(--space-6) 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-6); align-items: baseline; }
@media (max-width: 700px) { .specimen { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } }
.dont { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.dont li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.dont li::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--refused); background: linear-gradient(45deg, transparent 42%, var(--refused) 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, var(--refused) 42% 58%, transparent 58%); }

/* Page hero (inner pages) */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { margin: var(--space-4) 0 var(--space-6); max-width: 18ch; }
.page-hero .body-lg { color: var(--ink-muted); max-width: 60ch; margin: 0; }

/* Principles */
.principle { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-8) 0; border-top: 1px solid var(--rule); }
.principle:last-child { border-bottom: 1px solid var(--rule); }
.principle .num { font: 500 48px/1 var(--mono); color: var(--tally); font-variant-numeric: tabular-nums; }
.principle h2 { font: 600 28px/34px var(--display); letter-spacing: -0.01em; }
.principle p { color: var(--ink-muted); margin: 0 0 var(--space-3); }
@media (max-width: 900px) { .principle { grid-template-columns: 64px minmax(0, 1fr); } .principle > div:last-child { grid-column: 2; } .principle .num { font-size: 32px; } }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--rule); }
.compare > div { padding: var(--space-6); min-width: 0; }
.compare > div + div { border-left: 1px solid var(--rule); background: var(--paper-raised); }
.compare p { margin: var(--space-3) 0 0; }
@media (max-width: 640px) { .compare { grid-template-columns: minmax(0, 1fr); } .compare > div + div { border-left: 0; border-top: 1px solid var(--rule); } }

/* CTA band */
.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: end; }
@media (max-width: 760px) { .cta-band { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: var(--space-16) 0 var(--space-8); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-grid ul { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--tally-text); text-decoration: underline; }
.footer-mark { width: 40px; height: 40px; margin-bottom: var(--space-4); }
.footer-legal { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); color: var(--ink-muted); font-size: 13px; line-height: 20px; }
.footer-legal p { margin: 0; max-width: 80ch; }
.rec { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.rec::before { content: ""; width: 8px; height: 8px; background: var(--tally); }

/* 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: var(--space-6); padding: var(--space-16) 0; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal .line { opacity: 1; }
  .regmark .hair { stroke-dashoffset: 0 !important; }
  .regmark .anchor { opacity: 1 !important; transform: none !important; }
}
.no-js .reveal .line { opacity: 1; }

/* utilities */
.mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); } .mt-12 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: 0; }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-4 > * + * { margin-top: var(--space-4); }

/* Release tags (neutral, never status colours) */
.tag { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); color: var(--ink-muted); white-space: nowrap; }
.tag--next { border-color: var(--tally-text); color: var(--tally-text); }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--rule); background: var(--paper-raised); font-size: 14px; line-height: 20px; }
.notice p { margin: 0; }
.asset--wide { grid-column: span 2; }
@media (max-width: 640px) { .asset--wide { grid-column: auto; } }

/* Wide diagrams scroll sideways on phones instead of shrinking the text */
.diagram-scroll { overflow-x: auto; }
@media (max-width: 760px) { .diagram-scroll svg { min-width: 760px; } }
