/* Wealth Score
   Design read: trust-first assessment funnel for adults 40-70 on phones
   (mostly inside the Facebook in-app browser). Calm, legible, high contrast.
   Dials: VARIANCE 3, MOTION 2, DENSITY 4.
   Palette: "Forest" (deep green + cool off-white), one accent only.
   Type: Atkinson Hyperlegible Next, designed for readers with low vision.
   Shape rule: 14px radius on cards, inputs, buttons and answers; full pill
   only for progress bars and small tags. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F3F5F1;
  --surface: #FDFEFC;
  --ink: #15201A;
  --ink-2: #36443C;
  --muted: #56635B;
  --line: #D9DFD8;
  --line-strong: #7E8A83;
  --track: #E2E8E3;
  --accent: #1F5C45;
  --accent-hover: #184A37;
  --on-accent: #FDFEFC;
  --accent-text: #1D5641;
  --accent-soft: #E4EFE8;
  --accent-line: #B9D3C3;
  --error: #A12B1F;
  --focus: #15201A;
  --shadow: 0 1px 2px rgb(21 32 26 / .06), 0 8px 24px rgb(21 32 26 / .06);
  --radius: 14px;
  --font: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1512;
    --surface: #161E1A;
    --ink: #E8EEEA;
    --ink-2: #C3CEC7;
    --muted: #9CAAA2;
    --line: #26312B;
    --line-strong: #6A7A71;
    --track: #25302A;
    --accent: #5FBF93;
    --accent-hover: #74CDA3;
    --on-accent: #0B1410;
    --accent-text: #7ED3AB;
    --accent-soft: #1A2A22;
    --accent-line: #2D4A3B;
    --error: #FF8F80;
    --focus: #E8EEEA;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.1875rem; /* 19px */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1040px; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent-text); }

.icon { width: 1.1em; height: 1.1em; flex: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.screen-heading:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: var(--radius); font-size: 1rem;
}
.skip-link:focus { top: 12px; }

/* Header / footer */
.site-header { padding: 18px 0 0; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.0625rem; font-weight: 700; color: var(--ink);
}
.monogram {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 1rem; font-weight: 800; letter-spacing: 0;
}
.avatar { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; flex: none; }
.site-footer { padding: 32px 0 40px; color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* The quiz and email steps drop the header so every answer fits on short screens. */
body[data-screen="quiz"] .site-header,
body[data-screen="email"] .site-header { display: none; }
body[data-screen="quiz"] .site-footer { display: none; }

/* Screens */
.screen { padding: 24px 0 32px; }
.screen.is-entering { animation: enter .22s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1, .h1-size { font-size: clamp(2.25rem, 9.5vw, 3.5rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 14px; }
.lead { font-size: 1.3125rem; line-height: 1.45; color: var(--ink-2); margin-bottom: 22px; }

.resume-note {
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; padding: 16px 18px;
  border: 0; border-radius: var(--radius);
  font: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1.25;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .75; cursor: progress; }
.btn-block { display: flex; width: 100%; }

.btn-link {
  display: inline-block; min-height: 48px; margin-top: 6px; padding: 10px 4px;
  background: none; border: 0; font: inherit; font-size: 1.0625rem;
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.btn-link:hover { color: var(--ink); }

.btn-back {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 14px 8px 10px; margin-left: -10px;
  background: none; border: 0; border-radius: var(--radius);
  font: inherit; font-size: 1.125rem; font-weight: 700; color: var(--ink); cursor: pointer;
}
.btn-back:hover { background: var(--accent-soft); }
.btn-back-bottom { margin-top: 18px; }

/* Landing */
.screen-landing { padding-top: 28px; }
.hero { display: grid; gap: 32px; align-items: center; }
.facts {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 1.0625rem; font-weight: 600; color: var(--ink-2);
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts .icon { color: var(--accent-text); }

/* Example result: a real, reduced version of the result screen. */
.preview {
  margin: 0; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.preview-label {
  display: inline-block; margin-bottom: 10px; padding: 2px 12px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 1rem; font-weight: 700;
}
.preview-score { font-size: 1.25rem; color: var(--muted); font-weight: 600; }
.preview-score span { font-size: 3.25rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.preview-title { font-weight: 700; margin: 2px 0 14px; }
.preview-cats { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.preview-cats li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  font-size: 1rem; color: var(--ink-2);
}
.preview-cats b { color: var(--ink); }
.preview-cats i {
  grid-column: 1 / -1; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--w), var(--track) var(--w));
}
.preview-cats .is-gap i { background: linear-gradient(90deg, var(--ink) var(--w), var(--track) var(--w)); }
.preview-gap { font-size: 1rem; color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); }

.explain { display: grid; gap: 20px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.explain h2 { font-size: 1.625rem; margin-bottom: 8px; }
.explain p { color: var(--ink-2); max-width: 36em; }
.areas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.areas li { display: flex; align-items: center; gap: 12px; font-size: 1.125rem; font-weight: 600; }
.areas .icon {
  width: 28px; height: 28px; padding: 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
}

.mentor { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.mentor-photo { width: 88px; height: 88px; border-radius: 999px; object-fit: cover; flex: none; }
.mentor-name { font-weight: 700; margin-bottom: 4px; }
.mentor-note { display: flex; gap: 8px; font-size: 1rem; color: var(--muted); }
.mentor-note .icon { margin-top: 3px; }

/* Quiz */
.screen-quiz { padding-top: 12px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.q-count { font-size: 1.0625rem; font-weight: 700; color: var(--ink-2); }
.progress { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.q-category { font-size: 1rem; font-weight: 700; color: var(--accent-text); margin-bottom: 6px; }
.q-text { font-size: clamp(1.5rem, 6.2vw, 2rem); line-height: 1.25; margin-bottom: 20px; }
.answers { display: grid; gap: 12px; }
.answer {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 66px; padding: 14px 18px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 1.1875rem; font-weight: 600; line-height: 1.3; text-align: left;
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.answer .mark {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  border: 2px solid var(--line-strong); color: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.answer .mark .icon { width: 16px; height: 16px; }
@media (hover: hover) { .answer:hover { border-color: var(--accent); } }
.answer[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.answer[aria-pressed="true"] .mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.q-hint { margin-top: 16px; min-height: 1.5em; font-size: 1.0625rem; font-weight: 600; color: var(--accent-text); }

/* Short screens (small phones inside the Facebook app): keep all four answers visible. */
@media (max-height: 720px) {
  .q-text { font-size: clamp(1.3125rem, 5.6vw, 1.625rem); margin-bottom: 14px; }
  .progress { margin-bottom: 14px; }
  .answers { gap: 9px; }
  .answer { min-height: 56px; padding: 10px 16px; }
  .q-hint { margin-top: 10px; }
}

/* Email */
.done-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 4px 14px 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 1rem; font-weight: 700;
}
.email-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 1.125rem; font-weight: 700; }
.field input {
  width: 100%; min-height: 60px; padding: 14px 16px;
  font: inherit; font-size: 1.25rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius);
  scroll-margin: 120px;
}
.field input:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error, .form-error { color: var(--error); font-size: 1.0625rem; font-weight: 700; }
.email-suggest { font-size: 1.0625rem; color: var(--ink-2); }
.email-suggest button {
  min-height: 44px; padding: 6px 4px; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy { display: flex; gap: 8px; font-size: 1rem; color: var(--muted); }
.privacy .icon { margin-top: 3px; }

/* Result */
.score-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 22px 24px; text-align: center;
}
.score-label { font-size: 1.125rem; color: var(--accent-text); margin-bottom: 2px; }
.greeting { color: var(--ink-2); }
.score { line-height: 1; margin: 10px 0 16px; }
.score-num { font-variant-numeric: tabular-nums; font-size: clamp(4.75rem, 23vw, 6rem); font-weight: 700; letter-spacing: -.04em; }
.score-of { font-size: clamp(1.5rem, 6vw, 1.875rem); color: var(--muted); font-weight: 600; margin-left: 6px; }
.score-bar { height: 10px; max-width: 360px; margin: 0 auto 22px; background: var(--track); border-radius: 999px; overflow: hidden; }
.score-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.result-title { font-size: clamp(1.5rem, 6vw, 1.875rem); margin-bottom: 10px; }
.result-desc { color: var(--ink-2); }

.block { margin-top: 28px; }
.block-title { font-size: 1.375rem; margin-bottom: 12px; }
.cats {
  list-style: none; margin: 0; padding: 4px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.cat { padding: 14px 0; }
.cat + .cat { border-top: 1px solid var(--line); }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.cat-name { font-weight: 700; }
.cat-score { font-size: 1.375rem; font-weight: 700; }
.cat-bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.cat-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.cat.is-gap .cat-bar span { background: var(--ink); }
.gap-tag {
  display: inline-block; margin-top: 10px; padding: 2px 12px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 1rem; font-weight: 700;
}
.disclaimer { margin-top: 12px; font-size: 1rem; color: var(--muted); }

.gap-card {
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 24px 22px;
}
.gap-label { font-size: 1.125rem; color: var(--accent-text); margin-bottom: 4px; }
.gap-name { font-size: clamp(1.875rem, 8vw, 2.375rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 10px; }
.gap-copy { font-size: 1.25rem; line-height: 1.5; }

.offer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 22px;
}
.offer > p { color: var(--ink-2); margin-bottom: 14px; }
.offer .offer-product { font-size: 1.125rem; font-weight: 700; color: var(--accent-text); margin-bottom: 4px; }
.offer-title { font-size: clamp(1.75rem, 7vw, 2.25rem); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 14px; }
.offer .offer-positioning { color: var(--ink); font-weight: 600; }
.offer-list-title { font-size: 1.125rem; margin: 20px 0 12px; }
.checklist { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon {
  width: 26px; height: 26px; padding: 5px; margin-top: 1px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
}
.offer .opportunity { color: var(--ink-2); margin: 0 0 16px; }
.offer .opportunity strong { color: var(--ink); }
.retake { text-align: center; margin-top: 18px; }

/* Social proof (landing, under the hero) */
.proof {
  display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 32px;
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.proof-item { display: flex; align-items: center; gap: 12px; }
.proof-item .icon {
  width: 40px; height: 40px; padding: 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
}
.proof-item strong { display: block; font-size: 1.375rem; line-height: 1.1; }
.proof-item span { font-size: 1rem; color: var(--muted); }

.reviews { margin-top: 40px; }
.reviews h2 { font-size: 1.625rem; margin-bottom: 16px; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.review {
  margin: 0; padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.review blockquote { margin: 0 0 14px; font-size: 1.125rem; line-height: 1.5; }
.review figcaption { display: flex; align-items: center; gap: 12px; font-size: 1rem; color: var(--muted); }
.review figcaption strong { color: var(--ink); display: block; }
.review img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; flex: none; }

.offer .offer-lead { color: var(--ink-2); margin-bottom: 18px; }
.offer .checklist { gap: 10px; margin-bottom: 18px; }
.offer .checklist li { align-items: center; }
.tag {
  display: inline-block; margin-left: 4px; padding: 1px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-size: .9375rem; font-weight: 700;
  white-space: nowrap;
}
.buy-box {
  margin: 4px -6px 0; padding: 20px 18px 18px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps { list-style: none; margin: 4px 0 16px; padding: 0; counter-reset: step; display: grid; gap: 8px; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; color: var(--ink-2); }
.steps li::before {
  content: counter(step); flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .9375rem;
}
.guarantee {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px;
  font-size: 1rem; line-height: 1.45; color: var(--ink-2);
}
.guarantee .icon { width: 24px; height: 24px; color: var(--accent-text); margin-top: 1px; }
.guarantee strong { color: var(--ink); }

/* Price and checkout (result page) */
.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.price { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.price-note { font-size: 1.0625rem; color: var(--muted); font-weight: 600; }
.checkout { min-height: 420px; margin: 0 -10px; }
.offer-proof { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 1.0625rem; font-weight: 600; color: var(--ink-2); }
.avatars { display: inline-flex; flex: none; }
.avatars img {
  width: 40px; height: 40px; border-radius: 999px; object-fit: cover;
  border: 3px solid var(--surface); background: var(--track);
}
.avatars img + img { margin-left: -12px; }

/* Sticky purchase bar: appears on the result page until the checkout is on screen. */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgb(21 32 26 / .10);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.sticky-inner { max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.sticky-text { display: none; }
.sticky-inner .btn { flex: 1; min-height: 56px; font-size: 1.125rem; }
body.has-sticky { padding-bottom: 92px; }
@media (min-width: 560px) {
  .sticky-text { display: grid; line-height: 1.25; }
  .sticky-text span { font-size: 1.25rem; font-weight: 700; }
  .sticky-inner .btn { flex: none; }
}

/* Debug (only with ?debug=1) */
.debug-panel { margin-top: 28px; padding: 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); font-size: 14px; }
.debug-panel h3 { margin-bottom: 8px; }
.debug-panel pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.debug-bar {
  position: fixed; right: 8px; bottom: 8px; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  max-width: calc(100vw - 16px); padding: 8px;
  background: #222; color: #fff; border-radius: 10px; font-size: 13px;
}
.debug-bar button { font-size: 13px; padding: 4px 8px; cursor: pointer; }
.noscript { padding: 24px; text-align: center; }

/* Tablet and desktop */
@media (min-width: 860px) {
  body { font-size: 1.25rem; }
  .site-header { padding-top: 28px; }
  .screen-landing { padding-top: 56px; }
  .hero { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .hero-copy .btn-block { width: auto; display: inline-flex; min-width: 340px; }
  .explain { grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: start; }
  .screen { padding: 40px 0 48px; }
  .score-card, .gap-card, .offer { padding-left: 36px; padding-right: 36px; }
  .cats { padding: 4px 28px; }
}

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