/* =========================================================================
   BuildForPeople on Astryx Neutral.

   Astryx is Meta's open source design system (github.com/meta/astryx).
   Its components are React, and this site is Go templates, so the site
   takes what does not need React: the Neutral theme's tokens (colour roles,
   radius, shadow, motion, Figtree type) and the way its components look
   (pill buttons, segmented controls, tonal badges, quiet cards).

   Loaded after site.css and fusion.css. It sets the Astryx tokens, points
   the --f-* Fusion tokens at them, and restyles the shared components.
   Removing the <link> brings the Fusion look back unchanged.

   Token values from @astryxdesign/theme-neutral 0.7.16:
   Copyright (c) Meta Platforms, Inc. and affiliates. MIT License.
   Figtree: SIL Open Font License 1.1, see fonts/figtree/figtree.LICENSE.txt.
   Dark mode is a slate ramp, not black: the page at #181c24, cards at
   #212733 and raised fills at #2a3140, so each layer reads as a step up.
   The accent is the gold of the logo's dot (#f1b82d) in both modes.
   ========================================================================= */

@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 400;
  src: url("/static/fonts/figtree/figtree-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 400;
  src: url("/static/fonts/figtree/figtree-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 500;
  src: url("/static/fonts/figtree/figtree-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 500;
  src: url("/static/fonts/figtree/figtree-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 600;
  src: url("/static/fonts/figtree/figtree-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 600;
  src: url("/static/fonts/figtree/figtree-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 700;
  src: url("/static/fonts/figtree/figtree-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: fallback; font-weight: 700;
  src: url("/static/fonts/figtree/figtree-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- Astryx tokens --------------------------------------------------------
   Light values are Neutral's light values. The dark block is used for the
   system setting and for data-theme="dark" (and the old "black"). */
:root {
  --color-background-body:    #f4f5f7;
  --color-background-surface: #ffffff;
  --color-background-card:    #ffffff;
  --color-background-popover: #ffffff;
  --color-background-muted:   #e9ebef;
  --color-accent:             #1b1b1b;
  --color-accent-muted:       #d4d4d4;
  --color-on-accent:          #ffffff;
  --color-brand:              #f1b82d;
  --color-on-brand:           #17140d;
  --color-neutral:            #0000000f;
  --color-overlay-hover:      #0000000d;
  --color-overlay-pressed:    #0000001a;
  --color-text-primary:       #0e1116;
  --color-text-secondary:     #4a5160;
  --color-text-disabled:      #919191;
  --color-text-info:          #1f5fd1;
  --color-info:               #1f5fd1;
  --color-info-muted:         #b9d7ff;
  --color-border:             #dadde3;
  --color-border-emphasized:  #b9bec8;
  --color-success:            #198100;
  --color-error:              #c9303a;
  --color-text-success:       #2f7d33;
  --color-text-warning:       #836700;
  --color-text-error:         #c0262c;
  --color-background-green:   #bce0bb;  --color-text-green:  #00490b;
  --color-background-yellow:  #fae19e;  --color-text-yellow: #4b3900;
  --color-background-blue:    #b9d7ff;  --color-text-blue:   #003978;
  --color-background-purple:  #f7d5ff;  --color-text-purple: #5c0e6c;
  --color-background-teal:    #a9e2d6;  --color-text-teal:   #00463d;
  --color-background-orange:  #ffc7a1;  --color-text-orange: #622700;
  --color-background-pink:    #ffc0d7;  --color-text-pink:   #70003f;
  --color-background-red:     #ffc4be;  --color-text-red:    #76000c;
  --color-background-gray:    #e2e2e2;  --color-text-gray:   #1b1b1b;
  --color-glass:              rgba(255, 255, 255, .78);

  --radius-inner:     .375rem;
  --radius-element:   .625rem;
  --radius-container: .75rem;
  --radius-page:      1.75rem;
  --radius-full:      9999px;

  --shadow-low:  0 2px 4px oklch(0 0 0 / 5%), 0 4px 8px oklch(0 0 0 / 10%);
  --shadow-med:  0 2px 4px oklch(0 0 0 / 5%), 0 4px 12px oklch(0 0 0 / 10%);
  --shadow-high: 0 4px 6px oklch(0 0 0 / 10%), 0 12px 24px oklch(0 0 0 / 15%);
  --shadow-inset-selected: inset 0 0 0 2px #0074e280;

  --motion-fast:   125ms;
  --motion-medium: 300ms;
  --ease: cubic-bezier(.2, 0, 0, 1);

  --font-figtree: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --size-element-md: 40px;
  --tile-ring: none;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-background-body:    #181c24;
    --color-background-surface: #2a3140;
    --color-background-card:    #212733;
    --color-background-popover: #2a3140;
    --color-background-muted:   #2a3140;
    --color-accent:             #f1f1f1;
    --color-accent-muted:       #4a4a4a;
    --color-on-accent:          #1b1b1b;
    --color-neutral:            #ffffff1a;
    --color-overlay-hover:      #ffffff0d;
    --color-overlay-pressed:    #ffffff1a;
    --color-text-primary:       #edf0f5;
    --color-text-secondary:     #c0c8d6;
    --color-text-disabled:      #6b6b6b;
    --color-text-info:          #8ab4ff;
    --color-info:               #6d9cfe;
    --color-info-muted:         #88bcff3d;
    --color-border:             #ffffff1a;
    --color-border-emphasized:  #4a556b;
    --color-success:            #64af4c;
    --color-error:              #ff705d;
    --color-text-success:       #90ca90;
    --color-text-warning:       #eec448;
    --color-text-error:         #ffaea7;
    --color-background-green:   #2b422b;  --color-text-green:  #90ca90;
    --color-background-yellow:  #453a1c;  --color-text-yellow: #eec448;
    --color-background-blue:    #253c5a;  --color-text-blue:   #a1caff;
    --color-background-purple:  #4a2f51;  --color-text-purple: #eaacf8;
    --color-background-teal:    #28413c;  --color-text-teal:   #90d7c8;
    --color-background-orange:  #503424;  --color-text-orange: #ffb37e;
    --color-background-pink:    #572b3d;  --color-text-pink:   #ffa9ca;
    --color-background-red:     #5b2b28;  --color-text-red:    #ffaea7;
    --color-background-gray:    #343c4d;  --color-text-gray:   #d4d4d4;
    --color-glass:              rgba(24, 28, 36, .82);
    --tile-ring: inset 0 0 0 1px #ffffff1a;
    --shadow-low:  0 2px 4px oklch(0 0 0 / 25%), 0 4px 8px oklch(0 0 0 / 40%), inset 0 0 0 1px oklch(1 0 0 / 8%);
    --shadow-med:  0 2px 4px oklch(0 0 0 / 35%), 0 4px 12px oklch(0 0 0 / 50%), inset 0 0 0 1px oklch(1 0 0 / 12%);
    --shadow-high: 0 4px 6px oklch(0 0 0 / 50%), 0 12px 24px oklch(0 0 0 / 70%), inset 0 0 0 1px oklch(1 0 0 / 15%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"],
:root[data-theme="black"] {
  --color-background-body:    #181c24;
  --color-background-surface: #2a3140;
  --color-background-card:    #212733;
  --color-background-popover: #2a3140;
  --color-background-muted:   #2a3140;
  --color-accent:             #f1f1f1;
  --color-accent-muted:       #4a4a4a;
  --color-on-accent:          #1b1b1b;
  --color-neutral:            #ffffff1a;
  --color-overlay-hover:      #ffffff0d;
  --color-overlay-pressed:    #ffffff1a;
  --color-text-primary:       #edf0f5;
  --color-text-secondary:     #c0c8d6;
  --color-text-disabled:      #6b6b6b;
  --color-text-info:          #8ab4ff;
  --color-info:               #6d9cfe;
  --color-info-muted:         #88bcff3d;
  --color-border:             #ffffff1a;
  --color-border-emphasized:  #4a556b;
  --color-success:            #64af4c;
  --color-error:              #ff705d;
  --color-text-success:       #90ca90;
  --color-text-warning:       #eec448;
  --color-text-error:         #ffaea7;
  --color-background-green:   #2b422b;  --color-text-green:  #90ca90;
  --color-background-yellow:  #453a1c;  --color-text-yellow: #eec448;
  --color-background-blue:    #253c5a;  --color-text-blue:   #a1caff;
  --color-background-purple:  #4a2f51;  --color-text-purple: #eaacf8;
  --color-background-teal:    #28413c;  --color-text-teal:   #90d7c8;
  --color-background-orange:  #503424;  --color-text-orange: #ffb37e;
  --color-background-pink:    #572b3d;  --color-text-pink:   #ffa9ca;
  --color-background-red:     #5b2b28;  --color-text-red:    #ffaea7;
  --color-background-gray:    #343c4d;  --color-text-gray:   #d4d4d4;
  --color-glass:              rgba(24, 28, 36, .82);
  --tile-ring: inset 0 0 0 1px #ffffff1a;
  --shadow-low:  0 2px 4px oklch(0 0 0 / 25%), 0 4px 8px oklch(0 0 0 / 40%), inset 0 0 0 1px oklch(1 0 0 / 8%);
  --shadow-med:  0 2px 4px oklch(0 0 0 / 35%), 0 4px 12px oklch(0 0 0 / 50%), inset 0 0 0 1px oklch(1 0 0 / 12%);
  --shadow-high: 0 4px 6px oklch(0 0 0 / 50%), 0 12px 24px oklch(0 0 0 / 70%), inset 0 0 0 1px oklch(1 0 0 / 15%);
  color-scheme: dark;
}

/* ---- Fusion and site.css tokens, pointed at Astryx ------------------------
   The accent is Neutral's: near-black in light, near-white in dark, the
   way Meta's own pages draw their main button. Links are Neutral's info
   blue. The product colours stay for product pages and tiles, taken from
   Neutral's categorical text roles so they read in both modes. */
:root, :root[data-theme] {
  --f-bg:        var(--color-background-body);
  --f-surface:   var(--color-background-card);
  --f-surface2:  var(--color-background-muted);
  --f-line:      var(--color-border);
  --f-ink:       var(--color-text-primary);
  --f-sub:       var(--color-text-secondary);
  --f-glass:     var(--color-glass);
  --f-violet:    var(--color-accent);
  --f-on-accent: var(--color-on-accent);
  --f-cyan:      var(--color-text-blue);
  --f-lime:      var(--color-text-green);
  --f-coral:     var(--color-text-orange);
  --f-amber:     var(--color-text-yellow);
  --f-magenta:   var(--color-text-pink);
  --f-ok:        var(--color-text-success);
  --f-bad:       var(--color-text-error);
  --f-shadow:    var(--shadow-low);
  --f-tint:      10%;
  --f-glow:      6%;

  --accent-deep: var(--color-text-info);
  --accent-soft: var(--color-neutral);
  --accent-hair: color-mix(in srgb, var(--color-info) 45%, transparent);
  --ok-soft:     var(--color-background-green);
  --warn:        var(--color-text-yellow);
  --warn-soft:   var(--color-background-yellow);
  --bad-soft:    var(--color-background-red);
  --dim-soft:    var(--color-background-gray);
  --line-soft:   var(--color-border);
  --serif: var(--font-figtree);
  --sans:  var(--font-figtree);
  --radius:    var(--radius-page);
  --radius-sm: var(--radius-container);
  --shadow:    var(--shadow-med);
  --gap:       16px;
}

/* ---- Type: Figtree for everything but code ------------------------------ */
body {
  font-family: var(--font-figtree); font-size: 1rem; line-height: 1.6;
  /* Figtree's x-height is 0.5 of the em (OS/2 sxHeight 500 of 1000), so a
     fallback font is scaled to match while Figtree loads. A number, since
     from-font reads the first available font, which is the fallback then. */
  font-size-adjust: 0.5;
  font-feature-settings: normal; color: var(--color-text-primary);
  background: var(--color-background-body);
}
code, kbd, pre, samp, [lang="bn"] { font-size-adjust: none; }
h1, h2, h3, h4 { font-family: var(--font-figtree); font-weight: 700; letter-spacing: -0.02em; color: var(--color-text-primary); }
h1 { font-size: clamp(2.25rem, 5.4vw, 3.75rem); line-height: 1.06; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.lead, .hero .lead { color: var(--color-text-secondary); }
a { color: var(--color-text-info); text-underline-offset: 3px; }
.em { color: var(--color-text-info); }
::selection { background: var(--color-info-muted); }
:focus-visible { outline: 2px solid var(--color-info); outline-offset: 2px; border-radius: var(--radius-inner); }

/* Eyebrows and kickers: a short label in the body font, no rule, no mono. */
.hero .eyebrow, .kicker {
  font-family: var(--font-figtree); font-size: .875rem; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: var(--color-text-secondary); gap: 8px;
}
.hero .eyebrow::before, .kicker::before { display: none; }
.card .kicker { color: var(--color-text-secondary); }

/* ---- Header: a glass bar with pill tabs ---------------------------------- */
header.top {
  background: var(--color-glass); border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
}
.brand { font-family: var(--font-figtree); font-weight: 700; letter-spacing: -0.02em; }
nav.links a, .navbtn, .navmenu > .navmenu-btn {
  color: var(--color-text-primary); font-weight: 500; border-radius: var(--radius-full);
  padding: 8px 14px; transition: background-color var(--motion-fast) var(--ease);
}
nav.links a:hover, .navbtn:hover, .navmenu > .navmenu-btn:hover { background: var(--color-overlay-hover); color: var(--color-text-primary); }
nav.links a[aria-current="page"], .navmenu > .navmenu-btn.is-current {
  background: var(--color-neutral); color: var(--color-text-primary); font-weight: 600;
}
.navmenu-list {
  border-radius: var(--radius-container); border: 1px solid var(--color-border);
  background: var(--color-background-popover); box-shadow: var(--shadow-high); padding: 6px;
}
.navmenu-list a { border-radius: var(--radius-element); }

/* The theme switch is an Astryx segmented control: a tinted track and a
   raised selected item. */
.js .theme-switch {
  padding: 4px; gap: 0; border: 0; border-radius: var(--radius-full);
  background: var(--color-neutral);
}
.theme-switch button { min-height: 28px; padding: 0 12px; color: var(--color-text-secondary); font-weight: 600; }
.theme-switch button:hover { color: var(--color-text-primary); }
.theme-switch button[aria-pressed="true"] {
  background: var(--color-background-card); color: var(--color-text-primary); box-shadow: var(--shadow-low);
}

/* The same segmented control, made of links: the Project | Article switch on
   /submit and the admin tabs. The current page is raised and bold, so it is
   not marked by colour alone. */
.seg-links {
  display: inline-flex; flex-wrap: wrap; gap: 0; padding: 4px; margin: 12px 0 20px;
  border-radius: var(--radius-full); background: var(--color-neutral);
}
.seg-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
  border-radius: var(--radius-full); color: var(--color-text-secondary); font-weight: 600; text-decoration: none;
}
.seg-links a:hover { color: var(--color-text-primary); }
.seg-links a:focus-visible { outline: 2px solid var(--color-info); outline-offset: 2px; }
.seg-links a[aria-current="page"] {
  background: var(--color-background-card); color: var(--color-text-primary); box-shadow: var(--shadow-low); font-weight: 700;
}

/* Admin overview counts and fact lists. */
.admin-stats, .admin-facts { display: grid; gap: 12px; margin: 8px 0 0; }
.admin-stats { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.admin-stats > div, .admin-facts > div {
  padding: 14px 16px; border-radius: var(--radius-container); background: var(--color-background-muted);
}
.admin-stats dt, .admin-facts dt { font-size: .875rem; color: var(--color-text-secondary); }
.admin-stats dd { margin: 4px 0 0; font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.admin-facts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.admin-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.admin-events, .admin-list { margin: 8px 0 24px; padding-left: 1.2em; display: grid; gap: 6px; }
.admin-events time { font-variant-numeric: tabular-nums; color: var(--color-text-secondary); }
.table-wrap[tabindex="0"]:focus-visible { outline: 2px solid var(--color-info); outline-offset: 2px; }
.note-text { white-space: pre-line; }

/* Admin projects: a search row, then the table in a bounded box with a
   sticky header on wide screens. Phones keep the page-length table they
   have always had. */
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 14px; }
.admin-toolbar input[type="search"] { flex: 1 1 220px; width: auto; min-width: 0; }
.admin-toolbar select { flex: 0 0 auto; width: auto; }
.admin-toolbar p { margin: 0; flex: 1 0 100%; font-size: .875rem; }
@media (min-width: 52rem) {
  .admin-toolbar p { flex: 0 0 auto; margin-inline-start: auto; }
  .project-box { max-block-size: min(70vh, 720px); overflow: auto; overscroll-behavior: contain; }
  .project-box thead th { position: sticky; inset-block-start: 0; z-index: 1; }
}
.art-add { margin-top: 4px; }

/* ---- Page surfaces: big rounded white tiles on a grey page -------------- */
main > .band > .wrap,
main > section > .wrap,
.pp > section:not(.pp-stage):not(.stat-strip) > .wrap,
.project-layout > .md,
footer .wrap.foot,
.pp > .pp-stage {
  background: var(--color-background-card); border: 0; box-shadow: var(--tile-ring);
  border-radius: var(--radius-page);
}
main > .band.tint > .wrap { background: var(--color-background-card); }
main > .band.hero-split > .wrap, main > .project-body > .wrap.project-layout { background: transparent; box-shadow: none; }

/* Heroes: the plain card with one soft blue light in the corner. */
main > .band.hero > .wrap, .hero-copy {
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--color-info) 12%, transparent) 0, transparent 70%),
    var(--color-background-card);
}
.hero-copy { border: 0; box-shadow: var(--tile-ring); border-radius: var(--radius-page); }
.ledger { border: 0; box-shadow: var(--tile-ring); border-radius: var(--radius-page); background: var(--color-background-card); }
.ledger-name { font-family: var(--font-figtree); font-weight: 600; }
.ledger-row a:hover, .ledger-row a:focus-visible { background: var(--color-overlay-hover); }
.ledger-cap { letter-spacing: 0; text-transform: none; font-size: .875rem; font-weight: 600; color: var(--color-text-secondary); }

/* ---- Cards: quiet grey cards inside the white tiles ---------------------
   One look for every card, no colour cycle, so the content leads. */
.card, .ref-card, .price-card, .support-card {
  --tone: var(--color-info);
  background: var(--color-background-muted); border: 0; border-radius: var(--radius-container);
  box-shadow: none;
  transition: background-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease);
}
.grid > :nth-child(n), .ref-grid > :nth-child(n), .price-grid > :nth-child(n) { --tone: var(--color-info); }
.card:has(a.stretch:hover), .project-card:hover {
  border-color: transparent; transform: none;
  background: var(--color-background-card); box-shadow: var(--shadow-med);
}
.icon { border-radius: var(--radius-container); }
.icon.mono { background: var(--color-background-gray); color: var(--color-text-gray); }

.spotlight, .spotlight:nth-child(n) {
  border: 0; border-radius: var(--radius-container); background: var(--color-background-muted);
}
.spot-dot.is-on::after { background: var(--color-accent); }
.promo { border: 0; border-radius: var(--radius-container); background: var(--color-background-muted); }
.promo::before { opacity: .22; }
.promo:hover { box-shadow: var(--shadow-med); }

.research-list a {
  border: 0; border-radius: var(--radius-container); background: var(--color-background-muted);
  color: var(--color-text-primary);
}
.research-list a:hover { background: var(--color-background-card); box-shadow: var(--shadow-med); }
.research-list .venue { font-family: var(--font-figtree); font-weight: 600; color: var(--color-text-info); }
.articles-cluster .section-head h2 { color: var(--color-text-primary); }

/* ---- Buttons: Astryx pills ------------------------------------------------
   Primary is the accent fill. Secondary is the translucent neutral fill
   with no border. Hover and press lay an overlay on top. */
.btn {
  min-height: var(--size-element-md); padding: 0 18px; border: 0; border-radius: var(--radius-full);
  background: var(--color-neutral); color: var(--color-text-primary);
  font-family: var(--font-figtree); font-weight: 600; font-size: .95rem;
  box-shadow: none; transform: none;
  transition: background-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}
.btn:hover { background: color-mix(in srgb, var(--color-text-primary) 12%, transparent); box-shadow: none; transform: none; color: var(--color-text-primary); }
.btn:active { background: color-mix(in srgb, var(--color-text-primary) 18%, transparent); }
.btn.primary { background: var(--color-accent); color: var(--color-on-accent); border: 0; }
.btn.primary:hover { background: color-mix(in srgb, var(--color-accent) 86%, var(--color-background-body)); color: var(--color-on-accent); }
.btn.danger { background: var(--color-background-red); color: var(--color-text-red); }
.btn.danger:hover { background: var(--color-error); color: #fff; }
.btn:hover .arrow { transform: translateX(2px); }
.pp .btn.pp-ghost, .pp .btn.pp-ghost:hover { border: 0; background: var(--color-neutral); color: var(--color-text-primary); }

/* ---- Badges and chips ------------------------------------------------------ */
.badge {
  font-family: var(--font-figtree); font-size: .75rem; font-weight: 600; letter-spacing: 0;
  text-transform: none; padding: 2px 8px; border-radius: var(--radius-inner);
  background: var(--color-background-gray); color: var(--color-text-gray);
}
.badge.plain { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border-emphasized); color: var(--color-text-secondary); }
.badge.status-live { background: var(--color-background-green); color: var(--color-text-green); }
.badge.status-beta { background: var(--color-background-yellow); color: var(--color-text-yellow); }
.badge.status-building, .badge.honorary { background: var(--color-background-blue); color: var(--color-text-blue); }
.badge.status-archived { background: var(--color-background-gray); color: var(--color-text-secondary); }
.pp-badges li, .pp-stage .badge { border: 0; background: var(--color-neutral); color: var(--color-text-primary); }

.chip {
  border: 0; background: var(--color-neutral); color: var(--color-text-primary);
  padding: 5px 13px; font-weight: 500;
}
.chip:hover { background: color-mix(in srgb, var(--color-text-primary) 12%, transparent); color: var(--color-text-primary); }
.chip.on { background: var(--color-accent); color: var(--color-on-accent); }
.chip.on .count { color: var(--color-on-accent); opacity: .75; }

/* ---- Forms: Astryx fields --------------------------------------------- */
input, select, textarea {
  border: 1px solid var(--color-border-emphasized); border-radius: var(--radius-element);
  background: var(--color-background-card); color: var(--color-text-primary);
  font-family: var(--font-figtree);
}
input:not([type="checkbox"], [type="radio"]):focus, select:focus, textarea:focus {
  border-color: var(--color-info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-info) 28%, transparent);
}
.field label, .field legend { font-weight: 600; }
.hint-fix { color: var(--color-text-info); }

/* ---- Project facts ----------------------------------------------------- */
.facts { border-radius: var(--radius-page); background: var(--color-background-card); padding: 10px 24px; box-shadow: var(--tile-ring); }
.facts dt { font-family: var(--font-figtree); letter-spacing: 0; text-transform: none; font-size: .8rem; color: var(--color-text-secondary); }

/* ---- Footer -------------------------------------------------------------- */
footer .foot-d .foot-brand { font-family: var(--font-figtree); }
footer .foot-h { font-family: var(--font-figtree); font-weight: 600; font-size: .875rem; letter-spacing: 0; }
footer .foot-cols div:nth-child(n) .foot-h { color: var(--color-text-secondary); }
footer .foot-cols a { text-decoration: none; color: var(--color-text-primary); }
footer .foot-cols a:hover { text-decoration: underline; }
footer .foot-legal { font-family: var(--font-figtree); }

/* ---- Odds and ends --------------------------------------------------------- */
.nav-toggle { font-family: var(--font-figtree); }
@media (max-width: 720px) {
  .js .nav-toggle { border: 0; background: var(--color-neutral); }
}
dialog.lightbox { border-radius: var(--radius-page); box-shadow: var(--shadow-high); }
.lb-btn { border: 0; border-radius: var(--radius-full); background: var(--color-neutral); }
.code-copy { border-radius: var(--radius-full); }
.readme-figures img { border-radius: var(--radius-container); border-color: var(--color-border); }
.article-cover img { border-radius: var(--radius-container); }

@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .card, nav.links a { transition: none; }
}

/* Tags whose page is not indexed show as plain labels, not links. */
span.chip, span.chip:hover { cursor: default; background: var(--color-neutral); color: var(--color-text-secondary); }

/* The paper a research article explains: venue, title, IEEE Xplore and DOI. */
.paper-card {
  margin: 1.25rem 0 0; padding: 1rem 1.25rem; max-width: 46rem;
  background: var(--color-background-muted); border-radius: var(--radius-container);
}
.paper-card p { margin: 0; }
.paper-kicker { font-size: .8125rem; font-weight: 600; color: var(--color-text-secondary); }
.paper-title { margin-top: .25rem !important; font-weight: 600; color: var(--color-text-primary); line-height: 1.35; }
.paper-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem !important; }
.paper-doi { margin-top: .625rem !important; font-size: .8125rem; color: var(--color-text-secondary); }
.paper-doi a { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* ---- Articles: each topic has an icon and a colour, together -------------
   The icon tells topics apart. The colour is the same tonal pair everywhere
   the topic appears (the topic list, section headings, latest cards, reading
   lists, a guide's checklist), as a small tile behind the icon, so every page
   uses colour the same way. Large surfaces stay neutral. */
.is-guide[data-cluster="video"], .art-index[data-cluster="video"], .art-topics [data-cluster="video"] { --c-fg: var(--color-text-orange); --c-bg: var(--color-background-orange); }
.is-guide[data-cluster="research"], .art-index[data-cluster="research"], .art-topics [data-cluster="research"] { --c-fg: var(--color-text-blue); --c-bg: var(--color-background-blue); }
.is-guide[data-cluster="tools"], .art-index[data-cluster="tools"], .art-topics [data-cluster="tools"] { --c-fg: var(--color-text-purple); --c-bg: var(--color-background-purple); }
.is-guide[data-cluster="ai"], .art-index[data-cluster="ai"], .art-topics [data-cluster="ai"] { --c-fg: var(--color-text-teal); --c-bg: var(--color-background-teal); }
.is-guide[data-cluster="security"], .art-index[data-cluster="security"], .art-topics [data-cluster="security"] { --c-fg: var(--color-text-green); --c-bg: var(--color-background-green); }
.is-guide[data-cluster="building"], .art-index[data-cluster="building"], .art-topics [data-cluster="building"] { --c-fg: var(--color-text-yellow); --c-bg: var(--color-background-yellow); }
.is-guide[data-cluster="social"], .art-index[data-cluster="social"], .art-topics [data-cluster="social"] { --c-fg: var(--color-text-pink); --c-bg: var(--color-background-pink); }
.is-guide[data-cluster="video"], .art-index[data-cluster="video"], .art-topics [data-cluster="video"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='3'/><path d='M10 9.5v5l4.5-2.5z'/></svg>"); }
.is-guide[data-cluster="research"], .art-index[data-cluster="research"], .art-topics [data-cluster="research"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 3h7l4 4v14H7z'/><path d='M14 3v4h4M10 12h5M10 16h5'/></svg>"); }
.is-guide[data-cluster="tools"], .art-index[data-cluster="tools"], .art-topics [data-cluster="tools"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a4 4 0 0 0-5.4 5.4L4 17v3h3l5.3-5.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z'/></svg>"); }
.is-guide[data-cluster="ai"], .art-index[data-cluster="ai"], .art-topics [data-cluster="ai"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='7' y='7' width='10' height='10' rx='2'/><path d='M10 3v4M14 3v4M10 17v4M14 17v4M3 10h4M3 14h4M17 10h4M17 14h4'/></svg>"); }
.is-guide[data-cluster="security"], .art-index[data-cluster="security"], .art-topics [data-cluster="security"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6z'/><path d='M9 12l2 2 4-4'/></svg>"); }
.is-guide[data-cluster="building"], .art-index[data-cluster="building"], .art-topics [data-cluster="building"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='6' cy='5' r='2'/><circle cx='6' cy='19' r='2'/><circle cx='18' cy='7' r='2'/><path d='M6 7v10M18 9c0 5-7 4-11 8'/></svg>"); }
.is-guide[data-cluster="social"], .art-index[data-cluster="social"], .art-topics [data-cluster="social"] { --c-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='8' r='3'/><path d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/><circle cx='17' cy='9' r='2.5'/><path d='M16 14.1c2.8.4 5 2.8 5 5.9'/></svg>"); }

.art-swatch {
  display: inline-grid; place-items: center; flex: none; vertical-align: -.42em;
  width: 1.7em; height: 1.7em; margin-right: .5em; border-radius: .45em;
  background: var(--c-bg);
}
.art-swatch::before {
  content: ""; width: 1.05em; height: 1.05em; background: var(--c-fg);
  mask: var(--c-icon) center / contain no-repeat;
}
@media (forced-colors: active) {
  .art-swatch { background: Canvas; outline: 1px solid CanvasText; }
  .art-swatch::before { background: CanvasText; }
}
.articles-cluster { scroll-margin-top: 72px; }

/* Hero: the topic list, neutral pills with the topic swatch. */
.art-topics {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.art-topics li { flex: 0 1 auto; min-width: 150px; }
.art-topics a {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 14px 16px 13px; border-radius: var(--radius-container);
  background: var(--color-background-muted); color: var(--color-text-primary); text-decoration: none;
  transition: box-shadow var(--motion-fast) var(--ease), background-color var(--motion-fast) var(--ease);
}
.art-topics a:hover { background: var(--color-background-card); box-shadow: var(--shadow-med); }
.art-topics a:focus-visible { outline: 2px solid var(--color-text-primary); outline-offset: 3px; }
.art-topic-name { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.art-topic-count { font-size: .875rem; color: var(--color-text-secondary); padding-left: 2.2rem; }

/* Cards keep the site's card look. The "Start here" pillar is set apart by
   size, an outline and its label, not by a fill. */
.articles-cluster .card.is-pillar { box-shadow: inset 0 0 0 1px var(--color-border-emphasized); }
.articles-cluster .card.is-pillar:has(a.stretch:hover) { box-shadow: var(--shadow-med), inset 0 0 0 1px var(--color-border-emphasized); }
.articles-cluster .card.is-pillar .kicker { color: var(--c-fg); font-weight: 600; }
.articles-cluster .card.is-pillar .card-title { font-size: 1.3rem; }
@media (min-width: 820px) {
  .articles-cluster .card.is-pillar { grid-column: span 2; }
}

/* The site's text tokens resolve on :root, so the dimmer dark values are
   set again here, together with the tokens built from them. */
.art-index {
  --f-ink: var(--color-text-primary); --f-sub: var(--color-text-secondary);
  --ink: var(--f-ink); --muted: var(--f-sub);
  color: var(--color-text-primary);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .art-index { --color-text-primary: #edf0f5; --color-text-secondary: #c0c8d6; }
}
:root[data-theme="dark"] .art-index, :root[data-theme="black"] .art-index { --color-text-primary: #edf0f5; --color-text-secondary: #c0c8d6; }

@media (prefers-reduced-motion: reduce) {
  .art-topics a { transition: none; }
}

/* ---- Articles index: the featured guide and the latest articles ---------
   The featured card is a large neutral card with the cover beside the text.
   Its topic shows in the label only. */
.art-feature { padding-top: clamp(28px, 4vw, 48px); }
.feature-card {
  display: grid; gap: clamp(20px, 3vw, 36px); align-items: center;
  padding: clamp(16px, 3vw, 32px); border-radius: var(--radius-page);
  background: var(--color-background-muted);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
@media (min-width: 860px) {
  .feature-card { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
.feature-media {
  display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
  object-fit: cover; border-radius: var(--radius-container);
}
.feature-card .kicker { color: var(--c-fg); font-weight: 600; margin: 0 0 10px; }
.feature-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
.feature-title a { color: inherit; text-decoration: none; }
.feature-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.feature-lead { margin: 0 0 18px; font-size: 1.05rem; color: var(--color-text-secondary); }
.feature-parts { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.feature-parts a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px;
  border-radius: var(--radius-full); background: var(--color-background-card); color: var(--color-text-primary);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--color-border-emphasized);
  transition: box-shadow var(--motion-fast) var(--ease);
}
.feature-parts a:hover { box-shadow: inset 0 0 0 2px var(--color-text-primary); }
.feature-part-count { font-size: .8125rem; font-weight: 500; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.feature-title a:focus-visible, .feature-parts a:focus-visible { outline: 2px solid var(--color-text-primary); outline-offset: 3px; }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.feature-actions .card-meta { margin: 0; }

.art-latest-topic { display: flex; align-items: center; margin: 0 0 8px; font-size: .8125rem; font-weight: 600; color: var(--c-fg); }

/* ---- Guide articles: a checklist with a progress panel ------------------
   The steps are GFM task lists. app.js enables their checkboxes and wraps
   each step in a label. Without it they stay disabled, and the panel still
   works as a list of jump links. On wide screens the panel sits beside the
   text and stays in view. */
.is-guide .wrap { display: grid; gap: 28px; }
@media (min-width: 1040px) {
  .is-guide .wrap {
    grid-template-columns: minmax(0, var(--max-prose)) minmax(240px, 300px);
    column-gap: clamp(32px, 5vw, 64px); align-items: start;
  }
  .is-guide .guide-panel { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 84px; }
  .is-guide .guide-body, .is-guide .article-related { grid-column: 1; }
}
.guide-panel {
  padding: 20px; border-radius: var(--radius-container);
  background: var(--color-background-muted);
  color: var(--color-text-primary);
}
.guide-title { font-size: 1.1rem; margin: 0; }
.guide-sub { margin: 2px 0 14px; font-size: .9rem; color: var(--color-text-secondary); }
.guide-progress label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; }
/* Fully custom <progress>: appearance none, the track on the element and the
   fill on each engine's pseudo-element, in separate rules. */
.guide-progress progress {
  --progress-bar-radius: 1e5px;
  appearance: none; border: 0 solid; overflow: clip;
  display: block; inline-size: 100%; block-size: 10px;
  border-radius: var(--progress-bar-radius);
  background: var(--color-background-card);
  box-shadow: inset 0 0 0 1px var(--color-border-emphasized);
}
.guide-progress progress::-webkit-progress-bar { background: transparent; }
.guide-progress progress::-webkit-progress-value {
  background: var(--c-fg); border-radius: var(--progress-bar-radius); transition: inline-size .3s;
}
.guide-progress progress::-moz-progress-bar {
  background: var(--c-fg); border-radius: var(--progress-bar-radius); transition: inline-size .3s;
}
.guide-status { margin: 6px 0 14px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.guide-parts { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.guide-parts a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 6px 10px; border-radius: var(--radius-element);
  color: inherit; text-decoration: none;
}
.guide-parts a:hover { background: var(--color-overlay-hover); }
.guide-parts a:focus-visible { outline: 2px solid var(--c-fg); outline-offset: 2px; }
.guide-part-name { font-weight: 600; }
.guide-part-count { font-size: .8125rem; white-space: nowrap; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.guide-parts li[data-done] .guide-part-count { color: var(--c-fg); font-weight: 600; }
.guide-note { margin: 12px 0 0; font-size: .8125rem; color: var(--color-text-secondary); }
.guide-reset {
  font: inherit; color: var(--c-fg); background: none; border: 0; padding: 0; min-height: 24px;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.guide-reset:focus-visible { outline: 2px solid var(--c-fg); outline-offset: 2px; }

/* The steps: one neutral row each, the whole row a label. */
.guide-body ul:has(> li > input[type="checkbox"]),
.guide-body ul:has(> .guide-item) { list-style: none; padding-left: 0; display: grid; gap: 8px; }
.guide-body .guide-item + .guide-item { margin-top: 0; }
.guide-body li:has(> input[type="checkbox"]) { display: flex; gap: .75rem; align-items: flex-start; }
.guide-step {
  display: flex; align-items: flex-start; gap: .75rem; min-block-size: 44px; box-sizing: border-box;
  padding: 12px 14px; border-radius: var(--radius-container); cursor: pointer;
  background: var(--color-background-muted);
  box-shadow: inset 0 0 0 1px var(--color-border);
  transition: background var(--motion-fast) var(--ease);
}
.guide-step:hover { background: var(--color-background-card); box-shadow: inset 0 0 0 1px var(--color-border-emphasized); }
.guide-item[data-done] .guide-step { background: var(--color-background-card); }
.guide-item[data-done] .guide-step-text { color: var(--color-text-secondary); }
.guide-step-text { min-width: 0; }

/* Custom checkbox (appearance: none): a rounded box in the topic colour that
   fills when ticked, with the check drawn by a mask. */
.guide-box {
  --checkbox-size: 1.35em;
  --checkbox-icon-size: .85em;
  --icon-check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='19.5 7 10 16.5 4.5 11'></polyline></svg>");
  appearance: none; flex: none; display: inline-grid; place-content: center;
  /* site.css pads every input 10px 12px: without this the box grows to 40px round a 12px tick */
  box-sizing: border-box; padding: 0; min-inline-size: 0;
  inline-size: var(--checkbox-size); aspect-ratio: 1; margin: .1em 0 0;
  border: 2px solid var(--c-fg); border-radius: 6px;
  background: var(--color-background-card); cursor: pointer;
}
.guide-box::before {
  content: ""; inline-size: var(--checkbox-icon-size); aspect-ratio: 1;
  background-color: var(--color-background-card);
  mask: var(--icon-check) no-repeat center / contain;
  scale: 0;
}
/* ticked: the box fills in the topic colour and the check takes the card colour;
   no second ring from the text-field focus style */
.guide-box:checked { background: var(--c-fg); border-color: var(--c-fg); }
.guide-box:checked::before { scale: 1; }
.guide-box:focus { box-shadow: none; }
.guide-box:focus-visible { outline: 2px solid var(--c-fg); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .guide-box { transition: background-color 150ms ease, border-color 150ms ease; }
  .guide-box::before { transition: scale 180ms cubic-bezier(.3, 1.4, .6, 1); }
}
@media (forced-colors: active) {
  .guide-box::before { background-color: CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .feature-parts a, .guide-step { transition: none; }
  .guide-progress progress::-webkit-progress-value { transition: none; }
  .guide-progress progress::-moz-progress-bar { transition: none; }
}

/* ==== The spec sheet layout ===============================================
   Content sits on the page ground, separated by space and one hairline.
   A raised white (dark: lifted grey) surface marks only things you can
   click or the listing label itself, so there are no boxes inside boxes. */
:root { --max: 1200px; }
body { font-size: 1.0625rem; }

main { padding: 0 0 48px; }
main > .band, main > section, .pp > section:not(.pp-stage) {
  margin: 0; padding: clamp(48px, 7vw, 80px) 0;
  border-top: 1px solid var(--color-border); background: transparent;
}
main > :first-child, main > .band.flush { border-top: 0; }
main > .band > .wrap,
main > section > .wrap,
.pp > section:not(.pp-stage):not(.stat-strip) > .wrap,
main > .band.hero > .wrap,
main > .band.tint > .wrap,
.hero-copy {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
  max-width: var(--max); margin-inline: auto; padding-block: 0;
  padding-inline: clamp(16px, 4vw, 32px);
}
.hero-copy { padding: 0; }
@media (max-width: 1300px) {
  main > .band > .wrap, main > section > .wrap,
  .pp > section:not(.pp-stage):not(.stat-strip) > .wrap { margin-inline: auto; }
}
.page-head h1, .hero h1 { letter-spacing: -0.035em; }
.hero-copy h1 { font-size: clamp(2.75rem, 7vw, 5rem); line-height: 1; letter-spacing: -0.04em; max-width: 10ch; }
.hero-copy .lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); max-width: 34em; }

/* Raised surfaces: one white card with a hairline, the same everywhere. */
.card, .ref-card, .price-card, .support-card, .spotlight, .spotlight:nth-child(n),
.promo, .research-list a, .ledger, .admin-stats > div, .admin-facts > div {
  background: var(--color-background-card);
  box-shadow: inset 0 0 0 1px var(--color-border);
  border: 0; border-radius: 16px;
}
.card:has(a.stretch:hover), .project-card:hover, .promo:hover, .research-list a:hover {
  background: var(--color-background-card);
  box-shadow: inset 0 0 0 1px var(--color-border-emphasized), var(--shadow-low);
}
.promo::before { display: none; }
.icon.mono { background: var(--color-background-muted); }

/* Header: the current page is underlined in the text ink (WCAG 1.4.1, not
   colour alone), and hover is a quiet fill. */
nav.links a[aria-current="page"], .navmenu > .navmenu-btn.is-current {
  background: transparent; border-radius: 0; box-shadow: inset 0 -2px 0 var(--color-text-primary);
}

/* Footer: plain text under a hairline, column heads in the secondary ink. */
footer { border-top: 1px solid var(--color-border); padding: 40px 0 56px; }
footer .wrap.foot { background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 0 clamp(16px, 4vw, 32px); max-width: var(--max); margin-inline: auto; }
footer .foot-cols div:nth-child(n) .foot-h, footer .foot-legal {
  font-family: var(--font-figtree); letter-spacing: 0; color: var(--color-text-secondary);
}
footer .foot-cols div:nth-child(n) .foot-h { font-size: .875rem; font-weight: 600; }

/* ---- Home ------------------------------------------------------------------ */
main > .band.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 104px) clamp(40px, 6vw, 64px); }
main > .band.hero > .wrap { position: relative; }
.hero-grid { align-items: start; }
.hero-traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-traces g { fill: none; stroke-width: 1.5; }
.trace-base { stroke: var(--color-border); }
.trace-pulse { stroke: var(--color-brand); stroke-width: 2.5; stroke-dasharray: 70 1930; }
/* The pulses run on a loop, so the hero has a pause control (WCAG 2.2.2:
   motion that lasts over five seconds needs a way to stop it). Reduced
   motion never starts them, and then the control is hidden. */
.trace-pulse path { stroke-dashoffset: 70; }
.trace-pulse path[data-signal="blue"] { stroke: var(--color-info); }
@media (prefers-reduced-motion: no-preference) {
  .trace-pulse path { animation: trace-run 4.2s linear infinite; }
  .trace-pulse path:nth-child(2) { animation-delay: -1.1s; animation-duration: 3.6s; }
  .trace-pulse path:nth-child(3) { animation-delay: -2.4s; animation-duration: 4.8s; }
  .trace-pulse path:nth-child(4) { animation-delay: -3.3s; animation-duration: 3.9s; }
  main > .band.hero:has(.trace-toggle:checked) .trace-pulse path { animation-play-state: paused; }
}
.trace-pause {
  position: absolute; inset-inline-end: clamp(16px, 4vw, 32px); inset-block-end: 16px; z-index: 1;
  display: none; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border-radius: var(--radius-full); background: var(--color-background-card);
  box-shadow: inset 0 0 0 1px var(--color-border); font-size: .875rem; color: var(--color-text-secondary); cursor: pointer;
}
.trace-pause input { margin: 0; accent-color: var(--color-brand); }
.trace-pause:has(input:focus-visible) { outline: 2px solid var(--color-info); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) and (min-width: 761px) { .trace-pause { display: inline-flex; } }
@keyframes trace-run { from { stroke-dashoffset: 70; } to { stroke-dashoffset: -1000; } }
@media (max-width: 760px) { .hero-traces { display: none; } }
@media (forced-colors: active) { .hero-traces { display: none; } }

.needs-h { margin: 40px 0 12px; font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: var(--color-text-secondary); }
.needs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.needs a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border-radius: var(--radius-full); background: var(--color-background-card);
  box-shadow: inset 0 0 0 1px var(--color-border-emphasized);
  color: var(--color-text-primary); font-weight: 600; text-decoration: none;
}
.needs a:hover { box-shadow: inset 0 0 0 2px var(--color-text-primary); }
.hero-new { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 32px 0 0; font-size: .9375rem; }
.hero-new a { color: var(--color-text-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-new time { color: var(--color-text-secondary); }
.new-tag {
  padding: 2px 10px; border-radius: var(--radius-full); font-size: .8125rem; font-weight: 700;
  background: var(--color-text-primary); color: var(--color-background-body);
}

.listing-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; margin: 8px 0 0; }
.listing-steps li { border-top: 2px solid var(--color-text-primary); padding-top: 16px; }
.listing-steps h3 { margin: 6px 0 8px; font-size: 1.25rem; }
.listing-steps p { margin: 0; color: var(--color-text-secondary); }
.listing-step-n { font-size: .9375rem; font-weight: 700; color: var(--color-text-secondary); }

/* Reading lists: one row per article, the title first, the topic under it. */
.read-list { margin: 0; border-top: 1px solid var(--color-border); }
.read-list li { border-bottom: 1px solid var(--color-border); }
.read-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px;
  padding: 18px 4px; color: var(--color-text-primary); text-decoration: none;
}
.read-list a:hover .read-title { text-decoration: underline; text-underline-offset: 3px; }
.read-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; text-wrap: pretty; }
.read-min { font-size: .875rem; color: var(--color-text-secondary); white-space: nowrap; }
.read-desc { grid-column: 1 / -1; color: var(--color-text-secondary); font-size: .9375rem; max-width: 62ch; }
.read-topic { grid-column: 1 / -1; display: block; font-size: .875rem; font-weight: 600; color: var(--color-text-secondary); }
.read-start { color: var(--color-text-primary); font-weight: 700; }
.read-list li.is-pillar .read-title { font-size: 1.3rem; }

/* ---- Projects: list or cards ----------------------------------------------- */
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.result-bar .result-count { margin: 0; }
.view-switch { margin: 0; }
.spec-table {
  overflow: auto; max-inline-size: 100%; container-type: inline-size;
  border-radius: 16px; background: var(--color-background-card);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.spec-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; }
.spec-table thead th {
  position: sticky; inset-block-start: 0; z-index: 1; background: var(--color-background-card);
  text-align: start; font-size: .875rem; font-weight: 600; color: var(--color-text-secondary);
}
.spec-table th, .spec-table td { padding: 14px 20px; border-bottom: 1px solid var(--color-border); text-align: start; vertical-align: top; }
.spec-table tbody tr:last-child > * { border-bottom: 0; }
.spec-table tbody tr { position: relative; }
.spec-table tbody tr:hover { background: var(--color-overlay-hover); }
.spec-table tbody th { font-weight: 400; min-width: 260px; }
.spec-table tbody th a { color: var(--color-text-primary); font-weight: 700; text-decoration: none; }
.spec-table tbody th a::after { content: ""; position: absolute; inset: 0; }
.spec-table tbody th a:focus-visible { outline: none; }
.spec-table tbody tr:has(a:focus-visible) { outline: 2px solid var(--color-info); outline-offset: -2px; }
.spec-table td { white-space: nowrap; }
.spec-tagline, .spec-credit { display: block; margin-top: 2px; font-size: .9375rem; color: var(--color-text-secondary); }
.spec-credit { font-size: .875rem; }
.spec-stage { display: inline-flex; align-items: center; gap: 8px; }
.spec-stage::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-secondary); }
.spec-stage.status-live::before { background: var(--color-success); }
@container (width < 600px) {
  .spec-table table, .spec-table thead, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; }
  .spec-table thead { display: none; }
  .spec-table tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--color-border); }
  .spec-table tbody tr:last-child { border-bottom: 0; }
  .spec-table th, .spec-table td { padding: 2px 0; border: 0; min-width: 0; white-space: normal; }
  .spec-table td::before { content: attr(data-label) ": "; color: var(--color-text-secondary); }
}
@media (forced-colors: active) {
  .spec-stage::before { background: CanvasText; }
  .spec-table tbody tr:has(a:focus-visible) { outline-color: Highlight; }
}

/* ---- Brand gold -------------------------------------------------------------
   The gold of the logo's dot is the one accent: primary buttons, the
   current page in the menu, the selected filter and the hero pulses. Gold is
   never used for text on a light page, where it fails contrast. */
.btn.primary { background: var(--color-brand); color: var(--color-on-brand); }
.btn.primary:hover { background: color-mix(in oklab, var(--color-brand) 86%, var(--color-on-brand)); color: var(--color-on-brand); }
.chip.on { background: var(--color-brand); color: var(--color-on-brand); }
nav.links a[aria-current="page"], .navmenu > .navmenu-btn.is-current { box-shadow: inset 0 -3px 0 var(--color-brand); }
.new-tag { background: var(--color-brand); color: var(--color-on-brand); }
.listing-steps li { border-top-color: var(--color-brand); }
.spot-dot.is-on::after { background: var(--color-brand); }
input:not([type="checkbox"], [type="radio"]):focus, select:focus, textarea:focus { border-color: var(--color-info); }

/* Project icons in the list view and the hero label. */
.spec-table tbody th { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.spec-table tbody th > .icon { grid-row: 1 / span 3; width: 40px; height: 40px; border-radius: 10px; font-size: 1rem; }
.spec-table tbody th > :not(.icon) { grid-column: 2; }
.ledger-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.ledger-name .icon { flex: none; width: 24px; height: 24px; border-radius: 6px; font-size: .75rem; }
/* a long name wraps to a second line instead of being clipped mid-word */
.ledger-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
.ledger-head, .ledger-row a { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) auto; }
/* About: the body text on the same left line as its heading */
main > .about-body > .wrap.about-grid { max-width: var(--max); }
@container (width < 600px) {
  .spec-table tbody th { display: grid; }
}

/* Learning terminal (/learn/linux). The terminal itself stays dark in both
   themes, like a real one; the lesson panel follows the page theme. */
.term-band h1 { margin-block-end: .4em; }
.term-wrap { margin-block-start: 24px; }
.term { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); grid-template-areas: "shell lesson" "guide lesson"; gap: 16px; align-items: start; }
.term-shell { grid-area: shell; }
.term-lesson { grid-area: lesson; }
.term-guide { grid-area: guide; }
.term-shell {
  display: flex; flex-direction: column; min-block-size: 540px;
  background: #0f1218; color: #e6e9ef; border: 1px solid #2a3140; border-radius: 14px;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: .9rem; line-height: 1.5;
  color-scheme: dark;
}
.term-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-block-end: 1px solid #222936; font-size: .8rem; color: #a7b0c0; }
.term-dot { inline-size: 10px; aspect-ratio: 1; border-radius: 50%; background: #f1b82d; }
.term-title { font-weight: 600; color: #e6e9ef; }
.term-badge { margin-inline-start: auto; padding: 2px 8px; border: 1px solid #2f3a4d; border-radius: 999px; color: #9fc3ff; }
.term-out { flex: 1; overflow: auto; max-block-size: 62vh; padding: 14px 16px; overscroll-behavior: contain; }
.term-out:focus-visible { outline: 2px solid #f1b82d; outline-offset: -4px; }
.term-line { margin: 0 0 2px; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; background: none; padding: 0; color: inherit; }
.term-welcome { border: 1px solid #f1b82d66; border-radius: 10px; padding: 12px 14px; margin-block-end: 14px; color: #d8dde6; }
.term-cmd { margin-block-start: 8px; }
.term-ps1, .term-prompt { color: #f1b82d; }
.term-err { color: #ff9b8f; }
.term-ok { color: #7bd389; }
.term-note { color: #9fc3ff; }
.term-form { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 10px 12px; border: 1px solid #3a4356; border-radius: 10px; background: #131822; }
.term-form:focus-within { border-color: #f1b82d; }
.term-prompt { white-space: nowrap; font-size: .9rem; margin: 0; }
.term-in { flex: 1; min-inline-size: 0; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; caret-color: #f1b82d; }
.term-in:focus, .term-in:focus-visible { outline: none; box-shadow: none; }
.term-status { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; padding: 0 16px 12px; font-size: .75rem; color: #8b95a7; }
.term-lesson { padding: 18px 20px; border-radius: var(--radius-page, 14px); background: var(--color-background-card); box-shadow: var(--tile-ring); }
.term-lesson h2 { font-size: 1.1rem; margin: 0 0 .4em; }
.term-lesson p { margin: 0 0 .8em; }
.term-lesson progress { inline-size: 100%; accent-color: var(--color-brand); }
.term-steps, .term-lessons { margin: .6em 0 1em; padding-inline-start: 1.3em; }
.term-steps li { margin-block: .35em; color: var(--color-text-secondary, inherit); }
.term-steps li.is-done { text-decoration: line-through; opacity: .7; }
.term-steps li.is-now { font-weight: 600; color: var(--color-text-primary, inherit); }
.term-pick { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.term-pick:focus-visible { outline: 2px solid var(--color-info); outline-offset: 2px; }
.term-done { color: var(--color-success, #3a8f5a); text-decoration: none; }
.term-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.term:not(.is-ready) .term-form { display: none; }
.term-nojs { padding: 14px 16px; }
@media (max-width: 860px) { .term { grid-template-columns: 1fr; grid-template-areas: "shell" "lesson" "guide"; } .term-shell { min-block-size: 420px; } }
@media (forced-colors: active) { .term-shell, .term-form { border: 1px solid CanvasText; } }

/* Home products: one, two or four across, sized by the section, so four cards never leave one alone on a row. */
.promo-wrap { container-type: inline-size; }
.promo-wrap .promo-grid { grid-template-columns: 1fr; }
@container (min-width: 560px) { .promo-wrap .promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 1000px) { .promo-wrap .promo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Terminal docs: long descriptions wrap in the reference tables. */
.docs-table td { white-space: normal; }
.docs-table tbody th { min-width: 0; white-space: nowrap; }
.docs-toc { margin-top: 18px; }

/* Slash-command guide under the terminal. The chips run or fill a command. */
.term-guide { padding: 22px 24px; border-radius: var(--radius-page, 14px); background: var(--color-background-card); box-shadow: var(--tile-ring); }
.term-guide h2 { font-size: 1.2rem; margin: 0 0 .3em; }
.term-guide > p { margin: 0 0 1em; color: var(--color-text-secondary); }
.term-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px 22px; }
.term-tip h3 { font-size: 1rem; margin: 0 0 .3em; }
.term-tip p { margin: 0; line-height: 1.6; }
.term-chip {
  font: 600 .9em/1.2 var(--font-mono, ui-monospace, monospace); padding: .15em .5em; border-radius: 6px;
  border: 1px solid color-mix(in oklab, var(--color-brand) 55%, transparent);
  background: color-mix(in oklab, var(--color-brand) 14%, transparent); color: inherit; cursor: pointer;
}
.term-chip:hover { background: color-mix(in oklab, var(--color-brand) 26%, transparent); }
.term-chip:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.term-guide kbd { font: .85em var(--font-mono, ui-monospace, monospace); padding: .05em .4em; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--color-border); }
