/* Учиме – modern orange/blue theme for ages 7–15. Colours are tokens; dark mode follows the device. */
:root {
  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --surface-2: #EDF1F8;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E1E7F0;
  --orange: #FF6A1A;
  --orange-2: #FFA23A;
  --blue: #2563EB;
  --blue-2: #38BDF8;
  --navy: #0B1B3F;
  --grad-orange: linear-gradient(135deg, #FF5F1F 0%, #FF9A2E 100%);
  --grad-blue: linear-gradient(135deg, #1D4ED8 0%, #38BDF8 100%);
  --grad-brand: linear-gradient(135deg, #FF6A1A 0%, #FF9A2E 35%, #2563EB 100%);
  --primary: var(--orange);
  --brand: var(--orange-2);
  --ok: #16A34A;
  --ok-bg: #E7F8EE;
  --ok-line: #9FE0B8;
  --bad: #E5484D;
  --bad-bg: #FFEDEE;
  --bad-line: #F7B9BB;
  --sel: #E6EFFF;
  --sel-line: var(--blue);
  --card-bg: #FFF4E8;
  --card-line: #FFD3A8;
  --mark: #FFE08A;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1020;
    --surface: #121A2E;
    --surface-2: #1A2440;
    --ink: #E9EEF8;
    --muted: #93A1B8;
    --line: #243150;
    --ok-bg: #0F2A1C;
    --ok-line: #1F6B3F;
    --bad-bg: #2E1416;
    --bad-line: #7A2A2E;
    --sel: #16274D;
    --blue: #4F8BFF;
    --card-bg: #2A1C10;
    --card-line: #6B3E14;
    --mark: #7A5A00;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 .8em; }
mark { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 3px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { padding: 12px 16px 130px; }
.screen.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.fine { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.label { font-weight: 800; margin: 0; }
.eyebrow { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; margin: 0 0 6px; }
.eyebrow.retry { color: var(--orange); }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row.gap { gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.wide { width: 100%; }
.narrow { align-items: center; }
.grow { flex: 1; }
.error { color: var(--bad); font-weight: 700; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 20px; font-weight: 800; font-size: 1rem;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.big { width: 100%; padding: 16px 20px; font-size: 1.05rem; }
.btn.primary { background: var(--grad-orange); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(255, 106, 26, .35); }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(229, 72, 77, .3); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: var(--bad-line); box-shadow: none; width: 100%; margin-top: 20px; }
.btn:disabled { background: var(--surface-2); border-color: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--blue); font-weight: 700; padding: 8px; }
.link:hover { text-decoration: underline; }
.icon-btn { background: var(--surface); border: 1.5px solid var(--line); font-size: 1.2rem; font-weight: 800; color: var(--ink); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; padding: 0; }

/* ---------- top bars ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 5; }
.stats { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.stat { font-size: .95rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 99px; padding: 4px 12px; }
.avatar-btn { background: none; border: 0; padding: 0; border-radius: 50%; }
.quizbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 5; }
.progress { flex: 1; height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--grad-brand); border-radius: 99px; transition: width .35s ease; }

/* ---------- avatars + logo ---------- */
.av { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 1.25rem; color: #fff; flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.av-0 { background: linear-gradient(135deg, #FF5F1F, #FFB13A); }
.av-1 { background: linear-gradient(135deg, #1D4ED8, #38BDF8); }
.av-2 { background: linear-gradient(135deg, #7C3AED, #2563EB); }
.av-3 { background: linear-gradient(135deg, #0F172A, #334155); }
.av-4 { background: linear-gradient(135deg, #059669, #22D3EE); }
.av-5 { background: linear-gradient(135deg, #E11D48, #FF8A3D); }
.av-6 { background: linear-gradient(135deg, #0B1B3F, #2563EB); }
.av-7 { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.big-avatar { width: 68px; height: 68px; font-size: 2rem; }
.add-av { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.logo { width: 64px; height: 64px; border-radius: 20px; background: var(--grad-brand); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.logo span { color: #fff; font-weight: 800; font-size: 2rem; letter-spacing: -.04em; }
.logo.big { width: 96px; height: 96px; border-radius: 28px; }
.logo.big span { font-size: 3rem; }
.badge-icon { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 2.6rem; background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-lg); margin: 6px 0; }
.float { animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.bounce { animation: bounce .9s ease; }
@keyframes bounce { 30% { transform: translateY(-18px) scale(1.08); } 60% { transform: translateY(0) scale(.97); } }

/* ---------- segmented + forms ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg-btn { border: 0; background: transparent; padding: 8px 16px; border-radius: 10px; font-weight: 800; color: var(--muted); position: relative; }
.seg-btn.on, .seg-btn.radio:has(input:checked) { background: var(--surface); color: var(--blue); box-shadow: var(--shadow); }
.seg-btn.radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-btn.radio { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; font-weight: 700; }
.field input:not([type=radio]) { padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 600; }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.field legend { margin-bottom: 8px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.avatars { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opt .av { width: 56px; height: 56px; font-size: 1.6rem; cursor: pointer; transition: transform .15s; }
.avatar-opt input:checked + .av { transform: scale(1.1); box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--blue); }
.avatar-opt input:focus-visible + .av { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; justify-content: center; padding-bottom: 40px; background: radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--orange) 16%, transparent), transparent), radial-gradient(500px 300px at 100% 100%, color-mix(in srgb, var(--blue) 16%, transparent), transparent); }
.brand { font-size: 3rem; margin: 0; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.04em; }
.tagline { font-size: 1.1rem; font-weight: 600; max-width: 24em; color: var(--muted); }

/* ---------- profiles ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s; }
.profile-card:hover { transform: translateY(-2px); }
.profile-card.add { border-style: dashed; box-shadow: none; color: var(--muted); }
.pname { font-weight: 800; }

/* ---------- grades ---------- */
.hello { margin-top: 6px; }
.banner { background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 14%, var(--surface)), color-mix(in srgb, var(--blue) 12%, var(--surface))); border: 1.5px solid var(--line); padding: 12px 14px; border-radius: 16px; font-weight: 700; }
.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grade { aspect-ratio: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 14px; background: var(--grad-blue); color: #fff; border: 0; border-radius: 22px; box-shadow: 0 10px 24px rgba(37, 99, 235, .28); transition: transform .15s; text-align: left; }
.grade:nth-child(3n+2) { background: var(--grad-orange); box-shadow: 0 10px 24px rgba(255, 106, 26, .28); }
.grade:nth-child(3n) { background: linear-gradient(135deg, #0B1B3F, #2563EB); box-shadow: 0 10px 24px rgba(11, 27, 63, .3); }
.grade:hover:not(:disabled) { transform: translateY(-3px); }
.gnum { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.glabel { font-weight: 700; font-size: .8rem; opacity: .9; text-transform: uppercase; letter-spacing: .06em; }
.grade.soon { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: default; }

/* ---------- subjects ---------- */
.subject-list { display: flex; flex-direction: column; gap: 10px; }
.subject { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "e t c" "e m c"; align-items: center; column-gap: 14px; text-align: left; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s; }
.subject:hover { transform: translateY(-2px); }
.subject .semoji { grid-area: e; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.7rem; border-radius: 16px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.stext { grid-area: t; display: flex; flex-direction: column; }
.stitle { font-weight: 800; font-size: 1.05rem; }
.ssub { color: var(--muted); font-weight: 600; font-size: .85rem; }
.subject .meter { grid-area: m; margin-top: 8px; }
.chev { grid-area: c; font-size: 1.6rem; color: var(--muted); }
.subject.wip { box-shadow: none; background: transparent; border-style: dashed; }
.subject.wip .semoji { filter: grayscale(.8); opacity: .6; background: var(--surface-2); }
.subject.wip .ssub { color: var(--orange); }
.meter { display: block; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--c, var(--blue)); border-radius: 99px; }

/* ---------- lesson path ---------- */
.subject-head { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #0B1B3F)); color: #fff; padding: 18px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.subject-head h2 { margin: 0; }
.subject-head p { margin: 0; opacity: .9; font-weight: 600; }
.subject-head .semoji { font-size: 2.4rem; }
.test-btn { margin-top: 14px; }
.textbook-link { display: block; margin: 12px 0 4px; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: .95rem; }
.path { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px 0 10px; }
.node-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(calc(var(--x) * 64px)); max-width: 230px; text-align: center; }
.node { width: 76px; height: 76px; border-radius: 24px; border: 0; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #0B1B3F)); box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 40%, transparent); font-size: 2rem; display: grid; place-items: center; position: relative; transform: rotate(45deg); transition: transform .15s; }
.node > span { transform: rotate(-45deg); }
.node:hover:not(:disabled) { transform: rotate(45deg) scale(1.06); }
.node.done::after { content: '✓'; position: absolute; right: -6px; top: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--grad-orange); color: #fff; font-size: .85rem; font-weight: 800; display: grid; place-items: center; transform: rotate(-45deg); box-shadow: 0 0 0 3px var(--bg); }
.node.locked { background: var(--surface-2); box-shadow: none; }
.node.soon { background: var(--surface-2); box-shadow: none; font-size: 1.5rem; }
.node-label { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.25; margin-top: 6px; }
.stars span { color: var(--line); font-size: .95rem; }
.stars span.on { color: var(--orange-2); }
.chip { display: inline-block; background: color-mix(in srgb, var(--orange) 14%, var(--surface)); color: var(--orange); border-radius: 99px; padding: 1px 8px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- flashcards ---------- */
.cards { padding-top: 20px; }
.flashcard { width: 100%; max-width: 400px; aspect-ratio: 4 / 3.4; border: 0; background: none; padding: 0; perspective: 1200px; position: relative; margin: 8px 0 14px; }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; border-radius: 28px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s cubic-bezier(.2,.8,.3,1.15); box-shadow: var(--shadow-lg); }
.face.front { background: var(--grad-blue); color: #fff; }
.face.back { background: var(--surface); border: 1.5px solid var(--line); transform: rotateY(180deg); }
.flashcard.flipped .front { transform: rotateY(-180deg); }
.flashcard.flipped .back { transform: rotateY(0); }
.fc-emoji { font-size: 3.6rem; line-height: 1; }
.fc-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.fc-small { font-weight: 800; color: var(--orange); text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.fc-text { font-size: 1.2rem; font-weight: 700; }
.face.front .hint { color: rgba(255,255,255,.8); }
.hint { color: var(--muted); font-weight: 600; font-size: .9rem; }

/* ---------- quiz ---------- */
.quiz { padding-top: 18px; }
.question { font-size: 1.4rem; margin-bottom: 20px; white-space: pre-line; }
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.option { text-align: left; padding: 16px 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; font-size: 1.05rem; transition: border-color .12s, background .12s; }
.option:hover:not(:disabled) { border-color: var(--blue); }
.options.two .option { text-align: center; }
.option.sel { background: var(--sel); border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
.option.right { background: var(--ok-bg); border-color: var(--ok); }
.option.wrong { background: var(--bad-bg); border-color: var(--bad); animation: shake .35s; }
.option:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.answer-input { width: 100%; font-size: 1.8rem; font-weight: 800; text-align: center; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.answer-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.answer-input.right { border-color: var(--ok); background: var(--ok-bg); }
.answer-input.wrong { border-color: var(--bad); background: var(--bad-bg); }
.order-slots { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 2px dashed var(--line); border-radius: 18px; margin-bottom: 16px; align-items: center; }
.order-slots.right { border-color: var(--ok); background: var(--ok-bg); border-style: solid; }
.order-slots.wrong { border-color: var(--bad); background: var(--bad-bg); border-style: solid; }
.placeholder { color: var(--muted); font-weight: 700; padding: 0 6px; opacity: .6; }
.order-pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-weight: 700; }
.chip-btn b { background: var(--blue); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .75rem; }
.chip-btn.used { color: transparent; background: var(--surface-2); box-shadow: none; border-color: transparent; }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 10; }
.actionbar > * { max-width: 528px; margin-left: auto; margin-right: auto; }
.feedback { animation: slideUp .25s ease-out; max-height: 82vh; overflow-y: auto; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(15, 23, 42, .15); }
.feedback.ok { background: var(--ok-bg); border-top-color: var(--ok-line); }
.feedback.bad { background: var(--bad-bg); border-top-color: var(--bad-line); }
.fb-head { font-weight: 800; font-size: 1.25rem; margin-bottom: 6px; }
.feedback.ok .fb-head { color: var(--ok); }
.feedback.bad .fb-head { color: var(--bad); }
.fb-answer, .fb-why { margin-bottom: 8px; }
.feedback .small { color: var(--muted); }
@keyframes slideUp { from { transform: translateY(100%); } }

/* "Learn it" card after a wrong answer */
.teach-card { position: relative; background: var(--surface); border: 1.5px solid var(--card-line); border-radius: 18px; padding: 16px; margin: 10px 0 12px; box-shadow: var(--shadow); text-align: left; overflow: hidden; }
.teach-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--grad-orange); }
.tc-label { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.tc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tc-emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--card-bg); flex: none; }
.tc-front { font-weight: 800; font-size: 1.05rem; }
.tc-back { margin: 0; font-weight: 600; line-height: 1.55; }

/* ---------- result ---------- */
.result { padding-top: 30px; }
.big-stars { font-size: 3.2rem; letter-spacing: 6px; }
.big-stars span { color: var(--line); display: inline-block; }
.big-stars span.on { color: var(--orange-2); animation: pop .5s both; text-shadow: 0 6px 16px rgba(255, 162, 58, .45); }
@keyframes pop { from { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.3); } }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.rstat { background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 6px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.rstat b { font-size: 1.15rem; }
.rstat small { color: var(--muted); font-weight: 600; }
.more { width: 100%; text-align: left; background: var(--sel); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; }
.more h3 { margin-top: 0; }
.more-link { display: flex; justify-content: space-between; padding: 10px 12px; background: var(--surface); border-radius: 12px; margin-top: 8px; color: var(--blue); font-weight: 700; text-decoration: none; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .7; } }

/* ---------- paywall / parent ---------- */
.perks { list-style: none; padding: 0; margin: 0; text-align: left; font-weight: 700; display: grid; gap: 6px; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; text-align: left; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card h4 { margin: 14px 0 6px; }
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plist li { display: grid; grid-template-columns: 1fr 90px auto; gap: 10px; align-items: center; font-weight: 600; }
.plist li:has(> :nth-child(2):last-child) { grid-template-columns: 1fr auto; }

/* ---------- practice test ---------- */
.test-head { margin-top: 1.4em; }
.test-head h3 { margin: 0; }
.test-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.test-topic { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 12px; font-weight: 800; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.test-topic .link { text-transform: none; letter-spacing: 0; padding: 0 4px; font-size: .85rem; }
.test-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; font-weight: 700; }
.test-row.on { background: var(--sel); border-color: var(--blue); }
.test-row:disabled { opacity: .55; cursor: default; }
.tick { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; background: var(--surface); color: #fff; font-weight: 800; font-size: .85rem; }
.test-row.on .tick { background: var(--blue); border-color: var(--blue); }
.test-result .center-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 18px; }
.score { display: flex; align-items: baseline; gap: 12px; }
.score b { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score span { font-size: 1.4rem; font-weight: 800; color: var(--muted); }
.test-lessons li { grid-template-columns: 1fr 70px auto auto; }
.small-btn { padding: 6px 10px; font-size: .8rem; box-shadow: none; }
.mistake { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.mistake .mq { font-weight: 800; font-size: 1.1rem; white-space: pre-line; }
.bad-ans { color: var(--bad); margin-bottom: 4px; }
.good-ans { color: var(--ok); }

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