@font-face {
  font-family: "Hanken Grotesk";
  src: url("/static/fonts/HankenGrotesk-VF.woff2?v=1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/static/fonts/Newsreader-VF.woff2?v=1") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #475569;
  --line: #e2e8f0;
  --field-line: #7c8799;
  --heading: #312e81;
  --brand: #312e81;
  --brand-ink: #ffffff;
  --brand-hover: #1e1b4b;
  --brand-soft: #eef2ff;
  --brand-soft-2: #e0e7ff;
  --link: #3730a3;
  --focus: #4338ca;
  --current: #4338ca;
  --ok: #0f766e;
  --ok-fill: #0d9488;
  --ok-soft: #ccfbf1;
  --ok-wash: #f0fdfa;
  --warn: #b45309;
  --warn-fill: #d97706;
  --warn-soft: #fef3c7;
  --warn-ink: #92400e;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --locked: #94a3b8;
  --locked-text: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --player: #0b0f1a;
  --on-ok: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --surface-2: #16213a;
    --text: #e2e8f0;
    --text-2: #cbd5e1;
    --muted: #a3afc2;
    --line: #26324a;
    --field-line: #64748b;
    --heading: #c7d2fe;
    --brand: #a5b4fc;
    --brand-ink: #1e1b4b;
    --brand-hover: #c7d2fe;
    --brand-soft: #1e1b4b;
    --brand-soft-2: #272463;
    --link: #a5b4fc;
    --focus: #818cf8;
    --current: #818cf8;
    --ok: #5eead4;
    --ok-fill: #14b8a6;
    --ok-soft: #134e4a;
    --ok-wash: #0f2a2a;
    --warn: #fbbf24;
    --warn-fill: #f59e0b;
    --warn-soft: #2a2110;
    --warn-ink: #fbbf24;
    --bad: #f87171;
    --bad-soft: #2b1414;
    --locked: #64748b;
    --locked-text: #94a3b8;
    --shadow: none;
    --player: #05070d;
    --on-ok: #042f2e;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--heading); }
h1 { font-family: var(--font-serif); font-weight: 600; font-size: 2rem; line-height: 1.15; margin: 0.4em 0 0.5em; word-spacing: 0.04em; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 1.4em 0 0.6em; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 1em 0 0.4em; font-weight: 700; }
.serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0; word-spacing: 0.04em; }
h2.serif { font-size: 1.6rem; }
p { margin: 0.5em 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--brand-soft); padding: 0.1em 0.35em; border-radius: 6px; }
img, video, iframe { max-width: 100%; }
.icon { flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.top-inner { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; color: var(--heading); }
.brand:hover { text-decoration: none; }
.top-back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--heading); margin-left: -10px; flex: none; }
.top-back:hover { background: var(--brand-soft); }
.top-title { flex: 1; min-width: 0; }
.top-eyebrow { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-heading { margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.menu { position: relative; flex: none; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 4px; border-radius: 10px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 20px; height: 2px; background: var(--heading); border-radius: 2px; }
.menu[open] summary { background: var(--brand-soft); }
.nav { position: absolute; right: 0; top: 50px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); min-width: 220px; padding: 8px; display: flex; flex-direction: column; }
.nav a, .nav button.link { padding: 12px 12px; border-radius: 8px; color: var(--text); text-align: left; width: 100%; font-size: 1rem; font-weight: 500; }
.nav a:hover, .nav button.link:hover { background: var(--brand-soft); text-decoration: none; }
.nav .btn.small { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); text-align: center; margin-top: 4px; }
.count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 7px; font-size: 0.8rem; font-weight: 700; }
@media (min-width: 860px) {
  .menu summary { display: none; }
  .menu .nav { position: static; display: flex; flex-direction: row; align-items: center; border: 0; box-shadow: none; padding: 0; min-width: 0; background: none; gap: 2px; }
  .menu:not([open]) > .nav { display: flex; }
  .menu::details-content { content-visibility: visible; display: contents; }
  .nav a, .nav button.link { padding: 8px 10px; width: auto; }
  .nav .btn.small { margin: 0 0 0 6px; }
}

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 12px 16px 48px; flex: 1; }
.wrap.wide { max-width: 1120px; }
.foot { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); font-weight: 700; margin: 0; }
.pre { white-space: pre-wrap; word-break: break-word; }
.error { color: var(--bad); }
.ok { color: var(--ok); }
.ok-text { color: var(--ok); font-weight: 600; }
.crumb { margin: 4px 0 8px; font-weight: 600; }
.crumb a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--surface); color: var(--heading); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; border-color: var(--heading); background: var(--brand-soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; }
.btn.icon-btn { width: 52px; min-width: 52px; padding: 0; }
button.link { background: none; border: 0; color: var(--link); font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; }

.field { display: block; margin: 12px 0; }
.field .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.hint { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex: none; margin: 2px 0 0; }
input[type="file"] { padding: 8px; }
.check, .choice { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.choice { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); }
.choice:hover { border-color: var(--field-line); }
.choice:has(input:checked) { border-color: var(--current); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--current); }
fieldset { border: 0; padding: 0; margin: 12px 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row > .field, .row > input, .row > select { flex: 1 1 140px; margin: 0; }
.row.grow { flex: 1; }
.row.center { justify-content: center; }
.stack > * + * { margin-top: 10px; }
.divider { text-align: center; color: var(--muted); margin: 18px 0; position: relative; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.divider span { background: var(--surface); padding: 0 10px; position: relative; }

.flash, .notice { border-radius: 10px; padding: 12px 14px; margin: 12px 0; background: var(--brand-soft); color: var(--text); border: 1px solid var(--brand-soft-2); }
.flash.ok, .notice.ok { background: var(--ok-wash); color: var(--ok); border-color: var(--ok-soft); }
.flash.error, .notice.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.notice .icon { margin-right: 4px; }
.cert-notice { display: flex; gap: 10px; align-items: flex-start; }
.cert-notice a { color: inherit; text-decoration: underline; font-weight: 600; }
blockquote { margin: 8px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--line); color: var(--text); }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); vertical-align: middle; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.info { background: var(--brand-soft); color: var(--heading); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 1px dashed var(--field-line); border-radius: var(--radius); margin: 14px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips.center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.chip.info { background: var(--brand-soft); color: var(--heading); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.plain { background: var(--surface-2); color: var(--text-2); }
.chip.tiny { font-size: 0.66rem; padding: 2px 8px; background: var(--surface); color: var(--heading); border: 1px solid var(--current); border-radius: 4px; }

.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 2.4rem; margin-top: 0.2em; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 52ch; }
.band { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--brand-soft); border: 1px solid var(--brand-soft-2); border-radius: var(--radius); padding: 16px; margin: 16px 0; flex-wrap: wrap; }
.band h2 { margin: 0; }
.grid > .card { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); }
.course-card:hover { text-decoration: none; border-color: var(--field-line); }
.course-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.course-card .cover { aspect-ratio: 16 / 9; background: radial-gradient(circle at 85% 20%, rgba(13, 148, 136, 0.55), transparent 45%), linear-gradient(135deg, #1e1b4b, #312e81 55%, #4338ca) center / cover; display: grid; place-items: center; color: #fff; font-family: var(--font-serif); font-size: 3rem; font-weight: 600; }
.course-card .cover[style] { background-size: cover; background-position: center; }
.course-card .cover[style] span { display: none; }
.course-card .cover.bundle { background: radial-gradient(circle at 15% 80%, rgba(67, 56, 202, 0.6), transparent 50%), linear-gradient(135deg, #134e4a, #0f766e); }
.course-card .body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.course-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; line-height: 1.2; color: var(--heading); }
.course-card .body > p { margin: 0; }
.course-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.course-card .facts-line { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 0.88rem; }
.course-progress h3 { margin-top: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; }
.course-progress h3 a { color: var(--heading); }

.course-head { padding: 8px 0; }
.course-head h1 { font-size: 2.3rem; margin: 0.35em 0 0.3em; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); align-items: center; margin: 8px 0; }
.byline > span { display: inline-flex; gap: 6px; align-items: center; }
.byline strong { color: var(--text); }
.split { display: grid; gap: 16px; }
.buy { margin: 0; order: -1; }
.buy .price { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--heading); margin-bottom: 10px; text-align: center; }
.buy .price:empty { display: none; }
.buy .price small { display: block; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 340px; align-items: start; }
  .buy { order: 0; position: sticky; top: 76px; }
}
.prose { overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.2em; }
.prose h1, .prose h2 { font-family: var(--font-serif); font-weight: 600; }
.prose pre { background: var(--brand-soft); padding: 12px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.reading { max-width: 68ch; font-size: 1.0625rem; line-height: 1.65; color: var(--text-2); }
.reading strong { color: var(--text); }
.reading > :first-child { margin-top: 0; }
.reading li + li { margin-top: 4px; }

.module-card { padding: 0; overflow: hidden; }
.module-card > header { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.module-card > header h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; }
.curriculum ol { list-style: none; padding: 0; margin: 0; }
.curriculum li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.curriculum li .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.curriculum li .grow small { color: var(--muted); }
.curriculum li.done .lt { color: var(--muted); }
.kind { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--heading); flex: none; }
.kind.done { background: var(--ok-fill); color: var(--on-ok); border-radius: 999px; }

.list { list-style: none; padding: 0; margin: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px 8px; align-items: center; flex-wrap: wrap; }
.messages li.unread a strong::before { content: "● "; color: var(--brand); }
.messages li a { color: var(--text); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
dl.facts.inline { grid-template-columns: repeat(auto-fit, minmax(80px, auto) minmax(40px, 1fr)); }
dl.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
dl.totals dd { margin: 0; text-align: right; }

.player-grid { display: grid; gap: 8px; }
.player-main { min-width: 0; }
@media (min-width: 960px) {
  .player-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
  .player-side { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; padding-right: 4px; }
  .player-side .module-head { margin-top: 0; }
}
.video-frame { margin: 4px 0 18px; }
.video-shell { position: relative; background: var(--player); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid #1e293b; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.video-shell:fullscreen { border-radius: 0; border: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.video-shell video, .video-shell iframe { width: 100%; height: 100%; display: block; border: 0; background: var(--player); }
.watermark { position: absolute; top: 12%; left: 8%; color: rgba(255, 255, 255, 0.3); font-size: 0.8rem; pointer-events: none; user-select: none; animation: drift 47s linear infinite alternate; text-shadow: 0 0 2px rgba(0, 0, 0, 0.5); z-index: 3; }
@keyframes drift { 0% { top: 10%; left: 6%; } 33% { top: 70%; left: 60%; } 66% { top: 30%; left: 40%; } 100% { top: 80%; left: 10%; } }
@media (prefers-reduced-motion: reduce) { .watermark { animation: none; } }
.video-chip { position: absolute; top: 10px; right: 10px; z-index: 2; background: #312e81; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.25); transition: opacity 0.2s; }
.video-shell.custom:not(.show):not(.paused) .video-chip { opacity: 0; }
.vp-big { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 68px; height: 56px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.35); background: #312e81; color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; transition: opacity 0.2s; }
.vp-big svg { width: 28px; height: 28px; }
.vp-big:hover { background: #4338ca; }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px 12px 8px; background: linear-gradient(to bottom, transparent, rgba(2, 6, 23, 0.88) 55%); color: #fff; transition: opacity 0.2s; }
.video-shell.custom:not(.show):not(.paused) .vp-bar, .video-shell.custom:not(.show):not(.paused) .vp-big { opacity: 0; pointer-events: none; }
.video-shell.custom:not(.paused):not(:hover) .vp-big { opacity: 0; }
.video-shell.custom.show:not(.paused) .vp-big { opacity: 0.9; }
.vp-row { display: flex; align-items: center; gap: 6px; }
.vp-spacer { flex: 1; }
.vp-time { font-size: 0.82rem; font-variant-numeric: tabular-nums; font-weight: 600; padding: 0 4px; white-space: nowrap; }
.vp-btn { min-width: 40px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(15, 23, 42, 0.75); color: #fff; font: inherit; font-size: 0.82rem; font-weight: 700; display: inline-grid; place-items: center; cursor: pointer; }
.vp-btn:hover { background: #312e81; }
.vp-btn[aria-pressed="true"] { background: #fff; color: #0f172a; }
.vp-play, .vp-full { padding: 0; width: 40px; border-color: transparent; background: transparent; }
.video-shell :focus-visible { outline: 3px solid #a5b4fc; outline-offset: 1px; }
.vp-seek { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; min-height: 0; padding: 0; margin: 0 0 4px; border: 0; background: transparent; cursor: pointer; --fill: 0%; }
.vp-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(to right, #a5b4fc var(--fill), rgba(255, 255, 255, 0.35) var(--fill)); }
.vp-seek::-moz-range-track { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.35); }
.vp-seek::-moz-range-progress { height: 5px; border-radius: 999px; background: #a5b4fc; }
.vp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5.5px; border-radius: 50%; background: #fff; border: 2px solid #312e81; }
.vp-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #312e81; }
.vp-seek:focus { outline: none; }
.vp-seek:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #a5b4fc; }

.lesson-head { margin: 8px 0 4px; }
.lesson-head h1 { font-size: 2.15rem; line-height: 1.12; margin: 14px 0 10px; }
.lesson-byline { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); margin: 0 0 16px; align-items: center; }
.lesson-byline > span { display: inline-flex; gap: 6px; align-items: center; }
.lesson-byline strong { color: var(--text); }
.module-progress { padding: 16px 18px 14px; margin: 0 0 20px; }
.mp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--text); }
.mp-label .icon { color: var(--heading); }
.module-progress .progress { margin: 12px 0 2px; }

.tablist { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; }
.tablist [role="tab"] { padding: 12px 2px 10px; color: var(--muted); font-weight: 600; font-size: 1rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tablist [role="tab"]:hover { color: var(--heading); text-decoration: none; }
.tablist [role="tab"][aria-selected="true"] { color: var(--heading); border-bottom-color: var(--heading); }
.tabset:not(.js) .tablist [role="tab"] { color: var(--heading); }
.tabset:not(.js) .tabpanel + .tabpanel { margin-top: 28px; }
.tabpanel:focus-visible { outline-offset: 4px; }
.digest { padding: 18px 18px 20px; margin-top: 0; }
.digest-title { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; font-size: 1.1rem; color: var(--text); }
.digest-title .icon { color: var(--heading); }
.overview > .reading, .overview > .quiz, .overview > .notice { margin-top: 0; }
.syllabus-module h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; margin: 18px 0 10px; }
.syllabus-module:first-child h3 { margin-top: 4px; }

.module-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 28px 0 12px; flex-wrap: wrap; }
.module-head h2 { margin: 0; }
.module-head p { margin: 2px 0 0; font-weight: 600; }
.lesson-rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.row-link { display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); }
a.row-link:hover { text-decoration: none; border-color: var(--field-line); }
.row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.row-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.row-meta { font-size: 0.85rem; color: var(--muted); }
.row-end { color: var(--muted); display: grid; place-items: center; }
.row-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; justify-self: center; }
.row-icon.done { background: var(--ok-fill); color: var(--on-ok); }
.row-icon.num { border-radius: 8px; background: var(--brand-soft); color: var(--heading); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.row-icon.locked { border-radius: 8px; color: var(--locked); background: var(--surface-2); }
.row-icon.current { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); }
.lesson-row.done .row-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--locked); }
.lesson-row.current .row-link { background: var(--brand-soft); border: 2px solid var(--current); box-shadow: inset 6px 0 0 var(--brand); padding: 13px 13px 13px 18px; }
.lesson-row.current .row-title { color: var(--heading); font-weight: 700; }
.lesson-row.current .row-meta { color: var(--heading); font-weight: 600; }
.lesson-row.current .row-end { color: var(--heading); }
.lesson-row.locked .row-link { background: var(--bg); border-style: dashed; border-color: var(--locked); cursor: not-allowed; }
.lesson-row.locked .row-title, .lesson-row.locked .row-meta { color: var(--locked-text); font-weight: 500; }
.lesson-row.locked .row-end { color: var(--locked); }

.lesson-bar { position: sticky; bottom: 0; z-index: 15; margin: 28px -16px -48px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05); }
.lesson-bar-inner { display: flex; gap: 12px; align-items: stretch; max-width: 1120px; margin: 0 auto; }
.lesson-bar .btn { min-height: 52px; }
.lesson-bar .grow, .lesson-bar form { flex: 1; display: flex; }
.lesson-bar form .btn { width: 100%; }
.lesson-page .foot { padding-top: 16px; }
@media (min-width: 960px) {
  .lesson-bar { margin: 28px 0 -24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
}
.lesson-actions { display: flex; justify-content: space-between; gap: 8px; margin: 20px 0; align-items: center; flex-wrap: wrap; }
.outline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tick { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); flex: none; }

.quiz-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 0 0 16px; }
.quiz-facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.quiz-facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.quiz-facts dd { margin: 2px 0 0; font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--heading); }
.quiz .question, .review .question { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.question legend, .question h3 { font-weight: 700; font-size: 1.08rem; line-height: 1.4; margin: 0 0 10px; color: var(--text); }
.quiz .question legend { float: left; width: 100%; }
.quiz .question legend + * { clear: both; }
.qn { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 4px; }
.q-head .qn { margin: 0; }
.review .question.right { border-left: 4px solid var(--ok-fill); }
.review .question.wrong { border-left: 4px solid var(--warn-fill); }
.mark { float: right; }
.answers { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.answers li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); }
.ans-mark { width: 18px; flex: none; display: grid; place-items: center; padding-top: 2px; }
.answers li.correct { color: var(--ok); font-weight: 700; background: var(--ok-wash); }
.answers li.picked:not(.correct) { color: var(--bad); background: var(--bad-soft); }
.answers li.picked:not(.correct) > span:last-child { text-decoration: line-through; }
.result { text-align: center; padding: 24px 18px; color: var(--text); }
.result .score-ring { --ring: var(--warn-fill); width: 136px; height: 136px; margin: 14px auto 6px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, var(--surface) 80%, transparent 81%), conic-gradient(var(--ring) calc(var(--p) * 1%), var(--line) 0); }
.result.ok .score-ring { --ring: var(--ok-fill); }
.result .score { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 600; }
.result.ok .score { color: var(--ok); }
.result.warn .score { color: var(--warn); }
.result h1 { margin: 6px 0 12px; }
.result .row { margin-top: 18px; }
.review > h2 { margin-top: 28px; }

.live .when { font-size: 1.1rem; font-weight: 600; }
.live .btn { margin: 4px 4px 4px 0; }
.scorm-shell iframe { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.scorm-shell:fullscreen iframe { height: 100vh; border-radius: 0; }

.gateway-page .test-banner { background: var(--warn-soft); color: var(--warn-ink); font-weight: 700; text-align: center; border-radius: 8px; padding: 8px; margin-bottom: 12px; }
body.bare .wrap { padding-top: 24px; }
.steps li { margin: 10px 0; }
pre.bank { white-space: pre-wrap; background: var(--brand-soft); padding: 12px; border-radius: 10px; font-size: 0.95rem; }
.ref { font-size: 1.05rem; font-weight: 700; }

.cert-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cert-card { margin: 0; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--ok-fill); }
.cert-card .seal { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.cert-card h3 { margin: 4px 0 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.cert-card .row { margin-top: 8px; align-items: center; }
.verify { border-radius: var(--radius); padding: 20px 18px; margin-top: 18px; text-align: center; }
.verify.ok { color: var(--text); background: var(--ok-wash); border: 1px solid var(--ok-soft); border-top: 4px solid var(--ok-fill); }
.verify.bad { background: var(--bad-soft); color: var(--bad); }
.verify .seal { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 999px; display: grid; place-items: center; background: var(--ok-fill); color: var(--on-ok); }
.verify h2 { margin: 10px 0 4px; font-family: var(--font-serif); font-weight: 600; font-size: 2rem; color: var(--heading); }
.verify.bad h2 { color: var(--bad); }
.verify h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; margin: 4px 0 12px; }
.verify dl.facts { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 8px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.tabs a.active { background: var(--brand); color: var(--brand-ink); }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.title-row h1 { margin-bottom: 0.3em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat strong { display: block; font-size: 1.4rem; font-family: var(--font-serif); color: var(--heading); }
.stat span { color: var(--muted); font-size: 0.85rem; }
.section-card .section-title { font-weight: 700; }
.lesson-list { list-style: none; padding: 0; margin: 10px 0; }
.lesson-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lesson-list li > a { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 600; grid-column: 1; }
.lesson-list li > .muted { grid-column: 1; padding-left: 38px; }
.lesson-list li > .row { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; gap: 4px; }
.add-lesson select { flex: 0 1 150px; }
.question-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.question-edit summary { cursor: pointer; font-weight: 600; }
.danger-zone { border-color: var(--bad-soft); }
.upload-progress { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.upload-progress progress { flex: 1; height: 10px; }
details.mail summary { cursor: pointer; }

.table-wrap { overflow-x: auto; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg); }
td .progress { min-width: 80px; }
@media (max-width: 640px) {
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap table { border: 0; background: none; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; padding: 6px 0; }
  .table-wrap td { border: 0; padding: 6px 14px; display: grid; grid-template-columns: 38% 1fr; gap: 8px; }
  .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; font-weight: 600; }
  .table-wrap td[data-label=""] { grid-template-columns: 1fr; }
  .table-wrap td[data-label=""]::before { display: none; }
}
