/* ═══════════════════════════════════════════════════════════════════════════
   18-storms.css — the STORM EXPOSURE research surface (#storms-root).
   ---------------------------------------------------------------------------
   Built by static/js/storms.js. Load order in static/css/app/ IS the cascade
   and this file is LAST, so nothing here needs to fight for specificity and
   nothing here may be renumbered.

   THE DIALECT IS OURS, taken from 07-command-center.css and 05-chart-panels.css
   rather than invented: opaque --bg-tertiary cards, ONE hairline inset ring
   (never a 1px border, which bowties in headless screenshots), --radius-lg, an
   in-card header shelf, the 60px page grid behind the scrolling content, and
   the cc-rise entrance driven by --i. Every colour resolves through tokens.css
   so both themes follow for free.

   THE BAND RAMP IS ORDINAL, AND THE WORD IS THE ENCODING.
   tokens.css records that the categorical research ramp collapses to ΔE 3.92
   under deuteranopia in the dark theme, and that ordinal severity must not use
   it. So the five bands ride a grey → slate → steel → amber → garnet ramp built
   from tokens that are light-safe in BOTH themes (--text-muted, --slate,
   --rsx-cat-4, --amber, --red all have light values or are documented as
   already contrasting on cream), and every band ALSO prints its name as a word
   at a fixed column position. Desaturate a screenshot of this board and the
   verdict, the band, the side of the trade and the provenance tag all survive,
   because each of them is a word.
   ═══════════════════════════════════════════════════════════════════════════ */

#storms-root{
  position:absolute;inset:0;display:none;
  flex-direction:column;min-width:0;min-height:0;
  background:var(--bg-primary);
}
/* MPStorms.show()/hide() owns this class, so the host needs no per-mode
   display rule of its own in 05-chart-panels.css. */
#storms-root.stm-on{display:flex;}

/* The stage's OTHER layers, hidden while this surface owns it. Declared here
   rather than in 05-chart-panels.css so wiring this view is a class toggle in
   research.js and nothing else: research.js stamps .rsx-mode-storms on
   #research-view exactly as it stamps .rsx-mode-index and .rsx-mode-feed.
   !important matches the existing .research-panel rules it has to beat. */
#research-view.rsx-mode-storms #research-iframe,
#research-view.rsx-mode-storms #rsx-index,
#research-view.rsx-mode-storms .rf-surface,
#research-view.rsx-mode-storms .research-panel{display:none!important;}

/* Content scroller. Same thin-scrollbar treatment as #rsx-index. */
.stm-scroll{
  flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb, var(--accent) 22%, transparent) transparent;
}
.stm-scroll::-webkit-scrollbar{width:0.375rem;height:0.375rem;}
.stm-scroll::-webkit-scrollbar-track{background:transparent;}
.stm-scroll::-webkit-scrollbar-thumb{background:var(--border-default);border-radius:0.25rem;}
.stm-scroll:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--accent) 28%, transparent);}

/* The 60px page grid lives on the CONTENT layer so it scrolls as one
   composited texture with the cards on top of it (see .cc-canvas). */
.stm-inner{
  display:flex;flex-direction:column;gap:0.75rem;
  padding:0.75rem;min-height:100%;
  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;
  will-change:transform;
}

/* ── Ordinal band ramp ─────────────────────────────────────────────────────
   Declared once, consumed by .stm-band, the row rail and the log rows. */
#storms-root{
  --b-none:     var(--text-muted);
  --b-watch:    var(--slate);
  --b-elevated: var(--rsx-cat-4);
  --b-high:     var(--amber);
  --b-severe:   var(--red);
  --stm-ink:    var(--text-primary);
}
.stm-b-none{     --bc:var(--b-none); }
.stm-b-watch{    --bc:var(--b-watch); }
.stm-b-elevated{ --bc:var(--b-elevated); }
.stm-b-high{     --bc:var(--b-high); }
.stm-b-severe{   --bc:var(--b-severe); }

/* ═══ Demo banner ═══════════════════════════════════════════════════════════
   Only rendered when the DATA says synthetic. Deliberately loud, full bleed and
   not dismissible: a fabricated hurricane that a reader could take for a live
   one is the one failure this surface cannot have. */
.stm-synth{
  flex:none;display:flex;align-items:baseline;gap:0.625rem;
  padding:0.5rem 0.875rem;
  background:var(--warn-surface);
  box-shadow:inset 0 0 0 1px var(--warn-border);
  color:var(--text-primary);
  font-size:0.75rem;line-height:1.45;
}
:root[data-theme="light"] .stm-synth{color:var(--toast-warn-fg);}
.stm-synth b{
  flex:none;font-family:var(--font-mono);font-size:0.6875rem;
  letter-spacing:0.08em;
  padding:0.0625rem 0.375rem;border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--text-primary) 16%, transparent);
}
:root[data-theme="light"] .stm-synth b{
  background:color-mix(in srgb, var(--toast-warn-fg) 14%, transparent);
}
.stm-synth code{font-family:var(--font-mono);font-size:0.6875rem;opacity:.9;}
/* align-self, because this chip lives inside .stm-c, which is a COLUMN flex
   container: an inline-block child of a column flex stretches to the full
   track width and renders as a bar. */
.stm-synth-chip{
  display:inline-block;align-self:flex-start;width:max-content;
  margin:0.0625rem 0 0;
  font-family:var(--font-mono);font-size:0.5625rem;font-style:normal;
  letter-spacing:0.07em;padding:0 0.25rem;border-radius:var(--radius-sm);
  background:var(--warn-surface);color:var(--text-primary);
  box-shadow:inset 0 0 0 1px var(--warn-border);
}
/* Inside a table cell or a row flex the chip sits beside its text instead. */
.stm-lrow .stm-synth-chip{margin-left:0.3125rem;}
:root[data-theme="light"] .stm-synth-chip{color:var(--toast-warn-fg);}

/* ═══ R1 — the verdict ══════════════════════════════════════════════════════
   The single most important element on the surface, given the typographic
   weight that implies, with NO number beside it competing for the eye. */
.stm-verdict{
  background:var(--bg-tertiary);
  box-shadow:inset 0 0 0 1px var(--border-default);
  border-radius:var(--radius-lg);
  padding:0.75rem 0.875rem 0.625rem;
  animation:cc-rise 420ms var(--ease-out) 40ms backwards;
}
.stm-verdict.stale{
  /* Staleness comes from the DATA's own stamp, never from "my fetch
     succeeded", and it has to be VISIBLE, not a footnote. */
  box-shadow:inset 0 0 0 1px var(--warn-border);
}
.stm-verdict.stale .stm-line,
.stm-verdict.stale .stm-facts{opacity:.72;}

.stm-kicker{
  display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap;
  font-family:var(--font-mono);font-size:0.625rem;letter-spacing:0.11em;
  color:var(--text-muted);text-transform:uppercase;
  margin-bottom:0.4375rem;
}
.stm-kicker i{
  font-style:normal;letter-spacing:0.04em;text-transform:none;
  color:var(--text-xmuted);font-family:inherit;
}
.stm-kicker .stm-live{
  color:var(--accent);letter-spacing:0.08em;text-transform:uppercase;
}
.stm-line{
  margin:0 0 0.375rem;
  font-size:1.0625rem;line-height:1.35;font-weight:600;
  color:var(--text-primary);max-width:74ch;
  letter-spacing:-0.005em;
}
.stm-facts{
  margin:0 0 0.5rem;
  font-size:0.8125rem;line-height:1.5;
  color:var(--text-secondary);max-width:88ch;
}
/* Never behind a toggle, never a tooltip, never removed. */
.stm-safety{
  margin:0 0 0.625rem;
  padding:0.4375rem 0.625rem;
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--text-primary) 5%, transparent);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  font-size:0.75rem;line-height:1.5;color:var(--text-secondary);
  max-width:96ch;
}
.stm-safety b{color:var(--text-primary);font-weight:600;}
.stm-safety a{color:var(--accent);text-underline-offset:2px;}
.stm-safety a:hover{color:var(--accent-hover);}

/* Evidence strip — what the answer rests on, out of a tooltip on purpose. */
.stm-evid{
  display:flex;flex-wrap:wrap;gap:0 1.25rem;
  padding-top:0.4375rem;
  box-shadow:inset 0 1px 0 var(--border-subtle);
}
.stm-ev{display:flex;align-items:baseline;gap:0.375rem;padding-top:0.375rem;}
.stm-ev dt{
  font-family:var(--font-mono);font-size:0.5625rem;letter-spacing:0.08em;
  text-transform:uppercase;color:var(--text-xmuted);
}
.stm-ev dd{
  margin:0;font-size:0.6875rem;color:var(--text-secondary);
  font-family:var(--font-mono);
  display:flex;align-items:baseline;gap:0.3125rem;
}
.stm-ev-flag{
  font-style:normal;font-size:0.5625rem;letter-spacing:0.06em;
  text-transform:uppercase;color:var(--text-xmuted);
  padding:0 0.25rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stm-ev-flag.warn{color:var(--amber);box-shadow:inset 0 0 0 1px var(--amber);}

/* ═══ Panels ════════════════════════════════════════════════════════════════*/
.stm-panel{
  background:var(--bg-tertiary);
  box-shadow:inset 0 0 0 1px var(--border-default);
  border-radius:var(--radius-lg);
  animation:cc-rise 460ms var(--ease-out) calc(90ms + var(--i, 0) * 60ms) backwards;
  min-width:0;
}
.stm-p-head{
  display:flex;align-items:flex-start;gap:0.75rem;
  padding:0.5625rem 0.875rem 0.5rem;
  box-shadow:inset 0 -1px 0 var(--border-subtle);
}
.stm-p-title{min-width:0;flex:1 1 auto;}
.stm-p-kicker{
  display:block;
  font-family:var(--font-mono);font-size:0.5625rem;letter-spacing:0.11em;
  text-transform:uppercase;color:var(--text-xmuted);margin-bottom:0.125rem;
}
.stm-p-head h2{
  margin:0;font-size:0.875rem;font-weight:600;line-height:1.25;
  color:var(--text-primary);letter-spacing:-0.003em;
}
.stm-p-sub{
  margin:0.1875rem 0 0;font-size:0.6875rem;line-height:1.5;
  color:var(--text-muted);max-width:96ch;
}
.stm-p-body{padding:0.5rem 0.875rem 0.75rem;min-width:0;}

/* R3 — ONE info expander per panel, a real button, keyboard operable. */
.stm-info-btn{
  flex:none;display:inline-flex;align-items:center;gap:0.375rem;
  background:transparent;border:0;cursor:pointer;
  padding:0.1875rem 0.4375rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-default);
  color:var(--text-muted);
  font-family:var(--font-mono);font-size:0.5625rem;letter-spacing:0.07em;
  text-transform:uppercase;
  transition:color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.stm-info-btn:hover{color:var(--text-primary);box-shadow:inset 0 0 0 1px var(--border-strong);}
.stm-info-btn:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}
.stm-info-btn[aria-expanded="true"]{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);}
.stm-info-i{
  display:inline-flex;align-items:center;justify-content:center;
  width:0.875rem;height:0.875rem;border-radius:50%;
  box-shadow:inset 0 0 0 1px currentColor;
  font-size:0.5625rem;font-style:normal;text-transform:none;line-height:1;
}
.stm-info{
  padding:0.5rem 0.875rem 0.625rem;
  background:color-mix(in srgb, var(--text-primary) 3.5%, transparent);
  box-shadow:inset 0 -1px 0 var(--border-subtle);
}
.stm-info p{
  margin:0 0 0.4375rem;font-size:0.75rem;line-height:1.55;
  color:var(--text-secondary);max-width:100ch;
}
.stm-info p:last-child{margin-bottom:0;}
.stm-info b{color:var(--text-primary);font-weight:600;}

/* ═══ The board ═════════════════════════════════════════════════════════════
   Eight tracks. Dense on purpose (DilutionTracker / Ortex density, not a
   marketing grid): the verdict, the evidence strip and the first exposed rows
   have to clear the fold at 1440x900. */
.stm-grid{display:flex;flex-direction:column;min-width:0;}
.stm-head{
  display:grid;align-items:end;gap:0 0.625rem;
  padding:0 0.375rem 0.3125rem;
  font-family:var(--font-mono);font-size:0.5625rem;letter-spacing:0.06em;
  text-transform:uppercase;color:var(--text-xmuted);
  box-shadow:inset 0 -1px 0 var(--border-subtle);
}
.stm-head span{min-width:0;line-height:1.3;}

.stm-grid > .stm-head,
.stm-grid .stm-row .stm-rbtn{
  grid-template-columns:
    4.5rem                      /* ticker            */
    minmax(7rem, 1.35fr)        /* company           */
    4.25rem                     /* side of the trade */
    8.5rem                      /* band + rank       */
    minmax(8rem, 1fr)           /* region + storm    */
    minmax(10.5rem, 1.05fr)     /* probability       */
    6rem                        /* closest approach  */
    1rem;                       /* chevron           */
}
/* The footprint board is a DIFFERENT shape, so it gets its own class rather
   than a modifier on .stm-grid. A modifier collided: the responsive blocks at
   the bottom of this file restate the 8-track template at the same specificity
   and LATER in source, which silently won and crushed the footprint column to
   113px. Two names, no collision, and each responsive block can restate only
   the grid it means. */
.stm-fpgrid{display:flex;flex-direction:column;min-width:0;}
.stm-fpgrid > .stm-head,
.stm-fpgrid .stm-rbtn-fp{
  grid-template-columns:
    4.5rem minmax(7rem, 0.8fr) 4.5rem minmax(16rem, 3fr) 1rem;
}

.stm-row{
  min-width:0;
  animation:stm-row-in 320ms var(--ease-out) calc(var(--i, 0) * 22ms) backwards;
}
@keyframes stm-row-in{from{opacity:0;transform:translateY(4px);}}

.stm-rbtn{
  display:grid;align-items:center;gap:0 0.625rem;width:100%;
  padding:0.34375rem 0.375rem;
  background:transparent;border:0;cursor:pointer;text-align:left;
  color:var(--text-secondary);font:inherit;font-size:0.75rem;
  /* The band word carries the colour; the row gets only its separator. */
  box-shadow:inset 0 -1px 0 var(--border-subtle);
  transition:background .12s var(--ease-out);
}
.stm-rbtn:hover{background:var(--bg-hover);}
.stm-rbtn:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}
.stm-row.open > .stm-rbtn{background:var(--bg-hover);color:var(--text-primary);}

.stm-c{min-width:0;display:flex;flex-direction:column;gap:0.0625rem;line-height:1.3;}
.stm-c > i{
  font-style:normal;font-size:0.625rem;color:var(--text-xmuted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.stm-c-sym{
  font-family:var(--font-mono);font-weight:600;font-size:0.8125rem;
  color:var(--text-primary);letter-spacing:0.01em;
}
.stm-c-name{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;
  color:var(--text-secondary);
}
.stm-c-drive{overflow:hidden;}
.stm-c-drive > i{color:var(--text-muted);}
.stm-c-when{font-family:var(--font-mono);font-size:0.6875rem;}
.stm-c-n{font-family:var(--font-mono);flex-direction:row;align-items:baseline;gap:0.1875rem;}
.stm-c-n > i{font-size:0.5625rem;}
.stm-sub{font-size:0.5625rem !important;color:var(--text-xmuted);}
.stm-sub.stale{color:var(--amber);}
.stm-na{color:var(--text-xmuted);font-size:0.6875rem;}

/* Side of the trade. NOT colour coded: neither side is "good", and colouring
   one green would be a recommendation this tool is not making. */
.stm-side{
  display:inline-block;justify-self:start;
  font-family:var(--font-mono);font-size:0.5625rem;letter-spacing:0.07em;
  padding:0.0625rem 0.3125rem;border-radius:var(--radius-sm);
  color:var(--text-secondary);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.stm-side-beneficiary{box-shadow:inset 0 0 0 1px var(--border-strong);}

/* Band. The WORD is the encoding; the rank rides beside it, smaller and
   muted, explicitly labelled "out of 10" in the column head so it can never be
   read as a probability. */
.stm-band{display:flex;align-items:baseline;gap:0.375rem;min-width:0;}
.stm-band b{
  font-family:var(--font-mono);font-size:0.625rem;letter-spacing:0.07em;
  font-weight:600;color:var(--bc, var(--text-muted));
  white-space:nowrap;
}
.stm-rank{
  font-style:normal;font-family:var(--font-mono);font-size:0.625rem;
  color:var(--text-xmuted);
}

/* Provenance cell. The tag and the threshold are in the SAME element as the
   number, so cropping a screenshot cannot separate them. */
.stm-prob{display:flex;align-items:baseline;gap:0.3125rem;flex-wrap:wrap;min-width:0;}
.stm-prob b{
  font-family:var(--font-mono);font-size:0.75rem;font-weight:600;
  color:var(--text-primary);white-space:nowrap;
}
.stm-prob.cone b{font-weight:500;color:var(--text-secondary);font-size:0.6875rem;}
.stm-thr,.stm-loc{
  font-style:normal;font-family:var(--font-mono);font-size:0.5625rem;
  color:var(--text-xmuted);white-space:nowrap;
}
.stm-tag{
  font-style:normal;font-family:var(--font-mono);font-size:0.5rem;
  letter-spacing:0.08em;padding:0.0625rem 0.25rem;border-radius:var(--radius-sm);
  white-space:nowrap;
}
.stm-src-nhc{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);}
.stm-src-cone{color:var(--amber);box-shadow:inset 0 0 0 1px var(--amber);}
.stm-src-cur{color:var(--text-muted);box-shadow:inset 0 0 0 1px var(--border-strong);}

.stm-chev{
  width:0.5rem;height:0.5rem;justify-self:end;
  border-right:1px solid var(--text-xmuted);
  border-bottom:1px solid var(--text-xmuted);
  transform:rotate(45deg);transition:transform .18s var(--ease-out);
}
.stm-row.open .stm-chev{transform:rotate(-135deg);}

/* ── Row detail ────────────────────────────────────────────────────────────*/
.stm-detail{
  padding:0.5rem 0.75rem 0.625rem 1rem;
  background:color-mix(in srgb, var(--text-primary) 3%, transparent);
  box-shadow:inset 0 -1px 0 var(--border-subtle);
}
.stm-dsub{
  font-size:0.6875rem;line-height:1.5;color:var(--text-muted);
  margin-bottom:0.4375rem;max-width:100ch;
}
.stm-dtable{
  width:100%;border-collapse:collapse;font-size:0.6875rem;
  color:var(--text-secondary);
}
.stm-dtable th{
  text-align:left;font-family:var(--font-mono);font-size:0.5rem;
  letter-spacing:0.07em;text-transform:uppercase;color:var(--text-xmuted);
  font-weight:400;padding:0 0.5rem 0.25rem 0;
  box-shadow:inset 0 -1px 0 var(--border-subtle);
}
.stm-dtable td{padding:0.3125rem 0.5rem 0.3125rem 0;vertical-align:top;}
.stm-dtable tr + tr td{box-shadow:inset 0 1px 0 var(--border-subtle);}
.stm-dstorm{color:var(--text-primary);}
.stm-dstorm i{display:block;font-style:normal;font-size:0.5625rem;color:var(--text-xmuted);}
.stm-dnum{font-family:var(--font-mono);color:var(--text-primary);}

.stm-dfoot{margin-top:0.625rem;padding-top:0.5rem;box-shadow:inset 0 1px 0 var(--border-subtle);}
.stm-dfoot-h{
  display:flex;align-items:center;gap:0.375rem;
  font-family:var(--font-mono);font-size:0.5625rem;letter-spacing:0.08em;
  text-transform:uppercase;color:var(--text-xmuted);margin-bottom:0.375rem;
}
.stm-fps{display:flex;flex-wrap:wrap;gap:0.25rem;}
.stm-fp{
  display:inline-flex;align-items:baseline;gap:0.3125rem;
  font-size:0.625rem;color:var(--text-secondary);
  padding:0.0625rem 0.375rem;border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-default);
  white-space:nowrap;
}
.stm-fp > i{
  font-style:normal;font-family:var(--font-mono);font-size:0.5rem;
  letter-spacing:0.05em;color:var(--text-xmuted);text-transform:uppercase;
}
/* The ordinal footprint scale. Weight of the RING carries the ordinal, the
   word inside carries the meaning, and neither depends on hue. */
.stm-fp-primary{box-shadow:inset 0 0 0 1px var(--text-secondary);color:var(--text-primary);}
.stm-fp-major{box-shadow:inset 0 0 0 1px var(--border-strong);}
.stm-fp-moderate{box-shadow:inset 0 0 0 1px var(--border-default);}
.stm-fp-minor{box-shadow:inset 0 0 0 1px var(--border-subtle);color:var(--text-muted);}
.stm-fp-incidental{box-shadow:inset 0 0 0 1px var(--border-subtle);color:var(--text-xmuted);}
.stm-fp-unknown,.stm-fp-more{
  box-shadow:none;color:var(--text-xmuted);font-family:var(--font-mono);
  font-size:0.5625rem;
}
.stm-c-fp{flex-direction:row;flex-wrap:wrap;gap:0.25rem;align-items:center;}

.stm-why{
  margin:0.5rem 0 0;font-size:0.6875rem;line-height:1.55;
  color:var(--text-muted);max-width:104ch;
}

/* ── R2 — the collapsed absence block ──────────────────────────────────────*/
.stm-fold{margin-top:0.375rem;}
.stm-fold-btn{
  display:flex;align-items:center;justify-content:space-between;gap:0.5rem;
  width:100%;padding:0.375rem 0.5rem;
  background:transparent;border:0;cursor:pointer;text-align:left;
  border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  color:var(--text-muted);font:inherit;font-size:0.6875rem;
  transition:color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.stm-fold-btn:hover{color:var(--text-primary);box-shadow:inset 0 0 0 1px var(--border-default);}
.stm-fold-btn:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}
.stm-fold-btn i{
  font-style:normal;font-family:var(--font-mono);font-size:0.5625rem;
  letter-spacing:0.08em;text-transform:uppercase;color:var(--text-xmuted);
}
.stm-fold.open .stm-fold-btn{margin-bottom:0.25rem;}

.stm-empty{
  padding:0.75rem 0.5rem;font-size:0.75rem;line-height:1.55;
  color:var(--text-muted);max-width:100ch;
}

/* ═══ Active storms ═════════════════════════════════════════════════════════*/
.stm-sgrid{display:flex;flex-direction:column;min-width:0;}
.stm-sgrid > .stm-head,
.stm-sgrid .stm-srow{
  display:grid;align-items:center;gap:0 0.625rem;
  grid-template-columns:
    minmax(7rem, 0.9fr) minmax(7rem, 0.9fr) 5.5rem 5.5rem 6rem
    minmax(9rem, 1fr) minmax(9rem, 0.9fr);
}
.stm-srow{
  padding:0.4375rem 0.375rem;font-size:0.75rem;color:var(--text-secondary);
  box-shadow:inset 0 -1px 0 var(--border-subtle);
  animation:stm-row-in 320ms var(--ease-out) calc(var(--i, 0) * 30ms) backwards;
}
.stm-c-sname{font-family:var(--font-mono);font-weight:600;color:var(--text-primary);}
.stm-sid{font-family:var(--font-mono);}
.stm-cat{font-style:normal;font-size:0.5625rem;color:var(--text-xmuted);}
.stm-yes,.stm-no{
  font-family:var(--font-mono);font-size:0.625rem;letter-spacing:0.08em;
}
.stm-yes{color:var(--text-primary);}
.stm-no{color:var(--text-muted);}
.stm-ext{
  font-size:0.6875rem;color:var(--accent);text-underline-offset:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.stm-ext:hover{color:var(--accent-hover);}
.stm-ext:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}

/* ═══ Episode log ═══════════════════════════════════════════════════════════*/
.stm-claim{
  margin:0 0 0.625rem;padding:0.5rem 0.625rem;
  border-radius:var(--radius-sm);
  background:color-mix(in srgb, var(--text-primary) 4%, transparent);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  font-size:0.75rem;line-height:1.55;color:var(--text-secondary);
  max-width:104ch;
}
.stm-claim b{color:var(--text-primary);font-weight:600;}

.stm-lgrid{display:flex;flex-direction:column;min-width:0;}
.stm-lgrid > .stm-head,
.stm-lgrid .stm-lrow{
  display:grid;align-items:center;gap:0 0.625rem;
  grid-template-columns:
    9.5rem 4.5rem minmax(7rem, 0.9fr) minmax(6rem, 0.7fr) 8.5rem
    minmax(7rem, 0.9fr) minmax(9.5rem, 1fr) 5rem;
}
.stm-lrow{
  padding:0.34375rem 0.375rem;font-size:0.75rem;color:var(--text-secondary);
  box-shadow:inset 0 -1px 0 var(--border-subtle);
  animation:stm-row-in 300ms var(--ease-out) calc(var(--i, 0) * 18ms) backwards;
}
.stm-lrow.resolved{opacity:.78;}
.stm-c-t{font-family:var(--font-mono);font-size:0.6875rem;color:var(--text-muted);}
.stm-c-out{justify-self:end;}

/* A dot is UNGRADED, never a zero. That distinction is a house rule and it is
   carried by the glyph, not by a colour. */
.stm-out{
  display:inline-flex;align-items:center;gap:0.1875rem;
  font-family:var(--font-mono);font-size:0.6875rem;
}
.stm-out.none{color:var(--text-xmuted);}
.stm-out.up{color:var(--green);}
.stm-out.dn{color:var(--red);}
.stm-out.flat{color:var(--text-muted);}

.stm-more{
  margin-top:0.4375rem;padding:0.375rem 0.625rem;
  background:transparent;border:0;cursor:pointer;
  border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  color:var(--text-muted);font:inherit;font-size:0.6875rem;
  transition:color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.stm-more:hover{color:var(--text-primary);box-shadow:inset 0 0 0 1px var(--border-default);}
.stm-more:focus-visible{outline:1px solid var(--accent);outline-offset:-1px;}

/* ═══ Provenance foot ═══════════════════════════════════════════════════════*/
.stm-foot{
  margin:0.125rem 0 0;padding:0.5rem 0.25rem 0.75rem;
  font-size:0.6875rem;line-height:1.6;color:var(--text-xmuted);
  max-width:112ch;
}
.stm-foot code{font-family:var(--font-mono);font-size:0.625rem;}

/* ═══ Responsive ════════════════════════════════════════════════════════════
   Two steps down. The chip and the WORD are the last things dropped, never the
   first: the colour may go, the vocabulary may not. */
@media (max-width: 1500px){
  .stm-fpgrid > .stm-head,
  .stm-fpgrid .stm-rbtn-fp{
    grid-template-columns:
      4.25rem minmax(6rem, 0.7fr) 4.5rem minmax(15rem, 3fr) 1rem;
  }
  .stm-grid > .stm-head,
  .stm-grid .stm-row .stm-rbtn{
    grid-template-columns:
      4.25rem minmax(5rem, 1fr) 4.25rem 8rem minmax(7rem, 1fr)
      minmax(9.5rem, 1fr) 5.25rem 1rem;
  }
  .stm-lgrid > .stm-head,
  .stm-lgrid .stm-lrow{
    grid-template-columns:
      9rem 4.25rem minmax(6rem, 0.9fr) minmax(5rem, 0.7fr) 8rem
      minmax(6rem, 0.8fr) minmax(8.5rem, 1fr) 4.75rem;
  }
}
@media (max-width: 1180px){
  /* Company name is the first casualty: the ticker already identifies the row
     and the detail panel still carries the full name. */
  .stm-grid > .stm-head > :nth-child(2),
  .stm-fpgrid > .stm-head > :nth-child(2),
  .stm-grid .stm-row .stm-rbtn > .stm-c-name,
  .stm-fpgrid .stm-rbtn-fp > .stm-c-name{display:none;}
  .stm-fpgrid > .stm-head,
  .stm-fpgrid .stm-rbtn-fp{
    grid-template-columns:4.25rem 4.5rem minmax(13rem, 3fr) 1rem;
  }
  .stm-grid > .stm-head,
  .stm-grid .stm-row .stm-rbtn{
    grid-template-columns:
      4.25rem 4.25rem 7.5rem minmax(6rem, 1fr) minmax(9rem, 1fr) 5rem 1rem;
  }
  .stm-sgrid > .stm-head > :nth-child(4),
  .stm-sgrid .stm-srow > :nth-child(4){display:none;}
  .stm-sgrid > .stm-head,
  .stm-sgrid .stm-srow{
    grid-template-columns:
      minmax(6rem, 0.9fr) minmax(6rem, 0.9fr) 5rem 5.5rem
      minmax(8rem, 1fr) minmax(8rem, 0.9fr);
  }
  .stm-lgrid > .stm-head > :nth-child(6),
  .stm-lgrid .stm-lrow > :nth-child(6){display:none;}
  .stm-lgrid > .stm-head,
  .stm-lgrid .stm-lrow{
    grid-template-columns:
      8.5rem 4.25rem minmax(6rem, 1fr) minmax(5rem, 0.8fr) 7.5rem
      minmax(8rem, 1fr) 4.75rem;
  }
  .stm-line{font-size:1rem;}
}

/* Motion: the entrance cascade is decoration and goes away on request. */
@media (prefers-reduced-motion: reduce){
  .stm-verdict,.stm-panel,.stm-row,.stm-srow,.stm-lrow{animation:none;}
  .stm-chev{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). The three boards are 7 and 8 track grids that need
   ~40rem; at 390px the right hand columns were clipped (the surface scrolls
   y only). Each row becomes a small card instead, built from the same cells
   by grid areas, so no column is lost and no markup changes. The column
   heads go (the cards label the two figures that need it). */
:root.phone .stm-grid > .stm-head,
:root.phone .stm-fpgrid > .stm-head,
:root.phone .stm-sgrid > .stm-head,
:root.phone .stm-lgrid > .stm-head{display:none;}
:root.phone .stm-grid .stm-row .stm-rbtn{
  grid-template-columns:auto 1fr auto;
  grid-template-areas:
    "sym  side chev"
    "band band band"
    "drive drive drive"
    "prob prob when";
  gap:6px 10px;max-width:none;
  padding:12px;font-size:13px;line-height:1.45;
}
:root.phone .stm-grid .stm-rbtn > .stm-c-sym{grid-area:sym;font-size:15px;}
:root.phone .stm-grid .stm-rbtn > .stm-c-name{display:none;}
:root.phone .stm-grid .stm-rbtn > .stm-c-side{grid-area:side;justify-self:start;}
:root.phone .stm-grid .stm-rbtn > .stm-c-band{grid-area:band;}
:root.phone .stm-grid .stm-rbtn > .stm-c-drive{grid-area:drive;}
:root.phone .stm-grid .stm-rbtn > .stm-c-prob{grid-area:prob;}
:root.phone .stm-grid .stm-rbtn > .stm-c-when{grid-area:when;text-align:right;}
:root.phone .stm-grid .stm-rbtn > .stm-chev{grid-area:chev;}
:root.phone .stm-grid .stm-rbtn > .stm-c-when::before{
  content:'Closest ';color:var(--text-xmuted);
}
:root.phone .stm-fpgrid .stm-rbtn-fp{
  grid-template-columns:auto 1fr auto;
  grid-template-areas:
    "sym side chev"
    "fp  fp   fp";
  gap:6px 10px;max-width:none;
  padding:12px;font-size:13px;
}
:root.phone .stm-fpgrid .stm-rbtn-fp > .stm-c-sym{grid-area:sym;font-size:15px;}
:root.phone .stm-fpgrid .stm-rbtn-fp > .stm-c-name{display:none;}
:root.phone .stm-fpgrid .stm-rbtn-fp > .stm-c-side{grid-area:side;justify-self:start;}
:root.phone .stm-fpgrid .stm-rbtn-fp > .stm-c-fp{grid-area:fp;}
:root.phone .stm-fpgrid .stm-rbtn-fp > .stm-chev{grid-area:chev;}
/* Active storms and the episode log: two even columns, the name (storms) or
   the time (log) across the top. Every cell keeps its own sub line. */
:root.phone .stm-sgrid .stm-srow,
:root.phone .stm-lgrid .stm-lrow{
  grid-template-columns:1fr 1fr;gap:6px 12px;
  padding:12px 8px;font-size:13px;
}
:root.phone .stm-sgrid .stm-srow > :nth-child(4),
:root.phone .stm-lgrid .stm-lrow > :nth-child(6){display:block;}
:root.phone .stm-sgrid .stm-srow > :first-child,
:root.phone .stm-lgrid .stm-lrow > :first-child{grid-column:1 / -1;}
:root.phone .stm-lgrid .stm-lrow > .stm-c-out{justify-self:start;}
:root.phone .stm-claim{max-width:none;font-size:13px;}
