/* ==========================================================================
   Let's Learn — design system
   Layers: tokens → base → layout → components → marketing → app → player
   ========================================================================== */

/* ---------- tokens ----------
   Palette "Let's Learn": indigo-violet (trust, learning) + coral (energy, actions) + sun (rewards).
   All text colours meet WCAG AA on their backgrounds in both themes. */
:root {
  --bg: #f7f6fc;
  --bg-tint: #efedfb;
  --surface: #ffffff;
  --surface-2: #fbfaff;
  --sunk: #efedf7;
  --ink: #1b1834;
  --ink-2: #3b3858;
  --muted: #66637f;
  --line: #e3e1ef;
  --line-strong: #c8c5dc;
  --accent: #5145e6;
  --accent-hover: #4135d1;
  --accent-soft: #ecebfe;
  --accent-ink: #ffffff;
  --coral: #ff6b4a;
  --coral-strong: #c23e1d;
  --coral-soft: #ffece6;
  --coral-ink: #2b0d05;
  --logo-overlap: #2f2696;
  --sun: #ffc53d;
  --sun-strong: #a86f00;
  --sun-soft: #fff4d6;
  --good: #1d8a4b;
  --good-bg: #e3f5ea;
  --good-line: #9fd9b5;
  --bad: #d23b3b;
  --bad-bg: #fdeaea;
  --bad-line: #f2b1b1;
  --info-bg: #eaf0fe;
  --der: #2f6be0;
  --die: #d43a62;
  --das: #1d8a4b;
  --shadow-sm: 0 1px 2px rgba(27, 24, 52, .06);
  --shadow: 0 1px 2px rgba(27, 24, 52, .05), 0 8px 24px rgba(27, 24, 52, .08);
  --shadow-lg: 0 2px 6px rgba(27, 24, 52, .06), 0 24px 56px rgba(27, 24, 52, .14);
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar-w: 248px;
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0b1c; --bg-tint: #13102a; --surface: #161330; --surface-2: #1b1838; --sunk: #221e42;
    --ink: #eceaf8; --ink-2: #c8c5e3; --muted: #9995ba; --line: #2b2752; --line-strong: #3c376a;
    --accent: #8f85ff; --accent-hover: #a79fff; --accent-soft: #26215a; --accent-ink: #0d0a2b;
    --coral: #ff8a6c; --coral-strong: #ffa68f; --coral-soft: #3b1e17; --coral-ink: #2b0d05; --logo-overlap: #4b3fd6;
    --sun: #ffd166; --sun-strong: #ffd166; --sun-soft: #3a2f12;
    --good: #5ccf86; --good-bg: #12301f; --good-line: #2a6e45; --bad: #ff7b7b; --bad-bg: #3a1719; --bad-line: #7d2f33;
    --info-bg: #1a2244; --der: #86aef5; --die: #f487a3; --das: #5ccf86;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.32);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 56px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0b1c; --bg-tint: #13102a; --surface: #161330; --surface-2: #1b1838; --sunk: #221e42;
  --ink: #eceaf8; --ink-2: #c8c5e3; --muted: #9995ba; --line: #2b2752; --line-strong: #3c376a;
  --accent: #8f85ff; --accent-hover: #a79fff; --accent-soft: #26215a; --accent-ink: #0d0a2b;
  --coral: #ff8a6c; --coral-strong: #ffa68f; --coral-soft: #3b1e17; --coral-ink: #2b0d05; --logo-overlap: #4b3fd6;
  --sun: #ffd166; --sun-strong: #ffd166; --sun-soft: #3a2f12;
  --good: #5ccf86; --good-bg: #12301f; --good-line: #2a6e45; --bad: #ff7b7b; --bad-bg: #3a1719; --bad-line: #7d2f33;
  --info-bg: #1a2244; --der: #86aef5; --die: #f487a3; --das: #5ccf86;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.32);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 56px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 5.2vw, 54px); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 21px); }
h4 { font-size: 16px; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.visually-hidden { 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: -48px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
.art-der { color: var(--der); font-weight: 700; }
.art-die { color: var(--die); font-weight: 700; }
.art-das { color: var(--das); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--r-sm);
  background: var(--b-bg); color: var(--b-fg); border: 1.5px solid var(--b-line);
  font-weight: 700; font-size: 15.5px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --b-line: var(--muted); color: var(--b-fg); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-line: var(--accent); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.btn-primary:hover { --b-bg: var(--accent-hover); --b-line: var(--accent-hover); }
.btn-coral { --b-bg: var(--coral); --b-fg: var(--coral-ink); --b-line: var(--coral); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.btn-coral:hover { filter: brightness(1.05); --b-line: var(--coral); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; color: var(--muted); }
.btn-ghost:hover { --b-bg: var(--sunk); --b-line: transparent; }
.btn-danger { --b-fg: var(--bad); --b-line: var(--bad-line); }
.btn-danger:hover { --b-bg: var(--bad-bg); --b-line: var(--bad); }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 17px; border-radius: var(--r); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-icon { padding: 0; width: 44px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- chips, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-size: 13.5px; font-weight: 700; border: 1px solid transparent; }
.chip .icon { width: 15px; height: 15px; }
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-coral { background: var(--coral-soft); color: var(--coral-strong); }
.chip-outline { background: transparent; border-color: var(--line); }
.badge-level { font-family: var(--f-mono); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); letter-spacing: .02em; }
.badge-premium { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--coral-strong); background: var(--coral-soft); padding: 3px 8px; border-radius: 999px; }
.badge-premium .icon { width: 13px; height: 13px; }
.badge-demo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b2a00; background: #ffd9a8; border: 1px dashed #b0610b; padding: 3px 10px; border-radius: 6px; }
.lang-code { font-family: var(--f-mono); font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--muted); border-radius: 999px; padding: 3px 8px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.card-lg { padding: clamp(20px, 3vw, 32px); border-radius: var(--r-xl); }
.card-flat { box-shadow: none; }
.card-tint { background: var(--surface-2); }
.card h3 + p, .card h2 + p { margin-top: 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 17px; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card-link:hover { border-color: var(--accent); color: inherit; box-shadow: var(--shadow); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--info-bg); font-size: 15px; }
.notice .icon { margin-top: 2px; color: var(--accent); }
.notice-warn { background: var(--coral-soft); }
.notice-warn .icon { color: var(--coral-strong); }
.notice-bad { background: var(--bad-bg); }
.notice-bad .icon { color: var(--bad); }
.notice-good { background: var(--good-bg); }
.notice-good .icon { color: var(--good); }

/* ---------- progress ---------- */
.bar { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s var(--ease); }
.bar.coral > i { background: var(--coral); }
.bar.thin { height: 5px; }
.ring { --p: 0; --size: 92px; --track: var(--sunk); --fill: var(--accent); width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(var(--fill) calc(var(--p) * 1%), var(--track) 0); display: grid; place-items: center; flex: none; }
.ring::before { content: ""; grid-area: 1/1; width: calc(var(--size) - 16px); height: calc(var(--size) - 16px); border-radius: 50%; background: var(--surface); }
.ring > * { grid-area: 1/1; position: relative; text-align: center; line-height: 1.1; }
.ring b { font-family: var(--f-mono); font-size: 20px; display: block; }
.ring small { font-size: 11.5px; color: var(--muted); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.field label, .field .label-text { font-weight: 700; font-size: 14.5px; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .help { font-size: 13.5px; color: var(--muted); }
.field .errorlist, .errorlist { list-style: none; padding: 0; margin: 2px 0 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.form-errors { margin-bottom: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: var(--line-strong); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: 2px; }
.radio-card .rc-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--sunk); color: var(--accent); flex: none; }
.radio-card .rc-title { font-weight: 800; }
.radio-card .rc-sub { font-size: 13.5px; color: var(--muted); }
.switch { position: relative; display: inline-flex; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .t { font-weight: 700; }
.setting-row .d { font-size: 13.5px; color: var(--muted); }

.segmented { display: inline-flex; padding: 4px; background: var(--sunk); border-radius: 12px; gap: 2px; }
.segmented button, .segmented a { border: 0; background: transparent; padding: 9px 16px; border-radius: 9px; font-weight: 700; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.segmented [aria-pressed="true"], .segmented [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented .seg-opt { padding: 9px 16px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 15px; }
.segmented input:checked + .seg-opt { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + .seg-opt { outline: 3px solid var(--coral); outline-offset: 1px; }

/* ---------- messages / toasts ---------- */
.messages { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.messages li.error { background: var(--bad-bg); }
.messages li.warning { background: var(--coral-soft); }
.toast-host { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-weight: 600; animation: toast-in .3s var(--ease); pointer-events: auto; display: flex; gap: 10px; align-items: center; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- dialogs ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--ink); width: min(480px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(5, 20, 18, .55); backdrop-filter: blur(2px); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 0 24px 24px; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 36px; height: 36px; flex: none; }
.logo-mark .a { fill: var(--accent); }
.logo-mark .b { fill: var(--coral); }
.logo-mark .o { fill: var(--logo-overlap); }
.logo b { color: var(--accent); font-weight: 700; }
.logo span { white-space: nowrap; }
@media (max-width: 420px) {
  .logo { font-size: 16.5px; gap: 8px; }
  .logo-mark { width: 32px; height: 32px; }
}

/* ==========================================================================
   Marketing
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 20px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--sunk); color: var(--ink); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
@media (max-width: 880px) {
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; margin: 0; padding: 8px var(--gutter) 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 16px; }
  .menu-toggle { display: inline-flex; }
  .site-actions .hide-sm { display: none; }
}
/* after the base header rules so these win on small phones */
@media (max-width: 420px) {
  .site-header .container { gap: 8px; }
  .site-actions { gap: 4px; }
  .site-actions .btn-primary { min-height: 40px; padding: 8px 12px; font-size: 14.5px; }
}

.theme-toggle { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }


.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 64px) 0; }
.section-head { max-width: 700px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.hero { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; background: radial-gradient(closest-side, var(--accent-soft), transparent 72%); z-index: -1; opacity: .9; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-top: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.04em; height: .14em; background: var(--coral); border-radius: 99px; opacity: .85; }
.hero .lead { margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .icon { width: 17px; height: 17px; color: var(--good); }

/* hero product mock */
.mock { position: relative; }
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 22px; }
.mock-top { display: flex; align-items: center; gap: 12px; }
.mock-top .bar { flex: 1; }
.mock-q { margin-top: 22px; }
.mock-q .label { margin-bottom: 8px; display: block; }
.mock-sentence { font-family: var(--f-display); font-size: clamp(19px, 2.2vw, 24px); font-weight: 500; }
.mock-answer { margin-top: 18px; min-height: 52px; border-bottom: 2px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.mock-tiles { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tile-static { padding: 9px 14px; border-radius: 11px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; box-shadow: 0 2px 0 var(--line); }
.tile-static.used { color: transparent; background: var(--sunk); box-shadow: none; border-color: var(--sunk); }
.mock-foot { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mock-float { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.mock-float .icon { color: var(--coral); }
.mock-float.f1 { top: -18px; right: 18px; }
.mock-float.f2 { bottom: -22px; left: -10px; }
.mock-float.f2 .icon { color: var(--accent); }
@media (max-width: 520px) { .mock-float.f2 { left: 8px; } .mock-float.f1 { right: 8px; } }

/* bridge path (CEFR) */
.bridge { margin-top: 18px; }
.bridge svg { width: 100%; height: auto; overflow: visible; }
.bridge .arc { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
.bridge .arc-done { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.bridge .node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.bridge .node.on { fill: var(--accent); stroke: var(--accent); }
.bridge text { font-family: var(--f-mono); font-size: 12px; fill: var(--ink-2); font-weight: 600; }
.bridge text.on { fill: var(--accent-ink); }

/* languages grid */
.lang-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .lang-grid { grid-template-columns: 1fr; } }
.lang-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.lang-card .lc-top { display: flex; align-items: center; justify-content: space-between; }
.lang-card .lc-native { font-family: var(--f-display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.lang-card .lc-meta { display: flex; gap: 12px; color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: auto; }
.lang-card .lc-go { color: var(--accent); font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }

/* steps / features */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 24px; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 20px; right: 22px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.feature-icon .icon { width: 24px; height: 24px; }
.feature-icon.coral { background: var(--coral-soft); color: var(--coral-strong); }
.step h3, .feature h3 { font-size: 18px; }
.step p, .feature p { color: var(--muted); margin-top: 8px; font-size: 15.5px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 22px; }
.ex-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ex-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.ex-item .icon { color: var(--accent); margin-top: 2px; }
.ex-item b { display: block; font-size: 15px; }
.ex-item span { font-size: 13.5px; color: var(--muted); }

/* CEFR ladder */
.ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1000px) { .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ladder-note { display: flex; gap: 8px; align-items: flex-start; max-width: 760px; margin: 18px 0 0; }
.ladder-note .icon { flex: none; margin-top: 2px; }
.rung { padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.rung .lv { font-family: var(--f-display); font-size: 28px; font-weight: 700; color: var(--accent); }
.rung .nm { font-weight: 800; margin-top: 2px; }
.rung p { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.rung.free::after { content: "Pulsuz"; position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--good); background: var(--good-bg); padding: 2px 8px; border-radius: 99px; }
.rung.prem::after { content: "Plus"; position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--coral-strong); background: var(--coral-soft); padding: 2px 8px; border-radius: 99px; }

/* split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { color: var(--good); margin-top: 2px; }
.pay-steps .icon { color: var(--accent); }
.pay-contacts { display: grid; gap: 10px; margin-top: 22px; }
.check-list.muted-x .icon { color: var(--muted); }

/* pricing */
.pricing-toggle { display: flex; justify-content: center; margin-bottom: 28px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 880px; margin: 0 auto; align-items: stretch; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: var(--r-xl); position: relative; }
.plan-featured { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); }
.plan-ribbon { position: absolute; top: -13px; left: 28px; background: var(--coral); color: var(--coral-ink); font-weight: 800; font-size: 12.5px; padding: 4px 12px; border-radius: 99px; letter-spacing: .02em; }
.plan-name { font-family: var(--f-display); font-size: 20px; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price b { font-family: var(--f-display); font-size: clamp(38px, 5vw, 48px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.plan-price span { color: var(--muted); font-weight: 600; }
.plan-sub { color: var(--muted); font-size: 14.5px; min-height: 22px; }
.plan .check-list { margin: 0; }
.plan .btn { margin-top: auto; }
.save-badge { font-size: 12px; font-weight: 800; background: var(--good-bg); color: var(--good); padding: 2px 8px; border-radius: 99px; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.compare thead th { font-family: var(--f-display); font-size: 15px; font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 22%; }
.compare .icon { margin: 0 auto; }
.compare .yes { color: var(--good); }
.compare .no { color: var(--line-strong); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.guarantee { display: flex; gap: 16px; align-items: center; justify-content: center; text-align: left; margin: 28px auto 0; max-width: 640px; }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 17px 0; font-weight: 800; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); font-size: 22px; color: var(--muted); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); }

.cta-band { background: var(--accent); color: var(--accent-ink); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; position: relative; overflow: hidden; }
.cta-band h2 { color: inherit; max-width: 20ch; }
.cta-band p { opacity: .85; margin-top: 8px; }
.cta-band .btn { --b-bg: var(--surface); --b-fg: var(--accent); --b-line: var(--surface); }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; border: 36px solid rgba(255,255,255,.08); }

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 calc(32px + env(safe-area-inset-bottom, 0px)); margin-top: 32px; background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-family: var(--f-body); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 13.5px; }

/* prose (legal, method) */
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(28px, 4vw, 40px); }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose h3 { font-size: 18px; margin-top: 24px; }
.prose p, .prose ul, .prose ol { margin-top: 12px; color: var(--ink-2); }
.prose li + li { margin-top: 6px; }
.draft-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1.5px dashed var(--coral); background: var(--coral-soft); margin: 18px 0 8px; font-weight: 600; }

/* auth pages */
.auth-wrap { min-height: calc(100dvh - 68px); display: grid; place-items: center; padding: 32px 0 64px; }
.auth-card { width: min(460px, 100%); }
.auth-card h1 { font-size: clamp(26px, 4vw, 32px); }
.auth-card .sub { color: var(--muted); margin-top: 8px; }
.auth-card form { margin-top: 24px; }
.auth-alt { margin-top: 18px; text-align: center; color: var(--muted); font-size: 15px; }

/* onboarding */
.ob { max-width: 720px; margin: 0 auto; padding: 24px 0 64px; }
.ob-progress { display: flex; gap: 6px; margin: 8px 0 28px; }
.ob-progress i { flex: 1; height: 6px; border-radius: 99px; background: var(--sunk); transition: background .3s; }
.ob-progress i.on { background: var(--accent); }
.ob-step[hidden] { display: none; }
.ob-step h1 { font-size: clamp(24px, 3.6vw, 34px); }
.ob-step > p { color: var(--muted); margin-top: 8px; }
.ob-step .radio-cards { margin-top: 24px; }
.ob-lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .ob-lang-grid { grid-template-columns: 1fr; } }
.ob-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.minutes-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 560px) { .minutes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.minutes-grid .radio-card { flex-direction: column; text-align: center; gap: 4px; padding: 16px 8px; }
.minutes-grid .num { font-size: 26px; font-weight: 600; }

/* ==========================================================================
   App shell
   ========================================================================== */
.app { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; gap: 6px; z-index: 30; }
.sidebar .logo { padding: 4px 10px 18px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 15.5px; position: relative; }
.nav-item .icon { width: 22px; height: 22px; color: var(--muted); }
.nav-item:hover { background: var(--sunk); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-item[aria-current="page"] .icon { color: var(--accent); }
.nav-item .count { margin-left: auto; font-family: var(--f-mono); font-size: 12px; background: var(--coral); color: var(--coral-ink); border-radius: 99px; padding: 1px 7px; font-weight: 600; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.premium-mini { padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, var(--coral-soft), var(--accent-soft)); border: 1px solid var(--line); }
.premium-mini b { display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.premium-mini p { font-size: 13px; color: var(--ink-2); margin: 6px 0 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; text-decoration: none; color: var(--ink); }
.user-chip:hover { background: var(--sunk); color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; flex: none; }
.user-chip .uc-name { font-weight: 700; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .uc-sub { font-size: 12.5px; color: var(--muted); }
.app-main { margin-left: var(--sidebar-w); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .logo { display: none; }
.topbar-stats { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.stat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-family: var(--f-mono); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); }
.stat-pill .icon { width: 17px; height: 17px; }
.stat-pill.streak .icon { color: var(--coral); }
.stat-pill.xp .icon { color: var(--sun-strong); }
.page { padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 36px) calc(48px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 1180px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 3.2vw, 34px); }
.page-head p { color: var(--muted); margin-top: 6px; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .topbar .logo { display: inline-flex; font-size: 17px; }
  .topbar .logo-mark { width: 32px; height: 32px; }
  .topbar .page-title-desktop { display: none; }
  .page { padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 700; position: relative; }
  .tabbar a .icon { width: 23px; height: 23px; }
  .tabbar a[aria-current="page"] { color: var(--accent); }
  .tabbar .dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 17px; height: 17px; border-radius: 99px; background: var(--coral); color: var(--coral-ink); font-family: var(--f-mono); font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; }
}

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.dash-col { display: grid; gap: 20px; }
.continue { position: relative; overflow: hidden; background: var(--accent); color: var(--accent-ink); border: 0; padding: clamp(22px, 3vw, 30px); }
.continue .label { color: inherit; opacity: .8; }
.continue h2 { color: inherit; font-size: clamp(22px, 3vw, 30px); margin-top: 8px; }
.continue p { opacity: .85; margin-top: 6px; }
.continue .row { margin-top: 20px; }
.continue .btn { --b-bg: var(--surface); --b-fg: var(--accent); --b-line: var(--surface); }
.continue .btn-ghost { --b-bg: transparent; --b-line: color-mix(in srgb, currentColor 35%, transparent); --b-fg: inherit; color: inherit; }
.continue .btn-ghost:hover { --b-bg: color-mix(in srgb, currentColor 12%, transparent); }
.continue .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.continue .meta .chip { background: rgba(255,255,255,.16); color: inherit; }
:root[data-theme="dark"] .continue .meta .chip { background: rgba(0,0,0,.15); }
.continue::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255,255,255,.09); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.kpi { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.kpi b { font-family: var(--f-mono); font-size: clamp(20px, 3vw, 26px); display: block; line-height: 1.2; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.review-card { display: flex; gap: 16px; align-items: center; }
.review-card .big { font-family: var(--f-display); font-size: 40px; font-weight: 700; color: var(--coral-strong); line-height: 1; min-width: 56px; }
.goal-card { display: flex; gap: 18px; align-items: center; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 96px; margin-top: 8px; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week .col { width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: var(--accent-soft); min-height: 4px; }
.week .col.has { background: var(--accent); }
.week .col.freeze { background: repeating-linear-gradient(45deg, var(--info-bg), var(--info-bg) 4px, var(--surface) 4px, var(--surface) 8px); border: 1px solid #8fb3e8; }
.week .lb { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.week .today .lb { color: var(--accent); }
.streak-card .flame { width: 46px; height: 46px; border-radius: 14px; background: var(--coral-soft); color: var(--coral); display: grid; place-items: center; }
.streak-card .flame .icon { width: 26px; height: 26px; }
.levels-list { display: grid; gap: 12px; }
.level-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.level-row .lv { font-family: var(--f-mono); font-weight: 600; }
.level-row .pct { font-family: var(--f-mono); font-size: 13px; color: var(--muted); min-width: 40px; text-align: right; }
.lang-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-switch form { display: contents; }
.lang-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; text-decoration: none; color: var(--ink); }
.lang-pill[aria-current="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.lang-pill[aria-current="true"] .lang-code { background: rgba(255,255,255,.2); color: inherit; }
.lang-pill.add { padding: 6px 12px; color: var(--muted); border-style: dashed; }

/* course tracks + roadmap */
.track-nav { flex-wrap: wrap; margin-bottom: 20px; }
.roadmap { margin-bottom: 28px; }
.roadmap summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.roadmap summary::-webkit-details-marker { display: none; }
.roadmap summary::after { content: "▾"; color: var(--muted); }
.roadmap:not([open]) summary::after { content: "▸"; }
.roadmap h2 { font-size: 20px; display: inline; }
@media (max-width: 560px) {
  .roadmap .step { padding: 16px 18px; }
  .roadmap .step .feature-icon { display: none; }
  .roadmap .step p { margin-top: 4px; }
}
.roadmap .step p a { font-weight: 700; }
.track-intro { display: flex; gap: 16px; align-items: flex-start; padding: 20px; margin-bottom: 20px; }
.track-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; }
.res-card { text-decoration: none; color: inherit; }
.res-card h3 .icon { width: 16px; height: 16px; color: var(--muted); }

/* ---------- course path ---------- */
.level-block { margin-top: 36px; }
.level-block:first-of-type { margin-top: 8px; }
.level-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.level-head .lv { font-family: var(--f-display); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1; }
.level-head h2 { font-size: 20px; }
.level-head .bar { width: 160px; }
.units { display: grid; gap: 16px; }
.unit { padding: 0; overflow: hidden; }
.unit-head { display: flex; gap: 16px; align-items: flex-start; padding: 20px 20px 16px; }
.unit-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.unit-icon .icon { width: 26px; height: 26px; }
.unit.locked .unit-icon { background: var(--sunk); color: var(--muted); }
.unit-photo-wrap { position: relative; flex: none; }
.unit-photo { display: block; width: 84px; height: 64px; border-radius: 15px; object-fit: cover; background: var(--sunk); flex: none; }
.unit.locked .unit-photo { filter: grayscale(.85) brightness(.75); }
.unit-lock { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.unit-lock .icon { width: 14px; height: 14px; }
@media (max-width: 560px) { .unit-photo { width: 64px; height: 52px; border-radius: 12px; } }
.unit-head h3 { font-size: 18.5px; }
.unit-head .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.unit-head .cando { font-size: 14px; color: var(--ink-2); margin-top: 8px; display: flex; gap: 8px; }
.unit-head .cando .icon { width: 16px; height: 16px; color: var(--good); margin-top: 3px; }
.reading-source { margin-top: 10px; }
.unit-progress { margin-left: auto; text-align: right; flex: none; }
.unit-progress b { font-family: var(--f-mono); font-size: 14px; }
.lessons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
@media (max-width: 720px) { .lessons { grid-template-columns: 1fr; } }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); min-height: 60px; }
.lessons .lesson-row:nth-child(odd) { border-right: 1px solid var(--line); }
@media (max-width: 720px) { .lessons .lesson-row:nth-child(odd) { border-right: 0; } }
.lesson-row:hover { background: var(--surface-2); color: var(--ink); }
.lesson-row .stone { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--muted); flex: none; background: var(--surface); }
.lesson-row.done .stone { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lesson-row.next .stone { border-color: var(--coral); color: var(--coral-strong); box-shadow: 0 0 0 4px var(--coral-soft); }
.lesson-row.locked { color: var(--muted); }
.lesson-row .lt { font-weight: 700; font-size: 15px; line-height: 1.3; }
.lesson-row .lm { font-size: 12.5px; color: var(--muted); }
.lesson-row .go { margin-left: auto; color: var(--muted); }
.lesson-row.next .go { color: var(--coral-strong); }

/* ---------- word bank ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input { max-width: 340px; min-height: 44px; }
.wb-table { width: 100%; border-collapse: collapse; }
.wb-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.wb-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wb-table tr:last-child td { border-bottom: 0; }
.wb-word { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.wb-word .icon { width: 20px; height: 20px; color: var(--accent); }
.strength { display: inline-flex; gap: 3px; vertical-align: middle; }
.strength i { width: 7px; height: 16px; border-radius: 3px; background: var(--sunk); }
.strength.s0 i:nth-child(1) { background: var(--bad); }
.strength.s1 i:nth-child(-n+2) { background: var(--coral); }
.strength.s2 i { background: var(--good); }
.speak-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--line-strong); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------- stats ---------- */
.heat { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; }
.heat i { aspect-ratio: 1; border-radius: 5px; background: var(--sunk); }
.heat i.l1 { background: color-mix(in srgb, var(--accent) 35%, var(--sunk)); }
.heat i.l2 { background: color-mix(in srgb, var(--accent) 65%, var(--sunk)); }
.heat i.l3 { background: var(--accent); }
.heat i.fz { background: repeating-linear-gradient(45deg, var(--info-bg), var(--info-bg) 3px, var(--surface) 3px, var(--surface) 6px); }
.legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; align-items: center; }
.legend-row i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.forecast { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 120px; }
.forecast span { background: var(--coral); border-radius: 4px 4px 2px 2px; min-height: 2px; position: relative; }
.forecast span:first-child { background: var(--bad); }
.buckets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bucket { padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.bucket b { font-family: var(--f-mono); font-size: 22px; display: block; }
.bucket span { font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.locked-panel { position: relative; }
.locked-panel .blur { filter: blur(5px); opacity: .5; pointer-events: none; user-select: none; }
.locked-panel .over { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }

/* ---------- subscription ---------- */
.sub-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sub-hero .crown { width: 56px; height: 56px; border-radius: 16px; background: var(--coral-soft); color: var(--coral-strong); display: grid; place-items: center; }
.sub-hero .crown .icon { width: 28px; height: 28px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin-top: 18px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pay-table th, .pay-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.pay-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 2px 9px; border-radius: 99px; background: var(--sunk); }
.status.ok { background: var(--good-bg); color: var(--good); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.status.warn { background: var(--coral-soft); color: var(--coral-strong); }

/* demo pay */
.demo-pay { max-width: 520px; margin: 40px auto; }
.demo-pay .amount { font-family: var(--f-display); font-size: 40px; font-weight: 700; }
.demo-stripes { height: 10px; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(45deg, #f0b445, #f0b445 12px, #2a1a00 12px, #2a1a00 24px); }

/* ==========================================================================
   Lesson / review player
   ========================================================================== */
.player-body { background: var(--bg); }
.player { min-height: 100dvh; display: flex; flex-direction: column; }
.player-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 14px var(--gutter); max-width: 860px; width: 100%; margin: 0 auto; background: var(--bg); }
.player-top .bar { flex: 1; height: 12px; }
.player-top .bar > i { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--coral))); }
.player-close { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
.combo { font-family: var(--f-mono); font-weight: 600; color: var(--coral-strong); display: inline-flex; gap: 4px; align-items: center; min-width: 48px; justify-content: flex-end; font-size: 14px; }
.combo .icon { width: 18px; height: 18px; color: var(--coral); }
.stage { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 12px var(--gutter) 180px; display: flex; flex-direction: column; }
.ex { animation: ex-in .32s var(--ease); display: flex; flex-direction: column; gap: 22px; }
@keyframes ex-in { from { opacity: 0; transform: translateY(10px); } }
.ex-kicker { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.ex-kicker .icon { width: 16px; height: 16px; }
.ex-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 3vw, 26px); line-height: 1.25; }
.prompt-word { font-family: var(--f-display); font-weight: 500; font-size: clamp(30px, 6.5vw, 46px); line-height: 1.15; overflow-wrap: anywhere; letter-spacing: -.01em; }
.prompt-sentence { font-family: var(--f-display); font-weight: 500; font-size: clamp(21px, 3.6vw, 27px); line-height: 1.35; overflow-wrap: anywhere; }
.prompt-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.audio-btn { width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); flex: none; transition: transform .08s; }
.audio-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.audio-btn .icon { width: 26px; height: 26px; }
.audio-btn.slow { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.audio-btn.slow .icon { width: 21px; height: 21px; }
.audio-btn.big { width: 96px; height: 96px; border-radius: 26px; }
.audio-btn.big .icon { width: 40px; height: 40px; }
.audio-btn.playing { animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px var(--accent-soft); } }
.speak-inline { border: 0; background: none; color: var(--accent); padding: 4px; border-radius: 8px; display: inline-grid; place-items: center; vertical-align: middle; }
.speak-inline .icon { width: 20px; height: 20px; }
.no-tts { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

.intro-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 32px 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.intro-photo { width: min(100%, 360px); border-radius: var(--r-lg); overflow: hidden; background: var(--sunk); box-shadow: var(--shadow-sm); }
.intro-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; max-height: min(220px, 26vh); object-fit: cover; }
.intro-art { width: 112px; height: 112px; border-radius: 30px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.intro-art .icon { width: 56px; height: 56px; stroke-width: 1.6; }
.intro-card .tr { font-size: 19px; color: var(--ink-2); font-weight: 600; }
.intro-card .note { font-size: 14.5px; color: var(--muted); max-width: 36em; }
.intro-card .example { margin-top: 6px; padding: 12px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); text-align: left; width: 100%; max-width: 480px; }
.intro-card .example .t { font-weight: 700; }
.intro-card .example .a { color: var(--muted); font-size: 14.5px; }
.new-badge { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--coral); color: var(--coral-ink); padding: 3px 10px; border-radius: 99px; }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.options.one-col { grid-template-columns: 1fr; }
@media (max-width: 560px) { .options { grid-template-columns: 1fr; } }
.opt { position: relative; text-align: left; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: 17px; box-shadow: 0 3px 0 var(--line); transition: border-color .12s, background .12s, transform .06s; overflow-wrap: anywhere; }
.opt:hover:not(:disabled) { border-color: var(--line-strong); }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.opt .key { font-family: var(--f-mono); font-size: 12px; color: var(--muted); border: 1.5px solid var(--line); border-radius: 7px; padding: 1px 7px; flex: none; }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 45%, var(--line)); }
.opt.correct { border-color: var(--good); background: var(--good-bg); box-shadow: 0 3px 0 var(--good-line); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 3px 0 var(--bad-line); }
.opt:disabled { cursor: default; }
.opt-image { flex-direction: column; justify-content: flex-start; align-items: stretch; text-align: center; min-height: 0; gap: 0; padding: 0; overflow: hidden; }
.opt-image .photo { display: block; width: 100%; aspect-ratio: 3 / 2; max-height: min(170px, 18vh); object-fit: cover; background: var(--sunk); }
.opt-image .cap { font-size: 17px; color: var(--ink); line-height: 1.3; padding: 10px 10px 0; }
.opt-image .cap-word { font-size: 14px; font-weight: 600; color: var(--muted); min-height: 1.3em; padding: 2px 10px 10px; }
.opt-image .key { position: absolute; top: 8px; left: 8px; z-index: 1; color: #fff; background: rgba(13, 11, 28, .6); border-color: transparent; }
/* icon cards: used until a word's photo is downloaded */
.opt-icon { justify-content: center; align-items: center; min-height: 150px; gap: 10px; padding: 14px 10px; }
.opt-icon .icon { width: 64px; height: 64px; color: var(--accent); stroke-width: 1.5; }
.opt-icon .cap, .opt-icon .cap-word { padding: 0; }
.opt-icon .cap-word { margin-top: -6px; }
.opt-icon .key { color: var(--muted); background: none; border-color: var(--line); }
.options.images { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col { display: grid; gap: 10px; align-content: start; }
.match-item { min-height: 56px; padding: 12px 14px; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: 16px; box-shadow: 0 3px 0 var(--line); text-align: center; overflow-wrap: anywhere; }
.match-item[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.match-item.done { opacity: .35; border-style: dashed; box-shadow: none; }
.match-item.bad { border-color: var(--bad); background: var(--bad-bg); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.build-answer { min-height: 116px; border-radius: var(--r); padding: 12px 0; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; background-image: repeating-linear-gradient(to bottom, transparent 0 55px, var(--line) 55px 57px); }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tile { padding: 10px 15px; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: 17px; box-shadow: 0 3px 0 var(--line); transition: transform .06s; }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.tile.ghost { visibility: hidden; }
.tile.slot { background: var(--sunk); color: transparent; box-shadow: none; border-color: var(--sunk); pointer-events: none; }

.typing { display: flex; flex-direction: column; gap: 10px; }
.typing textarea, .typing input { width: 100%; min-height: 64px; resize: vertical; padding: 14px 16px; border-radius: var(--r); border: 2px solid var(--line-strong); background: var(--surface); font-size: 19px; line-height: 1.4; color: var(--ink); }
.typing textarea:focus, .typing input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.typing .ok { border-color: var(--good) !important; background: var(--good-bg); }
.typing .no { border-color: var(--bad) !important; background: var(--bad-bg); }
.charpad { display: flex; flex-wrap: wrap; gap: 6px; }
.charpad button { min-width: 38px; min-height: 38px; padding: 4px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 16px; font-weight: 600; }
.charpad button:hover { border-color: var(--accent); }

.cloze-sentence { font-family: var(--f-display); font-size: clamp(21px, 3.6vw, 27px); font-weight: 500; line-height: 1.6; }
.cloze-gap { display: inline-block; min-width: 4.5em; border-bottom: 3px solid var(--accent); padding: 0 6px; text-align: center; color: var(--accent); }
.cloze-gap.filled { font-weight: 600; }
.cloze-gap input { border: 0; background: transparent; font: inherit; color: var(--accent); width: 6em; text-align: center; padding: 0; }
.cloze-gap input:focus { outline: none; }
.cloze-tr { color: var(--muted); font-size: 16px; }

.speak-zone { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 12px 0; }
.mic-btn { width: 104px; height: 104px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 60%, #000); transition: transform .08s; }
.mic-btn .icon { width: 42px; height: 42px; }
.mic-btn.listening { background: var(--bad); animation: pulse-bad 1.2s infinite; box-shadow: none; }
@keyframes pulse-bad { 50% { box-shadow: 0 0 0 16px var(--bad-bg); } }
.heard { min-height: 28px; font-size: 18px; color: var(--ink-2); text-align: center; }
.heard mark { background: var(--good-bg); color: var(--good); border-radius: 4px; padding: 0 2px; }
.heard .miss { color: var(--bad); text-decoration: underline wavy; }

.dialogue { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 86%; padding: 12px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); animation: ex-in .3s var(--ease); }
.bubble.b { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.bubble .who { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; display: flex; gap: 6px; align-items: center; }
.bubble .t { font-weight: 700; font-size: 17px; }
.bubble .a { font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.bubble .a[hidden] { display: none; }
.qa { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; border-top: 1px dashed var(--line); }
.qa h4 { font-family: var(--f-body); font-weight: 800; }

.reading-text { font-size: 19px; line-height: 1.85; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.reading-text p + p { margin-top: 10px; }
.tok { border-radius: 4px; cursor: help; text-decoration: underline dotted var(--line-strong); text-underline-offset: .25em; }
.tok:hover, .tok:focus-visible { background: var(--accent-soft); text-decoration-color: var(--accent); }
button.tok { border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.para-tr { display: block; font-size: 15px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.gloss-pop { position: fixed; z-index: 60; max-width: 260px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow-lg); pointer-events: none; animation: toast-in .15s; }
.gloss-pop b { display: block; font-size: 12px; opacity: .7; font-weight: 700; }

.grammar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.grammar-card h2 { font-size: clamp(20px, 3vw, 24px); }
.grammar-card .g-body { margin-top: 14px; display: grid; gap: 12px; font-size: 16.5px; }
.grammar-card .g-body code { font-family: var(--f-mono); font-size: .92em; background: var(--sunk); padding: 1px 6px; border-radius: 6px; }
.g-tip { padding: 12px 14px; border-radius: var(--r); background: var(--coral-soft); border-left: 4px solid var(--coral); }
.g-table-wrap { overflow-x: auto; }
.g-table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.g-table th, .g-table td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.g-table th { background: var(--surface-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.g-examples { margin-top: 16px; display: grid; gap: 8px; }
.g-ex { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.g-ex .t { font-weight: 700; }
.g-ex .a { font-size: 14.5px; color: var(--muted); }

/* action bar + feedback sheet */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bg); border-top: 2px solid var(--line); padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px)); transition: background .2s, border-color .2s; }
.actionbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.actionbar .btn-lg { min-width: 160px; margin-left: auto; }
.actionbar.good { background: var(--good-bg); border-top-color: var(--good-line); }
.actionbar.bad { background: var(--bad-bg); border-top-color: var(--bad-line); }
.fb { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 220px; }
.fb-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); }
.good .fb-icon { color: var(--good); }
.bad .fb-icon { color: var(--bad); }
.fb-icon .icon { width: 24px; height: 24px; stroke-width: 3; }
.fb-title { font-family: var(--f-display); font-weight: 600; font-size: 19px; }
.good .fb-title { color: var(--good); }
.bad .fb-title { color: var(--bad); }
.fb-body { font-size: 15.5px; margin-top: 2px; }
.fb-body .ans { font-weight: 800; }
.fb-body .tr { color: var(--muted); }
.actionbar.good .btn-primary { --b-bg: var(--good); --b-line: var(--good); --b-fg: #fff; }
.actionbar.bad .btn-primary { --b-bg: var(--bad); --b-line: var(--bad); --b-fg: #fff; }
:root[data-theme="dark"] .actionbar.good .btn-primary, :root[data-theme="dark"] .actionbar.bad .btn-primary { --b-fg: #08110f; }
.kbd-hint { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) { .kbd-hint { display: none; } .actionbar .btn-lg { width: 100%; margin-left: 0; } }

/* summary */
.summary { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0; }
.summary .trophy { width: 104px; height: 104px; border-radius: 30px; background: var(--sun-soft); color: var(--sun-strong); display: grid; place-items: center; animation: pop .6s var(--ease); }
.summary .trophy .icon { width: 54px; height: 54px; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } }
.summary h1 { font-size: clamp(26px, 4vw, 36px); }
.sum-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 520px; margin-top: 8px; }
.sum-stat { border-radius: var(--r-lg); padding: 14px 8px; border: 2px solid var(--line); background: var(--surface); }
.sum-stat b { font-family: var(--f-mono); font-size: 24px; display: block; }
.sum-stat span { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sum-stat.xp { border-color: var(--sun); }
.sum-stat.xp b { color: var(--sun-strong); }
.sum-stat.acc { border-color: var(--accent); }
.sum-stat.acc b { color: var(--accent); }
.summary .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.loading { display: grid; place-items: center; gap: 12px; padding: 80px 0; color: var(--muted); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--sunk); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .9; } }

/* placement */
.pt-wrap { max-width: 680px; margin: 0 auto; padding: 16px var(--gutter) 160px; }
.pt-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; font-weight: 700; margin-bottom: 18px; }
.pt-q { margin-bottom: 28px; }
.pt-q .passage { padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; font-size: 16.5px; }
.pt-q .prompt { font-family: var(--f-display); font-size: clamp(18px, 2.8vw, 22px); font-weight: 500; margin-bottom: 14px; line-height: 1.4; }
.result-level { font-family: var(--f-display); font-size: clamp(64px, 12vw, 104px); font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -.04em; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .confetti { display: none; }
}
@media (forced-colors: active) {
  .opt, .tile, .match-item, .btn { border: 2px solid ButtonText; }
  .opt.correct { outline: 3px solid Highlight; }
}
@media print {
  .site-header, .site-footer, .sidebar, .tabbar, .topbar, .actionbar { display: none !important; }
  .app-main { margin: 0; }
}

/* word bank thumbnails */
.wb-photo { width: 42px; height: 28px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; background: var(--sunk); }
.track-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); margin-bottom: 14px; background: var(--sunk); }
.feature-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); margin-bottom: 14px; background: var(--sunk); }
.step .feature-photo { margin-top: 18px; }
@media (max-width: 760px) { .feature-photo, .track-photo { aspect-ratio: 5 / 2; } }
/* onboarding: the plan screen */
.ob-nav-right { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ob-plan { padding: 20px; margin-top: 8px; }
.ob-plan-head { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-plan-time { font-size: 17px; font-weight: 700; margin: 14px 0 16px; }
.ob-plan h3 { font-size: 15px; margin: 12px 0 8px; }
.ob-plan-achieve { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ob-plan-achieve li { display: flex; gap: 10px; align-items: flex-start; }
.ob-plan-achieve .icon { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 2px; }
.ob-plan-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ob-plan-unit { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.ob-plan-unit img { width: 56px; height: 42px; object-fit: cover; border-radius: 9px; flex: none; }
.ob-plan-unit span { display: flex; flex-direction: column; } .ob-plan-unit small { color: var(--muted); }
.dialogue .bubble.speaking { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral); }
/* a unit's extra practice: video practice chips under the unit head (full width, tidy on phones) */
.unit-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 0 20px 16px 120px; }
.unit-extra-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.practice-chip, .video-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 99px; background: var(--coral-soft); border: 1.5px solid var(--coral); color: var(--ink) !important; font-size: 13.5px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.practice-chip .icon, .video-chip .icon { width: 14px; height: 14px; color: var(--coral-strong); flex: none; }
.practice-chip:hover, .video-chip:hover { background: var(--coral); color: var(--coral-ink) !important; }
.practice-chip:hover .icon, .video-chip:hover .icon { color: var(--coral-ink); }
@media (max-width: 560px) { .unit-extra { padding: 0 16px 14px; } }
