@import url('./race-validation-view.css');
.rehearsal { --rh-line: color-mix(in srgb, var(--mountain) 16%, var(--paper)); color: var(--ink); margin: 28px 0; font-size: 15px; }
.rehearsal *, .rh-coach-reference * { box-sizing: border-box; }
.rehearsal button, .rehearsal input, .rehearsal select, .rehearsal textarea { font: inherit; }
.rehearsal button, .rehearsal a { -webkit-tap-highlight-color: transparent; }
.rehearsal button:not(:disabled), .rehearsal summary, .rehearsal select { cursor: pointer; }
.rehearsal button:disabled { opacity: .48; cursor: default; }
.rehearsal :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--pending); outline-offset: 3px; }
.rehearsal button:active:not(:disabled), .rehearsal .rh-primary:active { transform: translateY(1px); }
.rh-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 24px; }
.rh-heading h2 { font-size: 34px; line-height: 1.28; letter-spacing: 0; margin: 4px 0 12px; }
.rh-heading p:last-child { color: var(--mountain); line-height: 1.7; margin: 0; }
.rh-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 750; color: var(--meadow); }
.rh-pass-mark { display: flex; flex-direction: column; justify-content: center; min-width: 145px; min-height: 102px; padding: 16px 18px; border: 2px solid var(--meadow); color: var(--meadow); font-size: 17px; line-height: 1.05; font-weight: 900; transform: rotate(-5deg); letter-spacing: 1px; text-align: center; }
.rh-pass-mark span { display: block; font-size: 11px; font-weight: 600; line-height: 1.4; margin-top: 8px; letter-spacing: 0; }
.rh-context { border-top: 1px solid var(--rh-line); border-bottom: 1px solid var(--rh-line); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.rh-context > div { display: grid; gap: 5px; }
.rh-context-label { font-size: 12px; color: var(--mountain); }
.rh-context strong { font-size: 19px; }
.rh-context small { color: var(--mountain); font-size: 12px; }
.rh-context dl { display: flex; gap: 32px; margin: 0; }
.rh-context dl > div { min-width: 65px; }
.rh-context dt { margin: 0 0 6px; color: var(--mountain); font-size: 12px; }
.rh-context dd { margin: 0; font-weight: 800; font-size: 21px; }
.rh-context dd.rh-confidence { font-size: 16px; line-height: 1.8; }
.rh-context dd small { font-weight: 500; }
.rh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
.rh-main, .rh-side { min-width: 0; }
.rh-stage { overflow: hidden; border: 1px solid var(--rh-line); border-radius: 8px; background: var(--surface); }
.rh-stage-top { background: var(--forest-deep); color: var(--surface); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; }
.rh-stage-top > span { line-height: 1.6; }
.rh-stage-top strong { font-size: 20px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rh-stage canvas { display: block; width: 100%; height: 340px; }
.rh-stage-caption { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; color: var(--mountain); font-size: 12px; border-bottom: 1px solid var(--rh-line); }
.rh-stage-caption span:last-child { flex-shrink: 0; }
.rh-playback { display: flex; gap: 12px; align-items: center; padding: 8px 12px; }
.rh-play, .rh-secondary, .rh-primary, .rh-text-button, .rh-icon-button { border-radius: 6px; border: 1px solid var(--rh-line); min-height: 44px; padding: 9px 13px; text-decoration: none; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; gap: 6px; line-height: 1.4; }
.rh-play { background: var(--forest-deep); color: var(--surface); min-width: 78px; font-size: 13px !important; }
.rh-secondary { background: var(--surface); color: var(--mountain); font-size: 13px !important; }
.rh-primary { background: var(--meadow); color: var(--surface); border-color: var(--meadow); width: 100%; font-size: 15px !important; min-height: 50px; }
.rh-primary:hover { background: var(--forest-deep); }
.rh-text-button { background: transparent; border-color: transparent; color: var(--pending); font-size: 13px !important; padding-left: 0; padding-right: 0; }
.rh-icon-button { background: transparent; color: var(--mountain); width: 44px; min-width: 44px; padding: 8px; font-size: 22px !important; align-self: end; }
.rh-seek { flex: 1; min-width: 30px; display: flex; }
.rh-seek input { width: 100%; height: 44px; margin: 0; accent-color: var(--meadow); }
.rh-speed select { min-height: 44px; border: 1px solid var(--rh-line); background: var(--surface); color: var(--mountain); border-radius: 6px; padding: 8px; font-size: 13px; }
.rh-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.rh-section-head h3 { margin: 0; font-size: 18px; line-height: 1.45; }
.rh-section-head > small { font-size: 12px; color: var(--mountain); flex-shrink: 0; }
.rh-setup { padding: 20px; border: 1px solid var(--rh-line); border-radius: 8px; background: var(--surface); }
.rh-form-stamp { font-size: 9px; padding: 7px; border: 1px solid var(--stamp); color: var(--stamp); font-weight: 750; transform: rotate(-6deg); }
.rh-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rh-field { display: grid; gap: 6px; min-width: 0; margin: 0 0 13px; font-size: 13px; }
.rh-field > span { color: var(--mountain); font-weight: 650; }
.rh-field > small, .rh-submit-area > small { font-size: 12px; color: var(--mountain); font-weight: 400; line-height: 1.55; }
.rh-field :is(input, select, textarea) { min-width: 0; width: 100%; max-width: 100%; border: 1px solid var(--rh-line); border-radius: 6px; padding: 10px; background: var(--paper); color: var(--ink); min-height: 44px; font-size: 14px; }
.rh-field input[type=file] { font-size: 12px; padding: 8px; }
.rh-field textarea { resize: vertical; min-height: 70px; }
.rh-input-unit { display: flex; align-items: center; min-width: 0; background: var(--paper); border: 1px solid var(--rh-line); border-radius: 6px; overflow: hidden; }
.rh-input-unit > input { border: 0; width: 100%; background: transparent; border-radius: 0; }
.rh-input-unit > small { padding-right: 10px; color: var(--mountain); font-size: 12px; flex-shrink: 0; }
.rh-input-unit:focus-within { outline: 2px solid var(--pending); outline-offset: 2px; }
.rh-input-unit > input:focus-visible { outline: 0; }
.rh-setup-detail { border-top: 1px solid var(--rh-line); padding-top: 4px; }
.rh-setup-detail > summary { font-size: 13px; font-weight: 750; color: var(--mountain); padding: 13px 0; min-height: 44px; }
.rh-setup-detail[open] > summary { padding-bottom: 16px; }
.rh-muted { color: var(--mountain); font-size: 12px; line-height: 1.65; }
.rh-product { background: var(--paper-mist); border: 1px solid var(--rh-line); border-radius: 6px; padding: 10px; margin: 0 0 12px; }
.rh-product-head { display: flex; gap: 8px; }
.rh-product-head .rh-field { flex: 1; }
.rh-product-head .rh-icon-button { margin-bottom: 13px; }
.rh-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 8px; }
.rh-product-grid .rh-field { font-size: 11px; }
.rh-product-grid .rh-input-unit > input { padding: 9px 5px; }
.rh-product-grid .rh-input-unit > small { padding-right: 5px; font-size: 11px; }
.rh-product-bottom { display: grid; gap: 8px; font-size: 12px; }
.rh-product-bottom > label { display: flex; align-items: center; gap: 7px; min-height: 32px; }
.rh-product-bottom select { padding: 8px; min-height: 44px; border: 1px solid var(--rh-line); border-radius: 6px; color: var(--mountain); background: var(--surface); }
.rh-product-bottom input[type=checkbox], .rh-checks input, .rh-toggle input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--meadow); }
.rh-station, .rh-fuel-event { border-bottom: 1px solid var(--rh-line); padding: 8px 0 12px; margin-bottom: 6px; }
.rh-row-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: end; }
.rh-row-fields .rh-icon-button { margin-bottom: 13px; }
.rh-checks { display: flex; gap: 4px 10px; flex-wrap: wrap; }
.rh-checks label { display: flex; align-items: center; gap: 5px; font-size: 12px; min-height: 34px; }
.rh-fuel-event .rh-row-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rh-fuel-event .rh-icon-button { grid-column: 2; justify-self: end; }
.rh-toggle { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.6; margin: 8px 0; min-height: 44px; }
.rh-submit-area { display: grid; gap: 9px; margin-top: 18px; }
.rh-progress { margin: 16px 0; padding: 15px 16px; border: 1px solid var(--rh-line); background: var(--paper-mist); border-radius: 6px; }
.rh-progress > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 10px; }
.rh-progress > div span { font-size: 12px; flex-shrink: 0; color: var(--mountain); }
.rh-progress.is-query-retrying > div { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
.rh-progress.is-query-retrying > div span { min-width:0; line-height:1.7; overflow-wrap:anywhere; }
.rh-progress progress { width: 100%; height: 6px; accent-color: var(--meadow); border: 0; display: block; }
.rh-progress p { margin: 8px 0 0; font-size: 12px; color: var(--mountain); }
.rh-progress .rh-text-button { min-height: 34px; padding-top: 6px; padding-bottom: 0; }
.rh-results { margin: 25px 0 0; scroll-margin-top: 160px; }
.rh-form-error { margin: 0; padding: 10px 12px; border-left: 3px solid var(--stamp); color: var(--alert-deep); background: color-mix(in srgb, var(--stamp) 10%, var(--paper)); font-size: 13px; line-height: 1.7; }
.rh-completion-banner { padding: 11px 13px; margin: 0 0 12px; background: color-mix(in srgb, var(--meadow) 9%, var(--paper)); border-left: 3px solid var(--meadow); color: var(--forest-deep); font-size: 13px; line-height: 1.7; font-weight: 650; }
.rh-interim-badge { border: 1px solid var(--pending); border-radius: 4px; padding: 2px 6px; background: var(--mist); color: var(--pending); font-size: 12px; line-height: 1.5; font-weight: 700; }
.rh-interim-note, .rh-goal-plan-note { border-left: 2px solid var(--pending); padding-left: 10px; color: var(--pending); font-size: 12px; line-height: 1.7; margin: 9px 0; }
.rh-goal-plan-note { border-color: var(--sun); color: var(--sun-ink); }
.rh-result-meta { display: grid; justify-items: end; gap: 5px; flex-shrink: 0; }
.rh-model-badge { border: 1px solid var(--sun); border-radius: 4px; padding: 2px 6px; color: var(--sun-ink); background: var(--paper-mist); font-size: 12px; line-height: 1.5; font-weight: 700; }
.rh-result-conditions { padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--rh-line); border-radius: 6px; background: var(--paper-mist); }
.rh-result-conditions > strong { display: block; font-size: 12px; font-weight: 750; margin-bottom: 7px; }
.rh-result-conditions dl { display: flex; flex-wrap: wrap; gap: 6px 17px; margin: 0; font-size: 12px; line-height: 1.6; }
.rh-result-conditions dl > div { display: flex; gap: 6px; min-width: 0; max-width: 100%; }
.rh-result-conditions dt { color: var(--mountain); flex-shrink: 0; }
.rh-result-conditions dd { margin: 0; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.rh-condition-change { margin: 8px 0; padding-left: 10px; border-left: 2px solid var(--sun); font-size: 12px; line-height: 1.7; color: var(--sun-ink); overflow-wrap: anywhere; }
.rh-model-update { display: grid; gap: 5px; margin: 10px 0; padding: 11px 13px; background: color-mix(in srgb, var(--sun) 12%, var(--paper)); border: 1px solid var(--sun); border-radius: 6px; color: var(--sun-ink); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.rh-model-update > strong { font-weight: 750; }
.rh-priority-note { color: var(--mountain); font-size: 12px; line-height: 1.6; margin: 10px 0 13px; }
.rh-finish-detail.rh-dnf-stop { color: var(--alert-deep); font-size: 12px; }
.rh-validity-note { color: var(--ink); padding: 11px 13px; margin: 10px 0 14px; border: 1px solid var(--rh-line); border-radius: 6px; background: var(--paper-mist); font-size: 13px; line-height: 1.75; }
.rh-strategy .rh-case-label { font-size: 12px; line-height: 1.6; }
.rh-case-note { display: grid; gap: 4px; margin-top: 7px; color: var(--mountain); font-size: 12px; line-height: 1.65; font-weight: 400; overflow-wrap: anywhere; }
.rh-case-count { font-variant-numeric: tabular-nums; }
.rh-strategy .rh-pace { margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--rh-line); }
.rh-strategy-stop { color: var(--alert-deep); font-size: 12px; line-height: 1.6; }
.rh-empty { padding: 30px 12px; text-align: center; border-bottom: 1px solid var(--rh-line); }
.rh-empty > strong { font-size: 20px; }
.rh-empty > p { font-size: 14px; color: var(--mountain); line-height: 1.7; margin: 10px auto 20px; max-width: 330px; }
.rh-legend { display: flex; justify-content: center; gap: 20px; font-size: 12px; font-weight: 700; }
.rh-stable { --rh-strategy: var(--meadow); }
.rh-goal { --rh-strategy: var(--pending); }
.rh-attack { --rh-strategy: var(--stamp); }
.rh-legend span { color: var(--rh-strategy); }
.rh-strategy-card { display: flex; flex-direction: column; min-width: 0; }
.rh-strategy-card > .rh-strategy { flex: 1; }
.rh-strategy-card.has-risk > .rh-strategy { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.rh-risk-more { width: 100%; min-height: 44px; padding: 8px 5px; border: 1px solid var(--rh-line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--paper-mist); font-size: 12px; line-height: 1.6; }
.rh-risk-summary, .rh-risk-unavailable { display: grid; gap: 5px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rh-line); font-size: 12px; line-height: 1.65; font-weight: 400; color: var(--mountain); overflow-wrap: anywhere; }
.rh-risk-title { color: var(--ink); font-weight: 750; }
.rh-risk-score { color: var(--ink); font-size: 20px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.rh-risk-score > small { font-size: 12px; font-weight: 500; margin-left: 2px; }
.rh-risk-band { font-weight: 700; }
.rh-risk-summary[data-risk-band=low] .rh-risk-band { color: var(--meadow); }
.rh-risk-summary[data-risk-band=moderate] .rh-risk-band, .rh-risk-summary[data-risk-band=review_required] .rh-risk-band { color: var(--sun-ink); }
.rh-risk-summary:is([data-risk-band=high], [data-risk-band=very_high], [data-risk-band=constraint_unmet]) .rh-risk-band { color: var(--alert-deep); }
.rh-risk-card-flag { color: var(--alert-deep); border-left: 2px solid var(--stamp); padding-left: 7px; font-weight: 650; }
.rh-risk-disclaimer { color: var(--ink); }
.rh-risk-review { margin: 18px 0; }
.rh-risk-flags { padding: 12px 14px; margin-bottom: 12px; border-left: 3px solid var(--stamp); background: color-mix(in srgb, var(--stamp) 9%, var(--paper)); color: var(--alert-deep); font-size: 13px; line-height: 1.7; }
.rh-risk-flags > ul { padding-left: 18px; margin: 7px 0 0; }
.rh-risk-flags li > span { display: block; color: var(--mountain); font-size: 12px; }
.rh-risk-details { border: 1px solid var(--rh-line); border-radius: 6px; padding: 12px 14px; scroll-margin-top: 160px; }
.rh-risk-details > summary { min-height: 44px; display: list-item; align-content: center; font-weight: 750; font-size: 14px; line-height: 1.7; }
.rh-risk-factors { list-style: none; padding: 0; margin: 12px 0; }
.rh-risk-factors > li { padding: 14px 0; border-top: 1px solid var(--rh-line); }
.rh-risk-factor-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.65; }
.rh-risk-factor-head > span { flex-shrink: 0; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rh-risk-factor-meta { color: var(--mountain); font-size: 12px; line-height: 1.7; margin: 6px 0; }
.rh-risk-factor-note { font-size: 13px; line-height: 1.75; margin: 6px 0; overflow-wrap: anywhere; }
.rh-risk-raw { margin-top: 8px; font-size: 12px; line-height: 1.7; }
.rh-risk-raw > summary { min-height: 36px; align-content: center; color: var(--pending); }
.rh-risk-raw dl { display: grid; gap: 6px; margin: 10px 0; }
.rh-risk-raw dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; }
.rh-risk-raw dt { color: var(--mountain); overflow-wrap: anywhere; }
.rh-risk-raw dd { margin: 0; overflow-wrap: anywhere; }
.rh-risk-formula, .rh-risk-sources { font-size: 12px; line-height: 1.75; color: var(--mountain); overflow-wrap: anywhere; }
.rh-risk-caveats { margin: 13px 0; padding-left: 18px; color: var(--mountain); font-size: 12px; line-height: 1.75; }
.rh-strategies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.rh-strategy { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; padding: 16px 11px 13px; text-align: left; background: var(--surface); border: 1px solid var(--rh-line); border-top: 3px solid var(--rh-strategy); border-radius: 6px; color: var(--ink); transition: background-color .16s; }
.rh-strategy.is-selected { outline: 2px solid var(--rh-strategy); outline-offset: 1px; background: color-mix(in srgb, var(--rh-strategy) 4%, var(--surface)); }
.rh-strategy-title { color: var(--rh-strategy); font-size: 12px; font-weight: 800; }
.rh-finish { font-size: 23px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 4px; }
.rh-finish-detail { font-size: 10px; line-height: 1.6; color: var(--mountain); }
.rh-strategy dl { margin: 5px 0 1px; display: grid; gap: 11px; }
.rh-strategy dl > div { display: grid; gap: 4px; }
.rh-strategy dt { font-size: 11px; color: var(--mountain); }
.rh-strategy dd { margin: 0; font-size: 23px; line-height: 1.1; font-weight: 850; font-variant-numeric: tabular-nums; }
.rh-strategy dd small { font-size: 12px; margin-left: 1px; font-weight: 500; }
.rh-risk { font-size: 11px; line-height: 1.5; padding-top: 9px; margin-top: 3px; border-top: 1px solid var(--rh-line); font-weight: 700; }
.rh-pace { font-size: 10px; line-height: 1.6; color: var(--mountain); }
.rh-result-footnote { color: var(--mountain); font-size: 11px; line-height: 1.65; margin: 12px 0 0; }
.rh-insight { border-top: 1px solid var(--rh-line); margin-top: 24px; padding-top: 20px; }
.rh-insight > p { font-size: 14px; line-height: 1.75; color: var(--mountain); }
.rh-insight .rh-section-head > button { flex-shrink: 0; }
.rh-telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 12px; }
.rh-telemetry > div { display: grid; gap: 5px; }
.rh-telemetry span { font-size: 11px; color: var(--mountain); }
.rh-telemetry strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.rh-telemetry small { font-size: 11px; font-weight: 400; }
.rh-chart-legend { display: flex; gap: 15px; margin-top: 12px; color: var(--mountain); font-size: 11px; }
.rh-chart { display: block; width: 100%; height: 118px; }
.rh-explanations { padding-left: 18px; margin: 16px 0; color: var(--mountain); font-size: 13px; line-height: 1.8; }
.rh-explanations li + li { margin-top: 7px; }
.rh-warning { color: var(--sun-ink) !important; background: color-mix(in srgb, var(--sun) 14%, var(--surface)); border-radius: 6px; padding: 9px 11px; font-size: 12px !important; }
.rh-fuel-plan, .rh-dnf-detail, .rh-method { border-top: 1px solid var(--rh-line); margin-top: 14px; }
:is(.rh-fuel-plan, .rh-dnf-detail, .rh-method) > summary { font-size: 13px; line-height: 1.5; font-weight: 650; color: var(--mountain); padding: 13px 0; min-height: 44px; }
:is(.rh-fuel-plan, .rh-dnf-detail, .rh-method) p { color: var(--mountain); font-size: 12px; line-height: 1.8; }
.rh-fuel-plan ol { list-style: none; padding: 0; margin: 0 0 14px; }
.rh-fuel-plan li { display: flex; gap: 16px; align-items: center; padding: 10px 0; }
.rh-fuel-plan time { color: var(--pending); font-size: 12px; font-variant-numeric: tabular-nums; }
.rh-fuel-plan li > span { display: grid; gap: 3px; }
.rh-fuel-plan strong { font-size: 13px; }
.rh-fuel-plan small { font-size: 12px; color: var(--mountain); }
.rh-branch { margin-top: 24px; padding: 18px; border-left: 3px solid var(--stamp); background: color-mix(in srgb, var(--stamp) 5%, var(--surface)); }
.rh-branch > p { color: var(--mountain); font-size: 13px; line-height: 1.75; }
.rh-branch .rh-section-head > span { font-size: 13px; color: var(--stamp); font-weight: 750; flex-shrink: 0; }
.rh-branch .rh-kicker { color: var(--stamp); }
.rh-method { margin-top: 24px; }
.rh-history { margin-top: 22px; }
.rh-history .rh-section-head { margin-bottom: 4px; }
.rh-history h3 { font-size: 15px; }
.rh-history-row { width: 100%; border: 0; border-bottom: 1px solid var(--rh-line); background: transparent; padding: 13px 0; min-height: 62px; text-align: left; color: var(--mountain); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rh-history-row > span:first-child { display: grid; gap: 6px; }
.rh-history-row strong { font-size: 13px; font-weight: 650; }
.rh-history-row small { font-size: 12px; }
.rh-notice { border-left: 3px solid var(--pending); padding: 13px 16px; background: var(--mist); color: var(--mountain); margin: 0 0 18px; font-size: 13px; line-height: 1.7; }
.rh-notice[data-tone=error] { background: color-mix(in srgb, var(--stamp) 12%, var(--paper)); border-color: var(--stamp); color: var(--alert-deep); }
.rh-notice[data-tone=stale] { background: color-mix(in srgb, var(--sun) 15%, var(--paper)); border-color: var(--sun); color: var(--sun-ink); }
.rh-skeleton { display: block; height: 25px; width: 140px; background: var(--mist); }
.rh-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }
.rehearsal-launch { color: var(--meadow); }
.rh-coach-reference { display: grid; gap: 8px; padding: 18px 20px; border-left: 3px solid var(--meadow); margin: 20px 0; background: var(--paper-mist); color: var(--ink); }
.rh-coach-reference > span { color: var(--meadow); font-size: 12px; font-weight: 700; }
.rh-coach-reference strong { font-size: 17px; }
.rh-coach-reference p { font-size: 13px; line-height: 1.7; color: var(--mountain); margin: 0; }
@media (max-width: 1000px) {
  .rh-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
  .rh-context dl { gap: 20px; }
  .rh-finish { font-size: 20px; }
  .rh-setup { padding: 16px; }
}
@media (max-width: 800px) {
  .rh-layout { grid-template-columns: minmax(0, 1fr); }
  .rh-side { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rh-setup { padding: 20px; }
  .rh-heading h2 { font-size: 30px; }
  .rh-context dl { gap: 28px; }
  .rh-finish { font-size: 24px; }
  .rh-strategy { padding: 16px; }
  .rh-finish-detail, .rh-pace, .rh-strategy dt, .rh-risk { font-size: 12px; }
}
@media (max-width: 520px) {
  .rehearsal { margin-top: 22px; }
  .rh-heading { gap: 12px; align-items: flex-start; margin-bottom: 20px; }
  .rh-heading h2 { font-size: 26px; line-height: 1.35; }
  .rh-heading p:last-child { font-size: 13px; max-width: 235px; }
  .rh-pass-mark { min-width: 90px; min-height: 76px; padding: 12px 6px; font-size: 12px; margin-top: 5px; }
  .rh-pass-mark span { font-size: 9px; margin-top: 6px; }
  .rh-context { display: block; padding: 16px 0; margin-bottom: 18px; }
  .rh-context strong { font-size: 17px; }
  .rh-context dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
  .rh-context dd { font-size: 21px; }
  .rh-context dt { font-size: 12px; }
  .rh-stage-top { padding: 11px 13px; gap: 10px; }
  .rh-stage-top > span { font-size: 11px; max-width: 210px; }
  .rh-stage-top strong { font-size: 17px; }
  .rh-stage canvas { height: 290px; }
  .rh-stage-caption { padding: 10px 12px; font-size: 11px; gap: 10px; }
  .rh-playback { gap: 8px; padding: 7px 9px; }
  .rh-play { min-width: 72px; padding: 9px; }
  .rh-speed select { padding: 8px 4px; }
  .rh-results { margin-top: 22px; }
  .rh-results .rh-section-head h3 { font-size: 16px; }
  .rh-strategies { gap: 7px; }
  .rh-strategy { padding: 12px 8px; gap: 7px; }
  .rh-strategy-title { font-size: 11px; min-height: 31px; line-height: 1.5; }
  .rh-finish { font-size: 19px; letter-spacing: 0; }
  .rh-finish-detail { font-size: 10px; min-height: 32px; }
  .rh-strategy dt { font-size: 10px; line-height: 1.5; }
  .rh-strategy dd { font-size: 23px; }
  .rh-risk { font-size: 10px; }
  .rh-pace { font-size: 10px; }
  .rh-result-footnote { font-size: 11px; }
  .rh-insight .rh-section-head { align-items: flex-start; gap: 9px; }
  .rh-insight .rh-section-head h3 { font-size: 17px; }
  .rh-insight .rh-secondary { padding: 8px; font-size: 12px !important; }
  .rh-telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .rh-telemetry span { font-size: 12px; }
  .rh-telemetry strong { font-size: 22px; }
  .rh-branch { padding: 15px 13px; }
  .rh-branch .rh-section-head { align-items: flex-start; gap: 10px; }
  .rh-branch .rh-section-head h3 { font-size: 16px; }
  .rh-branch .rh-section-head > span { font-size: 12px; }
  .rh-setup { padding: 17px; }
  .rh-empty { padding: 27px 0; }
  .rh-empty > strong { font-size: 18px; }
  .rh-legend { gap: 12px; font-size: 11px; }
  .rh-coach-reference { padding: 15px; }
}
@media (max-width: 360px) {
  .rh-heading h2 { font-size: 23px; }
  .rh-pass-mark { display: none; }
  .rh-finish { font-size: 16px; }
  .rh-strategy { padding: 11px 6px; }
  .rh-strategy-title { font-size: 10px; }
  .rh-results .rh-section-head { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .rh-strategy { transition: none; }
}

.rh-coach-explanation { margin: 18px 0; padding: 14px 16px; background: var(--paper-mist); border-left: 3px solid var(--meadow); }
.rh-coach-explanation > strong { color: var(--meadow); font-size: 13px; }
.rh-coach-explanation p, .rh-coach-explanation ul { font-size: 13px; color: var(--mountain); line-height: 1.8; }
.rh-coach-explanation ul { padding-left: 18px; margin-bottom: 0; }

.rh-plan-meta { margin: -12px 0 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--mountain); font-size: 12px; line-height: 1.7; }
.rh-plan-meta .rh-text-button { flex-shrink: 0; font-size: 12px !important; }
@media (max-width: 520px) { .rh-plan-meta { align-items: flex-start; } }

.rh-coach-reference summary { min-height: 44px; padding: 12px 0; color: var(--pending); font-size: 13px; cursor: pointer; }
.rh-coach-reference ul { padding-left: 18px; margin: 0; max-height: 240px; overflow: auto; font-size: 13px; line-height: 1.9; color: var(--mountain); }

.rehearsal, .rh-stage, .rh-setup { scroll-margin-top: 155px; }
.rh-readiness { display: grid; gap: 6px; margin: -10px 0 24px; padding: 13px 16px; border-left: 3px solid var(--sun); background: color-mix(in srgb, var(--sun) 14%, var(--surface)); color: var(--sun-ink); font-size: 12px; line-height: 1.75; }
.rh-readiness strong { font-size: 13px; }

/* Keep auxiliary results legible on narrow phones. */
.rehearsal :is(.rh-strategy-title, .rh-finish-detail, .rh-strategy dt, .rh-risk, .rh-pace, .rh-result-footnote, .rh-chart-legend, .rh-stage-caption, .rh-telemetry span, .rh-telemetry small, .rh-product-grid .rh-field, .rh-product-grid .rh-input-unit > small) { font-size: 12px; }
.rh-attack .rh-strategy-title, .rh-legend .rh-attack, .rh-branch .rh-kicker, .rh-branch .rh-section-head > span, .rh-form-stamp { color: var(--alert-deep); }

/* Immersive race world: tokens are owned by DESIGN.md. */
.rehearsal {
  --world-pine: #142c29;
  --world-action: #d7ef72;
  --world-road: #aeb8b0;
  --world-verge: #cfddbd;
  --world-sky: #e5efee;
  --world-water: #a5ccd0;
  --world-sun: #e7c983;
  --world-bark: #94765d;
  --skin-sand: #c49a78;
  --skin-umber: #795744;
  --kit-ivory: #eeeadd;
  --kit-sky: #6e9ba9;
  --kit-salmon: #c67863;
  --kit-charcoal: #344243;
  --road-mark: #e7c983;
  --bark: #94765d;
}
.rh-heading { margin-bottom: 18px; align-items: center; }
.rh-heading h2 { font-size: 30px; line-height: 1.25; letter-spacing: -.035em; }
.rh-heading > div > p:last-child { font-size: 14px; margin-top: 8px; }
.rh-pass-mark { display: none; }
.rh-context { padding: 14px 0; margin-bottom: 20px; }
.rh-context strong { font-size: 18px; }
.rh-context dd { font-size: 22px; }
.rh-stage { position: relative; border-radius: 12px; border: 0; overflow: hidden; background: var(--world-pine); color: var(--surface); }
.rh-stage-top { gap: 8px; padding: 14px 16px; background: var(--world-pine); min-height: 68px; }
.rh-stage-top > div { min-width: 0; display: grid; gap: 5px; }
.rh-stage-top [data-rh-course-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 750; }
.rh-stage-top small { font-size: 12px; color: color-mix(in srgb, var(--surface) 76%, transparent); }
.rh-world-scene { position: relative; height: clamp(400px, 54vw, 580px); overflow: hidden; background: var(--world-sky); }
.rh-world-scene > canvas { display: block; width: 100%; height: 100%; min-height: 0; touch-action: pan-y; }
.rh-world-hud { position: absolute; top: 12px; left: 12px; right: 12px; display: grid; grid-template-columns: 1fr 1.2fr 1fr; padding: 14px 12px; border-radius: 8px; background: color-mix(in srgb, var(--world-pine) 94%, transparent); gap: 12px; pointer-events: none; }
.rh-world-hud > div { display: grid; gap: 8px; min-width: 0; }
.rh-world-hud > div + div { border-left: 1px solid color-mix(in srgb, var(--surface) 22%, transparent); padding-left: 12px; }
.rh-world-hud span { font-size: 12px; line-height: 1.35; color: color-mix(in srgb, var(--surface) 80%, transparent); }
.rh-world-hud strong { font-size: clamp(19px, 2.2vw, 30px); letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.rh-world-hud strong small { display: block; font-size: 12px; letter-spacing: 0; margin-top: 4px; font-weight: 500; }
[data-rh-world-delta] { color: var(--world-action); }
.rh-world-button, .rh-world-change { font: inherit; font-size: 13px; font-weight: 700; min-height: 44px; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--surface) 26%, transparent); border-radius: 8px; background: var(--world-pine); color: var(--surface); cursor: pointer; flex-shrink: 0; }
.rh-world-button[hidden] { display: none; }
.rh-world-button[aria-pressed=true] { background: var(--surface); color: var(--world-pine); border-color: var(--surface); }
/* Player layout: one flow, bounded layers, and text-resilient controls. */
.rh-player { isolation:isolate; z-index:0; }
.rh-player .rh-player-view { position:relative; inset:auto; z-index:auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:10px 12px; background:var(--world-pine); border-bottom:1px solid color-mix(in srgb,var(--surface) 15%,transparent); }
.rh-player-view .rh-world-button { min-width:0; white-space:normal; word-break:keep-all; overflow-wrap:anywhere; font-size:13px; line-height:1.4; padding:8px 6px; }
.rh-player-overlay { position:absolute; top:12px; left:12px; right:12px; display:grid; gap:8px; pointer-events:none; }
.rh-player-overlay .rh-world-hud { position:static; inset:auto; margin:0; }
.rh-player-overlay .rh-world-hud strong { line-height:1.35; overflow-wrap:anywhere; }
.rh-player-overlay .rh-world-event { position:static; justify-self:end; max-width:100%; margin:0; padding:9px 12px; border-left:3px solid var(--world-action); border-radius:8px; color:var(--surface); background:var(--world-pine); font-size:13px; line-height:1.5; }
.rh-player-controls { display:grid; gap:14px; min-width:0; padding:16px; background:var(--world-pine); }
.rh-player-controls > * { min-width:0; margin:0; }
.rh-player-controls > [hidden] { display:none; }
.rh-player-controls .rh-world-notice { margin:0; }
.rh-player-controls .rh-world-render-note, .rh-player-controls .rh-world-order { position:static; inset:auto; display:block; max-width:none; padding:9px 11px; border:1px solid color-mix(in srgb,var(--surface) 18%,transparent); border-radius:8px; color:var(--surface); background:color-mix(in srgb,var(--surface) 5%,var(--world-pine)); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.rh-player-controls .rh-playback { display:grid; grid-template-columns:auto minmax(40px,1fr) 74px; align-items:center; gap:10px; padding:0; }
.rh-player-controls .rh-play { min-width:78px; padding:9px 12px; white-space:nowrap; color:var(--surface); background:var(--world-pine); border-color:color-mix(in srgb,var(--surface) 28%,transparent); }
.rh-player-controls .rh-seek { min-width:0; }
.rh-player-controls .rh-seek input { width:100%; accent-color:var(--world-action); }
.rh-player-controls .rh-speed { display:block; min-width:0; }
.rh-player-controls .rh-speed select { width:100%; max-width:100%; min-width:0; padding:8px 5px; color:var(--surface); background:var(--world-pine); border-color:color-mix(in srgb,var(--surface) 28%,transparent); font-size:13px; }
.rh-player-controls .rh-chapter-controls, .rh-player-controls .rh-scene-strategies { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; }
.rh-player-controls :is(.rh-chapter-controls,.rh-scene-strategies) .rh-world-button { min-width:0; min-height:44px; padding:8px 5px; font-size:13px; line-height:1.4; white-space:normal; word-break:keep-all; overflow-wrap:anywhere; }
.rh-player-controls .rh-player-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:16px; padding:16px; border:1px solid color-mix(in srgb,var(--surface) 20%,transparent); border-radius:10px; background:color-mix(in srgb,var(--surface) 5%,var(--world-pine)); }
.rh-player-summary .rh-player-stat { display:flex; flex-direction:column; gap:8px; min-width:0; }
.rh-player-stat > span { font-size:12px; line-height:1.5; color:color-mix(in srgb,var(--surface) 80%,transparent); }
.rh-player-stat > strong { font-size:clamp(21px,2.4vw,28px); font-weight:800; line-height:1.3; letter-spacing:-.025em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.rh-player-summary .rh-player-branch-row { grid-column:1 / -1; min-width:0; }
.rh-player-summary .rh-player-branch { width:auto; max-width:100%; min-height:44px; padding:9px 12px; color:var(--world-action); background:transparent; border-color:color-mix(in srgb,var(--world-action) 50%,transparent); font-size:13px; line-height:1.4; white-space:normal; }
.rh-player-controls .rh-scene-actions { display:flex; flex-wrap:wrap; gap:10px; margin:0; }
.rh-player-controls .rh-scene-actions > button { flex:1 1 120px; min-width:0; min-height:44px; padding:9px 10px; font-size:13px; line-height:1.4; white-space:normal; }
.rh-player-controls .rh-stage-caption { display:block; padding:0; border:0; color:color-mix(in srgb,var(--surface) 82%,transparent); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.rh-player-controls .rh-stage-caption > span:last-child { display:none; }
.rh-focus-dialog .rh-player { display:flex; flex-direction:column; height:100%; min-height:0; border-radius:0; overflow:hidden; }
.rh-focus-dialog .rh-player .rh-stage-top { flex:0 0 auto; padding-top:max(12px,env(safe-area-inset-top)); }
.rh-focus-dialog .rh-player .rh-player-view { flex:0 0 auto; }
.rh-focus-dialog .rh-player .rh-world-scene { flex:1 1 38dvh; min-height:min(220px,34dvh); height:auto; }
.rh-focus-dialog .rh-player .rh-player-controls { flex:0 1 46dvh; min-height:0; max-height:46dvh; overflow:auto; overscroll-behavior:contain; padding-bottom:max(16px,env(safe-area-inset-bottom)); }
.rh-focus-dialog .rh-player .rh-world-empty { align-content:start; overflow:auto; padding:18px; }
@media (max-height:720px) {
  .rh-focus-dialog .rh-player-overlay .rh-world-hud { grid-template-columns:repeat(3,minmax(0,1fr)); padding:8px; gap:4px; }
  .rh-focus-dialog .rh-player-overlay .rh-world-hud > div { gap:4px; }
  .rh-focus-dialog .rh-player-overlay .rh-world-hud > div + div { padding-left:3px; }
  .rh-focus-dialog .rh-player-overlay .rh-world-hud span { font-size:12px; line-height:1.35; }
  .rh-focus-dialog .rh-player-overlay .rh-world-hud strong { font-size:17px; line-height:1.25; white-space:normal; }
  .rh-focus-dialog .rh-player-overlay .rh-world-hud strong small { display:inline; margin:0 0 0 1px; font-size:11px; white-space:nowrap; }
  .rh-focus-dialog .rh-distance-total { display:none; }
}

.rh-player-controls [hidden], .rh-player-overlay [hidden] { display:none; }
@media (max-width:340px) {
  .rh-player-controls .rh-player-summary { grid-template-columns:minmax(0,1fr); }
  .rh-player-summary .rh-player-stat > strong { white-space:nowrap; overflow-wrap:normal; }
}
.rh-world-notice { font-size: 13px; color: var(--surface); border-left: 3px solid var(--world-action); padding: 8px 12px; margin: 0 0 12px; line-height: 1.6; }
.rh-world-progress { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; font-size: 13px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--world-action); border-radius: 6px; }
.rh-world-progress > span { flex: 1 1 190px; line-height: 1.7; }
.rh-world-progress > progress { order: 2; flex: 0 0 100%; width: 100%; height: 7px; accent-color: var(--world-action); }
.rh-field-evidence > summary { min-height: 44px; padding: 12px 0; color: var(--mountain); font-size: 13px; cursor: pointer; }
.rh-stage :is(button, input, select):focus-visible { outline: 3px solid var(--world-action); outline-offset: 3px; }
.rh-world-elevation { margin-top: 12px; }
.rh-world-elevation > span { font-size: 12px; color: color-mix(in srgb, var(--surface) 80%, transparent); }
.rh-world-elevation canvas { display: block; width: 100%; height: 58px; }
.rh-course-slot { margin-top: 14px; min-width: 0; }
.rh-course-reference > summary { min-height: 48px; cursor: pointer; padding: 14px 0; font-size: 15px; font-weight: 750; color: var(--mountain); }
.rh-course-maps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.rh-course-maps > section { min-width: 0; }
.rh-course-maps h4 { font-size: 14px; margin: 8px 0 12px; }
.rh-course-maps img { width: 100%; height: 300px; object-fit: contain; background: var(--surface); }
.rh-course-map { width: 100%; height: 300px; background: var(--mist); border-radius: 8px; z-index: 0; }
.rh-course-map a { color: var(--pending); }
.rh-course-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 15px 0; }
.rh-course-metrics > div { display: grid; gap: 7px; min-width: 0; }
.rh-course-metrics span { font-size: 12px; line-height: 1.6; color: var(--mountain); }
.rh-course-metrics strong { font-size: 23px; color: var(--ink); }
.rh-course-profile { width: 100%; height: 170px; display: block; cursor: crosshair; }
.rh-course-slider { display: grid; grid-template-columns: auto minmax(0, 1fr) 65px; gap: 10px; align-items: center; font-size: 13px; color: var(--mountain); }
.rh-course-slider input { width: 100%; min-height: 44px; accent-color: var(--meadow); }
.rh-course-slider output { font-size: 12px; font-variant-numeric: tabular-nums; }
.rh-world-change { color: var(--world-pine); background: var(--world-action); border-color: var(--world-action); }
.rh-world-change:disabled { opacity: .65; cursor: default; }
.rh-stage .rh-play { color: var(--surface); background: var(--world-pine); border-color: color-mix(in srgb, var(--surface) 28%, transparent); }
.rh-stage [hidden] { display: none; }
.rh-setup-drawer { min-width: 0; }
.rh-setup-drawer > summary { padding: 15px 12px; min-height: 50px; color: var(--mountain); border-bottom: 1px solid var(--rh-line); font-weight: 750; font-size: 14px; cursor: pointer; }
.rh-setup-drawer[open] > summary { margin-bottom: 12px; }
.rh-rank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rh-rank-grid > div { display: grid; gap: 9px; min-width: 0; }
.rh-rank-grid strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.rh-rank-grid strong small, .rh-rank-grid span { font-size: 12px; font-weight: 400; color: var(--mountain); line-height: 1.6; }
.rh-rank-grid strong small { display: block; }
.rh-field-ranks { margin-top: 24px; border-top: 1px solid var(--rh-line); padding-top: 20px; }
.rh-field-ranks .rh-muted { font-size: 12px; }
.rh-focus-dialog { padding: 0; width: min(1200px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 auto; border: 0; overflow: hidden; background: var(--world-pine); color: var(--surface); }
.rh-focus-dialog::backdrop { background: var(--world-pine); }
.rh-decision-sheet { position: absolute; inset: auto 0 0; z-index: 3; max-height: 75%; overflow: auto; background: var(--surface); color: var(--ink); padding: 24px; margin: 0; border: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -12px 36px color-mix(in srgb, var(--world-pine) 30%, transparent); }
.rh-decision-sheet .rh-section-head { padding-right: 48px; }
.rh-decision-sheet .rh-secondary { background: var(--world-pine); color: var(--surface); width: 100%; min-height: 48px; }
.rh-decision-close { position: absolute; right: 12px; top: 12px; color: var(--world-pine); background: var(--surface); border-color: var(--rh-line); }
@media (max-width: 800px) {
  .rh-layout { display: flex; flex-direction: column; }
  .rh-main, .rh-side { display: contents; }
  .rh-setup-drawer { order: -1; }
  .rh-stage, .rh-progress { order: 0; }
  .rh-results { order: 1; }
  .rh-course-slot { order: 1; }
  .rh-insight { order: 2; }
  .rh-method { order: 3; }
  .rh-history { order: 4; }
  .rh-world-scene { height: 460px; }
  .rh-world-hud strong { font-size: 25px; }
  .rh-world-change { min-height: 46px; }
  .rh-heading h2 { font-size: 28px; }
  .rh-course-maps { grid-template-columns: minmax(0, 1fr); }
  .rh-course-metrics strong { font-size: 21px; }
}
@media (max-width: 420px) {
  .rh-stage-top { padding-inline: 12px; }
  .rh-world-hud { gap: 8px; padding: 12px 10px; left: 8px; right: 8px; }
  .rh-world-hud > div + div { padding-left: 8px; }
  .rh-world-hud strong { font-size: 21px; }
  .rh-world-hud span { font-size: 12px; }
  .rh-world-change { width: 100%; }
  .rh-rank-grid { gap: 10px; }
  .rh-rank-grid strong { font-size: 19px; }
  .rh-stage-top [data-rh-course-label] { font-size: 13px; }
  .rh-stage .rh-play { min-width: 64px; padding-inline: 10px; }
  .rh-decision-sheet { padding: 22px 16px; }
  .rh-decision-sheet h3 { font-size: 18px; }
}

@media (max-width: 400px) {
  .rh-risk-summary[data-score-range=true] .rh-risk-score { font-size: 17px; }
  .rh-risk-summary[data-score-range=true] .rh-risk-score > small { display: block; margin-left: 0; }
}

.rh-risk-parameters { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; padding: 10px; background: var(--paper-mist); border-radius: 4px; }
.rh-risk-raw .rh-risk-nested { margin: 0; }
.rh-risk-raw .rh-risk-nested > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }

.rh-risk-factor-partial, .rh-risk-exact-range { margin: 7px 0; color: var(--mountain); font-size: 12px; line-height: 1.7; }

.rh-risk-policy { border-top: 1px solid var(--rh-line); padding-top: 10px; margin: 12px 0; font-size: 12px; line-height: 1.75; }
.rh-risk-policy > summary, .rh-risk-flag-raw > summary { min-height: 36px; align-content: center; }
.rh-risk-policy .rh-risk-nested, .rh-risk-flag-raw .rh-risk-nested { display: grid; gap: 6px; margin: 8px 0; }
.rh-risk-policy .rh-risk-nested > div, .rh-risk-flag-raw .rh-risk-nested > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.rh-risk-policy dd, .rh-risk-flag-raw dd { margin: 0; overflow-wrap: anywhere; }
.rh-risk-flag-raw { color: var(--ink); font-size: 12px; }

/* Rehearsal surfaces: paper setup, immersive stage, raised analytical results. */
.rehearsal { --rh-shadow: color-mix(in srgb, var(--forest-deep) 9%, transparent); --rh-step: color-mix(in srgb, var(--mountain) 24%, var(--paper)); line-height: 1.65; }
.rehearsal :is(strong, output, dd, input) { font-variant-numeric: tabular-nums; }
.rehearsal :is(.rh-primary, .rh-secondary, .rh-play, .rh-world-button, .rh-world-change, .rh-strategy-choice, .rh-chart-segments button) { border-radius: 8px; box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 30%, transparent), 0 3px 0 var(--rh-step), 0 5px 10px var(--rh-shadow); transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.rehearsal :is(.rh-primary, .rh-secondary, .rh-play, .rh-world-button, .rh-world-change, .rh-strategy-choice, .rh-chart-segments button):active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 18%, transparent), 0 1px 0 var(--rh-step); }
.rehearsal :is(.rh-primary, .rh-play, .rh-world-button, .rh-world-change):disabled { box-shadow: none; }
.rh-heading h2 { letter-spacing: -.035em; font-weight: 850; }
.rh-heading p:last-child { font-size: 16px; }
.rh-section-head { gap: 16px; align-items: start; }
.rh-section-head h3 { font-size: 22px; line-height: 1.45; letter-spacing: -.025em; font-weight: 800; }
.rh-section-head small, .rh-result-meta small { font-size: 13px; color: var(--mountain); }
.rh-kicker { font-size: 13px; letter-spacing: .01em; }
.rh-context { padding: 21px 22px; border: 1px solid var(--rh-line); border-radius: 8px; background: var(--paper-mist); }
.rh-context dd { font-size: 26px; letter-spacing: -.035em; }
.rh-context-label, .rh-context dt, .rh-context small { font-size: 13px; }
.rh-stage { box-shadow: 0 10px 26px var(--rh-shadow); }
.rh-setup-drawer { border: 1px solid var(--rh-line); border-radius: 8px; background: var(--paper-mist); box-shadow: 0 3px 12px var(--rh-shadow); }
.rh-setup-drawer > summary { padding: 17px 18px; font-size: 15px; }
.rh-setup-drawer[open] > summary { margin-bottom: 0; }
.rh-setup { border: 0; border-radius: 0 0 8px 8px; }
.rh-field { font-size: 14px; gap: 8px; }
.rh-field > small, .rh-submit-area > small { font-size: 13px; }
.rh-field :is(input, select, textarea) { font-size: 15px; background: var(--surface); box-shadow: inset 0 1px 2px var(--rh-shadow); }
.rh-input-unit { background: var(--surface); }
.rh-setup-detail > summary { font-size: 14px; }
.rh-primary { font-size: 16px !important; min-height: 52px; }
.rh-secondary, .rh-text-button { font-size: 14px !important; }
.rh-results { margin-top: 32px; padding: 24px; border: 1px solid var(--rh-line); border-radius: 8px; background: var(--surface); box-shadow: 0 4px 18px var(--rh-shadow); }
.rh-result-conditions { background: var(--paper); padding: 14px 16px; }
.rh-result-conditions > strong, .rh-result-conditions dl { font-size: 13px; }
.rh-result-conditions dl { gap: 7px 20px; }
.rh-priority-note { font-size: 13px; }
.rh-validity-note { font-size: 14px; padding: 14px 16px; background: var(--paper-mist); }
.rh-strategy-switch { display: none; }
.rh-strategies { gap: 13px; margin-top: 22px; }
.rh-strategy-card { border-radius: 8px; box-shadow: 0 3px 11px var(--rh-shadow); }
.rh-strategy { border-radius: 8px; padding: 20px 16px 17px; gap: 10px; background: var(--surface); }
.rh-strategy.is-selected { background: color-mix(in srgb, var(--rh-strategy) 5%, var(--surface)); outline-width: 2px; }
.rh-strategy-title { font-size: 14px; letter-spacing: -.02em; }
.rh-finish { font-size: clamp(26px, 2.2vw, 34px); letter-spacing: -.045em; font-weight: 850; }
.rh-finish-detail, .rh-strategy .rh-case-label, .rh-strategy dt, .rh-pace { font-size: 13px; }
.rh-strategy dl { margin-top: 10px; gap: 18px; }
.rh-strategy dd { font-size: 32px; letter-spacing: -.035em; }
.rh-strategy dd small { font-size: 15px; }
.rh-case-note { font-size: 13px; letter-spacing: 0; }
.rh-strategy .rh-pace { padding-top: 12px; margin-top: 2px; }
.rh-risk-summary, .rh-risk-unavailable { padding-top: 16px; margin-top: 2px; gap: 7px; font-size: 13px; }
.rh-risk-title { font-size: 14px; }
.rh-risk-summary .rh-risk-score { font-size: 27px; letter-spacing: -.035em; }
.rh-risk-summary .rh-risk-score > small { font-size: 13px; display: inline; margin-left: 4px; }
.rh-risk-more { background: var(--paper-mist); font-size: 14px !important; min-height: 48px; border-radius: 0 0 8px 8px; }
.rh-result-footnote, .rh-muted { font-size: 13px; }
.rh-insight { border: 1px solid var(--rh-line); border-radius: 8px; padding: 24px; background: var(--surface); box-shadow: 0 4px 18px var(--rh-shadow); }
.rh-insight > p, .rh-explanations { font-size: 15px; line-height: 1.85; }
.rh-risk-details { background: var(--paper-mist); padding: 16px 18px; }
.rh-risk-details > summary { font-size: 15px; }
.rh-risk-factors > li { padding: 18px 0; }
.rh-risk-factor-head { font-size: 15px; }
.rh-risk-factor-head > span { font-size: 23px; letter-spacing: -.03em; }
.rh-risk-factor-note { font-size: 14px; }
.rh-risk-factor-meta, .rh-risk-factor-partial, .rh-risk-exact-range, .rh-risk-raw, .rh-risk-policy, .rh-risk-caveats { font-size: 13px; }
.rh-telemetry { gap: 18px; margin: 24px 0; padding: 18px 0; border-block: 1px solid var(--rh-line); }
.rh-telemetry span { font-size: 13px; }
.rh-telemetry strong { font-size: 27px; letter-spacing: -.035em; }
.rh-history { padding: 18px; border: 1px solid var(--rh-line); background: var(--paper-mist); border-radius: 8px; }
.rh-history h3 { font-size: 17px; }
.rh-history-row strong { font-size: 14px; }
.rh-method { padding: 0 18px; }
.rh-method > summary { font-size: 14px; }
.rh-distributions { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--rh-line); }
.rh-distribution-panel { margin-top: 18px; padding: 20px; border: 1px solid var(--rh-line); background: var(--paper); border-radius: 8px; }
.rh-chart-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 20px; }
.rh-chart-head h4 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.rh-chart-head label { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mountain); }
.rh-chart-head select { border: 1px solid var(--rh-line); border-radius: 6px; background: var(--surface); min-height: 44px; padding: 6px 10px; color: var(--ink); }
.rh-outcome-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.rh-outcome-totals > div { display: grid; gap: 4px; }
.rh-outcome-totals span { font-size: 13px; color: var(--mountain); }
.rh-outcome-totals strong { font-size: 29px; line-height: 1.4; letter-spacing: -.035em; }
.rh-outcome-totals small { font-size: 13px; margin-left: 3px; font-weight: 500; }
.rh-outcome-stack { display: flex; gap: 3px; height: 15px; border-radius: 5px; overflow: hidden; background: var(--mist); }
.rh-outcome-stack span { min-width: 1px; }
.rh-outcome-legend { list-style: none; padding: 0; margin: 14px 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; }
.rh-outcome-legend li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 7px; align-items: center; font-size: 13px; }
.rh-outcome-legend i { width: 8px; height: 8px; border-radius: 2px; }
.rh-outcome-legend strong { font-weight: 700; }
.rh-outcome-stack .is-goal, .rh-outcome-legend .is-goal { background: var(--meadow); }
.rh-outcome-stack .is-over, .rh-outcome-legend .is-over { background: var(--pending); }
.rh-outcome-stack .is-cutoff, .rh-outcome-legend .is-cutoff { background: var(--stamp); }
.rh-outcome-stack .is-stop, .rh-outcome-legend .is-stop { background: var(--sun); }
.rh-outcome-stack .is-unknown, .rh-outcome-legend .is-unknown { background: var(--mountain); }
.rh-histogram { margin: 20px 0 0; min-width: 0; }
.rh-histogram figcaption { font-size: 14px; font-weight: 750; margin-bottom: 13px; }
.rh-histogram-scale { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--mountain); margin-bottom: 4px; }
.rh-histogram-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.rh-histogram-bars { min-width: max(100%, calc(var(--rh-bars) * 16px)); height: 196px; display: grid; grid-template-columns: repeat(var(--rh-bars), minmax(0, 1fr)); gap: 3px; align-items: end; border-bottom: 1px solid var(--rh-line); padding-top: 12px; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--rh-line) calc(25% - 1px), var(--rh-line) 25%); }
.rh-histogram-column { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; height: 100%; position: relative; padding-bottom: 29px; }
.rh-histogram-bar { width: 100%; height: max(3px, var(--rh-bar-height)); min-height: 3px; padding: 0; border: 0; border-radius: 4px 4px 0 0; background: var(--meadow); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 30%, transparent); position: relative; }
.rh-histogram-bar:hover, .rh-histogram-bar:focus-visible { background: var(--pending); }
.rh-histogram-bar.is-empty { background: var(--rh-line); }
.rh-histogram-tick { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: var(--mountain); }
.rh-histogram-column:first-child .rh-histogram-tick { left: 0; transform: none; }
.rh-histogram-column:last-child .rh-histogram-tick { left: auto; right: 0; transform: none; }
.rh-chart-readout { display: block; padding: 12px 13px; margin-top: 12px; border-radius: 6px; background: var(--surface); font-size: 14px; font-weight: 700; color: var(--forest-deep); }
.rh-chart-axis, .rh-rank-denominator { font-size: 13px; line-height: 1.7; color: var(--mountain); }
.rh-chart-table > summary, .rh-stop-distribution > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--mountain); }
.rh-chart-table table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.7; }
.rh-chart-table th, .rh-chart-table td { border-bottom: 1px solid var(--rh-line); text-align: left; padding: 9px 6px; font-weight: 500; }
.rh-chart-table td { text-align: right; }
.rh-chart-empty { padding: 18px 0; color: var(--mountain); font-size: 14px; line-height: 1.8; }
.rh-stop-distribution { margin-top: 18px; border-top: 1px solid var(--rh-line); }
.rh-stop-bars { display: grid; gap: 12px; margin: 16px 0; }
.rh-stop-bars > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.rh-stop-bars meter { width: 100%; height: 12px; accent-color: var(--stamp); }
.rh-chart-segments { display: flex; gap: 8px; margin: 0 0 20px; }
.rh-chart-segments button { flex: 1; min-height: 44px; padding: 9px; border: 1px solid var(--rh-line); background: var(--surface); color: var(--mountain); font-size: 14px; font-weight: 700; }
.rh-chart-segments button[aria-pressed=true] { color: var(--surface); background: var(--forest-deep); border-color: var(--forest-deep); }
.rh-rank-outcomes { display: grid; gap: 8px; border-top: 1px solid var(--rh-line); margin-top: 14px; padding-top: 14px; font-size: 13px; }
.rh-rank-outcomes span { display: flex; justify-content: space-between; gap: 12px; }
.race-subtabs { display: grid; grid-template-columns: 1fr 1fr 1.28fr; }
.race-subtab { font-size: 14px; white-space: nowrap; padding-inline: 5px; }
@media (max-width: 1100px) and (min-width: 801px) { .rh-layout { grid-template-columns: minmax(0, 1fr); } .rh-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; } .rh-history { margin-top: 0; } }
@media (max-width: 800px) {
  .rh-context { padding: 18px; }
  .rh-results, .rh-insight { width: 100%; padding: 20px; margin-top: 20px; }
  .rh-results > .rh-section-head { flex-wrap: wrap; }
  .rh-result-meta { display: flex; justify-items: start; align-items: center; }
  .rh-strategy-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 22px 0 14px; }
  .rh-strategy-choice { min-height: 48px; padding: 10px 4px; font-size: 13px; line-height: 1.5; font-weight: 750; border: 1px solid var(--rh-line); background: var(--paper); color: var(--mountain); white-space: nowrap; }
  .rh-strategy-choice[aria-pressed=true] { background: var(--rh-strategy); color: var(--surface); border-color: var(--rh-strategy); }
  .rh-strategies { display: block; margin-top: 0; }
  .rh-strategy-card:not([data-selected=true]) { display: none; }
  .rh-strategy { width: 100%; padding: 22px; cursor: default !important; }
  .rh-strategy-title { font-size: 16px; }
  .rh-finish { font-size: 36px; margin-top: 2px; }
  .rh-finish-detail { font-size: 14px; }
  .rh-strategy dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 16px 0; padding-block: 17px; border-block: 1px solid var(--rh-line); }
  .rh-strategy dd { font-size: 34px; }
  .rh-strategy .rh-case-label, .rh-strategy dt { font-size: 13px; }
  .rh-case-note { font-size: 12px; }
  .rh-strategy .rh-pace { border: 0; padding: 0; }
  .rh-risk-summary { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
  .rh-risk-title, .rh-risk-band, .rh-risk-partial, .rh-risk-disclaimer, .rh-risk-card-flag { grid-column: 1 / -1; }
  .rh-risk-summary .rh-risk-score { font-size: 32px; grid-column: 1 / -1; }
  .rh-risk-summary .rh-risk-score > small { display: inline; margin-left: 5px; }
  .rh-distribution-panel { padding: 18px; }
  .rh-field-ranks .rh-section-head h3 { font-size: 20px; }
  .rh-rank-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rh-rank-grid > div { padding-bottom: 14px; border-bottom: 1px solid var(--rh-line); }
  .rh-rank-grid strong { font-size: 28px; }
  .rh-telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .rh-results, .rh-insight { padding: 16px; }
  .rh-section-head h3 { font-size: 21px; }
  .rh-context { padding: 16px; }
  .rh-context dl { gap: 18px; }
  .rh-context dd { font-size: 23px; }
  .rh-context dd.rh-confidence { font-size: 15px; }
  .rh-strategy-choice { font-size: 12px; padding-inline: 2px; }
  .rh-strategy { padding: 18px; }
  .rh-strategy dl { gap: 14px; }
  .rh-strategy dd { font-size: 31px; }
  .rh-strategy .rh-case-label { font-size: 12px; }
  .rh-case-note { font-size: 12px; }
  .rh-distribution-panel { padding: 14px; }
  .rh-outcome-totals { gap: 9px; }
  .rh-outcome-totals span { font-size: 12px; }
  .rh-outcome-totals strong { font-size: 26px; }
  .rh-outcome-legend { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rh-chart-head h4 { font-size: 16px; }
  .rh-chart-segments { gap: 6px; }
  .rh-chart-segments button { font-size: 13px; padding-inline: 5px; }
  .rh-risk-details { padding: 12px; }
  .rh-risk-factor-head { font-size: 14px; }
  .rh-risk-factor-head > span { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .rehearsal :is(button, a) { transition: none; } }
@media (max-width: 800px) {
  .rh-risk-summary[data-score-range=true] .rh-risk-score { font-size: 32px; }
  .rh-risk-summary[data-score-range=true] .rh-risk-score > small { display: inline; margin-left: 5px; }
}
.rh-histogram-tick { font-size: 12px; }
@media (max-width: 800px) { .rh-risk-summary > * { grid-column: 1 / -1; } }
.rehearsal :is(.rh-primary, .rh-play) { --rh-step: var(--forest-deep); }
.rehearsal .rh-strategy-choice[aria-pressed=true] { --rh-step: color-mix(in srgb, var(--rh-strategy) 72%, var(--ink)); }
.rh-analytics-slot { min-width: 0; margin: 26px 0; }
[data-rh-rank-distribution] .rh-histogram-bar { background: var(--pending); }
[data-rh-rank-distribution] .rh-histogram-bar:is(:hover, :focus-visible) { background: var(--forest-deep); }
[data-rh-rank-distribution] .rh-histogram-bar.is-empty { background: var(--rh-line); }
@media (min-width: 351px) and (max-width: 800px) {
  .rh-strategy-choice { font-size: 13px; }
  .rh-strategy .rh-case-label { font-size: 13px; }
}
.rh-results .rh-section-head h3, .rh-insight .rh-section-head h3 { font-size: 22px; }
.rh-strategy .rh-case-label { word-break: keep-all; overflow-wrap: normal; }
@media (max-width: 420px) { .rh-results .rh-section-head h3, .rh-insight .rh-section-head h3 { font-size: 21px; } }
.rh-distributions, .rh-analytics-slot, .rh-distribution-panel { scroll-margin-top: 160px; }
.rh-insight .rh-secondary { font-size: 14px !important; }
.rh-product-grid .rh-field { font-size: 13px; }
.rh-product-grid .rh-input-unit > small { font-size: 12px; }
.rh-risk-evidence-summary { font-size: 13px; color: var(--mountain); line-height: 1.8; }
.rehearsal .rh-strategy-choice { font-size: 13px; font-weight: 750; line-height: 1.5; }
@media (max-width: 350px) { .rehearsal .rh-strategy-choice { font-size: 12px; } }

/* Saved execution policies: shared goal, explicit pacing and fueling differences. */
.rh-selected-policy { display: grid; gap: 8px; padding: 18px 20px; margin: 22px 0 18px; border: 1px solid var(--rh-line); border-left: 4px solid var(--rh-strategy); border-radius: 8px; background: color-mix(in srgb, var(--rh-strategy) 5%, var(--surface)); }
.rh-selected-policy .rh-kicker { color: var(--rh-strategy); margin: 0; }
.rh-selected-policy > strong { font-size: 21px; letter-spacing: -.025em; line-height: 1.5; }
.rh-selected-policy > p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--mountain); word-break: keep-all; }
.rh-selected-policy > small, .rh-policy-common { font-size: 13px; color: var(--mountain); line-height: 1.7; }
.rh-policy-common { display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 700; }
.rh-policy-comparison { border-top: 1px solid var(--rh-line); margin-top: 30px; padding-top: 26px; scroll-margin-top: 160px; }
.rh-policy-note { font-size: 13px; color: var(--mountain); line-height: 1.8; margin: 12px 0; }
.rh-policy-table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 18px 0; font-size: 13px; }
.rh-policy-table th, .rh-policy-table td { text-align: left; padding: 15px 9px; border-bottom: 1px solid var(--rh-line); vertical-align: top; }
.rh-policy-table thead th { background: var(--paper); color: var(--mountain); font-weight: 650; }
.rh-policy-table tbody tr[data-selected=true] { background: color-mix(in srgb, var(--rh-strategy) 5%, var(--surface)); }
.rh-policy-table tbody th { width: 21%; border-left: 3px solid var(--rh-strategy); }
.rh-policy-table tbody th > strong { display: block; color: var(--rh-strategy); font-size: 14px; }
.rh-policy-table tbody th > span { display: block; font-size: 12px; line-height: 1.7; color: var(--mountain); margin-top: 6px; font-weight: 500; word-break: keep-all; }
.rh-policy-table td > strong { display: block; white-space: nowrap; font-size: 20px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.rh-policy-table td > strong small { font-size: 12px; font-weight: 500; letter-spacing: 0; }
.rh-policy-table td > small, .rh-policy-fueling > small { display: block; color: var(--mountain); font-size: 12px; line-height: 1.7; margin-top: 5px; }
.rh-policy-phase { display: none; }
.rh-policy-fueling { width: 25%; font-size: 13px; line-height: 1.75; }
.rh-policy-fueling > span { display: block; }
.rh-plan-duplicate { padding: 15px 17px; border-left: 3px solid var(--sun); border-radius: 6px; margin: 22px 0 0; background: color-mix(in srgb, var(--sun) 12%, var(--surface)); color: var(--sun-ink); font-size: 14px; line-height: 1.8; }
.rh-plan-duplicate > strong { font-weight: 750; }
.rh-plan-duplicate > p { margin: 7px 0 0; }
@media (max-width: 800px) {
  .rh-selected-policy { padding: 16px; margin-top: 16px; }
  .rh-selected-policy > strong { font-size: 20px; }
  .rh-policy-table, .rh-policy-table tbody { display: block; }
  .rh-policy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rh-policy-table tbody { display: grid; gap: 14px; }
  .rh-policy-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rh-line); border-radius: 8px; background: var(--surface); overflow: hidden; }
  .rh-policy-table tbody th { grid-column: 1 / -1; width: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 12px 14px; }
  .rh-policy-table tbody th > span { margin: 0; }
  .rh-policy-table td { min-width: 0; padding: 14px 10px; }
  .rh-policy-phase { display: block; font-size: 12px; color: var(--mountain); margin-bottom: 5px; }
  .rh-policy-table td > strong { font-size: 23px; }
  .rh-policy-table td > strong small { display: block; font-size: 12px; }
  .rh-policy-table .rh-policy-fueling { grid-column: 1 / -1; width: auto; border-bottom: 0; background: var(--paper); padding: 12px 14px; }
  .rh-policy-fueling > span { display: inline-block; margin-right: 14px; }
}
@media (max-width: 350px) {
  .rh-policy-table td { padding-inline: 8px; }
  .rh-policy-table td > strong { font-size: 21px; }
  .rh-policy-table td > small { font-size: 12px; }
}
.rh-policy-checkpoints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 13px 0; margin: 5px 0; border-block: 1px solid var(--rh-line); }
.rh-policy-checkpoints > div { display: grid; gap: 3px; min-width: 0; }
.rh-policy-checkpoints span, .rh-policy-checkpoints small { color: var(--mountain); font-size: 12px; }
.rh-policy-checkpoints strong { font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: -.035em; line-height: 1.4; }
.rh-plan-duplicate + .rh-strategies { margin-top: 18px; }
@media (max-width: 350px) { .rh-policy-checkpoints { gap: 9px; } .rh-policy-checkpoints strong { font-size: 23px; } }

/* Compact supporting analysis and progressive evidence below the primary scene. */
.rh-ability-comparison { min-width:0; margin:16px 0; padding:18px; border:1px solid var(--rh-line); border-radius:10px; background:var(--surface); }
.rh-ability-comparison[hidden] { display:none; }
.rh-ability-heading { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:8px 18px; margin-bottom:14px; }
.rh-ability-heading h3 { margin:0; font-size:20px; line-height:1.5; }
.rh-ability-heading > span { color:var(--mountain); font-size:12px; line-height:1.7; }
.rh-ability-modes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.rehearsal .rh-ability-card { display:flex; flex-direction:column; align-items:stretch; gap:7px; min-width:0; min-height:44px; padding:14px; border:1px solid var(--rh-line); border-bottom-width:3px; border-radius:8px; background:var(--paper-mist); color:var(--ink); text-align:left; }
.rehearsal .rh-ability-card[aria-pressed=true] { border-color:var(--meadow); background:color-mix(in srgb,var(--meadow) 7%,var(--surface)); box-shadow:inset 0 0 0 1px var(--meadow); }
.rh-ability-card > strong { font-size:17px; line-height:1.5; }
.rh-ability-card > span { min-width:0; font-size:12px; line-height:1.7; word-break:keep-all; overflow-wrap:anywhere; }
.rehearsal .rh-ability-card:disabled { cursor:default; opacity:1; border-color:var(--rh-line); background:var(--paper); box-shadow:none; }
.rh-ability-applied { padding-top:8px; margin-top:2px; border-top:1px solid var(--rh-line); color:var(--mountain); }
.rh-ability-applied > span { display:block; }
.rh-ability-applied em { color:var(--ink); font-style:normal; font-variant-numeric:tabular-nums; }
.rh-ability-time-delta { margin:0 0 12px; padding:12px; border:1px solid var(--rh-line); border-radius:7px; background:var(--paper-mist); font-size:13px; line-height:1.7; }
.rh-ability-time-delta strong, .rh-ability-time-delta span { display:block; }
.rh-ability-time-delta b { white-space:nowrap; font-variant-numeric:tabular-nums; }
.rh-ability-time-delta span { margin-top:4px; color:var(--mountain); font-size:12px; }
.rh-ability-card .rh-ability-finish { display:grid; gap:5px; padding-top:8px; border-top:1px solid var(--rh-line); }
.rh-ability-card .rh-ability-finish > b { font-size:21px; line-height:1.4; font-variant-numeric:tabular-nums; }
.rh-ability-margin { color:var(--mountain); font-size:12px; line-height:1.7; }
.rh-ability-difference { margin:10px 0 0; color:var(--mountain); font-size:12px; line-height:1.75; overflow-wrap:anywhere; }
.rh-ability-difference > span { display:block; margin-top:4px; }
.rh-analysis-mode { margin:8px 0 12px; font-size:13px; line-height:1.7; color:var(--ink); font-weight:700; overflow-wrap:anywhere; }
.rh-ability-card .rh-ability-assumption { color:var(--mountain); font-weight:650; }
.rh-ability-card .rh-ability-stat { display:grid; gap:5px; padding-top:8px; margin-top:2px; border-top:1px solid var(--rh-line); }
.rh-ability-stat > b { font-size:25px; line-height:1.3; font-variant-numeric:tabular-nums; }
.rh-ability-card > span > b { display:block; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rh-ability-unavailable { padding-block:12px; color:var(--alert-deep); }
.rh-ability-source, .rh-ability-calibration { margin:10px 0 0; color:var(--mountain); font-size:12px; line-height:1.75; overflow-wrap:anywhere; }
.rh-ability-calibration { color:var(--ink); font-weight:650; }
.rh-ability-fallback { padding:10px 12px; border-left:3px solid var(--sun); border-radius:4px; margin:10px 0; color:var(--ink); background:var(--paper-mist); font-size:13px; line-height:1.75; }
.rh-ability-evidence { margin-top:10px; border-top:1px solid var(--rh-line); }
.rh-ability-evidence > summary { min-height:44px; padding:12px 0; font-size:13px; font-weight:700; line-height:1.6; }
.rh-ability-evidence :is(p,li,dt,dd) { font-size:13px; line-height:1.8; overflow-wrap:anywhere; }
.rh-ability-evidence dl { display:grid; gap:10px; }
.rh-ability-evidence dl > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:8px 18px; }
.rh-ability-evidence dd { margin:0; color:var(--mountain); }
.rh-time-reference { margin:16px 0; padding:18px; min-width:0; border:1px solid var(--rh-line); border-radius:10px; background:var(--paper-mist); }
.rh-time-reference[hidden] { display:none; }
.rh-time-reference-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 18px; }
.rh-time-reference-head h3 { margin:0; font-size:17px; line-height:1.5; }
.rh-time-reference-head > strong { font-size:28px; line-height:1.35; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rh-time-reference .rh-kicker { font-size:12px; line-height:1.7; word-break:keep-all; }
.rh-time-reference :is(.rh-time-reference-status,.rh-time-reference-source,.rh-time-reference-note) { margin:7px 0 0; font-size:12px; line-height:1.75; color:var(--mountain); overflow-wrap:anywhere; }
.rh-time-reference .rh-time-reference-status { font-weight:700; color:var(--ink); }
.rh-time-reference-details { margin-top:8px; border-top:1px solid var(--rh-line); }
.rh-time-reference-details > summary { min-height:44px; padding:12px 0; font-size:13px; line-height:1.6; font-weight:700; }
.rh-time-reference-details :is(p,dt,dd,li) { font-size:13px; line-height:1.8; overflow-wrap:anywhere; }
.rh-time-reference-details dl { display:grid; gap:10px; }
.rh-time-reference-details dd { margin:2px 0 0; font-variant-numeric:tabular-nums; }
@media (max-width:420px) { .rh-ability-comparison { padding:14px; } .rehearsal .rh-ability-card { padding:11px; } .rh-ability-card > strong { font-size:15px; } .rh-ability-evidence dl > div { grid-template-columns:minmax(0,1fr); gap:2px; } }
@media (max-width:420px) { .rh-time-reference { padding:14px; } .rh-time-reference-head > strong { font-size:26px; } }
.rehearsal { margin-top: 16px; }
.rh-heading { margin-bottom: 10px; }
.rh-heading h2 { font-size: 25px; margin: 0; line-height: 1.35; }
.rh-heading .rh-kicker, .rh-heading .rh-pass-mark, .rh-heading p:last-child { display: none; }
.rh-context { display: block; padding: 0; margin: 0 0 10px; border: 0; border-radius: 0; background: transparent; }
.rh-context-details > summary { min-height: 36px; padding: 7px 0; font-size: 13px; color: var(--mountain); }
.rh-context-full { padding: 16px; margin-top: 7px; border: 1px solid var(--rh-line); border-radius: 8px; background: var(--paper-mist); }
.rh-context-full > div:first-child { display: grid; gap: 5px; }
.rh-context-full dl { margin-top: 15px; }
.rh-notice { padding: 8px 12px; margin-bottom: 10px; font-size: 12px; }
.rh-analysis-first { padding: 18px 20px; border: 1px solid var(--rh-line); border-radius: 8px; background: var(--surface); box-shadow: 0 4px 18px var(--rh-shadow); scroll-margin-top: 118px; }
.rh-analysis-first[hidden] { display: none; }
.rh-race-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; align-items: center; }
.rh-race-strip h3 { font-size: 17px; line-height: 1.5; margin: 0; letter-spacing: -.02em; }
.rh-race-strip p { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.65; color: var(--mountain); }
.rh-race-strip .rh-text-button { min-height: 36px; padding: 5px 2px; font-size: 13px !important; }
.rh-analysis-first .rh-strategy-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 12px 0 10px; }
.rehearsal .rh-analysis-first .rh-strategy-choice { font-size: 13px; padding: 8px 3px; min-height: 44px; }
.rh-key-results { min-width:0; margin:12px 0 0; border:1px solid var(--rh-line); border-radius:8px; background:var(--paper-mist); overflow:hidden; }
.rh-key-results-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:4px 12px; padding:6px 14px; border-bottom:1px solid var(--rh-line); }
.rh-key-results-heading > strong { min-width:0; font-size:14px; line-height:1.6; }
.rh-key-results-heading > button { min-height:44px; padding:6px 0; font-size:12px; }
.rh-execution-support { margin:12px 14px 0; padding:10px 12px; border-left:3px solid var(--sun); border-radius:4px; color:var(--ink); background:var(--surface); font-size:13px; line-height:1.7; }
.rh-execution-support[data-support-status=supported_within_model] { border-left-color:var(--meadow); }
.rh-execution-support[data-support-status=unsupported] { border-left-color:var(--stamp); }
.rh-execution-support > strong { display:block; font-size:14px; line-height:1.6; }
.rh-strategy .rh-execution-caption { display:block; color:var(--mountain); font-size:12px; font-weight:650; line-height:1.7; }
.rh-execution-support p { margin:5px 0 0; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.rh-execution-support details { margin-top:5px; }
.rh-execution-support summary { min-height:44px; padding:9px 0; font-size:12px; font-weight:650; line-height:1.7; }
.rh-support-strata { display:grid; gap:8px; padding:10px 0; margin:0; }
.rh-support-strata > div { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:10px; }
.rh-support-strata dt, .rh-support-strata dd { margin:0; min-width:0; font-size:12px; line-height:1.7; }
.rh-support-strata dd { white-space:nowrap; font-variant-numeric:tabular-nums; }
.rh-key-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; margin:0; padding:14px; }
.rh-key-metrics > div { display:grid; align-content:start; min-width:0; gap:6px; }
.rh-key-metrics dt { color:var(--mountain); font-size:13px; font-weight:650; line-height:1.65; overflow-wrap:anywhere; }
.rh-key-metrics dd { display:grid; gap:4px; min-width:0; margin:0; }
.rh-key-metrics dd > strong { color:var(--ink); font-size:28px; font-weight:800; line-height:1.3; font-variant-numeric:tabular-nums; letter-spacing:-.025em; white-space:nowrap; }
.rh-key-metrics dd > strong > small { margin-left:3px; font-size:13px; font-weight:550; }
.rh-key-metrics dd > span { color:var(--mountain); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.rh-key-metrics .rh-key-risk { grid-column:1 / -1; padding-top:12px; border-top:1px solid var(--rh-line); }
.rh-key-metrics .rh-key-risk dd > strong { font-size:24px; }
.rh-key-caveat { margin:0; padding:0 14px 14px; color:var(--mountain); font-size:12px; line-height:1.7; }
@media (max-width:360px) { .rh-key-metrics { grid-template-columns:minmax(0,1fr); } }
.rh-analysis-validity { color: var(--pending); background: var(--paper-mist); border-radius: 5px; font-size: 12px; line-height: 1.6; margin: 8px 0 12px; padding: 6px 9px; }
.rh-analysis-alert { margin: 7px 0; color: var(--alert-deep); font-size: 13px; font-weight: 650; line-height: 1.7; }
.rh-analysis-first .rh-analytics-slot { margin: 12px 0 0; }
.rh-analysis-first .rha-heading { align-items: center; margin-bottom: 9px; gap: 9px; }
.rh-analysis-first .rha-heading h4 { font-size: 17px; margin: 0; }
.rh-analysis-first .rha-heading p { display: none; }
.rh-analysis-first .rha-heading > label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 12px; }
.rh-analysis-first .rha-heading select { min-height: 38px; padding-block: 7px; }
.rh-analysis-first .rha-legend { gap: 6px 12px; margin-bottom: 8px; }
.rh-analysis-first .rha-chart { margin-top: 8px; }
.rh-analysis-first .rha-readout dl > div:nth-child(n+5) { display: none; }
.rh-analysis-first .has-detail-metrics .rha-readout dl > div { display: block; }
.rh-analysis-more { min-height: 44px; }
.rh-analysis-highlights { border-top: 1px solid var(--rh-line); margin-top: 14px; }
.rh-analysis-highlights > summary { padding: 12px 0; min-height: 44px; font-size: 14px; color: var(--mountain); font-weight: 700; }
.rh-result-drawer { border: 1px solid var(--rh-line); border-radius: 8px; margin-top: 18px; background: var(--surface); overflow: clip; }
.rh-result-drawer > summary { min-height: 52px; padding: 15px 18px; font-size: 15px; font-weight: 750; color: var(--mountain); }
.rh-result-drawer .rh-results { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.rh-insight { padding: 20px; margin-top: 18px; }
.rh-insight > .rh-section-head h3 { font-size: 18px; }
.rh-scenario-story > summary, .rh-scenario-extra > summary { min-height: 44px; padding: 12px 0; color: var(--mountain); font-size: 14px; font-weight: 700; }
.rh-scenario-story > p, .rh-scenario-extra > p { font-size: 14px; line-height: 1.8; }
.rh-risk-inline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 0; border-block: 1px solid var(--rh-line); font-size: 14px; }
.rh-risk-inline strong { font-size: 24px; }
.rh-risk-inline span { flex-basis: 100%; font-size: 12px; color: var(--mountain); }
.rh-risk-review { margin: 12px 0; }
.rehearsal-active .passport-tabs { display:flex; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; padding:4px; gap:4px; margin-block:8px 4px; box-shadow:0 4px 14px var(--rh-shadow); }
.rehearsal-active .passport-tab { flex:1 0 auto; min-width:max-content; min-height:44px; padding-inline:6px; white-space:nowrap; font-size:13px; }
.rehearsal-active .passport-tab:focus-visible { outline-offset:-3px; }
.rehearsal-active .race-subtabs { position: static; top: auto; z-index: auto; margin-top: 6px; padding: 4px; gap: 4px; box-shadow: 0 4px 14px var(--rh-shadow); }
.rehearsal-active .race-subtab { font-size: 13px; }
@media (max-width: 800px) {
  .rh-layout { gap: 14px; }
  .rh-analysis-first { order: -4; width: 100%; }
  .rh-progress { order: -5; width: 100%; margin-block: 0; }
  .rh-setup-drawer { order: -3; width: 100%; }
  .rh-course-slot { order: -1; width: 100%; margin-top: 0; }
  .rh-result-drawer { order: 0; width: 100%; margin-top: 0; }
  .rh-insight { order: 1; width: 100%; margin-top: 0; }
  .rh-method { order: 2; width: 100%; }
  .rh-history { order: 3; width: 100%; }
  .rh-context-full dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .rh-analysis-first { padding: 14px; }
  .rh-analysis-first .rh-race-strip h3 { font-size: 16px; }
  .rehearsal .rh-analysis-first .rh-strategy-choice { font-size: 12px; padding-inline: 1px; }
  .rh-analysis-first .rha-heading > label { font-size: 12px; }
  .rh-analysis-first .rha-heading select { max-width: 112px; font-size: 12px; }
  .rh-analysis-first .rha-legend { font-size: 12px; }
  .rh-insight { padding: 16px; }
}
.rehearsal { scroll-margin-top: 118px; }
.rh-weather-strip { grid-column: 1 / -1; color: var(--mountain); font-size: 12px; line-height: 1.6; margin-top: 3px; }
.rh-weather-controls { border-top: 1px solid var(--rh-line); padding-top: 16px; margin-bottom: 16px; }
.rh-weather-controls > details > summary, .rh-weather-preview details > summary { font-size: 13px; min-height: 44px; padding: 12px 0; color: var(--mountain); }
.rh-weather-preview { margin-top: 14px; padding: 12px; border: 1px solid var(--rh-line); border-radius: 6px; background: var(--paper-mist); font-size: 13px; line-height: 1.75; }
.rh-weather-preview p { margin: 7px 0; }
.rh-weather-table { overflow: auto; }
.rh-weather-table table { width: 100%; min-width: 410px; border-collapse: collapse; font-size: 12px; }
.rh-weather-table :is(th, td) { padding: 8px 6px; border-bottom: 1px solid var(--rh-line); text-align: left; white-space: nowrap; }
.rh-weather-table small { display: block; }
.rh-heading { display: none; }
.rehearsal .rh-analysis-first .rha-heading { margin-bottom: 4px; }
.rehearsal .rh-analysis-first .rha-legend { font-size: 12px; gap: 5px 9px; margin: 8px 0; }
.rehearsal .rh-analysis-first .rha-legend .rha-key { font-size: 12px; }
.rehearsal .rh-analysis-first .rha-chart { margin-top: 0; }
.rh-context { margin-top: 14px; }
@media(max-width:800px) { .rh-context { order: 1; width: 100%; margin-block: 0; } }
.rh-validation-details { border-top: 1px solid var(--rh-line); font-size: 13px; line-height: 1.8; margin-top: 12px; }
.rh-validation-details > summary { min-height: 44px; padding: 12px 0; color: var(--mountain); font-weight: 700; }
.rh-validation-details ul { list-style: none; padding: 0; }
.rh-validation-details li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; border-top: 1px solid var(--rh-line); padding: 12px 0; }
.rh-validation-details li > span { color: var(--pending); }
.rh-validation-details li > p { grid-column: 1 / -1; margin: 0; color: var(--mountain); }
.rh-chart-hint { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--mountain); }
.rh-analysis-validity[data-state=fail] { color: var(--sun-ink); background: color-mix(in srgb, var(--sun) 14%, var(--surface)); }
.rh-race-strip h3 { overflow-wrap: anywhere; word-break: keep-all; }
.rh-weather-preview { overflow-wrap: anywhere; }
.rehearsal-active .passport-tabs, .rehearsal-active .race-subtabs { box-shadow: 0 4px 14px color-mix(in srgb, var(--forest-deep) 9%, transparent); }

.rh-form-migration { padding: 10px 12px; margin: 0 0 14px; border-left: 3px solid var(--pending); border-radius: 5px; background: var(--paper-mist); color: var(--mountain); font-size: 13px; line-height: 1.75; }

.rh-station-strip { display:block; color:var(--forest-deep); font-size:12px; line-height:1.6; margin-top:3px; }
.rh-station-evidence { padding:12px 14px; margin:12px 0 16px; border:1px solid var(--meadow); border-radius:8px; background:var(--paper-mist); color:var(--ink); font-size:13px; line-height:1.75; }
.rh-station-evidence strong { font-size:14px; }
.rh-station-evidence p { margin:6px 0; }
.rh-station-evidence a { display:inline-flex; align-items:center; min-height:44px; color:var(--forest-deep); text-underline-offset:3px; }
.rh-station-evidence.is-assumption { border-color:var(--pending); }

.rh-condition-change > p { margin:0 0 6px; }
.rh-condition-change summary, .rh-condition-extra > summary { min-height:44px; padding:11px 0; line-height:1.7; cursor:pointer; }
.rh-condition-change li { margin:6px 0; }
.rh-condition-extra { margin-top:6px; font-size:13px; line-height:1.75; }
.rh-condition-extra > p { margin:8px 0 0; color:var(--mountain); }

.rh-execution-diagnostics { margin-top:16px; border:1px solid var(--rh-line); border-radius:8px; background:var(--paper); padding:0 12px; font-size:13px; line-height:1.75; }
.rh-execution-diagnostics > summary { min-height:44px; padding:12px 0; cursor:pointer; font-weight:700; }
.rh-execution-diagnostics table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
.rh-execution-diagnostics th, .rh-execution-diagnostics td { padding:10px 4px; border-bottom:1px solid var(--rh-line); text-align:center; vertical-align:middle; overflow-wrap:anywhere; }
.rh-execution-diagnostics th:first-child { width:28%; text-align:left; color:var(--mountain); }
.rh-execution-diagnostics thead th { font-weight:650; word-break:keep-all; }
.rh-execution-diagnostics th > span, .rh-execution-diagnostics td > span { display:block; font-size:12px; line-height:1.6; color:var(--mountain); }
.rh-execution-diagnostics td > strong { display:block; white-space:nowrap; font-size:17px; font-variant-numeric:tabular-nums; letter-spacing:-.02em; color:var(--ink); }
.rh-execution-diagnostics td > strong small { margin-left:1px; font-size:12px; font-weight:500; }
.rh-execution-diagnostics [data-selected=true] { background:var(--paper-mist); }
.rh-execution-diagnostics > p { margin:10px 0 14px; font-size:12px; color:var(--mountain); }

.rh-validation-decomposition strong { white-space:nowrap; }
.rh-validation-decomposition small { display:block; margin-top:4px; font-size:12px; color:var(--mountain); }

.rh-execution-count-value { display:inline-block; white-space:nowrap; }
.rh-execution-count > small { display:block; font-size:12px; }

.rh-performance-history { margin-top:20px; padding-top:16px; border-top:1px solid var(--rh-line); }
.rh-performance-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; }
.rh-performance-heading h4 { margin:0; font-size:15px; color:var(--ink); }
.rh-performance-heading > span { font-size:12px; color:var(--mountain); }
.rh-performance-history > p { margin:7px 0 12px; font-size:13px; line-height:1.75; color:var(--mountain); }
.rh-performance-history > ul { margin:0; padding:0; display:grid; gap:10px; list-style:none; }
.rh-performance-history li { min-width:0; padding:12px; border:1px solid var(--rh-line); border-radius:8px; background:var(--surface); }
.rh-performance-row-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.rh-performance-history .rh-performance-row-head > strong { font-size:14px; overflow-wrap:anywhere; }
.rh-performance-row-head time { font-size:12px; color:var(--mountain); white-space:nowrap; }
.rh-performance-distance { margin:5px 0 10px; font-size:12px; line-height:1.7; color:var(--mountain); }
.rh-performance-distance small { display:block; font-size:12px; }
.rh-performance-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.rh-performance-metrics > div { min-width:0; }
.rh-performance-metrics > div > span { display:block; margin-bottom:4px; font-size:12px; color:var(--mountain); }
.rh-performance-history .rh-performance-metrics strong { display:block; white-space:nowrap; font-size:16px; line-height:1.5; font-variant-numeric:tabular-nums; letter-spacing:-.025em; }
.rh-performance-metrics strong small { font-size:12px; font-weight:500; }
.rh-performance-moving { margin:9px 0 0; font-size:12px; color:var(--mountain); }
.rh-performance-history .rh-performance-recency { display:block; margin-top:6px; font-size:12px; color:var(--mountain); }
.rh-performance-history > .rh-performance-snapshot-note { margin-bottom:0; font-size:12px; }
.rh-performance-history dl.rh-device-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.rh-performance-history .rh-device-grid > div { min-width:0; padding:12px; background:var(--surface); border:1px solid var(--rh-line); border-radius:8px; }
.rh-device-grid dt, .rh-device-grid time, .rh-device-grid > div > small { display:block; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.rh-device-grid dd { margin:5px 0; font-size:22px; font-weight:750; font-variant-numeric:tabular-nums; }
.rh-device-grid dd small { font-size:12px; font-weight:500; }
@media(max-width:600px) { .rh-performance-history dl.rh-device-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } }
.rh-performance-history + .rh-plan-meta { margin-top:14px; margin-bottom:0; }

/* Primary rehearsal surface: the real scene stays open, then computed analysis. */
.rehearsal-active [data-tab-panel="race"] > .race-section--hero { display:none; }
.rehearsal > .rh-stage { width:100%; margin-bottom:18px; scroll-margin-top:112px; }
.rehearsal > .rh-analysis-first { width:100%; margin-bottom:18px; }
.rehearsal > .rh-stage .rh-world-scene { height:clamp(320px,48vh,520px); }
.rehearsal > .rh-stage .rh-world-scene.is-uncomputed { height:260px; }
.rh-world-empty { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:12px; padding:28px 22px; color:var(--ink); background:var(--paper-mist); text-align:center; }
.rh-world-empty strong { font-size:21px; line-height:1.4; }
.rh-world-empty p { max-width:440px; margin:0; font-size:14px; line-height:1.7; color:var(--mountain); }
.rh-world-empty[hidden], .is-uncomputed :is(.rh-world-hud,.rh-world-order,.rh-world-event) { display:none; }
.rh-player-overlay { z-index:2; }
.has-scene-message .rh-player-overlay { visibility:hidden; }
.rh-world-empty { z-index:1; }
.is-uncomputed > canvas { visibility:hidden; }
.rh-stage [data-rh-analysis-open][hidden] { display:none; }
@media (max-width:420px) {
  .rehearsal > .rh-stage { margin-bottom:14px; }
  .rehearsal > .rh-analysis-first { margin-bottom:14px; }
  .rh-world-empty strong { font-size:18px; }
}


.rh-world-cut { position:absolute; inset:0; z-index:4; opacity:0; pointer-events:none; background:var(--world-pine); transition:opacity .12s ease-out; }
.rh-world-cut.is-active { opacity:1; transition:none; }
.rh-cut-status { font-size:12px; line-height:1.6; margin:10px 0 0; color:var(--world-action); }
@media (prefers-reduced-motion:reduce) { .rh-world-cut { transition:none; } }
.rh-model-aggregate { border-top:1px solid var(--rh-line); padding:0 14px 12px; }
.rh-model-aggregate > summary { min-height:44px; padding:13px 0; color:var(--pending); font-size:13px; font-weight:700; line-height:1.6; cursor:pointer; }
.rh-model-aggregate > p { margin:5px 0 12px; color:var(--mountain); font-size:12px; line-height:1.75; word-break:keep-all; overflow-wrap:anywhere; }
.rh-model-aggregate > p > strong, .rh-model-aggregate > p > span { display:block; }
.rh-model-aggregate > p > strong { color:var(--ink); margin-bottom:5px; font-size:13px; }

.rh-simulation-validation { margin:0; padding:0 14px; color:var(--mountain); font-size:12px; line-height:1.7; word-break:keep-all; }
.rh-probability-detail { display:grid; gap:12px; margin:14px 0; }
.rh-probability-detail dt { color:var(--mountain); font-size:12px; line-height:1.7; }
.rh-probability-detail dd { margin:4px 0 0; color:var(--ink); font-size:13px; line-height:1.7; }

/* Core results remain outside the optional detailed-strategy drawer. */
.rh-analysis-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:12px 0; }
.rh-analysis-nav > button { min-height:44px; padding:8px 5px; border:1px solid var(--rh-line); border-radius:6px; background:var(--paper); color:var(--mountain); font-size:12px; line-height:1.5; font-weight:700; white-space:normal; }
.rh-analysis-nav > button:focus-visible { outline:2px solid var(--pending); outline-offset:2px; }
.rh-analysis-first > .rh-field-ranks, .rh-analysis-first > .rh-distributions { min-width:0; }
.rh-analysis-first > .rh-field-ranks { scroll-margin-top:160px; }
