/* VL Review — Vetter Learning brand (Brand & Logo Guidelines 2025 rev; company brain).
   Palette: Teal #347B74 (headings), dark teal #265B55 (bars/buttons, the VL Brand Table header),
   Light Teal #F2F6F6 (bands), Light Grey #636466 (secondary text), Dark Grey #222222 (text),
   Vetter Blue #002439 (focus ring), Coral #ED5453 (Fail: fill/stripe only, never text on white),
   Gold #F8AC1A (Open: fill with dark text).
   Every text/background pair used here is >= 4.5:1; see README "Contrast". */

@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url(fonts/Roboto-Regular.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url(fonts/Roboto-Medium.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url(fonts/Roboto-Bold.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 900; font-display: swap; src: url(fonts/Roboto-Black.woff2) format("woff2"); }
@font-face { font-family: "Roboto Condensed"; font-weight: 400; font-display: swap; src: url(fonts/RobotoCondensed-Regular.woff2) format("woff2"); }

:root {
  --teal: #347B74;
  --teal-dark: #265B55;
  --teal-light: #F2F6F6;
  --teal-line: #C9DAD8;
  --grey: #636466;
  --grey-line: #C7C8CA;
  --ink: #222222;
  --blue: #002439;
  --coral: #ED5453;
  --coral-ink: #B7312F;     /* coral darkened to 6:1 for Fail text */
  --coral-wash: #FDECEC;
  --gold: #F8AC1A;
  --gold-wash: #FFF4DD;
  --white: #FFFFFF;
  --player-bg: #222222;
  --sidebar-w: 430px;
  --radius: 6px;
  --font: "Roboto", "Segoe UI", Arial, sans-serif;
  --font-cond: "Roboto Condensed", "Roboto", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
/* The hidden attribute must always win. Without this, a rule like ".player-msg { display: grid }"
   overrides it, and an invisible empty layer sat over the course catching every mouse click
   (found by Jonathan 2026-10-13). */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--white);
  display: flex; flex-direction: column;
}

/* Focus: a 3px Vetter Blue ring on light surfaces, white+gold on dark ones. Never removed. */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.on-dark :focus-visible, .btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--blue); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--teal-dark); color: var(--white); padding: 8px 14px; border-radius: var(--radius); font-weight: 700; }
.skip:focus { top: 8px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 8px 16px; min-height: 56px;
  background: var(--white); border-bottom: 4px solid var(--teal-dark); flex-wrap: wrap;
}
.topbar .logo { height: 30px; width: auto; display: block; }
.topbar .product { font-weight: 900; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-dark);
  border-left: 2px solid var(--teal-line); padding-left: 14px; }
.topbar .version { font-weight: 500; color: var(--ink); }
.topbar .version small { color: var(--grey); font-weight: 400; font-size: 14px; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--grey); font-size: 14px; }
.topbar .who strong { color: var(--ink); font-weight: 500; }
kbd { font-family: var(--font-cond); font-size: 13px; background: var(--teal-light); border: 1px solid var(--teal-line); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px; color: var(--ink); white-space: nowrap; }
.hotkey-hint { font-size: 13px; color: var(--grey); }

/* ---------- layout ---------- */
.layout { flex: 1; display: flex; min-height: 0; }
.player { flex: 1; min-width: 0; background: var(--player-bg); position: relative; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .player-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); padding: 24px; text-align: center; }

.sidebar {
  width: var(--sidebar-w); flex: none; display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid var(--grey-line); background: var(--white);
}
.sidebar:focus { outline: none; }

/* current-slide bar: dark teal band, white type (7.75:1) */
.slidebar { background: var(--teal-dark); color: var(--white); padding: 12px 16px 10px; }
.slidebar .eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; opacity: .92; }
.slidebar h1 { margin: 2px 0 8px; font-size: 20px; line-height: 1.25; font-weight: 900; }
.slidebar h1:focus { outline: 3px solid var(--gold); outline-offset: 3px; }
.slidebar h1 .no { font-variant-numeric: tabular-nums; }
.slidebar .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slidebar label { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.slidebar input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); }
.slidebar .status-line { font-size: 13px; margin-top: 6px; min-height: 1.2em; }

/* ---------- tabs ---------- */
.tabs { display: flex; border-bottom: 1px solid var(--grey-line); background: var(--teal-light); }
.tabs [role=tab] {
  flex: 1; font: 500 15px var(--font); color: var(--ink); background: transparent; border: 0; padding: 11px 8px 9px;
  border-bottom: 4px solid transparent; cursor: pointer;
}
.tabs [role=tab][aria-selected=true] { color: var(--teal-dark); font-weight: 700; border-bottom-color: var(--teal); background: var(--white); }
.tabs [role=tab]:hover { background: var(--white); }
.tabpanel { flex: 1; overflow: auto; padding: 4px 16px 24px; }
.tabpanel[hidden] { display: none; }

/* ---------- sections ---------- */
h2 { font-size: 17px; font-weight: 700; color: var(--teal); margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--teal-light); }
h3 { font-size: 15px; font-weight: 500; color: var(--ink); margin: 12px 0 6px; }
.muted { color: var(--grey); }
.small { font-size: 13px; }
p { margin: 6px 0; }

/* ---------- badges (text + shape, never color alone) ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font: 500 12.5px var(--font); padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.badge.code { font-family: var(--font-cond); background: var(--teal-light); border-color: var(--teal-line); color: var(--teal-dark); border-radius: 4px; }
.badge.fail { background: var(--coral); color: var(--ink); }
.badge.pass { background: var(--teal-light); color: var(--teal-dark); border-color: var(--teal); }
.badge.na { background: #EEEEEF; color: var(--ink); border-color: var(--grey-line); }
.badge.open { background: var(--gold); color: var(--ink); }
.badge.fixed { background: var(--white); color: var(--teal-dark); border-color: var(--teal-dark); border-style: dashed; }
.badge.reverified { background: var(--teal-dark); color: var(--white); }

/* ---------- done / fixes ---------- */
.done { background: var(--teal-light); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 10px 12px; }
.done .codes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fix { border-top: 1px solid var(--teal-line); padding-top: 8px; margin-top: 8px; }
.fix .verlist { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }

/* ---------- findings ---------- */
.findings { list-style: none; margin: 0; padding: 0; }
.finding { border: 1px solid var(--grey-line); border-left: 6px solid var(--grey-line); border-radius: var(--radius); padding: 8px 10px; margin: 8px 0; }
.finding.is-fail { border-left-color: var(--coral); }
.finding.is-fail.is-reverified { border-left-color: var(--teal-dark); }
.finding.is-pass { border-left-color: var(--teal); }
.finding .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--grey); }
.finding .note { margin: 6px 0; white-space: pre-wrap; }
.finding .shot img { max-width: 100%; max-height: 140px; border: 1px solid var(--grey-line); border-radius: 4px; display: block; }
.finding .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.empty { color: var(--grey); font-style: italic; margin: 6px 0; }

/* ---------- form ---------- */
form.add { margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
legend, label.field { display: block; font-weight: 500; margin-bottom: 4px; }
.hint { display: block; font-size: 13px; color: var(--grey); margin: -2px 0 4px; font-weight: 400; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: 6px 12px; border: 1px solid var(--teal-dark); border-radius: 999px; background: var(--white); color: var(--teal-dark); font-weight: 500; cursor: pointer; }
.choice input:checked + span { background: var(--teal-dark); color: var(--white); }
.choice input:checked + span::before { content: "\2713\00a0"; }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.choice.fail input:checked + span { background: var(--coral); color: var(--ink); border-color: var(--coral-ink); }
select, textarea, input[type=text] {
  width: 100%; font: 400 15px var(--font); color: var(--ink); background: var(--white);
  border: 1px solid var(--grey); border-radius: var(--radius); padding: 7px 9px;
}
textarea { min-height: 84px; resize: vertical; }
[aria-invalid=true] { border-color: var(--coral-ink); border-width: 2px; }
.error { color: var(--coral-ink); font-weight: 500; font-size: 13.5px; margin: 4px 0 0; }
.error:empty { display: none; }
.lock { background: var(--gold-wash); border: 1px solid var(--gold); border-radius: var(--radius); padding: 8px 10px; margin: 8px 0 0; font-size: 14px; }
.lock[hidden] { display: none; }

.shotzone { border: 2px dashed var(--teal-line); border-radius: var(--radius); padding: 10px; background: var(--teal-light); }
.shotzone.has-shot { border-style: solid; }
.shotzone img { max-width: 100%; max-height: 160px; display: block; margin-bottom: 6px; border-radius: 4px; }
.shotzone input[type=file] { font: 400 14px var(--font); max-width: 100%; }

.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
button { font: 500 15px var(--font); border-radius: var(--radius); padding: 8px 14px; cursor: pointer; }
.btn-primary { background: var(--teal-dark); color: var(--white); border: 2px solid var(--teal-dark); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); }
.btn-secondary { background: var(--white); color: var(--teal-dark); border: 2px solid var(--teal-dark); }
.btn-secondary:hover { background: var(--teal-light); }
.btn-small { font-size: 13.5px; padding: 4px 10px; border-width: 1px; }
.btn-onbar { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.75); font-size: 14px; padding: 4px 10px; }
.btn-onbar:hover { background: rgba(255,255,255,.12); }
button[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- all slides table ---------- */
table.slides { width: 100%; border-collapse: collapse; font-size: 14px; }
table.slides caption { text-align: left; font-weight: 500; padding: 4px 0 8px; color: var(--grey); caption-side: top; }
table.slides th { background: var(--teal-dark); color: var(--white); font-weight: 500; text-align: left; padding: 6px; position: sticky; top: 0; font-size: 13px; }
table.slides td { padding: 4px 6px; border-bottom: 1px solid var(--grey-line); vertical-align: top; }
table.slides tbody tr:nth-child(even) td { background: var(--teal-light); }
table.slides tr.current td { box-shadow: inset 0 2px 0 var(--teal), inset 0 -2px 0 var(--teal); font-weight: 500; }
table.slides td.cov { text-align: center; white-space: nowrap; font-family: var(--font-cond); }
.linkbtn { background: none; border: 0; padding: 2px 4px; color: var(--teal-dark); text-decoration: underline; font: 700 14px var(--font); font-variant-numeric: tabular-nums; }
.cov-fail { color: var(--coral-ink); font-weight: 700; }
.cov-fixed { color: var(--teal-dark); }
.cov-pass { color: var(--teal-dark); }
.cov-none { color: var(--grey); }
.completions { list-style: none; padding: 0; margin: 6px 0 10px; font-size: 14px; }

a { color: var(--teal-dark); }

/* ---------- narrow screens: stack ---------- */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .player { min-height: 56vh; }
  .sidebar { width: 100%; border-left: 0; border-top: 1px solid var(--grey-line); }
  .hotkey-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- changes seen in the file (Auto-Log "AI-observed" rows) ---------- */
ul.observed { list-style: none; margin: 4px 0 0; padding: 0; }
ul.observed li { padding: 5px 0; border-bottom: 1px solid var(--teal-light); font-size: 14px; }
ul.observed li:last-child { border-bottom: 0; }


/* ---------- account menu (top bar) ---------- */
.account { position: relative; }
.account-btn { background: var(--white); color: var(--ink); border: 1px solid var(--grey-line); font: 500 14px var(--font); padding: 5px 10px; }
.account-btn:hover { background: var(--teal-light); }
.account-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; background: var(--white);
  border: 1px solid var(--grey-line); border-top: 4px solid var(--teal-dark); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.14); padding: 4px 0; }
.account-menu .account-meta { margin: 0; padding: 8px 14px 10px; font-size: 13px; color: var(--grey); border-bottom: 1px solid var(--grey-line); }
.account-menu a, .account-menu button { display: block; width: 100%; text-align: left; padding: 9px 14px; background: none; border: 0; border-radius: 0;
  font: 400 15px var(--font); color: var(--ink); text-decoration: none; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--teal-light); }

/* ---------- collapsible section heading (disclosure button inside the h2) ---------- */
.disclosure { display: flex; width: 100%; align-items: baseline; gap: 8px; flex-wrap: wrap; background: none; border: 0; padding: 2px 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.disclosure::before { content: "\25B8"; font-size: 13px; color: var(--teal-dark); width: 12px; flex: none; }
.disclosure[aria-expanded=true]::before { content: "\25BE"; }
.disclosure:hover .disc-label { text-decoration: underline; }
.disc-summary { font: 400 13.5px var(--font); color: var(--grey); }

/* ---------- keyboard pass: mouse shield over the course ---------- */
.mouse-shield { position: absolute; inset: 0; z-index: 5; cursor: not-allowed; }
.mouse-shield .banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px);
  background: var(--teal-dark); color: var(--white); padding: 6px 14px; border-radius: 999px; font: 500 13.5px var(--font);
  text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; }

/* ---------- plain pages (course list, dashboard, sign-in code) ---------- */
body.page { display: block; background: var(--teal-light); }
.page-main { max-width: 760px; margin: 28px auto 48px; padding: 0 16px; }
.page-main.wide { max-width: 1180px; }
.page-main:focus { outline: none; }
.card, .panel { background: var(--white); border: 1px solid var(--grey-line); border-top: 6px solid var(--teal-dark); border-radius: var(--radius); padding: 18px 22px; }
.panel { border-top-width: 4px; margin: 12px 0; }
.page h1 { font-weight: 900; font-size: 26px; margin: 0 0 6px; color: var(--ink); }
.page h2 { font-size: 19px; margin-top: 30px; }
.dash-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.dash-head h1 { margin-right: auto; }
a.btn-secondary, a.btn-primary { display: inline-block; text-decoration: none; border-radius: var(--radius); padding: 4px 10px; font: 500 13.5px var(--font); }
.buttons { align-items: center; }
.choices.stack { flex-direction: column; gap: 6px; }
.choice-row { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.choice-row input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--teal-dark); flex: none; }
.panel.result input[type=text] { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; margin: 6px 0; }

/* courses + donuts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--grey); margin: 0 0 10px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.sw-pass { background: #265B55; }
.sw-prob { background: repeating-linear-gradient(45deg, #ED5453 0 3px, #B7312F 3px 5px); }
.sw-none { background: #8C8E90; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 14px; }
.course-card { background: var(--white); border: 1px solid var(--grey-line); border-left: 5px solid var(--teal-dark); border-radius: var(--radius); padding: 14px 16px; }
.course-card h3 { margin: 0 0 4px; font-size: 16px; }
.course-card h3 .code { font-family: var(--font-cond); color: var(--teal-dark); }
.donuts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 6px; }
.donut { margin: 0; display: flex; gap: 10px; align-items: center; }
.donut svg { flex: none; }
.donut .slice:hover { stroke-width: 19; }
.donut-num { font: 900 20px var(--font); fill: var(--ink); }
.donut-sub { font: 400 11px var(--font); fill: var(--grey); }
.donut figcaption { font-size: 13.5px; }
.donut .counts { list-style: none; margin: 4px 0 0; padding: 0; }
.donut .counts li { white-space: nowrap; line-height: 1.6; }

/* tables */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); border: 1px solid var(--grey-line); }
table.data th[scope=col] { background: var(--teal-dark); color: var(--white); text-align: left; font-weight: 500; padding: 7px 8px; font-size: 13px; }
table.data td, table.data th[scope=row] { padding: 7px 8px; border-bottom: 1px solid var(--grey-line); text-align: left; vertical-align: top; font-weight: 400; }
table.data th[scope=row] { font-weight: 500; }
table.data tbody tr:nth-child(even) > * { background: var(--teal-light); }
@media (max-width: 760px) { table.data { display: block; overflow-x: auto; } }

/* activity */
ol.activity { list-style: none; padding: 0; margin: 0; background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); }
ol.activity li { padding: 7px 12px; border-bottom: 1px solid var(--teal-light); font-size: 14px; }
ol.activity time { color: var(--grey); font-variant-numeric: tabular-nums; display: inline-block; min-width: 9.5em; }

/* sign in on another device */
dialog.pair-dialog { border: 1px solid var(--grey-line); border-top: 6px solid var(--teal-dark); border-radius: var(--radius); padding: 18px 22px; max-width: 460px; width: calc(100% - 32px); }
dialog.pair-dialog::backdrop { background: rgba(0, 36, 57, .45); }
dialog.pair-dialog h2 { margin-top: 0; }
.pair-code { font: 900 34px Consolas, "Cascadia Mono", monospace; letter-spacing: .14em; color: var(--teal-dark); text-align: center; margin: 10px 0; }
