/* Inheritance Trace — records office.

   The subject is an evidence ledger, so the page is built like one: paper with
   a rule, cards that sit on it as physical filing, and stamps that carry the
   confidence tier. Contrast comes from surfaces and edges, not from tinting
   text down. Every size here is checked at 390px first. */

:root {
  --paper:      #efe9dc;
  --paper-2:    #f7f3ea;
  --card:       #fffdf8;
  --card-edge:  #d8cfba;
  --ink:        #1b1815;
  --ink-2:      #4a443b;
  --ink-3:      #6f6656;
  --rule:       #cdc3ab;
  --oxblood:    #7a2318;
  --oxblood-2:  #a8412f;
  --stamp-blue: #1f4e6b;
  --amber:      #8a6212;
  --amber-bg:   #f6ecd2;
  --band:       #2b2721;
  --manila:     #e2d3ad;

  --tier-documented: var(--stamp-blue);
  --tier-inferred:   var(--amber);
  --tier-open:       #4c5a4e;
  --tier-unsupported:var(--oxblood);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --wrap: 34rem;
  --gut: 1.15rem;
  --radius: 3px;
  --shadow-card: 0 1px 0 rgba(27,24,21,.06), 0 6px 18px -12px rgba(27,24,21,.5);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  /* The page is a sheet in a file: a faint horizontal rule under everything,
     and a warm vignette so the paper has a body rather than being flat fill. */
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 380px),
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(27,24,21,.035) 27px 28px);
  color: var(--ink);
  font: 400 1.0625rem/1.62 var(--serif);
  overflow-x: hidden;
}

.wrap { width: min(100% - calc(var(--gut) * 2), var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - calc(var(--gut) * 2), 46rem); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; line-height: 1.16; letter-spacing: -.014em; margin: 0; }
p { margin: 0 0 .9em; }
a { color: var(--oxblood); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--oxblood-2); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--ink); color: var(--paper-2); padding: .7rem 1rem; font-family: var(--sans);
}
.skip:focus { left: .5rem; top: .5rem; }

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--stamp-blue); outline-offset: 2px; border-radius: 2px;
}

/* ------------------------------------------------------------- masthead */
.masthead {
  position: relative;
  padding: 2.6rem 0 2rem;
  background:
    linear-gradient(180deg, var(--band) 0 var(--band-h, 0), transparent 0),
    linear-gradient(180deg, rgba(226,211,173,.55), rgba(226,211,173,0) 70%);
  border-bottom: 1px solid var(--rule);
}
.masthead::before {
  /* File-cabinet spine along the top edge: this page came out of a drawer. */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--band) 0 22px, var(--oxblood) 22px 26px);
}

.filetab {
  display: inline-block; font-family: var(--mono); font-size: .69rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-2);
  background: var(--manila); border: 1px solid var(--card-edge); border-bottom: none;
  padding: .34rem .7rem .3rem; border-radius: 4px 4px 0 0; margin-bottom: -1px;
}

h1 {
  font-size: clamp(2.35rem, 12.5vw, 3.6rem);
  margin: .55rem 0 .1rem; letter-spacing: -.032em;
}
h1 .l2 { display: block; color: var(--oxblood); }

.masthead .sub {
  font-size: 1.06rem; color: var(--ink-2); margin-top: .85rem; max-width: 30rem;
}
.masthead .sub strong { color: var(--ink); font-weight: 600; }

.meta-strip {
  display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin: 1.1rem 0 0;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
.meta-strip span { background: var(--card); border: 1px solid var(--card-edge); padding: .28rem .5rem; border-radius: var(--radius); }

.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.35rem; }
.btn {
  font: 600 .93rem/1 var(--sans); letter-spacing: .005em;
  padding: .82rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--ink);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px;
}
.btn-primary { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.btn-primary:hover { background: #000; color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--card-edge); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn[aria-pressed="true"] { background: var(--stamp-blue); color: #fff; border-color: var(--stamp-blue); }

/* ---------------------------------------------------------------- notice */
.notice {
  margin: 1.5rem 0 0; padding: .95rem 1rem; background: var(--card);
  border: 1px solid var(--card-edge); border-left: 4px solid var(--oxblood);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  font-size: .96rem; color: var(--ink-2);
}
.notice b { color: var(--ink); font-family: var(--sans); font-size: .82rem; letter-spacing: .07em;
  text-transform: uppercase; display: block; margin-bottom: .3rem; color: var(--oxblood); }

/* -------------------------------------------------------------- sections */
.section { padding: 2.9rem 0 .4rem; }
.section + .section { padding-top: 2.2rem; }
.section-head { margin-bottom: 1.4rem; }
.section-num {
  font-family: var(--mono); font-size: .69rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--oxblood); margin: 0 0 .4rem; display: flex; align-items: center; gap: .5rem;
}
.section-num::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-head h2 { font-size: clamp(1.5rem, 6.6vw, 2.05rem); }
.section-head > p { margin-top: .6rem; color: var(--ink-2); }

.lede { font-size: 1.1rem; color: var(--ink-2); }

/* ----------------------------------------------------------------- cards */
.card {
  position: relative; background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); padding: 1.15rem 1.05rem; box-shadow: var(--shadow-card);
  margin-bottom: 1rem;
}
/* A lit top edge reads as a physical sheet where a plain border does not. */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.9), rgba(255,255,255,0));
}
.card h3 { font-size: 1.12rem; margin-bottom: .45rem; }
.card p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- stamps */
.stamp {
  display: inline-block; font: 700 .655rem/1 var(--mono); letter-spacing: .13em;
  text-transform: uppercase; padding: .34rem .48rem; border-radius: 2px;
  border: 1.5px solid currentColor; white-space: nowrap;
  transform: rotate(-1.2deg);
}
.stamp-documented  { color: var(--tier-documented);  background: #e8f0f5; }
.stamp-inferred    { color: var(--tier-inferred);    background: var(--amber-bg); }
.stamp-open        { color: var(--tier-open);        background: #e9efe9; }
.stamp-unsupported { color: var(--tier-unsupported); background: #f7e6e2; }

/* ------------------------------------------------------------ record card */
.record { padding: 0; overflow: hidden; }
.record-head {
  background: var(--manila); border-bottom: 1px solid var(--card-edge);
  padding: .85rem 1.05rem;
}
.record-head .rid {
  font: 600 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); display: block; margin-bottom: .35rem;
}
.record-head h3 { font-size: 1.22rem; }
.record-head .life { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); margin: .2rem 0 0; }

.fields { margin: 0; padding: .3rem 1.05rem .9rem; }
.field {
  display: grid; grid-template-columns: 1fr; gap: .18rem;
  padding: .7rem 0; border-bottom: 1px dotted var(--rule);
}
.field:last-child { border-bottom: none; }
.field dt {
  font: 600 .67rem/1.3 var(--mono); letter-spacing: .11em; text-transform: uppercase; color: var(--ink-3);
}
.field dd { margin: 0; font-size: .99rem; }
.field dd .fnote { display: block; margin-top: .3rem; font-size: .87rem; color: var(--ink-2); }
.field-empty dd { color: var(--ink-3); font-style: italic; }
.field-row { display: flex; align-items: flex-start; gap: .5rem; flex-wrap: wrap; }

blockquote.src {
  margin: .5rem 0 0; padding: .7rem .85rem; background: var(--paper-2);
  border-left: 3px solid var(--stamp-blue); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem; color: var(--ink-2);
}
blockquote.src cite { display: block; margin-top: .45rem; font: 600 .7rem/1.3 var(--mono);
  letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--ink-3); }

/* ------------------------------------------------------------ tally strip */
.tally { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin: 1.1rem 0 0; }
.tally-cell {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: .7rem .75rem; box-shadow: var(--shadow-card);
}
.tally-cell b { display: block; font: 700 1.5rem/1 var(--sans); letter-spacing: -.02em; }
.tally-cell span { display: block; margin-top: .28rem; font: 500 .7rem/1.32 var(--mono);
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tally-cell.warn b { color: var(--oxblood); }

/* --------------------------------------------------------- scope roster */
.scope { list-style: none; margin: 1rem 0 0; padding: 0; }
.scope li {
  display: flex; align-items: baseline; gap: .7rem; padding: .72rem 0;
  border-bottom: 1px dotted var(--rule);
}
.scope li:last-child { border-bottom: none; }
.scope .n {
  font: 700 1.02rem/1 var(--mono); min-width: 2.6rem; text-align: right;
  color: var(--oxblood); flex: none;
}
.scope .n.has { color: var(--stamp-blue); }
.scope .t { font-size: .97rem; }
.scope .t small { display: block; color: var(--ink-3); font-size: .84rem; margin-top: .15rem; }

/* --------------------------------------------------------------- sorter */
.sorter-card { padding: 0; }
.sorter-top {
  padding: .9rem 1.05rem; background: var(--paper-2); border-bottom: 1px solid var(--card-edge);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.sorter-top .pos { font: 600 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.sorter-score { font: 600 .7rem/1 var(--mono); letter-spacing: .08em; color: var(--ink-2); }

.claim-text { padding: 1.15rem 1.05rem; font-size: 1.1rem; line-height: 1.48; }
.claim-text::before { content: "“"; color: var(--rule); font-size: 1.6em; line-height: 0; vertical-align: -.28em; margin-right: .1em; }
.claim-text::after { content: "”"; color: var(--rule); font-size: 1.6em; line-height: 0; vertical-align: -.28em; margin-left: .05em; }

.tier-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 0 1.05rem 1rem; }
.tier-btn {
  font: 600 .84rem/1.2 var(--sans); text-align: left; cursor: pointer;
  background: var(--paper-2); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: .7rem .65rem; min-height: 56px; color: var(--ink);
  display: flex; flex-direction: column; gap: .22rem;
}
.tier-btn small { font: 500 .66rem/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.tier-btn:hover { border-color: var(--ink-3); }
.tier-btn:disabled { cursor: default; opacity: .55; }
.tier-btn.is-answer { border-color: var(--stamp-blue); border-width: 2px; background: #e8f0f5; opacity: 1; }
.tier-btn.is-answer small { color: var(--stamp-blue); }
.tier-btn.is-wrong { border-color: var(--oxblood); border-width: 2px; background: #f7e6e2; opacity: 1; }
.tier-btn.is-wrong small { color: var(--oxblood); }

.verdict {
  margin: 0 1.05rem 1.05rem; padding: .85rem .9rem; border-radius: var(--radius);
  background: var(--paper-2); border: 1px solid var(--card-edge); font-size: .95rem;
}
.verdict .vhead { font: 700 .72rem/1 var(--mono); letter-spacing: .11em; text-transform: uppercase;
  display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.verdict p { margin: 0; color: var(--ink-2); }
.verdict .vsrc { margin-top: .55rem; font-size: .86rem; }
.sorter-nav { display: flex; gap: .5rem; padding: 0 1.05rem 1.05rem; }
.sorter-nav .btn { flex: 1; justify-content: center; }

/* --------------------------------------------------- denominator machine */
.machine { padding: 0; }
.machine-head { padding: .95rem 1.05rem; background: var(--band); color: var(--paper-2); }
.machine-head h3 { color: #fff; font-size: 1.08rem; }
.machine-head p { margin: .35rem 0 0; font-size: .89rem; color: #c9c2b4; }

.controls { padding: 1rem 1.05rem .4rem; }
.ctl { margin-bottom: 1.15rem; }
.ctl-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .1rem; }
.ctl label { font: 600 .87rem/1.3 var(--sans); }
.ctl output { font: 700 .95rem/1 var(--mono); color: var(--stamp-blue); }
.ctl .hint { display: block; font-size: .81rem; color: var(--ink-3); margin: .1rem 0 .5rem; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; background: transparent; margin: 0;
  height: 30px; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; background: var(--rule); border-radius: 3px; border: none;
}
input[type="range"]::-moz-range-track { height: 5px; background: var(--rule); border-radius: 3px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10.5px;
  background: var(--card); border: 2px solid var(--ink); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(27,24,21,.35);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; background: var(--card); border: 2px solid var(--ink);
  border-radius: 50%; box-shadow: 0 1px 3px rgba(27,24,21,.35);
}

.readout { margin: .2rem 1.05rem 0; border-top: 1px solid var(--rule); padding-top: .9rem; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.ro {
  background: var(--paper-2); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: .65rem .7rem;
}
.ro b { display: block; font: 700 1.32rem/1 var(--mono); letter-spacing: -.01em; }
.ro span { display: block; margin-top: .3rem; font: 500 .68rem/1.3 var(--mono);
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* Monte Carlo strip: 200 simulated worlds, so the spread is visible rather
   than asserted. Drawn as bars in a flex row — no canvas, no dependency. */
.sim { margin: 1rem 1.05rem 0; }
.sim-label { font: 500 .69rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .4rem; display: flex; justify-content: space-between; gap: .5rem; }
.sim-strip {
  position: relative;
  display: flex; align-items: flex-end; gap: 1px; height: 74px;
  background: var(--paper-2); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: 4px; overflow: hidden;
}
/* Where the observed count sits. Bars that reach it are the ones marked hit,
   so the line and the red bars are two readings of the same fact. */
.sim-mark {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px dashed var(--oxblood); pointer-events: none;
}
.sim-mark span {
  position: absolute; right: 4px; top: -1.05em; font: 700 .64rem/1 var(--mono);
  letter-spacing: .06em; color: var(--oxblood); background: var(--paper-2); padding: 0 .25em;
}
.sim-bar { flex: 1 1 0; min-width: 0; background: var(--stamp-blue); opacity: .42; border-radius: 1px 1px 0 0; }
.sim-bar.hit { background: var(--oxblood); opacity: .95; }
.sim-axis { display: flex; justify-content: space-between; font: 500 .66rem/1 var(--mono); color: var(--ink-3); margin-top: .35rem; }

.machine-verdict {
  margin: 1rem 1.05rem 1.05rem; padding: .9rem .95rem; border-radius: var(--radius);
  border: 1px solid var(--card-edge); border-left: 4px solid var(--stamp-blue); background: var(--paper-2);
}
.machine-verdict.hot { border-left-color: var(--oxblood); }
.machine-verdict .mv-head { font: 700 .72rem/1 var(--mono); letter-spacing: .11em; text-transform: uppercase;
  color: var(--stamp-blue); margin-bottom: .45rem; }
.machine-verdict.hot .mv-head { color: var(--oxblood); }
.machine-verdict p { margin: 0; font-size: .96rem; color: var(--ink-2); }
.machine-verdict p + p { margin-top: .5rem; }

/* ---------------------------------------------------------- mechanisms */
.mech-list { display: grid; gap: .55rem; margin-top: 1rem; }
.mech {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.mech.is-null { border-color: var(--oxblood); border-width: 1.5px; }
.mech > summary {
  list-style: none; cursor: pointer; padding: .85rem .95rem; display: flex;
  align-items: flex-start; gap: .65rem; min-height: 44px;
}
.mech > summary::-webkit-details-marker { display: none; }
.mech .mname { font: 700 1rem/1.3 var(--sans); }
.mech .mshort { display: block; font-family: var(--serif); font-weight: 400; font-size: .92rem;
  color: var(--ink-2); margin-top: .18rem; }
.mech .chev { margin-left: auto; flex: none; color: var(--ink-3); font: 700 .8rem/1 var(--mono); padding-top: .2rem; }
.mech[open] .chev { transform: rotate(90deg); }
.mech-body { padding: 0 .95rem 1rem; border-top: 1px dotted var(--rule); }
.mech-body .mrow { padding: .75rem 0; border-bottom: 1px dotted var(--rule); }
.mech-body .mrow:last-child { border-bottom: none; }
.mech-body dt { font: 600 .67rem/1.3 var(--mono); letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .22rem; }
.mech-body dd { margin: 0; font-size: .95rem; }
.mech-body .mrow.confound dt { color: var(--oxblood); }
.nullflag { font: 600 .64rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--oxblood); border: 1px solid var(--oxblood); border-radius: 2px; padding: .25rem .4rem;
  display: inline-block; margin-top: .5rem; }

/* -------------------------------------------------------------- agenda */
.agenda { counter-reset: ag; list-style: none; margin: 1rem 0 0; padding: 0; }
.agenda li {
  counter-increment: ag; position: relative; padding: .85rem 0 .85rem 2.5rem;
  border-bottom: 1px dotted var(--rule);
}
.agenda li:last-child { border-bottom: none; }
.agenda li::before {
  content: counter(ag, decimal-leading-zero); position: absolute; left: 0; top: .95rem;
  font: 700 .78rem/1 var(--mono); color: var(--oxblood);
}
.agenda h3 { font-size: 1rem; margin-bottom: .25rem; }
.agenda p { margin: 0; font-size: .95rem; color: var(--ink-2); }

/* --------------------------------------------------------------- gates */
.gates { list-style: none; margin: 1rem 0 0; padding: 0; }
.gates li {
  background: var(--card); border: 1px solid var(--card-edge); border-left: 3px solid var(--stamp-blue);
  border-radius: var(--radius); padding: .8rem .9rem; margin-bottom: .5rem; box-shadow: var(--shadow-card);
}
.gates h3 { font-size: .95rem; margin-bottom: .25rem; }
.gates p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* ------------------------------------------------------------- sources */
.source {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: .9rem .95rem; margin-bottom: .6rem; box-shadow: var(--shadow-card);
}
.source:hover { border-color: var(--ink-3); }
.source .stop { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.source .sn { font: 700 .7rem/1 var(--mono); letter-spacing: .1em; color: var(--oxblood); }
.source .rel { font: 500 .64rem/1 var(--mono); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--rule); border-radius: 2px; padding: .24rem .38rem; }
.source h3 { font-size: 1.04rem; }
.source .tag { font-size: .88rem; color: var(--ink-3); margin: .12rem 0 .45rem; font-style: italic; }
.source .role { font-size: .93rem; color: var(--ink-2); margin: 0; }
.source .go { font: 600 .74rem/1 var(--mono); letter-spacing: .07em; color: var(--oxblood);
  margin-top: .6rem; display: inline-block; }
.source .derivative { border-left: 3px solid var(--amber); }

/* -------------------------------------------------------------- player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--band); color: var(--paper-2);
  border-top: 2px solid var(--oxblood);
  padding: .6rem var(--gut) calc(.6rem + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .28s ease;
  box-shadow: 0 -8px 24px -14px rgba(0,0,0,.8);
}
.player.on { transform: none; }
@media (prefers-reduced-motion: reduce) { .player { transition: none; } }
.player-in { width: min(100%, var(--wrap)); margin-inline: auto; display: flex; align-items: center; gap: .6rem; }
.player-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #6c6558;
  background: #3a352d; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.player-btn:hover { background: #4a443a; }
.player-meta { min-width: 0; flex: 1; }
.player-title { font: 600 .84rem/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-line { font: 400 .77rem/1.3 var(--serif); color: #c3bcae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.player-close { flex: none; background: none; border: none; color: #9a9285; cursor: pointer; font-size: 1.3rem; line-height: 1; padding: .4rem; }
.player-track { height: 3px; background: #4a443a; border-radius: 2px; margin-top: .5rem; overflow: hidden; }
.player-fill { height: 100%; width: 0; background: var(--oxblood-2); }
.player-chapters { display: flex; gap: .35rem; overflow-x: auto; margin-top: .5rem; padding-bottom: .2rem; scrollbar-width: none; }
.player-chapters::-webkit-scrollbar { display: none; }
.player-chapters button {
  flex: none; font: 500 .7rem/1 var(--mono); letter-spacing: .04em; padding: .42rem .55rem;
  background: #3a352d; color: #c3bcae; border: 1px solid #554f45; border-radius: 2px; cursor: pointer;
}
.player-chapters button[aria-current="true"] { background: var(--oxblood); color: #fff; border-color: var(--oxblood); }
body.player-open { padding-bottom: 8.5rem; }

/* ------------------------------------------------------------ subscribe */
.subscribe { background: var(--band); color: var(--paper-2); padding: 2.2rem 0; margin-top: 3rem; }
.subscribe h2 { color: #fff; font-size: 1.4rem; }
.subscribe p { color: #c3bcae; font-size: .97rem; }
.sub-form { display: flex; flex-direction: column; gap: .55rem; margin-top: 1rem; }
.sub-form input[type="email"] {
  font: 400 1rem/1.3 var(--sans); padding: .8rem .85rem; min-height: 48px;
  background: #3a352d; color: #fff; border: 1px solid #554f45; border-radius: var(--radius);
}
.sub-form input::placeholder { color: #8f8879; }
.sub-form button { min-height: 48px; background: var(--oxblood); color: #fff; border-color: var(--oxblood);
  justify-content: center; }
.sub-form button:hover { background: var(--oxblood-2); border-color: var(--oxblood-2); }
.sub-hp { position: absolute; left: -9999px; }
.sub-msg { font-size: .9rem; margin-top: .6rem; min-height: 1.2em; }
.sub-msg.ok { color: #9fd0a6; }
.sub-msg.err { color: #e79b8b; }
.sub-fine { font-size: .8rem; color: #8f8879; margin-top: .7rem; }

/* --------------------------------------------------------------- share */
.tiles { display: grid; gap: .55rem; margin-top: 1rem; }
.tile-link {
  display: flex; gap: .7rem; align-items: center; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: .6rem; box-shadow: var(--shadow-card);
}
.tile-link img { width: 64px; height: 64px; flex: none; border-radius: 2px; border: 1px solid var(--rule); background: var(--paper-2); }
.tile-link .tl-t { font: 600 .9rem/1.32 var(--sans); }
.tile-link .tl-n { font: 500 .66rem/1 var(--mono); letter-spacing: .09em; color: var(--ink-3); display: block; margin-bottom: .2rem; }

/* -------------------------------------------------------------- footer */
.foot { padding: 2.2rem 0 3rem; border-top: 1px solid var(--rule); margin-top: 2.4rem; font-size: .88rem; color: var(--ink-3); }
.foot a { color: var(--ink-2); }
.foot p { margin-bottom: .6rem; }
.foot .corr { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); padding: .8rem .9rem; margin-bottom: 1rem; }
.foot .corr b { color: var(--oxblood); font-family: var(--sans); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: .25rem; }

/* --------------------------------------------------------------- reveal */
/* threshold 0, never a fraction: a fractional threshold cannot be met by an
   element taller than viewport/threshold, and these panels are content-sized.
   .reveal--flat is applied in JS to anything taller than the viewport so it
   fades instead of translating a very large composited layer. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal--flat { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------ wider bp */
@media (min-width: 34rem) {
  .tally { grid-template-columns: repeat(4, 1fr); }
  .field { grid-template-columns: 8.5rem 1fr; gap: .8rem; align-items: baseline; }
  .field dt { padding-top: .12rem; }
}
@media (min-width: 46rem) {
  :root { --wrap: 40rem; }
  .mech-list { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
}

@media print {
  .player, .subscribe, .btn-row, .skip { display: none !important; }
  body { background: #fff; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* The corrections address stays legible with scripting off; see the note in
   render.mjs. .sr-only carries the real @ for screen readers and copy-paste. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.foot .corr-addr { font-family: var(--mono); font-size: .92em; white-space: nowrap; }
