/* AiCareer design system
   Dark-first premium ed-tech theme built from the logo palette:
   navy #0b1d4d, blue #1f6bff, cyan #19d4e4, violet #7b3cf6. */

:root {
  --font-head: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --blue: #2f6bff;
  --cyan: #19d4e4;
  --violet: #7b3cf6;
  --navy: #0b1d4d;
  --grad: linear-gradient(120deg, var(--blue), var(--violet));
  --grad-text: linear-gradient(100deg, #6fb6ff 0%, #8fe8f2 40%, #b79bff 100%);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;

  /* Light theme */
  --bg: #f6f7fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --surface-3: #e9edf6;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(246, 247, 251, 0.94);
  --text: #0d1530;
  --text-2: #3f4a66;
  --muted: #5f6b86;
  --border: #e1e6f0;
  --border-strong: #cdd5e5;
  --brand: #2456e6;
  --brand-2: #6b3cf0;
  --brand-soft: #e8eeff;
  --on-brand: #ffffff;
  --ok: #0a7a4b;
  --ok-soft: #e1f5ea;
  --warn: #9a5b00;
  --warn-soft: #fff3dc;
  --danger: #b42318;
  --shadow-1: 0 1px 2px rgba(13, 21, 48, 0.06), 0 2px 8px rgba(13, 21, 48, 0.04);
  --shadow-2: 0 8px 24px rgba(13, 21, 48, 0.08), 0 2px 6px rgba(13, 21, 48, 0.05);
  --shadow-3: 0 24px 60px rgba(13, 21, 48, 0.14);
  --glow: 0 0 0 1px rgba(36, 86, 230, 0.12), 0 12px 40px rgba(47, 107, 255, 0.18);
  --hero-bg: radial-gradient(1100px 520px at 80% -10%, rgba(47, 107, 255, 0.18), transparent 60%),
    radial-gradient(800px 420px at 0% 0%, rgba(25, 212, 228, 0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(123, 60, 246, 0.12), transparent 60%);
  --grid-line: rgba(13, 21, 48, 0.05);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #060b1d;
  --bg-2: #0a1128;
  --surface: #0e1631;
  --surface-2: #131d3d;
  --surface-3: #1a2650;
  --glass: rgba(14, 22, 49, 0.66);
  --glass-strong: rgba(6, 11, 29, 0.92);
  --text: #eef2ff;
  --text-2: #c3cbe6;
  --muted: #95a0c2;
  --border: rgba(148, 166, 230, 0.16);
  --border-strong: rgba(148, 166, 230, 0.28);
  --brand: #7ea2ff;
  --brand-2: #a98bff;
  --brand-soft: rgba(126, 162, 255, 0.14);
  --on-brand: #ffffff;
  --ok: #4fd69a;
  --ok-soft: rgba(79, 214, 154, 0.14);
  --warn: #ffc46b;
  --warn-soft: rgba(255, 196, 107, 0.12);
  --danger: #ff8a80;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(126, 162, 255, 0.2), 0 16px 50px rgba(47, 107, 255, 0.25);
  --hero-bg: radial-gradient(1100px 560px at 80% -10%, rgba(47, 107, 255, 0.32), transparent 60%),
    radial-gradient(800px 460px at 0% 0%, rgba(25, 212, 228, 0.16), transparent 60%),
    radial-gradient(800px 520px at 50% 115%, rgba(123, 60, 246, 0.28), transparent 60%);
  --grid-line: rgba(148, 166, 230, 0.06);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--surface); color: var(--text); padding: 0.6rem 1rem; border-radius: var(--r-sm); box-shadow: var(--shadow-2); }
.skip-link:focus { top: 1rem; }

.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.18em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }
.muted { color: var(--muted); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root:not([data-theme="dark"]) .grad-text { background: linear-gradient(100deg, #2456e6, #0fa6c0 45%, #6b3cf0); -webkit-background-clip: text; background-clip: text; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--grad); --b-fg: var(--on-brand); --b-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0 1.25rem; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s, border-color 0.2s, opacity 0.2s;
  touch-action: manipulation;
}
.btn:hover { color: var(--b-fg); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47, 107, 255, 0.28); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-lg { min-height: 52px; padding: 0 1.6rem; font-size: 1rem; }
.btn-sm { min-height: 38px; padding: 0 0.95rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-ghost { --b-bg: transparent; --b-fg: var(--text); --b-bd: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-soft { --b-bg: var(--brand-soft); --b-fg: var(--brand); }
.btn-soft:hover { box-shadow: none; }
.btn-white { --b-bg: #fff; --b-fg: #0b1d4d; }
.btn-white:hover { box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2); }
.btn-outline-white { --b-bg: rgba(255,255,255,0.06); --b-fg: #fff; --b-bd: rgba(255,255,255,0.35); }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); box-shadow: none; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: inherit; }

/* ---------- Chips, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.4; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); white-space: nowrap; text-decoration: none;
}
a.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.free { background: var(--ok-soft); color: var(--ok); border-color: transparent; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.68rem; padding: 0.15rem 0.55rem; }
.chip.pro { background: linear-gradient(120deg, rgba(47,107,255,0.16), rgba(123,60,246,0.18)); color: var(--brand-2); border-color: transparent; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.68rem; padding: 0.15rem 0.55rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card-pad { padding: 1.5rem; }
.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid var(--border); }
.gborder { position: relative; border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, rgba(47,107,255,0.6), rgba(25,212,228,0.35), rgba(123,60,246,0.6)) border-box; }
.hoverlift { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s; }
.hoverlift:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
:root[data-theme="dark"] .brand .logo-light { display: none; }
.main-nav { display: flex; gap: 0.15rem; margin-left: 1rem; }
.main-nav a { position: relative; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 0.92rem; padding: 0.55rem 0.8rem; border-radius: 10px; transition: color 0.2s, background-color 0.2s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: -13px; height: 2px; border-radius: 2px; background: var(--grad); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 40px; padding: 0 0.75rem 0 0.85rem;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  font-size: 0.88rem; cursor: pointer; transition: border-color 0.2s;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger kbd { font-family: var(--font-body); font-size: 0.72rem; padding: 0.1rem 0.4rem; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.menu-toggle { display: none; }

.menu { position: relative; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent; background: var(--grad) padding-box, var(--grad) border-box; color: #fff; font-weight: 700; cursor: pointer; font-family: var(--font-head); }
.popover {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 260px; z-index: 60; padding: 0.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-3);
  transform-origin: top right; animation: pop 0.18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.popover .head { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; display: grid; gap: 0.15rem; }
.popover .head span { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.popover .head .chip { justify-self: start; margin-top: 0.35rem; }
.popover a, .popover button { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 42px; padding: 0 0.8rem; border-radius: 10px; color: var(--text); text-decoration: none; background: none; border: 0; font-size: 0.92rem; cursor: pointer; text-align: left; }
.popover a:hover, .popover button:hover { background: var(--surface-2); color: var(--text); }
.popover hr { border: 0; border-top: 1px solid var(--border); margin: 0.3rem 0; }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(4, 8, 22, 0.55); z-index: 90; animation: fade 0.2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); z-index: 100; background: var(--surface); border-left: 1px solid var(--border); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.25rem; overflow-y: auto; animation: slide-in 0.28s var(--ease); }
.drawer a { display: flex; align-items: center; gap: 0.75rem; min-height: 48px; padding: 0 0.75rem; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.drawer a:hover, .drawer a[aria-current="page"] { background: var(--surface-2); }
.drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.drawer .drawer-foot { margin-top: auto; display: grid; gap: 0.5rem; padding-top: 1rem; }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 1080px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .search-trigger .label, .search-trigger kbd { display: none; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 560px) {
  .header-actions .hide-sm { display: none; }
  .brand img { height: 30px; }
}

main { flex: 1; }
main:focus { outline: none; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); margin: 0.75rem 0 0.75rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.band { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (max-width: 767px) { .section { padding: 60px 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero-bg); border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3.5rem; align-items: center; padding-top: 88px; padding-bottom: 104px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); line-height: 1.05; letter-spacing: -0.035em; margin: 1.1rem 0 1.25rem; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 2.25rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; color: var(--muted); font-size: 0.9rem; }
.hero-proof span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-proof .icon { color: var(--ok); }
.pill-announce { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.4rem 0.35rem 0.4rem; border-radius: 999px; border: 1px solid var(--border); background: var(--glass); font-size: 0.85rem; color: var(--text-2); text-decoration: none; }
.pill-announce b { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--grad); color: #fff; font-size: 0.75rem; }
.pill-announce:hover { color: var(--text); border-color: var(--border-strong); }

/* Hero product preview (decorative) */
.preview { position: relative; min-height: 460px; }
.preview .pv-main { position: absolute; inset: 20px 30px 40px 10px; border-radius: var(--r-lg); padding: 1.4rem; box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 1rem; animation: floaty 7s ease-in-out infinite; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pv-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; color: var(--brand); text-transform: uppercase; }
.pv-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.3; margin-top: 0.25rem; }
.pv-steps { list-style: none; display: grid; gap: 0.55rem; }
.pv-steps li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.92rem; font-weight: 500; }
.pv-steps li.done { color: var(--text-2); }
.pv-steps li.now { border-color: var(--brand); box-shadow: var(--glow); background: var(--surface); }
.pv-steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--surface-3); color: var(--muted); flex: none; }
.pv-steps li.done .dot { background: var(--ok); color: #fff; }
.pv-steps li.now .dot { background: var(--grad); color: #fff; }
.pv-steps li span:last-child { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
.pv-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pv-bar i { display: block; height: 100%; width: 58%; border-radius: inherit; background: var(--grad); }
.pv-float { position: absolute; border-radius: 16px; padding: 0.8rem 1rem; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; font-weight: 600; }
.pv-float small { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.pv-float .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.pv-float.a { right: 0; top: 0; animation: floaty 6s ease-in-out infinite reverse; }
.pv-float.b { left: -16px; bottom: -34px; animation: floaty 8s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 88px; gap: 2.5rem; }
  .preview { min-height: 440px; max-width: 560px; }
}
@media (max-width: 980px) {
  .preview { min-height: 0; padding: 26px 0 8px; }
  .preview .pv-main { position: relative; inset: auto; }
  .pv-float.a { right: -6px; top: 0; }
  .pv-float.b { left: -6px; bottom: -22px; }
}
@media (max-width: 560px) {
  .pv-float.b { display: none; }
  .pv-steps li { padding: 0.6rem 0.7rem; font-size: 0.88rem; }
}

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-top: -48px; position: relative; z-index: 2; box-shadow: var(--shadow-2); }
.stats-strip div { background: var(--surface); padding: 1.4rem 1.5rem; }
.stats-strip strong { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.stats-strip span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 767px) { .stats-strip { grid-template-columns: repeat(2, 1fr); margin-top: -36px; } }

/* ---------- How it works ---------- */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: s; }
.step3 { padding: 1.75rem; position: relative; }
.step3 .num { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); font-family: var(--font-head); font-weight: 800; margin-bottom: 1.1rem; box-shadow: 0 10px 24px rgba(47, 107, 255, 0.3); }
.step3 h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.step3 p { color: var(--muted); }
@media (max-width: 860px) { .steps3 { grid-template-columns: 1fr; } }

/* ---------- Roadmap ---------- */
.roadmap { position: relative; }
.rm-track { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 1rem; position: relative; }
.rm-node { position: relative; }
.rm-node a { display: flex; flex-direction: column; gap: 0.5rem; height: 100%; padding: 1.15rem 1.15rem 1.25rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s; }
.rm-node a:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--border-strong); color: var(--text); }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.rm-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 0.95rem; color: var(--brand); background: var(--brand-soft); }
.rm-node.done .rm-badge { background: var(--ok); color: #fff; }
.rm-node.current a { border-color: var(--brand); box-shadow: var(--glow); }
.rm-node.current .rm-badge { background: var(--grad); color: #fff; }
.rm-node h3 { font-size: 1.02rem; }
.rm-node p { color: var(--muted); font-size: 0.86rem; line-height: 1.5; flex: 1; }
.rm-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); }
.rm-node .rm-progress { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rm-node .rm-progress i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.rm-node:not(:last-child)::after { content: ""; position: absolute; top: 38px; right: -1rem; width: 1rem; height: 2px; background: linear-gradient(90deg, var(--border-strong), var(--brand)); }
.rm-track .rm-node:nth-child(4n)::after { display: none; }
.rm-fork { display: flex; flex-direction: column; align-items: center; margin: 1.75rem 0 1.25rem; color: var(--muted); font-size: 0.88rem; font-weight: 600; gap: 0.4rem; }
.rm-fork::before { content: ""; width: 2px; height: 32px; background: linear-gradient(var(--border-strong), var(--brand)); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 980px) {
  .rm-track { grid-template-columns: repeat(2, 1fr); }
  .rm-track .rm-node:nth-child(4n)::after { display: block; }
  .rm-track .rm-node:nth-child(2n)::after { display: none; }
  .spec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rm-track { grid-template-columns: 1fr; gap: 0.9rem; padding-left: 22px; }
  .rm-track::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--brand), var(--violet)); border-radius: 2px; }
  .rm-node::before { content: ""; position: absolute; left: -21px; top: 30px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
  .rm-node.done::before { background: var(--ok); border-color: var(--ok); }
  .rm-node::after, .rm-track .rm-node:nth-child(4n)::after { display: none !important; }
}

/* ---------- Path cards ---------- */
.path-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.path-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); color: var(--text); }
.path-art { position: relative; height: 150px; padding: 1.1rem 1.25rem; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.path-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(240px 160px at 85% 10%, rgba(255,255,255,0.28), transparent 70%), linear-gradient(135deg, var(--p1), var(--p2)); }
.path-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,0.22) 1px, transparent 1px); background-size: 16px 16px; mask-image: linear-gradient(120deg, transparent 30%, #000); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000); }
.path-art .glyph { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,0.18); backdrop-filter: blur(6px); }
.path-art .glyph .icon { width: 24px; height: 24px; }
.path-art .tag { align-self: flex-start; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(0,0,0,0.22); }
.path-art .row { display: flex; justify-content: space-between; align-items: flex-start; }
.path-art .big { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.03em; line-height: 1; }
.path-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.path-body h3 { font-size: 1.12rem; }
.path-body p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.path-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: var(--muted); font-size: 0.84rem; }
.path-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.p-core { --p1: #2456e6; --p2: #12b5d0; }
.p-agents { --p1: #5b2fe0; --p2: #b07cff; }
.p-eng { --p1: #00786c; --p2: #2fd3b5; }
.p-lead { --p1: #c2410c; --p2: #f6a93b; }

.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width 0.6s var(--ease); }
.bar.ok > i { background: linear-gradient(90deg, #0a9a5c, #3ad08f); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
.bento > * { grid-column: span 2; padding: 1.75rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.bento .wide { grid-column: span 4; }
.bento .full { grid-column: 1 / -1; }
.bento .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); margin-bottom: 1.1rem; }
.bento h3 { font-size: 1.15rem; margin-bottom: 0.45rem; }
.bento p { color: var(--muted); font-size: 0.95rem; }
.bento .feature-glow::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(47,107,255,0.25), transparent 70%); pointer-events: none; }
.mini-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.mini-steps span { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; }
.mini-steps span b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 0.7rem; color: #fff; background: var(--grad); }
@media (max-width: 980px) { .bento > *, .bento .wide { grid-column: span 3; } .bento .full { grid-column: 1 / -1; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento .wide, .bento .full { grid-column: auto; } }

/* ---------- Curriculum accordion ---------- */
.curriculum { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.curriculum details + details { border-top: 1px solid var(--border); }
.curriculum summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; transition: background-color 0.2s; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum summary:hover { background: var(--surface-2); }
.curriculum .mod-badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 0.9rem; background: var(--brand-soft); color: var(--brand); }
.curriculum .mod-badge.done { background: var(--ok); color: #fff; }
.curriculum summary h3 { font-size: 1rem; }
.curriculum summary p { color: var(--muted); font-size: 0.86rem; margin-top: 0.1rem; }
.curriculum .sum-meta { color: var(--muted); font-size: 0.84rem; white-space: nowrap; text-align: right; }
.curriculum .chev { color: var(--muted); transition: transform 0.25s var(--ease); }
.curriculum details[open] .chev { transform: rotate(180deg); }
.lesson-list { list-style: none; padding: 0.25rem 0.75rem 0.85rem; }
.lesson-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0.85rem; align-items: center; min-height: 52px; padding: 0.55rem 0.6rem; border-radius: 12px; text-decoration: none; color: var(--text); transition: background-color 0.2s; }
.lesson-row:hover { background: var(--surface-2); color: var(--text); }
.lesson-row[aria-current="page"] { background: var(--brand-soft); }
.lesson-row .lid { color: var(--muted); font-size: 0.8rem; font-weight: 600; margin-right: 0.45rem; font-variant-numeric: tabular-nums; }
.lesson-row .t { font-weight: 500; font-size: 0.94rem; }
.lesson-row .dur { color: var(--muted); font-size: 0.82rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.3rem; }
@media (max-width: 640px) {
  .curriculum summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .curriculum .sum-meta { display: none; }
  .lesson-row .dur { display: none; }
}

.sdot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); color: var(--muted); flex: none; }
.sdot .icon { width: 13px; height: 13px; stroke-width: 3; }
.sdot.in_progress { border-color: var(--brand); background: conic-gradient(var(--brand) 0 50%, transparent 50% 100%); }
.sdot.submitted { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.sdot.completed { border-color: var(--ok); background: var(--ok); color: #fff; }
.sdot.locked { border-style: dashed; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.plan { padding: 2rem; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 0.6rem; position: relative; background: var(--surface); border: 1px solid var(--border); }
.plan.featured { box-shadow: var(--glow); }
.plan-tag { position: absolute; top: -13px; left: 2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--grad); }
.plan h3 { font-size: 1.2rem; }
.price { font-family: var(--font-head); font-weight: 800; font-size: 3rem; letter-spacing: -0.04em; line-height: 1.1; }
.price span { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; display: grid; gap: 0.7rem; margin: 1rem 0 1.5rem; flex: 1; }
.plan li { display: flex; gap: 0.65rem; color: var(--text-2); font-size: 0.95rem; }
.plan li .icon { color: var(--ok); margin-top: 0.2rem; }
.plan .note { font-size: 0.85rem; color: var(--muted); text-align: center; }
.plan .status:empty { display: none; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 0.75rem; }
.faq details { border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 1.35rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 600; font-family: var(--font-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.25s var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--brand); }
.faq details p { padding: 0 1.35rem 1.25rem; color: var(--text-2); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(2rem, 5vw, 3.75rem); color: #fff; background: radial-gradient(500px 300px at 90% 0%, rgba(25,212,228,0.35), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(123,60,246,0.45), transparent 70%), linear-gradient(135deg, #0b1d4d, #1b3fa6); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 0.5rem; }
.cta-band p { color: #c9d6ff; font-size: 1.05rem; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Page header (inner) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--hero-bg); border-bottom: 1px solid var(--border); }
.page-hero .container { padding-top: 56px; padding-bottom: 48px; position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0.85rem 0 0.75rem; letter-spacing: -0.03em; }
.page-hero p.lead { color: var(--text-2); font-size: 1.1rem; max-width: 46rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.86rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

/* ---------- Dashboard ---------- */
.dash-hero { padding-top: 40px; padding-bottom: 28px; }
.dash-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 0.4rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; }
.continue-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 1.75rem; color: #fff; background: radial-gradient(420px 260px at 100% 0%, rgba(25,212,228,0.35), transparent 70%), radial-gradient(420px 260px at 0% 100%, rgba(123,60,246,0.45), transparent 70%), linear-gradient(135deg, #0b1d4d, #2047b8); display: flex; flex-direction: column; gap: 1rem; min-height: 240px; }
.continue-card .k { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #9fd3ff; }
.continue-card h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.continue-card .meta { color: #c9d6ff; font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.continue-card .meta span { display: inline-flex; gap: 0.4rem; align-items: center; }
.continue-card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ring-card { padding: 1.5rem; display: flex; gap: 1.25rem; align-items: center; }
.ring { width: 120px; height: 120px; flex: none; }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: url(#ringGrad); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.8s var(--ease); }
.ring text { fill: var(--text); font-family: var(--font-head); font-weight: 800; font-size: 22px; }
.ring text.s { fill: var(--muted); font-family: var(--font-body); font-weight: 600; font-size: 10px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.25rem; }
.kpi { padding: 1.2rem 1.3rem; }
.kpi .v { font-family: var(--font-head); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.kpi .l { color: var(--muted); font-size: 0.86rem; }
.kpi .ic { float: right; color: var(--brand); }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } }

.path-rows { display: grid; gap: 1rem; }
.path-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 1rem; align-items: center; text-decoration: none; color: var(--text); padding: 0.4rem; border-radius: 12px; }
.path-row:hover { background: var(--surface-2); color: var(--text); }
.path-row .pi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--p1), var(--p2)); }
.path-row .nm { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; display: flex; justify-content: space-between; gap: 1rem; }
.path-row .nm span { color: var(--muted); font-weight: 500; font-size: 0.84rem; }

/* ---------- Path detail ---------- */
.path-hero { color: #fff; position: relative; overflow: hidden; background: radial-gradient(600px 300px at 90% 0%, rgba(255,255,255,0.18), transparent 70%), linear-gradient(135deg, var(--p1), var(--p2)); }
.path-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.2) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(110deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(110deg, transparent 40%, #000); pointer-events: none; }
.path-hero .container { position: relative; z-index: 1; padding-top: 52px; padding-bottom: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.path-hero .crumbs, .path-hero .crumbs a { color: rgba(255,255,255,0.8); }
.path-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0.8rem 0 0.6rem; }
.path-hero p { color: rgba(255,255,255,0.88); max-width: 40rem; font-size: 1.05rem; }
.path-hero .facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.2rem; font-size: 0.92rem; }
.path-hero .facts span { display: inline-flex; gap: 0.4rem; align-items: center; }
.path-hero .ring .track { stroke: rgba(255,255,255,0.25); }
.path-hero .ring .val { stroke: #fff; }
.path-hero .ring text { fill: #fff; }
.path-hero .ring text.s { fill: rgba(255,255,255,0.8); }
@media (max-width: 760px) { .path-hero .container { grid-template-columns: 1fr; } }
.module-timeline { list-style: none; display: grid; gap: 1.25rem; position: relative; }
.module-timeline::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(var(--brand), var(--violet)); opacity: 0.35; }
.mt-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1.1rem; }
.mt-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; background: var(--surface); border: 2px solid var(--brand); color: var(--brand); position: relative; z-index: 1; }
.mt-item.done .mt-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.mt-card { padding: 1.25rem 1.25rem 0.75rem; }
.mt-card header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.mt-card h2 { font-size: 1.15rem; }
.mt-card .outcome { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.5rem; }
.mt-card .lesson-list { padding: 0 0 0.5rem; margin: 0 -0.6rem; }

/* ---------- Lesson player ---------- */
.lesson-top { position: sticky; top: var(--header-h); z-index: 30; background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.lesson-top .container { display: flex; align-items: center; gap: 0.75rem; min-height: 60px; }
.lesson-top .title { min-width: 0; flex: 1; }
.lesson-top .title small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.lesson-top .title strong { display: block; font-family: var(--font-head); font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-top .nav-btns { display: flex; gap: 0.4rem; }
.lesson-progress { height: 3px; background: var(--surface-3); }
.lesson-progress i { display: block; height: 100%; background: var(--grad); transition: width 0.4s var(--ease); }

.player { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2rem; padding-top: 2rem; padding-bottom: 4rem; align-items: start; }
.outline { position: sticky; top: calc(var(--header-h) + 80px); max-height: calc(100dvh - var(--header-h) - 100px); overflow-y: auto; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.outline-head { padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--border); }
.outline-head h2 { font-size: 0.98rem; margin-bottom: 0.65rem; }
.outline-head .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.outline .curriculum { border: 0; border-radius: 0; }
.outline .curriculum summary { padding: 0.8rem 1rem; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.75rem; }
.outline .curriculum .mod-badge { width: 32px; height: 32px; font-size: 0.75rem; border-radius: 10px; }
.outline .curriculum summary h3 { font-size: 0.86rem; }
.outline .curriculum .sum-meta { font-size: 0.78rem; }
.outline .lesson-list { padding: 0 0.5rem 0.6rem; }
.outline .lesson-row { grid-template-columns: 24px minmax(0, 1fr); min-height: 44px; gap: 0.6rem; }
.outline .lesson-row .dur { display: none; }
.outline .lesson-row .t { font-size: 0.86rem; }
.outline .sdot { width: 22px; height: 22px; }
.outline-backdrop { display: none; }
@media (max-width: 1024px) {
  .player { grid-template-columns: 1fr; }
  .outline { position: fixed; top: 0; left: 0; bottom: 0; width: min(88vw, 360px); max-height: none; z-index: 100; border-radius: 0; transform: translateX(-105%); transition: transform 0.3s var(--ease); }
  .outline.open { transform: none; box-shadow: var(--shadow-3); }
  .outline-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(4, 8, 22, 0.55); z-index: 99; }
}
@media (min-width: 1025px) { .outline-toggle { display: none; } }

.lesson-head { margin-bottom: 1.5rem; }
.lesson-head .k { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.85rem; }
.lesson-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; margin-bottom: 1rem; }
.objective { display: flex; gap: 0.9rem; padding: 1rem 1.15rem; border-radius: var(--r); background: var(--brand-soft); border: 1px solid transparent; color: var(--text); }
.objective .icon { color: var(--brand); width: 1.4em; height: 1.4em; margin-top: 0.1rem; }
.objective strong { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); margin-bottom: 0.15rem; }

.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; margin: 1.5rem 0 1.25rem; }
.stepper a { display: flex; align-items: center; gap: 0.55rem; min-height: 48px; padding: 0.4rem 0.7rem; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.86rem; border: 1px solid var(--border); background: var(--surface); transition: border-color 0.2s, color 0.2s, background-color 0.2s; }
.stepper a:hover { color: var(--text); border-color: var(--border-strong); }
.stepper .n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 0.75rem; background: var(--surface-3); color: var(--muted); flex: none; }
.stepper a.done .n { background: var(--ok); color: #fff; }
.stepper a[aria-current="step"] { color: var(--text); border-color: var(--brand); box-shadow: var(--glow); }
.stepper a[aria-current="step"] .n { background: var(--grad); color: #fff; }
@media (max-width: 760px) {
  .stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stepper a { flex-direction: column; justify-content: center; gap: 0.25rem; padding: 0.45rem 0.2rem; font-size: 0.7rem; min-height: 60px; text-align: center; }
}

.step-panel { animation: rise 0.35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.reading { padding: clamp(1.4rem, 3vw, 2.25rem); font-size: 1.04rem; line-height: 1.8; color: var(--text-2); }
.reading > * + * { margin-top: 1.05rem; }
.reading strong { color: var(--text); }
.reading h2.step-title { font-size: 1.35rem; color: var(--text); display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.25rem; }
.reading h2.step-title .icon { color: var(--brand); }
.reading code, code { font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--border); padding: 0.05em 0.4em; border-radius: 6px; overflow-wrap: anywhere; }
.callout { border-radius: var(--r); padding: 1.1rem 1.25rem; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--brand); }
.callout-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); margin-bottom: 0.4rem; }
.callout.example { border-left-color: var(--violet); }
.callout.example .callout-title { color: var(--brand-2); }
.callout.mastery { border-left-color: var(--ok); }
.callout.mastery .callout-title { color: var(--ok); }
.callout.info { border-left-color: var(--cyan); }
.callout.info .callout-title { color: #0e8fa3; }
:root[data-theme="dark"] .callout.info .callout-title { color: var(--cyan); }

.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); font-weight: 700; color: var(--text); font-size: 0.82rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.work-field { margin-top: 1.25rem; }
.work-field label { display: block; font-weight: 700; color: var(--text); font-size: 1rem; margin-bottom: 0.3rem; }
.work-field .prompt { color: var(--text-2); margin-bottom: 0.75rem; }
textarea, .field input:not([type="checkbox"]) {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.8rem 0.95rem; transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
textarea { min-height: 11rem; resize: vertical; line-height: 1.6; }
textarea:focus, .field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
textarea[readonly] { opacity: 0.85; }
.save-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.84rem; color: var(--muted); min-height: 1.4em; }
.step-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.step-actions .right { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-left: auto; }
.input-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }

.status-panel { display: grid; gap: 1rem; }
.timeline-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.timeline-steps li { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.timeline-steps li.reached { color: var(--ok); background: var(--ok-soft); border-color: transparent; }

.gate { padding: clamp(2rem, 5vw, 3.5rem) 1.5rem; text-align: center; display: grid; justify-items: center; gap: 0.75rem; border-radius: var(--r-lg); }
.gate .gate-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 16px 40px rgba(47,107,255,0.35); }
.gate .gate-ic .icon { width: 28px; height: 28px; }
.gate h2 { font-size: 1.5rem; }
.gate p { color: var(--muted); max-width: 32rem; }
.gate .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 0.5rem; }
.gate .status:empty { display: none; }
.gate-preview { list-style: none; display: grid; gap: 0.5rem; width: 100%; max-width: 440px; margin: 0.75rem 0; text-align: left; }
.gate-preview li { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.85rem; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 0.92rem; }
.gate-preview .icon { color: var(--muted); }

.next-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.4rem; margin-top: 1.25rem; text-decoration: none; color: var(--text); }
.next-card:hover { color: var(--text); }
.next-card small { display: block; color: var(--muted); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.next-card strong { font-family: var(--font-head); font-size: 1.05rem; }

/* ---------- Practice / glossary / sources ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }
.case-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.35rem; text-decoration: none; color: var(--text); }
.case-card:hover { color: var(--text); }
.case-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.case-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; background: linear-gradient(135deg, var(--p1), var(--p2)); }
.case-card h3 { font-size: 1.02rem; }
.case-card p { color: var(--muted); font-size: 0.86rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.filters button { min-height: 40px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-weight: 600; font-size: 0.88rem; }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.search-field { position: relative; flex: 1; min-width: 240px; }
.search-field .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field input { width: 100%; min-height: 48px; padding: 0 1rem 0 2.6rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.search-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.az { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 1rem 0 1.5rem; }
.az a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-weight: 700; font-size: 0.82rem; text-decoration: none; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.az a:hover { border-color: var(--brand); color: var(--brand); }
.term { padding: 1.15rem 1.25rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.term h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.term p { color: var(--text-2); font-size: 0.92rem; }
.term .first { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); }
.source { padding: 1.25rem 1.35rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.source .sid { display: inline-block; font-size: 0.74rem; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 0.15rem 0.55rem; border-radius: 8px; margin-bottom: 0.5rem; }
.source h3 { font-size: 1rem; }
.source .url { display: block; font-size: 0.85rem; overflow-wrap: anywhere; margin: 0.3rem 0 0.6rem; }
.source p { font-size: 0.9rem; color: var(--text-2); }
:target { scroll-margin-top: calc(var(--header-h) + 20px); }

.notice { padding: 0.9rem 1.1rem; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--text); border: 1px solid transparent; font-size: 0.94rem; }
.notice.info { background: var(--brand-soft); }
.notice.success { background: var(--ok-soft); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100dvh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { position: relative; overflow: hidden; color: #fff; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; background: radial-gradient(500px 340px at 100% 0%, rgba(25,212,228,0.35), transparent 70%), radial-gradient(500px 340px at 0% 100%, rgba(123,60,246,0.5), transparent 70%), linear-gradient(135deg, #071334, #1b3fa6); }
.auth-side h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 26rem; }
.auth-side ul { list-style: none; display: grid; gap: 0.9rem; }
.auth-side li { display: flex; gap: 0.75rem; color: #d7e1ff; }
.auth-side li .icon { color: #5be3a0; margin-top: 0.2rem; }
.auth-main { display: grid; place-items: center; padding: 2.5rem 1.25rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.85rem; margin-bottom: 0.35rem; }
.auth-card > .muted { margin-bottom: 1.5rem; }
.social { display: grid; gap: 0.65rem; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 0.7rem; min-height: 50px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; transition: background-color 0.2s, border-color 0.2s; }
.social-btn:hover { background: var(--surface-2); color: var(--text); }
.social-btn svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 0.85rem; color: var(--muted); font-size: 0.84rem; margin: 1.4rem 0 0.4rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.field { margin-top: 1rem; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.field .pw { position: relative; }
.field .pw input { padding-right: 3rem; }
.field .pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; }
.field .hint { color: var(--muted); font-size: 0.84rem; margin-top: 0.35rem; }
.form-row { display: flex; justify-content: flex-end; margin-top: 0.6rem; font-size: 0.88rem; }
.form-status { margin-top: 0.85rem; padding: 0.7rem 0.9rem; border-radius: 10px; background: var(--warn-soft); font-size: 0.9rem; }
.form-status.ok { background: var(--ok-soft); }
.form-status:empty { display: none; }
.auth-alt { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Account ---------- */
.account-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.25rem; }
.account-grid h2 { font-size: 1.1rem; margin-bottom: 0.9rem; }
.providers { list-style: none; display: grid; gap: 0.75rem; }
.providers li { display: flex; align-items: center; gap: 0.75rem; }
.providers li > span { flex: 1; font-weight: 600; }
.providers svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }

/* ---------- Command palette ---------- */
.palette-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(4, 8, 22, 0.55); backdrop-filter: blur(4px); display: grid; place-items: start center; padding: 12vh 16px 16px; animation: fade 0.15s; }
.palette { width: 100%; max-width: 640px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-3); overflow: hidden; animation: pop 0.18s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 0.75rem; padding: 0 1.1rem; border-bottom: 1px solid var(--border); }
.palette-input .icon { color: var(--muted); }
.palette-input input { flex: 1; min-height: 60px; border: 0; background: none; color: var(--text); font: inherit; font-size: 1.05rem; outline: none; }
.palette-input kbd { font-size: 0.72rem; padding: 0.15rem 0.45rem; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted); }
.palette-results { max-height: 55vh; overflow-y: auto; padding: 0.5rem; }
.palette-group { padding: 0.6rem 0.75rem 0.3rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.palette-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.75rem; border-radius: 12px; text-decoration: none; color: var(--text); }
.palette-item .pi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); flex: none; }
.palette-item small { display: block; color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item > span:last-child { min-width: 0; }
.palette-item.active, .palette-item:hover { background: var(--brand-soft); color: var(--text); }
.palette-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
mark { background: rgba(255, 214, 102, 0.5); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2rem; padding: 56px 0 32px; }
.footer-grid h4 { font-size: 0.85rem; margin-bottom: 0.85rem; }
.footer-grid ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-grid p { color: var(--muted); font-size: 0.92rem; margin-top: 0.9rem; max-width: 22rem; }
.footer-brand img { height: 32px; }
.footer-brand .logo-dark { display: none; }
:root[data-theme="dark"] .footer-brand .logo-dark { display: inline; }
:root[data-theme="dark"] .footer-brand .logo-light { display: none; }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.25rem 0 1.75rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; padding: 0.8rem 1.1rem; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow-3); display: flex; align-items: center; gap: 0.5rem; animation: rise 0.25s var(--ease); }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .preview .pv-main, .pv-float { animation: none; } }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.noscript { padding: 2rem; text-align: center; }

@media print {
  .site-header, .site-footer, .outline, .lesson-top, .stepper, .step-actions { display: none !important; }
  .player { display: block; }
}

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; padding-top: 2rem; padding-bottom: 4rem; align-items: start; }
.admin-main, .admin-nav { min-width: 0; }
.admin-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 0.2rem; }
.admin-nav .eyebrow { margin: 0 0 0.6rem 0.75rem; }
.admin-nav a { display: flex; align-items: center; gap: 0.65rem; min-height: 44px; padding: 0 0.85rem; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.admin-head { margin-bottom: 1.5rem; }
.admin-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.25rem; }
.admin-h2 { font-size: 1.05rem; margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.admin-h2 svg { width: 20px; height: 20px; }
.admin-list { list-style: none; display: grid; gap: 0.25rem; }
.admin-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.5rem; border-radius: 12px; text-decoration: none; color: var(--text); }
.admin-list a:hover { background: var(--surface-2); color: var(--text); }
.admin-list small, .cell-user small { display: block; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.avatar.sm { width: 36px; height: 36px; display: grid; place-items: center; font-size: 0.9rem; cursor: default; }
.avatar.lg { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.3rem; cursor: default; flex: none; }
.checklist { list-style: none; display: grid; gap: 0.6rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--muted); }
.checklist li .icon { margin-top: 0.2rem; color: var(--danger); }
.checklist li.ok { color: var(--text); }
.checklist li.ok .icon { color: var(--ok); }
.data-table td, .data-table th { vertical-align: middle; }
.data-table tbody tr:hover { background: var(--surface-2); }
.cell-user { text-decoration: none; color: var(--text); }
.cell-user:hover { color: var(--brand); }
.pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.admin-actions.col { flex-direction: column; align-items: stretch; }
.admin-actions.col .btn { justify-content: flex-start; }
.btn.danger { --b-fg: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.toggle { display: flex; align-items: center; gap: 0.6rem; margin-top: 1rem; font-weight: 500; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.grant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.field input[type="date"] { width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.95rem; }
.submission { margin-bottom: 1rem; }
.submission header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.submission header small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.answers h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.4rem; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0.85rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.95rem; max-height: 320px; overflow-y: auto; }
.settings { display: grid; gap: 1.25rem; }
.settings textarea, .submission textarea { min-height: 5rem; }
.settings-save { position: sticky; bottom: 0; padding: 1rem 0; background: linear-gradient(transparent, var(--bg) 35%); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.settings-save .form-status { margin-top: 0; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; gap: 1rem; }
  .admin-nav { position: static; display: flex; overflow-x: auto; gap: 0.35rem; padding-bottom: 0.25rem; }
  .admin-nav .eyebrow { display: none; }
  .admin-nav a { flex: none; }
  .answers { grid-template-columns: 1fr; }
  .data-table .hide-sm { display: none; }
}
