/* ═══════════════════════════════════════════════════════════════════════════
   17-stats.css — the per-symbol STATS view (.stx-*), added 2026-08-01.

   SEVENTEENTH file in the numeric-ordered set. Nothing above it was renamed,
   renumbered or reordered — this is APPENDED, which is the only safe way to
   join a cascade whose load order IS the cascade (see CLAUDE.md). It owns one
   namespace, `.stx-`, and overrides nothing. (`.stx-` was checked free across
   all sixteen predecessors before it was chosen; 15-structure.css had to be
   renamed mid-build after `.st-` collided with 13-widgets.css, which is why
   that check now happens first.)

   It deliberately reuses the Structure (`.dil-*`) and Positioning (`.pos-*`)
   geometry and, through them, the research surfaces' (05-chart-panels.css
   `.rf-*`): the same 60px page grid, the same band / evidence strip / gates /
   panels / provenance skeleton, the same `max(<rem>, var(--fs-floor))` type
   floors and `max(<rem>, var(--ctl-floor))` control floors. Four per-symbol
   research views that look like four products is worse than any of them
   looking plain.

   THE THREE THINGS THAT ARE NEW HERE all exist to stop a specific misreading:

     .stx-rc     THE RATE CELL. This is the only surface in the product that
                 publishes proportions, and a proportion is where a statistics
                 UI lies most easily. The cell is built so that the rate can
                 never appear alone: the family-corrected interval and the n
                 are laid out UNDER the number inside the same cell box, and
                 `.stx-bar` draws that interval as a line against a tick at
                 50%. Crossing the tick is POSITION, not hue, so a desaturated
                 screenshot still says "this is a coin flip".

     .stx-m.est  THE ESTIMATE MARK. Every spread on this page is inferred from
                 open/high/low/close by a published estimator; nobody measured
                 a quote. EST therefore gets the loudest of the four method
                 treatments, because an OHLC-inferred spread wearing the same
                 styling as a counted volume is the single most consequential
                 misreading available here.

     .stx-demo   THE SYNTHETIC BANNER. Rendered whenever a payload carries
                 `demo:true`, which only scripts/devtools/seed_stats_demo.py
                 ever sets. It is the loudest non-error element on the surface
                 for exactly one reason: a screenshot of seeded numbers must be
                 unusable as a trading claim.

   COLOUR. Two series ever need telling apart (the baseline and today), and
   they are BLUE and ORANGE — `--rsx-cat-4` and `--rsx-cat-2` from tokens.css.
   Green/red loses about 81% of its perceptual separation under deuteranopia;
   blue/orange loses none. No rainbow ramp, no dual axes, no truncated
   baselines, no 3-D. Every verdict is a WORD and hue only reinforces it.

   Borders are inset box-shadow rings, never 1px rounded borders: those render
   as bowtie artifacts in headless screenshots (CLAUDE.md).
   ═══════════════════════════════════════════════════════════════════════════ */

#stats-view{position:relative;}

/* THE HIDDEN ATTRIBUTE MUST WIN. Every expander below is a
   `<button aria-expanded>` + `<div hidden>` pair, and the UA's `[hidden]
   {display:none}` is a type-selector-strength rule that ANY class selector
   here outranks. Without this line `.stx-moreb{display:flex}` silently beats
   it and every caveat block ships OPEN — which is precisely the wall of text
   the declutter spec exists to prevent. Found in the browser, on the first
   screenshot. Scoped to this view and specific enough (0,1,1) to beat a bare
   class without reaching for !important. */
#stats-view [hidden]{display:none;}

.stx-inner{
  flex:1 1 auto;min-height:0;min-width:0;
  display:flex;flex-direction:column;gap:0.875rem;padding:0.875rem;
  overflow:hidden;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px);
  background-size:60px 60px;
}

/* ── Command band ───────────────────────────────────────────────────────────
   The question is the title, the tool is the subtitle, the readouts frame it
   and the actions close it. No hero, no centred headline, no oversized number
   floating in whitespace. */
.stx-band{
  flex:none;display:flex;align-items:center;gap:0.875rem;flex-wrap:wrap;
  padding:0.5rem 0.875rem;
  /* RESERVED, not guessed. `.top-cluster` is position:absolute at the top
     right of .main and floats OVER this view. Without this inset the band's
     last readout, the staleness chip and the Refresh button all sit UNDER the
     view dropdown — they look fine and are 100% unclickable, which is exactly
     the failure the hit-test rule exists for. The px floor is here because the
     cluster's own control height is a vw clamp, so a pure rem reservation
     drifts away from it below ~1300px. */
  padding-right:max(15rem, 216px);
  background:var(--bg-tertiary);border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-id{display:flex;align-items:baseline;gap:0.5rem;min-width:0;flex-wrap:wrap;}
.stx-code{
  flex:none;align-self:center;
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-caps);
  color:var(--accent);background:var(--accent-dim);
  padding:0.125rem 0.3125rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}
.stx-name{
  margin:0;min-width:0;
  font-family:var(--font-display);font-size:0.875rem;font-weight:700;
  letter-spacing:var(--tr-heading);color:var(--text-primary);line-height:1.15;
}
.stx-tool{
  flex:none;
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
}
.stx-readouts{
  display:flex;align-items:stretch;gap:0.875rem;flex-wrap:wrap;
  margin:0 0 0 auto;min-width:0;
}
.stx-ro{display:flex;flex-direction:column;gap:0.125rem;min-width:0;}
.stx-ro dt{
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
  white-space:nowrap;
}
.stx-ro dd{
  margin:0;display:inline-flex;align-items:baseline;gap:0.3125rem;
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.stx-acts{display:flex;align-items:center;gap:0.5rem;flex:none;}
.stx-btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:max(1.375rem, var(--ctl-floor));min-width:var(--ctl-floor);
  padding:0 0.5625rem;border:none;border-radius:var(--radius-sm);
  background:transparent;cursor:pointer;text-decoration:none;
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--text-secondary);white-space:nowrap;
  box-shadow:inset 0 0 0 1px var(--border-default);
  transition:color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.stx-btn:hover{
  color:var(--accent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}
.stx-btn:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}
.stx-il{margin-left:0.375rem;}

/* ── Scrolling body ────────────────────────────────────────────────────────
   The band and the provenance line are pinned; only this scrolls, so the foot
   line is at the foot of the TOOL rather than at the bottom of a long document
   nobody reaches. */
.stx-body{
  flex:1 1 auto;min-height:0;min-width:0;
  overflow-y:auto;overflow-x:hidden;
  display:flex;flex-direction:column;gap:0.875rem;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb, var(--accent) 22%, transparent) transparent;
  transition:opacity 160ms var(--ease-out);
}
.stx-body::-webkit-scrollbar{width:0.375rem;height:0.375rem;}
.stx-body::-webkit-scrollbar-track{background:transparent;}
.stx-body::-webkit-scrollbar-thumb{background:var(--border-default);border-radius:0.25rem;}
.stx-body:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--accent) 28%, transparent);}
/* Dimming is a LUMINANCE step, so it survives greyscale. */
.stx-body.busy{opacity:0.45;}

/* ── R1: the verdict ───────────────────────────────────────────────────────
   The single most important element on the surface, and it gets the
   typographic weight that implies. Deliberately NOT beside a number: nothing
   competes with it for the eye, which is why the readouts live up in the band
   and the gates start below it. */
.stx-verdict{
  flex:none;margin:0;padding:0.6875rem 0.875rem;
  background:var(--bg-tertiary);border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
  font-family:var(--font-display);
  font-size:max(0.9375rem, calc(var(--fs-floor) + 4px));font-weight:600;
  line-height:1.45;letter-spacing:var(--tr-heading);color:var(--text-primary);
}

/* ── The synthetic-data banner ─────────────────────────────────────────────
   Only ever rendered for a payload carrying demo:true, which only the devtools
   seeder sets. Loud on purpose. */
.stx-demo{
  flex:none;display:flex;flex-direction:column;gap:0.125rem;
  padding:0.5rem 0.875rem;border-radius:var(--radius-lg);
  background:color-mix(in srgb, var(--rsx-cat-3) 10%, var(--bg-tertiary));
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--rsx-cat-3) 45%, transparent);
}
.stx-demo b{
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--rsx-cat-3);
}
.stx-demo span{
  font-family:var(--font-sans);font-size:max(0.6875rem, var(--fs-floor));font-weight:500;
  line-height:1.45;color:var(--text-secondary);
}

/* ── The method mark ───────────────────────────────────────────────────────
   BARS · EST · CALC · SMPL. The WORD is the encoding; each reads at a distinct
   luminance in both themes, so a desaturated screenshot loses nothing. EST is
   the loud one because everything it marks is an inference from bar shape. */
.stx-m{
  flex:none;font-style:normal;
  font-family:var(--font-mono);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;letter-spacing:var(--tr-caps);
  padding:0.0625rem 0.25rem;border-radius:var(--radius-sm);
  color:var(--text-muted);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  cursor:help;white-space:nowrap;
}
.stx-m.bars{
  color:var(--text-secondary);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-m.est{
  color:var(--rsx-cat-2);
  background:color-mix(in srgb, var(--rsx-cat-2) 12%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--rsx-cat-2) 42%, transparent);
}
.stx-m.calc{
  color:var(--rsx-cat-4);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--rsx-cat-4) 26%, transparent);
}
.stx-m.sample{
  color:var(--rsx-cat-6);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--rsx-cat-6) 30%, transparent);
}
.stx-m.none{color:var(--text-xmuted);box-shadow:inset 0 0 0 1px var(--border-subtle);}

/* ── Evidence strip ────────────────────────────────────────────────────────
   Legend and census in one line, ABOVE the numbers. Not a tooltip and not a
   footnote: a screenshot of this surface must not be able to lose the
   distinction between a counted volume and an inferred spread. */
.stx-evi{
  flex:none;display:flex;align-items:center;gap:0.875rem;flex-wrap:wrap;
  padding:0.4375rem 0.75rem;
  background:var(--bg-secondary);border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
}
.stx-ev-k{
  flex:none;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
}
.stx-ev-i{display:inline-flex;align-items:center;gap:0.3125rem;min-width:0;}
.stx-ev-i b{
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  color:var(--text-primary);font-variant-numeric:tabular-nums;
}
.stx-ev-i em{
  font-style:normal;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:500;
  color:var(--text-secondary);
}

/* ── Gates: the five-second read ───────────────────────────────────────────
   Six cells: NAME / VERDICT WORD / one number with its own noun / one line of
   frame. Dense on purpose — a status line, not six cards each holding one
   number. EXPLICIT column counts, not auto-fit: auto-fit resolves to five at
   1440 and strands the sixth alone beside a 4/5-width hole. Divisors of six
   only: 2 → 3 → 6. */
.stx-gates{
  flex:none;display:grid;gap:0.5rem;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
@media (min-width:56rem){ .stx-gates{grid-template-columns:repeat(3, minmax(0, 1fr));} }
@media (min-width:120rem){ .stx-gates{grid-template-columns:repeat(6, minmax(0, 1fr));} }
.stx-gate{
  display:flex;min-width:0;
  background:var(--bg-tertiary);border-radius:var(--radius-lg);overflow:hidden;
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-g-rail{display:none;}
.stx-g-body{
  min-width:0;flex:1 1 auto;
  display:flex;flex-direction:column;gap:0.1875rem;
  padding:0.4375rem 0.625rem 0.5rem;
}
.stx-g-top{display:flex;align-items:center;gap:0.375rem;min-width:0;}
.stx-g-n{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
}
/* The type chip. Last thing dropped responsively, never replaced by an icon:
   it is what carries class for a colourblind reader. */
.stx-chip{
  flex:none;
  font-family:var(--font-mono);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;letter-spacing:var(--tr-caps);color:var(--text-secondary);
  padding:0.0625rem 0.25rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-default);white-space:nowrap;
}
.stx-g-verdict{
  font-family:var(--font-display);font-size:0.8125rem;font-weight:700;
  letter-spacing:var(--tr-heading);color:var(--text-primary);line-height:1.2;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* Severity is a luminance ladder as well as a word: a quiet gate reads
   secondary, a loud one primary. Never hue alone. */
.stx-gate[data-sev="0"] .stx-g-verdict{color:var(--text-muted);font-weight:600;}
.stx-gate[data-sev="1"] .stx-g-verdict{color:var(--text-secondary);}
.stx-g-num{display:flex;align-items:baseline;gap:0.375rem;min-width:0;flex-wrap:wrap;}
.stx-g-v{
  font-family:var(--font-mono);font-size:max(0.75rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;
}
.stx-g-v.none{color:var(--text-xmuted);}
.stx-g-vl{
  font-style:normal;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:600;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
}
.stx-g-frame{
  margin:0;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:500;
  line-height:1.4;color:var(--text-secondary);
}
.stx-u{
  font-style:normal;margin-left:0.125rem;
  font-size:0.8em;font-weight:600;color:var(--text-muted);
}

/* ── Panels ────────────────────────────────────────────────────────────────
   MULTICOL, not grid, for the same reason 15-structure.css uses one: the
   panels are wildly different heights and a grid row is as tall as its tallest
   cell, which leaves the "low density" hole the owner rejects. Columns pack
   them by flow and `break-inside:avoid` keeps a panel whole. The base-rate
   table is NOT in here — it is a full-width sibling, because a 7-column table
   inside a 24rem column is unreadable.

   TRAP (05-chart-panels.css records the same one): rem inside a MEDIA QUERY
   resolves against the initial 16px font, never against this app's fluid root,
   so 88rem here is 1408 CSS px. */
/* 30rem, not 24: there are only THREE panels here and two of them carry a
   figure. At 24rem a 1440 viewport resolves to three columns, one panel each,
   which is a grid wearing a multicol and leaves a 250px hole under the
   shortest — the "low density" the owner rejects. At 30rem 1440 gives two
   columns that pack 1 + 2, the charts get the width they need, and 2560 still
   opens out to three. */
.stx-grid{column-width:30rem;column-gap:0.5rem;}
.stx-panel{
  min-width:0;display:flex;flex-direction:column;
  break-inside:avoid;margin:0 0 0.5rem;
  background:var(--bg-tertiary);border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-panel.stx-wide{margin:0;}
.stx-p-head{
  flex:none;display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;
  padding:0.4375rem 0.75rem;
  border-bottom:1px solid var(--border-subtle);
}
.stx-p-head h3{
  margin:0;
  font-family:var(--font-display);font-size:max(0.75rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-heading);color:var(--text-primary);
}
.stx-p-note{
  margin-left:auto;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:500;
  color:var(--text-muted);
}
.stx-dl{margin:0;padding:0.125rem 0.75rem 0.5rem;}
.stx-pbody{padding:0.5rem 0.75rem 0.625rem;display:flex;flex-direction:column;gap:0.5rem;}

.stx-r{padding:0.3125rem 0;border-top:1px solid var(--border-subtle);min-width:0;}
.stx-r:first-child{border-top:none;}
.stx-r dt{
  float:left;margin-right:0.75rem;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
  line-height:1.5;
}
.stx-r dd{
  margin:0;display:flex;align-items:baseline;justify-content:flex-end;
  gap:0.375rem;min-width:0;flex-wrap:wrap;line-height:1.5;
}
.stx-v{
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}
.stx-v.quiet{color:var(--text-secondary);font-weight:600;}
.stx-v.none{
  color:var(--text-xmuted);font-weight:500;font-family:var(--font-sans);
  font-size:max(0.625rem, var(--fs-floor));text-transform:none;letter-spacing:0;
}
.stx-r.wide{display:flex;flex-direction:column;align-items:flex-start;gap:0.25rem;}
.stx-r.wide dt{float:none;margin:0;}
.stx-r.wide dd{justify-content:flex-start;width:100%;}
.stx-note{
  clear:both;margin:0.1875rem 0 0;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:500;
  line-height:1.45;color:var(--text-muted);
}

/* ── R3, inline class: the framing that changes what a number MEANS ────────
   A block ABOVE the numbers it frames, never a note hanging off the last row
   and never a title= attribute. `.loud` is for the two sentences a reader
   MUST not miss (the pooled-not-per-ticker one and the 216-hypotheses one);
   `.warn` is for a state that invalidates the number beside it. */
.stx-lede{
  clear:both;margin:0.375rem 0 0.25rem;padding:0.4375rem 0.5625rem;
  border-radius:var(--radius-sm);background:var(--bg-secondary);
}
.stx-lede.loud{background:var(--bg-tertiary);}
.stx-lede.warn{background:color-mix(in srgb, var(--red) 7%, var(--bg-secondary));}
.stx-lede b{
  display:block;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-primary);
}
.stx-lede.warn b{color:var(--red);}
.stx-lede span{
  display:block;margin-top:0.125rem;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:500;
  line-height:1.45;color:var(--text-secondary);
}
.stx-warn{
  flex:none;padding:0.5rem 0.75rem;border-radius:var(--radius-lg);
  background:color-mix(in srgb, var(--red) 7%, var(--bg-tertiary));
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-warn b{
  display:block;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--red);
}
.stx-warn span{
  display:block;margin-top:0.125rem;
  font-family:var(--font-sans);font-size:max(0.6875rem, var(--fs-floor));font-weight:500;
  line-height:1.45;color:var(--text-secondary);
}

/* ── R2 + R3 controls: the absence line and the info expander ──────────────
   Real <button aria-expanded> pairs, not tooltips: a title= attribute does not
   survive a screenshot, does not work on touch and is unreachable by keyboard.
   Both are full-height pointer targets (--ctl-floor) so the hit test passes at
   every width. */
.stx-abs,.stx-infow{clear:both;padding:0.25rem 0.75rem 0.5rem;}
.stx-panel.stx-wide .stx-abs,.stx-pbody .stx-infow{padding-left:0;padding-right:0;}
.stx-abs-big{padding:0;}
.stx-more,.stx-info{
  display:inline-flex;align-items:center;gap:0.375rem;
  min-height:var(--ctl-floor);padding:0.125rem 0.4375rem 0.125rem 0.5rem;
  border:none;border-radius:var(--radius-sm);background:transparent;
  cursor:pointer;text-align:left;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:600;
  color:var(--text-muted);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  transition:color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.stx-abs-big .stx-more{
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));
  text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--text-secondary);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-more:hover,.stx-info:hover{
  color:var(--accent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}
.stx-more:focus-visible,.stx-info:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}
/* The chevron is a rotated square edge, not an icon font and not an emoji. */
.stx-more-c{
  flex:none;width:0.375rem;height:0.375rem;margin-left:0.125rem;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translate(-0.0625rem,-0.0625rem);
  transition:transform 140ms var(--ease-out);
}
[aria-expanded="true"] .stx-more-c{
  transform:rotate(225deg) translate(-0.0625rem,-0.0625rem);
}
.stx-moreb{
  display:flex;flex-wrap:wrap;gap:0.25rem;
  margin-top:0.375rem;padding:0.375rem 0.5rem;
  border-radius:var(--radius-sm);background:var(--bg-secondary);
}
.stx-moreb.wide{flex-direction:column;}
.stx-moreb.plain{
  display:block;background:transparent;padding:0;margin-top:0.625rem;
}
.stx-abs-i{
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:600;
  letter-spacing:var(--tr-mono);color:var(--text-secondary);
  padding:0.0625rem 0.3125rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-subtle);white-space:nowrap;
}
.stx-moreb.wide .stx-abs-i{white-space:normal;align-self:flex-start;}
.stx-infob{
  margin-top:0.375rem;padding:0.4375rem 0.5625rem;
  border-radius:var(--radius-sm);background:var(--bg-secondary);
}
.stx-infob p{
  margin:0 0 0.375rem;
  font-family:var(--font-sans);font-size:max(0.625rem, var(--fs-floor));font-weight:500;
  line-height:1.5;color:var(--text-secondary);
}
.stx-infob p:last-child{margin-bottom:0;}

/* ── The cost ladder ───────────────────────────────────────────────────────
   Four sizes, four columns, one grid template so header and rows cannot drift.
   An over-capacity row is marked with a WORD in its own column; the tint only
   reinforces it. */
.stx-ladder{
  --stx-l-grid:minmax(0,3.5rem) minmax(0,4.5rem) minmax(0,1fr) minmax(0,7rem);
  display:flex;flex-direction:column;width:100%;
}
.stx-l-head,.stx-l-row{
  display:grid;grid-template-columns:var(--stx-l-grid);align-items:baseline;
  gap:0.5rem;padding:0.1875rem 0;
}
.stx-l-head{
  border-bottom:1px solid var(--border-default);padding-bottom:0.25rem;
}
.stx-l-head span{
  font-family:var(--font-mono);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.stx-l-row{box-shadow:inset 0 -1px 0 var(--border-subtle);}
.stx-l-d,.stx-l-p,.stx-l-c{
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.stx-l-p{color:var(--text-secondary);}
.stx-l-f{
  font-style:normal;margin-left:0.25rem;
  font-family:var(--font-sans);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--rsx-cat-2);cursor:help;
}
.stx-l-w{
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:600;
  color:var(--text-muted);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.stx-l-row.over .stx-l-w{color:var(--rsx-cat-3);font-weight:700;}
.stx-l-row.over .stx-l-d,.stx-l-row.over .stx-l-c{color:var(--text-secondary);}

/* ── Coverage strip ────────────────────────────────────────────────────────
   What the base-rate sample IS, before any rate is read. */
.stx-cov{
  display:flex;align-items:flex-start;gap:1.25rem;flex-wrap:wrap;
  padding:0.4375rem 0.625rem;border-radius:var(--radius-sm);
  background:var(--bg-secondary);
}
.stx-cov > span{
  display:flex;flex-direction:column;gap:0.0625rem;min-width:0;
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;
}
.stx-cov i{
  font-style:normal;
  font-family:var(--font-sans);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--text-muted);
}
.stx-cov em{
  font-style:normal;max-width:22rem;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:500;
  letter-spacing:0;color:var(--text-muted);line-height:1.35;
}

/* ── The base-rate table ───────────────────────────────────────────────────
   One grid template drives the header and every row so the columns can never
   drift: three bucket labels, the sample size, then one RATE CELL per outcome.
   Separator is an inset shadow, not border-top: the table re-renders wholesale
   and border-top loses the first row's rule every time. */
.stx-table{
  --stx-t-grid:minmax(0,8rem) minmax(0,5.5rem) minmax(0,7rem) 4.5rem
               repeat(3, minmax(8rem, 1fr));
  display:flex;flex-direction:column;overflow-x:auto;
}
.stx-t-head,.stx-t-row{
  display:grid;grid-template-columns:var(--stx-t-grid);
  gap:0.625rem;padding:0.375rem 0.25rem;min-width:0;
}
.stx-t-head{align-items:end;border-bottom:1px solid var(--border-default);}
.stx-th{
  font-family:var(--font-mono);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--text-muted);
}
.stx-th-r{text-align:right;}
.stx-th-o{display:flex;flex-direction:column;gap:0.0625rem;}
.stx-th-o i{
  font-style:normal;font-weight:500;text-transform:none;letter-spacing:0;
  font-family:var(--font-sans);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  color:var(--text-xmuted);
}
/* An INLINE per-column warning, for an outcome whose definition changes what
   the rate means (`up_next_day` is a RAW forward return, so in a rising tape
   every bucket drifts above 50%). It is in the column head rather than a
   title= because it must survive a screenshot of the table. */
.stx-th-o em{
  font-style:normal;font-weight:600;text-transform:none;letter-spacing:0;
  font-family:var(--font-sans);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  line-height:1.3;color:var(--rsx-cat-2);max-width:22rem;
}
.stx-t-row{
  align-items:center;box-shadow:inset 0 -1px 0 var(--border-subtle);
  transition:background 120ms var(--ease-out);
}
.stx-t-row:hover{background:var(--bg-row-hover);}
.stx-t-b{
  font-family:var(--font-sans);font-size:max(0.6875rem, var(--fs-floor));font-weight:600;
  color:var(--text-primary);min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.stx-t-n{
  text-align:right;display:flex;flex-direction:column;gap:0.0625rem;
  font-family:var(--font-mono);font-size:max(0.6875rem, var(--fs-floor));font-weight:700;
  letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;
}
.stx-t-n i{
  font-style:normal;font-weight:500;
  font-size:max(0.5rem, calc(var(--fs-floor) - 1px));color:var(--text-muted);
}

/* ── THE RATE CELL ─────────────────────────────────────────────────────────
   The most dangerous element in the wave, and the reason this file exists.

   The rate, its family-corrected interval, its n and the separates/coin-flip
   WORD are one box. There is no layout in which the number appears without
   them, no hover state that reveals them, and nothing here is a tooltip. */
.stx-rc{
  display:flex;flex-direction:column;gap:0.0625rem;min-width:0;
  padding:0.125rem 0.375rem 0.1875rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
}
.stx-rc.empty{color:var(--text-xmuted);box-shadow:none;}
/* A cell whose interval clears 50% earns a stronger ring — reinforcement only,
   because the words "separates from 50%" are already in the cell. */
.stx-rc.sep{
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--rsx-cat-4) 45%, transparent);
  background:color-mix(in srgb, var(--rsx-cat-4) 6%, transparent);
}
.stx-rc-v{
  font-family:var(--font-mono);font-size:max(0.9375rem, calc(var(--fs-floor) + 3px));
  font-weight:700;letter-spacing:var(--tr-mono);color:var(--text-primary);
  font-variant-numeric:tabular-nums;line-height:1.1;
}
.stx-rc-ci{
  display:flex;align-items:baseline;gap:0.375rem;
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:600;
  letter-spacing:var(--tr-mono);color:var(--text-secondary);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.stx-rc-ci i{font-style:normal;color:var(--text-muted);font-weight:500;}
.stx-rc-w{
  font-family:var(--font-sans);font-size:max(0.5rem, calc(var(--fs-floor) - 1px));
  font-weight:700;text-transform:uppercase;letter-spacing:var(--tr-caps);
  color:var(--text-muted);
}
.stx-rc.sep .stx-rc-w{color:var(--rsx-cat-4);}
/* Below the minimum sample: WORDS and the n, never a dash the eye reads as a
   zero and never the raw fraction. */
.stx-rc.thin{background:transparent;}
.stx-rc-none{
  font-family:var(--font-sans);font-size:max(0.6875rem, var(--fs-floor));font-weight:600;
  color:var(--text-xmuted);
}
.stx-rc-n{
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:500;
  letter-spacing:var(--tr-mono);color:var(--text-muted);
  font-variant-numeric:tabular-nums;
}

/* THE INTERVAL, AS A LINE, AGAINST A TICK AT 50%.
   The single most useful honesty affordance on the page: whether the interval
   crosses the coin-flip line is POSITION, so it survives greyscale, a
   deuteranope, a printout and a screenshot. */
.stx-bar{
  position:relative;display:block;height:0.5rem;margin:0.0625rem 0;
  border-radius:0.25rem;background:var(--bg-secondary);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
}
.stx-bar-ci{
  position:absolute;top:0.1875rem;height:0.125rem;border-radius:0.0625rem;
  background:var(--text-secondary);
}
.stx-bar-pt{
  position:absolute;top:0.0625rem;width:0.125rem;height:0.375rem;
  margin-left:-0.0625rem;border-radius:0.0625rem;
  background:var(--text-primary);
}
/* The coin-flip line. Always drawn, always at 50%, on top of the interval so
   a crossing is unmissable. */
.stx-bar-half{
  position:absolute;left:50%;top:-0.0625rem;width:1px;height:0.625rem;
  margin-left:-0.5px;
  background:var(--text-muted);
}
.stx-rc.sep .stx-bar-ci{background:var(--rsx-cat-4);}

/* ── Figures ───────────────────────────────────────────────────────────────
   Inline SVG, coloured entirely from tokens so both themes come from the SSOT.
   Value axes start at ZERO in both charts and there is no second y-axis. */
.stx-fig{margin:0.25rem 0 0;width:100%;min-width:0;}
.stx-fig svg{display:block;width:100%;height:auto;overflow:visible;}
.stx-fig.vp svg{max-width:22rem;}
.stx-qband{fill:color-mix(in srgb, var(--rsx-cat-4) 20%, transparent);stroke:none;}
.stx-mid{fill:none;stroke:var(--rsx-cat-4);stroke-width:1.5;}
.stx-now{stroke:var(--text-xmuted);stroke-width:1;stroke-dasharray:2 3;}
.stx-today{fill:var(--rsx-cat-2);stroke:var(--bg-tertiary);stroke-width:1.5;}
.stx-ax{
  fill:var(--text-muted);font-family:var(--font-mono);font-size:9px;
}
.stx-ax.r{text-anchor:end;}
.stx-ax.r.poc{fill:var(--rsx-cat-4);font-weight:700;}
.stx-vaband{fill:color-mix(in srgb, var(--text-primary) 6%, transparent);}
.stx-vp{fill:var(--text-xmuted);}
.stx-vp.va{fill:color-mix(in srgb, var(--rsx-cat-4) 50%, transparent);}
.stx-vp.poc{fill:var(--rsx-cat-4);}
.stx-fig figcaption{
  display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap;
  margin-top:0.25rem;
}
.stx-key{
  display:inline-flex;align-items:center;gap:0.3125rem;
  font-family:var(--font-sans);font-size:max(0.5625rem, var(--fs-floor));font-weight:500;
  color:var(--text-muted);
}
.stx-key::before{
  content:"";flex:none;width:0.625rem;height:0.375rem;border-radius:0.125rem;
  background:var(--text-xmuted);
}
.stx-key.qband::before{background:color-mix(in srgb, var(--rsx-cat-4) 30%, transparent);}
.stx-key.mid::before{background:var(--rsx-cat-4);height:0.125rem;}
.stx-key.today::before{background:var(--rsx-cat-2);width:0.375rem;height:0.375rem;border-radius:50%;}
.stx-key.poc::before{background:var(--rsx-cat-4);}
.stx-key.va::before{background:color-mix(in srgb, var(--rsx-cat-4) 50%, transparent);}
.stx-key.scale::before{display:none;}
.stx-key.scale{color:var(--text-xmuted);}

/* ── Loading / empty / gated ───────────────────────────────────────────────
   Skeletons at the exact geometry, never a spinner and never a centred
   message. Empty is one paragraph at the surface's own indent, in the
   surface's own type, naming what would appear and why it has not. No
   illustration. */
.stx-skel{pointer-events:none;}
.stx-panel.stx-skel{gap:0.5rem;padding:0.625rem 0.75rem;}
.stx-sk{
  display:block;height:0.6875rem;border-radius:var(--radius-sm);
  background:linear-gradient(90deg,
    var(--bg-hover) 0%,
    color-mix(in srgb, var(--text-primary) 8%, var(--bg-hover)) 50%,
    var(--bg-hover) 100%);
  background-size:200% 100%;
  animation:stx-shimmer 1.4s var(--ease-out) infinite;
  margin-bottom:0.375rem;
}
@keyframes stx-shimmer{0%{background-position:100% 0;}100%{background-position:-100% 0;}}
.stx-empty{
  padding:0.875rem;
  background:var(--bg-tertiary);border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
  font-family:var(--font-sans);font-size:max(0.75rem, var(--fs-floor));font-weight:500;
  line-height:1.55;color:var(--text-secondary);
}
.stx-empty b{color:var(--text-primary);font-weight:700;}
.stx-panel .stx-empty{box-shadow:none;background:transparent;padding:0.25rem 0;}
/* Gated: the card primitive with a rank word and a plans link — not a padlock
   (a padlock reads "broken"; a rank word reads "priced"), not a blur. */
.stx-locked{display:flex;align-items:flex-start;justify-content:center;padding:2.5rem 1rem;}
.stx-locked-card{
  display:flex;flex-direction:column;align-items:flex-start;gap:0.5rem;
  max-width:28rem;padding:1rem;
  background:var(--bg-secondary);border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stx-locked-t{
  font-family:var(--font-display);font-size:0.875rem;font-weight:700;
  letter-spacing:var(--tr-heading);color:var(--text-primary);
}
.stx-locked-s{
  font-family:var(--font-sans);font-size:max(0.75rem, var(--fs-floor));font-weight:500;
  line-height:1.5;color:var(--text-secondary);
}

/* ── Provenance ────────────────────────────────────────────────────────────
   One mono line pinned to the foot. ALWAYS present: if a field here cannot be
   filled in, the surface does not ship. COMPUTED is when the WORKER built the
   dossier, not when the browser fetched it — conflating those two is the
   single most common lie in dashboards. */
.stx-prov{
  flex:none;margin:0;padding:0.5rem 0.875rem;
  display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;
  font-family:var(--font-mono);font-size:max(0.5625rem, var(--fs-floor));font-weight:500;
  letter-spacing:var(--tr-mono);color:var(--text-secondary);
  border-top:1px solid var(--border-subtle);
}
.stx-prov i{
  font-style:normal;font-weight:700;
  text-transform:uppercase;letter-spacing:var(--tr-caps);color:var(--text-muted);
  margin-right:0.25rem;
}
.stx-prov b{color:var(--text-xmuted);font-weight:400;margin:0 0.125rem;}

/* ── Narrow ────────────────────────────────────────────────────────────────
   The base-rate table never drops a column: every one of them is load-bearing
   (a rate without its bucket labels is meaningless, and a rate without its n
   and interval is forbidden). It scrolls inside its own container instead,
   which is why .stx-table carries overflow-x. */
@media (max-width:80rem){
  .stx-table{--stx-t-grid:minmax(0,7rem) minmax(0,5rem) minmax(0,6.5rem) 4rem
                          repeat(3, minmax(7.5rem, 1fr));min-width:0;}
  .stx-t-head,.stx-t-row{min-width:46rem;}
}
@media (max-width:64rem){
  .stx-readouts{margin-left:0;}
}
@media (max-width:48rem){
  .stx-inner{padding:0.625rem;gap:0.625rem;}
  .stx-band{padding:0.5rem 0.625rem;}
  .stx-evi{padding:0.4375rem 0.625rem;}
  .stx-prov{padding-left:0.625rem;padding-right:0.625rem;}
  .stx-gates{grid-template-columns:1fr;}
  .stx-grid{columns:1;}
  .stx-verdict{padding:0.5625rem 0.625rem;}
}

@media (prefers-reduced-motion:reduce){
  .stx-sk{animation:none;}
  .stx-more-c{transition:none;}
}

/* ═══ PHONE (2026-10-14) ════════════════════════════════════════════════════
   Under :root.phone, the phone layout's switch (app.html's head; its own file
   is 77-phone.css). Desktop pins the command band and the provenance line
   and makes .stx-body the only scroller between them; at a phone's height
   that left the Stats dossier a window of one card. On a phone the whole view
   scrolls as one page and the provenance line follows the content. */
:root.phone .stx-inner{display:block;overflow-y:auto;overscroll-behavior:contain;padding:10px;}
:root.phone .stx-inner > *{margin-bottom:10px;}
:root.phone .stx-body{flex:none;min-height:0;overflow:visible;}
:root.phone .stx-prov{padding:8px 4px 16px;}
