/* ==========================================================================
   Logic of Logic — merged-site mockup
   Family DNA: the v3 "Editorial Bento" tokens (public/css/tokens.css +
   src/styles/tokens.css in rsteitiyeh/logicoflogic.com), same names, same hexes.
   Dark is the default here; light is the toggle. Raw hex lives in this block only
   (plus the 15 Atlas constellation colours, which come from the Atlas data).
   ========================================================================== */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
/* metric-matched fallbacks so the swap does not move the layout */
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); size-adjust: 88%; ascent-override: 104%; descent-override: 32%; line-gap-override: 0%; }
@font-face { font-family: "Sans Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }

:root {
  /* warm-dark editorial (default) */
  --bg: #131110;
  --sf: #1B1714;
  --sf2: #26201B;
  --ink: #F5EFE4;
  --ink2: #EDE4D3;
  --mu: #A89A84;
  --mu2: #7A6F60;
  --rule: #3A332B;
  --rust: #C9663F;
  --rusth: #E07A52;
  --sage: #8A9470;
  --sky: #7E98A8;
  --gold: #E6C254;
  /* text-safe accents (AA on --bg at body sizes) */
  --rust-t: #E07A52;
  --sage-t: #9BA583;
  --sky-t: #93AEBD;
  --btn-bg: #C9663F;
  --btn-bg-h: #E07A52;
  --btn-fg: #1B1714;
  --lift: 0 2px 8px rgba(0, 0, 0, .35);
  --lift-2: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --glass: rgba(19, 17, 16, .72);
  --glass-2: rgba(27, 23, 20, .62);
  --glow: rgba(201, 102, 63, .22);
  --veil: rgba(10, 9, 8, .62);
  --grain: .05;
  color-scheme: dark;

  --ser: "Instrument Serif", "Serif Fallback", Georgia, "Times New Roman", serif;
  --ui: Inter, "Sans Fallback", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --page-max: 1440px;
  --pad: clamp(20px, 5.2vw, 96px);
  --gutter: clamp(14px, 1.7vw, 24px);
  --radius: 4px;
  --radius-2: 8px;
  --mast-h: 72px;
  --mast-h-c: 56px;
  --sub-h: 48px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-hover: cubic-bezier(.4, 0, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 160ms;
  --t-med: 250ms;
  --t-slow: 480ms;
}

:root[data-theme="light"] {
  --bg: #F5EFE4;
  --sf: #EFE6D5;
  --sf2: #E8DCC3;
  --ink: #1B1714;
  --ink2: #2E2823;
  --mu: #6F6456;
  --mu2: #A89A84;
  --rule: #D9CDB4;
  --rust: #B8593B;
  --rusth: #8F3F26;
  --sage: #6B7355;
  --sky: #5C7686;
  --gold: #E6C254;
  --rust-t: #8F3F26;
  --sage-t: #566046;
  --sky-t: #46606E;
  --btn-bg: #B8593B;
  --btn-bg-h: #8F3F26;
  --btn-fg: #FFFFFF;
  --lift: 0 2px 8px rgba(27, 23, 20, .08);
  --lift-2: 0 24px 60px -24px rgba(27, 23, 20, .28);
  --glass: rgba(245, 239, 228, .78);
  --glass-2: rgba(239, 230, 213, .7);
  --glow: rgba(184, 89, 59, .16);
  --veil: rgba(27, 23, 20, .38);
  --grain: .035;
  color-scheme: light;
}

@media (max-width: 860px) {
  :root { --mast-h: 60px; --mast-h-c: 52px; --sub-h: 44px; }
}

/* ---------- reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h-c) + var(--sub-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--ui); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-top: var(--mast-h);
  transition: background-color var(--t-med) var(--ease-hover), color var(--t-med) var(--ease-hover);
  overflow-x: clip;
}
body.lock { overflow: hidden; }
a { color: var(--sky-t); text-decoration: none; }
a:hover { color: var(--rust-t); }
img, svg, canvas { max-width: 100%; }
img { display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
::selection { background: var(--gold); color: #1B1714; }
:focus-visible { outline: 2px solid var(--rust-t); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
main { display: block; position: relative; z-index: 1; }

/* film grain over everything: one tiny inline SVG, no request */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
:root[data-theme="light"] body::after { mix-blend-mode: multiply; filter: invert(1); }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: -64px; z-index: 400; font: 500 12px/1 var(--mono); letter-spacing: .08em;
  background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: var(--radius);
  transition: top var(--t-fast) var(--ease-hover);
}
.skip:focus-visible { top: 12px; color: var(--bg); }

/* ---------- type ---------- */
h1, h2, h3, h4, .ser { font-family: var(--ser); font-weight: 400; margin: 0; letter-spacing: -.012em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(42px, 6.4vw, 92px); }
h2 { font-size: clamp(30px, 3.7vw, 54px); }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.12; }
h4 { font-size: 20px; line-height: 1.15; }
h1 em, h2 em, h3 em, .ser em { font-style: italic; color: var(--rust-t); }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lab { font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.lab.rust { color: var(--rust-t); }
.lab.gold { color: var(--gold); }
:root[data-theme="light"] .lab.gold { color: #7A5A06; }
.dek { font-family: var(--ser); font-style: italic; font-size: clamp(19px, 1.6vw, 24px); color: var(--ink2); line-height: 1.32; text-wrap: pretty; }
.lede { font-size: clamp(16px, 1.25vw, 19px); color: var(--ink2); line-height: 1.6; max-width: 62ch; text-wrap: pretty; }
.note { font: 400 12px/1.55 var(--mono); color: var(--mu); }
.kick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.kick > .dot { margin-right: -2px; }
.kick > .dot + .lab { flex: 1; min-width: 0; }
.kick:has(> .dot) { flex-wrap: nowrap; }
svg.tri { display: inline-block; width: .82em; height: .72em; fill: var(--rust); flex: none; vertical-align: baseline; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--pad); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.sec { padding: clamp(56px, 7vw, 112px) 0 0; position: relative; }
.sec.tight { padding-top: clamp(36px, 4vw, 64px); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 44px); flex-wrap: wrap; }
.sec-head .kick { margin-bottom: 12px; }
.sec-head p.lede { margin-top: 14px; }
.sec-head .more { font: 500 13px/1 var(--mono); letter-spacing: .04em; color: var(--ink2); display: inline-flex; gap: 8px; align-items: center; padding: 10px 0; white-space: nowrap; }
.sec-head .more:hover { color: var(--rust-t); }
.sec-head .more i { display: inline-block; transition: transform var(--t-med) var(--ease-out); font-style: normal; }
.sec-head .more:hover i { transform: translateX(4px); }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius);
  font: 600 14px/1 var(--ui); letter-spacing: .005em; border: 1px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-hover), border-color var(--t-fast) var(--ease-hover), color var(--t-fast) var(--ease-hover), box-shadow var(--t-med) var(--ease-hover);
  will-change: transform;
}
.btn:hover { background: var(--btn-bg-h); border-color: var(--btn-bg-h); color: var(--btn-fg); box-shadow: 0 10px 30px -10px var(--glow); }
.btn.o { background: transparent; color: var(--ink); border-color: color-mix(in oklab, var(--ink) 55%, transparent); }
.btn.o:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: none; }
.btn.q { background: transparent; color: var(--rust-t); border-color: transparent; padding: 0 6px; }
.btn.q:hover { background: transparent; color: var(--ink); box-shadow: none; }
.btn.s { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn .arr { display: inline-block; transition: transform var(--t-med) var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- chips, stamps, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 11px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  font: 500 13px/1 var(--ui); color: var(--ink2); background: transparent; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-hover), border-color var(--t-fast) var(--ease-hover), color var(--t-fast) var(--ease-hover);
}
a.chip, button.chip { cursor: pointer; }
a.chip:hover, button.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.m { font: 500 12px/1 var(--mono); letter-spacing: .04em; }
.chip small { font: 400 11px/1 var(--mono); color: var(--mu); }
.chip.on small, .chip[aria-pressed="true"] small { color: color-mix(in oklab, var(--bg) 70%, var(--ink)); }
.chip .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cc, var(--rust)); flex: none; box-shadow: 0 0 10px color-mix(in oklab, var(--cc, var(--rust)) 70%, transparent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dom { font: 400 11px/1 var(--mono); color: var(--mu); letter-spacing: .02em; border: 1px solid var(--rule); border-radius: var(--radius); padding: 4px 6px; white-space: nowrap; }
a.dom:hover { color: var(--rust-t); border-color: var(--rust-t); }
.stamp {
  display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 1px solid var(--sage); color: var(--sage-t); border-radius: var(--radius);
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
.stamp svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.stamp.multi { white-space: normal; height: auto; min-height: 26px; padding: 6px 10px; line-height: 1.35; }
.stamp.stale { color: var(--mu); border-color: var(--rule); }
.badge { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border-radius: 99px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--rule); color: var(--mu); white-space: nowrap; }
.badge.live { color: var(--sage-t); border-color: color-mix(in oklab, var(--sage) 60%, transparent); background: color-mix(in oklab, var(--sage) 12%, transparent); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage-t); box-shadow: 0 0 0 0 color-mix(in oklab, var(--sage-t) 60%, transparent); animation: pulse 2.2s var(--ease-out) infinite; }
.badge.atlas { color: var(--gold); border-color: color-mix(in oklab, var(--gold) 50%, transparent); }
:root[data-theme="light"] .badge.atlas { color: #7A5A06; border-color: #B8860B; }
.badge.soon { border-style: dashed; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--sage-t) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
/* visible marker for anything not decided yet */

/* ---------- cards ---------- */
.card {
  position: relative; display: block; background: var(--sf); border: 1px solid var(--rule);
  border-radius: var(--radius-2); padding: clamp(18px, 1.8vw, 26px); color: inherit; overflow: hidden;
  transition: border-color var(--t-med) var(--ease-hover), box-shadow var(--t-med) var(--ease-hover), background-color var(--t-med) var(--ease-hover);
  transform-style: preserve-3d;
}
a.card:hover { color: inherit; }
.card:hover { border-color: color-mix(in oklab, var(--ink) 34%, var(--rule)); box-shadow: var(--lift-2); }
/* cursor spotlight: --mx/--my are set by site.js */
.card.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--cc, var(--rust)) 22%, transparent), transparent 60%);
  transition: opacity var(--t-med) var(--ease-hover);
}
.card.spot:hover::before { opacity: 1; }
.card > * { position: relative; }
.card h3, .card h4 { transition: color var(--t-fast) var(--ease-hover); }
a.card:hover h3, a.card:hover h4 { color: var(--rust-t); }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.card .go { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); display: inline-flex; gap: 6px; align-items: center; }
a.card:hover .go { color: var(--rust-t); }
.card .ext { font: 400 11px/1 var(--mono); color: var(--mu); }

/* takeaway — the ∴ device */
.tk { border-top: 1px solid var(--rule); padding: 14px 0 0; margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; }
.tk .sign { font-size: 22px; line-height: 1; padding-top: 4px; flex: none; }
.tk .t { font-family: var(--ser); font-style: italic; font-size: 19px; line-height: 1.3; color: var(--ink); }

/* ---------- data table ---------- */
.dt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--radius-2); background: var(--sf); }
table.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
table.dt th { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); text-align: left; padding: 14px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--sf); }
table.dt th button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
table.dt th button:hover, table.dt th[aria-sort] button { color: var(--ink); }
table.dt th .arrow { color: var(--rust-t); width: 8px; display: inline-block; }
table.dt td { padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt tbody tr { transition: background-color var(--t-fast) var(--ease-hover); }
table.dt tbody tr:hover { background: color-mix(in oklab, var(--sf2) 70%, transparent); }
table.dt .r { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dt th.r button { justify-content: flex-end; width: 100%; }
table.dt .rn { font-weight: 600; color: var(--ink); }
table.dt a.rn:hover { color: var(--rust-t); }
table.dt .t { display: block; color: var(--mu); font-size: 13px; margin-top: 2px; max-width: 64ch; }
table.dt .catc { display: inline-flex; align-items: center; gap: 8px; color: var(--ink2); white-space: nowrap; }
.up { color: var(--rust-t); font-family: var(--mono); }
.dn { color: var(--sage-t); font-family: var(--mono); }

/* ---------- inputs ---------- */
.inp { height: 46px; border: 1px solid var(--rule); background: var(--bg); border-radius: var(--radius); padding: 0 14px; font: 400 15px var(--ui); color: var(--ink); width: 100%; min-width: 0; }
.inp::placeholder { color: var(--mu); opacity: 1; }
.inp:focus-visible { outline: 2px solid var(--rust-t); outline-offset: 2px; }
select.inp { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--mu) 50%), linear-gradient(135deg, var(--mu) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ---------- prose ---------- */
.prose { font-size: 18px; line-height: 1.65; color: var(--ink2); }
.prose p { margin: 0 0 20px; }
.prose h2 { font-size: clamp(28px, 2.8vw, 40px); margin: 52px 0 16px; color: var(--ink); scroll-margin-top: calc(var(--mast-h-c) + var(--sub-h) + 20px); }
.prose h3 { margin: 32px 0 12px; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--mu); }
.prose a { color: var(--sky-t); border-bottom: 1px solid color-mix(in oklab, var(--sky-t) 40%, transparent); }
.prose a:hover { color: var(--rust-t); border-bottom-color: var(--rust-t); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose code { font: 400 .86em var(--mono); background: var(--sf2); border-radius: 3px; padding: 2px 6px; }
.prose pre { background: var(--sf); border: 1px solid var(--rule); border-radius: var(--radius-2); padding: 16px 18px; overflow-x: auto; margin: 0 0 22px; }
.prose pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.6; }
.prose .tbl-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--rule); border-radius: var(--radius-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.prose th { font: 500 11.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); background: var(--sf); }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- skeleton ---------- */
.sk { display: block; border-radius: var(--radius); height: 14px; background: linear-gradient(100deg, var(--sf2) 30%, color-mix(in oklab, var(--sf2) 60%, var(--ink) 9%) 50%, var(--sf2) 70%); background-size: 240% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -140% 0; } }
.sk-row { display: grid; grid-template-columns: 1fr 90px 70px; gap: 16px; padding: 16px 14px; border-bottom: 1px solid var(--rule); }

/* ---------- reveal primitives (JS adds .js to <html>) ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 22px, 0); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 0; font-family: var(--ser); font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--rust-t); transition: transform var(--t-med) var(--ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink2); max-width: 72ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Chrome: the active menu (masthead, mega menus, scroll-spy sub-nav),
   full-screen mobile menu, command palette, page-transition curtain, cursor, footer
   ========================================================================== */

/* ---------- masthead ---------- */
.mast {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--mast-h);
  transition: height var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-hover), border-color var(--t-med) var(--ease-hover);
  border-bottom: 1px solid transparent;
}
.mast::before { /* frosted plate, fades in once the page scrolls */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  transition: opacity var(--t-med) var(--ease-hover);
}
.mast.is-condensed, .mast.is-open { border-bottom-color: var(--rule); }
.mast.is-condensed { height: var(--mast-h-c); }
.mast.is-condensed::before, .mast.is-open::before { opacity: 1; }
.mast-in { height: 100%; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ser); font-size: 25px; line-height: 1; color: var(--ink); white-space: nowrap; flex: none; transition: font-size var(--t-med) var(--ease-out); }
.brand:hover { color: var(--ink); }
.brand .tri { width: 20px; height: 17.5px; transition: transform .6s var(--ease-out); }
.brand:hover .tri { transform: rotate(120deg); }
.mast.is-condensed .brand { font-size: 21px; }

/* where-am-i readout: page / section, appears in the condensed bar */
.mast-crumb { display: flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); white-space: nowrap; overflow: hidden; max-width: 0; opacity: 0; transition: max-width var(--t-slow) var(--ease-out), opacity var(--t-med) var(--ease-hover); }
.mast-crumb .sep { color: var(--rule); }
.mast-crumb [data-crumb-sec] { color: var(--rust-t); }
.mast.is-condensed .mast-crumb.has-sec { max-width: 280px; opacity: 1; }

.nav { position: relative; margin-left: auto; }
.nav > ul { display: flex; align-items: center; gap: 2px; }
.nav li { position: relative; display: flex; align-items: center; }
.nav-link { position: relative; z-index: 1; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; font: 500 14px/1 var(--ui); color: var(--mu); border-radius: 99px; transition: color var(--t-fast) var(--ease-hover); }
.nav-link:hover, .nav li.is-hot .nav-link { color: var(--ink); }
.nav-link[aria-current] { color: var(--ink); }
.has-mega .nav-link { padding-right: 4px; }
.mega-btn { position: relative; z-index: 1; width: 26px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--mu); border-radius: 99px; margin-right: 4px; }
.mega-btn svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform var(--t-med) var(--ease-out); }
.mega-btn[aria-expanded="true"] { color: var(--rust-t); }
.mega-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav li.is-hot .mega-btn, .nav-link[aria-current] + .mega-btn { color: var(--ink); }
/* the sliding pill: rests under the current page, follows hover and focus */
.nav-ind { position: absolute; z-index: 0; left: 0; top: 50%; height: 38px; width: 0; margin-top: -19px; border-radius: 99px; background: color-mix(in oklab, var(--ink) 9%, transparent); opacity: 0; pointer-events: none; transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity var(--t-med) var(--ease-hover); will-change: transform, width; }
.nav-ind::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--rust); transform-origin: left; transition: transform .5s var(--ease-out), opacity var(--t-fast); }
.nav-ind.is-hover::after { opacity: .35; }
.nav-ind.is-on { opacity: 1; }

.mast-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.kbtn { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--rule); border-radius: 99px; color: var(--mu); font: 400 13px/1 var(--ui); transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast); }
.kbtn:hover { color: var(--ink); border-color: color-mix(in oklab, var(--ink) 40%, var(--rule)); }
.kbtn svg, .icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 500 11px/1 var(--mono); color: var(--mu); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 5px; background: var(--sf); }
.icon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; color: var(--ink2); border: 1px solid transparent; transition: border-color var(--t-fast), color var(--t-fast); }
.icon-btn:hover { color: var(--rust-t); border-color: var(--rule); }
.theme-toggle .tt-sun { display: none; }
:root[data-theme="light"] .theme-toggle .tt-sun { display: block; }
:root[data-theme="light"] .theme-toggle .tt-moon { display: none; }
.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
.burger i { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform var(--t-med) var(--ease-out); }
.burger:hover i:first-child { transform: translateX(3px); }
.burger:hover i:last-child { transform: translateX(-3px); }

/* scroll progress, bottom edge of the bar */
.mast-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.mast-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--rust), var(--gold)); transform: scaleX(var(--p, 0)); transform-origin: left; opacity: 0; transition: opacity var(--t-med); }
.mast.is-condensed .mast-progress i { opacity: 1; }

/* ---------- mega menu ---------- */
.mega { position: absolute; left: 0; right: 0; top: 100%; overflow: hidden; height: 0; visibility: hidden; border-bottom: 1px solid transparent; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--lift-2); transition: height .5s var(--ease-out), visibility 0s .5s, border-color var(--t-med); }
.mega.is-open { visibility: visible; border-bottom-color: var(--rule); transition: height .5s var(--ease-out), visibility 0s, border-color var(--t-med); }
.mega-panel { position: absolute; left: 0; right: 0; top: 0; padding: 28px 0 34px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--t-med) var(--ease-hover), transform var(--t-slow) var(--ease-out), visibility 0s var(--t-med); }
.mega-panel.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t-med) var(--ease-hover) 80ms, transform var(--t-slow) var(--ease-out) 60ms, visibility 0s; }
.mega-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.mega h3 { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin: 0 0 14px; }
.mega-col { min-width: 0; }
.mega-list li + li { margin-top: 2px; }
.mega-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius); color: var(--ink2); font-size: 14.5px; line-height: 1.25; transition: background-color var(--t-fast), color var(--t-fast); }
.mega-list a:hover, .mega-list a:focus-visible { background: color-mix(in oklab, var(--ink) 7%, transparent); color: var(--ink); }
.mega-list a[aria-current] { color: var(--rust-t); }
.mega-list .n { font: 400 12px/1 var(--mono); color: var(--mu); font-variant-numeric: tabular-nums; flex: none; }
.mega-list .l { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.mega-list .l b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mega-list.cols-3 { columns: 3; column-gap: var(--gutter); }
.mega-list.cols-3 li { break-inside: avoid; margin-top: 0; }
.mega-list .num-i { font: 400 12px/1 var(--mono); color: var(--rust-t); width: 20px; flex: none; }
.mega-feature { display: block; height: 100%; border: 1px solid var(--rule); border-radius: var(--radius-2); padding: 18px; background: color-mix(in oklab, var(--sf) 70%, transparent); color: inherit; transition: border-color var(--t-med); }
.mega-feature:hover { border-color: var(--rust); color: inherit; }
.mega-feature h4 { margin: 12px 0 6px; font-size: 24px; }
.mega-feature p { font-size: 13.5px; color: var(--mu); line-height: 1.45; }
.mega-foot { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); font: 400 12px/1.4 var(--mono); color: var(--mu); flex-wrap: wrap; }
.mega-foot a { color: var(--ink2); }
.mega-foot a:hover { color: var(--rust-t); }

/* ---------- scroll-spy sub-navigation ---------- */
.subnav { position: sticky; top: var(--mast-h-c); z-index: 60; height: var(--sub-h); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.subnav-in { height: 100%; display: flex; align-items: center; gap: 18px; }
.subnav-title { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); white-space: nowrap; flex: none; }
.subnav-scroll { position: relative; flex: 1; min-width: 0; height: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
.subnav-scroll::-webkit-scrollbar { display: none; }
.subnav ul { position: relative; display: flex; height: 100%; align-items: stretch; gap: 4px; padding: 0 12px; width: max-content; }
.subnav a { display: inline-flex; align-items: center; height: 100%; padding: 0 12px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); white-space: nowrap; transition: color var(--t-fast); }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--ink); }
.subnav a .i { color: var(--mu); margin-right: 8px; }
.subnav a[aria-current] .i { color: var(--rust-t); }
.subnav-ind { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--rust); transition: transform .45s var(--ease-out), width .45s var(--ease-out); pointer-events: none; }
.subnav-pct { font: 500 11.5px/1 var(--mono); color: var(--mu); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; flex: none; }

/* ---------- full-screen mobile menu ---------- */
.mmenu { position: fixed; inset: 0; z-index: 180; background: var(--bg); display: flex; flex-direction: column; visibility: hidden; clip-path: circle(0px at calc(100% - 42px) 30px); transition: clip-path .7s var(--ease-io), visibility 0s .7s; overscroll-behavior: contain; }
.mmenu.is-open { visibility: visible; clip-path: circle(150vmax at calc(100% - 42px) 30px); transition: clip-path .8s var(--ease-io), visibility 0s; }
.mmenu-top { height: var(--mast-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); border-bottom: 1px solid var(--rule); flex: none; }
.mmenu-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; position: relative; margin-right: -11px; }
.mmenu-close i { position: absolute; width: 22px; height: 1.5px; background: var(--ink); }
.mmenu-close i:first-child { transform: rotate(45deg); } .mmenu-close i:last-child { transform: rotate(-45deg); }
.mmenu-body { flex: 1; overflow-y: auto; padding: 8px var(--pad) 24px; }
.mmenu-list > li { border-bottom: 1px solid var(--rule); }
.mmenu-row { display: flex; align-items: center; gap: 14px; }
.mmenu-link { flex: 1; display: flex; align-items: baseline; gap: 14px; padding: 15px 0; font-family: var(--ser); font-size: clamp(34px, 9.5vw, 46px); line-height: 1; color: var(--ink); }
.mmenu-link .i { font: 400 11px/1 var(--mono); color: var(--mu); letter-spacing: .08em; width: 20px; }
.mmenu-link[aria-current] { color: var(--rust-t); }
.mmenu-link[aria-current] .i { color: var(--rust-t); }
.mmenu-link[aria-current]::after { content: "you are here"; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-left: auto; align-self: center; }
.mmenu-x { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); border-radius: 50%; color: var(--ink2); flex: none; }
.mmenu-x svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform var(--t-med) var(--ease-out); }
.mmenu-x[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mmenu-x[aria-expanded="true"] svg { transform: rotate(180deg); }
.mmenu-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.mmenu-sub.is-open { grid-template-rows: 1fr; }
.mmenu-sub > div { overflow: hidden; }
.mmenu-sub ul { padding: 2px 0 18px 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.mmenu-sub li.full { grid-column: 1 / -1; }
.mmenu-sub .lab { display: block; padding: 10px 0 6px; }
.mmenu-sub a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; font-size: 15px; color: var(--ink2); border-bottom: 1px solid color-mix(in oklab, var(--rule) 60%, transparent); }
.mmenu-sub a .n { font: 400 12px/1.6 var(--mono); color: var(--mu); }
.mmenu-foot { flex: none; padding: 16px var(--pad) calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); display: flex; gap: 10px; align-items: center; }
.mmenu-foot .btn { flex: 1; }
.js .mmenu-list > li { opacity: 0; transform: translateY(26px); }
.mmenu.is-open .mmenu-list > li { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(180ms + var(--i) * 55ms); }

/* ---------- command palette ---------- */
.pal { position: fixed; inset: 0; z-index: 220; display: flex; justify-content: center; align-items: flex-start; padding: min(12vh, 110px) 16px 16px; visibility: hidden; }
.pal.is-open { visibility: visible; }
.pal-veil { position: absolute; inset: 0; background: var(--veil); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--t-med) var(--ease-hover); }
.pal.is-open .pal-veil { opacity: 1; }
.pal-panel { position: relative; width: 100%; max-width: 720px; max-height: min(74vh, 640px); display: flex; flex-direction: column; background: var(--sf); border: 1px solid color-mix(in oklab, var(--ink) 20%, var(--rule)); border-radius: 12px; overflow: hidden; box-shadow: var(--lift-2); opacity: 0; transform: translateY(14px) scale(.985); transition: opacity var(--t-med) var(--ease-hover), transform var(--t-slow) var(--ease-out); }
.pal.is-open .pal-panel { opacity: 1; transform: none; }
.pal-head { display: flex; gap: 12px; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--rule); flex: none; }
.pal-head svg { width: 18px; height: 18px; stroke: var(--mu); fill: none; stroke-width: 1.6; flex: none; }
.pal-input { flex: 1; min-width: 0; height: 58px; background: transparent; border: 0; outline: 0; font: 400 17px var(--ui); color: var(--ink); }
.pal-input::placeholder { color: var(--mu); }
.pal-scopes { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; flex: none; }
.pal-scopes .chip { min-height: 26px; font-size: 12px; }
.pal-results { overflow-y: auto; padding: 6px 0 10px; flex: 1; min-height: 120px; overscroll-behavior: contain; }
.pal-group { padding: 12px 16px 6px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); display: flex; justify-content: space-between; }
.pal-hit { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 16px; color: var(--ink); cursor: pointer; border-left: 2px solid transparent; }
.pal-hit:hover { color: var(--ink); }
.pal-hit[aria-selected="true"] { background: color-mix(in oklab, var(--ink) 8%, transparent); border-left-color: var(--rust); }
.pal-hit .ic { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font: 500 11px/1 var(--mono); color: var(--mu); }
.pal-hit > span:nth-child(2) { display: block; min-width: 0; }
.pal-hit .tt, .pal-hit .dd { display: block; }
.pal-hit .tt { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-hit .tt mark { background: none; color: var(--rust-t); }
.pal-hit .dd { font-size: 12.5px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pal-hit .mm { font: 400 12px/1 var(--mono); color: var(--mu); white-space: nowrap; }
.pal-empty { padding: 28px 16px; color: var(--mu); font-size: 14px; }
.pal-foot { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--rule); font: 400 11.5px/1 var(--mono); color: var(--mu); flex: none; flex-wrap: wrap; }
.pal-foot span { display: inline-flex; gap: 6px; align-items: center; }
.pal-foot .sp { margin-left: auto; }

/* ---------- page-transition curtain ---------- */
.curtain { position: fixed; inset: 0; z-index: 260; pointer-events: none; visibility: hidden; overflow: hidden; }
.curtain-panel { position: absolute; inset: -2px; background: var(--sf); transform: translateY(101%); will-change: transform; }
.curtain-panel::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--rust), var(--gold)); }
.curtain-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 64px; line-height: 1; opacity: 0; }
/* arriving from an in-site navigation: covered from the first paint, site.js lifts it */
.arriving .curtain { visibility: visible; animation: curtain-failsafe .5s 2.4s forwards; }
.arriving .curtain-panel { transform: none; }
.arriving .curtain-mark { opacity: 1; }
@keyframes curtain-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- custom cursor (desktop pointers only; site.js creates it) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 280; pointer-events: none; }
.cursor i { position: absolute; left: 0; top: 0; display: block; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--rust); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid color-mix(in oklab, var(--ink) 55%, transparent); display: flex !important; align-items: center; justify-content: center; transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background-color .25s, border-color .25s, opacity .25s; }
.cursor-ring span { font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--btn-fg); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.is-link .cursor-ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--rust); background: color-mix(in oklab, var(--rust) 14%, transparent); }
.cursor.is-label .cursor-ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--btn-bg); border-color: var(--btn-bg); }
.cursor.is-label .cursor-ring span { opacity: 1; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor.is-down .cursor-ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.cursor.is-hidden { opacity: 0; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--rule); margin-top: clamp(64px, 8vw, 128px); padding: clamp(40px, 5vw, 72px) 0 32px; background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--sf) 70%, transparent)); overflow: hidden; }
.foot-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); }
.foot-promise { font-family: var(--ser); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; max-width: 18ch; }
.foot-promise em { font-style: italic; color: var(--rust-t); }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.foot h3 { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin: 0 0 14px; }
.foot li { margin-bottom: 9px; font-size: 14px; }
.foot li a { color: var(--ink2); }
.foot li a:hover { color: var(--rust-t); }
.foot li small { font: 400 11px/1 var(--mono); color: var(--mu); margin-left: 6px; }
.foot-word { font-family: var(--ser); font-size: clamp(64px, 17.5vw, 270px); line-height: .8; letter-spacing: -.03em; margin: clamp(36px, 5vw, 72px) 0 0; color: transparent; -webkit-text-stroke: 1px color-mix(in oklab, var(--ink) 22%, transparent); white-space: nowrap; user-select: none; }
.foot-word .tri { width: .5em; height: .44em; margin-right: .06em; }
.foot-base { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); font: 400 12px/1.5 var(--mono); color: var(--mu); }
.foot-base a { color: var(--mu); } .foot-base a:hover { color: var(--rust-t); }
.mock-note { display: inline-flex; gap: 8px; align-items: center; }

/* toast (mock form feedback) */
.toast-dock { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 240; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); border-radius: var(--radius-2); padding: 13px 16px; font-size: 14px; box-shadow: var(--lift-2); }
.toast b { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--rust); }

/* ---------- responsive chrome ---------- */
@media (max-width: 1080px) {
  .nav, .mast-crumb, .mast .btn.s, .mega { display: none; }
  .burger { display: inline-flex; }
  .mast-tools { margin-left: auto; gap: 2px; }
  .kbtn { width: 44px; height: 44px; padding: 0; justify-content: center; border-color: transparent; }
  .kbtn span, .kbtn kbd { display: none; }
  .icon-btn { width: 44px; height: 44px; }
}
@media (max-width: 860px) {
  .foot-top { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 28px var(--gutter); }
  .subnav-title { display: none; }
  .subnav ul { padding-left: 0; }
  .subnav-scroll { margin-left: calc(var(--pad) * -1 + 8px); }
  .pal { padding-top: 10px; }
  .pal-panel { max-height: calc(100svh - 20px); }
  .pal-foot { display: none; }
}

/* ==========================================================================
   Shared components: headline reveals, 3D scene containers, repo + guide cards,
   carousels, signup form, numerals, stat lines, page heroes
   ========================================================================== */

/* ---------- headline word-rise: pure CSS, starts with the first paint.
   Words are faint but present in the very first frame (no clipping, no opacity 0),
   so the headline counts as painted straight away instead of when the motion ends. ---------- */
[data-words] .w { display: inline-block; vertical-align: top; }
[data-words] .w > span { display: inline-block; }
.js [data-words] .w > span { animation: word-rise .8s var(--ease-out) both; animation-delay: calc(var(--i) * 42ms + var(--rise-base, 30ms)); }
.js .rise:not([data-words]) { animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--r, 0) * 70ms + var(--rise-base, 60ms)); }
.arriving { --rise-base: 520ms; }
@keyframes word-rise { from { opacity: .12; transform: translate3d(0, .5em, 0) rotate(3deg); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } }
/* SplitType line reveals (h2 on scroll) */
.js [data-split] { visibility: hidden; }
.js [data-split].is-split { visibility: visible; }
[data-split] .sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .07em .16em 0; margin: 0 -.07em -.16em 0; }
[data-split] .swi { display: inline-block; will-change: transform; }

/* ---------- 3D scene containers ---------- */
[data-scene] { position: relative; overflow: hidden; }
[data-scene] canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 1.4s var(--ease-hover); }
[data-scene].is-live canvas { opacity: 1; }
[data-scene] .scene-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
[data-scene].is-static .scene-poster { opacity: 1; }
.starmap { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 55%, color-mix(in oklab, var(--rust) 10%, var(--bg)) 0%, var(--bg) 62%); cursor: grab; touch-action: pan-y; }
.starmap.is-dragging { cursor: grabbing; }
.starmap.is-hot { cursor: pointer; }
/* a field of CSS stars shows instantly, before WebGL starts or when it cannot */
.starmap::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(1px 1px at 12% 22%, var(--ink) 50%, transparent 51%), radial-gradient(1px 1px at 72% 18%, var(--ink) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 34% 64%, var(--gold) 50%, transparent 51%), radial-gradient(1px 1px at 86% 58%, var(--ink) 50%, transparent 51%), radial-gradient(1px 1px at 55% 84%, var(--ink) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 20% 86%, var(--sky) 50%, transparent 51%), radial-gradient(1px 1px at 64% 40%, var(--ink) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 44% 30%, var(--rust) 50%, transparent 51%); transition: opacity 1s; }
.starmap.is-live::before { opacity: 0; }
.map-tip { position: absolute; z-index: 5; left: 0; top: 0; pointer-events: none; opacity: 0; transform: translate3d(-999px, -999px, 0); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid color-mix(in oklab, var(--cc, var(--ink)) 60%, var(--rule)); border-radius: var(--radius-2); padding: 9px 11px; max-width: 260px; transition: opacity var(--t-fast); box-shadow: var(--lift); }
.map-tip.is-on { opacity: 1; }
.map-tip b { display: block; font: 600 14px/1.2 var(--ui); color: var(--ink); }
.map-tip span { display: block; font: 400 11.5px/1.4 var(--mono); color: var(--mu); margin-top: 3px; }
.map-tip em { font-style: normal; color: var(--cc, var(--gold)); }
.map-label { position: absolute; left: 0; top: 0; z-index: 3; font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cc); white-space: nowrap; pointer-events: none; text-shadow: 0 0 12px var(--bg), 0 0 4px var(--bg); will-change: transform, opacity; transition: opacity .3s; }
:root[data-theme="light"] .map-label, :root[data-theme="light"] .map-tip em { color: var(--cc-l, var(--cc)); }

/* ---------- repo + guide cards ---------- */
.repo-card { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.repo-card .ow { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--mono); color: var(--mu); }
.repo-card h3 { font-size: clamp(22px, 1.8vw, 26px); }
.repo-card p { color: var(--mu); font-size: 14.5px; line-height: 1.45; }
.repo-card .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; font: 400 12px/1 var(--mono); color: var(--mu); }
.repo-card .meta .num { color: var(--cc); }
:root[data-theme="light"] .repo-card .meta .num { color: var(--cc-l, var(--rust-t)); }
:root[data-theme="light"] .repo-card .dot, :root[data-theme="light"] .catc .dot { background: var(--cc-l, var(--cc)); box-shadow: none; }
.repo-card.big h3 { font-size: clamp(28px, 2.6vw, 38px); }
.repo-card.big p { font-size: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 250px; }
.guide-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.guide-card p { color: var(--mu); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card .foot { margin-top: auto; padding-top: 10px; }
.guide-card.atlas { --cc: var(--gold); border-color: color-mix(in oklab, var(--gold) 28%, var(--rule)); background: linear-gradient(160deg, color-mix(in oklab, var(--gold) 7%, var(--sf)), var(--sf) 55%); }
.numeral { font-family: var(--ser); font-size: 44px; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--cc, var(--rust)); }

/* ---------- carousels (Swiper; core rules inlined so there is no layout shift before init) ---------- */
.swiper { position: relative; overflow: hidden; z-index: 1; }
.swiper-wrapper { position: relative; width: 100%; z-index: 1; display: flex; box-sizing: content-box; transform: translate3d(0, 0, 0); transition-property: transform; }
.swiper-horizontal { touch-action: pan-y; }
.swiper-slide { flex-shrink: 0; position: relative; transition-property: transform; height: auto; }
.swiper.rail { padding: 6px var(--pad) 28px; cursor: grab; }
.swiper.rail .swiper-slide { width: clamp(272px, 29vw, 400px); margin-right: 20px; }
.swiper.rail.wide .swiper-slide { width: clamp(288px, 36vw, 520px); }
.swiper-ctl { display: flex; align-items: center; gap: 8px; }
.swiper-ctl .icon-btn { border-color: var(--rule); font: 400 16px/1 var(--mono); }
.swiper-ctl .icon-btn[disabled] { opacity: .35; pointer-events: none; }
.swiper-ctl .more { margin-left: 12px; }

/* ---------- signup (mock) ---------- */
.signup-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.signup-form .form-msg { grid-column: 1 / -1; min-height: 20px; font: 400 12.5px/1.5 var(--mono); color: var(--sage-t); }
.signup-form .form-msg.err { color: var(--rust-t); }
@media (max-width: 520px) { .signup-form { grid-template-columns: 1fr; } }

/* ---------- stat lines ---------- */
.statline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin: 30px 0 0; border-top: 1px solid var(--rule); }
.statline > div { padding-top: 16px; }
.statline dd { margin: 0; font: 400 clamp(34px, 3.4vw, 54px)/1 var(--ser); color: var(--ink); white-space: nowrap; }
.statline dt { font: 500 11.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-top: 8px; }
.statline.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 620px) { .statline.four { grid-template-columns: 1fr 1fr; } .statline.four > div:nth-child(n+3) { border-top: 1px solid var(--rule); } }

/* ---------- inner-page hero ---------- */
.phero { position: relative; margin-top: calc(var(--mast-h) * -1); padding: calc(var(--mast-h) + clamp(36px, 6vw, 88px)) 0 clamp(36px, 5vw, 72px); overflow: clip; }
.phero-bg { position: absolute; inset: 0; z-index: 0; }
.phero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--bg)), linear-gradient(90deg, var(--bg) 0%, color-mix(in oklab, var(--bg) 70%, transparent) 34%, transparent 62%); pointer-events: none; }
.phero > .wrap { position: relative; z-index: 1; }
@media (max-width: 1080px) { .phero-bg { opacity: .5; } }
.phero h1 { max-width: 16ch; }
.phero .dek { margin-top: 20px; max-width: 46ch; }
.phero .lede { margin-top: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 500 11.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-bottom: 22px; }
.crumbs a { color: var(--mu); }
.crumbs a:hover { color: var(--rust-t); }
.crumbs .sep { color: var(--mu2); }
.crumbs [aria-current] { color: var(--ink2); }

/* toolbar above lists */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.toolbar .group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .inp { height: 38px; font-size: 14px; width: auto; }
.toolbar .search { position: relative; }
.toolbar .search .inp { padding-left: 36px; width: clamp(180px, 22vw, 280px); }
.toolbar .search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; stroke: var(--mu); fill: none; stroke-width: 1.6; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.seg button { height: 36px; padding: 0 13px; font: 500 12px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mu); transition: background-color var(--t-fast), color var(--t-fast); }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.count-line { font: 400 12.5px/1.5 var(--mono); color: var(--mu); }
.count-line b { color: var(--ink); font-weight: 500; }
.more-row { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }

/* repo list (card view of the same rows as the table) */
.rlist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 1080px) { .rlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rlist { grid-template-columns: 1fr; } }
.rlist .repo-card { min-height: 190px; }
.rlist .repo-card h3 { font-size: 22px; }

.spark polyline { fill: none; stroke: var(--sky-t); stroke-width: 1.5; }
.copy-btn { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--rust-t); padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); }
.copy-btn:hover { border-color: var(--rust-t); }

/* ==========================================================================
   Home (old board rules kept for the wire and the pinned sideways scroll)
   ========================================================================== */
.hero { position: relative; margin-top: calc(var(--mast-h) * -1); padding-top: var(--mast-h); min-height: min(calc(100svh - 58px), 1000px); display: flex; align-items: center; overflow: clip; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
/* instant CSS backdrop; the WebGL graph fades in over it */
.hero-bg::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(52% 60% at 78% 34%, color-mix(in oklab, var(--rust) 20%, transparent), transparent 70%),
  radial-gradient(40% 46% at 58% 78%, color-mix(in oklab, var(--gold) 9%, transparent), transparent 70%),
  radial-gradient(36% 40% at 16% 12%, color-mix(in oklab, var(--sky) 10%, transparent), transparent 70%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, var(--bg) 100%), linear-gradient(90deg, color-mix(in oklab, var(--bg) 78%, transparent) 0%, transparent 58%); }
.hero h1 { font-size: clamp(44px, 6.1vw, 96px); line-height: .98; margin: 22px 0 0; max-width: 11.5ch; }
.hero .dek { margin-top: clamp(16px, 2.2vh, 26px); max-width: 44ch; }
.hero .btn-row { margin-top: clamp(20px, 3vh, 32px); }

/* the Atlas cell: first-class, above the fold */

/* wire: the day's headlines on a loop */
.wire { position: relative; z-index: 2; display: flex; align-items: stretch; height: 58px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: color-mix(in oklab, var(--sf) 60%, transparent); }
.wire-lab { display: flex; align-items: center; gap: 12px; padding: 0 20px 0 var(--pad); border-right: 1px solid var(--rule); background: var(--bg); flex: none; position: relative; z-index: 2; }
.wire-view { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 60px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 60px), transparent); }
.wire-track { display: flex; width: max-content; animation: wire var(--wire-d, 90s) linear infinite; }
.wire:hover .wire-track, .wire:focus-within .wire-track { animation-play-state: paused; }
.wire ul { display: flex; flex: none; }
.wire li { display: inline-flex; align-items: center; gap: 12px; padding: 0 18px; white-space: nowrap; font-size: 14px; }
.wire li a { color: var(--ink2); }
.wire li a:hover { color: var(--rust-t); }
.wire li .num { font-size: 12px; color: var(--mu); }
.wire .tri { width: 14px; height: 12px; }
@keyframes wire { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .wire-track { animation: none; } .wire-view { overflow-x: auto; } .wire ul[aria-hidden] { display: none; } }

/* desks: pinned horizontal scroll on desktop, native swipe on touch */
.desks { overflow: clip; }
.desks-view { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.desks-view::-webkit-scrollbar { display: none; }
.desks.is-pinned .desks-view { overflow: visible; scroll-snap-type: none; }
.desks-track { display: flex; gap: var(--gutter); padding: 4px var(--pad) 8px; width: max-content; will-change: transform; }
.desk { width: clamp(288px, 33vw, 500px); scroll-snap-align: center; flex: none; }
.desk .card { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: clamp(380px, 46vh, 460px); padding: clamp(20px, 2.2vw, 32px); border-top: 2px solid var(--cc); }
.desk .numeral { font-size: clamp(64px, 6vw, 96px); }
.desk h3 { font-size: clamp(26px, 2.5vw, 36px); }
.desk p { color: var(--mu); font-size: 15px; }
.desk dl { display: flex; gap: 28px; margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.desk dd { margin: 0; font-size: 26px; line-height: 1; color: var(--ink); }
.desk dt { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-top: 6px; }
.desks-hint { align-self: flex-end; }



@media (max-width: 1080px) {
  .hero { min-height: 0; }
  .hero h1 { max-width: 13ch; }
}
@media (max-width: 720px) {
  .wire-lab .lab:last-child { display: none; }
  .wire-lab { padding-right: 14px; }
  .desks-hint { display: none; }
  .desk .card { min-height: 360px; }
}

/* ==========================================================================
   Open Source: star map hero, collection, category, repo, guide
   ========================================================================== */
/* constellation colours carry a dark (--cc) and a paper (--cc-l) value */
:root[data-theme="light"] .cc { --cc: var(--cc-l) !important; }
:root[data-theme="light"] .cc .dot, :root[data-theme="light"] .dot { box-shadow: none; }

/* ---------- hub ---------- */
.hub-search { position: relative; display: flex; align-items: center; gap: 12px; margin-top: clamp(22px, 3vw, 36px); max-width: 640px; height: 58px; padding: 0 14px 0 18px; border: 1px solid color-mix(in oklab, var(--ink) 26%, var(--rule)); border-radius: 12px; background: var(--glass-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color var(--t-med), box-shadow var(--t-med); }
.hub-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in oklab, var(--gold) 16%, transparent); }
.hub-search svg { width: 18px; height: 18px; stroke: var(--mu); fill: none; stroke-width: 1.6; flex: none; }
.hub-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; font-size: 16px; color: var(--ink); }
.hub-search input::placeholder { color: var(--mu); }
.hub-results { position: absolute; left: -1px; right: -1px; top: calc(100% + 8px); z-index: 20; background: var(--sf); border: 1px solid color-mix(in oklab, var(--ink) 20%, var(--rule)); border-radius: 12px; box-shadow: var(--lift-2); overflow: hidden; max-height: 380px; overflow-y: auto; }
.hub-results .pal-hit { grid-template-columns: 22px minmax(0, 1fr) auto; }
.hub-results .all { display: block; padding: 12px 16px; border-top: 1px solid var(--rule); font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--rust-t); text-align: left; width: 100%; }


/* how the Atlas works: sticky visual, steps drive it */
.how-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.how-visual { position: sticky; top: calc(var(--mast-h-c) + 28px); }
.how-card { border: 1px solid var(--rule); border-radius: 14px; background: var(--sf); padding: clamp(20px, 2.6vw, 36px); display: grid; gap: 26px; }
.funnel { display: grid; gap: 14px; }
.f-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 4.6em; gap: 14px; align-items: center; opacity: .32; transition: opacity var(--t-slow) var(--ease-hover); }
.f-lab { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); }
.f-bar { height: 28px; border-radius: 4px; background: var(--sf2); overflow: hidden; }
.f-bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--rust), var(--gold)); border-radius: 4px; transform: scaleX(.02); transform-origin: left; transition: transform 1.1s var(--ease-out); }
.f-num { font-size: 18px; text-align: right; color: var(--ink); }
.f-split { display: flex; gap: 4px; margin: -6px 4.6em 0 9.5em; padding: 0 14px; opacity: .32; transition: opacity var(--t-slow); }
.f-split span { width: var(--w); font: 400 11px/1 var(--mono); color: var(--mu); padding-top: 7px; border-top: 2px solid var(--rust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-split span + span { border-top-color: var(--sky); }
.f-cats, .f-week { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; opacity: .32; transition: opacity var(--t-slow); padding-top: 22px; border-top: 1px solid var(--rule); }
.f-cats span.cc { width: var(--s); height: var(--s); border-radius: 50%; background: var(--cc); box-shadow: 0 0 12px color-mix(in oklab, var(--cc) 60%, transparent); }
.f-cap { flex-basis: 100%; margin-top: 4px; }
.f-week span:not(.f-cap) { flex: 1; text-align: center; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); padding: 12px 0; border: 1px solid var(--rule); border-radius: 4px; }
.f-week span.on { color: var(--btn-fg); background: var(--btn-bg); border-color: var(--btn-bg); }
/* which parts are lit at each step (no JS: everything lit) */
html:not(.js) .f-row, html:not(.js) .f-split, html:not(.js) .f-cats, html:not(.js) .f-week { opacity: 1; }
html:not(.js) .f-bar i { transform: none; }
[data-step="1"] [data-f="1"], [data-step="2"] [data-f="1"], [data-step="2"] [data-f="2"], [data-step="3"] [data-f="1"], [data-step="3"] [data-f="2"], [data-step="3"] [data-f="3"],
[data-step="4"] [data-f], [data-step="5"] [data-f] { opacity: 1; }
[data-step="4"] .f-week { opacity: .32; }
[data-step="1"] [data-f="1"] .f-bar i, [data-step="2"] [data-f="1"] .f-bar i, [data-step="2"] [data-f="2"] .f-bar i,
[data-step="3"] .f-bar i, [data-step="4"] .f-bar i, [data-step="5"] .f-bar i { transform: none; }
.how-steps { display: grid; gap: clamp(40px, 9vh, 110px); padding: clamp(10px, 6vh, 70px) 0 clamp(40px, 12vh, 140px); }
.how-steps li { opacity: .46; transition: opacity var(--t-slow) var(--ease-hover); }
.how-steps li.is-on, html:not(.js) .how-steps li { opacity: 1; }
.how-steps h3 { font-size: clamp(34px, 3.6vw, 56px); margin: 10px 0 14px; }
.how-steps p { color: var(--ink2); font-size: 17px; line-height: 1.6; max-width: 46ch; }
.how-steps .note { margin-top: 14px; color: var(--mu); font-size: 12.5px; }
.how-steps .note b { color: var(--ink); font-weight: 500; }
.how-steps code { font: 400 .88em var(--mono); background: var(--sf2); border-radius: 3px; padding: 2px 6px; }
.how-steps .numeral { --cc: var(--gold); }
.cta-band { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 64px); align-items: center; padding: clamp(24px, 3.4vw, 48px); border-radius: 14px; }
.cta-band .dek { font-size: clamp(19px, 1.7vw, 25px); }
.cta-band .btn-row { justify-content: flex-end; }

/* ---------- Hermes chapter: the map is the hero ---------- */
.map-hero { position: relative; margin-top: calc(var(--mast-h) * -1); height: min(92svh, 900px); min-height: 600px; overflow: hidden; background: var(--bg); }
.map-ui { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--mast-h) + clamp(18px, 4vh, 48px)); background: linear-gradient(90deg, color-mix(in oklab, var(--bg) 82%, transparent) 0%, transparent 52%), linear-gradient(0deg, var(--bg) 0%, transparent 22%); }
.map-ui a, .map-ui button { pointer-events: auto; }
.map-copy { max-width: 560px; }
.map-copy h1 { font-size: clamp(42px, 5.6vw, 84px); line-height: .98; }
.map-copy .lede { margin-top: 18px; font-size: clamp(15px, 1.15vw, 17.5px); }
.map-copy .note { margin-top: 14px; }
.hint-touch, .hint-static { display: none; }
.map-hero:has(.starmap.is-static) .hint-mouse, .map-hero:has(.starmap.is-static) .hint-touch, .map-hero:has(.starmap.is-static) .map-tools { display: none; }
.map-hero:has(.starmap.is-static) .hint-static { display: inline; }
.starmap.is-static { cursor: default; }
@media (hover: none) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
.map-tools { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.map-tools .icon-btn { border-color: var(--rule); background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 400 18px/1 var(--mono); width: 44px; height: 44px; }
.map-legend { padding: 0 0 18px; }
.map-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px var(--pad); pointer-events: auto; -webkit-overflow-scrolling: touch; }
.map-chips::-webkit-scrollbar { display: none; }
.map-chips .chip { background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); flex: none; }
.map-chips .chip[aria-pressed="true"] { background: var(--ink); }
.map-label.is-off { opacity: 0 !important; }

.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); }
.cat-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.cat-card h3 { font-size: 24px; margin-top: 4px; }
.cat-card .n { font: 400 12px/1.4 var(--mono); color: var(--mu); }
.cat-card .n b { color: var(--cc); font-weight: 500; }
.cat-card ul { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--rule); }
.cat-card li { font-size: 13px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.7; }
svg.const { display: block; width: 100%; height: auto; aspect-ratio: 320 / 200; margin: -4px 0 0; }
svg.const .cl { stroke: var(--cc); stroke-width: .8; opacity: .55; }
svg.const .cs { fill: var(--cc); }
svg.const .ring { fill: none; stroke: var(--ink); stroke-width: 1.2; }
svg.const .cs.hl { fill: var(--ink); }
:root[data-theme="light"] svg.const circle[fill^="url"] { opacity: .25; }
.hg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.hg-grid > .wide { grid-column: span 2; }
.hg-grid > .wide h3 { font-size: clamp(28px, 2.8vw, 40px); }
.hg-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.week-sum { position: sticky; top: calc(var(--mast-h-c) + var(--sub-h) + 28px); }
@media (max-width: 860px) { .week-sum { position: static; } }
.growth { margin: 30px 0 0; }
.growth svg { display: block; width: 100%; height: 120px; overflow: visible; }
.g-line { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
:root[data-theme="light"] .g-line { stroke: var(--rust); }
.growth figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.timeline { border-left: 1px solid var(--rule); margin-left: 5px; }
.timeline li { position: relative; padding: 0 0 26px 26px; display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; }
.timeline li::before { content: ""; position: absolute; left: -5.5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg); }
.tl-date { font-family: var(--ser); font-size: 24px; line-height: 1.1; }
.tl-date b { font-weight: 400; color: var(--mu); margin-right: 6px; }
.timeline dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: 6px clamp(14px, 2vw, 30px); margin: 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-2); background: var(--sf); }
.timeline dd { margin: 0; font-size: 17px; }
.timeline dt { font: 500 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-top: 3px; }
.sub-h { font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin: 14px 0 8px; }
.arrivals { border-top: 1px solid var(--rule); }
.arrivals a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink); transition: padding var(--t-med) var(--ease-out); }
.arrivals a:hover { padding-left: 6px; }
.arrivals a:hover b { color: var(--rust-t); }
.arrivals .t { min-width: 0; }
.arrivals b { font-weight: 600; display: block; }
.arrivals .t span { display: block; font-size: 13.5px; color: var(--mu); line-height: 1.4; }
.arrivals .num { font-size: 12px; color: var(--mu); white-space: nowrap; }
.ledger { margin-top: 16px; }
.ledger summary { cursor: pointer; font: 500 12px/1.4 var(--mono); letter-spacing: .04em; color: var(--ink2); padding: 8px 0; }
.ledger p { margin-top: 8px; overflow-wrap: anywhere; }

/* ---------- category ---------- */
.cat-hero { padding-bottom: clamp(20px, 3vw, 40px); }
.cat-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: end; }
.cat-hero h1 { font-size: clamp(38px, 5vw, 76px); max-width: 15ch; }
.cat-chart { margin: 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--sf); padding: 14px 16px 12px; }
.cat-chart svg.const { aspect-ratio: 320 / 200; }
.filters { align-items: flex-end; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius-2); background: var(--sf); }
.filters .group { align-items: flex-end; gap: 12px 14px; }
.filters .inp { background: var(--bg); min-width: 150px; }
.filters .seg { background: var(--bg); }
.tier-A { border-color: color-mix(in oklab, var(--gold) 50%, var(--rule)); }
.tier-B { color: var(--mu); }

/* ---------- repo ---------- */
.repo-hero { padding-bottom: clamp(24px, 3vw, 44px); }
.repo-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.repo-hero h1 { font-size: clamp(48px, 7vw, 112px); }
.repo-hero .owner { margin-top: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--mu); }
.repo-hero .dek { margin-top: 18px; }
.repo-hero .btn-row { margin-top: 26px; }
.facts { border-radius: 14px; padding: 18px; }
.facts .chart { margin: 0 0 6px; }
.facts .chart figcaption { display: flex; justify-content: space-between; gap: 10px; }
.facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 10px 0 12px; }
.facts dl > div { padding: 11px 0; border-top: 1px solid var(--rule); }
.facts dt { font: 500 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); }
.facts dd { margin: 5px 0 0; font-size: 18px; color: var(--ink); min-height: 1.3em; }
.repo-body { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 88px); padding-top: clamp(28px, 4vw, 56px); align-items: start; }
.answer { border-left: 2px solid var(--rust); padding: 4px 0 4px 22px; margin-bottom: 8px; }
.answer p { font-family: var(--ser); font-size: clamp(22px, 2.1vw, 30px); line-height: 1.28; margin-top: 10px; color: var(--ink); }
.code-block { border: 1px solid var(--rule); border-radius: var(--radius-2); background: var(--sf); margin: 0 0 22px; overflow: hidden; }
.code-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--rule); }
.code-block pre { border: 0; margin: 0; border-radius: 0; background: transparent; }
.prose .steps { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid var(--rule); }
.prose .steps li { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.prose .steps .num { font-size: 12px; color: var(--rust-t); padding-top: 5px; }
.prose .steps b { color: var(--ink); font-weight: 600; }
.prose .steps p { margin: 4px 0 0; font-size: 16px; color: var(--mu); }
.repo-rail { position: sticky; top: calc(var(--mast-h-c) + var(--sub-h) + 24px); display: grid; gap: 26px; }
.rail-box h2 { margin-bottom: 12px; }
.rail-list li a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--rule); color: var(--ink2); font-size: 15px; }
.rail-list li a:hover { color: var(--rust-t); }

/* ---------- guide ---------- */
.guide-hero h1 { max-width: 14ch; }
.guide-hero .dek { max-width: 60ch; font-size: clamp(18px, 1.5vw, 22px); }
.guide-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.guide-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 88px); padding-top: clamp(28px, 4vw, 56px); align-items: start; }
.guide-rail { position: sticky; top: calc(var(--mast-h-c) + var(--sub-h) + 24px); max-height: calc(100vh - var(--mast-h-c) - var(--sub-h) - 48px); overflow-y: auto; scrollbar-width: thin; display: grid; gap: 14px; padding-right: 4px; }
.rail-card { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-2); background: var(--sf); }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--sf2); stroke-width: 5; }
.ring circle.v { stroke: var(--rust); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease-out); }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; }
.checklist { border-top: 1px solid var(--rule); }
.checklist li { display: flex; align-items: flex-start; border-bottom: 1px solid var(--rule); }
.checklist label { flex: 1; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; min-width: 0; }
.checklist .bx { width: 20px; height: 20px; border: 1.5px solid var(--mu); border-radius: 4px; flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; transition: background-color var(--t-fast), border-color var(--t-fast); }
.checklist .bx svg { width: 13px; height: 13px; stroke: var(--bg); fill: none; stroke-width: 2.2; opacity: 0; transform: scale(.5); transition: opacity var(--t-fast), transform var(--t-med) var(--ease-out); }
.checklist input:checked + .bx { background: var(--sage); border-color: var(--sage); }
.checklist input:checked + .bx svg { opacity: 1; transform: none; }
.checklist input:focus-visible + .bx { outline: 2px solid var(--rust-t); outline-offset: 2px; }
.checklist .tx { min-width: 0; }
.checklist .tx b { display: block; font-weight: 500; font-size: 14.5px; line-height: 1.35; color: var(--ink); transition: color var(--t-fast); }
.checklist .tx small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--mu); margin-top: 3px; }
.checklist input:checked ~ .tx b { color: var(--mu); text-decoration: line-through; text-decoration-color: var(--mu2); }
.checklist li.is-current .tx b { color: var(--rust-t); }
.checklist .jump { padding: 12px 4px 12px 10px; color: var(--mu); font: 400 13px/1.4 var(--mono); }
.guide-main { min-width: 0; max-width: 760px; }
.guide-main .prose > h2:first-child { margin-top: 0; }
.guide-block { margin-top: 56px; }
.guide-block > h2 { font-size: clamp(28px, 2.8vw, 40px); margin-bottom: 18px; scroll-margin-top: calc(var(--mast-h-c) + var(--sub-h) + 20px); }
ol.src { border-top: 1px solid var(--rule); }
ol.src li { display: grid; grid-template-columns: 30px 1fr; gap: 6px; padding: 11px 0; border-bottom: 1px solid var(--rule); font: 400 13.5px/1.5 var(--mono); }
ol.src .num { color: var(--mu); }
ol.src a { color: var(--ink2); overflow-wrap: anywhere; }
ol.src a:hover { color: var(--rust-t); }
.next-guide { margin-top: 56px; display: grid; gap: 12px; border-color: color-mix(in oklab, var(--gold) 30%, var(--rule)); }
.next-guide h2 { font-size: clamp(28px, 3vw, 44px); }
.next-guide p { color: var(--mu); }
.next-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; border-top: 1px solid var(--rule); margin-top: 6px; }
.next-steps li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.next-steps .num { font-size: 12px; color: var(--rust-t); width: 22px; flex: none; padding-top: 2px; }
.next-steps .more { color: var(--mu); }

@media (max-width: 1080px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-visual { position: relative; top: 0; }
  .how-visual[data-step] [data-f], .how-visual [data-f] { opacity: 1; }
  .how-visual .f-bar i { transform: none; }
  .how-steps { padding: 0; gap: 34px; }
  .how-steps li { opacity: 1; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .btn-row { justify-content: flex-start; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-hero-grid, .repo-grid, .repo-body, .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .repo-rail, .guide-rail { position: static; max-height: none; overflow: visible; }
  .cat-chart { max-width: 420px; }
  .map-tools { top: auto; bottom: 92px; transform: none; flex-direction: row; }
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-card { padding: 12px 12px 14px; }
  .cat-card h3 { font-size: 20px; }
  .hg-grid, .hg-grid.two-up { grid-template-columns: minmax(0, 1fr); }
  .hg-grid > .wide { grid-column: auto; }
  .map-hero { height: min(88svh, 760px); min-height: 560px; }
  .map-ui { background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 88%, transparent) 0%, transparent 46%), linear-gradient(0deg, var(--bg) 0%, transparent 20%); }
  .map-copy .lede { display: none; }
  .map-hero .map-label { font-size: 9px; letter-spacing: .06em; }
  .timeline dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .f-row { grid-template-columns: 1fr 4.4em; }
  .f-row .f-lab { grid-column: 1 / -1; }
  .f-split { margin: -6px 4.4em 0 0; padding: 0 14px 0 0; }
  .filters .group, .filters .field, .filters .inp, .filters .search, .filters .search .inp { width: 100%; }
  .next-steps { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   News river + day page, guide library, tools + prices, about
   ========================================================================== */

/* ---------- news river ---------- */
.daycard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px clamp(24px, 4vw, 64px); align-items: end; padding: clamp(22px, 3vw, 40px); border-radius: 14px; background: radial-gradient(60% 120% at 100% 0%, color-mix(in oklab, var(--rust) 14%, transparent), transparent 60%), var(--sf); }
.daycard h2 { font-size: clamp(34px, 4.2vw, 60px); margin: 12px 0 12px; }
.daycard dl { display: flex; gap: clamp(18px, 2.4vw, 36px); margin: 0; }
.daycard dd { margin: 0; font-size: 30px; line-height: 1; }
.daycard dt { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-top: 6px; }
.daycard .go { grid-column: 1 / -1; }
.days-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.river-day { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 9.6fr); gap: var(--gutter); border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 8px; }
.river-date { position: sticky; top: calc(var(--mast-h-c) + 20px); align-self: start; font-size: clamp(22px, 2vw, 28px); line-height: 1.1; padding-bottom: 20px; }
.river-date .dow { display: block; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--rust-t); margin-bottom: 8px; }
.river-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 4px 0 30px; }
.river-item + .river-item { border-top: 1px solid var(--rule); padding-top: 26px; }
.ri-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--mu); padding-top: 6px; }
.ri-body h3 { font-size: clamp(24px, 2.5vw, 34px); }
.ri-body h3 a { color: var(--ink); background: linear-gradient(var(--rust), var(--rust)) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease-out), color var(--t-fast); }
.ri-body h3 a:hover { color: var(--rust-t); background-size: 100% 1px; }
.ri-body > p { color: var(--ink2); margin-top: 10px; max-width: 70ch; }
.ri-body .tk { max-width: 70ch; }
.ri-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.ri-tags { display: flex; gap: 10px; flex-wrap: wrap; font: 400 12px/1 var(--mono); color: var(--mu); }

/* ---------- day page ---------- */
.day-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 88px); padding-top: clamp(28px, 4vw, 56px); align-items: start; }
.day-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 0 0 44px; margin-bottom: 44px; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--mast-h-c) + var(--sub-h) + 20px); }
.day-item h2 { font-size: clamp(28px, 3vw, 42px); }
.day-lede { font-size: 18px; line-height: 1.65; color: var(--ink2); margin-top: 14px; }
.day-item .tk .t { font-size: 22px; }
.day-item ol.src { margin-top: 18px; }
.day-rail { position: sticky; top: calc(var(--mast-h-c) + var(--sub-h) + 24px); display: grid; gap: 30px; }
.wire-list { margin-top: 12px; border-top: 1px solid var(--rule); }
.wire-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 6px; justify-items: start; }
.wire-list a { color: var(--ink2); font-size: 14.5px; line-height: 1.4; }
.wire-list a:hover { color: var(--rust-t); }
.wire-list .num { font-size: 11.5px; color: var(--mu); }

/* ---------- guide library ---------- */
.g-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.g-index { columns: 3; column-gap: var(--gutter); border-top: 1px solid var(--rule); padding-top: 6px; }
.g-index li { break-inside: avoid; }
.g-index a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink2); font-size: 14.5px; line-height: 1.35; }
.g-index a:hover { color: var(--rust-t); }
.g-index .note { white-space: nowrap; flex: none; }
.g-index .badge { flex: none; }

/* ---------- tools + prices ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.tool-card { display: flex; flex-direction: column; gap: 10px; }
.tool-card .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tool-card h3 { font-size: clamp(30px, 3vw, 42px); }
.tool-price { font-size: 13px; color: var(--ink); text-align: right; }
.tool-card .row .lab { flex: none; }
.tool-card .good { font-family: var(--ser); font-style: italic; font-size: 19px; color: var(--ink2); line-height: 1.3; }
.tool-facts { margin: 4px 0 6px; border-top: 1px solid var(--rule); }
.tool-facts li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--rule); font-size: 13.5px; color: var(--mu); line-height: 1.45; }
.tool-facts li::before { position: absolute; left: 0; top: 8px; font: 500 14px/1.4 var(--mono); }
.tool-facts .plus::before { content: "+"; color: var(--sage-t); }
.tool-facts .minus::before { content: "−"; color: var(--rust-t); }
.chip.ok { border-color: color-mix(in oklab, var(--sage) 60%, var(--rule)); color: var(--sage-t); }
.tool-card .foot { margin-top: auto; padding-top: 12px; }
table.prices td .stamp { height: 24px; font-size: 10.5px; }
table.prices .spark { display: block; }
.moves { display: grid; gap: 22px; }
.moves li { border-top: 1px solid var(--rule); padding-top: 14px; }
.moves a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 12px 0; color: var(--ink); font-family: var(--ser); font-size: 24px; line-height: 1.2; }
.moves a:hover { color: var(--rust-t); }
.moves a .up, .moves a .dn { font-size: 14px; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.more-grid .card { display: flex; flex-direction: column; gap: 10px; min-height: 210px; }
.more-grid p { color: var(--mu); font-size: 15px; }
.more-grid .go { margin-top: auto; }

/* ---------- about ---------- */
.about-hero h1 { max-width: 12ch; }
.oneline { list-style: none !important; padding: 0 !important; margin: 28px 0 0 !important; border-top: 1px solid var(--rule); }
.oneline li { margin: 0 !important; }
.oneline a { display: grid; grid-template-columns: 130px minmax(0, 1fr) 20px; gap: 14px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule) !important; color: var(--ink) !important; transition: padding var(--t-med) var(--ease-out); }
.oneline a:hover { padding-left: 8px; }
.oneline b { font-family: var(--ser); font-weight: 400; font-size: 21px; line-height: 1.25; }
.oneline i { font-style: normal; color: var(--mu); }
.rami { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.portrait { margin: 0; position: sticky; top: calc(var(--mast-h-c) + 28px); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--sf); }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(.9) contrast(1.02); }
.portrait figcaption { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.rami h2 { font-size: clamp(44px, 6vw, 88px); }
.policy { margin-top: 26px; border-top: 1px solid var(--rule); }
.policy li { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--mu); font-size: 15.5px; }
.policy b { color: var(--ink); font-weight: 600; }
.rules { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.rules li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.rules p { font-family: var(--ser); font-size: clamp(20px, 1.8vw, 25px); line-height: 1.3; }

@media (max-width: 1080px) {
  .chat-cols { grid-template-columns: 1fr; }
  .chat-prompt { border-right: 0; border-bottom: 1px solid var(--rule); }
  .issue-card, .portrait, .day-rail { position: static; }
  .day-grid, .rami { grid-template-columns: minmax(0, 1fr); }
  .g-grid, .tool-grid, .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-index { columns: 2; }
  .portrait { max-width: 360px; }
}
@media (max-width: 720px) {
  .g-grid, .tool-grid, .more-grid, .fit-grid, .queue ul { grid-template-columns: minmax(0, 1fr); }
  .g-index { columns: 1; }
  .river-day { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .river-date { position: static; padding-bottom: 8px; }
  .river-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ri-meta { flex-direction: row; align-items: center; padding-top: 0; }
  .daycard { grid-template-columns: minmax(0, 1fr); }
  .day-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .day-item .numeral { font-size: 34px; }
  .chat-out { min-height: 520px; }
  .chat-ctl .note { margin-left: 0; }
  .oneline a { grid-template-columns: minmax(0, 1fr) 20px; }
  .oneline a .lab { grid-column: 1 / -1; }
  .rules li { grid-template-columns: 56px minmax(0, 1fr); }
  .moves a { font-size: 20px; grid-template-columns: 22px minmax(0, 1fr); }
  .moves a .note { grid-column: 2; }
}


/* ==========================================================================
   Redesign layer (17 Nov 2026): Open Source is the hero.
   The open-source star map is the visual signature; everything else stays quiet.
   Tokens are the Logic of Logic ones above. Nothing here adds a colour.
   ========================================================================== */

/* ---------- line-draw dividers between sections (site.js scales [data-draw] in) ---------- */
hr.rule.draw { margin: 0 0 clamp(24px, 3vw, 44px); background: linear-gradient(90deg, var(--rust) 0, var(--rule) 180px, var(--rule) 100%); }

/* ---------- home hero: the live map, full bleed ---------- */
.os-hero { position: relative; margin-top: calc(var(--mast-h) * -1); min-height: max(100svh, 660px); display: flex; overflow: clip; background: var(--bg); }
.os-map { position: absolute; inset: 0; cursor: default; touch-action: auto; }
.os-map.is-hot { cursor: pointer; }
.os-map .map-label { font-size: 10px; }
.os-ui { position: relative; z-index: 4; width: 100%; display: flex; flex-direction: column; pointer-events: none; padding-top: calc(var(--mast-h) + clamp(16px, 4.5vh, 56px));
  background: linear-gradient(90deg, color-mix(in oklab, var(--bg) 90%, transparent) 0%, color-mix(in oklab, var(--bg) 58%, transparent) 32%, transparent 60%), linear-gradient(0deg, var(--bg) 0%, color-mix(in oklab, var(--bg) 40%, transparent) 14%, transparent 30%);
  will-change: opacity, transform; }
.os-ui a, .os-ui button, .os-ui form, .os-ui input { pointer-events: auto; }
.os-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 72px); align-items: center; padding-bottom: clamp(16px, 3vh, 36px); }
.os-copy { max-width: 760px; }
.os-copy .kick { margin-bottom: 0; }
.os-copy h1 { font-size: clamp(42px, min(6.1vw, 11.6vh), 98px); line-height: .96; letter-spacing: -.02em; margin: clamp(14px, 2vh, 22px) 0 0; max-width: 11.6ch; }
.os-copy .hub-search { margin-top: clamp(20px, 3.4vh, 40px); max-width: 600px; height: 62px; }
.hub-search kbd { font: 500 11px/1 var(--mono); color: var(--mu); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 6px; flex: none; }
@media (hover: none) { .hub-search kbd { display: none; } }
.os-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; max-width: 760px; }
.os-chips .chip { background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.os-chips .chip:hover { border-color: var(--cc, var(--ink)); }
.os-side { align-self: end; justify-self: end; width: min(100%, 380px); margin-bottom: clamp(8px, 4vh, 48px); }

/* repo of the day: a plate label tied to its own star */
.os-rotd { position: relative; display: grid; gap: 8px; padding: 16px 18px; border: 1px solid color-mix(in oklab, var(--gold) 36%, var(--rule)); border-radius: 12px; color: inherit;
  background: color-mix(in oklab, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); box-shadow: var(--lift-2), inset 0 1px 0 color-mix(in oklab, var(--ink) 8%, transparent);
  transition: border-color var(--t-med) var(--ease-hover), transform var(--t-med) var(--ease-out); }
.os-rotd:hover { color: inherit; border-color: var(--gold); transform: translate3d(0, -2px, 0); }
.os-rotd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.os-rotd-name { font: 400 clamp(26px, 2.3vw, 34px)/1.04 var(--ser); letter-spacing: -.01em; transition: color var(--t-fast); }
.os-rotd:hover .os-rotd-name { color: var(--rust-t); }
.os-rotd-tg { font-size: 14px; line-height: 1.45; color: var(--mu); }
.os-rotd .meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; font: 400 12px/1 var(--mono); color: var(--mu); }
.os-rotd .meta .num { color: var(--cc); }
:root[data-theme="light"] .os-rotd .meta .num { color: var(--cc-l, var(--rust-t)); }
.os-rotd .arr { margin-left: auto; font-style: normal; transition: transform var(--t-med) var(--ease-out), color var(--t-fast); }
.os-rotd:hover .arr { transform: translateX(5px); color: var(--gold); }
.os-leader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.os-leader line { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 2 5; opacity: 0; transition: opacity .35s; }
.os-leader circle { fill: var(--gold); opacity: 0; transition: opacity .35s; }
:root[data-theme="light"] .os-leader line { stroke: var(--rust); }
:root[data-theme="light"] .os-leader circle { fill: var(--rust); }
.os-map.is-static ~ .os-leader { display: none; }

/* chart furniture: what the marks mean, said once */
.os-plate { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 16px var(--pad) 20px; position: relative; }
.os-plate::before { content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 0; height: 7px; border-top: 1px solid color-mix(in oklab, var(--ink) 16%, transparent);
  background: repeating-linear-gradient(90deg, color-mix(in oklab, var(--ink) 28%, transparent) 0 1px, transparent 1px 44px); }
.os-mag { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.os-mag-row { display: inline-flex; align-items: center; }
.os-mag-row i { width: var(--s); height: var(--s); border-radius: 50%; background: var(--ink); box-shadow: 0 0 calc(var(--s) * 1.1) color-mix(in oklab, var(--gold) 70%, transparent); flex: none; }
.os-mag-row b { font: 400 11px/1 var(--mono); color: var(--mu); margin: 0 14px 0 7px; }
:root[data-theme="light"] .os-mag-row i { box-shadow: none; }
.os-cap { max-width: 60ch; text-align: right; }
.map-tip .tg { font-family: var(--ui); font-size: 12.5px; color: var(--ink2); }

@media (max-width: 1080px) {
  .os-hero { min-height: max(100svh, 620px); }
  .os-ui { padding-top: calc(var(--mast-h) + 14px); background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 86%, transparent) 0%, color-mix(in oklab, var(--bg) 66%, transparent) 40%, color-mix(in oklab, var(--bg) 8%, transparent) 56%, transparent 84%, var(--bg) 100%); }
  .os-map .map-label { display: none; }
  .os-rotd { padding: 13px 15px; gap: 5px; }
  .os-rotd-name { font-size: 24px; }
  .os-rotd-tg { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .os-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; align-content: space-between; }
  .os-copy h1 { font-size: clamp(38px, 10.6vw, 68px); max-width: 12ch; }
  .os-copy .hub-search { height: 56px; margin-top: 20px; }
  .os-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 14px calc(var(--pad) * -1) 0; padding: 0 var(--pad); max-width: none; pointer-events: auto; -webkit-overflow-scrolling: touch; }
  .os-chips::-webkit-scrollbar { display: none; }
  .os-chips .chip { flex: none; }
  .os-side { justify-self: stretch; width: 100%; max-width: 460px; margin-bottom: 0; }
  .os-leader, .os-mag { display: none; }
  .os-plate { padding-top: 14px; padding-bottom: 14px; }
  .os-cap { text-align: left; }
}

/* ---------- Open Source page: the map you can turn, with search on it ---------- */
.os-map-hero { height: max(min(100svh, 980px), 780px); }
.os-map-hero .map-copy { max-width: 580px; }
.os-map-hero .map-copy h1 { font-size: clamp(38px, min(4.9vw, 8.6vh), 76px); max-width: 15ch; }
.os-map-hero .map-copy .lede { margin-top: 14px; }
.os-map-hero .hub-search { pointer-events: auto; margin-top: 20px; max-width: 520px; height: 56px; }
.os-map-hero .os-rotd { margin-top: 14px; max-width: 520px; padding: 13px 16px; gap: 5px; }
.os-map-hero .os-rotd-name { font-size: 24px; }
.os-map-hero .os-rotd-tg { font-size: 13px; }
.os-map-hero .map-copy .note { margin-top: 12px; max-width: 520px; }
@media (max-width: 1080px) {
  /* phone: headline and search on top, the map gets a clear band, repo of the day sits under it */
  .os-map-hero { height: max(100svh, 820px); }
  .os-map-hero .map-ui { background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 88%, transparent) 0%, color-mix(in oklab, var(--bg) 70%, transparent) 38%, transparent 50%, transparent 66%, color-mix(in oklab, var(--bg) 72%, transparent) 78%, var(--bg) 100%); }
  .os-map-hero .map-ui > .wrap { flex: 1; display: flex; min-height: 0; }
  .os-map-hero .map-copy { display: flex; flex-direction: column; width: 100%; max-width: none; }
  .os-map-hero .map-copy .lede { display: none; }
  .os-map-hero .map-copy > .rise:has(.os-rotd) { margin-top: auto; }
  .os-map-hero .os-rotd, .os-map-hero .hub-search, .os-map-hero .map-copy .note { max-width: none; }
  .os-map-hero .starmap .map-label { font-size: 9px; }
  .os-map-hero .map-tools { top: 46%; bottom: auto; right: 12px; transform: none; flex-direction: column; gap: 6px; }
  .os-map-hero .map-tools .icon-btn { width: 38px; height: 38px; font-size: 15px; }
}

/* ---------- the wire, as "this week in open source" ---------- */
.wtag { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent); border-radius: 3px; padding: 4px 6px; }
.wtag.dn { color: var(--sage-t); border-color: color-mix(in oklab, var(--sage) 55%, transparent); }
:root[data-theme="light"] .wtag { color: #7A5A06; border-color: #B8860B; }
.wire li > span:not([class]) { color: var(--ink2); }

/* ---------- categories: one constellation each ---------- */
.sec.cats { padding-top: clamp(40px, 5vw, 76px); }
.cats .desks-track { padding-top: 6px; padding-bottom: 16px; }
.cat-desk { width: clamp(264px, 23.5vw, 336px); }
.cat-desk .cat-card { height: 100%; min-height: 0; gap: 6px; padding: 14px 18px 18px; border-top: 2px solid var(--cc); }
.cat-card .plain { font-size: 13.5px; line-height: 1.45; color: var(--ink2); margin-top: 8px; min-height: 4.35em; }
.cat-card .top3 li { display: flex; justify-content: space-between; gap: 10px; }
.cat-card .top3 li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cat-card .top3 .num { flex: none; font-size: 11.5px; color: var(--mu); }
.cat-card h3 { transition: color var(--t-fast); }
/* constellations draw themselves in, then the bright stars breathe */
svg.const .cl { transition: opacity var(--t-med), stroke-width var(--t-med); }
.js .cat-card[data-reveal] svg.const .cl { stroke-dasharray: var(--l, 60); stroke-dashoffset: var(--l, 60); }
.js .cat-card[data-reveal].in svg.const .cl { animation: cl-draw 1.1s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 70ms + 180ms); }
@keyframes cl-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .cat-card[data-reveal] svg.const .cl { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; } }
svg.const .cg { transform-box: fill-box; transform-origin: center; animation: cg-breathe 3.8s ease-in-out infinite; animation-delay: calc(var(--k, 0) * -.63s); }
@keyframes cg-breathe { 0%, 100% { opacity: .34; transform: scale(.82); } 50% { opacity: .78; transform: scale(1.18); } }
:root[data-theme="light"] svg.const .cg { animation: none; }
.cat-card:hover svg.const .cl { opacity: 1; stroke-width: 1.15; }
.cat-desk.cat-end { width: clamp(264px, 26vw, 380px); }
.cat-all { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; height: 100%; min-height: 320px; padding: clamp(20px, 2.2vw, 30px);
  border-color: color-mix(in oklab, var(--gold) 34%, var(--rule)); background: radial-gradient(90% 70% at 80% 10%, color-mix(in oklab, var(--gold) 14%, transparent), transparent 70%), var(--sf); }
.cat-all h3 { font-size: clamp(30px, 2.8vw, 42px); }
.cat-all p { color: var(--mu); }
.cat-all .go i { font-style: normal; display: inline-block; transition: transform var(--t-med) var(--ease-out); }
.cat-all:hover .go i { transform: translateX(5px); }
@media (max-width: 1080px) { .cat-desk { width: min(78vw, 320px); } .cat-desk.cat-end { width: min(78vw, 320px); } }
/* the 5-column grid on the Open Source page */
.cat-grid .cat-card { border-top: 2px solid var(--cc); }
@media (max-width: 1280px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat-grid .cat-card .plain { display: none; } }
@media (max-width: 420px) { .cat-grid { grid-template-columns: 1fr; } .cat-grid .cat-card .plain { display: block; min-height: 0; } }

/* ---------- repo cards: language chip ---------- */
.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang i { width: 8px; height: 8px; border-radius: 50%; background: var(--lc, var(--mu)); flex: none; }
.repo-card .meta .num span { color: inherit; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 960px) { .pick-grid { grid-template-columns: 1fr; } }
.preview-note { display: block; padding: 10px 14px; border-left: 2px solid var(--rule); color: var(--mu); }

/* ---------- growth line draws itself ---------- */
.js [data-growth] .g-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js [data-growth].is-drawn .g-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease-out) .2s; }

/* ---------- collections ---------- */
.coll { align-items: center; }
.coll-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 40px); border-radius: 14px; border-color: color-mix(in oklab, var(--gold) 34%, var(--rule)); background: radial-gradient(80% 90% at 100% 0%, color-mix(in oklab, var(--gold) 10%, transparent), transparent 62%), var(--sf); }
.coll-card .row { display: flex; align-items: center; gap: 10px; }
.coll-card h3 { font-size: clamp(42px, 4.6vw, 72px); }
.coll-card p { color: var(--ink2); max-width: 52ch; }
.coll-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--gutter); margin: 6px 0 0; border-top: 1px solid var(--rule); }
.coll-facts > div { padding-top: 12px; }
.coll-facts dd { margin: 0; font-size: 20px; color: var(--ink); }
.coll-facts dt { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-top: 5px; }
.coll-card .go { margin-top: 8px; }
.coll-card .go i { font-style: normal; display: inline-block; transition: transform var(--t-med) var(--ease-out); }
.coll-card:hover .go i { transform: translateX(5px); }
@media (max-width: 520px) { .coll-facts { grid-template-columns: 1fr 1fr; gap: 6px var(--gutter); } }

/* ---------- reading path: five guides in order, on a line that fills as you scroll ---------- */
.gpath { --p: 1; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); padding-top: 38px; }
.gpath-line { position: absolute; left: 0; right: 0; top: 10px; height: 2px; border-radius: 2px; background: var(--rule); }
.gpath-line i { display: block; width: 100%; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--rust), var(--gold)); transform-origin: left center; transform: scaleX(var(--p)); }
.gpath-step { position: relative; min-width: 0; }
.gpath-dot { position: absolute; left: 22px; top: -34px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--rule); transition: border-color .3s, background-color .3s, box-shadow .3s; }
.gpath-step.is-on .gpath-dot, html:not(.js) .gpath-dot { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 5px color-mix(in oklab, var(--gold) 18%, transparent); }
.gpath .guide-card h3 { font-size: clamp(20px, 1.55vw, 24px); }
.gpath .guide-card { min-height: 300px; }
@media (max-width: 1240px) {
  .gpath { grid-template-columns: minmax(0, 1fr); padding: 0 0 0 34px; gap: 14px; }
  .gpath-line { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .gpath-line i { transform-origin: center top; transform: scaleY(var(--p)); background: linear-gradient(180deg, var(--rust), var(--gold)); }
  .gpath-dot { left: -31px; top: 26px; }
  .gpath .guide-card { min-height: 0; }
  .gpath .guide-card h3 { font-size: 24px; }
}

/* ---------- price bar race ---------- */
.race-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.race-rows { display: grid; gap: 7px; }
.race-row { display: grid; grid-template-columns: minmax(118px, 200px) minmax(0, 1fr) 62px; gap: 12px; align-items: center; min-height: 34px; will-change: transform; }
.race-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.race-name b { font: 600 13.5px/1.15 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-name small { font: 400 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mu); }
.race-bar { height: 22px; border-radius: 3px; background: color-mix(in oklab, var(--sf2) 72%, transparent); overflow: hidden; }
.race-bar i { display: block; height: 100%; width: var(--w); min-width: 3px; border-radius: 3px; background: var(--tone, var(--mu)); transform-origin: left center; transition: width .75s var(--ease-io); }
.js .race:not(.in) .race-bar i { transform: scaleX(0); }
.js .race.in .race-bar i { transform: none; transition: transform 1.15s var(--ease-out) calc(var(--i, 0) * 45ms), width .75s var(--ease-io); }
.race-val { text-align: right; font-size: 13px; color: var(--ink); }
.tone-rust { --tone: var(--rust); } .tone-sage { --tone: var(--sage); } .tone-sky { --tone: var(--sky); } .tone-gold { --tone: var(--gold); }
.race-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font: 400 11.5px/1 var(--mono); color: var(--mu); }
.race-key li { display: inline-flex; align-items: center; gap: 7px; }
.race-key i { width: 10px; height: 10px; border-radius: 2px; background: var(--tone); }
.race-two { align-items: center; }
.race-sub { margin-top: 34px; }
[data-prices] .race { margin-bottom: 8px; }
@media (max-width: 520px) { .race-row { grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) 54px; gap: 8px; } }

/* ---------- one plain email field, under the Logic of Logic name ---------- */
.foot-signup { margin-top: 26px; max-width: 430px; }
.foot-signup label { grid-column: 1 / -1; }
.foot-signup .form-msg { min-height: 18px; }
.mock-note { color: var(--mu); }

/* the site footer is also .foot: keep its padding and gradient out of card footers */
.card .foot { padding: 12px 0 0; background: none; overflow: visible; z-index: auto; }
.guide-card .foot { margin-top: auto; }

/* ==========================================================================
   News (restored 17 Nov): the mirror of the hero — a flowing field of the
   latest briefs on the left, the headlines and the email signup on the right.
   ========================================================================== */
.news-sec { position: relative; padding-top: clamp(40px, 5vw, 80px); }
.news-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 56px); align-items: center; }
.news-stage { position: relative; height: clamp(540px, 76vh, 780px); margin-left: calc(var(--pad) * -1); }
.newsfield { position: absolute; inset: 0; cursor: default;
  background: radial-gradient(70% 60% at 62% 48%, color-mix(in oklab, var(--rust) 9%, var(--bg)) 0%, var(--bg) 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 100%); }
.newsfield.is-hot { cursor: pointer; }
.newsfield .map-label.news-day { color: var(--gc, var(--mu)); font-size: 10.5px; }
.newsfield .map-label.news-day[style*="--mu"] { color: var(--ink2); }
:root[data-theme="light"] .newsfield .map-label.news-day[style*="--gold"], :root[data-theme="light"] .news-groups li[style*="--gold"] i { color: #7A5A06; --gc: #9A6A00; }
.newsfield .map-tip { max-width: 300px; }
.news-key { position: absolute; left: var(--pad); right: 0; bottom: 6px; z-index: 4; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.news-groups { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 11.5px/1 var(--mono); color: var(--mu); }
.news-groups li { display: inline-flex; align-items: center; gap: 7px; }
.news-groups i { width: 8px; height: 8px; border-radius: 50%; background: var(--gc); box-shadow: 0 0 9px color-mix(in oklab, var(--gc) 70%, transparent); }
:root[data-theme="light"] .news-groups i { box-shadow: none; }
.news-leader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.news-leader line { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 2 5; opacity: 0; transition: opacity .3s; }
.news-leader circle { fill: var(--gold); opacity: 0; transition: opacity .3s; }
:root[data-theme="light"] .news-leader line { stroke: var(--rust); }
:root[data-theme="light"] .news-leader circle { fill: var(--rust); }
.news-sec:has(.newsfield.is-static) .news-leader { display: none; }
.news-copy { position: relative; z-index: 4; min-width: 0; }
.news-copy .lede { margin-top: 14px; }
.news-list { margin-top: 22px; border-top: 1px solid var(--rule); }
.news-list a { position: relative; display: grid; gap: 5px; padding: 13px 0 13px 14px; border-bottom: 1px solid var(--rule); color: var(--ink); transition: padding var(--t-med) var(--ease-out), background-color var(--t-fast); }
.news-list a::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 2px; border-radius: 2px; background: var(--gc); opacity: .55; transition: opacity var(--t-fast), transform var(--t-med) var(--ease-out); transform-origin: center; }
.news-list a:hover, .news-list a.is-lit { padding-left: 20px; color: var(--ink); }
.news-list a:hover::before, .news-list a.is-lit::before { opacity: 1; }
.news-list a:hover b { color: var(--rust-t); }
.news-list b { font-weight: 600; font-size: 15.5px; line-height: 1.32; transition: color var(--t-fast); }
.nl-meta { display: inline-flex; align-items: center; gap: 8px; font: 400 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mu); }
.nl-meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--gc); flex: none; }
.news-signup { margin-top: 24px; }
.news-signup label, .phero-signup label { grid-column: 1 / -1; }
.news-more { margin-top: 6px; }
@media (max-width: 1080px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .news-stage { height: clamp(330px, 50vh, 440px); margin: 0 calc(var(--pad) * -1); }
  .newsfield { -webkit-mask-image: none; mask-image: none; }
  .newsfield .map-label.news-day { font-size: 9px; }
  .news-key { bottom: 2px; }
  .news-groups { font-size: 10.5px; gap: 5px 12px; }
  .news-key .note { display: none; }
}

/* ---------- email signup dialog (opens from the masthead and the menus) ---------- */
.mast-sub { margin-left: 2px; }
@media (max-width: 1080px) { .mast-sub { display: none; } }
.sgn { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 20px; visibility: hidden; pointer-events: none; }
.sgn.is-open { visibility: visible; pointer-events: auto; }
.sgn-veil { position: absolute; inset: 0; background: var(--veil); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--t-med); }
.sgn.is-open .sgn-veil { opacity: 1; }
.sgn-panel { position: relative; width: min(100%, 540px); padding: clamp(24px, 4vw, 40px); border: 1px solid color-mix(in oklab, var(--ink) 18%, var(--rule)); border-radius: 14px;
  background: radial-gradient(80% 90% at 100% 0%, color-mix(in oklab, var(--rust) 14%, transparent), transparent 62%), var(--sf); box-shadow: var(--lift-2);
  opacity: 0; transform: translate3d(0, 14px, 0) scale(.98); transition: opacity var(--t-med) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.sgn.is-open .sgn-panel { opacity: 1; transform: none; }
.sgn-h { font: 400 clamp(28px, 3.2vw, 40px)/1.06 var(--ser); letter-spacing: -.012em; margin: 12px 0 0; text-wrap: balance; }
.sgn-h em { font-style: italic; color: var(--rust-t); }
.sgn-d { margin: 12px 0 20px; color: var(--ink2); }
.sgn-x { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); }
.sgn-x i { position: absolute; left: 11px; right: 11px; top: 50%; height: 1.5px; background: var(--ink); }
.sgn-x i:first-child { transform: rotate(45deg); } .sgn-x i:last-child { transform: rotate(-45deg); }
.sgn-x:hover { border-color: var(--ink); }

/* ---------- buy me a coffee ---------- */
.coffee { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid color-mix(in oklab, var(--gold) 45%, var(--rule)); border-radius: 99px;
  font: 500 13.5px/1 var(--ui); color: var(--ink2); background: color-mix(in oklab, var(--gold) 6%, transparent); transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast); white-space: nowrap; }
.coffee svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:root[data-theme="light"] .coffee svg { stroke: #7A5A06; }
.coffee:hover { border-color: var(--gold); color: var(--ink); background: color-mix(in oklab, var(--gold) 12%, transparent); }
.coffee:hover svg path:nth-child(3) { animation: steam 1.4s var(--ease-out) infinite; }
@keyframes steam { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-1.5px); opacity: .55; } }
.foot-signup + .coffee { margin-top: 14px; }
.support-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px clamp(20px, 4vw, 56px); align-items: center; margin-top: clamp(28px, 4vw, 48px); padding: clamp(20px, 3vw, 32px); border-radius: 14px;
  border-color: color-mix(in oklab, var(--gold) 30%, var(--rule)); background: radial-gradient(70% 120% at 100% 50%, color-mix(in oklab, var(--gold) 9%, transparent), transparent 64%), var(--sf); }
.support-band .dek { margin-top: 10px; max-width: 56ch; }
@media (max-width: 640px) { .support-band { grid-template-columns: 1fr; } }
.phero-signup { margin-top: 22px; max-width: 520px; position: relative; z-index: 2; }
.about-hero ~ section .btn-row .coffee { min-height: 46px; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
