/* Copyright © 2026 Phaena Management B.V. All rights reserved.
   Proprietary and confidential. See COPYRIGHT.md in the repository root. */

/* Poppins — self-hosted (latin + latin-ext), so the course needs no external
   font request and works fully offline. Files in assets/fonts/. */
@font-face{font-family:"Poppins";font-style:italic;font-weight:400;font-display:swap;src:url("fonts/poppins-400i-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:italic;font-weight:400;font-display:swap;src:url("fonts/poppins-400i-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Poppins";font-style:italic;font-weight:600;font-display:swap;src:url("fonts/poppins-600i-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:italic;font-weight:600;font-display:swap;src:url("fonts/poppins-600i-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/poppins-400-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/poppins-400-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/poppins-500-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:500;font-display:swap;src:url("fonts/poppins-500-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("fonts/poppins-600-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("fonts/poppins-600-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/poppins-700-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/poppins-700-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:800;font-display:swap;src:url("fonts/poppins-800-latinext.woff2") format("woff2");unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:"Poppins";font-style:normal;font-weight:800;font-display:swap;src:url("fonts/poppins-800-latin.woff2") format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

/* Introductie Sparrow Statistics — Data Analyse Academie skin.
   Brand: navy #013160 + Poppins + mortarboard. Light + dark. */
:root {
  --bg: #f4f4f4; --panel: #ffffff; --ink: #1f2733; --ink-soft: #5b6675;
  --line: #e3e7ee; --line-strong: #ccd4df;
  --accent: #013160; --accent-ink: #ffffff; --accent-soft: #e7eef6;
  --accent-2: #1b6fb3;
  --ok: #1a8f57; --ok-soft: #e5f5ec; --no: #cc3d4b; --no-soft: #fdeaec;
  --code-bg: #0b213b; --code-ink: #d7e2f2; --kw: #013160;
  --sidebar: 300px; --radius: 12px; --shadow: 0 1px 3px rgba(1,49,96,.10), 0 8px 24px rgba(1,49,96,.06);
}
:root[data-theme="dark"] {
  --bg: #0d1420; --panel: #14202f; --ink: #e7ecf5; --ink-soft: #9aa7bd;
  --line: #223142; --line-strong: #2c3e52;
  --accent: #5a97d8; --accent-ink: #081019; --accent-soft: #142438; --accent-2: #7db4ec;
  --ok: #3ecf8e; --ok-soft: #13291f; --no: #ff6b7a; --no-soft: #2a1518;
  --code-bg: #08101d; --code-ink: #cdd8f0; --kw: #7db4ec;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1420; --panel: #14202f; --ink: #e7ecf5; --ink-soft: #9aa7bd;
    --line: #223142; --line-strong: #2c3e52;
    --accent: #5a97d8; --accent-ink: #081019; --accent-soft: #142438; --accent-2: #7db4ec;
    --ok: #3ecf8e; --ok-soft: #13291f; --no: #ff6b7a; --no-soft: #2a1518;
    --code-bg: #08101d; --code-ink: #cdd8f0; --kw: #7db4ec;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15.5px/1.62 "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: auto 1fr;
  grid-template-areas: "brand top" "nav main"; height: 100vh; overflow: hidden;
}

/* topbar / brand — the real Data Analyse Academie logo + a course tagline */
.brand { grid-area: brand; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  justify-content: center; padding: 12px 18px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-tag { font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--ink-soft); padding-left: 2px; }
/* the navy logo is invisible on a dark sidebar — flip it to white */
:root[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { filter: brightness(0) invert(1); } }
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar .crumbs { color: var(--ink-soft); font-size: 13px; }
.topbar .actions { display: flex; gap: 8px; }
.icon-btn { border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer;
  width: 34px; height: 34px; border-radius: 9px; font-size: 15px; }
.icon-btn:hover { background: var(--bg); }
#menu-toggle { display: none; }

/* sidebar */
#nav { grid-area: nav; overflow-y: auto; padding: 14px 12px 40px; border-right: 1px solid var(--line);
  background: var(--panel); }
.nav-progress { padding: 6px 8px 14px; }
.nav-progress .bar { height: 7px; background: var(--line); border-radius: 99px; overflow: hidden; }
.nav-progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .3s; }
.nav-progress .bar-label { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; }
.nav-mod { margin-top: 10px; }
.nav-mod-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13px;
  padding: 8px; color: var(--ink); }
.nav-mod-title .mod-num { width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; flex: none; }
.nav-mod.locked .nav-mod-title { color: var(--ink-soft); }
.nav-mod.locked .mod-num { background: var(--line); color: var(--ink-soft); }
.lock { font-size: 11px; }
.nav-sec { display: flex; align-items: center; gap: 9px; padding: 7px 8px 7px 12px; margin-left: 10px;
  border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: 13.5px; border-left: 2px solid var(--line); }
.nav-sec:hover { background: var(--bg); color: var(--ink); }
.nav-sec.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-left-color: var(--accent); }
.nav-sec.done .sec-ic { color: var(--ok); }
.nav-sec .sec-ic { width: 16px; text-align: center; font-size: 12px; }

/* main */
#main { grid-area: main; overflow-y: auto; padding: 30px clamp(20px, 5vw, 64px) 80px; }
/* Wide content column: the section spans a generous width; prose is
 * capped to a readable measure (left-aligned so it lines up with the
 * heading), while live/media blocks use the full width. */
.sec-head { max-width: 1160px; margin: 0 auto 8px; }
.sec-kicker { text-transform: uppercase; letter-spacing: .09em; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.sec-title { font-size: 31px; font-weight: 700; line-height: 1.12; margin: 6px 0 4px; letter-spacing: -.015em; }
.sec-sub { color: var(--ink-soft); }
.sec-body { max-width: 1160px; margin: 22px auto 0; }

/* readable measure for text-ish blocks */
.sec-body > .lead,
.sec-body > .blk-h,
.sec-body > .blk-p,
.sec-body > .blk-ul,
.sec-body > .blk-ol,
.sec-body > .blk-steps,
.sec-body > .callout,
.sec-body > .terms,
.sec-body > .recap,
.sec-body > .twocol,
.sec-body > .quiz,
.sec-body > .syntax,
.sec-body > .dataset,
.sec-body > .expected,
.sec-body > .sparrow-panel { max-width: 820px; }
/* the embedded GUI and live-check panels use the whole width */
.sec-body > .sgui,
.sec-body > .runcheck { max-width: 1160px; }

.lead { font-size: 17px; color: var(--ink); background: var(--accent-soft); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); padding: 14px 16px; border-radius: 10px; }
.blk-h { font-size: 20px; font-weight: 700; margin: 30px 0 8px; letter-spacing: -.01em; color: var(--accent); }
.blk-p { margin: 10px 0; }
.blk-ul, .blk-ol { margin: 10px 0; padding-left: 22px; }
.blk-ul li, .blk-ol li { margin: 5px 0; }
.blk-steps { margin: 12px 0; padding-left: 0; list-style: none; counter-reset: st; }
.blk-steps li { counter-increment: st; position: relative; padding: 8px 8px 8px 40px; margin: 6px 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.blk-steps li::before { content: counter(st); position: absolute; left: 8px; top: 8px; width: 22px; height: 22px;
  background: var(--accent); color: #fff; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

.callout { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.callout-t { font-weight: 700; font-size: 13px; margin-bottom: 3px; }

.terms { margin: 12px 0; }
.terms dt { font-weight: 700; margin-top: 12px; }
.terms dd { margin: 2px 0 0; color: var(--ink-soft); }
.recap { margin: 12px 0; display: grid; gap: 2px; }
.recap dt { font-weight: 700; margin-top: 12px; color: var(--accent); }
.recap dd { margin: 2px 0 0; }

.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.twocol-c { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; }
.twocol-h { font-weight: 700; margin-bottom: 5px; }

.kw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--line);
  padding: 1px 6px; border-radius: 5px; color: var(--kw); }
.path { font-size: .92em; color: var(--ink-soft); font-weight: 600; }

.syntax { margin: 16px 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); }
.syntax-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.syntax-cap { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.syntax-code { margin: 0; padding: 14px 16px; background: var(--code-bg); color: var(--code-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.55; overflow-x: auto; }

.dataset { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.ds-ic { font-size: 18px; }
.ds-name { font-family: ui-monospace, monospace; font-size: 13px; flex: 1; }

.sparrow-panel { margin: 16px 0; padding: 16px; border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.sp-lead { font-weight: 600; margin-bottom: 10px; }
.sp-row { display: flex; gap: 8px; }
.sp-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; }

/* interactive Sparrow lab (learner works in it) + expand mode */
.slab-spacer { flex: 1; }
.slab .sgui-frame { height: min(70vh, 680px); }
.slab--expanded { position: fixed; inset: 12px; z-index: 3000; margin: 0;
  max-width: none; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .4); }
.slab--expanded .sgui-frame { flex: 1; height: auto; }
body.slab-lock { overflow: hidden; }

details.expected { margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
details.expected summary { cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: 13.5px; list-style: none; }
details.expected summary::before { content: "▸ "; color: var(--accent); }
details.expected[open] summary::before { content: "▾ "; }
.expected-body { margin: 0; padding: 0 16px 14px; font-family: ui-monospace, monospace; font-size: 12.5px;
  color: var(--ink-soft); white-space: pre-wrap; }

.quiz { margin: 18px 0; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); }
.quiz-q { font-weight: 700; margin-bottom: 10px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt { text-align: left; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: transparent; color: var(--ink); cursor: pointer; font-size: 14.5px; }
.quiz-opt:hover:not(.locked) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.locked { cursor: default; opacity: .85; }
.quiz-opt.correct { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.quiz-opt.wrong { border-color: var(--no); background: var(--no-soft); color: var(--no); }
.quiz-fb { margin-top: 10px; font-size: 13.5px; padding: 10px 12px; border-radius: 8px; }
.quiz-fb.ok { background: var(--ok-soft); color: var(--ok); }
.quiz-fb.no { background: var(--no-soft); color: var(--no); }

/* embedded live Sparrow GUI */
.sgui { margin: 18px 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); overflow: hidden; }
.sgui-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sgui-stat { font-size: 12.5px; color: var(--ink-soft); }
.sgui-action { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--accent-soft);
  animation: sguiPulse .5s ease; }
@keyframes sguiPulse { from { background: color-mix(in srgb, var(--accent) 32%, var(--panel)); } to {} }
.sgui-action.idle { background: var(--panel); }
.sgui-action.done { background: var(--ok-soft); }
.sgui-action.reset { background: var(--bg); }
.sgui-a-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; background: var(--accent); color: var(--accent-ink); }
.sgui-action.done .sgui-a-ic { background: var(--ok); color: #fff; }
.sgui-action.open .sgui-a-ic { background: var(--accent-2); color: #fff; }
.sgui-a-body { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sgui-a-menu { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgui-action.done .sgui-a-menu { color: var(--ok); }
.sgui-a-menu:empty { display: none; }
.sgui-a-cap { font-size: 14px; color: var(--ink); font-weight: 600; }

.sgui-frame { position: relative; width: 100%; height: min(76vh, 760px); background: var(--bg); }
.sgui-iframe { width: 100%; height: 100%; border: 0; display: block; }
/* Big centred play overlay (starts / replays the demo). The overlay itself is
   click-through so the embedded app stays usable; only the button catches
   clicks. A soft radial dim behind the button keeps it readable over content. */
.sgui-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity .18s ease; z-index: 4; }
.sgui-overlay.on { opacity: 1; }
.sgui-overlay.on::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(12,14,22,.5), rgba(12,14,22,.12) 45%, transparent 62%); }
.sgui-bigplay { position: relative; pointer-events: auto; background: none; border: 0; padding: 0;
  cursor: pointer; border-radius: 50%; line-height: 0;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,.5));
  animation: sguiBigplayPulse 2.1s ease-in-out infinite;
  transition: transform .12s ease, filter .12s ease; }
.sgui-bigplay:hover { transform: scale(1.09); filter: drop-shadow(0 12px 30px rgba(255,45,45,.55)) brightness(1.08); animation: none; }
.sgui-bigplay:active { transform: scale(.96); }
@keyframes sguiBigplayPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,45,45,.5); }
  70%  { box-shadow: 0 0 0 26px rgba(255,45,45,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,45,45,0); }
}
@media (max-width: 820px) { .sgui-bigplay svg { width: 88px; height: 88px; } }
.sgui-hint { font-size: 12.5px; color: var(--ink-soft); padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg); }
@media (max-width: 820px) { .sgui-frame { height: 60vh; } }

/* YouTube-style scrubber + time readout (below the embedded app) */
.sgui-player { display: flex; align-items: center; gap: 14px; padding: 9px 16px 11px;
  background: var(--panel); border-top: 1px solid var(--line); }
.sgui-seek { position: relative; flex: 1; height: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 16%, transparent); cursor: pointer; transition: height .12s ease; }
.sgui-player:hover .sgui-seek { height: 7px; }
.sgui-seek-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: #ff2d2d; border-radius: 3px 0 0 3px; transition: width .2s linear; }
.sgui-seek-thumb { position: absolute; top: 50%; left: 0%; width: 13px; height: 13px; border-radius: 50%;
  background: #ff2d2d; box-shadow: 0 1px 3px rgba(0,0,0,.4); transform: translate(-50%, -50%);
  transition: left .2s linear, transform .12s ease; }
.sgui-player:hover .sgui-seek-thumb { transform: translate(-50%, -50%) scale(1.18); }
.sgui-seek-tick { position: absolute; top: 50%; width: 3px; height: 11px; transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--ink) 48%, transparent); border-radius: 2px; pointer-events: none; }
.sgui-player:hover .sgui-seek-tick { background: color-mix(in srgb, var(--ink) 68%, transparent); }
.sgui-seek-label { position: absolute; bottom: calc(100% + 9px); transform: translateX(-50%);
  max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 5px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 1.2;
  background: var(--ink); color: var(--bg); box-shadow: 0 3px 10px rgba(0,0,0,.28);
  pointer-events: none; opacity: 0; transition: opacity .12s ease; z-index: 5; }
.sgui-seek-label.on { opacity: 1; }
.sgui-seek-label::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink); }
.sgui-time { font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap; min-width: 84px; text-align: right; }
.sgui-pp, .sgui-speed { border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  border-radius: 8px; cursor: pointer; font: inherit; line-height: 1; flex: 0 0 auto; transition: background .12s ease; }
.sgui-pp:hover, .sgui-speed:hover { background: color-mix(in srgb, var(--ink) 9%, var(--panel)); }
.sgui-pp { width: 30px; height: 30px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.sgui-pp.is-pause { color: #ff2d2d; border-color: color-mix(in srgb, #ff2d2d 45%, var(--line-strong)); }
.sgui-speed { height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 46px; }

/* live auto-checked exercise */
.runcheck { margin: 18px 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); overflow: hidden; }
.runcheck-code { width: 100%; border: none; border-bottom: 1px solid var(--line); resize: vertical;
  background: var(--code-bg); color: var(--code-ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.55; padding: 14px 16px; display: block; }
.runcheck-code:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.runcheck-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.runcheck-stat { font-size: 12.5px; color: var(--ink-soft); }
.runcheck-out { padding: 0 12px; }
.runcheck-out:not(:empty) { padding-bottom: 10px; }
.runcheck-verdict { padding: 10px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; margin: 4px 0 10px; }
.runcheck-verdict.ok { background: var(--ok-soft); color: var(--ok); }
.runcheck-verdict.no { background: var(--no-soft); color: var(--no); }
.check { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 7px; font-size: 13.5px; }
.check + .check { border-top: 1px solid var(--line); }
.check-ic { font-weight: 800; text-align: center; }
.check.ok .check-ic { color: var(--ok); }
.check.no .check-ic { color: var(--no); }
.check-d { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink-soft); }
.runcheck-hint { padding: 10px 14px; font-size: 12.5px; color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--bg); }

/* checked exercise (a :::sparrow lab with `- check:` criteria) */
.slab-task { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; }
.slab-task-ic { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.slab-task-b b { color: var(--accent); }
.slab-check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.slab-check-stat { font-size: 13px; color: var(--ink-soft); }
.slab-check-out { padding: 0 14px 12px; }
.slab-verdict { padding: 10px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; margin: 4px 0 10px; }
.slab-verdict.ok { background: var(--ok-soft); color: var(--ok); }
.slab-verdict.no { background: var(--no-soft); color: var(--no); }
.slab-hints { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.slab-hints-t { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 4px; }
.slab-hint { font-size: 13.5px; line-height: 1.5; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-strong);
  background: var(--panel); color: var(--ink); padding: 9px 18px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color .12s, background .12s, filter .12s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.12); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.copy { padding: 6px 11px; font-size: 12.5px; }

.sec-foot { max-width: 1160px; margin: 34px auto 0; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 8px; margin-left: auto; }

/* progress: module-complete marker + certificate button */
.nav-mod.mod-complete .mod-num { background: var(--ok); color: #fff; }
.nav-cert { margin-top: 10px; width: 100%; justify-content: center; }

/* completion certificate */
.cert-scrim { position: fixed; inset: 0; z-index: 4000; background: rgba(10,14,22,.55);
  display: grid; place-items: center; padding: 20px; }
.cert-card { width: min(560px, 94vw); background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 16px; padding: 34px 34px 26px; text-align: center;
  box-shadow: var(--shadow); position: relative; }
.cert-card::before, .cert-card::after { content: ""; position: absolute; inset: 10px;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 10px; pointer-events: none; }
.cert-card::after { inset: 15px; border-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.cert-badge { font-size: 44px; line-height: 1; }
.cert-kicker { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); font-weight: 700; }
.cert-title { margin: 8px 0 14px; font-size: 22px; }
.cert-for { font-size: 13px; color: var(--ink-soft); }
.cert-name { margin: 8px auto 6px; display: block; width: 80%; text-align: center; font-size: 22px;
  font-weight: 700; border: none; border-bottom: 2px solid var(--line-strong); background: transparent; color: var(--ink);
  padding: 4px 0; font-family: Georgia, "Times New Roman", serif; }
.cert-name:focus { outline: none; border-bottom-color: var(--accent); }
.cert-sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.cert-date { margin-top: 14px; font-size: 13px; color: var(--ink-soft); font-variant: small-caps; }
.cert-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
@media print {
  body > *:not(.cert-scrim) { display: none !important; }
  .cert-scrim { position: static; background: none; padding: 0; }
  .cert-card { box-shadow: none; border-color: var(--line); }
  .no-print { display: none !important; }
}

/* responsive */
@media (max-width: 820px) {
  body { grid-template-columns: 1fr; grid-template-areas: "brand" "top" "main"; }
  #nav { position: fixed; top: 0; left: 0; width: 84%; max-width: 320px; height: 100vh; z-index: 30;
    transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  body.nav-open #nav { transform: none; }
  .brand { grid-area: brand; border-right: none; }
  #menu-toggle { display: inline-flex; }
}
