  /* ── modernist design-system tokens (verbatim subset) ─────────────── */
  :root {
    --color-bg: #f3f2f2;
    --color-surface: #eae9e9;
    --color-text: #201e1d;
    --color-accent: #ec3013;
    --color-accent-2: #e15b47;
    --color-divider: color-mix(in srgb, #201e1d 40%, transparent);

    --color-neutral-100: #f8f4f4;
    --color-neutral-800: #444141;

    --color-accent-100: #fff2ef;
    --color-accent-600: #dd2b0f;
    --color-accent-700: #ae1800;
    --color-accent-800: #7c1405;

    /* Funk pass: two extra hues on top of the one brand red. Red stays
       primary everywhere (buttons, primary CTAs); yellow/blue are accents —
       rotated on kickers, stats, hover shadows, tags, ::selection.
       Yellow is NEVER used as text on the paper bg (#ffd400 on #f3f2f2 is
       ~1.3:1, fails AA outright) — ink-on-yellow fill only. Blue is tuned
       dark enough to run as text on paper (~8.2:1, comfortably AA).
       Note: this site's palette is deliberately NOT bound by DESIGN-ui.md
       §2's one-red rule — that gate scans src/ui (roost's terminal chrome),
       not docs/. */
    --funk-yellow: #ffd400;
    --funk-blue: #2318e0;

    /* System stacks only — no @font-face, no CDN, so the page makes zero
       external requests (see the self-contained hard constraint). */
    --font-heading: -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --font-heading-weight: 800;
    --font-body: var(--font-heading);
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;

    --radius-md: 0px;

    --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);

    --edge: clamp(20px, 5vw, 72px);

    /* roost's own TUI chrome — ink · paper · one red (DESIGN-ui.md token
       table). Distinct from --color-accent above, which is this site's
       brand red, not the terminal's. */
    --tui-bg: #15120f;
    --tui-fg: #eae5df;
    --tui-mut: #8f8983;
    --tui-dim: #8f8983; /* was #57524b (~2.4:1 on --tui-bg, fails AA at the 10.5–11.5px
                            sizes it's used at) — reuses --tui-mut's value so dim
                            and mut sit at the same, AA-passing (~5.4:1) level */
    --tui-rule: #332f2a;
    --tui-accent: #ff563c;
    --tui-accent-dim: #a83a28;
    --tui-strip: #1b1713;
    --tui-bar: #211d19;
    --tui-ok: #7fae7f;
    --tui-info: #8fb2c9;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; font: 400 15px/1.55 var(--font-body);
    background: var(--color-bg); color: var(--color-text); text-wrap: pretty;
  }
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading); font-weight: var(--font-heading-weight);
    line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
  }
  p { margin: 0 0 var(--space-3); }
  a { color: var(--color-accent); text-underline-offset: 3px; }
  a:hover { color: var(--color-accent-700); }
  :focus { outline: none; }
  :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
  ::selection { background: var(--funk-yellow); color: var(--color-text); }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; text-decoration: none;
    font-family: var(--font-mono); font-weight: var(--font-heading-weight);
    text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 14px; line-height: 1.2; color: var(--color-text);
    background: transparent; border: 1px solid transparent;
    padding: var(--space-2) calc(var(--space-3) * 1.2);
    border-radius: var(--radius-md);
    transition: transform 120ms ease, box-shadow 120ms ease;
  }
  .btn:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--btn-shadow, var(--color-accent)); }
  .btn-primary { background: var(--color-accent); color: var(--color-bg); }
  .btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
  .btn-primary:active { background: var(--color-accent-700); }
  .btn-secondary { border-color: var(--color-divider); }
  .btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
  .btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

  .tag {
    display: inline-flex; align-items: center; font-size: 11px;
    letter-spacing: 0.02em; padding: 3px 10px;
    border-radius: calc(var(--radius-md) * 0.75);
  }
  .tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
  .tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
  .tag-outline { border: 1px solid var(--funk-blue); color: var(--funk-blue); }

  .nav {
    display: flex; align-items: center; gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--color-divider);
  }
  .nav-brand {
    font-family: var(--font-heading); font-weight: var(--font-heading-weight);
    font-size: 18px; margin-right: auto;
  }
  .nav a { color: inherit; text-decoration: none; font-size: 14px; }
  .nav a:hover { color: var(--color-accent); }
  .nav a.btn-primary:hover { color: var(--color-bg); }

  /* ── page ─────────────────────────────────────────────────────────── */

  .kicker {
    display: block; font-family: var(--font-mono); font-weight: 700; font-size: 13px;
    letter-spacing: 0.06em; text-transform: uppercase;
    margin-bottom: 14px;
  }
  .kicker-red { color: var(--color-accent-700); }
  .kicker-blue { color: var(--funk-blue); }
  .kicker-hi { display: inline-block; background: var(--funk-yellow); color: var(--color-text); padding: 2px 10px; }

  .demo-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,300px); min-height: 340px; }
  .demo-side { border: 1px solid var(--tui-rule); display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 12.5px; }

  .stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px 24px; }
  .stat-cell { transition: transform 120ms ease, box-shadow 120ms ease; }
  .stat-cell:hover { transform: translate(-3px,-3px); box-shadow: 6px 6px 0 var(--color-accent); }
  .stat-num {
    font-family: var(--font-mono); font-weight: 800;
    font-size: clamp(34px,3.6vw,52px); color: var(--color-accent);
    margin: 0; letter-spacing: -0.01em;
  }
  .stat-num-blue { color: var(--funk-blue); }
  .stat-label {
    font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
    color: color-mix(in srgb, var(--color-text) 66%, transparent); margin: 12px 0 0;
  }

  .frow {
    display: grid; grid-template-columns: minmax(56px,120px) minmax(0,360px) minmax(0,1fr);
    gap: 24px clamp(24px,4vw,64px); align-items: start;
    padding: 32px 0; border-top: 2px solid var(--color-divider);
  }
  .frow:last-child { border-bottom: 2px solid var(--color-divider); }
  .frow-mark { display: flex; flex-direction: column; gap: 12px; }
  .frow-num { font-family: var(--font-mono); font-weight: 800; font-size: 15px; margin: 0; font-feature-settings: 'tnum' 1; }
  .frow h3 { font-family: var(--font-mono); font-weight: 800; font-size: clamp(22px,2vw,26px); letter-spacing: -0.01em; margin: 0; }
  .frow-body { font-size: 16px; line-height: 1.65; margin: 0; color: color-mix(in srgb, var(--color-text) 78%, transparent); max-width: 56ch; }

  .icon { color: color-mix(in srgb, var(--color-text) 55%, transparent); flex-shrink: 0; }

  .compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--color-text); }
  .compare-left { padding: 28px; border-right: 2px solid var(--color-text); }
  .how-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(24px,4vw,56px); margin-top: 44px; align-items: start; }

  .keys-grid {
    display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 0;
    border-top: 2px solid var(--color-text); border-left: 2px solid var(--color-text);
  }
  .keycell {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    border-right: 2px solid var(--color-text); border-bottom: 2px solid var(--color-text);
  }
  .keycell kbd {
    font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
    background: var(--color-surface); border: 1px solid var(--color-divider);
    padding: 5px 9px; white-space: nowrap;
  }
  .keycell span { font-size: 14.5px; }

  /* ── funk pass additions ──────────────────────────────────────────── */
  @keyframes cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
  .cursor-blink { display: inline-block; animation: cursor-blink 1s steps(1) infinite; }

  .adapter-card, .install-card { transition: transform 120ms ease, box-shadow 120ms ease; position: relative; }
  .adapter-card:hover { transform: translate(-3px,-3px); box-shadow: 6px 6px 0 var(--funk-yellow); z-index: 1; }
  .install-card { border: 2px solid var(--color-text); padding: 16px; }
  .install-card:hover { transform: translate(-3px,-3px); box-shadow: 6px 6px 0 var(--funk-blue); z-index: 1; }

  /* resurrection toggle — two real radios drive it via sibling selectors,
     so the state swap works with CSS only (no JS dependency) */
  .seg-input {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .seg {
    display: inline-flex; border: 2px solid var(--color-text);
    font-family: var(--font-mono); font-weight: 700; font-size: 13px;
    letter-spacing: 0.04em; text-transform: uppercase;
  }
  .seg-label { display: flex; align-items: center; padding: 11px 18px; cursor: pointer; user-select: none; color: var(--color-text); }
  .seg-label:not(:first-of-type) { border-left: 2px solid var(--color-text); }
  /* the two radios sit flat inside .resurrect, as siblings of both .seg-row (the
     visible control) and .resurrect-window — so one :checked state can reach
     sideways into both via plain sibling + descendant selectors, no JS, no :has() */
  #r-quit:checked ~ .seg-row label[for="r-quit"],
  #r-roost:checked ~ .seg-row label[for="r-roost"] { background: var(--color-accent); color: var(--color-bg); }
  #r-quit:focus-visible ~ .seg-row label[for="r-quit"],
  #r-roost:focus-visible ~ .seg-row label[for="r-roost"] { outline: 2px solid var(--funk-blue); outline-offset: 2px; }

  .resurrect-body-quit { display: none; }
  #r-quit:checked ~ .resurrect-window .resurrect-body-roost { display: none; }
  #r-quit:checked ~ .resurrect-window .resurrect-body-quit { display: block; }

  /* ── mascot ───────────────────────────────────────────────────────── */
  /* square 150-unit viewBox at 1:1 px, feet line 115 units below the crop top:
     top = -(115/150 × width) puts the feet on the demo window's top edge */
  .demo-bird { position: absolute; top: -115px; right: 36px; width: 150px; height: auto; pointer-events: none; }

  /* resting pose is already slightly settled (0.985); breathing dips further (0.955) */
  @keyframes bird-breathe {
    0%, 100% { transform: scaleY(0.985); }
    50% { transform: scaleY(0.955); }
  }
  @keyframes bird-blink {
    0%, 94%, 100% { transform: scaleY(1); }
    97% { transform: scaleY(0.12); }
  }
  .bird-breathe { transform-box: fill-box; transform-origin: 50% 100%; animation: bird-breathe 3s ease-in-out infinite; }
  .bird-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: bird-blink 4s ease-in-out infinite; }

  @media (max-width: 760px) {
    .demo-bird { top: -77px; right: 16px; width: 100px; }
    /* keep the wrapped seg-row caption out of the bird's perch lane (100px + 16px right + breath) */
    .seg-row { padding-right: 124px; }
    .nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav-brand, .nav > a { flex-shrink: 0; }
    .demo-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2,1fr); }
    .frow { grid-template-columns: 1fr; gap: 10px; }
    .compare { grid-template-columns: 1fr; }
    .compare-left { border-right: 0; border-bottom: 2px solid var(--color-text); }
    .how-grid { grid-template-columns: minmax(0,1fr); }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; }
    * { transition: none !important; }
  }
