/* =============================================================================
   SharperSunday design system — "The Sunday Desk"
   Source of truth for tokens, type, and the component language shared by the
   Astro site and the static landing page.

   BYTE-IDENTICAL MIRROR. This file exists twice and the two copies must never
   diverge:
       blog-astro/src/styles/system.css   (imported first by global.css)
       public/landing/system.css          (linked before landing.css)
   Parity is enforced by scripts/__tests__/systemCssParity.test.mjs. Edit one,
   copy it over the other, run that test.

   FONT LOADING IS NOT HERE. The Google Fonts <link> lives in the layout head
   (blog-astro PageLayout/HeadBase) and in public/landing/index.html — an
   @import here would serialise the font request behind this stylesheet.

   BREAKPOINTS — exactly three on the whole site. Custom properties cannot
   drive @media, so this banner is the declaration:
       560px   sm   phone to large phone
       860px   md   tablet; compact table layouts turn on at or below this
      1100px   lg   desk grid (7/5, 8/4, 4/8 splits) turns on
   Only prefers-reduced-motion queries are exempt from that list.

   RADII — 0 (tables, stamps, rules), 6px (controls), 14px (panels). Nothing
   else, ever. No drop shadows anywhere. No colour ramps.

   COLOUR RULES (guarded by scripts/checkPalette.mjs)
     - Violet (--accent) is interactive-only: links, buttons, active chips,
       focus rings, the current-row marker. Never a wash, a glow, a colour ramp,
       heading colour, or a border on something you cannot click.
     - Coral (--ai) is the AI talking, or the upgrade moment. Legal only in
       .ai-quote, .verdict-line, .transcript-ai, .pullquote-ai, .stamp-ai,
       .cta-upgrade and .handoff* — plus the :root token block. Scarcity is
       what makes it read as a voice.
     - Surfaces are rules, not boxes. --card is used for exactly two things:
       an interactive tool panel and an AI quote block.
   ========================================================================== */

/* Metric-matched fallback for the display face: keeps the masthead from
   reflowing between the local fallback and Archivo arriving. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial");
  size-adjust: 97%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ---------- Tokens — the ONLY place a hex literal may appear ---------- */
:root {
  /* Palette (mirrors `colors` in app/components/ui/tokens.ts) */
  --bg: #08060f;
  --bg-elevated: #100b20;
  --card: #17121f;
  --card-subtle: #1d1729;
  --border: #241c38;
  --accent: #8b6dff;
  --accent-hover: #a98dff;
  --ai: #d97757;
  --ai-hover: #e08560;
  --muted: #bcb4d2;
  --text: #ffffff;
  --text-dim: #9a93ad;
  --error: #ff6b6b;
  --warn: #ffd54f;
  --success: #5ec46a;

  /* Derived — declared once, referenced as tokens everywhere else */
  --accent-12: rgba(139, 109, 255, 0.12);
  --ai-10: rgba(217, 119, 87, 0.10);
  --rule: var(--border);

  /* Type stacks. Three faces, three jobs: display / data / body. */
  --font-display: "Archivo", "Archivo Fallback", "Arial Narrow", Arial, Helvetica, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Scale */
  --t-display: clamp(44px, 6vw, 72px);
  --t-h2: clamp(30px, 3.6vw, 44px);
  --t-h3: 22px;
  --t-body: 17px;
  --t-small: 14px;
  --t-label: 12px;
  --t-num: 15px;
  --lh-display: 1.02;
  --lh-h2: 1.1;
  --lh-h3: 1.25;
  --lh-body: 1.55;

  /* Measure + rhythm */
  --measure: 68ch;
  --section-pad-x: clamp(20px, 4vw, 56px);
  --section-pad-y: 64px;
  --max-width: 1120px;
  --post-max-width: 720px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-12);
  color: var(--text);
}

main { display: block; }

/* The UA sheet's `[hidden] { display: none }` has the specificity of a plain
   element rule, so ANY class rule that sets `display` beats it — an island
   whose result panel is `.taco-result { display: flex }` renders its empty
   scaffolding (and a live Share button) on bare page load. The islands each
   hide the panel from JS after hydration, which is a flash on a fast machine
   and permanent when JS is off. Make the attribute authoritative once, here,
   so no island has to remember. Toggle visibility with `el.hidden`. */
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
}
h1 {
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: var(--t-display);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
}
h2 {
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.02em;
}
h3 {
  font-variation-settings: "wdth" 100;
  font-weight: 700;
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
}

/* Tabular figures wherever one number is read against another. */
table, .num, .price, .count, .edge { font-variant-numeric: tabular-nums; }

/* ---------- Layout helpers ---------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--section-pad-x);
  padding-right: var(--section-pad-x);
}

.grid-12 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.span-7, .span-5, .span-8, .span-4 { grid-column: auto; min-width: 0; }

@media (min-width: 1100px) {
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .span-7 { grid-column: span 7; }
  .span-5 { grid-column: span 5; }
  .span-8 { grid-column: span 8; }
  .span-4 { grid-column: span 4; }
}

/* ---------- Section rhythm — rules and slugs, never background bands ----- */
/* Vertical longhand ONLY. `.section` is routinely set on the same element as
   `.container` (`<section class="section container">`), and a `padding: <y> 0`
   shorthand there wins the cascade and zeroes .container's --section-pad-x
   gutter — text then sits flush against the phone's edge. Never reintroduce
   the shorthand here or on any class that pairs with .container. */
.section { padding-top: var(--section-pad-y); padding-bottom: var(--section-pad-y); }
@media (min-width: 860px) {
  .section { padding-top: 96px; padding-bottom: 96px; }
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
  width: 100%;
}

.desk-slug {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-weight: 700;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.section-headline {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 14px;
}

.section-sub, .deck {
  color: var(--muted);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  max-width: var(--measure);
  margin: 0 0 28px;
}
.deck { font-size: 19px; }

/* ---------- Ledger — the box score. Every table on the site is one. ------ */
.ledger {
  width: 100%;
  border-collapse: collapse;
  border-radius: 0;
  font-size: var(--t-num);
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.ledger thead th {
  background: var(--card-subtle);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-weight: 700;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.ledger td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  vertical-align: top;
}
.ledger tbody th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
.ledger tbody tr:hover td { background: var(--card); }
.ledger .num, .ledger th.num, .ledger td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.ledger-scroll { width: 100%; overflow-x: auto; }
.ledger-current td:first-child { border-left: 2px solid var(--accent); }

/* Receipts — a 3-6 row label/value ledger, used inside .answer. */
.receipts { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.receipts th {
  width: 34%;
  text-align: left;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-weight: 700;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  vertical-align: top;
}
.receipts td {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  vertical-align: top;
}

/* ---------- Stamps — square, condensed caps; colour carries the verdict -- */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid currentColor;
  border-radius: 0;
  padding: 5px 10px;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-weight: 700;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.stamp-ai { color: var(--ai); }
.stamp-pos { color: var(--success); }
.stamp-neg { color: var(--error); }
.stamp-neutral { color: var(--muted); }

/* ---------- Transcript — a two-voice chat sample ------------------------- */
.transcript { display: flex; flex-direction: column; gap: 18px; }
.transcript-who {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-weight: 700;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.transcript-you {
  color: var(--muted);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  margin: 0;
}
.transcript-ai {
  border-left: 2px solid var(--ai);
  padding-left: 16px;
  color: var(--text);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  margin: 0;
}
.transcript-attr {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 8px 0 0;
}

/* ---------- Pullquote ---------------------------------------------------- */
.pullquote {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 500;
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
  color: var(--text);
  margin: 0;
  max-width: var(--measure);
}
.pullquote-ai {
  border-left: 2px solid var(--ai);
  padding-left: 16px;
}
.pullquote-attr {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 10px 0 0;
}

/* ---------- Generic AI-output blocks ------------------------------------- */
.ai-quote {
  border-left: 2px solid var(--ai);
  background: var(--card);
  border-radius: 14px;
  padding: 18px 20px;
  color: var(--text);
  font-size: var(--t-body);
  line-height: var(--lh-body);
}
.verdict-line {
  border-left: 2px solid var(--ai);
  padding-left: 16px;
  color: var(--text);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  margin: 0;
}

/* ---------- Dateline + provenance — the mono voice of the desk ----------- */
.dateline {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0;
  padding: 10px var(--section-pad-x);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  white-space: nowrap;
}
.dateline-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dateline-item { white-space: nowrap; }
.dateline-sep { color: var(--border); }

.provenance {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 12px 0 0;
}

/* ---------- Answer-first block ------------------------------------------- */
.answer { margin: 0 0 40px; max-width: var(--measure); }
.answer-claim {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 700;
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
  color: var(--text);
  margin: 0 0 12px;
}
.answer-context {
  color: var(--muted);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  margin: 0 0 20px;
}

/* ---------- Tool panel — one of only two --card surfaces ----------------- */
.tool-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-small);
  padding: 11px 12px;
  transition: border-color 120ms ease;
}
.input::placeholder { color: var(--text-dim); }
.input:focus { outline: none; border-color: var(--accent); }

.combobox { position: relative; }
.combobox [role="listbox"] {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.combobox [role="option"] {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: var(--t-small);
  cursor: pointer;
}
.combobox [role="option"][aria-selected="true"],
.combobox [role="option"]:hover {
  background: var(--accent-12);
  color: var(--text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 11px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.chip:hover { color: var(--text); }
.chip-on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-12);
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.stepper button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--t-small);
  padding: 8px 12px;
  cursor: pointer;
}
.stepper button:hover { color: var(--text); background: var(--card-subtle); }
.stepper output, .stepper .stepper-value {
  min-width: 40px;
  text-align: center;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--t-num);
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 8px 4px;
}

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 80;
  font-weight: 700;
  font-size: var(--t-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn-ghost { background: transparent; color: var(--accent); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* The upgrade moment — the only coral button on the site. */
.cta-upgrade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--ai);
  color: var(--bg);
  cursor: pointer;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 80;
  font-weight: 700;
  font-size: var(--t-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease;
}
.cta-upgrade:hover { background: var(--ai-hover); color: var(--bg); }

/* ---------- Hand-off — one conversion panel per tool page ---------------- */
.handoff {
  display: block;
  border-top: 1px solid var(--rule);
  padding: 28px 0 0;
  margin: 48px 0 0;
  max-width: var(--measure);
}
.handoff-knows {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 700;
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
  color: var(--ai);
  margin: 0 0 10px;
}
.handoff-cant {
  color: var(--muted);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  margin: 0 0 20px;
}
.handoff-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--ai);
  color: var(--bg);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 80;
  font-weight: 700;
  font-size: var(--t-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease;
}
.handoff-cta:hover { background: var(--ai-hover); color: var(--bg); }
.handoff-fine {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 14px 0 0;
}

/* ---------- Site nav ----------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px var(--section-pad-x);
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-nav-brand {
  color: var(--text);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-right: auto;
}
.site-nav-brand:hover { color: var(--text); }
/* The mobile menu checkbox is hidden but NEVER display:none below 860px — a
   removed control cannot take focus, and a <label> is not focusable, which left
   the whole burger menu pointer-only. See the ≤860 block. */
.site-nav-toggle { display: none; }
.site-nav-burger { display: none; }
.site-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav-menu > li { position: relative; }
.snav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  font-family: var(--font-body);
  cursor: pointer;
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.snav-link:hover { color: var(--text); }
.snav-caret { font-size: 10px; opacity: 0.8; }
.snav-submenu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 236px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  /* visibility must flip INSTANTLY on open (delay 0) and only wait on close
     (delay 120ms, after the fade) — transitioning it with a duration left the
     submenu computed-hidden while its trigger was focused, which made all 17
     dropdown links unreachable by keyboard (WCAG 2.1.1). */
  transition: opacity 120ms ease, visibility 0s linear 120ms;
  z-index: 30;
}
.snav-group:hover .snav-submenu,
.snav-group:focus-within .snav-submenu {
  opacity: 1;
  visibility: visible;
  transition: opacity 120ms ease, visibility 0s linear 0s;
}
.snav-submenu a {
  display: block;
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.snav-submenu a:hover { color: var(--text); background: var(--bg); }
.snav-cta {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 80;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 120ms ease;
}
.snav-cta:hover { background: var(--accent-hover); color: var(--bg); }

@media (max-width: 860px) {
  /* Visually hidden, still focusable: Tab reaches the checkbox, Space opens the
     menu, and the ring is drawn on the burger label next to it. */
  .site-nav-toggle {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }
  .site-nav-toggle:focus-visible + .site-nav-burger {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .site-nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 9px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--border);
  }
  .site-nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
  }
  .site-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--section-pad-x) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .site-nav-toggle:checked ~ .site-nav-menu { display: flex; }
  .site-nav-menu > li { position: static; width: 100%; }
  .snav-link { width: 100%; padding: 12px 4px; }
  .snav-submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    border: 0;
    background: transparent;
    padding: 0 0 8px 12px;
    min-width: 0;
  }
  .snav-caret { display: none; }
  .snav-cta-item { margin-top: 8px; }
  .snav-cta { display: block; text-align: center; padding: 12px; }
}

/* ---------- Site footer -------------------------------------------------- */
.site-footer, .site-footer.footer {
  margin-top: 96px;
  padding: 48px var(--section-pad-x);
  border-top: 1px solid var(--rule);
}
.site-footer-inner { max-width: var(--max-width); margin: 0 auto; }
.site-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--rule);
  margin: 0 0 32px;
}
.site-footer-cta, .site-footer-cta.footer-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 700;
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
}
.site-footer-cta:hover, .site-footer-cta.footer-demo-link:hover { color: var(--accent-hover); }
.site-footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 24px;
  margin-bottom: 36px;
}
@media (min-width: 860px) {
  .site-footer-cols { grid-template-columns: repeat(4, 1fr); }
}
.site-footer-col { display: flex; flex-direction: column; gap: 10px; }
.site-footer-h {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.site-footer-col a { color: var(--muted); font-size: var(--t-small); font-weight: 500; }
.site-footer-col a:hover { color: var(--text); }
.site-footer-meta, .footer-meta {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 10px;
}
.site-footer-meta a, .footer-meta a { color: var(--text-dim); text-decoration: underline; }
.site-footer-meta a:hover, .footer-meta a:hover { color: var(--accent); }
.site-footer-disclaimer {
  color: var(--muted);
  font-size: var(--t-label);
  font-style: italic;
  margin: 0 0 8px;
}
.site-footer-copy {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
  margin: 0;
}
.site-footer-retrained {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 8px 0 0;
}

/* ---------- Blog front page + post rail ---------------------------------- */
.front-lead {
  display: block;
  padding: 0 0 40px;
  border-bottom: 1px solid var(--rule);
  margin: 0 0 40px;
}
.front-lead-title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: var(--t-display);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 12px 0 14px;
  max-width: 20ch;
}
.front-lead-deck {
  color: var(--muted);
  font-size: 19px;
  line-height: var(--lh-body);
  max-width: var(--measure);
  margin: 0;
}

.front-list { list-style: none; margin: 0; padding: 0; }
.front-list li { border-bottom: 1px solid var(--rule); }
.front-list-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 20px 0;
  color: inherit;
}
@media (min-width: 860px) {
  .front-list-row { grid-template-columns: 132px 1fr; gap: 24px; align-items: baseline; }
}
.front-list-slug {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 72;
  font-weight: 700;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.front-list-title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 700;
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
  color: var(--text);
  margin: 0 0 4px;
}
.front-list-row:hover .front-list-title { color: var(--accent); }
.front-list-desc { color: var(--muted); font-size: var(--t-small); line-height: var(--lh-body); margin: 0; }
.front-list-date {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.post-rail { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 1100px) {
  .post-rail { position: sticky; top: 88px; align-self: start; }
}
.toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  color: var(--text-dim);
  font-size: var(--t-small);
  line-height: 1.4;
}
.toc a:hover { color: var(--accent); }
.toc-h3 a { padding-left: 26px; }

.numbers-box { border-top: 1px solid var(--rule); padding: 16px 0 0; }
.numbers-box-item { border-bottom: 1px solid var(--rule); padding: 0 0 12px; margin: 0 0 12px; }
.numbers-box-value {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 800;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: 0;
}
.numbers-box-label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 4px 0 0;
}
.numbers-box-note { color: var(--muted); font-size: var(--t-small); margin: 6px 0 0; }

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
