:root {
  --ink: #091b36;
  --muted: #5d687b;
  --blue: #0868f2;
  --sky: #2f99ff;
  --pale: #edf4ff;
  --line: #dce2ea;
  --coral: #ff806f;
  --green: #55d99a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f5f6f8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f5f6f8; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  width: min(1280px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand img { width: 132px; display: block; }
.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-header nav a,
.site-footer a {
  color: #506075;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.site-header nav a:hover,
.site-footer a:hover { color: var(--blue); }
.site-header .gid-link {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  background: var(--ink);
}

.page {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto 48px;
}
.breadcrumbs {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8792a2;
  font-size: 11px;
}
.breadcrumbs a { color: #66758a; text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); }
.hero {
  min-height: 220px;
  padding: 42px 48px;
  border: 1px solid #dde5ef;
  border-radius: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  background:
    radial-gradient(circle at 96% 5%, rgba(61, 150, 255, .16), transparent 26rem),
    linear-gradient(115deg, #fff7f3, #f4f7ff 68%, #e8f2ff);
}
.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
}
.hero h1 {
  max-width: 820px;
  margin: 12px 0 10px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: .98;
  letter-spacing: -.055em;
}
.hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.hero-note {
  min-width: 270px;
  padding: 22px;
  border: 1px solid rgba(9, 27, 54, .07);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 40px rgba(9,27,54,.07);
}
.hero-note span, .hero-note strong { display: block; }
.hero-note span { color: var(--muted); font-size: 12px; }
.hero-note strong { margin-top: 7px; font-size: 18px; }

.calculator {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(430px, 1.06fr);
  gap: 22px;
  align-items: stretch;
}
.input-card, .result-card {
  min-width: 0;
  border-radius: 30px;
  overflow: hidden;
}
.input-card {
  padding: 34px;
  border: 1px solid #e1e5eb;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 22px 16px;
  background: #fff;
}
.card-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.card-head h2 {
  margin: 7px 0 0;
  font-size: 31px;
  letter-spacing: -.04em;
}
.reset-button {
  padding: 8px 0;
  border: 0;
  color: #697589;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.reset-button:hover { color: var(--blue); }
.field { min-width: 0; position: relative; }
.field-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field-row .field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}
.field > small {
  display: block;
  margin-top: 7px;
  color: #758095;
  font-size: 11px;
  line-height: 1.4;
}
.input-shell {
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid #d3d9e2;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input-shell:focus-within {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(47,153,255,.12);
}
.input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
  font-weight: 790;
  font-variant-numeric: tabular-nums;
}
.input-shell span {
  flex: 0 0 auto;
  color: #5e6879;
  font-size: 14px;
  font-weight: 700;
}
.range {
  --progress: 0%;
  width: 100%;
  height: 22px;
  margin: 5px 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--sky) 0 var(--progress), #35383d var(--progress) 100%);
}
.range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: var(--sky);
  box-shadow: 0 3px 9px rgba(47,153,255,.34);
}
.range::-moz-range-track { height: 5px; border-radius: 999px; background: #35383d; }
.range::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--sky); }
.range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--sky); }
.range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #778295;
  font-size: 9px;
}
.range-meta strong { color: var(--ink); font-size: 10px; }

.custom-select { position: relative; z-index: 3; }
.custom-select.is-open { z-index: 20; }
.custom-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.select-trigger {
  width: 100%;
  min-height: 58px;
  padding: 0 48px 0 17px;
  border: 1px solid #d3d9e2;
  border-radius: 16px;
  display: flex;
  align-items: center;
  color: var(--ink);
  background: #fff;
  text-align: left;
  font-size: 17px;
  font-weight: 780;
  cursor: pointer;
}
.select-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-trigger > i {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #5f6979;
  border-bottom: 2px solid #5f6979;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
}
.select-trigger:focus-visible,
.custom-select.is-open .select-trigger {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(47,153,255,.12);
  outline: 0;
}
.custom-select.is-open .select-trigger > i { transform: translateY(-20%) rotate(225deg); }
.select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 7px;
  border: 1px solid rgba(9,27,54,.09);
  border-radius: 17px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 46px rgba(9,27,54,.18);
  backdrop-filter: blur(14px);
}
.select-menu[hidden] { display: none; }
.select-menu button {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}
.select-menu button:hover,
.select-menu button:focus-visible { background: #eef6ff; outline: 0; }
.select-menu button[aria-selected="true"] { color: #075fc7; background: #e8f3ff; font-weight: 780; }
.select-menu button i {
  width: 8px;
  height: 13px;
  flex: 0 0 auto;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  opacity: 0;
  transform: rotate(45deg);
}
.select-menu button[aria-selected="true"] i { opacity: 1; }

.program-summary {
  padding: 13px;
  border-radius: 17px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: #eef5ff;
}
.program-summary div {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255,255,255,.72);
}
.program-summary span, .program-summary strong { display: block; }
.program-summary span { color: #6b778a; font-size: 9px; }
.program-summary strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #0b5fc4;
  font-size: 12px;
}
.calculation-note {
  padding: 13px 15px;
  border-left: 3px solid #9db1c9;
  color: #647084;
  background: #f4f6f8;
  font-size: 11px;
  line-height: 1.45;
}

.result-card {
  padding: 38px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(47,153,255,.38), transparent 27rem),
    linear-gradient(145deg, #061a36, #0b2f58);
  box-shadow: 0 25px 58px rgba(7,27,57,.17);
}
.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #b5c2d2;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
}
.result-top b {
  padding: 7px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.13);
  font-size: 9px;
}
.result-value {
  display: block;
  margin-top: 15px;
  font-size: clamp(54px, 6vw, 78px);
  line-height: .96;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.result-subtitle {
  margin: 14px 0 0;
  color: #b8c5d5;
  font-size: 13px;
  line-height: 1.45;
}
.result-subtitle strong { color: #fff; }
.limit-message {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  color: #e5edf6;
  background: rgba(255,255,255,.09);
  font-size: 12px;
  line-height: 1.5;
}
.limit-message strong { color: #fff; }
.limit-message.is-cap { border-color: #ffbc61; background: rgba(255,188,97,.12); }
.limit-message.is-down { border-color: var(--coral); background: rgba(255,128,111,.12); }
.budget-structure {
  margin-top: 24px;
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.13);
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #aab9cb;
  font-size: 10px;
  letter-spacing: .1em;
}
.section-title strong { color: #fff; font-size: 11px; letter-spacing: 0; }
.budget-bar {
  height: 10px;
  margin-top: 14px;
  border-radius: 999px;
  display: flex;
  overflow: hidden;
  background: rgba(255,255,255,.1);
}
.budget-bar i { display: block; height: 100%; transition: width .3s ease; }
#downBar { background: var(--sky); }
#loanBar { background: #85c6ff; }
.budget-legend {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.budget-legend > span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #acbacc;
  font-size: 10px;
}
.budget-legend strong {
  grid-column: 2;
  color: #fff;
  font-size: 14px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.dot-loan { background: #85c6ff; }
.metrics { margin: 9px 0 0; }
.metrics > div {
  min-height: 50px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.metrics dt { color: #afbdcd; font-size: 12px; }
.metrics dd {
  margin: 0;
  color: #fff;
  text-align: right;
  font-size: 15px;
  font-weight: 800;
}
.next-step {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--sky);
  color: #dce8f5;
  background: rgba(47,153,255,.13);
  font-size: 12px;
  line-height: 1.5;
}
.next-step strong { color: #fff; }
.result-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.result-actions a, .result-actions button {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.result-actions .primary { border-color: var(--sky); background: var(--sky); }
.result-actions button { border-color: var(--coral); color: var(--ink); background: var(--coral); }
.disclaimer { margin: 14px 0 0; color: #8fa3b8; font-size: 10px; line-height: 1.5; }

.explanation {
  margin-top: 24px;
  padding: 36px 40px;
  border: 1px solid #e0e5ec;
  border-radius: 30px;
  background: #fff;
}
.explanation h2 { margin: 8px 0 0; font-size: 32px; letter-spacing: -.04em; }
.explanation-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.explanation article {
  padding: 20px;
  border: 1px solid #e2e6ec;
  border-radius: 18px;
  background: #f8fafc;
}
.explanation article b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sky);
  font-size: 11px;
}
.explanation h3 { margin: 13px 0 7px; font-size: 16px; }
.explanation article p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.seo-section,
.faq-section,
.related-section {
  margin-top: 24px;
  padding: 42px;
  border: 1px solid #e0e5ec;
  border-radius: 30px;
  background: #fff;
}
.seo-intro {
  max-width: 880px;
}
.seo-section h2,
.faq-section h2,
.related-section h2 {
  margin: 9px 0 0;
  font-size: clamp(29px, 3.4vw, 42px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.seo-intro > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.seo-columns {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.seo-columns article {
  padding: 24px;
  border-radius: 20px;
  background: #f6f8fb;
}
.seo-columns h3 {
  margin: 0 0 9px;
  font-size: 18px;
  letter-spacing: -.025em;
}
.seo-columns p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}
.faq-head { max-width: 760px; }
.faq-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  min-height: 66px;
  padding: 16px 42px 16px 0;
  position: relative;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i {
  width: 22px;
  height: 22px;
  position: absolute;
  right: 0;
  top: 50%;
  border-radius: 50%;
  background: #edf4ff;
  transform: translateY(-50%);
}
.faq-list summary i::before,
.faq-list summary i::after {
  content: "";
  width: 9px;
  height: 1.5px;
  position: absolute;
  left: 6.5px;
  top: 10px;
  background: var(--blue);
}
.faq-list summary i::after {
  transform: rotate(90deg);
  transition: transform .18s ease;
}
.faq-list details[open] summary i::after { transform: rotate(0); }
.faq-list details p {
  max-width: 850px;
  margin: -3px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}
.related-section {
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(47,153,255,.35), transparent 28rem),
    linear-gradient(145deg, #061a36, #0b2f58);
}
.related-section .eyebrow { color: #78baff; }
.related-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.related-grid a {
  min-width: 0;
  padding: 21px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 19px;
  color: #fff;
  background: rgba(255,255,255,.07);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.related-grid a:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.related-grid span,
.related-grid strong,
.related-grid i { display: block; }
.related-grid span { color: #9fb2c8; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.related-grid strong { margin-top: 8px; font-size: 18px; }
.related-grid i { margin-top: 17px; color: #78baff; font-size: 11px; font-style: normal; }
.sources-section {
  margin: 18px 0 0;
  padding: 0 14px;
  color: #718095;
  font-size: 10px;
  line-height: 1.55;
}
.sources-section p { margin: 0; }
.sources-section a { color: #536a87; }
.site-footer {
  width: min(1280px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  border-top: 1px solid #dce2ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #7b8798;
  font-size: 11px;
}

body.embed .site-header,
body.embed .hero,
body.embed .breadcrumbs,
body.embed .explanation,
body.embed .seo-section,
body.embed .faq-section,
body.embed .related-section,
body.embed .sources-section,
body.embed .site-footer { display: none; }
body.embed .page { width: 100%; margin: 0; }
body.embed .calculator { margin: 0; }
body.embed .input-card,
body.embed .result-card { border-radius: 0; }

@media (max-width: 980px) {
  .calculator { grid-template-columns: minmax(0, 1fr); }
  .result-card { min-height: auto; }
}

@media (min-width: 721px) and (max-width: 980px) {
  body.embed .calculator {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: 12px;
  }
  body.embed .input-card { padding: 24px 20px; }
  body.embed .result-card { padding: 28px 22px; }
  body.embed .result-value { font-size: 50px; }
  body.embed .select-trigger { font-size: 14px; }
  body.embed .input-shell input { font-size: 17px; }
}

@media (max-width: 720px) {
  .site-header, .page { width: min(100% - 24px, 1280px); }
  .site-header { min-height: 58px; }
  .brand img { width: 110px; }
  .site-header nav > a:first-child { display: none; }
  .site-header .gid-link { min-height: 34px; padding: 0 12px; font-size: 10px; }
  .breadcrumbs { min-height: 32px; font-size: 9px; }
  .hero {
    min-height: auto;
    padding: 27px 22px;
    border-radius: 24px;
    display: block;
  }
  .hero h1 { font-size: 36px; }
  .hero p:last-child { font-size: 14px; }
  .hero-note { margin-top: 20px; min-width: 0; }
  .input-card { padding: 24px 20px; border-radius: 24px; display: block; }
  .input-card > * + * { margin-top: 19px; }
  .card-head { margin-top: 0 !important; }
  .card-head h2 { font-size: 27px; }
  .field-row { display: block; }
  .field-row > .field + .field { margin-top: 19px; }
  .program-summary { grid-template-columns: 1fr; }
  .program-summary div { display: flex; justify-content: space-between; gap: 14px; }
  .program-summary strong { margin-top: 0; text-align: right; }
  .result-card { padding: 28px 22px; border-radius: 24px; }
  .result-value { font-size: 50px; }
  .budget-legend { grid-template-columns: 1fr; gap: 10px; }
  .result-actions { grid-template-columns: minmax(0, 1fr); }
  .explanation { padding: 27px 22px; border-radius: 24px; }
  .explanation-grid { grid-template-columns: minmax(0, 1fr); }
  .seo-section,
  .faq-section,
  .related-section { padding: 28px 22px; border-radius: 24px; }
  .seo-columns,
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .seo-intro > p:last-child { font-size: 13px; }
  .faq-list summary { font-size: 13px; line-height: 1.4; }
  .site-footer {
    width: min(100% - 24px, 1280px);
    padding: 20px 0;
    display: block;
  }
  .site-footer nav { margin-top: 12px; flex-wrap: wrap; }
  body.embed .input-card,
  body.embed .result-card { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
