/* Watchtower — dark-first, Apple-calm surface, dense only one click down. */
:root {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232322;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --border: rgba(255, 255, 255, 0.10);
  /* the quietest rule we draw — separates rows inside a card without boxing them */
  --hair: rgba(255, 255, 255, 0.065);
  --accent: #3987e5;
  --spark: #3987e5;
  --up: #0ca30c;
  --down: #e66767;
  --critical: #d03b3b;
  --warning: #fab219;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(12px); z-index: 10;
}
.brand { font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a.active, .nav-links a:hover { color: var(--ink); }

/* On a phone the bar has more in it than the width can hold. The brand and the
   mailbox stay put; the search box and the links wrap to a second row, and the
   links scroll sideways rather than being clipped off the edge. */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px 12px; padding: 11px 14px; }
  .nav-right { flex: 1 1 100%; flex-wrap: wrap; gap: 10px 12px; }
  .search { order: 1; flex: 1 1 auto; min-width: 0; }
  .search input, .search input:focus { width: 100%; }
  .search-results { right: auto; left: 0; width: 100%; max-width: none; }
  .mailbox { order: 2; flex: none; }
  .nav-links {
    order: 3; flex: 1 1 100%; gap: 18px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  main { padding: 18px 14px 60px; }
}

/* header search — any ticker, tracked or not */
.search { position: relative; }
.search input {
  width: 210px; padding: 7px 12px; font-size: 13.5px; font-family: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; outline: none; transition: width 0.15s ease, border-color 0.12s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { width: 280px; border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) opacity(0.5); }
.search-results {
  position: absolute; top: calc(100% + 6px); right: 0; width: 340px; max-width: 78vw;
  list-style: none; margin: 0; padding: 4px; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.search-results li {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 9px;
  border-radius: 7px; cursor: pointer; font-size: 13px;
}
.search-results li.on { background: var(--surface-2); }
.search-results b { font-variant-numeric: tabular-nums; }
.sr-name {
  flex: 1; min-width: 0; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-kind {
  flex: none; font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sr-kind.mine { color: var(--accent); }

/* header mailbox — jobs reporting in, and reports waiting to be read */
.mailbox { position: relative; }
.mailbox-btn {
  position: relative; display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; font-size: 15px; line-height: 1;
  background: transparent; border: 1px solid transparent; border-radius: 9px;
  opacity: 0.65; cursor: pointer; transition: opacity 0.12s ease;
}
.mailbox-btn:hover { background: var(--surface); border-color: var(--border); opacity: 1; }
.mailbox.has-unread .mailbox-btn { opacity: 1; }
.mailbox-badge {
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px;
  padding: 0 4px; display: grid; place-items: center;
  font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums;
  color: #fff; background: var(--accent); border-radius: 9px;
}
.mailbox-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 82vw;
  padding: 6px; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.mailbox-section + .mailbox-section {
  margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--hair);
}
.mailbox-section h3 {
  padding: 5px 9px; font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.mailbox-hint {
  font-size: 10.5px; font-weight: 400; text-transform: none; letter-spacing: 0;
}
.mailbox-count {
  float: right; color: var(--accent); font-size: 10.5px; font-weight: 650;
  text-transform: none; letter-spacing: 0;
}
.mailbox-list { list-style: none; margin: 0; padding: 0; }
.mailbox-list a, .mb-static { display: block; padding: 7px 9px; border-radius: 7px; }
.mailbox-list a:hover { background: var(--surface-2); }
/* Title and pill share a line, the title yielding first — a long headline should
   ellipsis rather than push the one word that says whether you've read it. */
.mb-line { display: flex; align-items: baseline; gap: 8px; }
.mb-title {
  flex: 1; min-width: 0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mb-read .mb-title { color: var(--ink-2); }
.mb-detail {
  display: block; color: var(--ink-2); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mb-read .mb-detail { color: var(--muted); }
.mb-when { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; }
/* new vs seen — the same pill in both places it appears, panel and archive */
.mb-flag {
  flex: none; padding: 1px 7px; border-radius: 99px;
  font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em;
}
.mb-flag.is-new { color: #fff; background: var(--accent); }
.mb-flag.is-seen { color: var(--muted); background: var(--surface-2); }
.mailbox-empty { padding: 4px 9px 8px; color: var(--muted); font-size: 12.5px; }
.mailbox-all {
  display: block; margin-top: 5px; padding: 7px 9px; border-top: 1px solid var(--hair);
  color: var(--muted); font-size: 12px;
}
.mailbox-all:hover { color: var(--accent); }

/* the archive at /mailbox — the same rows the bell shows, all of them, kept */
.arch-list { list-style: none; margin: 0; padding: 0; }
.arch-row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: start; gap: 4px 16px;
  padding: 13px 0 13px 12px; border-bottom: 1px solid var(--hair);
}
.arch-row:last-child { border-bottom: none; }
/* Unread reads down the left edge as well as down the pill column — a rule you
   can follow with your eye, without tinting a whole row of otherwise plain text. */
.arch-row.is-new { box-shadow: inset 2px 0 var(--accent); }
.arch-when { padding-top: 3px; white-space: nowrap; }
.arch-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; }
.arch-title { font-size: 14px; font-weight: 550; }
a.arch-title:hover { color: var(--accent); }
.arch-detail { margin-top: 3px; }
.arch-tags { margin-top: 2px; font-size: 11px; }
.arch-tags a:hover { color: var(--accent); }
.arch-more { padding-top: 14px; }
/* On a phone the timestamp stops being a column and becomes the row's first
   line — the alternative is a 104px gutter eating a third of the headline. */
@media (max-width: 640px) {
  .arch-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 10px; }
  .arch-when { grid-column: 1 / -1; padding-top: 0; }
}

/* portfolio strip — three numbers, nothing more */
.pf-strip { display: flex; gap: 40px; padding: 22px 4px 26px; }
/* Four figures at phone width can't each hold a line of label. Two rows of two,
   with the labels given room to sit on one line. */
@media (max-width: 620px) {
  .pf-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; padding: 18px 2px 20px; }
  .pf-value { font-size: 22px; }
}
.pf-label { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.pf-value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }

.pf-lanes i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 5px; }

/* ladder meter — the countdown to the buy-now line, on the card itself.
   Empty at 25% above the line, full at it: how far the price still has to fall,
   with the MA rungs left to pass through marked along the way. */
.meter-slot:empty { display: none; }
.meter {
  position: relative; display: block; height: 4px; border-radius: 99px;
  background: var(--surface-2); overflow: hidden;
}
.meter-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 99px;
  background: var(--muted); transition: width 0.3s ease;
}
.meter.tone-warning .meter-fill { background: var(--warning); }
.meter.tone-critical .meter-fill { background: var(--critical); }
/* A rung still ahead reads through the track; one already crossed sits on the
   filled part and has to stay visible against it. */
.meter-tick {
  position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -0.5px;
  background: var(--page); opacity: 0.85;
}
.meter-tick.crossed { background: rgba(255, 255, 255, 0.55); }
[data-size="compact"] .meter-slot { display: none; }
@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }

/* attention strip */
.attention { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.attn-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.12s ease;
}
.attn-card:hover { transform: translateY(-1px); }
.attn-card.tone-critical { border-color: color-mix(in srgb, var(--critical) 55%, transparent); }
.attn-card.tone-warning { border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.attn-name { font-weight: 650; }
.attn-reason { color: var(--ink-2); font-size: 13.5px; }

/* tiered board */
.board-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px 14px; }
/* Squeezed between the controls, the note shreds into one word per line. Give it
   the full width above them instead — and on a touch screen drop the drag
   instructions entirely, since there is no dragging to explain. */
@media (max-width: 760px) {
  .board-bar { flex-wrap: wrap; gap: 10px; }
  .board-bar > .muted { flex: 1 1 100%; }
  .bar-controls { flex: 1 1 100%; justify-content: flex-end; }
}
@media (hover: none) {
  .board-note { display: none; }
}

.tier { margin-bottom: 26px; }
.tier-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 10px; flex-wrap: wrap; }
.tier-name { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-2); font-weight: 650; }
.tier-count {
  font-size: 11.5px; font-weight: 650; color: var(--muted); background: var(--surface-2);
  border-radius: 99px; padding: 1px 8px; font-variant-numeric: tabular-nums;
}
.tier-blurb { margin-left: auto; }

/* glance cards */
.cards {
  --card-min: 250px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: 14px;
  border-radius: var(--radius); transition: background 0.12s ease;
}
[data-size="compact"] .cards { --card-min: 172px; gap: 10px; }
[data-size="large"] .cards { --card-min: 340px; gap: 16px; }

.cards.is-empty {
  border: 1px dashed var(--grid); min-height: 74px; display: flex;
  align-items: center; justify-content: center;
}
.cards.is-empty::after { content: "Nothing here yet — drag a card in."; color: var(--muted); font-size: 13px; }
.cards.drop-active { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.cards.drop-active.is-empty { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.22); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: 0.35; transform: none; border-color: var(--accent); }
/* The slot the card will land in — shown before anything moves. */
.card.drop-target {
  transform: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

[data-size="compact"] .card { padding: 11px 12px 10px; gap: 8px; border-radius: 11px; }
[data-size="compact"] .card .spark { display: none; }
[data-size="compact"] .card-name { font-size: 13.5px; }
[data-size="compact"] .card-price { font-size: 15px; }
[data-size="compact"] .card-bottom { flex-direction: column; align-items: flex-start; gap: 5px; }

[data-size="large"] .card { padding: 20px 20px 18px; gap: 16px; }
[data-size="large"] .card-name { font-size: 17px; }
[data-size="large"] .card-price { font-size: 21px; }
[data-size="large"] .spark svg { width: 150px; height: 40px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-name { font-weight: 600; letter-spacing: -0.01em; }
.card-symbol { color: var(--muted); font-size: 12.5px; }
.spark svg { display: block; opacity: 0.9; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; }
.card-price { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chg { font-size: 12.5px; font-weight: 600; margin-left: 6px; }

/* remove control — out of the way until you go looking for it, on the card and
   at the end of the table row. Red only on hover: taking a name off is a choice,
   not a warning the board should be shouting all day. */
.card-x, .row-x {
  color: var(--muted); cursor: pointer; line-height: 1; user-select: none;
  display: grid; place-items: center; border-radius: 6px;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.card-x {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px;
  font-size: 15px; background: var(--surface); opacity: 0;
}
/* :focus, not :focus-visible — a control you have tabbed to has to be on screen. */
.card:hover .card-x, .card-x:focus { opacity: 1; }
.row-x { width: 20px; height: 20px; font-size: 14px; }
.card-x:hover, .row-x:hover, .card-x:focus, .row-x:focus {
  color: var(--down); background: var(--surface-2);
}
.tbl th.act, .tbl td.act { width: 24px; padding-right: 0; }
/* Nothing hovers on a touch screen, so the × has to stand on its own there. */
@media (hover: none) { .card-x { opacity: 0.55; } }

.up { color: var(--up); }
.down { color: var(--down); }

/* status chips — icon + label, never color alone */
.chip {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip.big { font-size: 13px; padding: 7px 14px; border: 1px solid var(--border); }
.chip.tone-critical { background: color-mix(in srgb, var(--critical) 22%, var(--surface-2)); color: #ffd9d9; }
.chip.tone-warning { background: color-mix(in srgb, var(--warning) 18%, var(--surface-2)); color: #ffe9b8; }

/* watchlist views — the board you arrange, the table you sort */
.bar-controls { display: flex; align-items: center; gap: 8px; }
[data-view="board"] .wl-table, [data-view="board"] .table-note,
[data-view="table"] .tier, [data-view="table"] .board-note,
[data-view="table"] .seg-size { display: none; }

/* live badge — quiet by default; only says something when it can't refresh */
.live {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 6px;
  color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.live-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--muted); }
.live[data-state="on"] .live-dot { background: var(--up); }
.live[data-state="wait"] .live-dot { opacity: 0.5; }
.live[data-state="off"] .live-dot { background: var(--warning); }

/* a figure that moved since the last pull, marked once and then left alone */
@keyframes tick-up { from { background: color-mix(in srgb, var(--up) 30%, transparent); } }
@keyframes tick-down { from { background: color-mix(in srgb, var(--down) 30%, transparent); } }
.tick-up { animation: tick-up 1.4s ease-out; border-radius: 6px; }
.tick-down { animation: tick-down 1.4s ease-out; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .tick-up, .tick-down { animation: none; }
}

.wl-tbl { margin-top: 2px; }
.wl-tbl th[data-key] { cursor: pointer; user-select: none; white-space: nowrap; }
.wl-tbl th[data-key]:hover { color: var(--ink); }
.wl-tbl th[data-key]:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.wl-tbl th[data-key]::after {
  content: "↕"; opacity: 0.35; font-size: 10px; margin-left: 5px;
}
.wl-tbl th[aria-sort="ascending"], .wl-tbl th[aria-sort="descending"] { color: var(--ink); }
.wl-tbl th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; color: var(--accent); }
.wl-tbl th[aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--accent); }
.wl-tbl th.setup-col { color: var(--ink-2); }
.wl-tbl td a:hover { color: var(--accent); }
.wl-tbl td .chip { margin-left: 6px; }
.wl-tbl td .muted.small { margin-left: 6px; }
.wl-tbl tbody tr:hover { background: var(--surface); }
.wl-tbl-foot { padding: 10px 8px 0; }

/* asset page */
.asset-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 8px 0 18px; flex-wrap: wrap; }
h1 { font-size: 26px; letter-spacing: -0.022em; font-weight: 700; }
.head-right { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.line-info { color: var(--ink-2); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; font-weight: 400; }

/* the dossier header: name and ticker, then the price, then the lookback rail */
.dossier-head { align-items: flex-start; padding: 6px 0 16px; }
.head-main { min-width: 0; }
.head-id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.head-id h1 { line-height: 1.15; }
.tick {
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.07em; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px;
  padding: 3px 8px; white-space: nowrap;
}
.asset-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.asset-price .px { font-size: 32px; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.asset-price .chg {
  margin: 0; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 650;
  background: var(--surface-2); font-variant-numeric: tabular-nums;
}
.asset-price .chg.up { background: color-mix(in srgb, var(--up) 18%, var(--surface-2)); }
.asset-price .chg.down { background: color-mix(in srgb, var(--down) 18%, var(--surface-2)); }
.px-meta { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.px-meta .asof { margin: 0; }
.head-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }

/* lookback gains under the price — the same windows the watchlist table ranks on.
   One segmented rail rather than six floating pairs: equal cells, hairline seams. */
.perf-rail {
  display: grid; grid-template-columns: repeat(6, minmax(74px, 1fr)); gap: 1px;
  width: fit-content; max-width: 100%; margin: 0 0 22px;
  background: var(--hair); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.perf { background: var(--surface); padding: 9px 16px; display: flex; flex-direction: column; gap: 2px; }
.perf-label { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; }
.perf-value { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
@media (max-width: 640px) {
  .perf-rail { grid-template-columns: repeat(3, 1fr); width: 100%; }
}
/* Stacked, the right-hand column is only as wide as its widest control, so
   right-alignment reads as a ragged indent. Lay it out as a row instead. */
@media (max-width: 700px) {
  .dossier-head .head-right {
    width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center;
    justify-content: flex-start; text-align: left; gap: 8px;
  }
  .dossier-head .line-info { flex: 1 1 100%; }
  .head-actions { margin-top: 0; }
}

/* interactive chart */
.chartwrap { margin-top: 4px; }
.chart-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 12px; }
.seg {
  display: flex; gap: 2px; padding: 3px; height: 32px; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.seg-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 620; min-width: 34px; padding: 0 9px;
  border-radius: 7px; white-space: nowrap; letter-spacing: 0.01em;
  transition: background 0.12s ease, color 0.12s ease;
}
.seg-btn.wide { min-width: 46px; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--surface-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
/* the view tools ride the far end of the bar, away from the range presets */
.chart-tools { margin-left: auto; }
.daybox {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 11px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); font-size: 10.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.daybox input {
  height: 24px; padding: 0 8px; font: inherit; font-size: 12.5px; font-weight: 650;
  color: var(--ink); background: var(--surface-2); border: 1px solid transparent;
  border-radius: 7px; font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0;
}
#daysInput { width: 62px; }
.daybox input:focus { outline: none; border-color: var(--accent); box-shadow: none; }

/* Window readouts — one seam-ruled rail. It never wraps: a lone stat dropping to
   a second line and stretching across the page reads as a mistake, so on a narrow
   screen the rail scrolls sideways instead. */
.chart-stats {
  display: flex; flex-wrap: nowrap; gap: 1px; margin: 0 0 14px;
  background: var(--hair); border: 1px solid var(--border);
  border-radius: 12px; overflow-x: auto; scrollbar-width: none;
}
.chart-stats::-webkit-scrollbar { display: none; }
.chart-stats .stat { flex: 1 0 106px; min-width: 106px; background: var(--surface); padding: 9px 12px; }
.chart-stats .stat:first-child { flex-basis: 208px; min-width: 208px; }
.chart-stats .stat span {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
}
.chart-stats .stat b {
  display: block; margin-top: 2px; font-size: 14px; font-weight: 650;
  font-variant-numeric: tabular-nums; letter-spacing: -0.015em;
}
.chart-stats .stat:first-child b { font-size: 12.5px; }
.chart-stats .stat b i { display: block; font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

#chart {
  position: relative; height: 480px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
#chart.measuring { cursor: crosshair; }
.chart-hint { padding: 10px 2px 0; font-size: 11.5px; color: var(--muted); }
.chart-hint b { color: var(--ink-2); font-weight: 650; }
.chart-hint kbd {
  font: inherit; font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 0 4px; color: var(--ink-2);
}

.chart-legend {
  position: absolute; left: 12px; top: 10px; z-index: 3; display: none;
  gap: 12px; align-items: baseline; flex-wrap: wrap; pointer-events: none;
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border); border-radius: 9px; padding: 5px 10px;
  backdrop-filter: blur(6px);
}
.chart-legend.show { display: flex; }
.chart-legend b { color: var(--ink); font-weight: 650; }

.chart-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: none; }
.chart-overlay.show { display: block; }
.msr-box { position: absolute; border: 1px solid; border-radius: 3px; }
.msr-box.up { border-color: var(--up); background: color-mix(in srgb, var(--up) 16%, transparent); }
.msr-box.down { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 16%, transparent); }
.msr-label {
  position: absolute; padding: 6px 10px; border-radius: 9px; color: #fff;
  font-size: 12px; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.msr-label.up { background: color-mix(in srgb, var(--up) 88%, #000); }
.msr-label.down { background: color-mix(in srgb, var(--critical) 88%, #000); }
.msr-label b { font-size: 15px; font-weight: 700; margin-right: 7px; }
.msr-label i { display: block; font-style: normal; font-size: 11px; opacity: 0.82; }
body.no-select { user-select: none; }

/* depth layer */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* The dossier's lower half: one card per subject, in two columns that each
   stack to their own content — no card is stretched to match its neighbour. */
.dossier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.dcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 940px) { .dossier-grid { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 18px; }
.panel h2 {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 650; margin: 0 0 13px;
}
/* a second subject inside one card gets a rule above it, not just more air */
.panel h2:not(:first-child) { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); }
.panel h2 .stamp, .panel h2 .live { margin-left: auto; }
.panel h2 .live { float: none; text-transform: none; letter-spacing: 0; }
.panel > .tbl-scroll + h2 { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; color: var(--muted); font-weight: 650; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0 10px 8px; border-bottom: 1px solid var(--hair); white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: none; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl .num, .tbl th.num { text-align: right; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.022); }
.tbl tr.row-buynow td { background: color-mix(in srgb, var(--critical) 13%, transparent); color: #ffd9d9; font-weight: 600; }
.tbl tr.row-buynow:hover td { background: color-mix(in srgb, var(--critical) 18%, transparent); }
.tbl tr.row-manual td { color: #ffe9b8; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 15px 18px; }
.facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.facts b { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.facts i { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.list { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.list.news a:hover { color: var(--accent); }
.list .muted { display: block; font-size: 12px; }

/* hairline-ruled rows — headlines, catalysts, journal lines, saved levels */
.rows { display: flex; flex-direction: column; gap: 0; }
.row-item { padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; line-height: 1.45; }
.row-item:last-child { border-bottom: none; }
.row-item:first-child { padding-top: 2px; }
.row-item .muted { margin-top: 2px; font-size: 11.5px; }
.list.news .row-item a { display: block; color: var(--ink); }
/* a dated line: the date holds its own column so the titles start level */
.list.cal .row-item { display: flex; gap: 12px; align-items: baseline; }
.row-date { flex: none; width: 82px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.list.cal .row-item .muted { display: inline; margin: 0; font-size: 12px; }

.note { font-size: 13.5px; color: var(--ink-2); margin: 8px 0; }
/* the small print that closes a card off */
.footnote { font-size: 12px; line-height: 1.5; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--hair); }
.ilink { color: var(--ink-2); border-bottom: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.ilink:hover { color: var(--accent); border-bottom-color: currentColor; }
.empty-page { max-width: 620px; margin: 40px auto; }
.empty-page h1 { font-size: 22px; margin-bottom: 10px; }
.empty-page .btn-ghost { display: inline-block; margin-top: 12px; }

/* forms */
.level-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px;
}
.level-row:last-child { border-bottom: none; }
.level-row > span { min-width: 0; }
.rows + .level-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair); }
.level-form, .trade-form, .close-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
/* a default-width number box is wide enough to break the row on its own */
.level-form input { flex: 0 1 112px; min-width: 0; }
.level-form input[type="date"] { flex: 0 1 150px; }
.level-form input.grow { flex: 1 1 180px; }
.level-form .btn { margin-left: auto; }
input, select, textarea {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 11px; font: inherit; font-size: 13.5px; line-height: 1.25;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input.wide { flex: 1 1 260px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.check { display: flex; gap: 7px; align-items: center; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.check input { padding: 0; box-shadow: none; }
.btn {
  background: var(--accent); border: none; color: #fff; font-weight: 620;
  padding: 8px 15px; border-radius: 9px; cursor: pointer; font-size: 13.5px; line-height: 1.25;
  transition: filter 0.12s ease;
}
.btn:hover { filter: brightness(1.09); }
.btn:active { filter: brightness(0.95); }
.btn-ghost {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px; line-height: 1.25;
  white-space: nowrap; transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn-ghost:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.2); }
.close-form input { width: 92px; }
/* The cost of the buy you are typing, on its own row under the fields — the one
   line in the form that is arithmetic rather than input, so it reads as such. */
.tf-calc {
  flex: 1 0 100%; margin: 0; font-variant-numeric: tabular-nums;
}
.tf-calc.warn { color: var(--warning); }
.form-err {
  margin: 10px 0; padding: 9px 13px; font-size: 13.5px; border-radius: 9px;
  background: color-mix(in srgb, var(--critical) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--critical) 40%, transparent); color: #ffd9d9;
}

/* price calls — guesses on any ticker, watched or not */
.calls-tbl input { width: 100px; }
.trade-form input.sym { width: 110px; text-transform: uppercase; }
.calls-tbl td form { display: inline; }
.calls-tbl .tier-count { margin-left: 4px; }
.panel h2 .live { margin-left: auto; text-transform: none; letter-spacing: 0; }
.call-settled { opacity: 0.45; }
.hit-bar {
  margin: 0 0 12px; padding: 11px 15px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--critical) 20%, var(--surface));
  border-left: 3px solid var(--critical); color: #ffd9d9;
}

/* scout */
.disc-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.disc-row:last-child { border-bottom: none; }
.disc-reason { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.disc-actions { display: flex; gap: 8px; align-items: center; }
.disc-main { min-width: 0; }
.disc-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.disc-nums { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.disc-sigs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag {
  font-size: 12px; padding: 2px 8px; border-radius: 7px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border);
}
.tag-trigger {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  color: var(--ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  font-weight: 600;
}
/* A row you just tracked: still readable, visibly dealt with, and it stays put
   until the next load so the inbox doesn't reshuffle under your next press. */
.disc-row.is-tracked .disc-main { opacity: 0.55; }
.track-note { flex: 0 1 240px; }
.track-note.is-error { color: var(--down); }
.spark-link { display: inline-flex; opacity: 0.8; }
.spark-link:hover { opacity: 1; }
.list.reasons { gap: 0; }
.list.reasons li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.list.reasons li:last-child { border-bottom: none; }
.list.reasons .reason-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13.5px; }
.list.reasons .reason-head .stamp { margin-left: auto; }
.list.reasons .muted { font-size: 12.5px; line-height: 1.45; padding-left: 14px; }

/* provenance: where a figure came from, quiet until you look for it */
.site-link {
  font-size: 12.5px; font-weight: 500; color: var(--muted); vertical-align: middle;
  border-bottom: 1px solid transparent; margin-left: 4px; white-space: nowrap;
}
.site-link:hover { color: var(--accent); border-bottom-color: currentColor; }
.cite { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.list.reasons .cite { padding-left: 14px; margin-top: 1px; }
.cite a { border-bottom: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.cite a:hover { color: var(--accent); border-bottom-color: currentColor; }
.list.cites { gap: 4px; margin-top: 8px; font-size: 12.5px; }
.list.cites a { color: var(--ink-2); border-bottom: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.list.cites a:hover { color: var(--accent); border-bottom-color: currentColor; }
.tbl th.src-col, .tbl td.src-col { text-align: right; font-size: 11px; color: var(--muted); white-space: nowrap; }
/* A four-column table has a min-content width a phone can't give it. Let the
   table scroll inside its panel instead of stretching the whole grid track. */
.tbl-scroll { overflow-x: auto; }
/* below this the labels shred into one word per line — scroll the table instead */
.tbl-scroll .tbl.thennow { min-width: 430px; }
.grid2 > * { min-width: 0; }
/* The same provenance repeats down the whole column; it stays legible but steps
   back until the eye is actually on that row. */
.tbl td.src-col a { border-bottom: 1px solid transparent; opacity: 0.5; transition: opacity 0.12s ease; }
.tbl tbody tr:hover td.src-col a { opacity: 1; }
.tbl td.src-col a:hover { color: var(--accent); border-bottom-color: currentColor; }

/* at-scout vs now: the frozen snapshot on the left, today on the right */
.stamp {
  font-size: 10.5px; font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--muted); border: 1px solid var(--border); border-radius: 6px;
  padding: 1px 7px; margin-left: 6px; white-space: nowrap;
}
.stamp.still { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, var(--border)); }
.stamp.gone { color: var(--muted); }
.tbl.thennow th i { display: block; margin-top: 2px; font-style: normal; font-size: 10px; opacity: 0.65; font-variant-numeric: tabular-nums; font-weight: 500; }
.tbl.thennow td { color: var(--ink-2); }
.tbl.thennow td.num { color: var(--ink); }
.tbl.thennow td.num.muted { color: var(--muted); font-weight: 400; }
.tbl.thennow td.moved { font-weight: 650; }
.tbl.thennow td:first-child { color: var(--ink-2); }

.scout-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin: 6px 0 18px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 12px; font-size: 13.5px;
}
.scout-banner .banner-main { min-width: 0; }

.score-pill {
  display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 8px;
  border-radius: 8px; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums;
  background: var(--surface-2);
}
.score-pill.s4, .score-pill.s5 { background: color-mix(in srgb, var(--up) 25%, var(--surface-2)); }
.score-pill.s3 { background: color-mix(in srgb, var(--accent) 25%, var(--surface-2)); }
.score-block { border-bottom: 1px solid var(--hair); }
.score-block:last-of-type { border-bottom: none; }
.score-block summary {
  cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none;
  padding: 9px 0; font-size: 13.5px;
}
.score-block summary::-webkit-details-marker { display: none; }
.score-block summary::after {
  content: "›"; margin-left: auto; color: var(--muted); font-size: 15px;
  transform: rotate(90deg); transition: transform 0.15s ease;
}
.score-block[open] summary::after { transform: rotate(-90deg); }
.score-block summary b { text-transform: capitalize; font-weight: 600; }
.score-block summary:hover b { color: var(--ink); }
.tbl.small { font-size: 12.5px; margin: 2px 0 12px; }
.tbl.small td { padding: 6px 10px; }

/* "what your winners had in common" — the criteria column carries the reading */
.edge-tbl td:first-child { color: var(--ink); }
.edge-tbl td.num i { display: block; font-style: normal; color: var(--muted); }

/* tuning — the weights behind each setup score, and the board they produce */
.tuning { display: flex; flex-direction: column; gap: 18px; }
.tune-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px 28px; }
.tune-setup h3 {
  display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650;
  padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--hair);
}
.tune-total {
  margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--muted);
  background: var(--surface-2); border-radius: 99px; padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.tune-setup.is-empty .tune-total { color: #ffd9d9; background: color-mix(in srgb, var(--critical) 30%, var(--surface-2)); }
.tune-row {
  display: grid; grid-template-columns: 1fr 96px 62px; gap: 10px;
  align-items: center; padding: 7px 0; font-size: 13px;
}
.tune-name { color: var(--ink-2); text-transform: capitalize; }
.tune-was { grid-column: 1 / -1; margin-top: -4px; }
.tune-num { padding: 5px 8px; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }

/* A range input styled to match the rest — the default control is a different
   design language and reads as browser chrome sitting in the page. */
.tune-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  padding: 0; background: var(--surface-2); border: none; border-radius: 99px; cursor: pointer; }
.tune-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: none; cursor: grab;
}
.tune-range::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent);
  border: none; cursor: grab;
}
.tune-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.tune-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair);
}
.tune-msg.is-error { color: var(--down); }
.tune-tbl td.num { font-variant-numeric: tabular-nums; }
.tuning .head-right form { margin: 0; }

/* glossary tooltips */
.info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; padding: 0; margin-left: 5px;
  border: 1px solid var(--border); border-radius: 50%;
  background: none; color: var(--muted); cursor: help;
  font: inherit; font-size: 10px; font-weight: 700; line-height: 1;
  vertical-align: middle; flex: none;
  opacity: 0.5; transition: opacity 0.12s ease, color 0.12s ease;
}
.info:hover, .info[aria-expanded="true"] { opacity: 1; color: var(--ink); border-color: var(--muted); background: var(--surface-2); }
.info:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.tip {
  position: absolute; z-index: 100; max-width: 330px;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; font-size: 13px; line-height: 1.45;
  box-shadow: 0 12px 34px rgba(0,0,0,0.55);
}
.tip-term { color: var(--ink); font-weight: 650; font-size: 13.5px; margin-bottom: 4px; }
.tip-formula {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--grid);
  color: var(--muted); font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* glossary page */
.gl-group { margin-bottom: 26px; }
.gl-item { padding: 12px 0; border-bottom: 1px solid var(--grid); }
.gl-item:last-child { border-bottom: none; }
.gl-term { font-weight: 650; color: var(--ink); margin-bottom: 3px; }
.gl-body { color: var(--ink-2); font-size: 14px; }
.gl-formula {
  margin-top: 6px; color: var(--muted); font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* agent research panel */
.research h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.research-btn { margin-left: auto; flex: none; }
.research-btn:disabled { cursor: progress; opacity: 0.65; }
.research-msg { color: var(--muted); }
.research-msg.is-error { color: var(--down); }
.research.is-running [data-research="body"] { opacity: 0.45; }

/* "Scout again" — another discovery pass, on demand */
.scout-run-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scout-run-head .btn { flex: none; }
.scout-run-head .btn:disabled { cursor: progress; opacity: 0.65; }
.scout-run-head span { flex: 1 1 320px; }
.scout-msg { color: var(--muted); margin-bottom: 0; }
.scout-msg.is-error { color: var(--down); }
.list.small li { font-size: 13px; }

/* ---- Ask about this name ------------------------------------------------ */
/* A conversation panel, not a chat app: the transcript reads as prose in the
   page rather than as coloured bubbles on a wall. */
.chat { margin-top: 18px; }
.chat h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chat h2 .small { font-weight: 400; }
.ask-link { flex: none; }

.chat-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--hair);
}
.chat-bar-gap { flex: 1 1 auto; }
.chat-threads, .chat-model { display: flex; align-items: center; gap: 7px; }
.chat-threads select { max-width: 320px; }
.chat-bar select { padding: 5px 8px; font-size: 13px; }
.chat-bar .btn-ghost { padding: 5px 11px; font-size: 13px; }
.chat-bar .btn-ghost:disabled { opacity: 0.4; cursor: default; }

.chat-log { display: flex; flex-direction: column; gap: 16px; max-height: 62vh; overflow-y: auto; }
.chat-log:not(:empty) { padding: 16px 2px; }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg-who {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); display: flex; align-items: center; gap: 8px;
}
.msg-model { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.msg-you .msg-body {
  color: var(--ink); background: var(--surface-2); border-radius: 10px;
  padding: 9px 12px; align-self: flex-start;
}
.msg-body { color: var(--ink-2); font-size: 14.5px; }
.msg-body p, .think-body p { margin: 0 0 9px; }
.msg-body p:last-child, .think-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol, .think-body ul, .think-body ol { margin: 0 0 9px; padding-left: 20px; }
.msg-body li, .think-body li { margin-bottom: 3px; }
.msg-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.msg-body code, .think-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: var(--surface-2); padding: 1px 5px; border-radius: 5px;
}
.msg-body .md-h { margin-top: 12px; }
.msg-body .md-h:first-child { margin-top: 0; }

/* Reasoning is opt-in: hidden entirely unless the toggle is on. */
.msg-think { display: none; }
.chat.show-think .msg-think { display: block; }
.msg-think summary {
  cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 2px 0;
  list-style: none;
}
.msg-think summary::before { content: "▸ "; }
.msg-think[open] summary::before { content: "▾ "; }
.think-body {
  color: var(--muted); font-size: 13px; margin: 4px 0 8px;
  padding-left: 11px; border-left: 2px solid var(--grid);
}

.msg.is-pending .msg-body:empty { display: none; }
.msg-activity { color: var(--muted); font-size: 12.5px; }
.msg-activity::after {
  content: ""; display: inline-block; width: 4px; height: 4px; margin-left: 6px;
  border-radius: 50%; background: var(--muted); animation: chat-pulse 1.1s infinite ease-in-out;
}
@keyframes chat-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.chat-empty { font-size: 13.5px; padding: 16px 0; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip-btn {
  font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px;
}
.chip-btn:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.2); }
.chat-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { flex: 1 1 auto; resize: vertical; min-height: 46px; font-size: 14px; }
.chat-form .btn { flex: none; }
.chat.is-running .chat-form .btn { cursor: progress; opacity: 0.65; }
.chat-foot { margin-top: 10px; font-size: 12.5px; }
.chat-msg { display: block; color: var(--muted); margin-bottom: 4px; }
.chat-msg.is-error { color: var(--down); }

@media (max-width: 700px) {
  .chat-threads select { max-width: 44vw; }
  .chat-bar-gap { flex-basis: 100%; }
}
.think-none { color: var(--muted); font-size: 12.5px; font-style: italic; }

/* journal ------------------------------------------------------------------
   Three books on one page. The tabs are the only navigation, so they carry the
   counts — you should be able to tell there is something in the simulated book
   without opening it. */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--border);
  border-radius: 99px; padding: 7px 15px; font: inherit; font-size: 13.5px; font-weight: 600;
}
.tab:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.2); }
.tab[aria-current] { background: var(--surface-2); color: var(--ink); border-color: rgba(255, 255, 255, 0.24); }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }
.tab-panel[hidden] { display: none; }

.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-head h2 { margin-bottom: 0; }

/* One position per row, hairline-separated rather than boxed — a book reads as a
   list, and boxing every entry would make five positions look like five pages. */
.pos-list { display: flex; flex-direction: column; }
.pos { padding: 14px 0; border-top: 1px solid var(--hair); }
.pos-list > .pos:first-child { border-top: 0; padding-top: 4px; }

/* The mark and the P&L sit in fixed columns so the numbers line up down the page
   — comparing two positions should not require reading two labels. */
/* The last column is reserved rather than left to fend for itself: the close
   form is the one control here, and wrapping it onto a second line doubles the
   height of every open row. */
.pos-head {
  display: grid; gap: 4px 14px; align-items: baseline;
  grid-template-columns: minmax(130px, 0.9fr) minmax(140px, 1fr) 104px 128px minmax(330px, auto);
}
.pos-id { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pos-id a:hover { color: var(--accent); }
.pos-mark { font-variant-numeric: tabular-nums; font-size: 15px; }
.pos-pnl { font-variant-numeric: tabular-nums; font-weight: 650; display: flex; gap: 7px; justify-content: flex-end; }
.pos-pnl .muted { font-weight: 400; }
.pos-act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* the shared form rules push a top margin that would break the row here */
.pos-act .close-form, .pos-act form { margin-top: 0; }
.pos-act .btn-ghost { margin-top: 0; }
.pos-act .close-form { flex-wrap: nowrap; }
.pos-act input[type="text"] { flex: 0 1 84px; min-width: 0; }
.pos-act input[type="date"] { flex: 0 1 138px; min-width: 0; }
.pos-thesis { font-size: 13.5px; margin: 6px 0 0; }

.badge {
  font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted);
}
.badge-conviction { background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); color: #cfe1fb; }
.dot-open { width: 6px; height: 6px; border-radius: 99px; background: var(--up); }

/* Levels hang off the position they belong to — indented under it, so the page
   reads as "this position, and the two things I said about it". */
.pos-levels { margin: 8px 0 0 2px; padding-left: 12px; border-left: 2px solid var(--hair); }
.lvl { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; flex-wrap: wrap; }
.lvl-what { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.lvl-dist { margin-left: auto; font-variant-numeric: tabular-nums; }
.lvl form { margin-top: 0; }
.lvl .btn-ghost { margin-top: 0; }
.lvl-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair);
            display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lvl-form input { flex: 0 1 112px; min-width: 0; }
.lvl-form input[type="date"] { flex: 0 1 150px; }
.lvl-form input.grow { flex: 1 1 180px; }

@media (max-width: 820px) {
  /* Stacked, the fixed columns stop helping — but the mark and the P&L still
     belong on one line together, since neither means much without the other. */
  .pos-head { grid-template-columns: 1fr auto; }
  .pos-id { grid-column: 1; }
  .pos-mark { grid-column: 2; text-align: right; }
  .pos-size { grid-column: 1; }
  .pos-pnl { grid-column: 2; }
  .pos-act { grid-column: 1 / -1; justify-content: flex-start; margin-top: 6px; }
  .lvl-dist { margin-left: 0; flex-basis: 100%; }
}

/* arena — the game layer. Quiet on purpose: the charter bans dashboard-widget
   kitsch, so progress is one bar, one curve and plain counts — no gauges. */
a.tab { text-decoration: none; }
.acct-picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.acct-chip { text-decoration: none; }
.acct-chip.acct-current {
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-2));
  color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.acct-new summary { cursor: pointer; list-style: none; }
.acct-new summary::-webkit-details-marker { display: none; }
.acct-new[open] { flex-basis: 100%; }
.arena-stats .pf-goal { min-width: 240px; }
.arena-goalbar { margin: 9px 0 6px; height: 6px; }
.arena-goalbar .meter-fill { background: var(--accent); }
.arena-chart svg { width: 100%; height: auto; display: block; }
.legend-swatch { display: inline-block; width: 18px; vertical-align: middle; margin-right: 4px; }
.legend-you { height: 2px; background: var(--accent); }
.legend-bench { height: 0; border-top: 2px dashed var(--muted); }
.arena-buy-head { margin: 24px 0 0; font-size: 15px; }
.adh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 34px; }
.adh-grid h3 { font-size: 14px; margin: 4px 0 8px; }
.adh-row {
  display: flex; justify-content: space-between; gap: 14px; padding: 7px 0;
  border-bottom: 1px solid var(--hair); font-size: 14px;
}
.adh-row b { font-variant-numeric: tabular-nums; }
.arena-manage-forms { display: flex; flex-direction: column; gap: 2px; }
.pos-acct { margin: 12px 0 -8px; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
@media (max-width: 620px) {
  .adh-grid { grid-template-columns: 1fr; }
  .arena-stats .pf-goal { min-width: 0; }
}

/* account statement + prominent balance. The topbar chip is the one number a
   brokerage greets you with — quiet, tabular, everywhere. */
.acct-bal {
  display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none;
  color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650;
  font-size: 14px; padding: 5px 12px; border: 1px solid var(--border);
  border-radius: 99px; background: var(--surface);
}
.acct-bal i { font-style: normal; font-weight: 600; font-size: 12px; }
.acct-bal:hover { border-color: rgba(255, 255, 255, 0.22); }
.pf-account .pf-link { text-decoration: none; color: var(--ink); }
.pf-account .pf-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.pf-day { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pf-sub { font-style: normal; font-size: 13px; font-weight: 550; margin-left: 6px; }
.stmt-tbl td .badge { margin-left: 6px; }
.stmt-cash td { border-top: 1px solid var(--border); color: var(--ink-2); }
@media (max-width: 700px) { .acct-bal i { display: none; } }

/* sign in and register — the only pages that render without the nav */
.gate { max-width: 340px; margin: 14vh auto; text-align: center; padding: 0 20px; }
.gate h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.gate > p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
/* Every field, not just the password one — a login form whose two boxes are
   different widths looks broken before anyone has typed anything. */
.gate input {
  display: block; width: 100%; padding: 11px 14px; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; outline: none;
}
.gate input + input { margin-top: 8px; }
.gate input:focus { border-color: var(--accent); }
.gate button {
  width: 100%; margin-top: 12px; padding: 11px; font-size: 15px; font-weight: 600;
  color: #fff; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer;
}
.gate button:hover { filter: brightness(1.09); }
.gate .err { color: var(--down); font-size: 13px; margin-top: 12px; }
.gate-foot { color: var(--muted); font-size: 12.5px; margin-top: 18px; line-height: 1.6; }
.gate-foot a { color: var(--accent); }

/* admin — one card per job, read top to bottom: what it is, what it's for,
   when it last happened, and whether it has a time. The explanation is the
   point of the page, so it gets the width and the button gets the corner. */
.adm-server-grid { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 6px; }
.adm-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
.adm-v { font-size: 14px; font-weight: 550; margin-top: 2px; }
.adm-v.is-error { color: var(--down); }
.adm-server .note { max-width: 78ch; margin-top: 14px; }

.adm-task { margin-top: 14px; }
.adm-task .panel-head { margin-bottom: 12px; }
.adm-task h2 { gap: 10px; }
.adm-status { text-transform: none; letter-spacing: 0; font-weight: 550; }
.adm-status.tone-quiet { background: var(--surface-2); color: var(--ink-2); }
.adm-actions { display: flex; gap: 8px; align-items: center; }
.btn:disabled { opacity: 0.55; cursor: progress; filter: none; }

.adm-body { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.adm-copy { flex: 1 1 460px; }
.adm-does { font-size: 14px; color: var(--ink-2); }
/* The sentence that decides whether to press the button reads as ink, not as a
   caption — it is the one line on the card someone actually needs. */
.adm-when { font-size: 14px; margin-top: 9px; }
.adm-cost { margin-top: 7px; }
.adm-side { flex: 0 0 230px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.adm-summary { margin-top: 3px; }
.adm-hist-btn { align-self: flex-start; }

.adm-sched {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair);
}
.adm-sched-off { padding-top: 14px; }
.adm-time, .adm-tz {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
}
/* The zone sits with the time it qualifies. Wide enough for the names actually
   offered — a clipped "America/New Yo…" reads as a bug — and allowed to shrink
   first on a narrow card, where the next-fire line repeats it in full anyway. */
.adm-tz { max-width: 19ch; min-width: 0; }
.adm-next { margin-left: auto; }
.adm-hist {
  margin-top: 14px; padding: 13px 15px; max-height: 380px; overflow: auto;
  background: var(--page); border: 1px solid var(--hair); border-radius: 10px;
  font-size: 12px; line-height: 1.55; white-space: pre-wrap; color: var(--ink-2);
}
@media (max-width: 760px) {
  .adm-side { flex-basis: 100%; }
  .adm-next { margin-left: 0; flex-basis: 100%; }
}

/* the position panel on a dossier — "do I own this" answered before anything
   else on the page, and acted on without leaving it */
.pos-panel .panel-head { margin-bottom: 14px; }
.pos-book { margin-bottom: 16px; }
.pos-book + .pos-book { padding-top: 16px; border-top: 1px solid var(--hair); }
.pos-book-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.pos-book-head .pos-qty { font-size: 16px; }
.pos-book-value { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
/* The gain is the sentence the panel exists to say, so it sits at the end of
   the line where the eye lands, not buried mid-row. */
.pos-book-pnl { margin-left: auto; display: flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; }
.badge-real { background: color-mix(in srgb, var(--accent) 26%, var(--surface-2)); color: #d6e6ff; }
.badge-paper { background: var(--surface-2); color: var(--ink-2); }
.pos-tbl td .badge { margin-left: 6px; }
.pos-tbl .muted.small { margin-left: 5px; }

.pos-actions { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.pos-actions > form {
  flex: 1 1 380px; padding: 14px 15px 15px;
  background: var(--page); border: 1px solid var(--hair); border-radius: 11px;
}
.pos-actions h3 {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 650; margin: 0 0 10px; width: 100%;
}
.pos-panel > h2 { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); }
.pos-panel .pos-list { margin-top: -4px; }
.tf-calc.warn { color: var(--warning); }
@media (max-width: 700px) {
  .pos-book-pnl { margin-left: 0; flex-basis: 100%; }
}

/* which bar width the chart is on, said only when it isn't the daily default */
.chart-res { align-self: center; }
.chart-res.is-warn { color: var(--warning); }

/* the not-advice line: present on every page, quiet enough to live there */
.site-foot {
  max-width: 1180px; margin: 0 auto; padding: 28px 20px 40px;
  border-top: 1px solid var(--hair); color: var(--muted);
  font-size: 12px; line-height: 1.6;
}

/* the same thing at signup, where it has to actually be read */
.terms {
  margin-top: 14px; padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--ink-2); font-size: 12.5px; line-height: 1.55;
}
.terms p { margin: 0 0 8px; }
.terms p:last-child { margin-bottom: 0; }
.terms b { color: var(--ink); }
.terms-ok { margin-top: 12px; justify-content: center; font-size: 13px; }
.terms-ok input { width: auto; }

/* the reference on an error page — meant to be read aloud or copied */
.err-ref {
  display: inline-block; margin-top: 6px; padding: 4px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 7px; font-size: 15px; letter-spacing: 0.08em; color: var(--ink);
}

/* the terms page — long text wants a measure, not the full grid width */
.legal { max-width: 62ch; margin: 0 auto; padding: 32px 20px 80px; }
.legal h1 { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.legal h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 650; margin: 28px 0 8px;
}
.legal p { margin-bottom: 10px; color: var(--ink-2); line-height: 1.65; }
.legal b { color: var(--ink); }
.legal a { color: var(--accent); }
.legal-foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--hair); }
/* Visible, not decorative: it is there to stop unreviewed wording going live
   unnoticed, so it has to be the first thing on the page. */
.draft-banner {
  margin: 16px 0 26px; padding: 12px 15px; border-radius: 10px; font-size: 13.5px;
  line-height: 1.6; color: #ffe9b8;
  background: color-mix(in srgb, var(--warning) 16%, var(--surface));
  border-left: 3px solid var(--warning);
}

/* deleting an account: the one place in this app that warrants a red button */
.panel.danger { border-color: color-mix(in srgb, var(--critical) 40%, var(--border)); }
.panel.danger h2 { color: #ffd9d9; }
.danger-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.danger-form .check { flex-direction: column; align-items: flex-start; gap: 5px; }
.danger-form input[type=text] {
  padding: 9px 12px; font-size: 14px; color: var(--ink); min-width: 260px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
}
.btn-danger {
  background: var(--critical); border: none; color: #fff; font-weight: 620;
  padding: 9px 16px; border-radius: 9px; cursor: pointer; font-size: 13.5px;
}
.btn-danger:hover { filter: brightness(1.1); }
.site-foot a { color: var(--muted); text-decoration: underline; }

/* --- who you are ---------------------------------------------------------- */
/* The account in the nav, on every page. Local part only: a full address is
   half the width of the bar on a phone, and the domain is the part nobody is
   uncertain about. The dot carries the admin distinction so the two accounts
   are told apart at a glance rather than by reading. */
.whoami { display: inline-flex; align-items: center; gap: 6px; }
.whoami-dot {
  width: 6px; height: 6px; border-radius: 99px; background: var(--muted);
  flex: none;
}
.whoami:hover .whoami-dot { background: var(--ink-2); }
.whoami-dot.is-admin { background: var(--accent); }

.badge-admin { background: color-mix(in srgb, var(--accent) 26%, var(--surface-2)); color: #d6e6ff; }

/* Label/value pairs that stay readable when the value is an email address — a
   table would give the labels a column as wide as the longest value, and the
   stat-tile `.facts` above wraps its cells into columns, which an address in
   one of them makes a mess of. */
.id-rows { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hair); border-radius: 10px; overflow: hidden; }
.id-rows > div {
  display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
  background: var(--surface); padding: 9px 12px;
}
.id-rows dt { color: var(--muted); font-size: 12.5px; min-width: 116px; }
/* Not flex: a value is a sentence with a badge or a link in it, and flex would
   put a gap between every word-level element in it. */
.id-rows dd { color: var(--ink); font-size: 13.5px; min-width: 0; }
.id-rows dd .badge { margin-left: 7px; vertical-align: 1px; }
/* On a phone the label column costs more than it buys: an address or a
   sentence wraps under it anyway, so only some rows end up two lines and the
   list reads as ragged. Below this width every row is label-then-value. */
@media (max-width: 560px) {
  .id-rows > div { flex-direction: column; gap: 2px; }
  .id-rows dt { min-width: 0; }
}

.stack-form { display: flex; flex-direction: column; gap: 12px; max-width: 340px; margin-top: 14px; }
.stack-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.stack-form input {
  padding: 9px 12px; font-size: 14px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
}
.stack-form input:focus { border-color: var(--accent); outline: none; }
.stack-form .btn { align-self: flex-start; margin-top: 2px; }

.tbl tr.row-this td { background: rgba(255, 255, 255, 0.03); }
.after-table { margin-top: 14px; }

/* The answer to "did that work?", said once at the top and not in a colour that
   makes a routine success look like an alarm. */
.flash-ok, .flash-err {
  font-size: 13.5px; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px;
  border: 1px solid var(--border); background: var(--surface);
}
.flash-ok { border-left: 3px solid var(--up); }
.flash-err { border-left: 3px solid var(--critical); color: #ffd9d9; }

.panel.denied { max-width: 620px; }
.panel.denied h1 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.cmd {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 13px; margin: 10px 0; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; color: var(--ink-2);
}

/* ---- Today: the market-clock home ---------------------------------------- */
.today-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.today-title { font-size: 26px; letter-spacing: -0.02em; }
.today-phase { color: var(--ink-2); margin-top: 2px; }
.today-nav { display: flex; align-items: center; gap: 8px; }
.day-arrow {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid var(--border); border-radius: 9px; color: var(--ink-2);
  font-size: 17px; line-height: 1;
}
.day-arrow:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.25); }
.day-arrow.is-off { opacity: 0.3; pointer-events: none; }
.day-pick input[type="date"] {
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 4px 8px; font: inherit; font-size: 13px; color-scheme: dark;
}
.today-tabs {
  display: flex; gap: 4px; margin-bottom: 22px; flex-wrap: wrap;
  border-bottom: 1px solid var(--hair); padding-bottom: 0;
}
.today-tab {
  padding: 8px 14px 10px; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.today-tab:hover { color: var(--ink); }
.today-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grid); display: inline-block;
}
.tab-dot.is-due { background: var(--warning); }

.report-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.report-headline { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 14px; }
.report-sec { margin: 0 0 26px; }
.report-sec-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 8px; font-weight: 600;
}
.report-line { margin: 4px 0; color: var(--ink-2); }
.report-empty {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; color: var(--ink-2);
  display: grid; gap: 12px; justify-items: center;
}
.session-board { margin-top: 6px; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }

/* ---- day-cycle report internals ------------------------------------------ */
.ctx-strip { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.ctx-chip {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 9px; padding: 5px 10px; font-size: 13px;
  font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap;
}
.cand {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px;
}
.cand-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.cand-name { font-size: 15.5px; }
.cand-level { font-size: 17px; font-variant-numeric: tabular-nums; }
.cand-badges { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.odds-tbl { font-size: 12.5px; margin: 8px 0 2px; }
.odds-tbl th, .odds-tbl td { padding: 5px 8px; }
.cand-more { margin-top: 8px; }
.cand-more summary {
  cursor: pointer; color: var(--muted); font-size: 12.5px;
  -webkit-user-select: none; user-select: none;
}
.cand-more summary:hover { color: var(--ink-2); }
.cand-more[open] summary { color: var(--ink-2); margin-bottom: 6px; }
.cand-comps { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.cand-comps li { margin: 2px 0; }
.agent-note { border-left: 2px solid var(--accent); padding-left: 10px; }
tr.is-hot td { background: color-mix(in srgb, var(--warning) 9%, transparent); }
tr.is-hot td:first-child { box-shadow: inset 2px 0 0 var(--warning); }
