/* AI Coach "Aurora" inside the app: the entrance identity (aurora.css) carried into the signed-in shell, the dashboard and the lessons.
   Loaded last. It re-points the design tokens of styles.css / board.css / app.css and restyles the surfaces; the structure of the lessons is untouched.

   The lesson keeps its two-surface logic, in new materials:
     INK CARD  (.slate and the small English blocks)  = where English lives      -> solid near-black, light text
     PAPER     (.paper)                               = where the explanation is read -> solid white, dark text
   Both are SOLID in both themes. Glass (translucency + backdrop blur) is used ONLY on interactive controls: buttons, chips, the listen buttons,
   the round toggles, the navigation bars and the sticky lesson bars. Never on text, explanations, questions, corrections or reading surfaces.
   On phones the in-flow buttons drop the blur (they sit on solid cards, where a blur shows nothing and only costs GPU); the bars keep it. */

/* ================= 1. tokens ================= */
:root {
  --bg: #f5f3ef; --surface: #ffffff; --surface-2: #f1eff8; --surface-3: #e7e4f2;
  --line: rgba(11, 11, 16, .10); --line-strong: rgba(11, 11, 16, .26);
  --text: #0b0b10; --text-2: #2a2a33; --muted: #565664;
  --primary-bg: #0b0b10; --primary-hover: #23232e; --primary-fg: #ffffff;
  --accent: #6a4cff; --accent-text: #4a30d9; --accent-soft: #ece8ff; --link: #4a30d9; --focus: #6a4cff;
  --gold: #6a4cff; --forest: #0b0b10; --forest-600: #4a30d9; --forest-900: #0b0b10; --moss: #565664;
  --ok: #0d6b45; --ok-soft: #e3f6ec; --warn: #7a5200; --warn-soft: #fbf0d0; --bad: #a3203a; --bad-soft: #fde8ee;
  --shadow-1: 0 1px 0 rgb(11 11 16 / .03);
  --shadow-2: 0 1px 2px rgb(40 30 90 / .07), 0 14px 30px -18px rgb(40 30 90 / .32);
  --shadow-3: 0 24px 60px -24px rgb(40 30 90 / .45);
  --radius-s: 10px; --radius: 14px; --radius-l: 22px;
  --serif: var(--au-display); --hand: var(--au-display);
  --slate-1: #1c1b26; --slate-2: #14141c; --slate-3: #0b0b10;
  --paper: #ffffff; --paper-2: #fbfaf7; --paper-ink: #0b0b10; --paper-ink-2: #3a3a46; --paper-line: rgba(11, 11, 16, .13);
  /* "chalk" = what is written on the current surface: dark ink on light surfaces here, light on the ink cards (re-declared in section 2) */
  --chalk: var(--text); --chalk-dim: var(--text-2); --chalk-gold: var(--accent-text); --chalk-green: var(--ok); --chalk-rose: var(--bad);
  /* glass for controls */
  --g-fill: rgba(255, 255, 255, .62); --g-fill-hover: rgba(255, 255, 255, .88); --g-edge: rgba(11, 11, 16, .13);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 8px 20px -12px rgba(40, 30, 90, .35), 0 1px 2px rgba(40, 30, 90, .08);
  --g-ink: rgba(11, 11, 16, .9); --g-ink-fg: #ffffff; --g-ink-edge: rgba(255, 255, 255, .22);
  --g-bar: rgba(255, 255, 255, .72);
  --field-opacity: 1;
}
@media (max-width: 959px) { :root { --nav-h: 76px; } }   /* the phone tab bar floats now: everything that sits above it clears it */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b10; --surface: #15151d; --surface-2: #1d1d28; --surface-3: #282836;
    --line: rgba(255, 255, 255, .11); --line-strong: rgba(255, 255, 255, .30);
    --text: #f4f2ff; --text-2: #d3d1e3; --muted: #a9a7bc;
    --primary-bg: #ffffff; --primary-hover: #e9e6ff; --primary-fg: #0b0b10;
    --accent: #b6a6ff; --accent-text: #c9bcff; --accent-soft: #24203d; --link: #c9bcff; --focus: #c9bcff;
    --gold: #b6a6ff; --forest-600: #b6a6ff; --forest-900: #1d1d28; --moss: #a9a7bc;
    --ok: #8ee6bd; --ok-soft: #10291d; --warn: #f0d28a; --warn-soft: #332a12; --bad: #ff9db5; --bad-soft: #3a1622;
    --shadow-1: none; --shadow-2: 0 1px 2px rgb(0 0 0 / .4), 0 12px 28px -14px rgb(0 0 0 / .65); --shadow-3: 0 18px 50px -12px rgb(0 0 0 / .75);
    --paper: #f3f1f9; --paper-2: #eceaf4; --paper-ink: #0b0b10; --paper-ink-2: #3a3a46; --paper-line: rgba(11, 11, 16, .13);
    --chalk: #f4f2ff; --chalk-dim: #c9c7dc; --chalk-gold: #d5c6ff; --chalk-green: #b6f0d6; --chalk-rose: #ffb6dc;
    --g-fill: rgba(255, 255, 255, .09); --g-fill-hover: rgba(255, 255, 255, .17); --g-edge: rgba(255, 255, 255, .20);
    --g-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 22px -12px rgba(0, 0, 0, .7);
    --g-ink: rgba(255, 255, 255, .94); --g-ink-fg: #0b0b10; --g-ink-edge: rgba(255, 255, 255, .6);
    --g-bar: rgba(21, 21, 29, .74);
    --field-opacity: .34;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b10; --surface: #15151d; --surface-2: #1d1d28; --surface-3: #282836;
  --line: rgba(255, 255, 255, .11); --line-strong: rgba(255, 255, 255, .30);
  --text: #f4f2ff; --text-2: #d3d1e3; --muted: #a9a7bc;
  --primary-bg: #ffffff; --primary-hover: #e9e6ff; --primary-fg: #0b0b10;
  --accent: #b6a6ff; --accent-text: #c9bcff; --accent-soft: #24203d; --link: #c9bcff; --focus: #c9bcff;
  --gold: #b6a6ff; --forest-600: #b6a6ff; --forest-900: #1d1d28; --moss: #a9a7bc;
  --ok: #8ee6bd; --ok-soft: #10291d; --warn: #f0d28a; --warn-soft: #332a12; --bad: #ff9db5; --bad-soft: #3a1622;
  --shadow-1: none; --shadow-2: 0 1px 2px rgb(0 0 0 / .4), 0 12px 28px -14px rgb(0 0 0 / .65); --shadow-3: 0 18px 50px -12px rgb(0 0 0 / .75);
  --paper: #f3f1f9; --paper-2: #eceaf4; --paper-ink: #0b0b10; --paper-ink-2: #3a3a46; --paper-line: rgba(11, 11, 16, .13);
  --chalk: #f4f2ff; --chalk-dim: #c9c7dc; --chalk-gold: #d5c6ff; --chalk-green: #b6f0d6; --chalk-rose: #ffb6dc;
  --g-fill: rgba(255, 255, 255, .09); --g-fill-hover: rgba(255, 255, 255, .17); --g-edge: rgba(255, 255, 255, .20);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 22px -12px rgba(0, 0, 0, .7);
  --g-ink: rgba(255, 255, 255, .94); --g-ink-fg: #0b0b10; --g-ink-edge: rgba(255, 255, 255, .6);
  --g-bar: rgba(21, 21, 29, .74);
  --field-opacity: .34;
}

/* ================= 2. surfaces carry their own tokens ================= */
/* Everything on an ink surface reads the "dark" set, everything on paper reads the "light" set, whatever the app theme is:
   a button, a badge or a hint placed on either surface is correct by construction. */
.slate, .teach-nav, .answer-bar, .bub--them, .toast,
.paper .example, .paper .contrast, .paper .formula, .paper .answer, .paper .own-mistake, .paper .vocab-list li {
  --text: #f4f2ff; --text-2: #d3d1e3; --muted: #a9a7bc; --line: rgba(255, 255, 255, .12); --line-strong: rgba(255, 255, 255, .30);
  --surface: #1d1d28; --surface-2: #262633; --surface-3: #30303f;
  --primary-bg: #ffffff; --primary-hover: #e9e6ff; --primary-fg: #0b0b10;
  --accent: #b6a6ff; --accent-text: #d5c6ff; --accent-soft: rgba(213, 198, 255, .16); --link: #d5c6ff; --focus: #d5c6ff;
  --gold: #b6a6ff; --forest-600: #b6a6ff; --moss: #a9a7bc;
  --ok: #b6f0d6; --ok-soft: rgba(182, 240, 214, .16); --warn: #f4ebb4; --warn-soft: rgba(244, 235, 180, .16); --bad: #ffb6dc; --bad-soft: rgba(255, 182, 220, .16);
  --chalk: #f4f2ff; --chalk-dim: #c9c7dc; --chalk-gold: #d5c6ff; --chalk-green: #b6f0d6; --chalk-rose: #ffb6dc;
  --g-fill: rgba(255, 255, 255, .10); --g-fill-hover: rgba(255, 255, 255, .18); --g-edge: rgba(255, 255, 255, .22);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 22px -12px rgba(0, 0, 0, .7);
  --g-ink: rgba(255, 255, 255, .94); --g-ink-fg: #0b0b10; --g-ink-edge: rgba(255, 255, 255, .6);
}
.paper {
  --text: #0b0b10; --text-2: #2a2a33; --muted: #565664; --line: rgba(11, 11, 16, .10); --line-strong: rgba(11, 11, 16, .26);
  --surface: #ffffff; --surface-2: #f1eff8; --surface-3: #e7e4f2;
  --primary-bg: #0b0b10; --primary-hover: #23232e; --primary-fg: #ffffff;
  --accent: #6a4cff; --accent-text: #4a30d9; --accent-soft: #ece8ff; --link: #4a30d9; --focus: #6a4cff;
  --gold: #6a4cff; --forest-600: #4a30d9; --moss: #565664;
  --ok: #0d6b45; --ok-soft: #e3f6ec; --warn: #7a5200; --warn-soft: #fbf0d0; --bad: #a3203a; --bad-soft: #fde8ee;
  --chalk: #0b0b10; --chalk-dim: #3a3a46; --chalk-gold: #4a30d9; --chalk-green: #0d6b45; --chalk-rose: #a3203a;
  --g-fill: rgba(255, 255, 255, .62); --g-fill-hover: rgba(244, 242, 255, .95); --g-edge: rgba(11, 11, 16, .14);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 8px 20px -12px rgba(40, 30, 90, .35), 0 1px 2px rgba(40, 30, 90, .08);
  --g-ink: rgba(11, 11, 16, .9); --g-ink-fg: #ffffff; --g-ink-edge: rgba(255, 255, 255, .22);
}

/* ================= 3. the page ================= */
html { background: var(--bg); }
/* the canvas colour lives on <html>, so the soft light field (a fixed layer behind everything) is visible through the transparent body */
:root:root:root body:not(.on-board) { background: transparent; background-image: none; }
:root:root:root body:not(.on-board)::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: normal; opacity: var(--field-opacity);
  background: radial-gradient(55% 38% at 4% 0%, var(--f1, rgba(255, 182, 220, .55)), transparent 70%), radial-gradient(50% 36% at 100% 2%, var(--f2, rgba(182, 216, 255, .5)), transparent 70%),
    radial-gradient(50% 36% at 100% 62%, var(--f3, rgba(182, 216, 255, .36)), transparent 72%), radial-gradient(60% 40% at 0% 100%, var(--f4, rgba(213, 198, 255, .42)), transparent 72%);
  inset: -8%; animation: fx-drift 26s ease-in-out infinite alternate;
}
:root:root:root body:not(.on-board)::after { display: none; }   /* the old chalk-dust noise */

/* ================= 4. type ================= */
.brand, .page-head h1, .section-head h2, .t-display, .t-title, .slate-title, .group > summary, .empty h3, .sheet h2, .room-head strong,
.ec-t, .rc-t, .scn-t, .quick-card strong, .stat-strip strong, .metric-row strong, .ring-num, .counts strong, .ladder .rung, .feat h3 {
  font-family: var(--au-display); font-weight: 800; letter-spacing: -.035em;
}
.brand em { font-style: normal; font-weight: 800; }
.eyebrow, .slate-eyebrow { font-family: var(--au-display); font-weight: 800; letter-spacing: .16em; }
/* English on the lesson surfaces: the heavy display face instead of the chalk handwriting */
.pw-en, .example .en, .opt .t, .answer, .formula .f, .vocab-list strong, .slate-prompt, .slate-fix, .slate-diff .was, .slate-diff .now, .pron-plain,
.bub--me p[lang="en"], .contrast .was, .contrast .now, .own-mistake .was, .own-mistake .now, .teach-back .was, .teach-back .now, .paper .formula .f {
  font-family: var(--au-display); font-weight: 700; letter-spacing: -.02em; text-shadow: none;
}
.paper .opt, .slate-input, .scn-answer .slate-input { font-family: var(--au-display); font-weight: 600; letter-spacing: -.01em; }
/* the teacher's long answers are read, not displayed: the plain text face at a normal weight */
.teacher .bubble { font-family: var(--font); font-weight: 400; letter-spacing: 0; }
.teacher .bubble::before, .typing i, .wave i, .room-head .status::before { background: var(--accent); }
.lesson .lead { font-family: var(--font); font-weight: 400; }

/* ================= 5. glass controls ================= */
.btn, .chip, .ob-chip, .pron-btn, .sound-toggle, .avatar, .tab { -webkit-tap-highlight-color: transparent; }
.btn { --h: 48px; border-radius: 999px; font-family: var(--au-display); font-weight: 700; letter-spacing: -.005em; }
.btn--secondary, .btn--ghost, .btn--danger, .chip, .paper .btn--secondary, .paper .btn--ghost, .scn-answer .btn--ghost, .hero .btn--secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 56%), var(--g-fill); border: 1px solid var(--g-edge); color: var(--text);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); box-shadow: var(--g-shadow);
}
.btn--secondary:hover:not(:disabled), .btn--ghost:hover:not(:disabled), .btn--danger:hover:not(:disabled), .chip:hover,
.paper .btn--secondary:hover, .paper .btn--ghost:hover { background: var(--g-fill-hover); border-color: var(--g-edge); transform: translateY(-1px); }
.btn--ghost { padding: 0 18px; color: var(--link); }
.btn--danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn--primary, .btn--accent, .btn.cta, .auth-card .btn--primary, .hero .btn--primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 54%), var(--g-ink); color: var(--g-ink-fg); border: 1px solid var(--g-ink-edge);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .26) inset, 0 12px 26px -14px rgba(11, 11, 16, .7), 0 2px 6px rgba(11, 11, 16, .18);
}
.btn--primary:hover:not(:disabled), .btn--accent:hover:not(:disabled), .btn.cta:hover:not(:disabled), .hero .btn--primary:hover:not(:disabled) {
  background: var(--primary-hover); color: var(--primary-fg); filter: none; transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .26) inset, 0 16px 30px -14px rgba(11, 11, 16, .75), 0 2px 6px rgba(11, 11, 16, .2);
}
.btn:active:not(:disabled), .btn--primary:active:not(:disabled), .btn.cta:active:not(:disabled), .chip:active { transform: translateY(1px) scale(.985); box-shadow: inset 0 2px 5px rgba(11, 11, 16, .22); }
.btn.cta { width: 100%; min-height: 56px; font-size: 1.05rem; border-radius: 999px; }
.btn.cta:disabled { opacity: .5; transform: none; }
.btn--sm { --h: 38px; }
.btn.is-loading::after { border-color: var(--g-ink-fg); border-top-color: transparent; }
.btn--secondary.is-loading::after, .btn--ghost.is-loading::after { border-color: var(--text); border-top-color: transparent; }
.chip { border-radius: 999px; min-height: 38px; font-family: var(--au-display); font-weight: 650; }
.chip[aria-pressed="true"], .chip.is-on { background: var(--g-ink); color: var(--g-ink-fg); border-color: var(--g-ink-edge); }
.btn:focus-visible, .chip:focus-visible, .ob-chip:focus-visible, .pron-btn:focus-visible, .tab:focus-visible, .topnav a:focus-visible, .sound-toggle:focus-visible,
.opt:focus-visible, .pword:focus-visible, details.more > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.link-btn { color: var(--link); }

/* first-visit choices and the listen buttons */
.ob-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--g-edge); color: var(--text); font: 650 .9rem var(--au-display);
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 56%), var(--g-fill); box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); transition: background .18s, color .18s, border-color .18s, transform .15s; }
.ob-chip:hover { border-color: var(--accent); background: var(--g-fill-hover); }
.ob-chip[aria-pressed="true"] { background: var(--g-ink); color: var(--g-ink-fg); border-color: var(--g-ink-edge); }
.pron-btn, .paper .pron-btn, .paper .example .pron-btn, .paper .contrast .pron-btn, .paper .answer .pron-btn { border-radius: 999px; border: 1px solid var(--g-edge); color: var(--text); font-family: var(--au-display);
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 56%), var(--g-fill); box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); }
.pron-btn:hover, .paper .pron-btn:hover { background: var(--g-fill-hover); }
.pron-btn.is-speaking { background: var(--g-ink); color: var(--g-ink-fg); border-color: var(--g-ink-edge); }
.pron-btn--ghost { border-color: var(--g-edge); }
.sound-toggle, .avatar { border: 1px solid var(--g-edge); color: var(--text); background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 56%), var(--g-fill); box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.5); }
.sound-toggle:hover, .avatar:hover { background: var(--g-fill-hover); }
.sound-toggle[aria-pressed="false"] { color: var(--muted); }
.avatar { font-family: var(--au-display); font-weight: 800; }

/* navigation: a glass header, a floating glass tab bar on phones, glass tabs on wide screens; the current page is a lit pill */
:root:root .appbar { background: color-mix(in srgb, var(--bg) 66%, transparent); border-bottom: 1px solid var(--line); box-shadow: none;
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); }
:root:root .tabbar { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); padding: 5px; gap: 2px;
  border: 1px solid var(--g-edge); border-radius: 999px; background: var(--g-bar); box-shadow: var(--g-shadow), 0 16px 34px -16px rgba(40, 30, 90, .5);
  -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.5); backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.5); }
.tab { min-height: 52px; border-radius: 999px; color: var(--text-2); font-family: var(--au-display); font-weight: 700; transition: background .2s, color .2s, transform .15s; }
.tab:hover { color: var(--text); background: var(--g-fill); }
.tab:active { transform: scale(.96); }
:root:root .tab[aria-current="page"] { color: var(--g-ink-fg); background: var(--g-ink); box-shadow: 0 8px 16px -8px rgba(11, 11, 16, .6); }
.tab[aria-current="page"]::before { display: none; }
.tab .count, .topnav .count { background: #6a4cff; color: #ffffff; }
@media (min-width: 960px) {
  .topnav { gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--g-edge); background: var(--g-fill); box-shadow: var(--g-shadow);
    -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); }
  .topnav a { border-radius: 999px; min-height: 40px; font-family: var(--au-display); font-weight: 700; color: var(--text-2); transition: background .2s, color .2s; }
  .topnav a:hover { background: var(--g-fill-hover); color: var(--text); }
  .topnav a[aria-current="page"] { background: var(--g-ink); color: var(--g-ink-fg); box-shadow: 0 8px 16px -8px rgba(11, 11, 16, .6); }
  .topnav a[aria-current="page"]::after { display: none; }
}
/* the sticky bars of a lesson hold only controls (previous / next, the answer field): dark glass over the lesson that scrolls under them */
.teach-nav, .answer-bar { border-radius: 24px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(16, 16, 24, .8); box-shadow: 0 18px 36px -16px rgba(11, 11, 16, .65);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); }
/* phones: in-flow controls sit on solid cards, so the blur would show nothing; only the bars keep it */
@media (max-width: 719px) {
  .btn--secondary, .btn--ghost, .btn--danger, .btn--primary, .btn--accent, .btn.cta, .chip, .ob-chip, .pron-btn, .paper .pron-btn, .sound-toggle, .avatar,
  .paper .btn--secondary, .paper .btn--ghost, .scn-answer .btn--ghost, .paper .example .pron-btn, .paper .contrast .pron-btn, .paper .answer .pron-btn, .auth-card .btn--primary,
  .hero .btn--primary, .hero .btn--secondary { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root:root .appbar { background: var(--bg); }
  :root:root .tabbar { background: var(--surface); }
  .teach-nav, .answer-bar { background: #101018; }
  .topnav { background: var(--surface); }
}

/* ================= 6. the two lesson surfaces ================= */
/* ink card */
.slate, .slate.hero-lesson, .slate.result, .slate.board-framed {
  color: var(--chalk); border: 1px solid rgba(255, 255, 255, .12); border-radius: 26px;
  background: radial-gradient(70% 60% at 100% 0%, rgba(213, 198, 255, .17), transparent 60%), radial-gradient(60% 55% at 0% 100%, rgba(182, 240, 214, .10), transparent 62%), linear-gradient(180deg, #17171f, #0e0e14);
  box-shadow: 0 26px 60px -30px rgba(40, 30, 90, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.slate.hero-lesson, .slate.result { padding: 26px 24px 26px; }
.slate::before { display: none; }
/* the recurring four-point spark, in the corner of the first card (it replaces the chalk tray) */
.slate.hero-lesson::after { content: ""; position: absolute; left: auto; right: 22px; top: 20px; bottom: auto; width: 22px; height: 22px; border-radius: 0; box-shadow: none;
  background: linear-gradient(135deg, #b6f0d6, #b6d8ff 55%, #d5c6ff); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.hero-lesson > .slate-eyebrow:first-child { padding-right: 40px; }
/* labels on ink are the iridescent gradient, as in the brand's dark slides: every stop is a light pastel, so it stays readable end to end */
.slate .slate-eyebrow { color: #d5c6ff; background: var(--au-holo); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.paper .slate-eyebrow, .paper .mission .slate-eyebrow { color: #4a30d9; background: none; -webkit-text-fill-color: currentColor; }
@media (forced-colors: active) { .slate .slate-eyebrow { background: none; -webkit-text-fill-color: currentColor; } }
.hero-lesson .slate-title.big { text-shadow: none; }
.progress-line strong { color: var(--chalk); font-family: var(--au-display); font-weight: 800; }
.slate-input { border-radius: 16px; border: 1.5px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .07); color: #ffffff; }
.slate-input:hover { border-color: rgba(255, 255, 255, .5); }
.slate-input:focus { border-color: #d5c6ff; background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 4px rgba(213, 198, 255, .28); }
.slate .btn--primary, .slate .btn.cta { background: var(--g-ink); color: var(--g-ink-fg); border-color: var(--g-ink-edge); }
.slate .btn--primary:hover:not(:disabled), .slate .btn.cta:hover:not(:disabled) { background: var(--primary-hover); color: var(--primary-fg); }
.slate .btn--ghost, .slate .btn--secondary { color: var(--text); }
.slate--ok { border-color: rgba(182, 240, 214, .75); } .slate--mid { border-color: rgba(244, 235, 180, .75); } .slate--bad { border-color: rgba(255, 182, 220, .75); }
.question.is-ok { border-color: rgba(182, 240, 214, .8); } .question.is-bad { border-color: rgba(255, 182, 220, .8); }
.result.good { border-color: rgba(213, 198, 255, .7); }
.cta { box-shadow: 0 1px 0 rgba(255, 255, 255, .26) inset, 0 14px 28px -14px rgba(11, 11, 16, .7); transition: transform .12s ease, box-shadow .18s ease, background .18s; }
.cta:active:not(:disabled) { transform: translateY(1px) scale(.985); box-shadow: inset 0 2px 5px rgba(11, 11, 16, .25); }
/* answers are lesson content: solid, never glass */
.opt { border-radius: 16px; border: 2px solid rgba(255, 255, 255, .3); background: #1c1c26; }
.opt:hover:not(:disabled) { border-color: #ffffff; background: #24242f; }
.opt[aria-pressed="true"] { border-color: #d5c6ff; background: #262338; box-shadow: 0 0 0 3px rgba(213, 198, 255, .28); }
.opt.is-right { border-color: #b6f0d6; background: #16271f; color: #b6f0d6; }
.opt.is-wrong { border-color: #ffb6dc; background: #2a1820; color: #ffb6dc; }
.tip { background: rgba(213, 198, 255, .14); border-radius: 14px; }
.formula { border: 2px dashed rgba(213, 198, 255, .55); border-radius: 14px; }
.example .tag { background: rgba(213, 198, 255, .18); color: var(--chalk-gold); border-radius: 999px; padding: 3px 10px; }
.contrast { border-radius: 14px; }
.pword:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2); }
.pword.is-speaking { background: rgba(213, 198, 255, .22); border-color: #d5c6ff; }
.wrong-item { border-radius: 14px; }
.ring-bar { stroke: #d5c6ff; }
.score-badge { border-radius: 999px; }
.score-badge.ok { background: var(--ok-soft); color: var(--ok); } .score-badge.mid { background: var(--warn-soft); color: var(--warn); } .score-badge.low { background: var(--bad-soft); color: var(--bad); }
.linklike:hover { background: var(--surface-2); border-radius: 12px; }
.quick-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
.quick-card:hover { border-color: var(--accent); }
.quick-card span { color: var(--text-2); } .quick-card .i { color: var(--accent-text); }
details.more > summary { color: var(--text-2); }

/* paper */
.paper { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-line); border-radius: 24px; box-shadow: 0 20px 44px -28px rgba(40, 30, 90, .5); }
.paper .pw-pt { color: #4a30d9; }
.paper .pword:hover { background: rgba(11, 11, 16, .06); border-color: rgba(11, 11, 16, .16); }
/* English inside the explanation: a small ink block */
.paper .example, .paper .contrast, .paper .formula, .paper .answer, .paper .own-mistake {
  background: #14141c; color: #f4f2ff; border: 0; border-radius: 16px; box-shadow: none; }
.paper .vocab-list li { background: #14141c; border: 0; border-radius: 14px; }
.bub--them { background: #14141c; border: 0; border-radius: 20px; color: #f4f2ff; }
.paper .example .pt, .paper .formula .n, .paper .vocab-list li > span { color: #c9c7dc; }
.paper .example .tag, .paper .contrast .mark { color: #d5c6ff; }
.paper .example .pw-en, .paper .contrast .pw-en, .paper .answer .pw-en, .paper .vocab-list .pw-en, .paper .vocab-list strong, .paper .formula .f { color: #f4f2ff; }
.paper .example .pw-pt, .paper .contrast .pw-pt, .paper .answer .pw-pt, .paper .vocab-list .pw-pt { color: #d5c6ff; }
.paper .example .pword:hover, .paper .contrast .pword:hover, .paper .answer .pword:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.paper .example .pron-notes > summary, .paper .example .pron-notes ul, .paper .contrast .pron-notes > summary, .paper .contrast .pron-notes ul { color: #c9c7dc; }
.paper .contrast .was { color: #ffb6dc; }
.paper .contrast .now p { color: #b6f0d6; }
.paper .dots li.past { background: #0d7a4f; } .paper .dots li.now { background: #6a4cff; }
.teach.paper .summary { background: #f3f0ff; border-left: 4px solid #6a4cff; border-radius: 0 12px 12px 0; }
.paper .opt { border: 2px solid rgba(11, 11, 16, .18); background: #ffffff; color: var(--paper-ink); border-radius: 16px; }
.paper .opt:hover:not(:disabled) { border-color: #6a4cff; background: #f6f4ff; }
.paper .opt.is-right { border-color: #0d7a4f; background: #e3f6ec; color: var(--paper-ink); } .paper .opt.is-right .st { color: #0b5d3b; }
.paper .opt.is-wrong { border-color: #c0344d; background: #fde8ee; color: var(--paper-ink); } .paper .opt.is-wrong .st { color: #8f1a31; }
.paper .chips li.ok { background: #e3f6ec; color: #0b5d3b; border: 1px solid #a7dcc0; }
.paper .chips li.bad { background: #fde8ee; color: #8f1a31; border: 1px solid #f0b3c1; }
.paper .scn-fix .now, .scn-fix .now, .cp-ok, .d-up { color: #0b5d3b; } .paper .scn-fix .was, .scn-fix .was, .cp-bad, .d-down { color: #8f1a31; }
.scn-answer .slate-input { background: #ffffff; color: var(--paper-ink); border: 1.5px solid rgba(11, 11, 16, .22); }
.scn-answer .slate-input:focus { border-color: #6a4cff; box-shadow: 0 0 0 4px rgba(106, 76, 255, .2); background: #ffffff; }
.honest { background: #f6f4ff; }
.paper .ms { background: #ffffff; border-color: var(--paper-line); }

/* ================= 7. the rest of the app ================= */
.panel, .group, .gate, .voice-panel, .exam-card, .scn, .ms, .composer, .quote { border-radius: 20px; }
.exam-card, .scn, .group, .gate { box-shadow: var(--shadow-2); }
.real-card { border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(255, 182, 220, .30), rgba(244, 235, 180, .26) 40%, rgba(182, 240, 214, .26) 70%, rgba(182, 216, 255, .30)), var(--surface); box-shadow: var(--shadow-2); }
.real-card:hover { border-color: var(--accent); background: linear-gradient(120deg, rgba(255, 182, 220, .42), rgba(244, 235, 180, .36) 40%, rgba(182, 240, 214, .36) 70%, rgba(182, 216, 255, .42)), var(--surface); }
.real-card > .i { stroke: var(--accent-text); }
.exam-card.is-due, .scn--rec { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent); }
.scn:hover { border-color: var(--accent); }
.goal-bar li.is-done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.goal-bar li.is-done .gb-dot { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.bar { background: var(--surface-3); border-radius: 999px; }
.paper .bar { background: rgba(11, 11, 16, .13); }
.bar > i { border-radius: 999px; }
.input, .textarea, .select { border-radius: 14px; }
.choice { border-radius: 16px; }
.student .bubble { border-radius: 18px 18px 4px 18px; }
.toast { background: #15151d; color: #f4f2ff; border: 1px solid rgba(255, 255, 255, .14); border-left: 3px solid #b6f0d6; border-radius: 16px; }
.toast--bad { border-left-color: #ffb6dc; }
.toast .link-btn { color: #d5c6ff; }
.backdrop { background: rgb(11 11 16 / .55); }
.sheet { border-radius: 24px 24px 0 0; }
.rule { background: var(--accent); }
.count-pill { border-radius: 999px; }
.badge { border-radius: 999px; padding: 3px 10px; }
.callout { border-radius: 16px; }
.concept { border-radius: 999px; }
.rec-btn { box-shadow: 0 12px 24px -12px rgba(11, 11, 16, .6); }

@media (prefers-reduced-motion: reduce) { .btn, .tab, .topnav a, .chip, .ob-chip, .cta { transition: none; } .btn:hover, .chip:hover { transform: none; } }

/* ================= 8. the audio player bar ================= */
/* a control surface (glass), floating above the tab bar; it shows only while something is read aloud, and never covers lesson text for long */
.audio-dock { position: fixed; z-index: 35; left: 50%; translate: -50% 0;   /* translate, not transform: the entrance animation animates transform */ bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 24px); padding: 6px 6px 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(16, 16, 24, .84); color: #f4f2ff; box-shadow: 0 18px 36px -16px rgba(11, 11, 16, .7);
  -webkit-backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); backdrop-filter: blur(var(--glass-blur, 14px)) saturate(1.4); animation: rise .2s ease-out; }
@media (min-width: 960px) { .audio-dock { bottom: 24px; } }
.audio-dock.hidden { display: none; }
.ad-label { font: 650 .82rem var(--au-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.audio-dock[data-state="note"] .ad-label { white-space: normal; max-width: 70vw; }
.audio-dock[data-state="note"] .ad-btn:not(.ad-close) { display: none; }
.ad-btn { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1); color: #f4f2ff; font: 700 .8rem var(--au-display); cursor: pointer; transition: background .15s, transform .12s; }
.ad-btn:hover { background: rgba(255, 255, 255, .2); }
.ad-btn:active { transform: scale(.94); }
.ad-btn:focus-visible { outline: 3px solid #d5c6ff; outline-offset: 2px; }
.ad-btn.hidden { display: none; }
.ad-wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.ad-wave i { width: 3px; height: 5px; border-radius: 2px; background: #b6f0d6; animation: adwave .9s ease-in-out infinite; }
.ad-wave i:nth-child(2) { animation-delay: .15s; } .ad-wave i:nth-child(3) { animation-delay: .3s; }
.audio-dock[data-state="paused"] .ad-wave i, .audio-dock[data-state="note"] .ad-wave i { animation: none; height: 5px; }
@keyframes adwave { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .ad-wave i { animation: none; height: 8px; } .audio-dock { animation: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .audio-dock { background: #101018; } }

/* ================= 9. listening ================= */
.listening { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 90px); }
.listen-player { gap: 14px; }
.listen-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.listen-actions .cta { flex: 1 1 220px; width: auto; }
.listen-player .chips { gap: 6px; }
.listen-player .label { color: var(--chalk-dim); font-size: .82rem; }
.lq { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.lq + .lq { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--paper-line); }
.lq-p { padding: 0; font: 700 1rem/1.45 var(--au-display); color: var(--paper-ink); letter-spacing: -.01em; }
.gap-line { margin: 0; padding: 12px 14px; border-radius: 14px; background: #14141c; color: #f4f2ff; font: 650 1.05rem/1.5 var(--au-display); }
.lr { display: grid; gap: 4px; padding: 12px 14px 12px 16px; border-radius: 14px; border-left: 4px solid; }
.lr + .lr { margin-top: 10px; }
.lr--ok { border-color: #0d7a4f; background: #e9f7f0; }
.lr--bad { border-color: #c0344d; background: #fdecf1; }
.lr-q { margin: 0; font-weight: 700; color: var(--paper-ink); }
.lr-a { margin: 0; color: var(--paper-ink-2); }
.lr .t-small { color: var(--paper-ink-2); }
.transcript { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.transcript li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #14141c; color: #f4f2ff; }
.transcript .who { font: 800 .7rem var(--au-display); letter-spacing: .12em; text-transform: uppercase; color: #d5c6ff; }
.transcript [lang="en"] { font: 650 1.02rem/1.45 var(--au-display); }
.transcript .pron-btn { --g-fill: rgba(255,255,255,.1); --g-edge: rgba(255,255,255,.22); --text: #f4f2ff; }
.paper .vocab-list li .pron-btn { --g-fill: rgba(255,255,255,.1); --g-edge: rgba(255,255,255,.22); --text: #f4f2ff; margin-left: auto; }
.pron-btn--line { justify-self: start; }
@media (max-width: 420px) { .transcript li { grid-template-columns: 1fr auto; } .transcript .who { grid-column: 1 / -1; } }

/* a heading that receives focus programmatically (so screen readers start there) is not a control: no focus ring on it */
:is(h1, h2, .slate-title)[tabindex="-1"]:focus { outline: none; }

/* ================= 10. activity and exam screens: clearer hierarchy, cleaner states ================= */
/* progress: ten steps, done = iridescent, current = bright with a soft glow, ahead = faint */
.seg { gap: 5px; }
.seg li { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.seg li.right, .seg li.wrong { background: linear-gradient(90deg, #b6f0d6, #b6d8ff); }
.seg li.wrong { background: linear-gradient(90deg, #ffb6dc, #ffd6ad); }
.seg li.now { background: #ffffff; box-shadow: 0 0 0 3px rgba(213, 198, 255, .35); }
.question .slate-prompt { font-size: 1.45rem; line-height: 1.3; letter-spacing: -.03em; font-weight: 800; }
.question .score-live { font: 700 .8rem var(--au-display); color: var(--chalk-dim); }

/* answer options: roomy cards; the letter is a chip that fills when chosen */
.opts { gap: 12px; }
.opt { min-height: 64px; padding: 12px 16px; border-radius: 18px; grid-template-columns: 38px 1fr auto; gap: 12px; transition: transform .15s, border-color .15s, background .15s, box-shadow .15s; }
.opt .t { font: 700 1.1rem/1.35 var(--au-display); letter-spacing: -.015em; }
.opt .L { width: 34px; height: 34px; border-width: 2px; font: 800 .9rem var(--au-display); transition: background .15s, color .15s, border-color .15s; }
.opt:hover:not(:disabled) { transform: translateY(-2px); }
.opt[aria-pressed="true"] .L { background: #d5c6ff; color: #0b0b10; border-color: #d5c6ff; }
.opt.is-right .L { background: #b6f0d6; color: #0b0b10; border-color: #b6f0d6; }
.opt.is-wrong .L { background: #ffb6dc; color: #0b0b10; border-color: #ffb6dc; }
.paper .opt .L { border-color: rgba(11, 11, 16, .45); }
.paper .opt[aria-pressed="true"] .L { background: #6a4cff; color: #fff; border-color: #6a4cff; }

/* the confirm bar: a clean disabled state (was a muddy tint), a lit one when ready */
.answer-bar { padding: 8px; border-radius: 28px; }
.answer-bar .btn, .teach-nav .btn.cta { min-height: 54px; }
.btn.cta:disabled, .btn--primary:disabled { opacity: 1; background: rgba(255, 255, 255, .12); color: rgba(244, 242, 255, .55); border-color: rgba(255, 255, 255, .16); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.cta:not(:disabled) { background: linear-gradient(135deg, #ffffff, #efeaff 55%, #e3f8ef); color: #0b0b10; box-shadow: 0 1px 0 #fff inset, 0 14px 30px -12px rgba(213, 198, 255, .75); }

/* feedback after an answer */
.feedback { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 14px; gap: 14px; }
.verdict-row { font: 800 1.2rem var(--au-display); letter-spacing: -.02em; }
.question.is-ok { box-shadow: 0 0 0 1px rgba(182, 240, 214, .6), 0 26px 60px -28px rgba(182, 240, 214, .45); }
.question.is-bad { box-shadow: 0 0 0 1px rgba(255, 182, 220, .6), 0 26px 60px -28px rgba(255, 182, 220, .4); }

/* exam: the card on the home screen and the result */
.exam-card { border-radius: 24px; padding: 20px 22px; border: 1px solid var(--line); background: var(--surface); }
.exam-card.is-due { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #ffb6dc, #f4ebb4, #b6f0d6, #b6d8ff, #d5c6ff) border-box; box-shadow: 0 24px 50px -28px rgba(106, 76, 255, .5); }
.ec-t { font-size: 1.25rem; }
.result .ring-num { font: 800 2.4rem var(--au-display); letter-spacing: -.04em; }
.chips li { border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .opt, .opt .L { transition: none; } }


/* ================= 11. glow up: colour themes and effects ================= */
/* colour themes: only the accent family and the soft background field change; light/dark stays a separate choice */
:root[data-palette="ocean"]  { --accent: #1f7ae0; --accent-text: #135bb0; --accent-soft: #e2efff; --link: #135bb0; --focus: #1f7ae0; --gold: #1f7ae0; --forest-600: #135bb0;
  --f1: rgba(127, 216, 255, .55); --f2: rgba(150, 240, 230, .45); --f3: rgba(160, 190, 255, .4); --f4: rgba(140, 220, 255, .4); }
:root[data-palette="sunset"] { --accent: #e0573a; --accent-text: #b23d22; --accent-soft: #ffe9e1; --link: #b23d22; --focus: #e0573a; --gold: #e0573a; --forest-600: #b23d22;
  --f1: rgba(255, 190, 150, .6); --f2: rgba(255, 220, 140, .5); --f3: rgba(255, 160, 190, .38); --f4: rgba(255, 200, 170, .45); }
:root[data-palette="orchid"] { --accent: #c2389b; --accent-text: #98207a; --accent-soft: #fde6f4; --link: #98207a; --focus: #c2389b; --gold: #c2389b; --forest-600: #98207a;
  --f1: rgba(255, 170, 220, .6); --f2: rgba(220, 180, 255, .5); --f3: rgba(255, 190, 230, .36); --f4: rgba(200, 170, 255, .45); }
:root[data-theme="dark"][data-palette="ocean"]  { --accent: #7fc4ff; --accent-text: #a6d6ff; --accent-soft: #10243a; --link: #a6d6ff; --focus: #a6d6ff; --gold: #7fc4ff; --forest-600: #7fc4ff; }
:root[data-theme="dark"][data-palette="sunset"] { --accent: #ffa384; --accent-text: #ffbea6; --accent-soft: #3a1d14; --link: #ffbea6; --focus: #ffbea6; --gold: #ffa384; --forest-600: #ffa384; }
:root[data-theme="dark"][data-palette="orchid"] { --accent: #ff9bdc; --accent-text: #ffb8e6; --accent-soft: #3a1630; --link: #ffb8e6; --focus: #ffb8e6; --gold: #ff9bdc; --forest-600: #ff9bdc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme])[data-palette="ocean"]  { --accent: #7fc4ff; --accent-text: #a6d6ff; --accent-soft: #10243a; --link: #a6d6ff; --focus: #a6d6ff; --gold: #7fc4ff; --forest-600: #7fc4ff; }
  :root:not([data-theme])[data-palette="sunset"] { --accent: #ffa384; --accent-text: #ffbea6; --accent-soft: #3a1d14; --link: #ffbea6; --focus: #ffbea6; --gold: #ffa384; --forest-600: #ffa384; }
  :root:not([data-theme])[data-palette="orchid"] { --accent: #ff9bdc; --accent-text: #ffb8e6; --accent-soft: #3a1630; --link: #ffb8e6; --focus: #ffb8e6; --gold: #ff9bdc; --forest-600: #ff9bdc; }
}
.palette-title { margin: 18px 0 8px; font-size: .95rem; color: var(--text-2); }
.swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong); }
.swatch--aurora { background: conic-gradient(#6a4cff, #ff8fc8, #7fd8ff, #6a4cff); }
.swatch--ocean  { background: conic-gradient(#1f7ae0, #7fd8ff, #5fe0c8, #1f7ae0); }
.swatch--sunset { background: conic-gradient(#e0573a, #ffd27a, #ff8fa8, #e0573a); }
.swatch--orchid { background: conic-gradient(#c2389b, #d5b0ff, #ff9bdc, #c2389b); }

/* the background field breathes very slowly */
@keyframes fx-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(2%, 1.5%, 0) scale(1.06); } }

/* each new screen: its blocks rise in one after the other */
@keyframes fx-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fx-in { animation: fx-rise .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--fx-i, 0) * 45ms); }

/* a light sweep across the main action buttons */
.btn.cta:not(:disabled), .btn--primary:not(:disabled) { position: relative; overflow: hidden; isolation: isolate; }
.btn.cta:not(:disabled)::after, .btn--primary:not(:disabled)::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%); transform: translateX(-120%);
}
.btn.cta:not(:disabled):hover::after, .btn--primary:not(:disabled):hover::after, .btn.cta:not(:disabled):focus-visible::after { transition: transform .7s ease; transform: translateX(120%); }

/* cards lift a little under the pointer */
@media (hover: hover) { .card { transition: transform .25s ease, box-shadow .25s ease; } .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); } }

/* effects layer: "+1" on a right answer, confetti on a high score */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.fx-plus { position: absolute; transform: translate(-50%, -50%); font-weight: 800; font-size: 1.15rem; color: var(--accent-text);
  text-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 45%, transparent); animation: fx-plus .9s ease-out forwards; }
@keyframes fx-plus { from { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 25% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } to { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.fx-confetti { position: absolute; top: 30vh; width: 8px; height: 12px; border-radius: 2px; animation: fx-confetti 1.7s cubic-bezier(.15, .6, .4, 1) both; }
@keyframes fx-confetti { from { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); } 80% { opacity: 1; } to { opacity: 0; transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--r)); } }

@media (prefers-reduced-motion: reduce) {
  :root:root:root body:not(.on-board)::before { animation: none; }
  .fx-in, .fx-plus, .fx-confetti { animation: none; }
  .card:hover { transform: none; }
}
