/* EDGE shadow desk — a trading-floor console for frozen prospective studies. */

:root {
  --bg: #121418;
  --bg-2: #171a1f;
  --card: #1b1e24;
  --card-2: #20242b;
  --line: #2a2f38;
  --line-2: #343a45;
  --ink: #e7eaf0;
  --ink-2: #b4bac6;
  --dim: #7d8594;
  --good: #3ddc84;
  --good-2: #22a35e;
  --bad: #ff5a4f;
  --warn: #e8b44b;
  --info: #4da3ff;
  --orange: #ff7a1a;
  --purple: #b37bff;
  --cyan: #22d3ee;
  --radius: 6px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --chat-w: 360px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.45 var(--sans); }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.small { font-size: 11.5px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.fine { color: var(--dim); font-size: 11.5px; line-height: 1.5; margin: 6px 0 0; }
.empty { color: var(--dim); font-size: 12px; padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.kicker { color: var(--info); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- ticker ---------- */
.ticker { height: 30px; overflow: hidden; border-bottom: 1px solid var(--line); background: #0d0f12; position: sticky; top: 0; z-index: 30; }
.tk-strip { display: inline-flex; gap: 26px; white-space: nowrap; padding: 6px 0; animation: tick 90s linear infinite; }
.ticker:hover .tk-strip { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--mono); }
.tk-sym { font-weight: 800; padding: 1px 6px; border-radius: 3px; background: #1d2128; font-family: var(--sans); font-size: 10.5px; letter-spacing: .06em; }
.tk-good { color: var(--good); } .tk-warn { color: var(--warn); } .tk-bad { color: var(--bad); } .tk-neutral { color: var(--ink-2); }
.tk-val { color: var(--ink); font-weight: 700; }
.tk-unit { color: var(--dim); }
.tk-up { color: var(--good); }
.tk-news { font-family: var(--sans); color: var(--ink-2); }
.tk-badge { background: #2b3240; color: #9fb7d9; font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 3px; letter-spacing: .08em; }
.tk-badge-ev { background: #3a2a14; color: var(--warn); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr) var(--chat-w); min-height: calc(100vh - 30px); }
/* clip, not hidden: full-bleed bars may reach past the edge without the page scrolling sideways, and sticky bars still stick */
.main { min-width: 0; overflow-x: clip; }
.nav { display: flex; align-items: center; gap: 18px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 30px; z-index: 20; }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark { font-weight: 900; letter-spacing: .16em; font-size: 15px; background: linear-gradient(90deg, var(--orange), var(--warn)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.nav-links { display: flex; gap: 4px; }
.nav-a { padding: 5px 12px; border-radius: 5px; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.nav-a:hover { background: var(--card-2); text-decoration: none; color: var(--ink); }
.nav-a.on { background: #263043; color: #fff; box-shadow: inset 0 0 0 1px #33405a; }
.nav-status { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
.nav-shadow { color: var(--warn); border-color: #4a3a1c; font-weight: 700; letter-spacing: .06em; }
.nav-legacy { font-size: 11px; color: var(--dim); }
/* sport switcher, then the area's pages; the status dot and System sit on the right */
.brand:hover { text-decoration: none; }
.nav-sports { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 255, 255, .05); }
.nav-sport { padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.nav-sport:hover { text-decoration: none; color: var(--ink); }
.nav-sport.on { background: rgba(255, 255, 255, .14); color: #fff; }
.nav-sep { width: 1px; height: 18px; background: var(--line); }
.nav-sys { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 5px 12px; border-radius: 99px; }
.nav-sys:hover { text-decoration: none; color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav-sys.on { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-st { position: relative; }
.nav-st-b { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.nav-st-b:hover { color: var(--ink); background: rgba(255, 255, 255, .1); }
.nav-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 360px; max-height: min(70vh, 560px); overflow-y: auto; padding: 16px 16px 12px; border-radius: 18px;
  background: rgba(22, 24, 30, .97); box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 24px 60px -16px rgba(0, 0, 0, .85);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none; visibility: hidden;
  transition: opacity .18s ease, transform .2s cubic-bezier(.23, 1, .32, 1), visibility 0s .2s; }
.nav-st.open .nav-pop { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .18s ease, transform .2s cubic-bezier(.23, 1, .32, 1); }
.nav-pop-s { margin: 0 0 12px; font-size: 11.5px; line-height: 1.5; color: var(--dim); }
.nav-pop-err { margin: 0 0 10px; font-size: 12px; color: #ff6b61; }
.nav-pop-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 12.5px; color: var(--ink-2); }
.nav-pop-row b { color: var(--ink); font-weight: 600; }
.nav-pop-row b.cap::first-letter { text-transform: uppercase; }
.nav-pop-row em { font-style: normal; font-weight: 400; color: var(--dim); text-transform: none; }
.nav-pop-list { list-style: none; margin: 6px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: column; gap: 7px; }
.nav-pop-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 9px; align-items: baseline; font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.nav-pop-list li i { width: 7px; height: 7px; border-radius: 50%; background: #ffd60a; transform: translateY(-1px); }
.nav-pop-list li.bad i { background: #ff453a; }
.nav-pop-list li em { font-style: normal; color: var(--dim); margin-right: 6px; }
.nav-pop-ok { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); }
.nav-pop-go { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 12.5px; font-weight: 600; color: #64b5ff; }
.view { padding: 14px 16px 30px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-good { background: var(--good); box-shadow: 0 0 6px rgba(61, 220, 132, .6); }
.dot-warn { background: var(--warn); box-shadow: 0 0 6px rgba(232, 180, 75, .5); }
.dot-bad { background: var(--bad); box-shadow: 0 0 6px rgba(255, 90, 79, .6); }
.dot-neutral { background: #5b6372; }
.tag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .07em; padding: 2px 6px; border-radius: 3px; margin-left: 6px; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.tag-good { background: #12321f; color: var(--good); }
.tag-bad { background: #3a1513; color: #ff8a80; }
.tag-warn { background: #3a2c10; color: var(--warn); }
.tag-info { background: #142a45; color: #7cbcff; }
.tag-neutral { background: #262b34; color: var(--ink-2); }
.flag { color: var(--warn); font-size: 11px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 11px 14px 0; }
.panel-t h2 { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.panel-sub { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.panel-b { padding: 10px 14px 14px; }
.seg { display: inline-flex; gap: 2px; background: #14171c; border: 1px solid var(--line); border-radius: 5px; padding: 2px; }
.seg-b { background: none; border: 0; padding: 3px 9px; border-radius: 4px; color: var(--dim); font-size: 11px; font-weight: 700; cursor: pointer; }
.seg-b.on { background: #1f3b2c; color: var(--good); }
.btn { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 5px 12px; cursor: pointer; }

/* ---------- floor ---------- */
.floor { display: flex; flex-direction: column; gap: 12px; }
.row { display: grid; gap: 12px; }
.r-top { grid-template-columns: 1.05fr 1fr 1fr; }
.r-sig { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.r-floor { grid-template-columns: 1fr 1.25fr 1fr; align-items: start; }

.hero { display: flex; flex-direction: column; gap: 8px; }
.hero-t { font-family: var(--serif); font-size: 25px; line-height: 1.18; margin: 2px 0 0; font-weight: 700; letter-spacing: -.01em; }
.hero-sub { margin: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding-top: 8px; border-top: 1px solid var(--line); }
.hero-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; }
.hero-tile { border: 1px solid var(--line-2); border-radius: 5px; padding: 7px 8px; text-align: center; background: #16191e; }
.ht-l { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--dim); }
.ht-v { font-size: 15px; font-weight: 800; margin-top: 2px; }

.book { display: flex; flex-direction: column; gap: 6px; }
.book-h { display: flex; align-items: center; gap: 8px; }
.book-name { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--ink-2); }
.book-chip { font-size: 9.5px; font-weight: 800; background: #262b34; padding: 2px 6px; border-radius: 3px; color: var(--ink-2); }
.book-h .seg { margin-left: auto; }
.book-num { display: flex; align-items: baseline; gap: 10px; }
.book-big { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.book-delta { font-size: 12px; font-weight: 600; }
.book-foot { color: var(--dim); font-size: 10.5px; }

.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; font-family: var(--mono); }
.chart-tip { position: absolute; top: 0; background: #0d0f12; border: 1px solid var(--line-2); padding: 3px 7px; border-radius: 4px; font-size: 11px; font-family: var(--mono); pointer-events: none; white-space: nowrap; }
.chart-empty { color: var(--dim); font-size: 12px; padding: 30px 0; text-align: center; }

.sig { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--line-2); }
.sig-good { border-top-color: var(--good-2); } .sig-bad { border-top-color: #b8433b; } .sig-warn { border-top-color: #a8802f; } .sig-info { border-top-color: #2f6fb8; }
.sig-t { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.sig-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.sd-good { background: var(--good); } .sd-bad { background: var(--bad); } .sd-warn { background: var(--warn); } .sd-info { background: var(--info); }
.sig-rows { display: flex; flex-direction: column; gap: 3px; }
.sig-row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.sig-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sig-v { font-family: var(--mono); font-weight: 700; font-size: 11.5px; }
.sig-bar { width: 48px; height: 5px; background: #262b34; border-radius: 3px; overflow: hidden; }
.sig-bar i { display: block; height: 100%; background: var(--warn); }
.sig-text { font-size: 11.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sig-note { font-size: 9.5px; color: var(--dim); font-style: italic; line-height: 1.35; }
.sig-none { color: var(--dim); font-size: 11.5px; }

.col { display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-width: 0; }
.col-h { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; padding: 2px 2px 0; }
.col-h span { color: var(--dim); font-weight: 600; letter-spacing: .02em; text-transform: none; font-size: 10.5px; }
.desks { display: grid; gap: 10px; }
.desks-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desk { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.desk-click { cursor: pointer; }
.desk-click:hover .desk-msg { border-color: #3a4558; }
.desk-art { height: 68px; display: flex; align-items: flex-end; }
.sprite { image-rendering: pixelated; }
.desk-name { font-weight: 800; font-size: 12.5px; text-align: center; }
.desk-msg { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; min-height: 58px; }
.desk-stamp { color: var(--dim); font-size: 10px; margin-bottom: 2px; }
.desk-text { font-size: 11.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.col-mid > .desk .desk-msg { min-height: 0; }

.treemap { position: relative; width: 100%; border-radius: 4px; overflow: hidden; background: #0f1114; }
.tm-cell { position: absolute; border: 1px solid #0f1114; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; cursor: pointer; padding: 2px; }
.tm-cell:hover { filter: brightness(1.15); }
.tm-label { font-weight: 900; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); line-height: 1.1; text-transform: uppercase; }
.tm-small { font-size: 9.5px; }
.tm-sub { font-size: 10.5px; color: rgba(255,255,255,.85); font-weight: 600; margin-top: 2px; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--dim); margin-top: 6px; }
.hl-bar { flex: 1; height: 5px; border-radius: 3px; background: linear-gradient(90deg, rgba(239,68,68,.9), #2a2e36, rgba(46,204,113,.9)); }

.toprows { display: flex; flex-direction: column; gap: 3px; }
.tr { display: grid; grid-template-columns: 52px 1fr 14px 78px; align-items: center; gap: 8px; padding: 6px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 12px; }
.tr:hover { border-color: #3a4558; }
.tr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.tr-name small { color: var(--dim); font-weight: 500; }
.tr-diff { font-family: var(--mono); font-weight: 700; text-align: right; }
.tr-sport { font-size: 9.5px; font-weight: 900; letter-spacing: .08em; padding: 2px 5px; border-radius: 3px; background: #262b34; text-align: center; }
.sp-nfl { color: #7cbcff; } .sp-nhl { color: var(--cyan); } .sp-nba { color: var(--orange); } .sp-soccer { color: var(--good); } .sp-afl { color: var(--warn); } .sp-mlb { color: var(--purple); }

.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ev { display: flex; gap: 10px; padding: 9px 11px; }
.ev-high { border-color: #6b2f2a; } .ev-medium { border-color: #5a4720; }
.ev-date { display: flex; flex-direction: column; align-items: center; min-width: 32px; }
.ev-date b { font-size: 19px; line-height: 1; color: var(--orange); }
.ev-date span { font-size: 9.5px; font-weight: 800; color: var(--dim); letter-spacing: .08em; }
.ev-b { min-width: 0; }
.ev-t { font-weight: 800; font-size: 12px; }
.ev-s { color: var(--dim); font-size: 10.5px; }
.ev-d { color: var(--ink-2); font-size: 11px; }
.floor-foot { text-align: center; max-width: 900px; margin: 4px auto 0; }

/* ---------- chat ---------- */
.chat { border-left: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 30px; height: calc(100vh - 30px); display: flex; flex-direction: column; }
.chat-h { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.chat-h h2 { margin: 0; font-size: 13px; font-weight: 800; }
.chat-budget { font-size: 10.5px; color: var(--dim); }
.chat-list { overflow-y: auto; padding: 10px 12px 30px; display: flex; flex-direction: column; gap: 12px; }
.post { display: grid; grid-template-columns: 30px 1fr; gap: 9px; }
.avatar { width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #111; background: #8a93a3; image-rendering: pixelated; }
.av-researcher { background: #7cbcff; } .av-pickreviewer { background: #b37bff; } .av-reviewer { background: var(--warn); }
.av-compliance { background: var(--good); } .av-desknfl, .av-desknhl, .av-desknba, .av-desksoccer, .av-deskafl, .av-deskmlbruns { background: var(--orange); }
.post-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11.5px; }
.post-to { color: var(--dim); font-size: 10.5px; }
.post-h .tag { margin-left: 0; }
.post-t { margin-left: auto; color: var(--dim); font-size: 10px; }
.post-rep { color: var(--dim); font-size: 10px; font-family: var(--mono); }
.post-txt { margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; font-size: 11.5px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.post-note { font-size: 9.5px; color: var(--dim); margin-top: 3px; font-style: italic; }

/* ---------- pages ---------- */
.page { display: flex; flex-direction: column; gap: 12px; }
.page-h { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; padding: 4px 2px 6px; border-bottom: 1px solid var(--line); }
.page-h h1 { margin: 2px 0; font-family: var(--serif); font-size: 26px; }
.page-sub { margin: 0; color: var(--ink-2); font-size: 12.5px; max-width: 900px; }
.page-tags { display: flex; gap: 6px; }
.ph-art { flex: none; }
.back { font-size: 11.5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); gap: 12px; align-items: start; }
.nowrap { white-space: nowrap; }
.cell-player { max-width: 230px; white-space: nowrap; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc summary { cursor: pointer; color: var(--ink-2); font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sub-h { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--dim); margin: 12px 0 6px; text-transform: uppercase; }
.callout { border-radius: 5px; padding: 8px 10px; font-size: 12px; margin-top: 8px; }
.callout-warn { background: #2b2313; border: 1px solid #4a3a1c; color: #f0d08c; }
.error-box { background: #2b1615; border: 1px solid #5a2a26; padding: 14px; border-radius: var(--radius); color: #ffb4ad; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--dim); padding: 40px; justify-content: center; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { margin-left: auto; background: #14171c; border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; color: var(--ink); min-width: 240px; }
.table-wrap { overflow: auto; max-height: 72vh; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { position: sticky; top: 0; background: var(--card); text-align: left; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid #22262e; vertical-align: top; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #20252e; }

.kvs { display: flex; flex-direction: column; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #22262e; font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv-k { color: var(--dim); }
.kv-v { text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.prog { display: flex; align-items: center; gap: 8px; flex: 1; }
.prog-bar { flex: 1; height: 6px; background: #262b34; border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg, #a8802f, var(--warn)); }
.prog-met .prog-fill { background: var(--good); }
.prog-txt { font-family: var(--mono); font-size: 11px; color: var(--ink-2); min-width: 74px; text-align: right; }
.mat-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.mat-l { width: 130px; font-size: 11.5px; color: var(--ink-2); flex: none; }

.stages { margin-top: 10px; }
.stage-strip { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #262b34; }
.stage-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 10.5px; color: var(--dim); }
.stage-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 64px; gap: 8px; align-items: center; font-size: 11.5px; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-track { height: 7px; background: #262b34; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; }
.bar-v { font-family: var(--mono); text-align: right; color: var(--ink-2); }

.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.study-card { cursor: pointer; display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--line-2); }
.study-card:hover { border-color: #3a4558; }
.st-ok { border-top-color: var(--good-2); } .st-warn { border-top-color: #a8802f; } .st-bad { border-top-color: #b8433b; }
.sc-top { display: flex; gap: 12px; align-items: flex-end; }
.sc-title h3 { margin: 0 0 4px; font-size: 15px; }
.sc-state { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.sc-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.sc-nums div { background: #16191e; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; display: flex; flex-direction: column; }
.sc-nums b { font-size: 15px; font-variant-numeric: tabular-nums; }
.sc-nums span { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.sc-att { font-size: 11.5px; color: var(--warn); }
.bias-list { display: flex; flex-direction: column; gap: 4px; }
.bias-row { display: grid; grid-template-columns: 1fr 80px 70px; gap: 8px; font-size: 12px; }
.cw { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; }
.fx-list { display: flex; flex-direction: column; gap: 6px; }
.fx { display: flex; flex-direction: column; font-size: 12px; }
.svc-mini { display: flex; flex-direction: column; gap: 6px; }
.svc-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.agent { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.agent-off { opacity: .72; }
.agent-name { font-weight: 800; font-size: 14px; }
.agent-role { margin: 0; text-align: center; color: var(--dim); font-size: 11.5px; }
.chat-full { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; }
.cf-row { display: grid; grid-template-columns: 110px 130px 110px 30px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #22262e; font-size: 12px; align-items: baseline; }
.cf-t { color: var(--dim); font-size: 11px; }
.cf-txt { color: var(--ink-2); }

.book-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.book-tile { border-radius: 4px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.book-tile b { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 6px; }
.check { display: grid; grid-template-columns: 12px 190px 1fr; gap: 8px; align-items: baseline; padding: 6px 8px; background: #16191e; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }
.ck-bad { border-color: #5a2a26; } .ck-warn { border-color: #4a3a1c; }
.src-list { display: flex; flex-direction: column; gap: 8px; }
.src b { font-size: 12px; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.drawer-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { margin: 0; font-size: 14px; }
.drawer-b { padding: 14px 16px; overflow: auto; }
.detail-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.detail-hero > div { background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; }
.dh-l { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--dim); }
.dh-v { font-size: 20px; font-weight: 800; font-family: var(--mono); }

/* responsive */
@media (max-width: 1500px) {
  :root { --chat-w: 320px; }
  .r-sig { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1250px) {
  .shell { grid-template-columns: 1fr; }
  .chat { position: static; height: auto; max-height: 70vh; border-left: 0; border-top: 1px solid var(--line); }
  .r-top, .r-floor, .grid-3, .grid-2-1, .grid-3-1 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .r-sig, .grid-2 { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .nav-status { margin-left: 0; flex-wrap: wrap; }
  .view { padding: 12px; }
}

.ai-box { margin-top: 12px; border: 1px solid #2e3a52; background: #161c27; border-radius: 6px; padding: 10px 12px; font-size: 12px; }
.ai-h { display: flex; align-items: center; gap: 4px; }
.ai-claim { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.ai-claim blockquote { margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--line-2); color: var(--ink-2); font-style: italic; }
.btn-sm { padding: 2px 8px; font-size: 11px; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- why this pick ---------- */
.why { display: flex; flex-direction: column; gap: 4px; }
.why-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.why-bet { font-weight: 800; font-size: 14px; }
.why-line { font-size: 13px; font-weight: 700; color: var(--ink); background: #1a2232; border: 1px solid #2e3a52; border-radius: 5px; padding: 8px 10px; margin: 4px 0; }
.why-sec { margin-top: 6px; }
.why-sec p { margin: 4px 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.why-sec p b { color: var(--ink); }
.why-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.why-stat { background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; display: flex; flex-direction: column; }
.why-stat b { font-size: 17px; font-family: var(--mono); }
.why-stat span { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.why-gap { display: flex; gap: 8px; align-items: baseline; background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; margin-top: 6px; font-size: 13px; font-family: var(--mono); }
.why-prov { margin-top: 14px; }
.warn-t { color: var(--warn) !important; }
.callout-bad { background: #2b1615; border: 1px solid #5a2a26; color: #ffb4ad; }
.gates { display: flex; flex-direction: column; gap: 4px; }
.gate { display: grid; grid-template-columns: 16px 1fr; gap: 8px; padding: 6px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }
.gate-i { font-weight: 900; }
.gate-ok .gate-i { color: var(--good); }
.gate-no .gate-i { color: var(--bad); }
.gate-n { font-weight: 700; }
.gate-d { color: var(--dim); font-size: 11px; margin-top: 2px; }
.dist { margin: 10px 0 4px; }
.dist-track { position: relative; height: 26px; background: #14171c; border: 1px solid var(--line); border-radius: 4px; }
.dist-side { position: absolute; top: 0; bottom: 0; background: rgba(61, 220, 132, .08); }
.dist-band { position: absolute; top: 7px; height: 10px; background: rgba(77, 163, 255, .45); border-radius: 3px; }
.dist-med { position: absolute; top: 4px; height: 16px; width: 2px; background: #7cbcff; transform: translateX(-1px); }
.dist-mean { position: absolute; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: #fff; transform: translateX(-4.5px); box-shadow: 0 0 0 2px #14171c; }
.dist-line { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--orange); transform: translateX(-1px); }
.dist-line span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; font-family: var(--mono); color: var(--orange); white-space: nowrap; }
.dist-axis { position: relative; height: 16px; font-size: 10px; font-family: var(--mono); color: var(--dim); }
.dist-axis span { position: absolute; top: 3px; transform: translateX(-50%); white-space: nowrap; }
.dist-axis .dist-axis-mean { color: var(--ink); }
.dist-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.dist-key i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.k-band { background: rgba(77, 163, 255, .6); } .k-mean { background: #fff; border-radius: 50% !important; width: 8px !important; }
.k-line { background: var(--orange); width: 3px !important; } .k-side { background: rgba(61, 220, 132, .25); }
.dist { padding-top: 14px; }

/* ---------- top picks ---------- */
.picks { display: flex; flex-direction: column; gap: 4px; }
.pk { display: grid; grid-template-columns: 52px minmax(0, 1fr) 120px 74px; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.pk:hover { border-color: #3a4558; background: #1f232a; }
.pk-main { min-width: 0; }
.pk-name { font-weight: 800; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-name small { color: var(--ink-2); font-weight: 600; }
.pk-why { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pk-caution { font-size: 11px; color: var(--warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pk-probs { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); text-align: right; }
.pk-gap { font-family: var(--mono); font-weight: 800; text-align: right; font-size: 13px; }
.r-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.r-top2 { grid-template-columns: 1.1fr 1fr; }
.r-sig3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.desks-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.desks-compact .desk-art { height: 52px; }
.desks-compact .desk-msg { min-height: 0; }
.desks-compact .desk-text { -webkit-line-clamp: 3; }
@media (max-width: 1250px) { .r-main, .r-top2, .r-sig3 { grid-template-columns: 1fr; } .desks-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pk { grid-template-columns: 44px minmax(0, 1fr) 64px; } .pk-probs { display: none; } }
.pk-more { align-self: flex-end; font-size: 11.5px; margin-top: 4px; }
.why-cell { color: var(--dim); font-size: 11px; margin-top: 2px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- how the model got there ---------- */
.why-short { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); background: #1a2232; border: 1px solid #2e3a52; border-radius: 6px; padding: 10px 12px; margin: 6px 0 2px; }
.why-short b { color: var(--ink); }
.why-repro { font-size: 11.5px; margin-top: 8px; padding: 5px 8px; border-radius: 4px; }
.why-repro.ok { color: var(--good); background: #12321f; }
.why-repro.no { color: var(--warn); background: #3a2c10; }
table.hw { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.hw th { text-align: left; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.hw td { padding: 5px 6px; border-bottom: 1px solid #22262e; }
.hw .r { text-align: right; }
.hw-val { display: flex; align-items: center; gap: 8px; }
.hw-val b { min-width: 28px; font-family: var(--mono); }
.hw-bar { flex: 1; height: 7px; background: #262b34; border-radius: 3px; overflow: hidden; min-width: 50px; }
.hw-bar i { display: block; height: 100%; border-radius: 3px; }
.b-val { background: var(--info); } .b-prior { background: #6b7280; }
.hw-prior td { color: var(--ink-2); font-style: italic; }
.hw-total td { border-top: 1px solid var(--line); padding-top: 6px; }
table.hw tr.dim td { color: var(--dim); }
.hw-sum { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-top: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 5px; font-size: 12.5px; }
.hw-final { color: var(--orange); }
.drv { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 56px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #22262e; font-size: 12px; }
.drv-l { min-width: 0; }
.drv-bar { position: relative; height: 9px; background: #1d2128; border-radius: 3px; }
.drv-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.drv-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.drv-bar i.up { background: var(--good); } .drv-bar i.down { background: var(--bad); }
.drv-v { text-align: right; font-weight: 700; }
.drv-base { color: var(--ink-2); }
.drv-total { border-bottom: 0; border-top: 1px solid var(--line-2); margin-top: 2px; font-size: 13px; }
.recent { display: flex; gap: 6px; flex-wrap: wrap; }
.rc { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 5px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; font-size: 10px; }
.rc b { font-size: 16px; font-family: var(--mono); }
.rc-opp { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
