/* Range Engine page: the Live Record tab (js/range-record.js) and the History tab
   (js/range-history.js), which reuses these classes. Scoped under .re-page .rr */
/* three or four tabs on a phone: keep each label on one line */
@media (max-width: 480px) {
  .re-page .tablist:has(#tab-record:not([hidden])) .tab, .re-page .tablist:has(#tab-history:not([hidden])) .tab { padding: 9px 12px; font-size: 14px; white-space: nowrap; }
  .re-page .tablist:has(#tab-record:not([hidden])):has(#tab-history:not([hidden])) { max-width: 100%; overflow-x: auto; }
  .re-page .tablist:has(#tab-record:not([hidden])):has(#tab-history:not([hidden])) .tab { padding: 8px 7px; font-size: 13px; }
}
.re-page .rr-banner { font-size: 13px; color: var(--t2); border: 1px dashed rgba(232,184,68,0.5); background: rgba(232,184,68,0.06); border-radius: 10px; padding: 10px 14px; margin-bottom: 22px; }
.re-page .rr-banner strong { color: var(--gold); }
.re-page .rr-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 1100px) { .re-page .rr-hero { grid-template-columns: minmax(0, 1fr); } }
.re-page .rr-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); font-weight: 600; }
.re-page .rr-big { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(64px, 10vw, 104px); line-height: 0.95; letter-spacing: -0.04em; color: var(--mint); margin-top: 12px; }
.re-page .rr-big small { font-size: 0.42em; margin-left: 2px; }
.re-page .rr-title { font-size: clamp(19px, 2.4vw, 23px); font-weight: 600; color: var(--t1); margin-top: 10px; text-wrap: balance; }
.re-page .rr-lede { margin-top: 8px; color: var(--t2); }
.re-page .rr-lede b { color: var(--t1); font-weight: 600; }
.re-page .rr-above { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--mint); border: 1px solid rgba(135,212,184,0.35); background: rgba(135,212,184,0.08); border-radius: 999px; padding: 5px 14px; }
.re-page .rr-above.neg { color: var(--t2); border-color: var(--border-hi); background: transparent; }
.re-page .rr-disc { margin-top: 10px; font-size: 12px; color: var(--t3); }
.re-page .rr-ladder { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 14px; }
.re-page .rr-ladder h4 { font-size: 16px; font-weight: 700; color: var(--t1); margin: 0; }
.re-page .rr-ladder .sub { font-size: 13px; color: var(--t2); margin-top: 4px; }
.re-page .rr-rung { display: grid; grid-template-columns: 58px minmax(0, 1fr) 70px; gap: 12px; align-items: center; width: 100%; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--border); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.re-page .rr-rung:last-of-type { border-bottom: 0; }
.re-page .rr-rung:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
.re-page .rr-tier { font-family: var(--mono); font-size: 13px; color: var(--t2); border: 1px solid var(--border-hi); border-radius: 6px; padding: 3px 0; text-align: center; }
.re-page .rr-rung[aria-pressed="true"] .rr-tier { color: #0b0c10; background: var(--mint); border-color: var(--mint); font-weight: 700; }
.re-page .rr-val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 500; text-align: right; color: var(--t1); }
.re-page .rr-meta { display: block; font-size: 11px; color: var(--t3); margin-top: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.re-page .rr-bar { position: relative; display: block; height: 8px; background: var(--elevated); border-radius: 4px; }
.re-page .rr-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mint); border-radius: 4px; }
.re-page .rr-bar .tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--t1); border-radius: 1px; }
.re-page .rr-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: var(--t3); margin-top: 8px; }
.re-page .rr-legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.re-page .rr-legend .lf { width: 14px; height: 6px; background: var(--mint); border-radius: 3px; }
.re-page .rr-legend .lt { width: 2px; height: 12px; background: var(--t1); }
.re-page .rr-filters { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 12px 0; margin: 28px 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); position: sticky; top: 64px; background: var(--bg); z-index: 5; }
@media (max-width: 760px) { .re-page .rr-filters { position: static; } }   /* three rows on a phone: too tall to pin */
.re-page .rr-fgroup { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.re-page .rr-fgroup .lbl { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t3); margin-right: 4px; }
.re-page .rr-chip { font: inherit; font-size: 13px; color: var(--t2); background: transparent; border: 1px solid var(--border-hi); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.re-page .rr-chip:hover { color: var(--t1); }
.re-page .rr-chip[aria-pressed="true"] { color: #0b0c10; background: var(--mint); border-color: var(--mint); font-weight: 600; }
.re-page .rr-chip.quiet { border-color: transparent; font-size: 12px; color: var(--t3); text-decoration: underline; text-underline-offset: 3px; padding-inline: 6px; }
.re-page .rr-chip.quiet[aria-pressed="true"] { background: transparent; color: var(--t1); }
.re-page .rr-chip:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.re-page .rr-grid { display: grid; grid-template-columns: 46px repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.re-page .rr-grid .ch { font-size: 11px; letter-spacing: 0.12em; color: var(--t3); text-transform: uppercase; padding: 0 4px; }
.re-page .rr-grid .rh { font-family: var(--mono); font-size: 14px; color: var(--t1); align-self: center; }
.re-page .rr-cell { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 7px; min-width: 0; }
.re-page .rr-cell .r { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 500; color: var(--t1); }
.re-page .rr-cell .d { font-size: 11px; color: var(--t2); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.re-page .rr-cell.top { border-color: rgba(135,212,184,0.35); background: linear-gradient(rgba(135,212,184,0.08), rgba(135,212,184,0.08)), var(--card); }
.re-page .rr-cell.top .r { color: var(--mint); }
.re-page .rr-cell .flag { position: absolute; top: 10px; right: 10px; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); }
.re-page .rr-cell.none { background: transparent; border-style: dashed; color: var(--t3); font-size: 12px; align-content: center; }
@media (max-width: 560px) { .re-page .rr-grid { grid-template-columns: 34px repeat(3, minmax(0, 1fr)); gap: 6px; } .re-page .rr-cell { padding: 9px; } .re-page .rr-cell .r { font-size: 16px; } .re-page .rr-cell .flag { display: none; } }
.re-page .rr-chart { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-top: 16px; }
.re-page .rr-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.re-page .rr-chart text { font-family: var(--mono); font-size: 11px; fill: var(--t3); }
.re-page .rr-tip { position: absolute; pointer-events: none; background: var(--elevated); border: 1px solid var(--border-hi); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--t1); line-height: 1.5; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.re-page .rr-tip .k { color: var(--t3); }
.re-page .rr-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.re-page .rr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.re-page .rr-table th { font-weight: 600; color: var(--t3); text-align: left; padding: 9px 12px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
.re-page .rr-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--t2); white-space: nowrap; }
.re-page .rr-table tr:last-child td { border-bottom: 0; }
.re-page .rr-table td.t1 { color: var(--t1); }
.re-page .rr-table.num td:not(:first-child), .re-page .rr-table.num th:not(:first-child) { text-align: right; }
.re-page .rr-call { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.re-page .rr-call.up { color: var(--green); background: rgba(63,187,106,0.10); }
.re-page .rr-call.dn { color: var(--red); background: rgba(220,68,68,0.10); }
.re-page .rr-out.hit { color: var(--green); }
.re-page .rr-out.miss { color: var(--red); }
.re-page .rr-out span { color: var(--t2); font-family: var(--ff); margin-left: 6px; }
/* the notes flow down two columns, so a short note is followed straight away by the next
   one instead of leaving a hole beside a long one (a grid lined up the rows) */
.re-page .rr-fine { columns: 2; column-gap: 28px; margin-top: 14px; }
.re-page .rr-fine > div { break-inside: avoid; padding-bottom: 18px; }
.re-page .rr-fine h4 { font-size: 14px; font-weight: 700; color: var(--t1); margin: 0 0 4px; }
.re-page .rr-fine p { font-size: 14px; }
@media (max-width: 760px) { .re-page .rr-fine { columns: 1; } }
.re-page .rr-gaps { margin-top: 10px; font-size: 13px; color: var(--t3); }
.re-page .rr-key { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.re-page .rr-empty { color: var(--t2); }
.re-page .rr-rows { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; }
.re-page .rr-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.re-page .rr-row:last-child { border-bottom: 0; }
.re-page .rr-row .lbl { font-size: 13px; color: var(--t1); }
.re-page .rr-row .lbl .sub { display: block; font-size: 11px; color: var(--t3); margin-top: 1px; }
.re-page .rr-row .rr-val { font-size: 16px; }
@media (max-width: 560px) { .re-page .rr-row { grid-template-columns: 92px minmax(0, 1fr) 54px; gap: 8px; } }
/* History tab: the hypothetical-results statement sits under the headline number */
.re-page .rr-hypo { margin-top: 16px; border: 1px solid var(--border-hi); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--t2); line-height: 1.6; }
.re-page .rr-hypo b { display: block; color: var(--t1); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.re-page .rr-note { margin-top: 10px; font-size: 13px; color: var(--t3); }
/* History tab, design A (js/range-history.js): one color per probability tier, set inline from TIERS */
.re-page #his-headline .rh-h2, .re-page #rec-headline .rh-h2 { margin-top: 10px; }
.re-page .rh-sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: middle; flex: none; }
.re-page .rh-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-top: 20px; }
.re-page .rh-tier { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.re-page .rh-k { display: flex; align-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--t2); }
.re-page .rh-k .rh-sw { margin-right: 8px; }
.re-page .rh-v { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.re-page .rh-v small { font-size: 20px; font-weight: 600; margin-left: 3px; letter-spacing: 0; }
.re-page .rh-gauge { position: relative; height: 8px; background: var(--elevated); border-radius: 4px; margin-top: 4px; }
.re-page .rh-gauge .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.re-page .rh-gauge .tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--t1); border-radius: 1px; }
.re-page .rh-st { font-size: 14px; color: var(--t2); }
.re-page .rh-st b { color: var(--t1); font-weight: 600; }
.re-page .rh-st b.below { color: var(--down); }
.re-page .rh-n { font-size: 12.5px; color: var(--t3); line-height: 1.5; }
.re-page .rh-hypo { line-height: 1.6; }
.re-page .rh-hypo strong { color: var(--t1); }
/* tier tables */
.re-page .rh-tt th, .re-page .rh-tt td { vertical-align: top; }
.re-page .rh-tt thead th { color: var(--t2); }
.re-page .rh-tt th[scope="row"] { font-family: var(--ff); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--t1); padding: 12px; }
.re-page .rh-tt th[scope="row"] small { display: block; font-size: 12.5px; font-weight: 400; color: var(--t3); }
.re-page .rh-tt tr:last-child th { border-bottom: 0; }
.re-page .rh-tt td { padding: 12px; }
.re-page .rh-tt td .h { font-family: var(--ff); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.re-page .rh-tt td .d { margin-left: 8px; font-size: 12px; color: var(--t2); }
.re-page .rh-tt td .d.below { color: var(--down); }
.re-page .rh-tt td .n { display: block; font-family: var(--ff); font-size: 12px; color: var(--t3); }
/* line charts */
.re-page .rh-chart { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 12px; margin-top: 16px; }
.re-page .rh-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--t2); margin-bottom: 14px; }
.re-page .rh-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.re-page .rh-legend i.dash { height: 0; border-top: 2px dashed var(--t3); background: none; }
.re-page .rh-plot { position: relative; margin: 0 12px 0 44px; }
.re-page .rh-plot.ends, .re-page .rh-axis.ends { margin-right: 56px; }
.re-page .rh-plot .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.re-page .rh-plot .yl { position: absolute; left: -44px; width: 36px; text-align: right; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--t3); }
.re-page .rh-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.re-page .rh-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid; box-sizing: border-box; pointer-events: none; }
.re-page .rh-end { position: absolute; left: calc(100% + 10px); transform: translateY(-50%); font-family: var(--mono); font-size: 12px; font-weight: 600; pointer-events: none; }
.re-page .rh-hot { position: absolute; top: 0; bottom: 0; }
.re-page .rh-axis { position: relative; height: 34px; margin: 0 12px 0 44px; }
.re-page .rh-axis span { position: absolute; top: 10px; transform: translateX(-50%); text-align: center; font-family: var(--mono); font-size: 11px; color: var(--t2); line-height: 1.3; white-space: nowrap; }
.re-page .rh-axis small { display: block; font-size: 10px; color: var(--t3); }
.re-page .rh-bands { display: flex; margin: 10px 12px 0 44px; height: 26px; border-radius: 6px; overflow: hidden; font-size: 11px; }
.re-page .rh-bands span { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; color: var(--t2); background: var(--surface); }
.re-page .rh-bands span:nth-child(even) { background: var(--elevated); }
/* stated vs result: chart and table side by side */
.re-page .rh-cal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 16px; }
@media (min-width: 1200px) { .re-page .rh-cal { grid-template-columns: minmax(0, 1fr) auto; } }   /* the table at its natural width, the chart takes the rest */
.re-page .rh-cal > .rr-chart, .re-page .rh-cal > .rr-table-wrap { margin-top: 0; }
@media (max-width: 560px) {
  .re-page .rh-v { font-size: 40px; }
  .re-page .rh-chart { padding: 14px 12px 10px; }
  .re-page .rh-plot, .re-page .rh-axis, .re-page .rh-bands { margin-left: 36px; }
  .re-page .rh-plot .yl { left: -36px; width: 30px; }
  .re-page .rh-axis span:nth-child(even) { display: none; }   /* every other year / hour label */
}
/* By call strength (both tabs): one row per band of the stated probability */
.re-page .rh-bt th, .re-page .rh-bt td { vertical-align: middle; white-space: nowrap; }
.re-page .rh-bt th[scope="row"] { font-family: var(--mono); font-size: 14px; }
.re-page .rh-bt .rh-gauge { display: block; width: 140px; max-width: 100%; height: 6px; margin-top: 8px; }
.re-page .rh-bt .rh-gauge .tick { top: -3px; bottom: -3px; }
.re-page .rh-bt td .d { margin-left: 0; }
.re-page .rh-bt td .n { display: inline; }
/* History "Stated vs result": labels at reading size, the plot stretched to the table's height */
.re-page .rh-cal { align-items: stretch; }
.re-page .rh-cal > .rr-chart { display: flex; flex-direction: column; padding: 16px 16px 12px; }
.re-page .rh-cal-box { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-height: 360px; }
.re-page .rh-cal-plot { position: relative; flex: 1 1 auto; min-height: 290px; margin: 8px 10px 30px 40px; }
.re-page .rh-cal-plot .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.re-page .rh-cal-plot .yl { position: absolute; left: -40px; width: 32px; text-align: right; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--t3); }
.re-page .rh-cal-plot .xl { position: absolute; top: calc(100% + 8px); transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--t3); }
.re-page .rr-chart .rh-cal-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.re-page .rh-cal-plot svg line { stroke: var(--t3); stroke-width: 1.5; stroke-dasharray: 6 5; }
.re-page .rh-cal-plot .ml { position: absolute; transform: translate(10px, 8px); font-family: var(--mono); font-size: 10.5px; color: var(--t3); white-space: nowrap; }
.re-page .rh-cal-plot .ci { position: absolute; width: 2px; margin-left: -1px; border-radius: 1px; opacity: .6; }
.re-page .rh-cal-plot .dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid var(--surface); box-sizing: border-box; }
.re-page .rh-cal-plot .hot { position: absolute; top: 0; bottom: 0; }
.re-page .rh-cal-axes { font-size: 12px; color: var(--t2); text-align: center; }
