@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-condensed-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-700-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --canvas: #0b1118;
  --surface-panel: #111a24;
  --surface-subtle: #17222e;
  --surface-header: #0c1621;
  --surface-signal: #1b3150;
  --text-primary: #f1f5f8;
  --text-secondary: #aab8c6;
  --text-on-bright: #07111c;
  --border: #2b3947;
  --border-strong: #526273;
  --action: #75a7ff;
  --action-selected: #2f5faf;
  --action-wash: #192d4b;
  --focus: #f4bd61;
  --focus-hover: #ffd27b;
  --focus-wash: #342910;
  --negative: #ff8a7d;
  --positive: #a9c47d;
  --data-violet: #c1a8ff;
  --warning-surface: #30250f;
  --warning-text: #ffe0a3;
  --warning-border: #8b6a2e;
  --chart-axis: #617385;
  --chart-label: #9faebd;
  --paper: var(--canvas);
  --paper-bright: var(--surface-panel);
  --paper-deep: var(--surface-subtle);
  --ink: var(--text-primary);
  --ink-soft: var(--text-secondary);
  --rule: var(--border);
  --rule-dark: var(--border-strong);
  --indigo: var(--action);
  --indigo-dark: var(--action-selected);
  --indigo-open: var(--action-wash);
  --gold: var(--focus);
  --gold-dark: var(--focus);
  --gold-open: var(--focus-wash);
  --coral: var(--negative);
  --olive: var(--positive);
  --data: var(--data-violet);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.44);
  --font-display: "Barlow Condensed", "Arial Narrow", "Aptos Narrow", sans-serif;
  --font-ui: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  --font-data: "Cascadia Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--indigo) var(--paper-deep);
  scrollbar-width: thin;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

::selection { color: var(--text-on-bright); background: var(--action); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--indigo); border: 2px solid var(--paper-deep); }

button,
select { font: inherit; }

button,
a,
select,
summary { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: var(--text-primary);
  background: var(--surface-header);
}

.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

main,
section[id] { scroll-margin-top: 88px; }

.desk-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr auto;
  align-items: center;
  min-height: 72px;
  color: var(--text-primary);
  background: var(--surface-header);
  border-bottom: 1px solid var(--border);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px 22px;
  border-right: 1px solid var(--border);
}

.brand-mark { width: 38px; height: 38px; color: var(--focus); flex: 0 0 auto; }
.brand-lockup div { display: grid; gap: 1px; }
.brand-lockup strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brand-lockup span { color: var(--text-secondary); font-size: 12px; }

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 22px;
  color: var(--text-secondary);
  font-size: 13px;
}

.header-status span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-light {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  background: transparent;
}

.status-light[data-state="ready"] { color: var(--focus); background: var(--focus); }
.status-light[data-state="fallback"] { color: #ffae68; background: transparent; }
.status-light[data-state="error"] { color: var(--negative); background: var(--negative); }
.status-light[data-state="loading"] { color: var(--action); animation: status-pulse 1.4s ease-out infinite; }

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(117, 167, 255, 0.38); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(117, 167, 255, 0); }
}

.header-actions { display: flex; align-items: stretch; align-self: stretch; }
.header-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 1px solid var(--border);
  padding: 0 18px;
  cursor: pointer;
}
.header-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.text-action { color: var(--text-secondary); background: transparent; }
.text-action:hover:not(:disabled) { color: var(--text-primary); background: var(--surface-subtle); }
.primary-action { color: var(--text-on-bright); background: var(--focus); font-weight: 700; }
.primary-action:hover:not(:disabled) { background: var(--focus-hover); }
.primary-action:focus-visible { outline-color: var(--action); }
button:disabled { cursor: not-allowed; opacity: 0.48; }

.desk-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.desk-rail {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
  background: var(--paper-deep);
}

.rail-nav { display: grid; border-bottom: 1px solid var(--rule); }
.rail-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.rail-nav a:hover { color: var(--ink); background: var(--paper-bright); }
.rail-nav a.is-active { color: var(--text-primary); background: var(--action-selected); }
.rail-nav small { font-family: var(--font-data); font-size: 10px; opacity: 0.66; }

.rail-source { padding: 24px 18px; }
.rail-source h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.rail-source dl { margin: 0; display: grid; }
.rail-source dl div { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--rule); }
.rail-source dt { color: var(--ink-soft); font-family: var(--font-data); font-size: 11px; }
.rail-source dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.rail-caveat { margin: auto 18px 18px; padding-top: 16px; border-top: 1px solid var(--rule-dark); color: var(--ink-soft); font-size: 11px; line-height: 1.55; }

main { min-width: 0; padding: 30px clamp(22px, 3vw, 46px) 72px; }

.control-deck {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(580px, 1.6fr);
  gap: 26px 42px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--border-strong);
}

.title-block h1,
.section-heading h2,
.panel-header h2,
.signal-ticket h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.018em;
}

.title-block h1 { margin: 0; font-size: clamp(34px, 4vw, 58px); line-height: 0.94; }
.title-block p { max-width: 46ch; margin: 10px 0 0; color: var(--ink-soft); }

.filter-register {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  align-self: end;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.filter-register label { display: grid; gap: 4px; min-width: 0; padding: 9px 12px 10px; border-right: 1px solid var(--rule); }
.filter-register label:last-child { border-right: 0; }
.filter-register span { color: var(--ink-soft); font-family: var(--font-data); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-register select {
  width: 100%;
  min-width: 0;
  padding: 3px 24px 3px 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 650;
  cursor: pointer;
}
.filter-register select option { color: var(--text-primary); background: var(--surface-panel); }

.source-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  color: var(--warning-text);
  background: var(--warning-surface);
  border-top: 1px solid var(--warning-border);
  border-bottom: 1px solid var(--warning-border);
}
.source-banner[hidden] { display: none; }
.source-banner svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: 0 0 auto; }
.source-banner div { display: grid; gap: 2px; }
.source-banner span { color: #d8bd86; font-size: 12px; }

.period-register { grid-column: 1 / -1; display: grid; grid-template-columns: 150px 1fr; align-items: stretch; margin-top: -4px; }
.period-register-label { display: grid; align-content: center; gap: 2px; padding: 8px 12px; color: var(--text-primary); background: var(--surface-header); }
.period-register-label span { color: var(--text-secondary); font-family: var(--font-data); font-size: 10px; text-transform: uppercase; }
.period-register-label strong { font-family: var(--font-data); font-size: 14px; }
.period-register-label small { display: none; color: var(--text-secondary); font-size: 9px; }
.period-rail { display: grid; grid-template-columns: repeat(12, minmax(44px, 1fr)); overflow-x: auto; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.period-rail button {
  min-width: 46px;
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--rule);
  color: var(--ink-soft);
  background: var(--paper-bright);
  font-family: var(--font-data);
  font-size: 10px;
  cursor: pointer;
}
.period-rail button:hover { color: var(--ink); background: var(--indigo-open); }
.period-rail button[aria-selected="true"] { color: var(--text-primary); background: var(--action-selected); font-weight: 700; }

.loading-state,
.error-state { margin: 42px 0; padding: 26px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.loading-state p { margin: 12px 0 0; color: var(--ink-soft); }
.loading-rule { width: 46%; height: 4px; background: var(--indigo); transform-origin: left; animation: loading-scan 1.8s ease-in-out infinite alternate; }
@keyframes loading-scan { from { transform: scaleX(0.12); } to { transform: scaleX(1); } }
.error-state { grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; color: var(--negative); }
.error-state:not([hidden]) { display: grid; }
.error-state svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.error-state div { display: grid; gap: 2px; }
.error-state span { font-size: 13px; }
.error-state button { padding: 9px 14px; border: 1px solid currentColor; color: inherit; background: transparent; cursor: pointer; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.metric-strip article { min-width: 0; min-height: 112px; padding: 16px 18px 14px; border-right: 1px solid var(--rule); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip span { display: block; color: var(--ink-soft); font-size: 12px; }
.metric-strip strong { display: block; margin-top: 8px; font-family: var(--font-data); font-size: clamp(23px, 2.2vw, 35px); font-weight: 650; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-strip small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 10px; }
.metric-strip strong[data-direction="up"] { color: var(--indigo); }
.metric-strip strong[data-direction="down"] { color: var(--coral); }

.pulse-grid,
.comparison-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 0.85fr); gap: 24px; margin-top: 24px; }
.comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px; }

.ledger-panel { min-width: 0; background: var(--surface-panel); border-top: 2px solid var(--border-strong); border-bottom: 1px solid var(--rule-dark); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 20px 13px; border-bottom: 1px solid var(--rule); }
.panel-header h2 { margin: 0; font-size: 23px; line-height: 1; }
.panel-header p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; }
.source-stamp { flex: 0 0 auto; padding: 5px 9px 4px; color: var(--action); background: var(--action-wash); font-family: var(--font-data); font-size: 9px; font-weight: 700; letter-spacing: 0.05em; clip-path: polygon(0 0, 100% 0, 100% 74%, 92% 100%, 0 100%); }
.chart-frame { min-height: 310px; padding: 12px 16px 8px; overflow: hidden; }
.chart-frame svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-frame .grid-line { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart-frame .axis-line { stroke: var(--chart-axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart-frame .axis-label { fill: var(--chart-label); font-family: var(--font-data); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-frame .series-line { fill: none; stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-frame .series-point { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-frame .series-primary { stroke: var(--indigo); }
.chart-frame .series-secondary { stroke: var(--gold-dark); stroke-dasharray: 6 4; }
.chart-frame .series-tertiary { stroke: var(--olive); stroke-dasharray: 2 4; }
.chart-frame .point-primary { fill: var(--surface-panel); stroke: var(--indigo); }
.chart-frame .point-secondary { fill: var(--gold-open); stroke: var(--gold-dark); }
.chart-frame .point-tertiary { fill: var(--surface-panel); stroke: var(--olive); }
.chart-frame .chart-label { fill: var(--ink); font-family: var(--font-ui); font-size: 11px; font-weight: 650; }
.chart-frame .chart-label-data { fill: var(--ink); font-family: var(--font-data); font-size: 10px; font-weight: 650; }
.chart-frame .bar-base { fill: var(--indigo-open); }
.chart-frame .bar-fill { fill: var(--indigo); }
.chart-frame .bar-selected { fill: var(--gold); stroke: var(--gold-dark); stroke-width: 1; }
.chart-frame .zero-line { stroke: var(--rule-dark); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-frame .series-line.is-animated { stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: draw-register 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes draw-register { to { stroke-dashoffset: 0; } }

.empty-chart { display: grid; place-items: center; min-height: 280px; color: var(--ink-soft); text-align: center; }
.empty-chart strong { display: block; color: var(--ink); }
.empty-chart span { display: block; max-width: 42ch; margin-top: 4px; font-size: 12px; }

.chart-data { border-top: 1px solid var(--rule); }
.chart-data summary { padding: 10px 18px; color: var(--ink-soft); font-size: 11px; cursor: pointer; }
.chart-data summary:hover { color: var(--ink); background: var(--paper-deep); }
.chart-data > div { max-height: 260px; overflow: auto; border-top: 1px solid var(--rule); }
.chart-data table { width: 100%; border-collapse: collapse; font-size: 11px; }
.chart-data th,
.chart-data td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.chart-data th:first-child,
.chart-data td:first-child { text-align: left; }

.signal-ticket {
  align-self: start;
  min-width: 0;
  color: var(--text-primary);
  background: var(--surface-signal);
  box-shadow: var(--shadow-soft);
}
.signal-ticket > header { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid #416184; }
.signal-ticket h2 { margin: 0; font-size: 23px; }
.signal-ticket header span { color: #b7c8df; font-family: var(--font-data); font-size: 10px; }
.signal-list { display: grid; }
.signal-item { display: grid; grid-template-columns: 68px 1fr; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #416184; }
.signal-item .signal-level { font-family: var(--font-data); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; }
.signal-item[data-severity="high"] .signal-level { color: #ffc0b8; }
.signal-item[data-severity="medium"] .signal-level { color: #f5d893; }
.signal-item[data-severity="data"] .signal-level { color: #c6b5ee; }
.signal-item[data-severity="info"] .signal-level { color: #b9cce6; }
.signal-item strong { display: block; font-size: 13px; }
.signal-item p { margin: 5px 0 0; color: #d7e0eb; font-size: 11px; line-height: 1.5; }
.ticket-footnote { margin: 0; padding: 14px 20px 18px; color: #aebed1; font-size: 10px; }

.season-panel { margin-top: 36px; }
.season-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.season-summary article { min-width: 0; padding: 13px 18px 12px; border-right: 1px solid var(--rule); }
.season-summary article:last-child { border-right: 0; }
.season-summary span { display: block; color: var(--ink-soft); font-size: 10px; }
.season-summary strong { display: block; margin-top: 5px; font-family: var(--font-data); font-size: clamp(13px, 4.6vw, 23px); font-variant-numeric: tabular-nums; }
.season-summary small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 9px; }
.season-summary strong[data-direction="up"] { color: var(--indigo); }
.season-summary strong[data-direction="down"] { color: var(--coral); }
.season-chart { min-height: 286px; }
.season-method { margin: 0; padding: 10px 18px 12px; color: var(--ink-soft); border-top: 1px solid var(--rule); font-size: 10px; line-height: 1.5; }

.balance-panel { margin-top: 36px; }
.balance-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 0.7fr); }
.balance-layout .chart-frame { border-right: 1px solid var(--rule); }
.balance-register { display: grid; align-content: start; padding: 16px 18px; }
.balance-register h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 18px; }
.balance-block + .balance-block { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--border-strong); }
.balance-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.balance-row span { color: var(--ink-soft); font-size: 11px; }
.balance-row strong { font-family: var(--font-data); font-size: 13px; font-variant-numeric: tabular-nums; }
.balance-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }

.market-register,
.trust-register { margin-top: 50px; border-top: 2px solid var(--border-strong); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 18px 0 14px; }
.section-heading h2 { margin: 0; font-size: 28px; line-height: 1; }
.section-heading p { margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; }
.score-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 470px; }
.score-key span { padding: 4px 7px; color: var(--ink-soft); border: 1px solid var(--rule); font-family: var(--font-data); font-size: 9px; }

.table-scroll { overflow-x: auto; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.opportunity-table { width: 100%; min-width: 930px; border-collapse: collapse; background: var(--paper-bright); }
.opportunity-table th { padding: 10px 12px; color: var(--ink-soft); background: var(--paper-deep); font-family: var(--font-data); font-size: 9px; font-weight: 600; text-align: right; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border-strong); }
.opportunity-table th:nth-child(1), .opportunity-table th:nth-child(2),
.opportunity-table td:nth-child(1), .opportunity-table td:nth-child(2) { text-align: left; }
.opportunity-table td { padding: 12px; text-align: right; border-bottom: 1px solid var(--rule); font-size: 12px; font-variant-numeric: tabular-nums; }
.opportunity-table tr:last-child td { border-bottom: 0; }
.opportunity-table tbody tr { cursor: pointer; }
.opportunity-table tbody tr:hover { background: var(--indigo-open); }
.opportunity-table tbody tr[aria-current="true"] { background: var(--gold-open); }
.rank-cell { color: var(--ink-soft); font-family: var(--font-data); }
.market-name { font-weight: 700; }
.market-open { display: block; width: 100%; padding: 0; color: inherit; background: transparent; border: 0; font-weight: 700; text-align: left; cursor: pointer; }
.market-open:hover span { text-decoration: underline; text-underline-offset: 3px; }
.market-open small { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 400; }
.mobile-market-details { display: none; }
.score-cell { min-width: 150px; }
.score-wrap { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 8px; }
.score-wrap strong { font-family: var(--font-data); }
.score-rail { display: block; width: 100%; height: 6px; }
.score-rail-base { fill: var(--paper-deep); }
.score-rail-fill { fill: var(--indigo); }
.confidence { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-data); font-size: 10px; }
.confidence::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; }
.confidence[data-level="high"]::before { background: currentColor; }
.confidence[data-level="medium"]::before { box-shadow: inset 0 0 0 2px var(--paper-bright); background: currentColor; }
.opportunity-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; }
.opportunity-footer button { min-height: 36px; padding: 6px 10px; border: 1px solid var(--border-strong); color: var(--action); background: var(--surface-panel); font-weight: 650; cursor: pointer; }
.opportunity-footer button:hover { color: var(--text-primary); background: var(--action-wash); }
.opportunity-footer button[hidden] { display: none; }

.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); background: var(--paper-bright); }
.trust-cell { min-height: 128px; padding: 16px; border-right: 1px solid var(--rule); }
.trust-cell:last-child { border-right: 0; }
.trust-cell span { display: block; color: var(--ink-soft); font-size: 11px; }
.trust-cell strong { display: block; margin-top: 8px; font-family: var(--font-data); font-size: 20px; }
.trust-cell p { margin: 8px 0 0; color: var(--ink-soft); font-size: 10px; }
.method-notes { display: grid; grid-template-columns: 190px 1fr; gap: 28px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.method-notes h3 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.method-notes ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 11px; columns: 2; column-gap: 36px; }
.method-notes li { break-inside: avoid; margin-bottom: 8px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 16px;
  color: var(--text-primary);
  background: var(--surface-header);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
}

.toast[hidden] { display: none; }

@media (max-width: 1180px) {
  .desk-layout { grid-template-columns: 188px minmax(0, 1fr); }
  .filter-register { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .filter-register label:nth-child(2) { border-right: 0; }
  .filter-register label:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .metric-strip { grid-template-columns: repeat(3, 1fr); }
  .metric-strip article:nth-child(3) { border-right: 0; }
  .metric-strip article:nth-child(-n + 3) { border-bottom: 1px solid var(--rule); }
  .pulse-grid { grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.85fr); }
  .balance-layout { grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr); }
}

@media (max-width: 900px) {
  .desk-header { grid-template-columns: 1fr auto; }
  .header-status { display: none; }
  .text-action { display: inline-flex; }
  .desk-layout { display: block; }
  .desk-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .rail-nav { grid-template-columns: repeat(5, 1fr); overflow-x: auto; }
  .rail-nav a { min-width: 110px; border-right: 1px solid var(--rule); border-bottom: 0; }
  .rail-source,
  .rail-caveat { display: none; }
  .control-deck { grid-template-columns: 1fr; }
  .pulse-grid,
  .comparison-grid { grid-template-columns: 1fr; }
  .season-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-summary article:nth-child(2) { border-right: 0; }
  .season-summary article:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .signal-ticket { order: -1; box-shadow: none; }
  .balance-layout { grid-template-columns: 1fr; }
  .balance-layout .chart-frame { border-right: 0; border-bottom: 1px solid var(--rule); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-cell:nth-child(2) { border-right: 0; }
  .trust-cell:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 620px) {
  main,
  section[id] { scroll-margin-top: 76px; }

  .desk-header { min-height: 64px; }
  .brand-lockup { padding: 10px 14px; border-right: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-lockup strong { font-size: 17px; }
  .header-actions button { justify-content: center; min-width: 48px; padding: 0 13px !important; }
  .header-actions .button-label { display: none; }
  .desk-rail { top: 64px; }
  .rail-nav a { min-width: 98px; padding: 0 12px; }
  main { padding: 24px 14px 54px; }
  .title-block h1 { font-size: 42px; }
  .filter-register { grid-template-columns: 1fr; }
  .filter-register label { border-right: 0; border-bottom: 1px solid var(--rule); }
  .filter-register label:last-child { border-bottom: 0; }
  .period-register { grid-template-columns: 104px 1fr; }
  .period-rail { grid-template-columns: repeat(12, 52px); }
  .period-register-label small { display: block; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip article,
  .metric-strip article:nth-child(3) { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .metric-strip article:nth-child(even) { border-right: 0; }
  .metric-strip article:last-child { border-bottom: 0; }
  .metric-strip strong { font-size: 25px; }
  .panel-header { padding: 14px 14px 11px; }
  .panel-header h2 { font-size: 20px; }
  .chart-frame { min-height: 270px; padding: 8px 4px 4px; overflow: hidden; }
  .chart-frame svg { min-width: 0; }
  .section-heading { display: grid; }
  .score-key { justify-content: flex-start; }
  .table-scroll { overflow-x: auto; }
  .opportunity-table { min-width: 760px; table-layout: auto; }
  .opportunity-table th,
  .opportunity-table td { padding: 9px 8px; font-size: 11px; white-space: nowrap; }
  .opportunity-table th { padding: 9px 8px; font-size: 9px; letter-spacing: 0.04em; }
  .opportunity-table th:nth-child(2) { min-width: 120px; }
  .score-cell { min-width: 138px; }
  .score-wrap { grid-template-columns: 36px 1fr; gap: 6px; }
  .confidence { gap: 3px; font-size: 10px; }
  .confidence::before { width: 6px; height: 6px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-cell,
  .trust-cell:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--rule); }
  .method-notes { grid-template-columns: 1fr; }
  .method-notes ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
