:root{
  --bg:#080b11;
  --bg-2:#0d1118;
  --panel:#111720;
  --panel-2:#151c27;
  --panel-3:#1a2330;
  --line:#253040;
  --line-soft:#1b2430;
  --text:#edf2f7;
  --text-2:#b7c1ce;
  --muted:#748197;
  --accent:#4f8cff;
  --accent-2:#79a8ff;
  --accent-soft:rgba(79,140,255,.12);
  --up:#31c48d;
  --up-soft:rgba(49,196,141,.12);
  --down:#f05d6c;
  --down-soft:rgba(240,93,108,.12);
  /* Direction (Q1, decided Nov 15): blue = bullish/positive, red =
     bearish/negative. --up/--down stay MONEY-only (P/L, premium — see
     .m-good/.m-bad). Direction blue is deeper than the accent #4f8cff so
     a filled direction cell never reads as a link or an active tab; the
     accent is used for text links and the active-tab wash, never for
     filled direction cells. */
  --dir-up:#6ea8ff;
  --dir-up-soft:rgba(110,168,255,.14);
  --dir-solid:#2563eb;
  --dir-down:#f05d6c;
  --dir-down-soft:rgba(240,93,108,.12);
  --dir-down-solid:#d83e51;
  --warn:#f2b84b;
  --warn-soft:rgba(242,184,75,.12);
  --shadow:0 10px 30px rgba(0,0,0,.22);
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
  --sidebar:248px;
  --radius:16px;
}
html[data-theme="light"]{
  --bg:#f4f7fb;--bg-2:#fff;--panel:#fff;--panel-2:#f7f9fc;--panel-3:#eef2f7;
  --line:#dce3ec;--line-soft:#e9edf3;--text:#17202b;--text-2:#526173;--muted:#7b8797;
  --accent:#276ef1;--accent-2:#276ef1;--accent-soft:rgba(39,110,241,.15); /* .15, not .09: the light wash needs a stronger tint to read as clearly as dark's .12 against panel-2 */
  --up:#15966b;--up-soft:rgba(21,150,107,.09);--down:#d83e51;--down-soft:rgba(216,62,81,.09);
  --dir-up:#1d6fe0;--dir-up-soft:rgba(29,111,224,.10);--dir-solid:#1d4ed8;
  --dir-down:#d83e51;--dir-down-soft:rgba(216,62,81,.09);--dir-down-solid:#c62f42;
  --warn:#b77808;--warn-soft:rgba(183,120,8,.10);--shadow:0 8px 26px rgba(24,39,75,.08);
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans)}
body{min-height:100vh}
button,input{font:inherit;color:inherit}
button{cursor:pointer}
.app-shell{display:grid;grid-template-columns:var(--sidebar) 1fr auto;min-height:100vh}
.sidebar{
  position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:18px;
  padding:22px 16px;border-right:1px solid var(--line-soft);background:rgba(9,12,18,.92);
}
html[data-theme="light"] .sidebar{background:rgba(255,255,255,.9)}
.brand{display:flex;gap:12px;align-items:center}
.brand-mark{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--accent),#8c6cff);font-weight:800;color:#fff;
}
.brand h1{font-size:1rem;margin:0}
.brand p{margin:4px 0 0;color:var(--muted);font-size:.68rem;letter-spacing:.08em;font-family:var(--mono)}
.side-label{color:var(--muted);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;padding:0 8px}
.side-nav{display:flex;flex-direction:column;gap:4px}
.side-nav button{
  display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;border-radius:10px;
  background:transparent;color:var(--text-2);padding:10px 12px;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.side-nav button:not(.active):hover,.side-nav button:not(.active):focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.side-nav a{
  display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;border-radius:10px;
  background:transparent;color:var(--text-2);padding:10px 12px;text-decoration:none;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.side-nav a:not(.active):hover,.side-nav a:not(.active):focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.side-nav button.active{background:var(--accent-soft);color:#dce9ff;box-shadow:inset 2px 0 0 var(--accent)}
html[data-theme="light"] .side-nav button.active{color:#1749a8}
.side-nav .icon{width:18px;text-align:center;color:var(--muted)}
.side-nav button.active .icon{color:var(--accent)}
.sidebar-foot{margin-top:auto;color:var(--muted);font-size:.78rem;line-height:1.45;padding:0 8px}
.main{min-width:0}
.topbar{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  padding:14px 22px;border-bottom:1px solid var(--line-soft);position:sticky;top:0;z-index:5;
  background:color-mix(in srgb, var(--bg) 88%, transparent);backdrop-filter:blur(10px);
}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:12px}
.live-dot{width:8px;height:8px;border-radius:99px;background:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.topbar-label{font-size:.72rem;letter-spacing:.12em;color:var(--muted);font-family:var(--mono)}
#genAt{color:var(--muted);font-size:.8rem}
.theme-switcher{display:flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.theme-btn{border:0;background:transparent;color:var(--muted);padding:6px 10px;font-size:.78rem;transition:filter .15s ease,transform .15s ease}
.hamburger{display:none}
.sidebar-overlay{display:none}
.theme-btn.active{background:var(--panel-3);color:var(--text)}
.theme-toggle{border:1px solid var(--line);border-radius:999px;background:var(--panel-2);color:var(--text-2);padding:6px 10px;font-size:inherit;line-height:18px;transition:filter .15s ease,transform .15s ease} /* line-height pinned: the ☾/☀ glyph's fallback font stretches the normal line box by 1px; 18px = the pill's content height, so the button stays 32px like the pills */
.theme-toggle.active{background:var(--accent-soft);color:var(--text);border-color:transparent;box-shadow:inset 2px 0 0 var(--accent)}
.theme-btn:hover,.theme-btn:focus-visible,.theme-toggle:hover,.theme-toggle:focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
.tape{
  display:flex;overflow:hidden;padding:10px 0;border-bottom:1px solid var(--line-soft);
  font-variant-numeric:tabular-nums;
}
/* Ticker tape marquee: the track holds two identical halves and slides by
   exactly one half, so the loop is seamless. Slow drift (~30px/s, duration
   set from the measured width in renderTape), pause on hover. Reduced
   motion: static + manual scroll, the same pattern as the Radio brand strip. */
.tape-track{display:flex;width:max-content;animation:tape-scroll linear infinite}
.tape-half{display:flex;gap:18px;padding-right:18px}
@keyframes tape-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.tape:hover .tape-track{animation-play-state:paused}
@media (prefers-reduced-motion: reduce){
  .tape{overflow-x:auto}
  .tape-track{animation:none}
}
.tick{display:flex;gap:8px;align-items:baseline;white-space:nowrap}
.tick .sym{font-weight:700;font-size:.82rem}
.tick .px{color:var(--text-2);font-size:.82rem}
.tick .ch{font-size:.78rem}
.content{padding:22px;display:flex;flex-direction:column;gap:16px}
.page-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-end}
.page-head h2{margin:0;font-size:1.35rem}
.page-head p{margin:6px 0 0;color:var(--muted);max-width:68ch}
#pageNote{color:var(--text-2)} /* page subtitle only: brighter than panel hints, same on every page */
.hero{
  display:grid;grid-template-columns:1.6fr .8fr;gap:16px;
}
.panel{
  background:var(--panel);border:1px solid var(--line-soft);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:18px 20px;
}
.panel h2,.panel h3{margin:0}
.hint{color:var(--muted);font-size:.82rem;margin:6px 0 0}
.eyebrow{color:var(--accent-2);font-size:.85rem;font-weight:700;letter-spacing:.10em;font-family:var(--mono)}
.hero h2{font-size:1.7rem;margin:8px 0}
.hero p{color:var(--text-2);margin:0}
.badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.badge{
  border:1px solid var(--line);border-radius:999px;padding:4px 8px;color:var(--text-2);
  font-size:.68rem;letter-spacing:.06em;font-family:var(--mono)
}
.signal-jump{
  display:flex;flex-direction:column;justify-content:space-between;min-height:150px;
  background:
    radial-gradient(circle at 90% 0, rgba(79,140,255,.18), transparent 42%),
    var(--panel);
}
.signal-count{font-size:3rem;font-weight:750;letter-spacing:-.04em}
.linkish{border:0;background:transparent;color:var(--accent-2);padding:0;text-align:left}
.linkish:hover,.linkish:focus-visible{color:#31c48d}
.cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.card{
  background:var(--panel);border:1px solid var(--line-soft);border-radius:14px;padding:14px;
}
.card .k{color:var(--muted);font-size:.75rem;letter-spacing:.06em}
.card .v{font-size:1.25rem;font-weight:700;margin-top:6px;font-variant-numeric:tabular-nums}
.card .n{color:var(--text-2);font-size:.78rem;margin-top:8px;line-height:1.4}
.meter{height:6px;border-radius:99px;background:var(--panel-3);margin-top:10px;overflow:hidden}
.meter i{display:block;height:100%;background:linear-gradient(90deg,var(--dir-up),var(--warn));border-radius:99px}
.meter.hot i{background:var(--dir-up)}
.meter.iv-meter{display:block;margin-top:4px;height:4px}
.meter.iv-meter i{background:linear-gradient(90deg,var(--up),var(--warn))} /* IV magnitude is money (premium richness), not direction */
.good{color:var(--dir-up)}
.bad{color:var(--dir-down)}
.m-good{color:var(--up)} /* money only: P/L, premium, yield, IV */
.m-bad{color:var(--down)}
.warn{color:var(--warn)}
.watchlist{display:flex;flex-wrap:wrap;gap:8px;padding:14px 20px 0}
#tvStudies{padding-top:8px}
.wl-chip,.wl-add button,.chip{
  border:1px solid var(--line);background:var(--panel-2);border-radius:999px;padding:6px 10px;color:var(--text-2);
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,filter .15s ease;
}
.wl-chip:hover,.wl-chip:focus-visible,.chip:hover,.chip:focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.wl-add button:hover,.wl-add button:focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
.wl-chip.active,.chip.active{background:var(--accent-soft);color:var(--text);border-color:transparent;box-shadow:inset 2px 0 0 var(--accent)}
.wl-chip.active:hover,.wl-chip.active:focus-visible,.chip.active:hover,.chip.active:focus-visible{border-color:#31c48d}
/* Score range pills (Q3): keyboard focus must not read as a second selection —
   the green glow is hover-only here; :focus-visible gets a plain outline ring
   outside the pill, so the blue active inset stays unambiguous. */
#scoreRanges .chip:focus-visible:not(.active){transform:none;border-color:var(--line);box-shadow:none;outline:2px solid #31c48d;outline-offset:2px}
#scoreRanges .chip.active:focus-visible{transform:none;border-color:transparent;box-shadow:inset 2px 0 0 var(--accent);outline:2px solid #31c48d;outline-offset:2px}
.wl-x{margin-left:8px;color:var(--muted)}
.wl-add{display:flex;gap:6px}
.wl-add input{
  background:var(--panel-2);border:1px solid var(--line);border-radius:999px;padding:6px 10px;width:120px;color:var(--text-2)
}
.wl-add input::placeholder{color:var(--muted)}
#tvChart{height:900px;margin-top:12px}
/* Chart loading state: hidden the moment the widget iframe renders. */
#tvChart:has(iframe) .tv-loading{display:none}
/* Price-chart (Signal map) HTML legend: each item is one nowrap unit —
   swatch + label — so the legend wraps whole items on phones. */
.chart-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:2px 0 10px}
.chart-legend-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;background:none;border:0;padding:0;font:inherit;font-size:.82rem;color:var(--text-2);cursor:pointer}
.chart-legend-item:hover{color:var(--text);text-decoration:underline}
.chart-legend-item.off{opacity:.45}
.chart-legend-item .sw-line{display:inline-block;width:16px;border-top:2px solid}
.chart-legend-item .sw-dot{display:inline-block;width:10px;height:10px;border-radius:50%}
.chart-legend-item .sw-tri{display:inline-block;width:11px;height:10px;clip-path:polygon(50% 0,100% 100%,0 100%)}
/* ---- Wheel tabs ---- */
#sec-wheel{display:flex;flex-direction:column;gap:16px}
#sec-wheel[hidden]{display:none}
.wheel-tabs{
  display:flex;gap:10px;background:var(--panel-2);border:1px solid var(--line-soft);
  border-radius:var(--radius);padding:10px;box-shadow:var(--shadow)
}
.wheel-tabs button{
  flex:1;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--text-2);
  padding:14px 20px;font-size:1.05rem;font-weight:700;line-height:1.25;text-align:left;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease
}
.wheel-tabs button .sub{display:block;font-size:.78rem;font-weight:400;color:var(--muted);margin-top:3px}
.wheel-tabs button:not(.active):hover,.wheel-tabs button:not(.active):focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.wheel-tabs button.active{background:var(--accent-soft);color:var(--text);box-shadow:inset 2px 0 0 var(--accent)}
.wheel-tabs button.active .sub{color:var(--text-2)}
.wheel-tab-panel{display:flex;flex-direction:column;gap:16px}
.wheel-tab-panel[hidden]{display:none}
.chart-wrap{height:360px;position:relative}
.chart-wrap canvas{width:100%!important;height:100%!important}
/* ---- Regime panel ---- */
.regime-panel .regime-head{align-items:flex-start}
.regime-panel .regime-head h2{font-size:1.45rem;letter-spacing:-.01em}
.regime-panel .badge{flex:none;margin-top:3px;padding:7px 12px;font-size:.72rem;font-weight:700}
.regime-panel .badge.tone-good{color:var(--dir-up);border-color:transparent;background:var(--dir-up-soft)}
.regime-panel .badge.tone-caution{color:var(--warn);border-color:transparent;background:var(--warn-soft)}
.regime-panel .badge.tone-bad{color:var(--dir-down);border-color:transparent;background:var(--dir-down-soft)}
.regime-verdict-box{
  margin-top:16px;background:var(--panel-2);border:1px solid var(--line-soft);
  border-left:3px solid var(--muted);border-radius:12px;padding:13px 16px 14px;
}
.regime-verdict-kicker{
  color:var(--muted);font-size:.66rem;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;font-family:var(--mono);
}
.regime-verdict{font-size:1.08rem;font-weight:600;line-height:1.5;margin:5px 0 0}
.regime-panel:has(.badge.tone-good) .regime-verdict-box{border-left-color:var(--dir-up)}
.regime-panel:has(.badge.tone-caution) .regime-verdict-box{border-left-color:var(--warn)}
.regime-panel:has(.badge.tone-bad) .regime-verdict-box{border-left-color:var(--dir-down)}
.regime-panel .tiles{margin-top:14px;grid-template-columns:repeat(3,minmax(0,1fr))}
.regime-panel .tile{
  padding:14px 16px;display:flex;flex-direction:column;gap:3px;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.regime-panel .tile:hover,.regime-panel .tile:focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.regime-panel .tile .k{color:var(--muted);font-size:.68rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase}
.regime-panel .tile b{font-size:1.35rem;font-weight:750;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.regime-panel .tile .hint{margin:3px 0 0;font-size:.78rem}
.regime-panel .grid2{margin-top:16px;grid-template-columns:1.15fr .85fr}
.regime-panel .grid2 h3{font-size:1rem}
.regime-sub{
  background:var(--panel-2);border:1px solid var(--line-soft);border-radius:12px;
  padding:16px 16px 14px;min-width:0;
}
.regime-panel .chart-wrap{height:320px}
.chart-wrap.regime-rsi{height:130px;margin-top:12px}
/* ---- Score-under-price pane (Phase 3) ---- */
.score-pane{margin-top:16px;border-top:1px solid var(--line-soft);padding-top:14px}
.score-pane h3{font-size:1.05rem}
.score-head{align-items:flex-start}
.score-meta{text-align:right;display:flex;flex-direction:column;gap:2px;align-items:flex-end;flex:none}
.score-meta #scoreBias{font-weight:700;font-size:.95rem}
.score-meta .hint{margin:0}
.score-ranges{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.chart-wrap.score-wrap{height:220px}
.score-flip-note{margin:8px 0 0}
#regimeSr th,#regimeSr td{padding:9px 8px}
#regimeSr td:nth-child(2),#regimeSr td:nth-child(3){font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
#regimeSr td:nth-child(2){font-weight:700}
#regimeSr td span.good,#regimeSr td span.bad{display:inline-block;padding:3px 9px;border-radius:999px;font-size:.72rem;font-weight:700}
#regimeSr td span.good{background:var(--dir-up-soft)}
#regimeSr td span.bad{background:var(--dir-down-soft)}
#regimeSr tr:last-child td{border-bottom:0}
@media(max-width:1100px){
  .regime-panel .grid2{grid-template-columns:1fr}
}
@media(max-width:720px){
  .regime-panel .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .regime-panel .tile b{font-size:1.2rem}
  /* Stack the head: at phone width the title + badge row squeezed the
     meta line into an ~80px column, 120px tall. Badge on its own row
     under the title, meta at full width. */
  .regime-panel .regime-head{flex-direction:column;align-items:flex-start;gap:6px}
  .regime-panel .regime-head .badge{margin-top:0}
}
.grid2{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}
.grid2>*{min-width:0}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.scroll{
  max-height:520px;overflow:auto;padding-right:4px;display:flex;flex-direction:column;gap:8px;
  scrollbar-width:thin;scrollbar-color:var(--line) transparent
}
.scroll::-webkit-scrollbar{width:8px}
.scroll::-webkit-scrollbar-track{background:transparent}
.scroll::-webkit-scrollbar-thumb{background:var(--line);border-radius:999px}
.scroll.short{max-height:280px}
.signal-row{
  display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;
  padding:10px 12px;border:1px solid var(--line-soft);border-radius:12px;background:var(--panel-2)
}
.tag{
  font-size:.68rem;letter-spacing:.06em;border-radius:999px;padding:4px 8px;font-family:var(--mono);
  background:var(--panel-3);color:var(--text-2)
}
.tag.up{background:var(--dir-up-soft);color:var(--dir-up)}
.tag.down{background:var(--dir-down-soft);color:var(--dir-down)}
.tag.flow{background:var(--warn-soft);color:var(--warn)}
.tag.mood{background:var(--accent-soft);color:var(--accent-2)}
.tag.empty{background:transparent;color:var(--muted)}
.filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
table.data{width:100%;border-collapse:collapse;font-size:.86rem}
table.data th,table.data td{padding:8px 6px;border-bottom:1px solid var(--line-soft);text-align:right}
table.data th:first-child,table.data td:first-child{text-align:left}
table.data th{color:var(--muted);font-weight:600;font-size:.75rem}
tr.grp td{color:var(--accent-2);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;padding-top:14px}
.bar{height:8px;background:var(--panel-3);border-radius:99px;overflow:hidden;min-width:72px}
.bar i{display:block;height:100%}
.walls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.wall{background:var(--panel-2);border:1px solid var(--line-soft);border-radius:14px;padding:14px}
.lvl{display:grid;grid-template-columns:72px 1fr auto;gap:8px;align-items:center;margin-top:6px;font-size:.82rem}
.lvl .track{height:7px;background:var(--panel-3);border-radius:99px;overflow:hidden}
.lvl .track i{display:block;height:100%}
/* Walls bars use the same CALL/PUT mapping as the Unusual table
   (CALL blue, PUT red) — one mapping for the option type everywhere,
   even though put support reads as bullish and call resistance as
   bearish in the walls context. */
.lvl.put i{background:var(--dir-down)}
.lvl.call i{background:var(--dir-up)}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tile{background:var(--panel-2);border:1px solid var(--line-soft);border-radius:14px;padding:12px}
.tile b{display:block;font-size:1.15rem;margin-top:4px}
.stack{display:flex;height:14px;border-radius:99px;overflow:hidden;margin-top:10px}
.stack span{display:block;height:100%}
.news{list-style:none;margin:12px 0 0;padding:0}
.news li{padding:10px 0;border-bottom:1px solid var(--line-soft);color:var(--text-2)}
.news .pub{display:block;color:var(--muted);font-size:.75rem;margin-top:4px}
footer{color:var(--muted);font-size:.75rem;padding:8px 2px 18px}
footer a,.hint a{color:var(--accent-2);text-decoration:none}
footer a:hover,.hint a:hover{text-decoration:underline}
.empty{color:var(--muted);padding:12px}
@media(max-width:1100px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:fixed;top:0;right:0;left:auto;height:100vh;width:280px;max-width:85vw;z-index:50;transform:translateX(105%);transition:transform .2s ease;overflow-y:auto}
  .sidebar.open{transform:none}
  .sidebar-overlay.open{display:block;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:40}
  .hamburger{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);font-size:1.15rem;cursor:pointer;flex:none;transition:filter .15s ease,transform .15s ease}
  .hamburger:hover,.hamburger:focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
  body.sidebar-open{overflow:hidden}
  .hero,.cards,.walls,.tiles,.grid2,.grid3{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){
  .hero,.cards,.walls,.tiles,.grid2,.grid3,.topiv-cards{grid-template-columns:1fr}
  .content{padding:14px}
  #tvChart{height:420px}
  .wheel-tabs{flex-wrap:wrap}
  .wheel-tabs button{flex:1 1 40%}
}

.scan-panel{border:1px solid var(--line);border-radius:12px;padding:12px 10px}
.scan-panel .side-label{padding:0}
.scan-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.scan-panel .wl-add input{width:112px}
.scan-save{width:100%;margin-top:10px;padding:8px 10px;border-radius:999px;border:1px solid var(--line);background:var(--panel-2);transition:filter .15s ease,transform .15s ease}
.scan-save:not(:disabled):hover,.scan-save:not(:disabled):focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
.scan-save:disabled{opacity:.45;cursor:default}
.scan-token{margin-top:10px}
.scan-token .wl-add{margin-top:8px}
.scan-token .wl-add input{width:118px}
.scan-forget{margin-top:8px;background:none;border:0;color:var(--muted);text-decoration:underline;padding:0}
.scan-forget:hover,.scan-forget:focus-visible{color:#31c48d}

.screen-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;align-items:center}
.screen-filters input,.screen-filters select{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:6px 10px;color:var(--text);width:132px}
.screen-filters input[type="checkbox"]{width:auto}
.screen-filters label{display:flex;gap:6px;align-items:center;color:var(--text-2);font-size:.85rem}
.table-wrap{overflow:auto}
#sec-screener .table-wrap{max-height:72vh}
/* Q3: dates and short headers never wrap mid-token — the table scrolls
   inside its wrap instead, like the other tables. Macro "As of" dates
   and the COT table headers. */
table.data td.asof{white-space:nowrap}
#cotTable th{white-space:nowrap}
#screenTable{white-space:nowrap;font-size:.98rem}
#screenTable th,#screenTable td{padding:10px 8px}
#screenTable th{font-size:.84rem}
#screenTable thead th{position:sticky;top:0;z-index:2;background:color-mix(in srgb, var(--panel) 88%, transparent);backdrop-filter:blur(10px);cursor:pointer;white-space:nowrap;text-align:center}
#screenTable thead th:not(:last-child):hover{color:#31c48d}
#screenTable thead th:last-child{cursor:default}
#screenTable tbody tr:hover td{background:var(--up-soft);transition:background .12s}
#screenTable tbody tr:hover td:first-child{box-shadow:inset 2px 0 0 #31c48d;transition:box-shadow .12s}
#scorecard tbody tr:hover td{background:var(--up-soft);transition:background .12s}
#scorecard tbody tr:hover td:first-child{box-shadow:inset 2px 0 0 #31c48d;transition:box-shadow .12s}
#unusual tbody tr:hover td{background:var(--up-soft);transition:background .12s}
#unusual tbody tr:hover td:first-child{box-shadow:inset 2px 0 0 #31c48d;transition:box-shadow .12s}
.topiv-cards tbody tr:hover td{background:var(--up-soft);transition:background .12s}
.topiv-cards tbody tr:hover td:first-child{box-shadow:inset 2px 0 0 #31c48d;transition:box-shadow .12s}
.topiv-cards tr.top1 td{background:linear-gradient(90deg,var(--warn-soft),transparent 60%)}
.topiv-cards tr.top1 td:first-child{box-shadow:inset 3px 0 0 var(--warn);color:var(--warn);font-weight:800}
#screenTable th:nth-child(13),#screenTable td:nth-child(13){min-width:190px}
.ma-pill{font-size:.85rem;border-radius:999px;padding:5px 9px;background:var(--panel-3);color:var(--muted);font-family:var(--mono)}
.sym-link{background:none;border:0;color:var(--accent-2);font-weight:700;padding:0;cursor:pointer;font-size:inherit}
.sym-link:hover,.sym-link:focus-visible{color:#31c48d;text-decoration:underline}
.sym-link.entry{color:var(--dir-up)}
#chartInfo:empty{display:none}
.chart-top{display:flex;gap:10px;align-items:center;margin:14px 0 4px}
.chart-top b{font-size:1.4rem}
.kv{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid var(--line-soft)}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--muted);font-size:.78rem}
.kv b{font-variant-numeric:tabular-nums}
.wall .eyebrow{margin:0 0 6px}
.clamp3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.gex-chart-wrap{height:420px;margin:14px 0}
#gexBody .walls{margin-top:16px}
#chartFunds{margin-top:16px}
.topiv-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:12px 0}
.gex-big{font-size:1.5rem;font-weight:800;margin:6px 0 2px}
.gex-chart-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0 4px}
#tickerPicker{display:flex;gap:8px;align-items:center}
#tickerPicker[hidden]{display:none}
#tickerInput{width:110px;background:var(--panel-2);border:1px solid var(--line);border-radius:999px;padding:6px 12px;color:var(--text);text-transform:uppercase}
.ma-pill.on{background:var(--dir-up-soft);color:var(--dir-up)}
.track-btn{border:1px solid var(--line);background:var(--panel-2);border-radius:999px;padding:4px 9px;color:var(--text-2);font-size:.78rem;transition:filter .15s ease,transform .15s ease}
.track-btn:not(:disabled):hover,.track-btn:not(:disabled):focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
.track-btn:disabled{opacity:.45;cursor:default}
#gexBtn{background:var(--accent);border-color:transparent;color:#17202b;font-weight:700} /* bright CTA: solid accent, dark ink (5.2:1 on dark) */
html[data-theme="light"] #gexBtn{color:#fff} /* white ink on the light-theme accent (4.5:1) */

#gexBody .walls{grid-template-columns:repeat(4,minmax(0,1fr))}
#gexBody .wall{transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
#gexBody .wall:hover{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
@media(max-width:1100px){
  #gexBody .walls{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  #gexBody .walls{grid-template-columns:1fr}
}

/* ---- Signals grid (all widths; the one-screen layout is the media query below) ---- */
.signals-h2{display:none}
#sec-signals .signals-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;
  grid-template-areas:"notable distance" "rotation rotation" "perf table"}
.signals-notable{grid-area:notable}
.signals-distance{grid-area:distance}
.signals-rotation{grid-area:rotation}
.signals-perf{grid-area:perf}
.signals-table{grid-area:table}
#sec-signals .signals-grid>.panel{min-width:0}
#distanceBars{display:flex;flex-direction:column}
.dist-row{display:flex;flex-direction:column;justify-content:center}
#rotation{display:flex;flex-direction:column}
#rotation svg{width:100%}
#sectorTable{display:flex;flex-direction:column}
#sectorTable .kv{align-items:center}
#sectorTable .kv b{white-space:nowrap}
#sectorTable .rot-row{cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
#sectorTable .rot-row:hover,#sectorTable .rot-row:focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
#sectorTable .rot-row.hot{background:var(--accent-soft)}
.signals-perf .badge,.signals-table .badge{white-space:nowrap}
/* sector performance card */
.perf-sec{font-size:.68rem;font-weight:800;letter-spacing:.12em;color:var(--muted);margin:10px 0 2px}
.perf-rows{display:flex;flex-direction:column}
.perf-row{display:flex;align-items:center;gap:9px;padding:3px 0}
.perf-row .sym{font-weight:700;font-size:.82rem;width:36px;flex:0 0 auto}
.perf-zone{flex:1;min-width:0;display:flex;align-items:center;border-left:1px solid var(--line)}
.perf-bar{height:9px;min-width:3px;border-radius:2px;flex:0 0 auto}
.perf-bar.g{background:var(--dir-up)}
.perf-bar.r{background:var(--dir-down)}
.perf-val{font-family:var(--mono);font-size:.78rem;font-weight:700;flex:0 0 64px;text-align:right;white-space:nowrap}
@media(max-width:720px){
  #sec-signals .signals-grid{grid-template-columns:1fr;grid-template-areas:"notable" "distance" "rotation" "table" "perf"}
}
/* ---- Signals one-screen (desktop, wide + tall only; smaller windows keep scrolling) ---- */
/* The fit is really about MAIN width AND viewport height, not viewport width alone:
   the 22 perf rows need ~15px each (13.12px text) or they clip. Measured Nov 14:
   dock closed, h=1080: 1500px -> 8.5px rows (22 clipped); 1600 -> 11.8px;
   1700 -> 15.2px clean, flat to 1920; 2560 -> 14.8px clean. Dock closed, w=1920:
   h=1000 -> 11.5px; h=1060 -> 14.3px; h=1080 -> 15.2px clean. Dock open, h=1080:
   2050 -> stands down (scrolling, 21px rows); 2100 -> 15.2px clean (holds).
   Thresholds: closed >=1750px wide (step 1700 + 50 margin), open >=2100px, both
   >=1080px tall (height step ~1070). Below either threshold the page scrolls
   normally and the rows keep their natural 21px height. NEVER squeeze text
   below readable size to fit: stand down and scroll instead. */
@media (min-width:1750px) and (min-height:1080px){
  body.sec-signals:not(.watchlist-open) .main{height:100vh;display:flex;flex-direction:column;overflow:hidden}
  body.sec-signals:not(.watchlist-open) .sidebar{overflow-y:auto}
  body.sec-signals:not(.watchlist-open) .topbar{padding-top:10px;padding-bottom:10px}
  body.sec-signals:not(.watchlist-open) .tape{padding-top:8px;padding-bottom:8px}
  body.sec-signals:not(.watchlist-open) .content{flex:1;min-height:0;padding:14px 22px 12px}
  body.sec-signals:not(.watchlist-open) .content>.page-head{display:none}
  body.sec-signals:not(.watchlist-open) #sec-signals{flex:1;min-height:0;display:flex}
  body.sec-signals:not(.watchlist-open) #sec-signals .signals-grid{
    flex:1;min-height:0;gap:12px;
    grid-template-columns:minmax(500px,5fr) 4fr 4fr;
    grid-template-rows:minmax(0,auto) minmax(0,1fr);
    grid-template-areas:"notable distance rotation" "notable perf table";
  }
  body.sec-signals:not(.watchlist-open) #sec-signals .signals-grid>.panel{display:flex;flex-direction:column;min-height:0;padding:14px 16px 12px}
  body.sec-signals:not(.watchlist-open) #sec-signals .signals-h2{display:block}
  body.sec-signals:not(.watchlist-open) #setups{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}
  body.sec-signals:not(.watchlist-open) #setups .signal-row{flex:1;min-height:0;white-space:nowrap;overflow:hidden}
  body.sec-signals:not(.watchlist-open) #setups .signal-row>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
  body.sec-signals:not(.watchlist-open) #distanceBars{flex:1;min-height:0}
  body.sec-signals:not(.watchlist-open) .dist-row{flex:1;min-height:0}
  body.sec-signals:not(.watchlist-open) #sec-signals .dist-row .lvl{margin-top:0}
  body.sec-signals:not(.watchlist-open) #sec-signals .dist-row .hint{margin:0}
  body.sec-signals:not(.watchlist-open) #rotation{flex:1;min-height:0}
  body.sec-signals:not(.watchlist-open) #rotation svg{flex:1;min-height:0;height:100%}
  body.sec-signals:not(.watchlist-open) #sectorTable{flex:1;min-height:0}
  body.sec-signals:not(.watchlist-open) #sectorTable .kv{flex:1;min-height:0}
  body.sec-signals:not(.watchlist-open) #sectorPerf{flex:1;min-height:0;display:flex;flex-direction:column}
  body.sec-signals:not(.watchlist-open) .perf-rows{flex:1;min-height:0}
  body.sec-signals:not(.watchlist-open) .perf-row{flex:1;min-height:0;padding:0}
  body.sec-signals:not(.watchlist-open) .perf-sec{flex:0 0 auto}
}
@media (min-width:2100px) and (min-height:1080px){
  body.sec-signals.watchlist-open .main{height:100vh;display:flex;flex-direction:column;overflow:hidden}
  body.sec-signals.watchlist-open .sidebar{overflow-y:auto}
  body.sec-signals.watchlist-open .topbar{padding-top:10px;padding-bottom:10px}
  body.sec-signals.watchlist-open .tape{padding-top:8px;padding-bottom:8px}
  body.sec-signals.watchlist-open .content{flex:1;min-height:0;padding:14px 22px 12px}
  body.sec-signals.watchlist-open .content>.page-head{display:none}
  body.sec-signals.watchlist-open #sec-signals{flex:1;min-height:0;display:flex}
  body.sec-signals.watchlist-open #sec-signals .signals-grid{
    flex:1;min-height:0;gap:12px;
    grid-template-columns:minmax(500px,5fr) 4fr 4fr;
    grid-template-rows:minmax(0,auto) minmax(0,1fr);
    grid-template-areas:"notable distance rotation" "notable perf table";
  }
  body.sec-signals.watchlist-open #sec-signals .signals-grid>.panel{display:flex;flex-direction:column;min-height:0;padding:14px 16px 12px}
  body.sec-signals.watchlist-open #sec-signals .signals-h2{display:block}
  body.sec-signals.watchlist-open #setups{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}
  body.sec-signals.watchlist-open #setups .signal-row{flex:1;min-height:0;white-space:nowrap;overflow:hidden}
  body.sec-signals.watchlist-open #setups .signal-row>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
  body.sec-signals.watchlist-open #distanceBars{flex:1;min-height:0}
  body.sec-signals.watchlist-open .dist-row{flex:1;min-height:0}
  body.sec-signals.watchlist-open #sec-signals .dist-row .lvl{margin-top:0}
  body.sec-signals.watchlist-open #sec-signals .dist-row .hint{margin:0}
  body.sec-signals.watchlist-open #rotation{flex:1;min-height:0}
  body.sec-signals.watchlist-open #rotation svg{flex:1;min-height:0;height:100%}
  body.sec-signals.watchlist-open #sectorTable{flex:1;min-height:0}
  body.sec-signals.watchlist-open #sectorTable .kv{flex:1;min-height:0}
  body.sec-signals.watchlist-open #sectorPerf{flex:1;min-height:0;display:flex;flex-direction:column}
  body.sec-signals.watchlist-open .perf-rows{flex:1;min-height:0}
  body.sec-signals.watchlist-open .perf-row{flex:1;min-height:0;padding:0}
  body.sec-signals.watchlist-open .perf-sec{flex:0 0 auto}
}
.setups-more{display:block;width:100%;margin-top:10px;padding:10px 12px;border:1px solid var(--line-soft);border-radius:12px;background:var(--panel-2);color:var(--text);font:inherit;font-size:.85rem;cursor:pointer;transition:filter .15s ease,transform .15s ease}
.setups-more:hover,.setups-more:focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
#rotation .rot-trail{opacity:.12;transition:opacity .15s ease}
html[data-theme="light"] #rotation .rot-trail{opacity:.25}
html[data-theme="light"] #rotation.isolated .rot-trail{opacity:.04}
html[data-theme="light"] #rotation.isolated g.hot .rot-trail{opacity:.9}
#rotation .rot-dot{cursor:pointer;transition:opacity .15s ease,stroke .15s ease,filter .15s ease}
#rotation g[data-sym]:hover .rot-dot{stroke:#31c48d;stroke-width:2;filter:drop-shadow(0 0 6px rgba(49,196,141,.8))}
#rotation .rot-label{transition:opacity .15s ease}
#rotation .rot-leader{opacity:.45}
#rotation g[data-sym]{cursor:pointer}
#rotation.isolated .rot-trail{opacity:.04}
#rotation.isolated g.hot .rot-trail{opacity:.9}
#rotation.isolated .rot-dot{opacity:.3}
#rotation.isolated g.hot .rot-dot{opacity:1}
#rotation.isolated .rot-label{opacity:.25}
#rotation.isolated g.hot .rot-label{opacity:1}
#rotation.isolated .rot-leader{opacity:.1}
#rotation.isolated g.hot .rot-leader{opacity:.6}

.topiv-cards > *{min-width:0}
@media(max-width:720px){
  .topiv-cards{grid-template-columns:1fr}
}

#walls{grid-template-columns:repeat(3,minmax(0,1fr))}
#walls .wall{background:var(--panel-2);border:1px solid var(--line-soft);border-radius:16px;padding:18px 20px;box-shadow:0 10px 30px rgba(0,0,0,.22);transition:transform .15s,border-color .15s,box-shadow .15s}
#walls .wall:hover{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
#walls .tile-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
#walls .tile-ticker{font-size:1.15rem;font-weight:700}
#walls .tile-spot{font-size:.82rem;color:var(--muted)}
html[data-theme="light"] #walls .wall{box-shadow:0 8px 26px rgba(24,39,75,.08)}
html[data-theme="light"] #walls .wall:hover{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
@media(max-width:1100px){
  #walls{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){
  #walls{grid-template-columns:1fr}
}

/* ---- Watch list (right dock, TradingView model) ---- */
.watchlist-dock{
  width:300px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:12px;
  padding:20px 14px;border-left:1px solid var(--line-soft);background:rgba(9,12,18,.92);
  overflow-y:auto;
}
html[data-theme="light"] .watchlist-dock{background:rgba(255,255,255,.9)}
.app-shell:not(.watchlist-open) .watchlist-dock{display:none}
.wl-dock-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.wl-dock-head h2{margin:0;font-size:1.05rem}
.wl-dock-head .hint{margin:4px 0 0}
.wl-close{border:0;background:transparent;color:var(--muted);font-size:1.4rem;line-height:1;padding:2px 6px;border-radius:8px}
.wl-close:hover,.wl-close:focus-visible{color:#31c48d}
.wl-head,.wl-row{display:grid;grid-template-columns:1fr 62px 54px 54px;gap:8px;align-items:baseline}
.wl-head{color:var(--muted);font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;padding:0 10px}
.wl-head span:nth-child(n+2){text-align:right}
.wl-rows{display:flex;flex-direction:column;gap:4px}
.wl-row{
  width:100%;text-align:left;background:var(--panel-2);border:1px solid var(--line-soft);
  border-radius:10px;padding:9px 10px;cursor:pointer;font-variant-numeric:tabular-nums;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.wl-row:hover,.wl-row:focus-visible{transform:translateY(-2px);border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.wl-row .sym{font-weight:700}
.wl-row .px,.wl-row .ch,.wl-row .cp{font-family:var(--mono);font-size:.82rem;text-align:right;white-space:nowrap}
.wl-toggle{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;background:var(--panel-2);color:var(--text-2);padding:6px 12px;font-size:.78rem;transition:filter .15s ease,transform .15s ease}
.wl-toggle:hover,.wl-toggle:focus-visible{filter:brightness(1.08);transform:translateY(-1px)}
.wl-toggle svg{flex:none}
.watchlist-dock .scan-panel{flex:none}
.watchlist-dock .side-label{padding:0}
.card.flash{border-color:#31c48d;box-shadow:0 0 0 1px rgba(49,196,141,.35),0 18px 50px rgba(49,196,141,.35),0 8px 30px rgba(49,196,141,.25)}
.watchlist-overlay{display:none}
@media(max-width:1100px){
  .app-shell:not(.watchlist-open) .watchlist-dock{display:flex;transform:translateX(105%)}
  .watchlist-dock{position:fixed;top:0;right:0;height:100vh;width:300px;max-width:85vw;z-index:50;transform:translateX(105%);transition:transform .2s ease}
  .app-shell.watchlist-open .watchlist-dock{transform:none}
  .watchlist-overlay.open{display:block;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:40}
}
/* The dock narrows MAIN by 300px, so the regime chart + S&R side-by-side
   grid runs out of room on narrower desktops (at 1280 the S&R table stuck
   55px out of its panel). With the dock open below 1500px viewport the
   regime grid stacks, exactly as it already does below 1100px viewport. */
@media(max-width:1500px){
  body.watchlist-open .regime-panel .grid2{grid-template-columns:1fr}
}
@media(max-width:720px){
  .wl-toggle-label{display:none}
  .wl-toggle{padding:6px 9px}
}
/* Phone topbar: keep both controls (Watch list toggle + theme) visible and
   unclipped. The timestamp and the label tail are informational, so they
   stand down below 480px instead of squeezing the controls. */
@media(max-width:480px){
  #genAt{display:none}
  .topbar-tail{display:none}
}

/* ---- Market radar table (Phase 1) ----
   Factor cells −2…+2, fully colour-filled (EdgeFinder grammar, blue/red
   direction palette). Grey is no data, never blank. The four row-invariant
   (global) columns — VIX, put/call, AAII, breadth — use the soft wash
   instead of the solid fill, so one value repeated down 19 rows never
   paints a wall; the per-row Score column keeps the full fill. Bias pills
   use the same five levels. Compact variant below 720px keeps Output only
   (Asset + Bias) — restructure, never squeeze type. */
.radar-panel .radar-head{align-items:flex-start}
.radar-panel .radar-head h2{font-size:1.45rem;letter-spacing:-.01em}
.radar-panel .radar-head .fresh-stamp{flex:none;margin-top:6px;white-space:nowrap}
.radar-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.radar-filters input,.radar-filters select{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:6px 10px;color:var(--text);width:180px}
.radar-filters input::placeholder{color:var(--muted)}
.radar-table{white-space:nowrap}
.radar-table th,.radar-table td{padding:9px 8px;text-align:center}
.radar-table th:first-child,.radar-table td:first-child{text-align:left}
.radar-table thead tr.grp th{
  color:var(--accent-2);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;
  padding-top:12px;text-align:center;border-bottom:1px solid var(--line-soft)
}
.radar-table thead tr.grp th:first-child{text-align:left}
.radar-table thead tr:not(.grp) th{white-space:nowrap}
.radar-table .info{color:var(--muted);font-size:.78rem;cursor:help}
.radar-table .radar-asset b{font-size:.92rem}
.radar-table .radar-asset .hint{display:inline;margin:0 0 0 4px;font-size:.75rem}
.radar-table tr.radar-row{cursor:pointer}
.radar-table tr.radar-row:hover td{background:var(--accent-soft)}
.radar-table tr.radar-row:hover td:first-child{box-shadow:inset 2px 0 0 var(--accent)}
.radar-table tr.radar-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.radar-table tr.radar-empty td{color:var(--muted);text-align:center;padding:18px 8px}
.fcell{font-family:var(--mono);font-size:.82rem;font-weight:700;font-variant-numeric:tabular-nums}
.fcell.f2{background:var(--dir-solid);color:#fff}
.fcell.f1{background:var(--dir-up-soft);color:var(--dir-up)}
.fcell.f0{background:var(--panel-3);color:var(--text-2)}
.fcell.fm1{background:var(--dir-down-soft);color:var(--dir-down)}
.fcell.fm2{background:var(--dir-down-solid);color:#fff}
.fcell.f-na{background:transparent;color:var(--muted);font-weight:400}
/* Global (row-invariant) factor cells — VIX, put/call, AAII, breadth:
   the value is identical down all 19 rows, so a solid f2/fm2 block
   paints a wall. The wash demotes the solid to the soft tint (same
   sign, same text colour) while the per-row Score column keeps the
   full fill. f1/fm1/f0 globals are already soft and need no rule. */
.fcell.global.f2{background:var(--dir-up-soft);color:var(--dir-up)}
.fcell.global.fm2{background:var(--dir-down-soft);color:var(--dir-down)}

/* ---- Sector conviction strip (Phase 5) ----
   Same −2…+2 filled-cell grammar as the Radar factor cells (fcell f2/f1/
   f0/fm1/fm2): blue bullish, red bearish, grey neutral. On a phone the
   label + cells sit in one horizontally scrolling row (Q3) with the
   "as of" hint below it, instead of wrapping to four rows and pushing
   the Radar table down — text is never squeezed. */
.sector-strip{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:2px 0 12px;min-width:0}
.sector-strip .sector-cells{display:contents}
.sector-strip .strip-label{font-size:.8rem;font-weight:700;color:var(--text-2);margin-right:2px;white-space:nowrap}
.sector-strip .strip-cell{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:8px;white-space:nowrap;cursor:help}
.sector-strip .strip-hint{font-size:.78rem;color:var(--muted);white-space:nowrap}
.sector-strip:empty{display:none}
/* Phase 6: alerts strip (above the conviction strip) + armed list
   (below the Radar table). Soft direction tints from the fcell
   palette — blue bullish, red bearish, grey neutral; nothing is
   alarm-red. Rows wrap at phone widths; text stays readable size. */
.alerts-strip{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;margin:2px 0 12px;min-width:0}
.alerts-strip .strip-label{font-size:.8rem;font-weight:700;color:var(--text-2);margin-right:2px;white-space:nowrap;padding-top:5px}
.alerts-strip .strip-hint{font-size:.78rem;color:var(--muted);padding-top:6px}
.alerts-strip:empty{display:none}
.alert-row{display:flex;gap:8px;align-items:baseline;flex:1 1 calc(100% - 70px);font-size:.85rem;line-height:1.45;padding:7px 10px;border-radius:8px;min-width:0}
.alert-row .alert-text{min-width:0}
.alert-row.dir-up{background:var(--dir-up-soft);color:var(--dir-up)}
.alert-row.dir-down{background:var(--dir-down-soft);color:var(--dir-down)}
.alert-row.dir-flat{background:var(--panel-3);color:var(--text-2)}
.alert-row .alert-date{color:var(--muted);white-space:nowrap;margin-left:auto;flex:none}
.alert-cleared{flex:1 1 100%;font-size:.78rem;color:var(--muted);line-height:1.45}
.armed-alerts{margin:14px 0 4px;min-width:0}
.armed-alerts h3{font-size:1rem;margin:0 0 2px}
.armed-alerts .armed-group{border-top:1px solid var(--panel-3);padding:8px 0}
.armed-alerts .armed-head{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;font-size:.85rem}
.armed-alerts .armed-threshold{font-size:.8rem;color:var(--muted)}
.armed-alerts .armed-row{display:flex;gap:10px;font-size:.85rem;padding:2px 0}
.armed-alerts .armed-ticker{font-family:var(--mono);font-weight:700;min-width:44px}
.armed-alerts .armed-current{color:var(--text-2)}

/* ---- Scenarios line on the Signals page (Phase 5) ----
   A compact full-width line under the page head: the three pooled base
   rates with the strongest 30-day follow-through. Blue/red = direction
   of the average follow-through (not P/L), grey = thin history. */
.scenarios-line{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 14px;align-items:baseline;min-width:0}
.scenarios-line .sc-line-label{font-size:.8rem;font-weight:700;color:var(--text-2);white-space:nowrap}
.scenarios-line .sc-chip{font-size:.85rem;white-space:nowrap;background:var(--panel-2);border:1px solid var(--line);border-radius:999px;padding:4px 10px}
.scenarios-line .sc-chip b{font-weight:700}
.scenarios-line .sc-chip .sc-num{font-family:var(--mono);font-weight:700}
.scenarios-line .sc-chip.sc-up .sc-num{color:var(--dir-up)}
.scenarios-line .sc-chip.sc-down .sc-num{color:var(--dir-down)}
.scenarios-line .sc-chip.sc-thin .sc-num{color:var(--muted)}
.scenarios-line .sc-empty{font-size:.85rem;color:var(--muted)}
.scenarios-line:empty{display:none}
.bias-pill{
  display:inline-block;padding:3px 9px;border-radius:999px;font-size:.72rem;font-weight:700;white-space:nowrap
}
.bias-pill.bias-vb{background:var(--dir-solid);color:#fff}
.bias-pill.bias-b{background:var(--dir-up-soft);color:var(--dir-up)}
.bias-pill.bias-n{background:var(--panel-3);color:var(--text-2)}
.bias-pill.bias-be{background:var(--dir-down-soft);color:var(--dir-down)}
.bias-pill.bias-vbe{background:var(--dir-down-solid);color:#fff}
@media(max-width:720px){
  .radar-table .fcol{display:none}
  .radar-table thead tr.grp th:not(:first-child){display:none}
  .radar-filters input{flex:1;min-width:140px}
  /* Q3: conviction strip — label + cells scroll as one row, the "as
     of" hint sits below it instead of the strip wrapping to four
     rows. Desktop keeps the single wrapping row (display:contents). */
  .sector-strip{display:block}
  .sector-strip .sector-cells{display:flex;gap:6px;align-items:center;overflow-x:auto;min-width:0;padding-bottom:2px}
  .sector-strip .strip-hint{display:block;margin-top:6px;white-space:normal}
}

/* ---- Scorecard drill-down (Phase 2) ---- */
.score-cell{font-family:var(--mono);font-size:1rem;font-weight:800;text-align:center}
.score-cell.sc-pos{color:var(--dir-up)}
.score-cell.sc-neg{color:var(--dir-down)}
.score-cell.sc-zero{color:var(--text-2)}
.score-cell.sc-na{color:var(--muted);font-weight:400}
#scorecardDetail{margin-bottom:16px}
#scorecardDetail:empty{display:none}
.scorecard-panel .sc-grid{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:20px;align-items:start}
.sc-gauge{width:100%;max-width:340px;display:block;margin:0 auto}
.sc-gauge .sc-track{fill:none;stroke:var(--panel-3);stroke-width:10;stroke-linecap:round}
.sc-gauge .sc-value{fill:none;stroke-width:10;stroke-linecap:round}
.sc-gauge .sc-value.sc-vb,.sc-gauge .sc-value.sc-b{stroke:var(--dir-solid)}
.sc-gauge .sc-value.sc-be,.sc-gauge .sc-value.sc-vbe{stroke:var(--dir-down-solid)}
.sc-gauge .sc-value.sc-n{stroke:var(--muted)}
.sc-gauge .sc-needle{stroke:var(--text);stroke-width:2}
.sc-gauge .sc-hub{fill:var(--text)}
.sc-gauge .sc-num{font-family:var(--mono);font-size:30px;font-weight:800;fill:var(--text);text-anchor:middle}
.sc-gauge .sc-verdict{font-size:13px;font-weight:700;text-anchor:middle;fill:var(--text-2)}
.sc-gauge .sc-verdict.sc-vb,.sc-gauge .sc-verdict.sc-b{fill:var(--dir-up)}
.sc-gauge .sc-verdict.sc-be,.sc-gauge .sc-verdict.sc-vbe{fill:var(--dir-down)}
.sc-donuts{display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap;margin-top:8px}
.sc-donut{flex:1 1 56px;min-width:56px;text-align:center}
.sc-donut svg{width:64px;height:64px}
.sc-donut .sc-track{fill:none;stroke:var(--panel-3);stroke-width:7}
.sc-donut .sc-ring{fill:none;stroke-width:7;stroke-linecap:round;transform:rotate(-90deg);transform-origin:center}
.sc-donut .sc-ring.sc-b{stroke:var(--dir-solid)}
.sc-donut .sc-ring.sc-be{stroke:var(--dir-down-solid)}
.sc-donut .sc-ring.sc-n{stroke:var(--muted)}
.sc-donut-num{font-family:var(--mono);font-size:15px;font-weight:800;fill:var(--text);text-anchor:middle}
.sc-donut span{display:block;font-size:.78rem;color:var(--text-2);margin-top:2px}
.sc-spark{width:100%;height:56px;margin-top:10px}
.sc-spark .sc-zero{stroke:var(--line);stroke-width:1}
.sc-spark .sc-line{fill:none;stroke:var(--accent);stroke-width:2}
.sc-spark .sc-dot{fill:var(--accent)}
table.data.sc-evidence th,table.data.sc-evidence td{padding:7px 8px;text-align:left}
table.data.sc-evidence td.ev-val{text-align:right}
table.data.sc-evidence td.fcell{text-align:center}
.sc-evidence .ev-group{color:var(--muted);font-size:.82rem;white-space:nowrap}
.sc-evidence .ev-val{font-family:var(--mono);font-size:.85rem;white-space:nowrap}
.sc-csp{margin-top:16px;border:1px dashed var(--line);border-radius:12px;padding:12px 14px}
.sc-csp h3{margin:0 0 4px;font-size:1rem}
@media(max-width:900px){
  .scorecard-panel .sc-grid{grid-template-columns:minmax(0,1fr)}
  .scorecard-panel .sc-grid > *{min-width:0}
  .sc-evidence .ev-val{white-space:normal}
}
