:root {
  color-scheme: light;
  --ink: #191b31;
  --muted: #5e6176;
  --accent: #5142ce;
  --dark: #242047;
  --line: #e3e4ef;
  --surface: #fff;
  --page: #f6f7fc;
  font: 16px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #6554e8; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1152px, calc(100% - 64px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.wordmark { display: inline-flex; align-items: center; font-size: 1.45rem; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; margin-right: 9px; background: var(--accent); color: white; width: 34px; height: 34px; border-radius: 10px; font-size: 1.35rem; }
.brand-dot { color: var(--accent); }
nav { display: flex; align-items: stretch; gap: 28px; align-self: stretch; margin: 0 auto; white-space: nowrap; }
nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; color: var(--muted); font-size: .9rem; font-weight: 600; }
nav a:hover, nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.quiet { padding: 7px 11px; border: 1px solid var(--line); background: #fff; color: var(--dark); border-radius: 9px; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.quiet:hover { border-color: var(--accent); color: var(--accent); }
.hero { display: grid; grid-template-columns: 1fr 1.02fr; min-height: 275px; margin: 32px 0 24px; background: #eae8fd; border-radius: 24px; overflow: hidden; }
.hero-copy { padding: 30px 36px 32px; align-self: center; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(3rem, 6.2vw, 5.1rem); font-weight: 780; line-height: .98; letter-spacing: -.075em; }
h1 em { color: var(--accent); font-style: normal; }
.hero p { margin-top: 17px; max-width: 350px; color: #474565; }
.hero-photo { min-height: 100%; background: #a3a9c4 url('coastal-drive.jpg') center 60% / cover no-repeat; }
.calculator-grid, .insights { display: grid; grid-template-columns: 1fr 1.02fr; align-items: start; gap: 22px; scroll-margin-top: 18px; }
.results { display: grid; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 19px; padding: 23px 24px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 1.3rem; font-weight: 740; letter-spacing: -.035em; line-height: 1.2; }
.inputs .panel-heading { margin-bottom: 24px; }
.field + .field { margin-top: 20px; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field label, legend { font-size: .95rem; font-weight: 660; }
.number-box { display: flex; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #f9f9fd; color: var(--muted); font-size: .88rem; }
.number-box input { text-align: right; width: 5.1rem; color: var(--ink); font-weight: 680; border: 0; background: transparent; padding: 1px 2px; appearance: textfield; }
.number-box input::-webkit-inner-spin-button, .number-box input::-webkit-outer-spin-button { appearance: none; }
input[type=range] { --fill: 0%; display: block; width: 100%; margin: 9px 0 3px; height: 22px; padding: 0; appearance: none; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--fill), #e8e8f5 var(--fill)); }
input[type=range]::-moz-range-track { height: 5px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--fill), #e8e8f5 var(--fill)); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; margin-top: -7.5px; border: 3px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 5px #5142ce66; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 5px #5142ce66; }
.ends { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.terms { margin: 21px 0 17px; border: 0; padding: 0; min-width: 0; }
.terms legend { margin-bottom: 9px; padding: 0; }
.term-buttons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.term-buttons button, .chips button { padding: 8px 3px; border: 1px solid var(--line); border-radius: 8px; background: #f9f9fd; color: var(--dark); font-size: .88rem; font-weight: 640; }
.term-buttons button:hover, .chips button:hover { border-color: var(--accent); }
.term-buttons button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.adjustments { border-top: 1px solid var(--line); margin-top: 16px; }
summary { cursor: pointer; padding: 12px 0 0; font-size: .92rem; font-weight: 650; color: var(--accent); }
.adjustments[open] summary { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.check { display: flex; gap: 7px; align-items: start; font-size: .88rem; margin-top: 10px; }
.check input { accent-color: var(--accent); }
.payment { background: var(--dark); color: white; border-radius: 19px; padding: 23px 24px 21px; }
.payment h2 { color: #ddd9ff; font-size: .97rem; letter-spacing: 0; font-weight: 620; }
.payment-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin: 8px 0 18px; color: #ddd9ff; }
.payment-figure strong { font-size: clamp(2.55rem, 5vw, 3.65rem); font-weight: 760; letter-spacing: -.065em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.payment-stats, .savings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.payment-stats { padding-top: 14px; border-top: 1px solid #514a78; }
dt { font-size: .82rem; color: var(--muted); line-height: 1.25; }
dd { font-weight: 730; letter-spacing: -.025em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.payment-stats dt { color: #ddd9ff; }
.bolt { background: #eeebff; color: var(--accent); border-radius: 8px; display: grid; place-items: center; width: 30px; height: 30px; font-size: 1.25rem; font-weight: 800; }
.intro { color: var(--muted); margin: 6px 0 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chips button { padding: 5px 11px; }
.chips button[aria-pressed=true] { color: var(--accent); border-color: #c5bbf8; background: #eeebff; }
.savings { margin-top: 15px; padding: 13px; background: #ecf8f2; border-radius: 10px; }
.savings dt { color: #315d4e; }
.savings dd { font-size: 1.2rem; color: #125c44; }
.payoff-note { margin-top: 9px; }
.insights { margin-top: 22px; }
#payoff, #compare { scroll-margin-top: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 13px; color: var(--muted); font-size: .85rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { height: 3px; width: 14px; border-radius: 2px; background: #797c98; }
.legend span + span i { background: var(--accent); }
#chart { width: 100%; height: 195px; display: block; margin-top: 12px; }
.chart-control { border-top: 1px solid var(--line); padding-top: 10px; }
.chart-control label { display: flex; justify-content: space-between; font-size: .88rem; }
.chart-control .hint { margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: right; border-bottom: 1px solid var(--line); padding: 8px 7px; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-size: .8rem; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.compare-table tr.selected { background: #efedff; color: #4134b9; }
.compare-table button { color: inherit; border: 0; padding: 3px; background: transparent; font-weight: 700; }
.compare-table button:hover { text-decoration: underline; }
.schedule { margin-top: 22px; }
.table-wrap { max-height: 350px; overflow: auto; margin-top: 9px; }
.table-wrap thead { position: sticky; top: 0; background: #f9f9fd; }
.advertising { margin-top: 32px; padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.ad-label { color: var(--muted); font-size: .8rem; font-weight: 650; }
footer { display: flex; align-items: start; gap: 22px; justify-content: space-between; padding: 24px 0 32px; }
footer p { max-width: 630px; color: var(--muted); font-size: .85rem; }
@media (max-width: 800px) {
  .shell { width: calc(100% - 36px); }
  .hero-copy { padding-inline: 25px; }
  .panel, .payment { padding-inline: 17px; }
  .calculator-grid, .insights { gap: 14px; }
  .savings dd { font-size: 1.04rem; }
}
@media (max-width: 650px) {
  .top-inner { flex-wrap: wrap; gap: 3px 14px; padding-top: 10px; }
  .reset { margin-left: auto; }
  nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; margin: 0; }
  nav a { padding: 9px 0; }
  .hero { grid-template-columns: 1fr; margin: 17px 0 16px; }
  .hero-copy { padding: 24px; }
  .hero-photo { min-height: 153px; background-position: center 57%; }
  .calculator-grid, .insights { grid-template-columns: 1fr; }
  .results { gap: 14px; }
  .payment, .panel { padding-inline: 18px; }
  footer { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.quiet:disabled { cursor: default; opacity: .55; }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.6rem); }
.learning, .advertiser { margin-top: 22px; }
.guide-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.guide-links a { display: grid; gap: 5px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.guide-links a:hover { border-color: var(--accent); }
.guide-links strong, .footer-link { color: var(--accent); }
.guide-links span { color: var(--muted); font-size: .9rem; }
.inquiry-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.inquiry-fields label { display: grid; gap: 5px; font-size: .95rem; font-weight: 650; }
.inquiry-fields small { font-size: inherit; font-weight: 400; color: var(--muted); }
.inquiry-wide { grid-column: 1 / -1; }
.inquiry-fields input, .inquiry-fields textarea { width: 100%; background: #f9f9fd; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font: inherit; font-weight: 400; }
.inquiry-fields textarea { resize: vertical; }
.inquiry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; margin-top: 14px; }
.inquiry-actions button { background: var(--accent); color: white; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 650; }
.inquiry-actions button:disabled { opacity: .65; cursor: wait; }
.inquiry-actions .hint { margin-top: 0; }
.inquiry-actions a, .footer-link { text-decoration: underline; text-underline-offset: 2px; }
#inquiry-status:not(:empty) { margin-top: 9px; }
#inquiry-status[data-result=success] { color: #125c44; }
#inquiry-status[data-result=error] { color: #952343; }
.advertising:has(ins[data-ad-status="unfilled"]) { display: none; }
.advertising ins { min-width: 0; }
.guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 65px; }
.guide { max-width: 860px; margin-top: 28px; padding-bottom: 28px; }
.guide h1 { font-size: clamp(2rem, 5.25vw, 3.55rem); line-height: 1.03; letter-spacing: -.055em; }
.guide h2 { margin-top: 26px; }
.guide p, .guide ol, .guide ul, .guide table { margin-top: 12px; }
.guide li + li { margin-top: 6px; }
.guide a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.guide .hint { margin-top: 10px; }
.guide .guide-table { overflow-x: auto; }
.guide .eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 650; }
.guide .inquiry-message { padding-bottom: 16px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.guide .inquiry-text { white-space: pre-wrap; }
@media (max-width: 650px) {
  .guide-links, .inquiry-fields { grid-template-columns: 1fr; }
}
