/* Components for the archive page: helpers, filters, list extras, reader tools, docked player, browse, summary, backup. */

/* ---------- helpers ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: var(--radius); font-size: 14px;
}
.skip:focus { top: 8px; }
#update-banner {
  position: sticky; top: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px var(--gutter);
  background: var(--accent); color: var(--on-accent); font-size: 14px;
}
#update-banner button {
  border: 0; border-radius: 6px; background: var(--on-accent); color: var(--accent);
  font-weight: 600; font-size: 13px; padding: 3px 12px;
}
html { scroll-padding-top: calc(var(--controls-h) + 8px); }
.reader { scroll-padding-top: 56px; scroll-padding-bottom: 240px; }

/* ---------- tabs extras, filters, hints ---------- */
.tabs-sep { flex: none; align-self: center; margin: 0 4px 0 10px; font-size: 12px; color: var(--faint); }
.tab-browse { border: 1px solid var(--border-strong); }
.tab-browse[aria-pressed="true"] { border-color: transparent; }
.chips-label { align-self: center; margin-right: 2px; font-size: 12px; color: var(--faint); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500;
}
.pill-k { font-weight: 600; }
.pill button {
  border: 0; background: none; color: inherit; font-size: 16px; line-height: 1;
  min-width: 26px; min-height: 26px; border-radius: 999px;
}
.pill button:hover { background: var(--surface); }
.elsewhere {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted);
}
.empty .elsewhere { padding: 12px 0 0; border: 0; }
.goto {
  border: 1px solid var(--border-strong); background: var(--surface);
  padding: 3px 10px; border-radius: 999px; font-size: 13px; color: var(--text);
}
.goto span { color: var(--accent); margin-left: 4px; font-weight: 600; }
.goto:hover { border-color: var(--accent); }
.goto.wide { border-style: dashed; }

/* ---------- continue, stars, read marks, one-line summaries ---------- */
.continue {
  display: grid; gap: 2px;
  width: calc(100% - 36px); margin: 14px 18px 4px; padding: 12px 14px;
  text-align: left; background: var(--accent-soft); border: 0; border-radius: var(--radius);
}
.continue .kicker { color: var(--accent); }
.continue b { font-size: 15px; font-weight: 600; }
.continue .c-meta { font-size: 13px; color: var(--muted); }
.continue:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.row-top { display: flex; align-items: flex-start; gap: 8px; }
.row-top .row-title { flex: 1; }
.star {
  flex: none; min-width: 30px; min-height: 30px; margin: -4px -6px 0 0;
  border: 0; background: none; border-radius: 6px; font-size: 18px; line-height: 1; color: var(--faint);
}
.star:hover { color: var(--accent); background: var(--surface-2); }
.star[aria-pressed="true"] { color: #d99a00; }
.readtag { color: var(--ok); }
.row.is-read .row-title { font-weight: 500; color: var(--muted); }
.row.in-series { padding-left: 26px; position: relative; }
.row.in-series::before {
  content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--border-strong);
}
.row-sum { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ---------- reader: top bar, context, my marks, playback ---------- */
.liner-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.close {
  flex: none; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 6px; font-size: 13px; font-weight: 600; padding: 5px 12px;
}
.close:hover { border-color: var(--accent); color: var(--accent); }
#reader-title:focus { outline: none; }
#reader-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.context { margin-top: 12px; display: grid; gap: 6px; }
.ctx-row { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ctx-k { min-width: 92px; font-size: 12px; color: var(--faint); }
.ctx-chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 2px 10px; font-size: 13px; color: var(--text); text-decoration: none;
}
.ctx-chip:hover { border-color: var(--accent); color: var(--accent); }
.mine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.mine button, .pl-tools button, .end-actions > button, .backup button, .restore {
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 500;
}
.mine button:hover, .pl-tools button:hover, .end-actions > button:hover, .backup button:hover, .restore:hover {
  border-color: var(--accent); color: var(--accent);
}
.mine [aria-pressed="true"], .pl-tools [aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.copied { font-size: 13px; color: var(--accent); overflow-wrap: anywhere; }
.pl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pl-tools select {
  margin-left: 4px; font-size: 13px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 4px;
}
.resume-note, .player-error {
  margin: 14px 0 0; padding: 8px 12px; font-size: 13.5px;
  border-radius: var(--radius); background: var(--accent-soft); color: var(--text);
}
.player-error { background: var(--surface-2); color: var(--warn); }
.resume-note button { border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; padding: 0 0 0 4px; }
#resume-note:not([hidden]) { position: sticky; top: 0; z-index: 4; }
.resume-note [data-dismiss] { text-decoration: none; font-size: 16px; float: right; padding: 0 4px; }
.transcript p.now { background: var(--mark); box-shadow: -8px 0 0 var(--mark), 8px 0 0 var(--mark); }
.transcript p.now .cue { color: var(--text); font-weight: 600; }
.transcript p:focus { outline: none; }
.transcript p:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.end-actions { display: grid; gap: 16px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.end-actions > button { justify-self: start; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prevnext button {
  display: grid; gap: 4px; text-align: left;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: 10px 12px; font-size: 13px; color: var(--accent);
}
.prevnext button:last-child { text-align: right; }
.prevnext button:hover { border-color: var(--accent); }
.nb-title { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }

/* ---------- player: docks to a corner while you scroll ---------- */
.player.live .pl-float, .player.live .pl-frame { position: absolute; inset: 0; }
.player.live .pl-frame iframe { width: 100%; height: 100%; border: 0; }
.pl-dockbar { display: none; }
.player.live .pl-float.docked {
  position: fixed; inset: auto 16px 16px auto;
  width: min(360px, calc(100vw - 32px));
  height: calc(min(360px, calc(100vw - 32px)) * 9 / 16 + 30px);
  z-index: 90; border-radius: 10px; overflow: hidden;
  background: #000; box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.pl-float.docked .pl-frame { top: 30px; }
.pl-float.docked .pl-dockbar {
  position: absolute; inset: 0 0 auto 0; height: 30px;
  display: flex; align-items: center; gap: 6px; padding: 0 6px 0 12px;
  background: #1d2125; color: #e7e9ec; font-size: 12px;
}
.pl-dock-title { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pl-dockbar button { border: 0; background: none; color: inherit; font-size: 16px; min-width: 26px; min-height: 26px; border-radius: 4px; }
.pl-dockbar button:hover { background: rgba(255, 255, 255, .12); }

/* ---------- browse pages ---------- */
.browse { padding-bottom: 30px; }
.bx-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.bx-title { margin: 0 0 4px; font-size: 18px; font-weight: 650; }
.bx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 10px; font-size: 13px; }
.bx-filter { display: inline-flex; align-items: center; gap: 8px; }
.bx-filter-label { font-size: 13px; color: var(--muted); }
.bx-filter input {
  width: min(300px, 100%); padding: 6px 10px; font-size: 15px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface);
}
.bx-h { margin: 18px 18px 6px; font-size: 14px; font-weight: 650; color: var(--muted); }
.bx-list { list-style: none; margin: 0; padding: 0; }
.bx-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
  width: 100%; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left;
}
.bx-item:hover { background: var(--surface-2); }
.bx-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.bx-meta { grid-column: 1; font-size: 13px; color: var(--muted); }
.bx-count { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- summary & chapters ---------- */
.summary {
  margin-top: 16px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.summary > summary { cursor: pointer; font-size: 14px; font-weight: 650; }
.summary p { font-size: 15.5px; line-height: 1.6; margin: 10px 0 0; }
.kp { margin: 10px 0 0; padding-left: 1.2em; font-size: 15px; line-height: 1.55; }
.kp li { margin-bottom: 4px; }
.sum-h { margin: 14px 0 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chapters button {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; width: 100%;
  border: 0; background: none; border-radius: 6px; padding: 5px 6px; text-align: left; font-size: 15px;
}
.chapters button:hover { background: var(--surface-2); }
.ch-t { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.sum-note { font-size: 12.5px !important; color: var(--faint); }

/* ---------- backup ---------- */
.backup { margin-top: 30px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.backup h3 { margin-top: 0; }
.backup p { font-size: 14.5px; margin: 8px 0; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.restore { position: relative; cursor: pointer; display: inline-block; }
.restore input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.restore:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.backup-msg { font-size: 13px !important; color: var(--accent); }

/* ---------- short windows, zoom, phones ---------- */
@media (max-height: 560px) {
  .controls { position: static; }
  .reader { position: static; height: auto; }
  html { scroll-padding-top: 8px; }
}
@media (max-width: 900px) {
  .prevnext { grid-template-columns: minmax(0, 1fr); }
  .prevnext button:last-child { text-align: left; }
  .player.live .pl-float.docked {
    inset: auto 10px 10px auto; width: min(280px, calc(100vw - 20px));
    height: calc(min(280px, calc(100vw - 20px)) * 9 / 16 + 30px);
  }
}

/* ======================================================================
   Colour & layout: a dark header, one colour per section, thumbnails.
   Teaching = blue, Talking = green, Playing = orange, Others = purple.
   ====================================================================== */
:root { --page: #eef1f5; --header: #0f1b33; --header-text: #c5cee0; }
.g-teaching { --g: #1d4ed8; --g-soft: #e7efff; --g-on: #ffffff; }
.g-talk { --g: #047857; --g-soft: #e1f5ec; --g-on: #ffffff; }
.g-playing { --g: #b93b09; --g-soft: #fdece2; --g-on: #ffffff; }
.g-about { --g: #6d28d9; --g-soft: #efe7fd; --g-on: #ffffff; }
.g-all { --g: #334155; --g-soft: #e8ecf1; --g-on: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --page: #101318; --header: #0a1120; --header-text: #b7c2d6; }
  :root:not([data-theme="light"]) .g-teaching { --g: #93b8ff; --g-soft: #1c2a47; --g-on: #0d1526; }
  :root:not([data-theme="light"]) .g-talk { --g: #5fd3a6; --g-soft: #14332a; --g-on: #0d1526; }
  :root:not([data-theme="light"]) .g-playing { --g: #ffa06b; --g-soft: #3b2417; --g-on: #0d1526; }
  :root:not([data-theme="light"]) .g-about { --g: #c0a3ff; --g-soft: #2b2242; --g-on: #0d1526; }
  :root:not([data-theme="light"]) .g-all { --g: #cbd5e1; --g-soft: #283039; --g-on: #0d1526; }
}
:root[data-theme="dark"] { --page: #101318; --header: #0a1120; --header-text: #b7c2d6; }
:root[data-theme="dark"] .g-teaching { --g: #93b8ff; --g-soft: #1c2a47; --g-on: #0d1526; }
:root[data-theme="dark"] .g-talk { --g: #5fd3a6; --g-soft: #14332a; --g-on: #0d1526; }
:root[data-theme="dark"] .g-playing { --g: #ffa06b; --g-soft: #3b2417; --g-on: #0d1526; }
:root[data-theme="dark"] .g-about { --g: #c0a3ff; --g-soft: #2b2242; --g-on: #0d1526; }
:root[data-theme="dark"] .g-all { --g: #cbd5e1; --g-soft: #283039; --g-on: #0d1526; }

body { background: var(--page); }

/* header: dark band */
.mast { background: var(--header); border-bottom: 0; padding: 20px var(--gutter) 16px; }
.mast h1 { color: #ffffff; font-size: 24px; }
.mast .lede { color: var(--header-text); }
.mast .credits { color: var(--header-text); }
.mast .credits dd { color: #ffffff; }

/* controls: white bar with a soft shadow */
.controls { background: var(--surface); border-bottom: 0; box-shadow: 0 2px 8px rgba(15, 27, 51, .08); }
.search { background: var(--page); border-color: transparent; }
.search:focus-within { background: var(--surface); }

/* tabs: a coloured dot each, filled with the section colour when chosen */
.tab[data-group]::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%;
  background: var(--g); vertical-align: 1px;
}
.tab[data-group][aria-pressed="true"] { background: var(--g); color: var(--g-on); }
.tab[data-group][aria-pressed="true"]::before { background: var(--g-on); }
.tab[data-group][aria-pressed="true"] .count { color: var(--g-on); opacity: .9; }
.tab.has-hits .count { color: var(--g); }

/* list: section colour on chips, and card-like rows with thumbnails */
.list { background: var(--page); }
.section-head { background: var(--surface); border-bottom: 3px solid var(--g); }
.list .chip[aria-pressed="true"] { background: var(--g); border-color: var(--g); color: var(--g-on); }
.list-head { background: var(--page); border-bottom: 0; }
.rows { display: grid; gap: 8px; padding: 0 12px 12px; }
.row {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px 10px 10px;
  background: var(--surface);
  border: 0;
  border-left: 4px solid var(--g);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.row:hover { background: var(--g-soft); }
.row[aria-current="true"] { background: var(--g-soft); box-shadow: 0 0 0 2px var(--g); }
.thumb {
  position: relative; display: block; width: 128px; aspect-ratio: 16 / 9; align-self: start;
  border-radius: 6px; overflow: hidden; background: var(--surface-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur {
  position: absolute; right: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px;
  background: rgba(0, 0, 0, .78); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.row-body { min-width: 0; }
.badge {
  display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: 999px;
  background: var(--g-soft); color: var(--g); font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.row:hover .badge, .row[aria-current="true"] .badge { background: var(--surface); }
.row.in-series { padding-left: 10px; }
.row.in-series::before { display: none; }
.row.in-series .row-meta .tag { font-weight: 600; }
.row-meta .tag { color: var(--g); }
.hits { background: var(--g-soft); color: var(--g); }
.snip .t { color: var(--g); }
.continue { background: var(--surface); box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.elsewhere, .pills { background: var(--page); border-bottom: 0; }

/* reader: a white card with the section colour across the top */
.reader { background: var(--page); }
.liner, .intro {
  margin: 20px auto 40px; padding: 24px clamp(18px, 4vw, 40px) 60px;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
}
.liner { border-top: 6px solid var(--g); }
.intro { border-top: 6px solid var(--header); }
.liner .kicker .badge { margin: 0; font-size: 12px; }
.find { background: var(--surface); }
.summary { background: var(--g-soft); border: 0; }
.summary .ch-t { color: var(--g); }
.ctx-chip:hover { border-color: var(--g); color: var(--g); }
.transcript p.now { background: var(--mark); }

@media (max-width: 900px) {
  .mast { padding: 12px var(--gutter); }
  .mast h1 { font-size: 19px; }
  .row { grid-template-columns: 96px minmax(0, 1fr); }
  .thumb { width: 96px; }
  .liner { margin: 0; border-radius: 0; }
}

/* header nav between the two pages (archive and lessons pages) */
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.site-nav a {
  padding: 5px 14px; border-radius: 999px; color: var(--header-text); text-decoration: none;
  font-size: 14px; font-weight: 600; border: 1px solid rgba(255, 255, 255, .18);
}
.site-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.site-nav a[aria-current="page"] { background: #fff; color: var(--header); border-color: #fff; }

/* why a video is in the archive (from the checked classification) */
.why { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.why .ctx-k { margin-right: 8px; }
.row-why { font-style: italic; }

/* ======================================================================
   Lesson families (shared by the Lessons page and the archive's answer panel):
   harmony = indigo, scales & lines = teal, playing = rose, learning & life = amber.
   ====================================================================== */
.f-harmony { --f: #4338ca; --f-soft: #eceafe; --f-on: #ffffff; }
.f-lines { --f: #0f766e; --f-soft: #dff5f1; --f-on: #ffffff; }
.f-playing { --f: #be123c; --f-soft: #fde8ed; --f-on: #ffffff; }
.f-life { --f: #a15c07; --f-soft: #fdf1dc; --f-on: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .f-harmony { --f: #a5a1ff; --f-soft: #24224a; --f-on: #0d1526; }
  :root:not([data-theme="light"]) .f-lines { --f: #5eead4; --f-soft: #12332f; --f-on: #0d1526; }
  :root:not([data-theme="light"]) .f-playing { --f: #fb8fa6; --f-soft: #3c1a23; --f-on: #0d1526; }
  :root:not([data-theme="light"]) .f-life { --f: #fbbf5c; --f-soft: #3a2a12; --f-on: #0d1526; }
}
:root[data-theme="dark"] .f-harmony { --f: #a5a1ff; --f-soft: #24224a; --f-on: #0d1526; }
:root[data-theme="dark"] .f-lines { --f: #5eead4; --f-soft: #12332f; --f-on: #0d1526; }
:root[data-theme="dark"] .f-playing { --f: #fb8fa6; --f-soft: #3c1a23; --f-on: #0d1526; }
:root[data-theme="dark"] .f-life { --f: #fbbf5c; --f-soft: #3a2a12; --f-on: #0d1526; }

/* ======================================================================
   "What Barry says": the answer panel above the list for a search or a pick.
   ====================================================================== */
.answer { margin: 4px 12px 14px; padding: 14px 16px 10px; border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow); border-top: 6px solid var(--header); }
.answer h2 { margin: 0; font-size: 19px; line-height: 1.3; }
.answer h2 span { color: var(--muted); font-weight: 500; }
.ans-lede { margin: 4px 0 8px; font-size: 13.5px; color: var(--muted); }
.lane { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.lane h3, .lane summary { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 15px; font-weight: 750; }
.lane summary { cursor: pointer; list-style: none; }
.lane summary::-webkit-details-marker { display: none; }
.lane summary::after { content: "\25B8"; margin-left: auto; color: var(--faint); }
.lane[open] summary::after { content: "\25BE"; }
.lane-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; align-self: center; background: var(--lane, var(--g, var(--accent))); }
.lane-n { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lane-points { --lane: #4338ca; }
.lane-says { --lane: #1d4ed8; }
.lane-plays { --lane: var(--g); }
.lane-others { --lane: var(--g); }
.lane-more { display: inline-block; margin: 4px 0 2px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.lane-more:hover { border-color: var(--lane, var(--accent)); color: var(--lane, var(--accent)); }
.ap-list, .as-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap { padding: 8px 10px; border-radius: 10px; background: var(--f-soft); border-left: 4px solid var(--f); }
.ap p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.ap-kind { display: inline-block; margin-bottom: 3px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #0f766e; }
.ap-kind.k-story { background: #a15c07; }
.ap-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 5px; font-size: 13px; }
.ap-play { padding: 1px 8px; border-radius: 5px; border: 0; background: #c4302b; color: #fff; font-weight: 700;
  font-variant-numeric: tabular-nums; cursor: pointer; }
.ap-play:hover { background: #a3241f; }
.ap-video { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.ap-more { color: var(--faint); }
.ap-lesson { margin-left: auto; color: var(--f); font-weight: 650; text-decoration: none; }
.ap-lesson:hover { text-decoration: underline; }
.as { padding: 8px 10px; border-radius: 10px; background: var(--g-soft); border-left: 4px solid var(--g); }
.pl { padding: 8px 10px; border-radius: 10px; background: var(--page); }
.as-top { display: flex; align-items: baseline; gap: 8px; }
.as-top .badge { flex: none; margin: 0; }
.as-title { padding: 0; border: 0; background: none; text-align: left; font-weight: 650; font-size: 14.5px; color: var(--text); cursor: pointer; }
.as-title:hover { color: var(--g, var(--accent)); text-decoration: underline; }
.as-meta { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.as .snip { display: block; width: 100%; margin-top: 4px; background: var(--surface); }
.moments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.moment { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--g); background: var(--g-soft); color: var(--g);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.moment span { font-weight: 500; color: var(--text); }
.moment:hover { background: var(--g); color: var(--g-on); }
.moment:hover span { color: inherit; }
.list-head.after-answer { padding-top: 6px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lane-points { --lane: #a5a1ff; }
  :root:not([data-theme="light"]) .lane-says { --lane: #93b8ff; }
}
:root[data-theme="dark"] .lane-points { --lane: #a5a1ff; }
:root[data-theme="dark"] .lane-says { --lane: #93b8ff; }

/* the reader: which lesson cites a paragraph, and YouTube chapters / set lists */
.cited { display: inline-block; margin: 4px 0 0 0; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: #eceafe; color: #4338ca; text-decoration: none; }
.cited:hover { background: #4338ca; color: #fff; }
.cited-more { font-weight: 500; opacity: .8; }
.transcript p .cited { grid-column: -2; justify-self: start; }  /* under the text, timed or not */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cited { background: #24224a; color: #a5a1ff; }
}
:root[data-theme="dark"] .cited { background: #24224a; color: #a5a1ff; }
.yt-chapters { margin: 10px 0 0; }
.yt-chapters summary { cursor: pointer; font-size: 14px; font-weight: 650; color: var(--g, var(--accent)); }
.yt-chapters ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.yt-chapters button { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; width: 100%; padding: 4px 6px; border: 0;
  border-radius: 6px; background: none; text-align: left; font-size: 14px; color: var(--text); cursor: pointer; }
.yt-chapters button:hover { background: var(--g-soft, var(--surface-2)); }
.yt-chapters .ch-t { color: var(--g, var(--accent)); }

/* the answer in the wide reader area (desktop) */
.reader > .answer { max-width: 920px; margin: 20px auto 40px; padding: 22px clamp(18px, 3vw, 34px) 24px; }
.reader > .answer h2 { font-size: 24px; }
.reader > .answer .ap p, .reader > .answer .snip { font-size: 15.5px; }
@media (min-width: 1200px) {
  .reader > .answer .as-list { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; }
}

/* review fixes: headings inside the folded band, jumps between the answer and the list, set list position */
.lane summary h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 15px; font-weight: 750; flex: 1; }
.jump, .to-answer { display: inline-block; margin: 6px 0 2px; padding: 4px 12px; border-radius: 999px; border: 0;
  background: var(--header); color: #fff; font-size: 13px; font-weight: 650; cursor: pointer; }
.to-answer { margin: 0 10px 0 0; padding: 2px 10px; font-size: 12.5px; }
.list-head:focus, .answer h2:focus { outline: 2px solid var(--accent); outline-offset: 4px; }
.answer.compact { margin: 4px 8px 12px; padding: 12px 12px 8px; }
.yt-chapters button.now { background: var(--g-soft, var(--surface-2)); font-weight: 700; }
