/* Retire Handbook
   Brand: deep green, gold sun, warm cream paper (Canva brand set).
   Large type and high contrast for readers aged 55 to 74. Mobile first.
   Single committed light theme: every color is painted explicitly. */

:root {
  color-scheme: light;
  --paper: #f6f4f1;
  --paper-2: #ffffff;
  --paper-3: #efece6;
  --ink: #17201e;
  --ink-2: #4a5654;
  --line: #d9d8d2;
  --line-strong: #bdbdb4;
  --green: #114944;
  --green-2: #266360;
  --green-soft: #e4ecea;
  --gold: #d8a455;
  --gold-2: #b9862f;
  --gold-soft: #f6e9d0;
  --on-green: #f6f4f1;
  --on-green-2: #c7d5d1;
  --danger: #a33a2a;
  --danger-soft: #f7e6e2;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(17, 73, 68, 0.08), 0 10px 30px rgba(17, 73, 68, 0.08);
  --measure: 62ch;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 19px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (min-width: 720px) { html { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); line-height: 1.55; font-variant-numeric: tabular-nums; }
img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.005em; text-wrap: balance; margin: 0; color: var(--green); }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.2rem; }
@media (min-width: 720px) { h1 { font-size: 3.1rem; } h2 { font-size: 2.2rem; } h3 { font-size: 1.3rem; } }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.9em; }
ul, ol { margin: 0; padding-left: 1.3em; max-width: var(--measure); }
li + li { margin-top: 0.5em; }
a { color: var(--green-2); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-2); }
.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); }
.center { text-align: center; }
.center p, .center h1, .center h2 { margin-left: auto; margin-right: auto; }
.hidden { display: none !important; }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }

/* Layout */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.1rem; }
.wrap--narrow { max-width: 760px; }
.section { padding: 3rem 0; }
@media (min-width: 720px) { .section { padding: 4.5rem 0; } }
.section--paper2 { background: var(--paper-2); }
.section--green { background: var(--green); color: var(--on-green); }
.section--green h2, .section--green h3 { color: var(--on-green); }
.section--green .eyebrow { color: var(--gold); }
.section--green .muted, .section--green .lede { color: var(--on-green-2); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack--lg { gap: 1.8rem; }
.grid { display: grid; gap: 1.2rem; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* Top bar */
.topbar { background: var(--green); color: var(--on-green); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; }
.topbar .logo img { height: 2.2rem; }
@media (min-width: 720px) { .topbar .logo img { height: 2.5rem; } }
.topbar nav { display: none; gap: 1.6rem; }
.topbar nav a { color: var(--on-green); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.topbar nav a:hover { color: var(--gold); }
@media (min-width: 900px) { .topbar nav { display: flex; } }
.topbar--center .wrap { justify-content: center; }
.logo { display: inline-block; line-height: 0; }
.logo img { width: auto; display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 62px; padding: 0.8rem 1.6rem; border: 2px solid var(--green); border-radius: var(--radius); background: var(--green); color: #ffffff; font-family: var(--font-body); font-size: 1.12rem; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease; }
.btn:hover { background: var(--green-2); border-color: var(--green-2); color: #ffffff; }
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--green); }
.btn--gold:hover { background: #c8933f; border-color: #c8933f; color: var(--green); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost:hover { background: var(--green-soft); color: var(--green); }
.btn--sm { min-height: 46px; padding: 0.4rem 1.1rem; font-size: 0.95rem; border-radius: 10px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-note { margin-top: 0.7rem; font-size: 0.9rem; color: var(--ink-2); }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " \2192"; }

/* Hero */
.hero { padding: 2.2rem 0 2.6rem; }
@media (min-width: 900px) { .hero { padding: 3.6rem 0 4rem; } }
.hero .wrap { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; } }
.hero h1 { margin-top: 0.7rem; }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.hero .lede { margin-top: 1.2rem; font-size: 1.22rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 1.7rem; }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--green); }
@media (min-width: 900px) { .hero-art { aspect-ratio: 7 / 8; } }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trust { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; max-width: none; }
.trust li { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }
.trust .icon { width: 1.2rem; height: 1.2rem; color: var(--green-2); }

/* Facts band */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; grid-template-columns: 1fr 1fr; max-width: none; text-align: center; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts li { margin: 0; }
.facts strong { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--gold); }
.facts span { display: block; margin-top: 0.4rem; color: var(--on-green-2); font-size: 0.95rem; }

/* Cards */
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem 1.4rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0.9rem; }
.card p { margin-top: 0.5rem; color: var(--ink-2); }
.card .num { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--green); color: var(--on-green); font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.card .glyph { width: 3rem; height: 3rem; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-soft); color: var(--green); }
.card .glyph .icon { width: 1.6rem; height: 1.6rem; }

/* Split and features */
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.split-art { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1 / 1; }
.split-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; max-width: none; }
.features li { display: grid; grid-template-columns: 2.8rem 1fr; gap: 1rem; align-items: start; margin: 0; }
.features .glyph { width: 2.8rem; height: 2.8rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); }
.features .glyph .icon { width: 1.4rem; height: 1.4rem; }
.features h3 { font-size: 1.15rem; }
.features p { margin-top: 0.3rem; color: var(--ink-2); }

/* Checks */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; max-width: none; }
.checks li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; align-items: start; margin: 0; padding: 1rem 1.1rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.checks .icon { width: 1.6rem; height: 1.6rem; color: var(--green-2); margin-top: 0.1rem; }
.checks strong { display: block; font-size: 1.05rem; }
.checks span { color: var(--ink-2); }

/* CTA band */
.cta-band .wrap { display: grid; gap: 1.2rem; align-items: center; }
@media (min-width: 900px) { .cta-band .wrap { grid-template-columns: 1fr auto; gap: 2.5rem; } }
.cta-band h2 { font-size: 1.7rem; }
.cta-band p { color: var(--on-green-2); }

/* FAQ */
.faq { display: grid; gap: 0.7rem; }
.faq details { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.2rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2.2rem 1rem 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.8rem; font-size: 1.6rem; color: var(--gold-2); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 1.2rem; color: var(--ink-2); }

/* Footer */
.site-footer { background: var(--green); color: var(--on-green-2); padding: 2.6rem 0 2rem; font-size: 0.92rem; }
.site-footer .cols { display: grid; gap: 1.8rem; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; } }
.site-footer h3 { color: var(--on-green); font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.45rem; }
.site-footer a { color: var(--on-green); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer p { max-width: none; }
.site-footer .logo img { height: 2.2rem; }
.site-footer .legal { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(246, 244, 241, 0.18); font-size: 0.85rem; }

/* Quiz */
.quiz-page { background: var(--paper-2); min-height: 100vh; display: flex; flex-direction: column; }
.quiz-main { flex: 1; padding: 1.6rem 0 2.5rem; }
.quiz-main .wrap { max-width: 720px; }
.progress { display: flex; gap: 0.35rem; justify-content: center; margin: 0 auto 1.6rem; max-width: 380px; }
.progress span { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.progress span.done { background: var(--gold); }
.progress span.now { background: var(--green-2); }
.q-title { font-size: 1.7rem; text-align: center; }
@media (min-width: 720px) { .q-title { font-size: 2.1rem; } }
.q-help { text-align: center; color: var(--ink-2); margin: 0.6rem auto 0; }
.q-body { margin-top: 1.5rem; }
.tiles { display: grid; gap: 0.8rem; grid-template-columns: 1fr 1fr; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-height: 130px; padding: 1rem 0.8rem; text-align: center; background: var(--paper-2); border: 2px solid var(--line-strong); border-radius: var(--radius-lg); color: var(--ink); font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; line-height: 1.25; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease; }
.tile .icon { width: 2.4rem; height: 2.4rem; color: var(--gold-2); }
.tile:hover { border-color: var(--green-2); background: var(--paper); }
.tile[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.tile--wide { grid-column: 1 / -1; min-height: 90px; flex-direction: row; justify-content: flex-start; padding-left: 1.2rem; text-align: left; }
.tile--wide .icon { width: 1.9rem; height: 1.9rem; }
.options { display: grid; gap: 0.7rem; }
.option { display: flex; align-items: center; gap: 0.9rem; width: 100%; min-height: 64px; padding: 0.8rem 1.1rem; text-align: left; background: var(--paper-2); border: 2px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); font-family: var(--font-body); font-size: 1.12rem; font-weight: 600; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease; }
.option::before { content: ""; flex: none; width: 1.3rem; height: 1.3rem; border: 2px solid var(--line-strong); border-radius: 50%; background: #fff; }
.option:hover { border-color: var(--green-2); background: var(--paper); }
.option[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.option[aria-pressed="true"]::before { border-color: var(--green); background: radial-gradient(circle, var(--green) 45%, #fff 50%); }
.helper { display: flex; align-items: center; gap: 0.8rem; margin: 1.6rem auto 0; max-width: 560px; color: var(--ink-2); font-size: 0.98rem; }
.helper .badge { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.helper .badge img { width: 2rem; }
.quiz-nav { display: flex; justify-content: center; margin-top: 1.2rem; }
.link-btn { background: none; border: 0; padding: 0.5rem 0.8rem; color: var(--green-2); font-family: var(--font-body); font-size: 1rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiz-trust { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.4rem; text-align: center; }
.quiz-trust .eyebrow { color: var(--ink-2); }
.quiz-trust ul { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.4rem; max-width: none; }
.quiz-trust li { margin: 0; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-2); font-weight: 600; font-size: 0.92rem; }
.quiz-trust .icon { width: 1.1rem; height: 1.1rem; color: var(--green-2); }
.quiz-footer { background: var(--green); color: var(--on-green-2); text-align: center; padding: 1.1rem; font-size: 0.9rem; }
.quiz-footer a { color: var(--on-green); text-decoration: none; margin: 0 0.6rem; }
.loading { text-align: center; padding: 1rem 0 2rem; }
.loading ul { list-style: none; padding: 0; margin: 1.6rem auto 0; max-width: 360px; display: grid; gap: 0.9rem; text-align: left; }
.loading li { display: flex; align-items: center; gap: 0.8rem; color: var(--line-strong); font-weight: 600; margin: 0; transition: color 200ms ease; }
.loading li .icon { width: 1.4rem; height: 1.4rem; }
.loading li.on { color: var(--green); }
.loading li.on .icon { color: var(--green-2); }
.ready { text-align: center; }
.ready .bullets { list-style: none; padding: 0; margin: 1.2rem auto 0; max-width: 460px; display: grid; gap: 0.6rem; text-align: left; }
.ready .bullets li { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; }
.ready .bullets .icon { width: 1.4rem; height: 1.4rem; color: var(--green-2); margin-top: 0.15rem; flex: none; }
.form { display: grid; gap: 1rem; margin: 1.5rem auto 0; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; }
.field label { font-weight: 700; }
.field .hint { font-size: 0.9rem; color: var(--ink-2); }
.input { width: 100%; min-height: 60px; padding: 0.7rem 0.9rem; border: 2px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink); font-family: var(--font-body); font-size: 1.12rem; }
.input:focus { border-color: var(--green-2); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-weight: 600; font-size: 0.95rem; }
.form-error { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--radius); padding: 0.8rem 1rem; text-align: left; }
.consent { display: grid; grid-template-columns: 1.7rem 1fr; gap: 0.8rem; align-items: start; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.92rem; line-height: 1.5; text-align: left; cursor: pointer; }
.consent input { width: 1.5rem; height: 1.5rem; margin: 0.15rem 0 0; accent-color: var(--green); cursor: pointer; }
.consent p { max-width: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Results */
.summary-grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .summary-grid { grid-template-columns: repeat(3, 1fr); } }
.summary-item { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem; box-shadow: var(--shadow); }
.summary-item h3 { margin-bottom: 0.5rem; }
.summary-item p { color: var(--ink-2); }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--green); border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--on-green); text-align: center; padding: 1.5rem; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .placeholder { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.video .placeholder .play { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; }
.video .placeholder .play::after { content: ""; margin-left: 5px; border-left: 18px solid var(--gold); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video .placeholder strong { font-size: 1.15rem; }
.video .placeholder span { color: var(--on-green-2); font-size: 0.95rem; }
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.2rem; max-width: none; }
.steps li { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; align-items: start; margin: 0; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--green); color: var(--on-green); font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.steps h3 { margin-bottom: 0.25rem; }
.steps p { color: var(--ink-2); }
.disclaimer { font-size: 0.9rem; color: var(--ink-2); }
.callout { background: var(--paper-2); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 1.1rem 1.2rem; }

/* Legal pages */
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal ul { margin-top: 0.7rem; }

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