/* Cap Civique — direction « Plaque & Tampon »
   Plaques de rue émaillées, tampons encreurs, tickets de métro, illustrations façon risographie. */

/* ============ Tokens ============ */
:root {
  --bg: #eceee8;          /* papier */
  --surface: #f8f9f5;     /* feuille */
  --surface-2: #e1e4dc;   /* papier creusé */
  --ink: #0f1b33;
  --muted: #47506a;
  --line: #c9cec3;
  --dash: #9aa192;
  --edge: #0f1b33;        /* contours imprimés */
  --hard: #0f1b33;        /* ombres décalées */
  --brand: #1b3a73;       /* bleu émail */
  --brand-ink: #1b3a73;
  --brand-soft: #e4eaf5;
  --plaque-green: #2e6a4e;
  --accent: #d33a2c;      /* rouge tampon */
  --accent-ink: #b42e22;
  --ok: #2e6a4e;
  --ok-soft: #e3eee7;
  --warn: #8a5f00;
  --warn-soft: #f4ead2;
  --bad: #b42e22;
  --bad-soft: #f7e3e0;
  --radius: 16px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --topbar-h: 76px;
  --lc-csp: #1b3a73; --lc-cr: #2e6a4e; --lc-nat: #b42e22;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1628; --surface: #15213a; --surface-2: #1c2a47; --ink: #eceee8; --muted: #a9b4c9; --line: #2c3b5c; --dash: #3d4e74;
    --edge: #5e6f94; --hard: #04070e; --brand: #2d4f94; --brand-ink: #a9bbdd; --brand-soft: #1f2e52;
    --accent-ink: #ff8a7a; --ok: #6fc29a; --ok-soft: #12321f; --warn: #e7b85b; --warn-soft: #3a2f12; --bad: #ff8a7a; --bad-soft: #3d1c1f;
    --lc-csp: #8fa9e0; --lc-cr: #6fc29a; --lc-nat: #ff8a7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1628; --surface: #15213a; --surface-2: #1c2a47; --ink: #eceee8; --muted: #a9b4c9; --line: #2c3b5c; --dash: #3d4e74;
  --edge: #5e6f94; --hard: #04070e; --brand: #2d4f94; --brand-ink: #a9bbdd; --brand-soft: #1f2e52;
  --accent-ink: #ff8a7a; --ok: #6fc29a; --ok-soft: #12321f; --warn: #e7b85b; --warn-soft: #3a2f12; --bad: #ff8a7a; --bad-soft: #3d1c1f;
  --lc-csp: #8fa9e0; --lc-cr: #6fc29a; --lc-nat: #ff8a7a;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
a { color: var(--brand-ink); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2, .display { font-stretch: 62%; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: .9; }
h1 { font-size: clamp(44px, 6.4vw, 96px); }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: 18px; font-weight: 700; }
h1 em, h2 em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: 100%; text-transform: none; letter-spacing: -.02em; }
h1 em, h2 em { font-size: 1.04em; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: .9em; }
kbd { font: 600 12px var(--mono); border: 1.5px solid var(--edge); border-bottom-width: 3px; border-radius: 5px; padding: 0 6px; background: var(--surface); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main { outline: none; min-height: 70vh; }
.wrap { width: min(1320px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(860px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.mt { margin-top: 28px; }
.section { margin-top: clamp(64px, 9vw, 120px); }
.section-head { margin-bottom: 18px; }
.section-head p { color: var(--muted); margin: 0; }
.section-title { margin: 40px 0 16px; }

/* English helper text */
.en { display: none; color: var(--muted); font-size: .88em; font-style: italic; font-weight: 400; font-stretch: 100%; text-transform: none; letter-spacing: 0; }
body.show-en .en { display: inline; }
body.show-en .en::before { content: "EN"; display: inline-block; font: 600 10px/1 var(--mono); font-style: normal; letter-spacing: .06em; padding: 3px 5px; margin-right: 6px; border-radius: 3px; background: var(--brand); color: #fff; vertical-align: 2px; }
body.show-en .en.block { display: block; margin-top: 4px; }
body.show-en h3 + .en, body.show-en h1 + .en { display: block; margin: -2px 0 8px; }

/* ============ Plaque (street sign) ============ */
.plaque { display: inline-flex; align-self: flex-start; background: #2e6a4e; padding: 3px; border-radius: 9px; box-shadow: 0 1px 0 #1f4a36, 0 8px 16px -8px rgba(15, 27, 51, .45); text-decoration: none; vertical-align: middle; }
.plaque .pl-in { display: flex; align-items: center; gap: 12px; background: #1b3a73; border: 2px solid #f8f9f5; border-radius: 6px; padding: 6px 16px 6px 10px; color: #f8f9f5; }
.plaque .pl-n { font: 500 10px/1.15 var(--mono); text-align: center; border-right: 1.5px solid rgba(248, 249, 245, .5); padding-right: 10px; }
.plaque .pl-n sup { font-size: 7px; }
.plaque .pl-t { font-stretch: 62%; font-weight: 800; font-size: 21px; line-height: 1; letter-spacing: .05em; text-transform: uppercase; }
.plaque.no-n .pl-in { padding-left: 16px; }

/* ============ Top bar ============ */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1.5px solid var(--line); }
.topbar-inner { width: min(1320px, 100% - 24px); margin: auto; display: flex; align-items: center; gap: 16px; min-height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; border-radius: 6px; }
.brand-logo { display: block; width: 190px; height: auto; }
.brand-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo-dark { display: block; }
}
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
.mainnav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.mainnav a { padding: 10px 11px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; }
.mainnav a:hover { background: var(--surface-2); }
.mainnav a.active { color: var(--bg); background: var(--ink); }
.topbar-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 8px; border: 1.5px solid var(--edge); background: var(--surface); color: var(--ink); font: 600 13px var(--mono); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; }

@media (max-width: 1180px) {
  .menu-btn { display: inline-grid; }
  .mainnav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; margin: 0; padding: 10px 16px 16px; background: var(--bg); border-bottom: 2px solid var(--edge); display: none; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 13px 12px; font-size: 17px; }
}
.topbar-tools { min-width: 0; }
@media (max-width: 600px) {
  :root { --topbar-h: 62px; }
  .topbar-inner { width: calc(100% - 16px); gap: 6px; }
  .topbar-tools { gap: 6px; flex: 1 1 auto; justify-content: flex-end; }
  .brand-logo { width: 124px; }
  .icon-btn { min-width: 40px; height: 40px; padding: 0 6px; }
}

/* ============ Buttons, chips, tags ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 10px; border: 2px solid var(--edge); background: var(--surface); color: var(--ink); font: 700 15px var(--font); text-decoration: none; cursor: pointer; transition: transform .1s, box-shadow .1s, background .15s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--hard); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 4px 4px 0 var(--hard); }
.btn-primary:hover { box-shadow: 6px 6px 0 var(--hard); }
.btn-red { background: var(--accent); color: #fff; box-shadow: 4px 4px 0 var(--hard); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); transform: none; box-shadow: none; }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px 2px 2px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); white-space: nowrap; line-height: 1.4; }
.chip b, .chip-n { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 4px; background: var(--c, var(--ink)); color: var(--cf, #fff); font: 600 11px var(--mono); }
.chip-n { min-width: 30px; height: 28px; font-size: 12px; }
.tag { display: inline-block; font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.tag.sit { background: var(--accent); color: #fff; }
.tag.off { background: var(--brand-soft); color: var(--brand-ink); }
.tag.new { background: var(--ok-soft); color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--edge); color: var(--ink); font: 500 13px var(--mono); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.kicker { display: inline-block; font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.card { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: clamp(18px, 2.6vw, 28px); }
.notice { padding: 14px 18px; border-radius: 12px; background: var(--brand-soft); border: 1.5px dashed var(--brand-ink); margin: 16px 0; }
.notice.bad { background: var(--bad-soft); border-color: var(--bad); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok); }

.bar { flex: 1; height: 10px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 60px; box-shadow: inset 0 0 0 1.5px var(--line); }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .4s; }
.bar.tall { height: 14px; }

/* ============ Shared riso art ============ */
.svg-defs { position: absolute; width: 0; height: 0; }
.poster { margin: 0; background: #f8f9f5; border: 2px solid #0f1b33; border-radius: 4px; padding: 14px; transform: rotate(1.4deg); box-shadow: 14px 16px 0 -2px #1b3a73; }
.poster svg { display: block; width: 100%; height: auto; }
.poster figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; font: 500 11px var(--mono); color: #47506a; letter-spacing: .06em; }

/* ============ Home ============ */
.hero { padding: clamp(36px, 6vw, 88px) 0 clamp(56px, 7vw, 104px); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 5vw, 72px); }
.hero-text { flex: 1 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font: 500 13px var(--mono); color: var(--muted); }
.hero h1 { margin: 0; font-size: clamp(56px, 8.6vw, 136px); line-height: .86; }
.hero h1 .r { color: var(--accent-ink); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); max-width: 36em; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-facts { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 4px 0 0; border-top: 1.5px solid var(--edge); max-width: 640px; }
.hero-facts li { flex: 1 1 120px; display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 0; border-left: 1.5px dashed var(--dash); }
.hero-facts li:first-child { border-left: 0; padding-left: 0; }
.hero-facts b { font-stretch: 62%; font-weight: 900; font-size: 44px; line-height: 1; }
.hero-facts span { font: 500 12px var(--mono); color: var(--muted); }
.hero-art { flex: 1 1 420px; min-width: 0; position: relative; padding: 0 0 40px 24px; }
.ticket-float { position: absolute; left: 0; bottom: 0; width: min(300px, 80%); display: flex; flex-direction: column; background: #f8f9f5; color: #0f1b33; text-decoration: none; border: 1.5px solid #0f1b33; border-radius: 6px; transform: rotate(-4deg); box-shadow: 0 18px 30px -16px rgba(15, 27, 51, .55); overflow: hidden; transition: transform .2s; }
.ticket-float:hover { transform: rotate(-2deg) translateY(-4px); }
.ticket-float .tf-body { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.ticket-float .tf-play { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #d33a2c; color: #fff; display: grid; place-items: center; }
.ticket-float small { display: block; font: 500 11px var(--mono); letter-spacing: .08em; color: #47506a; }
.ticket-float strong { display: block; font-stretch: 62%; font-weight: 800; font-size: 21px; line-height: 1.02; text-transform: uppercase; }
.ticket-float .tf-stripe { height: 12px; background: #0f1b33; }

.band { background: #1b3a73; color: #f8f9f5; overflow: hidden; border-block: 2px solid #0f1b33; }
.band-track { display: flex; width: max-content; animation: defile 60s linear infinite; }
.band-track span { display: inline-flex; align-items: center; gap: 22px; padding: 15px 22px 15px 0; font-stretch: 62%; font-weight: 800; font-size: 24px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
@keyframes defile { to { transform: translateX(-50%); } }

.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: 44px; }
.sec-head .sh-l { display: flex; flex-direction: column; gap: 22px; max-width: 900px; }
.sec-head h2 { margin: 0; font-size: clamp(42px, 5.8vw, 88px); }
.sec-head > p { margin: 0; max-width: 400px; font-size: 17px; color: var(--muted); }

.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.level-card { --lc: var(--lc-csp); text-align: left; font: inherit; color: inherit; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 26px; cursor: pointer; display: flex; flex-direction: column; gap: 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.level-card.lv-cr { --lc: var(--lc-cr); }
.level-card.lv-nat { --lc: var(--lc-nat); }
.level-card:hover { border-color: var(--edge); }
.level-card.selected { border-color: var(--lc); box-shadow: 8px 8px 0 var(--lc); transform: translate(-3px, -3px); }
.lc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.lc-top svg { width: 128px; height: 128px; color: var(--lc); flex: none; }
.lc-badge { font: 600 12px var(--mono); padding: 7px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.selected .lc-badge { background: var(--lc); color: var(--bg); }
.level-tag { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); }
.level-card h3 { margin: 4px 0 0; font-stretch: 62%; font-weight: 900; font-size: 38px; line-height: .95; text-transform: uppercase; }
.lc-rows { list-style: none; padding: 0; margin: 0; border-top: 1.5px dashed var(--dash); font-size: 15px; }
.lc-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed var(--dash); }
.lc-rows li span { color: var(--muted); }
.lc-rows small { display: block; color: var(--muted); font-size: 12px; }
.parcours { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; background: #0f1b33; color: #f8f9f5; border: 2px solid var(--edge); border-radius: 14px; padding: 18px 18px 18px 26px; }
.parcours .pc-l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.parcours small { font: 500 12px var(--mono); letter-spacing: .1em; color: #a9bbdd; }
.parcours strong { font-stretch: 62%; font-weight: 800; font-size: 28px; text-transform: uppercase; letter-spacing: .02em; }
.parcours span { color: #c9d3e6; font-size: 15px; }
.parcours .btn { background: #f8f9f5; color: #0f1b33; border-color: #f8f9f5; }

.exam-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.stat-grid { flex: 1 1 380px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--edge); border: 2px solid var(--edge); border-radius: var(--radius); overflow: hidden; align-self: flex-start; }
.stat-grid > div { background: var(--surface); padding: 24px 22px; display: flex; flex-direction: column; gap: 6px; }
.stat-grid b { font-stretch: 62%; font-weight: 900; font-size: clamp(60px, 6vw, 92px); line-height: .9; }
.stat-grid b small { font-size: .45em; margin-left: 3px; }
.stat-grid span { font-size: 15px; color: var(--muted); }
.stat-grid .hot { background: #d33a2c; color: #fff; }
.stat-grid .hot span { color: #fff; }
.exam-sheet { flex: 1.3 1 520px; min-width: 0; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); padding: clamp(18px, 3vw, 34px); display: flex; flex-direction: column; gap: 22px; }
.exam-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; border-bottom: 1.5px solid var(--edge); padding-bottom: 14px; }
.exam-sheet-head strong { font-stretch: 62%; font-weight: 800; font-size: 26px; text-transform: uppercase; }
.exam-sheet-head span { font: 500 12px var(--mono); color: var(--muted); }
.cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.cell { display: block; position: relative; aspect-ratio: 1; border-radius: 5px; background: var(--c); }
.r, em.r { color: var(--accent-ink); }
.cell.sit::after { content: ""; position: absolute; top: 18%; right: 18%; width: 30%; height: 30%; border-radius: 50%; background: #d33a2c; box-shadow: 0 0 0 2px #f8f9f5; }
.legend { display: flex; flex-direction: column; }
.leg-row { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1.5px dashed var(--line); color: var(--ink); text-decoration: none; border-radius: 4px; }
.leg-row:hover { background: var(--surface-2); }
.leg-row .chip-n { width: 36px; height: 36px; border-radius: 6px; font-size: 13px; }
.leg-label { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-weight: 600; font-size: 15px; }
.leg-label small { font: 500 12px var(--mono); color: var(--muted); }
.leg-count { flex: none; min-width: 40px; text-align: right; font-stretch: 62%; font-weight: 900; font-size: 28px; }
.sit-note { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin: 0; }
.sit-note i { width: 14px; height: 14px; border-radius: 50%; background: #d33a2c; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--line); }

.bento { display: flex; flex-wrap: wrap; gap: 24px; }
.bento > a { min-width: 0; text-decoration: none; border-radius: 18px; padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 22px; transition: transform .2s; }
.bento > a:hover { transform: translateY(-4px); }
.bento .k { font: 500 12px var(--mono); letter-spacing: .12em; }
.bento .bt { font-stretch: 62%; font-weight: 900; font-size: clamp(34px, 3.4vw, 48px); line-height: .95; text-transform: uppercase; }
.bento p { margin: 0; font-size: 16px; line-height: 1.55; max-width: 38em; }
.b-cours { flex: 2 1 560px; background: #0f1b33; color: #f8f9f5; border: 2px solid #0f1b33; }
.b-cours .k { color: #a9bbdd; } .b-cours p { color: #c9d3e6; }
.b-cours .screen { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1.5px solid #2b3a5e; }
.b-cours .screen svg { display: block; width: 100%; height: auto; }
.b-cours .sub { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(86%, 520px); text-align: center; background: rgba(15, 27, 51, .9); color: #f8f9f5; font-size: 15px; padding: 7px 12px; border-radius: 6px; }
.b-fc { flex: 1 1 340px; background: #1b3a73; color: #f8f9f5; border: 2px solid #0f1b33; overflow: hidden; }
.b-fc .k { color: #c9d3e6; } .b-fc p { color: #d3ddee; }
.b-fc .stack { position: relative; display: block; height: 260px; }
.b-fc .stack span { position: absolute; left: 12%; right: 12%; border-radius: 12px; }
.b-fc .s1 { top: 26px; bottom: 6px; background: #a9bbdd; transform: rotate(-7deg); }
.b-fc .s2 { top: 18px; bottom: 12px; background: #d3ddee; transform: rotate(5deg); }
.b-fc .s3 { left: 10% !important; right: 10% !important; top: 6px; bottom: 20px; background: #f8f9f5; color: #0f1b33; border: 2px solid #0f1b33; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; transform: rotate(-1.5deg); }
.b-fc .s3 small { display: flex; justify-content: space-between; font: 500 11px var(--mono); color: #47506a; }
.b-fc .s3 strong { font-stretch: 62%; font-weight: 900; font-size: 72px; line-height: .9; text-align: center; text-transform: uppercase; }
.b-quiz { flex: 1 1 340px; background: var(--surface); color: var(--ink); border: 2px solid var(--edge); }
.b-quiz .k { color: var(--muted); } .b-quiz p { color: var(--muted); }
.mini-q { display: flex; flex-direction: column; gap: 10px; }
.mini-q strong { font-size: 17px; line-height: 1.35; }
.mini-q span { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--muted); }
.mini-q span i { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--dash); display: grid; place-items: center; font: 500 12px var(--mono); font-style: normal; }
.mini-q span.ok { border: 2px solid var(--ok); background: var(--ok-soft); color: var(--ink); font-weight: 600; }
.mini-q span.ok i { background: var(--ok); border-color: var(--ok); color: #fff; }
.b-exam { flex: 2 1 560px; background: #d33a2c; color: #fff; border: 2px solid #0f1b33; flex-direction: row !important; flex-wrap: wrap; gap: 28px !important; }
.b-exam .be-l { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.b-exam .clock { font-stretch: 62%; font-weight: 900; font-size: clamp(88px, 10vw, 150px); line-height: .82; }
.b-exam .dots { flex: 1 1 240px; min-width: 0; align-self: center; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding: 18px; background: rgba(15, 27, 51, .18); border-radius: 12px; }
.b-exam .dots i { aspect-ratio: 1; border-radius: 50%; border: 2px solid #f8f9f5; }
.b-exam .dots i.on { background: #f8f9f5; }
.mt-auto { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

.plan { list-style: none; counter-reset: s; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); border: 2px solid var(--edge); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.plan li { counter-increment: s; padding: 20px 22px; border-right: 1.5px dashed var(--dash); border-bottom: 1.5px dashed var(--dash); display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
.plan li::before { content: "0" counter(s); font-stretch: 62%; font-weight: 900; font-size: 40px; line-height: 1; color: var(--accent-ink); }
.plan li b { color: var(--ink); font-size: 17px; }

.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.ticket { position: relative; display: flex; flex-direction: column; min-height: 176px; background: var(--surface); color: var(--ink); text-decoration: none; border: 1.5px solid var(--edge); border-radius: 6px; transition: transform .15s, box-shadow .15s; }
.ticket:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--brand); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -14px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--edge); }
.ticket::before { left: -9px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -9px; clip-path: inset(0 50% 0 0); }
.tk-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 0; font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.tk-title { flex: 1 1 auto; padding: 10px 16px 14px; font-stretch: 62%; font-weight: 800; font-size: 25px; line-height: 1; text-transform: uppercase; }
.tk-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1.5px dashed var(--dash); font-size: 13px; color: var(--muted); }
.tk-stripe { height: 9px; background: var(--edge); border-radius: 0 0 4px 4px; }
.ticket.done .tk-stripe { background: var(--ok); }
.tk-vu { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--ok); border: 2px solid var(--ok); border-radius: 4px; padding: 2px 6px; transform: rotate(-6deg); }

.carnet-sec { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 72px); background: var(--surface-2); border: 2px solid var(--edge); border-radius: 22px; padding: clamp(22px, 4vw, 56px); }
.carnet-sec .cs-l { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.carnet-sec h2 { margin: 0; font-size: clamp(40px, 4.6vw, 72px); }
.carnet-sec .cs-r { flex: 1.2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.checks li { display: flex; align-items: center; gap: 12px; }
.checks li::before { content: ""; flex: none; width: 18px; height: 10px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg) translateY(-3px); }
.stamps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.stamp-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 10px; background: var(--surface); text-align: center; text-decoration: none; color: var(--ink); }
.stamp-tile svg { width: 100px; height: 100px; }
.stamp-tile b { font-size: 14px; line-height: 1.25; }
.stamp-tile small { font: 500 11px var(--mono); color: var(--muted); }
.readiness-line { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: var(--surface); border: 2px solid var(--edge); border-radius: 14px; padding: 16px 18px; }
.readiness-line .gauge { width: 96px; height: 96px; }
.readiness-line .gauge .g-val b { font-size: 22px; }
.readiness-line > div:last-child { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }

.faq { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.faq .fq-l { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.faq .fq-l h2 { margin: 0; font-size: clamp(40px, 4.4vw, 64px); }
.faq .fq-r { flex: 2 1 560px; min-width: 0; border-top: 2px solid var(--edge); }
.faq details { border-bottom: 1.5px solid var(--dash); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 16px 0; font-size: 20px; font-weight: 700; list-style-position: outside; }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 44em; line-height: 1.65; }

.readiness { display: flex; align-items: center; gap: 24px; }
.readiness h3 { margin-bottom: 4px; }
@media (max-width: 600px) { .readiness { flex-direction: column; text-align: center; } }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: baseline; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 600 14px var(--mono); }

.gauge { position: relative; width: 128px; height: 128px; flex: none; }
.gauge svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.g-bg { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.g-fg { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s; }
.g-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.g-val b { font-stretch: 62%; font-weight: 900; font-size: 34px; line-height: 1; }
.g-val span { font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ============ Page heads, guide ============ */
.page-head { padding: clamp(32px, 5vw, 60px) 0 clamp(20px, 3vw, 32px); }
.page-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: 0; }
.page-head .muted { margin: 0; font: 500 13px var(--mono); }
.guide { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; padding-bottom: 30px; }
.toc { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 2px; padding: 18px; }
.toc b { font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.toc a { text-decoration: none; color: var(--ink); padding: 7px 8px; border-radius: 6px; font-size: 15px; font-weight: 600; }
.toc a:hover { background: var(--surface-2); }
.prose { max-width: 800px; min-width: 0; }
.guide > * { min-width: 0; }
.prose h2 { margin: 48px 0 16px; scroll-margin-top: calc(var(--topbar-h) + 20px); font-size: clamp(32px, 3.6vw, 46px); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 16.5px; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 14px; height: 8px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 18px 0; border: 2px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--surface); }
.facts-grid div { padding: 18px; border-right: 1.5px dashed var(--dash); }
.facts-grid div:last-child { border-right: 0; }
.facts-grid b { display: block; font-stretch: 62%; font-weight: 900; font-size: 40px; line-height: 1; margin-bottom: 6px; }
.facts-grid span { font-size: 14px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 2px solid var(--edge); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1.5px dashed var(--line); vertical-align: top; }
th { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); border-bottom: 1.5px solid var(--edge); }
td.num { text-align: center; font-stretch: 62%; font-weight: 900; font-size: 26px; }
tr.total td { font-weight: 800; background: var(--surface-2); }
.sources li { margin-bottom: 6px; }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .toc b { width: 100%; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid div:nth-child(2) { border-right: 0; }
  .facts-grid div:nth-child(-n+2) { border-bottom: 1.5px dashed var(--dash); }
}

/* ============ Lessons ============ */
.group-title { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font-size: clamp(28px, 3vw, 40px); }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.lesson-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--edge); border-radius: 6px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.lesson-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--brand); }
.lesson-card .thumb { border-bottom: 1.5px solid var(--edge); }
.lc-body { flex: 1; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.lc-body h3 { margin: 0; font-stretch: 62%; font-weight: 800; font-size: 25px; line-height: 1; text-transform: uppercase; }
.lc-body .lc-k { font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.lc-body p { margin: 0; }
.lesson-card::after { content: ""; height: 9px; background: var(--edge); }
.thumb { position: relative; aspect-ratio: 16 / 9; }
.thumb svg { display: block; width: 100%; height: 100%; }
.thumb-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: #d33a2c; color: #fff; display: grid; place-items: center; box-shadow: 3px 3px 0 #0f1b33; transition: transform .15s; z-index: 2; }
.lesson-card:hover .thumb-play { transform: scale(1.1); }
.thumb-dur, .thumb-done { position: absolute; bottom: 8px; font: 600 11px var(--mono); letter-spacing: .06em; padding: 4px 8px; border-radius: 4px; z-index: 2; }
.thumb-dur { right: 8px; background: #0f1b33; color: #fff; }
.thumb-done { left: 8px; background: #2e6a4e; color: #fff; }

.lesson-page { padding: 28px 0 48px; max-width: 1080px; }
.crumbs { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--muted); }
.lesson-head h1 { font-size: clamp(36px, 4.6vw, 64px); margin-bottom: 22px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.transcript summary { cursor: pointer; font-stretch: 62%; font-weight: 800; font-size: 24px; text-transform: uppercase; }
.transcript p { display: flex; gap: 14px; margin: 16px 0 0; }
.tnum { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--edge); display: grid; place-items: center; font: 600 12px var(--mono); }
.voice-tip { font-size: 14px; }
/* Narrated video episode (iframe of video/yt-*.html?embed; height set by the player via postMessage) */
.episode-frame iframe { display: block; width: 100%; height: min(78vw, 980px); border: 0; background: transparent; }
.episode-meta { font: 500 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; margin: 4px 0 0; }
.transcript .t-ch { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; font-stretch: 62%; font-weight: 800; font-size: 20px; text-transform: uppercase; }
.transcript .t-ch + p, .transcript .t-ch ~ p { display: block; margin: 8px 0 0 40px; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Player */
.player { background: #0f1b33; border: 2px solid #0f1b33; border-radius: 18px; overflow: hidden; box-shadow: 10px 10px 0 var(--brand); outline: none; }
.player:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; box-shadow: none; }
.player:fullscreen .stage-wrap { max-height: 80vh; aspect-ratio: auto; flex: 1; }
.stage-wrap { position: relative; }
.stage { aspect-ratio: 16 / 9; background: #e9ebe4; position: relative; overflow: hidden; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .45; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .06 0 0 0 0 .1 0 0 0 0 .2 0 0 0 -1.4 .9'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage svg { display: block; width: 100%; height: 100%; font-family: var(--font); }
.player .stage { cursor: pointer; }
.subtitle { min-height: 76px; padding: 14px 22px; color: #f8f9f5; font-size: clamp(15px, 2vw, 19px); font-weight: 500; text-align: center; background: #0f1b33; display: grid; place-items: center; line-height: 1.45; }
.big-play { position: absolute; left: 0; right: 0; bottom: calc(76px + 9%); margin: auto; width: max-content; height: max-content; display: flex; align-items: center; gap: 12px; padding: 16px 26px 16px 20px; border-radius: 999px; border: 2px solid #0f1b33; background: #d33a2c; color: #fff; font: 700 18px var(--font); cursor: pointer; box-shadow: 5px 5px 0 #0f1b33; animation: breathe 2s ease-in-out infinite; z-index: 3; }
.big-play svg { width: 26px; height: 26px; }
.end-screen { position: absolute; inset: 0; background: rgba(15, 27, 51, .84); display: grid; place-items: center; padding: 16px; z-index: 4; }
.end-screen[hidden], .big-play[hidden] { display: none; }
.end-card { background: var(--surface); color: var(--ink); border: 2px solid var(--edge); border-radius: 16px; padding: 26px; text-align: center; max-width: 520px; }
.end-card h3 { font-stretch: 62%; font-weight: 900; font-size: 32px; text-transform: uppercase; margin-bottom: 4px; }
.end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.end-check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--ok); outline: 1.5px solid var(--ok); outline-offset: -8px; color: var(--ok); display: grid; place-items: center; font-size: 26px; font-weight: 800; transform: rotate(-8deg); }
.segments { display: flex; gap: 4px; padding: 0 14px; background: #0f1b33; }
.seg { flex: 1; height: 16px; padding: 6px 0; border: 0; background: transparent; cursor: pointer; background-image: linear-gradient(#2b3a5e, #2b3a5e); background-size: 100% 4px; background-repeat: no-repeat; background-position: center; border-radius: 4px; }
.seg i { display: block; height: 4px; width: 0; background: #d33a2c; border-radius: 4px; }
.seg.done i { width: 100%; background: #f8f9f5; }
.seg:hover { background-image: linear-gradient(#47506a, #47506a); }
.controls { display: flex; align-items: center; gap: 4px; padding: 8px 10px 12px; background: #0f1b33; color: #fff; }
.ctl { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #fff; cursor: pointer; opacity: .85; }
.ctl:hover { background: rgba(255, 255, 255, .1); opacity: 1; }
.ctl.on { color: #f8f9f5; box-shadow: inset 0 0 0 1.5px #f8f9f5; opacity: 1; }
.ctl-main { background: #d33a2c; width: 52px; height: 52px; opacity: 1; }
.ctl-main:hover { background: #e04a3c; }
.ctl-count { font: 500 13px var(--mono); opacity: .8; margin-left: 8px; font-variant-numeric: tabular-nums; }
.ctl-spacer { flex: 1; }
.ctl-rate { background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 6px; font: 600 13px var(--mono); padding: 8px 6px; cursor: pointer; }
.ctl-rate option { color: #000; }
@media (max-width: 520px) { .ctl { width: 38px; height: 38px; } .ctl-main { width: 46px; height: 46px; } .ctl-count { display: none; } .subtitle { min-height: 92px; padding: 12px 14px; } .big-play { font-size: 15px; padding: 12px 18px; bottom: calc(92px + 6%); } }

/* ============ Stage animations ============ */
.stage .a-pop { animation: pop .65s cubic-bezier(.2, 1.5, .4, 1) var(--d, 0s) both; transform-box: fill-box; transform-origin: center; }
.stage .a-up { animation: up .7s cubic-bezier(.2, .9, .3, 1) var(--d, 0s) both; }
.stage .a-fade { animation: fade .8s ease var(--d, 0s) both; }
.stage .a-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s ease var(--d, 0s) forwards; }
.stage .a-wave { animation: wave 3.2s ease-in-out infinite; }
.stage .a-float { animation: fade .6s ease var(--d, 0s) both, float 3.4s ease-in-out var(--d, 0s) infinite; }
.stage .a-drop { animation: drop 3s ease-in-out var(--d, 0s) infinite both; }
.stage .a-pulse { animation: pulse 1.6s ease-in-out var(--d, 0s) infinite; transform-box: fill-box; transform-origin: center; }
.stage .a-spin { animation: spin 6s linear infinite; transform-box: view-box; transform-origin: 0 0; }
.stage .a-spin-slow { animation: spin 30s linear infinite; transform-box: fill-box; transform-origin: center; }
.stage .a-sway { animation: sway 4s ease-in-out infinite; transform-box: view-box; transform-origin: 0 -107px; }
.stage .a-burst { animation: burst 2.6s ease-out var(--d, 0s) infinite both; transform-box: fill-box; transform-origin: center; }
.stage .a-slide { animation: slide 1.1s cubic-bezier(.2, .9, .3, 1) var(--d, 0s) both; }
.stage.paused *, .stage.paused { animation-play-state: paused !important; }

@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wave { 0%, 100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-2.5deg) scaleX(.985); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-70px); } 20% { opacity: 1; transform: translateY(0); } 55% { opacity: 1; transform: translateY(0); } 85%, 100% { opacity: 0; transform: translateY(60px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes burst { 0% { opacity: 0; transform: scale(.2); } 15% { opacity: 1; } 70% { opacity: .9; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes slide { from { opacity: 0; transform: translateX(-260px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes thump { 0% { opacity: 0; transform: scale(1.6) rotate(-14deg); } 60% { opacity: 1; transform: scale(.94) rotate(-7deg); } 100% { opacity: 1; transform: scale(1) rotate(-7deg); } }

/* Static thumbnails & reduced motion */
.thumb *, .thumb .a-draw path { animation: none !important; }
.thumb .a-draw path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .stage *, .big-play, .band-track, .stamp-word, .timer.low { animation-duration: .01s !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .band-track { animation: none !important; }
}

/* ============ Setup panels ============ */
.setup { display: grid; gap: 22px; }
.field label { display: block; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.field label small { text-transform: none; letter-spacing: 0; }
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-select button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 14.5px var(--font); padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--edge); background: var(--surface); color: var(--ink); cursor: pointer; }
.chips-select button[style*="--c"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--edge); }
.chips-select button:hover { background: var(--surface-2); }
.chips-select button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.setup-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.deck-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--edge); border-radius: 14px; overflow: hidden; }
.deck-stats div { padding: 16px; text-align: center; border-right: 1.5px dashed var(--dash); background: var(--surface); }
.deck-stats div:last-child { border-right: 0; }
.deck-stats b { display: block; font-stretch: 62%; font-weight: 900; font-size: 44px; line-height: 1; }
.deck-stats span { font: 500 12px var(--mono); color: var(--muted); }
.deck-stats .due b { color: var(--warn); }
.deck-stats .ok b { color: var(--ok); }
.deck-stats .bad b { color: var(--bad); }
.result-card .deck-stats { grid-template-columns: repeat(3, 1fr); margin: 18px 0; }
@media (max-width: 560px) {
  .deck-stats { grid-template-columns: 1fr 1fr; }
  .deck-stats div:nth-child(2) { border-right: 0; }
  .deck-stats div:nth-child(-n+2) { border-bottom: 1.5px dashed var(--dash); }
  .result-card .deck-stats { grid-template-columns: repeat(3, 1fr); }
  .result-card .deck-stats div { border-bottom: 0; }
}

/* ============ Flashcards ============ */
.fc-wrap { max-width: 780px; padding: 28px 0 48px; }
.fc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font: 600 14px var(--mono); font-variant-numeric: tabular-nums; }
.flashcard { perspective: 1600px; cursor: pointer; outline: none; }
.fc-inner { display: grid; transition: transform .6s cubic-bezier(.3, .7, .2, 1); transform-style: preserve-3d; }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: relative; grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; padding: clamp(20px, 3vw, 32px); min-height: 360px; display: flex; flex-direction: column; overflow: hidden; }
.fc-front { background: var(--surface); border: 2px solid var(--edge); box-shadow: 10px 12px 0 var(--brand); }
.fc-front::before { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; background-image: radial-gradient(circle, rgba(211, 58, 44, .38) 1.7px, transparent 2px); background-size: 9px 9px; pointer-events: none; }
.fc-back { background: #1b3a73; color: #f8f9f5; border: 2px solid #0f1b33; box-shadow: -10px 12px 0 var(--hard); transform: rotateY(180deg); }
.fc-back::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(248, 249, 245, .14) 1.5px, transparent 1.8px); background-size: 8px 8px; pointer-events: none; }
.fc-back .chip { background: #f8f9f5; color: #0f1b33; border-color: #f8f9f5; }
.fc-back .tag { background: rgba(248, 249, 245, .14); color: #f8f9f5; }
.fc-back .en { color: #c9d3e6; }
.fc-meta { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fc-text { position: relative; flex: 1; display: grid; place-content: center; text-align: center; font-size: clamp(21px, 3vw, 28px); font-weight: 700; line-height: 1.3; padding: 22px 6px; }
.fc-text.short { font-stretch: 62%; font-weight: 900; font-size: clamp(72px, 13vw, 170px); line-height: .9; text-transform: uppercase; }
.fc-text.mid { font-stretch: 62%; font-weight: 900; font-size: clamp(44px, 6.4vw, 80px); line-height: .92; text-transform: uppercase; }
.fc-text.short .en, .fc-text.mid .en { font-size: 16px; line-height: 1.4; font-weight: 400; }
.fc-text.answer { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; color: #f8f9f5; }
.fc-text.answer .en { font-family: var(--font); font-size: 15px; }
.fc-hint { position: relative; text-align: center; font: 500 12px var(--mono); color: var(--muted); }
.fc-note { position: relative; color: #c9d3e6; font-size: 15px; margin: 0; border-top: 1.5px dashed rgba(248, 249, 245, .35); padding-top: 12px; }
.flashcard:focus-visible .fc-face { outline: 3px solid var(--accent); outline-offset: 4px; }
.fc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 12px; }
.fc-actions[hidden] { display: none; }
.grade { min-height: 60px; }
.grade.g0 { color: var(--bad); box-shadow: 4px 4px 0 var(--bad); }
.grade.g1 { box-shadow: 4px 4px 0 var(--hard); }
.grade.g2 { background: #2e6a4e; border-color: #0f1b33; color: #fff; box-shadow: 4px 4px 0 var(--hard); }
.grade kbd { background: transparent; color: inherit; border-color: currentColor; }

/* ============ Quiz ============ */
.quiz { max-width: 900px; padding: 26px 0 56px; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.score-pill { font: 600 13px var(--mono); background: var(--surface); border: 1.5px solid var(--edge); padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.q-card { background: var(--surface); border: 2px solid var(--edge); border-radius: 18px; padding: clamp(20px, 3.2vw, 34px); margin-bottom: 18px; }
.q-card.is-situation { box-shadow: inset 0 7px 0 #d33a2c; padding-top: calc(clamp(20px, 3.2vw, 34px) + 7px); }
.q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.q-num { font-stretch: 62%; font-weight: 900; font-size: 26px; text-transform: uppercase; margin-right: 6px; }
.q-text { font-size: clamp(21px, 2.4vw, 30px); font-weight: 700; margin-bottom: 8px; line-height: 1.3; text-transform: none; font-stretch: 100%; letter-spacing: -.005em; }
.q-en { margin-bottom: 8px; }
.options { display: grid; gap: 12px; margin-top: 22px; }
.option { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 66px; text-align: left; font: 600 16.5px/1.35 var(--font); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 16px 12px 12px; cursor: pointer; transition: border-color .12s, background .12s; }
.option:hover:not(:disabled) { border-color: var(--brand-ink); background: var(--brand-soft); }
.opt-l { flex: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; border: 1.5px solid var(--dash); font: 600 15px var(--mono); }
.opt-t { flex: 1; }
.opt-ic { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.option.chosen { border-color: var(--brand-ink); background: var(--brand-soft); }
.option.chosen .opt-l { background: var(--brand); border-color: var(--brand); color: #fff; }
.option.correct { border-color: var(--ok); background: var(--ok-soft); }
.option.correct .opt-l { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.option.correct .opt-ic { color: var(--ok); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.option.wrong .opt-l { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.option.wrong .opt-ic { color: var(--bad); }
.option:disabled { cursor: default; }
.option:disabled:not(.correct):not(.wrong) { opacity: .6; }
.explain { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--surface-2); border: 1.5px dashed var(--dash); font-size: 16px; line-height: 1.6; }
.explain .ex-t { flex: 1 1 320px; min-width: 0; }
.explain .ex-t b { display: block; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.explain.ok { background: var(--ok-soft); border-color: var(--ok); }
.explain.ko { background: var(--bad-soft); border-color: var(--bad); }
.stamp-word { flex: none; display: inline-grid; place-items: center; min-width: 140px; padding: 14px 16px; border: 4px solid currentColor; outline: 1.5px solid currentColor; outline-offset: -10px; border-radius: 8px; color: var(--muted); font-stretch: 62%; font-weight: 900; font-size: 30px; letter-spacing: .04em; text-transform: uppercase; transform: rotate(-7deg); animation: thump .45s ease-out both; }
.explain.ok .stamp-word { color: var(--ok); }
.explain.ko .stamp-word { color: var(--bad); }
.quiz-actions { display: flex; justify-content: flex-end; align-items: center; min-height: 56px; }

/* Exam */
.exam-setup { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; padding-bottom: 48px; }
.exam-setup h2 { font-size: clamp(28px, 3vw, 40px); }
.exam-setup h3 { font-stretch: 62%; font-weight: 800; font-size: 22px; text-transform: uppercase; margin-top: 4px; }
.exam-setup .btn-lg { margin-top: 12px; }
.exam-setup .card:first-child { background: #d33a2c; color: #fff; border-color: #0f1b33; }
.exam-setup .card:first-child .muted { color: #ffe1dc; }
.exam-setup .card:first-child .ticks li::before { border-color: #fff; }
.exam-setup .card:first-child .notice { background: rgba(15, 27, 51, .2); border-color: #fff; color: #fff; }
.exam-setup .card:first-child .btn-primary { background: #0f1b33; border-color: #0f1b33; box-shadow: 4px 4px 0 #f8f9f5; }
.dist, .past { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 0; }
.dist li, .past li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1.5px dashed var(--line); }
.dist b, .past b { font-stretch: 62%; font-weight: 900; font-size: 24px; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
@media (max-width: 820px) { .exam-setup { grid-template-columns: 1fr; } }
.exam-bar { position: sticky; top: var(--topbar-h); z-index: 40; background: #0f1b33; color: #f8f9f5; border-bottom: 2px solid #0f1b33; }
.exam-bar-in { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.exam-bar .bar { background: #2b3a5e; box-shadow: none; }
.exam-bar .bar i { background: #f8f9f5; }
.exam-bar .muted { color: #a9bbdd; }
.exam-bar .btn { border-color: #f8f9f5; }
.exam-bar .btn-primary { background: #d33a2c; border-color: #d33a2c; box-shadow: none; }
.timer { display: inline-flex; align-items: center; gap: 8px; font-stretch: 62%; font-weight: 900; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: 8px; background: #1e2b48; color: #f8f9f5; }
.timer::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid currentColor; }
.timer.low { background: #d33a2c; animation: breathe 1s infinite; }
#eCount { font: 500 13px var(--mono); white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; padding: 4px 0 14px; }
.grid[hidden] { display: none; }
.grid button { height: 44px; border-radius: 6px; border: 1.5px solid #47506a; background: transparent; color: #f8f9f5; font: 600 13px var(--mono); cursor: pointer; position: relative; }
.grid button.ans { background: #f8f9f5; border-color: #f8f9f5; color: #0f1b33; }
.grid button.flag::after { content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #d33a2c; border: 2px solid #0f1b33; }
.grid button.cur { outline: 3px solid #d33a2c; outline-offset: 1px; }
.exam-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.flag-on { color: var(--accent-ink) !important; }
@media (max-width: 560px) { #eCount { display: none; } .exam-nav .btn { flex: 1; } .timer { font-size: 26px; } }

/* Results */
.result-card { text-align: center; margin-top: 28px; }
.result-card h2 { font-size: clamp(32px, 4vw, 48px); }
.result-card .gauge { margin: 0 auto 14px; }
.result-card .setup-actions { justify-content: center; }
.cert { position: relative; text-align: left; padding: 0; overflow: hidden; box-shadow: 12px 14px 0 var(--brand); }
.cert-band { display: block; width: 100%; height: 40px; background: #1b3a73; }
.cert-body { padding: clamp(20px, 4vw, 44px); display: flex; flex-direction: column; gap: 24px; }
.cert-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px dashed var(--dash); padding-bottom: 14px; }
.cert-main { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.cert-score { flex: 1 1 340px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; }
.big-score { margin: 0; display: flex; align-items: baseline; }
.big-score b { font-stretch: 62%; font-weight: 900; font-size: clamp(120px, 16vw, 220px); line-height: .78; letter-spacing: -.02em; }
.big-score span { font-stretch: 62%; font-weight: 900; font-size: clamp(40px, 4.6vw, 64px); color: var(--muted); margin-left: 6px; }
.cert-score em { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); }
.pass .cert-score em { color: var(--ok); }
.fail .cert-score em { color: var(--bad); }
.cert-stamp { flex: 0 1 260px; display: flex; justify-content: center; }
.cert-stamp svg { width: min(100%, 250px); height: auto; }
.pass .cert-stamp { color: var(--ok); }
.fail .cert-stamp { color: var(--bad); }
.result-badge { display: inline-block; padding: 5px 12px; border-radius: 4px; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.pass .result-badge { background: var(--ok-soft); color: var(--ok); }
.fail .result-badge { background: var(--bad-soft); color: var(--bad); }
.threshold { max-width: 640px; }
.threshold .th-bar { position: relative; height: 22px; border-radius: 4px; border: 1.5px solid var(--edge); background: var(--surface-2); }
.threshold .th-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); }
.fail .threshold .th-fill { background: var(--bad); }
.threshold .th-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 calc(var(--cw, 2.5%) - 2px), var(--surface) calc(var(--cw, 2.5%) - 2px) var(--cw, 2.5%)); }
.threshold .th-mark { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-left: -1.5px; background: #d33a2c; z-index: 1; }
.threshold .th-lbl { position: relative; height: 18px; margin-top: 8px; font: 500 11px var(--mono); color: var(--muted); }
.threshold .th-lbl span { position: absolute; left: 0; white-space: nowrap; }
.threshold .th-lbl span:nth-child(2) { transform: translateX(-50%); color: var(--accent-ink); font-weight: 600; }
.threshold .th-lbl span:nth-child(3) { left: auto; right: 0; }
.cert p { margin: 0; font-size: 17px; }
.theme-bars { display: grid; gap: 4px; margin: 4px 0; text-align: left; }
.tb { display: grid; grid-template-columns: minmax(170px, 230px) 1fr 64px; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1.5px dashed var(--line); }
.tb b { text-align: right; font-stretch: 62%; font-weight: 900; font-size: 24px; }
.tb-cells { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; max-width: 300px; }
.tb-cells i { height: 18px; border-radius: 3px; background: var(--bad); }
.tb-cells i.y { background: var(--ok); }
@media (max-width: 560px) { .tb { grid-template-columns: 1fr 56px; } .tb .bar, .tb .tb-cells { grid-row: 2; grid-column: 1 / -1; } }
.review-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 40px 0 16px; }
.review-head .section-title { margin: 0; }

/* ============ Progress ============ */
.progress-top { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.passport { position: relative; overflow: hidden; background: #1b3a73; color: #f8f9f5; border-color: #0f1b33; }
.passport::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(248, 249, 245, .1) 1.5px, transparent 1.8px); background-size: 8px 8px; pointer-events: none; }
.passport > * { position: relative; }
.passport .muted, .passport .g-val span { color: #c9d3e6; }
.passport .g-bg { stroke: #2f4c87; }
.passport .g-fg { stroke: #f8f9f5 !important; }
.passport h3 { font-stretch: 62%; font-weight: 900; font-size: 32px; text-transform: uppercase; }
.passport .btn-primary { background: #f8f9f5; color: #0f1b33; border-color: #f8f9f5; box-shadow: 4px 4px 0 #0f1b33; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--edge); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kpi { padding: 16px 18px; border-right: 1.5px dashed var(--dash); border-bottom: 1.5px dashed var(--dash); }
.kpi:nth-child(3n) { border-right: 0; }
.kpi:nth-last-child(-n+3) { border-bottom: 0; }
.kpi b { display: block; font-stretch: 62%; font-weight: 900; font-size: 40px; line-height: 1; }
.kpi b small { font-size: 20px; color: var(--muted); }
.kpi span { font: 500 12px var(--mono); color: var(--muted); }
.theme-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.tp { padding: 14px 0; border-bottom: 1.5px dashed var(--line); }
.tp-head, .tp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; }
.tp-foot { color: var(--muted); flex-wrap: wrap; font-size: 13px; }
.tp-foot a { font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.spark { position: relative; height: 140px; display: flex; align-items: flex-end; gap: 6px; padding: 8px 0; border-bottom: 2px solid var(--edge); margin: 18px 0 14px; }
.sp { flex: 1; max-width: 40px; border-radius: 4px 4px 0 0; position: relative; min-height: 6px; }
.sp.ok { background: var(--ok); }
.sp.bad { background: var(--bad); }
.sp span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font: 600 11px var(--mono); color: var(--muted); }
.sp-line { position: absolute; left: 0; right: 0; bottom: calc(8px + 80% * (140px - 16px) / 140px); border-top: 2px dashed #d33a2c; }
table.mini { font-size: 14px; }
table.mini th, table.mini td { padding: 8px 10px; }
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center; margin: 14px 0 8px; }
.box-bar { height: 96px; background: var(--surface-2); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line); }
.box-bar i { display: block; width: 100%; background: repeating-linear-gradient(to top, var(--brand) 0 5px, var(--surface) 5px 7px); border-top: 2px solid var(--edge); }
.box b { display: block; margin-top: 6px; font-stretch: 62%; font-weight: 900; font-size: 24px; }
.box span { font: 500 11px var(--mono); color: var(--muted); }
.lesson-checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px; font-size: 14px; }
.lesson-checks a { display: block; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 5px; color: var(--muted); text-decoration: none; }
.lesson-checks .done a { color: var(--ink); border-color: var(--ok); background: var(--ok-soft); font-weight: 600; }
.danger-zone { margin: 34px 0 48px; text-align: right; }
@media (max-width: 900px) { .progress-top, .two-col { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3n) { border-right: 1.5px dashed var(--dash); }
  .kpi:nth-child(2n) { border-right: 0; }
  .kpi:nth-last-child(-n+3) { border-bottom: 1.5px dashed var(--dash); }
  .kpi:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ============ Footer, toast ============ */
.footer { margin-top: clamp(72px, 9vw, 128px); background: #0f1b33; color: #c9d3e6; overflow: hidden; }
.footer-inner { width: min(1320px, 100% - 32px); margin: auto; padding: clamp(44px, 6vw, 72px) 0 26px; font-size: 15px; display: flex; flex-direction: column; gap: 32px; }
.footer-inner p { margin: 0; max-width: 660px; line-height: 1.65; }
.footer-inner b { color: #f8f9f5; }
.footer a { color: #f8f9f5; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 26px; align-content: flex-start; }
.footer-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-big { font-stretch: 62%; font-weight: 900; font-size: clamp(76px, 17vw, 260px); line-height: .78; text-transform: uppercase; color: transparent; -webkit-text-stroke: 2px #2f4470; white-space: nowrap; letter-spacing: -.01em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font: 500 12px var(--mono); color: #a9bbdd; border-top: 1.5px solid #2f4470; padding-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #0f1b33; color: #f8f9f5; border: 2px solid #f8f9f5; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100% - 32px); box-shadow: 5px 5px 0 #d33a2c; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Page C : parcours de cours, leçon, tableau de bord ============ */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; border-bottom: 2px solid var(--ink); align-self: flex-end; }
.link-arrow svg { width: 18px; height: 18px; }
.sec-head .sh-l .lead { font-size: 17px; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-line { background: transparent; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: .01em; }
.card-head .link-arrow { min-height: 36px; font-size: 14px; align-self: center; }

/* Level cards (home) */
.lc-text { font-size: 15px; line-height: 1.5; color: var(--muted); }
.lc-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.lc-cta svg { width: 18px; height: 18px; }
.selected .lc-cta { color: var(--ok); }

/* 4 steps (home) */
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.steps-grid li a { display: flex; flex-direction: column; gap: 10px; min-height: 190px; padding: 22px; background: var(--surface); color: var(--ink); border: 2px solid var(--edge); border-radius: var(--radius); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.steps-grid li a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--hard); }
.steps-grid .sg-n { font-stretch: 62%; font-weight: 900; font-size: 54px; line-height: .85; }
.steps-grid .sg-t { font-stretch: 62%; font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; }
.steps-grid .sg-x { font-size: 15px; line-height: 1.5; color: var(--muted); }
.steps-grid .sg-k { margin-top: auto; font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
.steps-grid li.blue a { background: #1b3a73; color: #f8f9f5; border-color: #0f1b33; }
.steps-grid li.green a { background: #2e6a4e; color: #f8f9f5; border-color: #0f1b33; }
.steps-grid li.blue .sg-x, .steps-grid li.blue .sg-k { color: #c9d3e6; }
.steps-grid li.green .sg-x, .steps-grid li.green .sg-k { color: #d2e5da; }

/* 4 figures (home) */
.facts4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.facts4 > div { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); }
.facts4 b { font-stretch: 62%; font-weight: 900; font-size: 64px; line-height: .85; }
.facts4 .f-t { font-stretch: 62%; font-weight: 800; font-size: 22px; line-height: 1; text-transform: uppercase; }
.facts4 .f-x { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* Finder: search + theme chips */
.finder { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 20px; }
.finder.card { padding: 16px 18px; border-radius: 14px; margin-bottom: 0; }
.finder .search { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1.5px solid var(--edge); border-radius: 10px; background: var(--surface); }
.finder.card .search { background: var(--bg); }
.finder .search svg { flex: none; }
.finder .search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font: 500 15px var(--font); color: var(--ink); outline: none; }
.finder .chips-select button { border-radius: 8px; font-size: 14px; font-weight: 700; padding: 0 14px; }
.show-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.show-pick select { font: 600 14px var(--font); color: var(--ink); background: var(--surface); border: 1.5px solid var(--edge); border-radius: 8px; padding: 0 12px; height: 44px; }
.tickets > a[hidden], .path-row[hidden], .path-group[hidden] { display: none; }

/* Course segments: dark = terminé, red = en cours, light = à voir */
.segs { display: flex; gap: 3px; }
.segs i { flex: 1 1 0; height: 12px; border-radius: 2px; background: var(--surface); border: 1.5px solid var(--edge); }
.segs i.d { background: var(--ink); }
.segs i.c { background: var(--accent); }
.segs.sm { width: 180px; }
.segs.sm i { height: 10px; }
.segs.light i { height: 8px; border: 0; background: #2f4c87; }
.segs.light i.d { background: #f8f9f5; }
.segs.light i.c { background: #d33a2c; }
.status-k { font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.status-k.done { color: var(--ok); }
.status-k.cur { color: var(--accent-ink); }
.mini-bar { display: block; height: 6px; border-radius: 2px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.mini-bar.tall { height: 10px; border: 1.5px solid var(--edge); border-radius: 3px; }
.dot { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.dot svg { width: 22px; height: 22px; }
.dot-n { font: 600 13px var(--mono); }
.dot.sm { width: 36px; height: 36px; }
.dot.sm svg { width: 18px; height: 18px; }
.dot.sm .dot-n { font-size: 12px; }
.done > .dot, .dot.done { background: var(--ink); color: var(--bg); }
.cur > .dot, .dot.cur { background: var(--accent); color: #fff; }

/* Course path page */
.path-page { padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: 28px; }
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.ph-l { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.ph-l h1 { margin: 0; font-size: clamp(44px, 6vw, 88px); }
.ph-l .lead { font-size: 18px; }
.ph-r { display: flex; flex-direction: column; gap: 8px; flex: 0 1 300px; min-width: 240px; }
.ph-k { display: flex; justify-content: space-between; font: 500 12px var(--mono); color: var(--muted); }
.ph-k b { color: var(--ink); }
.resume { background: #1b3a73; color: #f8f9f5; border: 2px solid #0f1b33; border-radius: 18px; padding: clamp(20px, 2.6vw, 30px); display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; box-shadow: 8px 8px 0 var(--hard); }
.resume .rs-l { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.resume .rs-k { font: 500 11px var(--mono); letter-spacing: .14em; color: #c9d3e6; }
.resume .rs-title { font-stretch: 62%; font-weight: 900; font-size: clamp(30px, 3.4vw, 46px); line-height: .95; text-transform: uppercase; }
.resume .rs-sub { font-size: 15px; color: #d3ddee; }
.resume .segs { max-width: 420px; margin-top: 4px; gap: 4px; }
.resume .btn-red { border-color: #0f1b33; }
.resume.done-all { background: #2e6a4e; }
.path { display: flex; flex-direction: column; gap: 22px; }
.path-group { background: var(--surface); border: 2px solid var(--edge); border-radius: 18px; overflow: hidden; }
.pg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 22px; background: var(--c); color: var(--cf); border-bottom: 2px solid var(--edge); }
.pg-head h2 { margin: 0; flex: 1 1 260px; font-size: 28px; letter-spacing: .01em; line-height: 1; }
.pg-head .pg-n { background: var(--cf); color: var(--c); }
.pg-n { flex: none; min-width: 36px; height: 28px; padding: 0 8px; border-radius: 5px; background: var(--c, var(--ink)); color: var(--cf, var(--bg)); display: inline-flex; align-items: center; justify-content: center; font: 600 13px var(--mono); }
.pg-count { font: 600 12px var(--mono); letter-spacing: .06em; }
.pg-head .segs { flex: 0 1 160px; gap: 4px; }
.pg-head .segs i { height: 10px; }
.path-list { list-style: none; margin: 0; padding: 6px 22px 10px; display: flex; flex-direction: column; }
.path-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 0; border-bottom: 1.5px dashed var(--dash); }
.path-row:last-child { border-bottom: 0; }
.row-k { flex: none; width: 76px; font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); }
.row-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; color: var(--ink); text-decoration: none; }
.row-title { font-stretch: 62%; font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; }
.path-row.todo .row-title { color: var(--muted); }
.row-meta { font-size: 14px; color: var(--muted); }
.row-status { flex: 0 1 150px; display: flex; flex-direction: column; gap: 4px; }
.path-row.done .status-k { color: var(--ok); }
.path-row.cur .status-k { color: var(--accent-ink); }
.path-row.done .mini-bar i { background: var(--ok); }
.row-cta { flex: none; min-width: 128px; }
.path-row.cur .row-cta { background: var(--accent); color: #fff; }
.path-row.todo .row-cta { background: var(--ink); color: var(--bg); }
.path-foot { max-width: 760px; margin: 0; }
@media (max-width: 640px) {
  .path-row { gap: 10px 12px; }
  .row-k { display: none; }
  .row-status { flex: 1 1 100%; order: 3; }
  .row-cta { flex: 1 1 100%; order: 4; }
  .row-title { font-size: 21px; }
}

/* Lesson page */
.lesson-page { max-width: none; padding: clamp(20px, 3vw, 40px) 0 clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: 22px; }
.lp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.lp-top .crumbs { margin: 0; align-items: center; }
.lp-top .crumbs b { color: var(--ink); }
.lp-pos { display: flex; align-items: center; gap: 12px; font: 500 12px var(--mono); color: var(--muted); }
.lp-count { display: flex; align-items: center; gap: 12px; }
.nav-mini { min-height: 44px; padding: 0 12px; font: 600 12px var(--mono); letter-spacing: .04em; gap: 6px; }
.nav-mini svg { width: 16px; height: 16px; }
.lesson-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.ll-main { flex: 2.2 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ll-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.lp-head { display: flex; flex-direction: column; gap: 8px; }
.lp-head h1 { margin: 0; font-size: clamp(36px, 4.6vw, 64px); }
.lp-head .lead { font-size: 17px; }
.lesson-nav { margin: 0; align-items: center; }
.lesson-nav .ln-r { display: flex; flex-wrap: wrap; gap: 12px; }
.lesson-nav .btn span { white-space: normal; text-align: left; }
#markDone.is-done { background: var(--ok); color: #fff; border-color: #0f1b33; }
.transcript { padding-top: 10px; padding-bottom: 10px; }
.transcript summary { font-stretch: 100%; text-transform: none; font-size: 16px; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.side-card { padding: 0; overflow: hidden; }
.side-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--c); color: var(--cf); border-bottom: 2px solid var(--edge); }
.side-head h2 { margin: 0; flex: 1 1 auto; font-size: 22px; line-height: 1; }
.side-head .pg-n { background: var(--cf); color: var(--c); }
.side-head .side-sub { font-size: 13px; color: #c9d3e6; white-space: nowrap; }
.side-list { list-style: none; margin: 0; padding: 6px 18px 8px; display: flex; flex-direction: column; }
.side-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed var(--dash); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; min-height: 44px; justify-content: center; }
.side-list .sl-k { font: 500 11px var(--mono); color: var(--muted); }
.side-list .sl-t { font-weight: 600; font-size: 15px; line-height: 1.2; }
.side-list li.here .sl-t { font-weight: 800; }
.side-list .dot.sm { width: 32px; height: 32px; }
.side-foot { margin: 0; padding: 10px 18px 16px; }
.next-card { background: #1b3a73; color: #f8f9f5; border-color: #0f1b33; display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.next-card h2 { margin: 0; font-size: 24px; letter-spacing: .01em; }
.next-card p { margin: 0; font-size: 15px; color: #d3ddee; }
.next-card .btn { border-color: #0f1b33; }
.next-card .btn-line { color: #f8f9f5; border-color: #f8f9f5; }
.next-card .btn-red span { white-space: normal; text-align: left; }
.lesson-quiz { margin: 0; }
@media (max-width: 640px) { .lp-pos .lp-count { display: none; } .lp-top { justify-content: space-between; } .lp-pos { flex: 1 1 100%; justify-content: space-between; } }

/* Dashboard */
.dash { padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: 24px; }
.dash-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.dr-top { justify-content: space-between; gap: 24px 40px; }
.dash-greet { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.dash-greet h1 { margin: 0; font-size: clamp(40px, 6vw, 88px); }
.dash-greet .lead { font-size: 18px; max-width: 620px; }
.dash-greet .cta { margin-top: 6px; gap: 12px; }
.countdown { flex: 0 1 380px; min-width: 0; position: relative; background: #1b3a73; color: #f8f9f5; border: 2px solid #0f1b33; border-radius: 18px; padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.countdown::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(248, 249, 245, .14) 1.5px, transparent 1.8px); background-size: 8px 8px; pointer-events: none; }
.countdown > * { position: relative; }
.cd-k { font: 500 11px var(--mono); letter-spacing: .16em; color: #c9d3e6; }
.cd-big { display: flex; align-items: baseline; gap: 12px; }
.cd-big b { font-stretch: 62%; font-weight: 900; font-size: 112px; line-height: .85; }
.cd-big span { font-stretch: 62%; font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.countdown p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: #d3ddee; }
.cd-date { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1.5px dashed rgba(248, 249, 245, .35); font-size: 14px; color: #c9d3e6; }
.cd-date input { font: 600 14px var(--mono); color: #0f1b33; background: #f8f9f5; border: 0; border-radius: 8px; padding: 0 10px; height: 44px; max-width: 180px; color-scheme: light; }
.dr-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.num-card { background: var(--surface); border: 2px solid var(--edge); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.num-card.prep { flex-direction: row; align-items: center; gap: 16px; }
.num-card.prep > div { display: flex; flex-direction: column; gap: 4px; }
.nc-t { font-stretch: 62%; font-weight: 800; font-size: 22px; line-height: 1; text-transform: uppercase; }
.nc-k { font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
.nc-big { font-stretch: 62%; font-weight: 900; font-size: 56px; line-height: .9; }
.nc-big small { font-size: 26px; color: var(--muted); }
.num-card .segs { margin-top: 6px; }
.num-card .segs i { height: 10px; }
.num-card .mini-bar { margin-top: 6px; }
.nc-streak { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--accent-ink); }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 12; }
.ring-mark { stroke: var(--accent); stroke-width: 3; }
.ring-txt { fill: var(--ink); font-family: var(--font); font-weight: 900; font-size: 30px; font-stretch: 62%; }
.dr-mid > section, .dr-low > section { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.plan-card { flex: 1 1 420px; }
.weak-card { flex: 1 1 520px; }
.themes-card { flex: 1.4 1 560px; }
.act-card { flex: 1 1 380px; }
.dr-mid .card-head, .dr-low .card-head, .stamps-card .card-head { margin-bottom: 0; }
.dash .card p { margin: 0; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-list li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--edge); border-radius: 10px; background: var(--surface); }
.plan-list li.done { background: var(--bg); }
.plan-list input { width: 24px; height: 24px; margin: 0; accent-color: var(--ok); flex: none; cursor: pointer; }
.plan-list label { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.pn-k { font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.pn-t { font-stretch: 62%; font-weight: 800; font-size: 22px; line-height: 1; text-transform: uppercase; }
.plan-list li.done .pn-t { text-decoration: line-through; color: var(--muted); }
.plan-list .btn { flex: none; }
.weak-list { display: flex; flex-direction: column; }
.weak-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 0; border-bottom: 1.5px dashed var(--dash); }
.weak-row .pg-n { min-width: 34px; height: 26px; font-size: 12px; }
.wr-m { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wr-t { font-weight: 700; font-size: 16px; line-height: 1.2; }
.wr-bar { display: flex; align-items: center; gap: 10px; }
.wr-bar .mini-bar { flex: 1 1 auto; height: 8px; border-radius: 3px; }
.wr-bar b { font: 600 12px var(--mono); color: var(--bad); min-width: 34px; }
.wr-a { display: flex; gap: 8px; flex: none; }
.theme-rows { display: flex; flex-direction: column; }
.theme-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; border-bottom: 1.5px dashed var(--dash); color: var(--ink); text-decoration: none; }
.theme-row .pg-n { min-width: 34px; height: 26px; font-size: 12px; }
.theme-row .tr-l { flex: 1 1 200px; min-width: 0; font-weight: 700; font-size: 16px; }
.theme-row .segs { flex: 0 1 220px; gap: 4px; }
.theme-row .segs i { height: 14px; border-radius: 3px; }
.theme-row .status-k { flex: none; width: 112px; text-align: right; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.legend-row span { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 14px; height: 14px; border-radius: 3px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--edge); }
.lg.d { background: var(--ink); box-shadow: none; }
.lg.c { background: var(--accent); box-shadow: none; }
.lg.on { background: var(--ok); box-shadow: none; }
.lg.off { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); }
.cal-head, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { font: 500 11px var(--mono); color: var(--muted); text-align: center; margin-bottom: -8px; }
.cal span { aspect-ratio: 1; border-radius: 6px; background: var(--bg); border: 1.5px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; font: 600 12px var(--mono); }
.cal span.on { background: var(--ok); border-color: #1f4a36; color: #fff; }
.cal span.today { background: var(--accent); border-color: var(--edge); color: #fff; }
.cal span.future { color: var(--dash); }
.exam-rows { border-top: 1.5px dashed var(--dash); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.er-t { font-stretch: 62%; font-weight: 800; font-size: 20px; text-transform: uppercase; }
.exam-row { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; min-height: 44px; }
.exam-row > .mono { width: 56px; }
.exam-row b { flex: 1 1 auto; font-stretch: 62%; font-weight: 900; font-size: 28px; line-height: 1; }
.exam-row b small { font-size: 15px; color: var(--muted); font-weight: 900; }
.verdict { font: 600 11px var(--mono); letter-spacing: .1em; padding: 5px 9px; border: 2px solid currentColor; border-radius: 4px; transform: rotate(-4deg); }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }
.stamps-card .stamps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 14px; }
.stamps-card .stamp-tile { background: var(--bg); }
.dash .danger-zone { margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* Phone: tab bar + dashboard order (TableauMobile) */
.tabbar { display: none; }
@media (max-width: 600px) {
  body { padding-bottom: 74px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--edge); background: var(--surface); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 11px; }
  .tabbar a.active { color: var(--ink); font-weight: 700; }
  .toast { bottom: 90px; }
  .dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dash-row { display: contents; }
  .dash > *, .dash-row > * { grid-column: 1 / -1; min-width: 0; }
  .countdown, .num-card.active { grid-column: span 1; padding: 14px; }
  .dash-greet { order: 1; gap: 8px; }
  .dash-greet h1 { font-size: 40px; }
  .dash-greet .lead { font-size: 15px; }
  .countdown { order: 2; }
  .num-card.active { order: 3; }
  .num-card.prep { order: 4; }
  .plan-card { order: 5; }
  .weak-card { order: 6; }
  .themes-card { order: 7; }
  .num-card.courses { order: 8; }
  .num-card.cards { order: 9; }
  .act-card { order: 10; }
  .stamps-card { order: 11; }
  .dash .danger-zone { order: 12; }
  .cd-big b, .nc-big { font-size: 56px; }
  .cd-big span { font-size: 13px; font-weight: 600; text-transform: none; }
  .cd-big span br { display: none; }
  .countdown p { font-size: 13px; }
  .cd-date { flex-direction: column; align-items: stretch; }
  .cd-date input { max-width: none; }
  .nc-big small { font-size: 18px; }
  .dash .card { padding: 14px; border-radius: 14px; }
  .card-head h2 { font-size: 22px; }
  .plan-list li { padding: 10px; gap: 10px; }
  .pn-t { font-size: 15px; font-stretch: 100%; text-transform: none; }
  .plan-list .btn { min-width: 0; padding: 0 10px; }
  .theme-row .tr-l { flex: 1 1 auto; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .theme-row .segs { flex: 0 0 72px; }
  .theme-row .status-k { width: auto; }
  .wr-a { flex: 1 1 100%; }
  .wr-a .btn { flex: 1; }
}

/* Lesson page: every course in a left panel, the course quiz under the video */
.lesson-layout .ll-side { flex: 0 1 320px; }
/* The panel is sticky here, so the two columns must never wrap (320 + 28 + 640 px don't fit just above 1000 px):
   the video would slide under the pinned panel. */
@media (min-width: 1001px) { .lesson-layout { flex-wrap: nowrap; } .lesson-layout .ll-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; scrollbar-width: thin; } }
@media (max-width: 1000px) { .lesson-layout .ll-side { order: 2; flex-basis: 100%; } }
.side-group { border-bottom: 1.5px dashed var(--dash); }
.side-group:last-of-type { border-bottom: 0; }
.side-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 18px; min-height: 56px; }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary .sg-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.side-group summary .sl-k { font: 500 11px var(--mono); color: var(--muted); }
.side-group summary .sl-t { font-weight: 700; font-size: 15px; line-height: 1.2; }
.side-group summary:hover .sl-t { color: var(--brand-ink); }
.side-group[open] summary { background: var(--surface-2); }
.sg-chev { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.side-group[open] .sg-chev { transform: rotate(180deg); }
.side-group .side-list li { padding: 8px 0; }
.side-group .side-list { margin: 0 0 0 35px; padding: 2px 18px 8px 14px; border-left: 2px solid var(--line); }
.side-group .side-list li { gap: 10px; }
.side-group .side-list .dot.sm { width: 20px; height: 20px; border-width: 1.5px; }
.side-group .side-list .dot.sm svg { width: 11px; height: 11px; }
.side-group .side-list .dot.todo { background: transparent; border-color: var(--dash); }
.lesson-quiz .lead { margin: 0 0 14px; }
.lesson-quiz .quiz-top { margin-bottom: 14px; }
.lesson-quiz .q-card { padding: 0; border: 0; background: transparent; margin-bottom: 0; }
.lesson-quiz .q-card.is-situation { box-shadow: none; border-left: 6px solid #d33a2c; padding: 0 0 0 14px; }
.lesson-quiz .quiz-actions { margin-top: 12px; }
.lq-result { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.lq-result > div { flex: 1 1 300px; min-width: 0; }
.lq-result h2 { margin: 0 0 6px; }
.lesson-quiz .section-title { margin-top: 24px; }
/* Quiz in the video's place: the paused-video bar above the quiz card */
.quiz-slot { display: flex; flex-direction: column; gap: 14px; }
.video-paused { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 12px 10px 18px; background: #0f1b33; color: #f8f9f5; border: 2px solid #0f1b33; border-radius: 12px; }
.video-paused .vp-l { display: flex; align-items: center; gap: 12px; min-width: 0; font: 500 12px var(--mono); letter-spacing: .04em; }
.video-paused .vp-l i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #d33a2c; }
.video-paused .vp-ch { color: #c9d3e6; font: 400 13px var(--font); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-paused .btn { background: #f8f9f5; color: #0f1b33; border-color: #f8f9f5; box-shadow: none; }
.video-paused .btn:hover { background: #fff; transform: none; }
/* End of the video: the quiz is offered on the player itself */
#playerWrap { position: relative; }
.video-end { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 27, 51, .88); border-radius: 18px; }
.ve-box { max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #f8f9f5; }
.ve-box .kicker { color: #c9d3e6; }
.ve-box h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); color: #f8f9f5; }
.ve-box p { margin: 0; font-size: 16px; line-height: 1.5; color: #d3ddee; }
.ve-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.ve-actions .btn-red { border-color: #0f1b33; }
.ve-actions .btn-line { color: #f8f9f5; border-color: #f8f9f5; }
.ve-actions .btn-line:hover { background: rgba(248, 249, 245, .12); }
@media (max-width: 640px) { .video-end { padding: 12px; border-radius: 12px; } .ve-box h2 { font-size: 26px; } .ve-box p { font-size: 14px; } }

/* ---------- Sign-in screen and account menu (assets/js/auth.js) ---------- */
body.auth-locked { overflow: hidden; }
.auth-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: var(--bg); }
.auth-card { width: min(100%, 440px); background: var(--surface); border: 2px solid var(--edge); border-radius: 14px; box-shadow: 6px 6px 0 var(--hard); padding: 28px 24px 22px; }
.auth-card .brand-logo { height: 44px; width: auto; margin-bottom: 18px; }
.auth-card h1 { font: 800 28px/1.1 var(--font); font-stretch: 75%; margin: 0 0 10px; }
.auth-lead { margin: 0 0 18px; color: var(--muted); }
.auth-msg { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--ok-soft); border: 1.5px dashed var(--ok); font-size: 15px; }
.auth-msg.bad { background: var(--bad-soft); border-color: var(--bad); }
.auth-providers { display: grid; gap: 10px; }
.auth-provider { width: 100%; justify-content: flex-start; min-height: 50px; }
.auth-provider svg { margin-left: 2px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1.5px dashed var(--dash); }
.auth-mail { display: grid; gap: 8px; }
.auth-mail label { font-weight: 700; font-size: 14px; }
.auth-mail input { height: 48px; padding: 0 12px; font: 500 16px var(--font); color: var(--ink); background: var(--bg); border: 2px solid var(--edge); border-radius: 10px; }
.auth-hint, .auth-legal { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.auth-legal { margin-top: 18px; padding-top: 14px; border-top: 1.5px solid var(--line); }
.account { position: relative; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 260px; padding: 14px; display: grid; gap: 8px; background: var(--surface); border: 2px solid var(--edge); border-radius: 12px; box-shadow: 4px 4px 0 var(--hard); }
.account-menu[hidden] { display: none; }
.account-mail { margin: 0; font-weight: 700; word-break: break-all; }
.account-status { margin: 0; font: 500 12px var(--mono); color: var(--muted); }

/* ---------- Profile button (top bar) ---------- */
.profile-btn { display: inline-flex; align-items: center; height: 44px; padding: 0; border-radius: 8px; border: 1.5px solid var(--edge); background: var(--surface); color: var(--ink); cursor: pointer; overflow: hidden; }
.profile-btn:hover { background: var(--surface-2); }
.pf-goal { --lc: var(--lc-csp); align-self: stretch; display: grid; place-items: center; padding: 0 10px; font: 900 15px var(--font); font-stretch: 62%; letter-spacing: .04em; color: var(--bg); background: var(--lc); }
.pf-goal.lv-cr { --lc: var(--lc-cr); } .pf-goal.lv-nat { --lc: var(--lc-nat); }
.pf-ini { display: grid; place-items: center; min-width: 40px; font: 800 15px var(--font); }
.pm-goal { display: grid; gap: 2px; padding: 10px 0 2px; border-top: 1.5px dashed var(--dash); }
.pm-goal b { font-size: 17px; line-height: 1.15; }
.pm-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pm-switch button { --lc: var(--lc-csp); height: 36px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 900 14px var(--font); font-stretch: 62%; letter-spacing: .04em; cursor: pointer; }
.pm-switch .lv-cr { --lc: var(--lc-cr); } .pm-switch .lv-nat { --lc: var(--lc-nat); }
.pm-switch button:hover { border-color: var(--lc); }
.pm-switch button[aria-pressed="true"] { background: var(--lc); border-color: var(--lc); color: var(--bg); }
@media (max-width: 600px) { .profile-btn { height: 40px; } .pf-goal { padding: 0 8px; } .pf-ini { min-width: 34px; } }

/* ---------- Onboarding (assets/js/onboarding.js) ---------- */
body.onb-open { overflow: hidden; }
.onb { position: fixed; inset: 0; z-index: 190; display: grid; place-items: start center; padding: 32px 16px; overflow-y: auto; background: var(--bg); }
.onb-card { width: min(100%, 760px); background: var(--surface); border: 2px solid var(--edge); border-radius: 14px; box-shadow: 6px 6px 0 var(--hard); padding: 24px 28px 22px; }
.onb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.onb-top .brand-logo { height: 40px; width: auto; }
.onb-count { margin-left: auto; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.onb-close { margin-left: auto; }
.onb-count + .onb-close { margin-left: 4px; }
.onb-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 22px; }
.onb-progress i { height: 6px; border-radius: 3px; background: var(--line); }
.onb-progress i.c { background: var(--accent); }
.onb-progress i.d { background: var(--ink); }
.onb-card h1 { font: 900 clamp(32px, 6vw, 46px)/1 var(--font); font-stretch: 70%; text-transform: uppercase; margin: 6px 0 12px; outline: none; }
.onb-card h1 em { font: italic 400 1.05em var(--serif); text-transform: none; color: var(--accent-ink); }
.onb-lead { margin: 0 0 20px; color: var(--muted); max-width: 620px; }
.onb fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.onb-opt { --lc: var(--ink); position: relative; display: block; cursor: pointer; }
.onb-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.onb-opt-in { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .15s, box-shadow .15s, transform .15s; }
.onb-opt-in b { font-size: 17px; line-height: 1.2; }
.onb-opt:hover .onb-opt-in { border-color: var(--edge); }
.onb-opt input:focus-visible + .onb-opt-in { outline: 3px solid var(--brand); outline-offset: 2px; }
.onb-opt input:checked + .onb-opt-in { border-color: var(--lc); box-shadow: 5px 5px 0 var(--lc); transform: translate(-2px, -2px); background: var(--surface); }
.onb-goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.onb-goal .onb-opt-in { gap: 10px; padding: 16px; }
.onb-goal.lv-csp { --lc: var(--lc-csp); } .onb-goal.lv-cr { --lc: var(--lc-cr); } .onb-goal.lv-nat { --lc: var(--lc-nat); }
.onb-stamp { color: var(--lc); }
.onb-stamp svg { width: 88px; height: 88px; display: block; }
.onb-gt { display: grid; gap: 3px; }
.onb-gt b { font: 900 22px/1 var(--font); font-stretch: 62%; text-transform: uppercase; }
.onb-badge { align-self: flex-start; margin-top: auto; font: 600 11px var(--mono); padding: 5px 10px; border-radius: 999px; background: var(--surface-2); }
.onb-unsure { grid-column: 1 / -1; }
.onb-unsure .onb-gt b { font: 700 17px var(--font); text-transform: none; }
.onb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onb-list { display: grid; gap: 10px; }
.onb-date { display: grid; gap: 6px; margin-top: 18px; max-width: 320px; font-weight: 700; font-size: 14px; }
.onb-date input { height: 50px; padding: 0 12px; font: 600 17px var(--font); color: var(--ink); background: var(--bg); border: 2px solid var(--edge); border-radius: 10px; }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.onb-chips legend { font-weight: 700; font-size: 14px; margin-bottom: 10px; padding: 0; }
.chip-opt .onb-opt-in { padding: 10px 16px; border-radius: 999px; }
.chip-opt .onb-opt-in b { font-size: 15px; }
.onb-paces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pace-opt .onb-opt-in b { font: 900 26px/1 var(--font); font-stretch: 62%; }
.onb-rec { align-self: flex-start; margin-top: 6px; font: 600 11px var(--mono); padding: 4px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.onb-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1.5px dashed var(--dash); }
.onb-ready { --lc: var(--lc-csp); display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; }
.onb-ready.lv-cr { --lc: var(--lc-cr); } .onb-ready.lv-nat { --lc: var(--lc-nat); }
.onb-ready-stamp { color: var(--lc); }
.onb-ready-stamp svg { width: 150px; height: 150px; display: block; }
.onb-recap { margin: 0; display: grid; border-top: 1.5px dashed var(--dash); }
.onb-recap div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1.5px dashed var(--dash); }
.onb-recap dt { font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; flex: none; }
.onb-recap dd { margin: 0; font-weight: 700; text-align: right; }
.onb-h2 { font: 800 20px var(--font); margin: 24px 0 10px; }
.onb-prepared { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 8px; }
.onb-prepared li { position: relative; padding-left: 30px; }
.onb-prepared li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 800 12px var(--font); background: var(--ok); color: var(--bg); }
@media (max-width: 720px) {
  .onb { padding: 12px 10px; }
  .onb-card { padding: 18px 16px 16px; }
  .onb-goals, .onb-row { grid-template-columns: 1fr; }
  .onb-goal .onb-opt-in { display: grid; grid-template-columns: 64px 1fr; align-items: center; column-gap: 14px; row-gap: 6px; }
  .onb-stamp { grid-row: span 2; }
  .onb-stamp svg { width: 64px; height: 64px; }
  .onb-badge { margin-top: 0; justify-self: start; }
  .onb-paces { grid-template-columns: 1fr 1fr; }
  .onb-ready { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .onb-ready-stamp svg { width: 110px; height: 110px; }
  .onb-recap { width: 100%; }
}
