/* ============================================================
   Venice Video Models Wiki — styles (Venice brand system)
   Shares fonts with the Learn hub (/assets/fonts) and
   maps the wiki's tokens onto the brand palette. One ecosystem.
   ============================================================ */

@font-face {
  font-family: "Canela";
  src: url("/assets/fonts/Canela-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/assets/fonts/Aeonik-Light.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/assets/fonts/Aeonik-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/assets/fonts/Aeonik-RegularItalic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/assets/fonts/Aeonik-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Brand: Midnight ground, Off White ink, Venetian Blue accent */
  --bg: #0A121A;
  --bg-elev: #0F1A26;
  --bg-elev-2: #122130;
  --bg-code: #080F16;
  --border: #1C2C3A;
  --border-strong: #2A3F52;
  --text: #F7F5ED;
  --text-dim: #AEB7C0;
  --text-faint: #6E7176;
  --accent: #3C8FDD;
  --accent-hover: #5AA0E4;
  --accent-soft: rgba(60, 143, 221, 0.14);
  --accent-2: #B3D0EB;
  /* No red in the brand: "yes" reads cool (Sea), cautions read warm (Stucco) */
  --green: #B3D0EB;   /* sea-light */
  --yellow: #BEA989;  /* stucco */
  --red: #BEA989;     /* stucco (warm caution, never red) */
  --blue: #3C8FDD;    /* venetian */
  --sea: #B3D0EB;
  --mid-sea: #29526C;
  --stucco: #BEA989;
  --stucco-dim: #6E6B5F;
  --on-accent: #F7F5ED;
  --sidebar-w: 270px;
  --toc-w: 220px;
  --header-h: 68px;
  --maxw: 860px;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Aeonik", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Canela", "Iowan Old Style", Palatino, Georgia, serif;
  --display: "Canela", "Iowan Old Style", Palatino, Georgia, serif;
}

[data-theme="light"] {
  --bg: #F7F5ED;
  --bg-elev: #FFFEFA;
  --bg-elev-2: #F1EEE3;
  --bg-code: #EFEDE1;
  --border: #E4DFCF;
  --border-strong: #CFC8B2;
  --text: #0E2942;
  --text-dim: #44566A;
  --text-faint: #7C7F84;
  --accent: #125DA3;
  --accent-hover: #2A6291;
  --accent-soft: rgba(18, 93, 163, 0.10);
  --accent-2: #2A6291;
  --green: #2A6291;
  --yellow: #8A6F47;
  --red: #8A6F47;
  --blue: #125DA3;
  --sea: #2A6291;
  --mid-sea: #29526C;
  --stucco: #8A6F47;
  --stucco-dim: #BCAE92;
  --on-accent: #FFFEFA;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background:
    radial-gradient(1100px 540px at 50% -240px, rgba(60,143,221,0.10), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.header-main { display: flex; align-items: center; gap: 18px; height: var(--header-h); padding: 0 22px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .keys { height: 26px; width: auto; display: block; }
.brand .wordmark { height: 24px; width: auto; display: block; opacity: 0.96; }
.brand .div { width: 1px; height: 20px; background: var(--border-strong); }
.brand-sub { color: var(--text-faint); font-weight: 400; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; }

.header-search { flex: 1; max-width: 440px; margin: 0 auto; position: relative; }
.header-search input {
  width: 100%; height: 38px; padding: 0 46px 0 34px;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text); font-size: 14px; font-family: var(--sans); font-weight: 300;
}
.header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.header-search .si { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.header-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 11px; color: var(--text-faint);
  background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; pointer-events: none;
}

/* shared Docs / Learn switch */
.site-switch { display: flex; gap: 2px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.site-switch a { font-size: 13px; color: var(--text-dim); font-weight: 400; padding: 6px 14px; border-radius: 999px; line-height: 1; }
.site-switch a:hover { color: var(--text); text-decoration: none; }
.site-switch a.on { background: var(--accent); color: var(--on-accent); }
[data-theme="light"] .site-switch a.on { background: var(--accent); }

.try-venice { background: var(--accent); color: var(--on-accent); padding: 8px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 400; white-space: nowrap; }
.try-venice:hover { background: var(--accent-hover); text-decoration: none; color: var(--on-accent); }
.search-results {
  position: absolute; top: 46px; left: 0; right: 0;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.8); overflow: hidden; display: none; max-height: 60vh; overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 9px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:hover, .search-results a.active { background: var(--accent-soft); text-decoration: none; }
.search-results .sr-title { font-weight: 400; font-size: 14px; }
.search-results .sr-crumb { font-size: 12px; color: var(--text-faint); }
.search-results .sr-empty { padding: 14px; color: var(--text-faint); font-size: 14px; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-toggle { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; padding-top: var(--header-h); }

.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w);
  overflow-y: auto; padding: 24px 14px 60px; border-right: 1px solid var(--border);
  background: transparent;
}
.nav-group { margin-bottom: 24px; }
.nav-group h4 {
  margin: 0 0 8px; padding: 0 12px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-faint); font-weight: 400;
}
.nav-group a {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 9px;
  color: var(--text-dim); font-size: 14.5px; line-height: 1.3; border-left: 2px solid transparent;
}
.nav-group a:hover { background: var(--bg-elev); color: var(--text); text-decoration: none; }
.nav-group a.active { background: var(--bg-elev); color: var(--text); border-left-color: var(--accent); }
.nav-group a .em { display: none; }
.nav-tag { margin-left: auto; font-size: 9.5px; padding: 2px 7px; border-radius: 999px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; border: 1px solid; }
.tag-nsfw { color: var(--stucco); border-color: var(--stucco-dim); }
.tag-open { color: var(--sea); border-color: var(--mid-sea); }

.content-wrap { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; justify-content: center; }
.content { width: 100%; max-width: var(--maxw); padding: 40px 44px 120px; min-width: 0; }
.content.wide { max-width: 1120px; }

.toc {
  position: sticky; top: calc(var(--header-h) + 20px); align-self: flex-start;
  width: var(--toc-w); flex: none; padding: 24px 18px; margin-top: 20px;
  max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
}
.toc h5 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); font-weight: 400; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--text-dim); font-size: 13px; border-left: 1px solid var(--border); line-height: 1.4; }
.toc a:hover { color: var(--text); text-decoration: none; border-left-color: var(--accent); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
.toc a.lvl-3 { padding-left: 24px; }

/* ---------- Content typography ---------- */
.content h1 { font-family: var(--display); font-size: clamp(34px, 4.6vw, 48px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 14px; font-weight: 400; }
.content h2 { font-family: var(--display); font-size: 28px; letter-spacing: -0.01em; margin: 46px 0 16px; padding-top: 8px; font-weight: 400; }
.content h3 { font-family: var(--display); font-size: 21px; margin: 32px 0 10px; font-weight: 400; }
.content h4 { font-size: 13px; margin: 24px 0 8px; text-transform: uppercase; letter-spacing: .1em; color: var(--stucco); font-weight: 400; }
.content p { margin: 0 0 14px; color: var(--text-dim); }
.content ul, .content ol { margin: 0 0 16px; padding-left: 22px; color: var(--text-dim); }
.content li { margin: 5px 0; }
.content li::marker { color: var(--accent); }
.content strong { color: var(--text); font-weight: 400; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

.lead { font-size: 19px; line-height: 1.6; color: var(--text-dim); margin: 0 0 26px; max-width: 70ch; }
.breadcrumb { display: none; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 19px; border-radius: 10px; font-size: 14.5px; font-weight: 400; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 34px; }

/* inline code */
.content code {
  font-family: var(--mono); font-size: 0.86em; background: var(--bg-elev-2);
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); color: var(--text);
}
.content pre {
  background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; position: relative;
}
.content pre code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 4px 9px; border-radius: 6px;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; opacity: 0;
  transition: opacity .15s; font-family: var(--sans);
}
.content pre:hover .copy-btn, .prompt:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* prompt block */
.prompt {
  background: var(--bg-code); border: 1px solid var(--border-strong); border-left: 3px solid var(--stucco);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.6; color: var(--text-dim); white-space: pre-wrap; position: relative;
}
.prompt-label { display: block; font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--stucco); margin-bottom: 8px; font-weight: 400; }

/* callouts — left-border color system, no emoji (Sea = info, Stucco = caution) */
.callout { border: 1px solid var(--border); border-left: 3px solid var(--mid-sea); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; background: var(--bg-elev); }
.callout p:last-child { margin-bottom: 0; }
.callout p { color: var(--text-dim); }
.callout-title { font-family: var(--display); font-weight: 400; font-size: 17px; margin-bottom: 5px; color: var(--text); }
.callout.info { border-left-color: var(--mid-sea); }
.callout.tip { border-left-color: var(--mid-sea); }
.callout.warn { border-left-color: var(--stucco); }
.callout.danger { border-left-color: var(--stucco); background: linear-gradient(180deg, rgba(190,169,137,0.07), rgba(190,169,137,0)), var(--bg-elev); }
.callout.consent { border-left-color: var(--stucco); background: linear-gradient(180deg, rgba(190,169,137,0.09), rgba(190,169,137,0)), var(--bg-elev); }
.callout.danger .callout-title, .callout.consent .callout-title, .callout.warn .callout-title { color: var(--stucco); }

/* docs handoff — the Learn → Docs cross-link (one ecosystem) */
.docs-handoff {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 16px 18px; margin: 30px 0 8px;
  background: linear-gradient(180deg, rgba(60,143,221,0.08), rgba(60,143,221,0)), var(--bg-elev);
}
.docs-handoff .dh-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(60,143,221,.35); }
.docs-handoff .dh-tx { flex: 1; min-width: 220px; }
.docs-handoff .dh-tx b { display: block; font-size: 15px; color: var(--text); font-weight: 400; }
.docs-handoff .dh-tx span { font-size: 13.5px; color: var(--text-dim); }
.docs-handoff .dh-act { font-size: 14px; font-weight: 400; color: var(--accent); white-space: nowrap; }
.docs-handoff .dh-act:hover { text-decoration: none; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-elev); font-weight: 400; color: var(--stucco); white-space: nowrap; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: none; }
td .yes { color: var(--sea); font-weight: 400; }
td .no { color: var(--text-faint); font-weight: 400; }
td .partial { color: var(--stucco); font-weight: 400; }

/* badges / pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 400; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-dim); background: var(--bg-elev); margin: 0 6px 6px 0; }
.pill.green { color: var(--sea); border-color: var(--mid-sea); }
.pill.red { color: var(--stucco); border-color: var(--stucco-dim); }
.pill.yellow { color: var(--stucco); border-color: var(--stucco-dim); }
.pill.blue { color: var(--accent); border-color: rgba(60,143,221,.4); }

/* spec grid */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 24px; }
.spec { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.spec .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--stucco); margin-bottom: 4px; }
.spec .v { font-size: 15px; font-weight: 400; color: var(--text); }

/* model cards (home) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 28px; }
.card {
  display: block; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; color: var(--text); transition: border-color .18s, transform .18s, background .18s;
}
.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); background: var(--bg-elev-2); }
.card .ct { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card .ce { display: none; }
.card h3 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 20px; }
.card p { font-size: 14px; color: var(--text-dim); margin: 0 0 12px; }
.card .best { font-size: 12.5px; color: var(--text-faint); border-top: 1px solid var(--border); padding-top: 12px; }
.card .best b { color: var(--sea); font-weight: 400; }

/* use-case row */
.uc { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.uc:last-child { border-bottom: none; }
.uc .mode { font-weight: 400; color: var(--accent); font-size: 14px; }
.uc .mode small { display: block; color: var(--text-faint); font-weight: 400; font-size: 12px; }

/* video embeds */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-single { margin: 0 0 10px; }
.vcaption { font-size: 13.5px; color: var(--text-dim); margin: 0 0 22px; }
.vcaption a { color: var(--text-dim); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 6px 0 28px; }
.vcard { margin: 0; }
.vcard figcaption { font-size: 14.5px; color: var(--text); margin-top: 10px; font-weight: 400; line-height: 1.35; }
.vcard .vmeta { font-size: 12.5px; color: var(--text-faint); font-weight: 400; margin-top: 3px; }

/* chaptered lesson player */
.lesson-player { display: grid; grid-template-columns: 1fr 280px; gap: 18px; margin: 6px 0 30px; align-items: start; }
.lp-mount { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.lp-mount iframe, .lp-mount > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lp-chapters { list-style: none; margin: 0; padding: 0; max-height: min(56vh, 420px); overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); }
.lp-chapters li { margin: 0; }
.lp-chap { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text-dim); padding: 10px 12px; cursor: pointer; font: inherit; font-size: 13.5px; line-height: 1.35; transition: background .12s ease, color .12s ease; }
.lp-chapters li:last-child .lp-chap { border-bottom: 0; }
.lp-chap:hover { background: var(--accent-soft); color: var(--text); }
.lp-chap.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.lp-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 12.5px; min-width: 38px; }
.lp-name { flex: 1; }
.lesson-jump { margin: 2px 0 12px; }
.lp-seek { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12.5px; cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.lp-seek:hover { border-color: var(--accent); background: rgba(60,143,221,0.22); }
@media (max-width: 920px) { .lesson-player { grid-template-columns: 1fr; } .lp-chapters { max-height: 280px; } }

/* per-section video clips (one embed per lesson section, scoped by start/end) */
.lesson-clip { margin: 8px 0 16px; max-width: 680px; }
.clip-cap { font-size: 12.5px; color: var(--text-faint); margin: 7px 0 0; }

/* click-to-play facade: hides YouTube's thumbnail + title until play.
   Frame grab (if any) sits blurred behind a brand scrim + centered overlay. */
.yt-facade { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; text-decoration: none; background:
  radial-gradient(120% 120% at 50% 0%, var(--bg-elev-2) 0%, var(--bg-elev) 45%, var(--bg) 100%); }
.yt-facade:hover { border-color: var(--accent); text-decoration: none; }
/* blurred frame-grab layer (scaled up so blurred edges never show) */
.yt-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(16px) saturate(1.08); transform: scale(1.18); }
/* center vignette + scrim so white overlay text stays legible on ANY frame
   (light or dark) and in either site theme; darkest where the text sits */
.yt-facade::before { content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity .15s ease; background:
  radial-gradient(82% 82% at 50% 48%, rgba(8,14,20,.50) 0%, rgba(8,14,20,.62) 62%, rgba(8,14,20,.80) 100%); }
.yt-facade:hover::before { opacity: .88; }
/* centered overlay: play button, bold timecode, quiet description */
.yt-overlay { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px; text-align: center; max-width: 100%; }
.yt-play { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; transition: transform .15s ease, background .15s ease; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.yt-facade:hover .yt-play { transform: scale(1.07); background: var(--accent-hover); }
.yt-play svg { width: 24px; height: 24px; margin-left: 3px; }
/* the timecode is the focal "title" of the thumbnail */
.yt-time { margin-top: 2px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .01em; line-height: 1.1; font-size: clamp(18px, 3.4vw, 24px); text-shadow: 0 1px 2px rgba(0,0,0,.6), 0 2px 14px rgba(0,0,0,.55); }
/* the section heading repeated quietly, as a description of the timecode */
.yt-sub { font-size: 12.5px; font-weight: 400; color: rgba(255,255,255,.86); line-height: 1.3; max-width: 30ch; text-shadow: 0 1px 2px rgba(0,0,0,.7), 0 1px 10px rgba(0,0,0,.6); }
.yt-facade.lesson-hero .yt-time { font-size: clamp(15px, 2.4vw, 18px); font-weight: 600; }
.yt-facade.yt-live { cursor: default; background: #000; }
.yt-facade.yt-live .yt-overlay, .yt-facade.yt-live .yt-bg, .yt-facade.yt-live::before { display: none; }
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-facade.lesson-hero { margin: 6px 0 22px; }

/* footer */
.page-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-nav a { display: block; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; flex: 1; color: var(--text); }
.page-nav a:hover { border-color: var(--accent); text-decoration: none; }
.page-nav .lbl { font-size: 12px; color: var(--text-faint); }
.page-nav .ttl { font-weight: 400; }
.page-nav .next { text-align: right; }
.site-foot { color: var(--text-faint); font-size: 13px; margin-top: 40px; }

.scrim { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.5); z-index: 40; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .toc { display: none; } }
@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 45; box-shadow: 6px 0 30px rgba(0,0,0,.4); background: var(--bg); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; }
  .content-wrap { margin-left: 0; }
  .content { padding: 28px 20px 100px; }
  .brand-sub { display: none; }
  .header-search { display: none; }
  .header-main { gap: 12px; padding: 0 14px; }
}
