/* ---------- tokens ----------
   2026-11 redesign: warm paper by day, near-black by night, one amber brand colour (#f5a524) for fills; text links use
   --primary, a darker amber in the light theme so it stays readable (AA). Levels read as a ladder: greens, blues, amber. */
:root {
  color-scheme: light;
  --bg: #fafaf9; --surface: #ffffff; --surface-2: #f4f4f2; --text: #111111; --muted: #57534e; --line: #e7e5e4; --placeholder: #78716c;
  --primary: #b45309; --primary-2: #d97706; --primary-ink: #ffffff; --primary-soft: #fef3c7; --grad-from: #d97706; --grad-to: #d97706;
  --brand: #f5a524; --brand-ink: #111111;
  --accent: #f5a524; --ok: #166534; --ok-soft: #e3f5ea; --err: #dc2626; --err-ink: #ffffff;
  --code-bg: #0c0d0f; --code-ink: #e4e4e7; --inline-code: #f1efeb;
  --intern: #5b6573; --junior: #15803d; --strong-junior: #0d6660; --middle: #1d4ed8; --strong-middle: #4338ca; --senior: #b45309; --staff: #9a3412;
  --glow: .35; --radius: 16px; --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .06);
}
/* dark: the header toggle sets data-theme; without a choice the OS setting decides */
:root[data-theme="dark"] {
  color-scheme: dark;
  --glow: .5; --bg: #08090a; --surface: #111214; --surface-2: #1a1b1f; --text: #f4f4f5; --muted: #a1a1aa; --line: #26272c; --placeholder: #8b8b93;
  --primary: #f5a524; --primary-2: #ffc25c; --primary-ink: #111111; --primary-soft: #2a1f0c; --grad-from: #f5a524; --grad-to: #ffc25c;
  --brand: #f5a524; --brand-ink: #111111;
  --accent: #f5a524; --ok: #4ade80; --ok-soft: #12261a; --err: #f87171; --err-ink: #1f0b0b;
  --code-bg: #0c0d0f; --code-ink: #e4e4e7; --inline-code: #1f2025;
  --intern: #aab2be; --junior: #7fd19f; --strong-junior: #6ccabd; --middle: #7aa2ff; --strong-middle: #a5b4fc; --senior: #f5a524; --staff: #f19a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --glow: .5; --bg: #08090a; --surface: #111214; --surface-2: #1a1b1f; --text: #f4f4f5; --muted: #a1a1aa; --line: #26272c; --placeholder: #8b8b93;
    --primary: #f5a524; --primary-2: #ffc25c; --primary-ink: #111111; --primary-soft: #2a1f0c; --grad-from: #f5a524; --grad-to: #ffc25c;
    --brand: #f5a524; --brand-ink: #111111;
    --accent: #f5a524; --ok: #4ade80; --ok-soft: #12261a; --err: #f87171; --err-ink: #1f0b0b;
    --code-bg: #0c0d0f; --code-ink: #e4e4e7; --inline-code: #1f2025;
    --intern: #aab2be; --junior: #7fd19f; --strong-junior: #6ccabd; --middle: #7aa2ff; --strong-middle: #a5b4fc; --senior: #f5a524; --staff: #f19a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 Geist, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
/* browsers give form controls their own font (Arial, system UI): everything uses the site's Geist */
button, input, select, textarea, optgroup { font-family: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
p, li { text-wrap: pretty; }
/* the parts the browser draws: placeholders readable in both themes (AA), selection and caret in the brand colour */
::placeholder { color: var(--placeholder); opacity: 1; }
::selection { background: color-mix(in srgb, var(--brand) 40%, transparent); }
input, textarea { caret-color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }
/* a heading for screen readers only (lists of cards still have a proper outline) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.section { padding-top: 40px; padding-bottom: 8px; }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: 28px; margin: 0 0 4px; }
.muted { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 6px 18px -6px rgba(245, 165, 36, .55); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 14px; font-size: 14px; box-shadow: none; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-light { background: #fff; color: #111111; box-shadow: none; }
.btn-done { background: var(--ok); color: #fff; box-shadow: none; }
.btn-danger { background: transparent; color: var(--err); border-color: var(--err); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.logo:hover { text-decoration: none; }
.logo b { color: inherit; font-weight: inherit; }
.logo-mark { width: 32px; height: 32px; flex: none; display: block; }
.logo-mark svg { width: 32px; height: 32px; display: block; }
.header-search { flex: 1 1 170px; min-width: 150px; max-width: 320px; margin-left: 4px; }
.header-search input { width: 100%; font: inherit; font-size: 14px; padding: 8px 12px 8px 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a93a8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m14 14-3.2-3.2'/%3E%3C/svg%3E") no-repeat 11px center;
  color: var(--text); }
.main-nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
/* menu items keep their size and stay on one line; only the search box gives way */
.main-nav > * { flex-shrink: 0; white-space: nowrap; }
/* the header gets a little more width than the page, so the full menu fits on ordinary laptop screens */
.site-header > .wrap { max-width: 1280px; }
.main-nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.main-nav a:hover, .main-nav a.active { color: var(--text); text-decoration: none; }
.main-nav a.btn { color: var(--brand-ink); height: 36px; padding: 0 16px; border-radius: 10px; line-height: 1; }
.nav-toggle { display: none; width: 40px; height: 40px; margin-left: auto; padding: 0; cursor: pointer; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--brand); color: var(--brand-ink) !important; text-transform: uppercase; }
/* language menu and theme toggle */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: var(--text); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 140px; }
.lang-menu li a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 14px; }
.lang-menu li a:hover, .lang-menu li a.active { background: var(--primary-soft); text-decoration: none; }
/* "more" menu: the less used sections */
.more-menu { position: relative; }
.more-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  color: var(--muted); font-weight: 600; font-size: 15px; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary:hover, .more-menu summary.active { color: var(--text); }
.more-menu summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.more-menu[open] summary svg { transform: rotate(180deg); }
.more-menu ul { position: absolute; left: -10px; top: calc(100% + 10px); margin: 0; padding: 6px; list-style: none; z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 170px; }
.main-nav .more-menu li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 14px; }
.main-nav .more-menu li a:hover, .main-nav .more-menu li a.active { background: var(--primary-soft); text-decoration: none; }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 17px; padding: 0; }
.theme-toggle:hover { border-color: var(--brand); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
/* a member's own photo in the same round box as the letter */
.avatar img, img.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
img.avatar { width: 36px; height: 36px; } img.avatar.big { width: 64px; height: 64px; }
.avatar:has(img) { padding: 0; background: none; overflow: hidden; }
img.company-logo.person { object-fit: cover; padding: 0; background: var(--surface-2); }
.photo-box { display: grid; gap: 6px; margin: 14px 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.photo-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photo-form input[type=file] { max-width: 100%; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 24px; background:
  radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--brand) calc(18% * var(--glow)), transparent), transparent),
  radial-gradient(700px 300px at -10% 10%, color-mix(in srgb, var(--accent) calc(12% * var(--glow)), transparent), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-soft);
  padding: 5px 12px; border-radius: 999px; }
.hero h1, .topic-hero h1 { font-size: clamp(34px, 5.2vw, 56px); margin: 16px 0 14px; }
.grad { background: linear-gradient(135deg, var(--grad-from), var(--grad-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 560px; margin: 0 0 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.stats { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 36px; }
.stats b { display: block; font-size: 28px; }
.stats span { color: var(--muted); font-size: 14px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow);
  transform: rotate(1.5deg); }
.mock-video { aspect-ratio: 16/9; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 34px;
  background: radial-gradient(420px 220px at 100% 100%, rgba(245, 165, 36, .45), transparent 70%), #111214; }
.mock-video span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.mock-title { font-weight: 800; margin: 14px 4px 6px; }
.mock-tags { display: flex; gap: 6px; margin: 0 4px 12px; }
.mock-quiz { background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 6px; font-size: 14px; }
.mock-q { font-weight: 700; }
.mock-opt { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
.mock-opt.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 700; }

/* ---------- welcome (signed in) ---------- */
.welcome { padding: 40px 0 8px; }
.welcome-grid { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: center; }
.welcome h1 { font-size: 34px; margin: 0 0 4px; }
.continue-card { position: relative; display: grid; gap: 4px; padding: 20px 80px 20px 22px; border-radius: var(--radius); color: var(--brand-ink);
  background: var(--brand); box-shadow: 0 12px 30px -10px rgba(245, 165, 36, .55); }
.continue-card:hover { text-decoration: none; transform: translateY(-2px); }
.continue-card.done { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.continue-card.wide { margin: 24px 0; }
.continue-label { font-size: 13px; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.continue-title { font-size: 19px; font-weight: 800; line-height: 1.3; }
.continue-meta { font-size: 14px; opacity: .85; }
.play { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .12); font-size: 18px; }

/* ---------- progress ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ok), #22c55e); min-width: 0; transition: width .4s; }

/* ---------- topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.topic-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--brand); }
.topic-card h3 { margin: 6px 0 0; font-size: 20px; }
.topic-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.topic-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--primary-soft); }
.topic-icon.big { width: 76px; height: 76px; font-size: 40px; border-radius: 20px; flex: none; }
.topic-meta { display: flex; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 8px; }
.topic-meta .pct { margin-left: auto; color: var(--ok); }
.soon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.chip { font-size: 14px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); }

/* ---------- tags ---------- */
.tags, .row-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
a.tag:hover { text-decoration: none; color: var(--text); }
.tag.lvl-junior { color: var(--junior); background: color-mix(in srgb, var(--junior) 12%, transparent); }
.tag.lvl-middle { color: var(--middle); background: color-mix(in srgb, var(--middle) 12%, transparent); }
.tag.lvl-senior { color: var(--senior); background: color-mix(in srgb, var(--senior) 12%, transparent); }
.tag.lvl-intern { color: var(--intern); background: color-mix(in srgb, var(--intern) 12%, transparent); }
.tag.lvl-strong_junior { color: var(--strong-junior); background: color-mix(in srgb, var(--strong-junior) 14%, transparent); }
.tag.lvl-strong_middle { color: var(--strong-middle); background: color-mix(in srgb, var(--strong-middle) 12%, transparent); }
.tag.lvl-staff { color: var(--staff); background: color-mix(in srgb, var(--staff) 12%, transparent); }
.tag.video { color: var(--primary); background: var(--primary-soft); }
.tag.quiz { color: var(--primary); background: var(--primary-soft); }

/* ---------- lesson lists ---------- */
.lesson-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, transform .15s; min-width: 0; }
.lesson-row:hover { text-decoration: none; border-color: var(--brand); transform: translateX(2px); }
.lesson-row .num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: var(--surface-2); color: var(--muted); }
.lesson-row.is-done .num { background: var(--ok-soft); color: var(--ok); }
.lesson-text { flex: 1; min-width: 0; display: grid; }
.lesson-text b { font-size: 16px; overflow-wrap: anywhere; }
.lesson-text small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact .lesson-row { padding: 10px 14px; }
.hint-login { color: var(--muted); margin-top: 18px; }

/* ---------- topic page ---------- */
.topic-hero { padding: 36px 0 28px; border-bottom: 1px solid var(--line);
  background: radial-gradient(800px 300px at 90% -20%, color-mix(in srgb, var(--brand) calc(16% * var(--glow)), transparent), transparent); }
.topic-hero-row { display: flex; gap: 20px; align-items: center; margin: 12px 0 16px; }
.topic-hero-row > div { min-width: 0; }
.topic-hero-row h1 { font-size: clamp(26px, 4.5vw, 44px); margin: 0 0 4px; overflow-wrap: anywhere; }
@media (max-width: 480px) { .topic-hero-row { gap: 14px; } .topic-icon.big { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; } }
.topic-hero-row .lead { margin: 0; }
.topic-hero-row .muted { margin: 4px 0 0; }
.topic-progress { max-width: 420px; margin-bottom: 18px; font-weight: 600; color: var(--muted); font-size: 14px; }
.crumb { font-size: 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--text); }

/* ---------- lesson page ---------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; padding-top: 22px; align-items: start; }
.lesson-main .crumb { margin-bottom: 12px; }
.player { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

.video-soon { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px;
  border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.video-soon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.player.soon { display: grid; place-items: center; text-align: center; color: #e0e7ff;
  background: radial-gradient(520px 260px at 100% 100%, rgba(245, 165, 36, .35), transparent 70%), #111214; }
.soon-inner { display: grid; gap: 6px; padding: 20px; }
.soon-icon { font-size: 44px; }
.soon-inner b { font-size: 20px; color: #fff; }
.lesson-head { margin: 22px 0 6px; }
.lesson-head h1 { font-size: clamp(26px, 3.6vw, 36px); margin: 10px 0 8px; }
.lesson-head .lead { margin: 0; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 24px 14px; margin-top: 18px; }
.block h2 { font-size: 21px; margin: 18px 0 10px; }
.block.highlight { border-left: 5px solid var(--accent); }
.followups { padding-left: 20px; }
.followups li { margin: 6px 0; }
.md pre { background: var(--code-bg); color: var(--code-ink); padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.55; }
/* long code lines scroll inside their box instead of widening the page */
.md { min-width: 0; overflow-wrap: anywhere; }
.md pre { max-width: 100%; }
.md code { font-family: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.md :not(pre) > code { background: var(--inline-code); padding: 2px 6px; border-radius: 6px; }
.md table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 15px; margin: 12px 0; }
.md th { background: var(--surface-2); }
.md th, .md td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

.quiz-q { font-weight: 700; font-size: 17px; }
.quiz-options { display: grid; gap: 8px; }
.quiz-opt { text-align: left; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); cursor: pointer; transition: border-color .12s; }
.quiz-opt:hover:not(:disabled) { border-color: var(--brand); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.quiz-opt.wrong { border-color: var(--err); color: var(--err); }
.quiz-result { font-weight: 800; margin: 14px 0 4px; }
.quiz-result.ok { color: var(--ok); } .quiz-result.err { color: var(--err); }

.lesson-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.lesson-actions .spacer { flex: 1; }
.lesson-actions form { margin: 0; }

.lesson-side { position: sticky; top: 84px; display: grid; gap: 16px; min-width: 0; }
.side-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.side-title { font-weight: 800; color: var(--text); font-size: 17px; }
.side-progress { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 0 4px; }
.side-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
.side-list a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; color: var(--text); font-size: 14px; line-height: 1.4;
  min-width: 0; overflow-wrap: anywhere; }
.side-list a:hover { background: var(--surface-2); text-decoration: none; }
.side-all { display: block; margin-top: 10px; padding: 8px; font-size: 14px; font-weight: 600; }
.side-list .num { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--surface-2); color: var(--muted); }
.side-list li.is-done .num { background: var(--ok-soft); color: var(--ok); }
.side-list li.current a { background: var(--primary-soft); font-weight: 700; }
.side-list li.current .num { background: var(--brand); color: var(--brand-ink); }
.lesson-side .subscribe { margin: 0; }
.lesson-side .subscribe form { flex-direction: column; }
.lesson-side .subscribe input { flex: none; width: 100%; min-width: 0; }

/* ---------- subscribe / cta ---------- */
.subscribe { scroll-margin-top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 40px 0;
  display: grid; gap: 12px; box-shadow: var(--shadow); }
.subscribe h3 { margin: 0; font-size: 19px; }
.subscribe p { margin: 4px 0 0; color: var(--muted); }
.subscribe form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe input { flex: 1 1 220px; min-width: 0; font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); }
.flash { font-weight: 700; margin: 8px 0; }
.flash.ok { color: var(--ok); } .flash.err, .err { color: var(--err); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 32px;
  border-radius: 22px; color: #f4f4f5; border: 1px solid #26272c;
  /* near-black with one amber glow in the corner, like the night theme: no brown wash */
  background: radial-gradient(520px 240px at 100% 0%, rgba(245, 165, 36, .32), transparent 70%), #111214; }
.cta-band h2 { margin: 0 0 6px; font-size: 26px; }
.cta-band p { margin: 0; color: #c9c9cf; }

/* ---------- courses ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--primary-2); }
.plan-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 25px; background: var(--primary-soft); color: var(--primary); }
.plan h3 { font-size: 22px; margin: 10px 0 6px; }
.plan p { color: var(--muted); margin: 0 0 12px; }
.plan ul { padding-left: 20px; margin: 0 0 16px; }
/* subscription: the plan's price, the line under a course's buy button, and the strip on the courses and profile pages */
.plan .plan-price { font-size: 22px; color: var(--text); }
.plan .plan-saving { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -6px; }
.plan .plan-saving .tag.sale { margin-left: 0; }
.sub-note { display: block; margin-top: 10px; font-weight: 700; }
/* contact the admin: one big card per way to reach them */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.contact-card { display: grid; gap: 4px; padding: 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.contact-card:hover { text-decoration: none; border-color: var(--brand); }
.contact-icon { font-size: 30px; }
.sub-banner { margin: 6px 0 18px; color: var(--text); }
a.sub-banner:hover { text-decoration: none; border-color: var(--brand); }
.badge { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }

/* ---------- search ---------- */
.search-big { display: flex; gap: 8px; margin: 10px 0 14px; }
.search-big input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 13px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin: 0; font-size: 30px; }
.profile-head .muted { margin: 2px 0 0; }
.push-right { margin-left: auto; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 26px 0 8px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card b { display: block; font-size: 30px; }
.stat-card span { color: var(--muted); font-size: 14px; }
.progress-table { display: grid; gap: 8px; }
.progress-row { display: grid; grid-template-columns: 46px 1fr 2fr 70px; gap: 14px; align-items: center; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); }
.progress-row:hover { text-decoration: none; border-color: var(--brand); }
.pr-name { font-weight: 700; }
/* orders and reviews: name, then amount and status on the right; wraps on phones */
.progress-row.status-row { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.status-row .pr-name { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.pr-bar .progress { margin: 0; }
.pr-num { text-align: right; color: var(--muted); font-weight: 700; font-size: 14px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px;
  background: radial-gradient(700px 400px at 50% 0%, color-mix(in srgb, var(--brand) calc(14% * var(--glow)), transparent), transparent); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 28px; }
@media (max-width: 400px) { .auth-card { padding: 22px 18px; } }
.auth-switch { text-align: center; color: var(--muted); margin: 16px 0 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; margin-top: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
/* inputs, selects and file pickers shrink with narrow screens instead of widening their card */
.form > *, .row3 > *, .row2 > *, .form fieldset > * { min-width: 0; }
.form input, .form select, .form textarea, input[type=file] { min-width: 0; max-width: 100%; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus, .subscribe input:focus, .search-big input:focus, .header-search input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--primary-2); }
.form textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.form fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 12px; }
.form legend { font-weight: 800; padding: 0 6px; }
.form .lang-choice { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.form .lang-choice label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.danger { margin: 20px 0 40px; }

/* ---------- admin ---------- */
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-top h1 { margin: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions form { margin: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
/* a table outside a .table-wrap scrolls on its own on narrow screens; on wide ones it keeps its full width */
@media (max-width: 960px) { :not(.table-wrap) > .admin-table { display: block; overflow-x: auto; } }
.admin pre { max-width: 100%; overflow-x: auto; }
.admin-table th { text-align: left; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table .cell-note { display: block; margin-top: 4px; }
.admin-table .cell-action { text-align: right; white-space: nowrap; }
.admin-table .nowrap { white-space: nowrap; }
/* the lesson list: one compact cell for what a lesson already has */
.ready-chips { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.chip-mini { padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap;
  background: transparent; color: var(--muted); border: 1px dashed var(--line); text-decoration: line-through; }
.chip-mini.on { background: var(--ok-soft); color: var(--ok); border: 1px solid transparent; text-decoration: none; }

/* the admin menu: a side column on wide screens, a row that scrolls sideways under the header on phones */
.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; max-width: 1160px; }
.admin-body { min-width: 0; }
.admin-shell.narrow .admin-body { max-width: 820px; }
.admin-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--text);
  font-size: 14px; font-weight: 600; }
.admin-nav a:hover { background: var(--surface-2); text-decoration: none; }
.admin-nav a.on { background: var(--primary-soft); color: var(--primary); }
.admin-nav-group { margin: 12px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--err); color: var(--err-ink);
  font-size: 12px; font-weight: 800; text-align: center; }
@media (max-width: 960px) {
  .admin-shell { display: block; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding: 6px; margin-bottom: 18px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { flex: none; white-space: nowrap; }
  .admin-nav-group { display: none; }
  .admin-nav .badge { margin-left: 4px; }
}

/* the admin's home: one card per kind of waiting work, each a link to where it is done */
.todo-title { margin-top: 28px; }
.todo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.todo-card { display: grid; gap: 4px; padding: 18px; border-radius: var(--radius); color: var(--text);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow); }
.todo-card:hover { text-decoration: none; border-color: var(--brand); }
.todo-card b { font-size: 26px; }
.todo-card span { color: var(--muted); font-size: 14px; }
.todo-card em { font-style: normal; font-weight: 700; color: var(--primary); margin-top: 6px; }
.todo-clear { padding: 18px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
a.stat-card:hover { text-decoration: none; border-color: var(--brand); }
a.stat-card { color: var(--text); }

/* a boxed section, and one that folds away (the expert's profile, the subscriber list) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 18px; margin-top: 22px; }
.panel h2 { margin: 16px 0 6px; }
.fold > summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 14px 0; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; display: inline-block; width: 18px; color: var(--muted); transition: transform .15s; }
.fold[open] > summary::before { transform: rotate(90deg); }
details.fold:not(.panel) { margin-top: 22px; }

/* paying an expert: numbered steps, the card number large enough to copy from */
.stat-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card.accent { border-color: var(--primary-2); background: var(--primary-soft); }
.stat-card.accent b { color: var(--primary); }
.steps { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 14px; }
.steps > li > b { display: block; margin-bottom: 6px; }
.card-number { display: inline-block; font: 700 20px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em;
  padding: 8px 12px; border-radius: 10px; background: var(--surface-2); user-select: all; }
.cabinet-alert { display: block; }
.cabinet h3 { margin-top: 26px; }
.cabinet .admin-top h2 { margin: 18px 0 10px; }

/* on phones a wide table becomes a stack of cards: each cell on its own line, named by its column */
@media (max-width: 720px) {
  .stat-cards-3 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stat-cards-3 .stat-card { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; }
  .stat-cards-3 .stat-card b { font-size: 22px; order: 2; }
  .table-wrap:has(.cards-on-phone) { background: none; border: 0; overflow: visible; }
  .cards-on-phone thead { display: none; }
  .cards-on-phone, .cards-on-phone tbody { display: block; }
  .cards-on-phone tr { display: grid; gap: 6px; padding: 14px 16px; margin-bottom: 10px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); }
  /* the label on the left, everything the cell holds kept together on the right */
  .cards-on-phone td { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 8px; padding: 0;
    border: 0; text-align: right; overflow-wrap: anywhere; }
  .cards-on-phone td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; margin-right: auto; color: var(--muted);
    font-size: 13px; font-weight: 600; text-align: left; }
  .cards-on-phone td.cell-action { justify-content: stretch; margin-top: 4px; }
  .cards-on-phone td.cell-action .btn { flex: 1; text-align: center; }
  .cards-on-phone .cell-note { display: inline; margin: 0 0 0 6px; }
  .panel { padding: 2px 14px 14px; }
}

/* ---------- footer / error ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); }
/* "support the project": a quiet button in the bottom-left corner, a small card opening upwards */
.donate { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 30; }
.donate summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px;
  border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); transition: border-color .12s, transform .12s; }
.donate summary::-webkit-details-marker { display: none; }
.donate summary:hover { border-color: var(--brand); transform: translateY(-1px); }
.donate summary:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 2px; }
/* the cup sits on a small amber disc, like the logo mark */
.support-cup { width: 26px; height: 26px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: var(--brand);
  fill: none; stroke: var(--brand-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.donate-pop { position: absolute; left: 0; bottom: calc(100% + 10px); width: min(320px, calc(100vw - 32px)); display: grid; gap: 10px;
  padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.donate-pop b { font-size: 15px; }
.donate-pop p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.support-card { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.support-number { font: 700 17px/1.3 "Geist Mono", "JetBrains Mono", ui-monospace, Menlo, monospace; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.support-card small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.support-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  /* phones: both corners are round icons */
  .donate summary { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .donate summary span { display: none; }
  .support-cup { width: 30px; height: 30px; }
}
}
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.footer-row p { color: var(--muted); max-width: 420px; font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 24px 64px; }
.footer-cols div { display: grid; gap: 8px; align-content: start; }
.footer-cols b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 2px; }
.footer-cols a { color: var(--muted); font-weight: 600; font-size: 15px; }
.footer-cols a:hover { color: var(--text); }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 20px 24px; } }
.error-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; gap: 8px; }
.error-page h1 { font-size: 88px; margin: 16px 0 0; background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { color: var(--muted); margin: 0 0 16px; }
.error-page h1.long { font-size: clamp(30px, 6vw, 52px); max-width: 720px; line-height: 1.15; }
.error-page p { max-width: 560px; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-side { position: static; }
  .hero-grid, .welcome-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
}
/* the full menu (with Companies and the search) needs about 1200px; below that it folds into the menu button */
@media (max-width: 1199px) {
  /* logo and the menu button on one row; the open menu drops search and every link below it */
  .header-row { flex-wrap: wrap; height: auto; min-height: 64px; gap: 0 12px; }
  .nav-toggle { display: flex; }
  .header-search, .main-nav { display: none; flex-basis: 100%; }
  .nav-open .header-search { display: block; max-width: none; margin: 4px 0 12px; }
  .nav-open .main-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 14px; }
  .nav-open .main-nav > a:not(.btn):not(.avatar) { flex-basis: 100%; padding: 6px 0; font-size: 16px; }
  .nav-open .more-menu { flex-basis: 100%; }
  .nav-open .more-menu summary { display: none; }
  .nav-open .more-menu ul { position: static; padding: 0; border: 0; box-shadow: none; background: none; min-width: 0; }
  .nav-open .main-nav .more-menu li a { padding: 6px 0; font-size: 16px; font-weight: 600; color: var(--muted); }
  .lang-menu ul { left: 0; right: auto; }
}
@media (max-width: 720px) {
  .stats { gap: 22px; }
  .block { padding: 4px 16px 12px; }
  .row3, .row2 { grid-template-columns: minmax(0, 1fr); }
  .progress-row { grid-template-columns: 40px 1fr 60px; }
  .pr-bar { grid-column: 1 / -1; grid-row: 2; }
  .lesson-row .row-tags { display: none; }
  .cta-band { padding: 24px; }
}

/* admin: one collapsible block per language */
.lang-block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 16px; margin: 6px 0; }
.lang-block[open] { padding-bottom: 16px; }
.lang-block summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.track-head { font-size: 20px; margin: 28px 0 12px; }
.catalog-track { margin-top: 28px; }
.catalog-track h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.video-lang { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: var(--primary-soft); color: var(--text); border: 1px solid var(--line); }

/* ---------- interview generator ---------- */
.iv-setup fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 18px 18px; margin: 0 0 16px; }
.iv-setup legend { font-weight: 800; padding: 0 6px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: inline-flex; flex-direction: column; gap: 2px; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; transition: border-color .12s, background .12s; }
.choice input:checked + span { border-color: var(--primary-2); background: var(--primary-soft); color: var(--text); }
.choice input:focus-visible + span { outline: 2px solid var(--primary-2); outline-offset: 2px; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice.big > span { width: 100%; padding: 14px 16px; height: 100%; }
.choice.big small { color: var(--muted); font-weight: 500; }

.iv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.iv-head h1 { margin: 6px 0 4px; }
.iv-clock { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.iv-clock-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.iv-total { font: 800 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.iv-total.over { color: var(--err); }
.iv-list { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.iv-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.iv-q.active { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.iv-q-head { display: flex; gap: 12px; align-items: flex-start; }
.iv-q-title { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.iv-q-title b { font-size: 17px; overflow-wrap: anywhere; }
.iv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-timer { font: 700 15px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 7px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.iv-q.active .iv-timer { border-color: var(--primary-2); }
.iv-q.warn .iv-timer { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.iv-q.over .iv-timer { background: #fee2e2; color: #991b1b; border-color: var(--err); }
.iv-body { margin: 10px 0 0 44px; font-size: 15px; overflow-wrap: anywhere; }
.iv-body summary { cursor: pointer; color: var(--primary); font-weight: 600; margin: 6px 0; }
.iv-checks { background: var(--primary-soft); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.iv-checks .md > :first-child { margin-top: 4px; }
.iv-score { display: flex; align-items: center; gap: 6px; margin: 10px 0 0 44px; flex-wrap: wrap; }
.score { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-weight: 800; cursor: pointer; }
.score.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.iv-note { flex: 1; min-width: 180px; font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); resize: vertical; }
.iv-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.iv-topics h3 { font-size: 16px; margin: 12px 0 6px; }
.iv-topics ul { margin: 0; padding-left: 18px; }
.iv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
@media (max-width: 720px) {
  .mode-row, .iv-topics { grid-template-columns: 1fr; }
  .iv-body, .iv-score { margin-left: 0; }
}
@media print {
  .site-header, .site-footer, .iv-actions, .iv-clock button, .iv-timer, .crumb { display: none !important; }
  body { background: #fff; color: #000; }
  .iv-q { break-inside: avoid; box-shadow: none; }
  .mode-practice details > *:not(summary) { display: none; }
}

/* ---------- companies ---------- */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.company-card { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.company-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); }
.company-card h3 { margin: 0 0 2px; font-size: 18px; }
.company-main { display: grid; gap: 4px; align-content: start; flex: 1; min-width: 0; }
/* expert cards say what a click does, at the same place on every card */
.card-cta { margin-top: 8px; justify-self: start; font-weight: 700; color: var(--primary); }
.company-card:hover .card-cta { text-decoration: underline; text-underline-offset: 3px; }
.company-main .tag.sale { vertical-align: 2px; }
.company-logo { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: var(--brand-ink); background: var(--brand); }
.company-logo.big { width: 72px; height: 72px; font-size: 30px; border-radius: 18px; }
.company-logo.small { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
/* a real logo: the picture on a white tile (most logos are made for a white page), never cropped */
img.company-logo { object-fit: contain; padding: 6px; background: #fff; border: 1px solid var(--line); }
img.company-logo.small { padding: 3px; }
img.company-logo.big { padding: 10px; }
.admin-company { display: inline-flex; align-items: center; gap: 10px; }
.logo-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-help { display: grid; gap: 8px; flex: 1; min-width: 220px; }
.logo-help p { margin: 0; }
.company-rating { display: flex; align-items: center; gap: 6px; }
.stars { letter-spacing: 1px; color: color-mix(in srgb, var(--muted) 45%, transparent); white-space: nowrap; }
.stars .on { color: #d97706; }
.company-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; align-items: stretch; }
.company-stats .stat-card { min-width: 170px; display: grid; gap: 4px; align-content: start; }
.stat-bars { flex: 1; min-width: 260px; display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; }
.stat-bars > div { display: grid; grid-template-columns: 170px 1fr 34px; align-items: center; gap: 10px; font-size: 14px; }
.stat-bars .bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.stat-bars .bar > span { display: block; height: 100%; background: var(--brand); }
.tabs { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 10px; flex-wrap: wrap; }
.tabs > a:not(.btn) { padding: 10px 14px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs > a.active { color: var(--text); border-color: var(--primary-2); }
.tabs > a:not(.btn):hover { text-decoration: none; color: var(--text); }
.tabs .count { font-size: 12px; background: var(--surface-2); border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.tabs .spacer { flex: 1; }
.tabs .btn { margin-bottom: 8px; }
.small { font-size: 13px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.review-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review h4 { margin: 12px 0 4px; font-size: 15px; }
.review-rating { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.pre { white-space: pre-line; margin: 0; }
.tag.verified { background: var(--ok-soft); color: var(--ok); }
.rating-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 8px; margin-top: 8px; }
.rating-row .err { grid-column: 2; }
.verify-box { border: 1px dashed var(--primary-2); border-radius: var(--radius); padding: 12px 14px; background: var(--primary-soft); }
.verify-box input { width: 100%; margin: 6px 0; }
.rules { font-size: 14px; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 12px; }
.inline-form { display: inline-flex; gap: 10px; align-items: center; }
.companies-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 32px;
  border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.companies-band:hover { text-decoration: none; border-color: var(--brand); }
.companies-band h2 { margin: 0 0 6px; }
.companies-band p { margin: 0; color: var(--muted); max-width: 620px; }
@media (max-width: 720px) {
  .stat-bars > div { grid-template-columns: 120px 1fr 30px; }
  .rating-row { grid-template-columns: 1fr; }
  .rating-row .err { grid-column: 1; }
  .companies-band { flex-direction: column; align-items: flex-start; padding: 22px; }
}

/* ---------- donate ---------- */
/* room under the footer, so the corner buttons never sit on its last links */
.site-footer:has(.ai, .donate) { padding-bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 120px); }
/* the AI helper: a button in the corner, a chat panel above it */
.ai { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 40; }
.ai-fab { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--brand-ink); background: var(--brand);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: transform .12s, filter .12s; }
.ai-fab:hover { transform: translateY(-1px); filter: brightness(1.06); }
.ai-fab:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.ai-fab svg { width: 20px; height: 20px; fill: currentColor; }
.ai.ai-open .ai-fab { display: none; }
.ai-panel { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.ai-head b { flex: 1; font-size: 15px; }
.ai-logo svg { width: 30px; height: 30px; display: block; }
.ai-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; cursor: pointer; background: none; color: var(--muted); }
.ai-icon:hover, .ai-icon:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.ai-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ai-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-bot pre { margin: 6px 0; padding: 8px 10px; border-radius: 8px; overflow-x: auto; background: var(--code-bg); color: var(--code-ink); font-size: 12.5px; }
.ai-bot code { font-family: "Geist Mono", "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .9em; }
.ai-bot :not(pre) > code { padding: 1px 5px; border-radius: 5px; background: var(--inline-code); }
.ai-wait { color: var(--muted); font-style: italic; }
.ai-error { border-color: color-mix(in srgb, var(--err) 40%, var(--line)); color: var(--err); }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 12px; font: inherit; font-size: 14px; background: var(--surface-2); color: var(--text); }
.ai-form textarea:focus { outline: 2px solid var(--primary-2); outline-offset: 0; }
.ai-send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); }
.ai-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ai-note { padding: 0 12px 10px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
@media (max-width: 560px) {
  .ai-fab span { display: none; }
  .ai-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .ai-panel { right: 0; bottom: 0; width: 100vw; height: 85vh; border-radius: 18px 18px 0 0; }
}
@media print { .donate, .ai { display: none; } }

/* interview setup: duration, per-question time, topic shares */
.chip-btn { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.inline-field input { width: 96px; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); }
.small { font-size: 14px; margin: 0 0 10px; }
.tp-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tp-sum.warn { color: var(--accent); font-weight: 600; }
.tp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tp-row { display: grid; grid-template-columns: auto 1fr auto minmax(130px, auto) auto; align-items: center; gap: 10px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; }
.tp-row.is-on { border-color: var(--primary-2); background: var(--primary-soft); }
.tp-name { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
/* the level and topic tick boxes: big enough to hit with a thumb */
.tp-name input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary-2); cursor: pointer; }
.tp-move button { min-width: 36px; min-height: 36px; }
.tp-share { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.tp-pct { width: 64px; font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); }
.tp-pct:disabled { opacity: .45; }
.tp-est { font-size: 13px; text-align: right; }
.tp-move { display: inline-flex; gap: 4px; }
.icon-btn { font: inherit; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); }
.tp-total { font-weight: 700; margin: 12px 0 0; }
@media (max-width: 720px) {
  .tp-row { grid-template-columns: auto 1fr auto auto; }
  .tp-est { grid-column: 1 / -1; text-align: left; }
}

/* interview sheet: topic headings and the code a question shows */
.iv-how { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.iv-how li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; line-height: 1.45; }
.iv-how b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--accent); color: var(--brand-ink); }
@media (max-width: 720px) { .iv-how { grid-template-columns: 1fr; } }
.iv-sec { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.iv-sec h2 { font-size: 20px; margin: 0; }
.q-details { font-size: 15px; }
.q-details pre { margin: 6px 0; }
.iv-regen { margin-top: 4px; }
@media print { .iv-regen { display: none; } }
.iv-mix { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.lv-est.warn { color: var(--accent); font-weight: 600; }
.mix-off { margin-left: 4px; opacity: .8; font-weight: 600; }
.add-company { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 18px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }

/* phone inputs: a fixed +998 in front of the 9-digit number */
.phone-field { display: flex; align-items: stretch; }
.phone-prefix { display: inline-flex; align-items: center; padding: 0 12px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--surface); }
.phone-field input { flex: 1; min-width: 0; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* courses */
.section-gap { margin-top: 40px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.course-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.course-card:hover { border-color: var(--brand); text-decoration: none; }
.course-card h3 { margin: 4px 0 0; font-size: 20px; }
.course-card p { margin: 0; flex: 1; }
.course-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 25px; background: var(--primary-soft); }
.course-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.course-price { font-size: 18px; margin-top: 6px; }
.course-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.course-cta small { flex-basis: 100%; }
.course-price-big { font-size: 26px; font-weight: 800; }
.course-progress { display: grid; gap: 4px; min-width: 220px; }
.module { margin: 18px 0; }
.module h3 { margin: 0 0 8px; }
.module-lessons { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.module-lessons li { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.module-lessons li:first-child { border-top: 0; }
.module-lessons li > a, .module-lessons li > .locked { display: flex; align-items: center; gap: 10px; padding: 11px 14px; flex: 1; color: var(--text); }
.module-lessons li > a:hover { background: var(--surface-2); text-decoration: none; }
.module-lessons li.is-done .ml-icon { color: var(--ok); }
.module-lessons .locked { color: var(--muted); }
.ml-icon { width: 22px; text-align: center; flex: none; }
.ml-title { flex: 1; }
.side-module { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 10px 8px 2px; }
.admin-module { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.admin-module .module-lessons li { padding: 6px 10px; }
.module-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.module-head input { width: 160px; }
.spacer { flex: 1; }

/* paid services and orders */
.steps { padding-left: 22px; display: grid; gap: 4px; margin: 12px 0 18px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.order-head h1 { margin: 6px 0 2px; }
.order-sum { display: grid; gap: 6px; justify-items: end; font-size: 20px; }
/* under the title on a phone: lined up on the left with it, not floating at the right of an empty row */
@media (max-width: 600px) { .order-sum { justify-items: start; } }
.order-steps { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: step; }
.order-steps li { counter-increment: step; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.order-steps li::before { content: counter(step) ". "; font-weight: 800; }
.order-steps li.now { border-color: var(--primary-2); color: var(--text); background: var(--primary-soft); font-weight: 700; }
.order-steps li.done { color: var(--ok); border-color: var(--ok); }
.order-steps li.done::before { content: "✓ "; }
.pay-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; margin: 10px 0; }
.meet-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--primary-soft); }
.receipt-img { max-width: 100%; max-height: 520px; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.worker-box { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; }
.tag.st-awaiting_receipt { color: var(--accent); }
.tag.st-pending_review { color: var(--middle); }
.tag.st-approved { color: var(--ok); }
.tag.st-rejected, .tag.st-cancelled { color: var(--err); }
.tag.st-completed { color: var(--ok); background: var(--ok-soft); }
.chip-btn.on { border-color: var(--primary-2); background: var(--primary-soft); }
.talent-contact { margin-top: 6px; word-break: break-word; }
.talent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0; }
.expert-cta { margin-top: 18px; }
.expert-cta > span:last-child { display: inline-flex; flex-wrap: wrap; gap: 8px; }

/* small inline inputs (module titles, reject reason, filters) look like the rest of the forms */
.inline-form input, .inline-form select, .module-head input, .admin select {
  font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.note-box { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 600; }
.course-author { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; }
.course-author .avatar { width: 34px; height: 34px; font-size: 15px; }
.sell-course { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  margin-top: 40px; padding: 26px; border-radius: 20px; border: 2px solid var(--primary-2); background: var(--primary-soft); }
.sell-course h2 { margin: 0 0 6px; }
.sell-course > div { flex: 1; min-width: 260px; }

/* sale prices */
.price-old { color: var(--muted); margin-right: 6px; font-weight: 500; }
.tag.sale { background: var(--brand); color: var(--brand-ink); margin-left: 6px; }
/* under a price: its own line, lined up with the price */
.sale-deadline { display: block; margin-top: 4px; color: var(--primary); font-weight: 600; font-size: 13px; }
/* the biggest running sale: an announcement bar under the header, in the brand colours (fixed, so white text
   keeps its contrast in the dark theme too) */
.sale-bar { background: var(--brand); color: var(--brand-ink); }
.sale-bar[hidden] { display: none; }
.sale-bar-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.sale-bar-link { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 0; color: #fff; font-size: 14px; line-height: 1.4; }
.sale-bar-link:hover { text-decoration: none; }
.sale-bar-link:hover .sale-go { text-decoration: underline; }
.sale-pct { flex: none; font-size: 13px; font-weight: 800; color: var(--brand); background: #111111; border-radius: 999px; padding: 2px 9px; }
.sale-text { min-width: 0; }
.sale-text b { margin-right: 4px; }
.sale-target { color: rgba(17, 17, 17, .75); }
.sale-text .sale-deadline { display: inline; margin: 0 0 0 6px; color: #111111; font-size: 13px; white-space: nowrap; }
.sale-text .sale-deadline::before { content: "· "; color: rgba(17, 17, 17, .5); }
.sale-go { flex: none; font-weight: 700; white-space: nowrap; }
.sale-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--brand-ink);
  font-size: 22px; line-height: 1; cursor: pointer; opacity: .8; }
.sale-close:hover { opacity: 1; background: rgba(0, 0, 0, .1); }
@media (max-width: 720px) {
  .sale-bar-link { justify-content: flex-start; align-items: flex-start; font-size: 13px; }
  .sale-go { display: none; }
}
/* admin: courses a discount is limited to */
.course-pick { grid-column: span 2; display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.promo-form { margin: 6px 0 14px; }
.call-box { margin: 12px 0; display: grid; gap: 8px; justify-items: start; }
.inline-form .check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* track chooser / filter */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.track-filter { margin: 0 0 18px; }
.tp-list .tp-group { list-style: none; font-weight: 800; margin: 14px 0 4px; color: var(--muted); }

/* the subscribe form's bot trap */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* star marks: badges, the average and the picker (radios in reverse, so hovering a star lights the ones before it) */
.tag.hot { color: var(--brand-ink); background: var(--brand); }
.tag.top { color: #92400e; background: #fef3c7; }
.rating-sum { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rating-sum b { font-size: 16px; }
.course-card.is-best, .company-card.is-best { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b33; }
.rating-form fieldset { border: 0; padding: 0; margin: 0; }
.rating-form legend { font-weight: 700; margin-bottom: 4px; }
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { font-size: 34px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.star-pick label:hover, .star-pick label:hover ~ label, .star-pick input:checked ~ label { color: #f59e0b; }
.star-pick input:focus-visible + label { outline: 2px solid var(--primary-2); border-radius: 6px; }
.review.is-hidden { opacity: .55; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.card-badges:empty { display: none; }
.rating-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.rating-line:not(:has(*)) { display: none; }
.backup-run { margin-bottom: 14px; }

/* admin: held money with the "pay now" button next to it */
.flash.release { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.flash.release p { margin: 0; flex: 1 1 280px; }
.flash.release form { margin: 0; }
.course-cta .free-tag { align-self: flex-start; font-size: 1rem; }
fieldset.pricing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
fieldset.pricing .price-field { flex: 1 1 100%; max-width: 320px; }
fieldset.pricing .price-field[hidden] { display: none; }
fieldset.pricing > small { flex: 1 1 100%; }
.admin-table tr.has-desc td { border-bottom: 0; padding-bottom: 4px; }
.admin-table tr.desc-row td { padding-top: 0; font-size: 13px; line-height: 1.5; }
.discount-preview { margin: 12px 0; }
.sale-more { flex: none; color: #111111; font-weight: 700; font-size: 13px; white-space: nowrap; padding: 4px 10px;
  border: 1px solid rgba(17, 17, 17, .35); border-radius: 999px; }
.sale-more:hover { background: rgba(0, 0, 0, .08); text-decoration: none; }
.sale-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.sale-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; }
.sale-card .sale-pct { background: var(--brand); color: var(--brand-ink); font-size: 15px; padding: 4px 10px; }
.sale-card-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sale-card-text .sale-deadline { margin-top: 0; }
@media (max-width: 560px) { .sale-card { flex-wrap: wrap; } .sale-card .btn { width: 100%; text-align: center; } }
.form .paid-only[hidden] { display: none; }
.free-tag { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-weight: 700; }
.payout-form .row3 { align-items: start; }

/* admin discounts: cards in plain words, and a step-by-step form */
.kind-help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 24px; }
.kind-help > div { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.kind-help span { color: var(--muted); font-size: 14px; }
.discount-cards { display: grid; gap: 14px; margin-bottom: 28px; }
.discount-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.discount-card.off { opacity: .72; }
.discount-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.discount-card-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.discount-card-title b { font-size: 17px; }
.discount-pct { flex: none; font-weight: 800; font-size: 18px; color: var(--brand-ink); background: var(--brand); border-radius: 10px; padding: 6px 10px; }
.tag.state.on { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.tag.state.wait { background: color-mix(in srgb, #d97706 15%, transparent); color: #b45309; }
.discount-facts { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.discount-facts dt { color: var(--muted); font-weight: 600; }
.discount-facts dd { margin: 0; }
.discount-form { counter-reset: step; }
.discount-form .step { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.discount-form .step .course-pick { grid-column: auto; }
.discount-form .step[hidden] { display: none; }
.discount-form .step h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.discount-form .step h3::before { counter-increment: step; content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-size: 14px; display: grid; place-items: center; }
.discount-form .choice { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; align-content: start;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.discount-form .choice:has(input:checked) b::after { content: " ✓"; color: var(--primary); }
.discount-form .choice small { color: var(--muted); font-size: 13px; }
.discount-form .choice:focus-within { outline: 2px solid var(--primary-2); outline-offset: 2px; }
.discount-form .choice:has(input:checked) { border-color: var(--primary-2); background: var(--primary-soft); }
.discount-form .choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.discount-form .choice-row .choice { flex: 1 1 150px; }
.discount-form [data-show][hidden] { display: none; }
.discount-form .percent-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; }
.discount-form .percent-field input { max-width: 120px; }
.discount-form .percent-field small { flex: 1 1 100%; font-size: 13px; }
.discount-result h3 { margin: 0 0 8px; }
@media (max-width: 700px) {
  .kind-help { grid-template-columns: minmax(0, 1fr); }
  .discount-facts { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .discount-facts dd { margin-bottom: 8px; }
  .discount-card-head { flex-wrap: wrap; }
  .discount-card-head .btn { margin-left: auto; }
  .discount-card-title { order: 3; flex: 1 1 100%; }
  .discount-card-title .tag { white-space: normal; }
}
.sale-slides { flex: 1; min-width: 0; display: flex; }
.sale-bar-link[hidden] { display: none; }
.sale-step { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .1); color: #111111;
  font-size: 20px; line-height: 1; cursor: pointer; }
.sale-step:hover { background: rgba(0, 0, 0, .18); }
.sale-count { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .sale-step { display: none; } .sale-more { padding: 3px 8px; font-size: 12px; } }

/* ---------- lesson tasks with a mentor's review ---------- */
.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; flex-basis: 100%; }
.tariff { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); }
.tariff-best { border-color: var(--primary-2); box-shadow: 0 0 0 1px var(--primary-2) inset; }
.tariff-name { font-size: 15px; }
.tariff .course-price-big { font-size: 22px; }
.tariff form { margin-top: auto; }
.tariff .btn { width: 100%; justify-content: center; }
.course-cta .add-review { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex-basis: 100%; }
.course-cta .add-review small { flex-basis: auto; }
.tag.review-on { color: var(--primary); background: var(--primary-soft); }

.task-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.task-block > h2 { margin-top: 0; }
.task-block h3 { margin: 20px 0 8px; }
.task-status { padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.task-status > p { margin: 0; }
.task-status .task-comment { font-weight: 400; color: var(--text); margin-top: 10px; }
.task-status.task-accepted { background: var(--ok-soft); color: var(--ok); }
.task-status.task-submitted { background: var(--primary-soft); color: var(--primary); }
.task-status.task-returned { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.task-form textarea { width: 100%; }
.task-practice { margin-bottom: 0; }

.tag.task-state { background: var(--surface-2); color: var(--muted); }
.tag.task-state.task-submitted { background: var(--primary-soft); color: var(--primary); }
.tag.task-state.task-accepted { background: var(--ok-soft); color: var(--ok); }
.tag.task-state.task-returned { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tag.task-late { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.admin-table tr.row-late td:first-child { box-shadow: inset 3px 0 0 var(--err); }

.task-entry { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: var(--surface); }
.task-entry-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.task-entry .task-answer { white-space: pre-wrap; max-height: 340px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }
.task-entry a { overflow-wrap: anywhere; }
.task-comment { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--primary-2); background: var(--primary-soft); border-radius: 8px; }
.task-comment p { margin: 4px 0 0; }
.task-review { margin-top: 18px; }
.side-task { margin-left: auto; font-size: 12px; }

/* ---------- line icons (emoji tiles replaced via js/icons.js) ---------- */
.topic-icon .ico, .event-icon .ico, .eb-ic .ico, .ef-ic .ico { display: block; width: 1em; height: 1em; }
/* emoji in the site's own text, swapped for line icons by icons.js; flags become a small language code */
.ico-text .ico { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.16em; }
.lang-code { display: inline-block; font-size: .72em; font-weight: 700; letter-spacing: .04em; line-height: 1.4; padding: 0 5px;
  border-radius: 5px; border: 1px solid currentColor; opacity: .75; vertical-align: .12em; }
.course-icon .ico, .plan-icon .ico { display: block; width: 1em; height: 1em; }
.course-icon.has-ico { color: var(--primary); }
.topic-icon.has-ico, .event-icon.has-ico { color: var(--primary); }
.ef-ic .ico { color: var(--primary); }

/* hero preview card: real lesson link + video thumbnail */
a.hero-card { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.hero-card:hover { transform: translateY(-3px); }
.mock-video.has-thumb { background-size: cover; background-position: center; position: relative; }
.mock-video.has-thumb::before { content: ""; position: absolute; inset: 0; background: rgba(10,12,20,.12); border-radius: inherit; }
.mock-video.has-thumb > span { position: relative; z-index: 1; }

/* ---------- drag-and-drop reorder ---------- */
.sortable-topics tbody tr { cursor: grab; }
.sortable-topics tbody tr:active { cursor: grabbing; }
.sortable-topics tbody a { cursor: pointer; }
.sortable-topics .drag-handle { color: var(--muted); width: 28px; text-align: center; touch-action: none; }
.sortable-topics tr.dragging { opacity: .55; background: var(--primary-soft); }
.reorder-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0;
    background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
    box-shadow: var(--shadow); pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.reorder-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* interview setup: draggable topic rows */
.tp-list .tp-row { cursor: grab; }
.tp-list .tp-row:active { cursor: grabbing; }
.tp-list .tp-row input, .tp-list .tp-row button, .tp-list .tp-row a, .tp-list .tp-row label { cursor: auto; }
.tp-list .tp-row .tp-on, .tp-list .tp-row .tp-name { cursor: pointer; }
.tp-list .tp-row .tp-drag { color: var(--muted); display: inline-flex; align-items: center; touch-action: none; }
.tp-list .tp-row.dragging { opacity: .55; background: var(--primary-soft); }

/* ---------- combined promo strip (one quiet bar for sale + next event) ---------- */
.promo-bar { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; }
.promo-row { display: flex; align-items: center; gap: 12px; min-height: 40px; flex-wrap: nowrap; overflow: hidden; }
.promo-item { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }
.promo-item b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-item:hover b { text-decoration: underline; }
.promo-pct { flex: none; font-weight: 800; font-size: 12px; padding: 1px 7px; border-radius: 999px; color: var(--brand-ink); background: var(--brand); }
.promo-tag { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.promo-when { flex: none; color: var(--muted); white-space: nowrap; }
.promo-when .sale-deadline { color: var(--muted); }
.promo-div { flex: none; width: 1px; height: 18px; background: var(--line); }
.promo-more { flex: none; color: var(--primary); font-weight: 600; white-space: nowrap; text-decoration: none; }
.promo-sales { display: flex; align-items: center; gap: 8px; min-width: 0; }
.promo-sale[hidden] { display: none; }
.promo-target { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.promo-step { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.promo-step:hover { border-color: var(--brand); color: var(--primary); }
.promo-more:hover { text-decoration: underline; }
.promo-close { flex: none; margin-left: auto; background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px; }
.promo-close:hover { color: var(--text); }
@media (max-width: 640px) { .promo-event, .promo-more, .promo-div, .promo-target { display: none; } .promo-item b { max-width: 50vw; } }

/* the lesson editor's own-video block */
.video-editor h3 { margin: 22px 0 6px; font-size: 17px; }
/* the video list: the file name takes the room that is left and wraps anywhere (one long word fits too);
   status, length and date stay on their own lines */
.video-table { table-layout: auto; }
.video-table .vfile { width: 100%; max-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.video-table td:not(.vfile), .video-table th { white-space: nowrap; }
.video-table td:nth-child(2) { white-space: normal; min-width: 9em; }
/* phones: four columns do not fit, so each video is a small block — the name on top, status and length below */
@media (max-width: 600px) {
  .video-table thead { display: none; }
  .video-table, .video-table tbody { display: block; }
  .video-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 12px 0;
    border-bottom: 1px solid var(--line); }
  .video-table td { display: block; padding: 0; border: 0; width: auto; max-width: none; min-width: 0; }
  .video-table td.vfile { grid-column: 1 / -1; width: auto; max-width: none; font-weight: 600; }
  .video-table td:nth-child(3), .video-table td:nth-child(4) { color: var(--muted); font-size: 13px; }
}
.video-upload { border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding-top: 6px; }
.video-upload:first-of-type { border-top: 0; }
.video-upload table { margin: 10px 0; }
.vstat { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.vstat.ok { background: color-mix(in srgb, #16a34a 16%, transparent); color: #15803d; }
.vstat.wait { background: color-mix(in srgb, #d97706 16%, transparent); color: #b45309; }
.vstat.err { background: color-mix(in srgb, #dc2626 16%, transparent); color: #b91c1c; }
:root[data-theme="dark"] .vstat.ok { color: #4ade80; }
:root[data-theme="dark"] .vstat.wait { color: #fbbf24; }
:root[data-theme="dark"] .vstat.err { color: #f87171; }
.video-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0 8px; }
.video-pick label { flex: 1 1 260px; display: grid; gap: 6px; }
.video-upload progress { width: 100%; height: 10px; margin-top: 8px; accent-color: var(--primary-2); }
.video-upload form { margin-top: 12px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vstat.ok { color: #4ade80; }
  :root:not([data-theme="light"]) .vstat.wait { color: #fbbf24; }
  :root:not([data-theme="light"]) .vstat.err { color: #f87171; }
}

/* the editor's cover block: the picture shown before play, and how to change it */
.video-cover { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 12px 0; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2); }
.video-cover img { width: 240px; max-width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; }
.video-cover-actions { display: grid; gap: 6px; flex: 1; min-width: 220px; }
.video-cover-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.video-cover-form input[type=file] { max-width: 100%; }

/* ---------- the lesson video player (fragments/video :: player, js/player.js) ----------
   Laid out like the video players people already know: a thin red line, play / volume / time on the left, ⚙ (speed,
   quality) and full screen on the right, the title on top. No third-party logo. */
.vp { --vp-red: #f5a524; outline: none; user-select: none; -webkit-tap-highlight-color: transparent; border-radius: 12px;
  color: #eee; font-family: Roboto, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.vp:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .5), var(--shadow); }
.vp video { cursor: pointer; }
.vp.vp-started:not(.vp-awake):not(.vp-paused) video { cursor: none; }
.vp.vp-is-full { border-radius: 0; aspect-ratio: auto; }

/* title on top, over a soft dark fade; on the poster and whenever the controls show */
.vp-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 28px; pointer-events: none; transition: opacity .25s;
  background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .18) 60%, transparent); }
/* the cover: a sharp picture over the video until its first frame shows */
.vp-poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  transition: opacity .2s; }
.vp.vp-has-frame .vp-poster { opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.vp-avatar { flex: none; width: 40px; height: 40px; }
.vp-avatar svg { display: block; width: 40px; height: 40px; }
.vp-title { min-width: 0; font-size: 18px; font-weight: 500; line-height: 1.3; color: #fff; letter-spacing: .005em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8), 0 0 2px rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp.vp-started:not(.vp-awake):not(.vp-paused):not(.vp-menu-open) .vp-top { opacity: 0; }

/* the big button on the poster: a dark rounded box that turns red under the mouse */
.vp-big { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0; border: 0;
  border-radius: 50%; background: none; cursor: pointer; z-index: 3; transition: opacity .2s, transform .15s; }
.vp-big svg { display: block; width: 72px; height: 72px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.vp-big-bg { fill: #f5a524; transition: fill .15s; }
.vp-big:hover, .vp:hover:not(.vp-started) .vp-big { transform: scale(1.06); }
.vp-big:hover .vp-big-bg, .vp:hover:not(.vp-started) .vp-big-bg, .vp-big:focus-visible .vp-big-bg { fill: #ffc25c; }
.vp-big:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.vp.vp-started .vp-big { opacity: 0; pointer-events: none; }

/* spinner while the next piece loads */
.vp-spinner { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; z-index: 2;
  border: 4px solid rgba(255, 255, 255, .2); border-top-color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s; }
.vp.vp-loading .vp-spinner { opacity: 1; animation: vp-spin .9s linear infinite; }
@keyframes vp-spin { to { transform: rotate(360deg); } }

/* the round play/pause sign that pops up in the middle after a click */
.vp-bezel { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; padding: 12px; border-radius: 50%;
  background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; z-index: 2; box-sizing: border-box; }
.vp-bezel svg { width: 28px; height: 28px; fill: #fff; }
.vp-bezel .b-pause, .vp-bezel.vp-b-pause .b-play { display: none; }
.vp-bezel.vp-b-pause .b-pause { display: block; }
.vp-bezel.show { animation: vp-bezel .5s linear; }
@keyframes vp-bezel { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2); } }

/* ±10 s: a soft half-circle on that side with arrows and the seconds */
.vp-flash { position: absolute; top: 0; bottom: 0; width: 38%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 13px; font-weight: 500; background: rgba(255, 255, 255, .12); opacity: 0; pointer-events: none; z-index: 2; }
.vp-flash::after { content: " s"; }
.vp-flash span { font-size: 12px; letter-spacing: -2px; }
.vp-flash-l { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.vp-flash-r { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; }
.vp-flash.show { animation: vp-flash .6s ease-out; }
@keyframes vp-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* short messages (speed, volume, "resuming from …") */
.vp-toast { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 14px;
  border-radius: 4px; background: rgba(0, 0, 0, .6); font-size: 15px; text-align: center; color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 4; }
.vp-toast.show { opacity: 1; }

/* the control bar: hidden while playing until the mouse moves; always there on pause */
.vp-ui { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 60px 12px 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .7));
  opacity: 0; pointer-events: none; transition: opacity .25s cubic-bezier(0, 0, .2, 1); }
.vp.vp-started.vp-awake .vp-ui, .vp.vp-started.vp-paused .vp-ui, .vp.vp-started:focus-within .vp-ui, .vp.vp-dragging .vp-ui,
.vp.vp-menu-open .vp-ui { opacity: 1; pointer-events: auto; }

.vp-progress { position: relative; height: 15px; margin-bottom: -5px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.vp-track { position: relative; width: 100%; height: 3px; background: rgba(255, 255, 255, .2); transition: transform .1s; transform: scaleY(.6); }
.vp-progress:hover .vp-track, .vp.vp-dragging .vp-track, .vp-progress:focus-visible .vp-track { transform: scaleY(1.6); }
.vp-hover, .vp-buffer, .vp-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.vp-hover { background: rgba(255, 255, 255, .5); opacity: 0; }
.vp-progress:hover .vp-hover { opacity: 1; }
.vp-buffer { background: rgba(255, 255, 255, .4); transition: width .25s linear; }
.vp-played { background: var(--vp-red); }
.vp-thumb { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--vp-red);
  transform: scale(0); transition: transform .1s; }
.vp-progress:hover .vp-thumb, .vp.vp-dragging .vp-thumb, .vp-progress:focus-visible .vp-thumb { transform: scale(1); }
.vp-tip { position: absolute; bottom: 22px; transform: translateX(-50%); padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 500;
  color: #fff; background: rgba(28, 28, 28, .9); opacity: 0; pointer-events: none; white-space: nowrap; }
.vp-progress:hover .vp-tip, .vp.vp-dragging .vp-tip { opacity: 1; }

.vp-row { display: flex; align-items: center; height: 48px; }
.vp-gap { flex: 1; }
.vp-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; cursor: pointer; color: #fff; background: none;
  opacity: .9; transition: opacity .1s; position: relative; }
.vp-btn:hover, .vp-btn:focus-visible { opacity: 1; outline: none; }
.vp-btn:focus-visible { box-shadow: inset 0 0 0 2px rgba(26, 115, 232, .8); }
.vp-btn svg { width: 26px; height: 26px; fill: currentColor; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .35)); }
.vp .i-pause, .vp .i-muted, .vp .i-exit { display: none; }
.vp:not(.vp-paused) .i-play { display: none; } .vp:not(.vp-paused) .i-pause { display: block; }
.vp.vp-muted .i-vol { display: none; } .vp.vp-muted .i-muted { display: block; }
.vp.vp-is-full .i-full { display: none; } .vp.vp-is-full .i-exit { display: block; }

/* volume slides out next to its button */
.vp-vol { display: flex; align-items: center; }
.vp-volume { --fill: 100%; width: 0; opacity: 0; margin: 0; height: 3px; cursor: pointer; transition: width .2s, opacity .2s, margin .2s;
  -webkit-appearance: none; appearance: none; background: linear-gradient(90deg, #fff var(--fill), rgba(255, 255, 255, .2) var(--fill)); }
.vp-vol:hover .vp-volume, .vp-volume:focus-visible { width: 52px; opacity: 1; margin: 0 8px 0 0; outline: none; }
.vp-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.vp-volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.vp-time { font-size: 13px; color: #ddd; margin-left: 4px; white-space: nowrap; text-shadow: 0 0 2px rgba(0, 0, 0, .5); }

/* ⚙ with the little red HD mark when the picture is 720p or better */
.vp-settings { position: relative; }
.vp-gear svg { transition: transform .1s; }
.vp-gear[aria-expanded="true"] svg { transform: rotate(30deg); }
.vp-gear.vp-hd::after { content: attr(data-badge); position: absolute; top: 10px; right: 6px; padding: 0 2px; border-radius: 2px; font: 700 8px/10px Roboto, Arial;
  color: #fff; background: var(--vp-red); }

.vp-panel { position: absolute; right: 0; bottom: 56px; width: 260px; padding: 8px 0; border-radius: 12px; z-index: 5; overflow-y: auto;
  background: rgba(28, 28, 28, .9); text-shadow: 0 0 2px rgba(0, 0, 0, .5); scrollbar-width: thin; }
.vp-item, .vp-opt, .vp-head { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 15px; border: 0; cursor: pointer;
  color: #eee; background: none; font: 500 13px/1.3 Roboto, Arial, sans-serif; text-align: left; }
.vp-item:hover, .vp-opt:hover, .vp-head:hover, .vp-item:focus-visible, .vp-opt:focus-visible, .vp-head:focus-visible {
  background: rgba(255, 255, 255, .1); outline: none; }
.vp-item svg { width: 24px; height: 24px; fill: #eee; margin-right: 15px; flex: none; }
.vp-item span { flex: 1; }
.vp-item b { font-weight: 400; margin-right: 4px; }
.vp-item::after { content: "›"; font-size: 20px; line-height: 1; opacity: .9; }
.vp-head { border-bottom: 1px solid rgba(255, 255, 255, .2); margin-bottom: 8px; min-height: 48px; font-size: 15px; }
.vp-head::before { content: "‹"; font-size: 22px; line-height: 1; margin-right: 14px; }

/* the choices: a check mark on the chosen one */
.vp-opt { padding-left: 54px; position: relative; flex-direction: column; align-items: flex-start; justify-content: center; }
.vp-opt[aria-checked="true"]::before { content: ""; position: absolute; left: 22px; top: 50%; width: 12px; height: 6px; margin-top: -6px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.vp-opt small { font-size: 11.5px; font-weight: 400; color: rgba(255, 255, 255, .55); }
.vp-opt .vp-q-main { display: inline; }
.vp-menu sup, .vp-panel sup { margin-left: 3px; font-size: 9px; font-weight: 700; vertical-align: 4px; color: var(--vp-red); }

/* any speed between 0.25× and 3× */
.vp-fine { margin-top: 6px; padding: 10px 15px 6px; border-top: 1px solid rgba(255, 255, 255, .2); }
.vp-fine small { font-size: 12px; color: rgba(255, 255, 255, .7); }
.vp-fine-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.vp-step { width: 26px; height: 26px; flex: none; border: 0; border-radius: 50%; cursor: pointer; color: #fff; font-size: 16px; line-height: 1;
  background: rgba(255, 255, 255, .12); }
.vp-step:hover, .vp-step:focus-visible { background: rgba(255, 255, 255, .25); outline: none; }
.vp-rate { --fill: 27%; flex: 1; min-width: 0; height: 3px; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, #fff var(--fill), rgba(255, 255, 255, .25) var(--fill)); }
.vp-rate::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.vp-rate::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.vp-rate-now { min-width: 40px; text-align: right; font-size: 13px; font-weight: 500; }

/* phones: a smaller bar; the volume slider and title shrink away */
@media (max-width: 560px) {
  .vp-ui { padding: 40px 4px 0; }
  /* a phone's player is short: speeds sit three in a row, the chosen one lit up */
  .vp-panel { padding: 4px 0; }
  .vp-head { min-height: 34px; margin-bottom: 4px; font-size: 14px; }
  .vp-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 8px; }
  .vp-chips .vp-opt { min-height: 30px; padding: 0; align-items: center; border-radius: 6px; }
  .vp-chips .vp-opt[aria-checked="true"] { background: rgba(255, 255, 255, .22); }
  .vp-chips .vp-opt[aria-checked="true"]::before { display: none; }
  .vp-fine { padding: 8px 12px 4px; }
  .vp-row { height: 40px; }
  .vp-btn { width: 40px; height: 40px; }
  .vp-btn svg { width: 22px; height: 22px; }
  .vp-volume { display: none; }
  .vp-title { font-size: 15px; }
  .vp-top { padding: 8px 12px 34px; gap: 9px; }
  .vp-avatar, .vp-avatar svg { width: 30px; height: 30px; }
  .vp-time { font-size: 12px; }
  .vp-panel { bottom: 46px; width: 240px; right: -4px; }
}
@media (prefers-reduced-motion: reduce) { .vp-flash.show, .vp-bezel.show { animation: none; } .vp.vp-loading .vp-spinner { animation-duration: 2s; } }

/* my courses, and the call to rate a course */
.my-course { gap: 12px; }
.my-course-head { display: flex; align-items: center; gap: 12px; color: var(--text); }
.my-course-head:hover { text-decoration: none; color: var(--primary); }
.my-course-head h3 { margin: 0; }
.my-course .course-progress { min-width: 0; }
.my-course .tag.verified { align-self: flex-start; }
.my-course-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.rate-call { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid #f59e0b; background: #f59e0b14; color: var(--text); max-width: 560px; }
.rate-call:hover { text-decoration: none; background: #f59e0b24; }
.rate-call b { display: block; }
.rate-call small { color: var(--muted); }
.rate-call-stars { color: #f59e0b; font-size: 20px; letter-spacing: 1px; flex: none; }
.empty-box { display: grid; gap: 12px; justify-items: start; padding: 22px; margin: 18px 0; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-box p { margin: 0; }

/* the admin's receipt decision on an order: a clear approve button, and a reject reason with room to write */
.receipt-decision { display: grid; gap: 14px; margin-top: 14px; }
.receipt-decision .reject-form { display: grid; gap: 8px; }
.receipt-decision .reject-form label { display: grid; gap: 6px; font-weight: 600; }
.receipt-decision .reject-form textarea { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); resize: vertical; }
.receipt-decision .reject-form .btn { justify-self: start; }
/* forgot-password page and link */
.auth-forgot { margin: 10px 0 0; text-align: center; font-size: 14px; }
.forgot-steps { margin: 4px 0 16px; padding-left: 20px; display: grid; gap: 6px; color: var(--text); }
.reset-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reset-code code { font-size: 22px; letter-spacing: 2px; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); }

/* ---------- account menu (avatar) ---------- */
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; min-width: 220px; display: grid; gap: 2px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18); }
.account-name { padding: 6px 10px 8px; font-size: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-nav .account-pop a, .account-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--text); background: none; border: 0; cursor: pointer; }
.main-nav .account-pop a:hover, .account-pop button:hover { background: var(--primary-soft); text-decoration: none; }
.account-pop form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.account-pop button { color: var(--muted); }
@media (max-width: 960px) {
  /* in the folded phone menu the account list opens in place, under the avatar */
  .account-menu { flex-basis: 100%; }
  .account-pop { position: static; box-shadow: none; margin-top: 8px; }
}

/* ---------- corner buttons step aside while reading ---------- */
/* scrolling down tucks the AI and support buttons away so they never sit on the text; scrolling up brings them back */
.ai-fab, .donate summary { transition: transform .25s cubic-bezier(.2, .8, .2, 1), opacity .2s, border-color .12s, filter .12s; }
body.fab-tucked .ai:not(.ai-open) .ai-fab, body.fab-tucked .donate:not([open]) summary { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .ai-fab, .donate summary { transition: opacity .2s; }
  body.fab-tucked .ai:not(.ai-open) .ai-fab, body.fab-tucked .donate:not([open]) summary { transform: none; }
}

/* interview generator: topics and per-question time folded under "More settings" */
.iv-more { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.iv-more > summary { list-style: none; cursor: pointer; display: grid; gap: 2px; padding: 14px 44px 14px 18px; position: relative; }
.iv-more > summary::-webkit-details-marker { display: none; }
.iv-more > summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.iv-more[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.iv-more > summary:hover b { color: var(--primary); }
.iv-more > summary small { font-size: 14px; }
.iv-setup .iv-more { margin: 0 0 16px; }
/* inside the fold the sections are not boxes of their own, just separated by a line */
.iv-setup .iv-more > fieldset { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; margin: 0 18px; padding: 14px 0 18px; }

/* ---------- services ---------- */
/* the whole service card is the link; it lifts a little like the other cards */
a.service-card { display: flex; flex-direction: column; color: var(--text); transition: transform .15s, border-color .15s; }
a.service-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); }
a.service-card ul { flex: 1; }
.service-count { display: block; margin: 0 0 12px; font-weight: 600; }
/* becoming a specialist: three cards, each saying where the member's own application stands */
.become-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.become-card { display: grid; gap: 6px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); transition: transform .15s, border-color .15s; }
.become-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); }
.become-card .muted { font-size: 14px; line-height: 1.5; }
.app-state { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.app-state.pending { background: var(--primary-soft); color: var(--primary); }
.app-state.ok { background: var(--ok-soft); color: var(--ok); }
/* the application's status: the first thing on the page once it is sent */
.app-status { margin: 8px 0 24px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.app-status.is-pending { border-color: var(--primary-2); background: var(--primary-soft); }
.app-status.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.app-status h2 { margin: 0 0 12px; font-size: 22px; }
.app-status p { margin: 10px 0 0; }
.app-status .btn { margin-top: 14px; }
.app-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.app-steps li { position: relative; padding-left: 32px; color: var(--muted); counter-increment: step; }
.app-steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px solid var(--line); background: var(--surface); color: var(--muted); }
.app-steps li.done { color: var(--text); }
.app-steps li.done::before { content: "✓"; border-color: var(--ok); background: var(--ok); color: #fff; }
.app-steps li.now { color: var(--text); font-weight: 700; }
.app-steps li.now::before { border-color: var(--primary-2); color: var(--primary); }
.app-edit { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.app-edit > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.app-edit > summary:hover { color: var(--primary); }
.app-edit > .form { padding: 0 18px 18px; }
.main-nav .account-pop a.account-pending { color: var(--primary); }
.app-status { scroll-margin-top: 88px; }
.footer-cols b a { color: inherit; font: inherit; }
.services-strip { display: none; }
@media (max-width: 720px) {
  .services-strip { display: flex; flex-direction: column; gap: 2px; margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius);
    background: var(--primary-soft); border: 1px solid var(--primary-2); color: var(--text); }
  .services-strip:hover { text-decoration: none; }
  .services-strip span { color: var(--primary); font-weight: 700; font-size: 14px; }
}

/* ---------- the Junior -> Staff road (metro map), XP, level-up card ---------- */
.journey { padding: 40px 0 8px; }
.journey-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.journey-eyebrow { margin: 0 0 10px; font: 600 13px/1.4 "Geist Mono", ui-monospace, Menlo, monospace; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary); display: flex; flex-wrap: wrap; gap: 0 8px; }
.journey h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.035em; }
.journey h1 .lvl-now { color: var(--grad-from); }
.journey-sub { color: var(--muted); }
.journey-card { position: relative; margin-top: 24px; padding: 22px 24px 24px; border-radius: 22px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.journey-card.guest { display: grid; gap: 8px; }
.journey-cta { justify-self: start; }
.journey-next { position: absolute; right: 22px; bottom: 22px; width: 300px; padding: 16px 18px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.journey-next b { font-size: 19px; }
.journey-next .progress span { background: var(--brand); }
.journey-next-row { display: flex; justify-content: space-between; margin-top: 6px; font: 500 12px/1.4 "Geist Mono", ui-monospace, monospace; color: var(--muted); }

.jmap-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.jmap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.jmap-legend i { width: 22px; height: 6px; border-radius: 3px; display: inline-block; }
.jmap-legend i.done { background: var(--text); }
.jmap-legend i.current { background: var(--brand); }
.jmap-legend i.todo { background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 8px); }
.jmap svg { display: block; width: 100%; height: auto; overflow: visible; }
.jmap .jmap-wide { margin: 18px 0 70px; }
.jmap .jmap-tall { display: none; max-width: 360px; margin: 14px 0 0; }
.jm-line { fill: none; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.jm-line.done { stroke: var(--text); }
.jm-line.current { stroke: var(--brand); }
.jm-line.todo { stroke: var(--muted); opacity: .55; stroke-dasharray: 2 20; }
.jm-dot { fill: var(--surface); stroke-width: 4; }
.jm-dot.done { stroke: var(--text); } .jm-dot.current { stroke: var(--brand); } .jm-dot.todo { stroke: var(--muted); opacity: .6; }
.jm-topic { font: 500 11px "Geist Mono", ui-monospace, monospace; fill: var(--muted); }
.jm-stop { fill: var(--surface); stroke-width: 6; }
.jm-station.done .jm-stop { stroke: var(--ok); }
.jm-station.current .jm-stop { fill: var(--brand); stroke: var(--surface); stroke-width: 5; }
.jm-station.todo .jm-stop { stroke: var(--muted); }
.jm-halo { fill: none; stroke: var(--brand); stroke-width: 2; opacity: .55; animation: jm-pulse 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes jm-pulse { 0% { transform: scale(.8); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jm-halo { animation: none; } }
.jm-tick { fill: none; stroke: var(--ok); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.jm-name { font: 700 16px Geist, system-ui, sans-serif; fill: var(--text); }
.jm-station.current .jm-name { font-size: 19px; font-weight: 800; }
.jm-station.todo .jm-name { fill: var(--muted); }
.jm-count { font: 500 12px "Geist Mono", ui-monospace, monospace; fill: var(--muted); }
@media (max-width: 860px) {
  .journey-next { position: static; width: auto; margin-top: 8px; }
  .jmap .jmap-wide { display: none; }
  .jmap .jmap-tall { display: block; }
}

/* the road on a question page's side */
.jpath { display: grid; gap: 10px; }
.jpath-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.jpath-head b { color: var(--primary); font: 600 13px "Geist Mono", ui-monospace, monospace; }
.jpath ol { list-style: none; margin: 0; padding: 0; display: grid; }
.jpath li { position: relative; display: flex; align-items: center; gap: 12px; height: 36px; font-weight: 600; font-size: 15px; }
.jpath li + li::before { content: ""; position: absolute; left: 7px; top: -10px; width: 3px; height: 20px; background: var(--line); }
.jpath li.done + li::before { background: var(--text); }
.jpath li i { position: relative; z-index: 1; flex: none; width: 17px; height: 17px; border-radius: 50%; box-sizing: border-box; border: 4px solid var(--muted); background: var(--surface); }
.jpath li.done i { border-color: var(--ok); }
.jpath li.current i { border: 0; background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 25%, transparent); }
.jpath li.current span { font-weight: 800; }
.jpath li.todo { color: var(--muted); font-weight: 500; }
.jpath li small { margin-left: auto; font: 500 12px "Geist Mono", ui-monospace, monospace; color: var(--muted); }
.jpath li.done small { color: var(--ok); }
.jpath li.current small { color: var(--primary); }
.xp-gain { font: 600 12px "Geist Mono", ui-monospace, monospace; opacity: .75; margin-left: 4px; }

.levelup { width: min(600px, calc(100vw - 32px)); box-sizing: border-box; padding: 36px 36px 30px; border-radius: 28px; text-align: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 40px 120px -30px color-mix(in srgb, var(--brand) 55%, transparent); }
.levelup::backdrop { background: color-mix(in srgb, #000 55%, transparent); backdrop-filter: blur(3px); }
.levelup[open] { animation: lu-in .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes lu-in { from { transform: translateY(16px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .levelup[open] { animation: none; } }
.levelup-eyebrow { font: 600 13px "Geist Mono", ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
.levelup-line { width: 100%; height: auto; margin: 10px 0 6px; overflow: visible; }
.levelup .lu-from { fill: var(--surface); stroke: var(--text); stroke-width: 5; }
.levelup .lu-halo { fill: none; stroke: var(--brand); stroke-width: 2; opacity: .5; }
.levelup .lu-to { fill: var(--brand); }
.levelup .lu-tick { fill: none; stroke: #111; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.levelup .lu-name { font: 600 15px Geist, system-ui, sans-serif; fill: var(--muted); }
.levelup .lu-name.now { font-weight: 800; fill: var(--primary); }
.levelup h2 { margin: 6px 0 10px; font-size: clamp(28px, 5vw, 40px); line-height: 1.08; letter-spacing: -.035em; }
.levelup h2 span { color: var(--primary); }
.levelup p { margin: 0 auto; max-width: 440px; color: var(--muted); font-size: 17px; }
.levelup-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.levelup-chips span { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font: 600 13px "Geist Mono", ui-monospace, monospace; }

/* topic page: in the stylesheet (not an inline <style> after the content), so a slow phone never paints the list unstyled */
.topic-search{position:relative;display:flex;align-items:center;margin:0 0 .9rem}
.topic-search svg{position:absolute;left:14px;width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;pointer-events:none}
.topic-search input{flex:1;min-width:0;font:inherit;font-size:15px;padding:11px 120px 11px 42px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text)}
.topic-search input:focus{outline:2px solid var(--primary-2);outline-offset:0;border-color:transparent}
.topic-search-count{position:absolute;right:14px;font-size:13px;color:var(--muted);pointer-events:none}
@media (max-width:560px){.topic-search input{padding-right:14px}.topic-search-count{position:static;margin-left:10px;white-space:nowrap}}
.topic-search-more{margin:-.4rem 0 .9rem;font-size:14px;color:var(--muted)}
.link-btn{font:inherit;font-weight:700;color:var(--primary);background:none;border:0;padding:0;cursor:pointer}
.link-btn:hover{text-decoration:underline}
.lvl-filter{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:0 0 1rem}
.lvl-filter-label{font-weight:600;margin-right:.25rem}
.lvl-chip{font:inherit;font-size:.85rem;font-weight:600;padding:.3rem .8rem;border-radius:999px;
    cursor:pointer;display:inline-flex;align-items:center;gap:.35rem;user-select:none;
    border:1px solid color-mix(in srgb, currentColor 45%, transparent);
    background:color-mix(in srgb, currentColor 14%, transparent);
    transition:opacity .12s,filter .12s}
.lvl-chip:hover{filter:brightness(1.08)}
.lvl-chip.off{opacity:.4;filter:grayscale(.85);text-decoration:line-through}
/* each chip carries its own level colour (vars adapt to light/dark) */
.lvl-chip.lvl-junior{color:var(--junior)}
.lvl-chip.lvl-strong_junior{color:var(--strong-junior)}
.lvl-chip.lvl-middle{color:var(--middle)}
.lvl-chip.lvl-strong_middle{color:var(--strong-middle)}
.lvl-chip.lvl-senior{color:var(--senior)}
.lvl-chip.lvl-staff{color:var(--staff)}
.lvl-chip.lvl-learned{font-weight:500;color:var(--text,inherit)}
.lvl-chip.lvl-learned input{margin:0}
