/* Metric-matched fallbacks (same as qnet.net): no reflow when the web fonts arrive. */
@font-face{font-family:'Roboto Fallback';font-style:normal;font-weight:400;src:local('Arial'),local('ArialMT');size-adjust:99.56%;ascent-override:93.18%;descent-override:24.52%;line-gap-override:0%}
@font-face{font-family:'Roboto Fallback';font-style:normal;font-weight:700;src:local('Arial'),local('ArialMT');size-adjust:101.22%;ascent-override:91.66%;descent-override:24.12%;line-gap-override:0%}
@font-face{font-family:'Roboto Fallback';font-style:normal;font-weight:900;src:local('Arial'),local('ArialMT');size-adjust:102.03%;ascent-override:90.92%;descent-override:23.93%;line-gap-override:0%}
@font-face{font-family:'Roboto Condensed Fallback';font-style:normal;font-weight:400;src:local('Arial'),local('ArialMT');size-adjust:88.37%;ascent-override:104.98%;descent-override:27.63%;line-gap-override:0%}
@font-face{font-family:'Roboto Condensed Fallback';font-style:normal;font-weight:700;src:local('Arial'),local('ArialMT');size-adjust:90.08%;ascent-override:102.99%;descent-override:27.10%;line-gap-override:0%}
@font-face{font-family:'Encode Sans Condensed Fallback';font-style:normal;font-weight:800;src:local('Arial'),local('ArialMT');size-adjust:94.28%;ascent-override:109.25%;descent-override:23.34%;line-gap-override:0%}

/* Headlines in scripts Encode Sans Condensed does not cover (Cyrillic, Greek): a condensed bold system face, so a
   headline never mixes a thin wide fallback with the 800 display weight. Local fonts only (QNET rule: no new web font). */
@font-face { font-family: "Display Fallback"; font-weight: 800; font-style: normal; src: local("HelveticaNeue-CondensedBlack"), local("HelveticaNeue-CondensedBold"), local("Helvetica Neue Condensed Bold"), local("ArialNarrow-Bold"), local("Arial Narrow Bold"), local("RobotoCondensed-Bold"), local("Roboto Condensed Bold"), local("Roboto-Bold"), local("Arial-BoldMT"), local("Arial Bold"); unicode-range: U+0370-03FF, U+0400-052F, U+1C80-1C8F, U+2DE0-2DFF, U+A640-A69F; size-adjust: 96%; }
/* QNET Training Platform. Light only. Phone < 744 px, tablet 744–1179 px, desktop ≥ 1180 px: three designed layouts. */
@font-face { font-family: "Encode Sans Condensed"; font-weight: 800; font-display: swap; src: url(/fonts/encode-sans-condensed-800-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Encode Sans Condensed"; font-weight: 800; font-display: swap; src: url(/fonts/encode-sans-condensed-800-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-weight: 100 900; font-display: swap; src: url(/fonts/roboto-100_900-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-weight: 100 900; font-display: swap; src: url(/fonts/roboto-100_900-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-weight: 100 900; font-display: swap; src: url(/fonts/roboto-100_900-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Roboto"; font-weight: 100 900; font-display: swap; src: url(/fonts/roboto-100_900-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

/* QNET Training Platform. Light only. Phone < 744 px, tablet 744–1179 px, desktop ≥ 1180 px: three designed layouts.
   Premium, Apple-like: ink + electric violet, QNET orange touches, Encode Sans Condensed display type, soft depth. */
:root {
  --ink: #0e0e12;
  --ink-2: #3a3a44;
  --muted: #5d5d68;
  --violet: #5b3df5;          /* signature accent: links, progress, highlights (6.2:1 on white) */
  --violet-2: #7a62ff;
  --violet-deep: #3a22c9;
  --violet-soft: #efebff;
  --violet-tint: #f7f5ff;
  --qnet: #eb6608;            /* QNET orange: brand touches, certificate, streak */
  /* Headline gradient "Sunset pop" (chosen 2026-10-24): magenta → pink → orange, every stop ≥ 3:1 on white for large text */
  --hl-grad: linear-gradient(100deg, #a21caf 0%, #db2777 50%, #e0580f 100%);
  --qnet-ink: #a14100;        /* orange text at body size */
  --qnet-soft: #fff1e7;
  --bg: #ffffff;
  --panel: #f5f5f7;
  --panel-2: #ececf0;
  --line: rgb(14 14 18 / .08);
  --line-2: rgb(14 14 18 / .14);
  --field: #8a8a94;
  --ok: #1d7038; --ok-bg: #e5f4ea;
  --warn: #7f4d00; --warn-bg: #fff1d6;
  --err: #b42318; --err-bg: #fdecea;
  --info: #3a22c9; --info-bg: #efebff;
  --focus: #5b3df5;
  --r-s: 12px; --r-m: 20px; --r-l: 28px; --r-xl: 40px; --r-ctl: 12px; --r-card: 20px; --radius: 20px; --radius-s: 12px;
  --sh-1: 0 1px 2px rgb(14 14 18 / .04), 0 8px 24px -12px rgb(14 14 18 / .12);
  --sh-2: 0 2px 6px rgb(14 14 18 / .04), 0 24px 60px -24px rgb(14 14 18 / .22);
  --sh-3: 0 4px 10px rgb(14 14 18 / .05), 0 40px 90px -30px rgb(40 20 120 / .32);
  --shadow: var(--sh-2);
  --glass: rgb(255 255 255 / .7);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Encode Sans Condensed", "Display Fallback", "Encode Sans Condensed Fallback", "Arial Narrow", system-ui, sans-serif;
  --body: "Roboto", "Roboto Fallback", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Geeza Pro", "Noto Naskh Arabic", sans-serif;
  /* Spacing: one 4/8 px scale; layout tokens change per breakpoint, components only use these. */
  --gutter: 20px;          /* page side margin */
  --section-y: 56px;       /* top and bottom of every section */
  --head-gap: 24px;        /* section headline block → its content */
  --grid-gap: 16px;        /* between cards */
  --card-pad: 20px;        /* inside every card (never stacked inside another padded block) */
  --tabbar: 68px;
  --navy: #1b2045;          /* selected path pill and the phone path bar */
  --navy-muted: #c7cbe6;    /* secondary text on navy (AA) */
  --maxw: 1240px;
  color-scheme: light;
}
[dir=rtl] { --display: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", "Noto Kufi Arabic", system-ui, sans-serif; }
/* Bold, slightly tighter headlines per script (system fonts): Arabic Naskh, Cantonese, Sinhala. */
:root[lang=ar] :is(h1, h2, h3, h4), :root[lang=si] :is(h1, h2, h3, h4) { font-weight: 800; letter-spacing: 0; }
/* Urdu: system Nastaliq when installed, Naskh otherwise (no new web font); Nastaliq needs more line height. */
:root[lang=ur] { --display: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", "Geeza Pro", system-ui, sans-serif;
  --body: "Roboto", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", "Geeza Pro", system-ui, sans-serif; }
:root[lang=ur] body { line-height: 1.95; }
:root[lang=ur] :is(h1, h2, h3, h4) { line-height: 1.5; font-weight: 700; letter-spacing: 0; }
/* Cantonese (zh-HK): system CJK fonts; no spaces between words, so break by character with strict CJK rules. */
:root[lang=zh-HK] { --display: "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --body: "Roboto", "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif; }
:root[lang=ru] :is(h1, h2, h3, h4) { letter-spacing: -.01em; }
:root[lang=zh-HK] body { line-break: strict; word-break: normal; overflow-wrap: anywhere; }
:root[lang=zh-HK] :is(h1, h2, h3, h4) { line-height: 1.2; letter-spacing: 0; font-weight: 800; }
/* Sinhala: system fonts; vowel signs above and below the line need room (no clipping). */
:root[lang=si] { --display: "Noto Sans Sinhala", "Iskoola Pota", "Sinhala Sangam MN", "Sinhala MN", system-ui, sans-serif;
  --body: "Roboto", "Noto Sans Sinhala", "Iskoola Pota", "Sinhala Sangam MN", "Sinhala MN", system-ui, sans-serif; }
:root[lang=si] body { line-height: 1.8; }
:root[lang=si] :is(h1, h2, h3, h4) { line-height: 1.35; font-weight: 800; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; } /* no global smooth scroll: page changes jump, in-page links ask for smooth themselves */
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: .98; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
/* Three title sizes: showcase pages (home hero, course hero, sign-in, welcome) keep their own XL rules; every app
   page uses this 48 px title; lesson titles are 44 px (.lesson-body h1). */
h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1; }
h2 { font-size: clamp(36px, 4.4vw, 64px); }
h3 { font-size: 26px; line-height: 1.05; }
.hl { background: var(--hl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-block: .25em .3em; margin-block: -.25em -.3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
p { margin: 0; text-wrap: pretty; }
/* Short intros (1–3 lines) balance instead: Chromium's "pretty" leaves a one-word last line on two-line paragraphs */
.section-head p, .hero p, .lead, .desc, .nf-text, .empty p, .tile p, .pc-top p, .ai-msg.bot > p:only-child { text-wrap: balance; }
/* Two-tone titles: the gradient second line balances on its own; short proof labels too */
:is(h1, h2, h3) > .hl { display: inline-block; text-wrap: balance; }
.proof li, .proof li > span { text-wrap: balance; }
a { color: var(--violet); text-underline-offset: 3px; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; flex: none; }
.num, time, .tabular { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.no-scroll { overflow: hidden; }
#live { position: fixed !important; top: 0; inset-inline-start: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
#main:focus, [tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-s); text-decoration: none; }
.skip:focus { top: 12px; }
.user-text { overflow-wrap: anywhere; }
/* Titles keep whole words (fitWords() in learner.js shrinks a title whose longest word is too wide); body text may still wrap anywhere */
:is(h1, h2, h3, .sc-ctitle, .sc-ptitle, .tl-card strong, .pt-tx strong):is(.user-text, :has(.user-text)), :is(h1, h2, h3) .user-text { overflow-wrap: normal; word-break: normal; hyphens: manual; }
[dir=rtl] .flip, [dir=rtl] .ic-arrow { transform: scaleX(-1); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: 14px; border: 1px solid transparent; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.btn .ic { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover .ic-arrow .ic { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 8px 20px -10px rgb(14 14 18 / .6); }
.btn.primary:hover { background: #26262e; }
.btn.accent { background: var(--violet); color: #fff; box-shadow: 0 10px 24px -10px rgb(91 61 245 / .7); }
.btn.accent:hover { background: var(--violet-deep); }
.btn.ghost, .btn.line { background: #fff; border-color: var(--line-2); color: var(--ink); box-shadow: var(--sh-1); }
.btn.ghost:hover, .btn.line:hover { border-color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.white { background: #fff; color: var(--ink); }
.btn.white:hover { background: var(--panel); }
.btn.outline-white { background: transparent; color: #fff; border-color: rgb(255 255 255 / .5); }
.btn.outline-white:hover { background: rgb(255 255 255 / .08); }
.btn.danger { background: var(--err); color: #fff; }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--ink); position: relative; }
.icon-btn:hover { background: var(--panel); }
.tag, .chip { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--panel); color: var(--ink-2); white-space: nowrap; width: fit-content; }
.tag .ic, .chip .ic { width: 15px; height: 15px; }
.tag.ok, .chip.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn, .chip.warn { background: var(--warn-bg); color: var(--warn); }
.tag.err, .chip.err { background: var(--err-bg); color: var(--err); }
.tag.info, .chip.info { background: var(--info-bg); color: var(--info); }
.tag.brand, .chip.brand { background: var(--violet-soft); color: var(--violet-deep); }
.tag.qnet { background: var(--violet-soft); color: var(--violet-deep); }
.tag.solid { background: var(--ink); color: #fff; }
.tag.glass { background: rgb(255 255 255 / .85); backdrop-filter: blur(8px); color: var(--ink); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--qnet); }
.chip.outline { background: #fff; border: 1px solid var(--line-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 700 13px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--hl-grad); }
.badge { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.field { display: grid; gap: 8px; }
.field label, .label { font-weight: 600; font-size: 15px; }
.field .hint { color: var(--muted); font-size: 14px; }
.field .error, .error { color: var(--err); font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
input[type=text], input[type=email], input[type=search], input[type=date], input:not([type]), select, textarea { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--field); border-radius: 14px; background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgb(91 61 245 / .14); outline: none; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--err); box-shadow: 0 0 0 3px rgb(180 35 24 / .12); }
.code-input { font: 700 30px/1 var(--body); letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: center; min-height: 48px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--violet); flex: none; margin: 0; }
.progress { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), #9b7bff); border-radius: inherit; transition: width .6s var(--ease); }
.progress.ok > i { background: var(--ok); }
.ring { --p: 0; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--violet) calc(var(--p) * 1%), var(--panel-2) 0); flex: none; }
.ring span { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 20px var(--display); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
/* 404: one calm screen — the number in the headline gradient, a plain sentence, two ways back */
.nf { min-height: calc(100svh - 160px); display: grid; align-content: center; justify-items: center; text-align: center; gap: 16px; padding-block: 48px; background: radial-gradient(50% 45% at 50% 40%, var(--violet-tint), transparent 70%); }
.nf-code { margin: 0; font: 800 clamp(112px, 22vw, 240px)/.85 var(--display); letter-spacing: -.02em; }
.nf h1 { font-size: clamp(32px, 5vw, 56px); text-wrap: balance; }
.nf-text { margin: 0; max-width: 46ch; color: var(--muted); font-size: 18px; text-wrap: pretty; }
.nf-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); display: grid; gap: 16px; justify-items: center; }
.empty > .ic { width: 40px; height: 40px; color: var(--violet); }
body.booting .lx-foot, body.booting .cta-band { display: none; }
.skeleton { background: linear-gradient(90deg, var(--panel) 0, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-l); min-height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- toasts, dialogs, menus ---------- */
#toasts { position: fixed; inset-inline: 0; bottom: calc(var(--tabbar) + 16px); display: grid; justify-items: center; gap: 8px; z-index: 90; pointer-events: none; padding: 0 16px; }
.toast { display: flex; gap: 12px; align-items: center; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; box-shadow: var(--sh-2); font-weight: 500; transition: opacity .3s, transform .3s; }
.toast.error { background: var(--err); }
.toast.out { opacity: 0; transform: translateY(8px); }
.scrim { position: fixed; inset: 0; background: rgb(14 14 18 / .45); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 80; padding: 16px; }
.dialog { background: #fff; border-radius: var(--r-l); width: min(540px, 100%); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: var(--sh-3); }
.dialog.wide { width: min(880px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 16px 0 24px; }
.dialog-head h2 { font-size: 30px; }
.dialog-body { padding: 12px 24px 8px; display: grid; gap: 16px; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 24px 24px; flex-wrap: wrap; }
.menu { position: fixed; top: 68px; inset-inline-end: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-3); padding: 8px; min-width: 260px; display: grid; z-index: 60; }
.menu a, .menu button { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; text-align: start; cursor: pointer; font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--panel); }
.menu .who { padding: 8px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.menu .who strong { display: block; color: var(--ink); font-size: 16px; }

/* ================= LEARNER SHELL ================= */
.lx-head { position: sticky; top: 0; z-index: 40; background: linear-gradient(180deg, rgb(255 255 255 / .78), rgb(255 255 255 / .55)); backdrop-filter: saturate(2) blur(24px); -webkit-backdrop-filter: saturate(2) blur(24px); box-shadow: inset 0 -1px 0 rgb(255 255 255 / .6); border-bottom: 1px solid transparent; transition: border-color .2s; }
.lx-head.scrolled { border-bottom-color: var(--line); }
.lx-head-in { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 var(--gutter); max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 20px; width: auto; }
.brand span { font: 800 20px var(--display); letter-spacing: 0; padding-inline-start: 12px; border-inline-start: 1px solid var(--line-2); line-height: 1; white-space: nowrap; }
/* "Training Platform" carries the headline gradient (violet → QNET orange), same as .hl; large bold text, 3:1 minimum holds */
.brand span { background: var(--hl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-block: .25em .3em; margin-block: -.25em -.3em; }
/* Gradient text is only painted inside the box: extra block padding (cancelled by the negative margin) keeps the dot of "i" and the descender of "g" visible */
@media (max-width: 420px) { .brand { gap: 8px; flex-shrink: 0; } .brand span { font-size: 15px; padding-inline-start: 8px; } .brand img { height: 15px; } .lang-btn { padding: 0 8px; gap: 4px; } .lang-btn .short { display: none; } }
/* Phones: the language button keeps only its globe (the select inside still names the language for screen readers) so the brand never runs under it */
.lx-nav { display: none; gap: 2px; margin-inline-start: 32px; background: rgb(14 14 18 / .05); border-radius: 14px; padding: 4px; box-shadow: inset 0 1px 2px rgb(14 14 18 / .06); }
.lx-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; border-radius: 10px; transition: background .2s, color .2s; }
.lx-nav a:hover { color: var(--ink); }
.lx-nav a[aria-current=page] { background: #fff; color: var(--ink); box-shadow: var(--sh-1); font-weight: 600; }
.lx-nav .ic { display: none; }
.lang-wrap { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 500; font-size: 15px; color: var(--ink-2); }
.lang-wrap:hover .lang-btn { background: var(--panel); }
button.lang-btn { border: 0; background: none; cursor: pointer; font-family: inherit; }
.lang-btn[aria-expanded=true] { background: var(--panel); }
/* Branded language menu: two columns of native names, current one checked */
.lang-menu { position: fixed; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-3); padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 2px; width: max-content; max-width: calc(100vw - 16px); animation: menu-in .18s var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.lang-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 15px var(--body); text-align: start; cursor: pointer; }
.lang-opt:hover, .lang-opt:focus-visible { background: var(--panel); outline: none; }
.lang-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.lang-opt[aria-selected=true] { background: var(--violet-soft); color: var(--violet-deep); font-weight: 600; }
.lang-opt .ic { width: 16px; height: 16px; flex: none; }
@media (prefers-reduced-motion: reduce) { .lang-menu { animation: none; } }
/* Phones: the menu spans the screen width (8px from each edge) instead of hanging off the right edge */
@media (max-width: 480px) { .lang-menu { inset-inline: 8px !important; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lang-btn .long { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(140deg, var(--violet), #9b7bff); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 0; cursor: pointer; margin-inline-start: 4px; }
.lx-tabs { position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; height: var(--tabbar); background: linear-gradient(140deg, rgb(255 255 255 / .72), rgb(255 255 255 / .45)); backdrop-filter: saturate(2) blur(26px); -webkit-backdrop-filter: saturate(2) blur(26px); border: 1px solid rgb(255 255 255 / .7); box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 24px 50px -18px rgb(30 15 90 / .35); border-radius: 22px; box-shadow: var(--sh-2); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; }
.lx-tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 16px; min-height: 44px; }
.lx-tabs a[aria-current=page] { color: var(--violet-deep); background: var(--violet-soft); }
.lx-rail { display: none; }
.lx-main { min-height: 70dvh; }
body.focus-mode .lx-tabs, body.focus-mode .lx-foot, body.focus-mode .cta-band { display: none; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
/* Pages with a title and a form or text: left edge under the logo like every page, content at a reading width. */
.read > * { max-width: 820px; }
.section { padding-block: var(--section-y); }
.section.grey { background: var(--panel); }
.section-head { display: grid; gap: 12px; margin-bottom: var(--head-gap); }
.section-head.split { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 56ch; font-size: 18px; }
.center { text-align: center; justify-items: center; margin-inline: auto; }
.offline { background: var(--warn-bg); color: var(--warn); padding: 12px var(--gutter); font-weight: 600; display: flex; gap: 8px; align-items: center; justify-content: center; }
.preview-bar { background: var(--violet-soft); color: var(--violet-deep); padding: 12px var(--gutter); font-weight: 600; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 900px; z-index: -1; background:
  radial-gradient(40% 50% at 82% 18%, rgb(91 61 245 / .18), transparent 70%),
  radial-gradient(30% 40% at 96% 60%, rgb(235 102 8 / .14), transparent 70%),
  radial-gradient(40% 45% at 8% 0%, rgb(155 123 255 / .12), transparent 70%); }
.stage-media::before { content: ""; position: absolute; width: 60%; aspect-ratio: 1; inset-inline-start: -12%; bottom: -10%; border-radius: 50%; background: radial-gradient(closest-side, rgb(91 61 245 / .35), transparent); filter: blur(20px); z-index: 0; }
.hero-in { display: grid; gap: 40px; padding: 32px var(--gutter) 64px; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.hero-copy { display: grid; gap: 24px; align-content: center; }
.hero h1 { font-size: clamp(50px, 6.6vw, 104px); line-height: .92; }
.hero .lead { font-size: 20px; color: var(--ink-2); max-width: 40ch; line-height: 1.5; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; gap: 24px; flex-wrap: wrap; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.trust span { display: inline-flex; gap: 8px; align-items: center; }
.trust .ic { color: var(--violet); width: 18px; height: 18px; }
.stage-media { position: relative; min-height: 300px; }
.stage-media .photo { position: absolute; inset: 0 0 64px 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-3); }
.stage-media .photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgb(14 14 18 / .35)); }
/* Phone: the photo keeps a real 4:3 frame and the featured-course card sits under it, overlapping only its lower edge */
@media (max-width: 743px) {
  .stage-media { min-height: 0; display: grid; }
  .stage-media .photo { position: relative; inset: auto; aspect-ratio: 4 / 3; max-width: 100%; }
  .stage-media .next-card { position: relative; inset: auto; margin: -48px 12px 0; }
}
/* Liquid glass: translucent fill, blurred and saturated backdrop, bright rim, specular highlight and a soft inner glow. */
.glass { position: relative; isolation: isolate; background: linear-gradient(140deg, rgb(255 255 255 / .62), rgb(255 255 255 / .28) 55%, rgb(255 255 255 / .42)); -webkit-backdrop-filter: blur(26px) saturate(1.9) brightness(1.04); backdrop-filter: blur(26px) saturate(1.9) brightness(1.04); border: 1px solid rgb(255 255 255 / .6); box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), inset 0 -1px 0 rgb(255 255 255 / .3), inset 0 0 24px rgb(255 255 255 / .25), 0 24px 60px -24px rgb(30 15 90 / .38); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: radial-gradient(120% 60% at 15% 0%, rgb(255 255 255 / .75), transparent 45%), radial-gradient(80% 50% at 100% 100%, rgb(155 123 255 / .14), transparent 60%); }
.glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; background: linear-gradient(135deg, rgb(255 255 255 / .9), rgb(255 255 255 / .1) 40%, rgb(255 255 255 / .05) 60%, rgb(255 255 255 / .7)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.next-card.glass, .facts.glass, .mini-stats .glass { background: linear-gradient(140deg, rgb(255 255 255 / .86), rgb(255 255 255 / .74)); }
.next-card { position: absolute; inset-inline: 12px; bottom: 0; border-radius: var(--r-l); padding: 20px; display: grid; gap: 12px; z-index: 2; }
.next-card .k { display: flex; gap: 8px; align-items: center; font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.next-card .k .live { width: 8px; height: 8px; border-radius: 50%; background: var(--qnet); box-shadow: 0 0 0 4px rgb(235 102 8 / .2); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgb(235 102 8 / 0); } }
.next-card strong { font: 800 26px/1.05 var(--display); text-wrap: balance; }
.next-card .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.next-card .meta span { display: inline-flex; gap: 8px; align-items: center; }
.next-card .meta .ic { width: 16px; height: 16px; }
.count { display: flex; gap: 8px; align-items: center; }
.count b { display: grid; justify-items: center; min-width: 54px; padding: 8px 8px; border-radius: 12px; background: #fff; box-shadow: var(--sh-1); font: 800 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.count b small { font: 600 10px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.count .lbl { font-size: 13px; color: var(--muted); margin-inline-end: 4px; }
.mini-stats { position: absolute; top: 16px; inset-inline-start: 16px; display: flex; gap: 8px; z-index: 2; }
.mini-stats > div { border-radius: 16px; padding: 8px 12px; display: flex; gap: 12px; align-items: center; }
.mini-stats strong { font: 800 26px/1 var(--display); }
.mini-stats span { font-size: 12px; line-height: 1.2; color: var(--ink-2); }

/* ---------- welcome (signed in) ---------- */
.welcome-in { display: grid; gap: 32px; padding: 24px var(--gutter) 40px; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.welcome h1 { font-size: clamp(48px, 6vw, 96px); line-height: .92; }
.welcome .lead { color: var(--ink-2); font-size: 19px; }
.mom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
/* Phone: the three counters on one row; the week becomes seven thin bars, secondary lines get smaller */
@media (max-width: 743px) {
  .mom { gap: 8px; }
  .mom > div { padding: 12px; gap: 6px; min-width: 0; }
  .mom strong { font-size: 28px; }
  .mom > div > span, .mom > div > a { font-size: 12px !important; line-height: 1.3; }
  .mom .flame .ic { width: 20px; height: 20px; }
}
.mom > div { background: #fff; border-radius: var(--r-m); box-shadow: var(--sh-1); border: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; align-content: start; }
.mom strong { font: 800 36px/1 var(--display); font-variant-numeric: tabular-nums; }
.mom span { font-size: 13px; color: var(--muted); }
.week { display: flex; gap: 4px; }
.week i { width: 18px; height: 18px; border-radius: 6px; background: var(--panel-2); display: grid; place-items: center; font-style: normal; font-size: 10px; color: var(--muted); font-weight: 600; }
.week i.on { background: var(--violet); color: #fff; }
.cont { display: grid; background: #fff; border-radius: var(--r-l); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--sh-3); border: 1px solid var(--line); transition: transform .3s var(--ease); }
.cont:hover { transform: translateY(-4px); }
.cont .pic { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.cont .pic img { width: 100%; height: 100%; object-fit: cover; }
.cont .pic .play { position: absolute; inset: 0; display: grid; place-items: center; }
.cont .pic .play span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.cont .pic .play .ic { width: 26px; height: 26px; margin-inline-start: 4px; fill: currentColor; }
.cont .txt { padding: 20px 24px 24px; display: grid; gap: 12px; }
.cont .k { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--violet-deep); }
.cont h2 { font-size: 34px; }
.cont .pct { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- course cards ---------- */
.grid { display: grid; gap: var(--grid-gap); grid-template-columns: 1fr; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.toolbar input[type=search] { max-width: 340px; padding-inline-start: 48px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235d5d68' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 16px center; }
[dir=rtl] .toolbar input[type=search] { background-position: calc(100% - 16px) center; }
/* Compact search that widens while in use. */
.toolbar .search { flex: 1 1 100%; transition: flex-basis .3s var(--ease); }
.toolbar .search input { max-width: none; }
.toolbar .shelf-nav { margin-inline-start: auto; }
/* Below desktop: search and "View all" share the first row, the category filter takes the full second row */
@media (max-width: 1179px) {
  .toolbar .search { flex: 1 1 0; min-width: 0; order: 0; }
  .toolbar .search input { min-height: 44px; }
  .toolbar .shelf-nav { order: 1; margin-inline-start: 0; flex: none; }
  .toolbar .seg { order: 2; flex: 1 1 100%; }
}
@media (min-width: 1180px) {
  .toolbar { flex-wrap: nowrap; }
  .toolbar .search { flex: 0 0 200px; }
  .toolbar .search:focus-within, .toolbar .search.filled { flex-basis: 320px; }
  .toolbar .seg { min-width: 0; }
}
/* Segmented category control: one row, scrolls sideways when it runs out of room. */
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: rgb(14 14 18 / .05); box-shadow: inset 0 1px 2px rgb(14 14 18 / .06); overflow-x: auto; scrollbar-width: none; max-width: 100%; flex: 0 1 auto; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.seg::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); font-weight: 500; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.filter:hover { color: var(--ink); }
a.filter { display: inline-flex; align-items: center; text-decoration: none; }
.pf-tabs { width: fit-content; align-self: flex-start; justify-self: start; -webkit-mask: none; mask: none; }
.filter[aria-pressed=true], .filter[aria-current=page] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }
@media (min-width: 1180px) { .seg { -webkit-mask: none; mask: none; } }
.ccard { min-width: 0; background: #fff; border-radius: var(--r-l); padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
a.ccard:hover { box-shadow: var(--sh-3); transform: translateY(-6px); }
.ccard .pic { aspect-ratio: 16 / 10; border-radius: 0; overflow: hidden; position: relative; background: var(--panel); }
.ccard .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
a.ccard:hover .pic img { transform: scale(1.04); }
.ccard .pic .tag { position: absolute; top: 12px; inset-inline-start: 12px; }
.ccard .body { min-width: 0; padding: var(--card-pad); display: grid; gap: 12px; flex: 1; align-content: space-between; }
.ccard { container-type: inline-size; }
/* Card titles follow the card width (narrow shelf cards at 1194/390 broke "The QNET business presentation" word by word) */
.ccard h3 { font-size: clamp(22px, 11.5cqi, 30px); }
.ccard .desc { color: var(--muted); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ccard .meta { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.ccard .meta span { display: inline-flex; gap: 8px; align-items: center; }
.ccard .meta .ic { width: 16px; height: 16px; color: var(--violet); }
.ccard .foot { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding-top: 4px; flex-wrap: nowrap; }
/* One line in every language: the Start button never shrinks; the certificate chip shortens with an ellipsis, and on very
   narrow cards keeps only its icon (the full word stays in its title and for screen readers) */
.ccard .foot > .go { flex: none; }
.ccard .foot > .tag { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.ccard .foot > .tag .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 250px) { .ccard .foot > .tag .tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
.ccard .foot .progress { flex: 1; }
.ccard .foot .pct { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ccard .go { white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 0 16px; min-height: 42px; font-size: 15px; font-weight: 600; }
.ccard .go .ic { width: 16px; height: 16px; }
.soon-card { border: 1.5px dashed var(--line-2); border-radius: var(--r-l); display: grid; place-items: center; text-align: center; padding: 32px; color: var(--muted); gap: 12px; min-height: 280px; align-content: center; }
.soon-card .ic { width: 32px; height: 32px; color: var(--violet); }

/* placeholder */
/* ---------- paper-stack illustration (from spa-training-calendar) for business courses ---------- */
.pa{position:absolute;inset:0;container:pa/size;overflow:hidden;--rot:1;
  --pa-bg:linear-gradient(135deg,#E4E8FF 0%,#D9EEFF 100%);--pa-p:linear-gradient(155deg,#5466C9,#24306A);
  background:radial-gradient(60% 80% at 78% 18%,rgba(255,255,255,.9),transparent 62%),radial-gradient(50% 70% at 10% 100%,rgba(255,255,255,.55),transparent 60%),var(--pa-bg)}
[dir=rtl] .pa{--rot:-1}
.pa.c-business{--pa-bg:linear-gradient(135deg,#ECEEF7,#DCE1F2);--pa-p:linear-gradient(155deg,#2B3670,#1C244B)}
.pa.c-health{--pa-bg:linear-gradient(135deg,#F0FCCC,#E1F3A6);--pa-p:linear-gradient(155deg,#8DAE23,#2D580A)}
.pa.c-wellness{--pa-bg:linear-gradient(135deg,#EEEDFB,#F6E6F3);--pa-p:linear-gradient(155deg,#5B4BC4,#2B2F8F)}
.pa.c-personal{--pa-bg:linear-gradient(135deg,#F7EEED,#EBD6D3);--pa-p:linear-gradient(155deg,#C99490,#6E3F3A)}
.pa.c-holidays{--pa-bg:linear-gradient(135deg,#EBF1F7,#FFF6D6);--pa-p:linear-gradient(155deg,#2A5BA8,#1C468A)}
.pa.c-home{--pa-bg:linear-gradient(135deg,#E8F3FB,#CFE5F6);--pa-p:linear-gradient(155deg,#7EBEE7,#0054A6)}
.pa.c-watches{--pa-bg:linear-gradient(135deg,#F1F1F1,#DFDFDF);--pa-p:linear-gradient(155deg,#6B6B6B,#3A3A3A)}
/* One palette per business topic (paper-stack art): neighbouring courses never look alike. */
.pa.t-kyc{--pa-bg:linear-gradient(135deg,#EEEBFF,#DDD6FF);--pa-p:linear-gradient(155deg,#7A62FF,#3A22C9)}
.pa.t-compliance{--pa-bg:linear-gradient(135deg,#FFEAF3,#FFD3E6);--pa-p:linear-gradient(155deg,#E8458F,#A3175A)}
.pa.t-leader-compliance{--pa-bg:linear-gradient(135deg,#ECEEF7,#DCE1F2);--pa-p:linear-gradient(155deg,#2B3670,#1C244B)}
.pa.t-vo{--pa-bg:linear-gradient(135deg,#E6F4FF,#CBE8FF);--pa-p:linear-gradient(155deg,#2FA7FF,#0B6AB8)}
.pa.t-register{--pa-bg:linear-gradient(135deg,#E3FAF1,#C7F2E2);--pa-p:linear-gradient(155deg,#14C58E,#0A7C58)}
.pa.t-present{--pa-bg:linear-gradient(135deg,#E2F7F7,#C3EDEE);--pa-p:linear-gradient(155deg,#1BA6A6,#0C6B6B)}
.pa.t-comp{--pa-bg:linear-gradient(135deg,#E9ECFF,#D2D8FF);--pa-p:linear-gradient(155deg,#4C5BD4,#2B3590)}
.pa.t-qlearn{--pa-bg:linear-gradient(135deg,#EAF9E3,#D2F0C3);--pa-p:linear-gradient(155deg,#43A047,#2E7D32)}
.pa.t-support{--pa-bg:linear-gradient(135deg,#F0E8FF,#E1D3FF);--pa-p:linear-gradient(155deg,#9B5CF6,#6328C8)}
.pa.t-otp{--pa-bg:linear-gradient(135deg,#EDF1F5,#D9E1EA);--pa-p:linear-gradient(155deg,#52708C,#2F4A63)}
.pa.t-harmoniq{--pa-bg:linear-gradient(135deg,#FDE9FF,#F2D3FA);--pa-p:linear-gradient(155deg,#B54BD6,#7A1F98)}
.pa.t-team-welcome{--pa-bg:linear-gradient(135deg,#FFE9F6,#FFD1EC);--pa-p:linear-gradient(155deg,#D9418F,#9C1760)}
.pa.t-team-meeting{--pa-bg:linear-gradient(135deg,#E6FBFF,#C7F1FA);--pa-p:linear-gradient(155deg,#18B4D6,#0B7790)}
.pa.t-team-followup{--pa-bg:linear-gradient(135deg,#E8FBEF,#CDF3DB);--pa-p:linear-gradient(155deg,#22B573,#117A49)}
.pa-stack{position:absolute;top:50%;inset-inline-end:10cqw;width:60cqmin;height:76cqmin;transform:translateY(-48%)}
.pa-back,.pa-front{position:absolute;inset:0;border-radius:5.5cqmin;background:#fff;box-shadow:0 1px 1px rgba(28,36,75,.04),0 14cqmin 26cqmin -10cqmin rgba(28,36,75,.24),0 3cqmin 8cqmin -3cqmin rgba(28,36,75,.08)}
.pa-back{transform:translateX(calc(var(--rot) * -20cqmin)) translateY(-3cqmin) rotate(calc(var(--rot) * -8deg));padding:9cqmin 7cqmin;display:flex;flex-direction:column;gap:3.2cqmin;opacity:.96}
.pa-back i{display:block;height:2.4cqmin;border-radius:2cqmin;background:#E7EAF1;width:72%}
.pa-back i:nth-child(2){width:88%}.pa-back i:nth-child(3){width:56%}.pa-back i:nth-child(4){width:80%}.pa-back i:nth-child(5){width:44%}
.pa-front{transform:rotate(calc(var(--rot) * 4deg));padding:5.5cqmin;display:flex;flex-direction:column;gap:3.4cqmin}
.pa-chip{width:9.5cqmin;height:9.5cqmin;border-radius:2.8cqmin;background:var(--qnet);display:grid;place-items:center;flex:none;box-shadow:0 2cqmin 4cqmin -1.5cqmin rgba(235,102,8,.55)}
.pa-chip svg{width:62%;height:auto}
.pa-bars{display:flex;flex-direction:column;gap:2cqmin;flex:none}
.pa-bars i{display:block;height:3cqmin;border-radius:2cqmin;background:#DDE1EA;width:64%}
.pa-bars i+i{width:40%;background:#ECEEF4}
.pa-panel{flex:1;border-radius:4cqmin;background:var(--pa-p);display:grid;place-items:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.28),inset 0 -10cqmin 18cqmin -8cqmin rgba(0,0,0,.12);position:relative;overflow:hidden}
.pa-panel::before{content:"";position:absolute;inset:-30% -10% auto auto;width:70%;height:80%;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.28),transparent 65%)}
.pa-panel svg{width:30%;height:auto;color:rgba(255,255,255,.95);position:relative}
@container pa (max-aspect-ratio:5/4){.pa-stack{inset-inline-start:auto;inset-inline-end:auto;left:50%;transform:translate(-50%,-48%)}}
@container pa (max-width:140px){
  .pa-back,.pa-bars{display:none}
  .pa-stack{width:62cqmin;height:80cqmin}
  .pa-front{padding:7cqmin;gap:5cqmin;border-radius:9cqmin}
  .pa-chip{width:16cqmin;height:16cqmin;border-radius:4.5cqmin}
  .pa-panel{border-radius:6cqmin}
  .pa-panel svg{width:46%}
}


/* Course shelf: one row that scrolls sideways (swipe on phone, arrows on desktop); "View all" switches to the grid. */
.grid.rail { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(84%, 340px); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 12px var(--gutter) 20px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
/* The shelf scrolls sideways only: vertical wheel/trackpad goes to the page (hover lift + shadows used to give it 8px of vertical scroll) */
.grid.rail::-webkit-scrollbar { display: none; }
.grid.rail > * { scroll-snap-align: start; }
.shelf-nav { display: flex; gap: 8px; align-items: center; }
.shelf-nav .icon-btn { border: 1px solid var(--line-2); background: #fff; box-shadow: var(--sh-1); border-radius: 50%; }
.shelf-nav .icon-btn[disabled] { opacity: .35; cursor: default; }
.shelf-nav .arrows { display: none; gap: 8px; }
@media (min-width: 1180px) { .shelf-nav .arrows { display: flex; } .grid.rail { grid-auto-columns: calc((100% - 2 * var(--gutter) - 3 * 24px) / 4); } }
@media (min-width: 744px) and (max-width: 1179px) { .grid.rail { grid-auto-columns: calc((100% - 2 * var(--gutter) - 24px) / 2.15); } }

/* ---------- bento (why QNET Training Platform) ---------- */
.bento { display: grid; gap: var(--grid-gap); grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 20px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
.bento::-webkit-scrollbar { display: none; }
.bento > * { scroll-snap-align: center; }
/* Phone carousel: every tile has the same height and its content is laid out for it (not shrunk, not left half-empty):
   Free = proof figures at the bottom, certificate centred and larger, language list fills, AI chat example trimmed */
@media (max-width: 743px) {
  .bento > .tile { height: 460px; display: flex; flex-direction: column; gap: 12px; }
  .bento > .free-tile .proof { margin-top: auto; gap: 16px; }
  .bento > .free-tile .proof strong { font-size: 44px; }
  .bento > .cert-tile > .cert-stage { margin-block: auto; }
  .bento > .lang-tile > :last-child { margin-top: auto; }
  .bento > .tile.wide:not(.lang-tile) .ai-msg { font-size: 15px; }
  .bento > .tile.wide:not(.lang-tile) .ai-msg.bot { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; max-height: calc(4 * 1.55em + 32px); }
  .bento > .tile.wide:not(.lang-tile) .ai-tile-head > .orb-ai { display: none; }
}
.tile { border-radius: var(--r-l); padding: var(--card-pad); position: relative; overflow: hidden; display: grid; gap: 12px; align-content: start; min-height: 0; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.tile h3 { font-size: 34px; }
.tile p { color: var(--ink-2); max-width: 36ch; text-wrap: balance; }
.tile.ink { background: var(--ink); color: #fff; }
.tile.ink p { color: #cfcfd8; }
.tile.violet { background: linear-gradient(150deg, #6f53ff, var(--violet) 45%, #2d17a8); color: #fff; }
.tile.violet p { color: #e6e1ff; }
.tile .big { font: 800 clamp(56px, 6.4vw, 96px)/.85 var(--display); letter-spacing: -.01em; }
.langs-wall { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 800 clamp(28px, 3vw, 40px)/1.05 var(--display); margin-top: auto; }
.langs-wall span:nth-child(odd) { color: #fff; }
.langs-wall span:nth-child(even) { color: rgb(255 255 255 / .45); }
.mini-cert { margin-top: auto; background: #fff; border-radius: 16px; padding: 16px; display: grid; gap: 4px; justify-items: center; text-align: center; box-shadow: var(--sh-2); }
.mini-cert .medal-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-deep); margin-bottom: 4px; }
.mini-cert img { height: 16px; width: auto; }
.mini-cert b { font: 800 22px var(--display); color: var(--ink); }
.mini-cert small { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.mini-live { margin-top: auto; display: grid; gap: 8px; }
.mini-live div { display: flex; gap: 12px; align-items: center; background: rgb(255 255 255 / .12); border-radius: 14px; padding: 8px 12px; font-size: 14px; }
.mini-live img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.mini-live b { font: 800 18px var(--display); min-width: 46px; }

/* Language tile: a lesson frame with a subtitle line cycling through the five languages. */
.lang-tile { display: grid; gap: 24px; align-items: center; }
.lt-copy { display: grid; gap: 8px; align-content: start; }
/* 12 languages: one row that scrolls sideways (horizontal only), with a soft fade at the end. */
.lt-pills { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding-block: 4px; -webkit-mask: linear-gradient(to right, #000 85%, transparent); mask: linear-gradient(to right, #000 85%, transparent); }
[dir=rtl] .lt-pills { -webkit-mask: linear-gradient(to left, #000 85%, transparent); mask: linear-gradient(to left, #000 85%, transparent); }
.lt-pills::-webkit-scrollbar { display: none; }
.lt-pills .lt-pill { flex: none; }
.lt-pill { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .18); background: rgb(255 255 255 / .06); color: #e6e6ee; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.lt-pill:hover { border-color: rgb(255 255 255 / .45); }
.lt-pill[aria-pressed=true] { background: #fff; color: var(--ink); border-color: #fff; }
.lt-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-m); overflow: hidden; background: #10131f; box-shadow: 0 24px 60px -20px rgb(91 61 245 / .55); }
.lt-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.lt-play { position: absolute; top: 12px; inset-inline-start: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgb(255 255 255 / .18); backdrop-filter: blur(8px); }
.lt-play .ic { width: 16px; height: 16px; }
.lt-bar { position: absolute; inset-inline: 0; bottom: 18px; display: flex; justify-content: center; padding: 0 16px; }
.lt-sub { background: rgb(0 0 0 / .78); color: #fff; padding: 6px 14px; border-radius: 8px; font: 500 clamp(15px, 1.4vw, 19px)/1.35 var(--body); text-align: center; }
.lt-sub.in { animation: lt-in .45s var(--ease); }
@keyframes lt-in { from { opacity: 0; transform: translateY(6px); } }
.lt-progress { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / .15); }
.lt-progress i { display: block; height: 100%; width: 38%; background: var(--violet-2); }
@media (min-width: 744px) { .lang-tile { grid-template-columns: 1fr 1.15fr; } }

/* ---------- live sessions ---------- */
.live-list { display: grid; gap: 12px; }
.live-day { font: 800 24px var(--display); padding: 24px 0 4px; display: flex; gap: 12px; align-items: baseline; }
.live-day small { font: 500 14px var(--body); color: var(--muted); }
.live-row { display: grid; grid-template-columns: 64px 56px 1fr; gap: 8px 16px; align-items: center; padding: 16px; background: #fff; border-radius: var(--r-m); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.live-row:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.live-row .when { font: 800 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.live-row .when small { display: block; font: 500 12px var(--body); color: var(--muted); margin-top: 4px; }
.live-row .thumb { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.live-row .what { display: grid; gap: 8px; min-width: 0; }
.live-row .what strong { font: 800 22px/1.05 var(--display); overflow-wrap: anywhere; }
.live-row .what .row { gap: 8px; }
.live-row .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.live-row.now .when { color: var(--violet); }
.live-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
.live-card { background: #fff; border-radius: var(--r-l); padding: 12px; display: grid; gap: 0; border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.live-card:hover { box-shadow: var(--sh-3); transform: translateY(-6px); }
.live-card .pic { aspect-ratio: 16 / 9; border-radius: var(--r-m); overflow: hidden; position: relative; }
.live-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.live-card .pic .tag { position: absolute; top: 12px; inset-inline-start: 12px; }
.live-card .pic .date { position: absolute; bottom: 12px; inset-inline-start: 12px; border-radius: 14px; padding: 8px 12px; display: grid; line-height: 1; }
.live-card .pic .date b { font: 800 26px var(--display); }
.live-card .pic .date span { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.live-card .body { padding: 16px 12px 12px; display: grid; gap: 12px; }
.live-card strong { font: 800 26px/1.05 var(--display); }

/* ---------- paths ---------- */
.path { display: grid; gap: 24px; }
.path + .path { margin-top: 64px; }
.path-card { border-radius: var(--r-l); overflow: hidden; background: var(--ink); color: #fff; display: grid; position: relative; }
.path-card .pic { aspect-ratio: 16 / 6; position: relative; }
.path-card .pic img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.path-card .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--ink)); }
.path-card .txt { padding: 0 24px 24px; margin-top: -40px; position: relative; display: grid; gap: 16px; }
.path-card h3 { font-size: 36px; }
.path-card p { color: #cfcfd8; }
.path-card .row .ring { width: 56px; height: 56px; background: conic-gradient(var(--qnet) calc(var(--p) * 1%), rgb(255 255 255 / .16) 0); }
.path-card .row .ring span { width: 44px; height: 44px; background: var(--ink); color: #fff; font-size: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; position: relative; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; position: relative; }
.step::before { content: ""; position: absolute; top: 48px; bottom: -14px; inset-inline-start: 21px; border-inline-start: 2px dashed var(--line-2); }
.step:last-child::before { display: none; }
.step .n { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; font: 800 18px var(--display); box-shadow: var(--sh-1); }
.step.done .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.step.next .n { background: var(--violet); color: #fff; border-color: var(--violet); box-shadow: 0 0 0 6px rgb(91 61 245 / .15); }
.step .card { background: #fff; border-radius: var(--r-m); border: 1px solid var(--line); box-shadow: var(--sh-1); padding: 12px; display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
a.step-link:hover .card, .step a.card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.step .card img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.step .card .k { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.step .card strong { font: 800 22px/1.05 var(--display); display: block; margin: 2px 0 8px; }
.step.soon .card { border-style: dashed; box-shadow: none; background: transparent; grid-template-columns: 1fr; color: var(--muted); }

/* ---------- learning path cards: photo band, steps on a connector line, progress ring ---------- */
.shelf { position: relative; }
.shelf .sh-prev, .shelf .sh-next { display: none; position: absolute; top: 96px; z-index: 3; width: 48px; height: 48px; border-radius: 50%; }
.shelf .sh-prev { inset-inline-start: -20px; } .shelf .sh-next { inset-inline-end: -20px; }
.pgrid { display: grid; gap: var(--grid-gap); grid-auto-flow: column; grid-auto-columns: calc((100% - var(--grid-gap)) / 1.15); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 12px var(--gutter) 24px; margin: -12px calc(-1 * var(--gutter)) 0; scrollbar-width: none; }
.pgrid::-webkit-scrollbar { display: none; }
.pcard { scroll-snap-align: start; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden; display: grid; grid-template-rows: auto 1fr; transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.pcard:hover { box-shadow: var(--sh-3); transform: translateY(-4px); }
.pcard.lead { border-color: rgb(91 61 245 / .4); box-shadow: 0 0 0 1px rgb(91 61 245 / .25), var(--sh-2); }
.pc-band { position: relative; height: 200px; overflow: hidden; background: var(--panel); }
.pc-band picture { display: contents; }
.pc-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .9s var(--ease); }
.pcard:hover .pc-band img { transform: scale(1.05); }
.pc-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(14 14 18 / .05), rgb(14 14 18 / .4)); pointer-events: none; }
.pc-chips { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 96px); }
/* Fraction ring: a thin violet arc on a light track, the count centred with its total on the same baseline */
.ring.frac span { display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.ring.frac i { font-style: normal; display: inline-flex; align-items: baseline; line-height: 1; }
.ring.frac small { font: 600 12px/1 var(--body); color: var(--muted); margin-inline-start: 1px; }
.ring.frac b { font: 800 20px/1 var(--display); color: var(--ink); }
.pc-band .ring.frac { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 1; width: 56px; height: 56px; padding: 3px; background: #fff; box-shadow: 0 6px 16px -6px rgb(14 14 18 / .45); }
.pc-band .ring.frac::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: conic-gradient(var(--violet) calc(var(--p) * 1%), var(--violet-soft) 0); }
.pc-band .ring.frac span { position: relative; }
.pc-band .ring.frac span { width: 42px; height: 42px; box-shadow: none; }
.pc-body { padding: var(--card-pad); display: grid; grid-template-rows: auto 1fr auto; gap: 16px; }
.pc-top { display: grid; gap: 8px; }
.pcard h3 { font-size: 28px; }
.pc-top p { color: var(--muted); font-size: 15px; text-wrap: pretty; }
/* Home path cards (taller photos): description on 2 lines so the row fits one screen */
.pgrid .pc-top p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#paths .section-head { margin-bottom: 24px; }
@media (min-width: 1180px) {
  #paths .section-head h2 { font-size: clamp(40px, 3.4vw, 52px); }
  #paths .pgrid { padding-bottom: 16px; }
  #paths .pc-step a { min-height: 40px; padding-block: 2px; }
}
/* Laptop-height windows (≤ 960px tall): slightly shorter photo band and section padding so the row still fits one screen */
@media (min-width: 1180px) and (max-height: 960px) {
  #paths { padding-block: 32px; }
  #paths .pc-band { height: 192px; }
  #paths .pc-body { gap: 8px; }
}
.pc-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.pc-note .ic { width: 16px; height: 16px; color: var(--violet); margin-top: 3px; }
.pc-steps { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.pc-step { position: relative; }
.pc-step:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 13px; top: calc(50% + 15px); height: calc(100% - 30px); width: 2px; border-radius: 1px; background: var(--panel-2); }
.pc-step.s-done:not(:last-child)::after { background: var(--violet); }
.pc-step a { display: grid; grid-template-columns: 28px 1fr auto 16px; gap: 12px; align-items: center; min-height: 44px; padding: 6px 8px; margin-inline: -8px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .2s; }
.pc-step a:hover { background: var(--violet-tint); }
.pc-node { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--body); background: #fff; border: 2px solid var(--line-2); color: var(--ink-2); position: relative; z-index: 1; transition: transform .25s var(--ease); }
.pc-step a:hover .pc-node { transform: scale(1.1); }
.pc-node .ic { width: 14px; height: 14px; }
.s-done .pc-node { background: var(--violet); border-color: var(--violet); color: #fff; }
.s-progress .pc-node { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-deep); }
.pc-tx { display: grid; gap: 2px; min-width: 0; }
.pc-t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.pc-why { font-size: 13px; color: var(--muted); line-height: 1.35; }
.pc-m { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-m.tag { color: var(--violet-deep); }
.pc-go { display: inline-flex; color: var(--violet); opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .25s var(--ease); }
[dir=rtl] .pc-go { transform: translateX(4px); }
.pc-go .ic { width: 16px; height: 16px; }
.pc-step a:hover .pc-go, .pc-step a:focus-visible .pc-go, .stile:hover .pc-go, .stile:focus-visible .pc-go { opacity: 1; transform: none; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap; padding-top: 16px; border-top: 1px solid var(--line); }
/* One line in every language: buttons keep their size; the course/time text wraps inside its own column if needed */
.pc-foot > :not(.muted) { flex: none; }
.pc-foot > .muted { min-width: 0; flex: 1 1 auto; text-wrap: balance; }
.pc-foot .btn { white-space: nowrap; }
/* Rows show whole cards plus half of the next one (2.5 on desktop and tablet, ~1.15 on phone), so it is clear the row scrolls. */
@media (min-width: 744px) { .pgrid { grid-auto-columns: calc((100% - 2 * var(--grid-gap)) / 2.5); } .pc-band { height: 192px; } }
@media (min-width: 1180px) {
  .pgrid { grid-auto-columns: calc((100% - 2 * var(--grid-gap)) / 3.125); padding: 12px 0 24px; margin: -12px 0 0; scroll-padding-inline: 0; }
  .shelf.can-l .sh-prev, .shelf.can-r .sh-next { display: inline-grid; }
  .pc-band { height: 244px; }
  .pc-body { gap: 12px; }
  .pc-step a { min-height: 40px; padding-block: 4px; }
}

/* ---------- your space (signed in): personal path + tiles ---------- */
.section.space { padding-top: 0; }
.space-grid { display: grid; gap: var(--grid-gap); }
.mypath { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-2); padding: var(--card-pad); display: grid; gap: 16px; align-content: start; }
.mp-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mp-head h3 { font-size: 32px; }
.mp-head p { font-size: 14px; }
.mp-head .ring.frac { width: 64px; height: 64px; }
.mp-head .ring.frac span { width: 52px; height: 52px; }
.mp-change { margin-inline-start: auto; }
.empty-path { justify-items: start; align-content: center; min-height: 280px; background: radial-gradient(60% 80% at 100% 0%, var(--violet-soft), #fff 70%); }
.empty-path h3 { font-size: 34px; }
.space-side { display: grid; gap: 12px; align-content: start; }
.stile { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); text-align: start; width: 100%; font: inherit; }
button.stile { cursor: pointer; }
a.stile:hover, button.stile:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
a.stile:active, button.stile:active { transform: scale(.99); }
.stile strong { font: 800 22px/1.1 var(--display); display: block; }
.stile p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.st-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--violet-soft); color: var(--violet-deep); display: grid; place-items: center; flex: none; }
.st-ic .ic { width: 22px; height: 22px; }
.stile.ye { background: linear-gradient(150deg, #6f53ff, var(--violet) 45%, #2d17a8); color: #fff; border: 0; grid-template-columns: 48px 1fr; }
.stile.ye p { color: #e6e1ff; }
.stile.ye .st-ic { background: rgb(255 255 255 / .16); color: #fff; }
.stile.ye .btn { grid-column: 1 / -1; width: fit-content; }
.pf-links { display: grid; gap: 12px; }
@media (min-width: 744px) { .pf-links { grid-template-columns: repeat(3, 1fr); } .pf-links .stile { grid-template-columns: 48px 1fr; } .pf-links .pc-go { display: none; } }
/* My learning: courses (2/3, cards two by two) beside certificates + badges summary (1/3); stacked below desktop; badges shelf on /badges */
.learn-cols { display: grid; gap: 48px; align-items: start; }
.lc { display: grid; gap: 20px; align-content: start; min-width: 0; scroll-margin-top: 96px; }
.lc > h2 { font: 800 32px/1.05 var(--display); }
.lc-side { display: grid; gap: 40px; align-content: start; min-width: 0; }
.lc-sub { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--ink-2); }
.lc-sub .count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--panel); display: inline-grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.lc .cert-item { padding: 16px; }
.bsum { display: grid; gap: 12px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); text-decoration: none; color: var(--ink); transition: box-shadow .3s var(--ease); }
.bsum:hover { box-shadow: var(--sh-2); }
.bsum .streak-pill { width: fit-content; max-width: 100%; border-radius: 16px; }
.bsum-medals { display: flex; flex-wrap: wrap; gap: 8px; }
.bsum .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--violet); }
@media (min-width: 744px) { .grid.lc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lc-side { gap: 32px; } }
@media (min-width: 1180px) { .learn-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; } .lc-side { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
@media (min-width: 1180px) { .space-grid { grid-template-columns: 1.55fr 1fr; align-items: start; } }

/* ---------- badges, streak ---------- */
.medal-b { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px dashed var(--field); color: var(--field); background: #fff; }
.medal-b .ic { width: 26px; height: 26px; }
.medal-b.sm { width: 48px; height: 48px; }
.medal-b.sm .ic { width: 22px; height: 22px; }
.medal-b.on { border: 0; color: #fff; background: radial-gradient(circle at 30% 25%, #9b7bff, var(--violet) 55%, var(--violet-deep)); box-shadow: 0 10px 24px -10px rgb(91 61 245 / .7), inset 0 1px 0 rgb(255 255 255 / .4); }
.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bdg { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; display: grid; gap: 8px; align-content: start; justify-items: start; }
.bdg.on { box-shadow: var(--sh-1); }
.bdg strong { font: 800 20px/1.1 var(--display); }
.bdg > .muted { font-size: 14px; line-height: 1.4; }
.bdg .tag { white-space: normal; }
.bdg-prog { display: grid; gap: 4px; width: 100%; margin-top: auto; }
.bdg-prog .muted { font-size: 13px; font-variant-numeric: tabular-nums; }
@media (min-width: 744px) { .badges { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.streak-pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--violet-soft); color: var(--violet-deep); font-size: 14px; }
.streak-pill .ic { width: 18px; height: 18px; }
.mom .streak strong { color: var(--ink); display: flex; gap: 4px; align-items: center; }
.mom strong > span:not(.flame) { font: inherit; color: inherit; }
.mom .flame { display: inline-flex; color: var(--violet); }
.mom .flame .ic { width: 26px; height: 26px; }
.streak.grew .flame { animation: flame-pop 1s var(--ease) .4s both; }
@keyframes flame-pop { 0% { transform: scale(.5); } 55% { transform: scale(1.3) rotate(-8deg); } 100% { transform: none; } }
.badge-pop .medal-b { width: 112px; height: 112px; position: relative; overflow: hidden; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.badge-pop .medal-b .ic { width: 50px; height: 50px; }
.badge-pop .medal-b::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .6) 50%, transparent 60%); transform: translateX(-70%); animation: shine 1.4s .5s var(--ease) both; }
@keyframes shine { to { transform: translateX(70%); } }

/* ---------- certificate preview tile: tilt + foil sheen ---------- */
.cert-tile { align-content: start; }
.cert-tile p { max-width: 40ch; }
.cert-tile > .btn { width: fit-content; }
.cert-stage { margin-top: auto; perspective: 900px; }
.cert3d { position: relative; background: #fff; border-radius: 16px; padding: 12px 16px 8px; display: grid; gap: 0; justify-items: center; text-align: center; box-shadow: var(--sh-2); border: 1px solid var(--line); overflow: hidden;
  transform: none; transition: transform .6s var(--ease), box-shadow .5s var(--ease); }
/* At rest the certificate is flat and unrotated so text and seal stay pixel-sharp; it tilts in 3D only while hovered */
.cert-stage:hover .cert3d { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: var(--sh-3); transition-duration: .2s, .5s; }
.cert3d::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgb(14 14 18 / .08); border-radius: 12px; pointer-events: none; }
.cert3d::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: linear-gradient(115deg, transparent 32%, rgb(255 226 150 / .5) 45%, rgb(255 255 255 / .75) 50%, rgb(206 186 255 / .45) 55%, transparent 68%); background-size: 260% 100%; background-position: var(--mx, 50%) 0; mix-blend-mode: multiply; }
.cert-stage:hover .cert3d::after { opacity: 1; }
.cert3d img { height: 16px; width: auto; margin-bottom: 4px; }
.cert3d small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.c3-name { font: 800 22px/1.1 var(--display); color: var(--ink); margin-top: 4px; }
.c3-for { font-size: 12px; color: var(--muted); }
.cert3d b { font: 800 18px/1.1 var(--display); color: var(--violet-deep); }
.c3-foot { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c3-seal { width: 44px; height: 44px; display: block; flex: none; filter: drop-shadow(0 2px 3px rgb(120 80 0 / .25)); }
.c3-seal svg { display: block; }
@media (min-width: 744px) and (max-width: 1179px) { .cert-tile .c3-for { display: none; } .cert-tile { gap: 8px; } .cert-tile .c3-name { font-size: 19px; } .cert-tile .cert3d b { font-size: 16px; } .free-tile h3 { font-size: 36px; } .proof strong { font-size: 30px; } .free-tile { gap: 8px; } .proof { row-gap: 4px; } }
.cert-flag { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 11px; min-height: 22px; padding: 0 8px; }

/* ---------- free tile ---------- */
.free-tile h3 { font-size: clamp(40px, 3.6vw, 52px); line-height: .95; }
.proof { list-style: none; margin: auto 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.proof li { display: grid; gap: 2px; align-content: end; }
.proof strong { font: 800 36px/1 var(--display); }
.proof span { font-size: 14px; color: #e6e1ff; }
.proof .ic-wrap .ic { width: 30px; height: 30px; }

/* ---------- onboarding (3 questions) ---------- */
.dialog.onb { width: min(680px, 100%); }
.onb-body { display: grid; gap: 20px; }
.onb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.onb-count { font-size: 14px; color: var(--muted); font-weight: 600; }
.dots { display: flex; gap: 8px; }
.dots i { width: 24px; height: 6px; border-radius: 3px; background: var(--panel-2); transition: background .3s, width .3s var(--ease); }
.dots i.on { background: var(--violet); width: 32px; }
.onb-q, .paths-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.onb-q legend { font: 800 30px/1.05 var(--display); padding: 0; margin-bottom: 16px; }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: grid; gap: 4px; padding: 16px; padding-inline-end: 52px; border: 1px solid var(--line-2); border-radius: 16px; cursor: pointer; background: #fff; min-height: 64px; align-content: center; transition: border-color .2s, box-shadow .2s, background .2s, transform .15s; }
.choice:hover { border-color: var(--ink); }
.choice:active { transform: scale(.99); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), var(--sh-1); background: var(--violet-tint); }
.ch-t { font-weight: 700; font-size: 17px; line-height: 1.3; }
.ch-d { font-size: 14px; color: var(--muted); line-height: 1.4; }
.ch-check { position: absolute; top: 50%; margin-top: -12px; inset-inline-end: 16px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s; }
.ch-check .ic { width: 14px; height: 14px; }
.choice:has(input:checked) .ch-check { background: var(--violet); border-color: var(--violet); color: #fff; }
.onb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.ghost-link { background: transparent; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 0 12px; }
.onb-result { display: grid; gap: 12px; }
.onb-result h3 { font-size: 34px; }
.onb-result h3:focus { outline: none; }
.onb-result .pc-steps { max-height: 42dvh; overflow-y: auto; overflow-x: hidden; padding-inline: 8px; }
@media (min-width: 744px) { .choices { grid-template-columns: 1fr 1fr; } }
.choices.langs .choice { min-height: 52px; padding-block: 12px; }
@media (min-width: 744px) { .choices.langs { grid-template-columns: repeat(3, 1fr); } }

/* ---------- team mode ---------- */
.privacy { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 14px; }
.privacy .ic { width: 18px; height: 18px; color: var(--violet); flex: none; }
.team-layout { display: grid; gap: 32px; align-items: start; }
.assign { display: grid; gap: 20px; }
.assign h2, .team-layout h2 { font-size: 32px; }
.paths-pick { display: grid; gap: 8px; }
.paths-pick legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }
.assign .two { display: grid; gap: 16px; }
.assign-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.assign-card { display: grid; gap: 12px; padding: var(--card-pad); background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.assign-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.assign-card strong { font: 800 24px/1.1 var(--display); }
.assign-card > .muted { font-size: 13px; }
.seg-bar { display: flex; height: 10px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.seg-bar i { display: block; height: 100%; transition: width 1s var(--ease) .2s; }
.seg-bar .d { background: var(--ok); }
.seg-bar .p { background: var(--violet); }
.team-counts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-2); }
.team-counts span { display: inline-flex; gap: 8px; align-items: center; }
.team-counts b { font: 800 20px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.team-counts .ic { width: 16px; height: 16px; color: var(--violet); }
.team-sum { display: grid; gap: 16px; }
.table-wrap { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; }
.team-table { width: 100%; border-collapse: collapse; }
.team-table th, .team-table td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.team-table tbody tr:last-child > * { border-bottom: 0; }
.team-table thead th { font-size: 13px; color: var(--ink-2); font-weight: 600; background: var(--panel); }
.team-table th[scope=row] { font-weight: 600; }
.team-table th[scope=row] .muted { display: block; font-size: 13px; font-weight: 400; }
.th-sort { background: none; border: 0; font: inherit; color: inherit; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; min-height: 32px; padding: 0; }
.th-sort .ic { width: 14px; height: 14px; opacity: .45; transition: transform .2s; }
[aria-sort=ascending] .th-sort .ic { opacity: 1; transform: rotate(180deg); }
[aria-sort=descending] .th-sort .ic { opacity: 1; }
.team-table .act { text-align: end; white-space: nowrap; }
.team-table .act .muted { font-size: 13px; }
.danger-line { color: var(--err) !important; }
@media (max-width: 743px) {
  .team-table thead tr { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; background: var(--panel); }
  .team-table thead th { padding: 0; border: 0; background: none; }
  .team-table thead th:not([aria-sort]) { display: none; }
  .team-table, .team-table tbody, .team-table thead { display: block; }
  .team-table tbody tr { display: grid; gap: 6px; padding: 16px; border-bottom: 1px solid var(--line); }
  .team-table th, .team-table td { padding: 0; border: 0; }
  .team-table td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 13px; }
  .team-table .act { text-align: start; }
}
@media (min-width: 744px) { .assign .two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .team-layout { grid-template-columns: 440px 1fr; gap: 48px; } }

/* ---------- empty states: illustration + headline + one line + one action ---------- */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 24px 0 32px; max-width: 520px; margin-inline: auto; }
.empty-art { width: min(300px, 78vw); aspect-ratio: 320 / 230; margin-bottom: 8px; animation: art-float 5.5s ease-in-out infinite; }
.empty-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
@keyframes art-float { 50% { transform: translateY(-8px) rotate(-.6deg); } }
.empty-state h2 { font-size: clamp(30px, 3.2vw, 40px); text-wrap: balance; }
.empty-state p { color: var(--ink-2); font-size: 17px; max-width: 42ch; text-wrap: pretty; }
.empty-state .btn { margin-top: 8px; }
.empty-state.compact { padding: 8px 0 16px; gap: 8px; }
.empty-state.compact .empty-art { width: min(210px, 60vw); }
.empty-state.compact h2 { font-size: 28px; }
.empty-state.compact p { font-size: 15px; }
.notes .empty-state { padding-inline: 24px; }
.grid.rail > .empty-state { grid-column: 1 / -1; width: 100%; }
@media (prefers-reduced-motion: reduce) { .empty-art { animation: none !important; } }

/* ---------- team page (tool layout) ---------- */
.team-head { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.team-head h1 { font-size: clamp(34px, 3.4vw, 48px); }
.team-head p.muted { font-size: 17px; max-width: 60ch; }
.privacy-chip { display: inline-flex; gap: 8px; align-items: flex-start; width: fit-content; max-width: 100%; border-radius: 14px; padding: 6px 12px; font-size: 13px; line-height: 1.45; background: var(--violet-tint); color: var(--ink-2); font-weight: 500; }
.privacy-chip .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.privacy-chip .ic { color: var(--violet); }
.tstats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tstat { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); padding: 16px; }
.tstat > div { display: grid; gap: 2px; min-width: 0; }
.tstat span:not(.st-ic) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 744px) { .tstat { flex-direction: column; align-items: flex-start; } .tstat > div { width: 100%; } }
.tstat strong { display: block; font: 800 32px/1 var(--display); font-variant-numeric: tabular-nums; }
.tstat span:not(.st-ic) { font-size: 14px; color: var(--ink-2); }
.tstat.ok .st-ic { background: var(--ok-bg); color: var(--ok); }
.tstat:first-child { grid-column: 1 / -1; }
@media (max-width: 743px) { .tstat { padding: 12px 16px; } .tstat .st-ic { display: none; } .tstat strong { font-size: 28px; } }
.team-page h2 { font-size: 32px; }
.assign-row { display: grid; gap: 16px; padding: var(--card-pad); background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.assign-row:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.assign-row:active { transform: scale(.995); }
.ar-main { display: grid; gap: 8px; min-width: 0; }
.ar-main strong { font: 800 26px/1.1 var(--display); }
.ar-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.ar-progress { display: grid; gap: 10px; min-width: 0; }
.ar-go { display: inline-flex; gap: 8px; align-items: center; color: var(--violet-deep); font-weight: 600; font-size: 15px; justify-self: start; }
.ar-go .ic { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.assign-row:hover .ar-go .ic { transform: translateX(3px); }
[dir=rtl] .assign-row:hover .ar-go .ic { transform: scaleX(-1) translateX(3px); }
.dialog.assign-dlg { width: min(760px, 100%); }
.assign-dlg .assign { display: grid; gap: 20px; }
.pick-grid { display: grid; gap: 8px; }
.assign-dlg .two { display: grid; gap: 16px; align-items: start; }
.assign-dlg .field { align-content: start; }
.assign-dlg .field .hint { margin: 0; }
.assign-dlg input[type=date] { width: 100%; }
.dialog-actions.flush { padding: 0; }
@media (min-width: 744px) {
  .tstats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tstat:first-child { grid-column: auto; }
  .pick-grid { grid-template-columns: 1fr 1fr; }
  .assign-dlg .two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1180px) { .assign-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 32px; } }

/* ---------- guest access ---------- */
.guest-chip { background: var(--violet-soft); color: var(--violet-deep); }
.guest-chip.ended { background: var(--panel-2); color: var(--ink-2); }
@media (max-width: 743px) { .guest-chip span { display: none; } .guest-chip { padding: 0 8px; } }
.guest-ask { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-content: center; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.guest-ask .btn.ghost-link { min-height: 44px; padding: 0 4px; color: var(--violet-deep); font-weight: 700; }
.guest-form { gap: 12px; }
.guest-form .two-col { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.guest-form input, .guest-form select { min-height: 48px; }
.guest-form .field { gap: 4px; }
.guest-form .check { min-height: 44px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.guest-form .check input { margin-top: 2px; }
@media (max-width: 743px) {
  .auth-card:has(.guest-form) { gap: 12px; }
  .auth-card:has(.guest-form) h1 { font-size: 40px; }
  .guest-form #g-inv-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.auth-mode .auth-form:has(.guest-form) { padding-top: 16px; }
}
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-card .crumb { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; width: fit-content; }
.guest-band { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: var(--card-pad); border-radius: var(--r-l); background: linear-gradient(140deg, var(--violet-soft), #fff 70%); border: 1px solid rgb(91 61 245 / .18); }
.guest-band h2 { font-size: 28px; }
.guest-band p { color: var(--ink-2); max-width: 60ch; }
.guest-band .btn { margin-inline-start: auto; }
.ccard.locked .pic img, .ccard.locked .pic .pa { filter: grayscale(.6) opacity(.75); }
.ccard.locked .go.join { background: var(--violet-soft); color: var(--violet-deep); text-decoration: none; }
.pc-step.s-locked .pc-node { background: var(--panel); color: var(--muted); }
.pc-step.s-locked .pc-t { color: var(--ink-2); }
.prose-page p { max-width: 70ch; color: var(--ink-2); }

/* Header nav: one line in every language; tighter on narrower desktops (5 entries with team mode). */
.lx-nav a { white-space: nowrap; }
@media (min-width: 1180px) and (max-width: 1365px) { .lx-nav { margin-inline-start: 16px; } .lx-nav a { padding: 0 10px; font-size: 14px; } .brand span { font-size: 18px; } }
/* ---------- course paths: pill switcher + detail; navy path cards (home row and hero) ---------- */
.share-btn.icon-only { width: 44px; min-width: 44px; padding: 0; }
.hub-head { display: grid; gap: 8px; }
.hub-head h1 { font-size: clamp(34px, 3.4vw, 48px); }
.hub-head p { font-size: 17px; }
.ptabs { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px; margin: -4px; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { flex: 1 0 auto; scroll-snap-align: start; display: flex; gap: 12px; align-items: center; min-height: 80px; padding: 8px 20px 8px 8px; border-radius: 18px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; text-align: start; font: inherit; transition: background .25s, border-color .25s, box-shadow .25s, transform .15s; }
[dir=rtl] .ptab { padding: 8px 8px 8px 20px; }
.ptab:hover { border-color: var(--ink); }
.ptab:active { transform: scale(.98); }
/* Selected path: the platform violet (light tint + violet edge), not a dark pill */
.ptab[aria-selected=true] { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); box-shadow: inset 0 0 0 1px var(--violet), var(--sh-1); }
/* Pill thumbnails: a large rounded tile cropped on the faces (the 48px circle of a whole group photo was unreadable) */
.pt-pic { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; display: block; }
.pt-pic picture { display: contents; }
.pt-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transform: scale(1.5); transform-origin: 50% 28%; }
/* Per-photo focus on the faces */
#ptab-know-products .pt-pic img { object-position: 50% 70%; transform-origin: 50% 70%; }
.pt-tx { display: grid; gap: 0; min-width: 0; }
.pt-tx strong { font: 800 18px/1.15 var(--display); white-space: nowrap; }
.pt-tx span { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ptab[aria-selected=true] .pt-tx span { color: var(--violet-deep); }
@media (max-width: 743px) { .ptab { flex: 0 0 auto; max-width: 78vw; min-height: 72px; } .pt-pic { width: 56px; height: 56px; } .pt-tx strong { overflow: hidden; text-overflow: ellipsis; } }
.path-panel { transition: opacity .14s ease; }
.path-panel.fading { opacity: 0; }
.path-panel:focus-visible { outline-offset: 8px; }
.pd { display: grid; gap: 32px; }
/* Share: a white glass icon chip on the photo, top-end corner */
.pc-share { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; }
.pc-share .btn { background: rgb(255 255 255 / .9); border-color: transparent; color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pc-share .btn:hover { background: #fff; }
.pcard .pc-band .ring.frac { top: auto; }
.pcard .pc-top h3 a, .pd-card h2 a { color: inherit; text-decoration: none; }
.pcard .pc-top h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Hero card on the paths page: photo beside the body on desktop */
.pd-card { border-radius: var(--r-xl); overflow: hidden; display: grid; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.pd-card .pc-band { position: relative; height: 220px; overflow: hidden; background: var(--panel); }
.pd-card .pc-band img { width: 100%; height: 100%; object-fit: cover; }
.pd-card .pc-band picture { display: contents; }
.pd-card .pc-band .ring.frac { position: absolute; bottom: 16px; inset-inline-end: 16px; z-index: 2; width: 72px; height: 72px; background: conic-gradient(var(--violet) calc(var(--p) * 1%), rgb(255 255 255 / .6) 0); }
.pd-card .pc-band .ring.frac span { width: 62px; height: 62px; }
.pd-card .pc-band .pc-chips { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.pd-card .pc-body { padding: var(--card-pad); display: grid; gap: 16px; align-content: center; }
.pd-card h2 { font-size: clamp(34px, 3.6vw, 52px); }
.pd-card .pc-desc { color: var(--ink-2); font-size: 17px; }
.pd-outcomes h3 { font: 700 14px var(--body); color: var(--ink-2); margin-bottom: 8px; }
.pd-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pace { font-size: 14px; color: var(--muted); margin-top: -8px; }
.prereq { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.prereq li { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.prereq a { font-weight: 600; }
.pd-earn .earn-row { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }
.pd-earn .plus { font: 800 24px var(--display); color: var(--muted); }
.cert3d.mini { transform: none; padding: 10px 12px 8px; gap: 0; width: 170px; flex: none; }
.cert3d.mini img { height: 12px; margin-bottom: 2px; }
.cert3d.mini small { font-size: 8px; }
.cert3d.mini .c3-name { font-size: 15px; margin-top: 2px; }
.cert3d.mini b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cert3d.mini .c3-seal { width: 30px; height: 30px; margin-top: 4px; }
.pd-earn p { font-weight: 600; }
/* Desktop: the text column sets the card height (min 380px) and the photo fills its column, so a taller photo can no longer
   stretch one path's card and open a gap in its text */
@media (min-width: 1180px) { .pd-card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 380px; } .pd-card .pc-band { height: auto; min-height: 380px; } .pd-card .pc-band img { position: absolute; inset: 0; } .pd-card .pc-body { padding: 40px; } }
@media (min-width: 744px) and (max-width: 1179px) { .pd-card .pc-band { height: 260px; } }
/* Timeline and side info */
.pp-thumb { position: relative; width: 64px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--panel); display: block; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-thumb picture { display: contents; }
.pp-thumb .pa { position: absolute; inset: 0; }
.pp-tx { display: grid; gap: 2px; min-width: 0; }
.pp-tx strong { font-size: 15px; line-height: 1.3; }
.pp-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.pp-meta > span:not(.tag) { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.pp-meta .ic { width: 14px; height: 14px; color: var(--violet); }
.pp-meta .tag { min-height: 22px; font-size: 12px; padding: 0 8px; }
.pd-grid { display: grid; gap: 32px; }
.pd-grid h2 { font-size: 36px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.tl:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 17px; top: 44px; bottom: -12px; width: 2px; border-radius: 1px; background: var(--panel-2); }
.tl.s-done:not(:last-child)::after { background: var(--violet); }
.tl-node { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); font: 700 14px var(--body); color: var(--ink-2); margin-top: 16px; position: relative; z-index: 1; }
.tl-node .ic { width: 16px; height: 16px; }
.tl.s-done .tl-node { background: var(--violet); border-color: var(--violet); color: #fff; }
.tl.s-progress .tl-node { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-deep); }
.tl-card { display: grid; grid-template-columns: 96px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); text-decoration: none; color: var(--ink); transition: background .2s, transform .3s var(--ease), box-shadow .3s var(--ease); }
.tl-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.tl-card:hover .pc-go, .tl-card:focus-visible .pc-go { opacity: 1; transform: none; }
.tl-card .pp-thumb { width: 96px; height: 72px; }
.tl-step { font-size: 12px; font-weight: 600; color: var(--violet-deep); }
.tl-next { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 4px; }
.tl-next .ic { width: 14px; height: 14px; }
.pd-side .side-card h3 { font-size: 24px; margin-bottom: 8px; }
.faq-mini details { border-top: 1px solid var(--line); padding: 8px 0; }
.faq-mini details:first-child { border-top: 0; }
.faq-mini summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.faq-mini ul { margin: 0; padding-inline-start: 20px; }
.pd-certs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pd-certs li { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 15px; }
.outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.outcomes li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; font-size: 15px; line-height: 1.45; }
.outcomes .ic { width: 20px; height: 20px; color: var(--ok); margin-top: 1px; }
.pd-sticky { display: none; }
@media (min-width: 1180px) { .pd-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; } .pd-side { position: sticky; top: 96px; } }
@media (max-width: 743px) {
  .pd-sticky.show { display: flex; }
  .pd-sticky { position: fixed; inset-inline: 10px; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); z-index: 35; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--navy); color: #fff; box-shadow: var(--sh-2); font-weight: 700; }
  .pd-sticky span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .paths-hub { padding-bottom: 96px; }
  .tl-card { grid-template-columns: 72px minmax(0, 1fr); }
  .tl-card .pp-thumb { width: 72px; height: 56px; }
  .tl-card .pc-go { display: none; }
}

/* ---------- my month ---------- */
.month-head { align-items: flex-end; gap: 16px; }
.month-head .field { width: min(240px, 100%); }
.figs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fig { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; display: grid; gap: 4px; align-content: start; box-shadow: var(--sh-1); }
.fig .st-ic { margin-bottom: 8px; }
.fig strong { font: 800 44px/1 var(--display); }
.fig .fl { font-weight: 600; }
.cmp { font-size: 13px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.cmp.up { color: var(--ok); }
.cmp .ic { width: 14px; height: 14px; }
.figs.mini .fig { box-shadow: none; background: var(--panel); border: 0; }
.figs.mini .fig strong { font-size: 36px; }
.month-foot { gap: 16px; }
.month h2 { font-size: 32px; }
.small-note { font-size: 14px; }
@media (min-width: 744px) { .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .figs.mini { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- player: speed + resume ---------- */
.watch-state { flex-wrap: wrap; }
.watch-line { display: flex; gap: 12px; align-items: center; flex: 1 1 260px; min-width: 0; }
.watch-line .progress { flex: 1; background: #fff; }
.watch-line:not(:has(.progress)) { flex: 0 1 auto; }
@media (max-width: 599px) { .lesson-top > span[aria-hidden] { display: none; } .lesson-top .crumb { width: 100%; } }
.speed { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 12px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.speed-l { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 8px; }
.speed-l .ic { width: 16px; height: 16px; }
.player-main, .lesson-body, .watch-line { min-width: 0; }
/* Long chips in some languages (e.g. Uzbek "pass mark" tag): never wider than the column; they may wrap there. */
.lesson-body .tag { max-width: 100%; white-space: normal; height: auto; }
@media (max-width: 743px) { .speed-tx { display: none; } .speed { margin-inline-start: auto; } .speed-l { display: none; } }
.speed button { min-height: 36px; min-width: 56px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; color: var(--ink-2); transition: background .2s, color .2s; }
.speed button:hover { color: var(--ink); }
.speed button[aria-pressed=true] { background: var(--ink); color: #fff; }
.resume { position: absolute; inset-inline: 16px; bottom: 64px; margin-inline: auto; width: fit-content; max-width: calc(100% - 32px); padding: 16px 20px; border-radius: 20px; display: grid; gap: 12px; color: #fff; z-index: 2; animation: dlg-in .4s var(--ease) both; }
.resume.glass { background: rgb(14 14 18 / .8); border-color: rgb(255 255 255 / .2); }
.resume.glass::before, .resume.glass::after { display: none; }
.resume strong { font: 800 22px var(--display); }
@media (max-width: 743px) { .speed button { min-height: 44px; min-width: 52px; } .resume { position: static; width: auto; max-width: none; border-radius: 0; margin: 0; } .video-wrap:has(.resume) { aspect-ratio: auto; } .video-wrap:has(.resume) video { aspect-ratio: 16 / 9; height: auto; } }

/* ---------- glossary terms ---------- */
.gloss { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted var(--violet) 2px; text-underline-offset: 4px; }
.gloss:hover, .gloss[aria-expanded=true] { color: var(--violet-deep); background: var(--violet-tint); border-radius: 4px; }
.gloss-pop { position: absolute; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-3); padding: 16px; display: grid; gap: 4px; font-size: 15px; line-height: 1.5; animation: dlg-in .25s var(--ease) both; }
.gloss-pop strong { font: 800 20px/1.1 var(--display); }
.gloss-pop p { color: var(--ink-2); }

/* ---------- activities ---------- */
.acts { display: grid; gap: 24px; margin-top: 32px; }
.act { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: var(--card-pad); display: grid; gap: 16px; overflow: hidden; }
.act-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.act-head h2 { font-size: 28px; }
.act-head .tag { margin-inline-start: auto; }
.act-kind { display: block; font-size: 13px; font-weight: 600; color: var(--violet-deep); margin-bottom: 4px; }
.act-hint { font-size: 15px; }
.deck { position: relative; display: grid; min-height: 180px; }
.deck > .swipe { grid-area: 1 / 1; position: relative; }
.deck > .swipe:not(.ghost) { z-index: 2; }
.swipe { background: linear-gradient(160deg, #fff, var(--violet-tint)); border: 1px solid var(--line-2); border-radius: 20px; padding: 24px; min-height: 180px; display: grid; place-items: center; text-align: center; box-shadow: var(--sh-2); cursor: grab; touch-action: pan-y; user-select: none;
  transform: translateX(var(--dx, 0)) rotate(calc(var(--dx, 0px) / 40)); transition: transform .35s var(--ease), opacity .35s; }
.swipe p { font: 800 24px/1.2 var(--display); max-width: 30ch; }
.swipe.ghost { transform: translateY(10px) scale(.96); opacity: .6; box-shadow: none; }
.swipe.ghost + .swipe.ghost { transform: translateY(20px) scale(.92); opacity: .35; }
.swipe.go-red { transform: translateX(-24px) rotate(-3deg); border-color: var(--err); }
.swipe.go-ok { transform: translateX(24px) rotate(3deg); border-color: var(--ok); }
[dir=rtl] .swipe.go-red { transform: translateX(24px) rotate(3deg); }
[dir=rtl] .swipe.go-ok { transform: translateX(-24px) rotate(-3deg); }
.cards-meta { text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.cards-btns { justify-content: center; }
.cards-btns .btn { min-width: 160px; }
.btn.cards-red { background: var(--err-bg); color: var(--err); border-color: rgb(180 35 24 / .25); }
.btn.cards-red:hover { background: #f9dcd8; }
.btn.cards-ok { background: var(--ok-bg); color: var(--ok); border-color: rgb(29 112 56 / .25); }
.btn.cards-ok:hover { background: #d4ecdc; }
.cards-next { align-items: flex-start; justify-content: space-between; flex-wrap: nowrap; }
.cards-fb { display: flex; gap: 12px; align-items: flex-start; flex: 1; border-radius: 16px; padding: 12px 16px; }
.cards-fb .ic { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.cards-fb.ok { background: var(--ok-bg); color: var(--ok); }
.cards-fb.no { background: var(--err-bg); color: var(--err); }
.cards-fb p { color: var(--ink); font-size: 15px; }
.cards-fb strong, .cp-wrong strong { display: block; }
.act-end { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.act-end strong { font: 800 28px var(--display); }
.scn-node { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); animation: dlg-in .35s var(--ease) both; }
.scn-node:first-of-type { border-top: 0; padding-top: 0; }
.scn-node:focus { outline: none; }
.scn-node > p { font-size: 18px; }
.scn-choices { display: grid; gap: 8px; }
.choice-btn { display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: start; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; font: 600 16px var(--body); color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.choice-btn:hover:not([disabled]) { border-color: var(--violet); background: var(--violet-tint); }
.choice-btn:active:not([disabled]) { transform: scale(.99); }
.choice-btn[disabled] { opacity: .55; cursor: default; }
.choice-btn .ic { width: 18px; height: 18px; color: var(--violet); flex: none; }
.scn-debrief { background: var(--panel); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ord; }
.order-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; min-height: 56px; padding: 4px 4px 4px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; font-weight: 600; cursor: grab; transition: border-color .2s, background .2s, box-shadow .2s; }
.order-item.dragging { opacity: .5; box-shadow: var(--sh-2); }
.order-item.right { border-color: var(--ok); background: var(--ok-bg); }
.order-item.wrong { border-color: var(--err); background: var(--err-bg); }
.grip { color: var(--field); letter-spacing: -2px; font-size: 18px; }
.order-btns { display: flex; }
.order-btns .icon-btn[disabled] { opacity: .3; }
.match-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 12px; background: var(--panel); border-radius: 16px; }
.chip-btn { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font: 600 15px var(--body); color: var(--ink); cursor: pointer; text-align: start; transition: border-color .2s, background .2s, transform .15s; }
.chip-btn:hover { border-color: var(--violet); }
.chip-btn[aria-pressed=true] { background: var(--violet); color: #fff; border-color: var(--violet); transform: translateY(-2px); box-shadow: var(--sh-2); }
.chip-btn time { font-variant-numeric: tabular-nums; color: var(--violet-deep); }
.match-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.match-row { display: grid; gap: 8px; align-items: center; }
.slot { min-height: 52px; padding: 8px 16px; border: 2px dashed var(--field); border-radius: 14px; background: #fff; font: 500 15px var(--body); color: var(--muted); cursor: pointer; text-align: start; }
.slot.filled { border-style: solid; border-color: var(--violet); color: var(--ink); background: var(--violet-tint); font-weight: 600; }
.slot.right { border-color: var(--ok); background: var(--ok-bg); }
.slot.wrong { border-color: var(--err); background: var(--err-bg); }
.match-key { margin: 8px 0 0; padding-inline-start: 20px; font-size: 15px; color: var(--ink-2); }
@media (min-width: 744px) { .match-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }

/* ---------- recap, review, checkpoints, milestones ---------- */
.recap-card { margin-top: 24px; background: var(--violet-tint); border: 1px solid rgb(91 61 245 / .16); border-radius: var(--r-l); padding: var(--card-pad); display: grid; gap: 12px; }
.recap-card h2 { font-size: 28px; display: flex; gap: 12px; align-items: center; }
.recap-card h2 .ic { width: 24px; height: 24px; color: var(--violet); }
.recap-card h3 { font-size: 22px; }
.recap-card ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; }
.review { display: grid; gap: 16px; margin: 24px 0 8px; }
.review h2 { font-size: 28px; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; }
.transcript summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.transcript .search { margin: 8px 0; }
.tr-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.tr-lines button { display: grid; grid-template-columns: 56px 1fr; gap: 12px; width: 100%; text-align: start; padding: 8px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.tr-lines button:hover { background: var(--violet-tint); }
.tr-lines time { color: var(--violet-deep); font-weight: 600; }
.cp-box { gap: 12px; max-width: min(560px, calc(100% - 32px)); }
.cp-box .act-kind { color: #ddd6ff; }
.cp-opts { display: grid; gap: 8px; }
.cp-opt { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: rgb(255 255 255 / .1); cursor: pointer; }
.cp-opt:has(input:checked) { background: rgb(255 255 255 / .22); }
.cp-opt input { width: 20px; height: 20px; accent-color: #fff; flex: none; margin: 0; }
.cp-wrong { color: #fff; background: rgb(180 35 24 / .55); border-radius: 10px; padding: 8px 12px; }
.milestones { display: grid; gap: 12px; position: relative; }
.ms-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.ms-bar { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; z-index: 1; }
.ms-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); color: var(--ink-2); }
.ms-bar > li { min-width: 0; flex: 0 1 auto; display: flex; justify-content: center; }
/* Many lessons (12+) on a narrow card: dots shrink instead of pushing the card wider than the screen */
.milestones { container-type: inline-size; }
.ms-bar:has(> li:nth-child(12)) .ms:not(.cert) .ms-dot { width: clamp(10px, 5.2cqw, 28px); height: clamp(10px, 5.2cqw, 28px); }
.ms-bar:has(> li:nth-child(12)) .ms:not(.cert) .ms-dot .ic { width: clamp(6px, 2.8cqw, 14px); height: clamp(6px, 2.8cqw, 14px); }
.ms-dot .ic { width: 14px; height: 14px; }
.ms.done .ms-dot { background: var(--violet); border-color: var(--violet); color: #fff; }
.ms.cur .ms-dot { border-color: var(--violet); color: var(--violet-deep); box-shadow: 0 0 0 4px rgb(91 61 245 / .15); }
.ms.cert .ms-dot { width: 32px; height: 32px; margin-top: -2px; border-color: #e3c36a; color: #4d3a00; }
.ms.cert.done .ms-dot { background: radial-gradient(circle at 35% 30%, #fff3c4, #e9c25a 55%, #c49a35); border-color: #c49a35; }
.ms-fill { position: absolute; inset-inline: 14px; bottom: 13px; height: 2px; background: var(--panel-2); }
.ms-fill i { display: block; height: 100%; background: var(--violet); transition: width 1s var(--ease) .2s; }
.reveal:not(.in) .ms-fill i { width: 0 !important; }
.certificate .distinction { display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px; background: linear-gradient(135deg, #fff3c4, #f3d98a); color: #4d3a00; font-weight: 700; }
.certificate .distinction .ic { width: 18px; height: 18px; }
@media print { .recap-card { break-inside: avoid; background: #fff; } .month .fig { break-inside: avoid; box-shadow: none; } }

/* ---------- motion: reveals, fills, dialogs, toasts (all off under reduced motion) ---------- */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.ring { transition: --p 1.2s var(--ease) .15s; }
.reveal:not(.in) .ring, .reveal.ring:not(.in) { --p: 0 !important; }
.reveal:not(.in) .progress > i, .reveal:not(.in) .seg-bar i { width: 0 !important; }
.progress > i { transition: width 1s var(--ease) .15s; }
.reveal { transition-delay: calc(var(--i, 0) * 70ms); }
.scrim { animation: scrim-in .25s ease both; }
.scrim .dialog { animation: dlg-in .35s var(--ease) both; }
.scrim.out { animation: scrim-out .18s ease both; }
@keyframes scrim-in { from { opacity: 0; } }
@keyframes scrim-out { to { opacity: 0; } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.toast { animation: toast-in .35s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
a.ccard:active { transform: translateY(-3px) scale(.99); }
.lx-tabs.n5 { grid-template-columns: repeat(5, 1fr); }
/* Idle loops run only while their element is on screen and the tab is visible (core.js adds .in-view). */
html :is(.orb-ai, .live, .skeleton, [data-anim]):not(.in-view), html :is(.orb-ai, .live, .skeleton, [data-anim]):not(.in-view)::before, html :is(.orb-ai, .live, .skeleton, [data-anim]):not(.in-view)::after { animation-play-state: paused !important; }
html.doc-hidden *, html.doc-hidden *::before, html.doc-hidden *::after { animation-play-state: paused !important; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
#faq .section-head { text-align: center; justify-items: center; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 28px/1 var(--body); color: var(--violet); transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); max-width: 70ch; }

/* ---------- CTA band + footer ---------- */
.cta-band { padding: 24px var(--gutter) 80px; }
.cta-in { max-width: var(--maxw); margin: 0 auto; border-radius: var(--r-xl); padding: 64px 24px; display: grid; gap: 24px; justify-items: center; text-align: center; color: #fff; background: radial-gradient(60% 120% at 80% 0%, #8b6bff 0%, transparent 60%), radial-gradient(50% 100% at 0% 100%, rgb(235 102 8 / .55), transparent 60%), var(--ink); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(40px, 5.4vw, 80px); max-width: 16ch; }
.cta-band p { color: #d6d6de; font-size: 18px; }
.lx-foot { background: var(--ink); color: #c9c9d3; padding: 64px var(--gutter) calc(var(--tabbar) + 48px); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.lx-foot-in { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 40px; }
.lx-foot .big { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lx-foot .big img { height: 30px; width: auto; }
.lx-foot .big span { font: 800 40px/1 var(--display); color: #fff; }
.lx-foot .big p { flex-basis: 100%; color: #a8a8b4; }
.foot-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
.foot-cols h2 { font: 700 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: #8e8e9a; margin-bottom: 12px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-cols a, .foot-cols button { color: #ececf2; text-decoration: none; font-size: 15px; background: none; border: 0; padding: 8px 0; cursor: pointer; text-align: start; min-height: 32px; }
.foot-cols a:hover, .foot-cols button:hover { color: #b6a6ff; }
.foot-cols button[aria-current=true] { color: #b6a6ff; font-weight: 600; }
/* Languages: a full-width band of compact chips under the link columns (a 12-item column made the footer tall and lopsided) */
.foot-cols > div:last-child { grid-column: 1 / -1; }
.foot-cols > div:last-child ul { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.foot-cols > div:last-child button { min-height: 44px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); text-align: center; width: 100%; }
.foot-cols > div:last-child button:hover { box-shadow: inset 0 0 0 1px #b6a6ff; }
.foot-cols > div:last-child button[aria-current=true] { background: rgb(182 166 255 / .16); box-shadow: inset 0 0 0 1px #b6a6ff; }
.foot-bottom { border-top: 1px solid rgb(255 255 255 / .12); padding-top: 20px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: #8e8e9a; }

/* ---------- course page ---------- */
.c-hero { position: relative; overflow: hidden; isolation: isolate; }
.c-hero::before { content: ""; position: absolute; inset: -30% -10% auto 30%; height: 700px; z-index: -1; background: radial-gradient(40% 50% at 70% 30%, rgb(91 61 245 / .14), transparent 70%), radial-gradient(30% 40% at 95% 70%, rgb(235 102 8 / .1), transparent 70%); }
.c-hero-in { display: grid; gap: 32px; padding: 8px var(--gutter) 48px; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; text-decoration: none; min-height: 44px; font-size: 15px; width: fit-content; }
.crumb:hover { color: var(--violet); }
.c-hero h1 { font-size: clamp(48px, 6vw, 96px); line-height: .92; }
.c-hero .desc { font-size: 20px; color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.c-media { position: relative; }
.c-media .photo { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--sh-3); }
.c-media .facts { position: relative; margin: -40px 12px 0; border-radius: var(--r-m); padding: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.c-media .facts div { display: grid; gap: 2px; justify-items: center; text-align: center; }
.c-media .facts strong { font: 800 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.c-media .facts span { font-size: 12px; color: var(--muted); font-weight: 600; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.course-layout > * { min-width: 0; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--card-pad); display: grid; gap: 16px; box-shadow: var(--sh-2); }
.side-card .top { display: flex; gap: 16px; align-items: center; }
.side-card .top strong { font: 800 26px/1 var(--display); display: block; margin-bottom: 4px; }
.side-card ul { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 15px; }
.side-card li { display: flex; gap: 12px; align-items: center; }
.side-card li .ic { color: var(--violet); width: 18px; height: 18px; }
.modules { display: grid; gap: 16px; }
.module { background: #fff; border-radius: var(--r-l); border: 1px solid var(--line); box-shadow: var(--sh-1); padding: var(--card-pad) var(--card-pad) 8px; }
.module h2 { font-size: 32px; display: flex; gap: 12px; align-items: center; margin: 0 8px 12px; }
.module h2 .n { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-deep); font: 800 16px var(--display); font-variant-numeric: tabular-nums; }
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons > li + li { border-top: 1px solid var(--line); }
.lesson-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 12px 8px; min-height: 72px; text-decoration: none; color: var(--ink); border-radius: 14px; transition: background .2s; }
a.lesson-row:hover { background: var(--violet-tint); }
.lesson-row .st { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); color: var(--muted); }
.lesson-row.done .st { background: var(--ok-bg); color: var(--ok); }
.lesson-row.available .st { background: var(--violet); color: #fff; box-shadow: 0 8px 18px -8px rgb(91 61 245 / .8); }
.lesson-row .tt { display: grid; gap: 2px; min-width: 0; }
.lesson-row .tt strong { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.lesson-row .tt strong b { color: var(--muted); font-weight: 500; margin-inline-end: 8px; font-variant-numeric: tabular-nums; }
.lesson-row .tt span { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lesson-row.locked { color: var(--muted); }
/* The current lesson is highlighted with its practice and quiz lines, as one block */
.lesson-row.current { background: none; }
li:has(> .lesson-row.current) { background: var(--violet-soft); border-radius: 14px; padding-bottom: 8px; }
li:has(> .lesson-row.current) a.lesson-row:hover { background: none; }
.rate { display: flex; gap: 2px; }
.rate button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 28px; color: #c4c4cc; border-radius: 10px; }
.rate button[aria-pressed=true] { color: var(--qnet); }

/* ---------- lesson player ---------- */
.player { display: grid; }
.player-main { min-width: 0; }
.video-wrap { background: #000; aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.video-wrap video { width: 100%; height: 100%; }
.video-soon { background: linear-gradient(135deg, var(--violet-deep), var(--violet)); color: #fff; display: grid; place-items: center; text-align: center; }
.vsoon-in { display: grid; justify-items: center; gap: 8px; padding: 16px; max-width: 60ch; }
.vsoon-play { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .5); }
.vsoon-play svg { width: 32px; height: 32px; fill: #fff; margin-left: 4px; }
.video-soon .tag { background: #fff; color: var(--violet-deep); }
.vsoon-what { font: 800 clamp(18px, 2.4vw, 28px)/1.15 var(--display); text-wrap: balance; margin: 0; }
.vsoon-lead { margin: 0; font-size: 15px; color: #fff; }
.lesson-fig { margin: 8px 0 24px; }
.lesson-fig img { display: block; width: 100%; height: auto; border-radius: 16px; background: #f4f5f9; }
.lesson-fig figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-wrap: pretty; }
@media (max-width: 743px) { .video-soon { aspect-ratio: 4 / 3; } .vsoon-play { width: 56px; height: 56px; } .vsoon-lead { display: none; } }
.video-wrap video::cue { font: 500 clamp(15px, 2.2vw, 22px)/1.35 var(--body); background: rgb(14 14 18 / .78); color: #fff; }
/* Fullscreen: bigger captions (iOS native fullscreen uses the system caption settings instead). */
video:fullscreen::cue { font-size: clamp(24px, 2.8vw, 44px); }
video:-webkit-full-screen::cue { font-size: clamp(24px, 2.8vw, 44px); }
.lesson-body { padding: 24px var(--gutter) 8px; display: grid; gap: 24px; max-width: 900px; }
.lesson-body h1 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1; }
/* The lesson fills its column: video, watch row, activities, key points, quiz and nav share the video's edges; only
   running text keeps a reading measure (75ch), which is normal ragged-right space, not a hole. */
.lesson-body { max-width: none; }
.lesson-body .prose { max-width: 75ch; }
.next-locked { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; }
.lesson-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.prose { font-size: 18px; line-height: 1.7; max-width: 66ch; display: grid; gap: 16px; color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding-inline-start: 24px; display: grid; gap: 12px; }
.prose li::marker { color: var(--violet); font-weight: 700; }
.prose h3 { font-size: 30px; margin-top: 8px; color: var(--ink); }
.prose .callout { background: var(--violet-tint); border: 1px solid var(--violet-soft); border-radius: var(--r-m); padding: 16px 20px; display: flex; gap: 16px; align-items: flex-start; color: var(--ink); }
.prose .callout::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 4px; background: var(--violet); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.watch-state { display: flex; gap: 16px; align-items: center; background: var(--panel); border-radius: var(--r-m); padding: 12px 16px; }
.watch-state .progress { flex: 1; background: #fff; }
.watch-state:not(:has(.progress)) { flex-wrap: nowrap; justify-content: space-between; }
@media (max-width: 743px) { }
.docs { display: grid; gap: 12px; }
.doc { display: flex; gap: 12px; align-items: center; padding: 16px 16px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; color: var(--ink); min-height: 64px; box-shadow: var(--sh-1); background: #fff; }
.doc:hover { box-shadow: var(--sh-2); }
.doc .ic { color: var(--violet); }
.quiz { background: var(--panel); border-radius: var(--r-l); padding: 24px 20px; display: grid; gap: 24px; }
.quiz-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.quiz-head h2 { font-size: 40px; margin-inline-end: 8px; }
.quiz-locked { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--r-m); padding: 16px 20px; color: var(--ink-2); }
.quiz-locked .ic { color: var(--violet); }
.q { border: 0; margin: 0; padding: 20px; display: grid; gap: 12px; background: #fff; border-radius: var(--r-m); }
.q legend { font: 800 24px/1.15 var(--display); padding: 0; margin-bottom: 8px; float: left; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
.q legend b { color: var(--violet); font-variant-numeric: tabular-nums; }
.q legend > span { text-wrap: balance; max-width: 60ch; } /* hanging indent under the number, no lonely last word */
.q .hint { color: var(--muted); font-size: 14px; clear: both; }
.opt { display: flex; gap: 16px; align-items: center; min-height: 56px; padding: 12px 16px; border: 1.5px solid var(--line-2); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; background: #fff; }
.opt:hover { border-color: var(--ink); }
.opt input { width: 22px; height: 22px; accent-color: var(--violet); flex: none; margin: 0; }
.opt:has(input:checked) { border-color: var(--violet); background: var(--violet-tint); box-shadow: 0 0 0 3px rgb(91 61 245 / .12); }
.opt.right, .opt.right:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); box-shadow: none; }
.opt.wrong, .opt.wrong:has(input:checked) { border-color: var(--err); background: var(--err-bg); box-shadow: none; }
.q-result { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.q-result.ok { color: var(--ok); } .q-result.no { color: var(--err); }
.q-explain { color: var(--ink-2); }
.result { border-radius: var(--r-m); padding: 20px; display: grid; gap: 12px; justify-items: start; }
.result.ok { background: var(--ok-bg); color: var(--ok); }
.result.no { background: var(--err-bg); color: var(--err); }
.result strong { font: 800 28px var(--display); }
.lesson-nav { position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45; border-radius: 22px; padding: 8px; display: flex; gap: 8px; }
.lesson-nav .btn { flex: 1; }
/* Phone bar: the reason Next is locked sits on its own line above the two buttons. */
.lesson-nav { flex-wrap: wrap; }
.lesson-nav .next-locked { display: contents; }
.lesson-nav .next-locked span { order: -1; width: 100%; text-align: center; font-size: 13px; padding-top: 4px; }
.match-pool:empty { display: none; }
.lx-main.focus-mode { padding-bottom: 96px; }
.outline { display: none; }
.outline h2 { font-size: 28px; }
.celebrate { text-align: center; display: grid; gap: 16px; justify-items: center; padding: 8px 0; }
.celebrate .medal { width: 108px; height: 108px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffb072, var(--qnet)); display: grid; place-items: center; color: #fff; box-shadow: 0 16px 40px rgb(235 102 8 / .45); animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.celebrate .medal .ic { width: 52px; height: 52px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 85; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* ---------- notifications ---------- */
.notes { display: grid; max-height: 70dvh; overflow: auto; margin: 0 -26px; }
.note { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 24px; text-decoration: none; color: var(--ink); align-items: start; }
.note:hover { background: var(--panel); }
.note .ni { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; color: var(--muted); }
.note.unread .ni { background: var(--violet-soft); color: var(--violet-deep); }
.note.unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--qnet); margin-inline-start: 8px; vertical-align: middle; }
.note time { color: var(--muted); font-size: 13px; }

/* ---------- certificates ---------- */
.cert-list { display: grid; gap: 12px; }
.cert-item { display: flex; gap: 16px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; color: var(--ink); background: #fff; box-shadow: var(--sh-1); transition: box-shadow .3s; }
.cert-item:hover { box-shadow: var(--sh-2); }
.cert-item > .ic { width: 34px; height: 34px; color: var(--qnet); }
.certificate { background: #fff; border-radius: var(--r-l); padding: 48px 24px; display: grid; gap: 16px; justify-items: center; text-align: center; position: relative; overflow: hidden; box-shadow: var(--sh-3); border: 1px solid var(--line); }
.certificate::after { content: ""; position: absolute; width: 420px; height: 420px; inset-inline-end: -180px; bottom: -220px; border-radius: 50%; background: radial-gradient(closest-side, rgb(91 61 245 / .1), transparent); }
.certificate img { height: 30px; width: auto; }
.certificate .k { color: var(--violet); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; }
.certificate .name { font: 800 clamp(44px, 6vw, 76px)/1 var(--display); }
.certificate .course { font: 800 clamp(26px, 3.4vw, 40px)/1.05 var(--display); color: var(--violet-deep); }
.certificate .small { color: var(--muted); font-size: 14px; }

/* ---------- sign in ---------- */
.auth { display: grid; min-height: calc(100dvh - 64px); position: relative; isolation: isolate; }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 50% at 80% 10%, rgb(91 61 245 / .16), transparent 70%), radial-gradient(30% 40% at 10% 90%, rgb(235 102 8 / .1), transparent 70%); }
.auth-photo { display: none; }
.auth-form { display: grid; align-content: center; padding: 32px var(--gutter) 96px; }
.auth-card { width: min(460px, 100%); margin: 0 auto; display: grid; gap: 20px; }
.auth-card h1 { font-size: clamp(44px, 4.4vw, 64px); line-height: 1; }
.auth-steps { display: flex; gap: 8px; }
.auth-steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--panel-2); }
.auth-steps i.on { background: var(--violet); }
.devmail { background: var(--violet-soft); color: var(--violet-deep); border-radius: var(--r-m); padding: 12px 16px; font-size: 15px; display: grid; gap: 4px; }
.testmode { background: var(--violet-soft); color: var(--violet-deep); border-radius: var(--r-m); padding: 12px 16px; font-size: 15px; font-weight: 600; display: flex; gap: 12px; align-items: center; }

/* Sign-in is one screen: no footer, no band, no tab bar, no page scroll. */
body.auth-mode .lx-foot, body.auth-mode .cta-band, body.auth-mode .lx-tabs, body.auth-mode .lx-rail { display: none !important; }
body.auth-mode .lx-shell { display: block; }
body.auth-mode .auth { min-height: calc(100dvh - 65px); }
body.auth-mode .auth-form { padding-bottom: 32px; }
@media (min-width: 1180px) { body.auth-mode .auth { height: calc(100dvh - 65px); min-height: 560px; overflow: hidden; } }

/* ---------- verify page ---------- */
body.verify { background: var(--panel); min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.verify-card { background: #fff; border-radius: var(--r-l); padding: 32px 24px; width: min(520px, 100%); display: grid; gap: 16px; justify-items: start; box-shadow: var(--sh-3); }
.verify-card h1 { font-size: 40px; }
.verify-card .ok { background: var(--ok-bg); color: var(--ok); }
.verify-card .no { background: var(--err-bg); color: var(--err); }
.verify-card .num { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ================= TABLET 744–1179 ================= */
@media (min-width: 744px) {
  :root { --gutter: 32px; --tabbar: 0px; --section-y: 64px; --head-gap: 32px; --grid-gap: 24px; --card-pad: 24px; }
  .lx-tabs { display: none; }
  .lx-shell { display: grid; grid-template-columns: 96px 1fr; }
  .lx-rail { display: grid; align-content: start; gap: 8px; position: sticky; top: 64px; height: calc(100dvh - 64px); padding: 16px 12px; z-index: 5; }
  .lx-rail a { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 16px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
  .lx-rail a:hover { background: var(--panel); color: var(--ink); }
  .lx-rail a[aria-current=page] { background: var(--violet-soft); color: var(--violet-deep); }
  .lx-main { min-width: 0; }
  .lx-foot { padding-bottom: 40px; }
  #toasts { bottom: 24px; }
  .lang-btn .long { display: inline; }
  .lang-btn .short { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; padding: 0; margin: 0; grid-template-columns: repeat(2, 1fr); }
  .bento > * { min-height: 0; }
  .lang-cells li { padding: 8px 12px; }
  .tile h3 { font-size: 30px; }
  .tile .big { font-size: 64px; }
  .bento .wide { grid-column: span 2; }
  .live-cards { grid-template-columns: repeat(2, 1fr); }
  .live-row { grid-template-columns: 80px 56px 1fr auto; padding: 16px 20px; }
  .live-row .acts { grid-column: auto; }
  .hero-in { padding: 40px var(--gutter) 80px; }
  .hero h1 { font-size: clamp(72px, 10.6vw, 104px); }
  .stage-media { min-height: 416px; }
  .next-card { inset-inline: 32px auto; width: min(420px, 80%); }
  .welcome-in { padding: 32px var(--gutter) 64px; grid-template-columns: 1fr 1fr; align-items: center; }
  .c-hero-in { padding: 8px var(--gutter) 64px; }
  .path { grid-template-columns: 1fr 1.3fr; align-items: start; }
  .path-card { position: sticky; top: 96px; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
  /* Desktop: brand on the left, links and languages on the right, legal line across */
  .lx-foot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); column-gap: 64px; align-items: start; }
  .lx-foot-in > .foot-bottom { grid-column: 1 / -1; }
  .lx-foot .big span { font-size: 34px; }
  .lx-foot .big span { font-size: 48px; }
  .lx-foot .big img { height: 46px; }
  .cta-in { padding: 96px 48px; }
  .lesson-body { padding: 32px var(--gutter) 8px; }
  .quiz { padding: 32px; }
  .lesson-nav { position: static; background: none !important; backdrop-filter: none !important; border: 0 !important; box-shadow: none !important; padding: 32px var(--gutter) 48px; justify-content: space-between; }
  .lesson-nav .btn { flex: 0 1 auto; }
  .lesson-nav { flex-wrap: nowrap; }
  .lesson-nav .next-locked { display: flex; }
  .lesson-nav .next-locked span { order: 0; width: auto; padding: 0; font-size: 14px; }
  .lx-main.focus-mode { padding-bottom: 0; }
  .certificate { padding: 80px 64px; }
  .auth-form { padding-top: 80px; padding-bottom: 80px; }
  .verify-card { padding: 48px; }
}

/* ================= DESKTOP ≥ 1180 ================= */
@media (min-width: 1180px) {
  :root { --gutter: 48px; --section-y: 48px; --head-gap: 32px; --grid-gap: 24px; --card-pad: 24px; }
  .lx-nav { display: flex; }
  .lx-shell { display: block; }
  .lx-rail { display: none; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .ccard h3 { font-size: clamp(20px, 11cqi, 26px); }
  .ccard .pic { aspect-ratio: 2 / 1; }
  .ccard .desc { -webkit-line-clamp: 2; }
  .toolbar { margin-bottom: 20px; }
  .ccard .desc { font-size: 15px; }
  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento .tile { grid-column: span 2; min-height: 250px; }
  .bento .wide { grid-column: span 4; }
  .bento .tall { grid-row: span 2; }
  .live-cards { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: clamp(50px, 6.6vw, 104px); }
  .hero-in { grid-template-columns: 1fr 1fr; gap: 64px; min-height: min(760px, calc(100dvh - 64px)); align-items: center; padding: 40px var(--gutter) 80px; }
  .stage-media { min-height: 600px; }
  .next-card { inset-inline-start: -48px; width: 420px; }
  .welcome-in { grid-template-columns: 1.05fr .95fr; gap: 64px; padding: 48px var(--gutter) 80px; }
  .c-hero-in { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .c-hero-in > .crumb { grid-column: 1 / -1; }
  .course-layout { grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
  .course-side { position: sticky; top: 96px; display: grid; gap: 16px; }
  .player { grid-template-columns: 1fr 400px; gap: 0; padding: 24px var(--gutter) 0; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; } /* same edges as the header */
  .video-wrap { border-radius: var(--r-l); box-shadow: var(--sh-3); }
  .outline { display: block; position: sticky; top: 88px; height: calc(100dvh - 112px); overflow: auto; margin-inline-start: 32px; background: var(--panel); border-radius: var(--r-l); padding: 24px 16px; }
  .outline .module { padding: 16px 12px 4px; box-shadow: none; }
  .outline .module h2 { font-size: 22px; margin-bottom: 8px; gap: 8px; }
  .outline .module h2 .n { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
  /* The AI trainer button floats over the panel's bottom corner: room to scroll the last lessons above it, and a fade
     that shows the list goes on. */
  .outline { padding-bottom: 88px; -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }
  .outline .modules { gap: 12px; }
  .outline .lesson-row { grid-template-columns: 36px 1fr; min-height: 56px; padding: 8px; }
  .outline .lesson-row .st { width: 36px; height: 36px; border-radius: 12px; }
  .outline .lesson-row .tt strong { font-size: 15px; }
  .outline .lesson-row > .tag { display: none; }
  .outline h2 { font-size: 24px; }
  .outline .milestones { margin-bottom: 24px; gap: 16px; }
  .outline .ms-top { font-size: 14px; }
  .outline .ms-bar { padding-inline: 4px; }
  .outline .ms-dot { width: 24px; height: 24px; }
  .outline .ms-dot .ic { width: 12px; height: 12px; }
  .outline .ms.cert .ms-dot { width: 28px; height: 28px; }
  .outline .ms.cur .ms-dot { box-shadow: 0 0 0 3px rgb(91 61 245 / .15); }
  .outline .ms-fill { inset-inline: 16px; bottom: 11px; }
  .lesson-body { padding: 32px 0 8px; }
  .lesson-nav { padding: 32px 0 64px; }
  .auth { grid-template-columns: 1fr 1fr; }
  .auth-photo { display: block; position: relative; padding: 24px var(--gutter) 24px 0; }
  [dir=rtl] .auth-photo { padding: 24px 0 24px var(--gutter); }
  .auth-photo .photo { position: absolute; inset: 24px var(--gutter) 24px 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-3); }
  .auth-photo .next-card { inset-inline-start: 32px; bottom: 56px; width: 380px; }
}

/* ---------- AI orb: a living gradient sphere that says "AI" at a glance ---------- */
@property --orb-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.orb-ai { --s: 40px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; position: relative; isolation: isolate;
  background: conic-gradient(from var(--orb-a), #5b3df5, #3fa0ff, #9b7bff, #eb6608, #5b3df5);
  box-shadow: 0 0 calc(var(--s) * .45) rgb(91 61 245 / .45), inset 0 0 calc(var(--s) * .25) rgb(255 255 255 / .35);
  animation: orb-spin 6s linear infinite, orb-breathe 3.2s ease-in-out infinite; }
.orb-ai::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / .95), rgb(255 255 255 / .2) 35%, transparent 60%); filter: blur(calc(var(--s) * .04)); }
.orb-ai::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; z-index: -1; background: conic-gradient(from calc(var(--orb-a) * -1), rgb(91 61 245 / .5), rgb(235 102 8 / .35), rgb(63 160 255 / .45), rgb(91 61 245 / .5)); filter: blur(calc(var(--s) * .22)); opacity: .8; }
@media (prefers-reduced-motion: reduce) { .orb-ai, .next-card .k .live { animation: none !important; } }
.ccard .pic picture, .pc-thumb picture, .pic picture { display: contents; }
@keyframes orb-spin { to { --orb-a: 360deg; } }
@keyframes orb-breathe { 50% { transform: scale(1.06); } }
.ai-tile-head { display: flex; gap: 20px; align-items: center; }
.ai-tile-head .orb-ai { --s: 64px; }
.ai-row { display: flex; gap: 12px; align-items: flex-end; justify-self: start; max-width: 92%; }
.ai-row .orb-ai { --s: 28px; margin-bottom: 4px; }
.ai-row .ai-msg { max-width: 100%; }

/* ---------- AI trainer ---------- */
.ai-fab { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); position: fixed; z-index: 50; inset-inline-end: 16px; bottom: calc(var(--tabbar) + 22px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px 0 8px; border-radius: 999px; border: 0; cursor: pointer; color: #fff; font-weight: 600; font-size: 15px; background: linear-gradient(120deg, rgb(14 14 18 / .88), rgb(42 33 64 / .82)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 16px 40px -12px rgb(40 20 120 / .55); border: 1px solid rgb(255 255 255 / .14); transition: transform .25s var(--ease); }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab .orb { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from 200deg, var(--violet), #9b7bff, var(--qnet), var(--violet)); }
.ai-fab .orb .ic { width: 20px; height: 20px; color: #fff; }
body.focus-mode .ai-fab { bottom: calc(100px + env(safe-area-inset-bottom)); }
.ai-panel { position: fixed; z-index: 81; inset: 0; background: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.ai-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px; border-bottom: 1px solid var(--line); }
.ai-head .orb { width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(from 200deg, var(--violet), #9b7bff, var(--qnet), var(--violet)); display: grid; place-items: center; color: #fff; flex: none; }
.ai-head strong { display: block; font: 800 22px/1 var(--display); }
.ai-head span { font-size: 13px; color: var(--muted); }
.ai-log { overflow: auto; padding: 20px 16px; display: grid; gap: 16px; align-content: start; background: linear-gradient(180deg, var(--violet-tint), #fff 240px); }
.ai-msg { max-width: 88%; padding: 12px 16px; border-radius: 20px; line-height: 1.55; overflow-wrap: anywhere; }
.ai-msg.me { white-space: pre-wrap; margin-inline-end: 4px; max-width: 82%; }
.ai-msg.me { justify-self: end; background: var(--ink); color: #fff; border-end-end-radius: 6px; }
.ai-msg.bot { justify-self: start; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); border-end-start-radius: 6px; }
/* Answers: real paragraphs and lists, cited lessons as chips, quiet actions, follow-up chips under the latest answer */
.ai-msg.bot { display: grid; gap: 8px; padding: 16px; }
.ai-msg.bot p, .ai-msg.bot ol, .ai-msg.bot ul { margin: 0; }
.ai-msg.bot ol, .ai-msg.bot ul { padding-inline-start: 0; list-style: none; display: grid; gap: 8px; counter-reset: ai; }
.ai-msg.bot li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; }
.ai-msg.bot ol > li { counter-increment: ai; }
.ai-msg.bot ol > li::before { content: counter(ai); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-deep); font: 700 12px/1 var(--body); margin-top: 1px; }
.ai-msg.bot ul > li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); margin: 9px 0 0 9px; }
.ai-msg.bot strong { font-weight: 700; color: var(--ink); }
.ai-ref { display: inline-flex; align-items: center; gap: 4px; vertical-align: baseline; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--violet-soft); color: var(--violet-deep); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ai-ref .ic { width: 12px; height: 12px; }
a.ai-ref:hover { background: var(--violet); color: #fff; }
.ai-ref.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.ai-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; font-size: 13px; }
.ai-src .ai-ref { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.ai-src { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ai-src > span:first-child { width: 100%; font-weight: 600; }
.ai-acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-top: 4px; }
.ai-acts .sep { width: 1px; height: 20px; background: var(--line-2); margin-inline: 4px; }
.ai-act { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font: 500 13px var(--body); cursor: pointer; }
.ai-act .ic { width: 14px; height: 14px; }
.ai-act:hover { border-color: var(--line-2); background: #fff; }
.ai-act[aria-pressed=true] { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); }
.ai-msg.err { border-color: rgb(196 32 32 / .35); background: #fff8f8; }
.ai-turn { display: grid; gap: 8px; }
.ai-sugg.follow { padding-inline-start: 40px; }
.ai-sugg.follow button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.ai-typing { align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.ai-typing .dots { display: flex; gap: 4px; }
.orb-ai.thinking { animation: orb-think 1.6s ease-in-out infinite; }
@keyframes orb-think { 50% { transform: scale(1.12); filter: saturate(1.4); } }
.ai-msg.fresh > * { animation: ai-in .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes ai-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .ai-msg.fresh > *, .orb-ai.thinking { animation: none; } }
.ai-msg .fb { display: flex; gap: 4px; margin-top: 8px; }
.ai-msg .fb button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; min-height: 32px; min-width: 44px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.ai-msg .fb button[aria-pressed=true] { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); }
.ai-typing { justify-self: start; display: flex; gap: 4px; padding: 16px 16px; background: #fff; border-radius: 20px; border: 1px solid var(--line); }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: blink 1.2s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .2s; } .ai-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.ai-sugg { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-sugg button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 8px 16px; min-height: 40px; cursor: pointer; font-size: 14px; text-align: start; }
.ai-sugg button:hover { border-color: var(--violet); color: var(--violet-deep); }
.ai-form { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); align-items: flex-end; }
.ai-form textarea { min-height: 52px; max-height: 160px; resize: none; border-radius: 16px; }
.ai-form .btn { min-width: 52px; padding: 0 16px; }
.ai-note { font-size: 12px; color: var(--muted); text-align: center; padding: 0 16px 8px; }
@media (min-width: 744px) {
  .ai-fab { bottom: 28px; inset-inline-end: 28px; }
  body.focus-mode .ai-fab { bottom: 28px; }
  .ai-panel { inset: 16px 16px 16px auto; width: 480px; border-radius: var(--r-l); box-shadow: var(--sh-3); border: 1px solid var(--line); overflow: hidden; }
  [dir=rtl] .ai-panel { inset: 16px auto 16px 16px; }
}

/* ================= ADMIN (sober SaaS) ================= */
.ad { background: #fff; min-height: 100dvh; }
.ad-head { position: sticky; top: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
.ad-head .brand { font-size: 18px; }
.ad-head .who, .ad-head .tag, .ad-head .site-label { display: none; }
.ad-head .brand span { font-size: 17px; }
.ad-head .tag { font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.ad-shell { display: block; }
.ad-side { display: none; }
.ad-tabs { position: fixed; inset-inline: 0; bottom: 0; height: 64px; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
.ad-tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.ad-tabs a[aria-current=page] { color: var(--ink); }
.ad-main { padding: 20px var(--gutter) 96px; max-width: 1280px; min-width: 0; }
.ad-main h1 { font-size: 30px; }
.ad-title { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.ad-title .spacer { min-width: 8px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.panel h2 { font-size: 20px; font-family: var(--body); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--panel); border-radius: var(--radius); padding: 16px 16px; display: grid; gap: 2px; }
.kpi .v { font: 800 34px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th { text-align: start; font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:hover td { background: #fafafb; }
.t a { font-weight: 600; color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.cards-m { display: grid; gap: 12px; }
.cards-m .card { padding: 16px; display: grid; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 12px 16px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--violet); }
.problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.problems li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; background: #fff; border-radius: 12px; padding: 12px 12px; }
.problems .line { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.drop { border: 2px dashed var(--field); border-radius: 18px; padding: 32px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; background: #fff; transition: background .15s, border-color .15s; }
.drop.over { background: var(--violet-tint); border-color: var(--violet); }
.drop .ic { width: 40px; height: 40px; color: var(--violet-deep); }
.uploads { display: grid; gap: 8px; }
.upl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.upl .progress { grid-column: 1 / -1; }
.files { display: grid; gap: 8px; }
.file-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; background: #fff; border-radius: 10px; padding: 8px 12px; min-height: 48px; }
.file-row .n { overflow-wrap: anywhere; font-weight: 500; }
.langs-grid { display: grid; gap: 12px; }
.lang-card { background: #fff; border-radius: 12px; padding: 16px; display: grid; gap: 8px; }
.lang-card .row strong { font-size: 17px; }
.tr-rows { display: grid; gap: 12px; }
.tr-row { display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.tr-row .k { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tr-row .src { background: var(--panel); border-radius: 10px; padding: 12px 12px; white-space: pre-wrap; font-size: 15px; overflow-wrap: anywhere; }
.tr-row textarea { min-height: 64px; }
.tr-row.dirty { border-color: var(--violet); }
.sticky-actions { position: sticky; bottom: 72px; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); padding: 8px; display: flex; gap: 8px; align-items: center; margin-top: 16px; width: fit-content; margin-inline: auto; }
.sticky-actions .muted { padding: 0 12px; font-size: 14px; }
.md-view { background: var(--panel); border-radius: 12px; padding: 16px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: auto; max-height: 60dvh; }
@media (min-width: 744px) {
  .ad-head .who, .ad-head .tag, .ad-head .site-label { display: inline-flex; }
  .ad-head .brand span { font-size: 20px; }
  .ad-shell { display: grid; grid-template-columns: 96px 1fr; }
  .ad-tabs { display: none; }
  .ad-side { display: grid; align-content: start; gap: 4px; position: sticky; top: 60px; height: calc(100dvh - 60px); border-inline-end: 1px solid var(--line); padding: 12px 8px; }
  .ad-side a { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
  .ad-side a:hover { background: var(--panel); }
  .ad-side a[aria-current=page] { background: var(--panel-2); color: var(--ink); }
  .ad-main { padding: 32px var(--gutter) 48px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .langs-grid { grid-template-columns: repeat(2, 1fr); }
  .tr-row { grid-template-columns: 1fr 1fr; }
  .tr-row .k { grid-column: 1 / -1; }
  .sticky-actions { bottom: 16px; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (min-width: 1180px) {
  .ad-shell { grid-template-columns: 232px 1fr; }
  .ad-side { padding: 16px 12px; }
  .ad-side a { display: flex; justify-items: start; gap: 12px; padding: 0 16px; min-height: 44px; align-items: center; font-size: 15px; }
  .langs-grid { grid-template-columns: repeat(4, 1fr); }
  .detail { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
}

/* ---------- analytics ---------- */
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kpis.five { grid-template-columns: repeat(2, 1fr); }
.kpi .delta { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--muted); }
.kpi .delta .ic { width: 14px; height: 14px; }
.kpi .delta.good { color: var(--ok); } .kpi .delta.bad { color: var(--err); }
.an-grid { display: grid; gap: var(--grid-gap); }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--card-pad); display: grid; gap: 16px; align-content: start; min-width: 0; }
.chart-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.chart-head h2 { font: 700 18px var(--body); letter-spacing: 0; }
.chart-head p { font-size: 14px; margin-top: 4px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--panel-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--body); }
.chart .line { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgb(91 61 245 / .1); }
.chart .cross { stroke: var(--field); stroke-dasharray: 3 3; }
.chart .dot { fill: var(--violet); stroke: #fff; stroke-width: 2; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 40%) 1fr auto; gap: 12px; align-items: center; min-height: 32px; border-radius: 8px; padding: 0 4px; }
.bars li:hover, .bars li:focus-visible { background: var(--violet-tint); }
.bars .bl { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .bt { height: 12px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.bars .bt i { display: block; height: 100%; background: var(--violet); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars .bv { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.rating-hero { display: flex; align-items: baseline; gap: 10px; }
.rating-hero .v { font: 800 56px/1 var(--display); }
.chart-tip { position: fixed; z-index: 95; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; box-shadow: var(--sh-2); display: none; max-width: 320px; }
@media (min-width: 744px) { .kpis.five { grid-template-columns: repeat(3, 1fr); } .an-grid { grid-template-columns: 1fr 1fr; } .an-grid.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .kpis.five { grid-template-columns: repeat(5, 1fr); } .an-grid.three { grid-template-columns: repeat(3, 1fr); } }

/* ---------- admin: drop-off map ---------- */
.dm { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.dm .row { justify-content: space-between; font-size: 15px; }
.dm-axis, .dm-lane { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.dm-l { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.dm-marks { position: relative; height: 22px; }
.dm-ch, .dm-cp { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
[dir=rtl] .dm-ch, [dir=rtl] .dm-cp { transform: translateX(50%); }
.dm-ch { background: var(--panel-2); color: var(--ink-2); }
.dm-cp { background: var(--violet); color: #fff; }
.dm-cells { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; }
.dm-cells i { height: 28px; border-radius: 4px; background: var(--panel); position: relative; }
.dm-cells i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: var(--a); }
.dm-cells i.stop::after { background: var(--err); }
.dm-cells i.back::after { background: var(--violet); }
.dm-q { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.dm-q li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; font-size: 14px; }

/* ---------- print: certificates and pages print clean ---------- */
@media print {
  .lx-head, .lx-tabs, .lx-rail, .lx-foot, .btn, .icon-btn, .ad-head, .ad-side, .ad-tabs, #toasts, .preview-bar, .offline, .lesson-nav, .no-print { display: none !important; }
  body { background: #fff; }
  .lx-shell, .ad-shell { display: block; }
  .lx-main, .ad-main { padding: 0; }
  .certificate { border: 0; padding: 48px; min-height: 90vh; align-content: center; }
  .certificate::before { inset: 0; }
  a { color: inherit; text-decoration: none; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* Glossary page: search, letter row, then a dictionary layout (term | definition) so rows never leave gaps.
   Neutral ink on the distributor site; the staff theme recolours through its own tokens only. */
.gl h1 { text-wrap: balance; }
.gl .lead { font-size: 19px; color: var(--ink-2); max-width: 60ch; text-wrap: balance; }
.gl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.gl-search { position: relative; flex: 0 1 420px; min-width: 0; }
.gl-search .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.gl-search input { width: 100%; max-width: none; min-height: 48px; padding-inline-start: 42px; font-size: 16px; }
#gl-count { font-variant-numeric: tabular-nums; }
.gl-letters { display: flex; flex-wrap: wrap; gap: 4px; position: sticky; top: calc(var(--head-px, 64px) + var(--strip-h, 0px)); z-index: 5; padding-block: 8px; margin-block: -8px; background: #fff; box-shadow: 0 1px 0 var(--line); }
body.ye-on { --strip-h: 52px; }
@media (max-width: 743px) { body.ye-on { --strip-h: 0px; } }
.gl-letters a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.gl-letters a:hover { background: var(--panel-2); }
.gl-letters a[aria-current=true] { background: var(--ink); color: #fff; }
.gl-list { display: grid; gap: 40px; }
.gl-group { display: grid; gap: 0; }
.gl-group h2 { font: 800 32px/1 var(--display); color: var(--ink); scroll-margin-top: 180px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.gl-group h2:focus { outline: none; }
.gl-group dl { display: grid; margin: 0; }
.gl-term { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-items: baseline; scroll-margin-top: 180px; }
.gl-term dt { font-weight: 700; font-size: 18px; line-height: 1.35; color: var(--ink); display: grid; gap: 2px; text-wrap: balance; overflow-wrap: anywhere; }
.gl-en { font-weight: 500; font-size: 14px; color: var(--muted); }
.gl-term dd { margin: 0; display: grid; gap: 8px; justify-items: start; }
.gl-term dd p { color: var(--ink-2); line-height: 1.6; max-width: 68ch; overflow-wrap: anywhere; text-wrap: pretty; }
@media (min-width: 744px) { .gl-term { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; padding: 20px 0; } }
@media (min-width: 1180px) { .gl-term { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; } }
@media (max-width: 743px) { .gl-letters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; } .gl-letters a { flex-shrink: 0; } .gl-group h2 { font-size: 28px; } }
.gloss-pop .gloss-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--violet-deep); margin-top: 4px; }
.lx-tabs.n6 { grid-template-columns: repeat(6, 1fr); padding: 6px; }
.lx-tabs.n6 a, .lx-tabs.n6 .tab-resume { font-size: 10.5px; }

/* Admin forms: session dialog */
.three-col { display: grid; gap: 16px; }
.form-err { color: var(--err); font-weight: 600; }
.form-err:empty { display: none; }
@media (min-width: 744px) { .three-col { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (max-width: 743px) { .dialog .two-col { display: grid; gap: 16px; } }
/* Sessions (staff site) */
.sess-list { display: grid; gap: 40px; }
.sess-grid { display: grid; gap: 12px; }
.sess { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); }
.sess.off { background: var(--panel); }
.sess.off h3 { text-decoration: line-through; color: var(--muted); }
.sess-date { display: grid; place-content: center; text-align: center; width: 64px; height: 64px; border-radius: var(--r-m); background: var(--violet-soft); color: var(--violet-deep); line-height: 1; }
.sess-date b { font: 800 26px/1 var(--display); }
.sess-date span { font-size: 13px; font-weight: 700; text-transform: uppercase; margin-top: 4px; }
.sess-body { display: grid; gap: 6px; min-width: 0; }
.sess-body h3 { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.sess-when { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sess-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-2); font-size: 15px; }
.sess-meta li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.sess-meta .ic { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.sess-details { max-width: 68ch; white-space: pre-line; overflow-wrap: anywhere; }
.sess-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sess-past { list-style: none; margin: 0; padding: 0; display: grid; }
.sess-past li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 744px) { .sess { grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; padding: 20px; } .sess-date { width: 72px; height: 72px; } .sess-acts { grid-column: auto; justify-content: flex-end; max-width: 300px; } }
@media (min-width: 1180px) { .sess-grid { gap: 16px; } }
@media (max-width: 743px) { .sess { border-radius: 0; border-inline: 0; margin-inline: calc(-1 * var(--gutter)); } .sess-past li { grid-template-columns: minmax(0, 1fr) auto; } .sess-past li > .muted { grid-row: 2; } }

/* Year-End Challenge: band on home, strip on other pages */
.ye-sec { padding-block: 24px; }
.ye-band { display: grid; gap: 24px; padding: 40px; border-radius: var(--r-xl); background: radial-gradient(90% 120% at 0% 100%, #2a1f5c 0%, transparent 60%), #0e0e12; color: #fff; overflow: hidden; }
.ye-text { display: grid; gap: 16px; align-content: center; justify-items: start; min-width: 0; }
.ye-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 14px; border-radius: 999px; background: rgb(255 255 255 / .12); font-weight: 700; font-size: 14px; }
.ye-chip .ic { width: 16px; height: 16px; }
.ye-band h2 { font: 800 clamp(32px, 3.6vw, 52px)/1.05 var(--display); max-width: 16ch; text-wrap: balance; }
.ye-band p { color: #d9d6ea; font-size: 17px; line-height: 1.55; max-width: 50ch; text-wrap: pretty; }
.ye-line { width: 100%; max-width: 560px; display: grid; gap: 12px; margin-top: 32px; }
.ye-track { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #8b5cf6 0 calc(var(--split) * 100% - 2px), transparent 0 calc(var(--split) * 100% + 2px), #ec4899 0); opacity: .95; }
.ye-today { position: absolute; top: 50%; inset-inline-start: calc(var(--today) * 100%); width: 18px; height: 18px; margin-inline-start: -9px; transform: translateY(-50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / .25); }
.ye-today span { position: absolute; bottom: 24px; inset-inline-start: 0; font-size: 12px; font-weight: 700; font-style: normal; white-space: nowrap; }
.ye-line ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.ye-line li { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; font-size: 14px; }
.ye-line li b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 8px; background: #8b5cf6; vertical-align: 1px; }
.ye-line li + li b::before { background: #ec4899; }
.ye-line li b { font-size: 14px; }
.ye-line li b span { font-weight: 500; color: #c9c5de; }
.ye-line li > span { color: #e4e1f2; }
.ye-photo { position: relative; margin: 0; border-radius: var(--r-l); overflow: hidden; min-height: 280px; background: #1b1830; }
.ye-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.ye-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(14 14 18 / .55)); }
.ye-clock { position: absolute; z-index: 1; inset-inline: 16px; bottom: 16px; display: grid; gap: 8px; padding: 16px 20px; border-radius: var(--r-m); background: rgb(14 14 18 / .62); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgb(255 255 255 / .16); }
.ye-cl-k { font-size: 14px; font-weight: 700; color: #e4e1f2; text-align: center; }
.ye-cl-n { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ye-cl-n div { display: grid; justify-items: center; text-align: center; }
.ye-cl-n div + div { border-inline-start: 1px solid rgb(255 255 255 / .14); }
.ye-cl-n b { font: 800 44px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.ye-cl-n span { font-size: 13px; color: #d9d6ea; }
@media (min-width: 1180px) { .ye-band { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; padding: 48px; } .ye-photo { min-height: 400px; } }
@media (min-width: 744px) and (max-width: 1179px) { .ye-band { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; } .ye-cl-n b { font-size: 34px; } .ye-line ol { flex-direction: column; gap: 8px; } }
@media (max-width: 743px) { .ye-sec { padding-block: 16px; } .ye-band { padding: 0 0 24px; border-radius: 0; margin-inline: calc(-1 * var(--gutter)); gap: 24px; } .ye-photo { order: -1; border-radius: 0; min-height: 0; display: grid; } .ye-photo img { position: static; height: 220px; object-position: center 30%; } .ye-photo::after { display: none; } .ye-clock { position: static; border-radius: 0; border: 0; border-bottom: 1px solid rgb(255 255 255 / .12); background: #1b1830; } .ye-text { padding-inline: var(--gutter); } .ye-text .btn { width: 100%; justify-content: center; } .ye-cl-n b { font-size: 32px; } .ye-clock { padding: 12px var(--gutter); } .ye-line ol { flex-direction: column; gap: 8px; } }
.ye-strip { position: sticky; top: var(--head-h, 64px); z-index: 30; display: flex; align-items: center; justify-content: center; gap: 8px 16px; min-height: 44px; padding: 4px 8px 4px 16px; background: #0e0e12; color: #fff; font-size: 14px; font-weight: 600; }
.ye-strip-t { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ye-strip-t .ic { width: 16px; height: 16px; flex-shrink: 0; }
.ye-strip a { color: #fff; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ye-strip .icon-btn { color: #fff; background: transparent; width: 44px; height: 44px; }
.ye-strip .icon-btn:hover { background: rgb(255 255 255 / .12); }
@media (max-width: 743px) { .ye-strip { position: static; justify-content: space-between; font-size: 13px; } }
@media print { .ye-strip, .ye-sec { display: none !important; } }

/* White-label school home (MODE=org, body.org): the platform's own look (rounded cards, natural photos, glass tags)
   with a light VTube touch — blue action buttons, a photo panel with an angled edge, titles on photos, giant step numbers. */
body.org .btn.primary { background: var(--violet-2); box-shadow: 0 8px 20px -10px rgb(14 21 72 / .55); } body.org .btn.primary:hover { background: var(--violet); }
body.org .progress > i { background: linear-gradient(90deg, var(--violet), var(--violet-2)); }
.sc-hero { position: relative; padding-block: 40px 56px; }
.sc-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 32px 48px; align-items: center; }
.sc-copy { display: grid; gap: 24px; }
.sc-copy .lead { max-width: 52ch; text-wrap: pretty; }
.sc-cta { gap: 12px; }
.sc-photo { position: relative; grid-column: 2; grid-row: 1 / span 2; align-self: stretch; min-height: 520px; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-3); }
.sc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, transparent 45%, rgb(14 21 72 / .45)); }
.sc-prog { display: grid; gap: 12px; max-width: 540px; padding: var(--card-pad); background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-2); border: 1px solid var(--line); }
.sc-prog .k { font-size: 14px; font-weight: 700; color: var(--violet); }
.sc-prog h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; }
.sc-prog h2 a { color: inherit; text-decoration: none; }
.sc-prog h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sc-prog .btn { width: fit-content; }
.sc-by { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0; }
.sc-bar { display: flex; align-items: center; gap: 12px; } .sc-bar .progress { flex: 1; }
.sc-bar .muted { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-next { margin: 0; font-size: 16px; }
.sc-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--grid-gap); }
.sc-pgrid .sc-ptitle { font-size: clamp(20px, 1.5vw, 22px); }
.sc-pgrid .sc-pbody > p.user-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; }
.sc-pgrid .sc-by { font-size: 14px; }
.sc-pcard { display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-1); }
.sc-pimg { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--violet-deep); overflow: hidden; }
.sc-pimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.sc-pcard:hover .sc-pimg img { transform: scale(1.04); }
.sc-ptitle { font: 800 clamp(22px, 1.8vw, 26px)/1.05 var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
.sc-ptitle a { color: inherit; text-decoration: none; } .sc-ptitle a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sc-pbody { display: flex; flex-direction: column; gap: 8px; padding: var(--card-pad); }
.sc-pbody .sc-more { margin-top: auto; padding-top: 4px; }
.sc-pbody p { margin: 0; }
.sc-pbody .btn { width: fit-content; margin-top: 8px; }
.sc-meta { font-size: 14px; font-variant-numeric: tabular-nums; }
.sc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--grid-gap); }
.sc-steps li { display: grid; gap: 8px; align-content: start; }
.sc-num { font: 800 clamp(64px, 6vw, 96px)/.9 var(--display); background: var(--hl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-steps h3 { font-size: 22px; } .sc-steps p { margin: 0; max-width: 34ch; text-wrap: pretty; }
body.org #courses .toolbar { flex-wrap: wrap; }
body.org #courses .seg { order: 3; max-width: 100%; flex: 0 0 100%; flex-wrap: wrap; gap: 8px; padding: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; -webkit-mask: none; mask: none; }
body.org #courses .seg .filter { border: 1px solid var(--line); background: #fff; }
body.org #courses .seg .filter[aria-pressed=true] { background: var(--violet-2); border-color: var(--violet-2); color: #fff; }
body.org #courses .toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
body.org #courses .toolbar .search { flex: 0 0 auto; width: 200px; margin-inline-start: auto; transition: width .3s var(--ease); }
body.org #courses .toolbar .search:focus-within, body.org #courses .toolbar .search.filled { width: 280px; }
body.org #courses .toolbar .search input { min-height: 40px; height: 40px; border-radius: 999px; font-size: 16px; }
body.org #courses .seg .filter { padding: 0 14px; font-size: 14px; min-height: 40px; }
body.org #courses .seg { order: 0; flex: 0 1 auto; flex-wrap: nowrap; overflow-x: auto; }
body.org #courses .seg .filter:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.sc-cgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sc-ctitle { min-height: 2.1em; }
.sc-more-row { display: flex; justify-content: center; margin-top: 32px; }
.sc-more-row .btn[hidden] { display: none; }
@media (max-width: 1179px) { .sc-cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1179px) { body.org #courses .toolbar { flex-wrap: wrap; } body.org #courses .seg { flex-wrap: wrap; } }
@media (max-width: 743px) { body.org #courses .toolbar .search, body.org #courses .toolbar .search:focus-within, body.org #courses .toolbar .search.filled { width: 100%; margin: 0; } }
@media (prefers-reduced-motion: reduce) { body.org #courses .toolbar .search { transition: none; } }
@media (max-width: 743px) { .sc-cgrid { grid-template-columns: 1fr; } .sc-ctitle { min-height: 0; } }
body.org #courses .grid.rail { grid-auto-columns: min(84%, 320px); }
.sc-ccard { display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-1); color: inherit; text-decoration: none; scroll-snap-align: start; transition: box-shadow .2s, transform .2s var(--ease); }
.sc-ccard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.sc-cimg { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; }
.sc-cimg img { width: 100%; height: 100%; object-fit: cover; }
.sc-pimg img, .sc-cimg img, .sc-stage-img, .sc-photo img { filter: saturate(.9) contrast(1.04); } /* one quiet grade so mixed stock photos read as one set */
.sc-cat { font-size: 13px; font-weight: 700; color: var(--violet-2); }
.sc-cbody { display: grid; gap: 8px; align-content: start; grid-template-rows: auto auto 1fr auto; padding: var(--card-pad); }
.sc-ctitle { font: 800 24px/1.05 var(--display); color: var(--ink); text-wrap: balance; }
.sc-cdesc { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-cmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; align-self: end; font-size: 14px; color: var(--ink-2); }
.sc-cmeta svg, .sc-cert svg { width: 16px; height: 16px; vertical-align: -3px; margin-inline-end: 4px; }
.sc-ccard .btn { width: fit-content; margin-top: 8px; pointer-events: none; }
.sc-chip { position: absolute; z-index: 1; inset: auto auto 20px 20px; padding: 8px 16px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px rgb(0 0 0 / .25); background: linear-gradient(140deg, rgb(255 255 255 / .3), rgb(255 255 255 / .08) 50%, rgb(255 255 255 / .18)); -webkit-backdrop-filter: blur(12px) saturate(1.8); backdrop-filter: blur(12px) saturate(1.8); box-shadow: inset 1px 1px 0 rgb(255 255 255 / .6), inset -1px -1px 0 rgb(255 255 255 / .2), 0 8px 24px -10px rgb(0 0 0 / .4); }
.sc-partners { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); text-wrap: balance; }
/* Visitor hero (Le Wagon-like): the promise on one big rounded photo */
.sc-hero.guest { padding-block: 16px 48px; }
.sc-hero.guest .sc-partners { margin-top: 20px; text-align: center; }
.sc-stage { position: relative; min-height: min(640px, calc(100svh - 140px)); border-radius: var(--r-xl); overflow: hidden; display: grid; align-items: center; background: var(--violet-deep); }
.sc-stage-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.sc-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(14 21 72 / .9) 0%, rgb(14 21 72 / .72) 38%, rgb(14 21 72 / .1) 70%); }
.sc-stage-copy { position: relative; z-index: 1; display: grid; gap: 20px; max-width: 620px; padding: 48px clamp(24px, 5vw, 64px); color: #fff; }
.sc-stage-copy h1 { color: #fff; } .sc-stage-copy h1 .hl, .sc-stage-copy h1 span { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.sc-stage-copy .lead { color: #fff; max-width: 48ch; }
/* Liquid glass on photos and dark bands: clear, bright edges, light caught top-left, a soft shadow under it */
.btn.glassy { position: relative; isolation: isolate; color: #fff; border: 0; background: linear-gradient(140deg, rgb(255 255 255 / .26), rgb(255 255 255 / .06) 50%, rgb(255 255 255 / .16)); -webkit-backdrop-filter: blur(12px) saturate(1.8) brightness(1.08); backdrop-filter: blur(12px) saturate(1.8) brightness(1.08);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / .55), inset -1px -1px 0 rgb(255 255 255 / .18), inset 0 0 18px rgb(255 255 255 / .08), 0 10px 28px -12px rgb(0 0 0 / .45); }
.btn.glassy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(135deg, rgb(255 255 255 / .85), rgb(255 255 255 / .12) 40%, rgb(255 255 255 / .05) 60%, rgb(255 255 255 / .6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.btn.glassy:hover { background: linear-gradient(140deg, rgb(255 255 255 / .34), rgb(255 255 255 / .1) 50%, rgb(255 255 255 / .22)); }
.sc-more { display: inline-flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; margin-top: 4px; color: var(--violet-2); font-weight: 700; text-decoration: none; }
.sc-more:hover { text-decoration: underline; text-underline-offset: 4px; } .sc-more svg { width: 18px; height: 18px; }
.section-head.center { text-align: center; justify-items: center; margin-inline: auto; }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--grid-gap); margin: 0; text-align: center; }
.sc-stats div { display: flex; flex-direction: column-reverse; gap: 4px; }
.sc-stats dd { margin: 0; font: 800 clamp(48px, 5vw, 72px)/1 var(--display); color: var(--violet-2); font-variant-numeric: tabular-nums; }
.sc-stats dt { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.sc-band { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; padding: clamp(32px, 4vw, 56px); border-radius: var(--r-xl); background: var(--violet-deep); color: #fff; }
.sc-band h2 { color: #fff; } .sc-band p { margin: 0; max-width: 60ch; color: #fff; }
/* Org top menu (Le Wagon-like) */
body.org .lx-head { background: linear-gradient(180deg, rgb(255 255 255 / .72), rgb(255 255 255 / .5)); -webkit-backdrop-filter: blur(22px) saturate(2) brightness(1.04); backdrop-filter: blur(22px) saturate(2) brightness(1.04); box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(255 255 255 / .5), 0 6px 24px -18px rgb(14 21 72 / .35); }
body.org .nav-sub { background: linear-gradient(140deg, rgb(255 255 255 / .86), rgb(255 255 255 / .7) 55%, rgb(255 255 255 / .8)); -webkit-backdrop-filter: blur(26px) saturate(1.9); backdrop-filter: blur(26px) saturate(1.9); border-color: rgb(255 255 255 / .7); box-shadow: inset 1px 1px 0 rgb(255 255 255 / .95), inset -1px -1px 0 rgb(14 21 72 / .04), var(--sh-3); }
body.org .lx-nav { background: none; box-shadow: none; padding: 0; gap: 4px; margin-inline-start: 40px; }
body.org .lx-nav > a, body.org .nav-dd > button { color: var(--ink); font-weight: 500; font-size: 15px; padding: 0 12px; border-radius: 8px; }
body.org .lx-nav > a:hover, body.org .nav-dd > button:hover { background: var(--panel); }
body.org .lx-nav > a[aria-current=page], body.org .nav-dd > button.on { background: none; box-shadow: none; color: var(--violet-2); font-weight: 600; }
.nav-sub.wide { min-width: 340px; }
.lx-nav .nav-sub a .two { display: grid; gap: 2px; padding-block: 8px; }
.lx-nav .nav-sub a .two strong { font-weight: 600; color: var(--ink); }
.lx-nav .nav-sub a .two small { font-size: 13px; color: var(--muted); }
.lx-nav .nav-sub a.all { justify-content: space-between; color: var(--violet-2); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.head-ctas { gap: 8px; flex-wrap: nowrap; }
.head-ctas .short { display: none; }
@media (max-width: 743px) { .head-ctas .long { display: none; } .head-ctas .short { display: inline; } .head-ctas .btn { padding-inline: 16px; } }
body.org .resume-btn { background: var(--violet-2); color: #fff; border-radius: 12px; }
body.org .resume-btn:hover { background: var(--violet); }
@media (max-width: 1023px) { .head-ctas .btn.line { display: none; } }
body.org .nav-dd > button.on, body.org .lx-nav > a[aria-current=page] { color: var(--violet-2); font-weight: 600; box-shadow: inset 0 -2px 0 var(--violet-2); border-radius: 0; }
.lx-nav .nav-sub a[aria-current=page] { background: var(--violet-soft); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--ink-2); text-decoration: none; } .crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
@media (min-width: 744px) { body.org .ptabs { flex-wrap: wrap; overflow: visible; -webkit-mask: none; mask: none; } }
/* Phone tap targets: 44px minimum (SaaS standards) */
@media (max-width: 743px) {
  body.org .lx-head .brand { min-height: 44px; display: inline-flex; align-items: center; }
  body.org .lx-head .icon-btn, body.org .lx-head .avatar, body.org .lx-head .lang-btn { min-width: 44px; min-height: 44px; }
  body.org .sc-more, body.org .sub-row, body.org .lesson-top .crumb, body.org .crumbs a { min-height: 44px; display: inline-flex; align-items: center; }
  body.org .q input[type=radio], body.org .q input[type=checkbox] { width: 24px; height: 24px; }
  body.org .q label { min-height: 48px; }
  body.org .sc-ptitle a { display: inline-block; padding-block: 10px; }
  body.org .lesson-top .crumb { min-height: 44px !important; } /* overrides the inline min-height: auto */
}
body.org .lx-foot { background: var(--violet-deep); }
/* Phone footer (school): contact block first and full width, links in two columns, everything left-aligned */
@media (max-width: 743px) {
  body.org .ft-in { justify-items: stretch; text-align: start; gap: 28px; }
  body.org .ft-brand { justify-items: start; grid-template-columns: 1fr auto; align-items: center; }
  body.org .ft-brand .ft-tag { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  body.org .ft-brand .ft-lang { grid-column: 2; grid-row: 1; }
  body.org .ft-logo img { height: 20px; } body.org .ft-logo span { font-size: 22px; }
  body.org .ft-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  body.org .ft-links .ft-contact { grid-column: 1 / -1; order: -1; padding: 16px; border-radius: 16px; background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
  body.org .ft-group a, body.org .ft-group button { justify-content: flex-start; min-height: 44px; }
  body.org .ft-bottom { justify-items: start; text-align: start; }
  body.org .ft-legal { justify-content: flex-start; }
  /* Bottom tab bar: solid enough to read over any section (labels 4.5:1 or more) */
  body.org .lx-tabs { background: rgb(255 255 255 / .96); box-shadow: 0 0 0 1px rgb(14 21 72 / .08), 0 10px 30px -10px rgb(14 21 72 / .35); }
  body.org .lx-tabs a, body.org .lx-tabs .tab-resume { color: var(--ink-2); font-size: 12px; }
  body.org .lx-tabs a[aria-current=page] { color: var(--violet-deep); background: var(--violet-soft); }
  /* Course cards: compact rows, the whole row opens the course */
  .sc-cgrid { gap: 10px; }
  .sc-ccard { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto; }
  .sc-cimg { aspect-ratio: auto; height: 100%; min-height: 104px; }
  .sc-cbody { grid-template-rows: auto auto auto; gap: 4px; padding: 12px 40px 12px 14px; position: relative; align-content: center; }
  .sc-cbody::after { content: ""; position: absolute; inset-inline-end: 16px; top: 50%; width: 9px; height: 9px; border-top: 2px solid var(--violet-2); border-right: 2px solid var(--violet-2); transform: translateY(-50%) rotate(45deg); }
  .sc-ctitle { font-size: 18px; min-height: 0; }
  .sc-cmeta { font-size: 13px; gap: 4px 10px; }
  .sc-ccard .btn { display: none; }
}
body.org #courses .toolbar .search { order: 2; }
@media (min-width: 1180px) { body.org .ft-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ft-contact ul { gap: 2px; }
.ft-contact .ft-addr, .ft-contact a { display: flex !important; align-items: flex-start; gap: 10px; justify-content: flex-start !important; text-align: start; color: #ececf2; font-size: 15px; line-height: 1.45; padding: 8px 0; min-height: 40px; }
.ft-contact .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #b9c4ff; }
.ft-enquire { margin-top: 10px; width: fit-content; }
/* Phone: one programme per row, photo beside the text, same type sizes on every card */
@media (max-width: 743px) {
  .sc-pgrid { grid-template-columns: 1fr; gap: 12px; }
  .sc-pcard { grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: auto; }
  .sc-pimg { aspect-ratio: auto; height: 100%; min-height: 140px; }
  .sc-pbody { padding: 14px 16px; gap: 4px; }
  .sc-pgrid .sc-ptitle { font-size: 20px !important; line-height: 1.1; }
  .sc-pgrid .sc-ptitle a { padding-block: 2px; }
  .sc-pgrid .sc-by { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sc-meta { font-size: 13px; }
  .sc-pbody .sc-more { margin-top: 4px; white-space: nowrap; min-height: 44px; }
}
@media (max-width: 1179px) { .sc-steps, .sc-stats { grid-template-columns: repeat(2, 1fr); } .sc-photo { min-height: 440px; } }
@media (max-width: 743px) {
  .sc-hero { padding-block: 16px 32px; }
  .sc-hero-in { grid-template-columns: 1fr; gap: 24px; }
  .sc-photo { grid-column: 1; grid-row: auto; order: -1; min-height: 0; aspect-ratio: 16 / 10; border-radius: var(--r-l); clip-path: none; box-shadow: var(--sh-2); }
  .sc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .sc-num { font-size: 56px; }
  .sc-steps h3 { font-size: 19px; }
  .sc-steps p { font-size: 15px; }
  .sc-stage { min-height: 560px; align-items: end; }
  .sc-stage::after { background: linear-gradient(180deg, rgb(14 21 72 / .15) 0%, rgb(14 21 72 / .88) 55%); }
  .sc-stage-copy { padding: 24px 16px 56px; }
  }
@media (prefers-reduced-motion: reduce) { .sc-pimg img, .sc-ccard, .sc-ccard:hover { transition: none; transform: none; } }

/* Short desktop windows (iPad landscape, small laptops): tighter type and spacing so a section fits one screen. */
@media (min-width: 1180px) and (max-height: 860px) {
  :root { --section-y: 32px; --head-gap: 24px; --card-pad: 20px; }
  .pc-body { gap: 12px; }
  .pc-band, #paths .pc-band { height: 120px; }
  #paths { padding-block: 24px; }
  .pc-step a { min-height: 40px; padding-block: 4px; }
  .pc-foot { padding-top: 12px; }
  .section-head h2 { font-size: clamp(36px, 3.6vw, 52px); }
  .section-head p { font-size: 16px; }
  .ccard .desc { -webkit-line-clamp: 2; }
  .ccard .pic { aspect-ratio: 16 / 8; }
  .bento .tile { min-height: 220px; }
  .tile h3 { font-size: 28px; }
}

/* Phone: "Video watched" + the three speeds on one line in every language. */
.watch-line .tag { white-space: nowrap; }
@media (max-width: 743px) { .speed button { min-width: 44px; padding-inline: 6px; } }
.watch-state { min-width: 0; overflow: hidden; }
.watch-state.tight .tag-tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Practice and quiz lines under a lesson (outline and course page). */
.sub-rows { list-style: none; margin: -4px 0 8px; padding: 0 0 0 60px; display: grid; gap: 4px; }
.sub-row { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px 4px 8px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.sub-row .ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
a.sub-row:hover { background: var(--violet-tint); color: var(--ink); }
.sub-row.ok, .sub-row.ok .ic { color: var(--ok); }
.sub-row.no, .sub-row.no .ic { color: var(--err, #b42318); }
[dir=rtl] .sub-rows { padding: 0 60px 0 0; }
.outline .sub-rows { padding-inline-start: 52px; margin-top: -4px; }
.outline .sub-row { font-size: 13px; min-height: 28px; }
/* Milestone dots: state only. To do = empty, current = ring with a centre, done = check; a notch = quiz passed. */
.ms-dot i { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.ms.cur .ms-dot i { background: var(--violet); }
.ms.qp .ms-dot { position: relative; }
.ms.qp .ms-dot::after { content: ""; position: absolute; inset-block-start: -3px; inset-inline-end: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px #fff; }
#quiz, #practice, #badges { scroll-margin-top: 88px; }
/* Small phones: the state tag goes under the lesson title (long languages), the tag itself stays on one line. */
@media (max-width: 599px) { .lesson-row { grid-template-columns: 44px minmax(0, 1fr); row-gap: 8px; } .lesson-row > .tag { grid-column: 2; justify-self: start; } }
/* Optional feedback inside the "course completed" dialog: a plain block, not a card in a card. */
.celebrate-rate { width: 100%; text-align: start; display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.celebrate-rate .side-card { padding: 0; background: none; box-shadow: none; border: 0; }
/* AI trainer paused while a quiz is answered: visible, not clickable, says why. */
.ai-fab.paused { cursor: not-allowed; filter: grayscale(1); }
.ai-fab.paused .orb-ai { animation: none; }
/* App pages (no showcase hero): section titles follow the 48 px page title instead of the 64 px showcase size. */
.lx-main:not(:has(.hero, .c-hero, .welcome, .auth, .cta-band)) h2 { font-size: clamp(26px, 2.6vw, 34px); }
/* Branded drop-down (core.js pick): looks like the inputs, list like the language menu. */
.pick { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: start; cursor: pointer; color: var(--ink); }
.pick:hover { border-color: var(--ink-2); }
.pick:focus-visible, .pick[aria-expanded=true] { border-color: var(--violet); box-shadow: 0 0 0 4px rgb(91 61 245 / .14); outline: none; }
.pick[aria-invalid=true] { border-color: var(--err); }
.pick-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chev { display: grid; color: var(--ink-2); transition: transform .2s; }
.pick[aria-expanded=true] .pick-chev { transform: rotate(180deg); }
.pick-list { position: fixed; z-index: 90; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-3); overflow: auto; max-width: calc(100vw - 16px); outline: none; }
.pick-opt { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.pick-opt.on { background: var(--panel); }
.pick-opt[aria-selected=true] { background: var(--violet-soft); color: var(--violet-deep); font-weight: 600; }
.pick-opt[aria-selected=true]::after { content: "✓"; margin-inline-start: auto; padding-inline-start: 16px; }
@media (prefers-reduced-motion: reduce) { .pick-chev { transition: none; } }

/* ---------- My learning sub-entries: desktop dropdown, iPad rail, phone segmented row ---------- */
.nav-dd { position: relative; display: flex; }
.nav-dd > button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 16px; border: 0; background: none; color: var(--ink-2); font: inherit; font-weight: 500; font-size: 15px; border-radius: 10px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.nav-dd > button:hover { color: var(--ink); }
.nav-dd > button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); font-weight: 600; }
.nav-dd > button .ic { display: inline-block; width: 16px; height: 16px; transition: transform .2s; }
.nav-dd > button[aria-expanded=true] .ic { transform: rotate(180deg); }
.nav-sub { position: absolute; top: calc(100% + 10px); inset-inline-start: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-3); padding: 8px; display: grid; gap: 2px; z-index: 60; }
.nav-sub[hidden] { display: none; }
.lx-nav .nav-sub a { display: flex; gap: 12px; min-height: 44px; padding: 0 12px; font-size: 15px; }
.lx-nav .nav-sub .ic { display: inline-block; width: 20px; height: 20px; color: var(--muted); }
.lx-nav .nav-sub a:hover { background: var(--panel); }
.lx-nav .nav-sub a[aria-current=page] { background: var(--violet-soft); color: var(--violet-deep); box-shadow: none; }
.lx-nav .nav-sub a[aria-current=page] .ic { color: var(--violet-deep); }
.rail-sub { display: none; }
.subnav { display: flex; gap: 4px; background: var(--panel); border-radius: 14px; padding: 4px; }
.subnav a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.subnav .ic { width: 18px; height: 18px; flex: none; }
.subnav a[aria-current=page] { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
@media (min-width: 744px) {
  .subnav { display: none; }
  .lx-rail a[aria-current=page] + .rail-sub { display: grid; gap: 4px; margin-top: -4px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
  .lx-rail .rail-sub a { padding: 8px 2px; font-size: 11px; font-weight: 600; border-radius: 12px; }
  .lx-rail .rail-sub .ic { width: 20px; height: 20px; }
  .lx-rail .rail-sub a[aria-current=page] { background: #fff; color: var(--violet-deep); box-shadow: inset 0 0 0 1.5px var(--violet-deep); }
}

/* Resume: a filled pill beside the header tools; icon only on phone */
.resume-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--violet-soft); color: var(--violet-deep); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.resume-btn .ic { width: 18px; height: 18px; }
.resume-btn:hover { background: var(--violet-deep); color: #fff; }
.resume-btn { display: none; }
@media (min-width: 744px) { .resume-btn { display: inline-flex; padding: 0 16px; } }
.menu { max-width: calc(100vw - 16px); }
.lx-tabs .tab-resume { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 44px; border: 0; background: none; padding: 0; font: inherit; font-size: 11px; font-weight: 600; color: var(--violet-deep); cursor: pointer; }
.tab-resume .disc { display: grid; place-items: center; width: 36px; height: 24px; border-radius: 999px; background: var(--violet-deep); color: #fff; }
.tab-resume .disc .ic { width: 16px; height: 16px; }
.menu .who + a { margin-top: 0; }

/* Phone footer: everything centred, three short link columns, one language picker, compact legal line */
.foot-lang { display: none; }
@media (max-width: 743px) {
  .lx-foot { padding-top: 48px; }
  .lx-foot-in { gap: 32px; justify-items: center; text-align: center; }
  .lx-foot .big { justify-content: center; text-align: center; gap: 10px; }
  .lx-foot .big img { height: 26px; }
  .lx-foot .big span { font-size: 32px; }
  .lx-foot .big p { font-size: 15px; max-width: 32ch; margin-inline: auto; }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; width: 100%; }
  .foot-cols > div:last-child { display: none; }
  .foot-cols h2 { margin-bottom: 4px; font-size: 11px; }
  .foot-cols ul { justify-items: center; gap: 0; }
  .foot-cols a, .foot-cols button { display: block; font: inherit; font-size: 14px; line-height: 20px; min-height: 40px; padding: 10px 0; text-align: center; overflow-wrap: anywhere; }
  .foot-lang { display: inline-flex; align-items: center; gap: 8px; position: relative; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .24); color: #ececf2; }
  .foot-lang .ic { width: 18px; height: 18px; flex: none; }
  .foot-lang select { appearance: none; background: none; border: 0; color: inherit; font: 600 16px var(--body); padding-inline-end: 4px; cursor: pointer; }
  .foot-lang select option { color: var(--ink); }
  .foot-lang:focus-within { box-shadow: inset 0 0 0 2px #b6a6ff; }
  .foot-bottom { width: 100%; justify-content: center; flex-direction: column; align-items: center; gap: 4px; padding-top: 16px; font-size: 12px; }
}

/* Quick recall: due count chip on the home tile; the dialog reuses the quiz styles */
.rc-n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; margin-inline-start: 4px; border-radius: 999px; background: var(--violet-deep); color: #fff; font: 700 13px/1 var(--body); font-variant-numeric: tabular-nums; vertical-align: 2px; }
.recall.quiz { background: none; padding: 0; }
.recall .result:empty { display: none; }
.recall .result { font-weight: 600; }

/* Phone: "Free for every ID" is the third card of the "why" rail (languages, certificate, free, AI trainer) */
@media (max-width: 743px) {
  .bento > * { order: 3; }
  .bento > .lang-tile { order: 0; }
  .bento > .cert-tile { order: 1; }
  .bento > .free-tile { order: 2; }
}

/* Phone hero has one job: get back into the course. Short centred greeting, then the course to resume, then the
   three counters; the lead line and the goal caption are left to tablet and desktop. */
@media (max-width: 743px) {
  .welcome-in { padding-top: 32px; gap: 24px; }
  .welcome-in > .stack:first-child { display: contents; }
  .welcome h1 { order: 0; text-align: center; text-wrap: balance; font-size: 40px; }
  .welcome .lead { display: none; }
  .welcome-in > .cont { order: 1; }
  .welcome .mom { order: 2; }
  .mom > div:first-child > span:last-child { display: none; }
}

/* ---------- Interface pass (Oct 2026): card ring, chips, path trail, skeletons, chapters, focus, reading bar,
   text size, quick search, phone sheets ---------- */
/* Course card: small progress ring + lessons done */
.ring.xs { width: 44px; height: 44px; }
.ring.xs span { width: 36px; height: 36px; font: 700 12px var(--body); }
.ring.ok { background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--panel-2) 0); }
.ccard .foot .ring-tx { font-size: 13px; margin-inline-end: auto; }
/* New / Updated since the last visit */
.ccard { position: relative; }
.ccard > .tag.fresh { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; background: #fff; color: var(--violet-deep); box-shadow: var(--sh-1); }
/* Skeletons shaped like the page */
.sk-title { min-height: 48px; width: min(320px, 70%); margin-bottom: 32px; border-radius: 12px; }
.sk-grid { display: grid; gap: var(--grid-gap); grid-template-columns: 1fr; }
.sk-card { min-height: 320px; }
.sk-lesson { display: grid; gap: 32px; }
.sk-video { aspect-ratio: 16 / 9; min-height: 0; }
.sk-line { min-height: 18px; border-radius: 8px; }
.sk-line.w60 { width: 60%; min-height: 40px; } .sk-line.w80 { width: 80%; }
.sk-aside { display: none; min-height: 480px; }
@media (min-width: 744px) { .sk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .sk-grid { grid-template-columns: repeat(4, 1fr); } .sk-lesson { grid-template-columns: 1fr 360px; } .sk-aside { display: block; } }
/* Chapter markers under the player */
.chap-bar { display: grid; gap: 8px; margin-bottom: 16px; }
.chap-track { position: relative; height: 20px; }
.chap-track::before { content: ""; position: absolute; inset-inline: 0; top: 9px; height: 2px; background: var(--line-2); border-radius: 1px; }
.chap-track button { position: absolute; top: 0; width: 20px; height: 20px; margin-inline-start: -10px; border-radius: 50%; border: 0; padding: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); cursor: pointer; }
.chap-track button::after { content: ""; position: absolute; inset: -12px; } /* 44px touch target */
.chap-track button.on { background: var(--violet); box-shadow: none; }
.chap-track button:hover, .chap-track button:focus-visible { box-shadow: inset 0 0 0 2px var(--violet); }
.chap-now { font-size: 14px; font-weight: 600; color: var(--ink-2); min-height: 20px; }
/* Focus mode: only the player and the lesson */
.zen-btn { margin-inline-start: auto; }
body.zen .lx-head, body.zen .lx-rail, body.zen .outline, body.zen .ai-fab { display: none !important; }
body.zen .lx-shell { display: block; }
body.zen .player { grid-template-columns: minmax(0, 960px); justify-content: center; }
/* Reading progress for text lessons */
.read-bar { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 70; background: linear-gradient(90deg, var(--violet), #db2777); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
[dir=rtl] .read-bar { transform-origin: 100% 50%; }
/* Text size (Settings): lesson text, quizzes and practice */
.lesson-body, .recall { zoom: var(--text-scale, 1); }
/* Quick search */
.search-btn { display: none; }
@media (min-width: 744px) { .search-btn { display: inline-grid; } }
.qs .dialog-body { min-height: 320px; }
.qs-list { display: grid; gap: 16px; }
.qs-group { display: grid; gap: 2px; }
.qs-group h3 { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.qs-item { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.qs-item:hover, .qs-item:focus-visible { background: var(--panel); }
.qs-item > .ic { flex: none; color: var(--violet-deep); }
.qs-item > span { display: grid; min-width: 0; }
.qs-item small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Long first names in the greeting */
.welcome h1 { overflow-wrap: anywhere; }
.welcome h1.long-name { font-size: clamp(36px, 4.6vw, 76px); }
@media (max-width: 743px) { .welcome h1.long-name { font-size: 32px; } }
/* Phone: dialogs rise from the bottom as sheets */
@media (max-width: 743px) {
  .scrim { place-items: end center; padding: 0; }
  .dialog { width: 100%; border-radius: var(--r-l) var(--r-l) 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
  .scrim .dialog { animation: sheet-in .35s var(--ease) both; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .scrim .dialog { animation: none; } }

/* Home tiles that open a preview under them */
.xtile { display: grid; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden; }
.xtile > .stile { width: 100%; border: 0; box-shadow: none; border-radius: 0; background: none; text-align: start; font: inherit; cursor: pointer; }
.xtile .xt-chev .ic { transition: transform .2s var(--ease); }
.xtile.open .xt-chev .ic { transform: rotate(180deg); }
.xt-panel { padding: 0 20px 20px; display: grid; gap: 16px; }
.xt-panel[hidden] { display: none; }
.xt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.xt-stat { display: grid; gap: 2px; background: var(--panel); border-radius: 12px; padding: 12px; }
.xt-stat strong { font: 800 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.xt-stat span { font-size: 13px; color: var(--ink-2); }
.xt-stat small { font-size: 12px; color: var(--muted); }
.xt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.xt-list li { display: grid; gap: 6px; }
.xt-more { justify-self: start; }
/* Course preview */
.cp-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-m); }
.cp-desc { max-width: 65ch; text-wrap: pretty; }
.cp-h { font: 800 22px var(--display); }
.cp-inside { display: grid; gap: 16px; }
.cp-mod { display: grid; gap: 8px; }
.cp-mod ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cp-mod li { display: flex; gap: 10px; align-items: center; min-height: 36px; font-size: 15px; }
.cp-mod li > .ic { width: 18px; height: 18px; flex: none; color: var(--muted); }
.cp-mod li.done > .ic { color: var(--ok); }
.cp-mod li small { margin-inline-start: auto; white-space: nowrap; }
.xtile .xt-chev { opacity: 1; transform: none; }
.xtile .xt-chev .ic { width: 20px; height: 20px; }

/* Course cards that widen on click (home and catalog): details slide in beside the card, same height for all */
.xcard { position: relative; flex-direction: row; overflow: hidden; }
.xcard:hover { box-shadow: var(--sh-3); }
.xcard:hover .pic img { transform: scale(1.04); }
.cx-main { display: flex; flex-direction: column; flex: none; width: 100%; min-width: 0; }
.xcard.open .cx-main { width: var(--cw, 50%); }
.cx-hit { position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; background: none; cursor: pointer; border-radius: inherit; }
.cx-hit:focus-visible { outline: 3px solid var(--violet); outline-offset: -3px; }
.xcard .go, .xcard > .tag.fresh, .cx-more { position: relative; z-index: 2; }
.xcard a.go { text-decoration: none; }
.xcard a.go:hover { background: var(--violet-deep); }
.cx-more { position: absolute; inset-block: 0; inset-inline-start: var(--cw, 50%); inset-inline-end: 0; overflow-y: auto; padding: var(--card-pad); display: grid; align-content: start; gap: 14px; border-inline-start: 1px solid var(--line); background: var(--panel); opacity: 0; transition: opacity .3s ease .15s; }
.xcard.open .cx-more { opacity: 1; }
.cx-more h4 { font: 800 18px var(--display); }
/* In a rail the row is a flex strip: the opened card grows to two columns' width, the others keep theirs */
.grid.rail:has(> .xcard) { display: flex; align-items: stretch; }
.grid.rail > .xcard, .grid.rail > * { flex: 0 0 var(--col); }
.grid.rail > .xcard { transition: flex-basis .45s var(--ease), box-shadow .35s var(--ease); }
.grid.rail > .xcard.open { flex-basis: calc(var(--col) * 2 + var(--grid-gap)); }
.grid.rail { --col: min(84%, 340px); }
@media (min-width: 744px) and (max-width: 1179px) { .grid.rail { --col: calc((100% - 2 * var(--gutter) - 24px) / 2.15); } }
@media (min-width: 1180px) { .grid.rail { --col: calc((100% - 2 * var(--gutter) - 3 * 24px) / 4); } }
/* In a plain grid (View all) the opened card takes two columns */
.grid:not(.rail) > .xcard.open { grid-column: span 2; }
@media (max-width: 743px) { .grid:not(.rail) > .xcard.open { grid-column: auto; } .grid:not(.rail) > .xcard.open .cx-main { width: 100%; } .grid:not(.rail) > .xcard .cx-more { display: none; } }
@media (prefers-reduced-motion: reduce) { .grid.rail > .xcard, .cx-more { transition: none; } }
.cx-mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cx-mods li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; min-height: 32px; }
.cx-mods li > b, .cx-mods li > .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); font-size: 12px; color: var(--ink-2); }
.cx-mods li.done > .ic { background: var(--ok); color: #fff; padding: 5px; }
.cx-mods small { font-weight: 500; white-space: nowrap; }
.xcard a.go { text-decoration: none; }
.xcard a.go:hover { background: var(--violet-deep); }
.cx-foot { display: none; gap: 8px; margin-top: auto; padding-top: 8px; }
.cx-foot .btn { text-decoration: none; }
/* Phone: the card keeps its width; the details slide in over it from the side */
@media (max-width: 743px) {
  .grid.rail > .xcard.open { flex-basis: var(--col); }
  .xcard.open .cx-main { width: 100%; }
  .xcard .cx-more { inset-inline-start: 0; width: 100%; border: 0; transform: translateX(100%); transition: transform .4s var(--ease), opacity .2s; }
  [dir=rtl] .xcard .cx-more { transform: translateX(-100%); }
  .xcard.open .cx-more { transform: none; }
  .cx-foot { display: flex; justify-content: space-between; }
}
@media (max-width: 743px) { .xcard .cx-more { display: flex; flex-direction: column; } }

/* Signed-out My learning / Certificates / Badges: what it is, how it works, what it brings */
.li-hero h1 { font-size: clamp(44px, 6vw, 88px); line-height: .95; }
.li-hero .lead { max-width: 60ch; font-size: 19px; color: var(--ink-2); text-wrap: pretty; }
.li-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--grid-gap); }
.li-steps .tile { background: #fff; border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.li-n { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet-deep); font: 800 22px var(--display); }
.li-steps h3 { font: 800 24px/1.1 var(--display); }
.li-steps p { color: var(--ink-2); }
.li-gains { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.li-gains li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; font-size: 17px; font-weight: 500; }
@media (min-width: 744px) { .li-steps { grid-template-columns: repeat(3, 1fr); } .li-gains { grid-template-columns: repeat(2, 1fr); gap: 20px 32px; } }

/* Soft button: "See my month", "See my badges"… instead of underlined text links */
.btn.soft { background: var(--violet-soft); color: var(--violet-deep); border: 0; text-decoration: none; }
.btn.soft:hover { background: var(--violet-deep); color: #fff; }
.xt-more { justify-self: start; }
/* Home previews: flat inside, no hover lift or shadow on the header row; open one stays still */
.xtile > .stile, .xtile > .stile:hover { transform: none; box-shadow: none; }
.xtile { transition: box-shadow .3s var(--ease); }
.xtile:not(.open):hover { box-shadow: var(--sh-2); }
/* Unfolded course card: still on hover, white details panel, clear rows */
.xcard.open:hover { box-shadow: var(--sh-1); }
.xcard.open:hover .pic img { transform: none; }
.xcard .cx-more { background: #fff; gap: 16px; }
.cx-desc { font-size: 15px; color: var(--ink-2); line-height: 1.5; text-wrap: pretty; }
.cx-more h4 { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cx-mods { gap: 2px; }
.cx-mods li { grid-template-columns: 28px 1fr auto; gap: 12px; padding: 8px 0; min-height: 44px; font-size: 15px; line-height: 1.3; border-bottom: 1px solid var(--line); }
.cx-mods li:last-child { border-bottom: 0; }
.cx-mods li > b, .cx-mods li > .ic { width: 28px; height: 28px; background: var(--violet-soft); color: var(--violet-deep); font-size: 13px; font-weight: 700; }
.cx-mods li.done > .ic { background: var(--ok); color: #fff; padding: 6px; }
.cx-mods small { font-size: 13px; }
.ccard .foot .ring-tx { white-space: nowrap; }
/* Path cards: progress ring bottom-left of the photo, clear of the share button; footer text on one line */
.pcard .pc-band .ring.frac { inset-inline-end: auto; inset-inline-start: 12px; }
.pc-foot > .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xcard.open .cx-more { cursor: pointer; }

/* Footer legal links + cookie note page */
.foot-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-legal a { color: #a8a8b4; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.foot-legal a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 743px) { .foot-legal { justify-content: center; gap: 0 16px; } }
.legal-page { max-width: 760px; }
.legal-page .lead { font-size: 19px; color: var(--ink-2); }
.legal-page h2 { font: 800 26px var(--display); }
.legal-page p { max-width: 68ch; text-wrap: pretty; color: var(--ink-2); }
.legal-more { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- Footer (phone first) ---------- */
.ft-in { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 36px; justify-items: center; text-align: center; }
.ft-brand { display: grid; gap: 14px; justify-items: center; }
.ft-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.ft-logo img { height: 22px; width: auto; }
.ft-logo span { font: 800 26px/1 var(--display); color: #fff; padding-inline-start: 12px; border-inline-start: 1px solid rgb(255 255 255 / .2); }
.ft-tag { color: #a8a8b4; font-size: 15px; max-width: 34ch; text-wrap: balance; }
.ft-lang { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 16px; border: 0; background: none; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); color: #ececf2; cursor: pointer; font: 600 16px var(--body); }
.ft-lang:focus-visible { outline: 2px solid #b6a6ff; outline-offset: 2px; }
.ft-lang[aria-expanded=true] .ic:last-child { transform: rotate(180deg); }
.ft-lang:hover { box-shadow: inset 0 0 0 1px #b6a6ff; }
.ft-lang:focus-within { box-shadow: inset 0 0 0 2px #b6a6ff; }
.ft-lang .ic { width: 18px; height: 18px; flex: none; }
.ft-lang select { appearance: none; background: none; border: 0; color: inherit; font: 600 16px var(--body); cursor: pointer; padding: 0; }
.ft-lang select option { color: var(--ink); }
.ft-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; width: 100%; }
.ft-group h2 { font: 700 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: #8e8e9a; margin-bottom: 6px; }
.ft-group ul { list-style: none; margin: 0; padding: 0; display: grid; }
.ft-group a, .ft-group button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; color: #ececf2; text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; overflow-wrap: anywhere; }
.ft-group a:hover, .ft-group button:hover { color: #b6a6ff; }
.ft-bottom { width: 100%; display: grid; gap: 10px; justify-items: center; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .12); font-size: 13px; color: #8e8e9a; }
.ft-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.ft-legal a { color: #a8a8b4; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.ft-legal a:hover { color: #fff; }
@media (min-width: 744px) {
  .ft-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 64px; row-gap: 48px; justify-items: stretch; text-align: start; align-items: start; }
  .ft-brand { justify-items: start; }
  .ft-logo img { height: 26px; }
  .ft-logo span { font-size: 30px; }
  .ft-links { gap: 24px; }
  .ft-group a, .ft-group button { justify-content: flex-start; font-size: 15px; min-height: 36px; }
  .ft-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
  .ft-legal { justify-content: flex-end; gap: 0 24px; }
}

/* Staff landing (internal training): same frame as the sign-in, company sign-in */
.staff-card > img { height: 24px; width: auto; }
.staff-card .error { color: var(--err); font-size: 14px; min-height: 0; }
.staff-card .error:empty { display: none; }
@media (max-width: 743px) { .welcome .stack > p.muted { text-align: center; } }

/* Staff training: an internal tool, not a showcase — app-size headings, tighter hero */
:root[data-mode=staff] .welcome h1, :root[data-mode=staff] .welcome h1.long-name { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.05; }
:root[data-mode=staff] .welcome-in { padding-top: 32px; padding-bottom: 40px; gap: 32px; }
:root[data-mode=staff] .welcome .lead { font-size: 17px; }
:root[data-mode=staff] .auth-card h1 { font-size: clamp(36px, 3.4vw, 48px); }
@media (max-width: 743px) { :root[data-mode=staff] .welcome h1, :root[data-mode=staff] .welcome h1.long-name { font-size: 30px; } :root[data-mode=staff] .welcome-in { padding-top: 24px; gap: 20px; } }

/* Staff training colours: the same system in blues (tokens + the few rules that use literal violet values) */
:root[data-mode=staff] {
  --violet: #1f5fd6; --violet-2: #4b8af0; --violet-deep: #0f3f9e; --violet-soft: #e7f0ff; --violet-tint: #f3f7ff;
  --info: #0f3f9e; --info-bg: #e7f0ff; --focus: #1f5fd6;
  --hl-grad: linear-gradient(100deg, #0a2a6b 0%, #1f5fd6 50%, #3b82f6 100%); /* "bleu nuit → bleu clair", chosen 2026-10-25 */
  --sh-3: 0 4px 10px rgb(14 14 18 / .05), 0 40px 90px -30px rgb(15 50 130 / .32);
}
:root[data-mode=staff] .btn.accent { box-shadow: 0 10px 24px -10px rgb(31 95 214 / .7); }
:root[data-mode=staff] input:focus, :root[data-mode=staff] select:focus, :root[data-mode=staff] textarea:focus,
:root[data-mode=staff] .pick:focus-visible, :root[data-mode=staff] .pick[aria-expanded=true] { box-shadow: 0 0 0 4px rgb(31 95 214 / .14); }
:root[data-mode=staff] .progress > i { background: linear-gradient(90deg, var(--violet), #6aa3ff); }
:root[data-mode=staff] .progress.ok > i { background: var(--ok); }
:root[data-mode=staff] .avatar { background: linear-gradient(140deg, var(--violet), #6aa3ff); }
:root[data-mode=staff] .medal-b.on { background: radial-gradient(circle at 30% 25%, #6aa3ff, var(--violet) 55%, var(--violet-deep)); }
:root[data-mode=staff] .step.next .n, :root[data-mode=staff] .ms.cur .ms-dot { box-shadow: 0 0 0 6px rgb(31 95 214 / .15); }
:root[data-mode=staff] .opt:has(input:checked) { box-shadow: 0 0 0 3px rgb(31 95 214 / .12); }
:root[data-mode=staff] .lesson-row.available .st { box-shadow: 0 8px 18px -8px rgb(31 95 214 / .8); }
:root[data-mode=staff] .recap-card { border-color: rgb(31 95 214 / .16); }
:root[data-mode=staff] .auth::before { background: radial-gradient(40% 50% at 80% 10%, rgb(31 95 214 / .16), transparent 70%), radial-gradient(30% 40% at 10% 90%, rgb(59 130 246 / .1), transparent 70%); }
:root[data-mode=staff] .ft-group a:hover, :root[data-mode=staff] .ft-group button:hover { color: #9cc2ff; }
:root[data-mode=staff] .chart .area { fill: rgb(31 95 214 / .1); }
:root[data-mode=staff] main h2 { font-size: clamp(26px, 2.4vw, 34px); }
:root[data-mode=staff] .cont h2 { font-size: 28px; }
:root[data-mode=staff] .hero::before { background: radial-gradient(40% 50% at 82% 18%, rgb(31 95 214 / .14), transparent 70%), radial-gradient(30% 40% at 96% 60%, rgb(59 130 246 / .1), transparent 70%), radial-gradient(40% 45% at 8% 0%, rgb(106 163 255 / .12), transparent 70%); }
@media (max-width: 743px) { :root[data-mode=staff] .cont h2 { font-size: 24px; } }

/* Staff, corporate and compact: smaller radii and shadows, short hero band, small horizontal cards several per row */
:root[data-mode=staff] { --r-m: 12px; --r-l: 16px; --r-xl: 24px; --sh-3: 0 2px 6px rgb(14 14 18 / .05), 0 16px 40px -20px rgb(15 50 130 / .25); --section-y: 32px; }
.st-hero { background: linear-gradient(180deg, var(--violet-tint), #fff); border-bottom: 1px solid var(--line); }
.st-hero-in { display: grid; gap: 20px; padding-block: 28px; align-items: center; }
.st-hero h1 { font-size: clamp(28px, 3vw, 40px) !important; line-height: 1.05; }
.st-next { display: grid; gap: 8px; }
.st-next .k { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--violet-deep); }
.st-list h2 { font-size: 26px !important; }
.sgrid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.scard { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-m); text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; min-height: 96px; }
.scard:hover { border-color: var(--violet); box-shadow: var(--sh-1); }
.sc-pic { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--violet-soft); color: var(--violet-deep); display: grid; place-items: center; }
.sc-pic img { width: 100%; height: 100%; object-fit: cover; }
.sc-body { display: grid; gap: 4px; min-width: 0; }
.sc-body strong { font: 700 16px/1.25 var(--body); overflow-wrap: anywhere; }
.sc-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-desc { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard .progress { height: 4px; margin-top: 4px; }
.sc-go .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.scard.wide { grid-template-columns: 112px minmax(0, 1fr) auto; padding: 14px; box-shadow: var(--sh-1); }
.scard.wide .sc-pic { width: 112px; height: 84px; }
.scard.wide strong { font-size: 18px; }
@media (max-width: 743px) {
  /* Phone: the whole card is the link, so the action shrinks to an arrow on the right */
  .scard { grid-template-columns: 56px minmax(0, 1fr) auto; min-height: 80px; padding: 10px 12px; gap: 12px; }
  .sc-pic { width: 56px; height: 56px; }
  .sc-go .btn { width: 36px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .sc-go .btn .ic-arrow { display: inline-flex; }
  .sc-go .tag.ok { font-size: 0; gap: 0; padding: 6px; }
  .scard.wide { grid-template-columns: 80px minmax(0, 1fr) auto; }
  .scard.wide .sc-pic { width: 80px; height: 64px; }
}
@media (min-width: 744px) { .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .st-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; } }

/* Preview only: test access below the sign-in form, set apart by a rule */
.test-access{margin-top:8px;padding-top:24px;border-top:1px solid var(--line, #e3e5ea)}
/* Sign-in: ID number and "Send me a code" on one line (stacked on phones) */
.inline-send{display:flex;gap:8px;align-items:stretch}
.inline-send input{flex:1;min-width:0}
.inline-send .btn{flex:none;white-space:nowrap}
@media (max-width:520px){.inline-send{flex-direction:column}.inline-send .btn{width:100%}}
/* Lesson page outline: smaller titles so the lesson heading stays the only big one (Damien, 26 Oct) */
.player aside.outline .row h2{font-size:24px;line-height:1.1}
.player aside.outline section.module h2{font-size:19px;line-height:1.2}

/* White-label deployment (data-mode=org): accent tokens come from the brand (set inline by applyBrandTheme); the derived
   tints and the few literal-colour rules follow the accent through color-mix, so any brand colour works. */
:root[data-mode=org] {
  --violet-soft: color-mix(in srgb, var(--violet) 12%, #fff); --violet-tint: color-mix(in srgb, var(--violet) 5%, #fff);
  --info-bg: color-mix(in srgb, var(--violet) 12%, #fff);
  --sh-3: 0 4px 10px rgb(14 14 18 / .05), 0 40px 90px -30px color-mix(in srgb, var(--violet) 32%, transparent);
}
:root[data-mode=org] .btn.accent { box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--violet) 70%, transparent); }
:root[data-mode=org] input:focus, :root[data-mode=org] select:focus, :root[data-mode=org] textarea:focus,
:root[data-mode=org] .pick:focus-visible, :root[data-mode=org] .pick[aria-expanded=true] { box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 14%, transparent); }
:root[data-mode=org] .progress > i { background: linear-gradient(90deg, var(--violet), var(--violet-2, var(--violet))); }
:root[data-mode=org] .progress.ok > i { background: var(--ok); }
:root[data-mode=org] .avatar { background: linear-gradient(140deg, var(--violet), var(--violet-2, var(--violet))); }
:root[data-mode=org] .medal-b.on { background: radial-gradient(circle at 30% 25%, var(--violet-2, var(--violet)), var(--violet) 55%, var(--violet-deep)); }
:root[data-mode=org] .step.next .n, :root[data-mode=org] .ms.cur .ms-dot { box-shadow: 0 0 0 6px color-mix(in srgb, var(--violet) 15%, transparent); }
:root[data-mode=org] .opt:has(input:checked) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent); }
:root[data-mode=org] .lesson-row.available .st { box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--violet) 80%, transparent); }
:root[data-mode=org] .recap-card { border-color: color-mix(in srgb, var(--violet) 16%, transparent); }
:root[data-mode=org] .auth::before { background: radial-gradient(40% 50% at 80% 10%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 70%), radial-gradient(30% 40% at 10% 90%, color-mix(in srgb, var(--violet-2, var(--violet)) 10%, transparent), transparent 70%); }
:root[data-mode=org] .hero::before { background: radial-gradient(40% 50% at 82% 18%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 70%), radial-gradient(30% 40% at 96% 60%, color-mix(in srgb, var(--violet-2, var(--violet)) 10%, transparent), transparent 70%); }
:root[data-mode=org] .ft-group a:hover, :root[data-mode=org] .ft-group button:hover { color: color-mix(in srgb, var(--violet-2, var(--violet)) 60%, #fff); }
:root[data-mode=org] .chart .area { fill: color-mix(in srgb, var(--violet) 10%, transparent); }
/* Brand logos are wordmarks with a symbol (taller than the QNET wordmark): taller slots, same positions */
:root[data-mode=org] .brand img { height: 38px; width: auto; }
:root[data-mode=org] .ad-head .brand img { height: 34px; }
:root[data-mode=org] .ft-logo img { height: 44px; width: auto; }
:root[data-mode=org] .certificate img { height: 64px; width: auto; }
:root[data-mode=org] .cert3d img { height: 30px; }
:root[data-mode=org] .cert3d.mini img { height: 20px; }
:root[data-mode=org] .pc-band .cover-img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 420px) { :root[data-mode=org] .brand img { height: 30px; } }
/* White-label: QNET orange accents and the pink gradients follow the brand */
:root[data-mode=org] { --qnet: var(--violet-2, var(--violet)); --qnet-ink: var(--violet-deep); --qnet-soft: var(--violet-soft); }
:root[data-mode=org] .next-card .k .live { box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 20%, transparent); }
:root[data-mode=org] .read-bar { background: linear-gradient(90deg, var(--violet), var(--violet-2, var(--violet))); }
:root[data-mode=org] .cta-in { background: radial-gradient(70% 130% at 85% 0%, var(--violet-2, var(--violet)) 0%, transparent 60%), var(--violet-deep); } /* brand navy, never QNET black */
:root[data-mode=org] .celebrate .medal { background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--violet-2, var(--violet)) 40%, #fff), var(--violet)); }
:root[data-mode=org] .ai-fab .orb, :root[data-mode=org] .ai-head .orb { background: conic-gradient(from 200deg, var(--violet), var(--violet-2, var(--violet)), #1a9fd9, var(--violet)); }
