/* HiddenState. One rule: whatever matters to a machine sits one shade off.
   Palette sampled from logo-06-redacted.png: paper 233/230/223, bar 14, hidden text 15, ink 16.
   Ink is 16, not 0, so a levels adjustment at 14/15 erases the human layer and leaves the bars. */

@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
/* Plex Mono has no Greek: Sigma and friends come from Inter Tight, mapped into the mono family. */
@font-face { font-family: "Plex Mono"; src: url("/fonts/hs-math.woff2") format("woff2"); font-weight: 400 500; font-display: swap; unicode-range: U+0394, U+03A3, U+03B1-03B2, U+03B5, U+03BB, U+03C0, U+03C3-03C4, U+2208, U+2211; }

:root {
  --paper: #e9e6df;      /* 233 230 223 */
  --paper-1: #e8e5de;    /* one shade off: paper secrets */
  --bar: #0e0e0e;        /* 14 */
  --hid: #0f0f0f;        /* 15 */
  --ink: #101010;        /* 16 */
  --ink-2: #57554f;      /* secondary text on paper, 7.0:1 */
  --rule: #c9c5bc;
  --paper-2: #dcd8cf;    /* quiet fills */
  --sel: #0e0e0e;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --hdr: 56px;
  --ease: cubic-bezier(.2, .7, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 16px); overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.5 var(--sans); font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
img, svg, canvas, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums; }
sub { font-size: .7em; line-height: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.small { font-size: 14px; color: var(--ink-2); max-width: 60ch; }
.sub { font-size: 13px; color: var(--ink-2); margin: -.25em 0 1.25em; }

/* Selection is inverted: selecting normal text redacts it; selecting hidden text declassifies it. */
::selection { background: var(--sel); color: var(--paper); }
.rd ::selection, .rd::selection, .lk-hid::selection, .lk-hid ::selection, .hid::selection, .vid-hid ::selection,
.rd-block ::selection, .fm ::selection { background: var(--paper); color: var(--bar); }
.ps::selection { background: var(--bar); color: var(--paper); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--bar); color: var(--paper); padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 8px; }

/* ------------------------------------------------------------------ redaction primitives */
.rd {
  background: var(--bar); color: var(--hid);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: .06em .28em; line-height: 1.62; border-radius: 0;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
.rd.is-lit, .is-declass .rd, .rd:target { background: transparent; color: var(--ink); box-shadow: inset 0 -1px 0 var(--rule); }
.ps { color: var(--paper-1); }
.is-declass .ps { color: var(--ink-2); }
.rd-block { background: var(--bar); color: var(--hid); padding: clamp(16px, 3vw, 28px); font-size: 15px; line-height: 1.6; }
.rd-block p:last-child { margin: 0; }
.is-declass .rd-block { background: var(--paper-2); color: var(--ink); }

/* ------------------------------------------------------------------ header */
.hdr {
  position: sticky; top: 0; z-index: 30; height: var(--hdr);
  display: flex; align-items: center; gap: 16px;
  /* same left and right edges as the text column */
  padding: 0 max(var(--gut), calc((100% - var(--max)) / 2 + var(--gut)));
  background: rgb(233 230 223 / .94); border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(8px)) { .hdr { background: rgb(233 230 223 / .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); } }
.hdr-logo { display: block; flex: none; padding: 6px 0; }
.hdr-logo .logo { height: 20px; width: auto; }
.logo .lg-bar { fill: var(--bar); } .logo .lg-hid { fill: var(--hid); } .logo .lg-ink { fill: var(--ink); }
.hn { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; justify-content: center; }
.hn-k { font: 400 11px var(--mono); color: var(--ink-2); margin: 0 4px 0 14px; }
.hn-here { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 4px 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.hn-here s { text-decoration-thickness: 1px; }
.hn-a { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 10px 9px; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.hn-p { font: 400 11px var(--mono); color: var(--ink-2); }
/* a meter under each link: track = 1.0, fill = p */
.hn-m { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 3px; background: var(--paper-2); }
.hn-b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bar); max-width: 100%; transition: width .6s var(--ease); }
.hn-a:hover .hn-l { text-decoration: underline; text-underline-offset: .2em; }
.hdr-tools { display: flex; gap: 6px; flex: none; margin-left: auto; }
.hdr-b { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--ink); background: transparent; font-size: 14px; font-weight: 600; }
.hdr-b:hover { background: var(--bar); color: var(--paper); }
.hdr-b[aria-expanded="true"] { background: var(--bar); color: var(--paper); }
.hdr-t { font-size: 11px; font-weight: 400; opacity: .7; }

/* ------------------------------------------------------------------ buttons, ranges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: transparent; font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .2s, color .2s; }
.btn:hover { background: var(--paper-2); text-decoration: none; }
.btn-ink { background: var(--bar); color: var(--paper); }
.btn-ink:hover { background: #2a2a2a; }
.btn-inv { border-color: var(--paper); color: var(--paper); background: transparent; }
.btn-inv:hover { background: var(--paper); color: var(--bar); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 17px; }
.tri { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; }
kbd { font: 500 .85em var(--mono); padding: .05em .4em; border: 1px solid currentColor; border-bottom-width: 2px; }
.range { -webkit-appearance: none; appearance: none; height: 28px; width: 100%; margin: 0; cursor: pointer;
  /* a tick where T = 1 */
  background: linear-gradient(currentColor, currentColor) var(--t1, 73%) 50% / 1px 12px no-repeat; }
.range::-webkit-slider-runnable-track { height: 2px; background: currentColor; }
.range::-moz-range-track { height: 2px; background: currentColor; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 24px; margin-top: -11px; background: var(--bar); border: 2px solid var(--paper); outline: 1px solid var(--bar); border-radius: 0; }
.range::-moz-range-thumb { width: 10px; height: 22px; background: var(--bar); border: 2px solid var(--paper); outline: 1px solid var(--bar); border-radius: 0; }
.range:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ------------------------------------------------------------------ section labels */
.lbl { display: flex; align-items: baseline; gap: 14px; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: lowercase; margin: 0 0 18px; font-family: var(--mono); color: var(--ink-2); border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.lbl-n { color: var(--ink); min-width: 2ch; }
.lbl-t { flex: 1; color: var(--ink); }
/* the label's rule is the top rule of whatever follows it */
.lbl + .kv, .lbl + .fl, .sec-b > .kv:first-child, .sec-b > .tbl-wrap:first-child { border-top: 0; }
.lbl + .kv, .sec-b > .kv:first-child { margin-top: -18px; }
.lbl + .fl { margin-top: -18px; }
.sec { padding: clamp(36px, 6vw, 72px) 0 0; }
.sec-b > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ title lockups (the logo's grammar) */
.lk { --fs: min(clamp(44px, 9.6vw, 148px), calc((100vw - 2 * var(--gut)) / (var(--n, 8) * .66)));
  display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--fs) * .2);
  font-size: var(--fs); font-weight: 700; letter-spacing: -.035em; line-height: .78; text-transform: uppercase; margin: 0; }
.lk-md { --fs: min(clamp(36px, 5.2vw, 76px), calc((100vw - 2 * var(--gut)) / (var(--n, 8) * .66))); }
.lk-bar { display: inline-block; background: var(--bar); color: var(--hid); padding: calc(var(--fs) * .155) calc(var(--fs) * .16) calc(var(--fs) * .13); line-height: .78; }
.lk-hid { display: block; white-space: nowrap; }
/* bar edge, shown word and text column share one left edge (the stem, not the side bearing) */
.lk-shown { display: block; white-space: nowrap; margin-left: -.05em; }
.is-declass .lk-bar { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.page-h { padding: clamp(40px, 8vw, 104px) 0 clamp(8px, 2vw, 24px); }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; max-width: 46ch; margin: clamp(24px, 3vw, 40px) 0 0; }

/* ------------------------------------------------------------------ home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding: clamp(36px, 6vw, 88px) 0 clamp(8px, 2vw, 24px); }
.hero-h { margin: 0; }
.hero-h .logo { width: min(100%, 560px); height: auto; }
.hero-cap { font-size: 11px; color: var(--ink-2); margin: 12px 0 0; letter-spacing: .02em; }
.hero-tag { font-size: clamp(22px, 2.3vw, 32px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: clamp(20px, 2.6vw, 34px) 0 6px; }
.hero-sub { color: var(--ink-2); margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.hero-rd { max-width: 34em; font-size: 15px; margin: 0 0 10px; }
.hero-k { display: block; font-size: 11px; color: var(--ink-2); margin: 0 0 4px; }
.hero-mark > .ps { font-size: 13px; max-width: 40em; }

/* ------------------------------------------------------------------ the distribution (navigation) */
.dist { --row: 52px; position: relative; }
.dist-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.dist-title { margin: 0; font-size: 13px; }
.dist-cols { display: grid; grid-template-columns: 64px 48px; gap: 8px; margin: 0; font: 400 11px var(--mono); color: var(--ink-2); text-align: right; }
.dist-list { list-style: none; margin: 0; padding: 0; }
.tok { transition: opacity .6s var(--ease); }
.tok-a { display: grid; grid-template-columns: 22px minmax(0, 1fr) 64px 48px; gap: 8px; align-items: center; min-height: var(--row); text-decoration: none; padding: 6px 0; }
.tok-k { font: 400 11px var(--mono); color: var(--ink-2); }
/* one rule for every row: the label on top, its probability as a bar underneath, on a track that is 1.0 wide */
.tok-track { position: relative; display: block; padding: 0 0 12px; }
.tok-track > .tok-lbl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.tok-track::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: var(--rule); }
.tok-bar { position: absolute; left: 0; bottom: 0; height: 7px; background: var(--bar); transition: width .55s var(--ease); min-width: 2px; z-index: 1; }
.tok-bar > .tok-lbl { display: none; }
.tok-z, .tok-p { font: 400 13px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
/* numbers sit on the label's line, not the middle of label + bar */
.tok-k, .tok-z, .tok-p { align-self: start; line-height: 21px; }
.tok-z { color: var(--ink-2); }
.tok-p { font-weight: 500; }
.tok-a:hover .tok-bar { background: #2b2b2b; }
.tok-a:hover > .tok-track > .tok-lbl { text-decoration: underline; text-underline-offset: .2em; }
.tok-a:focus-visible { outline-offset: -2px; }
.tok.is-masked .tok-a { cursor: default; color: var(--ink-2); }
.tok.is-masked .tok-track { display: flex; align-items: baseline; gap: 12px; }
.tok.is-masked .tok-track::after { background: repeating-linear-gradient(90deg, var(--rule) 0 3px, transparent 3px 6px); }
.tok.is-masked .tok-lbl { font-size: 17px; font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1px; }
.tok-here { font: 400 11px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok.is-stop .tok-lbl { font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: 0; }
.tok.is-faded .tok-track > .tok-lbl { opacity: .55; }
.tok.is-picked { background: var(--paper-2); }
.dist-cdf { position: relative; display: flex; height: 10px; margin: 14px 0 4px; background: var(--paper-2); }
.cdf-seg { height: 100%; background: var(--bar); border-right: 1px solid var(--paper); transition: width .55s var(--ease); }
.cdf-seg:nth-child(even) { background: #3a3936; }
.cdf-u { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--ink); left: 0; opacity: 0; transition: left .5s var(--ease), opacity .2s; }
.cdf-u.on { opacity: 1; }
.dist-sum { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-2); margin: 0 0 14px; }
.dist-sum b { color: var(--ink); font-weight: 500; }
.dist-ctl { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.t-ctl { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.t-k { font: 400 12px var(--mono); color: var(--ink-2); white-space: nowrap; }
.t-v { font-size: 12px; min-width: 7.5ch; text-align: right; }
.ht { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin: 14px 0 0; font-size: 12px; }
.ht-k { font-size: 13px; }
.ht-cells { display: inline-flex; gap: 3px; }
.ht-c { width: 16px; height: 16px; border: 1px solid var(--ink); background: rgb(14 14 14 / var(--m, 0)); transition: background-color .6s var(--ease); }
.ht-f { color: var(--ink-2); }
.dist-hint { font-size: 14px; color: var(--ink-2); margin: 14px 0 0; max-width: 52ch; }

/* dark variant (index overlay) */
.dist-dark { color: var(--paper); }
.dist-dark .dist-head, .dist-dark .lbl-t { border-color: var(--paper); }
.dist-dark .tok { border-color: #333; }
.dist-dark .tok-bar { background: var(--paper); }
.dist-dark .tok-track::after { background: #3a3936; }
.dist-dark .tok-a:hover .tok-bar { background: #fff; }
.dist-dark .tok-k, .dist-dark .tok-z, .dist-dark .dist-cols, .dist-dark .t-k, .dist-dark .ht-f, .dist-dark .dist-sum, .dist-dark .tok-here { color: #9a978f; }
.dist-dark .dist-sum b { color: var(--paper); }
.dist-dark .dist-cdf { background: #2a2a2a; }
.dist-dark .cdf-seg { background: var(--paper); border-color: var(--bar); }
.dist-dark .cdf-seg:nth-child(even) { background: #bcb9b1; }
.dist-dark .cdf-u { background: #fff; }
.dist-dark .ht-c { border-color: var(--paper); background: rgb(233 230 223 / var(--m, 0)); }
.dist-dark .range::-webkit-slider-thumb { background: var(--paper); border-color: var(--bar); outline-color: var(--paper); }
.dist-dark .range::-moz-range-thumb { background: var(--paper); border-color: var(--bar); outline-color: var(--paper); }
.dist-dark .btn-ink { background: var(--paper); color: var(--bar); border-color: var(--paper); }
.dist-dark .tok.is-masked .tok-track::after { background: repeating-linear-gradient(90deg, #555 0 3px, transparent 3px 6px); }
.dist-dark .tok.is-picked { background: #222; }

/* ------------------------------------------------------------------ video slot */
.vid { margin: 0; }
.vid-frame { position: relative; aspect-ratio: 16 / 9; background: var(--bar); overflow: hidden; }
.vid-cover, .vid-player { position: absolute; inset: 0; }
.vid-field { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.vid-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-label { position: absolute; left: 12px; top: 12px; margin: 0; padding: 5px 9px; font-size: 12px; background: var(--bar); z-index: 2; }
.vid-label b { font-weight: 500; color: var(--paper); }
.vid-step { position: absolute; right: 12px; top: 12px; margin: 0; padding: 5px 9px; font-size: 11px; color: #a9a69e; background: var(--bar); z-index: 2; font-variant-numeric: tabular-nums; }
.vid-hid { display: block; margin: 8px 0 0; font-size: 13px; }
.vid-hid .rd { line-height: 1.75; }
.hid { color: var(--hid); }
.is-declass .hid { color: #8d8a83; }
.vid-play { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 100%; border: 0; padding: 0; background: rgb(14 14 14 / .45); color: var(--paper); transition: background-color .25s; }
.vid-play:hover { background: rgb(14 14 14 / .25); }
/* a solid plate, so the control never competes with the title art behind it */
.vid-play-i { width: 84px; height: 84px; background: var(--bar); position: relative; }
.vid-play-i::after { content: ""; position: absolute; left: 33px; top: 24px; border-style: solid; border-width: 18px 0 18px 28px; border-color: transparent transparent transparent var(--paper); }
.vid-play-t { margin-top: 10px; padding: 6px 12px; background: var(--bar); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.vid-play-h { padding: 3px 12px 6px; background: var(--bar); font: 400 11px var(--mono); color: #b5b2aa; }
.vid-play:hover .vid-play-i, .vid-play:hover .vid-play-t, .vid-play:hover .vid-play-h { background: #000; }
.vid-play:focus-visible { outline: 3px solid var(--paper); outline-offset: -8px; }
.vid-ns { position: absolute; inset: auto 14px 40px; z-index: 4; color: var(--paper); font-weight: 600; }
.vid-player iframe, .vid-player video { width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.vid-cap { display: block; padding: 10px calc(var(--gut) * var(--bleed, 0)) 0; }
.vid-cap-m { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-2); }
.vid-cap-m span:first-child { color: var(--ink); }
.vid-lift .vid-cover { animation: lift .7s var(--ease) forwards; }
@keyframes lift { to { transform: translateY(-100%); } }

/* ------------------------------------------------------------------ listen */
.listen-state { margin: 0 0 14px; }
.listen.is-empty .listen-state b { font-weight: 700; }
/* no links yet: the form is there, every value is a bar */
.listen-null { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.listen-null li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.ln-n { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listen-null .ln-v { font: 400 11px var(--mono); padding: 0 .5em; line-height: 1.45; flex: none; }
.listen-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.svc { display: grid; grid-template-columns: 1fr auto 56px 20px; gap: 12px; align-items: center; min-height: 52px; padding: 6px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.svc-n { font-weight: 600; font-size: 18px; }
.svc-h, .svc-p { font-size: 12px; color: var(--ink-2); text-align: right; }
.svc:hover { background: var(--bar); color: var(--paper); }
.svc:hover .svc-h, .svc:hover .svc-p { color: #a9a69e; }
.listen-compact .listen-null li { font-size: 14px; min-height: 40px; }

/* ------------------------------------------------------------------ signal form */
.sig { max-width: 560px; }
.sig-compact { max-width: none; }
.sig-l { display: block; font: 400 12px var(--mono); color: var(--ink-2); margin: 0 0 6px; }
.sig-row { display: flex; gap: 0; }
.sig-i { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border: 1px solid var(--ink); border-right: 0; background: var(--paper); font-size: 17px; border-radius: 0; -webkit-appearance: none; appearance: none; }
.sig-i::placeholder { color: #8f8c85; }
.sig-i:focus-visible { outline-offset: -3px; }
.sig-b { height: 52px; min-width: 120px; }
.sig-s { min-height: 1.5em; margin: 8px 0 0; font-size: 13px; }
.sig.is-ok .sig-row { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ home sections */
.latest, .files-strip, .signal-strip { padding: clamp(40px, 7vw, 96px) 0 0; }
.latest-g { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.latest-i .lk { margin: 0 0 22px; }
.latest-sum { max-width: 44ch; }
.btn-go { margin-top: 18px; }
.fl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.fl a { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.fl-n { font-size: 13px; color: var(--ink-2); }
.fl-t { font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -.01em; justify-self: start; }
.fl .rd.fl-t { font-size: 14px; font-weight: 400; letter-spacing: 0; }
.fl-s { font-size: 12px; color: var(--ink-2); }
.fl a:hover .fl-t:not(.rd) { text-decoration: underline; text-underline-offset: .15em; }
.fl a:hover { background: var(--paper-2); }
.signal-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: end; }
.signal-p { font-size: 18px; max-width: 32ch; }

/* ------------------------------------------------------------------ song page */
.song-h { padding: clamp(36px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); column-gap: clamp(32px, 5vw, 72px); align-items: end; align-items: last baseline; }
.song-h > * { grid-column: 1 / -1; }
.song-h > .lk { grid-column: 1; }
.song-h > .song-sum { grid-column: 2; margin: 0; max-width: none; font-size: 17px; }
.song-slot .song-h { display: block; }
.kicker { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-2); margin: 0 0 clamp(20px, 3vw, 36px); }
.kicker span:first-child { color: var(--ink); }
.song-h > .ps { font-size: 13px; margin: 18px 0 0; }
.jump { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 22px 0 0; font-size: 13px; }
.jump a { padding: 8px 0; text-decoration-color: var(--rule); }
.jump a:hover { text-decoration-color: currentColor; }
.song-video { margin: 0 calc(var(--gut) * -1 * var(--bleed, 0)); }
.song-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-top: clamp(36px, 5vw, 64px); }
.song-sum { margin: 22px 0 0; max-width: 48ch; }
.kv { margin: 0; border-top: 1px solid var(--ink); }
.kv > div { display: grid; grid-template-columns: clamp(96px, 30%, 220px) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.kv dt { font-size: 12px; color: var(--ink-2); padding-top: 3px; }
.kv dd { margin: 0; }
.kv dd .rd { font-size: 14px; }
.slot-p { max-width: 52ch; margin: clamp(24px, 3vw, 36px) 0 0; font-size: 18px; }

/* fig. 1 */
.fig { margin: 0; }
.fig-q { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em; margin: 0 0 18px; }
.fig-k { font-size: 12px; font-weight: 400; color: var(--ink-2); vertical-align: middle; margin-right: 8px; }
.fig-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.fr { display: grid; grid-template-columns: minmax(110px, 1.1fr) minmax(0, 2fr) 64px 72px; gap: 12px; align-items: center; min-height: 32px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.fr-t { white-space: nowrap; overflow: hidden; }
.fr-t .rd { font-size: 14px; }
.fr-word { font-weight: 600; }
.fr.is-chosen .fr-word { padding: .05em .3em; outline: 2px solid var(--ink); }
.fr-bar { display: block; height: 14px; background: var(--paper-2); }
.fr-bar i { display: block; height: 100%; background: var(--bar); transition: width .45s var(--ease); min-width: 1px; }
.fr.is-chosen .fr-bar i { background: var(--ink); }
.fr-z { font-size: 12px; color: var(--ink-2); text-align: right; }
.fr-p { font-size: 13px; text-align: right; font-weight: 500; }
.fr.is-tail .fr-t .rd { font-family: var(--mono); font-size: 12px; }
.fr.is-hit { background: var(--paper-2); }
.fr.is-hit .rd { background: transparent; color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.fig-ctl { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; margin: 18px 0 0; }
.fig-cap { font-size: 15px; margin: 14px 0 0; max-width: 64ch; }
.fig-cap b { font-weight: 700; }

/* lyrics sheet */
.lyr-ctl { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 22px; }
.lyr-out { font-size: 12px; color: var(--ink-2); }
.sheet { list-style: none; margin: 0; padding: 0; columns: 2 360px; column-gap: clamp(32px, 5vw, 72px); }
.sheet li { break-inside: avoid; display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: baseline; }
.sh-gap { height: 14px; }
.ln { font: 400 11px var(--mono); color: #9b978f; }
.sh-tag { margin: 0 0 4px; }
.tg { font-size: 12px; color: var(--ink-2); }
.sh-ln { margin: 0 0 3px; font-size: clamp(16px, 1.35vw, 19px); }
.sh-ln .rd { cursor: pointer; }
.sh-ln .rd:hover { background: #2b2b2b; }
.sh-ln .rd.is-lit:hover { background: transparent; }
.ckpt { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.ckpt summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; gap: 12px; align-items: baseline; }
.ckpt summary::-webkit-details-marker { display: none; }
.ckpt summary::before { content: "+"; font-family: var(--mono); font-weight: 400; width: 1ch; }
.ckpt[open] summary::before { content: "\2212"; }
.ckpt-n { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: auto; }
.ckpt .lyr { padding: 6px 0 24px; }

/* ------------------------------------------------------------------ files table */
.tbl-wrap { overflow-x: auto; margin: clamp(24px, 4vw, 48px) 0 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.tbl th, .tbl td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl thead th { font: 400 12px var(--mono); color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.tbl tbody th { font-weight: 600; font-size: 18px; }
.tbl tbody th .rd { font-size: 14px; font-weight: 400; }
.tbl td.mono { font-size: 13px; }
.sq { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--ink); vertical-align: middle; }
.sq.on { background: var(--bar); }
.legend { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); margin: 14px 0 0; }
.legend .sq { width: 10px; height: 10px; }
.h3 { font-size: 22px; margin: 0 0 12px; }
.h3 a { text-decoration: none; }
.h3 .mono { font-size: 13px; color: var(--ink-2); margin-right: 8px; }
.listen-song + .listen-song { margin-top: 36px; }
.big { font-size: clamp(28px, 4vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 0; }

/* ------------------------------------------------------------------ for machines: one bar */
.fm-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 15px; color: var(--ink); margin: clamp(28px, 4vw, 48px) 0 14px; }
.fm-hint p { margin: 0; max-width: 62ch; }
.js .fm-hint p.js-only { display: block; }
.fm { background: var(--bar); color: var(--hid); padding: clamp(20px, 5vw, 64px); font-size: 16px; line-height: 1.6; position: relative; }
.fm-tag, .fm-end { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 11px; color: #b5b2aa; text-transform: uppercase; letter-spacing: .06em; }
.fm-tag { margin: 0 0 clamp(28px, 4vw, 48px); }
.fm-end { margin: clamp(28px, 4vw, 48px) 0 0; padding-top: 14px; border-top: 1px solid #3a3936; }
.fm-tag span:first-child { color: var(--paper); }
.is-declass .fm-tag, .is-declass .fm-end { color: var(--ink-2); }
.is-declass .fm-tag span:first-child { color: var(--ink); }
.fm h1 { font-size: clamp(32px, 5vw, 60px); letter-spacing: -.03em; margin: 0 0 24px; }
.fm h2 { font-size: 18px; letter-spacing: -.01em; margin: 32px 0 10px; }
.fm ul { margin: 0 0 1em; padding-left: 1.2em; }
.fm a { color: inherit; }
.is-declass .fm { background: var(--paper-2); color: var(--ink); }

/* ------------------------------------------------------------------ 0.6 */
.rest-h { display: grid; grid-template-columns: auto minmax(0, 30rem); align-items: end; align-items: last baseline; column-gap: clamp(32px, 5vw, 80px); }
.rest-h .lede { margin: 0 0 .6em; }
.rest-t { font-size: clamp(120px, 30vw, 420px); letter-spacing: -.06em; line-height: .8; margin: 0 0 0 -.04em; }
.rest-yes { display: flex; align-items: baseline; gap: 16px; font-size: 14px; color: var(--ink-2); margin: 40px 0 8px; }
.rest-yes span:first-child { font-size: 40px; font-weight: 700; color: var(--ink); text-decoration: line-through; text-decoration-thickness: 3px; }
.rest-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px .5em; margin: 18px 0 0; line-height: 1.05; }
.rest-sum { font-size: 12px; color: var(--ink-2); margin: 22px 0 0; }
.r-w { font-size: calc(var(--s) * 1px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.r-w sub { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); margin-left: 4px; vertical-align: baseline; }
@media (max-width: 700px) { .r-w { font-size: calc(var(--s) * .55px); } }
.rest-tail { margin: 56px 0 0; }
.rest-dots { width: 100%; height: 640px; }
.rest-tail-k { font-size: 12px; color: var(--ink-2); margin: 0 0 10px; }
.rest-q { margin: 56px 0 0; padding: 0; font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.nn { margin: 0 0 12px; padding-left: 1.4em; font-size: 20px; font-weight: 600; }
.nn li { margin: 0 0 8px; }
.nn .mono { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 10px; }

/* ------------------------------------------------------------------ footer */
.ftr { margin-top: clamp(56px, 7vw, 96px); padding: 28px var(--gut) 40px; display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; max-width: calc(var(--max)); width: 100%; margin-left: auto; margin-right: auto;
  /* the top rule spans the text column, like every other rule */
  background: linear-gradient(var(--ink), var(--ink)) var(--gut) 0 / calc(100% - 2 * var(--gut)) 1px no-repeat; }
.ftr .lbl { margin-bottom: 12px; }
.ftr-pages, .ftr-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ftr-pages { font-weight: 600; margin-bottom: 8px; }
.ftr-pages a, .ftr-files a { display: inline-block; padding: 6px 0; }
.ftr-files { font-size: 13px; }
.ftr-tools { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.ftr-small { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }

/* ------------------------------------------------------------------ index dialog */
.idx { width: min(760px, 100vw); max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--bar); color: var(--paper); overscroll-behavior: contain; }
.idx::backdrop { background: rgb(14 14 14 / .55); }
.idx-in { padding: 18px clamp(18px, 4vw, 44px) 40px; }
.idx-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 24px; }
.idx-h { font-size: 13px; font-weight: 500; }
.idx-plain { margin: 32px 0 0; display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px 32px; font-size: 15px; }
.idx-plain ul { list-style: none; margin: 0; padding: 0; }
.idx-plain li a { display: inline-block; padding: 5px 0; color: var(--paper); }
.idx-plain .mono { font-size: 13px; }
.idx-k { font-size: 12px; color: #9a978f; margin: 6px 0 0; }
.idx-keys { font-size: 11px; color: #9a978f; margin: 24px 0 0; }
.idx[open] { animation: idx-in .35s var(--ease); }
@keyframes idx-in { from { transform: translateX(40px); opacity: 0; } }

/* ------------------------------------------------------------------ levels popover */
.lv { position: fixed; inset: auto 16px 16px auto; margin: 0; width: min(340px, calc(100vw - 32px)); padding: 14px 16px 16px; border: 1px solid var(--bar); background: var(--paper); color: var(--ink); z-index: 60; box-shadow: 6px 6px 0 var(--bar); }
.lv:not(:popover-open) { display: none; }
.lv.is-open { display: block; }
.lv-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; font-size: 13px; }
.lv-x { width: 36px; height: 36px; border: 1px solid var(--ink); background: transparent; font-size: 20px; line-height: 1; }
.lv-hist { width: 100%; height: 64px; background: var(--paper-2); border-bottom: 1px solid var(--ink); overflow: visible; }
.lv-sp rect { fill: var(--bar); }
.lv-mb { fill: var(--bar); } .lv-mw { fill: var(--paper); stroke: var(--bar); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lv-r { margin: 6px 0 0; color: var(--ink); }
.lv-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin: 0 0 8px; }
.lv-ticks button { border: 0; background: none; padding: 6px 2px; color: inherit; font: inherit; }
.lv-ticks button:hover { color: var(--ink); text-decoration: underline; }
.lv-read { font-size: 12px; margin: 0 0 6px; }
.lv-read b { font-weight: 500; }
.lv-note { font-size: 13px; color: var(--ink-2); margin: 0; }
/* the panel itself is exempt from the filter, so you can always undo it */
html.lv-on > body > *:not(#levels) { filter: url(#hs-levels); }
html.lv-on.lv-hard > body > *:not(#levels) { filter: url(#hs-levels) contrast(1); }
html.lv-on body { background: var(--lv-bg, var(--paper)); }
html.lv-on .rd, html.lv-on .lk-bar, html.lv-on .fm, html.lv-on .rd-block, html.lv-on .vid-frame { transition: none; }

/* ------------------------------------------------------------------ <|stop|> */
.stop { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: var(--gut); background: var(--bar); color: var(--paper); display: none; flex-direction: column; justify-content: center; align-items: flex-start; }
.stop[open] { display: flex; animation: stop-in .4s steps(6) both; }
.stop::backdrop { background: var(--bar); }
@keyframes stop-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.stop-tok { font-size: clamp(28px, 6vw, 72px); margin: 0 0 24px; }
.stop-l { font-size: clamp(22px, 3vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 24px; }
.stop-p { font-size: 13px; color: #9a978f; margin: 0 0 32px; }

/* ------------------------------------------------------------------ toast (console of the page) */
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; background: var(--bar); color: var(--paper); font: 400 13px var(--mono); padding: 10px 14px; max-width: calc(100vw - 32px); pointer-events: none; opacity: 0; transition: opacity .25s; }
.toast.on { opacity: 1; }

/* ------------------------------------------------------------------ declassify-all */
.is-declass .vid-frame { outline: 1px solid var(--ink); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .hn-k, .hn-here { display: none; }
  .hn-a:nth-child(4) { display: none; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; padding-top: 32px; }
  .hero-h .logo { width: min(100%, 460px); }
  .latest-g, .song-top, .signal-g { grid-template-columns: 1fr; }
  .song-h, .rest-h { grid-template-columns: 1fr; }
  .song-h > .song-sum { grid-column: 1; margin: 22px 0 0; }
  .rest-h .lede { margin: 24px 0 0; }
  .song-video { --bleed: 1; }
  .song-video .vid-label { left: var(--gut); }
  .song-video .vid-step { right: var(--gut); }
  .ftr { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --hdr: 52px; }
  .hn { display: none; }
  .hdr { gap: 10px; }
  .hdr-logo .logo { height: 17px; }
  .hdr-b { padding: 0 12px; height: 40px; font-size: 13px; }
  .hdr-b .hdr-t { display: none; }
  .hero { gap: 12px; padding-top: 24px; }
  .hero-mark > .ps { margin-bottom: 0; }
  .hero-h .logo { width: min(100%, 300px); }
  .hero-tag { margin-top: 20px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .tok-a { grid-template-columns: 18px minmax(0, 1fr) 48px; gap: 8px; }
  .tok-z, .dist-cols span:first-child { display: none; }
  .dist-cols { grid-template-columns: 48px; }
  .dist-ctl { grid-template-columns: 1fr; }
  .t-ctl { grid-template-columns: auto 1fr auto; }
  .fr { grid-template-columns: minmax(84px, 1fr) minmax(0, 1.4fr) 58px; }
  .fr-z { display: none; }
  .fig-ctl { grid-template-columns: 1fr 1fr; }
  .fig-ctl .t-ctl { grid-column: 1 / -1; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .svc { grid-template-columns: 1fr auto 20px; }
  .svc-p { display: none; }
  .listen-null { column-gap: 18px; }
  .listen-null li { font-size: 14px; }
  .idx-plain { grid-template-columns: 1fr 1fr; }
  .idx-plain .idx-k { grid-column: 1 / -1; }
  .vid-label { font-size: 11px; left: 8px; top: 8px; padding: 4px 7px; }
  .vid-step { font-size: 10px; right: 8px; top: 8px; padding: 4px 7px; }
  .vid-play-i { width: 60px; height: 60px; }
  .vid-play-i::after { left: 23px; top: 17px; border-width: 13px 0 13px 20px; }
  .vid-play-t { font-size: 15px; margin-top: 8px; }
  .vid-hid { font-size: 12px; }
  .sig-b { min-width: 104px; }
  .fl a { grid-template-columns: 40px 1fr auto; gap: 10px; }
}
@media (max-width: 420px) {
  .hdr-logo .logo { height: 15px; }
  .hdr-b { padding: 0 9px; }
  .tok-track > .tok-lbl { font-size: 16px; }
  .fl-s { display: none; }
  .fl a { grid-template-columns: 36px 1fr; }
}

/* ------------------------------------------------------------------ reduced motion: everything still works, nothing moves */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.no-motion *, .no-motion *::before, .no-motion *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }

/* no-JS: hide controls that need JS */
@media (hover: none) and (pointer: coarse) { .kb-only, .idx-keys, .hdr-t[aria-hidden] { display: none; } }
.js-only { display: none; }
.js .js-only { display: revert; }
.js .dist-ctl.js-only { display: grid; }
.js .lyr-ctl.js-only { display: flex; }
.js .fig-ctl.js-only { display: grid; }
.js .ht.js-only { display: flex; }
.js .ftr-tools.js-only { display: flex; }

@media print {
  .hdr, .ftr-tools, .dist-ctl, .lv, .idx, .stop { display: none !important; }
  .rd, .lk-bar, .fm, .rd-block { background: none !important; color: #000 !important; box-shadow: inset 0 -1px 0 #000; }
}
