:root {
  --paper: #eef2fa;
  --paper-deep: #dfe5f2;
  --card: #fcfdff;
  --card-soft: #f3f6fd;
  --ink: #121b30;
  --muted: #616c84;
  --line: #1a2742;
  --soft-line: #c6cfe1;
  --accent: #3b5bdb;
  --accent-dark: #22399a;
  --accent-soft: #dde4ff;
  --green: #18725c;
  --green-soft: #dff3e8;
  --warning: #ad3f33;
  --interest: #df8046;
  --principal: #3b5bdb;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-soft: 3px 3px 0 var(--ink);
  --radius: 18px;
  --radius-sm: 10px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", "Liberation Mono", monospace;
}

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 10% 2%, rgba(59, 91, 219, .15), transparent 28rem),
    radial-gradient(circle at 91% 12%, rgba(24, 114, 92, .08), transparent 30rem),
    linear-gradient(rgba(26, 39, 66, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 39, 66, .035) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px, 26px 26px;
}

::selection { color: var(--card); background: var(--accent-dark); }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #46d7a8;
  box-shadow: 0 0 0 4px rgba(70, 215, 168, .14);
  vertical-align: 1px;
}

.site-header { border-bottom-color: rgba(26, 39, 66, .16); }
.brand-mark {
  color: var(--card);
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-3deg);
}
.brand-copy small { color: #69758f; }
.top-nav a::after { background: var(--accent); }

.mortgage-hero {
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .72fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
  padding-block: clamp(58px, 8vw, 104px) clamp(76px, 9vw, 112px);
}
.mortgage-hero .eyebrow span {
  color: var(--card);
  background: var(--accent-dark);
}
.mortgage-hero h1 {
  margin: 0;
  font-size: clamp(58px, 8.6vw, 112px);
  line-height: .9;
  letter-spacing: -.075em;
  white-space: nowrap;
}
.mortgage-hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.mortgage-hero h1 em::after {
  bottom: .06em;
  height: .24em;
  background: var(--accent-soft);
  border-radius: 4px;
  opacity: 1;
  transform: skewX(-12deg);
  z-index: -1;
}
.mortgage-hero .hero-lead {
  max-width: 680px;
  color: #45516a;
  font-size: clamp(15px, 1.7vw, 18px);
}
.hero-facts span {
  border-color: #9ca8c2;
  background: rgba(252, 253, 255, .7);
}
.edu-note {
  max-width: 690px;
  margin: 24px 0 0;
  padding: 12px 15px;
  color: #48546d;
  background: rgba(252, 253, 255, .66);
  border-left: 4px solid var(--accent);
  border-radius: 0 9px 9px 0;
  font-size: 12px;
  line-height: 1.75;
}
.edu-note strong { color: var(--accent-dark); }

.statement-card {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
  padding: 26px;
  overflow: hidden;
  color: #f2f6ff;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    #111d38;
  background-size: 18px 18px, 18px 18px, auto;
  border: 2px solid var(--ink);
  border-radius: 5px 26px 5px 5px;
  box-shadow: 12px 12px 0 var(--accent);
  transform: rotate(1.2deg);
}
.statement-card::before,
.statement-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.statement-card::before { left: -12px; top: 28%; }
.statement-card::after { right: -12px; bottom: 24%; }
.statement-watermark {
  position: absolute;
  right: -10px;
  top: -52px;
  color: rgba(93, 124, 243, .13);
  font-family: var(--font-display);
  font-size: 202px;
  line-height: 1;
  pointer-events: none;
}
.statement-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  color: #8fa1c9;
  border-bottom: 1px dashed rgba(226, 234, 255, .3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
}
.statement-top b { color: #dbe4ff; font-weight: 500; }
.statement-live {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 21px;
  color: #a9b8da;
  font-family: var(--font-mono);
  font-size: 10px;
}
.statement-label {
  position: relative;
  z-index: 1;
  margin: 16px 0 3px;
  color: #8fa1c9;
  font-size: 11px;
  letter-spacing: .08em;
}
.statement-payment {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1;
}
.statement-payment span { color: #8195c4; font-size: 22px; }
.statement-payment strong { color: #f6f8ff; font-size: clamp(40px, 5.4vw, 56px); }
.statement-payment strong.is-long { font-size: clamp(32px, 4.4vw, 45px); }
.statement-payment strong.is-very-long { font-size: clamp(26px, 3.6vw, 36px); }
.statement-rule {
  position: relative;
  z-index: 1;
  margin: 20px 0 15px;
  border-top: 1px dashed rgba(226, 234, 255, .24);
}
.statement-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.statement-grid span {
  display: block;
  color: #8fa1c9;
  font-size: 9.5px;
}
.statement-grid strong {
  display: block;
  margin-top: 3px;
  color: #dfe7ff;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}
.statement-split {
  position: relative;
  z-index: 1;
  display: flex;
  height: 7px;
  margin-top: 21px;
  overflow: hidden;
  background: #2b3b5e;
  border-radius: 50px;
}
.statement-split i {
  display: block;
  height: 100%;
  transition: width .35s ease;
}
.statement-split i:first-child { width: 65%; background: #6e8bff; }
.statement-split i:last-child { width: 35%; background: var(--interest); }
.statement-legend {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: #a4b2d3;
  font-size: 9.5px;
}
.statement-legend span { display: inline-flex; align-items: center; gap: 5px; }
.statement-legend b { color: #e2e9ff; font-family: var(--font-mono); font-weight: 500; }
.statement-legend i,
.split-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.legend-principal { background: var(--principal); }
.legend-interest { background: var(--interest); }
.statement-foot {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding-right: 58px;
  color: #7f90b6;
  font-size: 9.5px;
  line-height: 1.7;
}
.statement-stamp {
  position: absolute;
  right: 22px;
  bottom: 17px;
  padding: 5px 8px;
  color: #8fa6ff;
  border: 1.5px solid rgba(143, 166, 255, .55);
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  transform: rotate(-8deg);
}

.mortgage-studio {
  padding-top: 2px;
  scroll-margin-top: 26px;
}
.studio-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 17px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--soft-line);
}
.studio-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 58px);
  line-height: 1.03;
  letter-spacing: -.055em;
}
.studio-heading > div:first-child > p:last-child {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.studio-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(59, 91, 219, .3);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
}
.studio-status .live-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(59, 91, 219, .13); }

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
  gap: 28px;
  align-items: start;
}
.calc-form {
  padding: clamp(22px, 3.6vw, 38px);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.calc-form .card-heading { align-items: flex-start; }
.calc-form .card-heading h2 { font-size: clamp(25px, 3.2vw, 34px); }
.calc-form .card-heading p:not(.section-index) { max-width: 430px; }
.status-pill { background: var(--accent-soft); border-color: rgba(59, 91, 219, .32); }

.form-block {
  margin-top: 27px;
  padding-top: 25px;
  border-top: 1px dashed var(--soft-line);
}
.form-block.first-block { margin-top: 25px; }
.block-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 15px;
}
.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(59, 91, 219, .3);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.block-heading h3 {
  margin: 1px 0 2px;
  font-size: 17px;
  letter-spacing: -.01em;
}
.block-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.loan-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.loan-tab {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 68px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--soft-line);
  border-radius: 11px;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}
.loan-tab strong { font-size: 13px; line-height: 1.2; }
.loan-tab small { color: var(--muted); font-size: 9px; line-height: 1.2; }
.loan-tab:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.loan-tab.is-active {
  color: var(--card);
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--accent);
}
.loan-tab.is-active small { color: #b7c4e5; }
.loan-tab:disabled { opacity: .52; cursor: not-allowed; }

.lock-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #2e418d;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 11px;
  line-height: 1.7;
}
body.is-premium .lock-note { display: none; }

.single-loan-fields { display: block; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field-label {
  color: #36425d;
  font-size: 12px;
}
.field-label small { color: var(--muted); font-weight: 500; }
.money-input,
.suffix-input {
  display: flex;
  align-items: center;
  min-height: 49px;
  padding: 0 12px;
  background: #fff;
  border: 1.5px solid #8e9bb5;
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.money-input > span,
.suffix-input > span {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 650;
}
.money-input input,
.suffix-input input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 7px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.money-input-large input { font-size: 19px; letter-spacing: -.02em; }
.money-input:focus-within,
.suffix-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, .13);
}
.money-input input:focus,
.suffix-input input:focus { box-shadow: none; outline: 0; }
.suffix-input > span { color: var(--muted); font-size: 12px; }

.quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
}
.quick-label {
  margin-right: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
}
.quick-chip {
  min-height: 30px;
  padding: 4px 9px;
  color: #44516c;
  background: var(--card-soft);
  border: 1px solid var(--soft-line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.quick-chip:hover { color: var(--accent-dark); background: var(--accent-soft); border-color: rgba(59, 91, 219, .35); }
.quick-hint { margin-left: auto; color: var(--muted); font-size: 9.5px; }
.rate-row { margin-top: 7px; }

.combined-panel {
  margin-top: 19px;
  padding: 16px;
  background: rgba(221, 228, 255, .42);
  border: 1px dashed rgba(59, 91, 219, .42);
  border-radius: 14px;
}
.combined-intro {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
}
.combined-intro p { margin: 2px 0 0; color: #4d5c7b; font-size: 10.5px; line-height: 1.6; }
.combined-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.loan-part {
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--soft-line);
  border-radius: 11px;
}
.loan-part.fund-part { background: #f6fcf9; border-color: #bcd9ce; }
.part-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}
.part-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--card);
  background: var(--accent);
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}
.fund-part .part-mark { background: var(--green); }
.part-heading h4 { margin: 0; font-size: 12.5px; }
.part-heading p { margin: 1px 0 0; color: var(--muted); font-size: 9px; }
.loan-part .field + .field { margin-top: 11px; }
.loan-part .money-input input { font-size: 13px; }
.loan-part .money-input,
.loan-part .suffix-input { min-height: 43px; }
.loan-part .money-input input,
.loan-part .suffix-input input { min-height: 40px; }
.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.term-method-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
}
.term-control { display: flex; gap: 7px; align-items: stretch; }
.term-control .suffix-input { flex: 1; min-width: 0; }
.unit-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--soft-line);
  border-radius: 9px;
}
.unit-button {
  min-width: 37px;
  min-height: 41px;
  padding: 4px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.unit-button.is-active { color: var(--card); background: var(--ink); }
.term-quick { margin-top: 9px; }
.method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--soft-line);
  border-radius: 10px;
}
.method-tab {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 6px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: center;
  cursor: pointer;
}
.method-tab strong { color: var(--ink); font-size: 11.5px; }
.method-tab small { font-size: 8.5px; }
.method-tab.is-active { color: var(--card); background: var(--ink); box-shadow: 2px 2px 0 var(--accent); }
.method-tab.is-active strong { color: var(--card); }
.method-tab.is-active small { color: #b8c4e4; }

.calc-actions { margin-top: 27px; padding-top: 22px; border-top: 1px dashed var(--soft-line); }
.run-button { min-width: 190px; min-height: 52px; font-size: 14px; }
.calc-actions .mini-note { max-width: 260px; margin: 0; font-size: 10px; }
.form-error { margin-top: 14px; }

.result-card {
  position: sticky;
  top: 22px;
  overflow: hidden;
  min-width: 0;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
}
.result-hero {
  position: relative;
  padding: 21px 22px 19px;
  color: #eef3ff;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    #111d38;
  background-size: 16px 16px, 16px 16px, auto;
}
.result-hero::after {
  content: "";
  position: absolute;
  right: -58px;
  top: -74px;
  width: 190px;
  height: 190px;
  border: 28px solid rgba(93, 124, 243, .16);
  border-radius: 50%;
  pointer-events: none;
}
.result-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: #9cacd0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .05em;
}
.result-label {
  position: relative;
  z-index: 1;
  margin: 20px 0 3px;
  color: #9eadd0;
  font-size: 10.5px;
  letter-spacing: .06em;
}
.result-payment {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}
.payment-currency { color: #91a7f8; font-family: var(--font-mono); font-size: 22px; }
.result-hero #result {
  margin: 0;
  padding: 0;
  color: #f7f9ff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: clamp(40px, 5.4vw, 56px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.055em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  box-shadow: none;
}
.result-hero #result.is-long { font-size: clamp(34px, 4.4vw, 46px); }
.result-hero #result.is-very-long { font-size: clamp(27px, 3.5vw, 37px); }
.per-month { color: #8698bf; font-size: 11px; }
.result-sub {
  position: relative;
  z-index: 1;
  min-height: 34px;
  margin: 12px 0 0;
  color: #aab8d8;
  font-size: 10.5px;
  line-height: 1.6;
}
.result-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px dashed rgba(226, 234, 255, .22);
}
.result-metrics > div { padding: 0 10px; border-left: 1px solid rgba(226, 234, 255, .14); }
.result-metrics > div:first-child { padding-left: 0; border-left: 0; }
.result-metrics > div:last-child { padding-right: 0; }
.result-metrics span { display: block; color: #8e9fc5; font-size: 9px; }
.result-metrics strong {
  display: block;
  margin-top: 4px;
  color: #e4eaff;
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 1.25vw, 12.5px);
  font-weight: 600;
  white-space: nowrap;
}
.result-body { padding: 19px 22px 22px; }
.split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #43506b;
  font-size: 11px;
  font-weight: 650;
}
.split-head strong { color: var(--accent-dark); font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; }
.split-bar {
  display: flex;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 50px;
}
.split-bar span { display: block; height: 100%; transition: width .35s ease; }
#principalBar { width: 65%; background: var(--principal); }
#interestBar { width: 35%; background: var(--interest); }
.split-legend {
  display: flex;
  justify-content: space-between;
  gap: 13px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}
.split-legend span { display: inline-flex; align-items: center; gap: 5px; }
.split-legend b { color: #37445e; font-family: var(--font-mono); font-weight: 600; }
.preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--soft-line);
}
.preview-head h3 {
  margin: 1px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.preview-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.preview-wrap {
  max-height: 364px;
  margin-top: 11px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.schedule-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 9px;
  color: #66738e;
  background: var(--card-soft);
  border-bottom: 1px solid var(--soft-line);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 650;
  text-align: right;
}
.schedule-table th:first-child,
.schedule-table td:first-child { text-align: left; }
.schedule-table td {
  padding: 8px 9px;
  color: #34405a;
  border-bottom: 1px solid #e3e8f2;
  text-align: right;
}
.schedule-table tbody tr:nth-child(even) { background: rgba(243, 246, 253, .62); }
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table td:first-child { color: var(--accent-dark); font-weight: 650; }
.table-empty {
  padding: 24px 12px !important;
  color: var(--muted) !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  text-align: center !important;
}
.result-disclaimer {
  margin: 12px 0 0;
  color: #7b849a;
  font-size: 9px;
  line-height: 1.65;
}

.premium-shell {
  margin-top: clamp(54px, 7vw, 78px);
  scroll-margin-top: 26px;
}
.premium-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 26px;
  margin-top: 23px;
  align-items: start;
}
.prepay-card,
.schedule-card {
  padding: clamp(22px, 3.6vw, 34px);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.work-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.work-heading h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: clamp(25px, 3.2vw, 33px);
  line-height: 1.18;
  letter-spacing: -.035em;
}
.work-heading p:not(.section-index) {
  max-width: 470px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}
.premium-chip { background: var(--accent-dark); border-color: var(--accent-dark); }
body.is-premium .premium-chip { background: var(--green); border-color: var(--green); }

.prepay-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 21px;
}
.prepay-form .prepay-target,
.prepay-form .prepay-strategy-field { grid-column: 1 / -1; }
.prepay-mode-field,
.prepay-strategy-field { min-width: 0; }
.mini-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--soft-line);
  border-radius: 10px;
}
.mini-tab {
  min-height: 43px;
  padding: 6px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.mini-tab.is-active { color: var(--card); background: var(--ink); box-shadow: 2px 2px 0 var(--accent); }
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.strategy-card {
  display: grid;
  gap: 3px;
  min-height: 67px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--soft-line);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}
.strategy-card strong { font-size: 11.5px; }
.strategy-card span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.strategy-card.is-active {
  color: var(--card);
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--accent);
}
.strategy-card.is-active span { color: #b5c1e1; }
.prepay-actions { align-items: center; margin-top: 19px; }
.prepay-actions .mini-note { margin: 0; font-size: 10px; }
.prepay-output {
  margin-top: 20px;
  padding: 17px;
  background: linear-gradient(135deg, rgba(221, 228, 255, .72), rgba(252, 253, 255, .92));
  border: 1px solid rgba(59, 91, 219, .28);
  border-radius: 14px;
}
.prepay-headline {
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(59, 91, 219, .25);
}
.prepay-headline p { margin: 0; color: #54627e; font-size: 10px; }
.prepay-headline strong {
  display: block;
  margin-top: 2px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 39px);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.prepay-headline span { display: block; margin-top: 5px; color: #586581; font-size: 10px; line-height: 1.6; }
.prepay-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.prepay-metrics div {
  padding: 9px 10px;
  background: rgba(252, 253, 255, .82);
  border: 1px solid rgba(198, 207, 225, .8);
  border-radius: 8px;
}
.prepay-metrics span { display: block; color: var(--muted); font-size: 9px; }
.prepay-metrics strong {
  display: block;
  margin-top: 2px;
  color: #2a3750;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 650;
}
.compare-wrap {
  border: 1px solid rgba(198, 207, 225, .85);
  border-radius: 9px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  white-space: nowrap;
}
.compare-table th,
.compare-table td { padding: 7px 9px; border-bottom: 1px solid #e3e8f2; text-align: right; }
.compare-table th:first-child,
.compare-table td:first-child { text-align: left; }
.compare-table th { color: var(--muted); background: rgba(252, 253, 255, .8); font-size: 9px; }
.compare-table td { color: #33405a; font-family: var(--font-mono); }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table td:last-child { color: var(--accent-dark); font-weight: 650; }
.prepay-note { margin: 11px 0 0; color: #69748b; font-size: 9.5px; line-height: 1.65; }

.schedule-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 21px;
  overflow: hidden;
  background: var(--soft-line);
  border: 1px solid var(--soft-line);
  border-radius: 10px;
}
.schedule-summary > div { padding: 11px 10px; background: var(--card-soft); }
.schedule-summary span { display: block; color: var(--muted); font-size: 9px; }
.schedule-summary strong { display: block; margin-top: 3px; color: #2b3853; font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.schedule-actions { margin-top: 15px; }
.schedule-actions .button { flex: 1 1 140px; }
.full-wrap {
  max-height: 372px;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
}
.full-table th { font-size: 9px; }
.schedule-card .field-help { font-size: 9.5px; }

.faq-list details { background: rgba(252, 253, 255, .76); }
.faq-list summary { font-size: 13.5px; }
.faq-list p,
.faq-list .faq-answer { color: #4d5870; font-size: 12.5px; }
.faq-list .faq-answer { margin: 0; padding: 14px 18px 17px; line-height: 1.85; }
.faq-list .faq-answer p { padding: 0; }
.formula-strip {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 11px 13px;
  color: #2d3b58;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
}
.formula-strip sup { font-size: 8px; }
.table-caption { margin: 0 !important; padding: 0 !important; color: var(--muted) !important; font-size: 10px !important; }

.unlock-section { margin-block: 46px; }
.premium-map { box-shadow: 5px 5px 0 var(--accent); }
body.is-premium .premium-map { box-shadow: 5px 5px 0 var(--green); }
.site-footer { margin-top: 34px; }

@media (max-width: 980px) {
  .mortgage-hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-block: 50px 62px;
  }
  .statement-card {
    justify-self: start;
    width: min(100%, 520px);
    transform: rotate(.8deg);
  }
  .calc-layout,
  .premium-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .result-hero #result { font-size: 58px; }
  .premium-grid { gap: 20px; }
  .schedule-card { order: 2; }
}

@media (max-width: 700px) {
  .mortgage-hero { gap: 32px; padding-block: 40px 50px; }
  .mortgage-hero h1 { font-size: clamp(52px, 16vw, 74px); }
  .mortgage-hero .hero-lead { font-size: 14.5px; }
  .hero-facts { gap: 6px; }
  .hero-facts span { padding: 5px 8px; font-size: 8.5px; }
  .statement-card {
    padding: 20px;
    border-radius: 4px 19px 4px 4px;
    box-shadow: 8px 8px 0 var(--accent);
    transform: none;
  }
  .statement-payment strong { font-size: 43px; }
  .statement-grid { gap: 10px; }
  .statement-foot { padding-right: 0; }
  .statement-stamp { display: none; }
  .studio-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .studio-heading h2 { font-size: 40px; }
  .studio-status { align-self: flex-start; }
  .calc-form { padding: 20px; box-shadow: 4px 4px 0 var(--ink); }
  .loan-tab { min-height: 62px; padding: 9px 8px; }
  .loan-tab strong { font-size: 11.5px; }
  .loan-tab small { font-size: 8px; }
  .field-grid { grid-template-columns: 1fr; }
  .term-method-grid { grid-template-columns: 1fr; }
  .combined-grid { grid-template-columns: 1fr; }
  .combined-panel { padding: 12px; }
  .money-input-large input { font-size: 18px; }
  .quick-hint { flex-basis: 100%; margin-left: 0; }
  .calc-actions .mini-note { max-width: none; }
  .result-card { border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
  .result-hero { padding: 19px 18px 17px; }
  .result-hero #result { font-size: 44px; }
  .result-metrics { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .result-metrics > div { padding: 0 8px; border-left: 1px solid rgba(226, 234, 255, .14); }
  .result-metrics > div:first-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .result-metrics > div:nth-child(2) { padding-left: 0; border-left: 0; }
  .result-body { padding: 17px 18px 19px; }
  .preview-head h3 { font-size: 22px; }
  .prepay-card,
  .schedule-card { padding: 20px; box-shadow: 4px 4px 0 var(--ink); }
  .prepay-form { grid-template-columns: 1fr; }
  .prepay-form .prepay-target,
  .prepay-form .prepay-strategy-field { grid-column: auto; }
  .strategy-grid { grid-template-columns: 1fr; }
  .schedule-summary { grid-template-columns: 1fr 1fr; }
  .schedule-summary > div:first-child { grid-column: 1 / -1; }
  .prepay-actions .button { width: 100%; }
  .prepay-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .mortgage-hero h1 { font-size: 52px; }
  .statement-payment strong { font-size: 39px; }
  .loan-tab strong { font-size: 10.5px; }
  .loan-tab small { display: none; }
  .quick-chip { flex: 1 1 auto; }
  .quick-label { flex-basis: 100%; }
  .rate-row .quick-hint { flex-basis: 100%; }
  .prepay-metrics { grid-template-columns: 1fr; }
  .schedule-summary { grid-template-columns: 1fr; }
  .schedule-summary > div:first-child { grid-column: auto; }
  .result-metrics strong { font-size: 10px; }
}
