/* ═══════════════════════════════════════════════════════════
   Coattail — prototype stylesheet
   Palette: cool paper + petrol accent. Green/red reserved
   for gain/loss semantics only, never for the accent.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── The table ──────────────────────────────────────────────────────
     Deliberately ONE committed look in every theme. A tote board that
     turns white in light mode stops being a tote board, so there is no
     prefers-color-scheme block below and no [data-theme] override: every
     colour is stated literally and the page carries its own world.       */

  --paper:        #0a2b21;   /* felt */
  --paper-2:      #0d3629;   /* felt, raised */
  --paper-3:      #071f18;   /* felt, recessed */
  --rule:         #1c5541;   /* stitching */
  --rule-strong:  #2f7a5e;

  --ink:          #f4ecd8;   /* chip cream */
  --ink-2:        #cbbfa2;
  --ink-3:        #8d9d8f;

  --accent:       #d8b25c;   /* brass rail */
  --accent-2:     #ffd68a;   /* brass, lit */
  --accent-wash:  #10402f;

  /* Red for a gain, green for a loss -- the East Asian convention (红涨绿跌),
     which is the opposite of the Western one. Set deliberately, not by
     accident: a reader who expects green-for-up will misread every number on
     this site, so the choice has to be conscious and consistent everywhere.
     The token names stay semantic (`pos` is still "went up") and only the
     colour they carry changes, so nothing downstream has to know. */
  --pos:          #ff6b5e;   /* up   — red */
  --neg:          #4fbf87;   /* down — green */
  --warn:         #e2b45c;
  --warn-wash:    #2a2113;

  --f-display: "Bodoni Moda", "Didot", "Playfair Display", Georgia, serif;
  --f-body:    "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono:    "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 34rem;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.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;
}

.shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ───────────── masthead ───────────── */

.masthead {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2.5rem 0 0;
}

.brand { display: flex; align-items: center; gap: 0.6rem; }

.brand-mark {
  width: 1.1rem; height: 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  flex: none;
}

.brand-name {
  font-family: var(--f-display);
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand-line {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: var(--measure);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.tab:hover { color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ───────────── views ───────────── */

.view { display: none; }
.view.is-active { display: block; animation: rise 260ms ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .view.is-active { animation: none; }
  * { transition-duration: 1ms !important; }
}

/* ───────────── scanline ───────────── */

.scanline {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.scanline-figure { margin: 0; font-size: 1rem; }
.scanline-figure strong { font-family: var(--f-mono); font-weight: 600; }
.scanline-note { margin: 0; color: var(--ink-3); font-size: 0.875rem; font-style: italic; }

/* ───────────── verdict panel ───────────── */

.verdict {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.75rem;
  padding: 1.1rem 1.2rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-3);
  background: var(--paper-2);
}

.verdict:empty { display: none; }
.v-fail { border-left-color: var(--neg); }
.v-pass { border-left-color: var(--pos); }

.v-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.v-fail .v-tag { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); }
.v-pass .v-tag { color: var(--pos); background: color-mix(in srgb, var(--pos) 12%, transparent); }

.v-h {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 400;
  line-height: 1.18;
  text-wrap: balance;
  max-width: 30ch;
}

.v-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.v-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--paper-3);
  padding: 0.75rem 0.85rem;
}

.v-col-h {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 0.3rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid var(--rule-strong);
}

.v-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.12rem 0;
}

.v-k { color: var(--ink-2); }
.v-v { font-weight: 600; }

.v-note {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.v-note strong { color: var(--ink); font-weight: 600; }

/* ───────────── the board (front-page table) ───────────── */

.board-wrap { overflow-x: auto; margin-top: 1.5rem; }

.board {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
}

.board thead th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

.board thead th.num { text-align: right; }

.board-row {
  cursor: pointer;
  transition: background 120ms ease;
}

.board-row > td {
  padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

.board-row:hover > td { background: var(--paper-3); }
.board-row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.board-row:hover .chev { color: var(--accent); transform: translateX(2px); }

.bc-stock { display: table-cell; }
.bt { display: block; font-size: 1rem; font-weight: 600; line-height: 1.25; }
.bt .sfx { color: var(--ink-3); font-weight: 400; }
.bn { display: block; font-size: 0.78rem; color: var(--ink-3); line-height: 1.3; }

.bw   { display: block; font-size: 0.88rem; line-height: 1.3; }
.bsrc { display: block; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); line-height: 1.5; }

.board .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board td.num { font-weight: 600; font-size: 0.92rem; }

.agebadge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}

.age-fresh { color: var(--pos);   background: color-mix(in srgb, var(--pos) 13%, transparent); }
.age-ok    { color: var(--ink-2); background: var(--paper-3); }
.age-slow  { color: var(--warn);  background: var(--warn-wash); }

.bc-go { width: 1.5rem; text-align: right; padding-right: 0 !important; }

.chev {
  display: inline-block;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink-3);
  transition: color 120ms ease, transform 120ms ease;
}

.board-hint {
  margin: 0.75rem 0 0;
  font-size: 0.83rem;
  font-style: italic;
  color: var(--ink-3);
}

.back {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.4rem 0 1rem;
  margin-top: 1.5rem;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
}

.back::before { content: "‹ "; font-size: 1.1em; }
.back:hover { text-decoration: underline; }
.back:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.prov {
  margin: 0.9rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.prov a { color: var(--accent); }

/* ───────────── receipts (idea cards) ───────────── */

.ideas {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1.5rem;
}

.receipt {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.25rem;
}

.receipt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.receipt-source { display: flex; flex-direction: column; gap: 0.1rem; }

.src-flag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.src-time { font-size: 0.78rem; color: var(--ink-3); }

.pill {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.pill-med  { color: var(--ink-2); }
.pill-high { color: var(--warn); background: var(--warn-wash); }

.receipt-id { display: flex; flex-direction: column; gap: 0.1rem; }

.tick {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.tick .sfx { color: var(--ink-3); font-weight: 400; }

.co { margin: 0; color: var(--ink-2); font-size: 0.9rem; }

.plain {
  margin: 0;
  max-width: var(--measure);
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--ink);
}

.plain strong { font-weight: 600; }

/* ───────────── freshness chain ───────────── */

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: 0.1em;
}

.dot-live { background: var(--pos); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 22%, transparent); }

.chain {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius);
  border-left: 2px solid var(--rule-strong);
  background: var(--paper-3);
}

.chain-fast { border-left-color: var(--pos); }
.chain-slow { border-left-color: var(--warn); }

.chain-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.chain-steps li {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  position: relative;
  padding-right: 1.4rem;
}

.chain-steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 0.85rem;
}

.chain-steps .cl { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.chain-steps .cv { font-size: 0.9rem; font-weight: 600; }

.chain-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--measure);
}

.chain-slow .chain-note strong { color: var(--warn); }
.chain-fast .chain-note strong { color: var(--pos); }

/* ───────────── can you act? ───────────── */

.act {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}

.act-h {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.act-row {
  display: grid;
  grid-template-columns: 1.1rem 8.5rem 1fr;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
}

.act-row .ak { color: var(--ink-2); }
.act-row .av { font-weight: 500; }
.act-row .av strong { font-weight: 600; color: var(--neg); }

.ic {
  width: 0.85rem; height: 0.85rem;
  border-radius: 50%;
  align-self: center;
  position: relative;
  flex: none;
}

.ic-yes  { background: color-mix(in srgb, var(--pos) 18%, transparent); border: 1px solid var(--pos); }
.ic-warn { background: var(--warn-wash); border: 1px solid var(--warn); }
.ic-no   { background: color-mix(in srgb, var(--neg) 15%, transparent); border: 1px solid var(--neg); }

.ic-yes::after {
  content: "";
  position: absolute; left: 0.24rem; top: 0.08rem;
  width: 0.22rem; height: 0.42rem;
  border: solid var(--pos);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.ic-no::after,
.ic-no::before {
  content: "";
  position: absolute; left: 0.35rem; top: 0.13rem;
  width: 1.5px; height: 0.5rem;
  background: var(--neg);
}
.ic-no::after  { transform: rotate(45deg); }
.ic-no::before { transform: rotate(-45deg); }

.ic-warn::after {
  content: "";
  position: absolute; left: 0.36rem; top: 0.15rem;
  width: 1.5px; height: 0.45rem;
  background: var(--warn);
  border-radius: 1px;
}

.act-alt {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.6rem;
  padding: 0.65rem 0.75rem;
  background: var(--accent-wash);
  border-radius: var(--radius);
}

.alt-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.act-alt p { margin: 0; font-size: 0.86rem; line-height: 1.55; max-width: var(--measure); }
.act-alt strong.mono { font-size: 0.95rem; }

/* ───────────── rejected signals ───────────── */

.rejects {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.rejects-h {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--ink-2);
}

.reject-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reject-list li {
  display: grid;
  grid-template-columns: 6.5rem 11rem 1fr;
  gap: 0.3rem 1rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.87rem;
}

.rj-tick { font-weight: 600; }
.rj-tick .sfx { color: var(--ink-3); font-weight: 400; }
.rj-why { color: var(--ink-3); font-size: 0.82rem; }
.rj-reason { color: var(--ink-2); }
.rj-reason strong { color: var(--ink); }

.rejects-note {
  margin: 0;
  max-width: var(--measure);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ───────────── the plan block ───────────── */

.plan {
  display: flex;
  flex-direction: column;
  background: var(--paper-3);
  border-radius: var(--radius);
  padding: 0.3rem 0.9rem;
}

.plan-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--rule-strong);
}

.plan-row:last-child { border-bottom: 0; }

.plan-row .k { font-size: 0.9rem; color: var(--ink-2); }

.plan-row .v {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: right;
  white-space: nowrap;
}

.plan-row .v em {
  font-style: normal;
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.75;
  margin-left: 0.3rem;
}

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.dim { color: var(--ink-3); }

/* ───────────── odds ledger ───────────── */

.odds {
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
}

.odds > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.odds > summary::-webkit-details-marker { display: none; }

.odds > summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 150ms ease;
}

.odds[open] > summary::before { transform: rotate(90deg); }
.odds > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.ledger {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.88rem;
}

.ledger th,
.ledger td {
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.ledger th { font-weight: 400; color: var(--ink-2); }
.ledger td { text-align: right; font-weight: 600; white-space: nowrap; }
.ledger tr:last-child th, .ledger tr:last-child td { border-bottom: 0; }
.ledger tr.worst th, .ledger tr.worst td { background: var(--paper-3); }
.ledger tr.thin td { color: var(--warn); }

.hint { font-family: var(--f-body); font-weight: 400; font-size: 0.78rem; color: var(--ink-3); }
.hint.warn { color: var(--warn); font-weight: 600; }

.wrong {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.9rem;
  background: var(--warn-wash);
  border-left: 2px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
}

.wrong strong { color: var(--warn); }

/* ───────────── disclaimer ───────────── */

.disclaimer {
  margin-top: 1.75rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
}

.disclaimer p { margin: 0; font-size: 0.87rem; line-height: 1.6; color: var(--ink-2); }
.disclaimer strong { color: var(--ink); }

/* ───────────── section heads ───────────── */

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 2rem 0 1.5rem;
}

.h-display {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 5.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}

.sub { margin: 0; max-width: var(--measure); color: var(--ink-2); font-size: 0.97rem; }

/* ───────────── summary stats ───────────── */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--paper-2);
  padding: 0.85rem 0.9rem;
}

.stat-k { font-size: 0.78rem; color: var(--ink-3); }
.stat-v { font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.stat-v em { font-style: normal; font-size: 0.85rem; font-weight: 400; opacity: 0.7; margin-left: 0.25rem; }

/* ───────────── tables ───────────── */

.table-scroll { overflow-x: auto; }

.calls {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.calls thead th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 0.7rem 0.5rem 0;
  border-bottom: 1px solid var(--rule-strong);
}

.calls tbody td {
  padding: 0.6rem 0.7rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.calls .num { text-align: right; padding-right: 0; }
.calls thead th.num { text-align: right; }
.calls tbody tr:hover td { background: var(--paper-3); }
.calls tr.dead td { color: var(--ink-3); }
.calls .dim { font-weight: 400; font-size: 0.82rem; }

.sources td strong { font-weight: 600; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-live  { color: var(--pos);   background: color-mix(in srgb, var(--pos) 12%, transparent); }
.tag-watch { color: var(--warn);  background: var(--warn-wash); }
.tag-dead  { color: var(--ink-3); background: var(--paper-3); }

.footnote {
  margin: 1.1rem 0 0;
  max-width: var(--measure);
  font-size: 0.83rem;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ───────────── callout ───────────── */

.callout {
  margin-top: 2rem;
  padding: 1.1rem 1.2rem;
  background: var(--accent-wash);
  border-radius: var(--radius);
}

.callout h3 {
  margin: 0 0 0.4rem;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.callout p { margin: 0; max-width: var(--measure); font-size: 0.92rem; line-height: 1.6; }

/* ───────────── lessons ───────────── */

.lessons {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: lesson;
}

.lessons li {
  counter-increment: lesson;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 2.6rem;
  position: relative;
}

.lessons li::before {
  content: counter(lesson);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.lessons h3 { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.lessons p  { margin: 0; max-width: var(--measure); color: var(--ink-2); font-size: 0.95rem; }

/* ───────────── footer ───────────── */

.foot {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 3.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.foot-mark { margin: 0; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.foot-note { margin: 0; font-size: 0.8rem; color: var(--ink-3); }

/* ═══════════════════════ the board ═══════════════════════
   Mobile first, and not as a courtesy: this is read on phones. Every pick is
   a self-contained card at 360px, and the wide two-column price layout is the
   enhancement that arrives when there is room for it. Nothing here sets a
   min-width, so nothing here can push the page sideways.
   No new tokens -- everything below is built from the existing palette.     */

.tote {
  border-top: 2px solid var(--rule-strong);
  padding-top: 1rem;
}

.tote-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0.4rem 0.75rem; margin-bottom: 0.75rem;
}
.tote-name {
  margin: 0; font-family: var(--f-body); font-size: 1rem;
  font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
}
.tote-lag {
  font-family: var(--f-mono); font-size: 0.7rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.tote-gate { margin-bottom: 1rem; }

.picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.pick {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.85rem 0.9rem;
  background: var(--paper-2);
}
.pick-none {
  color: var(--ink-3); font-size: 0.85rem; text-align: center;
  background: none; border-style: dashed;
}

.pick-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.15rem;
}
.pick-top .bt { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.pick-amt { font-size: 0.75rem; }

.pick-who {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem;
  margin-bottom: 0.7rem; font-size: 0.85rem;
}
.pick-who .bw { color: var(--ink-2); }
.pick-who .bsrc { color: var(--ink-3); font-size: 0.78rem; }

/* A filing is often the spouse's trade. Saying so is not a footnote. */
/* Now a phrase, not a code word, so it is set as text rather than shouted. */
.owner-tag {
  font-family: var(--f-body); font-size: 0.76rem; letter-spacing: 0;
  text-transform: none; font-style: italic; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.08rem 0.55rem;
}

/* The two prices. One column on a phone, side by side when there is room. */
.twoprice {
  display: grid; grid-template-columns: 1fr; gap: 0.3rem;
  padding: 0.6rem 0; border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.tp { display: flex; align-items: baseline; gap: 0.5rem; }
.tp-k {
  font-family: var(--f-mono); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
  flex: 0 0 5.2rem;
}
.tp-v { font-size: 0.95rem; color: var(--ink); }
.tp-d { font-size: 0.72rem; }
.tp-arrow { display: none; color: var(--ink-3); }

/* Never .pos/.neg: a wide gap is WORSE for the reader, so green would read
   exactly backwards and red already means "a loss you took". */
.tp-gap {
  margin: 0.55rem 0 0; font-size: 0.8rem; color: var(--ink-2);
}
.tp-gap-wide { color: var(--warn); }

.pick-meta {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem;
  margin-top: 0.6rem; font-size: 0.72rem;
}

.v-why {
  margin: 0.5rem 0 0; font-size: 0.78rem; line-height: 1.45;
}

/* Missing until now: app.js builds "pill pill-" + risk, so a low-risk pick
   rendered with no chip colour at all. Neutral, never green -- green is
   reserved for gain. */
.pill-low { color: var(--ink-2); background: var(--paper-3); }

@media (min-width: 34rem) {
  .twoprice {
    grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 0 1rem;
  }
  .tp { flex-direction: column; gap: 0.1rem; }
  .tp-k { flex: none; }
  .tp-arrow { display: block; font-size: 1rem; }
  .tp-you { text-align: right; }
  .tp-you .tp-k, .tp-you .tp-v, .tp-you .tp-d { align-self: flex-end; }
}

@media (max-width: 34rem) {
  .board { min-width: 0; }
  .calls { min-width: 0; }
  .board thead { display: none; }
  .board, .board tbody, .board tr, .board td { display: block; width: 100%; }
  .board tr { border-bottom: 1px solid var(--rule); padding: 0.6rem 0; }
  .board td { padding: 0.1rem 0; border: 0; }
  .board .bc-go { display: none; }
  .tote-gate { grid-template-columns: 1fr 1fr; }
  .shell { padding: 0 0.9rem 3rem; }
  .receipt { padding: 1rem; }
  .plan-row { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .plan-row .v { text-align: left; }
  .act-row { grid-template-columns: 1.1rem 1fr; row-gap: 0.1rem; }
  .act-row .av { grid-column: 2; }
  .reject-list li { grid-template-columns: 1fr; }
  .rj-why { order: -1; }
  .chain-steps li:not(:last-child)::after { display: none; }
  .chain-steps { gap: 0.5rem 1rem; }
}

/* ───────────── unproven rule + filer record ───────────── */

.tote-unproven { border-left: 3px solid var(--warn); padding-left: 0.9rem; }

.tote-headline {
  margin: 0.15rem 0 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  line-height: 1.25;
}

.tote-caveat {
  margin: 0.4rem 0 0;
  padding: 0.6rem 0.75rem;
  background: var(--warn-wash);
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: var(--measure);
}

.tote-dropped {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.5;
}

.rec {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px dotted var(--rule-strong);
}

.rec > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.rec > summary::-webkit-details-marker { display: none; }
.rec > summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 150ms ease;
  flex: none;
}
.rec[open] > summary::before { transform: rotate(90deg); }
.rec > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.rec-warn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-wash);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.5rem 0.9rem;
  margin-top: 0.7rem;
}

.rec-cell { display: flex; flex-direction: column; gap: 0.05rem; }
.rec-k { font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.03em; }
.rec-v { font-size: 0.95rem; font-weight: 600; }

.rec-note {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  max-width: var(--measure);
  color: var(--ink-2);
}

.rec-note.warn {
  color: var(--ink);
  background: var(--warn-wash);
  border-left: 2px solid var(--warn);
  padding: 0.5rem 0.7rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.rec-trades {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.rec-trades td {
  padding: 0.3rem 0.5rem 0.3rem 0;
  border-bottom: 1px solid var(--rule);
}

.rec-trades .num { text-align: right; padding-right: 0; }

/* ───────────── officials roster ───────────── */

.roster { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }

.roster > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.9rem; font-weight: 600; color: var(--accent);
}
.roster > summary::-webkit-details-marker { display: none; }
.roster > summary::before {
  content: ""; width: 0; height: 0; flex: none;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform 150ms ease;
}
.roster[open] > summary::before { transform: rotate(90deg); }
.roster > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.roster-list {
  display: flex; flex-direction: column; gap: 0;
  margin: 0.8rem 0 0; padding: 0; list-style: none;
}

.roster-item {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.roster-item:last-child { border-bottom: 0; }

.roster-top {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem;
}

.roster-name { font-size: 1rem; font-weight: 600; }
.roster-count { font-family: var(--f-mono); font-size: 0.78rem; white-space: nowrap; }

.roster-notes {
  margin: 0; max-width: var(--measure);
  font-size: 0.85rem; line-height: 1.55; color: var(--ink-2);
}

.roster-rec {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.4rem;
  margin: 0.25rem 0 0; font-size: 0.85rem;
}

.roster-stat { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.roster-k { font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.03em; }
.roster-v { font-weight: 600; }

p.roster-rec { color: var(--ink-3); font-size: 0.82rem; font-style: italic; }

/* ───────────── the odds board ─────────────
   A racetrack tote board: dark lacquer, brass rules, numerals lit from
   within. Committed to a single dark treatment in BOTH themes on purpose --
   an odds board that turns white in light mode stops reading as an odds
   board. Every colour here is therefore literal, not token-driven, and is
   chosen to sit on either page ground. */

.tote-gate {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  margin: 0.9rem 0 1.15rem;
  background: #6b5426;                 /* brass rules showing through */
  border: 1px solid #6b5426;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 214, 138, 0.14);
}

.odds-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem 0.9rem;
  background: #14110c;                 /* dark lacquer */
  background-image:
    linear-gradient(180deg, rgba(255, 214, 138, 0.05), transparent 42%);
}

.odds-k {
  font-family: var(--f-mono);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #b0975f;
}

.odds-v {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffd68a;
  text-shadow: 0 0 14px rgba(255, 190, 92, 0.28);
  font-variant-numeric: tabular-nums;
}

.odds-v.pos { color: #ff8f80; text-shadow: 0 0 14px rgba(255, 110, 92, 0.26); }
.odds-v.neg { color: #7ee0a6; text-shadow: 0 0 14px rgba(90, 214, 140, 0.26); }

.odds-sub {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #9a8a6a;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 34rem) {
  .tote-gate { grid-template-columns: 1fr; }
  .odds-v { font-size: 1.6rem; }
}

/* Echo of the board, one step quieter, for a single filer's record. */
.rec-grid {
  padding: 0.7rem 0.85rem;
  background: #14110c;
  border: 1px solid #4b3c1d;
  border-radius: var(--radius);
}
.rec-grid .rec-k { color: #9a8a6a; letter-spacing: 0.09em; text-transform: uppercase; font-size: 0.62rem; }
.rec-grid .rec-v { color: #ffd68a; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rec-grid .rec-v.pos { color: #ff8f80; }
.rec-grid .rec-v.neg { color: #7ee0a6; }
.rec-grid .rec-v.dim { color: #9a8a6a; }

/* A chip, not a badge. */
.rec-warn {
  border: 1px dashed currentColor;
  background: transparent;
}

.tote-headline {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ───────────── one official ───────────── */

.official {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.official:first-of-type { margin-top: 0.6rem; }

.official-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.7rem;
}

.official-name {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.15;
}

.official-role { font-size: 0.8rem; }

.official-warn {
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.75rem;
  background: var(--warn-wash);
  border-left: 2px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.83rem;
  line-height: 1.5;
  max-width: var(--measure);
}

.official .tote-gate { margin: 0.7rem 0 0.9rem; }

.official-vs {
  margin: -0.4rem 0 0.9rem;
  padding: 0.5rem 0.8rem;
  background: var(--paper-3);
  border-left: 2px solid var(--rule-strong);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: var(--measure);
}

.official-vs.good { border-left-color: var(--pos); }
.official-vs .mono { font-weight: 600; font-variant-numeric: tabular-nums; }
.official-vs-k { color: var(--ink-2); }

/* ───────────── the room ─────────────
   Felt weave under everything, brass rails on the furniture, and the
   display face set the way a casino sets it: high-contrast didone,
   generous letter-spacing, small caps for anything that labels money. */

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% -10%, #12503b 0%, transparent 60%),
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.012) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg,
      rgba(0,0,0,0.05) 0 2px, transparent 2px 4px);
  background-attachment: fixed;
}

.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-2);
  text-shadow: 0 1px 0 #6b5426, 0 0 22px rgba(255, 190, 92, 0.22);
}

.brand-mark { border-color: var(--accent-2); }

.brand-line, .sub, .scanline-note {
  font-family: var(--f-body);
  font-style: normal;
}

.h-display, .official-name, .callout h3, .v-h, .rejects-h {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* Anything that labels a number gets the marquee treatment. */
.stat-k, .odds-k, .rec-k, .roster-k, .v-col-h, .act-h, .alt-tag,
.src-flag, .foot-mark, .calls thead th, .board thead th, .tote-headline {
  font-family: var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Numerals are the point of the room. */
.mono, .odds-v, .stat-v, .rec-v, .tick, .bt {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* Cards become chips on felt: brass hairline, inner light, soft drop. */
.receipt, .tote, .official, .verdict, .summary-grid, .act, .disclaimer {
  border-color: var(--rule);
}

.receipt, .verdict {
  background: var(--paper-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 138, 0.10),
    0 10px 26px rgba(0, 0, 0, 0.35);
}

.tabs { border-bottom-color: var(--rule-strong); }
.tab { font-family: var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.76rem; }
.tab.is-active { color: var(--accent-2); border-bottom-color: var(--accent-2); }

.official {
  border-top: 1px solid var(--rule-strong);
}

.official-name {
  color: var(--accent-2);
  font-size: 1.7rem;
}

/* The board itself keeps its own lacquer, already defined above. */
.tote-gate { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,214,138,0.16); }

.picks .pick, .roster-item, .board-row > td, .calls tbody td {
  border-color: var(--rule);
}

.board-row:hover > td, .calls tbody tr:hover td { background: var(--accent-wash); }

a, .back, .odds summary, .rec > summary, .roster > summary { color: var(--accent-2); }

.foot { border-top-color: var(--rule-strong); }

.twoprice { flex-wrap: wrap; }
.tp-drift {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.45;
}
.tp-drift.tp-gap-wide { color: var(--warn); }

.official-sketch {
  margin: 0.3rem 0 0.2rem;
  max-width: var(--measure);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
  font-style: italic;
}

.roster-sketch {
  margin: 0.1rem 0 0.15rem;
  max-width: var(--measure);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink);
}

.just-in {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #14110c;
  background: linear-gradient(180deg, #ffd68a, #d8b25c);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 190, 92, 0.35);
}

/* ───────────── per-rule breakdown on the record page ───────────── */
.prule {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.4rem 1.2rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--rule);
}
.prule:last-child { border-bottom: 0; }
.prule-name { font-size: 0.98rem; font-weight: 600; }
.prule-stats { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; }
.prule-cell { display: inline-flex; flex-direction: column; align-items: flex-end; }
.prule-v { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.prule-k {
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
#record-per-rule { margin-bottom: 1.6rem; }

.gap { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.gap > summary {
  cursor: pointer; list-style: none; display: flex; flex-wrap: wrap;
  align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 600;
  color: var(--warn);
}
.gap > summary::-webkit-details-marker { display: none; }
.gap > summary::before {
  content: ""; width: 0; height: 0; flex: none;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform 150ms ease;
}
.gap[open] > summary::before { transform: rotate(90deg); }
.gap-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.gap-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.35rem 0; border-bottom: 1px solid var(--rule); font-size: 0.87rem;
}
.gap-list li:last-child { border-bottom: 0; }
.gap-name { font-weight: 500; }

.closed-by {
  display: flex; flex-direction: column; gap: 0.25rem;
  margin: 0.5rem 0 0; padding: 0.55rem 0.75rem;
  background: var(--warn-wash); border-left: 2px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.closed-by p { margin: 0; font-size: 0.85rem; line-height: 1.5; }
.closed-tag {
  align-self: flex-start; font-family: var(--f-mono);
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--warn);
}

.best-table .floor { color: var(--accent-2); font-weight: 600; }
.best-table td { vertical-align: baseline; }

.pick-option { border-left: 2px solid var(--accent); padding-left: 0.7rem; }
.opt-tag {
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-2);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 0.08rem 0.5rem; margin-left: 0.5rem;
}
.opt-note {
  margin: 0.4rem 0 0; font-size: 0.83rem; line-height: 1.5;
  color: var(--ink-2); max-width: var(--measure);
}

/* Leaderboard legibility: adjacent right-aligned numbers merge into one
   figure without generous gutters and a unit on each. "56" beside "91.1%"
   was reading as "5691.1%". */
.best-table { min-width: 46rem; }
.best-table th, .best-table td { padding-right: 1.6rem; }
.best-table th:last-child, .best-table td:last-child { padding-right: 0; }
.best-table .rank-cell { width: 2rem; padding-right: 0.9rem; }
.best-table .who-cell { font-weight: 600; white-space: nowrap; }
.best-table .role-cell { font-size: 0.8rem; white-space: nowrap; }
.best-table tbody tr:nth-child(odd) td { background: color-mix(in srgb, var(--paper-3) 55%, transparent); }
.unit {
  font-family: var(--f-body); font-size: 0.7rem; font-weight: 400;
  color: var(--ink-3); letter-spacing: 0; margin-left: 0.15rem;
}

/* A live quote announces itself; a close does not pretend to be one. */
.tp.is-live .pc-on { color: var(--pos); }
.tp.is-live .pc-px::after {
  content: ""; display: inline-block; width: 6px; height: 6px;
  margin-left: 0.4rem; border-radius: 50%; background: var(--pos);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 25%, transparent);
  vertical-align: 0.15em;
}
.pc-chg { display: block; font-size: 0.78rem; font-variant-numeric: tabular-nums; }

/* ───────────── the floor ───────────── */

.play-head {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 1.1rem 1.2rem; margin-bottom: 1.2rem;
  background: #14110c; border: 1px solid #6b5426; border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,214,138,0.16);
}
.play-k {
  font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #b0975f;
}
.play-total {
  font-size: 2.4rem; font-weight: 600; line-height: 1.05; color: #ffd68a;
  text-shadow: 0 0 16px rgba(255,190,92,0.28); font-variant-numeric: tabular-nums;
}
.play-delta { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.play-delta.pos { color: #ff8f80; }
.play-delta.neg { color: #7ee0a6; }
.play-cash { font-size: 0.85rem; color: #9a8a6a; margin-top: 0.15rem; }
.play-local {
  margin-top: 0.5rem; align-self: flex-start;
  font-size: 0.72rem; letter-spacing: 0.04em; color: var(--warn);
  border: 1px dashed var(--warn); border-radius: 999px; padding: 0.12rem 0.6rem;
}

.ticket {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1rem 1.1rem; margin-bottom: 1.4rem;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.ticket-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; }
.ticket-f { display: flex; flex-direction: column; gap: 0.2rem; flex: 1 1 8rem; }
.ticket-k {
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.ticket input {
  font-family: var(--f-mono); font-size: 1.15rem; padding: 0.5rem 0.6rem;
  background: var(--paper-3); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  text-transform: uppercase;
}
.ticket input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.ticket-est { margin: 0; font-size: 0.88rem; color: var(--ink-2); min-height: 1.2em; }

.btn {
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600; cursor: pointer;
  padding: 0.6rem 1.4rem; border-radius: var(--radius); border: 1px solid;
  background: transparent;
}
.btn-buy { color: #14110c; background: linear-gradient(180deg,#ff8f80,#e0574a); border-color: #e0574a; }
.btn-sell { color: #14110c; background: linear-gradient(180deg,#7ee0a6,#4fbf87); border-color: #4fbf87; }
.btn-quiet { color: var(--ink-3); border-color: var(--rule-strong); }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.play-msg { margin: 0; min-height: 1.2em; font-size: 0.87rem; }
.play-msg.is-good { color: var(--accent-2); }
.play-msg.is-bad { color: var(--warn); }

.play-table { min-width: 40rem; margin-top: 0.4rem; }
.mini-sell {
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; padding: 0.15rem 0.55rem;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  background: transparent; color: var(--ink-2);
}
.mini-sell:hover { color: var(--ink); border-color: var(--ink-3); }
#play-positions, #play-orders { overflow-x: auto; }

/* ───────────── sign in ───────────── */
.signin {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1rem 1.1rem; margin-bottom: 1.2rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-2);
}
.signin.is-in { flex-direction: row; align-items: center; justify-content: space-between; }
.signin-who { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.signin-av { width: 2rem; height: 2rem; border-radius: 50%; }
.signin-name { font-weight: 600; }
.signin-sub { font-size: 0.78rem; }
.signin-lead { margin: 0; font-size: 0.92rem; max-width: var(--measure); }
.signin-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.signin-email {
  flex: 1 1 14rem; font-family: var(--f-body); font-size: 0.95rem;
  padding: 0.55rem 0.7rem; background: var(--paper-3); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.btn-google { color: #14110c; background: linear-gradient(180deg,#ffd68a,#d8b25c); border-color: #d8b25c; }
.signin-note { margin: 0; font-size: 0.8rem; max-width: var(--measure); }
.signin-devlink { font-size: 0.85rem; color: var(--warn); }

/* ───────────── the bots ───────────── */
.bots { margin-top: 1.8rem; }
.bots-h {
  margin: 0 0 0.8rem; font-family: var(--f-display); font-size: 1.45rem;
  font-weight: 400;
}
.bot {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.9rem 0 1rem; border-top: 1px solid var(--rule);
}
.bot-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem;
}
.bot-name { font-size: 1.1rem; font-weight: 600; }
.bot-total { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bot-blurb { margin: 0; font-size: 0.87rem; color: var(--ink-2); max-width: var(--measure); }
.bot-cash { font-size: 0.8rem; }
