:root {
  --ink: #17342b;
  --muted: #65766f;
  --forest: #193a30;
  --forest-deep: #102c24;
  --mint: #c8f060;
  --cream: #f7f4ed;
  --paper: #ffffff;
  --line: #dce3df;
  --focus: #805ad5;
  --warning: #fff6d6;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--cream); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.calculator-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 35%) 1fr; }
.brand-panel { position: relative; overflow: hidden; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 72px); color: white; background: var(--forest); }
.brand-panel::before { content: ""; position: absolute; width: 540px; height: 540px; right: -280px; bottom: 80px; border: 1px solid rgba(200, 240, 96, .24); border-radius: 50%; box-shadow: 0 0 0 80px rgba(200, 240, 96, .035), 0 0 0 160px rgba(200, 240, 96, .025); }
.brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px; width: fit-content; color: white; text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -.03em; }
.brand > span:last-child > span { color: var(--mint); }
.brand-symbol { position: relative; width: 34px; height: 34px; display: inline-grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; padding: 6px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; }
.brand-symbol i { display: block; background: var(--mint); border-radius: 3px 3px 1px 1px; }
.brand-symbol i:nth-child(1) { height: 9px; opacity: .55; }
.brand-symbol i:nth-child(2) { height: 15px; opacity: .75; }
.brand-symbol i:nth-child(3) { height: 21px; }
.brand-copy { position: relative; z-index: 1; max-width: 430px; margin-block: 100px; }
.eyebrow { display: block; margin-bottom: 18px; color: #5e756c; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
.brand-copy .eyebrow { color: var(--mint); }
.brand-copy h2 { max-width: 390px; margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(40px, 5vw, 68px); line-height: .98; letter-spacing: -.05em; }
.brand-copy > p:last-child { max-width: 380px; color: #c7d4cf; font-size: 17px; line-height: 1.65; }
.privacy-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #bdd0c8; font-size: 13px; }
.privacy-note span { color: var(--mint); font-size: 8px; box-shadow: 0 0 0 4px rgba(200,240,96,.12); border-radius: 50%; }

.form-panel { display: flex; min-width: 0; flex-direction: column; background: var(--paper); }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 16px clamp(24px, 5vw, 76px); border-bottom: 1px solid #eef1ef; font-size: 13px; }
.topbar a { color: var(--forest); text-underline-offset: 3px; }
.preview-pill { padding: 7px 11px; color: #43544e; background: #edf2ef; border-radius: 999px; font-weight: 700; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 820px; margin: 30px auto 0; padding: 0 clamp(24px, 5vw, 76px); }
.progress li { position: relative; }
.progress li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 1px; background: var(--line); }
.progress li.complete:not(:last-child)::after { background: #8fb139; }
.progress button { position: relative; z-index: 1; display: flex; width: 100%; flex-direction: column; align-items: center; gap: 6px; padding: 0; color: #8b9994; border: 0; background: transparent; font-size: 11px; font-weight: 650; }
.progress button > span { display: grid; place-items: center; width: 31px; height: 31px; color: #7a8983; background: white; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; }
.progress .active button { color: var(--forest); }
.progress .active button > span { color: var(--forest); border: 2px solid var(--forest); }
.progress .complete button > span { color: var(--forest-deep); background: var(--mint); border-color: var(--mint); }
.progress button:not(:disabled) { cursor: pointer; }

.step-card { width: min(760px, calc(100% - 48px)); margin: clamp(56px, 8vh, 92px) auto 30px; }
.step-content { min-height: 410px; }
.question-heading { max-width: 680px; margin-bottom: 34px; }
.question-heading h1 { margin: 0 0 16px; outline: none; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(36px, 4.5vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.question-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 26px; padding: 0; border: 0; }
.choice { display: flex; min-height: 98px; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.choice:hover { border-color: #91a49d; transform: translateY(-1px); }
.choice.selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); background: #f8fbf9; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px; border: 1px solid #9aa9a3; border-radius: 50%; }
.choice.selected .choice-mark { border: 5px solid var(--forest); }
.choice strong, .choice small { display: block; }
.choice strong { margin-bottom: 6px; font-size: 15px; }
.choice small { color: var(--muted); line-height: 1.4; }
.field { margin-bottom: 24px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.input-wrap { display: flex; align-items: center; border: 1px solid #bfcac6; border-radius: 9px; background: white; overflow: hidden; }
.input-wrap:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(128, 90, 213, .15); }
.input-wrap > span { padding-left: 15px; color: #5c6d66; }
.input-wrap > .suffix { padding: 0 15px 0 6px; }
.input-wrap input { width: 100%; min-height: 52px; padding: 13px 14px; color: var(--ink); border: 0; outline: 0; background: transparent; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.scope-card { margin-top: 30px; padding: 18px 20px; border-left: 4px solid var(--mint); background: #f1f6ed; }
.scope-card p { margin: 6px 0 0; color: #53645d; line-height: 1.5; }
.allocation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.allocation-total { display: grid; grid-template-columns: 1fr auto; gap: 3px 20px; align-items: baseline; margin: -2px 0 26px; padding: 13px 16px; border-radius: 9px; background: #f1f6ed; }
.allocation-total > span { font-size: 13px; font-weight: 750; }
.allocation-total > strong { font-size: 20px; }
.allocation-total > small { grid-column: 1 / -1; color: var(--muted); }
.allocation-total.invalid { color: #862f2f; background: #fff0ef; }
.bonus-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 24px; padding: 0; border: 0; }
.bonus-choice legend { grid-column: 1 / -1; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.bonus-choice label { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.bonus-choice label:has(input:checked) { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); background: #f8fbf9; }
.bonus-choice input { margin-top: 3px; accent-color: var(--forest); }
.bonus-choice strong, .bonus-choice small { display: block; }
.bonus-choice small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.form-errors { margin: 0 0 26px; padding: 16px 18px; color: #782b2b; border: 1px solid #e7aaaa; border-radius: 10px; background: #fff3f2; }
.form-errors ul { margin: 8px 0 0; padding-left: 20px; }
.review-list { margin: 0; border-top: 1px solid var(--line); }
.review-list div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; text-align: right; font-weight: 750; }
.demo-warning { display: flex; gap: 14px; margin-top: 24px; padding: 18px; border: 1px solid #e3cf78; border-radius: 12px; background: var(--warning); }
.demo-warning > span { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; color: white; background: #8c7020; border-radius: 50%; font-weight: 800; }
.demo-warning p { margin: 5px 0 0; color: #665923; line-height: 1.45; }
.results-layout { grid-template-columns: minmax(240px, 27%) 1fr; }
.results-layout .brand-panel { position: sticky; top: 0; align-self: start; height: 100vh; }
.result-step { width: min(980px, calc(100% - 48px)); margin-top: 48px; }
.result-step .step-content { min-height: auto; }
.result-heading { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 30px; align-items: end; margin-bottom: 32px; }
.result-heading h1 { margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5vw, 68px); font-weight: 500; line-height: .95; letter-spacing: -.05em; }
.result-heading h1 small { display: block; margin-top: 10px; color: #60726a; font-family: Inter, ui-sans-serif, sans-serif; font-size: 15px; font-weight: 650; letter-spacing: 0; }
.result-heading p { max-width: 640px; margin: 0; color: var(--muted); line-height: 1.55; }
.timing-card { padding: 22px; color: white; border-radius: 14px; background: var(--forest); box-shadow: 7px 7px 0 var(--mint); }
.timing-card span, .timing-card small { display: block; color: #c9d6d1; }
.timing-card span { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.timing-card strong { display: block; margin: 12px 0 8px; color: var(--mint); font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; }
.timing-card small { line-height: 1.4; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.metric-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); }
.metric-grid span { min-height: 2.5em; font-size: 12px; font-weight: 750; line-height: 1.25; text-transform: uppercase; letter-spacing: .06em; }
.metric-grid strong { display: block; margin: 8px 0 5px; font-size: 24px; }
.chart-card, .allocation-card { margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; letter-spacing: -.025em; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend .baseline, .bar-chart .baseline { background: #cad4cf; }
.legend .scenario, .bar-chart .scenario { background: var(--mint); }
.bar-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; height: 220px; margin-top: 24px; padding-top: 8px; border-bottom: 1px solid #cdd6d1; }
.bar-group { min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 9px; text-align: center; }
.bars { display: flex; height: 100%; align-items: end; justify-content: center; gap: 5px; }
.bars i { width: min(24px, 38%); height: var(--bar); min-height: 2px; border-radius: 4px 4px 0 0; }
.bar-group > span { color: var(--muted); font-size: 11px; }
.chart-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.ruleset { padding: 6px 9px; color: #476057; border-radius: 6px; background: #eaf0ed; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.allocation-table { margin-top: 18px; border-top: 1px solid var(--line); }
.allocation-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) 1fr 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.allocation-row > div:nth-child(n + 2) { text-align: right; }
.allocation-row strong, .allocation-row small, .allocation-row span { display: block; }
.allocation-row small, .allocation-row span { color: var(--muted); font-size: 11px; }
.allocation-row > div:nth-child(n + 2) strong { margin-top: 3px; }
.warning-list { list-style: none; display: grid; gap: 10px; margin: 20px 0 0; padding: 0; }
.warning-list li { display: flex; gap: 12px; padding: 15px; border-radius: 10px; background: #fff8e5; }
.warning-list li > span { display: grid; flex: 0 0 auto; place-items: center; width: 23px; height: 23px; color: white; background: #8c7020; border-radius: 50%; font-weight: 800; }
.warning-list p { margin: 4px 0 0; color: #655a34; font-size: 13px; line-height: 1.45; }
.warning-list .warning-blocking { background: #fff0ef; }
.warning-list .warning-blocking > span { background: #9a3933; }
.professional-note { margin: 20px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.professional-note strong { color: var(--ink); }
.assumptions { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; }
.assumptions summary { cursor: pointer; font-weight: 750; }
.assumptions li, .assumptions p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid #edf0ee; }
.button { min-height: 50px; padding: 12px 22px; border-radius: 8px; border: 1px solid var(--forest); font-weight: 750; cursor: pointer; }
.button.primary { min-width: 160px; color: white; background: var(--forest); }
.button.primary:hover:not(:disabled) { background: #245245; }
.button.secondary { color: var(--forest); background: white; }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button:focus-visible, .choice:has(input:focus-visible), .progress button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.form-panel footer { margin-top: auto; padding: 24px; color: #788780; text-align: center; font-size: 11px; }
.noscript { margin: 20px; padding: 16px; background: var(--warning); }

@media (max-width: 850px) {
  .calculator-shell { display: block; }
  .results-layout .brand-panel { position: relative; height: auto; }
  .brand-panel { min-height: auto; padding: 22px 24px; }
  .brand-copy { margin: 42px 0 24px; }
  .brand-copy h2 { max-width: 520px; font-size: 42px; }
  .brand-copy > p:last-child { max-width: 600px; }
  .privacy-note { margin-top: 30px; }
  .step-card { margin-top: 52px; }
  .result-heading { grid-template-columns: 1fr; }
  .timing-card { max-width: 420px; }
}

@media (max-width: 560px) {
  .brand-copy { margin-top: 48px; }
  .brand-copy h2 { font-size: 36px; }
  .topbar { justify-content: space-between; padding: 12px 18px; }
  .progress { padding-inline: 12px; }
  .progress button { font-size: 10px; }
  .step-card { width: min(100% - 32px, 760px); }
  .question-heading h1 { font-size: 36px; }
  .choice-grid, .two-columns { grid-template-columns: 1fr; }
  .allocation-grid, .bonus-choice, .metric-grid { grid-template-columns: 1fr; }
  .result-step { width: min(100% - 28px, 980px); }
  .result-heading h1 { font-size: 40px; }
  .section-heading { display: block; }
  .legend, .ruleset { display: inline-flex; margin-top: 12px; }
  .bar-chart { gap: 5px; height: 180px; }
  .allocation-row { grid-template-columns: 1fr 1fr; }
  .allocation-row > div:first-child { grid-column: 1 / -1; }
  .step-content { min-height: auto; }
  .actions { position: sticky; bottom: 0; margin-inline: -16px; padding: 16px; background: rgba(255,255,255,.96); }
  .button { min-width: 0; padding-inline: 16px; }
  .button.primary { flex: 1; }
}

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