@font-face {
  font-family: DM Sans;
  src: url(dm-sans.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Space Grotesk;
  src: url(space-grotesk.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #25143d;
  --muted: #62566d;
  --purple: #6233bd;
  --line: #e8e0ef;
  --page: #f8f6fc;
  --wash: #f4effb;
  --lime: #e6fa88;
  --pink: #f6a9d1;
  --heading: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1rem/1.5 "DM Sans", system-ui, sans-serif;
}
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--heading); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, select, input[type="range"] { cursor: pointer; }
button { border: 0; }
:focus-visible { outline: 3px solid #7843dc; outline-offset: 3px; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip:focus { position: absolute; z-index: 2; background: white; padding: 10px 16px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 69px; display: flex; align-items: center; gap: 35px; }
.wordmark {
  display: flex;
  align-items: center;
  font: 700 1.66rem/1 var(--heading);
  letter-spacing: -.08em;
  white-space: nowrap;
}
.wordmark > span:last-child { color: var(--purple); }
.brand-icon {
  width: 34px;
  height: 34px;
  margin-right: 8px;
  background: var(--purple);
  border-radius: 10px;
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
}
.brand-icon::after {
  content: "";
  width: 23px;
  height: 23px;
  background: var(--lime);
  clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 63%, 50% 100%, 37% 63%, 0 50%, 37% 35%);
}
.page-nav, .header-tools { display: flex; align-items: center; gap: 8px; }
.page-nav a {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  border-radius: 9px;
  padding: 7px 12px;
}
.page-nav a:hover, .page-nav [aria-current] { background: var(--wash); color: var(--purple); }
.header-tools { margin-left: auto; gap: 14px; }
.help-button, .reset-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--purple);
  background: transparent;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: .875rem;
  font-weight: 700;
  white-space: nowrap;
}
.help-button { color: var(--ink); }
.help-button:hover, .reset-button:hover { background: var(--wash); color: var(--purple); }
.question-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 700 .73rem/1 system-ui, sans-serif;
}
.currency-picker, .term-picker { position: relative; }
.currency-picker::after, .term-picker::after, .chevron {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.currency-picker::after, .term-picker::after {
  position: absolute;
  top: calc(50% - 5px);
  right: 12px;
  pointer-events: none;
}
select { appearance: none; }
.currency-picker select {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: .875rem;
  font-weight: 700;
  padding: 8px 29px 8px 11px;
}
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 244px;
  background: #e2d3fc;
  border: 1px solid #d9c8f5;
  border-radius: 24px;
  margin-block: 28px 24px;
  padding: 27px 39px 30px;
}
.hero-content { z-index: 1; }
.eyebrow {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #bda1e7;
  border-radius: 6px;
  background: #f2eafe;
  color: #50259a;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.3rem);
  font-weight: 700;
  letter-spacing: -.084em;
  line-height: .99;
  margin-top: 10px;
}
.hero h1 span { color: #5824ae; }
.hero-content > p:last-child { color: #463653; margin-top: 13px; font-weight: 500; }
.hero-art {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%) rotate(-3deg);
  width: min(42%, 425px);
  height: auto;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(transparent, #000 5%, #000 94%, transparent);
  mask-composite: intersect;
}
.savings-hero { background: #f8cee5; border-color: #ebbad6; }
.savings-hero .eyebrow { border-color: #d5a0c1; background: #fde4f2; color: #61254b; }
.savings-hero h1 span { color: #7c2b66; }
.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr);
  gap: 22px;
  align-items: stretch;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 3px 0 #eae3f37a;
  min-width: 0;
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 17px; }
h2 { font-size: 1.47rem; line-height: 1.15; letter-spacing: -.048em; }
.reset-button span { font-size: 1.2rem; line-height: 1; }
.mode-picker {
  background: var(--wash);
  border: 1px solid #ece5f5;
  border-radius: 11px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 16px;
}
.mode-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: transparent;
  color: #534664;
  font-size: .91rem;
  font-weight: 700;
  min-height: 37px;
  padding: 5px 7px;
}
.mode-button:hover { background: #eae0f8; }
.mode-button[aria-pressed="true"] { color: #fff; background: var(--purple); }
.house-icon { font: 700 1.38rem/1 system-ui, sans-serif; }
.card-icon { width: 16px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.card-icon::after { content: ""; position: absolute; top: 3px; left: 0; right: 0; border-top: 1.5px solid currentColor; }
.field + .field { margin-top: 12px; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field label { font-size: .95rem; font-weight: 700; }
.value-box {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #e4daee;
  border-radius: 8px;
  background: #faf7fe;
  padding: 3px 9px;
  color: var(--ink);
}
.value-box:focus-within { border-color: #9c76d7; box-shadow: 0 0 0 2px #e5d6f9; }
.value-box:has([aria-invalid=true]) { border-color: #b54969; }
.value-box input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 1px 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.unit { font-size: .875rem; font-weight: 700; color: var(--muted); }
.amount-box { width: 125px; }
.rate-box { width: 83px; }
.rate-box input, .term-box input { text-align: right; }
.term-box { width: 112px; }
.term-picker select {
  padding: 2px 14px 2px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
}
.term-picker::after { right: 2px; top: calc(50% - 4px); width: 5px; height: 5px; }
input[type="range"] {
  display: block;
  appearance: none;
  height: 23px;
  width: 100%;
  background: transparent;
  margin: 4px 0 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 30px;
  background: linear-gradient(to right, var(--purple) var(--fill, 0%), #ece4f6 var(--fill, 0%));
}
input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 30px;
  background: linear-gradient(to right, var(--purple) var(--fill, 0%), #ece4f6 var(--fill, 0%));
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}
input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .8125rem; }
.field-error { color: #95274a; font-size: .8125rem; margin-top: 4px; }
.overpayment-fields {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
  margin: 16px 0 0;
  min-width: 0;
}
.overpayment-fields legend { padding: 0 8px 0 0; font: 700 1rem/1.2 var(--heading); }
.overpayment-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.overpayment-inputs > div { min-width: 0; }
.overpayment-inputs label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 5px; }
.results-panel { display: flex; flex-direction: column; }
.monthly-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--lime);
  border: 1px solid #d5ec70;
  border-radius: 13px;
  padding: 15px 17px 13px;
}
.monthly-card p { font-size: .94rem; font-weight: 700; }
.monthly-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.05; }
.monthly-line strong {
  font: 700 clamp(2rem, 4.1vw, 3.55rem)/1.05 var(--heading);
  letter-spacing: -.075em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.monthly-line span { color: #4b5131; font-size: .875rem; font-weight: 700; }
.result-sparkles { position: absolute; inset: 0 0 0 auto; width: 86px; z-index: -1; opacity: .75; }
.result-sparkles i {
  position: absolute;
  display: block;
  width: 33px;
  height: 33px;
  background: #a7bf44;
  clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 63%, 50% 100%, 37% 63%, 0 50%, 37% 36%);
}
.result-sparkles i:first-child { top: 13px; right: 18px; transform: rotate(12deg); }
.result-sparkles i:nth-child(2) { top: 49px; right: 44px; width: 19px; height: 19px; }
.result-sparkles i:nth-child(3) { top: 60px; right: 15px; width: 13px; height: 13px; }
.breakdown { display: flex; align-items: center; gap: 21px; margin-block: 17px 15px; }
.chart {
  flex: 0 0 94px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--purple) 0 var(--principal, 60%), var(--pink) var(--principal, 60%) 100%);
  display: grid;
  place-items: center;
  transform: rotate(-35deg);
}
.chart[data-empty="true"] { background: var(--line); }
.chart-center {
  display: grid;
  place-items: center;
  width: 67%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  font: 700 1.2rem var(--heading);
  color: var(--purple);
  transform: rotate(35deg);
}
.breakdown-values { flex: 1; min-width: 0; font-size: .91rem; }
.breakdown-values > div { display: flex; justify-content: space-between; align-items: baseline; gap: 7px; padding: 5px 0; }
.breakdown-values dd { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.breakdown-values dt { color: var(--muted); }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.legend-dot.principal { background: var(--purple); }
.legend-dot.interest { background: var(--pink); }
.breakdown-values .total-row { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.total-row dt { color: var(--ink); font-weight: 700; }
.impact { background: var(--wash); border-radius: 11px; padding: 11px 13px; margin-bottom: 14px; }
.impact-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.impact h3, .growth h3 { font-size: 1rem; letter-spacing: -.025em; }
#payoff-term { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.impact-values { display: grid; grid-template-columns: .85fr 1fr 1.5fr; gap: 4px 12px; margin-top: 7px; }
.impact-values dt { font-size: .8125rem; line-height: 1.2; color: var(--muted); }
.impact-values dd { margin-top: 3px; font: 700 1rem/1.15 var(--heading); color: #52279e; overflow-wrap: anywhere; }
.schedule-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #e5daf3;
  border-radius: 9px;
  background: #fff;
  color: #5629a8;
  font-size: .875rem;
  font-weight: 700;
}
.schedule-toggle:disabled { opacity: .55; cursor: default; }
.schedule-toggle:hover:not(:disabled) { background: var(--wash); }
.schedule-toggle .chevron { margin-left: auto; margin-right: 3px; margin-bottom: 4px; }
.schedule-toggle[aria-expanded=true] .chevron { transform: rotate(225deg); margin-bottom: 0; }
.table-icon, .table-icon::after { border: 1.5px solid currentColor; }
.table-icon { width: 15px; height: 13px; border-radius: 3px; position: relative; }
.table-icon::after { content: ""; position: absolute; top: 3px; left: 0; right: 0; border-width: 1.5px 0 0; }
.schedule-panel { margin-top: 22px; }
.schedule-panel p { color: var(--muted); font-size: .875rem; }
.table-scroll { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--wash); position: sticky; top: 0; z-index: 1; }
tbody th { font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
.site-footer { margin-block: 19px 24px; color: var(--muted); text-align: center; font-size: .875rem; }
.savings-details .field + .field { margin-top: 16px; }
.growth { margin-block: 13px 14px; min-width: 0; }
.growth-chart {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: clamp(3px, 1vw, 10px);
  min-height: 130px;
  margin: 8px 0;
}
.growth-column { display: grid; grid-template-rows: 1fr auto; gap: 4px; text-align: center; min-width: 0; color: var(--muted); font-size: .75rem; }
.growth-track {
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  height: 112px;
  background: #f5f0fa;
  border-radius: 5px 5px 2px 2px;
}
.growth-track > span:first-child { background: var(--purple); }
.growth-track > span:last-child { background: var(--pink); }
.savings-values > div { padding: 3px 0; }
dialog {
  width: min(500px, calc(100% - 40px));
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  color: var(--ink);
  padding: 23px;
  box-shadow: 0 12px 50px #25143d40;
}
dialog::backdrop { background: #25143d80; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
dialog p + p { margin-top: 10px; }
.close-button { border-radius: 8px; background: var(--wash); color: var(--purple); font-size: 1.5rem; width: 36px; height: 36px; line-height: 1; }
@media (min-width: 850px) {
  .hero-art { right: 38px; }
}
@media (max-width: 780px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { gap: 15px; }
  .header-tools { gap: 5px; }
  .hero { padding-inline: 25px; }
  .hero-art { right: 4px; width: 41%; }
  .calculator { gap: 14px; }
  .panel { padding: 18px; }
  .breakdown { gap: 13px; }
  .chart { flex-basis: 69px; }
}
@media (max-width: 660px) {
  .header-inner { flex-wrap: wrap; padding-block: 9px 8px; gap: 7px 12px; }
  .page-nav { flex-basis: 100%; order: 1; }
  .page-nav a { padding-block: 5px; }
  .hero { min-height: 210px; margin-top: 16px; margin-bottom: 16px; }
  .hero h1 { font-size: clamp(2.1rem, 7.3vw, 3.2rem); }
  .hero-content > p:last-child { max-width: 20ch; font-size: .9rem; }
  .hero-art { width: 42%; }
  .calculator { grid-template-columns: 1fr; }
  .chart { flex-basis: 80px; }
  .monthly-line strong { font-size: clamp(2.1rem, 8vw, 3.1rem); }
  .site-footer { padding-inline: 8px; }
}
@media (max-width: 480px) {
  .hero-art { bottom: 2px; top: auto; width: 39%; transform: rotate(-3deg); }
  .field input, .overpayment-inputs input, .field select { font-size: 1rem; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 24px); }
  .hero { padding-inline: 15px; }
  .eyebrow { font-size: .7rem; padding-inline: 6px; }
  .hero-art { right: -8px; }
  .wordmark { font-size: 1.42rem; }
  .brand-icon { width: 29px; height: 29px; margin-right: 6px; }
  .brand-icon::after { width: 19px; height: 19px; }
  .help-button { padding-inline: 3px; }
  .help-button .question-icon { display: none; }
  .panel { padding-inline: 13px; }
  .chart { flex-basis: 65px; }
}

.privacy-link, .privacy-copy p a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-link { margin-left: .5em; }
.privacy-page { margin-block: 28px; }
.privacy-copy { max-width: 45rem; }
.privacy-copy h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.06em; }
.privacy-copy h2 { font-size: 1.22rem; margin-top: 1.25rem; margin-bottom: .4rem; }
