:root {
  color-scheme: light;
  color: #1c2227;
  background: #e9edf0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #e9edf0;
  --surface: #f7f8f9;
  --surface-strong: #ffffff;
  --surface-muted: #eef1f3;
  --ink: #1c2227;
  --text-soft: #34414a;
  --muted: #65717a;
  --line: #cbd2d7;
  --line-strong: #aeb8bf;
  --header: #20262b;
  --header-ink: #f7f9fa;
  --green: #087b52;
  --green-soft: #dcefe7;
  --red: #b33f3f;
  --red-soft: #f5e2e2;
  --amber: #986710;
  --amber-soft: #f5ead3;
  --blue: #256aa6;
  --blue-soft: #dfeaf5;
  --focus: #1475b8;
  --scroll-track: #dde3e7;
  --scroll-thumb: #87949d;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  color: #e6eaed;
  background: #15191c;
  --bg: #15191c;
  --surface: #1c2125;
  --surface-strong: #23292e;
  --surface-muted: #191e22;
  --ink: #e6eaed;
  --text-soft: #c5cdd2;
  --muted: #9ca8b0;
  --line: #363e44;
  --line-strong: #505b63;
  --header: #0e1113;
  --header-ink: #f3f6f7;
  --green: #4ec592;
  --green-soft: #17372b;
  --red: #ef7b76;
  --red-soft: #422326;
  --amber: #e3b653;
  --amber-soft: #3d321c;
  --blue: #71aee0;
  --blue-soft: #1c3347;
  --focus: #6bb8ec;
  --scroll-track: #20262a;
  --scroll-thumb: #5c6870;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    color: #e6eaed;
    background: #15191c;
    --bg: #15191c;
    --surface: #1c2125;
    --surface-strong: #23292e;
    --surface-muted: #191e22;
    --ink: #e6eaed;
    --text-soft: #c5cdd2;
    --muted: #9ca8b0;
    --line: #363e44;
    --line-strong: #505b63;
    --header: #0e1113;
    --header-ink: #f3f6f7;
    --green: #4ec592;
    --green-soft: #17372b;
    --red: #ef7b76;
    --red-soft: #422326;
    --amber: #e3b653;
    --amber-soft: #3d321c;
    --blue: #71aee0;
    --blue-soft: #1c3347;
    --focus: #6bb8ec;
    --scroll-track: #20262a;
    --scroll-thumb: #5c6870;
  }
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}
button, input { font: inherit; }
button, h1, h2, p { letter-spacing: 0; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(1660px, calc(100% - 28px));
  margin-inline: auto;
}

.command-bar {
  border-bottom: 1px solid #080a0b;
  background: var(--header);
  color: var(--header-ink);
}

.command-inner {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--header-ink);
  text-decoration: none;
}

.brand-media {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #566067;
  border-radius: 4px;
  object-fit: cover;
}

.brand-copy { display: block; min-width: 0; }
.brand-copy strong { display: block; font-size: 14px; line-height: 1.2; }
.brand-copy span {
  display: block;
  margin-top: 3px;
  color: #9facb4;
  font-size: 9px;
  font-weight: 750;
}

.command-status {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c9d2d7;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.system-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.system-state.healthy .system-dot { background: #4ed095; }
.system-state.standby .system-dot { background: var(--blue); }
.system-state.fault .system-dot { background: #f06e68; }

.snapshot-age {
  color: #9facb4;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.command-link {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid #4c565d;
  border-radius: 3px;
  color: #d7dfe3;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.command-link:hover { border-color: #81909a; color: #ffffff; }

.theme-control, .segments {
  display: inline-flex;
  padding: 2px;
  border: 1px solid #4c565d;
  border-radius: 4px;
  background: #15191c;
}

.theme-control button {
  min-width: 52px;
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #9facb4;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.theme-control button:hover { color: #ffffff; }
.theme-control button[aria-pressed="true"] { background: #394249; color: #ffffff; }

.workspace-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  backdrop-filter: blur(10px);
}

.workspace-tabs {
  display: flex;
  min-height: 43px;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar { display: none; }

.workspace-tab {
  position: relative;
  flex: 0 0 auto;
  min-width: 104px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.workspace-tab::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  background: transparent;
  content: "";
}

.workspace-tab:hover { color: var(--ink); }
.workspace-tab.active { color: var(--ink); }
.workspace-tab.active::after { background: var(--blue); }

button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.workspace { min-height: calc(100vh - 102px); padding: 14px 0 34px; }

.standby-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 14px;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--blue) 45%, var(--line-strong));
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--blue-soft) 96%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 92%, var(--blue-soft)), var(--surface-strong));
  box-shadow: 0 18px 42px color-mix(in srgb, #000 10%, transparent);
}
.standby-hero-copy { min-width: 0; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-kicker::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.standby-hero h1 {
  max-width: 920px;
  margin: 8px 0 0;
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.standby-hero p {
  max-width: 820px;
  margin: 11px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
}
.standby-hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}
.standby-hero-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
}
.standby-hero-stats dt {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
  text-transform: uppercase;
}
.standby-hero-stats dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
}

.kpi-strip {
  display: grid;
  grid-template-columns: minmax(410px, 1.7fr) minmax(230px, 0.8fr) minmax(230px, 0.8fr);
  align-items: stretch;
  gap: 10px;
}

.overview-panel {
  min-width: 0;
  min-height: 218px;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-strong);
}

.overview-heading {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.feed-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  white-space: nowrap;
}
.feed-state::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.feed-state.good { color: var(--green); }
.feed-state.degraded { color: var(--amber); }
.feed-state.waiting { color: var(--blue); }

.market-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-top: 9px;
}
.market-summary > div { min-width: 0; }
.market-summary > div > strong { display: block; font-size: 17px; line-height: 1.2; }
.market-summary p {
  max-width: 620px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.market-read.risk .market-summary > div > strong,
.market-read.developing .market-summary > div > strong { color: var(--amber); }
.market-read.confirmed .market-summary > div > strong { color: var(--blue); }
.market-read.ended .market-summary > div > strong { color: var(--green); }

.market-price { min-width: 92px; text-align: right; }
.market-price span { display: block; color: var(--muted); font-size: 8px; font-weight: 760; }
.market-price strong { display: block; margin-top: 4px; font-size: 16px; font-variant-numeric: tabular-nums; }

.level-ii-brief {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.level-ii-heading, .depth-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.level-ii-heading span { color: var(--muted); font-size: 9px; font-weight: 760; text-transform: uppercase; }
.level-ii-heading strong { font-size: 12px; }
.level-ii-heading strong.waiting { color: var(--blue); }

.depth-balance {
  display: flex;
  width: 100%;
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface-muted);
}
.depth-bid, .depth-ask { display: block; height: 100%; transition: width 180ms ease; }
.depth-bid { width: 50%; background: var(--green); }
.depth-ask { width: 50%; background: var(--red); }
.depth-labels { margin-top: 4px; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.level-ii-summary { margin: 7px 0 0; color: var(--text-soft); font-size: 11px; line-height: 1.35; }
.level-ii-facts, .overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 9px 0 0;
}
.level-ii-facts div, .overview-stats div { min-width: 0; padding-right: 8px; border-right: 1px solid var(--line); }
.level-ii-facts div:last-child, .overview-stats div:last-child { padding-right: 0; border-right: 0; }
.level-ii-facts dt, .overview-stats dt { color: var(--muted); font-size: 8px; font-weight: 760; text-transform: uppercase; }
.level-ii-facts dd, .overview-stats dd {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-primary { margin-top: 15px; }
.overview-primary strong { display: block; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.overview-primary span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.trading-overview .overview-stats { margin-top: 19px; }
.overview-action {
  width: 100%;
  min-height: 31px;
  margin-top: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}
.overview-action:hover { border-color: var(--blue); color: var(--blue); }
.overview-action:disabled { cursor: default; opacity: 0.55; }

.fleet-overview.market-standby {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line-strong));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 62%, transparent), transparent 48%),
    var(--surface-strong);
}
.fleet-overview.needs-review {
  border-color: color-mix(in srgb, var(--red) 46%, var(--line-strong));
}
.fleet-ready-summary { margin-top: 18px; }
.fleet-ready-summary strong { display: block; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.fleet-ready-summary span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.fleet-ready-track {
  height: 7px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface-muted);
}
.fleet-ready-track span { display: block; width: 0; height: 100%; background: var(--green); transition: width 180ms ease; }
.fleet-plain-note {
  min-height: 45px;
  margin: 12px 0 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line));
  border-radius: 4px;
  background: color-mix(in srgb, var(--blue-soft) 68%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}
.fleet-overview-stats { margin-top: 22px; }
.overview-heading .waiting, .overview-heading .standby { color: var(--blue); }

.dashboard-view { min-height: 540px; }

.page-bar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 2px 10px;
}

.page-bar h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 730;
}

.page-context, .page-count {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.page-context { display: block; margin-top: 4px; }
.page-count { white-space: nowrap; }

.mode-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--green);
  border-radius: 3px;
  color: var(--green);
  font-size: 9px;
  font-weight: 780;
  text-transform: uppercase;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.ops-pane {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.pane-heading {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.pane-heading h2 { margin: 0; font-size: 11px; font-weight: 780; text-transform: uppercase; }
.pane-heading span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }

.fleet-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  min-width: 0;
}

.overview-live-board {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  overflow-x: auto;
}

.fleet-pane { overflow-x: auto; }

.fleet-cell {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fleet-cell:last-child { border-right: 0; }

.fleet-cell-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fleet-cell-heading strong { font-size: 12px; }
.fleet-health {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}
.fleet-health::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.fleet-health.waiting, .fleet-health.standby { color: var(--blue); }
.fleet-health.attention { color: var(--amber); }
.fleet-health.fault { color: var(--red); }

.fleet-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}
.fleet-stats div { min-width: 0; }
.fleet-stats span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.fleet-stats strong { display: block; margin-top: 3px; font-size: 14px; font-variant-numeric: tabular-nums; }

.catalog-note {
  margin: 0;
  padding: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.overview-live-column {
  min-width: 0;
  min-height: 202px;
  padding: 10px;
  border-right: 1px solid var(--line);
}
.overview-live-column:last-child { border-right: 0; }
.overview-live-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.overview-live-heading strong { font-size: 10px; text-transform: uppercase; }
.overview-live-heading span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.overview-live-column .trade-card { margin-top: 8px; }

.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.system-grid div { min-height: 67px; padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.system-grid div:nth-child(2n) { border-right: 0; }
.system-grid div:nth-last-child(-n + 2) { border-bottom: 0; }
.system-grid dt { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.system-grid dd { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 720; }

.compact-table, .compact-ranking { min-height: 202px; }
.compact-row {
  display: grid;
  min-height: 40px;
  grid-template-columns: 74px minmax(0, 1fr) 84px 72px;
  align-items: center;
  gap: 9px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
}
.compact-row:last-child { border-bottom: 0; }
.compact-row time, .compact-row .compact-fleet { color: var(--muted); font-size: 9px; }
.compact-row strong { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-row .compact-result { font-size: 10px; font-weight: 760; font-variant-numeric: tabular-nums; text-align: right; }

.broker-truth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.activity-fleet-filter select {
  min-width: 132px;
  min-height: 31px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}
.activity-segments {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-muted);
}
.activity-segments button {
  min-width: 48px;
  min-height: 25px;
  padding: 0 7px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 760;
}
.activity-segments button:hover { color: var(--ink); }
.activity-segments button.active { background: var(--surface-strong); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

.page-action {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.page-action:hover { border-color: var(--blue); color: var(--blue); }

.activity-pane { min-width: 0; overflow: hidden; }

.activity-grid {
  display: grid;
  grid-template-columns: 72px minmax(250px, 1fr) minmax(170px, 0.55fr) minmax(180px, 0.48fr);
  align-items: center;
  gap: 14px;
}

.activity-header {
  min-height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--header);
  color: #aeb8bf;
  font-size: 9px;
  font-weight: 780;
  text-transform: uppercase;
}

.activity-feed { background: var(--surface); }

.activity-day { margin: 0; }

.activity-date {
  position: sticky;
  z-index: 3;
  top: 43px;
  min-height: 34px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-muted);
  font-size: 10px;
  font-weight: 800;
}

.activity-row {
  position: relative;
  min-height: 60px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}
.activity-row.has-explanation { min-height: 82px; }

.activity-row::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--line-strong);
  content: "";
}

.activity-row.open::before { background: var(--amber); }
.activity-row.positive::before { background: var(--green); }
.activity-row.negative::before { background: var(--red); }
.activity-row:last-child { border-bottom: 0; }

.trade-link {
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}
.activity-row.trade-link:hover,
.activity-row.trade-link:focus-visible { background: var(--blue-soft); }
.activity-row.trade-link:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }

.activity-time {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.activity-bot, .activity-position, .activity-outcome { min-width: 0; }
.activity-bot strong, .activity-position strong, .activity-outcome strong { display: block; }
.activity-bot strong { overflow-wrap: anywhere; font-size: 13px; }
.activity-bot span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-position strong { font-size: 11px; text-transform: capitalize; }
.activity-position span, .activity-outcome > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.activity-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 820;
}

.activity-state::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.activity-state.open { color: var(--amber); }
.activity-state.open::before { background: var(--amber); }
.activity-state.positive { color: var(--green); }
.activity-state.positive::before { background: var(--green); }
.activity-state.negative { color: var(--red); }
.activity-state.negative::before { background: var(--red); }

.activity-outcome { text-align: right; }
.activity-outcome-heading { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.activity-outcome strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.activity-outcome > span { font-variant-numeric: tabular-nums; white-space: nowrap; }

.activity-explanation {
  grid-column: 2 / -1;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}
.activity-explanation strong {
  display: block;
  color: var(--text-soft);
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.activity-explanation.attention strong { color: var(--red); }
.activity-explanation.exiting strong { color: var(--green); }

.activity-sentinel { height: 2px; }

.activity-footer {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-top: 1px solid var(--line-strong);
  background: var(--surface-muted);
}

.activity-footer span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.activity-footer button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}
.activity-footer button:hover { border-color: var(--blue); color: var(--blue); }

.open-now-pane {
  position: sticky;
  top: 57px;
  max-height: calc(100vh - 72px);
  overflow: hidden;
}

.open-now-list {
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

.open-trade-row {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}
.open-trade-row:last-child { border-bottom: 0; }
.open-trade-row.trade-link:hover,
.open-trade-row.trade-link:focus-visible { background: var(--blue-soft); }
.open-trade-row.trade-link:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.open-trade-heading, .open-trade-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.open-trade-heading strong { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.open-trade-state { color: var(--amber); font-size: 8px; font-weight: 820; }
.open-trade-summary { margin-top: 7px; }
.open-trade-summary strong { display: block; font-size: 11px; }
.open-trade-summary span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.open-trade-explanation {
  margin-top: 8px;
  padding: 7px 8px;
  border-left: 2px solid var(--amber);
  background: var(--surface-muted);
}
.open-trade-explanation strong { display: block; color: var(--text-soft); font-size: 9px; line-height: 1.35; }
.open-trade-explanation.attention { border-left-color: var(--red); }
.open-trade-explanation.attention strong { color: var(--red); }
.open-trade-explanation.exiting { border-left-color: var(--green); }
.open-trade-explanation.exiting strong { color: var(--green); }
.open-trade-footer { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.broker-truth-grid h3 { margin: 0 0 8px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.broker-truth-row { grid-template-columns: minmax(120px, 1fr) minmax(90px, auto) minmax(110px, auto); }

.compact-rank-row {
  display: grid;
  min-height: 40px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-bottom: 1px solid var(--line);
}
.compact-rank-row:last-child { border-bottom: 0; }
.compact-rank-number { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.compact-rank-bot { min-width: 0; }
.compact-rank-bot strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-rank-bot span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.compact-rate { color: var(--green); font-size: 11px; font-weight: 780; font-variant-numeric: tabular-nums; }
.compact-rate.low { color: var(--red); }

.empty-inline {
  display: grid;
  min-height: 90px;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.leaderboard-header, .leaderboard-row {
  display: grid;
  grid-template-columns: 54px minmax(260px, 1fr) 90px 80px 90px 90px 110px;
  align-items: center;
  gap: 12px;
}

.leaderboard-header, .catalog-header {
  min-width: 960px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 8px;
  font-weight: 780;
  text-transform: uppercase;
}

.leaderboard-list, .strategy-list, .narrative-list {
  min-width: 960px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  background: var(--surface);
}

[data-view-panel="winners"], [data-view-panel="losers"], [data-view-panel="roster"] { overflow-x: auto; }

.leaderboard-row {
  min-height: 52px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
}
.leaderboard-row:last-child { border-bottom: 0; }
.rank-medallion {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-strong);
  font-size: 9px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}
.winner-row .rank-medallion { border-color: var(--green); color: var(--green); }
.loser-row .rank-medallion { border-color: var(--red); color: var(--red); }
.leaderboard-name { min-width: 0; }
.leaderboard-name strong { display: block; overflow-wrap: anywhere; font-size: 11px; }
.leaderboard-name span { display: block; margin-top: 2px; color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }
.leaderboard-cell { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.leaderboard-rate { color: var(--green); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.loser-row .leaderboard-rate { color: var(--red); }
.leaderboard-result { font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }

.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }

.trade-board-scroll {
  --fleet-width: 292px;
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-muted);
  overscroll-behavior: contain;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}
.live-board-scroll { max-height: calc(100vh - 240px); min-height: 380px; }
.past-board-scroll { height: calc(100vh - 236px); min-height: 480px; }
.trade-board-canvas { width: max-content; min-width: 100%; }
.fleet-trade-grid {
  display: grid;
  width: max-content;
  min-width: 100%;
  grid-template-columns: repeat(5, minmax(var(--fleet-width), 1fr));
}
.fleet-header-grid {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #080a0b;
  background: var(--header);
  color: var(--header-ink);
}
.past-board-scroll .fleet-header-grid { position: sticky; top: 0; z-index: 4; }
.fleet-heading {
  display: flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-right: 1px solid #444d53;
}
.fleet-heading:last-child { border-right: 0; }
.fleet-heading strong { font-size: 10px; text-transform: uppercase; }
.fleet-heading span { color: #9facb4; font-size: 8px; font-variant-numeric: tabular-nums; }
.fleet-trade-cell {
  display: grid;
  min-width: 0;
  min-height: 104px;
  align-content: start;
  gap: 7px;
  padding: 8px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.fleet-trade-cell:last-child { border-right: 0; }
.live-fleet-cell { min-height: 330px; }
.trade-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 3px;
  background: var(--surface-strong);
}
.trade-card.win-trade-card { border-left-color: var(--green); }
.trade-card.loss-trade-card { border-left-color: var(--red); }
.trade-card.live-trade-card { border-left-color: var(--amber); }
.trade-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.trade-bot-name { min-width: 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.3; }
.trade-result { font-size: 9px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-result.live { color: var(--amber); }
.trade-result.win { color: var(--green); }
.trade-result.loss { color: var(--red); }
.trade-card-summary { margin: 6px 0 0; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; text-transform: capitalize; }
.trade-prices {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 9px;
  margin: 7px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.trade-price-label, .trade-price-value { margin: 0; font-size: 8px; }
.trade-price-label { color: var(--muted); }
.trade-price-value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.trade-card-time { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.no-live-trade, .empty-trade-cell { align-self: center; justify-self: center; color: var(--muted); font-size: 9px; }
.no-live-trade { margin-top: 94px; }
.trade-date-block { min-width: 100%; }
.trade-date-band {
  position: sticky;
  z-index: 3;
  top: 50px;
  min-height: 34px;
  border-block: 1px solid var(--line-strong);
  background: var(--surface-muted);
}
.trade-date-label {
  position: sticky;
  left: 10px;
  width: max-content;
  margin: 0;
  padding: 9px 2px;
  font-size: 9px;
  font-weight: 780;
}
.history-sentinel { width: 100%; height: 2px; }
.history-status { margin: 7px 0 0; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; }
.trade-board-empty { width: 100vw; max-width: 520px; margin: 0; padding: 50px 16px; color: var(--muted); font-size: 10px; text-align: center; }

.roster-page-bar { align-items: flex-end; }
.catalog-tools { display: flex; align-items: center; gap: 8px; }
.search-field { width: min(300px, 42vw); }
.search-field input {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 10px;
  outline: 0;
}
.segments { border-color: var(--line-strong); background: var(--surface-muted); }
.segment {
  min-width: 60px;
  min-height: 26px;
  padding: 0 7px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 720;
}
.segment.active { background: var(--header); color: var(--header-ink); }
.catalog-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 84px 100px 130px 80px 110px;
  align-items: center;
  gap: 12px;
}
.strategy-item {
  min-height: 52px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
}
.strategy-item:last-child { border-bottom: 0; }
.strategy-identity { min-width: 0; }
.strategy-name { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 720; }
.strategy-key { display: block; margin-top: 2px; overflow-wrap: anywhere; color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }
.state-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: capitalize;
}
.state-label::before { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); content: ""; }
.state-label.paper::before, .state-label.ready::before, .state-label.paper-ready-armed::before,
.state-label.live-ready-armed::before, .state-label.ready-to-observe::before { background: var(--green); }
.state-label.waiting-data::before, .state-label.waiting::before, .state-label.needs-research::before,
.state-label.not-assessed::before, .state-label.monitor-only-by-design::before { background: var(--amber); }
.state-label.quarantined::before, .state-label.blocked::before, .state-label.error::before,
.state-label.fail::before, .state-label.offline::before { background: var(--red); }
.data-cell { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.empty-state { min-width: 960px; padding: 58px 12px; border: 1px solid var(--line-strong); border-top: 0; color: var(--muted); text-align: center; }

.narrative-list { min-width: 0; border-top: 1px solid var(--line-strong); }
.narrative-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}
.narrative-meta { min-width: 0; }
.narrative-bot, .narrative-kind, .narrative-date { display: block; }
.narrative-bot { overflow-wrap: anywhere; font-size: 10px; font-weight: 730; }
.narrative-kind { margin-top: 3px; color: var(--blue); font-size: 8px; font-weight: 780; text-transform: uppercase; }
.narrative-date { margin-top: 3px; color: var(--muted); font-size: 8px; }
.narrative-text { margin: 0; color: var(--ink); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.system-records .narrative-list { max-height: 420px; overflow-y: auto; }

.trade-focus .kpi-strip { display: none; }

.trade-warroom { padding-bottom: 6px; }

.warroom-toolbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.warroom-back {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 760;
}
.warroom-back:hover { border-color: var(--blue); color: var(--blue); }
.warroom-back span:first-child { font-size: 15px; line-height: 1; }

.warroom-reference {
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.warroom-command {
  display: flex;
  min-height: 152px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 24px;
  border: 1px solid #080a0b;
  border-radius: 4px 4px 0 0;
  background: var(--header);
  color: var(--header-ink);
}

.warroom-identity { min-width: 0; }
.warroom-kicker { display: flex; align-items: center; gap: 9px; color: #aeb8bf; font-size: 9px; text-transform: uppercase; }
.warroom-status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #6f7a82;
  border-radius: 3px;
  color: #d5dce0;
  font-size: 8px;
  font-weight: 820;
}
.warroom-status.open { border-color: var(--amber); color: var(--amber); }
.warroom-status.positive { border-color: var(--green); color: var(--green); }
.warroom-status.negative { border-color: var(--red); color: var(--red); }
.warroom-identity h1 { margin: 8px 0 0; color: #ffffff; font-size: 30px; line-height: 1.08; }
.warroom-identity p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 9px 0 0; }
.warroom-identity p strong { font-size: 13px; }
.warroom-identity p span { color: #aeb8bf; font-family: "Cascadia Mono", Consolas, monospace; font-size: 8px; }

.warroom-result {
  min-width: 200px;
  padding-left: 24px;
  border-left: 1px solid #4b555d;
  text-align: right;
}
.warroom-result span { display: block; color: #aeb8bf; font-size: 8px; font-weight: 760; text-transform: uppercase; }
.warroom-result strong { display: block; margin-top: 5px; color: #d5dce0; font-size: 30px; font-variant-numeric: tabular-nums; }
.warroom-result small { display: block; margin-top: 4px; color: #aeb8bf; font-size: 10px; font-variant-numeric: tabular-nums; }
.warroom-result.positive strong, .warroom-result.positive small { color: var(--green); }
.warroom-result.negative strong, .warroom-result.negative small { color: var(--red); }
.warroom-result.open strong, .warroom-result.open small { color: var(--amber); }

.warroom-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 10px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--surface-strong);
}
.warroom-metrics div { min-width: 0; min-height: 67px; padding: 11px 13px; border-right: 1px solid var(--line); }
.warroom-metrics div:last-child { border-right: 0; }
.warroom-metrics dt,
.warroom-record-grid dt,
.warroom-execution dt { color: var(--muted); font-size: 8px; font-weight: 760; text-transform: uppercase; }
.warroom-metrics dd { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 760; font-variant-numeric: tabular-nums; }

.warroom-grid { align-items: stretch; }
.warroom-read { min-height: 172px; padding: 18px; }
.warroom-read p { max-width: 1050px; margin: 0; color: var(--ink); font-size: 15px; font-weight: 620; line-height: 1.65; overflow-wrap: anywhere; }
.warroom-plan { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted) !important; font-size: 11px !important; }

.warroom-record-grid {
  display: grid;
  min-height: 172px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
.warroom-record-grid div { min-width: 0; padding: 17px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.warroom-record-grid div:nth-child(2n) { border-right: 0; }
.warroom-record-grid div:nth-last-child(-n + 2) { border-bottom: 0; }
.warroom-record-grid dd { margin: 8px 0 0; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

.warroom-chart-wrap { min-height: 330px; padding: 12px 14px 14px; }
.warroom-chart { min-height: 244px; }
.warroom-price-svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart-gridline { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--blue-soft); opacity: 0.62; }
.chart-line { fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.warroom-price-svg.positive .chart-line { stroke: var(--green); }
.warroom-price-svg.positive .chart-area { fill: var(--green-soft); }
.warroom-price-svg.negative .chart-line { stroke: var(--red); }
.warroom-price-svg.negative .chart-area { fill: var(--red-soft); }
.warroom-price-svg.open .chart-line { stroke: var(--amber); }
.warroom-price-svg.open .chart-area { fill: var(--amber-soft); }
.chart-marker { stroke: var(--surface-strong); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-marker.entry { fill: var(--blue); }
.chart-marker.exit { fill: var(--ink); }
.warroom-chart-labels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 3px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.warroom-chart-labels span:nth-child(2), .warroom-chart-labels span:nth-child(3) { text-align: center; }
.warroom-chart-labels span:last-child { text-align: right; }
.warroom-chart-empty { display: grid; min-height: 220px; place-items: center; margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.warroom-path-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; border-top: 1px solid var(--line); }
.warroom-path-stats div { min-width: 0; padding: 11px 10px 0 0; }
.warroom-path-stats span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.warroom-path-stats strong { display: block; margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }

.verified-label { color: var(--green) !important; font-weight: 780; text-transform: uppercase; }
.warroom-execution { min-height: 330px; margin: 0; }
.warroom-execution div { min-height: 72px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.warroom-execution div:last-child { border-bottom: 0; }
.warroom-execution dd { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 710; font-variant-numeric: tabular-nums; }

.warroom-timeline { min-height: 120px; }
.warroom-timeline-row {
  display: grid;
  min-height: 68px;
  grid-template-columns: 178px 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}
.warroom-timeline-row:last-child { border-bottom: 0; }
.warroom-timeline-row time { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.timeline-marker { color: var(--blue); font-size: 8px; font-weight: 820; }
.timeline-marker.entry { color: var(--blue); }
.timeline-marker.market { color: var(--amber); }
.timeline-marker.path { color: var(--muted); }
.timeline-marker.exit { color: var(--green); }
.timeline-body { min-width: 0; }
.timeline-body strong { display: block; font-size: 11px; }
.timeline-body p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }

.status-footer { border-top: 1px solid var(--line-strong); background: var(--surface-muted); color: var(--muted); }
.footer-inner { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 18px; font-size: 8px; text-transform: uppercase; }

@media (max-width: 1180px) {
  .span-8, .span-4 { grid-column: span 12; }
  .span-6 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
  .kpi-strip { grid-template-columns: minmax(380px, 1.45fr) repeat(2, minmax(210px, 0.8fr)); }
}

@media (max-width: 980px) {
  .standby-hero { grid-template-columns: 1fr; }
  .standby-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-read { grid-column: 1 / -1; min-height: 0; }
  .warroom-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .warroom-metrics div:nth-child(3) { border-right: 0; }
  .warroom-metrics div:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 780px) {
  .app-shell { width: min(100% - 18px, 1660px); }
  .command-inner { min-height: 98px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
  .command-status { width: 100%; justify-content: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
  .snapshot-age { display: none; }
  .workspace-tab { min-width: 78px; padding-inline: 10px; }
  .workspace { padding-top: 9px; }
  .page-bar { align-items: flex-start; }
  .page-bar h1 { font-size: 19px; }
  .activity-page-bar { flex-direction: column; gap: 9px; }
  .activity-tools { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .activity-tools .page-count { margin-right: auto; }
  .page-actions { align-items: flex-end; flex-direction: column; }
  .span-3 { grid-column: span 12; }
  .broker-truth-grid { grid-template-columns: 1fr; }
  .roster-page-bar { align-items: stretch; flex-direction: column; }
  .catalog-tools { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .segments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .segment { min-width: 0; }
  .activity-header { display: none; }
  .activity-row.activity-grid {
    grid-template-areas:
      "time bot outcome"
      ". position outcome"
      ". explanation explanation";
    grid-template-columns: 60px minmax(0, 1fr) auto;
    align-items: start;
    gap: 5px 10px;
    padding-block: 10px;
  }
  .activity-time { grid-area: time; }
  .activity-bot { grid-area: bot; }
  .activity-position { grid-area: position; }
  .activity-outcome { grid-area: outcome; align-self: center; }
  .activity-explanation { grid-area: explanation; }
  .trade-board-scroll { --fleet-width: 240px; }
  .past-board-scroll { height: 65vh; min-height: 420px; }
  .leaderboard-header, .leaderboard-row { grid-template-columns: 48px minmax(220px, 1fr) 78px 70px 80px 84px 100px; }
  .narrative-row { grid-template-columns: 1fr; gap: 7px; }
  .warroom-command { min-height: 0; align-items: stretch; flex-direction: column; gap: 20px; padding: 18px; }
  .warroom-result { min-width: 0; padding: 14px 0 0; border-top: 1px solid #4b555d; border-left: 0; text-align: left; }
  .warroom-result strong { font-size: 25px; }
  .warroom-identity h1 { font-size: 25px; }
  .warroom-read { min-height: 0; padding: 14px; }
  .warroom-read p { font-size: 13px; }
  .warroom-timeline-row { grid-template-columns: 138px 62px minmax(0, 1fr); gap: 9px; }
}

@media (max-width: 520px) {
  .system-state { display: none; }
  .command-inner {
    min-height: 64px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 6px;
  }
  .command-status { width: auto; flex: 0 0 auto; overflow: visible; padding-bottom: 0; }
  .brand-media { width: 32px; height: 32px; }
  .command-link { margin-left: auto; }
  .theme-control button { min-width: 40px; padding-inline: 4px; }
  .page-context { max-width: 230px; overflow-wrap: anywhere; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .market-read { grid-column: 1 / -1; }
  .standby-hero { padding: 14px; }
  .standby-hero-stats { grid-template-columns: 1fr; }
  .standby-hero h1 { font-size: 25px; line-height: 1.05; }
  .overview-panel { min-height: 0; padding: 10px; }
  .market-summary { gap: 10px; }
  .overview-primary { margin-top: 11px; }
  .trading-overview .overview-stats { margin-top: 14px; }
  .overview-action { margin-top: 11px; }
  .fleet-ready-summary { margin-top: 14px; }
  .fleet-ready-track { margin-top: 11px; }
  .fleet-overview-stats { margin-top: 16px; }
  .activity-tools .page-count { width: 100%; }
  .activity-fleet-filter { width: calc(40% - 4px); }
  .activity-fleet-filter select { width: 100%; min-width: 0; }
  .activity-segments { display: grid; width: calc(60% - 4px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .activity-segments button { min-width: 0; }
  .activity-row.activity-grid { grid-template-columns: 52px minmax(0, 1fr) auto; gap-inline: 8px; }
  .activity-outcome strong { font-size: 11px; }
  .activity-outcome span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
  .fleet-matrix { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); min-width: 0; }
  .overview-live-board { grid-template-columns: repeat(5, minmax(220px, 1fr)); min-width: 0; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; padding-block: 7px; }
  .warroom-toolbar { align-items: flex-start; flex-direction: column; gap: 6px; }
  .warroom-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warroom-metrics div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .warroom-metrics div:nth-child(2n) { border-right: 0; }
  .warroom-metrics div:nth-last-child(-n + 2) { border-bottom: 0; }
  .warroom-path-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warroom-chart-labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warroom-chart-labels span:nth-child(2),
  .warroom-chart-labels span:nth-child(3) { text-align: right; }
  .warroom-chart-labels span:nth-child(3) { text-align: left; }
  .warroom-timeline-row { grid-template-columns: 58px minmax(0, 1fr); align-items: start; }
  .warroom-timeline-row time { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
