/* ═══════════════════════════════════════════════════════════
   portal.css — marketing/portal design system.
   Separate from courses' shared.css (which stays as-is).
   Phase 1 ships auth styling; landing/dashboard styles land in phase 5.
   ─────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════
   Unified IT Playbook design tokens — SAME vocabulary + values as
   shared.css (courses). Light is the default (:root); dark overrides
   in [data-theme="dark"]. Brand accents (violet #7C3AED / blue
   #4285F4 / cyan) are constant across themes.
   ─────────────────────────────────────────────────────────── */
:root {
  /* ---- Fonts ---- */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body:    "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Brand (constant across themes) ---- */
  --accent-violet:#7c3aed; --accent-blue:#4285f4; --accent-cyan:#15b6cf;
  --grad-brand: linear-gradient(135deg,#7c3aed 0%,#4285f4 100%);
  --grad-audio: linear-gradient(90deg,#15b6cf,#4285f4);
  --glow-primary: 0 0 0 1px rgba(124,58,237,.35), 0 10px 44px -8px rgba(124,58,237,.42);

  /* ---- Surfaces / text / borders (LIGHT) ---- */
  --bg:#f6f7fb; --bg-deep:#eef0f6; --bg-raised:#ffffff; --surface:#ffffff; --surface-hover:#f1f3f9;
  --fg:#0c1018; --fg-muted:#4a5365; --fg-subtle:#5b6478;
  --border:rgba(12,16,24,.10); --border-strong:rgba(12,16,24,.18); --border-bright:rgba(124,58,237,.45);
  --primary:#4285f4; --primary-hover:#3b78e0; --primary-press:#2f66c8; --on-primary:#ffffff;

  /* ---- Radii / spacing ---- */
  --r-xs:6px; --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:22px; --r-2xl:28px; --r-pill:999px;
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px;
  --s-8:32px; --s-10:40px; --s-12:48px; --s-16:64px; --s-20:80px; --s-24:96px;
  /* ---- Elevation (LIGHT) ---- */
  --shadow-sm:0 1px 2px rgba(20,30,60,.08);
  --shadow-md:0 6px 18px -6px rgba(20,30,60,.14);
  --shadow-lg:0 20px 50px -16px rgba(20,30,60,.22);
  --shadow-card:0 1px 0 rgba(255,255,255,.7) inset,0 14px 34px -20px rgba(20,30,60,.30);
  /* ---- Motion ---- */
  --ease-out:cubic-bezier(.2,.7,.2,1); --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --dur-fast:.14s; --dur:.24s; --dur-slow:.5s;
  /* ---- Themed scrollbar (LIGHT) ---- */
  --sb-track:var(--bg-deep); --sb-thumb:var(--border-strong); --sb-thumb-hover:var(--fg-subtle);
  /* ---- Landing helpers ---- */
  --grid-line:rgba(124,58,237,.06); --success:#16a34a; --cyan-ink:#0f7c8c; --warning:#d9a200; --amber-ink:#9a6b00; --danger:#e5484d;
  /* ---- Reading scale (text-size control, Phase 4) ---- */
  --reading-scale:1;

  /* ---- Legacy portal aliases (mapped onto the unified tokens) ---- */
  --p-bg:      var(--bg);
  --p-bg-soft: var(--bg-deep);
  --p-card:    var(--surface);
  --p-bd:      var(--border);
  --p-tx:      var(--fg);
  --p-tx2:     var(--fg-muted);
  --p-accent:  var(--primary);
  --p-accent2: var(--accent-violet);
  --p-accent3: var(--accent-cyan);
  --p-radius:  var(--r-lg);
  --p-fn:      var(--font-body);
}

/* Dark is the DEFAULT theme: applies unless the user explicitly picks light.
   data-theme="dark" still matches, so the toggle + component rules keep working. */
:root:not([data-theme="light"]) {
  --accent-cyan:#22d3ee;
  --grad-audio: linear-gradient(90deg,#22d3ee,#6e8bff);
  --bg:#0b0e16; --bg-deep:#07090e; --bg-raised:#11141e; --surface:#1b2030; --surface-hover:#232a3c;
  --fg:#eef1f8; --fg-muted:#98a2b8; --fg-subtle:#79839a;
  --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.15); --border-bright:rgba(124,58,237,.55);
  --primary:#6e8bff; --primary-hover:#8aa0ff; --primary-press:#5572f0; --on-primary:#0a0c12;
  --grid-line:rgba(255,255,255,.04); --success:#34d399; --cyan-ink:#38e0ec; --warning:#f6c453; --amber-ink:#f6c453; --danger:#fb7185;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 6px 18px -6px rgba(0,0,0,.55);
  --shadow-lg:0 20px 50px -16px rgba(0,0,0,.7);
  --shadow-card:0 1px 0 rgba(255,255,255,.04) inset,0 12px 32px -16px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* keep the attribute authoritative even when a class sets display */

/* ── Themed scrollbars (follow light/dark) ──────────────── */
html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) var(--sb-track); scroll-behavior: smooth; }
/* in-page anchor jumps clear the fixed header instead of hiding behind it */
section[id], [id].scroll-anchor { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--sb-track); }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 7px; border: 3px solid var(--sb-track); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: padding-box; }

body.portal {
  margin: 0;
  min-height: 100vh;
  font-family: var(--p-fn);
  color: var(--p-tx);
  /* brand violet/blue glows; --glow-a/--glow-b strengthen on dark */
  --glow-a: rgba(124,58,237,.10);
  --glow-b: rgba(66,133,244,.09);
  background:
    radial-gradient(1200px 600px at 15% -10%, var(--glow-a), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, var(--glow-b), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body.portal {
  --glow-a: rgba(124,58,237,.24);
  --glow-b: rgba(66,133,244,.20);
}

/* ── Auth page ──────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)) , var(--p-card);
  border: 1px solid var(--p-bd);
  border-radius: var(--p-radius);
  padding: 40px 36px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
  margin-bottom: 28px;
}
.auth-brand .brand-mark { height: 27px; width: auto; display: block; }

.auth-card h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.auth-card .sub {
  color: var(--p-tx2);
  font-size: 14px;
  margin: 0 0 28px;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: #1f2330;
  background: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-google:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(0,0,0,.5); }
.btn-google:active { transform: translateY(0); }
.btn-google svg { width: 20px; height: 20px; }

.auth-msg { margin-top: 18px; font-size: 13px; color: var(--p-tx2); min-height: 18px; }
.auth-msg.err { color: #fca5a5; }

/* signed-in panel */
.auth-user { display: none; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-user img { width: 48px; height: 48px; border-radius: 50%; }
.auth-user .nm { font-weight: 600; }
.auth-user .em { color: var(--p-tx2); font-size: 13px; }

/* auth-card sign-out button (scoped so its full-width style doesn't leak to
   the landing's .btn-ghost) */
.auth-card .btn-ghost {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  font: inherit; font-weight: 600;
  color: var(--p-tx2);
  background: transparent;
  border: 1px solid var(--p-bd);
  border-radius: 12px;
  cursor: pointer;
}
.auth-card .btn-ghost:hover { color: var(--p-tx); border-color: var(--p-accent); }

#btn-signout { display: none; }
body.signed-in .auth-signin { display: none; }
body.signed-in .auth-user   { display: flex; }
body.signed-in #btn-signout { display: block; }

/* ═══════════════════════════════════════════════════════════
   LANDING (/academy)
   ─────────────────────────────────────────────────────────── */
body.landing { scroll-behavior: smooth; }
/* the landing's hero provides its own violet glow under the slogan, so drop the
   page-level ambient blobs (top-left violet / right blue) here */
body.landing { background: var(--bg); }
/* signed-in visitors are redirected to the dashboard; hide the marketing page
   until auth confirms so they never see a flash of it (anon never hides). */
html.auth-pending body.landing { visibility: hidden; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-primary { color: var(--on-primary); background: var(--primary); box-shadow: 0 10px 26px -10px rgba(66,133,244,.55); }
.btn-primary:hover { transform: translateY(-2px); background: var(--primary-hover); box-shadow: 0 16px 36px -12px rgba(66,133,244,.6); }
/* brand gradient CTA — the signature violet→blue */
.btn-grad { color: #fff; background: var(--grad-brand); box-shadow: 0 12px 30px -12px rgba(124,58,237,.5); }
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -14px rgba(124,58,237,.6); }
.btn-ghost { color: var(--fg); background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); transform: translateY(-2px); }
.btn-ghost-sm { font-size: 14px; padding: 8px 15px; border-radius: var(--r-pill); color: var(--fg); background: var(--surface); border: 1px solid var(--border-strong); cursor: pointer; text-decoration: none; transition: border-color var(--dur-fast), color var(--dur-fast); }
.btn-ghost-sm:hover { border-color: var(--primary); }
.btn-block { display: flex; width: 100%; }

/* nav — transparent over hero, theme-matched bg once scrolled */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 13px clamp(18px, 4vw, 56px);
  transition: background var(--dur), border-color var(--dur), backdrop-filter var(--dur), box-shadow var(--dur);
  border-bottom: 1px solid transparent;
}
.nav-brand { justify-self: start; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom-color: var(--border); box-shadow: 0 10px 30px -22px rgba(20,30,60,.22); }
[data-theme="dark"] .nav.scrolled { box-shadow: 0 10px 30px -22px rgba(0,0,0,.9); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
.nav-brand .brand-mark { height: 23px; width: auto; display: block; }
.nav-links { display: flex; gap: 26px; justify-self: center; }
.nav-links a { color: var(--fg-muted); text-decoration: none; font-weight: 500; font-size: 15px; transition: color var(--dur-fast); }
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; align-items: center; gap: 10px; justify-self: end; }
/* Info pages (Support/FAQ/About): no centre links — brand left, theme+user right. */
.nav.nav-min { grid-template-columns: 1fr auto; }
.nav-theme { width: 38px; height: 38px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color var(--dur), border-color var(--dur); flex-shrink: 0; }
.nav-theme:hover { color: var(--fg); border-color: var(--primary); }
.nav-theme .ic-sun { display: none; }
[data-theme="dark"] .nav-theme .ic-sun { display: block; }
[data-theme="dark"] .nav-theme .ic-moon { display: none; }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer; flex-shrink: 0; }
.nav-burger span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* hero — centered, blueprint grid + soft violet/blue radial (both themes) */
/* full-bleed: override the generic `section { max-width: 1180px }` so the grid
   + glow reach the screen edges (the inner content stays centred via .hero-inner) */
.hero { position: relative; overflow: hidden; max-width: none; width: 100%; padding: clamp(112px, 16vh, 184px) clamp(18px,5vw,64px) clamp(60px,9vh,92px); text-align: center; border-bottom: 1px solid var(--border); }
.blueprint { background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 48px 48px; }
/* single soft violet pool, centred horizontally and sitting under the slogan
   (no second/blue blob, contained width so it never reaches the edges) */
.hero-glow {
  position: absolute; left: 50%; top: 10px; width: min(1240px, 96vw); height: 900px;
  transform: translateX(-50%) translateY(var(--py, 0px)); pointer-events: none; z-index: 0; will-change: transform;
  background: radial-gradient(closest-side, rgba(124,58,237,.18), transparent 72%);
  filter: blur(52px);
}
[data-theme="dark"] .hero-glow {
  background: radial-gradient(closest-side, rgba(124,58,237,.38), transparent 72%);
}

/* faint neon lines that crawl across the hero (h = left↔right, v = up↕down).
   Barely visible (low opacity) with a soft neon glow; JS reshuffles their
   position each loop so they appear in random places. */
.hero-lines { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-lines i { position: absolute; display: block; opacity: 0; filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 2px currentColor); }
.hero-lines .hl-h { height: 1px; width: 38%; background: linear-gradient(90deg, transparent, currentColor, transparent); }
.hero-lines .hl-v { width: 1px; height: 40%; background: linear-gradient(180deg, transparent, currentColor, transparent); }
.hero-lines .l1 { top: 18%; color: #22d3ee; }
.hero-lines .l2 { top: 50%; color: #6e8bff; }
.hero-lines .l3 { top: 78%; color: #a15eff; }
.hero-lines .l4 { left: 24%; color: #22d3ee; }
.hero-lines .l5 { left: 72%; color: #6e8bff; }
@media (prefers-reduced-motion: no-preference) {
  .hero-lines .l1 { animation: lineX 9s linear infinite; }
  .hero-lines .l2 { animation: lineXrev 11s linear infinite 1.2s; }
  .hero-lines .l3 { animation: lineX 13s linear infinite 2.4s; }
  .hero-lines .l4 { animation: lineY 10s linear infinite .6s; }
  .hero-lines .l5 { animation: lineYrev 12s linear infinite 1.8s; }
}
@keyframes lineX    { 0% { transform: translateX(-60vw); opacity: 0; } 12% { opacity: .42; } 88% { opacity: .42; } 100% { transform: translateX(150vw); opacity: 0; } }
@keyframes lineXrev { 0% { transform: translateX(150vw); opacity: 0; } 12% { opacity: .38; } 88% { opacity: .38; } 100% { transform: translateX(-60vw); opacity: 0; } }
@keyframes lineY    { 0% { transform: translateY(-70vh); opacity: 0; } 12% { opacity: .36; } 88% { opacity: .36; } 100% { transform: translateY(130vh); opacity: 0; } }
@keyframes lineYrev { 0% { transform: translateY(130vh); opacity: 0; } 12% { opacity: .34; } 88% { opacity: .34; } 100% { transform: translateY(-70vh); opacity: 0; } }
.hero-inner { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--fg-muted);
}
.eyebrow .tick { width: 22px; height: 1px; background: var(--border-strong); }
/* hero eyebrow: one size smaller, no leading tick */
/* hero eyebrow: one size smaller, text at 75% opacity (color-mix keeps the
   reveal fade working, unlike the `opacity` property) */
.hero-eyebrow { font-size: 10px; color: color-mix(in srgb, var(--fg-muted) 75%, transparent); }
.hero h1 { font-family: var(--font-display); font-size: clamp(40px, 7.4vw, 84px); line-height: 1.0; margin: 20px 0 0; font-weight: 800; letter-spacing: -.035em; color: var(--fg); }
.hero h1 .hb-line { display: block; will-change: transform; }
/* per-line size hierarchy (em-relative so it scales with the responsive h1):
   top line largest, middle smallest, bottom in between. */
.hero h1 .hb-l1 { font-size: 1.12em; }
.hero h1 .hb-l2 { font-size: .82em; }
.hero h1 .hb-l3 { font-size: .96em; }
/* brand gradient text with a seamless left→right looping flow. The 3-stop
   gradient starts and ends on the same colour, so tiling at 200% size loops
   with no visible seam. */
.grad-text {
  background: linear-gradient(90deg, #7c3aed, #4285f4, #7c3aed);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradFlow 4.5s linear infinite;
}
@keyframes gradFlow {
  from { background-position: 200% 50%; }
  to   { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .grad-text { animation: none; }
}
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--fg-muted); max-width: 580px; line-height: 1.6; margin: 24px auto 0; }
.lead em { font-style: italic; color: var(--cyan-ink); }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 44px; }
.hero-actions .btn { flex: none; width: 230px; white-space: nowrap; }
.hero-stats { display: flex; justify-content: center; align-items: center; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .st { display: flex; flex-direction: column; align-items: center; }
.hero-stats b { font-family: var(--font-display); font-size: clamp(28px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--fg); }
.hero-stats span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); margin-top: 7px; }
.hero-stats .sep { width: 1px; height: 36px; background: var(--border); }

/* currency strip — the differentiator (every course reviewed & updated monthly) */
.stat-currency {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 20px;
  width: max-content; max-width: min(680px, 94vw); margin: 18px auto 0;
  padding: 9px 18px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--accent-cyan) 30%, var(--border));
  background: color-mix(in srgb, var(--accent-cyan) 7%, var(--surface));
}
.stat-currency .sc-seg { display: inline-flex; align-items: center; gap: 9px; }
.stat-currency .sc-ic { color: var(--accent-cyan); flex: none; }
.stat-currency .sc-ic.sc-spin { animation: scSpin 6s linear infinite; transform-origin: 50% 50%; }
.stat-currency .sc-txt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .01em; color: var(--fg); line-height: 1.5; }
.stat-currency .sc-txt b { font-weight: 600; color: var(--fg); }
.stat-currency .sc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-cyan); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-cyan) 55%, transparent); animation: scPulse 2.2s ease-out infinite; }
@keyframes scPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-cyan) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes scSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stat-currency .sc-dot, .stat-currency .sc-ic.sc-spin { animation: none; } }

/* final-CTA category rail — moved from the hero eyebrow; wraps to ≤2 lines on mobile */
.finalcta p.cta-rail {
  font-family: var(--font-mono); font-size: clamp(10px, 2.3vw, 12px);
  letter-spacing: .12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--fg-muted) 72%, transparent);
  max-width: 580px; margin: 16px auto 0; padding: 0 6px;
  line-height: 1.8; text-wrap: balance;
}
/* mobile: tighten size + tracking so the 9-category rail stays ≤2 lines and
   never overflows the viewport (holds at 360px and 380px) */
@media (max-width: 600px) {
  .finalcta p.cta-rail { font-size: 9.5px; letter-spacing: .03em; max-width: 94vw; line-height: 1.9; }
}

/* topics marquee — auto-scroll with edge fade-mask */
.marquee-wrap { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-deep); padding: 20px 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-label { text-align: center; margin-bottom: 14px; }
.marquee-label .eyebrow { justify-content: center; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; gap: 12px; padding-right: 12px; flex: 0 0 auto; }
.topic-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); white-space: nowrap; color: var(--fg-muted); font-size: 14px; font-weight: 600; }
.topic-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }
[data-theme="light"] .topic-chip { border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(20,30,60,.06); }

/* sections */
section { padding: clamp(60px,9vh,92px) clamp(18px,5vw,64px); max-width: 1180px; margin: 0 auto; }
.section-head { margin-bottom: 38px; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(28px, 3.8vw, 44px); margin: 0 0 10px; font-weight: 700; letter-spacing: -.025em; color: var(--fg); }
.section-head .sub { color: var(--fg-muted); font-size: 17px; line-height: 1.6; margin: 0; }
.section-head .sub em { font-style: italic; color: var(--cyan-ink); }

/* course toolbar: filter + sort */
.course-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.course-search { flex: 1 1 240px; min-width: 0; padding: 11px 16px; font: inherit; font-size: 15px; color: var(--fg);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill); outline: none; transition: border-color var(--dur), box-shadow var(--dur); }
.course-search::placeholder { color: var(--fg-subtle); }
.course-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.course-sort-wrap { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-muted); font-size: 14px; }
.course-sort { font: inherit; font-size: 14px; font-weight: 600; color: var(--fg); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 10px 14px; cursor: pointer; outline: none; transition: border-color var(--dur); }
.course-sort:hover, .course-sort:focus { border-color: var(--primary); }
.course-empty { color: var(--fg-muted); text-align: center; padding: 24px 0; }

/* course cards — gradient cap header + body + meta */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .course-grid { grid-template-columns: 1fr; } }
.course-card[hidden] { display: none; }
.course-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; text-decoration: none; color: var(--fg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur), box-shadow var(--dur);
}
.course-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.cc-cap { height: 104px; position: relative; display: flex; align-items: flex-end; padding: 12px 14px; overflow: hidden; }
/* faint white grid on the coloured cap */
.cc-cap::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 24px 24px; }
.cc-cap::after { content: ""; position: absolute; inset: 0; background: radial-gradient(140px 90px at 82% 18%, rgba(255,255,255,.28), transparent 70%); }
.cc-cap-tag { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.95); font-weight: 600; }
/* Bright "New" badge — top-right of the cap for a few days after release
   (window in isNewRelease, portal.js). High-contrast amber so it pops on any
   topic-gradient cap. */
.cc-new { position: relative; z-index: 1; margin-left: auto; align-self: flex-start; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #221a02; background: #facc15; border-radius: var(--r-pill); padding: 3px 9px; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 10px rgba(250,204,21,.55); }
.cc-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.course-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
.cc-blurb { font-size: 13.5px; color: var(--fg-muted); line-height: 1.5; margin: 0; flex: 1; }
.cc-meta { display: flex; gap: 12px; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); flex-wrap: wrap; }
.cc-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.cc-updated { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-subtle); }
.cc-updated::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); flex: none; }
.cc-go { font-weight: 600; font-size: 13px; color: var(--primary); }
.cc-go-arr { display: inline-block; transition: transform var(--dur-fast) var(--ease-out); }
.course-card:hover .cc-go-arr { transform: translateX(4px); }

/* Uniform card height on the landing grid so skeleton placeholders and the
   real cards reserve identical space → the async fill causes no layout shift. */
.landing .course-card { min-height: 300px; }
/* Loading placeholders (portal.js renders one per course, then swaps them). */
.cc-skeleton { pointer-events: none; animation: ccSkPulse 1.4s ease-in-out infinite; }
.cc-skeleton .cc-cap { background: rgba(127, 127, 127, 0.1); }
.cc-skeleton .cc-cap::before, .cc-skeleton .cc-cap::after { display: none; }
.cc-sk { display: block; height: 11px; border-radius: 6px; background: rgba(127, 127, 127, 0.16); }
.cc-sk.w90 { width: 90%; } .cc-sk.w70 { width: 70%; } .cc-sk.w40 { width: 40%; }
@keyframes ccSkPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .cc-skeleton { animation: none; } }

/* how it works — connected step cards */
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .how-steps { grid-template-columns: 1fr; } }
.how-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 24px; box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur), box-shadow var(--dur); }
.how-step:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.how-step .num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-md); font-family: var(--font-mono); font-weight: 600; font-size: 15px; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); margin-bottom: 16px; }
.how-step h3 { font-family: var(--font-display); margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--fg); }
.how-step p { color: var(--fg-muted); margin: 0; line-height: 1.6; font-size: 14.5px; }

/* interactive lesson demo (narration reader + player) */
.demo-in { display: grid; grid-template-columns: .92fr 1.08fr; gap: 44px; align-items: start; margin-top: 56px; }
@media (max-width: 920px) { .demo-in { grid-template-columns: 1fr; gap: 32px; } }
.demo-copy .eyebrow { margin-bottom: 14px; }
.demo-h { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; margin: 0; color: var(--fg); }
.demo-sub { color: var(--fg-muted); font-size: 16px; line-height: 1.6; margin: 12px 0 0; }
.tutorial-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; }
.tutorial-list li { display: flex; gap: 16px; align-items: flex-start; padding: 0 0 22px; position: relative; }
.tutorial-list li:last-child { padding-bottom: 0; }
.tutorial-list li::before { content: ""; position: absolute; left: 16px; top: 36px; bottom: 0; width: 1px; background: linear-gradient(var(--border-strong), transparent); }
.tutorial-list li:last-child::before { display: none; }
.tut-n { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--cyan-ink); background: var(--surface); z-index: 1; }
.tutorial-list h4 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 4px; color: var(--fg); }
.tutorial-list p { font-size: 14px; color: var(--fg-muted); line-height: 1.55; margin: 0; }

.demo-reader { background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.dr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.dr-head .tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; color: var(--fg-muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 5px 12px; }
.dr-body { padding: 24px 22px 8px; display: flex; flex-direction: column; gap: 12px; }
.dr-s { font-family: var(--font-display); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--fg-subtle); margin: 0 -14px; padding: 8px 14px; border-radius: var(--r-md); border-left: 3px solid transparent; cursor: pointer; transition: color .3s, background .35s, border-color .35s; }
.dr-s:hover { color: var(--fg-muted); }
.dr-s.read { color: var(--fg-muted); }
.dr-s.active { color: var(--fg); border-left-color: var(--accent-cyan); background: linear-gradient(90deg, color-mix(in srgb, var(--accent-cyan) 18%, transparent), transparent 75%); }
.dr-s em { font-style: italic; color: var(--cyan-ink); }
.dr-player { display: flex; align-items: center; gap: 13px; padding: 13px 18px; border-top: 1px solid var(--border); background: var(--bg-deep); }
.dr-player .pp { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--on-primary); border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background var(--dur), transform var(--dur) var(--ease-spring); }
.dr-player .pp:hover { background: var(--primary-hover); }
.dr-player .pp:active { transform: scale(.92); }
.wave { display: flex; align-items: center; gap: 2.5px; height: 32px; flex: 1; cursor: pointer; }
.wave span { flex: 1; border-radius: 2px; background: var(--border-strong); min-width: 2px; transition: background .2s; }
.wave span.on { background: var(--grad-audio); }
.dr-time { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); white-space: nowrap; }
.dr-time .cur { color: var(--cyan-ink); }
.dr-speed { background: var(--surface); border: 1px solid var(--border); color: var(--fg-muted); font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; }
.dr-speed:hover { color: var(--fg); border-color: var(--border-strong); }
.pill { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.pill svg { flex: none; }
.pill-cyan { background: color-mix(in srgb, var(--accent-cyan) 15%, transparent); color: var(--cyan-ink); }
.pill-green { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.pill-amber { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--amber-ink); }

/* learned-vs-listened + end-of-lesson quiz preview */
.proof-in { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 56px; }
@media (max-width: 920px) { .proof-in { grid-template-columns: 1fr; gap: 32px; } }
.proof-copy .eyebrow { margin-bottom: 14px; }
.proof-h { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; margin: 0; color: var(--fg); }
.proof-sub { color: var(--fg-muted); font-size: 16px; line-height: 1.6; margin: 12px 0 0; }
.proof-sub em { font-style: italic; color: var(--primary); }
.states { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.state-row { display: flex; flex-direction: column; gap: 8px; }
.state-row .sr-head { display: flex; align-items: center; justify-content: space-between; }
.state-row .sr-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--fg); }
.state-row .sr-label svg { flex: none; }
.state-row .sr-val { font-family: var(--font-mono); font-size: 12px; color: var(--fg-subtle); }
.dualbar { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--surface-hover); overflow: hidden; }
.dualbar > div { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill); }
.dualbar .listened { background: var(--grad-audio); }
.dualbar .proven { background: var(--grad-brand); }
.state-chips { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.quiz-card { background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-xl); padding: 28px 26px; box-shadow: var(--shadow-lg); }
.quiz-head { display: flex; align-items: center; gap: 8px; color: var(--primary); margin-bottom: 14px; }
.quiz-head .eyebrow { color: var(--primary); }
.quiz-q { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.3; margin: 0 0 20px; color: var(--fg); }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 15px; font: inherit; font-size: 14.5px; color: var(--fg-muted); cursor: pointer; transition: border-color var(--dur), color var(--dur), background var(--dur); }
.opt:hover:not(:disabled) { border-color: var(--border-strong); color: var(--fg); }
.opt-mark { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--fg-subtle); }
.opt.sel { border-color: var(--border-bright); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--fg); }
.opt.right { border-color: color-mix(in srgb, var(--success) 55%, transparent); background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--fg); }
.opt.right .opt-mark { background: var(--success); border-color: var(--success); color: #08160f; }
.opt.wrong { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--fg); }
.opt.wrong .opt-mark { background: var(--danger); border-color: var(--danger); color: #1a0709; }
.opt:disabled { cursor: default; }
[data-theme="light"] .opt { box-shadow: 0 1px 2px rgba(20,30,60,.05); }
.quiz-explain { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--success) 12%, transparent); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); font-size: 13.5px; line-height: 1.55; color: var(--fg-muted); display: flex; gap: 10px; align-items: flex-start; }
.quiz-explain.miss { background: color-mix(in srgb, var(--warning) 14%, transparent); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.quiz-explain svg { flex: none; margin-top: 1px; color: var(--success); }
.quiz-explain.miss svg { color: var(--warning); }
.learned-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.quiz-retry { margin-left: auto; cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; background: none; border: 0; font-family: inherit; }
.quiz-retry:hover { text-decoration: underline; }

/* pricing — Monthly/Annual toggle + a single membership card */
.pricing { text-align: center; }
.price-toggle { display: inline-flex; position: relative; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px; margin: 4px auto 0; }
.price-toggle button { position: relative; z-index: 1; border: 0; background: transparent; color: var(--fg-muted); font: inherit; font-size: 14px; font-weight: 600; padding: 9px 20px; border-radius: var(--r-pill); cursor: pointer; transition: color var(--dur); display: inline-flex; align-items: center; gap: 8px; }
.price-toggle button.on { color: var(--fg); }
.price-toggle .thumb { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease-spring), width .3s var(--ease-spring); z-index: 0; }
.price-toggle .save { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--success); background: color-mix(in srgb, var(--success) 16%, transparent); padding: 2px 7px; border-radius: var(--r-pill); }

.price-single { max-width: 480px; margin: 28px auto 0; }
.price-card {
  position: relative; text-align: left; padding: 34px 32px; border-radius: var(--r-2xl);
  background: var(--surface); border: 1px solid var(--border-bright);
  box-shadow: var(--glow-primary), var(--shadow-card);
}
.price-card .best-tag { position: absolute; top: -13px; left: 32px; background: var(--grad-brand); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: var(--r-pill); }
.price-name { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.price-row .was { font-size: 22px; color: var(--fg-subtle); text-decoration: line-through; text-decoration-thickness: 2px; }
.price-row .now { font-family: var(--font-display); font-size: 52px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--fg); }
.price-row .per { color: var(--fg-muted); font-size: 16px; }
.price-note { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; color: var(--cyan-ink); margin-top: 8px; }
.feats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.feats li { position: relative; display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--fg-muted); line-height: 1.45; }
.feats li::before { content: "✓"; color: var(--success); font-weight: 800; flex: none; }
.price-card .btn { margin-top: 24px; }
.price-fine { font-size: 12.5px; color: var(--fg-subtle); margin: 16px 0 0; text-align: center; line-height: 1.5; }
@media (max-width: 520px) { .feats { grid-template-columns: 1fr; } }

/* info pages (faq / about) */
.info { padding-top: clamp(118px, 16vh, 180px); max-width: 820px; }
.info h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -1px; margin: 0 0 12px; }
.info .lead { margin-bottom: 28px; }
.info h2 { font-size: 22px; margin: 36px 0 12px; }
.info > p { color: var(--p-tx2); line-height: 1.6; }
.info a { color: var(--p-accent3); }

/* ── Support / feedback form ── */
.support-card { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); padding: 30px 32px; margin-top: 10px; }
.support-meta { font-size: 14px; color: var(--fg-muted); line-height: 1.6; margin: 0; }
.support-meta b { color: var(--fg); font-weight: 600; }
/* "Sending as …" sits above the fields with a divider for breathing room. */
#support-form .support-meta { padding-bottom: 22px; margin-bottom: 34px; border-bottom: 1px solid var(--border); }
.support-field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; }
.support-field label { font-size: 14px; font-weight: 600; color: var(--fg); }
.support-input, .support-select, .support-textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--fg); background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 12px 14px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.support-input::placeholder, .support-textarea::placeholder { color: var(--fg-subtle); }
.support-input:focus, .support-select:focus, .support-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.support-textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.support-count { align-self: flex-end; font-size: 12px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; margin-top: -3px; }
.support-count.over { color: #dc2626; }
.support-msg { margin: 18px 0 0; font-size: 14px; line-height: 1.5; border-radius: var(--r-md); padding: 12px 14px; }
.support-msg:empty { display: none; padding: 0; }
.support-msg.ok { color: #0a7d33; background: color-mix(in srgb, #16a34a 14%, transparent); border: 1px solid color-mix(in srgb, #16a34a 35%, transparent); }
[data-theme="dark"] .support-msg.ok { color: #7ee787; }
.support-msg.err { color: #b42318; background: color-mix(in srgb, #dc2626 13%, transparent); border: 1px solid color-mix(in srgb, #dc2626 35%, transparent); }
[data-theme="dark"] .support-msg.err { color: #ff9b91; }
#sup-submit { margin-top: 6px; }

/* FAQ accordion in a card, matching the Support page's container. */
.faq-list { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); padding: 4px 28px; margin-top: 12px; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:first-child { border-top: none; }
.faq-list .faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 17px; padding: 20px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--p-accent3); font-weight: 800; font-size: 20px; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--p-tx2); line-height: 1.6; margin: 0 0 18px; }

/* Info pages (Support/FAQ/About): stronger eyebrow + body/helper text for a
   comfortable WCAG AA margin in both themes. Scoped to .info so the landing's
   shared .eyebrow styling is untouched. Ratios: dark ≥9:1, light ≥8:1. */
.info .eyebrow { color: #c4ccdc; }
.info .lead, .info > p, .info .faq-item p { color: #aab4c8; }
[data-theme="light"] .info .eyebrow { color: #394354; }
[data-theme="light"] .info .lead,
[data-theme="light"] .info > p,
[data-theme="light"] .info .faq-item p { color: #424b5d; }

/* final CTA */
.finalcta { text-align: center; border-top: 1px solid var(--border); position: relative; overflow: hidden; max-width: none; width: 100%; }
.finalcta .hero-glow { top: auto; bottom: -200px; height: 480px; }
.finalcta-in { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.finalcta h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5vw, 56px); letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 0; color: var(--fg); }
.finalcta p { color: var(--fg-muted); max-width: 540px; margin: 16px auto 28px; line-height: 1.6; }

/* footer */
.footer { border-top: 1px solid var(--border); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 44px clamp(18px,5vw,64px); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.footer .nav-brand { color: var(--fg); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.footer-cols a { color: var(--fg-muted); text-decoration: none; font-size: 15px; transition: color var(--dur-fast); }
.footer-cols a:hover { color: var(--fg); }
/* mobile footer: links first (a centred grid — 3 per row for the 6-link footer,
   or a single row of 4 on pages that only have 4 links), then the brand below. */
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
  .footer-cols { order: -1; display: grid; grid-template-columns: repeat(3, auto); justify-content: center; justify-items: center; column-gap: 24px; row-gap: 16px; }
  .footer-cols:has(a:nth-last-child(4):first-child) { grid-template-columns: repeat(4, auto); column-gap: 18px; }  /* exactly 4 links → one row */
}

/* reveal animation — sections fade + rise with small stagger */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.how-step.reveal:nth-child(2) { transition-delay: .08s; }
.how-step.reveal:nth-child(3) { transition-delay: .16s; }
.price-grid .price-card.reveal:nth-child(2) { transition-delay: .1s; }
.course-card.reveal.d1 { transition-delay: .06s; }
.course-card.reveal.d2 { transition-delay: .12s; }

/* mobile drawer (offcanvas) */
.lp-offcanvas { position: fixed; inset: 0; z-index: 130; pointer-events: none; }
.lp-scrim { position: absolute; inset: 0; background: rgba(8,12,20,.5); opacity: 0; transition: opacity var(--dur); }
.lp-offcanvas.open { pointer-events: auto; }
.lp-offcanvas.open .lp-scrim { opacity: 1; }
.lp-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 330px); background: var(--bg-raised); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform var(--dur) var(--ease-out); display: flex; flex-direction: column; padding: 18px; overflow-y: auto; }
.lp-offcanvas.open .lp-drawer { transform: none; }
.lp-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lp-drawer-close { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg-muted); cursor: pointer; }
.lp-drawer-nav { display: flex; flex-direction: column; }
.lp-drawer-nav a, .lp-drawer-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 15px 6px; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--fg); text-decoration: none; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; }
.lp-drawer-theme .ic { color: var(--fg-subtle); }
.lp-drawer-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; margin-top: auto; }

/* mobile sticky CTA (appears after hero scrolls off) */
.lp-sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; transform: translateY(120%); transition: transform var(--dur) var(--ease-out); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
.lp-sticky-cta.show { transform: none; }
.lp-sticky-cta .btn { width: 100%; }
@media (min-width: 761px) { .lp-sticky-cta { display: none; } }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD (signed-in home) — new design language
   ─────────────────────────────────────────────────────────── */
body.dash { background: var(--bg); }

/* ── header ── */
.dh { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px); }
.dh-in { max-width: 1240px; margin: 0 auto; height: 62px; padding: 0 clamp(16px,4vw,30px); display: flex; align-items: center; gap: 22px; }
.dh .logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg); }
.dh .logo img { height: 24px; width: auto; }
.dh .logo b { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.dh-nav { flex: 1; }
.dh-nav a { padding: 7px 13px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); text-decoration: none; }
.dh-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.iconbtn { width: 38px; height: 38px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg-muted); display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { color: var(--fg); border-color: var(--primary); }
.iconbtn .ic-sun { display: none; }
[data-theme="dark"] .iconbtn .ic-sun { display: block; }
[data-theme="dark"] .iconbtn .ic-moon { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.user-wrap { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 9px; padding: 5px 11px 5px 5px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; }
.user-btn:hover { border-color: var(--primary); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 248px; background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; }
.menu-head { display: flex; gap: 11px; align-items: center; padding: 10px; }
.menu-head b { display: block; font-size: 14px; font-weight: 600; color: var(--fg); }
.menu-head span { font-size: 12px; color: var(--fg-subtle); }
.menu a, .menu button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; color: var(--fg-muted); font: inherit; font-size: 14px; border: 0; background: none; border-radius: var(--r-md); text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-hover); color: var(--fg); }
.menu .danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
@media (max-width: 700px) { .uname { display: none; } }

/* ── layout ── */
.dash-wrap { max-width: 1240px; margin: 0 auto; padding: 30px clamp(16px,4vw,30px) 96px; }
.dash-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.hello { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.025em; margin: 10px 0 0; line-height: 1.05; color: var(--fg); }
.streak-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--amber-ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.streak-chip svg { flex: none; }
.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.dash-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } .dash-rail { position: static; flex-direction: row; flex-wrap: wrap; } .dash-rail > * { flex: 1; min-width: 240px; } }
.dash-empty { color: var(--fg-muted); }

/* Contrast: lift the faint mono labels (sh-note, cc-meta, cc-updated, dual-val,
   streak-lbl, heatmap legend, …) to WCAG AA in both themes. Scoped to the
   dashboard so the landing is untouched. Eyebrows already pass AA — nudge their
   weight for legibility. */
body.dash { --fg-subtle: #8b94a9; }                 /* dark (default) ≥4.9:1 */
[data-theme="light"] body.dash { --fg-subtle: #51596b; }   /* light ≥6.4:1 */
body.dash .eyebrow { font-weight: 600; }

/* ── dashboard buttons (rail/banner) ── */
.btn-soft { background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary); border-color: transparent; }
.btn-soft:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ── subscription banner ── */
.subbanner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-radius: var(--r-xl); border: 1px solid var(--border-strong); margin-bottom: 22px; flex-wrap: wrap; }
.subbanner.trial { background: color-mix(in srgb, var(--warning) 13%, transparent); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.subbanner.none { background: linear-gradient(100deg, color-mix(in srgb,#7c3aed 12%, transparent), color-mix(in srgb,#4285f4 8%, transparent)); border-color: var(--border-bright); }
.sb-l { display: flex; align-items: center; gap: 14px; }
.sb-ic { width: 42px; height: 42px; border-radius: var(--r-md); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.sb-ic.amber { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--amber-ink); }
.sb-l b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--fg); }
.sb-l span { font-size: 13.5px; color: var(--fg-muted); }
.sb-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ── dual Listened/Learned bars ── */
.dual { display: flex; flex-direction: column; gap: 5px; }
.dual-row { display: flex; align-items: center; justify-content: space-between; }
.dual-lab { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--fg-muted); }
.dual-lab .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.cyan { background: var(--accent-cyan); } .dot.grad { background: var(--grad-brand); }
.dual-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-subtle); }
.bar { height: 7px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--fg) 9%, transparent); overflow: hidden; margin-bottom: 4px; }
.bar i { display: block; height: 100%; border-radius: var(--r-pill); }
.bar .cyan { background: var(--accent-cyan); }
.bar .grad { background: linear-gradient(90deg,#7c3aed,#4285f4); }

/* ── resume hero ── */
.resume { display: grid; grid-template-columns: 220px 1fr; border-radius: var(--r-2xl); border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-lg); text-decoration: none; color: inherit; transition: transform .2s; }
.resume:hover { transform: translateY(-2px); }
.resume-art { position: relative; display: flex; align-items: flex-end; padding: 18px; }
.resume-cic { width: 50px; height: 50px; border-radius: var(--r-md); background: rgba(0,0,0,.22); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.resume-lesson { position: absolute; top: 16px; left: 18px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.94); background: rgba(0,0,0,.24); padding: 4px 10px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
.resume-body { padding: 24px 26px; display: flex; flex-direction: column; }
.resume-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 12px 0 0; line-height: 1.08; color: var(--fg); }
.resume-course { font-size: 14px; color: var(--fg-muted); margin-top: 6px; }
.resume-bars { margin: 18px 0; max-width: 460px; }
.resume-cta { align-self: flex-start; margin-top: auto; }
@media (max-width: 620px) {
  .resume { grid-template-columns: 1fr; }
  /* Taller art band on mobile so the LESSON pill (top-left) and the play
     button (bottom-left) keep clear of each other — at 96px they overlapped
     and the two translucent chips read as a doubled/ghosted square. */
  .resume-art { height: 140px; }
}

/* ── section head + course cards ── */
.dash-main .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; }
.sh-note { font-size: 12.5px; color: var(--fg-subtle); }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .cgrid { grid-template-columns: 1fr; } }
.ccard { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-card); text-decoration: none; color: inherit; display: block; transition: transform .2s, border-color .2s; }
.ccard:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.ccard-cap { height: 74px; display: flex; align-items: flex-end; padding: 12px; position: relative; overflow: hidden; }
/* faint white 10% grid on the coloured caps (same as the landing course cards) */
.ccard-cap::before, .resume-art::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 24px 24px; }
.ccard-cic, .ccard-track, .resume-cic, .resume-lesson { z-index: 1; }
.resume-art { overflow: hidden; }
.ccard-cic { width: 34px; height: 34px; border-radius: var(--r-sm); background: rgba(0,0,0,.22); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.ccard-track { position: absolute; top: 11px; right: 12px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.92); background: rgba(0,0,0,.24); padding: 3px 8px; border-radius: var(--r-pill); }
.ccard-body { padding: 15px 16px 16px; }
.ccard-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; line-height: 1.2; color: var(--fg); margin: 0; }
.ccard-last { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-subtle); margin: 7px 0 13px; }
.ccard-last svg { flex: none; }
.ccard-cont { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); margin-top: 12px; }

/* ── rail cards ── */
.rail-card { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); padding: 18px; box-shadow: var(--shadow-card); }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rail-link { font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; }
.pill.green { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.pill.amber { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--amber-ink); }
.pill.slate { background: var(--surface); color: var(--fg-muted); border: 1px solid var(--border); }
.streak-card .streak-top { display: flex; align-items: center; gap: 13px; }
.streak-ic { width: 48px; height: 48px; border-radius: var(--r-md); background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--amber-ink); display: grid; place-items: center; flex: none; }
.streak-num { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1; color: var(--fg); }
.streak-lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-subtle); margin-top: 4px; }
.streak-note { font-size: 12.5px; color: var(--fg-muted); margin: 12px 0 0; }
/* Trial countdown rail card: full-width Manage button under the note. */
.trial-card .btn { margin-top: 12px; width: 100%; }

/* heatmap (13 weeks; learned = brand gradient, listened = cyan) */
.heatmap { display: flex; gap: 3px; }
.hm-col { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.hm-cell { width: 100%; aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--fg) 8%, transparent); }
.hm-cell[data-lvl="x"] { background: transparent; }
.hm-cell[data-type="listened"] { background: var(--accent-cyan); }
.hm-cell[data-type="listened"][data-lvl="1"] { opacity: .35; }
.hm-cell[data-type="listened"][data-lvl="2"] { opacity: .55; }
.hm-cell[data-type="listened"][data-lvl="3"] { opacity: .78; }
.hm-cell[data-type="learned"], .hm-cell[data-lvl="1"]:not([data-type]), .hm-cell[data-lvl="2"]:not([data-type]), .hm-cell[data-lvl="3"]:not([data-type]), .hm-cell[data-lvl="4"]:not([data-type]) { background: linear-gradient(135deg,#7c3aed,#4285f4); }
.hm-cell[data-type="learned"][data-lvl="1"] { opacity: .45; }
.hm-cell[data-type="learned"][data-lvl="2"] { opacity: .68; }
.hm-cell[data-type="learned"][data-lvl="3"] { opacity: .85; }
.hm-legend { display: flex; gap: 14px; align-items: center; margin-top: 13px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-subtle); }
.hm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hm-key { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.hm-key[data-type="listened"] { background: var(--accent-cyan); }
.hm-key[data-type="learned"] { background: linear-gradient(135deg,#7c3aed,#4285f4); }

/* subscription rail card */
.sub-plan { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-raised); border: 1px solid var(--border); }
.sub-name { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--fg); }
.sub-price { font-family: var(--font-mono); font-size: 13px; color: var(--primary); }
.sub-renew { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-subtle); margin: 10px 0 14px; }
.sub-renew svg { flex: none; }
.sub-copy { font-size: 13px; color: var(--fg-muted); line-height: 1.5; margin: 0 0 14px; }
.sub-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* notification toggles */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.set-row:first-of-type { border-top: 0; padding-top: 0; }
.set-label { font-weight: 600; color: var(--fg); font-size: 14px; }
.set-desc { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
.set-toggle { appearance: none; -webkit-appearance: none; width: 40px; height: 23px; flex-shrink: 0; background: color-mix(in srgb, var(--fg) 18%, transparent); border-radius: var(--r-pill); position: relative; cursor: pointer; transition: background .2s; }
.set-toggle:checked { background: var(--primary); }
.set-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.set-toggle:checked::after { transform: translateX(17px); }
.set-toggle:disabled { opacity: .4; cursor: not-allowed; }
.set-msg { font-size: 12.5px; color: var(--fg-muted); padding: 6px 0 0; }

/* empty / error / skeleton states */
.empty { border: 1px dashed var(--border-strong); border-radius: var(--r-2xl); background: var(--surface); padding: 48px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty-ic { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); display: grid; place-items: center; margin-bottom: 18px; }
.empty-ic.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.empty h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: var(--fg); margin: 0; }
.empty p { font-size: 14.5px; color: var(--fg-muted); line-height: 1.55; max-width: 400px; margin: 10px 0 22px; }
.skel { background: linear-gradient(100deg, color-mix(in srgb, var(--fg) 6%, transparent) 30%, color-mix(in srgb, var(--fg) 12%, transparent) 50%, color-mix(in srgb, var(--fg) 6%, transparent) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-lg); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ── all-courses catalog (discover other courses) ── */
/* .dash-catalog is a <section>, so it inherits the landing's heavy section
   padding (clamp(60px,9vh,92px)) + max-width/centering — that injected a big
   empty band above "All courses" and a double horizontal inset. Neutralise it;
   the catalog lives inside .dash-wrap which already handles width + gutters. */
.dash-catalog { margin: 24px 0 0; padding: 0; max-width: none; }
@media (max-width: 980px) { .dash-catalog { margin-top: 16px; } }
.dash-catalog-head { margin-bottom: 18px; }

/* dashboard: custom-styled Sort dropdown (themed; replaces the native control).
   Scoped to .dash so the landing's identical control is left untouched. */
body.dash .course-sort-wrap { position: relative; }
body.dash .course-sort { appearance: none; -webkit-appearance: none; padding-right: 34px; }
body.dash .course-sort-wrap::after {
  content: ""; position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  width: 11px; height: 11px; pointer-events: none; background: var(--fg-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.dash .course-sort-wrap:hover::after,
body.dash .course-sort-wrap:focus-within::after { background: var(--primary); }
/* On phones the search fills its own row so the Sort control wraps below,
   left-aligned and fully visible (it otherwise clipped at the right edge). */
@media (max-width: 560px) { body.dash .course-search { flex-basis: 100%; } }
.dash-catalog-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 8px 0 0; color: var(--fg); }
.dash-catalog .course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .dash-catalog .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .dash-catalog .course-grid { grid-template-columns: 1fr; } }

/* dashboard footer (mirrors the landing footer) */
body.dash .footer { margin-top: 8px; }
@media (max-width: 760px) { .dh-nav { display: none; } }   /* mobile nav lives in the top avatar menu */

/* responsive — landing */
@media (max-width: 760px) {
  .nav { display: flex; gap: 10px; padding: 11px 16px; }   /* flex on mobile: brand left, cta right */
  .nav-links { display: none; }
  .nav .nav-theme { display: none; }          /* theme lives in the drawer on mobile */
  .nav-cta { gap: 8px; margin-left: auto; }
  .nav-cta .nav-trial { padding: 9px 13px; font-size: 13px; }
  .nav-cta .btn-ghost-sm { padding: 8px 11px; font-size: 13px; }
  .nav-burger { display: inline-flex; }
  /* landing: no hamburger menu on mobile — drop it entirely and surface the
     theme toggle next to Sign in, like the info-page navs */
  body.landing .nav-burger { display: none; }
  body.landing .nav .nav-theme { display: inline-flex; }
  .hero-stats { gap: 16px; }
  .hero-stats .sep { display: none; }
}
@media (min-width: 761px) {
  .lp-offcanvas { display: none; }
}
/* fallback mobile menu for info pages (faq/about) that have no drawer */
@media (max-width: 760px) {
  body.nav-open .nav-links {
    display: flex; flex-direction: column; position: fixed; top: 58px; left: 0; right: 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(14px);
    padding: 18px 24px; gap: 18px; border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 460px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* ── Reduced motion: disable all the additive landing motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .how-step.reveal, .price-grid .price-card.reveal, .course-card.reveal { transition-delay: 0s !important; }
  .course-card, .price-card, .btn { transition: border-color .14s, background .14s; }
  .course-card:hover, .price-card:hover, .how-step:hover, .btn:hover, .btn-primary:hover, .btn-grad:hover, .btn-ghost:hover { transform: none; }
  .cc-go-arr, .course-card:hover .cc-go-arr { transition: none; transform: none; }
  .hero-glow { --py: 0px !important; }   /* keep centering, drop parallax drift */
  .marquee-track { transform: none !important; }
  .hero h1 .hb-line { transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   ACCOUNT / SETTINGS page (left-nav + right panel)
   ─────────────────────────────────────────────────────────── */
body.account { background: var(--bg); }
.set-app { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr; background: var(--bg); color: var(--fg); }

/* danger button (rose) — reuses the shared .btn pill */
.btn-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }

/* header */
.set-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px); }
.set-header-in { max-width: 1180px; margin: 0 auto; height: 62px; padding: 0 clamp(16px,4vw,26px); display: flex; align-items: center; gap: 18px; }
.set-header .logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg); }
.set-header .logo img { height: 24px; width: auto; }
.set-header .logo b { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.set-h-title { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--fg-muted); }
.set-h-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.set-h-right .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; text-decoration: none; }
.set-header .iconbtn .ic-sun { display: none; }
[data-theme="dark"] .set-header .iconbtn .ic-sun { display: block; }
[data-theme="dark"] .set-header .iconbtn .ic-moon { display: none; }
@media (max-width: 720px) { .set-h-title { display: none; } }

/* body layout: left nav + scroll panel */
.set-body { display: grid; grid-template-columns: 1fr; min-height: 0; }
.set-nav { border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; align-self: start; }
.set-navbtn { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 13px; border: 0; background: transparent; color: var(--fg-muted); font: inherit; font-size: 14px; font-weight: 500; border-radius: var(--r-md); cursor: pointer; text-decoration: none; }
.set-navbtn svg { flex-shrink: 0; color: var(--fg-subtle); }
.set-navbtn:hover { background: var(--surface-hover); color: var(--fg); }
.set-navbtn.on { background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary); font-weight: 600; }
.set-navbtn.on svg { color: var(--primary); }
.set-nav-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.set-navbtn.danger { color: var(--danger); }
.set-navbtn.danger svg { color: var(--danger); }

.set-scroll { overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; min-height: 0; }
.set-panel { max-width: 720px; margin: 0 auto; padding: 32px clamp(16px,4vw,26px) 100px; display: flex; flex-direction: column; gap: 34px; }

/* section (reset the global `section` padding/max-width the landing sets) */
.set-sec { padding: 0; max-width: none; margin: 0; width: 100%; }
.set-sec-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.set-sec-head > div { display: flex; flex-direction: column; min-width: 0; }
.set-sec-ic { width: 38px; height: 38px; border-radius: var(--r-md); background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.set-sec-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; margin: 0; color: var(--fg); }
.set-soon-badge { display: inline-flex; align-items: center; vertical-align: 2px; margin-left: 8px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--fg-subtle) 18%, transparent); color: var(--fg-subtle); }
.set-sec-head p { font-size: 14px; color: var(--fg-muted); margin: 3px 0 0; line-height: 1.5; }
.set-card { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.set-card + .set-card { margin-top: 12px; }   /* small gap between stacked cards in a section (e.g. notifications matrix + schedule) */
/* breathing room at the top/bottom of each card's first/last row */
.set-card > *:first-child { padding-top: 22px; }
.set-card > *:last-child { padding-bottom: 22px; }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--border); }
.set-row:first-child { border-top: 0; }
.set-row-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-row-label { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--fg); }
.set-row-sub { font-size: 13px; color: var(--fg-subtle); line-height: 1.45; }
.set-row-ctl { flex-shrink: 0; }
.row-static { font-size: 13px; color: var(--success); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }

/* profile */
.profile-top { display: flex; align-items: center; gap: 16px; padding: 20px; border-bottom: 1px solid var(--border); }
.profile-av { width: 56px; height: 56px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-size: 19px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.profile-id { flex: 1; min-width: 0; }
.profile-id b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--fg); }
.profile-id span { font-size: 13.5px; color: var(--fg-subtle); }
.name-edit { display: inline-flex; gap: 8px; align-items: center; }
.name-edit input { font: inherit; font-size: 14px; color: var(--fg); background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 7px 10px; outline: none; max-width: 180px; }
.name-edit input:focus { border-color: var(--primary); }

/* subscription */
.sub-plan-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--border); }
.sub-plan-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-top: 9px; color: var(--fg); }
.sub-plan-note { font-size: 13px; color: var(--fg-subtle); margin-top: 3px; }
.sub-price { font-family: var(--font-mono); font-size: 15px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.sub-none { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 20px; flex-wrap: wrap; }
.sub-none-txt b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--fg); }
.sub-none-txt span { font-size: 13.5px; color: var(--fg-muted); }

/* controls: segmented + toggle */
.seg { display: inline-flex; gap: 3px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--fg-muted); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: var(--r-pill); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.seg button:disabled, .seg .seg-soon { color: var(--fg-subtle); cursor: not-allowed; }
.seg-soon-tag { margin-left: 2px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 5px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--fg-subtle) 16%, transparent); color: var(--fg-subtle); }
.seg-textsize button { min-width: 38px; justify-content: center; font-weight: 700; line-height: 1; }
.tgl { width: 44px; height: 25px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--fg) 18%, transparent); position: relative; border: 0; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.tgl-knob { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.tgl.on { background: var(--primary); }
.tgl.on .tgl-knob { transform: translateX(19px); }
.tgl.disabled { opacity: .45; cursor: not-allowed; }
.ctl-disabled { display: flex; align-items: center; gap: 10px; }
.ctl-reason { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fg-subtle); }

/* text-size preview */
.set-textprev { margin: 4px 20px 20px; padding: 16px 18px; border-radius: var(--r-md); background: var(--bg-raised); border: 1px solid var(--border); color: var(--fg); line-height: 1.6; }
.set-textprev-eyebrow { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 8px; }

/* quiet footnote (delete-account line, push-unsupported note) */
.set-fineprint { font-size: 13px; color: var(--fg-subtle); margin: 12px 2px 0; line-height: 1.5; }
.set-fineprint a { color: var(--primary); text-decoration: none; font-weight: 600; }
.set-fineprint a:hover { text-decoration: underline; }

/* Profile identity text must never look like a link. The format-detection
   meta stops iOS data detectors from auto-linking the email; this is a belt-
   and-suspenders guard against any inherited underline. */
.profile-id b, .profile-id span, .set-row-label, .set-row-sub { text-decoration: none; }

/* notifications: 3 categories × 2 channels (Email / Push) */
.notify-matrix { display: flex; flex-direction: column; }
.set-card > .notify-matrix { padding: 0; }   /* override the card's first/last-child padding; spacing is internal */
.notify-head, .notify-row { display: grid; grid-template-columns: 1fr 56px 56px; align-items: center; gap: 12px; padding: 16px 20px; }
.notify-head { padding-bottom: 8px; }
.notify-row { border-top: 1px solid var(--border); }
.notify-row:last-child { padding-bottom: 20px; }
.notify-col { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.notify-col-soon { font-family: var(--font-mono); font-size: 8px; letter-spacing: .04em; padding: 1px 5px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--fg-subtle) 18%, transparent); color: var(--fg-subtle); }
.notify-cat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.notify-cat-label { font-size: 14.5px; font-weight: 600; color: var(--fg); }
.notify-cat-desc { font-size: 13px; color: var(--fg-subtle); line-height: 1.45; }
.notify-cell { display: flex; justify-content: center; }

/* study-reminder schedule: day chips + time */
.sched-block { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.sched-head { display: flex; flex-direction: column; gap: 3px; }
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.daychip { flex: 1; min-width: 40px; padding: 9px 0; text-align: center; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--bg-raised); color: var(--fg-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.daychip:hover { border-color: var(--primary); color: var(--fg); }
.daychip.on { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: var(--primary); color: var(--primary); }
.sched-time-row { display: flex; align-items: center; gap: 10px; }
.sched-time-label { font-size: 14px; font-weight: 600; color: var(--fg); }
.time-input { font: inherit; font-size: 14px; color: var(--fg); background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 8px 10px; outline: none; }
.time-input:focus { border-color: var(--primary); }
/* learning profile: level segmented control (stacked) + interest chips */
.set-row-stack { flex-direction: column; align-items: stretch; gap: 12px; }
.set-row-stack .set-row-ctl { margin-left: 0; }
.set-row-stack .seg { align-self: flex-start; flex-wrap: wrap; }
.learn-block { padding: 16px 20px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--bg-raised); color: var(--fg-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.chip:hover { border-color: var(--primary); color: var(--fg); }
.chip.on { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: var(--primary); color: var(--primary); }

/* native form controls (the time picker) follow the page theme */
body.account { color-scheme: dark; }
[data-theme="light"] body.account { color-scheme: light; }

/* Contrast: lift the dim helper/eyebrow labels (set-row-sub, profile email,
   sub notes, ctl reasons, text-size eyebrow, …) to WCAG AA in both themes.
   Scoped to the settings page so the landing is untouched. */
body.account { --fg-subtle: #8b94a9; }                  /* dark (default) */
[data-theme="light"] body.account { --fg-subtle: #51596b; }   /* light */

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .25s var(--ease-out); }
.toast.ok { background: var(--success); color: #06140d; }
.toast.fail { background: var(--danger); color: #1c0509; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%); } }

/* Sign out lives at the bottom of the panel on every breakpoint (and also in
   the top avatar menu). The bottom tab bar was removed — all nav is in the
   top bar now. */
.set-signout-mobile { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--danger); font-size: 15px; font-weight: 600; text-decoration: none; margin-top: 6px; cursor: pointer; }
.set-signout-mobile:hover { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
@media (max-width: 860px) {
  .set-body { grid-template-columns: 1fr; }
  .set-nav { display: none; }
  .set-panel { padding: 22px 16px 40px; gap: 28px; max-width: 560px; }
  .set-row { flex-wrap: wrap; }
  .set-row-ctl { margin-left: auto; }            /* control hugs the right edge — even when it wraps to its own line */
  .set-row:has(.tgl) { flex-wrap: nowrap; }      /* toggles stay inline-right at a consistent spot; text wraps beside them */
  .seg { flex-wrap: wrap; justify-content: flex-end; }   /* wide segmented controls wrap right-aligned */
}
