/* Races by scenario — two-party conditional odds. Shared by the desktop page and the phone artboard. */
.page-root { container-type: inline-size; container-name: page; background: #fcfbf8; color: #292820; font-family: 'IBM Plex Sans', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.page-root *, .page-root *::before, .page-root *::after { box-sizing: border-box; }
.page-root a { color: inherit; text-underline-offset: 3px; }
/* Link hover: the butter of the logo as a wash under the text (the cream itself is too pale to carry text on paper) */
.page-root a:hover { color: #292820; background: #faeccc; box-shadow: 0 0 0 2px #faeccc; }
.page-root button { font: inherit; color: inherit; cursor: pointer; }
.page-root button:focus-visible, .page-root a:focus-visible, .page-root input:focus-visible, .page-root summary:focus-visible { outline: 2px solid #292820; outline-offset: 4px; box-shadow: 0 0 0 4px #faeccc; }
.page-root .eyebrow { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: #5f5f57; }
.page-root .dem { color: #2b559a; }
.page-root .rep { color: #a8453a; }
.page-root .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 40px 18px; border-bottom: 2px solid #292820; }
.logo { display: block; width: auto; height: 44px; }

/* Page frame */
.page { max-width: 1240px; margin: 0 auto; }
.main { min-width: 0; padding: 30px 40px 38px; }

/* Outcome selector: one tab per race, each with its own embedded snapshot and history */
.outcomes { display: flex; gap: 26px; margin: -8px 0 26px; border-bottom: 1px solid #deddd5; overflow-x: auto; scrollbar-width: none; }
.outcomes::-webkit-scrollbar { display: none; }
.outcome { flex: none; appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 0 11px; font: 500 13px/1.3 'IBM Plex Sans', Arial, sans-serif; color: #5f5f57; cursor: pointer; white-space: nowrap; }
.outcome:hover { color: #292820; }
.outcome.active { color: #292820; border-bottom-color: #292820; }
.outcome:focus-visible { outline: 2px solid #292820; outline-offset: 2px; box-shadow: 0 0 0 2px #faeccc; }
.o-short { display: none; }
.ref-note { flex: none; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; line-height: 1.4; color: #5f5f57; text-decoration: none; text-align: right; white-space: nowrap; }
.ref-note:hover { text-decoration: underline; }
.ref-swatch { display: inline-block; width: 18px; border-top: 1.5px dashed #a9a89f; }
.venue-tag { display: inline-block; margin-left: 10px; vertical-align: 3px; padding: 3px 5px; border: 1px solid #c9c8bf; font: 500 9.5px/1 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: .8px; text-transform: uppercase; color: #5f5f57; }

/* Intro and the unconditional two-party panel */
.intro { padding-bottom: 22px; }
.title { font: 500 42px/1.13 'Spectral', Georgia, serif; letter-spacing: -1.1px; margin: 9px 0 12px; }
.standfirst { font-size: 15px; line-height: 1.55; margin: 0; max-width: 620px; color: #5f5f57; }

/* Price history chart: hover scrubs, click pins, click again returns to the latest snapshot */
.chart { margin: 2px 0 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.chart-stamp { font: 500 12px/1.5 'IBM Plex Mono', 'Courier New', monospace; color: #5f5f57; }
.chart-frame { display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
.chart-plot { position: relative; height: 200px; cursor: crosshair; touch-action: pan-y; }
.chart-plot:focus-visible { outline: 2px solid #292820; outline-offset: 6px; }
.chart-svg { display: block; width: 100%; height: 200px; }
.grid-line { stroke: #e6e5dd; stroke-width: 1; vector-effect: non-scaling-stroke; }
.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dem-line { stroke: #2b559a; }
.rep-line { stroke: #a8453a; }
/* A scenario laid over the chart carries the weight; the overall market steps back to a thin, faint pair of lines */
.line.base.faded { stroke-width: 1.25; stroke-opacity: .3; }
/* The scenario lines are lifted a step toward the lighter end of each party hue: at this weight the base inks read nearly black */
.line.ov { stroke-width: 2.25; }
.line.ov.dem-line { stroke: #4071c6; }
.line.ov.rep-line { stroke: #c45d4d; }
.dot.ov.dem { background: #4071c6; box-shadow: 0 0 0 1px #4071c6; }
.dot.ov.rep { background: #c45d4d; box-shadow: 0 0 0 1px #c45d4d; }
.cursor { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid #292820; pointer-events: none; }
.dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fcfbf8; pointer-events: none; }
.dot.dem { background: #2b559a; box-shadow: 0 0 0 1px #2b559a; }
.dot.rep { background: #a8453a; box-shadow: 0 0 0 1px #a8453a; }
.dot.faded { width: 7px; height: 7px; border-width: 1.5px; opacity: .4; }
.dot.ov { width: 12px; height: 12px; }
/* Scenario picker under the chart title */
.chart-lead { min-width: 0; }
.overlay-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.ov-label { font-size: 9.5px; line-height: 14px; letter-spacing: 1.6px; text-transform: uppercase; color: #292820; font-weight: 600; white-space: nowrap; }
.ov-select { appearance: none; -webkit-appearance: none; max-width: 100%; margin: 0; padding: 6px 30px 6px 10px; border: 1px solid #292820; border-radius: 0; color: #292820; cursor: pointer;
  font: 500 12px/1.3 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -.2px;
  background: #fcfbf8 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' fill='none' stroke='%23292820' stroke-width='1.5'/></svg>") no-repeat right 10px center; }
.ov-select:hover { background-color: #faeccc; }
.ov-select:focus-visible { outline: 2px solid #292820; outline-offset: 2px; box-shadow: 0 0 0 5px #faeccc; }
.overlay-ctl.on .ov-select { background-color: #292820; color: #fcfbf8; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' fill='none' stroke='%23fcfbf8' stroke-width='1.5'/></svg>"); }
.overlay-ctl.on .ov-select:hover { background-color: #3d3c33; }
.chart-tag { display: inline-block; margin-left: 8px; padding: 2px 5px 1px; background: #292820; color: #fcfbf8; font: 600 8.5px/1.2 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: .9px; text-transform: uppercase; vertical-align: 1px; }
.hover-card { position: absolute; top: 10px; transform: translateX(12px); padding: 8px 10px 7px; background: #292820; color: #fcfbf8; font-size: 11px; line-height: 1.45; white-space: nowrap; pointer-events: none; z-index: 3; }
.hover-card.flip { transform: translateX(calc(-100% - 12px)); }
.hc-stamp { font: 500 11px/1.4 'IBM Plex Mono', 'Courier New', monospace; margin-bottom: 4px; }
.hc-row { display: flex; align-items: baseline; gap: 8px; }
.hc-row span { flex: 1 1 auto; }
.hc-row b { font: 500 13px/1.4 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -.3px; }
.hc-row small { font-size: 9.5px; color: #c9c8bf; }
.hc-row.dem { color: #a9c0e8; }
.hc-row.rep { color: #e6aa9f; }
.hc-k { margin: 2px 0 1px; font-size: 9px; line-height: 1.4; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; color: #fcfbf8; }
.hc-k.faint { margin-top: 6px; color: #a9a89f; }
.hc-row.faint { opacity: .55; }
.hc-hint { margin-top: 5px; font-size: 10px; color: #c9c8bf; letter-spacing: .3px; }
/* Compact strip fixed to the viewport once the full chart has scrolled off the top */
.mini { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: rgba(252, 251, 248, .96); border-bottom: 1px solid #292820; box-shadow: 0 1px 0 #fcfbf8; }
.mini-inner { max-width: 1240px; margin: 0 auto; padding: 8px 40px 8px; }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 4px; font-size: 11px; }
.mini-title { font: 600 12px/1.3 'Spectral', Georgia, serif; }
.mini-values { display: flex; gap: 14px; font-weight: 500; }
.mini-values span { display: inline-flex; align-items: baseline; gap: 4px; }
.mini-values b { font: 500 13px/1 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -.3px; }
.mini-stamp { font: 500 11px/1.4 'IBM Plex Mono', 'Courier New', monospace; }
.mini-plot { height: 40px; }
.mini-plot .chart-svg { height: 40px; }
.mini-plot .dot { width: 8px; height: 8px; }
.y-labels { position: relative; height: 200px; font: 10px/1 'IBM Plex Mono', 'Courier New', monospace; color: #5f5f57; }
.y-labels span { position: absolute; left: 8px; transform: translateY(-50%); }
.x-labels { position: relative; height: 14px; margin: 6px 44px 0 0; font: 10px/1 'IBM Plex Mono', 'Courier New', monospace; color: #5f5f57; }
.x-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.x-labels span.first { transform: none; }
.x-labels span.last { transform: translateX(-100%); }
/* The odds on the chart, read out beside its title: the two shares at the gap figure's size, a slim bar, the moment underneath */
.chart-head { align-items: flex-start; }
.readout { flex: none; width: 360px; }
.ro-bar { position: relative; height: 48px; }
.ro-bar .bar-labels { top: 0; line-height: 32px; align-items: baseline; }
.ro-bar .bar-label { gap: 8px; }
.ro-bar .bar-label b { font: 500 30px/32px 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -1px; }
.ro-bar .bar, .ro-bar .empty-track { top: 42px; height: 6px; }
/* One line, always: the stamp never wraps and the note truncates rather than drop to a second line, so the block's height holds as the cursor moves */
.ro-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; height: 15px; font-size: 10.5px; line-height: 15px; color: #5f5f57; white-space: nowrap; }
.ro-foot .chart-stamp { flex: none; font-size: 11.5px; line-height: 15px; white-space: nowrap; }
.ro-note { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-note b { font: 500 10.5px/1.3 'IBM Plex Mono', 'Courier New', monospace; color: #5f5f57; }
.ro-note .swatch { display: inline-block; width: 14px; border-top: 1.5px dashed #a9a89f; vertical-align: 3px; margin-right: 5px; }
.ro-note .swatch.faint { border-top: 1.5px solid #c9c8bf; }
/* The scenario on the chart, named above its split */
.ro-scn { margin: 0 0 4px; font-size: 13px; line-height: 1.3; font-weight: 600; color: #292820; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-scn-k { font: 500 9.5px/14px 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: 1.2px; text-transform: uppercase; color: #5f5f57; margin-right: 7px; }
.history-note { margin: 8px 0 0; font-size: 11px; line-height: 1.5; color: #5f5f57; }

/* Subject, legend, column heads */
.subject { font: 600 22px/1.25 'Spectral', Georgia, serif; margin: 8px 0 0; }
.subject a { text-decoration: none; }
.subject a:hover { text-decoration: underline; text-underline-offset: 4px; }
.subject .ext { font-size: 15px; color: #5f5f57; margin-left: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 9px 20px; font-size: 12px; color: #5f5f57; margin-bottom: 18px; }
.legend span { display: inline-flex; gap: 7px; align-items: center; }
.key { width: 10px; height: 10px; display: inline-block; flex: none; }
.key.dem { background: #2b559a; }
.key.rep { background: #a8453a; }
.key.mid { width: 0; height: 13px; border-left: 1px dotted #6f6f66; }
.key.base { width: 0; height: 14px; border-left: 1.5px dashed #6f6f66; background: none; }
.key.gap { width: 16px; height: 6px; background: #6b4fa0; }
/* Each scenario market sits on its own tinted panel; the overall market stays on paper above them, under its ink rule */
.comparison { --cols: minmax(160px, 1fr) minmax(300px, 3fr) 164px; --gap: 18px; }

/* One board: title row, two branch rows, scenario effect spanning both */
.board { background: #f2f1eb; padding: 18px 20px 14px; margin-bottom: 14px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 6px; }
.board-title { font: 600 19px/1.2 'Spectral', Georgia, serif; margin: 0; }
.board-title a { text-decoration: none; }
.board-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.board-title .ext { font-size: 13px; color: #5f5f57; margin-left: 2px; }
.board-meta { font-size: 11px; color: #5f5f57; line-height: 1.5; margin: 5px 0 0; max-width: 720px; }
.board-meta b { font-weight: 500; color: #292820; }
.board.reference { background: none; border-bottom: 1px solid #292820; padding: 14px 0 10px; margin-bottom: 16px; }
.board.reference .branch-label { border-left: 0; padding-left: 0; }
.toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; margin: 2px 0 0; padding: 10px 0 4px; font-size: 11px; line-height: 16px; color: #5f5f57; white-space: nowrap; }
.toggle .caret { width: 10px; height: 10px; flex: none; }
.toggle:hover { color: #292820; text-decoration: underline; text-underline-offset: 3px; }
.toggle[aria-expanded="true"] { color: #292820; box-shadow: inset 0 -7px 0 #faeccc; }
.toggle[aria-expanded="true"] .caret { transform: rotate(90deg); }
/* Two 80 px rows: label, contest, and the gap cell spanning both. Row one carries its figures above the bar, row two below it, so the lane between the bars holds only the gap. */
.pair { display: grid; grid-template-columns: var(--cols); grid-template-rows: 80px 80px; column-gap: var(--gap); align-items: center; }
.pair.single { grid-template-rows: 80px; }
.branch { display: grid; grid-template-columns: subgrid; grid-column: 1 / 3; align-items: center; }
.branch.first { grid-row: 1; }
.branch.second { grid-row: 2; }
/* Scenario labels: a fork rule joins Either … / Or …; shared words go grey, the words that differ stay heavy; the likelier scenario in full weight */
.branch-label { display: flex; flex-direction: column; gap: 3px; border-left: 1.5px solid #292820; padding-left: 11px; }
.kicker { font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; color: #292820; font-weight: 600; }
.phrase { font-size: 14px; line-height: 1.25; font-weight: 500; }
.phrase .dim { color: #5f5f57; font-weight: 400; }
.phrase .em { color: #292820; font-weight: 600; }
.branch.minor .phrase .em { font-weight: 500; }
.branch.minor .phrase .dim { color: #8a8a80; }
.branch-weight { font-size: 10.5px; color: #5f5f57; display: flex; align-items: center; gap: 7px; }
.branch.minor .branch-weight { color: #8a8a80; }
.meter { display: inline-block; flex: none; width: 72px; height: 4px; background: #deddd5; }
.meter > span { display: block; height: 100%; background: #292820; }
.branch.minor .meter > span { background: #8a8a80; }
.branch-note { font-size: 10.5px; color: #5f5f57; }
.mobile-label { display: none; }
.contest { position: relative; height: 80px; }
.bar-labels { position: absolute; left: 0; right: 0; top: 6px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; line-height: 20px; font-weight: 500; letter-spacing: .2px; z-index: 2; }
.branch.second .bar-labels { top: auto; bottom: 6px; }
.bar-label { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.bar-label b { font: 500 19px/20px 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -.6px; }
.bar-label.na { color: #5f5f57; font-weight: 400; }
.mid-line { position: absolute; left: 50%; top: 32px; bottom: 22px; border-left: 1px dotted #6f6f66; }
.branch.second .mid-line { top: 22px; bottom: 32px; }
.bar { position: absolute; left: 0; right: 0; top: 38px; height: 14px; display: flex; gap: 2px; }
.seg { display: block; height: 100%; }
.seg.dem { background: #2b559a; }
.seg.rep { background: #a8453a; flex: 1 1 0; }
.gap-bar { position: absolute; top: 80px; height: 10px; min-width: 2px; background: #6b4fa0; z-index: 1; }
.tie { position: absolute; left: 0; top: 0; width: 100%; height: 80px; overflow: visible; pointer-events: none; z-index: 1; }
.empty-track { position: absolute; left: 0; right: 0; top: 38px; height: 14px; border: 1px dashed #c9c8bf; display: flex; align-items: center; justify-content: center; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: #5f5f57; }
/* The overall market's Democratic figure, carried down as a background line through the bar column */
.base-lane { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; position: relative; pointer-events: none; }
.pair.single .base-lane { grid-row: 1; }
.base-line { position: absolute; top: -12px; bottom: -12px; border-left: 1.5px dashed #a9a89f; }
.board.open .base-line { bottom: -12px; }
.board.reference .base-line { top: 52px; bottom: -10px; }
.gapcell { grid-column: 3; grid-row: 1 / span 2; align-self: start; margin-top: 44px; min-height: 72px; padding-left: 18px; border-left: 1px solid #deddd5; }
.pair.single .gapcell { grid-row: 1; }
.gapcell.note { border-left: 0; }
.gap-value { font: 500 30px/1.1 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -1px; color: #6b4fa0; display: flex; align-items: baseline; gap: 6px; }
.gap-value small { font: 500 12px/1 'IBM Plex Sans', Arial, sans-serif; letter-spacing: .2px; }
.gap-value.na { color: #5f5f57; font-weight: 400; }
.gap-dir { font-size: 11px; line-height: 1.45; color: #5f5f57; margin-top: 5px; }
.gap-dir .dem { font-weight: 500; }
.gap-dir .arrow { color: #292820; }
.gap-dir u { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #a9a89f; }

/* Expanded quotes and rules */
.detail { padding: 14px 0 8px; margin-top: 6px; border-top: 1px dashed #deddd5; font-size: 13px; line-height: 1.55; }
.detail-lead { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 12px; }
.detail-lead p { margin: 0; max-width: 650px; }
.source-link { white-space: nowrap; font-size: 12px; }
.quotes { display: flex; flex-direction: column; margin: 12px 0; font-size: 12px; }
.qrow { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(90px, 1fr)); column-gap: 10px; border-bottom: 1px solid #deddd5; }
.qrow.history { grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(110px, 1fr)); }
.qrow > * { padding: 7px 5px; }
.qrow .qh { font-weight: 500; color: #5f5f57; }
.qrow .qv { text-align: right; font-family: 'IBM Plex Mono', 'Courier New', monospace; white-space: nowrap; }
.qrow .qh.qv { font-family: 'IBM Plex Sans', Arial, sans-serif; }
.formula { font: 12px/1.7 'IBM Plex Mono', 'Courier New', monospace; margin: 8px 0; overflow-wrap: anywhere; }
.formula b { font-weight: 600; }
.quote-note { color: #5f5f57; font-size: 12px; margin: 6px 0; }

/* Footer and onboarding */
.howto { flex: none; padding: 8px 14px; min-height: 36px; border: 1px solid #c9c8bf; background: #f2f1eb; font-size: 12px; color: #5f5f57; white-space: nowrap; }
.howto:hover { color: #292820; border-color: #8a8a80; }
.tour-backdrop { position: fixed; inset: 0; background: rgba(41, 40, 32, .38); z-index: 40; }
.tour { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); z-index: 41; padding: 22px 24px 18px; background: #fcfbf8; border: 1px solid #292820; box-shadow: 0 12px 40px rgba(41, 40, 32, .18); }
.tour-step { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #5f5f57; }
.tour-title { font: 600 21px/1.25 'Spectral', Georgia, serif; margin: 6px 0 10px; }
.tour-body { font-size: 14px; line-height: 1.55; margin: 0; }
.tour { width: min(520px, calc(100% - 32px)); }
.illus { margin: 14px 0 0; padding: 14px 16px; background: #f2f1eb; display: flex; flex-direction: column; gap: 14px; }
.hl { outline: 2px solid #6b4fa0; outline-offset: 5px; }
.ill-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 16px; align-items: center; }
.ill-name { font-size: 11px; line-height: 1.3; font-weight: 500; display: flex; flex-direction: column; gap: 1px; border-left: 1.5px solid #292820; padding-left: 7px; }
.ill-kicker { font-size: 8px; letter-spacing: 1.2px; text-transform: uppercase; color: #292820; font-weight: 600; }
.ill-likely { font-size: 9px; color: #5f5f57; font-weight: 400; display: flex; align-items: center; gap: 5px; }
.ill-likely .meter { width: 40px; height: 3px; }
.ill-names .ill-name { border-left: 0; padding-left: 0; }
.ill-contest { display: flex; flex-direction: column; gap: 4px; }
.ill-labels { display: flex; justify-content: space-between; font: 500 9px/1.2 'IBM Plex Sans', Arial, sans-serif; }
.ill-bar { display: flex; gap: 2px; height: 10px; }
.ill-bar .seg.dem { }
.ill-bar .seg.rep { }
.ill-pair { display: grid; grid-template-columns: 112px minmax(0, 1fr) 70px; column-gap: 16px; align-items: center; }
.ill-names { display: flex; flex-direction: column; justify-content: space-between; height: 46px; }
.ill-names .ill-name { font-weight: 500; }
.ill-stack { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 46px; }
.ill-tie { position: absolute; left: 0; top: 10px; width: 100%; height: 26px; overflow: visible; }
.ill-gap { position: absolute; top: 19px; height: 8px; background: #6b4fa0; min-width: 2px; }
.ill-gapcell { text-align: left; color: #6b4fa0; display: flex; align-items: baseline; gap: 4px; justify-self: start; }
.ill-gapcell b { font: 500 18px/1 'IBM Plex Mono', 'Courier New', monospace; letter-spacing: -.6px; }
.ill-gapcell small { font: 500 9px/1 'IBM Plex Sans', Arial, sans-serif; }
.ill-chart { position: relative; padding: 10px 16px 12px; }
.ill-chart .chart-svg { height: 70px; }
.ill-chart .cursor { top: 10px; bottom: 12px; }
.ill-card { position: absolute; left: 58%; top: 14px; transform: translateX(10px); padding: 5px 8px; background: #292820; color: #fcfbf8; font: 500 9px/1.4 'IBM Plex Mono', 'Courier New', monospace; white-space: nowrap; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }
.tour-nav { display: flex; gap: 8px; }
.tour button { border: 1px solid #292820; background: none; padding: 9px 14px; font-size: 12px; min-height: 36px; }
.tour .tour-skip { border: 0; color: #5f5f57; padding-left: 0; }
.tour .tour-skip:hover { color: #292820; text-decoration: underline; text-underline-offset: 3px; }
.tour .tour-next { background: #292820; color: #fcfbf8; }
.footer { margin-top: 24px; padding-top: 14px; border-top: 1px solid #deddd5; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 11px; color: #5f5f57; }
.data-missing { margin: 24px 0; padding: 16px; border: 1px dashed #c9c8bf; font-size: 13px; line-height: 1.5; }

/* Narrower layouts, measured against the page itself so phone artboards and narrow windows behave alike */
@container page (max-width: 900px) {
  .masthead { padding: 20px 24px 16px; }
  .main { padding: 25px 24px; }
  .comparison { --cols: minmax(130px, 1fr) minmax(200px, 2.2fr) 128px; --gap: 12px; }
  .gap-value { font-size: 26px; }
  .bar-label b { font-size: 16px; }
  .ro-bar .bar-label b { font-size: 26px; }
  .title { font-size: 35px; }
}
@container page (max-width: 680px) {
  .masthead { padding: 14px 18px 12px; }
  .logo { height: 36px; }
  .howto { padding: 7px 10px; font-size: 11px; }
  .main { padding: 24px 18px; }
  .outcomes { gap: 20px; margin: -6px -18px 22px; padding: 0 18px; }
  .outcome { font-size: 12.5px; }
  .o-long { display: none; }
  .o-short { display: inline; }
  .venue-tag { margin-left: 6px; }
  .board-head { flex-wrap: wrap; gap: 4px 12px; }
  .ref-note { margin-top: 0; text-align: left; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .intro { display: block; }
  .title { font-size: 34px; }
  .standfirst { font-size: 14px; }
  .subject { font-size: 21px; }
  .chart-plot, .chart-svg, .y-labels { height: 160px; }
  .mini-inner { padding: 6px 18px; }
  .mini-title { display: none; }
  .mini-plot, .mini-plot .chart-svg { height: 32px; }
  .chart-frame { grid-template-columns: minmax(0, 1fr) 38px; }
  .x-labels { margin-right: 38px; }
  .readout { width: 100%; }
  .ro-bar { height: 42px; }
  .ro-bar .bar-labels { line-height: 26px; }
  .ro-bar .bar-label b { font-size: 24px; line-height: 26px; letter-spacing: -.8px; }
  .ro-bar .bar, .ro-bar .empty-track { top: 36px; }
  .chart-lead { width: 100%; }
  .overlay-ctl { margin-top: 10px; }
  .ov-select { flex: 1 1 100%; width: 100%; }
  .legend { gap: 8px 14px; font-size: 11px; }
  .board-meta { font-size: 10.5px; }
  .board { padding: 14px 14px 12px; margin-bottom: 12px; }
  .board.reference { padding: 10px 0 8px; }
  .meter { width: 56px; }
  /* Phone: scenario line, bar, bar, scenario line. The two 80 px bar rows stay adjacent so the gap bar and its legs survive. */
  .pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 80px 80px auto auto; column-gap: 0; row-gap: 0; align-items: start; }
  .pair.single { grid-template-rows: auto 80px auto; }
  .branch { display: contents; }
  .branch .branch-label { padding: 8px 0 2px 10px; gap: 2px; flex-direction: column; align-self: end; }
  .branch.first .branch-label { grid-column: 1; grid-row: 1; }
  .branch.first .contest { grid-column: 1 / -1; grid-row: 2; }
  .branch.second .contest { grid-column: 1 / -1; grid-row: 3; }
  .branch.second .branch-label { grid-column: 1; grid-row: 4; padding: 2px 0 8px 10px; align-self: start; }
  .phrase { font-size: 13px; }
  .contest { height: 80px; }
  .bar-labels { gap: 6px; font-size: 10px; }
  .bar-label { gap: 4px; }
  .bar-label b { font-size: 15px; letter-spacing: -.4px; }
  .base-lane { grid-column: 1 / -1; grid-row: 2 / span 2; }
  .pair.single .base-lane { grid-row: 2; }
  .base-line { top: 4px; bottom: 4px; }
  .board.reference .base-line { top: 52px; bottom: 0; }
  .mobile-label { display: block; font: 10px/1.3 'IBM Plex Sans', Arial, sans-serif; color: #5f5f57; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 4px; }
  /* Tall enough for the label, the figure and a two-line note, so an unavailable stop ("—") keeps the same height. */
  .gapcell { grid-column: 1 / -1; grid-row: 5; border-left: 0; border-top: 1px dashed #deddd5; padding: 10px 0 2px; margin-top: 4px; min-height: 78px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .pair.single .gapcell { grid-row: 3; }
  .gapcell .mobile-label { flex-basis: 100%; margin-bottom: 0; }
  .gapcell.note { display: none; }
  .gap-value { font-size: 24px; }
  .gap-dir { margin-top: 0; min-height: 32px; }
  .detail-lead { display: block; }
  .detail-lead a { display: inline-block; margin-top: 10px; }
  .qrow { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); column-gap: 6px; font-size: 11px; }
  .qrow.history { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); }
  .qrow > * { padding: 8px 3px; }
  .formula { font-size: 11px; }
}
