/* ScholaFly lesson index. Navy like the videos: one product.
   Colours are the video line's tokens (src/design/tokens.ts) and the brand rules. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}
:root {
  color-scheme: dark;
  --bg: #0B1530;            /* the video stage navy */
  --bg-deep: #081026;
  --card: #141F42;          /* raised card on navy */
  --card-2: #1B2647;        /* the video's ink card */
  --panel: #18244B;         /* long reading: a touch lighter */
  --line: rgba(172, 180, 207, 0.14);
  --line-2: rgba(172, 180, 207, 0.24);
  --ink: #E6ECFF;
  --ink-2: #ACB4CF;
  --ink-3: #8D9AC0;
  --link: #8BBCFF;
  --fly: #70A6F8;
  --blue: #2F6BD6;
  --brand: #4082F3;         /* ScholaFly blue, the site's own accent (the logo's "Fly") */
  --brand-on-dark: #5A9DF5; /* the same blue lifted for text on navy */
  --green: #4CC98A;
  --amber: #F0AD42;
  --orange: #F39F40;
  --acc: #5A9DF5;          /* a subject page sets its own; everything else wears the brand blue */
  --r-chip: 6px;            /* the videos' card and chip radius (tokens.ts cardRadius), at web scale */
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lift: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -22px rgba(0, 0, 0, 0.65);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: 80px; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 400 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
  min-height: 100vh; display: flex; flex-direction: column;
}
/* the stage light, as the videos carry it: a soft blue glow high on the left */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 8% -8%, rgba(64, 130, 243, 0.16), transparent 62%),
    radial-gradient(760px 520px at 102% 18%, rgba(112, 166, 248, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
main { flex: 1 0 auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #B5D3FF; }
:focus-visible { outline: 2px solid var(--fly); outline-offset: 3px; border-radius: 6px; }
h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.022em; margin: 10px 0 14px; color: #fff; }
h2 { font-size: clamp(21px, 2.3vw, 26px); line-height: 1.25; font-weight: 650; letter-spacing: -0.012em; margin: 44px 0 16px; color: #fff; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.page { padding-bottom: 72px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card-2); color: var(--ink); padding: 10px 14px; z-index: 20; border-radius: var(--r-md); }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 0 0 18px; max-width: 62ch; }
.kicker {
  display: block; margin: 0; font: 600 12px/1.4 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--acc);
}

/* ------------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 21, 48, 0.72); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand .owl { width: 40px; height: auto; }
.brand .wordmark { height: 21px; width: auto; }
.topnav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.topnav a {
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 9px 12px;
  border-radius: 999px; transition: color 160ms, background-color 160ms;
}
.topnav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.topnav a.sub-top {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; color: var(--ink);
  border: 1px solid var(--line-2); padding: 8px 14px;
}
.topnav a.sub-top:hover { border-color: rgba(255, 255, 255, 0.4); }
.yt-dot {
  width: 16px; height: 11px; border-radius: 3px; background: #FF0033; position: relative; flex: 0 0 auto;
}
.yt-dot::after {
  content: ""; position: absolute; left: 6px; top: 2.5px; border-style: solid; border-width: 3px 0 3px 5px;
  border-color: transparent transparent transparent #fff;
}

/* ------------------------------------------------------------------ home: hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
/* the videos' 64 px backdrop grid, faded out towards the edges */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(172, 180, 207, 0.055) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(172, 180, 207, 0.055) 1.5px, transparent 1.5px);
  background-size: 64px 64px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 70% 40%, #000 30%, transparent 75%);
}
.hero-in {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: 24px; padding-top: 40px; padding-bottom: 48px;
}
.hero-text { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -0.035em; margin: 14px 0 14px; max-width: 12ch; }
.hero .hl { color: var(--brand-on-dark); }
.hero .kicker { --acc: var(--fly); }
.hero .lead { font-size: 19px; max-width: 34em; }
.find { display: flex; gap: 10px; margin: 24px 0 0; max-width: 620px; }
.find input, .finder input[type=search], .finder select {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--ink);
  background: rgba(20, 31, 66, 0.9); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 13px 16px; min-height: 52px; transition: border-color 160ms, box-shadow 160ms;
}
.find input::placeholder, .finder input::placeholder { color: var(--ink-3); }
.find input:focus, .finder input:focus, .finder select:focus {
  outline: none; border-color: var(--fly); box-shadow: 0 0 0 4px rgba(112, 166, 248, 0.18);
}
.find button {
  font: inherit; font-weight: 600; font-size: 16px; border: 0; border-radius: var(--r-md);
  background: var(--blue); color: #fff; padding: 0 26px; min-height: 52px; cursor: pointer;
  transition: background-color 160ms, transform 160ms var(--ease);
}
.find button:hover { background: #3B7BEA; }
/* the home search is the loudest thing on the page */
.hero .find input {
  min-height: 62px; font-size: 19px; padding: 14px 18px; background: #101B3D;
  border: 2px solid var(--brand);
  box-shadow: 0 0 0 5px rgba(64, 130, 243, 0.14), 0 14px 44px -14px rgba(64, 130, 243, 0.6);
}
.hero .find input:focus { border-color: var(--fly); box-shadow: 0 0 0 6px rgba(64, 130, 243, 0.26), 0 14px 44px -14px rgba(64, 130, 243, 0.65); }
.hero .find button { min-height: 62px; font-size: 18px; padding: 0 30px; }
.or { margin: 20px 0 10px; font-size: 14px; color: var(--ink-3); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; max-width: 620px; }
.quick a {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 14px; border-radius: var(--r-chip);
  color: #fff; font-weight: 600; font-size: 15px; line-height: 1.15; text-decoration: none;
  background: color-mix(in srgb, var(--acc) 11%, #0B1530); border: 1.5px solid color-mix(in srgb, var(--acc) 60%, transparent);
  transition: background-color 160ms, border-color 160ms;
}
.quick a::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--acc); flex: 0 0 auto; }
.quick a:hover { color: #fff; background: color-mix(in srgb, var(--acc) 22%, #0B1530); border-color: var(--acc); }
.find button:active { transform: translateY(1px); }
.find input[type=search]::-webkit-search-cancel-button { filter: invert(0.8); }

/* the drawings: layers that drift with the mouse (laptop) or the scroll (phone) */
.scene { position: relative; height: 420px; opacity: 0.32; }
.layer { position: absolute; will-change: transform; }
.layer svg { display: block; overflow: visible; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.layer svg .fill { fill: currentColor; stroke: none; }
.layer svg text { fill: currentColor; stroke: none; font: 600 15px var(--mono); letter-spacing: 0.08em; }
.layer svg path, .layer svg circle { stroke: currentColor; }
.layer .soft { fill: color-mix(in srgb, currentColor 10%, transparent); }
.layer .dash { stroke-dasharray: 5 7; stroke-width: 2.5; opacity: 0.8; }
.layer .beam { stroke-dasharray: 3 6; stroke-width: 2.5; stroke: var(--ink); }
.layer span { display: block; font-weight: 300; line-height: 1; }
.l-owl { right: 6%; top: 12%; width: 230px; filter: drop-shadow(0 0 36px rgba(112, 166, 248, 0.28)); }
.l-owl img { width: 100%; height: auto; display: block; }
.l-vec { left: 0; top: 4%; color: var(--fly); }
.l-tri { left: 1%; top: 38%; color: var(--brand-on-dark); }
.l-gate { right: 3%; bottom: 0; color: var(--fly); opacity: 0.85; }
.l-wave { left: 0; bottom: 0; color: var(--brand-on-dark); opacity: 0.7; }
.l-pi { left: 12%; top: 17%; font-size: 54px; color: var(--fly); opacity: 0.75; }
.l-root { right: 2%; top: 0; font-size: 38px; color: var(--fly); opacity: 0.8; }
.l-root i { font-style: italic; font-weight: 300; }
.l-sq { left: 52%; bottom: 7%; font-size: 32px; color: var(--ink); opacity: 0.45; }
.l-eq { left: 40%; top: 50%; font-size: 36px; color: var(--ink); opacity: 0.22; }

/* ------------------------------------------------------------------ home: bands */
.band { padding: 72px 0 8px; }
.band h2 { margin-top: 10px; }
.band .kicker + h2 { margin-top: 10px; }
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 8px; }
.subj {
  --mx: 50%; --my: 0%;
  position: relative; isolation: isolate; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--lift); transition: border-color 220ms, transform 320ms var(--ease);
}
.subj::before { /* the subject's light, following the cursor */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 260ms;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--acc) 17%, transparent), transparent 55%);
}
.subj::after { /* a thin rule of the subject colour along the top */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--acc) 30%, var(--acc) 70%, transparent); opacity: 0.85;
}
.subj:hover { border-color: color-mix(in srgb, var(--acc) 45%, transparent); color: var(--ink); }
.subj:hover::before { opacity: 1; }
.subj-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-deep); overflow: hidden; }
.subj-media img, .subj-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.subj-media video { opacity: 0; transition: opacity 500ms; }
.subj-media video.on { opacity: 1; }
.subj-media::after { /* the clip melts into the card */
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(180deg, transparent, var(--card));
}
.subj-body { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; padding: 4px 24px 24px; margin-top: -28px; }
.subj-body .kicker { grid-column: 1; }
.subj-name { grid-column: 1; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.subj-n { grid-column: 1; font-size: 15px; color: var(--ink-2); }
.subj-go {
  grid-column: 2; grid-row: 1 / span 3; align-self: end; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent); position: relative;
  transition: background-color 220ms, transform 320ms var(--ease);
}
.subj-go::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -5px 0 0 -7px;
  border: solid var(--acc); border-width: 2px 2px 0 0; transform: rotate(45deg);
}
.subj:hover .subj-go { background: color-mix(in srgb, var(--acc) 16%, transparent); transform: translateX(3px); }
.sub-note { color: var(--ink-3); font-size: 15px; margin: 22px 0 0; max-width: 70ch; }

.lcards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; perspective: 900px; }
.lcard {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--lift); transform-style: preserve-3d; transition: border-color 200ms;
}
.lcard:hover { color: var(--ink); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.lcard-img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-deep); }
.lcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.lcard-body .kicker { font-size: 11px; letter-spacing: 0.16em; }
.lcard-t { font-weight: 600; font-size: 16px; line-height: 1.35; color: #fff; }
.lcard-m { font-size: 13px; color: var(--ink-3); margin-top: auto; }

.teach { padding-top: 96px; }
.teach-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.teach-head h2 { margin: 0; position: sticky; top: 96px; }
.teach-head h2::before { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--brand); margin-bottom: 18px; }
.teach-words p { margin: 0 0 18px; font-size: clamp(20px, 2.1vw, 24px); line-height: 1.45; color: var(--ink-2); letter-spacing: -0.01em; }
.teach-words p:nth-child(-n+3) { color: #fff; font-weight: 600; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.25; margin-bottom: 10px; letter-spacing: -0.02em; }
.teach-words p:nth-child(3) { margin-bottom: 36px; }
.teach-words .teach-also { font-size: 18px; color: var(--ink-3); border-left: 3px solid var(--line-2); padding-left: 16px; margin-top: 28px; }
.later { padding: 64px 0 88px; }
.later-in {
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px 32px;
  background: linear-gradient(120deg, rgba(64, 130, 243, 0.12), rgba(64, 130, 243, 0.03) 60%, transparent);
}
.later h2 { margin: 0 0 6px; }
.later p { margin: 0; color: var(--ink-2); }
a.dead { color: var(--ink-3); text-decoration: underline dotted; cursor: default; }

/* ------------------------------------------------------------------ crumbs, heads, chips, pills */
.crumbs { font-size: 14px; color: var(--ink-3); padding: 22px 0 0; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 4px; opacity: 0.6; }
.pagehead { position: relative; padding: 26px 0 8px; }
.pagehead::before {
  content: ""; position: absolute; left: -60px; top: -40px; width: 520px; height: 280px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 13%, transparent), transparent);
}
.pagehead h1 { margin-top: 12px; }
.accent-h { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.chip {
  display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none; font-weight: 600; font-size: 15px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--r-chip); padding: 11px 18px; min-height: 46px; transition: border-color 160ms, background-color 160ms;
}
.chip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); align-self: center; flex: 0 0 auto; }
.chip small { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.chip:hover { color: #fff; border-color: var(--acc); background: color-mix(in srgb, var(--acc) 8%, var(--card)); }
.pill {
  display: inline-block; font-size: 12px; font-weight: 600; border-radius: var(--r-chip); padding: 2px 10px; line-height: 1.6;
  color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent);
  white-space: nowrap;
}
.code { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.04em; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.st::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.st-watch { color: var(--green); }
.st-watch::before { box-shadow: 0 0 0 3px rgba(76, 201, 138, 0.18); }

/* ------------------------------------------------------------------ chapter lists
   Three twisties (details/summary): the subject, its chapters, a chapter's lessons. One panel
   with hairlines between chapters, never a card per chapter. A lesson is one line: code, title,
   then fixed right-hand columns - length, copy link, play - so the columns line up down every
   list and the play button always ends the line. */
.chapters { --acc: var(--brand-on-dark); margin-top: 18px; }
.chapters, .results { --pad: 16px; --c-code: 60px; --c-len: 46px; --c-copy: 34px; --c-play: 30px; --gap: 12px; }
.subj-tw { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.subj-tw > summary, .chapter > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.subj-tw > summary::-webkit-details-marker, .chapter > summary::-webkit-details-marker { display: none; }
.subj-tw > summary::before, .chapter > summary::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin: 0 2px; border: solid var(--ink-3); border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform 200ms var(--ease);
}
.subj-tw[open] > summary::before, .chapter[open] > summary::before { transform: rotate(45deg); }
.subj-tw > summary { padding: 12px var(--pad); min-height: 48px; font-weight: 700; font-size: 17px; color: #fff; }
.subj-tw[open] > summary { border-bottom: 1px solid var(--line); }
.subj-tw .count, .chapter .count { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chapter { scroll-margin-top: 130px; }
.chlist > .chapter + .chapter { border-top: 1px solid var(--line); }
.chapter > summary { padding: 8px var(--pad); min-height: 44px; }
.chapter > summary:hover { background: rgba(255, 255, 255, 0.03); }
.chapter > summary .t { min-width: 0; font-weight: 600; font-size: 15.5px; line-height: 1.3; color: #fff; }
.chapter > summary .code.code-after { flex: 0 0 auto; color: var(--ink-3); font-size: 11px; font-weight: 500; }
.chapter[open] > summary { background: rgba(255, 255, 255, 0.025); }
ul.rows { list-style: none; margin: 0; padding: 2px 0 6px; }
.chapter ul.rows { background: rgba(8, 16, 38, 0.4); }
.row { position: relative; }
/* a released lesson's line is a link; one not out yet is the same grid as plain text (.rl) */
.row a, .row .rl {
  display: grid; align-items: center; column-gap: var(--gap);
  grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-len) var(--c-copy) var(--c-play);
  padding: 5px var(--pad) 5px calc(var(--pad) + 23px); min-height: 40px; text-decoration: none; color: var(--ink);
  transition: background-color 140ms;
}
.results .row a, .results .row .rl { padding-left: var(--pad); }
.row a::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); opacity: 0; transition: opacity 140ms; }
.row a:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.row a:hover::before { opacity: 1; }
.row .code { grid-column: 1; font-size: 12px; white-space: nowrap; }
.row .t { grid-column: 2; font-weight: 500; font-size: 15px; line-height: 1.35; }
.row .t small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.row .len { grid-column: 3; justify-self: end; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
/* the play button: a small disc in the subject's colour at the end of every released lesson's line */
.play-b {
  grid-column: 5; justify-self: end; position: relative; width: var(--c-play); height: var(--c-play); border-radius: 50%;
  background: var(--acc); transition: transform 160ms var(--ease), box-shadow 160ms;
}
.play-b::after {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -6px 0 0 -3px; border-style: solid;
  border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #0B1530;
}
.row a:hover .play-b, .row a:focus-visible .play-b { transform: scale(1.08); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 28%, transparent); }
.row.is-soon .t, .row.is-soon .code { color: var(--ink-3); }
.row.is-soon .t { font-weight: 400; font-size: 14px; }
.share-mini {
  position: absolute; top: 50%; right: calc(var(--pad) + var(--c-play) + var(--gap)); transform: translateY(-50%); z-index: 1;
  display: grid; place-items: center; width: var(--c-copy); height: var(--c-copy); padding: 0; cursor: pointer;
  color: var(--ink-3); background: transparent; border: 1px solid transparent; border-radius: 50%;
  transition: color 140ms, background-color 140ms, border-color 140ms;
}
.share-mini:hover, .share-mini:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: var(--line-2); }
@media (max-width: 600px) {
  .chapters, .results { --pad: 12px; --c-code: 50px; --c-len: 34px; --c-copy: 30px; --c-play: 28px; --gap: 7px; }
  .chapter > summary { gap: 9px; }
  .chapter > summary .code { flex-basis: 40px; font-size: 11.5px; }
  .chapter > summary .t { font-size: 15px; }
  .row a, .row .rl { padding-left: var(--pad); }
  .row .code { font-size: 11px; }
}

.results { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--lift); }
.results:empty { display: none; }
.results .row a { --acc: var(--fly); }
.results .row + .row a { border-top: 1px solid var(--line); }
.results .ch { display: block; font-size: 13px; color: var(--ink-3); font-weight: 400; }
.results .pill { margin-right: 6px; }

/* ------------------------------------------------------------------ search */
.k-search h1 { margin-top: 18px; }
.finder {
  display: flex; flex-direction: column; gap: 14px; margin: 12px 0 18px; padding: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--lift);
}
.finder input[type=search] { font-size: 18px; min-height: 56px; padding-left: 48px;
  background: rgba(8, 16, 38, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238D9AC0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='M13 13l5 5'/%3E%3C/svg%3E") no-repeat 16px 50%; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.filters label, .teacher-only label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.finder select {
  font-size: 15px; padding: 10px 36px 10px 14px; min-height: 46px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: rgba(8, 16, 38, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23ACB4CF' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
  text-transform: none; letter-spacing: 0;
}
.finder select option { background: var(--card-2); color: var(--ink); }
.teacher-only input[type=search] { padding-left: 16px; background-image: none; font-size: 16px; min-height: 48px; text-transform: none; letter-spacing: 0; }
@media (max-width: 600px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters label:first-child { grid-column: 1 / -1; } }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 44px; cursor: pointer; color: var(--ink-2); }
.toggle input { width: 20px; height: 20px; accent-color: var(--fly); }
.result-count { color: var(--ink-3); font-size: 14px; margin: 4px 0 10px; }
.refs { display: block; font-size: 12px; color: var(--ink-3); font-family: var(--mono); }

/* ------------------------------------------------------------------ lesson page: still and clean */
.lesson { max-width: 900px; }
.lesson .eyebrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 22px 0 0; }
.lesson .eyebrow .code { color: var(--acc); }
.lesson h1 { margin: 10px 0 22px; }
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--bg-deep); overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--bg-deep); cursor: pointer; display: block; }
.facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: rgba(11, 21, 48, 0.78); border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); transition: transform 180ms var(--ease), background-color 180ms;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.play::after { content: ""; position: absolute; left: 32px; top: 24px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #fff; }
.facade:hover .play, .facade:focus-visible .play { transform: scale(1.06); background: rgba(47, 107, 214, 0.92); }
.consent {
  margin: 0; padding: 12px 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.consent a { color: var(--link); }
/* once the viewer has pressed play before, the line steps aside behind a small "i" */
.info { display: none; }
.yt-ok .info {
  display: block; position: absolute; left: calc(50% + 56px); top: calc(50% + 22px); z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; padding: 0; cursor: pointer;
  font: italic 600 15px/1 Georgia, "Times New Roman", serif; color: #fff;
  background: rgba(11, 21, 48, 0.72); border: 1.5px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.yt-ok .info:hover, .yt-ok .info[aria-expanded="true"] { border-color: #fff; background: rgba(47, 107, 214, 0.9); }
.yt-ok .consent { display: none; }
.yt-ok .consent.show, .yt-ok .player:has(.info:hover) + .consent { display: block; }
.yt-ok .player { border-radius: var(--r-lg); border-bottom: 1px solid var(--line-2); }
.yt-ok .player:has(+ .consent.show), .yt-ok .player:has(.info:hover) { border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; }
.poster-card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; text-align: left; color: var(--ink); font-size: 22px; font-weight: 700; border-top: 4px solid var(--acc); background: radial-gradient(120% 90% at 10% 0%, rgba(64, 130, 243, 0.2), transparent 60%), var(--bg-deep); }
.poster-card .code { color: var(--acc); }
.next-link { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }
.ext { margin: 6px 0 0; font-size: 14px; }
.next-card {
  position: absolute; inset: 0; background: rgba(8, 16, 38, 0.96); color: var(--ink); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 16px;
}
.next-card .eyebrow-n { font: 600 12px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--acc); }
.next-card .nt { font-size: 22px; font-weight: 700; max-width: 30ch; line-height: 1.3; color: #fff; }
.next-card .ns { font-size: 13px; color: var(--ink-2); }
.next-card .np { position: relative; width: 64px; height: 64px; border-radius: 50%; background: var(--blue); margin: 8px 0; display: block; box-shadow: 0 0 0 6px rgba(47, 107, 214, 0.2); }
.next-card .np::after { content: ""; position: absolute; left: 25px; top: 18px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }
.next-card .again { color: var(--ink-2); font: inherit; font-size: 13px; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 8px; }
@media (max-width: 480px) { .next-card .nt { font-size: 16px; } .next-card .np { width: 52px; height: 52px; } .next-card .np::after { left: 20px; top: 14px; border-width: 12px 0 12px 18px; } }
.yt-btns, .next-card .nb { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color 160ms;
}
.btn:hover { background: #3B7BEA; color: #fff; }
.btn-2 { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-2:hover { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.next-card .nb { justify-content: center; margin: 4px 0 0; }
.next-card .btn { min-height: 38px; padding: 6px 14px; font-size: 13px; }
@media (max-width: 480px) { .next-card { gap: 2px; padding: 8px; } .next-card .ns, .next-card .again { display: none; } .next-card .np { margin: 2px 0; } .next-card .btn { min-height: 32px; padding: 4px 10px; font-size: 12px; } }
.lesson section { margin-top: 8px; }
.lesson section h2 { font-size: 20px; margin: 40px 0 12px; }
.lesson section p { margin: 0 0 10px; color: var(--ink-2); font-size: 17px; max-width: 68ch; }
.obj strong { color: #fff; font-weight: 600; }
.moments { padding: 0; list-style: none; margin: 0; border-top: 1px solid var(--line); }
.moments li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); display: flex; gap: 14px; }
.moments .at { flex: 0 0 52px; font-family: var(--mono); font-size: 13px; color: var(--acc); padding-top: 2px; }
.covers { padding-left: 20px; margin: 0; color: var(--ink-2); }
.covers li { margin: 4px 0; }
.kws { display: flex; flex-wrap: wrap; gap: 8px; }
.kw {
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: var(--r-chip); padding: 6px 13px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); transition: border-color 140ms, color 140ms;
}
.kw:hover { color: #fff; border-color: var(--acc); }
.for { color: var(--ink-3); font-size: 14px; margin-top: 26px; }
.teachers { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 20px; margin: 22px 0; }
.teachers > summary { cursor: pointer; font-weight: 600; padding: 16px 0; min-height: 52px; color: #fff; }
.teachers p { color: var(--ink-2); }
.tablewrap { overflow-x: auto; margin: 0 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
table.spec { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.55; color: var(--ink); }
table.spec th, table.spec td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.spec tbody tr:last-child td { border-bottom: 0; }
table.spec tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
table.spec th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); background: rgba(8, 16, 38, 0.35); overflow-wrap: normal; white-space: nowrap; }
table.spec .ref { font-family: var(--mono); white-space: nowrap; font-weight: 600; color: var(--fly); overflow-wrap: normal; }
table.spec .ref a { color: inherit; text-decoration: none; }
table.spec .ref a:hover { text-decoration: underline; }
table.spec td:first-child { min-width: 120px; }
/* the teacher spec view: SPEC | STATEMENT | LESSON | YT SEARCH PHRASE, one sub-row per lesson */
table.spec.cover { min-width: 760px; }
table.spec.cover td.sp { min-width: 84px; width: 84px; font-family: var(--mono); white-space: nowrap; font-weight: 600; color: var(--fly); }
table.spec.cover td.sp a { color: inherit; text-decoration: none; }
table.spec.cover td.sp a:hover { text-decoration: underline; }
table.spec.cover .ref-board { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.02em; }
table.spec.cover th:nth-child(2) { width: 30%; }
table.spec.cover td.sp, table.spec.cover td.stmt { border-bottom: 1px solid var(--line); }
table.spec.cover tr.sub td { border-top: 0; }
table.spec.cover td.ytq { white-space: nowrap; }
table.spec.cover .phrase { font-family: var(--mono); font-size: 14px; color: var(--ink-2); margin-right: 10px; vertical-align: middle; }
table.spec.cover .phrase .code { color: var(--fly); font-size: inherit; opacity: 1; }
table.spec.cover .yt-play { display: inline-flex; vertical-align: middle; color: var(--fly); }
table.spec.cover .yt-play .ico { width: 22px; height: 22px; }
table.spec.cover a.yt-play:hover { color: var(--ink); }
table.spec.cover .yt-play.is-ghost { opacity: 0.3; color: var(--ink-3); cursor: default; }
table.spec tr:target td { background: rgba(255, 255, 255, 0.06); }
.missing { color: var(--ink-3); font-style: italic; }
.prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.prevnext a {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; transition: border-color 160ms;
}
.prevnext a:hover { border-color: var(--line-2); color: #fff; }
.prevnext small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12px; margin-bottom: 2px; }
.prevnext .next { text-align: right; }

/* ------------------------------------------------------------------ teachers and reading pages */
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plain li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; }
.plain a { font-weight: 600; text-decoration: none; }
.plain a:hover { text-decoration: underline; }
.plain small { color: var(--ink-3); display: block; font-size: 14px; }
.cov { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.cov > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; min-width: 180px; }
.cov strong { display: block; font-size: 36px; line-height: 1.1; color: #fff; letter-spacing: -0.02em; font-weight: 700; }
.cov span { color: var(--ink-2); font-size: 14px; }
.note { font-size: 14px; color: var(--ink-3); }
.lesson-ref { display: block; text-decoration: none; padding: 3px 0; color: var(--link); }
.lesson-ref .code { color: inherit; opacity: 0.8; }
.lesson-ref.is-soon { color: var(--ink-3); }
.prose { max-width: 760px; }
.prose h1 { margin-top: 22px; margin-bottom: 6px; font-size: clamp(36px, 5vw, 52px); }
.prose .lead { color: var(--ink-2); font-size: clamp(20px, 2.4vw, 24px); margin: 0 0 12px; }
.prose h2 {
  font: 600 13px/1.4 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fly);
  margin: 44px 0 14px; padding-top: 22px; border-top: 1px solid var(--line);
}
.prose p, .prose li { color: var(--ink); font-size: clamp(19px, 2vw, 21px); line-height: 1.7; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin: 0 0 10px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--fly); }
.prose .promise { color: var(--brand-on-dark); font-weight: 700; }
.prose p:has(> .promise:first-child) { font-size: clamp(21px, 2.4vw, 25px); line-height: 1.5; }
.prose .updated { font-size: 15px; color: var(--ink-3); margin-top: 44px; }

/* ------------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--line); background: rgba(8, 16, 38, 0.6); color: var(--ink-3); font-size: 14px; padding: 28px 0 36px; }
.foot-in { display: grid; gap: 6px; }
.foot p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.foot-brand img { opacity: 0.85; }
.foot-brand p { color: var(--ink-2); }
.foot a { color: var(--ink-2); }
.foot a:hover { color: #fff; }

/* ------------------------------------------------------------------ small screens */
.row .t, h1, .crumbs, .lesson-ref { overflow-wrap: anywhere; }
.finder select, .finder input[type=search], .filters label, .teacher-only label { width: 100%; min-width: 0; max-width: 100%; }
@media (max-width: 980px) {
  .lcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teach-in { grid-template-columns: 1fr; gap: 12px; }
  .teach-head h2 { position: static; }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; padding-top: 28px; padding-bottom: 44px; }
  .scene { position: absolute; inset: 0; height: auto; z-index: 0; opacity: 0.3; }
  .l-owl, .l-vec, .l-tri, .l-gate, .l-eq, .l-sq, .l-wave { display: none; }
  .l-pi { left: auto; right: 22px; top: 18px; font-size: 40px; }
  .l-root { left: auto; right: 70px; top: 96px; font-size: 26px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .band { padding-top: 52px; }
  .teach { padding-top: 64px; }
  .subjects { grid-template-columns: 1fr; gap: 16px; }
  .subj-name { font-size: 26px; }
  .lcards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .lcard-body { padding: 10px 12px 14px; }
  .lcard-t { font-size: 14px; }
  .hero .lead { font-size: 17px; }
  .find button { padding: 0 18px; }
  .later-in { padding: 22px 20px; }
  .consent { font-size: 13px; padding: 10px 14px; }
  .play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .play::after { left: 26px; top: 19px; border-width: 13px 0 13px 21px; }
  .yt-ok .info { left: calc(50% + 46px); top: calc(50% + 16px); }
}
@media (max-width: 480px) {
  .brand .wordmark { display: none; }
  .topnav { gap: 0; }
  .topnav a { padding: 8px 6px; font-size: 13.5px; }
  .topnav a.sub-top { padding: 8px 4px 8px 6px; margin-left: 0; border: 0; gap: 6px; }
  .brand .owl { width: 36px; }
}
@media (max-width: 360px) { .topnav a[href*="teachers"] { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .subj-media video { display: none; }
}

/* round two: phone hero, centred lesson page */
@media (max-width: 600px) {
  .hero-in { padding-top: 20px; padding-bottom: 32px; }
  .hero h1 { font-size: 36px; margin: 8px 0 10px; }
  .hero .lead { font-size: 16px; margin-bottom: 0; }
  .find { margin-top: 16px; }
  .hero .find input { min-height: 56px; font-size: 17px; padding: 12px 14px; }
  .hero .find button { min-height: 56px; font-size: 17px; padding: 0 20px; }
  .or { margin: 14px 0 8px; }
  .quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick a { min-height: 42px; padding: 5px 12px; font-size: 14.5px; }
}
.k-lesson .page { max-width: 948px; }

/* ------------------------------------------------------------------ round three: the shape of a subject */
.pickers { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.pickers .chips { margin: 0; }
.tiers { display: inline-flex; padding: 4px; gap: 4px; border-radius: calc(var(--r-chip) + 4px); background: rgba(8, 16, 38, 0.6); border: 1px solid var(--line-2); }
.tiers button {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); background: transparent; border: 0; cursor: pointer;
  min-height: 38px; padding: 6px 14px; border-radius: var(--r-chip);
}
.tiers button:hover { color: #fff; }
.tiers button[aria-pressed="true"] { background: var(--card-2); color: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 60%, transparent); }
.sorter[hidden] { display: none; }
.areabar {
  position: sticky; top: 64px; z-index: 6; padding: 8px var(--pad);
  background: rgba(20, 31, 66, 0.94); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.areabar-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.areabar-in::-webkit-scrollbar { display: none; }
.areabar a {
  flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  padding: 5px 11px; border-radius: var(--r-chip); border: 1px solid var(--line-2);
}
.areabar a:hover { color: #fff; border-color: var(--acc); }
.area { scroll-margin-top: 130px; }
.area + .area, .areabar + .area { border-top: 1px solid var(--line-2); }
.area h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin: 0; padding: 14px var(--pad) 6px; font: 600 12px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc); }
.area h2 small { font-size: 12.5px; font-weight: 500; font-family: "Inter", system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.area .chlist { border-top: 1px solid var(--line); }
.area.is-parked { display: none; }
.row[hidden], .chapter[hidden], .area[hidden], .areabar[hidden], .areabar a[hidden], .chlist-az[hidden] { display: none; }

/* search: subject chips */
.subj-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.subj-chips:empty { display: none; }
.schip {
  display: inline-flex; align-items: center; gap: 9px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer;
  min-height: 42px; padding: 6px 14px; border-radius: var(--r-chip);
  background: color-mix(in srgb, var(--acc) 9%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--acc) 45%, transparent);
}
.schip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); }
.schip b { font-weight: 600; color: var(--ink-2); }
.schip[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 22%, var(--card)); border-color: var(--acc); }
/* a subject's head stays compact, so the first screen shows the subject's shape */
.k-subject .pagehead { padding: 16px 0 0; }
.k-subject .pagehead h1 { margin: 6px 0 8px; }
.k-subject .pagehead .lead { font-size: 17px; margin: 0; }
.k-subject .pickers { margin-top: 14px; }
.k-subject .chip { min-height: 40px; padding: 7px 14px; font-size: 14px; }
@media (max-width: 600px) {
  .k-subject .pickers .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; width: calc(100% + 32px); }
  .k-subject .pickers .chips::-webkit-scrollbar { display: none; }
  .k-subject .chip { flex: 0 0 auto; }
  .k-subject .pickers { gap: 10px; }
}

/* "Copy YouTube link" (share.js): the button under the player, the small copy mark on each
   lesson row, the "Link copied" note, and the selected link when nothing else can copy. */
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
button.btn { font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.share-link {
  flex: 1 1 260px; min-height: 46px; padding: 8px 14px; border-radius: var(--r-sm); font: inherit; font-size: 15px;
  color: var(--ink); background: var(--card); border: 1px solid var(--line-2);
}
.share-note {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; margin: 0; padding: 10px 18px; border-radius: 999px;
  background: var(--card-2); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--lift);
  border: 1px solid var(--line-2); transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.share-note.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .share-note { transition: none; } }
/* the phone jump bar wears each area's short name; the full name stays for wider screens */
.areabar .as { display: none; }
@media (max-width: 600px) { .areabar .af { display: none; } .areabar .as { display: inline; } }

/* a subject's chapters sit straight at the top in one panel; the exam board filter above them */
.chapters > .subj-in { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.chapters > .subj-in > .chlist > .chapter:first-child > summary { border-radius: var(--r-md) var(--r-md) 0 0; }
.boardpick .chip[aria-current="true"] { color: #fff; border-color: var(--acc); background: color-mix(in srgb, var(--acc) 20%, var(--card)); box-shadow: inset 0 0 0 1px var(--acc); }
.boardpick .chip-all::before { background: transparent; border: 2px solid var(--acc); box-sizing: border-box; }

/* home: the subjects come straight after the search */
.k-home .hero-in { padding-top: 28px; padding-bottom: 28px; }
.band-subjects { padding-top: 32px; }
@media (max-width: 600px) { .band-subjects { padding-top: 22px; } }

/* a lesson page carries its YouTube listing: the title, the description, the transcript folded away */
.yt-listing .yt-title { font-weight: 600; color: #fff; }
.yt-listing p { color: var(--ink-2); overflow-wrap: anywhere; }
.transcript { margin: 26px 0 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.transcript > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 8px 16px; font-weight: 600; font-size: 16px; color: #fff;
}
.transcript > summary::-webkit-details-marker { display: none; }
.transcript > summary::before {
  content: ""; width: 7px; height: 7px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform 200ms;
}
.transcript[open] > summary::before { transform: rotate(45deg); }
.transcript[open] > summary { border-bottom: 1px solid var(--line); }
.transcript > p { margin: 0; padding: 12px 16px 0; color: var(--ink-2); line-height: 1.65; }
.transcript > p:last-child { padding-bottom: 16px; }
.k-home .scene { height: 300px; }
@media (max-width: 860px) { .k-home .scene { height: auto; } }
