/* ——— base ——— */
.a-root { font-family: var(--font-sans); color: var(--ink); background: var(--surface-page); -webkit-font-smoothing: antialiased; }
.a-root *, .a-root *::before, .a-root *::after { box-sizing: border-box; }
.a-root :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

[data-i], [data-avi], [data-decor] { display: inline-flex; line-height: 0; }
[data-decor] svg { overflow: visible; }
.a-avi { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

/* ——— headings with brush underline ——— */
.a-title { margin: 0; font: 900 48px/54px var(--font-sans); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.a-title em { font-style: normal; color: var(--green-600); display: inline-block; }
.a-brush { position: relative; display: inline-block; z-index: 0; }
.a-brush::after { content: ""; position: absolute; left: -2%; right: 6%; bottom: -0.2em; height: 0.3em; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M4 11 C48 6 118 4 196 7' stroke='%23F7CF4A' stroke-width='7' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.a-lead { margin: 0; font: 600 19px/28px var(--font-sans); color: var(--ink-muted); }

/* ——— buttons ——— */
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--radius-pill); font: 800 19px/24px var(--font-sans); cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease; }
.a-btn svg { width: 24px; height: 24px; flex: none; }
.a-btn--primary { background: var(--green-600); color: var(--on-green); box-shadow: var(--shadow-button); }
.a-btn--primary:hover { background: var(--green-700); }
.a-btn--primary:active { transform: translateY(2px); box-shadow: 0 6px 14px rgba(31,107,69,.22), inset 0 -2px 0 rgba(0,0,0,.14); }
.a-btn--secondary { background: var(--lime-100); color: var(--green-700); box-shadow: inset 0 0 0 2px var(--lime-300); }
.a-btn--secondary:hover { background: var(--lime-50); }
.a-btn--quiet { background: transparent; color: var(--ink-muted); }
.a-btn--quiet:hover { background: var(--surface-sunk); color: var(--ink); }
.a-btn--lg { min-height: 64px; padding: 0 36px; font-size: 21px; }
.a-btn--block { display: flex; width: 100%; }
.a-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ——— input ——— */
.a-field { display: grid; gap: 8px; }
.a-label { font: 800 15px/20px var(--font-sans); color: var(--ink); }
.a-label small { font: 500 15px/20px var(--font-sans); color: var(--ink-muted); }
.a-input { width: 100%; height: 60px; padding: 0 20px; border-radius: var(--radius-md); border: 2px solid var(--line-control);
  background: var(--surface-card); font: 600 18px/24px var(--font-sans); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.a-input::placeholder { color: var(--ink-subtle); font-weight: 500; }
.a-input:hover { border-color: var(--green-500); }
.a-input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--lime-100); }
.a-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.a-hint { font: 500 15px/22px var(--font-sans); color: var(--ink-muted); }

/* ——— age picker (radio segments) ——— */
.a-age { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.a-age legend { padding: 0; margin-bottom: 8px; }
.a-age__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.a-age__opt { position: relative; }
.a-age__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.a-age__opt span { display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 12px; border-radius: var(--radius-md);
  background: var(--surface-sunk); font: 700 18px/1 var(--font-sans); color: var(--ink-muted);
  transition: background-color .12s, color .12s, box-shadow .12s, transform .12s; }
.a-age__opt:hover span { background: var(--lime-50); color: var(--ink); }
.a-age__opt input:checked + span { background: var(--lime-100); color: var(--green-700); font-weight: 900; box-shadow: inset 0 0 0 2px var(--green-600); }
.a-age__opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.a-age__opt input:active + span { transform: translateY(1px); }
.a-age--fill { container-type: inline-size; }
.a-age--fill .a-age__opts { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.a-age--fill .a-age__opt span { min-width: 0; padding: 0; }
@container (max-width: 559px) { .a-age--fill .a-age__opts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } }

/* ——— card ——— */
.a-card { background: var(--surface-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: var(--space-10); }
.a-card--sm { border-radius: var(--radius-lg); padding: var(--space-6); }

/* ——— chips ——— */
.a-chips { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.a-chip { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: var(--radius-pill);
  font: 800 17px/1 var(--font-sans); white-space: nowrap; }
.a-chip svg { width: 22px; height: 22px; flex: none; }
.a-chip--lime { background: var(--lime-100); color: var(--green-700); }
.a-chip--sky { background: var(--sky-100); color: var(--sky-700); }
.a-chip--peach { background: var(--peach-100); color: var(--berry-800); }
.a-chip--peach svg { color: var(--berry-600); }
.a-chip--sun { background: var(--sun-100); color: var(--ink); }
.a-chip--sm { height: 36px; padding: 0 14px; font-size: 15px; gap: 8px; }
.a-chip--sm svg { width: 18px; height: 18px; }

/* ——— progress ——— */
.a-progress { display: grid; gap: 8px; }
.a-progress__meta { display: flex; justify-content: space-between; font: 700 13px/18px var(--font-sans); letter-spacing: .02em; color: var(--ink-muted); }
.a-progress__track { height: 14px; border-radius: var(--radius-pill); background: var(--surface-sunk); overflow: hidden; }
.a-progress__bar { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--lime-400), var(--green-500));
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35); transition: width .4s ease; }

/* ——— reading-mode badges ——— */
.a-mode { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 12px; border-radius: var(--radius-pill);
  font: 800 15px/1 var(--font-sans); white-space: nowrap; }
.a-mode svg { width: 20px; height: 20px; }
.a-mode--aloud { background: var(--sun-100); color: var(--ink); }
.a-mode--aloud svg { color: var(--sun-800); }
.a-mode--self { background: var(--sky-100); color: var(--sky-700); }

/* ——— numbered steps ——— */
.a-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.a-step { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-4); align-items: start; font: 500 17px/26px var(--font-sans); color: var(--ink); }
.a-step__num { width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--lime-100); color: var(--green-700);
  display: grid; place-items: center; font: 900 18px/1 var(--font-sans); margin-top: -7px; }

/* ——— answer card ——— */
.a-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-4); }
.a-answer { position: relative; min-height: 96px; padding: 16px; border-radius: var(--radius-lg); border: 2px solid var(--line-control);
  background: var(--surface-card); box-shadow: var(--shadow-answer); color: var(--ink); font: 800 30px/1.1 var(--font-sans);
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s, background-color .12s; }
.a-answer:hover { border-color: var(--green-500); box-shadow: 0 5px 0 var(--lime-300), var(--shadow-float); }
.a-answer:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--lime-300); }
.a-answer[aria-pressed="true"] { border-color: var(--green-600); background: var(--lime-50); box-shadow: 0 5px 0 var(--green-600); color: var(--green-700); }
.a-answer__tick { position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--green-600); color: var(--on-green); display: none; place-items: center; box-shadow: 0 0 0 3px var(--surface-card); }
.a-answer__tick svg { width: 18px; height: 18px; }
.a-answer[aria-pressed="true"] .a-answer__tick { display: grid; }
.a-answer--idk { background: var(--surface-sunk); border-color: transparent; box-shadow: none; color: var(--ink-muted); font-size: 19px; font-weight: 800; gap: 8px; min-height: 64px; }
.a-answer--idk:hover { background: var(--sun-100); border-color: transparent; box-shadow: none; color: var(--ink); }

/* ——— result card ——— */
.a-result { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-6); display: grid; gap: var(--space-4); }
.a-result__head { display: flex; align-items: center; gap: var(--space-4); }
.a-result__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.a-result__icon svg { width: 28px; height: 28px; }
.a-result__title { margin: 0; font: 800 21px/28px var(--font-sans); }
.a-result__sub { margin: 0; font: 500 15px/22px var(--font-sans); color: var(--ink-muted); }
.a-result__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.a-result__list li { display: flex; gap: 10px; align-items: flex-start; font: 500 15px/22px var(--font-sans); }
.a-result__list li::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--sun-400); flex: none; }
.a-level { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.a-level span { height: 10px; border-radius: var(--radius-pill); background: var(--surface-sunk); }
.a-level[data-level="1"] span:nth-child(-n+1),
.a-level[data-level="2"] span:nth-child(-n+2),
.a-level[data-level="3"] span:nth-child(-n+3) { background: linear-gradient(90deg, var(--lime-400), var(--green-500)); }

/* ——— decor ——— */
.a-decor { position: absolute; pointer-events: none; user-select: none; }
.a-stage { position: relative; overflow: hidden; background: var(--surface-page); }
