/* $SHERIFF: the ledger.
   Every value here is copied from working/DESIGN-TOKENS.json. Nothing is computed,
   guessed or rounded, and nothing is overridden inline in the markup.
   Type lives in /assets/css/type.css and is loaded first. */

/* ══ 1. TOKENS ═══════════════════════════════════════════════════════════════ */
:root{
  /* colour: there is no positive colour in this system. A clear reading is plain ink. */
  --ground:#D4D5CC;
  --ground-2:#CACBC1;
  --surface:#171814;
  --surface-2:#20211C;
  --ink:#1B1C17;
  --ink-2:#55584C;
  --paper:#D4D5CC;
  --paper-2:#9A9C92;
  --accent:#6E1D22;
  --accent-lift:#CC6A61;
  --seal-edge:#4E1216;
  --signal-clear:var(--ink);
  --signal-adverse:var(--accent);
  --signal-unknown:#48525B;
  --signal-unknown-dark:#8B99A6;
  --signal-stale:#7A6033;
  --focus:var(--accent);

  /* rules: ink alpha, never a neutral token */
  --rule-hair:rgb(27 28 23 / 0.20);
  --rule-column:rgb(27 28 23 / 0.13);
  --rule-strong:rgb(27 28 23 / 0.42);
  --rule-dark:rgb(212 213 204 / 0.14);
  --rule-dark-strong:rgb(212 213 204 / 0.30);

  /* the tally paints through variables so one drawing serves paper and terminal inset */
  --tally-stick:var(--ground-2);
  --tally-cut:var(--ground);
  --tally-split:var(--ink);
  --tally-rule:var(--rule-strong);
  --tally-unknown:var(--signal-unknown);

  /* space: base unit 4px */
  --sp-1:4px;  --sp-2:8px;  --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px;
  --sp-8:32px; --sp-10:40px; --sp-12:48px; --sp-16:64px; --sp-20:80px; --sp-24:96px;
  --rhythm-tight:clamp(2.5rem,4vw,4rem);
  --rhythm-base:clamp(4rem,7vw,7rem);
  --rhythm-open:clamp(6.5rem,11vw,11rem);

  /* radius: three values, each earned. 6px and 8px are banned outright. */
  --r-0:0;
  --r-chip:2px;
  --r-seal:999px;

  /* motion */
  --d-press:90ms; --d-ui:120ms; --d-rule:320ms;
  --e-press:cubic-bezier(0.2,0,0,1);
  --e-rule:cubic-bezier(0.65,0,0.35,1);
  --e-ui:cubic-bezier(0.4,0,0.2,1);

  /* grid */
  --max:1280px;
  --gutter:24px;
  --pad:20px;
}
@media (min-width:768px){ :root{ --pad:32px; --gutter:20px; } }
@media (min-width:1024px){ :root{ --pad:48px; --gutter:24px; } }

/* ══ 2. GROUND ═══════════════════════════════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion:reduce){ html{scroll-behavior:auto;} }

body{
  margin:0;
  /* NO page-level overflow-x clip. It would hide a real overflow from every probe that
     reads scrollWidth, and this studio has shipped a band 40% off-screen behind exactly
     that mask. Overflow is fixed at the element that causes it, not concealed here. */
  color:var(--ink);
  background-color:var(--ground);
  /* grain: a STATIC 180px tile on the ground, not an overlay on a scrolling container */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat:repeat;
  background-size:180px 180px;
}
img,svg{max-width:100%;}
img{height:auto;}
/* A class that sets `display` beats the UA sheet's [hidden]{display:none}. Without this,
   `el.hidden = true` silently does nothing to .market-grid or .roll-row and the filters
   look broken while the property reads back true. */
[hidden]{display:none !important;}
/* the shared notch <defs>: out of flow, zero box, never painted */
.svg-defs{position:absolute;width:0;height:0;overflow:hidden;}
/* Machine strings live in this prose: 42-character addresses, selector signatures, byte
   counts. `anywhere` (not `break-word`) is required, because only `anywhere` reduces the
   MIN-CONTENT width, which is what actually overflows a narrow ruled column. */
.entry-part-body,.mini-body,.s-stmt,.l-claim,.l-query,.gap-body,.faq dd,.claim p,.addr{
  overflow-wrap:anywhere;
}
a{color:inherit;text-underline-offset:0.18em;text-decoration-thickness:from-font;}
a:hover{text-decoration-color:var(--accent);}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;}
::selection{background:var(--accent);color:var(--ground);}
hr{border:0;border-top:1px solid var(--rule-hair);margin:0;}
code{background:none;padding:0;}

/* visually hidden by CLIP, not by a -9999px offset: an off-canvas element is still a real
   box, and every overflow probe has to special-case it forever */
.skip{
  position:absolute;left:0;top:0;z-index:80;
  clip-path:inset(50%);white-space:nowrap;
  background:var(--accent);color:var(--ground);padding:var(--sp-3) var(--sp-4);
  font-family:var(--font-mono);font-size:var(--t-stamp);text-transform:uppercase;
  letter-spacing:0.06em;font-weight:600;
}
.skip:focus{clip-path:none;}

/* ══ 3. PAGE SHELL AND THE SEVEN RULED COLUMNS ═══════════════════════════════
   Seven columns because the Exchequer cloth was ruled into seven, each an order of
   magnitude. Three at tablet, one at phone. Nothing is left to a utility framework. */
.sec{
  max-width:var(--max);
  margin-inline:auto;
  padding-inline:var(--pad);
  padding-block-start:var(--rhythm-base);
  /* below 1600 a marginal note sets AFTER its section, never before it */
  display:flex;flex-direction:column;
}
.sec > .sec-body{order:1;}
.sec > .marginalia{order:2;}
.rh-tight{padding-block-start:var(--rhythm-tight);}
.rh-open{padding-block-start:var(--rhythm-open);}
.sec-body{min-width:0;}

/* At 1600px and up the pins and marginal notes leave the 1280 column and set in the left
   margin, as manuscript marginalia. That is what makes 1920 a different layout rather
   than the same layout with more empty space. */
.marginalia{margin-block-start:var(--sp-6);border-top:1px solid var(--rule-hair);padding-top:var(--sp-3);}
.marginalia p{color:var(--ink-2);max-width:38ch;margin:0;}
@media (min-width:1600px){
  .sec{
    max-width:1524px;
    display:grid;
    grid-template-columns:220px minmax(0,1280px);
    column-gap:var(--gutter);
    padding-inline:0;
  }
  .sec > .sec-body{grid-column:2;grid-row:1;}
  .sec > .marginalia{
    grid-column:1;grid-row:1;margin-block-start:0;border-top:0;padding-top:0;
    text-align:right;
  }
  .marginalia p{max-width:none;}
}

.grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  column-gap:var(--gutter);
  row-gap:var(--sp-8);
}
.grid > *{min-width:0;}
@media (min-width:768px){ .grid{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media (min-width:1024px){
  .grid{grid-template-columns:repeat(7,minmax(0,1fr));}
  .col-1-2{grid-column:1/3;}
  .col-1-3{grid-column:1/4;}
  .col-1-4{grid-column:1/5;}
  .col-1-5{grid-column:1/6;}
  .col-4-5{grid-column:4/6;}
  .col-5-7{grid-column:5/8;}
  .col-6-7{grid-column:6/8;}
  .col-7{grid-column:7/8;}
}
@media (min-width:768px) and (max-width:1023.98px){
  .col-1-2,.col-1-3,.col-1-4,.col-1-5,.col-4-5,.col-5-7,.col-6-7,.col-7{grid-column:1/4;}
}

/* ══ 4. HEADER: no motion. It does not shrink, hide, blur or animate on scroll. ══ */
.site-header{
  position:sticky;top:0;z-index:40;
  background:var(--ground);
  border-bottom:1px solid var(--rule-strong);
}
.hdr{
  max-width:var(--max);margin-inline:auto;padding:var(--sp-2) var(--pad);
  display:grid;grid-template-columns:1fr auto;align-items:center;gap:var(--sp-3);
}
.brand{display:flex;align-items:center;gap:var(--sp-3);text-decoration:none;min-height:44px;}
.brand-mark{width:32px;height:32px;display:block;}
.brand-word{
  font-family:var(--font-display);font-size:1.0625rem;line-height:1;
  letter-spacing:0.055em;text-transform:uppercase;
}
.nav{display:none;}
.nav ul{list-style:none;display:flex;gap:var(--sp-5);margin:0;padding:0;}
.nav a{text-decoration:none;color:var(--ink-2);padding-block:var(--sp-3);display:inline-block;}
.nav a:hover,.nav a:focus-visible{color:var(--ink);text-decoration:underline;}
.chip{
  /* inline-block, never inline-flex: flex would eat the space between the label and the
     figure and print PIN55,558,221 */
  margin:0;border:1px solid var(--rule-strong);border-radius:var(--r-chip);
  padding:var(--sp-2) var(--sp-3);background:var(--ground-2);
  display:inline-block;white-space:nowrap;
}
.chip--addr{justify-self:end;max-width:100%;overflow:hidden;text-overflow:ellipsis;}
.hdr-pin{
  border-top:1px solid var(--rule-hair);
  max-width:var(--max);margin-inline:auto;padding:var(--sp-2) var(--pad);
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);
}
.hdr-pin .chip{background:none;border-color:var(--rule-hair);}
.contents summary{
  list-style:none;cursor:pointer;padding-block:var(--sp-3);min-height:44px;
  display:flex;align-items:center;color:var(--ink-2);
}
.contents summary::-webkit-details-marker{display:none;}
.contents summary::after{content:"+";font-family:var(--font-mono);margin-left:0.6ch;}
.contents[open] summary::after{content:"\2212";}
.contents{position:relative;}
.contents ul{
  list-style:none;margin:0;padding:0 var(--pad);border-top:1px solid var(--rule-hair);
  position:absolute;left:calc(-1 * var(--pad));right:calc(-1 * var(--pad));top:100%;
  background:var(--ground);border-bottom:1px solid var(--rule-strong);z-index:41;
}
.contents li{border-bottom:1px solid var(--rule-hair);}
.contents a{display:block;padding:var(--sp-3) 0;min-height:44px;text-decoration:none;}
@media (max-width:767.98px){
  .hdr{grid-template-columns:auto minmax(0,1fr);}
  .brand-word{font-size:0.9375rem;white-space:nowrap;}
  .chip--addr{white-space:normal;text-align:right;line-height:1.3;}
}
@media (min-width:768px){
  .hdr{grid-template-columns:auto 1fr auto;}
  .nav{display:block;}
  .contents{display:none;}
  .hdr-pin{justify-content:flex-end;}
  .brand-mark{width:36px;height:36px;}
}
@media (min-width:1600px){
  .hdr,.hdr-pin{max-width:1524px;padding-inline:0;}
  .hdr-pin{justify-content:flex-start;}
}

/* ══ 5. HEADINGS, OPENERS, PROSE ═════════════════════════════════════════════ */
.opener{margin-bottom:var(--sp-8);}
.opener h2{margin:0;max-width:20ch;}
.t-eyebrow{margin:0 0 var(--sp-3);color:var(--ink-2);}
p{margin:0 0 var(--sp-5);}
p:last-child{margin-bottom:0;}
h3{margin:0 0 var(--sp-3);}
.note{
  font-family:var(--font-prose);font-style:italic;color:var(--ink-2);
  max-width:38ch;font-size:var(--t-body);line-height:1.45;
  border-top:1px solid var(--rule-hair);padding-top:var(--sp-3);
}
.src{color:var(--ink-2);margin-top:var(--sp-3);text-transform:none;letter-spacing:0.02em;}
.sec-foot{color:var(--ink-2);}
.crumb{color:var(--ink-2);margin-bottom:var(--sp-4);}
.crumb a{color:var(--ink);}

.pullquote{
  margin:0;padding-block:var(--sp-6);
  border-top:1.5px solid var(--rule-strong);border-bottom:1.5px solid var(--rule-strong);
}
.pullquote p{
  margin:0;font-family:var(--font-display);font-size:var(--t-title);
  line-height:var(--lh-title);max-width:22ch;
}

.stamp{margin:0;color:var(--ink-2);}
.coverage-line{margin:var(--sp-3) 0 0;color:var(--ink-2);}

/* ══ 6. CONTROLS. A ledger is square: --r-0 on every control. ════════════════ */
.controls{display:flex;flex-wrap:wrap;gap:var(--sp-3);margin-top:var(--sp-8);}
.btn{
  /* inline-block, not inline-flex. A flex container turns the label's text nodes into
     flex items and eats the spaces between them: "Open all 40 entries" shipped as
     "Open all40entries" for exactly that reason. */
  display:inline-block;text-align:center;
  padding:13px var(--sp-5);line-height:1.3;
  border-radius:var(--r-0);text-decoration:none;
  transition:background-color var(--d-ui) var(--e-ui),color var(--d-ui) var(--e-ui);
}
.btn--primary{background:var(--accent);color:var(--ground);border:1px solid var(--seal-edge);}
.btn--primary:hover{background:var(--seal-edge);}
.btn--secondary{background:none;color:var(--ink);border:1px solid var(--rule-strong);}
.btn--secondary:hover{background:var(--ground-2);}
@media (max-width:479.98px){ .controls{flex-direction:column;} .btn{width:100%;} }

/* ══ 7. HERO. Never 100vh. Never place-items:center. Content height, left aligned. ══ */
.hero{padding-bottom:0;}
/* content height with a min-height FLOOR. Never 100vh, never place-items:center. */
.hero .sec-body{min-height:420px;}
.hero-headline{margin:0 0 var(--sp-6);max-width:14ch;}
.hero .citable{margin-bottom:var(--sp-5);}
.hero-stamp{color:var(--ink-2);margin:0;}
.hero-grid{row-gap:var(--sp-6);}
.hero-grid .col-7{align-self:end;}
@media (min-width:1024px){
  .hero-headline{max-width:11ch;}
  .hero .citable{max-width:48ch;}
}

/* ══ 8. THE TALLY. The made thing IS the UI, not an illustration beside it. ══ */
.tally{margin-block:var(--sp-8) var(--sp-4);}
.hero-tally{margin-top:var(--sp-16);}
.tally-scroll{overflow-x:auto;overscroll-behavior-x:contain;}
.tally-svg{display:block;height:64px;width:1200px;max-width:none;}
.tally-cap{margin:var(--sp-3) 0 0;color:var(--ink-2);}
.tally-scrollhint{color:var(--signal-unknown);}
@media (min-width:900px){ .tally-scrollhint{display:none;} }
@media (min-width:900px){
  .tally-svg{width:100%;height:auto;aspect-ratio:1200/64;}
}
.tally-svg--6{width:100%;height:auto;aspect-ratio:700/96;min-width:300px;}
.tally-svg .slot{cursor:pointer;}
.tally-svg .slot:focus-visible{outline:2px solid var(--focus);outline-offset:1px;}
/* The notches are <use> references, so a lit slot cannot be styled by targeting a <path>:
   a presentation attribute inside the shadow tree beats an inherited value. It is styled
   by overriding the custom properties the defs read, which DO inherit into that tree. */
.tally-svg .slot.is-lit{--tally-unknown:var(--accent);--tally-cut:var(--accent);
  --tally-rule:var(--accent);}
/* M2: the stick is being cut. First tally in view only, once, never all forty. */
@media (prefers-reduced-motion:no-preference){
  .tally.m2 .tally-svg{
    transform:scaleX(0);transform-origin:left center;
    transition:transform var(--d-rule) var(--e-rule);
    animation:tally-fallback 1ms linear 3s forwards;   /* same safety net as M1 */
  }
  .tally.m2.is-drawn .tally-svg{transform:scaleX(1);animation:none;}
  @keyframes tally-fallback{to{transform:scaleX(1);}}
}

/* ══ 9. SURFACES TABLE. An unrun check renders at the weight of a finding. ══ */
.surfaces{margin-top:var(--sp-4);border-top:1px solid var(--rule-strong);}
.surfaces-head{display:none;color:var(--ink-2);}
.surface-row{
  display:grid;grid-template-columns:2.75rem minmax(0,1fr);
  gap:var(--sp-1) var(--sp-3);
  padding-block:12px;
  border-bottom:1px solid var(--rule-hair);
  /* M3 feedback: the rule DARKENS, it does not thicken. The token's 1px -> 2px would
     animate a layout property and shift every row under the cursor by a pixel. */
  transition:background-color var(--d-ui) var(--e-ui),border-bottom-color var(--d-ui) var(--e-ui);
}
.surface-row .s-num{grid-column:1;grid-row:1;color:var(--ink-2);font-family:var(--font-mono);
  font-variant-numeric:tabular-nums slashed-zero;font-size:var(--t-stamp);padding-top:0.25em;}
.surface-row .s-name{grid-column:2;grid-row:1;font-weight:700;}
.surface-row .s-state{grid-column:2;grid-row:2;}
.surface-row .s-stmt{grid-column:2;grid-row:3;font-family:var(--font-mono);
  font-size:var(--t-data);line-height:var(--lh-data);color:var(--ink-2);}
/* the struck rule: the visual verb for "we did not check this". Dash pattern 3 2. */
.surface-row--unassessed{
  border-bottom-color:transparent;
  background-image:linear-gradient(to right,var(--signal-unknown) 0 3px,transparent 3px 5px);
  background-size:5px 1px;background-repeat:repeat-x;background-position:0 100%;
}
.surface-row--unassessed .s-name,.surface-row--unassessed .s-num{color:var(--signal-unknown);}
.surface-row.is-lit{background-color:var(--ground-2);}
/* a rating chip wraps: nowrap would run it straight over the statement column */
.chip--unassessed,.chip--rating{
  white-space:normal;max-width:100%;border-radius:var(--r-chip);
  padding:2px var(--sp-2);display:inline-block;background:none;
}
.chip--unassessed{color:var(--signal-unknown);border:1px dashed var(--signal-unknown);}
.chip--rating{border:1px solid var(--rule-strong);color:var(--ink);}
.s-state{min-width:0;}
.s-count{
  display:block;margin-top:var(--sp-2);color:var(--ink-2);
  font-family:var(--font-mono);font-size:var(--t-stamp);letter-spacing:0.06em;
  font-variant-numeric:tabular-nums slashed-zero;
}
@media (min-width:768px){
  .surface-row{grid-template-columns:2.75rem 38% minmax(0,1fr);}
  .surface-row .s-name{grid-row:1/3;}
  .surface-row .s-state{grid-column:3;grid-row:1;}
  .surface-row .s-stmt{grid-column:3;grid-row:2;}
}
@media (min-width:1024px){
  .surfaces{
    background-image:repeating-linear-gradient(to right,var(--rule-column) 0 1px,transparent 1px calc(100%/7));
  }
  .surfaces-head,.surface-row{
    display:grid;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:var(--gutter);
  }
  .surfaces-head{border-bottom:1px solid var(--rule-strong);padding-block:var(--sp-2);}
  .surfaces-head span:nth-child(1){grid-column:1;}
  .surfaces-head span:nth-child(2){grid-column:2/4;}
  .surfaces-head span:nth-child(3){grid-column:4;}
  .surfaces-head span:nth-child(4){grid-column:5/8;}
  .surface-row .s-num{grid-column:1;grid-row:1;}
  .surface-row .s-name{grid-column:2/4;grid-row:1;}
  .surface-row .s-state{grid-column:4;grid-row:1;}
  .surface-row .s-stmt{grid-column:5/8;grid-row:1;}
}

/* legend */
.legend{border-top:1.5px solid var(--rule-strong);padding-top:var(--sp-3);}
.legend > .t-stamp{color:var(--ink-2);margin:0 0 var(--sp-3);}
.legend-list{list-style:none;margin:0 0 var(--sp-3);padding:0;}
.legend-list li{display:flex;gap:var(--sp-3);padding-block:var(--sp-1);
  border-bottom:1px solid var(--rule-hair);font-size:var(--t-data);}
.legend-list .num{min-width:5ch;color:var(--ink-2);}
.legend-note{font-size:var(--t-data);color:var(--ink-2);font-family:var(--font-prose);}

/* ══ 10. THE TERMINAL INSET. Permitted in exactly two components. One border depth. ══ */
.entry-card,.evidence-ledger{
  background:var(--surface);color:var(--paper);
  border:1px solid var(--rule-dark);border-radius:var(--r-0);
  /* no shadow, no glow, no backdrop-filter */
  --ink:var(--paper);
  --ink-2:var(--paper-2);
  --rule-hair:var(--rule-dark);
  --rule-strong:var(--rule-dark-strong);
  --signal-unknown:var(--signal-unknown-dark);
  --tally-stick:var(--surface-2);
  --tally-cut:var(--paper);
  --tally-split:var(--paper);
  --tally-rule:var(--rule-dark-strong);
  --tally-unknown:var(--signal-unknown-dark);
}
.entry-card{padding:var(--sp-5);}
.entry-card-head{border-bottom:1px solid var(--rule-dark-strong);padding-bottom:var(--sp-4);
  margin-bottom:var(--sp-5);}
.entry-card-head .tally{margin-block:var(--sp-4) 0;}
.entry-addr{margin:var(--sp-3) 0 0;}
.entry-part{padding-block:var(--sp-5);border-bottom:1px solid var(--rule-dark);}
.entry-part:last-child{border-bottom:0;padding-bottom:0;}
.entry-part-label{color:var(--paper-2);margin:0 0 var(--sp-3);}
.entry-part-body p{max-width:62ch;}
.entry-part-body code{color:var(--paper);}
/* the fourth part is set in the same size and ink as the first. It is not a footnote. */
.entry-part--unverified{border-left:2px dashed var(--signal-unknown-dark);
  padding-left:var(--sp-4);margin-left:calc(-1 * var(--sp-4));}
.entry-part--unverified .entry-part-label{color:var(--signal-unknown-dark);}
.entry-card--mini{padding:var(--sp-4);}
.mini-head{color:var(--paper-2);margin:0 0 var(--sp-4);border-bottom:1px solid var(--rule-dark);
  padding-bottom:var(--sp-3);}
.mini-label{color:var(--paper-2);margin:0 0 var(--sp-2);}
.mini-body{margin-bottom:var(--sp-4);}
.mini-body p{font-size:var(--t-data);font-family:var(--font-mono);line-height:var(--lh-data);
  max-width:none;}
.mini-more a{color:var(--paper);}
@media (min-width:768px){ .entry-card{padding:var(--sp-8);} }
.addr{overflow-wrap:anywhere;font-size:0.94em;}

/* M1: the block-pin stamp. State transition: this row was just pinned. */
@media (prefers-reduced-motion:no-preference){
  .entry-card .stamp{
    opacity:0;transform:scale(1.04);transform-origin:left center;
    /* SAFETY NET, and it is not optional. If app.js never runs (module error, CSP, a
       blocked file) the pin must still appear. A reveal that never fires is
       indistinguishable from a blank page, and a block pin nobody can see is the one
       thing this site cannot ship. */
    animation:pin-fallback 1ms linear 3s forwards;
  }
  .entry-card.is-pinned .stamp{
    opacity:1;transform:scale(1);animation:none;
    transition:opacity var(--d-press) var(--e-press),transform var(--d-press) var(--e-press);
  }
  @keyframes pin-fallback{to{opacity:1;transform:scale(1);}}
}

/* ══ 11. EVIDENCE LEDGER ═════════════════════════════════════════════════════ */
.evidence-ledger{padding:var(--sp-4);overflow-x:auto;}
.ledger-head{display:none;color:var(--paper-2);}
.evidence-ledger .ledger-row{
  display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sp-1);
  padding-block:12px;border-bottom:1px solid var(--rule-dark);
}
.evidence-ledger .ledger-row:last-child{border-bottom:0;}
.l-claim{font-family:var(--font-prose);}
.l-query{color:var(--paper-2);overflow-wrap:anywhere;}
.l-type,.l-cov,.l-pin{color:var(--paper-2);}
.l-cov--none{color:var(--signal-unknown-dark);}
@media (min-width:768px){
  .ledger-head,.evidence-ledger .ledger-row{
    display:grid;grid-template-columns:minmax(0,2fr) minmax(0,2.4fr) 9ch 8ch 11ch;
    column-gap:var(--sp-4);
  }
  .ledger-head{border-bottom:1px solid var(--rule-dark-strong);padding-bottom:var(--sp-2);}
}

/* ══ 12. THE ROLL. A row is a record, not a card. ════════════════════════════ */
.roll-table{border-top:1px solid var(--rule-strong);margin-top:var(--sp-6);}
.roll-head{display:none;color:var(--ink-2);}
.roll-row{
  display:grid;grid-template-columns:3.5rem minmax(0,1fr);
  gap:var(--sp-2) var(--sp-3);
  padding:var(--sp-4) 0;
  border-bottom:1px solid var(--rule-hair);
  transition:background-color var(--d-ui) var(--e-ui),border-bottom-color var(--d-ui) var(--e-ui);
}
.roll-row .r-no{grid-column:1;color:var(--ink-2);font-size:var(--t-stamp);}
.roll-row .r-sym{grid-column:2;font-weight:700;}
.roll-row .r-sym a{text-decoration:none;}
.roll-row .r-sym a:hover{text-decoration:underline;}
.roll-row .r-addr{grid-column:1/3;}
.roll-row .r-pair{grid-column:1/3;color:var(--ink-2);font-size:var(--t-stamp);}
.roll-row .r-cov{grid-column:1;color:var(--ink-2);font-size:var(--t-stamp);}
.roll-row .r-pin{grid-column:2;color:var(--ink-2);font-size:var(--t-stamp);}
.roll-row .r-tally{grid-column:1/3;}
.tally-11{display:none;}
.tally-6{display:block;}
.tally-6-note{display:block;color:var(--ink-2);margin-top:var(--sp-2);}
/* M3: row hover. Feedback, and the only motion on a list of forty. */
.ledger-row:hover,.surface-row:hover{background-color:var(--ground-2);
  border-bottom-color:var(--rule-strong);}
@media (prefers-reduced-motion:reduce){
  /* reduced motion keeps the colour step and drops nothing else: there is nothing else */
  .ledger-row:hover,.surface-row:hover{border-bottom-color:var(--rule-hair);}
}
@media (min-width:768px) and (max-width:1023.98px){
  .roll-table{display:grid;grid-template-columns:1fr 1fr;column-gap:var(--gutter);}
  .roll-row{border-bottom:1px solid var(--rule-hair);}
}
@media (min-width:1024px){
  /* SEVEN equal ruled columns, so the vertical ruling lands on real column boundaries.
     ch units are refused here: the head sets in mono and the rows in Caslon, so 8ch is
     two different widths and the header would sit off its own column. */
  .roll-head,.roll-row{
    display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
    column-gap:var(--gutter);align-items:baseline;
  }
  .roll-head{border-bottom:1px solid var(--rule-strong);padding-bottom:var(--sp-2);}
  .roll-head span:nth-child(1){grid-column:1;}
  .roll-head span:nth-child(2){grid-column:2;}
  .roll-head span:nth-child(3){grid-column:3/5;}
  .roll-head span:nth-child(4){grid-column:5;}
  .roll-head span:nth-child(5){display:none;}
  .roll-head span:nth-child(6){grid-column:6;}
  .roll-head span:nth-child(7){grid-column:7;}
  .roll-row .r-no{grid-column:1;grid-row:1;}
  .roll-row .r-sym{grid-column:2;grid-row:1;}
  .roll-row .r-addr{grid-column:3/5;grid-row:1;}
  .roll-row .r-pair{grid-column:5;grid-row:1;}
  .roll-row .r-cov{grid-column:6;grid-row:1;}
  .roll-row .r-pin{grid-column:7;grid-row:1;}
  .roll-row .r-tally{grid-column:1/8;grid-row:2;}
  .tally-11{display:block;}
  .tally-6{display:none;}
  .roll-table{
    background-image:repeating-linear-gradient(to right,var(--rule-column) 0 1px,transparent 1px calc(100%/7));
  }
  .roll-row:nth-child(even of .roll-row){background-color:rgb(27 28 23 / 0.025);}
}
.filters{display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-top:var(--sp-6);}
.filter-btn{
  background:none;border:1px solid var(--rule-strong);border-radius:var(--r-0);
  color:var(--ink-2);padding:var(--sp-2) var(--sp-4);min-height:44px;cursor:pointer;
  font-family:var(--font-mono);
  transition:background-color var(--d-ui) var(--e-ui),color var(--d-ui) var(--e-ui);
}
.filter-btn:hover{background:var(--ground-2);color:var(--ink);}
.filter-btn[aria-pressed="true"]{background:var(--ink);color:var(--ground);border-color:var(--ink);}
.filter-note{color:var(--ink-2);margin-top:var(--sp-3);}
.empty-state{margin-top:var(--sp-8);padding:var(--sp-5);border:1px dashed var(--signal-unknown);
  color:var(--ink);}

/* ══ 13. FIGURE TABLES. Figures right-aligned, tabular, slashed zero. ══════════ */
.figtable{border-top:1px solid var(--rule-strong);margin-block:var(--sp-4);}
.figrow{
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  gap:var(--sp-2) var(--sp-4);align-items:baseline;
  padding-block:10px;border-bottom:1px solid var(--rule-hair);
}
.fignum{
  font-family:var(--font-mono);font-variant-numeric:tabular-nums slashed-zero;
  font-size:var(--t-data);text-align:end;white-space:nowrap;
}
.termval{text-align:end;white-space:normal;max-width:38ch;justify-self:end;
  font-size:var(--t-data);line-height:var(--lh-data);}
.figtable--terms .figrow{grid-template-columns:minmax(0,1fr);}
@media (min-width:768px){
  .figtable--terms .figrow{grid-template-columns:14rem minmax(0,1fr);}
  .termval{text-align:start;justify-self:start;max-width:62ch;}
}
@media (min-width:1024px){
  /* four equal columns so the vertical ruling coincides with the column boundaries */
  .figtable--ruled{
    background-image:repeating-linear-gradient(to right,var(--rule-column) 0 1px,transparent 1px calc(100%/4));
  }
  /* column-gap:0 so the four tracks are exactly 25% each and the painted ruling lands on
     the real column boundaries rather than near them */
  .figtable--ruled .figrow{grid-template-columns:repeat(4,minmax(0,1fr));column-gap:0;}
  .figtable--ruled .figrow > span:first-child{grid-column:1/4;padding-right:var(--gutter);}
  .figtable--ruled .fignum{grid-column:4;}
}
.survivor{border-top:1.5px solid var(--rule-strong);padding-top:var(--sp-3);margin-bottom:var(--sp-6);}
.survivor > .t-stamp{color:var(--ink-2);margin:0 0 var(--sp-2);}
.survivor p{max-width:38ch;}
.factbox{border-top:1.5px solid var(--rule-strong);padding-top:var(--sp-3);}
.factbox > .t-stamp{color:var(--ink-2);margin:0;}
.factbox-h{margin-top:var(--sp-6);}

/* ══ 14. CLAIMS. A disclosure you have to squint at is not a disclosure. ══════ */
.claim{border-left:2px solid var(--rule-strong);padding-left:var(--sp-4);margin-bottom:var(--sp-6);}
.claim--unverified{border-left:2px dashed var(--signal-unknown);}
.claim-label{color:var(--ink-2);margin:0 0 var(--sp-2);}
.claim--unverified .claim-label{color:var(--signal-unknown);}
.claim-head{font-family:var(--font-display);font-size:var(--t-title);line-height:var(--lh-title);
  margin:0 0 var(--sp-3);}
/* the sentence itself stays at full-strength ink, never greyed toward illegibility */
.claim p:not(.claim-label){color:var(--ink);}
.arith{border-top:1.5px solid var(--rule-strong);border-bottom:1.5px solid var(--rule-strong);
  padding-block:var(--sp-5);margin-block:var(--rhythm-tight);}
.arith p{margin:0;font-size:var(--t-data);line-height:var(--lh-mono-block);}

/* ══ 15. THE GAPS. Not an accordion. Hiding them would defeat the section. ════ */
.gaps-list{list-style:none;margin:var(--sp-6) 0 0;padding:0;border-top:1px solid var(--rule-strong);}
.gap-item{display:grid;grid-template-columns:3rem minmax(0,1fr);gap:var(--sp-3);
  padding-block:var(--sp-5);border-bottom:1px solid var(--rule-hair);}
.gap-num{color:var(--ink-2);font-family:var(--font-mono);font-size:var(--t-stamp);
  font-variant-numeric:tabular-nums slashed-zero;padding-top:0.35em;}
.gap-head{font-family:var(--font-display);font-size:var(--t-title);line-height:var(--lh-title);
  margin:0 0 var(--sp-2);max-width:34ch;}
.gap-body p{margin:0;}
@media (min-width:1024px){
  .gap-item{grid-template-columns:repeat(7,minmax(0,1fr));column-gap:var(--gutter);}
  .gap-num{grid-column:1;}
  .gap-body{grid-column:2/6;}
}

/* ══ 16. DEFINITION LISTS. Not a three-card row. There is no card row on this site. ══ */
.deflist{margin:var(--sp-6) 0;border-top:1px solid var(--rule-strong);}
.dl-pair{padding-block:var(--sp-4);border-bottom:1px solid var(--rule-hair);}
.deflist dt{color:var(--ink-2);margin-bottom:var(--sp-2);}
.deflist dd{margin:0;max-width:62ch;}
@media (min-width:768px){
  .dl-pair{display:grid;grid-template-columns:1fr 1fr;column-gap:var(--gutter);}
  .deflist dt{margin-bottom:0;padding-top:0.25em;}
}
@media (min-width:1024px){
  .dl-pair{grid-template-columns:repeat(7,minmax(0,1fr));}
  .deflist dt{grid-column:1;}
  .deflist dd{grid-column:2/6;}
}
.faq{margin:0;border-top:1px solid var(--rule-strong);}
.faq-pair{padding-block:var(--sp-6);border-bottom:1px solid var(--rule-hair);}
.faq dt{margin-bottom:var(--sp-3);max-width:34ch;}
.faq dd{margin:0;max-width:62ch;}
@media (min-width:1024px){
  .faq-pair{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:var(--gutter);}
  .faq dt{grid-column:1/3;margin-bottom:0;}
  .faq dd{grid-column:3/7;}
}

/* ══ 17. THE MARKET ROW. Four states, all built, all reachable before launch. ══ */
.market{margin-top:var(--rhythm-tight);}
.market-label{color:var(--ink-2);margin:0 0 var(--sp-3);}
.market-box{
  border:1px solid var(--rule-strong);padding:var(--sp-5);
  /* the box reserves its final height in every state: a placeholder that collapses is CLS */
  min-height:232px;
}
.market-state{margin:0 0 var(--sp-3);color:var(--ink-2);}
.market-msg{max-width:62ch;margin:0;}
.market-grid{
  display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sp-3);
  margin:var(--sp-4) 0 0;border-top:1px solid var(--rule-hair);
}
.market-cell{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--sp-4);
  align-items:baseline;padding-block:10px;border-bottom:1px solid var(--rule-hair);}
.market-cell .t-stamp{color:var(--ink-2);}
.market-cell .fignum{display:inline-flex;align-items:baseline;gap:0.5ch;}
.dir{flex:0 0 auto;transform:translateY(1px);}
.market-src{color:var(--ink-2);margin:var(--sp-4) 0 0;text-transform:none;letter-spacing:0.02em;}
.market[data-state="loading"] .market-grid .fignum{color:var(--signal-unknown);}
.market[data-state="unavailable"] .market-state{color:var(--signal-unknown);}
.market-retry{margin-top:var(--sp-4);}
@media (min-width:768px){
  .market-grid{grid-template-columns:1fr 1fr;column-gap:var(--sp-8);}
}

/* ══ 18. FOOTER ══════════════════════════════════════════════════════════════ */
.site-footer{
  margin-top:var(--rhythm-open);border-top:1px solid var(--rule-strong);
  padding-block:var(--sp-8) var(--sp-16);
}
.site-footer .sec-body{max-width:var(--max);margin-inline:auto;padding-inline:var(--pad);}
.foot-legal{max-width:62ch;color:var(--ink-2);}
.foot-pins,.foot-head{color:var(--ink-2);margin:0 0 var(--sp-2);text-transform:none;
  letter-spacing:0.02em;}
.foot-nav{list-style:none;display:flex;flex-wrap:wrap;gap:var(--sp-5);margin:var(--sp-6) 0 0;
  padding:0;}
.foot-nav a{color:var(--ink-2);text-decoration:none;}
.foot-nav a:hover{color:var(--ink);text-decoration:underline;}
@media (min-width:1024px){
  .site-footer .sec-body{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
    column-gap:var(--gutter);row-gap:var(--sp-6);}
  .foot-legal{grid-column:1/5;}
  .foot-pins{grid-column:5/8;text-align:end;}
  .foot-head{grid-column:5/8;text-align:end;}
  .foot-nav{grid-column:1/8;}
}
@media (min-width:1600px){
  .site-footer .sec-body{max-width:1524px;padding-inline:0;}
}

/* ══ 19. M4: the hero tally, scroll-scrubbed. Desktop only. CSS scroll-driven
   animation is not baseline, so it always ships behind @supports with a static
   fallback: below, the stick simply sits flat. ═══════════════════════════════ */
@media (min-width:1024px) and (prefers-reduced-motion:no-preference){
  @supports (animation-timeline:view()){
    .hero-tally .tally-scroll{
      animation:tally-settle linear both;
      animation-timeline:view();
      animation-range:entry 20% cover 70%;
    }
    @keyframes tally-settle{
      from{transform:rotate(-1.2deg);}
      to{transform:rotate(1.2deg);}
    }
  }
}
@media (prefers-reduced-motion:reduce){
  .hero-tally .tally-scroll{transform:none;}
  *,*::before,*::after{animation-duration:1ms !important;animation-iteration-count:1 !important;
    transition-duration:1ms !important;}
}

/* ══ 20. PRINT: the roll is a document. ══════════════════════════════════════ */
@media print{
  /* the two pure-neutral hex literals are banned at token level, so print drops the
     ground rather than replacing it: the press's own paper is the correct substrate */
  body{background-image:none;background-color:transparent;}
  .site-header,.controls,.filters,.skip,.tally-scrollhint{display:none;}
  .entry-card,.evidence-ledger{
    background:none;color:var(--ink);border:1px solid var(--rule-strong);
    --ink:#1B1C17;--ink-2:#55584C;--paper:#1B1C17;--paper-2:#55584C;
    --rule-hair:rgb(27 28 23 / 0.20);--rule-strong:rgb(27 28 23 / 0.42);
  }
}
