:root {
  --navy: #15233b;
  --navy-soft: #263b5b;
  --terracotta: #b5533f;
  --terracotta-dark: #8e3d2f;
  --gold: #d8aa56;
  --sky: #bdd8e4;
  --sky-pale: #edf6f9;
  --cream: #f7f1e6;
  --success: #247457;
  --success-pale: #edf7f1;
  --text: #243047;
  --muted: #667085;
  --line: #dde2e7;
  --line-strong: #b8c0ca;
  --shadow: 0 18px 50px rgba(21,35,59,.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fffdf9;
  font: 16px/1.65 Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .65rem .85rem;
  transform: translateY(-160%);
  border-radius: 7px;
  color: white;
  background: var(--navy);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  min-height: 84px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: .7rem; align-items: center; color: var(--navy); text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font: 600 1.05rem Baskerville, Georgia, serif; }
.brand small { margin-top: .2rem; color: var(--muted); font-size: .65rem; }
.site-header nav { display: flex; gap: .5rem; }
.site-header nav a {
  padding: .5rem .7rem;
  border-radius: 8px;
  color: var(--navy);
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}
.site-header nav a:hover, .site-header nav a:focus-visible { background: var(--sky-pale); }

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}
.hero-copy { max-width: 760px; }
.eyebrow { margin: 0 0 .45rem; color: var(--terracotta-dark); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { color: var(--navy); font-family: Baskerville, "Iowan Old Style", Georgia, serif; font-weight: 600; letter-spacing: -.025em; }
h1 { max-width: 750px; margin: 0; font-size: clamp(3.2rem, 7vw, 5.75rem); line-height: .98; }
.hero-copy > p:not(.eyebrow) { max-width: 700px; margin: 1.2rem 0 0; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.document-download {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .45rem;
  align-items: baseline;
  margin: .85rem 0 0 !important;
  color: var(--muted);
  font-size: .72rem !important;
}
.document-download a {
  color: var(--navy);
  font-weight: 800;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}
.document-download a:hover { color: var(--terracotta-dark); }
.document-download strong {
  display: inline-flex;
  margin-left: .2rem;
  padding: .08rem .28rem;
  border-radius: 4px;
  color: var(--terracotta-dark);
  background: var(--cream);
  font-size: .58rem;
  letter-spacing: .04em;
}
.button {
  min-height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .7rem 1.05rem;
  border: 1px solid var(--navy);
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 850;
  text-decoration: none;
}
.button-primary { color: white; background: var(--navy); }
.button-primary:hover, .button-primary:focus-visible { border-color: var(--terracotta-dark); background: var(--terracotta-dark); }
.button-secondary { color: var(--navy); background: white; }
.button-secondary:hover, .button-secondary:focus-visible { background: var(--sky-pale); }
.foundation-highlight {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border-radius: 22px;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
}
.foundation-highlight::after { content: "R"; position: absolute; right: -1rem; bottom: -4.5rem; color: rgba(255,255,255,.05); font: 600 13rem Baskerville, Georgia, serif; }
.foundation-highlight span { position: relative; z-index: 1; color: var(--sky); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.foundation-highlight strong { position: relative; z-index: 1; display: block; margin: .35rem 0; font: 600 clamp(3rem, 7vw, 5rem)/1 Baskerville, Georgia, serif; }
.foundation-highlight p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.74); }

.section { padding: clamp(3.5rem, 7vw, 6rem) 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 780px; margin-bottom: 1.6rem; }
.section-heading h2, .calculator-cta h2, .final-notes h2 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 3.7rem); line-height: 1.02; }
.section-heading > p:last-child { margin: .75rem 0 0; color: var(--muted); }

.fee-equation {
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: .65rem;
  align-items: stretch;
}
.fee-equation article { min-width: 0; display: grid; align-content: center; padding: 1.1rem; border: 1px solid var(--line); border-radius: 13px; background: white; }
.fee-equation span:not(.operator) { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fee-equation strong { display: block; margin-top: .15rem; color: var(--navy); font: 600 2rem Baskerville, Georgia, serif; }
.fee-equation small { color: var(--muted); font-size: .62rem; line-height: 1.35; }
.fee-equation .saving { border-color: #bcd9cc; background: var(--success-pale); }
.fee-equation .saving strong { color: var(--success); }
.fee-equation .starting-total { color: white; border-color: var(--navy); background: var(--navy); }
.fee-equation .starting-total span, .fee-equation .starting-total small { color: rgba(255,255,255,.68); }
.fee-equation .starting-total strong { color: white; }
.operator { align-self: center; color: var(--muted); font-size: 1.3rem; font-weight: 900; }

.two-column { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.content-card { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.content-card h2 { margin: 0 0 1rem; font-size: 2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .72rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
thead th { color: var(--muted); background: var(--cream); font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; }
tbody th { color: var(--navy); font-size: .76rem; }
tbody td { color: var(--text); font-size: .76rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.best-value { background: var(--success-pale); }
.best-value td strong, .best-value td small { display: block; }
.best-value td strong { color: var(--success); }
.best-value td small { margin-top: .1rem; color: var(--muted); font-size: .62rem; }
.resource-card { background: var(--sky-pale); }
.resource-card > p:not(.eyebrow) { color: var(--muted); }
.resource-card ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem; margin: 1rem 0; padding: 0; list-style: none; }
.resource-card li { padding: .55rem .65rem; border-radius: 8px; color: var(--navy); background: rgba(255,255,255,.78); font-size: .72rem; font-weight: 800; }
.resource-card .card-note { padding-top: .8rem; border-top: 1px solid rgba(21,35,59,.12); font-size: .68rem; }

.choice-comparison { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.choice-comparison article, .bond-grid article { padding: 1.35rem; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.choice-saving { border-color: #bcd9cc !important; background: var(--success-pale) !important; }
.choice-label { display: inline-flex; padding: .25rem .48rem; border-radius: 999px; color: var(--terracotta-dark); background: var(--cream); font-size: .61rem; font-weight: 850; }
.choice-saving .choice-label { color: var(--success); background: white; }
.choice-comparison h3, .bond-grid h3 { margin: .7rem 0 .4rem; font-size: 1.8rem; }
.choice-comparison p, .bond-grid p { margin: 0; color: var(--muted); font-size: .78rem; }

.bond-section { padding-right: clamp(1.2rem, 4vw, 3rem); padding-left: clamp(1.2rem, 4vw, 3rem); border-radius: 24px; background: var(--sky-pale); }
.bond-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .8rem; }
.bond-price { display: block; margin: .15rem 0 .65rem; color: var(--navy); font: 600 2.5rem Baskerville, Georgia, serif; }
.refund { display: grid; grid-template-columns: 1.7rem minmax(0,1fr); gap: .5rem; align-items: start; margin-top: 1rem !important; padding-top: .8rem; border-top: 1px solid var(--line); }
.refund span { width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--success); }
.refund strong { color: var(--navy); font-size: .7rem; line-height: 1.45; }

.final-notes { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 2rem; }
.final-notes ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.final-notes li { padding: .75rem .9rem .75rem 2.5rem; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: .74rem; }
.final-notes li::before { content: "✓"; display: inline-block; width: 1.35rem; margin-left: -1.75rem; color: var(--success); font-weight: 900; }

.calculator-cta { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-bottom: 4rem; padding: clamp(1.5rem,4vw,2.5rem); border-radius: 20px; color: white; background: var(--navy); }
.calculator-cta h2 { max-width: 760px; color: white; }
.calculator-cta p:not(.eyebrow) { max-width: 730px; margin: .6rem 0 0; color: rgba(255,255,255,.68); }
.calculator-cta .button { flex: 0 0 auto; color: var(--navy); border-color: white; background: white; }
.calculator-cta .button:hover, .calculator-cta .button:focus-visible { color: white; border-color: var(--terracotta); background: var(--terracotta); }

.site-footer { width: min(1180px, calc(100% - 2rem)); display: flex; justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 1.3rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--navy); font-weight: 800; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

@media (max-width: 980px) {
  .fee-equation { grid-template-columns: 1fr; }
  .fee-equation .operator { display: none; }
  .bond-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { min-height: 76px; }
  .site-header nav a:last-child { display: none; }
  .hero { grid-template-columns: 1fr; padding: 3.5rem 0; }
  h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .foundation-highlight { max-width: 520px; }
  .two-column, .choice-comparison, .final-notes { grid-template-columns: 1fr; }
  .calculator-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .brand small { display: none; }
  .site-header nav a { padding-right: .4rem; padding-left: .4rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .resource-card ul { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media print {
  @page { margin: 14mm; }
  body { color: #000; background: white; font-size: 9pt; }
  .skip-link, .site-header, .hero-actions, .document-download, .calculator-cta, .site-footer { display: none !important; }
  main, .site-footer { width: 100%; }
  .hero { grid-template-columns: 1fr .45fr; padding: 0 0 8mm; }
  h1 { font-size: 32pt; }
  .section { padding: 8mm 0; break-inside: auto; }
  .fee-equation, .two-column, .choice-comparison { break-inside: avoid; }
  .bond-grid { break-inside: auto; }
  .bond-grid article { break-inside: avoid; }
  .content-card, .choice-comparison article, .bond-grid article { box-shadow: none; }
  .pdf-footer-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
