:root {
  --ink: #18302d;
  --muted: #60726f;
  --paper: #f8f6f0;
  --card: #ffffff;
  --line: #dce3df;
  --forest: #173f3a;
  --teal: #2f7469;
  --mint: #dcece6;
  --coral: #d66f55;
  --gold: #b9893f;
  --mc-blue: #0072b2;
  --mc-orange: #d88b00;
  --mc-purple: #a85aa4;
  --mc-charcoal: #333d3b;
  --shadow: 0 18px 50px rgba(24,48,45,.09);
  --radius: 20px;
  --toc-rail: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button { color: inherit; }

.topbar { position: sticky; z-index: 20; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px clamp(20px,4vw,64px); background: rgba(248,246,240,.93); border-bottom: 1px solid rgba(24,48,45,.1); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; color: white; background: var(--forest); font-family: Georgia, serif; font-size: 20px; }
.brand div { display: grid; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.brand span:last-child { color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.save-state { color: var(--teal); font-size: 12px; }
.data-transfer-button { white-space: nowrap; }

main { overflow-x: clip; }
main, footer { margin-left: var(--toc-rail); }
.model-toc { position: fixed; z-index: 17; top: 66px; bottom: 0; left: 0; width: var(--toc-rail); padding: 27px 18px 22px; overflow-y: auto; color: #dbe9e5; background: #102e2a; border-right: 1px solid rgba(255,255,255,.1); box-shadow: 10px 0 28px rgba(7,31,28,.08); }
.model-toc > strong { display: block; margin: 0 8px 17px; color: #fff; font-family: Georgia, serif; font-size: 21px; }
.model-toc ol { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.model-toc a { display: grid; grid-template-columns: 27px 1fr; align-items: start; gap: 9px; padding: 10px 9px; color: #c5d9d4; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-size: 12px; font-weight: 650; line-height: 1.3; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.model-toc a:hover { color: #fff; background: rgba(255,255,255,.07); }
.model-toc a:focus-visible { color: #fff; outline: 3px solid rgba(245,197,108,.55); outline-offset: 1px; }
.model-toc a.active { color: #102e2a; background: #f5c56c; border-color: #f5c56c; }
.toc-number { display: grid; place-items: center; width: 25px; height: 25px; margin-top: -2px; color: #102e2a; background: #dcece6; border-radius: 50%; font-size: 11px; font-weight: 850; }
.model-toc a.active .toc-number { background: #fff; }
.model-toc [id] { scroll-margin-top: 86px; }
.section[id], #moveDayMath, #annualCashFlow { scroll-margin-top: 82px; }
.section { max-width: 1320px; margin: 0 auto; padding: 82px clamp(20px,5vw,76px); }
.hero { max-width: none; min-height: 650px; color: #fff; background:
  radial-gradient(circle at 80% 15%, rgba(121,184,160,.23), transparent 28%),
  linear-gradient(135deg, #143934 0%, #1c5048 62%, #173f3a 100%); }
.hero-grid { max-width: 1180px; margin: 50px auto 0; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(40px,7vw,100px); }
.eyebrow { display: block; color: #76a89c; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.hero .eyebrow { max-width: 1180px; margin: 0 auto; color: #a8cec4; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(43px,6vw,78px); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; }
.lede { max-width: 650px; margin-bottom: 32px; color: #d4e4e0; font-size: clamp(17px,2vw,21px); }
.button { border: 0; border-radius: 999px; padding: 12px 19px; cursor: pointer; font-weight: 750; transition: transform .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--forest); background: #f5c56c; }
.button.ghost { padding: 9px 14px; border: 1px solid var(--line); background: transparent; font-size: 12px; }

.verdict-card { padding: clamp(26px,4vw,42px); color: var(--ink); background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.4); border-radius: 28px; box-shadow: 0 24px 70px rgba(4,26,23,.28); }
.verdict-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.verdict-heading { margin: 18px 0 12px; display: flex; align-items: flex-start; gap: 13px; }
.verdict-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; line-height: 1.12; }
.lean-badge { flex: 0 0 auto; padding: 5px 9px; color: white; background: var(--teal); border-radius: 7px; font-size: 10px; font-weight: 850; letter-spacing: .09em; }
#verdictText { color: var(--muted); }
.verdict-metrics { margin: 26px 0 16px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.verdict-metrics div { padding: 18px 10px; border-right: 1px solid var(--line); }
.verdict-metrics div:first-child { padding-left: 0; }
.verdict-metrics div:last-child { border-right: 0; }
.verdict-metrics span, .metric-card span, .comparison-strip span { display: block; min-height: 33px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.verdict-metrics strong { display: block; margin-top: 7px; font-size: 17px; }
.verdict-metrics .metric-label { display: flex; align-items: flex-start; gap: 5px; }
.tooltip-wrap { position: relative; }
.tooltip-trigger { display: inline-grid; flex: 0 0 auto; place-items: center; width: 18px; height: 18px; margin-top: -2px; padding: 0; color: var(--teal); background: #edf5f2; border: 1px solid #bfd5ce; border-radius: 50%; cursor: help; font-size: 11px; font-weight: 850; line-height: 1; }
.tooltip-trigger:hover, .tooltip-trigger:focus-visible { color: white; background: var(--teal); border-color: var(--teal); outline: none; }
.tooltip-trigger:focus-visible { box-shadow: 0 0 0 3px rgba(47,116,105,.2); }
.verdict-metrics .tooltip-panel { position: absolute; z-index: 8; left: 4px; bottom: calc(100% - 7px); display: block; width: min(310px, 75vw); min-height: 0; padding: 14px 15px; color: #e3efec; background: #102e2a; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 14px 35px rgba(4,26,23,.28); font-size: 12px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity .15s ease, transform .15s ease; }
.verdict-metrics .tooltip-panel b { display: block; margin-bottom: 6px; color: white; font-size: 12px; }
.verdict-metrics .tooltip-panel span { display: inline; min-height: 0; color: inherit; font-size: inherit; }
.verdict-metrics .tooltip-panel-right { right: 4px; left: auto; }
.tooltip-wrap:hover .tooltip-panel, .tooltip-wrap:focus-within .tooltip-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fine-print { margin-bottom: 0; color: var(--muted); font-size: 11px; }

.assumptions-section { padding-top: 92px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.section-heading h2 { margin: 7px 0 0; font-family: Georgia, serif; font-size: clamp(34px,4vw,52px); font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }
.assumption-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.text-button { padding: 5px 0; color: var(--teal); border: 0; border-bottom: 1px solid currentColor; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.inline-help { display: inline-flex; align-items: center; gap: 7px; }
.inline-help .tooltip-trigger { margin-top: 0; }
.inline-help .tooltip-panel { position: absolute; z-index: 8; right: 0; bottom: calc(100% + 8px); display: block; width: min(340px, 78vw); padding: 13px 14px; color: #e3efec; background: #102e2a; border-radius: 11px; box-shadow: 0 14px 35px rgba(4,26,23,.24); font-size: 12px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity .15s ease, transform .15s ease; }
.inline-help .tooltip-panel b { color: white; }
.candidate-manager { position: relative; z-index: 12; display: grid; grid-template-columns: 230px minmax(0,1fr) 190px; gap: 14px; margin-bottom: 18px; padding: 8px 0; background: var(--paper); }
.candidate-manager.is-fixed { position: fixed; z-index: 18; top: 66px; left: calc(50% + var(--toc-rail) / 2); width: min(calc(100% - var(--toc-rail) - 2 * clamp(20px,5vw,76px)), 1168px); margin: 0; transform: translateX(-50%); box-shadow: 0 12px 24px rgba(24,48,45,.08); }
#candidateManagerPlaceholder { height: 0; }
.current-home-card, .candidate-picker, .income-selector-card { padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.assumption-selector { display: grid; align-content: center; width: 100%; color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.assumption-selector:hover { border-color: var(--teal); transform: translateY(-1px); }
.assumption-selector:focus-visible { outline: 3px solid rgba(214,111,85,.42); outline-offset: 2px; }
.assumption-selector.selected { color: white; background: var(--forest); border-color: var(--forest); box-shadow: 0 10px 24px rgba(16,46,42,.16); }
.income-selector-card span { color: var(--teal); font-size: 10px; font-weight: 850; letter-spacing: .11em; }
.current-home-card strong, .income-selector-card strong { margin-top: 4px; font-family: Georgia, serif; font-size: 21px; }
.current-home-card small, .income-selector-card small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.assumption-selector.selected span { color: #9fc7bd; }
.assumption-selector.selected small { color: #cbdeda; }
.candidate-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.current-home-card { align-content: start; }
.current-home-card strong, .candidate-picker-heading strong { margin: 0; font-family: Georgia, serif; font-size: 21px; line-height: 1.2; }
.candidate-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.candidate-tab-item { display: inline-flex; align-items: stretch; overflow: hidden; color: var(--muted); background: #f1f4f1; border: 1px solid transparent; border-radius: 9px; transition: border-color .15s ease, opacity .15s ease, transform .15s ease; }
.candidate-tab-item.active { color: white; background: var(--teal); border-color: var(--teal); box-shadow: 0 5px 14px rgba(47,116,105,.18); }
.candidate-tab-item.dragging { opacity: .45; }
.candidate-tab-item.drag-over { border-color: #d66f55; box-shadow: 0 0 0 2px rgba(214,111,85,.18); transform: translateY(-1px); }
.candidate-drag-handle, .candidate-tab-button { color: inherit; background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 750; }
.candidate-drag-handle { padding: 7px 5px 7px 9px; cursor: grab; font-size: 15px; letter-spacing: -4px; line-height: 1; touch-action: none; }
.candidate-drag-handle:active { cursor: grabbing; }
.candidate-drag-handle:focus-visible, .candidate-tab-button:focus-visible { position: relative; z-index: 1; outline: 2px solid #d66f55; outline-offset: -2px; }
.candidate-tab-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px 9px 7px; }
.candidate-tab-button span { display: grid; place-items: center; width: 19px; height: 19px; color: var(--teal); background: white; border-radius: 50%; font-size: 10px; }
.candidate-tab-item.active .candidate-tab-button span { color: var(--teal); }
.candidate-name-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 13px; }
.candidate-name-row label { flex: 1; }
.candidate-name-row input { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; color: var(--ink); background: #fbfcfa; border: 1px solid #d8dfdb; border-radius: 9px; outline: none; font-weight: 700; }
.candidate-name-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,116,105,.11); }
.remove-candidate { flex: 0 0 auto; color: #a94f3b; }
.input-panel { margin-top: 0; padding: clamp(22px,4vw,38px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.assumptions-results-divider { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 3px 20px; margin: 42px 0 22px; padding: 20px 24px; color: white; background: var(--forest); border-radius: 14px; box-shadow: var(--shadow); }
.assumptions-results-divider span { grid-row: 1 / span 2; padding-right: 20px; color: #f5c56c; border-right: 1px solid rgba(255,255,255,.2); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.assumptions-results-divider strong { font-family: Georgia, serif; font-size: 21px; line-height: 1.2; }
.assumptions-results-divider p { margin: 0; color: #cbdeda; font-size: 12px; }
.panel-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 26px; }
.panel-intro h3 { margin: 0; font-family: Georgia, serif; font-size: 27px; }
.panel-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.input-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px 18px; }
.input-grid.compact { grid-template-columns: repeat(3,1fr); }
.realtor-field { grid-column: 1 / -1; }
.realtor-field .input-wrap input { padding-left: 13px; }
.realtor-field a:not(.disabled) { color: var(--teal); font-weight: 800; }
.input-wrap input.estimated-value { color: #8a9794; font-style: italic; }
.flood-zone-field .tooltip-wrap { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.input-tooltip-panel { position: absolute; z-index: 14; left: 0; bottom: calc(100% + 8px); display: block; width: min(470px, 84vw); padding: 14px 16px; color: #e3efec; background: #102e2a; border-radius: 12px; box-shadow: 0 14px 35px rgba(4,26,23,.24); font-size: 11px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity .15s ease, transform .15s ease; }
.input-tooltip-panel b, .input-tooltip-panel span { display: block; }
.input-tooltip-panel b { margin-bottom: 6px; color: white; }
.input-tooltip-panel strong { color: white; }
.tooltip-wrap:hover .input-tooltip-panel, .tooltip-wrap:focus-within .input-tooltip-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
.realtor-field a.disabled { color: #84918f; cursor: default; pointer-events: none; text-decoration: none; }
.pricing-flow { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; padding: 17px; background: #f4f8f5; border: 1px solid #cbded7; border-radius: 12px; }
.pricing-flow label { position: relative; }
.pricing-flow label:not(:last-child)::after { content: "→"; position: absolute; top: 36px; right: -15px; z-index: 1; display: grid; place-items: center; width: 12px; height: 20px; color: var(--teal); background: #f4f8f5; font-size: 12px; }
.inline-input-action { display: inline; padding: 0; color: var(--teal); background: none; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font: inherit; font-weight: 750; }
.inline-input-action:focus-visible { outline: 2px solid #d66f55; outline-offset: 2px; }
.inline-input-action:disabled { color: #84918f; cursor: default; border-bottom-color: transparent; }
.required-mark { color: #b84e39; font-weight: 900; }
.input-grid label.has-error { color: #a8402d; }
.input-grid label.has-error .input-wrap { border-color: #c8644d; box-shadow: 0 0 0 3px rgba(200,100,77,.10); }
.calculation-status { display: grid; gap: 5px; margin-bottom: 22px; padding: 15px 17px; color: #7e3022; background: #fff4f1; border: 1px solid #e4ad9f; border-radius: 11px; }
.calculation-status strong { font-size: 13px; }
.calculation-status span { font-size: 11px; line-height: 1.5; }
.calculation-status[hidden] { display: none; }
.analysis-section.candidate-incomplete .analysis-view { display: none !important; }
.incomplete-table-value { color: #a8402d; font-weight: 750; }
.input-subheading { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 4px; padding: 16px 0 2px; border-top: 1px solid var(--line); }
.input-subheading div { display: grid; gap: 2px; }
.input-subheading span { color: var(--teal); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.input-subheading small { color: var(--muted); font-size: 10px; }
.input-subheading strong { font-size: 18px; }
.input-output-card { align-self: end; min-height: 67px; padding: 10px 13px; background: var(--mint); border: 1px solid #c7dcd4; border-radius: 10px; }
.input-output-card span, .input-output-card small { display: block; color: var(--muted); font-size: 10px; }
.input-output-card strong { display: block; margin: 2px 0; font-size: 18px; }
.utility-method { margin-top: 22px; padding: 15px 17px; color: var(--muted); background: #f4f7f4; border-radius: 11px; }
.utility-method strong { display: block; margin-bottom: 3px; color: var(--forest); font-size: 11px; }
.utility-method p { margin: 0; font-size: 10px; }
.utility-method small { display: block; margin-top: 7px; color: #7c8d89; font-size: 9px; }
.utility-method a { color: var(--teal); }
label { color: var(--muted); font-size: 12px; font-weight: 700; }
label small { display: block; min-height: 15px; margin-top: 4px; color: #84918f; font-size: 10px; font-weight: 500; }
label small a { color: var(--teal); }
.input-wrap { display: flex; align-items: center; height: 45px; margin-top: 7px; overflow: hidden; color: var(--muted); background: #fbfcfa; border: 1px solid #d8dfdb; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,116,105,.11); }
.input-wrap b { padding-left: 13px; font-size: 12px; font-weight: 650; }
.input-wrap input, .input-wrap select { width: 100%; min-width: 0; padding: 10px 12px 10px 7px; color: var(--ink); border: 0; outline: 0; background: transparent; font-weight: 700; }
.input-wrap:has(input[readonly]) { background: #eef4f1; }
.input-wrap input[readonly] { cursor: default; }
.input-wrap select { padding-left: 12px; cursor: pointer; }
.input-wrap.suffix input { padding-left: 13px; }
.input-wrap.suffix b { padding: 0 13px 0 0; white-space: nowrap; }
.input-grid label.is-disabled { color: #89928f; }
.input-grid label.is-disabled .input-wrap { background: #f0f2ef; border-color: #e1e5e2; box-shadow: none; }
.input-grid label.is-disabled .input-wrap input { color: #89928f; cursor: not-allowed; }
.input-grid label.mortgage-input-hidden { visibility: hidden; }
.annuity-contract-card { margin-top: 24px; padding: clamp(20px,3vw,28px); background: #f4f8f5; border: 1px solid #cbded7; border-radius: 16px; }
.annuity-card-heading { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: end; }
.annuity-card-heading h3 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 24px; }
.annuity-card-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.annuity-facts { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-top: 22px; overflow: hidden; background: #cbded7; border: 1px solid #cbded7; border-radius: 12px; }
.annuity-facts div { padding: 15px; background: white; }
.annuity-facts strong, .annuity-facts span { display: block; }
.annuity-facts strong { color: var(--forest); font-size: 16px; }
.annuity-facts span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.annuity-timeline { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 18px; }
.annuity-timeline div { position: relative; padding: 13px 12px 13px 15px; border-left: 3px solid var(--teal); background: white; border-radius: 0 10px 10px 0; }
.annuity-timeline time, .annuity-timeline span { display: block; }
.annuity-timeline time { color: var(--forest); font-size: 10px; font-weight: 850; }
.annuity-timeline span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.income-booster { margin-top: 18px; padding: 0 16px; background: #fff9eb; border: 1px solid #ebd8ae; border-radius: 11px; }
.income-booster summary { padding: 13px 0; cursor: pointer; color: var(--forest); font-size: 12px; font-weight: 800; }
.income-booster p { margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.income-booster p strong { color: var(--forest); }
.income-booster small { display: block; margin: 10px 0 15px; color: #7f8076; font-size: 9px; }
.adl-list { display: flex; flex-wrap: wrap; gap: 6px; }
.adl-list span { padding: 5px 8px; color: var(--forest); background: white; border: 1px solid #e3d2a9; border-radius: 999px; font-size: 9px; font-weight: 750; }
.annuity-model-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; }
.annuity-model-note strong { color: var(--forest); }
.home-cost-comparison-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding: 15px 18px; background: #f5f8f5; border: 1px solid var(--line); border-radius: 13px; }
.home-cost-comparison-controls > div:first-child { min-width: 220px; }
.home-cost-comparison-controls strong, .home-cost-comparison-controls span { display: block; }
.home-cost-comparison-controls strong { color: var(--teal); font-size: 10px; letter-spacing: .09em; }
.home-cost-comparison-controls span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.prospective-comparison-picker { display: flex; align-items: flex-end; justify-content: flex-end; gap: 12px; flex: 1; }
.prospective-comparison-picker[hidden] { display: none; }
.prospective-comparison-picker > span { align-self: center; margin: 16px 0 0; font-weight: 800; }
.prospective-comparison-picker label { min-width: 165px; color: var(--muted); font-size: 10px; font-weight: 750; }
.prospective-comparison-picker select { display: block; width: 100%; margin-top: 5px; padding: 9px 30px 9px 10px; color: var(--ink); background: white; border: 1px solid #cdd8d3; border-radius: 8px; font: inherit; font-size: 11px; }
.prospective-comparison-picker .text-button { margin-bottom: 9px; white-space: nowrap; }
.comparison-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-top: 16px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.comparison-strip article { padding: 22px; background: white; }
.comparison-strip article.accent { background: var(--mint); }
.comparison-strip strong { display: block; margin: 7px 0 2px; font-size: 24px; }
.comparison-strip small { color: var(--muted); font-size: 10px; }
.candidate-title-line { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-empty { margin: 0; padding: 90px 20px; color: var(--muted); text-align: center; }
.housing-breakdown-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 16px; }
.housing-breakdown { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.breakdown-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.breakdown-heading > div { display: flex; align-items: center; gap: 9px; }
.breakdown-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 20px; }
.scenario-name.stay { color: #ad4934; }
.scenario-name.move { color: var(--teal); }
.breakdown-heading > strong { font-size: 20px; }
.scenario-dot { width: 9px; height: 9px; border-radius: 50%; }
.scenario-dot.stay { background: var(--coral); }
.scenario-dot.move { background: var(--teal); }
.breakdown-rows { padding-top: 8px; }
.breakdown-row { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; color: var(--muted); font-size: 12px; }
.breakdown-row strong { color: var(--ink); font-weight: 700; }
.breakdown-row.insurance { margin: 2px -9px; padding: 8px 9px; color: var(--forest); background: #eef5f1; border-radius: 8px; font-weight: 750; }
.breakdown-source-note { margin-top: 10px; padding: 9px 10px; color: var(--muted); background: #f5f7f4; border-radius: 8px; font-size: 10px; }
.maintenance-definition { display: flex; align-items: baseline; gap: 18px; margin-top: 16px; padding: 17px 20px; background: #fff8e8; border: 1px solid #ebd8ae; border-radius: 13px; }
.maintenance-definition strong { flex: 0 0 auto; font-family: Georgia, serif; font-size: 17px; }
.maintenance-definition p { margin: 0; color: var(--muted); font-size: 11px; }

.analysis-section { max-width: none; padding-left: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); padding-right: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); background: #edf1ed; }
.view-toggle { display: flex; padding: 4px; background: #dce4df; border-radius: 12px; }
.view-toggle button { padding: 9px 13px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
.view-toggle button.active { color: white; background: var(--forest); }
.cash-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.metric-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.metric-card.accent { background: var(--forest); }
.metric-card.accent span, .metric-card.accent small { color: #bcd2cc; }
.metric-card.accent strong { color: white; }
.metric-card strong { display: block; margin: 5px 0; font-size: 27px; }
.metric-card small { color: var(--muted); font-size: 10px; }
.chart-card, .equity-callout, .priority-intro, .drivers-grid, .next-test { margin-top: 16px; padding: clamp(20px,3vw,30px); background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.chart-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.chart-heading h3, .equity-callout h3, .priority-intro h3, .drivers-grid h3, .next-test h3 { margin-bottom: 6px; font-family: Georgia, serif; font-size: 25px; }
.chart-heading p, .equity-callout p, .priority-intro p, .drivers-grid p, .next-test p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px 15px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.legend b { color: var(--forest); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.legend small { flex-basis: 100%; text-align: right; color: var(--muted); font-size: 10px; }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }
.dot.stay { background: var(--coral); }
.dot.move { background: var(--teal); }
.chart { height: 300px; margin-top: 18px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 10px; }
.equity-callout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 32px; align-items: center; }
.equity-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.equity-step { padding: 14px; background: #f5f7f4; border-radius: 12px; }
.equity-step span { display: block; color: var(--muted); font-size: 10px; }
.equity-step strong { font-size: 16px; }
.year-details { margin-top: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.year-details summary { padding: 17px 20px; cursor: pointer; font-weight: 750; font-size: 13px; }
.column-guide { padding: 20px; background: #f5f8f5; border-top: 1px solid var(--line); }
.guide-intro { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.guide-intro strong { font-family: Georgia, serif; font-size: 19px; }
.guide-intro span { max-width: 630px; color: var(--muted); font-size: 11px; }
.guide-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.guide-grid div { padding: 13px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.guide-grid b { display: block; margin-bottom: 5px; color: var(--forest); font-size: 11px; }
.guide-grid span { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; }
.guide-formula { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 10px; color: var(--muted); background: var(--mint); border-radius: 9px; font-size: 11px; }
.guide-formula i { color: var(--teal); font-style: normal; font-weight: 900; }
.guide-formula strong { color: var(--forest); }
.column-guide > p { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.annuity-explainer { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 26px; padding: 18px 20px; color: #f4fbf8; background: var(--forest); border-top: 1px solid rgba(255,255,255,.12); }
.annuity-explainer div { display: grid; gap: 4px; }
.annuity-explainer span { color: #9fc7bd; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.annuity-explainer strong { font-family: Georgia, serif; font-size: 17px; line-height: 1.25; }
.annuity-explainer p { margin: 0; color: #cbdeda; font-size: 11px; }
.table-note { margin: 0; padding: 12px 20px 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.table-scroll { overflow-x: auto; }
.annual-table-sticky-scroll { position: fixed; z-index: 19; bottom: 0; display: none; height: 18px; overflow-x: auto; overflow-y: hidden; background: rgba(248,246,240,.98); border: 1px solid #bdcbc6; box-shadow: 0 -5px 16px rgba(16,46,42,.14); scrollbar-color: var(--teal) #e5ebe8; }
.annual-table-sticky-scroll.visible { display: block; }
.annual-table-sticky-scroll > div { height: 1px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; font-size: 12px; }
th { color: var(--muted); font-size: 10px; letter-spacing: .03em; }
th:first-child, td:first-child { text-align: left; }
.cashflow-table { min-width: 1360px; table-layout: fixed; }
.cashflow-table th, .cashflow-table td { padding-right: 11px; padding-left: 11px; }
.cashflow-table th { color: var(--forest); white-space: normal; vertical-align: bottom; font-size: 10px; font-weight: 800; line-height: 1.25; letter-spacing: 0; }
.cashflow-column-title, .cashflow-property-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cashflow-property-name { margin-top: 4px; color: var(--muted); font-weight: 650; }
.cashflow-table th:nth-child(1) { width: 8%; }
.cashflow-table th:nth-child(2), .cashflow-table th:nth-child(3) { width: 13%; }
.cashflow-table th:nth-child(4) { width: 15%; }
.cashflow-table th:nth-child(5), .cashflow-table th:nth-child(6) { width: 11%; }
.cashflow-table th:nth-child(7), .cashflow-table th:nth-child(8) { width: 14.5%; }
.vanguard-cell > span { display: block; font-weight: 800; }
.vanguard-cell > span.positive { color: var(--teal); }
.vanguard-cell > span.negative { color: var(--coral); }
.vanguard-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.closing-year-note { display: block; margin-top: 3px; color: var(--teal); font-size: 9px; font-weight: 750; white-space: normal; }

.priority-intro { display: flex; justify-content: space-between; align-items: center; margin-top: 0; }
.score-pair { display: flex; gap: 10px; }
.score-pair div { min-width: 105px; padding: 12px 16px; background: #f3f6f3; border-radius: 12px; }
.score-pair span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.score-pair strong { display: block; margin-top: 3px; font-size: 24px; }
.priority-table { margin-top: 16px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.priority-table td:first-child { font-weight: 700; }
.priority-table select { padding: 7px 9px; color: var(--ink); background: #f7f9f7; border: 1px solid var(--line); border-radius: 8px; }
.edge-pill { display: inline-block; min-width: 58px; padding: 4px 8px; text-align: center; color: var(--muted); background: #eef2ef; border-radius: 999px; font-size: 10px; font-weight: 750; }
.edge-pill.move { color: var(--teal); background: var(--mint); }
.edge-pill.stay { color: #a94f3b; background: #fae5df; }
#priorityView > .fine-print { margin-top: 12px; }
.drivers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 0; }
.driver-summary { padding: 24px; color: white; background: var(--forest); border-radius: 16px; }
.driver-summary .eyebrow { color: #9fc7bd; }
.driver-summary p { color: #cfdfdb; }
.driver-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.driver-chips span { padding: 6px 9px; color: #e4f0ed; background: rgba(255,255,255,.1); border-radius: 999px; font-size: 10px; }
.driver-list { margin: 14px 0 0; padding-left: 28px; }
.driver-list li { padding: 10px 0 10px 8px; border-bottom: 1px solid var(--line); }
.driver-list li:last-child { border-bottom: 0; }
.driver-list strong { display: block; font-size: 13px; }
.driver-list span { color: var(--muted); font-size: 11px; }
.next-test { display: flex; justify-content: space-between; align-items: center; gap: 25px; }

.quality-section { max-width: none; padding-left: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); padding-right: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); }
.quality-details { margin-top: 0; box-shadow: var(--shadow); }
.quality-details > summary { padding: 20px 24px; font-size: 14px; }
.quality-content { padding: clamp(22px,4vw,38px); border-top: 1px solid var(--line); }
.quality-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 24px; }
.quality-heading h2 { margin: 6px 0 8px; font-family: Georgia, serif; font-size: clamp(28px,3vw,40px); font-weight: 500; line-height: 1.1; }
.quality-heading p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }
.quality-exit-button { margin-top: 16px; padding: 10px 17px; color: white; background: var(--teal); box-shadow: 0 5px 14px rgba(47,116,105,.18); }
.quality-exit-button:hover { background: var(--forest); }
.quality-result { flex: 0 0 220px; padding: 15px 18px; background: var(--mint); border-radius: 12px; }
.quality-result span, .quality-result small { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .06em; }
.quality-result strong { display: block; margin: 3px 0; font-size: 22px; }
.quality-result small { font-weight: 500; letter-spacing: 0; }
.quality-result .text-button { margin-top: 9px; font-size: 11px; }
.quality-edit-actions { position: sticky; z-index: 14; top: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 18px; padding: 15px 18px; color: var(--ink); background: #fff4d9; border: 1px solid #d9b866; border-radius: 12px; box-shadow: 0 10px 25px rgba(24,48,45,.12); }
.quality-edit-actions[hidden] { display: none; }
.quality-edit-actions > div:first-child { display: grid; gap: 2px; }
.quality-edit-actions strong { font-family: Georgia, serif; font-size: 17px; }
.quality-edit-actions span { color: var(--muted); font-size: 11px; }
.quality-edit-actions > div:last-child { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; }
.quality-save-button { padding: 9px 15px; color: white; background: var(--teal); font-size: 12px; }
.quality-table { min-width: 720px; border: 1px solid var(--line); }
.quality-table th, .quality-table td { text-align: center; }
.quality-table th:first-child, .quality-table td:first-child { width: 48%; text-align: left; }
.quality-table td:first-child { font-weight: 700; }
.score-options { display: inline-flex; align-items: center; gap: 5px; }
.score-options button { display: grid; place-items: center; width: 29px; height: 29px; padding: 0; color: var(--teal); background: white; border: 1px solid #bfd5ce; border-radius: 50%; cursor: pointer; font-size: 12px; font-weight: 800; }
.score-options button:hover, .score-options button:focus-visible { background: #edf5f2; outline: none; }
.score-options button.selected { color: white; background: var(--teal); border-color: var(--teal); }
.score-options .quality-row-reset { width: auto; min-width: 45px; padding: 0 8px; color: #6e7d79; border-radius: 999px; font-size: 10px; }
.score-options .quality-row-reset:disabled { opacity: .38; cursor: default; background: white; }
.must-have-options button { width: auto; min-width: 70px; padding: 0 10px; border-radius: 999px; }
.must-have-options button:last-child { min-width: 88px; }
.quality-check { width: 19px; height: 19px; accent-color: var(--teal); cursor: pointer; }
.quality-row-fail { background: #fff1ed; }
.quality-row-incomplete { background: #fff9e8; }
.verdict-card.current-home-read .verdict-heading .lean-badge,
.verdict-card.current-home-read .verdict-metrics { display: none; }
.quality-guide { margin-top: 20px; padding: 16px 18px; color: var(--muted); background: #f5f8f5; border-radius: 11px; font-size: 12px; }
.quality-guide-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 18px; }
.quality-guide-top > div { min-width: 0; }
.quality-guide p { margin-bottom: 8px; }
.quality-guide ul { margin: 0; padding-left: 20px; }
.quality-guide li + li { margin-top: 5px; }
.quality-guide strong { color: var(--ink); }
.quality-factor-manager { margin: 0 0 18px; padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.quality-factor-manager > label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 800; }
.quality-factor-manager > div { display: flex; gap: 10px; }
.quality-factor-manager input { min-width: 0; flex: 1; padding: 11px 13px; color: var(--ink); background: #fbfcfa; border: 1px solid #cdd8d3; border-radius: 9px; font: inherit; font-size: 13px; }
.quality-factor-manager input:focus { border-color: var(--teal); outline: 2px solid rgba(47,116,105,.18); }
.quality-factor-manager small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.quality-factor-manager small.error { color: var(--coral); font-weight: 750; }
.quality-factor-cell { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.quality-factor-cell > span:first-child { white-space: normal; }
.quality-factor-actions { display: inline-flex; flex: 0 0 auto; gap: 9px; }
.quality-factor-actions button { padding: 0; color: var(--teal); background: transparent; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font-size: 10px; font-weight: 750; }
.quality-factor-actions [data-delete-factor] { color: var(--coral); }
.quality-factor-actions button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.quality-empty-state { padding: 28px !important; color: var(--muted); text-align: center !important; font-weight: 500 !important; }
.candidate-comparison-details { margin-top: 0; box-shadow: var(--shadow); }
.candidate-comparison-content { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.candidate-comparison-content > p { margin: 18px 0; color: var(--muted); font-size: 12px; }
.candidate-comparison-table { min-width: 760px; }
.candidate-comparison-table th { color: var(--forest); font-weight: 800; }
.candidate-comparison-table td:first-child { font-weight: 750; }
.candidate-comparison-table tbody tr { cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.candidate-comparison-table tbody tr:hover { background: #f0f6f3; }
.candidate-comparison-table .active-candidate-row { background: var(--mint); box-shadow: inset 5px 0 0 var(--teal); }
.candidate-comparison-select { padding: 2px 0; color: var(--teal); background: transparent; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font: inherit; font-weight: 800; text-align: left; }
.candidate-comparison-select:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.monte-carlo-section { max-width: none; padding-left: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); padding-right: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); background: #eef2f0; }
.monte-carlo-heading { align-items: flex-start; }
.monte-carlo-heading > div:first-child { max-width: 780px; }
.monte-carlo-heading p { max-width: 740px; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.monte-carlo-status { flex: 0 0 235px; padding: 17px 19px; color: white; background: var(--forest); border-radius: 14px; }
.monte-carlo-status span, .monte-carlo-status small { display: block; color: #bcd2cc; font-size: 10px; }
.monte-carlo-status span { font-weight: 800; letter-spacing: .1em; }
.monte-carlo-status strong { display: block; margin: 4px 0; font-size: 18px; }
.monte-carlo-status b { display: block; margin-top: 11px; padding-top: 10px; color: #fff; border-top: 1px solid rgba(255,255,255,.18); font-size: 12px; line-height: 1.35; }
.monte-carlo-controls { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.monte-carlo-controls label { color: var(--muted); font-size: 12px; font-weight: 750; }
.monte-carlo-controls .input-wrap { margin-top: 7px; }
.monte-carlo-controls small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.monte-carlo-explainer { display: flex; align-items: baseline; gap: 28px; margin-top: 16px; padding: 16px 20px; background: #fff8e8; border: 1px solid #ebd8ae; border-radius: 13px; }
.monte-carlo-explainer strong { flex: 0 0 auto; font-family: Georgia, serif; font-size: 17px; }
.monte-carlo-explainer p { margin: 0; color: var(--muted); font-size: 11px; }
.monte-carlo-explainer b { color: var(--ink); }
.monte-carlo-table-wrap { margin-top: 16px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 15px; }
.monte-carlo-table { min-width: 760px; }
.monte-carlo-table th { color: var(--forest); font-weight: 800; }
.monte-carlo-table td:first-child { font-weight: 750; }
.monte-carlo-table td:nth-child(n+2), .monte-carlo-table th:nth-child(n+2) { text-align: right; }
.monte-carlo-series-key { display: inline-flex; align-items: center; gap: 9px; }
.monte-carlo-series-line { display: inline-block; width: 28px; height: 0; border-top: 4px solid var(--mc-charcoal); }
.monte-carlo-series-line.candidate-1 { border-color: var(--mc-blue); }
.monte-carlo-series-line.candidate-2 { border-color: var(--mc-orange); border-top-style: dashed; }
.monte-carlo-series-line.candidate-3 { border-color: var(--mc-purple); border-top-style: dotted; }
.monte-carlo-chart-card { margin-top: 16px; padding: clamp(20px,3vw,30px); background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.monte-carlo-chart-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.monte-carlo-chart-heading h3 { margin-bottom: 6px; font-family: Georgia, serif; font-size: 25px; }
.monte-carlo-title-line { display: block; }
.monte-carlo-chart-heading p { max-width: 610px; margin: 0; color: var(--muted); font-size: 12px; }
.monte-carlo-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 15px; max-width: 470px; }
.monte-carlo-legend button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 11px; font-weight: 700; }
.monte-carlo-legend button[aria-pressed="false"] { opacity: .42; }
.monte-carlo-legend button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.monte-carlo-chart { height: 360px; margin-top: 20px; }
.monte-carlo-chart svg { width: 100%; height: 100%; overflow: visible; }
.monte-carlo-chart text { fill: var(--muted); font-size: 10px; }
.monte-carlo-chart .mc-axis-title { fill: var(--ink); font-size: 11px; font-weight: 700; }
.monte-carlo-chart .mc-grid { stroke: var(--line); stroke-width: 1; }
.monte-carlo-chart .mc-frame { fill: transparent; stroke: #b9c5c1; stroke-width: 1; }
.monte-carlo-chart .mc-current { fill: none; stroke: var(--mc-charcoal); stroke-width: 3; }
.monte-carlo-chart .mc-candidate-1 { fill: none; stroke: var(--mc-blue); stroke-width: 3; }
.monte-carlo-chart .mc-candidate-2 { fill: none; stroke: var(--mc-orange); stroke-width: 3; stroke-dasharray: 13 8; }
.monte-carlo-chart .mc-candidate-3 { fill: none; stroke: var(--mc-purple); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.monte-carlo-chart .mc-zero-marker line { stroke-width: 3; }
.monte-carlo-chart .mc-zero-marker text { font-size: 10px; font-weight: 800; }
.monte-carlo-chart .mc-zero-marker.current line { stroke: var(--mc-charcoal); }
.monte-carlo-chart .mc-zero-marker.current text { fill: var(--mc-charcoal); }
.monte-carlo-chart .mc-zero-marker.candidate-1 line { stroke: var(--mc-blue); }
.monte-carlo-chart .mc-zero-marker.candidate-1 text { fill: var(--mc-blue); }
.monte-carlo-chart .mc-zero-marker.candidate-2 line { stroke: var(--mc-orange); }
.monte-carlo-chart .mc-zero-marker.candidate-2 text { fill: var(--mc-orange); }
.monte-carlo-chart .mc-zero-marker.candidate-3 line { stroke: var(--mc-purple); }
.monte-carlo-chart .mc-zero-marker.candidate-3 text { fill: var(--mc-purple); }
.monte-carlo-values-card { margin-top: 16px; padding: clamp(20px,3vw,30px); background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.monte-carlo-values-heading h3 { margin-bottom: 6px; font-family: Georgia, serif; font-size: 25px; }
.monte-carlo-values-heading p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.monte-carlo-values-wrap { max-height: 520px; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.monte-carlo-values-table { min-width: 660px; }
.monte-carlo-values-table thead { position: sticky; z-index: 2; top: 0; background: #f5f8f5; }
.monte-carlo-values-table th { color: var(--forest); font-weight: 800; }
.monte-carlo-values-table th small { display: block; color: var(--muted); font-size: 9px; font-weight: 600; }
.monte-carlo-values-table th:not(:first-child), .monte-carlo-values-table td { text-align: right; }
.monte-carlo-values-table tbody tr:nth-child(even) { background: #fafbf9; }
.monte-carlo-footnote { margin: 14px 0 0; color: var(--muted); font-size: 11px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(20px,5vw,76px); color: #b8cbc6; background: #102e2a; font-size: 11px; }

.quick-start-section { max-width: none; padding-left: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); padding-right: max(clamp(20px,5vw,76px), calc((100vw - var(--toc-rail) - 1320px)/2 + 76px)); background: #f8f6f0; }
.quick-start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quick-start-grid article { padding: clamp(22px,3vw,32px); background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.quick-start-grid h3 { margin-bottom: 14px; font-family: Georgia, serif; font-size: 24px; }
.quick-start-grid ol, .quick-start-grid ul { margin: 0; padding-left: 22px; color: var(--muted); font-size: 14px; }
.quick-start-grid li + li { margin-top: 9px; }

@media (max-width: 1150px) {
  :root { --toc-rail: 64px; }
  .model-toc { padding: 20px 8px; }
  .model-toc > strong { margin: 0 0 14px; font-family: inherit; font-size: 11px; text-align: center; text-transform: uppercase; letter-spacing: .08em; }
  .model-toc a { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 9px 5px; }
  .model-toc .toc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 900px) {
  .hero-grid, .equity-callout, .drivers-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .input-grid { grid-template-columns: repeat(2,1fr); }
  .pricing-flow { grid-template-columns: repeat(2,1fr); }
  .pricing-flow label::after { display: none !important; }
  .comparison-strip, .housing-breakdown-grid { grid-template-columns: repeat(2,1fr); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .assumption-actions { justify-content: flex-start; }
  .section-heading .view-toggle { align-self: stretch; }
  .view-toggle button { flex: 1; }
  .guide-grid { grid-template-columns: repeat(2,1fr); }
  .home-cost-comparison-controls { align-items: flex-start; flex-direction: column; }
  .prospective-comparison-picker { width: 100%; justify-content: flex-start; }
  .annuity-facts, .annuity-timeline { grid-template-columns: repeat(2,1fr); }
  .quality-heading { align-items: flex-start; flex-direction: column; }
  .quality-result { flex-basis: auto; width: 100%; }
  .candidate-manager, .candidate-manager.is-fixed { position: static; grid-template-columns: 1fr; width: auto; padding: 0; transform: none; box-shadow: none; }
  .monte-carlo-controls { grid-template-columns: 1fr 1fr; }
  .monte-carlo-chart-heading { flex-direction: column; }
  .monte-carlo-legend { justify-content: flex-start; max-width: none; }
  .quick-start-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  .save-state, #printButton { display: none; }
  .top-actions { width: 100%; justify-content: flex-end; gap: 8px; }
  .data-transfer-button { padding: 7px 10px; font-size: 11px; }
  .section { padding: 62px 18px; }
  .hero { padding-top: 54px; }
  .hero-grid { margin-top: 30px; }
  h1 { font-size: 44px; }
  .verdict-metrics, .cash-summary, .input-grid, .input-grid.compact, .comparison-strip, .housing-breakdown-grid { grid-template-columns: 1fr; }
  .pricing-flow { grid-template-columns: 1fr; }
  .verdict-metrics div { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .verdict-metrics div:last-child { border-bottom: 0; }
  .verdict-metrics .tooltip-panel, .verdict-metrics .tooltip-panel-right { right: auto; left: 0; bottom: calc(100% - 5px); }
  .panel-intro, .chart-heading, .priority-intro, .next-test { align-items: flex-start; flex-direction: column; }
  .legend { justify-content: flex-start; }
  .legend small { text-align: left; }
  .score-pair { width: 100%; }
  .score-pair div { flex: 1; }
  .equity-steps { grid-template-columns: 1fr; }
  .guide-intro { flex-direction: column; gap: 8px; }
  .guide-grid { grid-template-columns: 1fr; }
  .annuity-card-heading, .annuity-facts, .annuity-timeline { grid-template-columns: 1fr; }
  .annuity-explainer { grid-template-columns: 1fr; gap: 10px; }
  .maintenance-definition { align-items: flex-start; flex-direction: column; gap: 6px; }
  .quality-guide-top { align-items: flex-start; flex-direction: column; }
  .quality-edit-actions { position: static; align-items: flex-start; flex-direction: column; gap: 12px; }
  .quality-factor-manager > div { align-items: stretch; flex-direction: column; }
  .prospective-comparison-picker { align-items: stretch; flex-direction: column; }
  .prospective-comparison-picker > span { align-self: flex-start; margin: 0; }
  .prospective-comparison-picker .text-button { align-self: flex-start; margin: 4px 0 0; }
  .assumptions-results-divider { grid-template-columns: 1fr; gap: 7px; }
  .assumptions-results-divider span { grid-row: auto; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .inline-help .tooltip-panel { right: auto; left: 0; }
  .candidate-name-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .chart { height: 245px; }
  .monte-carlo-controls { grid-template-columns: 1fr; }
  .monte-carlo-status { flex-basis: auto; width: 100%; }
  .monte-carlo-explainer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .monte-carlo-table-wrap { overflow-x: auto; }
  .monte-carlo-chart { height: 290px; }
  footer { flex-direction: column; }
}

@media print {
  @page { size: letter portrait; margin: .45in; }
  .topbar, .model-toc, .button, .text-button, .candidate-manager, #candidateManagerPlaceholder, .input-panel, .view-toggle, footer, .tooltip-trigger, .annual-table-sticky-scroll { display: none !important; }
  main, footer { margin-left: 0; }
  body, .analysis-section { background: white; }
  .hero { min-height: 0; padding: 30px; color: var(--ink); background: white; }
  .hero-grid { margin-top: 20px; grid-template-columns: 1fr 1fr; }
  .hero .eyebrow, .hero .lede { color: var(--muted); }
  h1 { font-size: 38px; }
  .verdict-card { box-shadow: none; border: 1px solid var(--line); }
  .section { padding: 30px; }
  .comparison-strip, .cash-summary { box-shadow: none; }
  .analysis-view { display: block !important; margin-top: 24px; }
  .analysis-view[hidden] { display: block !important; }
  .chart { height: 220px; }
  .candidate-comparison-content[hidden], .quality-content[hidden] { display: block !important; }
  .table-scroll, .monte-carlo-table-wrap, .monte-carlo-values-wrap { max-height: none; overflow: visible !important; }
  .candidate-comparison-table, .monte-carlo-table, .monte-carlo-values-table { width: 100%; min-width: 0; table-layout: fixed; }
  .candidate-comparison-table th, .candidate-comparison-table td,
  .monte-carlo-table th, .monte-carlo-table td,
  .monte-carlo-values-table th, .monte-carlo-values-table td {
    padding: 7px 5px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 9px;
    line-height: 1.25;
  }
  .candidate-comparison-table th:first-child { width: 24%; }
  .candidate-comparison-table th:nth-child(2) { width: 17%; }
  .candidate-comparison-table th:nth-child(3) { width: 20%; }
  .candidate-comparison-table th:nth-child(4) { width: 18%; }
  .candidate-comparison-table th:nth-child(5) { width: 21%; }
  .monte-carlo-table th:first-child { width: 29%; }
  .monte-carlo-table th:nth-child(n+2) { width: 23.66%; }
  .monte-carlo-values-table thead { position: static; }
}
