:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #fcfcfb;
  --line: #e4e2dc;
  --grid: #ecebe6;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7973;
  --accent: #2a78d6;
  --up: #2a78d6;
  --down: #e34948;
  --mapmid: #a98cc2; /* toss-up on the map: purple, never the grey that means "no race" */
  --band: #cde2fb;
  --s-polymarket: #2a78d6;
  --s-polymarket_us: #eb6834;
  --s-kalshi: #1baf7a;
  --s-predictit: #eda100;
  --warn: #9a6400;
  --bad: #d03b3b;
  --good: #0a7d0a;
  --pos: #16806f; /* analysis parts: up / down in the charted outcome's probability — not party colours */
  --neg: #a8661b;
}

/* Evidence archive: a bounded, readable relation view with source and knowledge times. */
.memory-controls label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.memory-controls input { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; max-width: 100%; }
.memory-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.memory-list { display: grid; gap: 8px; }
.memory-item { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; overflow-wrap: anywhere; }
.memory-item:hover, .memory-item[aria-pressed="true"] { border-color: var(--accent); background: var(--band); }
.memory-item .meta { display: block; margin-top: 6px; }
.memory-detail { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.memory-detail:empty { display: none; }
.memory-detail h4 { margin: 0 0 10px; font-size: 15px; }
.memory-detail h4:not(:first-child) { margin-top: 20px; }
.memory-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.memory-disputed { display: block; color: var(--warn); font-size: 12px; margin-top: 5px; }
.memory-source { display: inline-block; margin: 4px 0 10px; }
.memory-edges { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.memory-edge { border-left: 2px solid var(--line); padding-left: 12px; display: grid; gap: 5px; }
.memory-relation { color: var(--text-2); padding-left: 8px; font-size: 12px; }
.memory-facts { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; }
@media (max-width: 680px) { .memory-grid { grid-template-columns: 1fr; } .memory-list { max-height: 300px; overflow-y: auto; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface: #1a1a19; --line: #2e2e2b; --grid: #262624; --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e86;
    --accent: #3987e5; --up: #3987e5; --down: #e66767; --mapmid: #7d6596; --band: #1c3a63;
    --s-polymarket: #3987e5; --s-polymarket_us: #d95926; --s-kalshi: #199e70; --s-predictit: #c98500;
    --warn: #fab219; --bad: #e66767; --good: #3cc23c; --pos: #3cb7a5; --neg: #e0a047;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface: #1a1a19; --line: #2e2e2b; --grid: #262624; --text: #f0efec; --text-2: #c3c2b7; --muted: #8f8e86;
  --accent: #3987e5; --up: #3987e5; --down: #e66767; --mapmid: #7d6596; --band: #1c3a63;
  --s-polymarket: #3987e5; --s-polymarket_us: #d95926; --s-kalshi: #199e70; --s-predictit: #c98500;
  --warn: #fab219; --bad: #e66767; --good: #3cc23c; --pos: #3cb7a5; --neg: #e0a047;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* Explicit display rules must still respect the hidden attribute. */
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); }
.top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 16px max(16px, 3vw); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.brand h1 { margin: 0; font-size: 18px; letter-spacing: 0.02em; }
.sub { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.health { font: inherit; font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.health:hover, .health[aria-expanded="true"] { border-color: var(--line); background: var(--bg); }
.hwrap { position: relative; }
/* Which sources lag and for how long (from /api/health). */
.healthpop { position: absolute; right: 0; top: calc(100% + 6px); width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px 12px 10px; z-index: 20; font-size: 12.5px; text-align: left; }
.healthpop .hp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.healthpop ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: min(50vh, 420px); overflow-y: auto; }
.healthpop li { padding: 6px 0; border-top: 1px solid var(--line); }
.healthpop .hp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--text); }
.healthpop .st { flex: none; font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.healthpop .st.failing { color: var(--bad); border-color: var(--bad); }
.healthpop .st.stale { color: var(--warn); border-color: var(--warn); }
.healthpop .hp-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.healthpop .hp-err { color: var(--bad); margin-top: 6px; }
.healthpop .hp-foot { color: var(--muted); font-size: 11.5px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.health.ok::before { background: var(--good); }
.health.degraded::before { background: var(--warn); }
.btn { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.btn:hover { border-color: var(--text-2); }
.btn.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: progress; }
.keypanel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px max(16px, 3vw); background: var(--surface); border-bottom: 1px solid var(--line); }
.keypanel input { font: inherit; flex: 1 1 260px; min-width: 0; max-width: 520px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.keypanel .note { flex-basis: 100%; margin: 0; }

.layout { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px max(16px, 3vw); align-items: start; }
.layout .detail { scroll-margin-top: 80px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px max(16px, 3vw) 0; }
.toolbar .row { margin: 0; }
.ask { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; }
.ask input { font: inherit; flex: 1 1 auto; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }

/* Fixed side column: a content-sized column would resize the map on every panel change and fire spurious pointer-leave events under a still cursor. */
.mapview { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
/* Map card: the map and, beside it, a key that names every fill (scale, grey = no race, hatching = no price). */
.map { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px 8px 8px;
  display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 8px 16px; align-items: center; }
.mapsvg { min-width: 0; }
.map svg { width: 100%; height: auto; display: block; }
.map .hatch-bg { fill: var(--grid); }
.map .hatch-ln { stroke: var(--muted); stroke-width: 1.6; opacity: .55; }
.map .st { stroke: var(--surface); stroke-width: 1; cursor: pointer; transition: opacity .12s; }
.map .st:hover, .map .st.hover, .map .st:focus { stroke: var(--text); stroke-width: 1.5; outline: none; }
.map .selection-outline { fill: none; stroke: #000; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .st.none { cursor: default; }
.map .lbl { font-size: 11px; fill: var(--text); pointer-events: none; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 2px; }
.map .lbl.none { fill: var(--muted); font-weight: 400; }
.mapkey { font-size: 12px; color: var(--text-2); min-width: 0; }
.mapkey .kt { font-weight: 600; color: var(--text); font-size: 13px; line-height: 1.35; margin-bottom: 8px; }
.mapkey .scale i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--down), var(--mapmid), var(--up)); }
.mapkey .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.mapkey .kn { font-size: 11px; color: var(--muted); margin: 2px 0 12px; }
.mapkey ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mapkey li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; line-height: 1.3; }
.mapkey li b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mapkey .sw { width: 18px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px var(--line); }
.mapkey .sw.priced { background: linear-gradient(90deg, var(--down), var(--mapmid), var(--up)); box-shadow: none; }
.mapkey .sw.none { background: var(--grid); }
.mapkey .sw.noprice { background: repeating-linear-gradient(45deg, var(--grid) 0 3px, color-mix(in srgb, var(--muted) 55%, var(--grid)) 3px 4.5px); }
.mapkey .kh { margin: 14px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.map .tip { z-index: 3; width: max-content; max-width: min(340px, calc(100vw - 32px)); overflow-wrap: anywhere; }
.map .tip .r b { margin-left: auto; }
.map .tip .r > i, .map .tip .r > b { flex: none; }
.maptip-question { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.maptip-question .maptip-outcome { color: var(--text-2); }

/* Left column: the map (height-capped so the chart fits under it) and the market chart of the focused question. */
.leftcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.leftcol .map svg.usmap { max-height: calc(100vh - 470px); min-height: 260px; }
.chartpanel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 8px; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.chart-head h3 { margin: 0; font-size: 14px; }
.chart-head h3 .label { font-weight: 400; }
.chart-ctl { display: flex; gap: 10px; flex-wrap: wrap; }
.chart-ctl .seg { display: inline-flex; gap: 4px; }
.btn.sm { padding: 2px 8px; font-size: 12px; }
.chart-empty { min-height: 180px; display: flex; align-items: center; justify-content: center; }
/* Why there is no chart (no race / no price / no quotes in range): a statement, not a loading box. */
.chart-empty.status { flex-direction: column; gap: 6px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; padding: 16px; margin: 6px 0 4px; }
.chart-empty .msg { font-size: 15px; font-weight: 600; color: var(--text); }
.chart-empty .sub { color: var(--text-2); font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chart-empty .acts { justify-content: center; }
.mchart .series { stroke-width: 1.4; opacity: .85; }
.mchart .series.ref { stroke-width: 2.2; opacity: 1; }
.mchart .envelope { opacity: .13; stroke: none; }
.mchart .series.stale { stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .5; }
.mchart .endlab { font-size: 11px; }
.mchart .mband { fill: var(--up); opacity: .06; }
.mchart .mband.down { fill: var(--down); }
.mchart .cursor line { stroke: var(--warn); stroke-width: 2; }
.mchart .cursor circle { fill: var(--warn); }
.mchart .cursor rect.span { fill: var(--warn); opacity: .16; }
.mchart .rail { stroke: var(--line); stroke-width: 1; }
.mchart .railnote { fill: var(--muted); font-size: 11px; paint-order: stroke; stroke: var(--surface); stroke-width: 8px; stroke-linejoin: round; }
.mchart .evgrp { cursor: pointer; outline: none; }
.mchart .evhit { fill: transparent; }
.mchart .evm { stroke-width: 1.5; }
.mchart .evm.news { fill: var(--text-2); stroke: var(--text-2); }
.mchart .evm.poll { fill: var(--warn); stroke: var(--warn); }
.mchart .evm.sched { fill: var(--surface); stroke: var(--text); }
.mchart .evm.filing { fill: var(--good); stroke: var(--good); }
.mchart .evm.x { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; }
.mchart .evm.x.unv { stroke: var(--muted); }
.mchart .evm.approx { fill: var(--surface); }
.mchart .evspan { fill: var(--muted); opacity: .45; }
.mchart circle.evcount { fill: var(--text-2); }
.mchart text.evcount { fill: var(--surface); font-size: 9.5px; font-weight: 700; }
.mchart .evgrp:hover .evm, .mchart .evgrp:focus .evm, .mchart .evgrp.sel .evm, .mchart .evgrp:hover circle.evcount, .mchart .evgrp:focus circle.evcount, .mchart .evgrp.sel circle.evcount { stroke: var(--warn); stroke-width: 2.5; }
.mchart .evguide line { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.mchart .evguide line.sel { stroke: var(--warn); stroke-dasharray: none; stroke-width: 1.5; }
.mchart .evguide rect.span { fill: var(--text-2); opacity: .08; }
.mchart .evguide rect.span.sel { fill: var(--warn); opacity: .14; }
.chart-foot .evkey { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.chart-foot .evkey i.k { width: 8px; height: 8px; display: inline-block; margin-left: 6px; }
.chart-foot .evkey i.k.news { background: var(--text-2); border-radius: 50%; }
.chart-foot .evkey i.k.poll { background: var(--warn); }
.chart-foot .evkey i.k.sched { border: 1.5px solid var(--text); transform: rotate(45deg); width: 7px; height: 7px; }
.chart-foot .evkey i.k.x { position: relative; width: 9px; height: 9px; }
.chart-foot .evkey i.k.x::before, .chart-foot .evkey i.k.x::after { content: ""; position: absolute; left: 4px; top: -1px; width: 2px; height: 11px; background: var(--text); transform: rotate(45deg); border-radius: 1px; }
.chart-foot .evkey i.k.x::after { transform: rotate(-45deg); }
.chart-foot .evkey i.k.filing { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--good); }
.chart-box .tip { max-width: 300px; white-space: normal; z-index: 2; }
.chart-box .tip .mrow { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.chart-box .tip .mrow:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.chart-box .tip .cmp { display: block; margin: 3px 0; font-weight: 600; }
.chart-box .tip .evrow { margin: 2px 0; }
.chart-box .tip .evrow .t { color: var(--muted); }
.tip .hint2, .chart-foot .hint2 { color: var(--muted); font-size: 11px; }
.chart-foot { justify-content: space-between; }
.feed .events li.hit { background: color-mix(in srgb, var(--warn) 14%, transparent); border-radius: 6px; }

.rtabs, .jumpbar { display: none; }
.rightcol { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 80px; height: calc(100vh - 92px); min-width: 0; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; flex: 0 0 auto; max-height: 42vh; overflow-y: auto; }
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; flex: 1 1 0; min-height: 240px; overflow-y: auto; padding: 0 14px 12px; }
/* An answer or a pinned state takes most of the column; the feed keeps a usable strip below it. */
.rightcol.focus .side { flex: 0 0 auto; max-height: 65%; }
.rightcol.focus .feed { flex: 1 1 0; min-height: 180px; }
.feed-head { position: sticky; top: 0; background: var(--surface); padding: 12px 0 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.feed-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 0 0 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.feed-head .fttl { white-space: nowrap; }
.feed-head .asof { font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--muted); text-align: right; }
.chips-row { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }
.chip-btn { font: inherit; font-size: 12px; border: 1px solid var(--line); background: transparent; color: var(--text-2); border-radius: 999px; padding: 2px 9px; cursor: pointer; }
.chip-btn:hover { border-color: var(--text-2); }
.chip-btn.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip-btn.scope { border-color: var(--accent); background: var(--band); color: var(--text); }
.feed .events li.new { animation: fresh 2.4s ease-out; }
@keyframes fresh { from { background: var(--band); } to { background: transparent; } }
.side h2 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.side h2 .code { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.08em; }
.side .hint { color: var(--muted); font-size: 12px; margin: 2px 0 10px; }
.side .q { padding: 6px 10px; margin-bottom: 5px; }
.side .q .chips { margin-top: 1px; gap: 0 10px; }
.side .q .chip { font-size: 11.5px; }
.side .q .chip b { font-size: 12px; font-weight: 600; }
#side .q.shown { border-color: var(--text-2); }
.badge.onchart { display: none; font-size: 10.5px; padding: 0 6px; margin-left: 6px; font-weight: 500; vertical-align: 1px; }
#side .q.shown .badge.onchart { display: inline-block; }
.chip.muted { color: var(--muted); }
.side .section { margin-top: 14px; }
.side .x { float: right; }
.events li .qs { color: var(--text-2); font-size: 11.5px; margin-top: 1px; }
.events li .races { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; align-items: center; }
.events li .races .chip-btn { font-size: 11.5px; padding: 1px 8px; }
.events li .races .more { font-size: 11.5px; color: var(--muted); }
.lv { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--text-2); }
.lv .oc-D { color: var(--up); }
.lv b { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.q { width: 100%; text-align: left; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; color: inherit; font: inherit; }
.q:hover, .q.sel { border-color: var(--accent); }
.q-title { font-weight: 600; min-width: 0; }
/* Card head: the question on the left, its headline number on the right. */
.q-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.q-val { flex: none; display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.q-val small { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.q-val small.oc-D { color: var(--up); }
.q-val small.oc-R { color: var(--down); }
.q-val b { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.chip.stale { opacity: .55; }
.q-title .age { font-size: 11px; font-weight: 400; margin-left: 6px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; }
.chip { display: inline-flex; align-items: baseline; gap: 4px; font-size: 12px; color: var(--text-2); }
.chip b { color: var(--text); font-variant-numeric: tabular-nums; font-size: 13px; }
.chip .key { width: 10px; height: 2px; border-radius: 1px; align-self: center; }
.age { color: var(--muted); }
.gap { font-size: 11px; color: var(--warn); margin-left: auto; }
.empty, .err { color: var(--text-2); padding: 12px; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; }
.err { color: var(--bad); }

.detail { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.detail h2 { margin: 0 0 4px; font-size: 18px; }
.back { display: none; margin-bottom: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.label { color: var(--text-2); font-size: 12px; margin-right: 4px; }
.section { margin-top: 18px; }
.section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 0 0 8px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-2); font-weight: 500; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { color: var(--text-2); font-size: 12px; }
.status-resolved, .status-closed, .status-void { color: var(--muted); }

.chart-box { position: relative; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart text { fill: var(--text-2); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .hair { stroke: var(--text-2); stroke-width: 1; }
.chart:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); min-width: 120px; }
.tip .t { color: var(--text-2); margin-bottom: 2px; }
.tip .r.muted { color: var(--muted); }
.tip div.r { display: flex; align-items: center; gap: 6px; }
.tip b { font-variant-numeric: tabular-nums; }
.tip i { width: 10px; height: 2px; display: inline-block; }

.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.events .meta { color: var(--muted); font-size: 12px; }
.events li > a { color: var(--text); text-decoration: none; font-weight: 500; }
.events li > .ttl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.events li > span.ttl { font-weight: 500; }
.events .meta time { cursor: help; }
/* X posts: full text, author linked to the profile, time linked to the post, X logo (X Developer Agreement). */
.events li.xpost .xhead { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-size: 13px; }
.events .xlogo { width: 14px; height: 14px; fill: var(--text); flex: none; margin-left: auto; }
.events .xavatar img { width: 24px; height: 24px; border-radius: 50%; display: block; background: var(--grid); }
.events .xcat { font-size: 11px; color: var(--muted); }
.events .xtext a { color: var(--accent); text-decoration: none; }
.events .xtext a:hover, .events .xview:hover { text-decoration: underline; }
.events .xview { color: inherit; text-decoration: none; }
.events .xname { color: var(--text); font-weight: 600; text-decoration: none; }
.events .xuser { color: var(--muted); font-size: 12px; text-decoration: none; }
.events .xtime { color: inherit; text-decoration: none; }
.events .xname:hover, .events .xuser:hover, .events .xtime:hover { text-decoration: underline; }
.events .badge.unverified { margin-left: 2px; border-color: var(--warn); color: var(--warn); font-size: 10.5px; padding: 0 7px; }
.events .xtext { margin: 3px 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.events .xspread { color: var(--muted); font-size: 11.5px; }
.events li > a:hover { color: var(--accent); text-decoration: underline; }
.imp-up { color: var(--up); }
.imp-down { color: var(--down); }

.pred { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; }
.big { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); margin-left: 8px; vertical-align: middle; }
.badge.abstain { border-color: var(--warn); color: var(--warn); }
.expl ul { margin: 4px 0 0; padding-left: 18px; }
.expl li { margin: 3px 0; }
.refs { font-size: 12px; }
.gen { color: var(--muted); font-size: 11px; margin-top: 8px; }
.pred .warnline { color: var(--warn); font-size: 12.5px; margin-top: 4px; }

.foot { padding: 16px max(16px, 3vw) calc(24px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 12px; }
.foot p { margin: 4px 0; }

/* Medium widths: the key moves under the map as one compact row. */
@media (max-width: 1100px) {
  .map { grid-template-columns: 1fr; }
  .mapkey { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 0 4px 2px; }
  .mapkey .kt { margin: 0; flex-basis: 100%; }
  .mapkey .scale { flex: 0 1 220px; }
  .mapkey .kn { margin: 0; }
  .mapkey ul { display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .mapkey .kh { flex-basis: 100%; margin: 0; }
}
/* Short screens (laptops at 1280×720, 1440×900 minus browser chrome): the map at its natural size and the page
   scrolls; the right column stays sticky at full height and shows the market panel or the feed as tabs. */
@media (min-width: 821px) and (max-height: 820px) {
  .top { position: static; }
  /* As tall as the left column (contain: size keeps the feed's length out of the row height), at most one screen:
     sticky when the map and chart are taller than the screen, ending level with the chart otherwise. */
  .rightcol { top: 12px; align-self: stretch; contain: size; height: auto; min-height: 480px; max-height: calc(100vh - 24px); }
  .leftcol .map svg.usmap { max-height: none; }
  .rtabs { display: flex; flex: none; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
  .rtabs button { flex: 1 1 0; font: inherit; font-size: 13px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); padding: 5px 0; cursor: pointer; }
  .rtabs button:hover { color: var(--text); }
  .rtabs button.on { background: var(--text); color: var(--surface); }
  .rtabs button.dot::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: 2px; }
  .rightcol[data-tab="feed"] .side, .rightcol:not([data-tab="feed"]) .feed { display: none; }
  .rightcol .side, .rightcol.focus .side, .rightcol .feed, .rightcol.focus .feed { flex: 1 1 0; max-height: none; min-height: 0; }
}
@media (max-width: 820px) {
  /* Phone: the header scrolls away; a sticky bar jumps between map, chart, market panel and feed. */
  .top { position: static; }
  .top-actions { position: relative; flex-wrap: wrap; }
  .hwrap { position: static; }
  .healthpop { left: 0; right: auto; }
  .jumpbar { display: flex; gap: 4px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); padding: 6px 0; margin: -6px 0 0; }
  .jumpbar button { flex: 1 1 0; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); padding: 5px 0; cursor: pointer; }
  .jumpbar button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
  #map, #chart, #side, #feed { scroll-margin-top: calc(56px + env(safe-area-inset-top, 0px)); }
  .layout { grid-template-columns: 1fr; }
  .mapview { grid-template-columns: 1fr; }
  .rightcol { position: static; height: auto; }
  .leftcol .map svg.usmap { max-height: none; min-height: 0; }
  .map { padding: 8px; }
  .mapkey .kh { display: none; }
  .side, .rightcol.focus .side { max-height: none; }
  /* The column is not height-bound on a phone: the feed sizes to its content, capped. */
  .feed, .rightcol.focus .feed { flex: none; min-height: 0; max-height: 60vh; }
  .detail { position: fixed; inset: 0; z-index: 10; border-radius: 0; overflow-y: auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .back { display: inline-block; }
}

/* Analysis under the chart: ledger waterfall ("why this price") and outlook ("what could move it next"). */
.ana { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.ana-sec + .ana-sec { margin-top: 14px; }
.ana h4 { margin: 0 0 2px; font-size: 14px; }
.ana h5 { margin: 10px 0 4px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.ana-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.ana-sub .badge { margin-left: 0; }
.wf { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.wf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, 32%) 5.2em; align-items: center; gap: 8px; padding: 3px 0; }
.wf-row.lvl { color: var(--text-2); }
.wf-label { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wf-label > a, .wf-label > span { overflow-wrap: anywhere; }
.wf-label small, .ana-quiet small { color: var(--muted); font-size: 11.5px; }
.wf-label ul { margin: 3px 0 0; padding-left: 14px; font-size: 12px; color: var(--text-2); }
.wf-label li { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.wf-label li .v { margin-left: auto; font-variant-numeric: tabular-nums; }
.wf-track { position: relative; height: 12px; background: var(--grid); border-radius: 3px; }
.wf-track i { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; }
.wf-track i.pos { background: var(--pos); }
.wf-track i.neg { background: var(--neg); }
.wf-row.un .wf-track i { opacity: .55; }
.wf-track b { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: var(--text); }
.wf-v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wf-v.pos { color: var(--pos); }
.wf-v.neg { color: var(--neg); }
.ana-quiet { margin-top: 6px; font-size: 12.5px; }
.ana-quiet ul { margin: 4px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.ana-quiet li { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.ana-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.reasoning { display: grid; gap: 18px; min-width: 0; }
.reasoning-step { min-width: 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.reasoning-step:first-child { border-top: 0; padding-top: 0; }
.ana .reasoning-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.reasoning-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.reasoning-price > span { font-size: 12px; font-weight: 400; color: var(--text-2); }
.reasoning-explanation { font-size: 13px; line-height: 1.85; color: var(--text-2); max-width: 90ch; overflow-wrap: anywhere; margin: 10px 0 14px; }
.reasoning-explanation p { margin: 8px 0; }
.reasoning-drawer-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--accent); padding: 9px 12px; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.reasoning-drawer-trigger:hover { border-color: var(--accent); }
.reasoning-drawer-trigger > span { color: var(--muted); font-size: 11px; }
html:has(.reasoning-drawer[open]) { overflow: hidden; }
dialog.reasoning-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(620px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: -12px 0 48px #0002; box-sizing: border-box; }
.reasoning-drawer[open] { display: flex; flex-direction: column; }
.reasoning-drawer::backdrop { background: rgb(16 24 32 / 28%); }
.reasoning-drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px 14px; flex: none; }
.reasoning-drawer-head h2 { font-size: 17px; margin: 0; }
.reasoning-drawer-head button { flex: none; }
.reasoning-drawer-tabs { display: flex; gap: 8px; padding: 0 22px 14px; border-bottom: 1px solid var(--line); flex: none; }
.reasoning-drawer-tabs [aria-pressed="true"] { background: var(--text); color: var(--surface); }
.reasoning-drawer-body { padding: 16px 22px 28px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; overflow-wrap: anywhere; }
.reasoning-drawer-body h5 { font-size: 13px; margin: 16px 0 6px; }
.reasoning-drawer-body .reasoning-record-title { font-size: 14px; }
.reasoning-drawer-body .memory-panel { padding: 0; border: 0; }
@media (max-width: 640px) {
  .reasoning-drawer-head { padding: 16px 16px 12px; }
  .reasoning-drawer-tabs { padding: 0 16px 12px; }
  .reasoning-drawer-body { padding: 14px 16px 24px; }
}
.reasoning-note { font-size: 12px; line-height: 1.65; color: var(--text-2); margin: 4px 0; overflow-wrap: anywhere; }
.reasoning-warning { font-size: 12px; line-height: 1.6; color: var(--warn); margin: 8px 0; }
.reasoning-evidence, .reasoning-scheduled { display: grid; gap: 8px; margin-top: 10px; }
.reasoning-record { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
.reasoning-record-title { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.reasoning-record-title > a { min-width: 0; color: var(--text); text-decoration: none; }
.reasoning-record-title > a:hover { color: var(--accent); text-decoration: underline; }
.reasoning-ref { color: var(--accent); flex: none; font-variant-numeric: tabular-nums; }
.reasoning-fact { font-size: 13px; font-weight: 550; margin: 6px 0 2px; overflow-wrap: anywhere; }
.reasoning-excerpt { font-size: 12px; line-height: 1.6; margin: 6px 0; overflow-wrap: anywhere; }
.reasoning-record .linkbtn { font-size: 12px; text-align: left; margin-top: 4px; }
.reasoning-details { margin-top: 12px; }
.reasoning-details > summary { cursor: pointer; font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.reasoning-memory { min-width: 0; scroll-margin-top: 90px; }
.reasoning-memory:empty { display: none; }
.reasoning-memory .memory-grid { grid-template-columns: 1fr; }
.reasoning-memory .memory-list { max-height: 180px; overflow-y: auto; }
/* Trade link (only shown after the viewer passes Polymarket's geoblock check) */
.trade-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
a.btn.trade-btn { text-decoration: none; display: inline-block; }
.trade-note { font-size: 11px; color: var(--muted); }
.trade-attest { flex-basis: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px 10px; font-size: 12px; color: var(--text-2); }
.trade-attest p { margin: 0 0 8px; line-height: 1.5; }
.trade-attest .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.trade-attest a.btn { text-decoration: none; }
@media (max-width: 640px) {
  .wf-row { grid-template-columns: minmax(0, 1fr) 5.2em; }
  .wf-row .wf-track { grid-column: 1 / -1; grid-row: 2; }
}

/* Trade ticket (public/trade.js): a modal dialog of its own */
dialog.tk { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.22); }
dialog.tk::backdrop { background: rgba(0,0,0,.4); }
.tk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.tk-head h2 { margin: 0; font-size: 15px; }
.tk-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.tk-body p { margin: 0; line-height: 1.5; }
.tk-foot { margin: 0; padding: 8px 16px 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.tk-small { font-size: 12px; color: var(--text-2); }
.tk-strong { font-weight: 600; }
.tk-warn { font-size: 12.5px; color: var(--warn); }
.tk-ok { color: var(--good); }
.tk-err { border: 1px solid var(--bad); border-radius: 8px; padding: 8px 10px; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.tk-err > p:first-child { color: var(--bad); }
.tk-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-check { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.tk-wallets { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-wallets .btn { display: inline-flex; align-items: center; gap: 8px; }
.tk-working { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.tk-spin { flex: none; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: tk-spin 0.9s linear infinite; }
@keyframes tk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tk-spin { animation: none; } }
.tk-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.tk-field input, .tk-field select { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 100%; }
.tk-field small { font-size: 11px; color: var(--muted); }
.tk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tk-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-seg .btn { flex: 1 1 0; min-width: 6em; }
.tk-funds { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.tk-funds .tk-acts { margin-left: auto; }
.tk-cost { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tk-cost th { text-align: left; font-weight: normal; color: var(--text-2); padding: 3px 0; }
.tk-cost td { text-align: right; padding: 3px 0; white-space: nowrap; }
.tk-cost .tk-total th, .tk-cost .tk-total td { font-weight: 600; color: var(--text); border-top: 1px solid var(--line); padding-top: 6px; }
.tk-v { margin: 0; padding-left: 18px; font-size: 12px; color: var(--warn); }
.tk-orders ul { list-style: none; margin: 6px 0 0; padding: 0; }
.tk-orders li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.tk-addr { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-2); }
.tk-addr code { font-size: 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; overflow-wrap: anywhere; user-select: all; }
.tk-addrs { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 480px) {
  .tk-grid { grid-template-columns: 1fr; }
  .tk-funds .tk-acts { margin-left: 0; }
}

/* Geography stays on the map; every target chooses an object and question type together. */
.toolbar { align-items: start; gap: 12px 24px; padding-bottom: 0; }
.research-selector { flex: 1 1 690px; min-width: 0; }
.research-target-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 5px; }
.research-target-heading h2 { margin: 0; font-size: 13px; font-weight: 600; }
.target-area { color: var(--text-2); font-size: 12px; }
.research-target-heading > .btn { margin-left: auto; }
.target-hint { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.target-row { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; min-width: 0; }
.target-office { flex: 0 0 4em; color: var(--text-2); font-size: 12px; font-weight: 600; }
.target-options { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.target-options .btn { min-height: 29px; }
.target-unavailable { margin: 0; padding: 5px 0; color: var(--muted); font-size: 12px; }
.national-target { border-top: 1px solid var(--line); padding-top: 7px; margin-top: 9px; }
.filter-feedback { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
#research-scope-note { padding: 8px 10px; margin-bottom: 10px; background: var(--bg); border-radius: 6px; }
.toolbar .ask { flex: 1 1 300px; max-width: 520px; margin-top: 0; }
.ask input { width: 100%; }
.ask .btn { flex: none; }
.map-scope { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px 6px 0; }
.map-scope .label, .map-scope-hint { color: var(--muted); font-size: 12px; }
.map-scope-hint { margin-left: auto; }
.map-scope .code { margin-left: 6px; font-weight: 400; color: var(--muted); }
.map .st.none { cursor: pointer; }
.research-context { overflow-wrap: anywhere; }
.research-more { width: 100%; margin-top: 8px; }
.research-answer { border-bottom: 1px solid var(--line); margin-bottom: 12px; padding-bottom: 12px; }
.chart-outcome { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; }
.chart-outcome select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; max-width: min(260px, 50vw); }
@media (max-width: 820px) {
  .toolbar .ask { max-width: none; flex-basis: 100%; }
  .research-selector { flex-basis: 100%; }
  .target-row { gap: 8px; }
  .map-scope-hint { margin-left: 0; flex-basis: 100%; }
}

/* Unavailable facets are choices without markets, never a loading state. */
.target-options .btn:disabled { cursor: not-allowed; opacity: .45; background: var(--surface); color: var(--muted); }
.congress-panel { grid-column: 1 / -1; min-width: 0; padding: 8px; }
.congress-panel h2 { font-size: 18px; margin: 0 0 6px; }
.congress-panel > .hint { margin: 0 0 14px; }
.congress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.congress-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.congress-choice:hover, .congress-choice:focus-visible { border-color: var(--text-2); }
.congress-choice.on { border-color: var(--up); background: color-mix(in srgb, var(--up) 8%, var(--surface)); box-shadow: inset 0 0 0 1px var(--up); }
.congress-choice:disabled { opacity: .45; cursor: not-allowed; }
.combination-title { font-size: 13px; font-weight: 600; }
.combination-price { font-size: 27px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.combination-meta, .combination-venues, .combination-note { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.congress-other { margin-top: 10px; }
.congress-other .congress-choice { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px 15px; }
.congress-other .combination-price { font-size: 18px; }
.congress-explore { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.congress-explore h3 { margin: 0 0 4px; font-size: 13px; }
.congress-explore .hint, .congress-explore .row { margin: 0; }
@media (max-width: 480px) {
  .congress-panel { padding: 4px; }
  .congress-grid { gap: 8px; }
  .congress-choice { padding: 10px; }
  .combination-price { font-size: 24px; }
}

/* Model vs market (Owner 2026-10-16). Neutral greys only: the same styling whichever party an outcome names.
   Filled marker = model, hollow marker = market; shapes carry the meaning, not colour. */
.mvm { display: grid; gap: 14px; min-width: 0; }
.mvm[hidden] + .reasoning-step { border-top: 0; padding-top: 0; }
.mvm-block { min-width: 0; overflow-wrap: anywhere; }
.mvm-block + .mvm-block { border-top: 1px solid var(--line); padding-top: 12px; }
.mvm h5 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.mvm-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.35; }
.mvm-headline .mvm-market { font-weight: 500; color: var(--text-2); }
.mvm-headline .mvm-gap { font-size: 15px; font-weight: 600; }
.mvm-scale { position: relative; height: 18px; margin: 10px 7px 4px; }
.mvm-track { position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line); }
.mvm-mid { position: absolute; left: 50%; top: 3px; width: 1px; height: 12px; background: var(--line); }
.mvm-band { position: absolute; top: 5px; height: 8px; border-radius: 4px; background: var(--grid); border: 1px solid var(--line); }
.mvm-mark { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; }
.mvm-mark-model { background: var(--text); }
.mvm-mark-market { background: var(--surface); border: 2px solid var(--text-2); }
.mvm-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mvm-key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.mvm-key-model { background: var(--text); }
.mvm-key-market { background: var(--surface); border: 2px solid var(--text-2); }
.mvm-caption { font-size: 12px; color: var(--muted); margin: 6px 0 8px; }
.mvm-line { font-size: 13px; line-height: 1.6; margin: 4px 0; font-variant-numeric: tabular-nums; }
.mvm-meta { font-size: 12px; line-height: 1.6; color: var(--text-2); margin: 4px 0; }
.mvm-quiet { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 4px 0; }
.mvm-caveat { font-size: 12px; color: var(--warn); margin: 6px 0 0; }
.mvm-parts { display: grid; gap: 4px; margin: 10px 0 8px; }
.mvm-parts-head { font-size: 11.5px; color: var(--muted); }
.mvm-part { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(56px, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.mvm-part-label { min-width: 0; color: var(--text-2); }
.mvm-part-bar { position: relative; height: 8px; }
.mvm-part-bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line); }
.mvm-part-fill { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--text-2); }
.mvm-part-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mvm-part-sum { border-top: 1px solid var(--line); padding-top: 4px; font-weight: 600; }
.mvm-calls { margin: 4px 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.mvm-calls-quiet { font-size: 12px; color: var(--text-2); }
.mvm-within > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.mvm-table-wrap { overflow-x: auto; max-width: 100%; }
.mvm-table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mvm-table th, .mvm-table td { text-align: left; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.mvm-table thead th { font-weight: 500; color: var(--text-2); font-size: 11.5px; }
.mvm-table tbody th { font-weight: 550; white-space: normal; }
.mvm-delta { margin-left: 4px; font-size: 11px; color: var(--muted); }
.mvm-jump-list { display: grid; gap: 6px; margin-top: 4px; }
.mvm-jump-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(64px, 30%); align-items: center; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.mvm-meter { position: relative; height: 8px; border-radius: 4px; background: var(--grid); }
.mvm-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--text-2); }
.mvm-meter-peer { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); }
@media (max-width: 480px) {
  .mvm-headline { font-size: 18px; }
  .mvm-part { grid-template-columns: minmax(0, 1fr) 56px auto; }
  .mvm-jump-row { grid-template-columns: 1fr; gap: 4px; }
}
.mvm-single { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; line-height: 1.6; color: var(--text); background: var(--bg); }
/* Owner 2026-10-16 presentation blocks: neutral tokens only, wrap at 400 px, no direction colours. */
.mvm-regime { font-size: 14px; font-weight: 600; line-height: 1.55; margin: 0 0 6px; }
.mvm-calendar { margin: 6px 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 1.55; }
.mvm-calendar li { min-width: 0; overflow-wrap: anywhere; }
.mvm-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; line-height: 1.6; color: var(--text-2); background: var(--bg); white-space: nowrap; }
.mvm-ref { color: var(--text); font-weight: 550; }
.mvm-peer { font-size: 12px; line-height: 1.6; color: var(--text-2); margin: 6px 0 0; }
.mvm-quiet-inline { color: var(--muted); }
.mvm-adopt { min-width: 0; }
.mvm-more > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.mvm-more[open] > summary { margin-bottom: 8px; }
.mvm-summary { font-size: 13.5px; line-height: 1.7; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.mvm-event { min-width: 0; margin: 10px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mvm-event p { margin: 2px 0; }
.mvm-event-what { color: var(--text); }
.reasoning-narrative, .reasoning-outlook { min-width: 0; margin-top: 8px; }
.reasoning-narrative:empty, .reasoning-outlook:empty { display: none; }
.mvm-ask { gap: 10px; margin-top: 8px; }
.mvm-ask .mvm-headline { font-size: 17px; }
.mvm-ask .mvm-block + .mvm-block { padding-top: 10px; }
/* Ask text answer (WO-A answer) above the collapsed panel blocks; busy note under the snapshot line (WO-D1). */
.mvm-answer { min-width: 0; display: grid; gap: 6px; overflow-wrap: anywhere; }
.mvm-answer-head { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.55; }
.mvm-answer-line { margin: 0; }
.mvm-answer-caveats { margin: 2px 0 0; }
.mvm-ask-basis { min-width: 0; border-top: 1px solid var(--line); padding-top: 8px; }
.mvm-ask-basis > .mvm-block { margin-top: 8px; }
.reasoning-busy { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
@media (max-width: 480px) {
  .mvm-summary, .mvm-event { font-size: 12.5px; }
  .mvm-answer-head { font-size: 14px; }
  .mvm-calendar { padding-left: 16px; }
}
