:root {
  color-scheme: dark;
  --bg: #090d13;
  --surface: #10161f;
  --surface-2: #151d28;
  --border: #263342;
  --border-soft: #1c2734;
  --text: #e7edf5;
  --muted: #8e9bad;
  --accent: #5cb8e6;
  --accent-soft: #122b3b;
  --live: #4fc8a2;
  --warn: #e3ae59;
  --danger: #e47b7b;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}

.portfolio-chart { min-height: 240px; color: var(--muted); }
.portfolio-chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.portfolio-chart polyline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.portfolio-chart .equity-line { stroke: #60a5fa; }
.portfolio-chart .risk-line { stroke: #f59e0b; }
.portfolio-chart .reference-line { stroke: #94a3b8; stroke-dasharray: 6 5; }
.operator-form { padding: 1.5rem; margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 1rem; margin: 1rem 0; }
.operator-form label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.operator-form input,.operator-form select { background: #101b2d; color: #e2e8f0; border: 1px solid #334155; padding: .65rem; border-radius: 6px; font: inherit; }
.operator-form button { margin-top: 1rem; padding: .7rem 1.2rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#spxPath svg, #btcPath svg, #creditPath svg { width:100%; display:block; }
details { margin: 1rem 0; }
summary { cursor:pointer; color:var(--accent); }
.playback-controls { position:sticky; top:64px; z-index:10; }
@media (min-width:821px) and (max-width:1500px) {
  .topbar { grid-template-columns:1fr auto; gap:8px; }
  .topbar nav { grid-column:1 / -1; grid-row:2; height:46px; overflow-x:auto; }
  .topbar nav a { white-space:nowrap; padding:0 12px; }
  .playback-controls { position:static; }
}
.portfolio-chart text { fill: #60a5fa; font-size: 13px; }
.portfolio-chart .risk-label { fill: #f59e0b; }

* { box-sizing: border-box; }
html { background: var(--bg); font-size: 16px; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--sans); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #8ed4f4; }
button, input, select { font: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  min-height: 64px; padding: 0 28px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px;
  background: rgba(9, 13, 19, .96); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #3d6982; background: var(--accent-soft); color: #9fddf8; font: 700 .76rem var(--mono); }
nav { display: flex; align-items: stretch; height: 64px; }
nav a { display: flex; align-items: center; padding: 0 16px; color: var(--muted); font-size: .9rem; font-weight: 600; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.top-meta { display: flex; align-items: center; gap: 12px; }
.research-badge { padding: 5px 9px; border: 1px solid #31586c; color: #9edbf6; background: var(--accent-soft); text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 750; }
.db-name { color: var(--muted); font: .75rem var(--mono); }

main { width: min(1760px, 100%); margin: 0 auto; padding: 28px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1 { margin: 2px 0; font-size: clamp(1.75rem, 3vw, 2.45rem); line-height: 1.1; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 3px; color: var(--accent); font: 700 .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.subtle { margin: 5px 0 0; color: var(--muted); font-size: .9rem; }
.heading-actions { display: flex; align-items: flex-end; gap: 16px; }
.date-form, .filter-bar { display: flex; align-items: flex-end; gap: 9px; }
.date-form label, .filter-bar label, .sort-control { display: grid; gap: 5px; color: var(--muted); font-size: .875rem; font-weight: 650; }
input, select, button, .date-form a { min-height: 36px; padding: 7px 10px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; }
button { cursor: pointer; background: #173548; border-color: #31586c; font-weight: 650; }
button:hover { background: #20465c; }
.date-form a { display: inline-flex; align-items: center; color: var(--muted); }
.filter-bar { margin-bottom: 18px; padding: 14px; background: var(--surface); border: 1px solid var(--border-soft); }
.filter-bar label { min-width: 180px; }

.status { display: inline-flex; width: fit-content; align-items: center; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; font: 700 .75rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.status-live, .status-session-complete, .status-closed { color: #82ddc1; border-color: #286e5a; background: #102920; }
.status-stale, .status-pending { color: #f0c477; border-color: #74582c; background: #292112; }
.status-historical, .status-no-data { color: #a8b5c5; background: #171e28; }
.warning-banner { margin-bottom: 18px; padding: 11px 14px; border-left: 3px solid var(--warn); background: #251e13; color: #f2cb88; font-size: .9rem; }
.hidden { display: none !important; }

.market-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.market-strip.five-up { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-card { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border-soft); border-top-color: #315069; }
.metric-card span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.metric-card strong { font: 650 clamp(1.15rem, 2vw, 1.55rem) var(--mono); letter-spacing: -.04em; }

.dashboard-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.lead-grid { grid-template-columns: minmax(0, 2.15fr) minmax(300px, .85fr); }
.context-grid { grid-template-columns: 1fr 1fr 1.2fr; }
.research-charts { grid-template-columns: 1fr 1fr; }
.analytics-grid { grid-template-columns: repeat(4, 1fr); }
.panel { min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.panel + .panel.table-panel, .table-panel + .panel { margin-top: 0; }
.table-panel { margin-bottom: 16px; padding: 0; }
.panel-heading { min-height: 42px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.table-panel > .panel-heading { padding: 17px 18px 0; }
.panel-heading h2 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.chart-note { max-width: 260px; color: var(--muted); font-size: .75rem; text-align: right; }
.chart-wrap { position: relative; height: 330px; }
.chart-wrap.small { height: 250px; }
.momentum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.momentum-grid div { padding: 13px 10px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.momentum-grid span { display: block; color: var(--muted); font-size: .75rem; }
.momentum-grid strong { display: block; margin-top: 6px; font: 650 1rem var(--mono); }

dl { margin: 0; }
.health-list div, .detail-list div, .compact-levels div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
dt { color: var(--muted); font-size: .875rem; }
dd { margin: 0; font: .875rem var(--mono); text-align: right; }
.health-states { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.health-states span { color: var(--muted); font-size: .75rem; }
.health-states i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--live); }
.health-states b { color: var(--text); font-weight: 650; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 11px 14px; border-top: 1px solid var(--border-soft); text-align: right; font: .875rem var(--mono); }
th { position: sticky; top: 0; color: var(--muted); background: #0d131b; font-family: var(--sans); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
tbody tr:hover { background: #141e29; }
.click-row { cursor: pointer; }
.type-chip { color: #b5dff2; font-weight: 750; }
.empty { padding: 26px; color: var(--muted); text-align: center !important; font-family: var(--sans); }
.count-pill { padding: 4px 9px; color: #bcd2df; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font: .74rem var(--mono); }
.research-note { color: var(--muted); font-size: .82rem; }
.bucket-panel { padding-bottom: 12px; }
.bucket-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .8rem; }
.bucket-row b { color: var(--text); font: .78rem var(--mono); }
.context-summary { grid-column: span 2; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.detail-grid.thirds { grid-template-columns: repeat(3, 1fr); }
.path-value { max-width: 320px; overflow-wrap: anywhere; }
.context-values, .count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border-soft); }
.context-values div, .count-grid div { min-width: 0; padding: 12px; background: var(--surface-2); }
.context-values span, .count-grid span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.context-values b, .count-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font: .78rem var(--mono); }
.count-grid strong { font-size: 1.15rem; }
.empty-page { display: grid; min-height: 60vh; place-items: center; color: var(--muted); }

/* Primary navigation and the focused home view. Detail pages retain their layout. */
.nav-more { position: relative; margin: 0; align-self: stretch; }
.nav-more > summary { display: flex; align-items: center; height: 100%; padding: 0 16px; color: var(--muted); font-size: .9rem; font-weight: 600; list-style: none; }
.nav-more > summary::after { content: '⌄'; margin-left: 8px; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary.active { color: var(--text); }
.nav-menu { position: absolute; top: 100%; right: 0; width: 235px; padding: 8px; max-height: 75vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 16px 36px #0008; }
.nav-menu a { padding: 10px 14px; border-bottom: 0; }
.nav-menu a:hover, .nav-menu a.active { background: var(--surface-2); }
.home-page { max-width: 1280px; margin: 0 auto; }
.home-heading { align-items: center; margin: 6px 0 20px; }
.home-heading h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.home-links, .home-session, .home-market, .home-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; }
.home-links { font-size: .86rem; }
.date-picker { position: relative; margin: 0; }
.date-picker .date-form { position: absolute; z-index: 12; right: 0; top: 28px; padding: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 32px #0008; }
.home-session { color: var(--muted); font-size: .82rem; margin-bottom: 20px; }
.home-session .status { text-transform: none; font: 500 .8rem var(--sans); letter-spacing: 0; }
.home-session .subtle { margin: 0; margin-left: auto; font-size: .78rem; }
.home-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-metrics .metric-card { padding: 20px 22px; border-radius: 8px; }
.home-metrics .metric-card strong { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.home-metrics small { display: block; margin-top: 10px; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.pnl { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pnl.positive { color: #82ddc1; }
.pnl.negative { color: #f09a9a; }
.home-basis { margin: 11px 0 23px; color: var(--muted); font-size: .76rem; }
.home-attention { padding: 16px 20px; margin-bottom: 20px; border: 1px solid #5a472b; border-left: 3px solid var(--warn); border-radius: 6px; background: #1a1815; }
.home-attention .panel-heading { min-height: 24px; margin-bottom: 4px; }
.home-attention h2 { color: #f0c477; }
.attention-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid #30291e; }
.attention-item:first-of-type { border-top: 0; }
.attention-item b { font-size: .86rem; font-weight: 600; }
.attention-item p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.attention-item a { flex-shrink: 0; font-size: .8rem; }
.home-clear { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--muted); font-size: .82rem; }
.home-clear a { margin-left: auto; }
.clear-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); flex-shrink: 0; }
.home-page .table-panel { border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.home-page .panel-heading a { font-size: .8rem; }
.home-page .panel-heading h2 { font-size: 1.02rem; }
.home-page .count-pill { display: inline-block; vertical-align: middle; margin-left: 6px; }
.home-empty { padding: 10px 20px 24px; }
.home-empty b { font-size: .9rem; font-weight: 500; }
.home-empty p { color: var(--muted); margin: 5px 0 0; font-size: .83rem; }
.position-signal { white-space: normal; min-width: 230px; font-family: var(--sans); font-size: .82rem; }
.position-signal small { display: block; color: var(--muted); font-size: .72rem; margin-top: 4px; }
.home-detail-toggle { display: block; padding: 3px 0; margin-top: 3px; color: var(--accent); background: transparent; border: 0; font: .73rem var(--sans); cursor: pointer; }
.home-detail-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home-detail-toggle[aria-expanded="true"] { text-decoration: underline; }
.home-detail-row[hidden] { display: none; }
.home-detail-row > td { padding: 18px 20px; white-space: normal; text-align: left; background: var(--surface-2); font-family: var(--sans); }
.home-position-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.home-position-facts dt { font-size: .75rem; }
.home-position-facts dd { margin-top: 4px; text-align: left; overflow-wrap: anywhere; font-size: .83rem; }
.home-detail-row .subtle, .home-quote-evidence p { font-size: .76rem; line-height: 1.6; }
.home-quote-evidence table th, .home-quote-evidence table td { font-size: .72rem; padding: 8px 10px; }
.home-quote-label { display: block; margin-top: 4px; color: var(--muted); font: .72rem var(--sans); }
.home-quote-label + .home-detail-toggle { margin-left: auto; }
.home-research-score { min-width: 8rem; }
.home-research-score strong { font-size: 1.05rem; }
.home-score-driver { display: block; max-width: 15rem; margin: 5px 0 0 auto; white-space: normal; color: var(--muted); font: .72rem/1.45 var(--sans); }
.home-research-score .home-detail-toggle { margin-left: auto; }
.score-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 24px; text-align: left; white-space: normal; font-family: var(--sans); }
.score-breakdown h3 { font-size: .83rem; margin: 0 0 7px; }
.score-breakdown h3 span { display: block; margin-top: 4px; color: var(--accent); font: .82rem var(--mono); }
.score-breakdown p, .score-explanation-note { margin: 0; color: var(--muted); font: .76rem/1.6 var(--sans); white-space: normal; }
.score-explanation-note { margin-top: 12px; text-align: left; }
.research-score-driver { display: block; max-width: 26rem; margin-bottom: 7px; white-space: normal; color: var(--muted); }
.research-score-explanation { max-width: 34rem; white-space: normal; }
.research-score-explanation .score-breakdown { display: block; }
.research-score-explanation section { margin-top: 12px; }
.score-economics { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border, #31516a); white-space: normal; text-align: left; }
.score-economics h3 { font-size: .83rem; margin-bottom: 8px; }
.home-page .quote-concern { color: var(--warn); }
.opportunity-note { margin: 0; padding: 0 18px 14px; color: var(--warn); font-size: .8rem; }
.home-market { color: var(--muted); padding: 3px 2px 18px; font-size: .8rem; }
.home-market b { margin-left: 6px; color: var(--text); font-family: var(--mono); }
.home-market .subtle { font-size: .75rem; }
.home-journal { margin: 0 0 18px; border-top: 1px solid var(--border); }
.home-journal > summary { padding: 14px 0; font-size: .86rem; }
.home-footer { padding: 12px 0; font-size: .8rem; border-top: 1px solid var(--border-soft); }
@media (min-width: 821px) {
  .topbar nav { grid-column: auto; grid-row: auto; height: 64px; overflow: visible; }
}

@media (max-width: 1180px) {
  .market-strip { grid-template-columns: repeat(3, 1fr); }
  .lead-grid, .context-grid { grid-template-columns: 1fr 1fr; }
  .chart-panel, .session-panel { grid-column: 1 / -1; }
  .analytics-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-grid.thirds { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .topbar { padding: 0 16px; grid-template-columns: 1fr auto; }
  nav { grid-column: 1 / -1; order: 3; width: 100%; height: 46px; overflow-x: auto; }
  nav a { padding: 0 12px; white-space: nowrap; }
  .db-name { display: none; }
  main { padding: 20px 16px; }
  .page-heading, .heading-actions { align-items: flex-start; flex-direction: column; }
  .market-strip, .market-strip.five-up { grid-template-columns: repeat(2, 1fr); }
  .lead-grid, .context-grid, .research-charts, .detail-grid, .detail-grid.thirds { grid-template-columns: 1fr; }
  .chart-panel, .session-panel { grid-column: auto; }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .context-summary { grid-column: span 2; }
  .context-values, .count-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .topbar { gap: 8px; padding-top: 10px; }
  .topbar nav { overflow: visible; }
  .top-meta { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .top-meta .research-badge { font-size: .6rem; }
  .home-metrics { grid-template-columns: 1fr; gap: 10px; }
  .home-metrics .metric-card { padding: 15px 18px; }
  .home-session { gap: 8px 12px; }
  .home-session .subtle { margin-left: 0; }
  .home-heading { align-items: flex-start; gap: 16px; }
  .date-picker .date-form { right: auto; left: -125px; }
  .attention-item { align-items: flex-start; flex-direction: column; gap: 7px; }
  .home-clear { flex-wrap: wrap; }
  .home-clear a { margin-left: 16px; }
  .home-position-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Session context (day risk, expected move, premium, chain structure) */
.session-context { margin-bottom: 18px; }
.session-context .panel-heading { align-items: flex-start; }
.risk-pill { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); font: 700 .75rem var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.risk-low { color: #82ddc1; border-color: #2b5a4b; background: #10231d; }
.risk-elevated { color: #f2cb88; border-color: #5d4a25; background: #251e13; }
.risk-high { color: #f09a9a; border-color: #6a3333; background: #2a1515; }
.context-tile { padding: 14px; background: var(--surface-2); border: 1px solid var(--border-soft); min-width: 0; }
.context-tile h3 { margin: 0 0 8px; font-size: .8rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 8px; }
.context-figure { color: var(--text); font-family: var(--mono); }
.context-tag { color: var(--warn); font-size: .68rem; border: 1px solid #5d4a25; padding: 1px 6px; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.context-big { margin: 0; font: 600 1.6rem var(--mono); }
.context-big small { font-size: .8rem; color: var(--muted); margin-left: 4px; }
.context-note { margin: 6px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.context-note b { color: var(--text); }
.flag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .82rem; }
.flag-list li small { display: block; margin-left: 1.2em; color: var(--muted); font-size: .72rem; }
.flag-on { color: #f2cb88; }
.flag-off { color: var(--text); }
.flag-off span { color: var(--muted); }
.flag-unknown { color: var(--muted); }
.context-history { margin: 12px 0 0; }
.context-footer { margin: 12px 0 0; font-size: .8rem; color: var(--muted); }
.v1-alert { color: #82ddc1; }
.tracker-forward td { border-top-color: var(--border); }
.tracker-legs { margin: 4px 0 0; font-size: .72rem; }
.tracker-legs summary { font-size: .72rem; }
.tracker-findings { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: .9rem; max-width: 95ch; }
.tracker-rule { white-space: normal; min-width: 240px; max-width: 380px; font-family: var(--sans); }
.tracker-rule b { display: block; font-size: .875rem; }
.tracker-rule small { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.tracker-sessions .table-scroll, .session-context .table-scroll { max-height: none; }
.level-call { color: #82ddc1; }
.level-put { color: #f09a9a; }

/* ---- Today page, visual-first (Oct 12) ---- */
.level-call { color: #9085e9; }
.level-put { color: #d4741c; }

/* Today strip: four glanceable readings in one row */
.today-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: stretch; gap: 1px; margin: 0 0 18px; background: var(--border-soft); border: 1px solid var(--border-soft); }
.strip-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.strip-label { color: var(--muted); font-size: .78rem; }
.strip-value { font: 650 1.35rem/1.15 var(--sans); letter-spacing: -.01em; color: var(--text); }
.strip-value small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.strip-item > small { color: var(--muted); font-size: .76rem; }
.strip-empty { margin: 0; padding: 14px 16px; background: var(--surface); grid-column: 1 / -1; color: var(--muted); }
.strip-risk.risk-low .strip-value { color: var(--live); }
.strip-risk.risk-elevated .strip-value { color: var(--warn); }
.strip-risk.risk-high .strip-value { color: var(--danger); }
.pips { display: flex; gap: 6px; }
.pip { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3a4a5c; background: transparent; }
.pip-on { background: var(--warn); border-color: var(--warn); }
.pip-unknown { border-style: dashed; }
.strip-meter { position: relative; height: 8px; margin: 6px 0 2px; border-radius: 4px; background: linear-gradient(90deg, #233140 0 26.7%, #2a3b2f 26.7% 46.7%, #3a3322 46.7% 100%); }
.strip-meter-mark { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.strip-meter-tick { position: absolute; top: 10px; width: 1px; height: 5px; background: var(--muted); }
.strip-gamma.gamma-pos .strip-value { color: var(--live); }
.strip-gamma.gamma-neg .strip-value { color: var(--warn); }
.strip-more { margin: 0; background: var(--surface); padding: 14px 16px; align-self: stretch; }
.strip-more > summary { font-size: .85rem; }
.strip-more[open] { grid-column: 1 / -1; }
.strip-more-body { margin-top: 10px; display: grid; gap: 12px; max-width: 900px; }
@media (max-width: 900px) { .today-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip-more { grid-column: 1 / -1; } }

/* Opportunities: bars instead of paragraphs */
.opp-table td { vertical-align: middle; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font: .72rem var(--sans); white-space: nowrap; }
.side-chip { display: inline-block; min-width: 34px; padding: 2px 6px; border-radius: 4px; font: 650 .72rem var(--sans); text-align: center; }
.side-pcs { color: #f0b37f; background: rgba(212, 116, 28, .16); }
.side-ccs { color: #c2bcf5; background: rgba(144, 133, 233, .16); }
.meter-cell { min-width: 120px; }
.bar-meter { position: relative; height: 8px; border-radius: 4px; background: #1d2835; overflow: hidden; }
.bar-meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.bar-meter > i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(231, 237, 245, .28); }
.cushion-low > span { background: var(--danger); }
.cushion-mid > span { background: var(--warn); }
.cushion-high > span { background: var(--live); }
.score-meter > span { background: var(--accent); }
.opp-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; white-space: normal; }
.opp-details h3 { margin: 0 0 6px; font-size: .85rem; }
.home-basis > summary { font-size: .8rem; }
.chart-quality { margin: 4px 0 0; }
.chart-quality > summary { font-size: .74rem; color: var(--muted); }

/* Gamma by strike */
.gamma-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: -2px 0 8px; font-size: .74rem; color: var(--muted); }
.gamma-legend .key::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.key-put::before { background: #d4741c; }
.key-call::before { background: #9085e9; }
.key-spot::before { height: 2px !important; vertical-align: 3px !important; background: #64caed; }
.key-flip::before { height: 0 !important; vertical-align: 3px !important; border-top: 2px dashed #b1bac5; }
.gamma-profile svg { display: block; width: 100%; height: auto; }
@media (min-width: 1100px) {
  .cockpit-charts:not(.cockpit-has-positions) .cockpit-market { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
  .cockpit-charts:not(.cockpit-has-positions) .cockpit-market > [data-spx-card] { grid-column: 1; }
  .cockpit-charts:not(.cockpit-has-positions) .cockpit-market > .gamma-card { grid-column: 2; }
  .cockpit-charts:not(.cockpit-has-positions) .cockpit-market > .home-opportunities { grid-column: 1 / -1; }
}
.opp-table th:nth-child(3), .opp-table th:nth-child(4), .opp-table td.meter-cell { text-align: left; }
.position-cushion { grid-column: 1 / -1; }
.position-cushion .bar-meter { max-width: 360px; margin-top: 4px; }
.strip-events.event-today .strip-value { color: var(--warn); }

/* Event links in the Today strip and the 7-day list */
.event-link { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.event-link:hover { text-decoration-style: solid; }
.strip-more-heading { font-size: .8rem; margin: .75rem 0 .25rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.event-week { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.event-week li { padding: .15rem 0; }
.event-week li.event-major a { font-weight: 600; }
.event-week .event-when { display: inline-block; min-width: 8.5rem; font-variant-numeric: tabular-nums; opacity: .8; }
.event-week small { opacity: .7; }

.pending-warning { margin: 0 0 .75rem; padding: .6rem .8rem; border-left: 3px solid #d4741c; background: color-mix(in srgb, #d4741c 10%, transparent); font-size: .9rem; }

/* Clean Today page: stochastic under the SPX path, minimal chrome */
.stoch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 2px; padding-left: 68px; font-size: .78rem; color: var(--muted); }
.stoch-title { cursor: help; }
.stoch-title small { margin-left: 4px; opacity: .7; }
.stoch-values { display: flex; gap: 14px; font-family: var(--mono); color: var(--text); }
.stoch-key::before { content: ""; display: inline-block; width: 14px; margin-right: 6px; vertical-align: middle; border-top: 2px solid #3987e5; }
.stoch-key-d::before { border-top: 2px dashed #d65fa0; }
.stoch-chart { min-height: 0; }
.cockpit-chart.stoch-chart svg { display: block; width: 100%; height: 104px; }
.stoch-chart.is-empty { padding: 14px 0 14px 68px; color: var(--muted); font-size: .78rem; }
.cockpit-chart-head .chart-range-readout { display: none; }
.chart-inspected-time:empty { display: none; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; background: #5b6878; }
.live-dot.live-live { background: var(--live); box-shadow: 0 0 0 3px rgba(79,200,162,.15); }
.live-dot.live-stale { background: var(--warn); }
.live-dot.live-unknown { background: var(--danger); }
.nav-session-notifications { margin-left: auto; }

/* Strip sections: click a label to expand that section (one at a time) */
.today-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.strip-toggle { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.strip-toggle:hover, .strip-toggle[aria-expanded="true"] { color: var(--text); }
.strip-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.strip-chevron { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.strip-toggle[aria-expanded="true"] .strip-chevron { transform: translateY(1px) rotate(-135deg); }
.strip-item:has(.strip-toggle[aria-expanded="true"]) { box-shadow: inset 0 -2px 0 var(--accent); }
.strip-detail { grid-column: 1 / -1; padding: 16px 18px 18px; background: var(--surface-2); display: grid; gap: 12px; }
.strip-detail[hidden] { display: none; }
.strip-detail .context-note { margin: 0; max-width: 860px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.strip-detail .table-scroll { max-width: 620px; }
.move-bands { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.move-bands > div { display: grid; gap: 2px; min-width: 120px; }
.move-bands span { color: var(--muted); font-size: .74rem; }
.move-bands b { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; }
.move-bands small { color: var(--muted); font-family: var(--mono); font-size: .76rem; }
@media (max-width: 900px) { .today-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#homeOverview { margin-top: 6px; }

/* Session date in the status bar doubles as the date picker */
.nav-date { position: relative; }
.nav-date summary { display: inline-flex; align-items: center; gap: 0; cursor: pointer; list-style: none; color: var(--text); white-space: nowrap; }
.nav-date summary::-webkit-details-marker { display: none; }
.nav-date-caret { width: 5px; height: 5px; margin-left: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.nav-date summary:hover b { color: var(--accent); }
.nav-date-form { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); box-shadow: 0 10px 28px rgba(0,0,0,.45); white-space: nowrap; }
.nav-date-form label { color: var(--muted); font-size: .75rem; }
.nav-date-form input { color-scheme: dark; }
.today-strip .strip-toggle, .today-strip .strip-toggle:hover, .today-strip .strip-toggle:active { background: none; border: 0; font-weight: 400; }
.strip-detail .flag-list li b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; border: 1.5px solid #5b6878; vertical-align: 0; }
.strip-detail .flag-list li.flag-on b::before { background: #f2cb88; border-color: #f2cb88; }
.strip-detail .flag-list li small { margin-left: 18px; }

