/* Solo Retirement Runway — calm, high-contrast, large-type design system */
:root {
  --bg: #fbf8f3;          /* warm paper */
  --surface: #ffffff;
  --surface-soft: #f3eee6;
  --ink: #1c2530;         /* body text: 15.6:1 on bg */
  --ink-soft: #3f4a56;    /* secondary text: 8.6:1 on bg */
  --line: #d9d1c4;
  --brand: #1d5c63;       /* deep teal: 7.4:1 on white */
  --brand-dark: #144349;
  --brand-tint: #e3efee;
  --care: #9a4a17;        /* warm clay for the care line: 6.3:1 on white */
  --care-tint: #f6e9df;
  --good: #23613a;
  --focus: #b8560b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 37, 48, .06), 0 6px 24px rgba(28, 37, 48, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; /* 18px base */ -webkit-text-size-adjust: 100%; }
@media (min-width: 900px) { html { font-size: 118.75%; /* 19px */ } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--brand-dark); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 38em; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { left: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.logo svg { width: 36px; height: 36px; flex: none; }
.nav { display: flex; gap: 1.25rem; align-items: center; }
.nav a { font-size: .95rem; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.5rem 0 3rem; font-size: .92rem; color: var(--ink-soft); background: var(--surface-soft); }
.site-footer a { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 56px; padding: .8rem 1.6rem; border-radius: 12px; border: 2px solid var(--brand); background: var(--brand); color: #fff; font: 600 1.05rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s ease, transform .05s ease; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--surface); color: var(--brand); }
.btn-secondary:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-link { background: none; border: none; color: var(--brand); font: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; padding: .5rem .25rem; min-height: 44px; }
.btn-lg { min-height: 64px; font-size: 1.15rem; padding: 1rem 2rem; }

/* Landing */
.hero { padding: 3.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 5rem 0 4rem; } }
.eyebrow { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--brand-dark); background: var(--brand-tint); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.75rem 0 1rem; }
.reassure { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--ink-soft); font-size: .95rem; }
.reassure li { display: flex; align-items: center; gap: .45rem; }
.reassure svg { width: 20px; height: 20px; color: var(--good); flex: none; }
.preview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow); }
.preview-card .verdict-mini { font-family: var(--serif); font-size: 1.45rem; margin: .25rem 0 1rem; line-height: 1.3; }
.preview-card .label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } .cards-2 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.section-alt .card { background: var(--bg); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; }
.card .icon svg { width: 24px; height: 24px; }
.stat { font-family: var(--serif); font-size: 2.4rem; color: var(--brand); line-height: 1.1; margin-bottom: .35rem; }
.source { font-size: .85rem; color: var(--ink-soft); }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .steps-list { grid-template-columns: repeat(3, 1fr); } }
.steps-list li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.steps-list li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: .9rem; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist svg { width: 24px; height: 24px; color: var(--good); flex: none; margin-top: .15rem; }
details.faq { border-bottom: 1px solid var(--line); padding: .25rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; padding: 1rem 2.5rem 1rem 0; list-style: none; position: relative; min-height: 44px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.5rem; color: var(--brand); }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--ink-soft); }
.cta-band { background: var(--brand); color: #fff; border-radius: 20px; padding: 2.5rem 1.5rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e4f0ef; }
.cta-band .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }
.cta-band .btn:hover { background: var(--brand-tint); }
.disclaimer { background: var(--surface-soft); border-left: 4px solid var(--brand); padding: 1rem 1.25rem; border-radius: 8px; font-size: .95rem; color: var(--ink-soft); }

/* Planner */
.planner { padding: 2rem 0 1rem; }
.progress { margin-bottom: 1.75rem; }
.progress-text { display: flex; justify-content: space-between; font-size: .95rem; color: var(--ink-soft); margin-bottom: .5rem; }
.progress-bar { height: 10px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.75rem 1.25rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .step-card { padding: 2.5rem; } }
.step-card h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
.step-card h1:focus { outline: none; }
.why { color: var(--ink-soft); margin-bottom: 1.5rem; }
.field { margin-bottom: 1.5rem; }
.field > label, .field > .label, fieldset legend { display: block; font-weight: 600; margin-bottom: .45rem; font-size: 1.05rem; }
.hint { display: block; color: var(--ink-soft); font-size: .95rem; margin: -.15rem 0 .6rem; }
.input-wrap { position: relative; display: flex; align-items: center; max-width: 340px; }
.input-wrap .prefix, .input-wrap .suffix { position: absolute; color: var(--ink-soft); font-size: 1.1rem; pointer-events: none; }
.input-wrap .prefix { left: 1rem; }
.input-wrap .suffix { right: 1rem; }
input[type="text"], input[type="number"], select { width: 100%; min-height: 60px; font: 500 1.2rem/1.2 var(--sans); color: var(--ink); background: #fff; border: 2px solid #8a929b; border-radius: 12px; padding: .7rem 1rem; }
.input-wrap.has-prefix input { padding-left: 2.1rem; }
.input-wrap.has-suffix input { padding-right: 5.5rem; }
input:focus, select:focus { border-color: var(--brand); outline: 3px solid var(--focus); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: #a3261b; }
.error { color: #a3261b; font-weight: 600; font-size: .95rem; margin-top: .5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.choices { display: grid; gap: .75rem; }
@media (min-width: 640px) { .choices.cols-3 { grid-template-columns: repeat(3, 1fr); } .choices.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label { display: block; min-height: 60px; padding: 1rem 1.1rem 1rem 3.2rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; position: relative; line-height: 1.35; }
.choice label::before { content: ""; position: absolute; left: 1rem; top: 1.1rem; width: 22px; height: 22px; border: 2px solid #6b737c; border-radius: 50%; background: #fff; }
.choice input:checked + label { border-color: var(--brand); background: var(--brand-tint); }
.choice input:checked + label::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 45%, #fff 50%); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice .sub { display: block; font-size: .9rem; color: var(--ink-soft); margin-top: .2rem; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap-reverse; }
.step-nav .btn { min-width: 160px; }
@media (max-width: 480px) { .step-nav .btn { flex: 1 1 100%; } }
.tip { background: var(--brand-tint); border-radius: 12px; padding: 1rem 1.2rem; margin: 1rem 0 1.5rem; font-size: .97rem; }
.tip strong { color: var(--brand-dark); }
.inline-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .inline-row { grid-template-columns: 1fr 1fr; } }
.reveal { border-left: 4px solid var(--line); padding-left: 1.1rem; margin: 0 0 1.5rem; }
.estimate-out { font-size: 1.05rem; margin-top: .75rem; }

/* Result */
.verdict { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 2rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 2rem; }
@media (min-width: 640px) { .verdict { padding: 2.5rem; } }
.verdict h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); margin-bottom: .4em; }
.verdict h1:focus { outline: none; }
.verdict .big { color: var(--brand); white-space: nowrap; }
.pills { display: grid; gap: .9rem; margin: 1.5rem 0 0; }
@media (min-width: 640px) { .pills { grid-template-columns: repeat(3, 1fr); } }
.pill { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.pill .k { display: block; font-size: .88rem; color: var(--ink-soft); }
.pill .v { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.pill.care .v { color: var(--care); }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .chart-card { padding: 2rem; } }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .25rem 0 1rem; font-size: .95rem; }
.legend span { display: inline-flex; align-items: center; gap: .5rem; }
.legend i { display: inline-block; width: 28px; height: 0; border-top: 4px solid var(--brand); }
.legend i.care { border-top: 4px dashed var(--care); }
.legend i.band { height: 14px; border: 0; background: var(--care-tint); border-radius: 3px; }
.chart svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.chart text { fill: var(--ink-soft); font-size: 13px; }
table.years { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 1rem; }
table.years th, table.years td { text-align: right; padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.years th:first-child, table.years td:first-child { text-align: left; }
table.years thead th { background: var(--surface-soft); position: sticky; top: 0; }
.table-scroll { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--brand); min-height: 44px; display: flex; align-items: center; }
.lever { display: flex; gap: 1rem; align-items: flex-start; }
.lever .delta { flex: none; min-width: 84px; text-align: center; background: var(--brand-tint); color: var(--brand-dark); border-radius: 12px; padding: .6rem .5rem; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.15; }
.lever .delta small { display: block; font-family: var(--sans); font-size: .78rem; font-weight: 500; }
.lever .delta.neutral { background: var(--surface-soft); color: var(--ink-soft); }
.answers { display: grid; gap: 0; margin: 0; }
.answers div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.answers dt { color: var(--ink-soft); }
.answers dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: .75rem; }
.soon { position: relative; border: 2px dashed var(--line); background: var(--bg); }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--surface-soft); color: var(--ink-soft); border: 1px solid var(--line); padding: .2rem .6rem; border-radius: 999px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 2rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-soft); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header .nav, .site-footer, .step-nav, .result-actions, .soon, .skip, details.more summary { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .verdict, .chart-card, .card { box-shadow: none; break-inside: avoid; }
}

/* Small-screen refinements */
@media (max-width: 639px) {
  .pill { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; }
  .pill .v { font-size: 1.25rem; text-align: right; }
  .hero-actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .logo { font-size: 1rem; gap: .5rem; }
  .logo svg { width: 32px; height: 32px; }
  .nav a { white-space: nowrap; }
}

/* "You're not alone" band under the hero */
.belong { display: grid; gap: .5rem 2rem; align-items: center; margin-top: 2.5rem; background: var(--brand-tint); border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: 18px; padding: 1.4rem 1.3rem; }
@media (min-width: 760px) { .belong { grid-template-columns: auto 1fr; padding: 1.75rem 2rem; } }
.belong-num { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1; color: var(--brand-dark); }
.belong-h { font-size: clamp(1.3rem, 3.4vw, 1.6rem); margin: 0 0 .4rem; }
.belong p { margin: 0 0 .4rem; }
.belong .source { margin: 0; font-size: .9rem; color: var(--ink-soft); }
/* Always-visible "estimates, not guarantees" note beside results */
.estimate-note { background: #fff; border: 1px solid var(--line); border-left: 5px solid #6b737c; border-radius: 10px; padding: .75rem 1rem; font-size: .97rem; margin: 1rem 0; color: var(--ink); }
.estimate-note strong { color: var(--ink); }
table.years tr.beyond td { color: #5b636c; background: #f6f3ee; }

/* Legal and pricing pages */
.draft-note { background: #fff7e6; border: 2px solid #e2b866; color: #4a3505; border-radius: 12px; padding: .9rem 1.1rem; margin: 1rem 0 1.5rem; font-size: .97rem; }
.tbd { background: #fff2cc; color: #4a3505; border-radius: 4px; padding: 0 .25rem; font-weight: 600; }
.note-box { background: var(--brand-tint); border-radius: 14px; padding: 1.1rem 1.25rem; margin: 1.25rem 0; }
.price-grid { display: grid; gap: 1.25rem; margin: 1.5rem 0 2rem; }
@media (min-width: 760px) { .price-grid { grid-template-columns: 1fr 1.25fr; align-items: start; } }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; }
.price-card.featured { border: 2px solid var(--brand); }
.price-card h2, .price-card h3 { margin-top: 0; font-size: 1.4rem; }
.price { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; margin: .25rem 0 .75rem; color: var(--brand-dark); }
.price span { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--ink-soft); }
.price-card ul { padding-left: 1.2rem; } .price-card li { margin: .35rem 0; }
.footer-links { flex-wrap: wrap; }
