.prepayment-page .dashboard-shell { gap: 24px; }
.prepayment-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: clamp(24px, 5vw, 64px); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, #f7fcfa 0%, var(--surface) 55%, #fff7e4 100%); padding: clamp(28px, 5vw, 62px); box-shadow: var(--shadow); }
.prepayment-hero::after { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; right: -170px; top: -190px; border: 1px solid rgba(var(--primary-green-rgb), .16); border-radius: 50%; box-shadow: 0 0 0 55px rgba(var(--primary-green-rgb), .035), 0 0 0 110px rgba(166,106,0,.025); }
.prepayment-hero-copy { align-self: center; max-width: 760px; }
.prepayment-hero h1 { max-width: 700px; margin: 8px 0 14px; color: var(--heading); font-size: clamp(2.25rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.045em; }
.hero-lead { max-width: 720px; margin: 0; color: var(--text); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.65; }
.hero-human { max-width: 650px; margin: 16px 0 0; color: var(--muted); line-height: 1.7; }
.prepayment-cta, .calculate-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; border: 0; border-radius: 10px; background: var(--accent); color: white; padding: 13px 20px; font-weight: 800; text-decoration: none; box-shadow: 0 10px 24px rgba(var(--primary-green-rgb), .2); }
.prepayment-cta { margin-top: 24px; }
.hero-payoff-card { align-self: center; border: 1px solid rgba(var(--primary-green-rgb), .16); border-radius: 18px; background: rgba(255,255,255,.72); padding: 24px; backdrop-filter: blur(10px); box-shadow: var(--small-shadow); }
.hero-payoff-card > span { color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .14em; }
.hero-payoff-card strong { display: block; margin-top: 18px; color: var(--heading); font-size: 1.3rem; }
.hero-payoff-card p { margin: 6px 0 0; font-size: .92rem; line-height: 1.55; }
.hero-track { position: relative; height: 9px; margin-top: 22px; border-radius: 999px; background: #e1e9e6; }
.hero-track::after { content: ""; position: absolute; top: 50%; right: 0; width: 17px; height: 17px; transform: translate(50%,-50%); border: 4px solid var(--surface); border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.hero-track i { display: block; width: 62%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),#45a38e); }

.prepayment-calculator, .prepayment-guide { width: min(100%, var(--page-container-max)); }
.prepayment-calculator { display: block; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: clamp(20px, 4vw, 42px); box-shadow: var(--shadow); }
.calculator-heading { max-width: 740px; margin-bottom: 24px; }
.calculator-heading h2, .results-heading h2 { margin: 5px 0 8px; color: var(--heading); font-size: clamp(1.55rem,3vw,2.25rem); }
.calculator-heading p:last-child { margin: 0; line-height: 1.65; }
.prepayment-form { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg,var(--surface-tint),var(--surface)); padding: clamp(18px,3vw,28px); }
.prepayment-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.prepayment-form .field { min-width: 0; }
.prepayment-form label, .choice-field legend { color: var(--heading); font-size: .9rem; font-weight: 800; }
.prepayment-form .input-wrap, .select-wrap { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.select-wrap select { width: 100%; min-height: 48px; border: 0; outline: 0; background: transparent; color: var(--heading); padding: 0 12px; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); }
.preset-row { display: flex; gap: 6px; margin-top: 7px; }
.preset-row button { min-height: 30px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); padding: 4px 10px; font-size: .76rem; font-weight: 750; }
.preset-row button:hover { border-color: var(--active-border); color: var(--accent-dark); }
.choice-field { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; margin: 0; border: 0; padding: 0; }
.choice-field legend { grid-column: 1/-1; margin-bottom: 7px; }
.choice-field label { display: flex; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 11px; cursor: pointer; }
.choice-field label:has(input:checked) { border-color: var(--active-border); background: var(--accent-soft); }
.choice-field input { margin-top: 3px; accent-color: var(--accent); }
.choice-field span, .choice-field small { display: block; min-width: 0; }
.choice-field small { margin-top: 3px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.form-message { display: none; margin: 16px 0 0; border-radius: 8px; background: #fff2ef; color: var(--danger); padding: 10px 12px; }
.form-message:not(:empty) { display: block; }
.calculate-button { width: 100%; margin-top: 22px; font-size: 1rem; }
.calculate-button span { margin-left: 8px; font-size: 1.3rem; }

.prepayment-results { display: grid; gap: 22px; margin-top: 36px; scroll-margin-top: 20px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.results-heading p, .results-heading h2 { margin-bottom: 0; }
.results-heading > span { flex: 0 0 auto; border: 1px solid rgba(var(--primary-green-rgb),.17); border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); padding: 8px 12px; font-size: .8rem; font-weight: 800; }
.results-dashboard { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.metric-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 19px; box-shadow: var(--small-shadow); }
.metric-card > span, .metric-card > small, .metric-card > strong { display: block; }
.metric-card > span { color: var(--muted); font-size: .82rem; font-weight: 720; }
.metric-card > strong { overflow-wrap: anywhere; margin: 8px 0 5px; color: var(--heading); font-size: clamp(1.35rem,2.5vw,1.85rem); letter-spacing: -.03em; }
.metric-card > small { color: var(--muted); line-height: 1.4; }
.metric-highlight { border-color: rgba(var(--primary-green-rgb),.25); background: linear-gradient(145deg,var(--accent-soft),var(--surface)); }
.metric-highlight > strong { color: var(--accent-dark); }
.debt-free-visual { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(115deg,#f2faf7,var(--surface) 65%,#fff8e7); padding: clamp(20px,3vw,30px); }
.visual-copy { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 10px 24px; align-items: end; }
.visual-copy > span { grid-column: 1/-1; color: var(--gold); font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.visual-copy h3, .visual-copy p { margin: 0; }
.visual-copy h3 { color: var(--heading); font-size: 1.35rem; }
.visual-copy p { line-height: 1.6; }
.timeline-labels { display: flex; justify-content: space-between; gap: 8px; margin-top: 28px; color: var(--muted); font-size: .76rem; }
.timeline-labels span:nth-child(2) { color: var(--accent-dark); font-weight: 800; }
.payoff-track { position: relative; height: 10px; margin: 10px 8px 5px; border-radius: 999px; background: #dbe4e1; }
.payoff-fill { width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),#64b7a3); transition: width .45s ease; }
.payoff-track::after, .payoff-track i { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; transform: translate(-50%,-50%); border: 4px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--gold); }
.payoff-track::after { left: 100%; background: var(--gold); }
.payoff-track i { left: 100%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); transition: left .45s ease; }
.family-meaning { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; border: 1px solid rgba(166,106,0,.2); border-left: 5px solid var(--gold); border-radius: 14px; background: var(--gold-soft); padding: clamp(20px,3vw,28px); }
.meaning-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--surface); color: var(--gold); font-size: 1.6rem; }
.family-meaning h3 { margin: 4px 0 8px; color: var(--heading); }
.family-meaning p:last-child { max-width: 900px; margin: 0; line-height: 1.7; }
.result-table-section { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px,3vw,24px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h3, .section-heading p { margin: 0; }
.section-heading h3 { color: var(--heading); }
.section-heading p { max-width: 520px; text-align: right; font-size: .9rem; }
.prepayment-results table { min-width: 860px; }
.prepayment-results th { white-space: normal; }
.prepayment-results td:first-child { color: var(--heading); font-weight: 750; }

.prepayment-guide { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: clamp(24px,5vw,50px); box-shadow: var(--shadow); }
.prepayment-guide > h2 { max-width: 800px; margin: 42px 0 12px; color: var(--heading); font-size: clamp(1.55rem,3vw,2.15rem); }
.prepayment-guide > h2:first-of-type { margin-top: 8px; }
.prepayment-guide > p { max-width: 900px; line-height: 1.75; }
.guide-grid, .decision-grid, .care-grid { display: grid; gap: 14px; margin: 24px 0; }
.guide-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.decision-grid, .care-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.guide-grid article, .decision-grid article, .care-grid section { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-tint); padding: 22px; }
.guide-grid span { color: var(--gold); font-size: .78rem; font-weight: 900; }
.guide-grid h3, .decision-grid h3 { margin: 8px 0; color: var(--heading); }
.guide-grid p { margin: 0; line-height: 1.6; }
.decision-grid li, .care-grid li { margin: 8px 0; line-height: 1.55; }
.care-grid .careful { background: linear-gradient(145deg,#fff9eb,var(--surface)); }
.care-grid h2 { margin: 0 0 12px; color: var(--heading); font-size: 1.3rem; }
.planning-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.planning-links a { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-tint); padding: 18px; text-decoration: none; transition: transform .2s ease,border-color .2s ease; }
.planning-links a:hover { transform: translateY(-2px); border-color: var(--active-border); }
.planning-links strong, .planning-links span { display: block; }
.planning-links strong { color: var(--accent-dark); }
.planning-links span { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.prepayment-guide .content-grid { margin-top: 16px; }
.seo-tail { margin-top: 28px; }

:root[data-theme="dark"] .prepayment-hero { background: linear-gradient(135deg,#12362f,var(--surface) 55%,#342913); }
:root[data-theme="dark"] .hero-payoff-card, :root[data-theme="dark"] .metric-card { background: rgba(18,48,44,.88); }
:root[data-theme="dark"] .debt-free-visual { background: linear-gradient(115deg,#123a34,var(--surface) 65%,#332a15); }
:root[data-theme="dark"] .prepayment-form .input-wrap, :root[data-theme="dark"] .select-wrap, :root[data-theme="dark"] .preset-row button, :root[data-theme="dark"] .choice-field label { background: var(--surface); }

@media (max-width: 900px) { .prepayment-hero { grid-template-columns: 1fr; } .hero-payoff-card { max-width: 520px; } .results-dashboard { grid-template-columns: repeat(2,minmax(0,1fr)); } .visual-copy { grid-template-columns: 1fr; } .visual-copy > span { grid-column: auto; } }
@media (max-width: 680px) { .prepayment-hero, .prepayment-calculator, .prepayment-guide { border-radius: 14px; } .prepayment-form-grid, .guide-grid, .decision-grid, .care-grid, .planning-links { grid-template-columns: 1fr; } .results-dashboard { grid-template-columns: 1fr 1fr; } .results-heading, .section-heading { align-items: start; flex-direction: column; } .section-heading p { text-align: left; } .choice-field { grid-template-columns: 1fr; } .choice-field legend { grid-column: auto; } }
@media (max-width: 460px) { .prepayment-hero h1 { font-size: 2.25rem; } .results-dashboard { grid-template-columns: 1fr; } .metric-card { padding: 16px; } .family-meaning { grid-template-columns: 1fr; } .timeline-labels span:nth-child(2) { text-align: center; } }
