@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/plex-sans-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/plex-sans-normal-500.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 600;
  src: url("/fonts/plex-sans-normal-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/fraunces-normal-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  src: url("/fonts/fraunces-normal-600.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/plex-mono-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/plex-mono-normal-500.woff2") format("woff2");
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1F33;
  --bg-2: #0A1B2D;
  --surface: #10283F;
  --surface-2: #16344F;
  --line: #2A5578;
  --line-soft: #1E3F5C;
  --ink: #ffffff;
  --ink-dim: #ffffff;
  --muted: #c8c8c8;
  --quiet: #9a9a9a;
  --paper: #ffffff;
  --paper-ink: #000000;
  --sage: #ffffff;
  --sage-dim: #c8c8c8;
  --amber: #ffffff;
  --rose: #ffffff;
  --clay: #ffffff;
  --teal: #c8c8c8;
  --input-bg: #0A1B2D;
  --header-bg: #0A1B2D;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  --up: #00C853;
  --down: #FF1744;
  --candle-up: #00C853;
  --candle-down: #FF1744;
  --chart-bg: #0B1F33;
  --chart-pane: #0C243C;
  --chart-stroke: #2A5578;
  --sma50: #42A5F5;
  --sma200: #FDD835;
  --macd-line: #29B6F6;
  --macd-signal: #FF6D00;
  --edu-video: #FDD835;
  --rsi-line: #d0d0d0;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #ececec;
  --line: #c4c4c4;
  --line-soft: #d8d8d8;
  --ink: #000000;
  --ink-dim: #000000;
  --muted: #333333;
  --quiet: #555555;
  --paper: #000000;
  --paper-ink: #ffffff;
  --sage: #000000;
  --sage-dim: #333333;
  --amber: #000000;
  --rose: #000000;
  --clay: #000000;
  --teal: #555555;
  --input-bg: #ffffff;
  --header-bg: #ffffff;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  --up: #00C853;
  --down: #FF1744;
  --candle-up: #00C853;
  --candle-down: #FF1744;
  --chart-bg: #ffffff;
  --chart-pane: #ffffff;
  --chart-stroke: #cccccc;
  --sma50: #42A5F5;
  --sma200: #FDD835;
  --macd-line: #29B6F6;
  --macd-signal: #FF6D00;
  --edu-video: #0A4F8C;
  --rsi-line: #333333;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  color: var(--ink-dim);
  font-family: "Plex Sans", "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.mono { font-family: "Plex Mono", ui-monospace, monospace; }
.word { font-family: "Fraunces", Georgia, serif; }

.app {
  width: 1440px;
  min-width: 1440px;
  height: 900px;
  min-height: 900px;
  display: grid;
  grid-template-rows: 72px 1fr;
  background: var(--bg);
}

/* ——— header ——— */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--header-bg);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mascot {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background: transparent;
}
.mascot-light { display: none; }
html[data-theme="light"] .mascot-dark,
body[data-theme="light"] .mascot-dark { display: none; }
html[data-theme="light"] .mascot-light,
body[data-theme="light"] .mascot-light { display: block; }
html[data-theme="dark"] .mascot-light,
body[data-theme="dark"] .mascot-light { display: none; }
html[data-theme="dark"] .mascot-dark,
body[data-theme="dark"] .mascot-dark { display: block; }
.wordmark {
  height: 28px;
  width: auto;
  max-width: min(560px, 46vw);
  object-fit: contain;
  display: block;
  flex: 0 1 auto;
}
.wordmark-light { display: none; }
html[data-theme="light"] .wordmark-dark,
body[data-theme="light"] .wordmark-dark { display: none; }
html[data-theme="light"] .wordmark-light,
body[data-theme="light"] .wordmark-light { display: block; }
html[data-theme="dark"] .wordmark-light,
body[data-theme="dark"] .wordmark-light { display: none; }
html[data-theme="dark"] .wordmark-dark,
body[data-theme="dark"] .wordmark-dark { display: block; }
.gate-wordmark {
  height: 36px;
  max-width: min(520px, 90vw);
  margin: 0 auto 10px;
}
.mark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 11.5px;
}
.pills { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.pill.paper {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--paper-ink);
  font-weight: 600;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.7;
}
.top-actions { display: flex; align-items: center; gap: 14px; }
.asof { color: var(--quiet); font-size: 11.5px; text-align: right; }
.send {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  opacity: 0.72;
  cursor: not-allowed;
  font-weight: 500;
}
.send:disabled { cursor: not-allowed; }

/* ——— shell ——— */
.shell {
  display: grid;
  grid-template-columns: 196px 1fr;
  min-height: 0;
}
.rail {
  padding: 16px 12px 14px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-2);
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
  padding: 0 8px;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-dim);
}
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav .k { font-size: 12.5px; font-weight: 500; }
.nav .n { display: none; }
.reserved {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slot {
  padding: 10px 10px 9px;
  border-radius: 9px;
  border: 1px dashed var(--line);
  background: var(--bg);
  color: var(--quiet);
}
.slot .t { font-size: 12px; color: var(--muted); font-weight: 500; }
.slot .s {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage {
  min-width: 0;
  min-height: 0;
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* desk grid */
.desk {
  display: none;
  grid-template-columns: 1.42fr 0.9fr;
  grid-template-rows: 1fr auto;
  gap: 12px;
  min-height: 0;
  height: 100%;
}
body[data-view="desk"] .desk { display: grid; }
body[data-view="desk"] .focus { display: none; }

.focus {
  display: none;
  min-height: 0;
  height: 100%;
}
body:not([data-view="desk"]) .focus { display: flex; flex-direction: column; }
body[data-view="market"] .focus-market,
body[data-view="positions"] .focus-positions,
body[data-view="opportunity"] .focus-opportunity,
body[data-view="news"] .focus-news,
body[data-view="chart"] .focus-chart,
body[data-view="sleeve3"] .focus-sleeve3,
body[data-view="family"] .focus-family,
body[data-view="general-news"] .focus-general-news,
body[data-view="education"] .focus-education { display: flex; }
body:not([data-view="market"]) .focus-market,
body:not([data-view="positions"]) .focus-positions,
body:not([data-view="opportunity"]) .focus-opportunity,
body:not([data-view="news"]) .focus-news,
body:not([data-view="chart"]) .focus-chart,
body:not([data-view="sleeve3"]) .focus-sleeve3,
body:not([data-view="family"]) .focus-family,
body:not([data-view="general-news"]) .focus-general-news,
body:not([data-view="education"]) .focus-education { display: none; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-h h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.panel-h .note { color: var(--quiet); font-size: 11.5px; }
.panel-b { padding: 10px 14px 14px; min-height: 0; overflow: auto; }
.caption {
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.01em;
}

/* tables */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quiet);
  font-weight: 500;
  padding: 4px 8px 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--ink-dim);
}
tr:last-child td { border-bottom: 0; }
tr.sel td { color: var(--ink); }
.sym {
  font-family: "Plex Mono", monospace;
  font-weight: 500;
  color: var(--ink);
  font-size: 12.5px;
  text-transform: uppercase;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-dim);
  font-family: "Plex Mono", monospace;
  font-size: 10.5px;
  white-space: nowrap;
}
.tag.manual,
.tag.autofade,
.tag.show,
.tag.donot,
.tag.earn,
.tag.exh,
.tag.watch,
.tag.ai,
.tag.space,
.tag.crypto,
.tag.index,
.tag.example {
  color: var(--ink-dim);
  border-color: var(--line);
}
.none { color: var(--quiet); font-family: "Plex Mono", monospace; font-size: 11px; }
.insuf { color: var(--amber); font-family: "Plex Mono", monospace; font-size: 11.5px; }

/* ticket */
.ticket {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: 10px;
  padding: 12px 14px 12px 13px;
}
.ticket h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.kv {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 3px 10px;
  font-size: 12px;
}
.kv dt { color: var(--quiet); }
.kv dd { margin: 0; color: var(--ink-dim); }
.hold {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.namebox {
  display: grid;
  grid-template-columns: 92px 110px 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}
.namebox label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--quiet);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.namebox input, .namebox select {
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 9px;
}
.ajoin {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
}

.side-stack { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.side-stack .panel { flex: 1; }

/* news */
.news-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.news-item:last-child { border-bottom: 0; }
.news-item .hd { color: var(--ink-dim); }
.news-item .ex {
  color: var(--quiet);
  font-size: 11px;
  grid-column: 2;
}

/* sleeve 3 */
.s3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.asset {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
}
.asset-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.asset-h .name { font-family: "Fraunces", Georgia, serif; font-size: 18px; }
.levels { display: flex; flex-direction: column; gap: 6px; }
.lvl {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  color: var(--ink);
}
.lvl .id { font-family: "Plex Mono", monospace; font-size: 11px; color: var(--ink); }
.lvl .say { color: var(--ink); }
.buy-only {
  margin-top: 8px;
  font-size: 12px;
  color: var(--sage);
}
.s3-kv { margin: 0 0 8px; }
.s3-metrics {
  margin: 0 0 4px;
  color: var(--ink-dim);
  font-size: 11.5px;
  line-height: 1.4;
}
.custody { margin: 0 0 8px; }
.levels { margin-top: 10px; }
.lvl .on {
  color: var(--sage);
  font-family: "Plex Mono", monospace;
  font-size: 11px;
}
.s3-foot { margin-top: 8px; color: var(--quiet); font-size: 11.5px; }

/* chart */
.chart-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.seg {
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}
.seg.on { background: var(--surface-2); color: var(--ink); }
.chart-wrap {
  height: 620px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.chart-wrap.grabbing { cursor: grabbing; }
body[data-view="desk"] .chart-wrap { height: 0; }
#chart-svg { width: 100%; height: 100%; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--quiet); font-size: 11px; margin-top: 6px; }
.sw { display: inline-block; width: 16px; height: 2px; vertical-align: middle; margin-right: 5px; }
.sw.spread { background: #29B6F6; height: 3px; }
.quote-strip {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 2px;
  font-family: "Plex Mono", ui-monospace, monospace;
}
.quote-strip .q-last {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.quote-strip .q-chg,
.quote-strip .q-pct { font-size: 14px; font-weight: 500; }
.quote-strip .q-chg.up, .quote-strip .q-pct.up { color: var(--up); }
.quote-strip .q-chg.down, .quote-strip .q-pct.down { color: var(--down); }
.range-chips {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.range-chips .seg {
  border: 0;
  border-radius: 0;
  height: 26px;
  cursor: pointer;
}
.range-chips .seg.on {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.freq-select {
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 8px;
}
.caption.chart-hint { margin: 6px 0 4px; color: var(--muted); }
body[data-view="chart"] .focus-chart .panel-h {
  flex-wrap: wrap;
  align-items: flex-end;
}
body[data-view="chart"] .focus-chart .panel-b {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
body[data-view="chart"] .chart-wrap {
  flex: 1 1 620px;
  min-height: 480px;
  height: auto;
}

/* positions focus extras */
.flagbox {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rule-legend {
  margin-top: 10px;
  color: var(--quiet);
  font-size: 11.5px;
}

.desk-opp { min-height: 0; }
.desk-s3 { grid-column: 1 / -1; }

body[data-view="desk"] .panel-b { padding-top: 8px; padding-bottom: 10px; }
body[data-view="desk"] td { padding-top: 4px; padding-bottom: 4px; }
body[data-view="desk"] .news-item { padding: 5px 0; }
body[data-view="desk"] .ticket { padding: 8px 11px; }
body[data-view="desk"] .ticket h3 { margin-bottom: 6px; }
body[data-view="desk"] .kv { font-size: 11.5px; gap: 2px 10px; }
body[data-view="desk"] .hold { margin-top: 6px; font-size: 11.5px; }
body[data-view="desk"] .namebox { margin-top: 8px; }
body[data-view="desk"] .namebox input,
body[data-view="desk"] .namebox select,
body[data-view="desk"] .ajoin { height: 28px; }
body[data-view="desk"] .desk-s3 .asset { padding: 8px 11px; }
body[data-view="desk"] .desk-s3 .panel-b { padding-top: 8px; padding-bottom: 8px; }
body[data-view="desk"] .s3-foot { margin-top: 4px; }
body[data-view="desk"] .s3-metrics { font-size: 10.5px; margin-bottom: 2px; }
body[data-view="desk"] .desk-s3 .asset-h { margin-bottom: 4px; }
body[data-view="desk"] .desk-s3 .asset-h .name { font-size: 16px; }
body[data-view="desk"] .desk-s3 .buy-only { margin-top: 3px; font-size: 11px; }
body[data-view="desk"] .desk-s3 .levels { margin-top: 5px; gap: 3px 8px; }
body[data-view="desk"] .desk-s3 .lvl { font-size: 10.5px; }
body[data-view="desk"] .desk-s3 .s3-foot { font-size: 10.5px; }
body[data-view="desk"] .desk-opp .parked-strip { margin-bottom: 6px; }
body[data-view="desk"] .desk-opp .scan-line,
body[data-view="desk"] .desk-opp .floor-note,
body[data-view="desk"] .desk-opp .session-status { margin-bottom: 4px; font-size: 11px; }
body[data-view="desk"] .desk-opp .criteria { margin-bottom: 6px; }


/* first-look live Opportunity — same chrome, no new visual system */
.scan-line {
  margin: 0 0 10px;
  color: var(--ink-dim);
  font-size: 12px;
}
.floor-note {
  margin: 0 0 10px;
  color: var(--quiet);
  font-size: 11.5px;
}
.parked-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
body[data-view="opportunity"] .panel-b {
  overflow: auto;
}
.ticket-wrap { margin-top: 14px; }
body[data-view="desk"] .desk-opp .panel-b {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body[data-view="desk"] .desk-opp .best-value-line {
  margin-bottom: 6px;
  font-size: 12px;
  padding: 6px 10px;
  flex: 0 0 auto;
}
body[data-view="desk"] .desk-opp .parked-strip,
body[data-view="desk"] .desk-opp .scan-line,
body[data-view="desk"] .desk-opp .floor-note,
body[data-view="desk"] .desk-opp .session-status,
body[data-view="desk"] .desk-opp .criteria { flex: 0 0 auto; }
body[data-view="desk"] .desk-opp table { flex: 0 0 auto; }
body[data-view="desk"] .desk-opp .ticket-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin-top: 8px;
}
body[data-view="desk"] .desk-opp .namebox {
  flex: 0 0 auto;
  margin-top: 8px;
}
.namebox { margin-top: 10px; }
.ticket-wrap + .namebox { margin-top: 12px; }
.miss {
  color: var(--amber);
  font-family: "Plex Mono", monospace;
  font-size: 12px;
}


/* owner 2026-08-28: current-stats table + chart ticker + sentence scores */
.stats-wrap {
  overflow-x: auto;
  margin: 0 0 14px;
}
.stats-table {
  min-width: 1380px;
}
.stats-table th {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 10.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  vertical-align: bottom;
  text-align: center;
  padding: 4px 10px 7px;
}
.stats-table th .th-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-height: 2.6em;
  height: 100%;
  line-height: 1.25;
}
.stats-table th .th-top,
.stats-table th .th-bot {
  display: block;
  white-space: nowrap;
  text-align: center;
}
.stats-table th .th-top:empty {
  min-height: 1.25em;
}
.stats-table th.wrap {
  white-space: normal;
}
.stats-table th.wrap .th-top {
  white-space: normal;
  text-align: center;
}
.stats-table td {
  min-width: 70px;
  color: var(--ink);
  text-align: center;
  padding: 7px 10px;
}
.stats-table td.mono {
  white-space: nowrap;
}
.stats-table th.num-usd,
.stats-table td.num-usd {
  min-width: 8rem;
}
.stats-table th.num-pct,
.stats-table td.num-pct {
  min-width: 6.5rem;
}
.stats-table .up { color: var(--up); }
.stats-table .down { color: var(--down); }
.stats-table .lot-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--quiet);
  font-weight: 400;
  white-space: normal;
  max-width: 220px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.stats-table td:empty::after {
  content: "—";
  color: var(--quiet);
}
.stats-table tbody tr:last-child td {
  border-bottom: 1px solid var(--line-soft);
}
.stats-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #0B1F33;
  font-weight: 600;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  text-align: center;
}
[data-theme="light"] .stats-table tfoot td {
  background: var(--bg);
}
.stats-table tfoot .sym {
  font-weight: 600;
}
.chart-head {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tickerbox {
  display: grid;
  grid-template-columns: 110px 132px 140px;
  gap: 8px;
  align-items: end;
}
.tickerbox label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tickerbox input, .tickerbox select {
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 8px;
}
.chart-ticker {
  display: flex;
  gap: 8px;
  align-items: end;
  margin: 0 0 10px;
}
.chart-ticker label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-dim);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chart-ticker input {
  height: 32px;
  width: 160px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 9px;
}
.chart-ticker button {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
}
.score {
  color: var(--amber);
  font-size: 12px;
}
.panel-h h2 .mono { color: var(--ink); }

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.theme-switch .lab {
  padding: 0 10px 0 12px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
}
.theme-switch .seg {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  border-radius: 0;
}
.theme-switch .seg.on {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.sw.sma50 { background: #42A5F5; }
.sw.sma200 { background: #FDD835; }
.sw.macd { background: #29B6F6; }
.sw.signal { background: #FF6D00; }
.sw.bb { background: #E0E0E0; }


.sw.up { background: var(--up); }
.sw.down { background: var(--down); }


/* Family statement — first-class window, sheet page, black/white */
body[data-view="family"] .stage { min-height: 0; }
body[data-view="family"] .focus-family { min-height: 0; }
body[data-view="family"] .panel-b.stmt {
  overflow: auto;
  padding-top: 8px;
}
.stmt-mast {
  margin: 0 0 8px;
}
.stmt-mast .firm {
  font-family: "Fraunces", Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.stmt-mast .doc {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.who-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.who-switch .lab {
  padding: 0 10px 0 12px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
}
.who-switch .seg {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  color: var(--muted);
}
.who-switch .seg.on {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.selected-who {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
}
.stmt-top {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 1fr;
  gap: 10px 14px;
  margin: 0 0 8px;
  align-items: start;
}
.stmt h3 {
  margin: 0 0 6px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--quiet);
  font-weight: 600;
}
.stmt-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stmt-meta > div {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 4px 8px;
}
.stmt-meta dt { color: var(--quiet); font-size: 11px; }
.stmt-meta dd { margin: 0; color: var(--ink); font-size: 12px; }
.stmt-summary {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px 8px;
}
.stmt-summary-dl { margin: 0; }
.stmt-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 2px 0;
  border-bottom: 1px solid var(--line-soft);
}
.stmt-kv:last-child { border-bottom: 0; }
.stmt-kv dt { color: var(--quiet); font-size: 11px; }
.stmt-kv dd { margin: 0; }
.stmt-num {
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  color: var(--ink);
}
.stmt-neg { color: var(--ink); }
.stmt-latest { display: flex; flex-direction: column; gap: 8px; }
.stmt-me {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.stmt-me.me, .stmt-me.month-end {
  box-shadow: inset 3px 0 0 var(--ink);
}
.stmt-me.not-me {
  border-style: dashed;
}
.stmt-me.empty p { margin: 0; color: var(--muted); font-size: 12px; }
.stmt-me-note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
}
.stmt-me-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}
.stmt-me-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.stmt-me-dl dt { color: var(--quiet); font-size: 11px; }
.stmt-me-dl dd { margin: 0; }
.stmt-block { margin-top: 12px; }
.stmt-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
}
.stmt-sort label { color: var(--quiet); }
.stmt-sort select {
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 8px;
}
.stmt-table th.sortable { cursor: pointer; user-select: none; }
.stmt-table th.sortable:hover { color: var(--ink); }
.stmt-table th {
  white-space: nowrap;
  vertical-align: bottom;
  text-align: center;
  padding: 6px 12px;
}
.stmt-table th .th-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-height: 2.5em;
  line-height: 1.25;
}
.stmt-table th .th-top,
.stmt-table th .th-bot {
  display: block;
  white-space: nowrap;
}
.stmt-table th.wrap { white-space: normal; }
.stmt-table td {
  font-size: 12px;
  padding: 5px 12px 5px 0;
  vertical-align: top;
}
.stmt-table .stmt-num {
  text-align: center;
}
.stmt-table tr.total td { font-weight: 600; color: var(--ink); }
.stmt-table tr.me-first td { color: var(--ink); font-weight: 500; }
.stmt-table tr.not-me td { font-style: italic; }
.slice-note { margin: 4px 0 2px; }

/* General News Stories — live Yahoo tape, not 0.23 EXAMPLE */
body[data-view="general-news"] .stage { min-height: 0; }
body[data-view="general-news"] .focus-general-news { min-height: 0; }
body[data-view="general-news"] .panel-b.tape {
  overflow: auto;
}
.story-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}
.story-search input[name="q"] {
  flex: 1;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  padding: 0 12px;
}
.story-search button {
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}
.story-list { display: flex; flex-direction: column; }
.story {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.story:last-child { border-bottom: 0; }
.story .hd {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}
.story a.hd:hover { text-decoration: underline; }
.story .meta {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 11.5px;
}
.panel-b.tape .empty {
  margin: 18px 0;
  color: var(--ink);
  font-size: 14px;
}

.val-short { display: none; }
.print-run { display: none; }

/* Nuclear print reset. Chrome/Edge print preview still showed a black
   rectangle around family-statement letter pages after the last pass.
   Remaining sources: color-scheme:dark (UA dark canvas + page chrome),
   html/body navy --bg printed via print-color-adjust:exact, .panel
   overflow:hidden + radius raster, inset --ink bar on month cards,
   wrapper/outline/filter, UA focus outline. Kill all of them. Keep
   gray #F2F2F2 boxes, letterhead rule, table header #ccc, 3 pages. */
@media print {
  @page {
    size: letter portrait;
    margin: 0.65in 0.7in;
  }

  :root,
  html,
  body,
  [data-theme],
  [data-theme="dark"],
  [data-theme="light"] {
    color-scheme: only light !important;
    forced-color-adjust: none !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    --bg: #ffffff !important;
    --bg-2: #ffffff !important;
    --surface: #ffffff !important;
    --surface-2: #F2F2F2 !important;
    --header-bg: #ffffff !important;
    --ink: #111111 !important;
    --ink-dim: #111111 !important;
    --muted: #333333 !important;
    --quiet: #555555 !important;
    --line: transparent !important;
    --line-soft: transparent !important;
    --shadow: none !important;
  }

  html, body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 none !important;
    outline: 0 none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    overflow: visible !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    font-size: 10.5pt;
    line-height: 1.4;
    color: #111 !important;
    font-family: "Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  *, *::before, *::after {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    outline: none !important;
    outline-width: 0 !important;
    outline-offset: 0 !important;
    outline-color: transparent !important;
  }
  *:focus, *:focus-visible, *:active {
    outline: none !important;
    box-shadow: none !important;
  }

  html, body, .app, .shell, .stage, .focus, .focus-family, .panel, .panel-h, .panel-b,
  .panel-b.stmt, .stmt, .stmt-print-p1, .stmt-print-p2, .stmt-print-p3, .stmt-sheet,
  .stmt-head, .stmt-top, .stmt-block, .stmt-mast, .stmt-meta, .stmt-latest,
  .stmt-summary-dl, .stmt-me-dl, main, section, header, aside, nav, div {
    border: 0 none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: 0 none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    border-radius: 0 !important;
  }

  html, body, .app, .shell, .stage {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    background-color: #ffffff !important;
    color: #111 !important;
    font-family: "Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  .shell {
    display: block !important;
    grid-template-columns: none !important;
  }
  .top, header, .rail, nav, .nav, .nav-label, .theme-switch,
  .who-switch, .pills, .send, .print-hide, .panel-h .note,
  .gloss-tip, .gloss-more, .criteria,
  .slice-note, .selected-who, .mascot { display: none !important; }

  .focus:not(.focus-family) { display: none !important; }
  .stage, .focus, .focus-family, .panel, .panel-b, .panel-b.stmt,
  .stmt-print-p1, .stmt-print-p2, .stmt-print-p3, .stmt-sheet {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 none !important;
    border-radius: 0 !important;
    background: #fff !important;
    background-color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
  .panel-h {
    display: block;
    padding: 0;
    margin: 0 0 6px;
    border: 0 !important;
    background: transparent;
  }
  .panel-h h2 {
    margin: 0;
    font-family: "Fraunces", Georgia, "Times New Roman", serif !important;
    font-size: 22pt;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #111;
  }
  .stmt-mast {
    margin: 0 0 16px;
    padding: 0 0 10px;
    border: 0 none !important;
    border-bottom: 2.5pt solid #111 !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .stmt-mast .firm {
    font-family: "Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif !important;
    font-size: 11pt;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #111;
  }
  .stmt-mast .doc {
    margin-top: 3px;
    font-size: 8.5pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #888;
  }
  .stmt-top {
    display: grid !important;
    grid-template-columns: 1.05fr 0.95fr !important;
    gap: 16px 24px !important;
    margin: 0 0 18px;
    align-items: start;
    border: 0 none !important;
  }
  .stmt-latest {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-top: 2px;
    border: 0 none !important;
  }
  .stmt-summary, .stmt-me, .stmt-me.me, .stmt-me.month-end, .stmt-me.not-me, .stmt-me.empty {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    background: #F2F2F2 !important;
    background-color: #F2F2F2 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 7px !important;
    padding: 10px 14px !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
  .stmt h3 {
    letter-spacing: 0.02em;
    font-size: 8.5pt;
    font-weight: 600;
    color: #111;
    margin: 0 0 8px;
    text-transform: none !important;
  }
  .stmt-meta > div {
    grid-template-columns: 148px 1fr;
    gap: 2px 10px;
  }
  .stmt-meta dt { font-size: 9pt; color: #666; }
  .stmt-meta dd { font-size: 10.5pt; color: #111; }
  .stmt-kv {
    border: 0 none !important;
    border-bottom: 1px solid #e4e4e4 !important;
    padding: 3px 0;
  }
  .stmt-kv:last-child { border-bottom: 0 !important; }
  .stmt-kv dt { color: #666; font-size: 9pt; }
  .stmt-kv dd, .stmt-num { color: #111; }
  .stmt-me-note { color: #666 !important; font-size: 8.5pt; }
  .stmt-me-dl dt { color: #666; }
  .val-short { display: inline !important; }
  .val-long { display: none !important; }

  .print-run { display: none; }
  .stmt-print-p2,
  .stmt-print-p3 {
    break-before: page;
    page-break-before: always;
    border: 0 none !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .stmt-print-p1 {
    break-after: page;
    page-break-after: always;
    border: 0 none !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .stmt-print-p2 .print-run,
  .stmt-print-p3 .print-run {
    display: block;
    margin: 0 0 12px;
    padding: 0 0 8px;
    border: 0 none !important;
    border-bottom: 1.5pt solid #111 !important;
    font-family: "Fraunces", Georgia, "Times New Roman", serif !important;
    font-size: 14pt;
    font-weight: 600;
    color: #111;
    text-transform: none !important;
  }
  .stmt, .stmt-print-p1, .stmt-print-p2, .stmt-print-p3,
  .stmt-top, .stmt-block, .stmt-table, .stmt-sheet {
    width: 100% !important;
    max-width: none !important;
  }
  .stmt-block {
    margin-top: 16px;
    break-inside: auto;
    border: 0 none !important;
  }
  .stmt-block h3,
  .stmt-block .caption {
    break-after: avoid;
    page-break-after: avoid;
  }
  .stmt-block .caption {
    font-size: 8.5pt;
    color: #444;
    margin: 0 0 8px;
    max-width: 100%;
  }
  .stmt-table {
    width: 100% !important;
    border-collapse: collapse;
    table-layout: auto;
    border: 0 none !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .stmt-table th {
    white-space: nowrap;
    letter-spacing: 0.03em;
    font-size: 8pt;
    text-align: center;
    vertical-align: bottom;
    border: 0 none !important;
    border-bottom: 1px solid #ccc !important;
    padding: 5px 10px;
    color: #111;
  }
  .stmt-table th .th-stack {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    min-height: 2.4em;
    line-height: 1.25;
  }
  .stmt-table th .th-top,
  .stmt-table th .th-bot {
    display: block;
    white-space: nowrap;
  }
  .stmt-table th.wrap { white-space: normal; }
  .stmt-table td {
    font-size: 9pt;
    padding: 5px 10px 5px 0;
    vertical-align: top;
    border: 0 none !important;
    border-bottom: 1px solid #ddd !important;
  }
  .stmt-table .stmt-num { white-space: nowrap; text-align: center; }
  .stmt-table thead { display: table-header-group; }
  .stmt-table tr { break-inside: avoid; page-break-inside: avoid; }

  .stmt-monthly {
    break-before: page;
    page-break-before: always;
  }
  .stmt-print-p3.stmt-monthly {
    break-before: page;
    page-break-before: always;
  }
  .rail, .nav, aside { display: none !important; width: 0 !important; }
  html, body, .app, .shell, .stage, .focus-family, .panel-b.stmt {
    width: 100% !important;
    min-width: 0 !important;
  }
  .stmt-sort { display: none !important; }
  .stmt-monthly .stmt-table td,
  .stmt-monthly .stmt-table th { white-space: nowrap; }

  a { text-decoration: none !important; color: inherit !important; }
}

/* Opportunity Selection Criteria — themed disclosure, closed by default */
.session-status {
  margin: 0 0 8px;
  color: var(--ink-dim);
  font-size: 12px;
}

/* Ellis 0.2 / Naomi Best Value — high contrast, not candle, not paper gold, not clay */
.best-value-line {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #29B6F6;
  color: #0B1F33;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-align: left;
}
.best-value-line.none {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}
[data-theme="light"] .best-value-line {
  background: #0A4F8C;
  color: #ffffff;
}
[data-theme="light"] .best-value-line.none {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}
.tag.best-value {
  margin-left: 8px;
  background: #29B6F6;
  border-color: #29B6F6;
  color: #0B1F33;
  font-weight: 600;
}
[data-theme="light"] .tag.best-value {
  background: #0A4F8C;
  border-color: #0A4F8C;
  color: #ffffff;
}
.criteria {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.criteria summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.criteria summary::-webkit-details-marker { display: none; }
.criteria summary::before {
  content: "▸";
  display: inline-block;
  width: 1.1em;
  color: var(--quiet);
  font-size: 11px;
}
.criteria[open] summary::before { content: "▾"; }
.criteria-body {
  padding: 0 12px 10px 28px;
  border-top: 1px solid var(--line-soft);
}
.criteria-body ul {
  margin: 8px 0 0;
  padding: 0 0 0 16px;
}
.criteria-body li {
  margin: 0 0 6px;
  color: var(--ink-dim);
  font-size: 12.5px;
}
.spread-chart-link {
  margin: 8px 0 0;
}
.spread-chart-link a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.spread-chart-link a:hover { color: #29B6F6; }

/* Dual Book — Positions blotter, same navy/paper chrome */
.dual-book {
  margin: 4px 0 14px;
}
.dual-book h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.dual-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
@media (max-width: 980px) {
  .dual-cols { grid-template-columns: 1fr; }
}
.dual-col {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
}
.dual-col h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.dual-col p {
  margin: 0 0 8px;
  color: var(--ink-dim);
  font-size: 12.5px;
}
.dual-col .kv {
  margin: 0;
  grid-template-columns: 118px 1fr;
}
.dual-note {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 11px;
}
.dual-book-line {
  margin: 8px 0 0;
  color: var(--ink-dim);
  font-size: 12px;
}
.dual-book-line a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.dual-book-line a:hover { color: #29B6F6; }
body[data-view="desk"] .dual-book {
  margin: 8px 0 6px;
}
body[data-view="desk"] .dual-cols {
  grid-template-columns: 1fr;
}
body[data-view="desk"] .dual-book h3 { font-size: 14px; margin-bottom: 6px; }
body[data-view="desk"] .dual-col { padding: 8px 10px; }
body[data-view="desk"] .dual-col p { font-size: 11.5px; margin-bottom: 4px; }
body[data-view="desk"] .dual-note { font-size: 10.5px; }

/* Family heading glossary — themed hover, not native title= */
.gloss {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.gloss-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--quiet);
}
.gloss-link:hover { color: var(--ink); }
.gloss-tip {
  display: none;
  position: absolute;
  z-index: 40;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  line-height: 1.4;
  box-shadow: var(--shadow);
  white-space: normal;
}
.gloss:hover .gloss-tip,
.gloss:focus-within .gloss-tip { display: block; }
.gloss-more {
  display: inline-block;
  margin-left: 4px;
  color: #29B6F6;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.stmt-kv .gloss,
.stmt-me-dl .gloss { display: inline-flex; align-items: flex-start; }

/* Education */
body[data-view="education"] .stage { min-height: 0; }
body[data-view="education"] .focus-education { min-height: 0; }
body[data-view="education"] .panel-b.edu {
  overflow: auto;
  padding-bottom: 28px;
}
.edu-start {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0 0 8px;
}
.edu-start-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  scroll-margin-top: 12px;
}
.edu-start-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.edu-start-n {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #F5D76E;
  border: 1px solid #F5D76E;
}
.edu-start-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.edu-start-card p {
  margin: 0 0 6px;
  color: var(--ink-dim);
  font-size: 12.5px;
}
.edu-start-next {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.edu-start-next a {
  color: var(--ink-dim);
  border-bottom: 1px dotted var(--quiet);
}
.edu-start-next a:hover { color: var(--ink); }
.edu-lead {

  margin: 0 0 14px;
  color: var(--ink-dim);
  font-size: 13.5px;
  max-width: 72ch;
}

.edu-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 16px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}
.edu-jump a {
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.edu-jump a:hover { color: var(--edu-video); border-bottom-color: var(--edu-video); }
.edu-jump a.on {
  color: var(--edu-video);
  border-bottom: 2px solid var(--edu-video);
}
#videos, #basic-terms, #core-positions, #option-strategies, #edu-crypto, #start-here, #payoff-diagrams-gallery {
  scroll-margin-top: 12px;
}

.edu-h {
  margin: 18px 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.edu-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 14px;
  font-size: 12px;
}
.edu-toc a {
  color: var(--ink-dim);
  border-bottom: 1px dotted var(--quiet);
}
.edu-toc a:hover { color: var(--ink); }
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.edu-term {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  scroll-margin-top: 12px;
}
.edu-term h3,
.edu-strat h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.edu-term a {
  color: var(--ink-dim);
  border-bottom: 1px dotted var(--quiet);
}
.edu-term a:hover { color: var(--ink); }
.edu-term p, .edu-strat p {
  margin: 0 0 6px;
  color: var(--ink-dim);
  font-size: 12.5px;
}
.edu-strats { display: flex; flex-direction: column; gap: 14px; }
.edu-strat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  scroll-margin-top: 12px;
}
.edu-strat-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.path-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.path-tag.sleeve-core { color: var(--paper); border-color: var(--paper); }
.path-tag.sleeve-options { color: #29B6F6; border-color: #29B6F6; }
.path-tag.sleeve-crypto { color: #FDD835; border-color: #FDD835; }
.edu-strat .when { color: var(--muted); }
.edu-strat .when span { color: var(--ink); font-weight: 500; }
.edu-watch {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.edu-watch a {
  color: var(--edu-video);
  font-weight: 600;
  border-bottom: 2px solid var(--edu-video);
}
.edu-watch a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.edu-back {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.edu-back a {
  color: var(--ink-dim);
  border-bottom: 1px dotted var(--quiet);
}
.edu-back a:hover { color: var(--ink); }
.edu-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.edu-diagram {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  scroll-margin-top: 12px;
}
.edu-diagram h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.edu-diagram .payoff-svg { max-width: 100%; }
#payoff-diagrams-gallery { scroll-margin-top: 12px; }
.payoff { margin: 8px 0 0; }
.payoff-svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  background: var(--chart-pane);
  border: 1px solid var(--chart-stroke);
  border-radius: 8px;
  color: var(--quiet);
}
.payoff-svg .pay-axis { stroke: var(--chart-stroke); stroke-width: 1; }
.payoff-svg text { fill: var(--quiet); font-size: 10px; font-family: "Plex Mono", monospace; }
.payoff-svg .pay-zero { font-size: 9px; }
.payoff figcaption {
  margin: 4px 0 0;
  color: var(--quiet);
  font-size: 11px;
}

@media print {
  .gloss-tip, .gloss-more { display: none !important; }
  .gloss-link {
    color: inherit !important;
    text-decoration: none !important;
    border-bottom: 0 none !important;
  }
  .criteria, .spread-chart-link { display: none !important; }
}

.edu-videos { margin: 8px 0 28px; display: flex; flex-direction: column; gap: 18px; }
.edu-videos-group h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.edu-videos-list {
  margin: 6px 0 0;
  padding-left: 1.2em;
}
.edu-videos-list li { margin: 4px 0; }
.edu-videos-list a,
.edu-watch a {
  color: var(--edu-video);
  font-weight: 600;
  border-bottom: 2px solid var(--edu-video);
}
.edu-videos-list a:hover,
.edu-watch a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

body.family-gate {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0B1F33;
  color: #fff;
}
.gate {
  width: min(420px, calc(100% - 32px));
  padding: 28px 24px;
  border: 1px solid #2A5578;
  border-radius: 16px;
  background: #10283F;
  text-align: left;
}
.gate h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  margin: 12px 0 8px;
}
.gate p { color: #c8c8c8; margin: 0 0 14px; font-size: 14px; }
.gate-err { color: #FF6D00 !important; }
.gate-ok { color: #FDD835 !important; }
.gate a { color: #FDD835; }
.gate-note { font-size: 12px !important; color: #9a9a9a !important; }
.gate form { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.gate label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.gate input {
  background: #0A1B2D;
  color: #fff;
  border: 1px solid #2A5578;
  border-radius: 8px;
  padding: 10px 12px;
}
.gate button {
  background: #FDD835;
  color: #0B1F33;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}


a.pill {
  text-decoration: none;
  color: inherit;
}

/* Opportunity scan: sort + filter. Do not touch family-statement print. */
.opp-scan-wrap {
  overflow-x: auto;
  max-width: 100%;
}
table.opp-scan {
  width: 100%;
}
table.opp-scan th.sortable {
  cursor: pointer;
  user-select: none;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-size: 11px;
  color: var(--quiet);
}
table.opp-scan th.sortable:hover {
  color: var(--ink);
}
table.opp-scan th.sortable.sorted-asc::after,
table.opp-scan th.sortable.sorted-desc::after {
  font-size: 9px;
  margin-left: 4px;
  color: var(--ink);
}
table.opp-scan th.sortable.sorted-asc::after { content: "▲"; }
table.opp-scan th.sortable.sorted-desc::after { content: "▼"; }
table.opp-scan thead tr.opp-head th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  padding: 4px 8px 6px 0;
}
table.opp-scan thead tr.opp-filter th {
  position: sticky;
  top: 22px;
  background: var(--surface);
  z-index: 2;
  padding: 0 6px 8px 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  border-bottom: 1px solid var(--line-soft);
}
table.opp-scan thead tr.opp-filter select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 24px;
  font-size: 11px;
  font-family: "Plex Sans", system-ui, sans-serif;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 6px;
  cursor: pointer;
}
table.opp-scan thead tr.opp-filter select:focus {
  outline: 1px solid var(--line);
  outline-offset: 0;
}
table.opp-scan thead tr.opp-filter select option {
  background: var(--input-bg);
  color: var(--ink);
}
table.opp-scan td {
  padding: 6px 8px 6px 0;
  white-space: nowrap;
}
body[data-view="opportunity"] .focus-opportunity table.opp-scan-iso td,
body[data-view="opportunity"] .focus-opportunity table.opp-scan-iso th {
  font-size: 12px;
}

/* Ellis 0.3 TA timing summary — display only, not a sixth window */
.ta-timing {
  display: block;
  margin: 4px 0 0;
  max-width: 38rem;
  white-space: normal;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-dim);
}
.ticket .ta-timing {
  margin: 8px 0 0;
  max-width: 42rem;
}

/* Market Overview */
body[data-view="market"] .focus-market { display: flex; }
body:not([data-view="market"]) .focus-market { display: none; }
.mo-wrap { margin-top: 6px; }
.mo-table { min-width: 1480px; }
.mo-h {
  margin: 18px 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.mo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
  margin: 8px 0 12px;
}
.mo-add {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.mo-lab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mo-lab input {
  height: 32px;
  min-width: 110px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: "Plex Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
}
.mo-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #12324f;
  color: #e8f0f8;
  font-size: 12px;
  cursor: pointer;
}
[data-theme="light"] .mo-btn {
  background: #0B1F33;
  color: #f4f7fb;
}
.mo-btn-remove {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--line-soft);
  height: 28px;
  font-size: 11px;
}
.mo-removes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mo-flash {
  margin: 0 0 10px;
  font-size: 13px;
}
.mo-flash.mo-ok { color: var(--up); }
.mo-flash.mo-err { color: var(--amber); }
