/* =========================================================
   Memory test — redesign v2. Mobile-first, light only.
   Warm cream paper, one warm accent (numbers, progress, glow),
   the green as the brand (buttons, wordmark). Atkinson Hyperlegible
   for reading and tapping (built for low vision), Literata for headings
   and the words you must remember. Big type: body 20px, taps ≥ 64px.
   ========================================================= */

:root {
  --cream: #fbf5ea;
  --cream-2: #f3e9d7;
  --surface: #ffffff;
  --ink: #1d2622;
  --ink-2: #48524c;        /* 7.4:1 on cream */
  --line: #e6dac5;
  --brand: #1f6b4f;
  --brand-deep: #154d39;
  --brand-soft: #e1eee5;
  --warm: #d0680f;         /* numbers, progress, glow (large text only) */
  --warm-deep: #9a4b08;    /* small warm text, 5.6:1 on cream */
  --warm-soft: #fce5c8;
  --warm-glow: rgba(224, 122, 31, .35);

  --sans: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --max: 560px;
  --r: 16px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; background: var(--cream); color: var(--ink); font: 400 20px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; }

/* ---------- Header + trail ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(251, 245, 234, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: filter .2s; }
.top-in { max-width: var(--max); margin: 0 auto; height: 50px; padding: 0 16px; display: flex; align-items: center; }
.mark { font: 700 22px/1 var(--serif); color: var(--brand-deep); letter-spacing: -.01em; }
.trail { list-style: none; max-width: var(--max); margin: 0 auto; padding: 0 16px 10px; display: grid; grid-template-columns: repeat(4, 1fr); }
.trail li { --f: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; line-height: 1.1; color: var(--ink-2); }
.trail li::before { content: ""; position: absolute; top: 8px; left: calc(-50% + 12px); right: calc(50% + 12px); height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--warm) calc(var(--f) * 100%), var(--line) 0); }
.trail li:first-child::before { display: none; }
.trail li.on::before, .trail li.done::before { background: var(--warm); }
.trail .node { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); background: var(--surface); transition: .3s var(--ease); }
.trail li.on .node { border-color: var(--warm); box-shadow: 0 0 0 5px var(--warm-glow); animation: breathe 2s ease-in-out infinite; }
.trail li.done .node { border-color: var(--warm); background: var(--warm) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.trail li.on .lbl, .trail li.done .lbl { color: var(--ink); font-weight: 700; }
@keyframes breathe { 50% { box-shadow: 0 0 0 8px rgba(224, 122, 31, .12); } }
body[data-screen="cover"] .trail, body[data-screen="agecards"] .trail { display: none; }
body[data-screen="result"] .trail { display: none; }
body[data-screen="result"] .top { position: static; }

/* ---------- Stage ---------- */
#stage { max-width: var(--max); margin: 0 auto; padding: 20px 16px 40px; }
.screen { display: flex; flex-direction: column; gap: 16px; animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.display { font: 700 29px/1.15 var(--serif); letter-spacing: -.015em; }
.q-title { font: 700 27px/1.2 var(--serif); letter-spacing: -.01em; }
.q-mini { font-weight: 700; text-align: center; }
.lede { font-size: 20px; color: var(--ink-2); }
.eyebrow { font-weight: 700; font-size: 17px; color: var(--warm-deep); }
.center { text-align: center; }
.fine { font-size: 17px; color: var(--ink-2); }
.say { font: 600 23px/1.3 var(--serif); text-align: center; }

/* ---------- Buttons & options ---------- */
.btn { width: 100%; min-height: 64px; padding: 14px 20px; border: 0; border-radius: var(--r); background: var(--brand); color: #fff; font-weight: 700; font-size: 21px; cursor: pointer; box-shadow: 0 10px 22px -14px rgba(21, 77, 57, .9); transition: transform .12s, background .2s; }
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: scale(.985); }
.btn-soft { background: var(--surface); color: var(--brand-deep); border: 2px solid var(--brand); box-shadow: none; }
.btn-soft:hover { background: var(--brand-soft); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opts-2 { display: grid; grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 10px 16px 10px 10px; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 20px; line-height: 1.25; transition: border-color .15s, background .15s, transform .12s; }
.opt .e { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--cream-2); font-size: 24px; }
.opt:hover { border-color: #d6c7ad; }
.opt:active { transform: scale(.985); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt:disabled { cursor: default; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #fff8ee; border: 1.5px solid #f2d7b3; border-radius: var(--r); font-size: 19px; }
.tip.teach { background: var(--brand-soft); border-color: #bfdccb; animation: enter .3s var(--ease) both; }

/* ---------- Cover ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-i { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 17px; }
.t-cover { gap: 12px; }
.t-cover .lede { font-size: 18px; }
.q-age { font-weight: 700; font-size: 20px; color: var(--brand-deep); margin-top: 2px; }
.age-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.age-card { position: relative; display: block; padding: 0; border: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 5 / 4; background: var(--cream-2); cursor: pointer; box-shadow: 0 8px 18px -12px rgba(29, 38, 34, .5); transition: transform .12s; }
.age-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.age-card:active { transform: scale(.98); }
.age-pill { position: absolute; left: 8px; right: 8px; bottom: 8px; min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, .94); font-weight: 700; font-size: 19px; color: var(--ink); }
.age-pill span { font-size: 26px; line-height: 1; color: var(--warm); }
.age-card.sel { outline: 4px solid var(--brand); }
.bridge { display: flex; gap: 14px; align-items: flex-start; padding: 16px; margin-top: 8px; border-radius: var(--r-lg); background: var(--cream-2); }
.bridge-photo { width: 84px; height: 104px; object-fit: cover; border-radius: 14px; flex: 0 0 auto; }
.bridge h3 { font: 700 19px/1.25 var(--serif); margin-bottom: 6px; }
.bridge p { font-size: 18px; }

/* ---------- Icons with aura ---------- */
.center-ic { display: grid; place-items: center; padding-top: 6px; }
.badge-ic { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin: 0 auto; }
.badge-ic .aura { position: absolute; inset: 0; border-radius: 50%; border: 3px dotted #e9c79e; }
.badge-ic::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--warm-soft); }
.badge-ic svg { position: relative; width: 64px; height: 64px; }
.badge-ic svg .fill { fill: var(--warm); }
.badge-ic svg .stroke { fill: none; stroke: var(--warm); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.badge-ic svg .thin { fill: none; stroke: #e2d3bb; stroke-width: 1.4; }
.badge-ic svg .poly { fill: rgba(224, 122, 31, .16); stroke: var(--warm); stroke-width: 2.4; stroke-linejoin: round; }
.badge-ic svg .dot circle { fill: var(--warm); }
.badge-ic svg .hollow { fill: #fff; stroke: var(--warm); stroke-width: 2; }
.badge-ic svg .track { fill: none; stroke: #ecdfca; stroke-width: 7; stroke-linecap: round; }
.badge-ic svg .arc { fill: none; stroke: var(--warm); stroke-width: 7; stroke-linecap: round; }
.badge-ic svg text { font: 700 12px var(--sans); fill: var(--warm-deep); }
.badge-ic { animation: pop .5s var(--ease) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

/* ---------- Task intros ---------- */
.illus { display: grid; place-items: center; height: 132px; border-radius: var(--r-lg); background: var(--cream-2); }
.illus svg { width: 220px; height: 120px; }
.illus .card { fill: #fff; stroke: var(--ink); stroke-width: 2.2; }
.illus .c1 { transform: rotate(-6deg); transform-origin: 80px 54px; }
.illus .ln { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.illus .spark { fill: var(--warm); }
.illus .fillk { fill: var(--ink); }
.illus .keys rect { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.illus .keys rect.lit { fill: var(--warm-soft); stroke: var(--warm); }
.illus text { font: 700 24px var(--sans); fill: var(--brand-deep); }
.illus text.q { fill: var(--warm); font-size: 30px; }

/* ---------- Chat ---------- */
.chat-log { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 12px 16px; font-size: 20px; line-height: 1.4; animation: enter .25s var(--ease) both; }
.bubble.guide { align-self: flex-start; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px 20px 20px 6px; }
.bubble.me { align-self: flex-end; display: flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; border-radius: 20px 20px 6px 20px; font-weight: 700; }
.bubble.me .e { font-size: 22px; }
.bubble .hold { display: inline-block; padding: 1px 8px; margin: 2px 0; border-radius: 8px; background: var(--warm-soft); color: var(--warm-deep); font: 700 22px/1.3 var(--serif); letter-spacing: .06em; }
.dots3 { display: inline-flex; gap: 5px; padding: 6px 2px; }
.dots3 i { width: 8px; height: 8px; border-radius: 50%; background: #c9b99c; animation: blink 1s infinite; }
.dots3 i:nth-child(2) { animation-delay: .15s; } .dots3 i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-dock { margin-top: 6px; }

/* ---------- Word & digit stage ---------- */
.stage-card { position: relative; min-height: 236px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 26px; transition: border-color .2s, box-shadow .2s; }
.stage-card.pulse { animation: glow .9s var(--ease); }
.stage-card.lit { border-color: var(--warm); box-shadow: 0 0 0 6px var(--warm-glow), 0 18px 40px -20px var(--warm-glow); }
@keyframes glow { 0% { box-shadow: 0 0 0 8px var(--warm-glow); border-color: var(--warm); } 100% { box-shadow: 0 0 0 0 transparent; } }
.corner { position: absolute; top: 12px; right: 16px; font-weight: 700; font-size: 17px; color: var(--ink-2); }
.word.big { font: 700 44px/1 var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.digit { font: 700 112px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--brand-deep); min-height: 1em; }
.dots { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .25s; }
.dots i.on { background: var(--warm); }

/* ---------- Free recall ---------- */
.recall { display: flex; flex-direction: column; gap: 12px; }
.recall-row { display: flex; gap: 8px; }
.recall input { flex: 1; min-width: 0; height: 64px; padding: 0 18px; font: 400 23px var(--sans); color: var(--ink); background: var(--surface); border: 2px solid #d9c9ad; border-radius: 14px; }
.recall input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn-add { flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; border: 2px solid var(--brand); background: var(--surface); color: var(--brand); border-radius: 14px; cursor: pointer; }
.btn-add svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.chips { min-height: 0; }
.recall .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px 6px 16px; border: 0; border-radius: 24px; background: var(--warm-soft); color: var(--ink); font: 700 20px/1 var(--sans); cursor: pointer; }
.chip i { font-style: normal; opacity: .55; width: 26px; text-align: center; }
.chip.pop { animation: pop .3s var(--ease); }
.counter { font-weight: 700; font-size: 20px; color: var(--brand-deep); min-height: 1.5em; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(251, 245, 234, 0), var(--cream) 32%); }

/* ---------- Digit span ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.board div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; }
.board b { font: 700 26px/1.1 var(--sans); color: var(--warm); font-variant-numeric: tabular-nums; }
.board span { font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); }
.slots { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.slots i { width: 40px; height: 54px; display: grid; place-items: center; border-bottom: 3px solid #d9c9ad; font: 700 32px/1 var(--sans); font-style: normal; }
.slots i.on { border-color: var(--warm); }
.slots.good i { color: var(--brand); border-color: var(--brand); }
.slots.miss i { color: var(--ink-2); }
.fb { min-height: 1.5em; font-weight: 700; text-align: center; }
.fb.good { color: var(--brand); } .fb.miss { color: var(--warm-deep); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { min-height: 70px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); font: 700 30px/1 var(--sans); cursor: pointer; touch-action: manipulation; box-shadow: 0 4px 0 #eadfcb; }
.key.glow { animation: keyglow .45s var(--ease); }
@keyframes keyglow { 0% { background: linear-gradient(160deg, #ffd29e, var(--warm)); color: #fff; border-color: var(--warm); box-shadow: 0 0 0 6px var(--warm-glow); } }
.key-del { font-size: 26px; color: var(--ink-2); }
.keypad.locked .key { pointer-events: none; opacity: .7; }

/* ---------- Pictures ---------- */
.obj-frame { align-self: center; width: min(100%, 300px); aspect-ratio: 1; background: #fff; border: 2px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; transition: border-color .2s, box-shadow .2s; }
.obj-frame.good { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.obj-frame.miss { border-color: var(--warm); box-shadow: 0 0 0 5px var(--warm-soft); }
.obj { margin: 0; width: 100%; height: 100%; }
.obj img { width: 100%; height: 100%; object-fit: contain; display: block; }
.obj.missing { display: grid; place-items: center; color: var(--ink-2); text-align: center; font-size: 16px; background: repeating-linear-gradient(45deg, #faf6ef 0 12px, #f3ece0 12px 24px); }
.flash { animation: enter .2s var(--ease) both; }
.q-mst { font-size: 25px; }
.mst-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-mst { min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); font-weight: 700; font-size: 19px; cursor: pointer; }
.btn-mst .sym { font-size: 26px; line-height: 1; color: var(--warm); }
.btn-mst.sel { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Recognition ---------- */
.grid-words { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { min-height: 58px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font: 700 19px/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.tile.sel { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Reward toast ---------- */
.reward { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 0 10px; text-align: center; }
.big-num { font: 700 60px/1 var(--serif); color: var(--warm); animation: pop .5s .1s var(--ease) both; }

/* ---------- Analysis ---------- */
.a-ring { position: relative; width: 150px; height: 150px; margin: 4px auto; }
.a-ring svg, .score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.a-ring .t, .score-ring .t { fill: none; stroke: var(--cream-2); stroke-width: 11; }
.a-ring .a, .score-ring .a { fill: none; stroke: var(--warm); stroke-width: 11; stroke-linecap: round; }
.a-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 32px var(--sans); color: var(--warm-deep); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); opacity: .35; transition: opacity .3s; }
.checklist li.on { opacity: 1; }
body.modal-open #stage, body.modal-open .top { filter: blur(5px); }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(29, 38, 34, .32); animation: fade .2s both; }
.modal.out { animation: fade .2s reverse both; }
.modal-box { width: 100%; max-width: var(--max); padding: 22px 18px 18px; background: var(--surface); border-radius: 24px; display: flex; flex-direction: column; gap: 14px; animation: up .3s var(--ease) both; }
.modal-q { font: 700 24px/1.25 var(--serif); }
.modal-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-opts.n3 { grid-template-columns: 1fr; }
.modal-opts .opt { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 90px; font-size: 19px; }
.modal-opts.n3 .opt { flex-direction: row; min-height: 64px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); } }
@media (min-width: 700px) { .modal { align-items: center; } }

/* ---------- Result / paywall ---------- */
.t-result { gap: 18px; }
.urgency { position: sticky; top: 0; z-index: 20; margin: -20px -16px 0; padding: 9px 16px; background: var(--warm-soft); border-bottom: 1px solid #f0cf9f; font-weight: 700; font-size: 18px; color: #4d2a05; text-align: center; }
.urgency .timer { display: inline-block; min-width: 3.2em; padding: 1px 8px; margin-left: 4px; border-radius: 8px; background: #fff; color: var(--warm-deep); font-variant-numeric: tabular-nums; }
.fold { display: flex; flex-direction: column; gap: 12px; }
.res-h { font: 700 26px/1.15 var(--serif); }
.hero-res { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 16px 30px -24px rgba(29, 38, 34, .5); }
.score-ring { position: relative; flex: 0 0 auto; width: 104px; height: 104px; }
.score-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 38px var(--serif); color: var(--warm); }
.score-ring .a { animation: ring 1.2s .2s var(--ease) both; }
@keyframes ring { from { stroke-dasharray: 0 100; } }
.arch { min-width: 0; }
.ring-label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; letter-spacing: .08em; color: var(--ink-2); }
.arch-name { font: 700 23px/1.15 var(--serif); color: var(--brand-deep); margin-top: 4px; white-space: nowrap; }  /* 4c: ~2pt smaller, one line, hyphen kept */
.info { width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--cream-2); color: var(--brand-deep); font-size: 18px; line-height: 1; cursor: pointer; }
.note { padding: 10px 12px; border-radius: 12px; background: var(--cream-2); font-size: 17px; color: var(--ink-2); }
.band3 .segs { position: relative; display: grid; grid-template-columns: 50fr 25fr 25fr; gap: 4px; height: 12px; }
.band3 .segs i { border-radius: 6px; background: #f2dcbf; }
.band3 .segs i:nth-child(2) { background: #f0b878; }
.band3 .segs i:nth-child(3) { background: var(--warm); }
.band3 .mark { position: absolute; top: 50%; left: clamp(0px, calc(var(--x) - 11px), calc(100% - 22px)); width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--brand-deep); }
.band3 .lbls { display: grid; grid-template-columns: 50fr 25fr 25fr; gap: 4px; margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.band3 .lbls span:nth-child(2), .band3 .lbls span:nth-child(3) { text-align: center; }
.band3[data-band="0"] .lbls span:nth-child(1), .band3[data-band="1"] .lbls span:nth-child(2), .band3[data-band="2"] .lbls span:nth-child(3) { color: var(--ink); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile-n { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; }
.tile-n span { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--ink-2); }
.tile-n b { display: flex; align-items: center; gap: 4px; font: 700 24px/1.15 var(--serif); color: var(--brand-deep); }
.tile-n .info { width: 30px; height: 30px; font-size: 15px; }
.relief { font: 600 21px/1.3 var(--serif); }
.cta { display: flex; flex-direction: column; gap: 8px; }
.btn-pay { min-height: 66px; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; text-align: left; font-size: 20px; line-height: 1.2; box-shadow: 0 10px 22px -12px rgba(21, 77, 57, .75), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-pay .pay-label { flex: 1; min-width: 0; text-wrap: balance; }
.btn-pay .pay-price { flex: none; display: flex; flex-direction: column; align-items: center; padding: 7px 13px; border-radius: 14px; background: var(--warm-soft); color: var(--warm-deep); white-space: nowrap; line-height: 1.1; }
.btn-pay .pay-price b { font-size: 19px; }
.btn-pay .pay-price small { font-size: 12px; font-weight: 700; opacity: .85; }
.btn-pay .pay-arrow { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.btn-pay:hover .pay-arrow, .btn-pay:focus-visible .pay-arrow { transform: translateX(3px); }
.renewal { font-size: 14px; line-height: 1.4; color: #7a827d; font-style: italic; }
.blk.card { padding: 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.blk h3 { font: 700 22px/1.25 var(--serif); margin-bottom: 12px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-grid div { padding: 12px; border-radius: 14px; background: var(--cream-2); display: flex; flex-direction: column; gap: 4px; }
.plan-grid .lbl { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--warm-deep); }
.plan-grid b { font-size: 19px; line-height: 1.3; }
.locked { list-style: none; margin: 0; padding: 0; }
.locked li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 19px; }
.locked li:first-child { border-top: 0; padding-top: 0; }
.locked .v { font-weight: 700; white-space: nowrap; }
.blur { filter: blur(7px); user-select: none; -webkit-user-select: none; pointer-events: none; }
.bonus { background: #fff8ee !important; border-color: #f2d7b3 !important; }
.bonus-cards { display: flex; flex-direction: column; gap: 10px; }
.bonus-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #fff; border: 1.5px solid #f2d7b3; }
.b-ic { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--warm-soft); font-size: 24px; }
.bonus-card p { font-size: 19px; line-height: 1.35; }
.bonus-close { margin-top: 12px; font-weight: 700; }
.notice p { padding: 12px 14px; border-left: 4px solid #d9c9ad; background: var(--surface); border-radius: 0 12px 12px 0; font-size: 18px; color: var(--ink-2); }
.testis { display: flex; flex-direction: column; gap: 14px; }
.testi-wrap { display: flex; flex-direction: column; gap: 6px; }
.testi-label { font-size: 18px; color: var(--ink); }
.testi { margin: 0; display: flex; gap: 12px; padding: 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.avatar { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); font: 700 24px var(--serif); }
.testi blockquote { margin: 0; font-size: 19px; line-height: 1.4; }
.testi figcaption { margin-top: 6px; font-size: 17px; color: var(--ink-2); }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.price-grid div { padding: 14px 12px; border-radius: 14px; background: var(--cream-2); text-align: center; }
.price-grid .now { background: var(--warm-soft); border: 2px solid var(--warm); }
.price-grid b { font: 700 20px/1.3 var(--serif); }
.accs { display: flex; flex-direction: column; gap: 10px; }
.acc { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); }
.acc summary { list-style: none; min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 700; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 28px; color: var(--warm); }
.acc[open] summary::after { content: "–"; }
.acc-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 19px; }
.acc-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.rfoot { padding-top: 14px; border-top: 1px solid var(--line); font-size: 17px; color: var(--ink-2); }
.rfoot nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.rfoot nav a { min-height: 44px; display: inline-flex; align-items: center; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(29, 38, 34, .5); animation: up .25s var(--ease) both; }
.sticky-cta .btn-pay { max-width: var(--max); margin: 0 auto; min-height: 58px; font-size: 18px; }
.sticky-cta .renewal { max-width: var(--max); margin: 6px auto 0; font-size: 13px; text-align: center; }
body[data-screen="result"] #stage { padding-bottom: 150px; }

.foot { max-width: var(--max); margin: 0 auto; padding: 0 16px 28px; font-size: 17px; }
.foot a { color: var(--ink-2); display: inline-flex; min-height: 44px; align-items: center; }

@media (min-width: 700px) {
  #stage { padding-top: 32px; }
  .display { font-size: 36px; }
  .age-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- Our Science page ---------- */
a.mark { text-decoration: none; }
.doc { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; font-size: 19px; line-height: 1.6; }
.doc h1 { font: 700 36px/1.15 var(--serif); margin-bottom: 10px; }
.doc h1 + p { font-size: 20px; color: var(--ink-2); }
.doc h2 { font: 700 25px/1.25 var(--serif); margin: 40px 0 12px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.doc li p { margin: 10px 0 0; padding: 12px 14px; background: var(--warm-soft); border-radius: var(--r); }
.doc a { overflow-wrap: anywhere; }
.doc .refs { font-size: 17px; gap: 8px; }
.tbl { overflow-x: auto; margin: 0 0 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 17px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.tbl th { border-top: 0; background: var(--brand-soft); }

.countdown h3 .timer { display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--warm-soft); color: var(--warm-deep); font-family: var(--sans); font-variant-numeric: tabular-nums; }

.plan-grid .weak3 { display: flex; flex-direction: column; }

/* 4c: archetype name on one line at 390px — ring + label on the first row, the name full-width below */
.hero-res { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; row-gap: 6px; }
.hero-res .arch { display: contents; }
.hero-res .ring-label { grid-column: 2; grid-row: 1; }
.hero-res .arch-name { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
.score-ring { width: 92px; height: 92px; grid-row: 1; }
.score-ring b { font-size: 34px; }

/* gender cover (myIQ pattern) */
.gender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.age-card.big { aspect-ratio: 4 / 5; }
.age-card.big .age-pill { font-size: 21px; min-height: 52px; }
.link { align-self: center; min-height: 48px; padding: 8px 16px; border: 0; background: none; color: var(--brand-deep); font-size: 18px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.t-agecards { gap: 14px; }
.t-agecards .q-age { font-size: 24px; font-family: var(--serif); }

/* blurred age-distribution teaser */
.teaser-row { flex-direction: column; align-items: stretch !important; }
.teaser { margin: 8px 0 0; }
.teaser .blur-soft { filter: blur(4px); user-select: none; pointer-events: none; }
.teaser svg { width: 100%; height: auto; display: block; }
.teaser .bell { fill: var(--cream-2); stroke: #d9c9ad; stroke-width: 2; }
.teaser .bell-you { fill: rgba(224, 122, 31, .35); }
.teaser .you-line { stroke: var(--brand-deep); stroke-width: 2.5; }
.teaser .you-dot { fill: var(--brand-deep); }
.teaser .you-t { font: 700 14px var(--sans); fill: var(--brand-deep); }
.teaser .ax { font: 400 12px var(--sans); fill: var(--ink-2); }
.teaser figcaption { margin-top: 6px; font-size: 16px; color: var(--ink-2); }

/* leva 5 paywall */
.trust { font-size: 17px; font-weight: 700; color: var(--brand-deep); }
.teaser-card .sub-t { font-size: 17px; color: var(--ink-2); margin: -6px 0 6px; }
.teaser .chart { position: relative; }
.teaser .axis { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 15px; color: var(--ink-2); margin-top: -18px; }
.teaser .axis span:nth-child(2) { text-align: center; } .teaser .axis span:nth-child(3) { text-align: right; }
.teaser .tbars { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tbar { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.tbar .track { position: relative; height: 12px; border-radius: 6px; background: var(--cream-2); overflow: hidden; }
.tbar .track i { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 6px; background: var(--warm); filter: blur(4px); }
.teaser .bars-note { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.teaser-card .caption { font: 600 20px/1.3 var(--serif); margin: 12px 0 10px; }
.btn-lock { width: 100%; min-height: 56px; border: 2px dashed var(--warm); border-radius: var(--r); background: #fff8ee; color: var(--warm-deep); font-weight: 700; font-size: 19px; cursor: pointer; margin-bottom: 10px; }
.stack .anchor { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--cream-2); font-size: 18px; }
.stack .ticks li { font-size: 19px; line-height: 1.4; }
.plan-h { margin-top: 18px; }
.stakes p + p { margin-top: 10px; }
.stakes .future { font: 600 20px/1.35 var(--serif); }
.stakes .stakes-foot { color: var(--ink-2); }
.bonus-card { align-items: flex-start; }
.bonus-card .mock { width: 104px; flex: 0 0 auto; border-radius: 10px; }
.b-name { font: 700 19px/1.25 var(--serif); margin-bottom: 4px; }
.b-why { margin-top: 6px; font-weight: 700; color: var(--warm-deep); font-size: 17px; }

/* value stack with real mockups */
.stack-hero { width: 100%; border-radius: 16px; margin-bottom: 12px; }
.stack-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.stack-items li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; padding-top: 14px; border-top: 1px solid var(--line); }
.stack-items li:first-child { border-top: 0; padding-top: 0; }
.s-art img { width: 112px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--cream-2); }
.s-ic { width: 112px; height: 84px; display: grid; place-items: center; border-radius: 10px; background: var(--cream-2); }
.s-ic svg { width: 44px; height: 44px; fill: none; stroke: var(--warm); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.s-ic svg text { fill: var(--warm); stroke: none; font: 700 13px var(--sans); }
.s-t { font-size: 18px; line-height: 1.4; }
.s-o { margin-top: 4px; font-weight: 700; font-size: 18px; color: var(--brand-deep); }
.s-f { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--warm-soft); color: var(--warm-deep); font-size: 15px; font-weight: 700; }
.bonus-card:has(.mock) { flex-direction: column; align-items: stretch; }
.bonus-card .mock { width: 100%; border-radius: 12px; }
