/* Results screen with the presentation data: epoch bar, map, observation ribbon, evidence ledger, hotspots,
   story. Plan: web/DESIGN_PLAN.md. Cyan = the user's selection only; data colours = class palette. */

#page-analysis.on-results .statusbar { display: none; }
.res { display: flex; flex-direction: column; min-height: 0; }
.res-map { position: relative; flex: 1 1 auto; min-height: 240px; }
.res-epochs:empty, .res-ribbon:empty { display: none; }

/* ---------------------------------------------------------------- epoch bar */
.epochbar { background: var(--panel); border-bottom: 1px solid var(--border); padding: 8px 12px; display: grid; gap: 6px; }
.eb-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.eb-epochs { align-items: flex-start; }
.eb-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 0; }
.eb-pick { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--muted); }
.eb-tag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: var(--fs-12); }
.eb-select { background: var(--bg-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 5px 8px; font-size: 13px; max-width: 260px; }
.eb-select:hover { border-color: var(--accent); }
.eb-swap { align-self: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font-size: 15px; display: grid; place-items: center; padding: 0; flex: none; }
.eb-swap:hover { border-color: var(--accent); }
.eb-chips { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.chip { font-size: var(--fs-12); line-height: 1.3; padding: 2px 7px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); color: var(--text-2); background: var(--bg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-missing { border-style: dashed; color: var(--muted); background: transparent; }
.chip-warn { border-color: var(--warn); }
.chip-ref { border-style: dotted; }
.chip-yes { border-color: var(--text-2); color: var(--text); }
.eb-tools { justify-content: flex-start; }
.eb-types { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.eb-type { border: 0; background: var(--bg-2); color: var(--text-2); padding: 6px 10px; font-size: 13px; font-weight: 600; }
.eb-type:first-child { border-radius: 5px 0 0 5px; } .eb-type:last-child { border-radius: 0 5px 5px 0; }
.eb-type + .eb-type { border-left: 1px solid var(--border-strong); }
.eb-type:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.eb-type[aria-checked="true"] { background: var(--panel-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.eb-type:disabled { opacity: .45; }
.eb-change { display: inline-flex; align-items: baseline; gap: 8px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; font-weight: 600; }
.eb-change:hover:not(:disabled) { border-color: var(--accent); }
.eb-change[aria-pressed="true"] { border-color: var(--accent); background: var(--panel-3); box-shadow: inset 0 -2px 0 var(--accent); }
.eb-change-km2 { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.eb-change-km2::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--cls-new); margin-right: 6px; }
.eb-story { margin-left: auto; }
.eb-warn { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--warn); color: #f6d48c; font-size: var(--fs-12); line-height: 1.45; display: grid; gap: 2px; }

/* ---------------------------------------------------------------- floating map legend */
.map-legend { position: absolute; left: 10px; bottom: 24px; z-index: 650; max-width: min(280px, calc(100% - 20px)); background: #10243af0; border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font-size: var(--fs-12); }
.ml-title { margin: 0 0 4px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ramp-new { background: linear-gradient(90deg, #eb68341f, var(--cls-new)); }

/* ---------------------------------------------------------------- observation ribbon (the memorable element) */
.res-ribbon { background: var(--panel); border-top: 1px solid var(--border); }
.ribbon { margin: 0; padding: 6px 10px 4px; }
.ribbon-cap { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 2px; }
.ribbon-title { font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.ribbon-cap .note { margin: 0; flex: 1 1 280px; min-width: 0; }
.ribbon-story { flex: none; }
.ribbon-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.ribbon-svg { display: block; font-family: var(--font); font-variant-numeric: tabular-nums; }
.rb-storm { fill: #e6eef512; }
.rb-storm-label { fill: var(--muted); font-size: 10.5px; }
.rb-tick { stroke: var(--grid); }
.rb-axis { fill: var(--muted); font-size: 10.5px; }
.rb-epoch { cursor: pointer; outline: none; }
.rb-epoch-hit { fill: transparent; stroke: var(--border); stroke-dasharray: 2 3; }
.rb-epoch:hover .rb-epoch-hit { fill: #22d3ee0d; stroke: var(--border-strong); }
.rb-epoch:focus-visible .rb-epoch-hit { stroke: var(--accent); stroke-width: 2; stroke-dasharray: none; }
.rb-epoch-label { fill: var(--text-2); font-size: 11px; font-weight: 600; pointer-events: none; }
.rb-lane { fill: var(--muted); font-size: 11px; }
.rb-rail { stroke: var(--grid); stroke-width: 1; }
.rb-acq rect { fill: var(--text); }
.rb-acq-ref rect { fill: none; stroke: var(--text); stroke-width: 1.2; }
.rb-bar rect { fill: var(--muted); }
.rb-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.rb-line.rb-wse { stroke: var(--text); } .rb-dot.rb-wse { fill: var(--text); }
.rb-line.rb-ext { stroke: var(--cls-permanent); } .rb-dot.rb-ext { fill: var(--cls-permanent); }
.rb-peak, .rb-ref { fill: var(--muted); font-size: 10.5px; }
.rb-bracket { pointer-events: none; }
.rb-bracket path { fill: none; stroke: var(--accent); stroke-width: 2; }
.rb-tag { fill: var(--accent); }
.rb-tag-text { fill: var(--accent-ink); font-size: 11px; font-weight: 800; }
.ribbon-table { margin-top: 2px; }

/* ---------------------------------------------------------------- right panel tabs */
.panel-title { font-size: var(--fs-18); font-weight: 600; margin: 0; text-wrap: balance; }
.ptabs { display: flex; flex-wrap: wrap; gap: 0 2px; border-bottom: 1px solid var(--border); margin: 4px 0 12px; }
.ptab { border: 0; background: transparent; color: var(--muted); padding: 7px 8px 6px; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptab:hover { color: var(--text); }
.ptab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.block-h { font-size: var(--fs-18); line-height: 1.3; font-weight: 600; margin: 4px 0 10px; text-wrap: balance; }
.block-h3 { font-size: var(--fs-14); font-weight: 600; color: var(--text-2); margin: 18px 0 6px; text-wrap: balance; }

/* ---------------------------------------------------------------- evidence ledger */
.ev-lede { margin: -4px 0 10px; font-size: var(--fs-12); line-height: 1.45; color: var(--muted); }
.ledger-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ledger-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.ledger-row:first-child { border-top: 0; padding-top: 2px; }
.ledger-num { font-size: var(--fs-36); line-height: 1; font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.ledger-num .is-long { font-size: var(--fs-24); letter-spacing: -0.02em; }
.ledger-num small { display: block; font-size: var(--fs-11); line-height: 1.35; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-top: 6px; white-space: normal; }
.ledger-na { font-size: var(--fs-18); color: var(--muted); font-weight: 600; }
.ledger-claim { margin: 0 0 6px; font-size: var(--fs-14); line-height: 1.45; font-weight: 600; color: var(--text); text-wrap: pretty; }
.ledger-text { min-width: 0; }
.ledger-text .note { margin: 4px 0 6px; text-wrap: pretty; }
.ev-fig { margin: 0; }
.ev-whisker { display: block; max-width: 220px; overflow: visible; }
.ev-axis { stroke: var(--grid); stroke-width: 1; }
.ev-tick { stroke: var(--border-strong); stroke-width: 1; }
.ev-ci { fill: var(--muted); opacity: .55; }
.ev-dot { fill: var(--text); stroke: var(--panel); stroke-width: 1.2; }
.ev-dot-alt { fill: var(--text-2); }
.ev-nominal { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 2 2; }
.ev-series { max-width: none; margin-top: 2px; }
.ev-col { fill: var(--cls-permanent); opacity: .4; }
.ev-col.is-peak { opacity: 1; }
.ev-fig figcaption { font-size: var(--fs-11); color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.ev-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; min-height: 28px; color: var(--accent); font: 600 var(--fs-12)/1.2 var(--font); cursor: pointer; touch-action: manipulation; }
.ev-toggle::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.ev-toggle[aria-expanded="true"]::after { transform: rotate(225deg) translate(-1px, -1px); }
.ev-toggle:hover { text-decoration: underline; }
.ev-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.ev-method { grid-column: 1 / -1; margin: -4px 0 2px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ev-dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: var(--fs-12); line-height: 1.5; }
.ev-dl dt { color: var(--muted); font-weight: 600; }
.ev-dl dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ev-method .src { color: var(--muted); font-size: var(--fs-11); margin: 8px 0 0; overflow-wrap: anywhere; }
.ledger-method { font-size: var(--fs-12); color: var(--text-2); margin-top: 4px; }
.ledger-method summary { cursor: pointer; color: var(--accent); font-weight: 600; width: fit-content; }
.ledger-method summary:hover { text-decoration: underline; }
.ledger-method ul { margin: 6px 0 4px; padding-left: 16px; display: grid; gap: 3px; line-height: 1.5; }
.ledger-method .src { color: var(--muted); font-size: var(--fs-11); margin: 2px 0 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- ALOS decomposition */
.decomp { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.decomp-why { margin: 0 0 8px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.seg-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.seg-tab { border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text-2); border-radius: var(--radius-sm); padding: 3px 8px; font-size: var(--fs-12); font-weight: 600; }
.seg-tab:hover { border-color: var(--accent); }
.eb-fair { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.eb-fair .eb-label { margin-right: 2px; white-space: nowrap; }
.eb-fair .eb-label { font-size: var(--fs-12); color: var(--muted); font-weight: 600; }
.seg-tab[aria-pressed="true"], .seg-tab[aria-checked="true"] { border-color: var(--accent); color: var(--text); background: var(--panel-3); }
/* proportional strip: same grid columns for brackets, strip and callout so they line up */
.dc-fig { margin: 4px 0 8px; }
.dc-cap { font-size: var(--fs-12); color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.dc-cap b { color: var(--text); font-weight: 600; }
.dc-brackets, .dc-under { display: grid; column-gap: 1px; }
.dc-br { position: relative; padding: 0 0 7px; font-size: var(--fs-12); line-height: 1.25; color: var(--text-2); white-space: nowrap; min-width: 0; }
.dc-br b { font-size: var(--fs-18); font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dc-br::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 5px; border: 1px solid var(--text-2); border-bottom: 0; border-radius: 2px 2px 0 0; }
.dc-br-moi { overflow: visible; }
.dc-br-moi b { color: var(--cls-new); }
.dc-strip { display: grid; column-gap: 1px; height: 12px; border-radius: 3px; overflow: hidden; background: var(--bg); }
.dc-strip.is-big { height: 40px; border-radius: 4px; }
.dc-seg { display: block; background: var(--seg); min-width: 0; }
.dc-seg.hatch, .swatch.hatch { background: repeating-linear-gradient(45deg, var(--seg) 0 2px, transparent 2px 6px); }
.dc-callout { margin: 6px 0 0; padding-left: 8px; border-left: 1px solid var(--cls-seasonal); font-size: var(--fs-12); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-legend { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 4px; font-size: var(--fs-12); }
.dc-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 72px; gap: 8px; align-items: center; }
.dc-l { color: var(--text-2); min-width: 0; }
.dc-v { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.dc-k { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: var(--seg); }
.dc-refs-h { margin: 14px 0 6px; font-size: var(--fs-12); font-weight: 600; color: var(--muted); }
.dc-refs { display: grid; gap: 2px; }
.dc-ref { display: grid; grid-template-columns: 84px 56px minmax(0, 1fr) 40px; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 6px 8px; min-height: 32px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); font: 600 var(--fs-12)/1.2 var(--font); cursor: pointer; touch-action: manipulation; }
.dc-ref:hover { background: var(--panel-2); color: var(--text); }
.dc-ref[aria-checked="true"] { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.dc-ref:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dc-ref-km, .dc-ref-pct { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; font-weight: 400; }
.dc-ref-pct { color: var(--text); font-weight: 700; }
.dc-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.decomp-table { min-width: 460px; }
.decomp-table caption { text-align: left; caption-side: top; margin-bottom: 4px; }
.decomp-table td, .decomp-table th { padding: 3px 4px 3px 0; }
.decomp-table td { white-space: nowrap; padding-left: 8px; font-variant-numeric: tabular-nums; text-align: right; }
.decomp-table th { font-weight: 400; color: var(--text-2); }
.decomp-table thead th { color: var(--muted); font-weight: 600; text-align: right; }
.decomp-table thead th:first-child { text-align: left; }
.decomp-table .swatch { vertical-align: -1px; }

/* ---------------------------------------------------------------- hotspots */
.hot-lede { margin: -4px 0 12px; font-size: 13px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.hot-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.hot-list li + li .hot-item { border-top-color: var(--border); }
.hot-item { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; text-align: left; padding: 10px 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; cursor: pointer; touch-action: manipulation; }
.hot-item:hover { background: var(--panel-2); }
.hot-item.is-on { border-color: var(--accent); background: var(--panel-2); }
.hot-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hot-rank { font-size: var(--fs-18); line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; }
.hot-main { display: grid; gap: 3px; min-width: 0; }
.hot-name { font-weight: 600; font-size: var(--fs-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-id { margin-left: 6px; font-size: var(--fs-11); font-weight: 600; color: var(--muted); }
.hot-meta { font-size: var(--fs-12); color: var(--text-2); font-variant-numeric: tabular-nums; }
.hot-meta b { color: var(--text); }
.hot-sensors { display: flex; flex-wrap: wrap; gap: 3px; }
.hs-chip { font-size: var(--fs-11); line-height: 1.3; padding: 0 5px; border-radius: 4px; border: 1px dashed var(--border-strong); color: var(--muted); }
.hs-chip.is-yes { border: 1px solid var(--text-2); color: var(--text); }
.hot-exp { font-size: var(--fs-11); color: var(--muted); }
.hs-attr { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); }
.hs-attr::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 0; }
.hs-attr.attr-pre::before { background: var(--cls-seasonal); }
.hs-attr.attr-storm::before { background: var(--cls-new); }
.hs-attr.attr-storm { color: var(--text); }
.hs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.hs-two > div { padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.hs-two dt { font-size: var(--fs-11); font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.hs-two dd { margin: 0; font-size: var(--fs-12); line-height: 1.45; color: var(--text); }
.hs-legend { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-11); color: var(--text-2); }
.hs-legend li { display: inline-flex; align-items: center; gap: 5px; }
.hs-legend .swatch { width: 10px; height: 10px; }
.hs-note { display: block; margin-top: 4px; font-size: var(--fs-11); color: var(--text-2); line-height: 1.45; }
.hs-row-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hs-pairs { margin-bottom: 6px; }
.hs-hist { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.hs-hist th { font-size: var(--fs-11); font-weight: 600; color: var(--text-2); text-align: left; padding: 0 2px; }
.hs-hist th small { display: block; font-weight: 400; color: var(--muted); }
.hs-hist td { position: relative; height: 34px; padding: 0 4px; vertical-align: bottom; font-size: var(--fs-12); font-weight: 700; color: var(--text); background: linear-gradient(to top, var(--cls-permanent) var(--w, 0%), var(--bg-2) var(--w, 0%)); border-radius: 3px; text-shadow: 0 0 3px var(--bg); }
.hs-hist td.is-na { background: repeating-linear-gradient(45deg, var(--border) 0 2px, transparent 2px 6px); color: var(--muted); font-weight: 400; }
.conf { font-size: var(--fs-12); font-weight: 600; padding: 1px 7px; border-radius: 100px; border: 1px solid var(--border-strong); white-space: nowrap; }
.conf-high { border-color: var(--text); color: var(--text); }
.conf-mid { color: var(--text-2); }
.conf-low { border-color: var(--warn); color: var(--warn); }
.dossier-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.dossier-h { font-size: var(--fs-24); line-height: 1.15; font-weight: 800; margin: 4px 0 2px; scroll-margin-top: 12px; }
.dossier-h:focus { outline: none; }
.dossier-h:focus-visible { outline: 2px solid var(--accent); }
.dossier-sub { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.chip-swipe, .chip-change { margin: 0 0 10px; }
.chip-stack { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #000; border-radius: 8px; overflow: hidden; }
.chip-base { opacity: .55; }
.chip-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.chip-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 3px #000; pointer-events: none; }
.chip-date { position: absolute; top: 6px; font-size: var(--fs-11); font-weight: 600; background: #10243ae0; padding: 1px 6px; border-radius: 4px; pointer-events: none; }
.chip-date-l { left: 6px; } .chip-date-r { right: 6px; }
.chip-range { margin: 6px 0 0; touch-action: manipulation; }
.dossier-zoom { width: 100%; justify-content: center; margin-top: 10px; }

/* ---------------------------------------------------------------- story */
.story-card { position: absolute; z-index: 800; left: 12px; bottom: 12px; width: min(440px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px 16px 12px; box-shadow: var(--shadow); overscroll-behavior: contain; max-height: calc(100% - 32px); overflow-y: auto; }
.story-card:focus { outline: none; }
.story-card:focus-visible { outline: 2px solid var(--accent); }
.story-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.story-count { margin: 0; font-size: var(--fs-12); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.story-title { font-size: var(--fs-18); line-height: 1.3; font-weight: 700; margin: 2px 0 6px; text-wrap: balance; }
.story-lead { margin: 0 0 6px; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--text); }
.story-text { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0 0 8px; max-width: 64ch; text-wrap: pretty; }
.story-nav { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.story-dots { list-style: none; display: flex; gap: 5px; margin: 0 auto; padding: 0; }
.story-dots li { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.story-dots li.on { background: var(--accent); }
.story-exit { margin-left: 0; }

.downloads summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.downloads summary:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  #page-analysis.on-results .workspace { flex: none; }
  #page-analysis.on-results .stage { min-height: 0; overflow: visible; }
  .eb-pick .eb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .wtabs { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 2px; }
  #page-analysis.on-results #view-results { position: relative; inset: auto; }
  .res-map { height: 62vh; flex: none; }
  .eb-side { flex: 1 1 100%; }
  .eb-swap { order: 0; }
  .eb-story { margin-left: 0; }
  .eb-types { flex-wrap: wrap; }
  .eb-select { max-width: 100%; }
  .ledger-row { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
  .ledger-num { font-size: 30px; }
  .ledger-num .is-long { font-size: var(--fs-18); }
  .ev-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ev-dl dd { margin-bottom: 6px; }
  .dc-ref { grid-template-columns: 72px 48px minmax(0, 1fr) 36px; gap: 6px; }
  .story-lead { font-size: 30px; }
}
@media (max-height: 960px) and (min-width: 901px) { .story-lead { font-size: var(--fs-24); } .story-title { font-size: var(--fs-14); } }
@media (pointer: coarse) { .seg-tab, .ev-toggle, .dc-ref { min-height: 40px; } .chip-range { height: 32px; } }
@media (prefers-reduced-motion: reduce) {
  .leaflet-zoom-anim .leaflet-zoom-animated { transition: none !important; }
  .ev-toggle::after { transition: none; }
}
