:root {
  --navy: #091e67;
  --navy-deep: #06133f;
  --blue: #093392;
  --blue-bright: #1558c8;
  --blue-soft: #eaf3ff;
  --blue-pale: #f5f9ff;
  --gold: #c9a053;
  --gold-deep: #a97520;
  --gold-pale: #fbf4e4;
  --ink: #101b3d;
  --muted: #66708a;
  --paper: #eef4fc;
  --card: #fff;
  --line: #dbe4f1;
  --green: #187553;
  --red: #ad3434;
  --shadow-sm: 0 10px 30px rgba(9, 30, 103, .08);
  --shadow: 0 24px 70px rgba(9, 30, 103, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 7%, rgba(201, 160, 83, .2), transparent 22%),
    radial-gradient(circle at 4% 31%, rgba(21, 88, 200, .12), transparent 23%),
    linear-gradient(180deg, #fbfdff 0%, #eef4fc 48%, #f8fbff 100%);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: 108px;
  margin: 12px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(162, 174, 203, .42);
  border-radius: 24px;
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 138px;
  height: 96px;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.brand-copy strong {
  color: var(--navy);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.brand-copy small { color: var(--muted); font-size: 10px; }

.private-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid #d7e2f1;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.private-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(24, 117, 83, .1);
}

main {
  width: 100%;
  max-width: 1140px;
  margin: auto;
  padding: 44px 28px 88px;
}

.view { display: none; animation: rise .45s ease both; }
.view.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 64px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 86% 12%, rgba(201, 160, 83, .32), transparent 24%),
    radial-gradient(circle at 15% 92%, rgba(21, 88, 200, .55), transparent 32%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 54%, var(--blue) 100%);
  box-shadow: 0 34px 90px rgba(6, 19, 63, .24);
  color: #fff;
}

.intro::before,
.intro::after {
  position: absolute;
  z-index: -1;
  content: "";
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.intro::before { width: 430px; height: 430px; right: -155px; top: -220px; }
.intro::after { width: 260px; height: 260px; right: 40px; top: -150px; }

.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.02; letter-spacing: -.028em; }
h1 { max-width: 820px; margin: 18px 0 20px; color: #fff; font-size: clamp(48px, 7vw, 80px); }
h2 { margin: 12px 0 13px; font-size: clamp(38px, 5vw, 58px); }
h3 { margin: 7px 0 0; font-size: 21px; }

.intro-lead {
  max-width: 680px;
  margin-bottom: 22px;
  color: #d7e5ff;
  font-size: 18px;
  line-height: 1.65;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: #f4f7ff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.intro-grid {
  display: grid;
  grid-template-columns: .92fr 1.3fr;
  gap: 20px;
  margin-top: 46px;
}

.start-card, .trust-list, .breakdown-card, .assumption-card, .privacy-card {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.start-card {
  padding: 28px;
  border-color: rgba(255, 255, 255, .5);
  border-radius: 22px;
  color: var(--ink);
}

.time-row { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.time-row div { display: flex; flex-direction: column; gap: 4px; }
.time-row strong { color: var(--navy); }
.time-row small { color: var(--muted); line-height: 1.4; }

.icon-circle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff;
  box-shadow: 0 10px 24px rgba(9, 51, 146, .25);
}

.trust-list {
  padding: 8px 28px;
  border-color: rgba(255, 255, 255, .5);
  border-radius: 22px;
  color: var(--ink);
}

.trust-list > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
}

.trust-list > div:last-child { border-bottom: 0; }
.trust-list span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font: 700 12px Georgia, serif;
}
.trust-list p { margin: 0; color: var(--muted); line-height: 1.5; }
.trust-list strong { display: block; margin-bottom: 3px; color: var(--navy); }
.source-note { margin-top: 24px; color: rgba(230, 238, 255, .74); font-size: 11px; }

button, input, select { font: inherit; }
.primary, .secondary {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 0;
  background: linear-gradient(135deg, var(--blue-bright), var(--navy));
  color: #fff;
  box-shadow: 0 12px 26px rgba(9, 51, 146, .22);
}

.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(9, 51, 146, .28); }
.primary:focus-visible, .secondary:focus-visible, .text-btn:focus-visible, .icon-btn:focus-visible, .hint:focus-visible {
  outline: 3px solid rgba(201, 160, 83, .55);
  outline-offset: 3px;
}
.primary.wide { width: 100%; justify-content: space-between; }
.secondary { border: 1px solid #cbd8e9; background: #fff; color: var(--navy); }
.secondary:hover { transform: translateY(-1px); border-color: var(--blue); }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }
.hidden { display: none !important; }

.estimator { max-width: 860px; margin: auto; }
.progress-wrap {
  margin-bottom: 18px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .85);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}
.progress-meta { display: flex; justify-content: space-between; color: var(--navy); font-size: 12px; font-weight: 800; }
.progress-track { height: 7px; margin-top: 11px; overflow: hidden; border-radius: 99px; background: #dce7f6; }
.progress-track div {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--blue-bright));
  transition: width .3s ease;
}

.form-step { display: none; }
.form-step.active {
  display: block;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.step-heading { margin-bottom: 32px; }
.step-heading h2 { color: var(--navy); }
.step-heading p { max-width: 650px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.field-block { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field-block > label { color: var(--navy); font-size: 13px; font-weight: 800; }
.helper { color: var(--muted); font-size: 11px; line-height: 1.45; }
.two-col, .money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.count-grid { align-items: start; }
.compact-top { margin-top: 24px; }

select, .count-grid input, .field-block > input[type="number"] {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #cbd8e9;
  border-radius: 14px;
  outline: none;
  background: var(--blue-pale);
  color: var(--ink);
}
select { padding-right: 44px; }

.money {
  height: 56px;
  display: flex;
  align-items: center;
  border: 1px solid #cbd8e9;
  border-radius: 14px;
  background: var(--blue-pale);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.money:focus-within, select:focus, .count-grid input:focus, .field-block > input[type="number"]:focus {
  border-color: var(--blue-bright);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(21, 88, 200, .12);
}

.money span { padding-left: 16px; color: var(--gold-deep); font-weight: 800; }
.money input { width: 100%; min-width: 0; height: 100%; padding: 0 16px 0 8px; border: 0; outline: none; background: transparent; color: var(--ink); }

.hint {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #a9bad2;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fbff;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.check-row:hover { transform: translateY(-1px); border-color: #a9bddb; background: #fff; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.check-row span { display: flex; flex-direction: column; gap: 3px; line-height: 1.4; }
.check-row strong { color: var(--navy); font-size: 13px; }
.check-row small { color: var(--muted); }
.conditional, .mfs-only { display: none; }
.conditional.show, .mfs-only.show { display: flex; }

.advanced {
  margin: 12px 0 24px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}
.advanced summary { padding: 18px 0; color: var(--navy); font-size: 13px; font-weight: 800; cursor: pointer; }
.advanced[open] { padding-bottom: 10px; }

.review-box {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid rgba(201, 160, 83, .35);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: var(--gold-pale);
}
.review-box strong { color: var(--navy); font-size: 13px; }
.review-box p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.consent { background: #fff; }
.form-actions { display: flex; justify-content: space-between; margin-top: 20px; padding: 20px 6px 0; }
.form-error { margin: 15px 6px 0; color: var(--red); font-size: 13px; font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 30;
  width: min(520px, calc(100% - 36px));
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: var(--navy-deep);
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.money-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.marketplace-fields { display: none; margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.marketplace-fields.show { display: block; }
.form-copy-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 2px 0 18px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
}
.form-copy-row span { color: var(--navy); font-size: 13px; font-weight: 800; }
.form-copy-row small { color: var(--muted); font-size: 11px; text-align: right; }

.results { max-width: 1040px; margin: auto; }
.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.text-btn, .icon-btn { border: 0; background: transparent; color: inherit; cursor: pointer; }
.text-btn { padding: 8px 0; color: var(--blue); font-weight: 700; letter-spacing: 0; text-transform: none; }

.result-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin: 26px 0 20px;
  padding: 46px 50px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 87% 18%, rgba(201, 160, 83, .3), transparent 25%),
    linear-gradient(135deg, var(--navy-deep), var(--blue));
  box-shadow: 0 28px 70px rgba(9, 30, 103, .24);
  color: #fff;
}
.result-hero::after {
  position: absolute;
  right: -55px;
  top: -135px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  content: "";
}
.result-hero .eyebrow { color: #f1cf82; }
.result-hero h2 {
  margin: 8px 0;
  color: #fff;
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 750;
  letter-spacing: -.06em;
}
.result-hero p { max-width: 560px; margin: 0; color: #cbdcff; }
.result-hero h2.positive { color: #f5d88f; }
.result-hero h2.negative { color: #ffb3ad; }

.result-seal {
  z-index: 1;
  width: 116px;
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-direction: column;
  border: 1px solid rgba(245, 216, 143, .58);
  border-radius: 34px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
}
.result-seal span { font: 700 27px Georgia, serif; }
.result-seal small { color: #f1cf82; font-size: 8px; letter-spacing: .18em; text-transform: uppercase; }

.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.summary-cards > div {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}
.summary-cards > div::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  content: "";
}
.summary-cards span { color: var(--muted); font-size: 11px; line-height: 1.3; }
.summary-cards strong { color: var(--navy); font-size: 20px; }

.waitlist-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin: 0 0 20px;
  padding: 30px 32px;
  border: 1px solid rgba(21, 88, 200, .18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 0%, rgba(201, 160, 83, .24), transparent 31%),
    linear-gradient(120deg, #fff 0%, #edf5ff 100%);
  box-shadow: var(--shadow-sm);
}
.waitlist-card h3 { margin: 7px 0 8px; color: var(--navy); font: 700 29px Georgia, serif; }
.waitlist-card p { max-width: 610px; margin: 0 0 8px; color: #53617b; font-size: 14px; line-height: 1.55; }
.waitlist-card small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.waitlist-button { min-width: 220px; flex: 0 0 auto; text-decoration: none; }

.result-columns { display: grid; grid-template-columns: 1.58fr .92fr; gap: 20px; }
.breakdown-card { padding: 30px; border-radius: 22px; }
.card-title { display: flex; align-items: start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.card-title h3, .assumption-card h3 { color: var(--navy); }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--blue-pale);
  color: var(--blue);
}
.breakdown { padding-top: 8px; }
.break-section { margin: 22px 0 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.break-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; color: #3e4b66; font-size: 13px; }
.break-row strong { color: var(--navy); font-weight: 700; }
.break-row.subtle strong, .break-row.credit strong { color: var(--green); }
.break-row.total { margin-top: 7px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--navy); font-weight: 800; }
.break-row.total strong { font-size: 15px; }

.equation {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--blue-soft), var(--gold-pale));
  color: var(--navy);
  font-size: 13px;
}
.equation span { color: var(--muted); }
.assumption-card, .privacy-card { padding: 25px; border-radius: 22px; }
.privacy-card {
  margin-top: 18px;
  border-color: var(--navy);
  background: linear-gradient(145deg, var(--navy), var(--blue));
  box-shadow: 0 18px 42px rgba(9, 30, 103, .18);
  color: #fff;
}
.privacy-card p { margin: 7px 0 0; color: #d5e3ff; font-size: 12px; line-height: 1.55; }
.flag { display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.flag:first-of-type { margin-top: 18px; }
.flag span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}
.flag p { margin: 1px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.result-actions { display: flex; justify-content: center; gap: 12px; margin: 34px 0; }

.legal-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .64);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.legal-block strong { color: var(--navy); }
.legal-block p { margin: 7px 0; }
.legal-block a { color: var(--blue); }

footer {
  width: calc(100% - 56px);
  max-width: 1180px;
  margin: auto;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .topbar {
    top: 8px;
    width: calc(100% - 20px);
    min-height: 82px;
    margin-top: 8px;
    padding: 0 12px;
    border-radius: 18px;
  }
  .brand-logo { width: 100px; height: 72px; }
  .brand-copy { display: none; }
  .private-pill { padding: 8px 10px; font-size: 10px; }
  main { padding: 28px 14px 60px; }
  .intro { padding: 38px 20px 24px; border-radius: 25px; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  .intro-lead { font-size: 16px; }
  .hero-badges { gap: 7px; }
  .hero-badges span { padding: 7px 9px; }
  .intro-grid, .result-columns { grid-template-columns: 1fr; }
  .intro-grid { margin-top: 30px; }
  .start-card, .trust-list { padding-left: 20px; padding-right: 20px; }
  .progress-wrap { padding: 15px 16px; }
  .form-step.active { padding: 28px 18px; border-radius: 22px; }
  .money-grid, .two-col, .money-grid.three-col { grid-template-columns: 1fr; }
  .form-copy-row { align-items: start; flex-direction: column; gap: 4px; }
  .form-copy-row small { text-align: left; }
  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 14px;
    padding: 14px 4px 10px;
    background: rgba(238, 244, 252, .95);
    backdrop-filter: blur(12px);
  }
  .form-actions .primary, .form-actions .secondary { min-width: 118px; }
  .result-hero { padding: 34px 24px; border-radius: 23px; }
  .result-seal { display: none; }
  .summary-cards { grid-template-columns: 1fr 1fr; }
  .summary-cards > div { padding: 17px 15px; }
  .waitlist-card { align-items: stretch; flex-direction: column; gap: 20px; padding: 25px 21px; }
  .waitlist-card h3 { font-size: 25px; }
  .waitlist-button { width: 100%; }
  .breakdown-card { padding: 24px 18px; }
  .equation { flex-direction: column; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
  footer { width: calc(100% - 36px); flex-direction: column; gap: 8px; padding: 22px 0; }
  .toast { bottom: 18px; }
}

@media print {
  body { background: #fff; }
  .topbar, .result-topline, .result-actions, .waitlist-card, footer, .private-pill { display: none !important; }
  main { max-width: none; padding: 0; }
  .view { display: none !important; }
  #results { display: block !important; }
  .result-hero { padding: 24px; border: 2px solid #111; background: #fff; box-shadow: none; color: #111; }
  .result-hero .eyebrow, .result-hero p { color: #333; }
  .result-hero h2.positive, .result-hero h2.negative { color: #111; }
  .summary-cards { grid-template-columns: repeat(4, 1fr); }
  .result-columns { grid-template-columns: 1.5fr 1fr; }
  .breakdown-card, .assumption-card, .privacy-card { box-shadow: none; }
  .privacy-card { border-color: #bbb; background: #fff; color: #111; }
  .privacy-card p { color: #444; }
}
