/* LebesaBooks training site. Brand: navy #0f1930, gold #c8a24a, the litema band, Space Grotesk and Inter. */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); }

:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #eceff5; --fg: #1a2233; --muted: #4c576d; --line: #dbe1ec;
  --brand: #1d3a6e; --gold: #a8842f; --gold-ink: #241800; --gold-soft: #f3ead3; --focus: #1d3a6e;
  --ok: #1f7a4d; --ok-soft: #e1f3ea; --bad: #b3261e; --bad-soft: #fbe5e3; --info-soft: #e7ecf6;
  --navy: #0f1930; --navy-2: #16223f; --gold-hi: #e8c76f; --gold-brand: #c8a24a;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px; --shadow: 0 1px 2px rgb(15 25 48 / 6%), 0 10px 30px rgb(15 25 48 / 8%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #070b14; --surface: #0f1626; --surface-2: #1a2440; --fg: #e8edf8; --muted: #a9b6d0; --line: #2c3a5e;
  --brand: #6ea8ff; --gold: #c8a24a; --gold-ink: #0a1226; --gold-soft: #2a2414; --focus: #6ea8ff;
  --ok: #5fd39a; --ok-soft: #12301f; --bad: #ff8a80; --bad-soft: #3a1513; --info-soft: #1a2440;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 35%);
  color-scheme: dark;
} }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--body); }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { width: min(1360px, 100% - 32px); margin-inline: auto; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; }
.small { font-size: 12.5px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.litema { height: 10px; background: repeating-linear-gradient(-45deg, var(--gold-brand) 0 14px, transparent 14px 28px); opacity: .85; }

/* ---------------------------------------------------------------- sign-in (always the dark brand look) */
.auth { min-height: 100vh; background: radial-gradient(120% 90% at 0% 0%, #1b2b52 0%, var(--navy) 55%, #0a1122 100%); color: #e8edf8; color-scheme: dark; position: relative; overflow-x: hidden; }
.auth__band { position: absolute; inset: 0 0 auto 0; height: 12px; background: repeating-linear-gradient(-45deg, var(--gold-brand) 0 16px, transparent 16px 32px); }
.auth__band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgb(232 199 111 / 55%), transparent); }
.auth__grid { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); }
.auth__hero { padding: clamp(48px, 8vw, 110px) clamp(24px, 6vw, 96px) 40px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.auth__hero::before { content: ""; position: absolute; right: -80px; top: 18%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgb(200 162 74 / 16%), transparent 65%); pointer-events: none; }
.auth__brand { display: flex; align-items: center; gap: 14px; }
.auth__brand img { border-radius: 14px; box-shadow: 0 8px 30px rgb(0 0 0 / 45%), 0 0 0 1px rgb(232 199 111 / 25%); }
.auth__word { font: 700 26px/1 var(--display); letter-spacing: -0.01em; }
.auth__kicker { margin: 34px 0 10px; font: 600 12.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-hi); }
.auth__title { font: 600 clamp(30px, 3.6vw, 48px)/1.08 var(--display); max-width: 15ch; text-wrap: balance; }
.auth__sub { margin: 18px 0 0; color: #b9c4dc; max-width: 46ch; font-size: 16.5px; }
.auth__facts { list-style: none; display: flex; gap: 14px; padding: 0; margin: 34px 0 0; flex-wrap: wrap; }
.auth__facts li { padding: 14px 18px; border: 1px solid rgb(232 199 111 / 22%); border-radius: 12px; background: rgb(255 255 255 / 3%); min-width: 132px; }
.auth__facts b { display: block; font: 600 26px/1 var(--display); color: var(--gold-hi); }
.auth__facts span { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: #a9b6d0; }
.auth__credit { margin-top: auto; padding-top: 40px; font-size: 13px; color: #7f8db0; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 48px clamp(16px, 4vw, 56px); background: linear-gradient(180deg, rgb(255 255 255 / 2%), rgb(255 255 255 / 0%)); border-left: 1px solid rgb(232 199 111 / 10%); }
.auth__card { width: min(440px, 100%); padding: 38px 36px 30px; border-radius: 20px; background: rgb(14 22 42 / 78%); border: 1px solid rgb(232 199 111 / 22%);
  box-shadow: 0 30px 80px rgb(0 0 0 / 45%), inset 0 1px 0 rgb(255 255 255 / 6%); backdrop-filter: blur(10px); }
.auth__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 11px; border-radius: 999px; background: rgb(200 162 74 / 12%); color: var(--gold-hi); font-size: 12px; font-weight: 600; letter-spacing: .05em; }
.auth__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 10px var(--gold-hi); }
.auth__card h2 { font: 600 28px/1.15 var(--display); }
.auth__lede { margin: 8px 0 22px; color: #a9b6d0; font-size: 14.5px; }
.auth__label { display: block; margin: 16px 0 7px; font-size: 13px; font-weight: 600; color: #cdd6ea; }
.auth__input { width: 100%; height: 48px; padding: 0 14px; border-radius: 11px; border: 1px solid #2e3d63; background: #0a1122; color: #f1f4fb; transition: border-color .15s, box-shadow .15s; }
.auth__input:focus { outline: none; border-color: var(--gold-brand); box-shadow: 0 0 0 3px rgb(200 162 74 / 25%); }
.auth__pw { position: relative; }
.auth__pw .auth__input { padding-right: 74px; }
.auth__show { position: absolute; right: 7px; top: 7px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: rgb(255 255 255 / 6%); color: #cdd6ea; font-size: 13px; cursor: pointer; }
.auth__show:hover { background: rgb(255 255 255 / 12%); }
.auth__submit { width: 100%; height: 50px; margin-top: 24px; border: 0; border-radius: 12px; cursor: pointer; font: 600 16px var(--display); letter-spacing: .01em;
  color: #1a1204; background: linear-gradient(180deg, #e2bd63, #c39a3c); box-shadow: 0 10px 26px rgb(200 162 74 / 28%), inset 0 1px 0 rgb(255 255 255 / 35%); transition: transform .12s, box-shadow .12s, filter .12s; }
.auth__submit:hover { filter: brightness(1.05); box-shadow: 0 14px 30px rgb(200 162 74 / 36%), inset 0 1px 0 rgb(255 255 255 / 35%); }
.auth__submit:active { transform: translateY(1px); }
.auth__submit:disabled { opacity: .75; cursor: progress; }
.auth__error { margin: 0 0 4px; padding: 11px 13px; border-radius: 10px; background: rgb(179 38 30 / 18%); border: 1px solid rgb(255 138 128 / 40%); color: #ffd0cc; font-size: 14px; }
.login__error { margin: 0 0 4px; padding: 11px 13px; border-radius: 10px; background: rgb(179 38 30 / 18%); border: 1px solid rgb(255 138 128 / 40%); color: #ffd0cc; font-size: 14px; }
.auth__help { margin: 18px 0 0; font-size: 13px; color: #8e9bbb; text-align: center; }
.auth__other { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgb(232 199 111 / 12%); text-align: center; }
.login__switch { color: var(--gold-hi); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.login__switch:hover { text-decoration: underline; }
.auth--admin .auth__card { border-color: rgb(232 199 111 / 40%); }
@media (max-width: 900px) {
  .auth__grid { grid-template-columns: minmax(0, 1fr); }
  .auth__hero { padding-bottom: 8px; }
  .auth__hero::before, .auth__credit { display: none; }
  .auth__title { font-size: clamp(26px, 7vw, 36px); }
  .auth__facts li { min-width: 0; flex: 1; padding: 10px 12px; }
  .auth__panel { border-left: 0; padding-top: 24px; }
  .auth__card { padding: 28px 22px 24px; }
}

/* ---------------------------------------------------------------- shared controls */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 500; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; }
.btn--gold { background: var(--gold-brand); border-color: var(--gold-brand); color: #1a1204; font-weight: 600; }
.btn--gold:hover { background: #d6b05a; }
.btn--danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn--danger:hover { background: var(--bad-soft); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.input { height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); width: 100%; }
.input--sm { height: 36px; width: min(320px, 100%); }
.card__tools .input--sm { width: 300px; flex: 0 1 300px; min-width: 160px; }
.input:focus { outline: none; border-color: var(--gold-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-brand) 25%, transparent); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
select { height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); min-width: 220px; }
.note { font-size: 13.5px; color: var(--muted); min-height: 1.2em; margin-top: 6px; }
.note--bad { color: var(--bad); font-weight: 600; }
.adm .note:empty { display: none; }
.adm .note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- the player page */
.app__head { background: var(--surface); border-bottom: 1px solid var(--line); }
.app__headrow { padding-block: 22px 20px; display: flex; flex-wrap: wrap; gap: 16px 30px; align-items: center; }
.brand { display: flex; gap: 14px; align-items: center; min-width: 0; }
.brand img { border-radius: 12px; flex: none; }
.brand h1 { font: 700 clamp(21px, 2.6vw, 30px)/1.1 var(--display); text-wrap: balance; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.stats { margin-left: auto; display: flex; gap: 26px; flex-wrap: wrap; }
.stat b { display: block; font: 600 21px/1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who form { margin: 0; }
.who__name { font-weight: 600; font-size: 14px; padding-right: 4px; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roles { padding-block: 16px 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.roles__label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 7px 14px; font: 500 13.5px var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.app__main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 28px; padding-block: 14px 48px; }
@media (max-width: 980px) { .app__main { grid-template-columns: minmax(0, 1fr); } .stats { margin-left: 0; } }
.player { min-width: 0; }
.stage { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.stage video { width: 100%; height: 100%; background: #000; }
.mark { position: absolute; pointer-events: none; font: 600 clamp(10px, 1.2vw, 14px) var(--body); color: rgb(255 255 255 / 22%); text-shadow: 0 1px 2px rgb(0 0 0 / 35%); white-space: nowrap; transition: left 2s ease, top 2s ease; z-index: 2; }
.ep-head { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin: 18px 0 6px; }
.ep-head__text { min-width: 0; }
.kicker { font: 600 12px var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--gold); }
.ep-head h2 { font: 600 clamp(21px, 2.5vw, 29px)/1.15 var(--display); margin: 4px 0; text-wrap: balance; }
.meta { color: var(--muted); font-size: 14px; }
.tools { margin-left: auto; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 16px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 500 14px var(--body); padding: 10px 12px; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--gold); }
.panel { padding: 16px 2px 0; min-width: 0; }
.learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.learn li { display: flex; gap: 12px; }
.learn li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 7px; background: var(--gold); transform: rotate(45deg); }
.try { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--gold-soft); border: 1px solid var(--line); }
.try b { color: var(--gold); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chapters button { width: 100%; text-align: left; background: none; border: 0; color: var(--fg); font: 14px var(--body); padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 14px; }
.chapters button:hover, .chapters button.now { background: var(--surface-2); }
.chapters time, .tx time { font-variant-numeric: tabular-nums; color: var(--muted); flex: none; width: 3.4em; }
.tx { max-height: 460px; overflow: auto; padding-right: 8px; }
.tx h4 { font: 600 13px var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--gold); margin: 18px 0 6px; display: flex; gap: 10px; cursor: pointer; }
.tx h4:first-child { margin-top: 0; }
.tx p { margin: 0 0 6px; max-width: 68ch; }
.side { min-width: 0; }
.index { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.index h3 { margin: 0; padding: 14px 16px 10px; font: 600 12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); display: flex; justify-content: space-between; gap: 12px; }
.index h3 b { font-family: var(--display); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--fg); }
.index ol { list-style: none; margin: 0; padding: 4px 0; }
.row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: var(--fg); padding: 9px 16px; cursor: pointer; font: 14px var(--body); }
.row:hover { background: var(--surface-2); }
.row[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--gold); }
.row .n { font: 600 13px var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.row .t { min-width: 0; }
.row .t small { display: block; color: var(--muted); font-size: 12.5px; }
.row .d { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row[disabled] { cursor: default; opacity: .55; }
.soon { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.index-scroll { max-height: calc(100vh - 120px); overflow: auto; }
@media (min-width: 981px) { .side { position: sticky; top: 12px; align-self: start; } }
.app__foot .wrap { padding-block: 22px 34px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- admin */
.adm__main { display: grid; gap: 22px; padding-block: 20px 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font: 600 20px/1.2 var(--display); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__tools { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; }
@media (max-width: 640px) { .card__tools { flex-wrap: wrap; width: 100%; } .card__tools .input--sm { flex: 1 1 100%; width: 100%; } }
.card__lede { margin: 6px 0 16px; color: var(--muted); font-size: 14px; max-width: 80ch; }
.card--danger { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.count { font-size: 13px; color: var(--muted); }
.addform { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
@media (max-width: 860px) { .addform { grid-template-columns: minmax(0, 1fr); } }
.secret { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold-brand) 45%, var(--line)); }
.secret p { margin: 0 0 10px; }
.secret__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.secret__pw { font-size: 18px; font-weight: 600; letter-spacing: .04em; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); user-select: all; }
.table-wrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 600 11.5px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 10px 12px; white-space: nowrap; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--info-soft); color: var(--fg); }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.empty { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
