:root {
  --ink: #17211d;
  --muted: #65716b;
  --forest: #173f35;
  --forest-2: #245c4d;
  --sage: #dfe9e3;
  --mint: #edf4f0;
  --gold: #c79a4b;
  --cream: #f7f5ef;
  --paper: #fffdfa;
  --line: #dfe4df;
  --danger: #9f3f3f;
  --shadow: 0 20px 60px rgba(23, 63, 53, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.contact-gate {
  min-height: 100vh;
  padding: 34px 20px;
  display: grid;
  place-items: center;
  color: white;
  background:
    radial-gradient(circle at 82% 15%, rgba(199,154,75,.20), transparent 27%),
    linear-gradient(125deg, #112f28 0%, #1e5547 100%);
}

.gate-panel {
  width: min(940px, 100%);
  padding: 38px 48px 44px;
  background: rgba(11,39,33,.54);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 28px;
  box-shadow: 0 35px 90px rgba(0,0,0,.2);
}

.gate-brand { display: flex; align-items: center; gap: 11px; }
.gate-brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.gate-brand strong { letter-spacing: .1em; font-size: 15px; }
.gate-brand small { margin-top: 5px; color: rgba(255,255,255,.55); font-size: 7px; letter-spacing: .2em; }
.gate-brand .brand-mark { color: var(--forest); background: #f3eee4; }
.gate-copy { max-width: 760px; margin-top: 38px; }
.gate-copy h1 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.gate-copy > p:last-child { max-width: 650px; margin: 18px 0 0; color: rgba(255,255,255,.7); font-size: 15px; }
.contact-form { margin-top: 30px; }
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-field.full { grid-column: 1 / -1; }
.contact-field label { display: block; margin-bottom: 6px; color: rgba(255,255,255,.75); font-size: 11px; font-weight: 700; }
.contact-field > input, .gate-suffix { width: 100%; height: 48px; color: var(--ink); background: white; border: 1px solid transparent; border-radius: 10px; outline: 0; }
.contact-field > input { padding: 0 14px; }
.contact-field > input:focus, .gate-suffix:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,154,75,.16); }
.contact-field input[aria-invalid="true"] { border-color: #f6aaaa; }
.gate-suffix { display: flex; align-items: center; }
.gate-suffix input { width: 100%; height: 100%; padding: 0 6px 0 14px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.gate-suffix span { padding-right: 13px; color: var(--muted); font-size: 11px; }
.contact-error { min-height: 16px; display: block; padding-top: 3px; color: #ffd0c7; font-size: 10px; }
.gate-consent { margin-top: 11px; padding: 13px 15px; display: flex; align-items: flex-start; gap: 11px; color: rgba(255,255,255,.68); background: rgba(255,255,255,.07); border-radius: 10px; font-size: 11px; cursor: pointer; }
.gate-consent input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--gold); }
.consent-error { margin-left: 15px; }
.gate-button { width: 100%; margin-top: 15px; min-height: 49px; color: var(--forest); background: #e8d5ad; }
.gate-button:hover { background: #f0dfbb; }
.gate-privacy { margin: 10px 0 0; color: rgba(255,255,255,.47); text-align: center; font-size: 10px; }

.site-shell { min-height: 100vh; overflow: hidden; }

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 50%;
  font-family: "Newsreader", serif;
  font-size: 15px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.privacy-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a9b70; box-shadow: 0 0 0 4px rgba(74,155,112,.12); }

.button {
  border: 0;
  border-radius: 999px;
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 700;
}

.button-secondary { color: var(--forest); background: white; border: 1px solid var(--line); }
.button-secondary:hover { border-color: var(--forest-2); }
.button-gold { color: var(--forest); background: #efe1c2; }
.button-gold:hover { background: #e5d0a4; }

.hero {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 12px auto 0;
  padding: 70px 68px;
  color: white;
  background:
    radial-gradient(circle at 82% 25%, rgba(199,154,75,.22), transparent 26%),
    linear-gradient(125deg, #12352e 0%, #1f5547 100%);
  border-radius: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -130px;
  top: -250px;
  box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.02);
}

.hero-copy { max-width: 680px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 12px; line-height: 1; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero h1, h2 { font-family: "Newsreader", Georgia, serif; letter-spacing: -.035em; font-weight: 600; }
.hero h1 { max-width: 660px; margin: 0; font-size: clamp(44px, 6.1vw, 72px); line-height: .99; }
.hero-intro { max-width: 590px; margin: 24px 0 0; color: rgba(255,255,255,.76); font-size: 18px; }

.hero-status {
  position: relative;
  z-index: 1;
  flex: 0 0 265px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(6px);
  border-radius: 16px;
}
.hero-status.warning .status-icon { color: #8b4c28; background: #f4d7b9; }
.status-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--forest); background: #cae8d8; border-radius: 50%; font-weight: 800; }
.status-label { display: block; color: rgba(255,255,255,.58); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-status strong { display: block; margin-top: 3px; font-size: 14px; }

.summary-section, .planner-section, .details-section { width: min(1180px, calc(100% - 40px)); margin: 86px auto 0; }
.section-heading { margin-bottom: 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
h2 { margin: 0; font-size: clamp(35px, 4vw, 50px); line-height: 1.05; }
.updated-note { margin: 0 0 7px; color: var(--muted); font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.metric-primary { color: white; background: var(--forest); border-color: var(--forest); }
.metric-label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.metric-primary .metric-label, .metric-primary .metric-detail { color: rgba(255,255,255,.62); }
.metric-value { display: block; margin-top: 18px; font-family: "Newsreader", Georgia, serif; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.03em; line-height: 1; }
.metric-detail { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.projection-card { margin-top: 15px; padding: 28px 30px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.chart-header h3, .detail-card h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 24px; }
.chart-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.chart-legend span { width: 18px; height: 3px; background: var(--forest-2); border-radius: 10px; }
.chart-wrap { width: 100%; margin-top: 15px; }
#projectionChart { display: block; width: 100%; height: auto; min-height: 230px; }
.chart-insights { display: flex; justify-content: center; gap: 8px 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.chart-insights strong { color: var(--ink); }

.planner-section { padding-top: 2px; }
.text-button { border: 0; padding: 7px 0; color: var(--forest-2); background: transparent; font-size: 13px; font-weight: 700; border-bottom: 1px solid currentColor; }
.input-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.input-card { min-width: 0; margin: 0; padding: 25px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.input-card legend { padding: 0 8px 0 0; color: var(--ink); font-family: "Newsreader", Georgia, serif; font-size: 24px; font-weight: 600; }
.step-number { margin-right: 7px; color: var(--gold); font-family: "DM Sans", sans-serif; font-size: 11px; letter-spacing: .08em; vertical-align: 3px; }
.card-description { min-height: 42px; margin: 3px 0 18px; color: var(--muted); font-size: 13px; }
.field-row { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #ecefeb; }
.field-row > label { color: #37443e; font-size: 13px; font-weight: 600; }

.number-input, .money-input, .percent-input { display: flex; align-items: center; border: 1px solid #d9dfdb; background: #fff; border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.number-input:focus-within, .money-input:focus-within, .percent-input:focus-within { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(36,92,77,.1); }
.number-input input, .money-input input, .percent-input input { width: 86px; padding: 8px 5px; color: var(--ink); background: transparent; border: 0; outline: 0; text-align: right; font-weight: 700; }
.money-input input { width: 92px; }
.number-input span, .money-input span, .percent-input span { color: var(--muted); font-size: 12px; }
.number-input span, .percent-input span { padding-right: 9px; }
.money-input span { padding-left: 9px; }

.range-row { min-height: 80px; padding: 12px 0; display: block; }
.range-row label { width: 100%; display: flex; justify-content: space-between; }
.range-row output { color: var(--forest-2); font-weight: 800; }
input[type="range"] { width: 100%; margin: 15px 0 0; accent-color: var(--forest-2); }
.range-labels { display: flex; justify-content: space-between; color: #8a948f; font-size: 10px; }
.benefit-preview { margin-top: 6px; padding: 13px 15px; background: var(--mint); border-radius: 12px; }
.benefit-preview span, .benefit-preview small { display: block; color: var(--muted); font-size: 10px; }
.benefit-preview strong { display: block; margin: 2px 0; color: var(--forest); font-size: 18px; }

.asset-card { grid-column: 1 / -1; }
.asset-card .card-description { min-height: 0; }
.asset-input-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.asset-input { padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; }
.asset-input > span { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; color: var(--muted); font-size: 12px; font-weight: 700; }
.asset-input i { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.tax-deferred i, .legend-dot.deferred { background: #234e43; }
.tax-free i, .legend-dot.free { background: #c79a4b; }
.taxable i, .legend-dot.taxable-dot { background: #8ca79c; }
.asset-input .money-input input { width: 100%; text-align: left; }
.allocation-bar { width: 100%; height: 7px; margin: 17px 0 21px; display: flex; border-radius: 999px; background: #e6e9e7; overflow: hidden; }
.allocation-bar span { height: 100%; transition: width .3s ease; }
.bar-deferred { background: #234e43; }.bar-free { background: #c79a4b; }.bar-taxable { background: #8ca79c; }
.assumption-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.compact-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; background: #f8f8f5; border-radius: 12px; }
.compact-field label { color: var(--muted); font-size: 11px; font-weight: 700; }
.compact-field .money-input input, .compact-field .percent-input input { width: 74px; }

.details-section { margin-bottom: 70px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.detail-card { min-width: 0; padding: 25px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.cashflow-list { margin: 16px 0 0; }
.cashflow-list div { padding: 9px 0; display: flex; justify-content: space-between; border-bottom: 1px solid #ecefeb; font-size: 13px; }
.cashflow-list dt { color: var(--muted); }.cashflow-list dd { margin: 0; font-weight: 700; }
.cashflow-list .cashflow-total { margin-top: 4px; color: var(--forest); border-bottom: 0; font-weight: 700; }
.donut-layout { margin-top: 20px; display: flex; align-items: center; gap: 23px; }
.donut { width: 120px; height: 120px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 50%; position: relative; }
.donut::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: var(--paper); }
.donut span, .donut small { position: relative; z-index: 1; }
.donut span { font-family: "Newsreader", serif; font-size: 19px; font-weight: 600; }.donut small { color: var(--muted); font-size: 10px; }
.allocation-list { flex: 1; margin: 0; padding: 0; list-style: none; }
.allocation-list li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; padding: 5px 0; font-size: 11px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.allocation-list span:nth-child(2) { color: var(--muted); }.allocation-list strong { font-size: 11px; }
.methodology-card ul { margin: 15px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.methodology-card li + li { margin-top: 7px; }
.disclosure { margin-top: 16px; padding: 18px 22px; color: var(--muted); background: #eceee9; border-radius: 14px; font-size: 11px; }
.disclosure strong { color: var(--ink); }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 27px 0 35px; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }

@media (max-width: 900px) {
  .hero { align-items: flex-start; flex-direction: column; padding: 55px 40px; }
  .hero-status { flex-basis: auto; width: 100%; max-width: 320px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .input-groups { grid-template-columns: repeat(2, 1fr); }
  .asset-card { grid-column: 1 / -1; }
  .assumption-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .methodology-card { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .contact-gate { padding: 12px; align-items: start; }
  .gate-panel { padding: 27px 19px 30px; border-radius: 20px; }
  .gate-copy { margin-top: 28px; }
  .gate-copy h1 { font-size: 43px; }
  .contact-fields { grid-template-columns: 1fr; gap: 10px; }
  .contact-field.full { grid-column: auto; }
  .topbar, .hero, .summary-section, .planner-section, .details-section, footer { width: min(100% - 24px, 1180px); }
  .topbar { min-height: 68px; }
  .brand > span:last-child { display: none; }
  .privacy-badge, #printButton { display: none; }
  .hero { margin-top: 4px; padding: 44px 24px 28px; border-radius: 24px; }
  .hero h1 { font-size: 46px; }
  .hero-intro { font-size: 16px; }
  .summary-section, .planner-section, .details-section { margin-top: 64px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .planner-heading { flex-direction: row; align-items: flex-end; }
  .metric-grid, .input-groups, .asset-input-grid, .assumption-grid, .detail-grid { grid-template-columns: 1fr; }
  .asset-card, .methodology-card { grid-column: auto; }
  .projection-card { padding: 22px 16px 18px; }
  .chart-header { flex-direction: column; gap: 10px; }
  #projectionChart { min-height: 210px; }
  .input-card { padding: 22px 19px; }
  .card-description { min-height: 0; }
  .compact-field { min-height: 56px; }
  .donut-layout { justify-content: center; }
  footer { gap: 15px; flex-direction: column; }
}

@media print {
  body { background: white; }
  .topbar, .planner-section, footer, .button, .text-button { display: none !important; }
  .hero { margin-top: 0; padding: 35px; break-inside: avoid; }
  .hero h1 { font-size: 44px; }
  .summary-section, .details-section { width: 100%; margin-top: 30px; }
  .metric-grid { grid-template-columns: repeat(4, 1fr); }
  .metric-card, .projection-card, .detail-card { box-shadow: none; break-inside: avoid; }
  .details-section { margin-bottom: 0; }
}
