/* StayTurn Turn Command Center stylesheet. StayTurn-owned tokens only. */
:root {
  --st-evidence: #1E5F55;
  --st-evidence-strong: #164A43;
  --st-evidence-soft: #A9CDC5;
  --st-brass: #B08D57;
  --st-brass-bright: #D0AD72;
  --st-bone: #F7F5EF;
  --st-dusk: #0E2229;
  --st-bg: #0A181D;
  --st-surface-1: #10262C;
  --st-surface-2: #163039;
  --st-surface-warm: #202C2B;
  --st-panel-glass: rgba(20, 45, 50, 0.78);
  --st-overlay: rgba(5, 15, 18, 0.72);
  --st-border: rgba(247, 245, 239, 0.13);
  --st-border-strong: rgba(208, 173, 114, 0.34);
  --st-text: #F7F5EF;
  --st-text-secondary: #C6CBC6;
  --st-text-muted: #8EA09D;
  --st-text-inverse: #10262C;
  --st-ready: #75B8A5;
  --st-attention: #D6A85F;
  --st-urgent: #D66F62;
  --st-neutral: #8FA2A8;
  --st-degraded: #C78563;
  --st-chart-1: #75B8A5;
  --st-chart-2: #B08D57;
  --st-chart-3: #8EA09D;
  --st-chart-4: #D6A85F;
  --st-chart-5: #D66F62;
  --st-font-ui: "Manrope", "Segoe UI", sans-serif;
  --st-font-data: "IBM Plex Mono", "Consolas", monospace;
  --st-text-xs: 0.75rem;
  --st-text-sm: 0.875rem;
  --st-text-md: 1rem;
  --st-text-lg: 1.25rem;
  --st-text-xl: clamp(1.75rem, 3vw, 3rem);
  --st-leading-tight: 1.15;
  --st-leading-body: 1.55;
  --st-space-1: 0.25rem;
  --st-space-2: 0.5rem;
  --st-space-3: 0.75rem;
  --st-space-4: 1rem;
  --st-space-5: 1.5rem;
  --st-space-6: 2rem;
  --st-space-7: 3rem;
  --st-radius-sm: 0.625rem;
  --st-radius-md: 0.875rem;
  --st-radius-lg: 1.25rem;
  --st-shadow-soft: 0 1px 0 rgba(0, 0, 0, 0.16), 0 10px 30px rgba(0, 0, 0, 0.16);
  --st-shadow-raised: 0 2px 0 rgba(0, 0, 0, 0.2), 0 22px 56px rgba(0, 0, 0, 0.3);
  --st-shadow-panel: var(--st-shadow-raised);
  --st-shadow-focus: 0 0 0 2px rgba(208, 173, 114, 0.9);
  --st-divider: rgba(247, 245, 239, 0.07);
  --st-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --st-duration-fast: 140ms;
  --st-duration-ui: 220ms;
  --st-duration-reveal: 340ms;
}

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibmplexmono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibmplexmono-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--st-font-ui);
  font-size: var(--st-text-md);
  line-height: var(--st-leading-body);
  color: var(--st-text);
  background: var(--st-bg);
  min-height: 100vh;
}
::selection { background: var(--st-evidence); color: var(--st-bone); }

a { color: var(--st-evidence-soft); }
button { font-family: inherit; }
:focus-visible { outline: none; box-shadow: var(--st-shadow-focus); border-radius: var(--st-radius-sm); }

/* ---------- App frame ---------- */
.st-app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.st-sidebar {
  background: linear-gradient(180deg, var(--st-dusk) 0%, var(--st-bg) 100%);
  border-right: 1px solid var(--st-border);
  padding: var(--st-space-5) var(--st-space-4);
  display: flex; flex-direction: column; gap: var(--st-space-5);
  position: sticky; top: 0; height: 100vh;
}
.st-brand { display: flex; align-items: center; gap: var(--st-space-3); }
.st-brand__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.st-brand__copy { display: flex; min-width: 0; flex-direction: column; gap: var(--st-space-1); }
.st-brand__name { font-weight: 800; font-size: var(--st-text-lg); letter-spacing: 0.01em; color: var(--st-bone); }
.st-brand__sub { font-size: var(--st-text-xs); color: var(--st-text-muted); letter-spacing: 0.08em; text-transform: uppercase; }

.st-nav { display: flex; flex-direction: column; gap: 2px; }
.st-nav__item {
  display: flex; align-items: center; gap: var(--st-space-3);
  padding: 11px var(--st-space-3); min-height: 44px;
  border: 0; background: transparent; color: var(--st-text-secondary);
  font-size: var(--st-text-sm); font-weight: 600; text-align: left; width: 100%;
  border-radius: var(--st-radius-sm); cursor: pointer;
  transition: background var(--st-duration-fast) var(--st-ease-out), color var(--st-duration-fast) var(--st-ease-out);
}
.st-nav__item:hover { background: rgba(247, 245, 239, 0.06); color: var(--st-bone); }
.st-nav__item[aria-current="page"] { background: var(--st-evidence); color: var(--st-bone); }
.st-nav__item .count {
  margin-left: auto; font-family: var(--st-font-data); font-size: var(--st-text-xs);
  color: inherit; opacity: 0.85; font-variant-numeric: tabular-nums lining-nums;
}

.st-applink {
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px var(--st-space-3); min-height: 44px;
  border: 1px solid var(--st-brass-bright); border-radius: var(--st-radius-sm);
  background: rgba(198, 156, 74, 0.10); text-decoration: none;
  transition: background var(--st-duration-fast) var(--st-ease-out);
}
.st-applink:hover { background: rgba(198, 156, 74, 0.18); }
.st-applink__title { font-size: var(--st-text-sm); font-weight: 700; color: var(--st-bone); }
.st-applink__sub { font-size: var(--st-text-xs); color: var(--st-text-muted); }

.st-dataset-chip {
  margin-top: auto;
  border: 1px solid var(--st-border-strong); border-radius: var(--st-radius-sm);
  padding: var(--st-space-2) var(--st-space-3);
  font-family: var(--st-font-data); font-size: var(--st-text-xs);
  color: var(--st-brass-bright); letter-spacing: 0.06em;
}
.st-dataset-chip strong { display: block; color: var(--st-bone); margin-bottom: 2px; }

/* ---------- Main column ---------- */
.st-main { padding: var(--st-space-5) var(--st-space-6) var(--st-space-7); min-width: 0; position: relative; }
.st-topbar { display: flex; align-items: baseline; gap: var(--st-space-4); margin-bottom: var(--st-space-5); flex-wrap: wrap; }
.st-topbar h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.015em; }
.st-topbar .st-freshchip { margin-left: auto; }

.st-freshchip {
  font-family: var(--st-font-data); font-size: var(--st-text-xs);
  color: var(--st-text-muted); border: 1px solid var(--st-border);
  border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}

/* ---------- Eyebrow typography ---------- */
.st-eyebrow {
  display: inline-flex; align-items: center; gap: var(--st-space-2);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--st-brass-bright);
}
.st-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--st-brass); }

/* ---------- KPI row ---------- */
.st-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--st-space-3); margin-bottom: var(--st-space-5); }
.st-kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(247, 245, 239, 0.03) 0%, rgba(247, 245, 239, 0) 38%), var(--st-surface-1);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-md); padding: var(--st-space-3) var(--st-space-4) var(--st-space-4);
  box-shadow: var(--st-shadow-soft);
}
.st-kpi::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--st-evidence-soft), transparent 70%);
  opacity: 0.55;
}
.st-kpi__label { font-size: var(--st-text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-text-muted); font-weight: 700; }
.st-kpi__value { font-family: var(--st-font-data); font-size: 1.75rem; font-weight: 500; color: var(--st-bone); line-height: var(--st-leading-tight); margin-top: 2px; font-variant-numeric: tabular-nums lining-nums; }
.st-kpi__value--text { font-size: 1.05rem; padding-top: 6px; }
.st-kpi__value .unit { font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-kpi__hint { font-size: var(--st-text-xs); color: var(--st-text-muted); margin-top: 2px; }
.st-kpi--alert .st-kpi__value { color: var(--st-attention); }
.st-kpi--alert::before { background: linear-gradient(90deg, var(--st-attention), transparent 70%); }
.st-kpi--urgent .st-kpi__value { color: var(--st-urgent); }
.st-kpi--urgent::before { background: linear-gradient(90deg, var(--st-urgent), transparent 70%); }

/* ---------- Chart panels (hand-built SVG, no libraries) ---------- */
.st-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--st-space-4); margin-bottom: var(--st-space-5); }
.st-chart {
  background: linear-gradient(180deg, rgba(247, 245, 239, 0.025) 0%, rgba(247, 245, 239, 0) 42%), var(--st-surface-1);
  border: 1px solid var(--st-border); border-radius: var(--st-radius-lg);
  padding: var(--st-space-5); display: flex; flex-direction: column; gap: var(--st-space-3);
  box-shadow: var(--st-shadow-raised);
}
.st-chart__head { display: flex; align-items: baseline; gap: var(--st-space-3); flex-wrap: wrap; }
.st-chart__title { font-weight: 700; font-size: var(--st-text-sm); color: var(--st-bone); }
.st-chart__tag {
  margin-left: auto; font-family: var(--st-font-data); font-size: 0.75rem;
  letter-spacing: 0.08em; color: var(--st-text-muted);
  border: 1px solid var(--st-border); border-radius: 999px; padding: 2px 10px;
}
.st-chart > svg { width: 100%; height: auto; display: block; }
.st-legend__item svg { width: 14px; height: 14px; display: inline-block; }
.st-chart .axis { stroke: rgba(247, 245, 239, 0.13); stroke-width: 1; }
.st-chart .gridline { stroke: rgba(247, 245, 239, 0.06); stroke-width: 1; }
.st-chart .target { stroke: rgba(247, 245, 239, 0.35); stroke-width: 1; stroke-dasharray: 2 2; }
.st-chart .ticklabel { fill: var(--st-text-muted); font-family: var(--st-font-data); font-size: 12px; }
.st-chart .barlabel { fill: var(--st-text-secondary); font-family: var(--st-font-data); font-size: 12px; }
.st-chart .rowlabel { fill: var(--st-text-secondary); font-family: var(--st-font-ui); font-size: 12px; font-weight: 600; }
.st-chart .grouplabel { fill: var(--st-bone); font-family: var(--st-font-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.st-chart .valuelabel { fill: var(--st-bone); font-family: var(--st-font-data); font-size: 12px; font-weight: 500; }
.st-chart .statlabel { font-family: var(--st-font-data); font-size: 12px; fill: var(--st-text-secondary); }
.st-chart .anno { fill: var(--st-brass-bright); font-family: var(--st-font-data); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.st-chart .mutedtext { fill: var(--st-text-muted); }
.st-chart .attentext { fill: var(--st-attention); }
.st-chart .urgenttext { fill: var(--st-urgent); }
.st-chart .degtext { fill: var(--st-degraded); }
.st-chart .chart-row { outline: none; }
.st-chart .chart-row:focus-visible rect:first-of-type { stroke: var(--st-brass-bright); stroke-width: 1.5; }
.st-chart .chart-row:focus-visible text { fill: var(--st-bone); }
.st-chart__takeaway {
  font-size: var(--st-text-sm); font-weight: 700; color: var(--st-bone);
  font-variant-numeric: tabular-nums; line-height: 1.4;
}
.st-chart__context { font-family: var(--st-font-data); font-size: 12px; color: var(--st-text-muted); }
.st-legend { display: flex; flex-wrap: wrap; gap: var(--st-space-2) var(--st-space-4); }
.st-legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: var(--st-text-xs); color: var(--st-text-secondary); }
.st-legend__item svg { flex: 0 0 auto; }

/* Chart entry motion: one-shot reveal in the 600-800 ms window
   (disabled by the reduced-motion kill below). Motion never carries meaning. */
@keyframes st-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
.st-chart .grow-x { transform-origin: left; transform-box: fill-box; animation: st-grow-x 340ms var(--st-ease-out) backwards; }
.st-chart .fade { animation: st-fade 340ms var(--st-ease-out) backwards; }

/* ---------- Reveal motion for view content ---------- */
@keyframes st-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.st-reveal > * { animation: st-rise var(--st-duration-reveal) var(--st-ease-out) backwards; }
.st-reveal > *:nth-child(2) { animation-delay: 60ms; }
.st-reveal > *:nth-child(3) { animation-delay: 120ms; }
.st-reveal > *:nth-child(4) { animation-delay: 180ms; }
.st-reveal > *:nth-child(5) { animation-delay: 240ms; }
.st-reveal > *:nth-child(n+6) { animation-delay: 300ms; }

/* ---------- Section plates behind views (scoped to the main column) ---------- */
.st-plate {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity var(--st-duration-reveal) var(--st-ease-out), background-image 0s;
}
.st-plate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 24, 29, 0.88) 0%, rgba(10, 24, 29, 0.96) 60%, var(--st-bg) 100%); }
body[data-st-view] .st-plate { opacity: 1; }
body[data-st-view="today"] .st-plate { background-image: url("plate-wall.webp"); }
body[data-st-view="turns"] .st-plate { background-image: url("plate-wall-beam.webp"); }
body[data-st-view="properties"] .st-plate { background-image: url("plate-kitchen.webp"); }
body[data-st-view="evidence"] .st-plate { background-image: url("plate-evidence.webp"); }
body[data-st-view="exceptions"] .st-plate { background-image: url("plate-bath.webp"); }
body[data-st-view="packets"] .st-plate { background-image: url("plate-linen-dish.webp"); }
body[data-st-view="method"] .st-plate { background-image: url("plate-linen-lamp.webp"); }
body[data-st-view="data"] .st-plate { background-image: url("plate-linen-lamp.webp"); }
.st-main > *:not(.st-plate) { position: relative; z-index: 1; }

/* ---------- Cards ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--st-space-4); }
.st-card {
  background: linear-gradient(180deg, rgba(247, 245, 239, 0.03) 0%, rgba(247, 245, 239, 0) 40%), var(--st-surface-1);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-md); padding: var(--st-space-4) var(--st-space-4) var(--st-space-4);
  display: flex; flex-direction: column; gap: var(--st-space-3);
  box-shadow: var(--st-shadow-soft);
  transition: border-color var(--st-duration-fast) var(--st-ease-out),
              transform var(--st-duration-fast) var(--st-ease-out),
              box-shadow var(--st-duration-fast) var(--st-ease-out);
}
.st-card:hover { border-color: var(--st-border-strong); }
.st-card--selectable:hover { transform: translateY(-1px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18), 0 14px 34px rgba(0, 0, 0, 0.22); }
.st-card--selectable { cursor: pointer; }
.st-card--selected { border-color: var(--st-brass); box-shadow: 0 0 0 1px var(--st-brass); }
.st-card__head { display: flex; align-items: flex-start; gap: var(--st-space-3); }
.st-card__title { font-weight: 700; font-size: var(--st-text-md); color: var(--st-bone); }
.st-card__sub { font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-card__spacer { margin-left: auto; }
.st-meta {
  font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-text-muted);
  display: flex; flex-wrap: wrap; gap: var(--st-space-2) var(--st-space-4);
  border-top: 1px solid var(--st-border); padding-top: var(--st-space-2);
}

/* ---------- Status pills, evidence labels ---------- */
.st-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--st-text-xs); font-weight: 700; letter-spacing: 0.06em;
  border-radius: 999px; padding: 4px 12px; white-space: nowrap;
  border: 1px solid transparent;
}
.st-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-pill--ready { color: var(--st-ready); border-color: rgba(117, 184, 165, 0.35); background: rgba(117, 184, 165, 0.10); }
.st-pill--review { color: var(--st-evidence-soft); border-color: rgba(169, 205, 197, 0.35); background: rgba(169, 205, 197, 0.08); }
.st-pill--incomplete { color: var(--st-attention); border-color: rgba(214, 168, 95, 0.35); background: rgba(214, 168, 95, 0.10); }
.st-pill--late { color: var(--st-urgent); border-color: rgba(214, 111, 98, 0.4); background: rgba(214, 111, 98, 0.10); }
.st-pill--blocked { color: var(--st-urgent); border-color: rgba(214, 111, 98, 0.4); background: rgba(214, 111, 98, 0.10); }
.st-pill--degraded { color: var(--st-degraded); border-color: rgba(199, 133, 99, 0.4); background: rgba(199, 133, 99, 0.10); }
.st-pill--neutral { color: var(--st-neutral); border-color: rgba(143, 162, 168, 0.35); background: rgba(143, 162, 168, 0.08); }

.st-evlabel {
  font-family: var(--st-font-data); font-size: 0.75rem; letter-spacing: 0.08em;
  border-radius: 999px; padding: 1px 8px; border: 1px solid var(--st-border);
  color: var(--st-text-muted);
}
.st-evlabel--reported { color: var(--st-evidence-soft); border-color: rgba(169, 205, 197, 0.4); }
.st-evlabel--inference { color: var(--st-attention); border-color: rgba(214, 168, 95, 0.4); }
.st-evlabel--open { color: var(--st-neutral); }
.st-evlabel--verified { color: var(--st-ready); border-color: rgba(117, 184, 165, 0.45); }

/* ---------- Process ribbon ---------- */
.st-ribbon { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.st-ribbon__step {
  font-size: var(--st-text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--st-text-muted); padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--st-border); background: transparent;
}
.st-ribbon__step--done { color: var(--st-evidence-soft); border-color: rgba(169, 205, 197, 0.35); }
.st-ribbon__step--current { color: var(--st-bone); background: var(--st-evidence); border-color: var(--st-evidence); }
.st-ribbon__sep { color: var(--st-text-muted); font-size: var(--st-text-xs); }

/* ---------- Filters ---------- */
.st-filters { display: flex; gap: var(--st-space-3); flex-wrap: wrap; margin-bottom: var(--st-space-4); }
.st-select {
  background: var(--st-surface-2); color: var(--st-text); border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm); padding: 10px 12px; min-height: 44px;
  font-family: inherit; font-size: var(--st-text-sm); cursor: pointer;
}
/* Batch 3 wage-benchmark filters: long occupation labels must not force
   horizontal overflow on narrow screens. min-width:0 lets each select shrink
   below its longest option; on desktop they sit side by side, on mobile wrap. */
.st-filters--b3 .st-select {
  min-width: 0; max-width: 100%;
  padding-right: 34px; /* comfortable room for the native dropdown arrow */
  text-overflow: ellipsis;
}
/* The occupation names are the longest, so give that select its own full-width
   row; its concise labels then fit without clipping even at 375px. The shorter
   geography/metric selects share the next row. */
.st-filters--b3 [data-testid="b3-occ-select"] { flex: 1 1 100%; }
.st-filters--b3 [data-testid="b3-geo-select"],
.st-filters--b3 [data-testid="b3-metric-select"] { flex: 1 1 160px; }
/* Full SHA-256 wraps within bounds instead of showing an ambiguous ellipsis. */
.st-hash { word-break: break-all; overflow-wrap: anywhere; font-family: var(--st-font-data); }
/* Batch 3 table pagination: wraps on narrow screens, never overflows. */
.st-pager {
  display: flex; align-items: center; gap: var(--st-space-3); flex-wrap: wrap;
  margin-top: var(--st-space-3);
}
.st-pager__info {
  font-size: var(--st-text-sm); color: var(--st-text-secondary);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- Tables ---------- */
.st-tablewrap { overflow-x: auto; border: 1px solid var(--st-border); border-radius: var(--st-radius-md); }
.st-table { width: 100%; border-collapse: collapse; font-size: var(--st-text-sm); min-width: 560px; }
.st-table th {
  text-align: left; font-size: var(--st-text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--st-text-muted); font-weight: 700; padding: 8px 14px;
  border-bottom: 1px solid var(--st-border); background: var(--st-surface-1);
}
.st-table th:first-child { width: 42%; }
.st-table td { padding: 12px 14px; border-bottom: 1px solid var(--st-divider); color: var(--st-text-secondary); vertical-align: top; font-variant-numeric: tabular-nums lining-nums; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table tbody tr { transition: background var(--st-duration-fast) var(--st-ease-out); }
.st-table tbody tr:hover { background: rgba(247, 245, 239, 0.03); }
.st-table[data-testid="import-recon"] th:not(:first-child),
.st-table[data-testid="import-recon"] td:not(:first-child) { text-align: right; }
.st-table[data-testid="import-recon"] td:not(:first-child) { font-family: var(--st-font-data); font-size: var(--st-text-sm); }
.st-table .mono { font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-text-muted); white-space: nowrap; }
.st-table .delta { font-family: var(--st-font-data); font-size: var(--st-text-xs); white-space: nowrap; }
.st-table .delta--ok { color: var(--st-ready); }
.st-table .delta--short { color: var(--st-attention); }

/* ---------- Detail panel ---------- */
.st-detail {
  background: var(--st-panel-glass); border: 1px solid var(--st-border-strong);
  border-radius: var(--st-radius-lg); padding: var(--st-space-6);
  box-shadow: var(--st-shadow-raised);
  display: flex; flex-direction: column; gap: var(--st-space-4);
  margin-top: var(--st-space-4);
}
.st-detail h3 { font-size: var(--st-text-lg); color: var(--st-bone); }
.st-detail__section h4 {
  font-size: var(--st-text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--st-text-muted); margin-bottom: var(--st-space-2); font-weight: 700;
}

/* ---------- Empty and degraded states ---------- */
.st-empty {
  border: 1px dashed var(--st-border); border-radius: var(--st-radius-md);
  padding: var(--st-space-5); text-align: center; color: var(--st-text-muted); font-size: var(--st-text-sm);
}
.st-degraded {
  border: 1px solid rgba(199, 133, 99, 0.45); background: rgba(199, 133, 99, 0.07);
  border-radius: var(--st-radius-md); padding: var(--st-space-3) var(--st-space-4);
  color: var(--st-degraded); font-size: var(--st-text-sm);
}
.st-degraded .mono { font-family: var(--st-font-data); font-size: var(--st-text-xs); display: block; margin-top: 4px; color: var(--st-text-muted); }

/* ---------- Method page ---------- */
.st-prose { max-width: 72ch; display: flex; flex-direction: column; gap: var(--st-space-4); }
.st-prose h2 { font-size: var(--st-text-lg); color: var(--st-bone); margin-top: var(--st-space-3); }
.st-prose p, .st-prose li { color: var(--st-text-secondary); font-size: var(--st-text-sm); }
.st-prose ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-prose code { font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-evidence-soft); }
.st-trustline {
  border-left: 3px solid var(--st-brass); padding: var(--st-space-3) var(--st-space-4);
  background: var(--st-surface-1); border-radius: 0 var(--st-radius-sm) var(--st-radius-sm) 0;
  color: var(--st-text-secondary); font-size: var(--st-text-sm);
}

/* ---------- Buttons ---------- */
.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--st-space-2);
  min-height: 44px; padding: 10px 18px; border-radius: var(--st-radius-sm);
  border: 1px solid var(--st-border); background: var(--st-surface-2); color: var(--st-bone);
  font-size: var(--st-text-sm); font-weight: 700; cursor: pointer;
  transition: background var(--st-duration-fast) var(--st-ease-out), border-color var(--st-duration-fast) var(--st-ease-out);
}
.st-btn:hover { border-color: var(--st-border-strong); background: var(--st-surface-warm); }
.st-btn--primary { background: var(--st-evidence); border-color: var(--st-evidence); }
.st-btn--primary:hover { background: var(--st-evidence-strong); border-color: var(--st-evidence-strong); }
.st-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.st-btn--danger { border-color: rgba(214, 111, 98, 0.5); color: var(--st-urgent); background: transparent; }

.st-note { font-size: var(--st-text-xs); color: var(--st-text-muted); }

/* ---------- Hero (demo landing strip) ---------- */
.st-hero {
  position: relative; border-radius: var(--st-radius-lg); overflow: hidden;
  border: 1px solid var(--st-border); margin-bottom: var(--st-space-5);
  min-height: 220px; display: flex; align-items: flex-end;
  background: var(--st-surface-2);
}
.st-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 24, 29, 0.78) 0%, rgba(10, 24, 29, 0.35) 46%, rgba(10, 24, 29, 0.05) 72%),
              linear-gradient(180deg, rgba(10, 24, 29, 0.16) 0%, rgba(10, 24, 29, 0.88) 100%);
}
.st-hero__body { position: relative; padding: var(--st-space-5); display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-hero__body h2 { font-size: var(--st-text-xl); line-height: var(--st-leading-tight); color: var(--st-bone); max-width: 22ch; }
.st-hero__body p { color: var(--st-text-secondary); max-width: 52ch; font-size: var(--st-text-sm); }

/* ---------- Editor / import (paid mode) ---------- */
.st-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--st-space-3); }
.st-field label { display: block; font-size: var(--st-text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-text-muted); font-weight: 700; margin-bottom: 4px; }
.st-field input, .st-field select, .st-field textarea {
  width: 100%; background: var(--st-surface-2); color: var(--st-text);
  border: 1px solid var(--st-border); border-radius: var(--st-radius-sm);
  padding: 10px 12px; min-height: 44px; font-family: inherit; font-size: var(--st-text-sm);
}
.st-import-preview { max-height: 320px; overflow: auto; }
.st-import-errors { color: var(--st-urgent); font-size: var(--st-text-sm); }
.st-import-errors .mono { font-family: var(--st-font-data); font-size: var(--st-text-xs); }

/* ---------- Mobile field view ---------- */
.st-mobilebar { display: none; }
@media (max-width: 900px) {
  .st-app { grid-template-columns: minmax(0, 1fr); }
  .st-sidebar { position: static; height: auto; flex-direction: column; padding-bottom: var(--st-space-3); min-width: 0; }
  .st-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .st-nav__item { white-space: nowrap; }
  .st-main { padding: var(--st-space-4); }
  .st-chart { padding: var(--st-space-4); }
  .st-detail { padding: var(--st-space-4) var(--st-space-5); }
  .st-kpis { grid-template-columns: repeat(2, 1fr); }
  .st-mobilebar {
    display: block; border: 1px solid var(--st-border-strong); border-radius: var(--st-radius-md);
    background: var(--st-surface-1); padding: var(--st-space-3) var(--st-space-4); margin-bottom: var(--st-space-4);
    font-size: var(--st-text-sm); color: var(--st-text-secondary);
  }
  .st-mobilebar strong { color: var(--st-bone); display: block; }
}
@media (max-width: 480px) {
  .st-kpis { grid-template-columns: repeat(2, 1fr); }
  .st-grid { grid-template-columns: 1fr; }
  .st-topbar .st-freshchip { margin-left: 0; }
}

/* ---------- Reduced motion ---------- */
.st-hero__poster { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .st-hero__media[data-motion] { display: none; }
  .st-hero__poster { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}

/* ---------- Skip link, a11y ---------- */
.st-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--st-evidence); color: var(--st-bone); padding: 12px 20px;
  font-weight: 700; text-decoration: none; border-radius: 0 0 var(--st-radius-sm) 0;
}
.st-skip:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Batch 3.5: evidence classes, benchmark cards, claim packets ---------- */
.st-class-chip {
  display: inline-block; font-family: var(--st-font-data); font-size: var(--st-text-xs);
  letter-spacing: 0.08em; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--st-border-strong);
}
.st-class-chip--market_benchmark { background: var(--st-evidence-strong); color: var(--st-bone); border-color: var(--st-evidence-soft); }
.st-class-chip--sample { background: var(--st-surface-warm); color: var(--st-attention); border-color: var(--st-attention); }
.st-class-chip--demo { background: transparent; color: var(--st-degraded); border-color: var(--st-degraded); border-style: dashed; }

.st-bm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--st-space-4); margin: var(--st-space-4) 0; }
.st-bm-card { padding: var(--st-space-4); }
.st-bm-card__title { font-size: var(--st-text-sm); color: var(--st-text-secondary); letter-spacing: 0.06em; text-transform: uppercase; }
.st-bm-card__value { font-family: var(--st-font-data); font-size: 1.75rem; color: var(--st-bone); margin: var(--st-space-2) 0; }
.st-bm-card__state { font-family: var(--st-font-data); font-size: var(--st-text-sm); color: var(--st-attention); margin: var(--st-space-2) 0; }
.st-bm-card__state--fallback { color: var(--st-attention); }
.st-bm-card--outdated .st-bm-card__state, .st-bm-card--not_available .st-bm-card__state { color: var(--st-degraded); }
.st-bm-card__meta { display: flex; align-items: center; gap: var(--st-space-2); flex-wrap: wrap; }
.st-bm-table { border-collapse: collapse; width: 100%; font-size: var(--st-text-sm); }
.st-bm-table th, .st-bm-table td { border: 1px solid var(--st-border); padding: 6px 10px; text-align: left; }
.st-provenance { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: var(--st-space-4); margin-top: var(--st-space-5); font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-provenance a { color: var(--st-brass-bright); word-break: break-all; }
.st-bm-disclaimer { font-style: italic; color: var(--st-text-muted); }

.st-claim-card { margin: var(--st-space-3) 0; padding: var(--st-space-4); }
.st-claim-card--active { border-color: var(--st-border-strong); }
.st-claim-card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--st-space-3); flex-wrap: wrap; }
.st-claim-editor { border: 1px solid var(--st-border-strong); border-radius: var(--st-radius-lg); padding: var(--st-space-5); margin-top: var(--st-space-5); background: var(--st-surface-1); }
.st-claim-editor input, .st-claim-editor select, .st-claim-editor textarea {
  background: var(--st-surface-2); color: var(--st-text); border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm); padding: 8px 10px; font-family: var(--st-font-ui); font-size: var(--st-text-sm);
}
.st-claim-editor textarea { width: 100%; }
.st-labeled { display: inline-flex; flex-direction: column; gap: 2px; margin-right: var(--st-space-3); }
.st-labeled__cap { font-size: var(--st-text-xs); color: var(--st-text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.st-claim-grade { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: var(--st-space-4); margin: var(--st-space-4) 0; background: var(--st-surface-2); }
.st-next-actions li { margin-bottom: var(--st-space-2); }
.st-pill--incomplete { background: rgba(214, 168, 95, 0.16); color: var(--st-attention); }

/* ---------- Research Evidence view ---------- */
.st-research { display: flex; flex-direction: column; gap: var(--st-space-6); max-width: 1080px; }
.st-research__hero h2 { font-size: var(--st-text-xl); line-height: var(--st-leading-tight); color: var(--st-bone); margin: 0 0 var(--st-space-3); }
.st-research__lede { font-size: var(--st-text-md); color: var(--st-text-secondary); max-width: 62ch; margin: 0; }

.st-rhealth { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--st-space-4);
  border: 1px solid var(--st-border); border-radius: var(--st-radius-lg); padding: var(--st-space-5);
  background: var(--st-surface-1); box-shadow: var(--st-shadow-soft); }
.st-rhealth__item { display: flex; flex-direction: column; gap: 4px; }
.st-rhealth__num { font-family: var(--st-font-data); font-size: var(--st-text-xl); font-weight: 600; color: var(--st-brass-bright); line-height: 1; }
.st-rhealth__label { font-size: var(--st-text-xs); color: var(--st-text-muted); letter-spacing: 0.04em; text-transform: uppercase; }

.st-rcaveat { font-size: var(--st-text-sm); color: var(--st-text-secondary); line-height: var(--st-leading-body);
  border-left: 3px solid var(--st-brass); padding: var(--st-space-3) var(--st-space-4);
  background: rgba(176, 141, 87, 0.07); border-radius: 0 var(--st-radius-sm) var(--st-radius-sm) 0; margin: 0; }
.st-rcaveat b { color: var(--st-bone); }

/* Proof timeline */
.st-pt h3 { font-size: var(--st-text-lg); color: var(--st-bone); margin: 0 0 var(--st-space-2); }
.st-pt__sub { font-size: var(--st-text-sm); color: var(--st-text-secondary); max-width: 66ch; margin: 0 0 var(--st-space-5); }
.st-pt__track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--st-space-5) var(--st-space-4); }
.st-pt__stage { position: relative; display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-pt__node { display: flex; align-items: center; gap: var(--st-space-2); color: var(--st-evidence-soft); }
.st-pt__glyph { flex: 0 0 auto; }
.st-pt__step { font-family: var(--st-font-data); font-size: var(--st-text-xs); font-weight: 600; color: var(--st-text-inverse);
  background: var(--st-brass); border-radius: 999px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.st-pt__card { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: var(--st-space-4);
  background: var(--st-surface-1); display: flex; flex-direction: column; gap: var(--st-space-2); height: 100%; }
.st-pt__label { font-weight: 700; color: var(--st-bone); font-size: var(--st-text-md); }
.st-pt__risk { font-size: var(--st-text-sm); color: var(--st-text-secondary); margin: 0; line-height: var(--st-leading-body); }
.st-pt__themes { display: flex; flex-wrap: wrap; gap: 6px; }
.st-pt__count { font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-text-muted);
  border: 1px solid var(--st-border); border-radius: var(--st-radius-sm); padding: 2px 8px; }
.st-pt__count b { color: var(--st-brass-bright); }
.st-pt__resp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.st-pt__cap { font-size: var(--st-text-xs); color: var(--st-evidence-soft); background: rgba(30, 95, 85, 0.22);
  border: 1px solid rgba(169, 205, 197, 0.25); border-radius: 999px; padding: 3px 10px; }

/* Theme filter chips */
.st-rthemes { display: flex; flex-wrap: wrap; gap: var(--st-space-2); }
.st-rchip { font-family: var(--st-font-ui); font-size: var(--st-text-sm); font-weight: 600; color: var(--st-text-secondary);
  background: var(--st-surface-1); border: 1px solid var(--st-border); border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: border-color var(--st-duration-fast) var(--st-ease-out), color var(--st-duration-fast) var(--st-ease-out); }
.st-rchip:hover { border-color: var(--st-border-strong); color: var(--st-bone); }
.st-rchip.is-active { color: var(--st-text-inverse); background: var(--st-brass); border-color: var(--st-brass); }
.st-rchip__count { font-family: var(--st-font-data); font-size: var(--st-text-xs); margin-left: 6px; opacity: 0.85; }

/* Product response */
.st-rresponse h3 { font-size: var(--st-text-lg); color: var(--st-bone); margin: 0 0 var(--st-space-2); }
.st-rresponse__sub { font-size: var(--st-text-sm); color: var(--st-text-secondary); max-width: 66ch; margin: 0 0 var(--st-space-5); }
.st-rresponse__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--st-space-4); }
.st-rresponse__theme { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: var(--st-space-4); background: var(--st-surface-1); }
.st-rresponse__theme-head { font-weight: 700; color: var(--st-brass-bright); font-size: var(--st-text-sm); letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: var(--st-space-3); }
.st-rresponse__caps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-rresponse__cap { display: flex; flex-direction: column; gap: 2px; }
.st-rresponse__cap-label { font-weight: 600; color: var(--st-bone); font-size: var(--st-text-sm); }
.st-rresponse__cap-desc { font-size: var(--st-text-sm); color: var(--st-text-secondary); line-height: var(--st-leading-body); }

/* Archive */
.st-rarchive__head h3 { font-size: var(--st-text-lg); color: var(--st-bone); margin: 0 0 var(--st-space-2); }
.st-rarchive__sub { font-size: var(--st-text-sm); color: var(--st-text-secondary); max-width: 66ch; margin: 0 0 var(--st-space-4); }
.st-rcontrols { display: flex; align-items: center; gap: var(--st-space-3); flex-wrap: wrap; margin-bottom: var(--st-space-4); }
.st-rcontrols__label { font-size: var(--st-text-xs); color: var(--st-text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.st-rcontrols__select { background: var(--st-surface-2); color: var(--st-text); border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm); padding: 8px 10px; font-family: var(--st-font-ui); font-size: var(--st-text-sm); }
.st-rcontrols__count { font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-text-muted); margin-left: auto; }
.st-rlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--st-space-4); }
.st-rlist__empty { color: var(--st-text-muted); font-size: var(--st-text-sm); padding: var(--st-space-5); }
.st-rcard { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); padding: var(--st-space-4);
  background: var(--st-surface-1); display: flex; flex-direction: column; gap: var(--st-space-2);
  transition: border-color var(--st-duration-fast) var(--st-ease-out); }
.st-rcard:hover { border-color: var(--st-border-strong); }
.st-rcard__top { display: flex; align-items: center; gap: var(--st-space-2); flex-wrap: wrap; }
.st-rcard__id { font-family: var(--st-font-data); font-size: var(--st-text-xs); font-weight: 600; color: var(--st-text-muted); }
.st-pill--source { color: var(--st-text-secondary); border-color: var(--st-border); background: var(--st-surface-2); }
.st-pill--theme { color: var(--st-evidence-soft); border-color: rgba(169, 205, 197, 0.3); background: rgba(30, 95, 85, 0.18); }
.st-rcard__role { font-size: var(--st-text-xs); color: var(--st-brass-bright); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.st-rcard__context { font-weight: 600; color: var(--st-bone); font-size: var(--st-text-sm); }
.st-rcard__paraphrase { font-size: var(--st-text-sm); color: var(--st-text-secondary); line-height: var(--st-leading-body); margin: 0; }
.st-rcard__meta { display: flex; flex-wrap: wrap; gap: var(--st-space-3); font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-text-muted); }
.st-rcard__link { font-size: var(--st-text-sm); font-weight: 600; color: var(--st-brass-bright); text-decoration: none; margin-top: auto; align-self: flex-start; }
.st-rcard__link:hover { text-decoration: underline; }
.st-rarchive__disclosure { margin-top: var(--st-space-4); }
.st-disclosure-btn { font-family: var(--st-font-ui); font-size: var(--st-text-sm); font-weight: 600; color: var(--st-bone);
  background: var(--st-surface-2); border: 1px solid var(--st-border-strong); border-radius: var(--st-radius-sm);
  padding: 9px 18px; cursor: pointer; transition: background var(--st-duration-fast) var(--st-ease-out); }
.st-disclosure-btn:hover { background: var(--st-surface-warm); }

/* Research CTA */
.st-rcta { border: 1px solid var(--st-border); border-radius: var(--st-radius-lg); padding: var(--st-space-6);
  background: var(--st-surface-1); display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-rcta h3 { font-size: var(--st-text-lg); color: var(--st-bone); margin: 0; }
.st-rcta__sub { font-size: var(--st-text-sm); color: var(--st-text-secondary); max-width: 66ch; margin: 0; }
.st-rcta__steps { margin: var(--st-space-2) 0 0; padding-left: var(--st-space-5); display: flex; flex-direction: column; gap: var(--st-space-2);
  font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-rcta__note { font-size: var(--st-text-xs); color: var(--st-text-muted); margin: var(--st-space-2) 0 0; font-style: italic; }

@media (max-width: 900px) {
  .st-rhealth { grid-template-columns: repeat(2, 1fr); }
  .st-pt__track { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .st-rhealth { grid-template-columns: 1fr; }
  .st-pt__track { grid-template-columns: 1fr; }
  .st-rlist { grid-template-columns: 1fr; }
  .st-rcontrols__count { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .st-rchip, .st-rcard, .st-disclosure-btn { transition: none; }
}

/* ---------- Reviews: Airbnb 14-day review-window recovery ---------- */
.st-review-compliance { margin: var(--st-space-4) 0; display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-review-guardrails { margin: 0; padding-left: var(--st-space-5); display: flex; flex-direction: column; gap: var(--st-space-2);
  font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-review-next48 { display: flex; align-items: baseline; gap: var(--st-space-2); margin: var(--st-space-4) 0;
  padding: var(--st-space-3) var(--st-space-4); border: 1px solid var(--st-border); border-radius: var(--st-radius-lg);
  background: var(--st-surface-1); }
.st-review-next48--alert { border-color: var(--st-border-strong); }
.st-review-next48__count { font-family: var(--st-font-data); font-size: var(--st-text-lg); color: var(--st-brass-bright); }
.st-review-next48__label { font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-review-card { display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-review-clock { display: flex; align-items: baseline; gap: var(--st-space-2); }
.st-review-clock__num { font-family: var(--st-font-data); font-size: var(--st-text-xl); line-height: 1; color: var(--st-bone); }
.st-review-clock--urgent .st-review-clock__num { color: var(--st-urgent); }
.st-review-clock__unit { font-size: var(--st-text-sm); color: var(--st-text-secondary); }
.st-review-reminder { border-top: 1px solid var(--st-border); padding-top: var(--st-space-3); display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-review-reminder__tag { font-family: var(--st-font-data); font-size: var(--st-text-xs); letter-spacing: 0.06em; }
.st-review-reminder__tag--queued { color: var(--st-ready); }
.st-review-reminder__tag--suppressed { color: var(--st-text-muted); }
.st-review-reminder__msg { margin: 0; font-size: var(--st-text-sm); color: var(--st-text-secondary); line-height: var(--st-leading-body); }

/* Next-48-hours queue (rendered inside Today). Reuses card tokens/pills. */
.st-next48 { margin: 0 0 var(--st-space-5); padding: var(--st-space-4); border: 1px solid var(--st-border);
  border-radius: var(--st-radius-lg); background: var(--st-surface-1); display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-next48__head { display: flex; align-items: baseline; gap: var(--st-space-3); }
.st-next48__title { margin: 0; font-size: var(--st-text-lg); color: var(--st-bone); }
.st-next48__count { font-family: var(--st-font-data); font-size: var(--st-text-sm); color: var(--st-brass-bright); }
.st-next48__list { display: flex; flex-direction: column; gap: var(--st-space-2); margin-top: var(--st-space-2); }
.st-next48__row { display: flex; align-items: center; gap: var(--st-space-3); padding: var(--st-space-3);
  border: 1px solid var(--st-border); border-radius: var(--st-radius-md); background: var(--st-surface-2); }
.st-next48__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-next48__prop { font-size: var(--st-text-sm); color: var(--st-bone); }
.st-next48__sub { font-size: var(--st-text-xs); color: var(--st-text-secondary); }
.st-next48__spacer { flex: 1 1 auto; }
.st-next48__when { font-family: var(--st-font-data); font-size: var(--st-text-xs); color: var(--st-text-secondary); white-space: nowrap; }

/* ---------- Recovery additions 2026-07-21: Pain Intelligence, KPI surface,
   Reference Data (Batch 2). Additive only — nothing above this line changed. */

/* Data-status chips: exactly four labels (SYNTHETIC, PUBLIC BENCHMARK,
   PURCHASED, LIVE). The text IS the encoding; color is secondary. */
.st-datastatus {
  display: inline-block; font-family: var(--st-font-data); font-size: var(--st-text-xs);
  letter-spacing: 0.06em; font-weight: 700; padding: 2px 8px; border-radius: var(--st-radius-sm);
  border: 1px solid var(--st-border); color: var(--st-text-secondary); white-space: nowrap;
}
.st-datastatus--synthetic { color: var(--st-neutral); border-color: rgba(143, 162, 168, 0.5); }
.st-datastatus--public-benchmark { color: var(--st-ready); border-color: rgba(117, 184, 165, 0.5); }
.st-datastatus--purchased { color: var(--st-brass-bright); border-color: var(--st-border-strong); }
.st-datastatus--live { color: var(--st-bone); background: var(--st-evidence); border-color: var(--st-evidence); }
/* PUBLIC = official static public-domain snapshot (e.g. BLS OEWS); distinct
   from PUBLIC BENCHMARK provenance. Brass to read as an authoritative source. */
.st-datastatus--public { color: var(--st-brass); border-color: rgba(208, 173, 114, 0.55); }

/* Estimate/limitation warning note: labor-market wages are not repair prices. */
.st-note--warn {
  border-left: 3px solid var(--st-brass);
  padding: var(--st-space-2) var(--st-space-3);
  background: rgba(208, 173, 114, 0.08);
  border-radius: var(--st-radius-sm);
  color: var(--st-text-secondary);
}

/* Investor assumption chip: every investor value carries it. */
.st-assume-chip {
  display: inline-block; font-family: var(--st-font-data); font-size: var(--st-text-xs);
  letter-spacing: 0.06em; font-weight: 700; padding: 2px 8px; border-radius: var(--st-radius-sm);
  border: 1px dashed var(--st-border-strong); color: var(--st-brass-bright); white-space: nowrap;
}

/* KPI surface groups */
.st-kpis--wrap { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.st-kpi-group { margin-bottom: var(--st-space-6); }
.st-kpi-group__title { font-size: var(--st-text-lg); color: var(--st-bone); margin: 0 0 var(--st-space-2); }
.st-kpi-group .st-note { display: block; margin-bottom: var(--st-space-3); max-width: 78ch; }
.st-kpi__source { margin-top: var(--st-space-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-kpi__srctext { font-size: var(--st-text-xs); color: var(--st-text-muted); }
.st-kpi-invest {
  border: 1px dashed var(--st-border-strong); border-radius: var(--st-radius-lg);
  background: var(--st-surface-warm); padding: var(--st-space-4) var(--st-space-4) var(--st-space-2);
  margin-bottom: var(--st-space-5);
}
.st-kpi-invest .st-kpi { border-style: dashed; }
.st-kpi--assumption .st-kpi__value { color: var(--st-brass-bright); }

/* Matrix / reference tables. Same base look as .st-bm-table, plus a stacked
   mobile mode that removes ALL horizontal overflow. */
.st-sectionhead { display: flex; align-items: center; gap: var(--st-space-3); flex-wrap: wrap; margin-top: var(--st-space-6); }
.st-sectionhead h2 { margin: 0; }
/* Wide reference tables escape the 72ch prose measure so columns get real
   room; prose text around them keeps its own readable width. */
.st-matrixwrap, .st-refdata { max-width: none; }
.st-matrixwrap > p, .st-refdata > p { max-width: 78ch; }
.st-matrix { width: 100%; border-collapse: collapse; margin: var(--st-space-3) 0 var(--st-space-4); font-size: var(--st-text-xs); }
.st-matrix th, .st-matrix td {
  border: 1px solid var(--st-border); padding: 8px 10px; text-align: left; vertical-align: top;
  color: var(--st-text-secondary); overflow-wrap: break-word;
}
.st-matrix th { color: var(--st-text-muted); font-family: var(--st-font-data); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.st-matrix strong { color: var(--st-bone); }
.st-pill--coverage { text-transform: none; letter-spacing: 0.02em; }
@media (max-width: 640px) {
  /* Stacked rows: every cell carries its own data-label caption, so the
     header row is fully redundant here and is removed from layout. */
  .st-matrix thead { display: none; }
  .st-matrix, .st-matrix tbody, .st-matrix tr, .st-matrix td { display: block; width: 100%; }
  .st-matrix td { overflow-wrap: anywhere; }
  .st-matrix tr { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); margin-bottom: var(--st-space-3); background: var(--st-surface-1); }
  .st-matrix td { border: 0; border-bottom: 1px solid var(--st-border); }
  .st-matrix td:last-child { border-bottom: 0; }
  .st-matrix td::before {
    content: attr(data-label); display: block; font-family: var(--st-font-data);
    font-size: var(--st-text-xs); letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--st-text-muted); margin-bottom: 2px;
  }
}

/* Tablet and narrow-desktop containment for wide reference tables, confirmed
   at 1024x768 by the Lane 2 certification matrix (2026-07-22, sprint evidence
   recovery-artifacts/sprint-20260722/lane2/lane2-results.json): with the left
   rail present, nowrap header cells push .st-matrix tables past the viewport
   (pain +230px, refdata +20px page-level overflow). Inside the band the
   existing table wrappers become their own horizontal scroll containers.
   Containment-only: 1600 desktop and the stacked sub-641px layout render
   byte-identically at rest. */
@media (min-width: 641px) and (max-width: 1359px) {
  .st-matrixwrap, .st-refdata { overflow-x: auto; }
}

/* Safety scenario disclosure cards (native details/summary: keyboard-accessible). */
.st-safety { border: 1px solid var(--st-border); border-radius: var(--st-radius-md); background: var(--st-surface-1); margin: var(--st-space-2) 0; }
.st-safety summary { cursor: pointer; padding: var(--st-space-3) var(--st-space-4); color: var(--st-bone); font-size: var(--st-text-sm); }
.st-safety summary:focus-visible { outline: 2px solid var(--st-brass-bright); outline-offset: 2px; }
.st-safety__body { padding: 0 var(--st-space-4) var(--st-space-3); }
.st-safety__body p { font-size: var(--st-text-xs); color: var(--st-text-secondary); margin: 0 0 var(--st-space-2); }
.st-safety__body strong { color: var(--st-bone); }

/* Mobile overflow fixes for pre-existing defects confirmed on production
   (2026-07-21): exception-card pill pairs forced min-content past 375px, and
   the benchmarks provenance block carries an unbreakable 64-char hash string.
   Both are containment-only changes; desktop layout is untouched. */
@media (max-width: 480px) {
  .st-card__head { flex-wrap: wrap; }
  .st-grid > * { min-width: 0; }
}
.st-provenance p { overflow-wrap: anywhere; }
