:root {
  --background: #ffffff;
  --foreground: #0a0a0b;
  --muted-foreground: #52525b;
  --card: #ffffff;
  --cta: #2e4258;
  --cta-foreground: #ffffff;
  --border: #e4e4e7;
  --radius: .5rem;
  --surface: #f4f4f5;
  --highlight: #fde68a;
  --highlight-foreground: #0a0a0b;
  --current: #eef2f7;
  --s1: .25rem;
  --s2: .5rem;
  --s3: .75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --touch: 44px;
  /* Speaker palette: every colour keeps 4.5:1 against --background, --card, --surface and --current. */
  --spk-0: #1d4ed8;
  --spk-1: #a14a07;
  --spk-2: #047857;
  --spk-3: #be123c;
  --spk-4: #6d28d9;
  --spk-5: #0e7490;
  --spk-6: #a21caf;
  --spk-7: #45700d;
  --spk-8: #7c2d12;
  --spk-9: #475569;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0b;
    --foreground: #fafafa;
    --muted-foreground: #a1a1aa;
    --card: #18181b;
    --cta: #a2b8d6;
    --cta-foreground: #0a0a0b;
    --border: #27272a;
    --surface: #18181b;
    --highlight: #854d0e;
    --highlight-foreground: #fafafa;
    --current: #1c2430;
    --spk-0: #60a5fa;
    --spk-1: #fbbf24;
    --spk-2: #34d399;
    --spk-3: #fb7185;
    --spk-4: #a78bfa;
    --spk-5: #22d3ee;
    --spk-6: #e879f9;
    --spk-7: #a3e635;
    --spk-8: #d6a67c;
    --spk-9: #94a3b8;
  }
}

.spk-0 { --spk: var(--spk-0); }
.spk-1 { --spk: var(--spk-1); }
.spk-2 { --spk: var(--spk-2); }
.spk-3 { --spk: var(--spk-3); }
.spk-4 { --spk: var(--spk-4); }
.spk-5 { --spk: var(--spk-5); }
.spk-6 { --spk: var(--spk-6); }
.spk-7 { --spk: var(--spk-7); }
.spk-8 { --spk: var(--spk-8); }
.spk-9 { --spk: var(--spk-9); }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--cta); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  padding: var(--s2) var(--s4);
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 600; text-decoration: none; color: var(--foreground); white-space: nowrap; }
.who {
  min-width: 0;
  color: var(--muted-foreground);
  font-size: .875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.logout { margin: 0; }
.linkbutton {
  background: none;
  border: 0;
  padding: 0;
  min-height: var(--touch);
  color: var(--cta);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
  text-decoration: underline;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: var(--s4) var(--s4) 3rem; }

h1 { font-size: 1.45rem; line-height: 1.25; margin: var(--s1) 0 var(--s2); overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; margin: var(--s6) 0 var(--s2); }
.sub { font-size: .95rem; margin: var(--s4) 0 var(--s2); color: var(--muted-foreground); font-weight: 600; }

.muted { color: var(--muted-foreground); }
.back { margin: 0 0 var(--s1); font-size: .9rem; }
.back a { display: inline-block; padding: var(--s2) 0; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  color: var(--muted-foreground);
  font-size: .9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.card-link:hover .card-title { color: var(--cta); }
.card-link:focus-visible { outline-offset: -2px; border-radius: var(--radius); }
.card-link .meta { font-weight: 400; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: var(--s2) var(--s4);
  border-radius: var(--radius);
  background: var(--cta);
  color: var(--cta-foreground);
  text-decoration: none;
  border: 1px solid var(--cta);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button.ghost {
  background: transparent;
  color: var(--cta);
  border-color: var(--border);
  font-size: .9rem;
}
.button.ghost:hover { border-color: var(--cta); }

.login { max-width: 360px; }
.password-form { display: grid; gap: var(--s2); margin-top: var(--s5); }
.password-form label { color: var(--muted-foreground); font-size: .9rem; }
.password-form input,
.search input,
.find input {
  font: inherit;
  min-height: var(--touch);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
}
.password-form .button { justify-self: start; }
.error { color: #b42318; margin: 0; }
@media (prefers-color-scheme: dark) { .error { color: #f97066; } }

.people { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.people li { display: flex; flex-wrap: wrap; gap: 0 var(--s2); overflow-wrap: anywhere; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
video:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

/* --- index ------------------------------------------------------------------ */

.search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s4) 0; }
.search input { flex: 1 1 14rem; min-width: 0; }
.reset { font-size: .9rem; padding: var(--s2) 0; }

.months ul,
.pager ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.months { margin: 0 0 var(--s4); }
.months a,
.pager a {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 36px;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--foreground);
  text-decoration: none;
  font-size: .9rem;
}
@media (pointer: coarse) {
  .months a,
  .pager a { min-height: var(--touch); }
}
.months a:hover,
.pager a:hover { border-color: var(--cta); }
.months a[aria-current="page"],
.pager a[aria-current="page"] {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-foreground);
}
.count { color: inherit; opacity: .7; font-size: .8rem; }
.pager { margin: var(--s6) 0 0; }

.found { margin: 0; font-size: .9rem; }
.empty { margin: var(--s6) 0; }

.month h2 { margin: var(--s5) 0 var(--s3); }

.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--s3);
}
.grid .card { overflow: hidden; display: flex; flex-direction: column; }
.grid .meta { padding: 0 var(--s3) var(--s3); font-size: .82rem; gap: 0 var(--s3); }

@media (max-width: 479px) {
  /* Phone: poster left, text right, so more meetings fit on a screen. */
  .grid .card-link {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    grid-template-rows: auto 1fr;
  }
  .grid .thumb-wrap { grid-row: 1 / span 2; align-self: start; margin: var(--s2); border-radius: calc(var(--radius) - 2px); overflow: hidden; }
  .grid .card-title { padding: var(--s2) var(--s3) 0 var(--s1); }
  .grid .meta { padding: var(--s1) var(--s3) var(--s2) var(--s1); flex-direction: column; align-self: start; }
}

.thumb-wrap { position: relative; display: block; }
.thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--border);
}
.placeholder {
  background:
    linear-gradient(135deg, transparent 45%, var(--border) 45%, var(--border) 55%, transparent 55%),
    var(--surface);
}
.badge {
  position: absolute;
  right: var(--s1);
  bottom: var(--s1);
  padding: 0 var(--s1);
  border-radius: 4px;
  background: rgb(0 0 0 / .72);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.5;
}
.card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  padding: var(--s2) var(--s3) var(--s1);
  line-height: 1.3;
}

/* --- meeting ---------------------------------------------------------------- */

.meeting-head { margin-bottom: var(--s3); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }

.stage { min-width: 0; }

.vplayer {
  --pr: var(--radius);
  position: relative;
  background: #000;
  border-radius: var(--pr);
  color: #fff;
  /* The player chrome is dark in both themes, so the seek bar uses the dark speaker palette. */
  --spk-0: #60a5fa;
  --spk-1: #fbbf24;
  --spk-2: #34d399;
  --spk-3: #fb7185;
  --spk-4: #a78bfa;
  --spk-5: #22d3ee;
  --spk-6: #e879f9;
  --spk-7: #a3e635;
  --spk-8: #d6a67c;
  --spk-9: #94a3b8;
}
.screen { position: relative; overflow: hidden; border-radius: var(--pr) var(--pr) 0 0; }
.player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  background: #000;
}
.vplayer:fullscreen { --pr: 0; display: flex; flex-direction: column; justify-content: center; }
.vplayer:fullscreen .player { max-height: none; height: auto; flex: 1; aspect-ratio: auto; }

.flash {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: var(--s2) var(--s4);
  border-radius: 999px;
  background: rgb(0 0 0 / .6);
  font-weight: 600;
  pointer-events: none;
}
.flash.left { left: 25%; }
.flash.right { left: 75%; }
.flash.mid { left: 50%; }

.controls { padding: 0 var(--s2) var(--s1); background: #111; border-radius: 0 0 var(--pr) var(--pr); }
.controls[hidden] { display: none; }

.seek { position: relative; height: 28px; }
.track {
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  height: 6px;
  border-radius: 3px;
  background: #3f3f46;
  overflow: hidden;
}
.segments,
.played { position: absolute; inset: 0; }
.segments span {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--spk);
  opacity: .9;
}
.played {
  right: auto;
  width: 0;
  background: rgb(255 255 255 / .35);
  border-right: 2px solid #fff;
}
.range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.range::-webkit-slider-runnable-track { background: transparent; height: 28px; }
.range::-moz-range-track { background: transparent; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgb(0 0 0 / .4);
}
.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.range:focus-visible { outline: 2px solid #a2b8d6; outline-offset: 0; }

.tip {
  position: absolute;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 2px var(--s2);
  border-radius: 4px;
  background: #fafafa;
  color: #0a0a0b;
  font-size: .8rem;
  white-space: nowrap;
  pointer-events: none;
}
.tip b { font-weight: 600; }

.bar { display: flex; align-items: center; gap: 2px; min-width: 0; }
.grow { flex: 1; }
.time { font-size: .85rem; font-variant-numeric: tabular-nums; padding: 0 var(--s2); white-space: nowrap; }

.ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: var(--touch);
  height: var(--touch);
  padding: 0 var(--s2);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ctl:hover { background: rgb(255 255 255 / .12); }
.ctl:focus-visible { outline: 2px solid #a2b8d6; outline-offset: -2px; }
.ctl[hidden] { display: none; }
.icon { width: 24px; height: 24px; display: block; }
.skip .icon { width: 26px; height: 26px; }
.skip-n { position: absolute; font-size: .55rem; top: 50%; left: 50%; transform: translate(-50%, -30%); }

.play .icon:last-child,
.vplayer.playing .play .icon:first-child,
.mute .icon:last-child,
.vplayer.muted .mute .icon:first-child,
.full .icon:last-child,
.vplayer.fs .full .icon:first-child { display: none; }
.vplayer.playing .play .icon:last-child,
.vplayer.muted .mute .icon:last-child,
.vplayer.fs .full .icon:last-child { display: block; }

.vol { display: flex; align-items: center; }
.volume { width: 72px; accent-color: #fff; }
@media (max-width: 639px), (pointer: coarse) {
  .volume { display: none; }
}
@media (max-width: 379px) {
  .time .sep,
  .time [data-dur] { display: none; }
}

.speed-wrap { position: relative; }
.speed { font-size: .9rem; min-width: 52px; }
.menu {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  z-index: 5;
  list-style: none;
  margin: 0;
  padding: var(--s1);
  border-radius: var(--radius);
  background: #18181b;
  border: 1px solid #3f3f46;
  min-width: 6rem;
}
.menu[hidden] { display: none; }
.menu button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 0 var(--s3);
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fafafa;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu button:hover,
.menu button:focus-visible { background: #3f3f46; outline: none; }
.menu button[aria-checked="true"] { font-weight: 700; color: #a2b8d6; }
@media (max-width: 639px) {
  /* A short phone player has no room for a column of six speeds: lay them out in a row. */
  .controls { position: relative; }
  .speed-wrap { position: static; }
  .menu { display: flex; justify-content: space-between; gap: 2px; left: var(--s2); right: var(--s2); }
  .menu button { min-height: var(--touch); min-width: var(--touch); padding: 0 var(--s2); white-space: nowrap; text-align: center; }
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 0;
}
.status-row:has(> :not([hidden])) { padding: var(--s2) 0 0; }
.now { margin: 0; font-size: .9rem; color: var(--muted-foreground); display: flex; align-items: center; gap: var(--s1); min-width: 0; }
.now[hidden] { display: none; }
.now strong { color: var(--spk, var(--foreground)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume {
  min-height: 36px;
  padding: 0 var(--s3);
  border: 1px solid var(--cta);
  border-radius: 999px;
  background: transparent;
  color: var(--cta);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.resume[hidden] { display: none; }
@media (pointer: coarse) {
  .resume,
  .back a,
  .menu button { min-height: var(--touch); }
  .back a { display: inline-flex; align-items: center; }
}

.dot {
  display: inline-block;
  flex: none;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--spk, var(--muted-foreground));
}

.note {
  margin: var(--s2) 0 0;
  padding: var(--s2) var(--s3);
  border-left: 3px solid var(--cta);
  background: var(--surface);
  font-size: .95rem;
}
.novideo { margin: 0; padding: var(--s4); border: 1px dashed var(--border); border-radius: var(--radius); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0 0; }
.actions .button.ghost { min-height: 40px; padding: 0 var(--s3); font-size: .875rem; }
@media (pointer: coarse) { .actions .button.ghost { min-height: var(--touch); } }
.actions .size { margin-left: .3em; font-weight: 400; }
@media (max-width: 479px) and (pointer: fine) {
  .ctl { min-width: 40px; }
}
@media (max-width: 479px) {
  .actions .size { display: none; }
  .ctl { padding: 0 var(--s1); }
  .speed { min-width: var(--touch); }
  .ctl.pip { display: none; }
  .bar .time { padding: 0 var(--s1); font-size: .8rem; }
}

.tabs { display: none; }
.panel h2 { margin: var(--s5) 0 var(--s2); }

/* Tabs work only with the player script; without it every panel stays on the page. */
.js .tabs {
  display: flex;
  position: sticky;
  z-index: 3;
  margin: var(--s3) calc(-1 * var(--s4)) 0;
  padding: 0 var(--s4);
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.js .tabs a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.js .tabs a[aria-selected="true"] { color: var(--foreground); border-bottom-color: var(--cta); }
.js .panel > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js .panel { padding-top: var(--s3); }
.js .panel[data-off] { display: none; }

/* Phone and tablet portrait: the player stays on top while the transcript scrolls. */
@media (max-width: 1023px) and (min-height: 560px) {
  .js .stage {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--background);
    margin: 0 calc(-1 * var(--s4));
    padding: 0 var(--s4) var(--s1);
  }
  .js .stage .vplayer { --pr: 0; margin: 0 calc(-1 * var(--s4)); }
  .js .stage .player { max-height: 34vh; }
  .js .tabs { top: var(--stage-h, 0); }
}

/* --- transcript --------------------------------------------------------------- */

.tools { display: grid; gap: var(--s2); margin: 0 0 var(--s2); }
.tools[hidden] { display: none; }
.find { display: flex; align-items: center; gap: var(--s1); }
.find input { flex: 1; min-width: 0; }
.find .count:empty { display: none; }
.find .count { min-width: 3.5rem; text-align: center; font-variant-numeric: tabular-nums; opacity: 1; color: var(--muted-foreground); font-size: .85rem; }
.ctl.small {
  min-width: var(--touch);
  border: 1px solid var(--border);
  color: var(--foreground);
}
.ctl.small:hover { background: var(--surface); }
.ctl.small:disabled { opacity: .4; cursor: default; }
.ctl.small:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

.chips { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 36px;
  padding: 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
@media (pointer: coarse) { .chip { min-height: var(--touch); } }
.chip[aria-pressed="true"] { border-color: var(--spk); box-shadow: inset 0 0 0 1px var(--spk); font-weight: 600; }

.cues { list-style: none; margin: 0; padding: 0; }
.cue {
  position: relative;
  padding: var(--s2) var(--s3) var(--s2) var(--s4);
  border-radius: var(--radius);
  cursor: pointer;
}
.cue::before {
  content: "";
  position: absolute;
  left: var(--s1);
  top: var(--s3);
  bottom: var(--s3);
  width: 3px;
  border-radius: 2px;
  background: var(--spk);
  opacity: .55;
}
.cue + .cue { margin-top: 2px; }
.cue:hover { background: var(--surface); }
.cue.is-current { background: var(--current); }
.cue.is-current::before { opacity: 1; }
.cue[hidden] { display: none; }
.cue-head { display: flex; align-items: baseline; gap: var(--s2); font-size: .85rem; }
.cue-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 2px 0;
}
a.cue-time:hover { color: var(--cta); text-decoration: underline; }
.cue-speaker { color: var(--spk); font-weight: 600; overflow-wrap: anywhere; }
.cue-text { margin: 0; overflow-wrap: anywhere; }
mark { background: var(--highlight); color: var(--highlight-foreground); border-radius: 2px; padding: 0 1px; }
mark.is-active { outline: 2px solid var(--cta); }
.empty-filter { margin: var(--s4) 0; }

/* --- people and legend -------------------------------------------------------- */

.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.legend li { display: grid; gap: 2px; }
.legend-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  min-height: var(--touch);
  padding: 0 var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.legend-item:hover { border-color: var(--spk); }
.legend-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.legend-share { font-variant-numeric: tabular-nums; color: var(--muted-foreground); font-size: .9rem; }
.legend progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: var(--surface);
  color: var(--spk);
  accent-color: var(--spk);
}
.legend progress::-webkit-progress-bar { background: var(--surface); border-radius: 2px; }
.legend progress::-webkit-progress-value { background: var(--spk); border-radius: 2px; }
.legend progress::-moz-progress-bar { background: var(--spk); border-radius: 2px; }

/* --- summary ------------------------------------------------------------------ */

.summary { overflow-wrap: anywhere; line-height: 1.55; }
.summary table { border-collapse: collapse; display: block; overflow-x: auto; }
.summary td, .summary th {
  border: 1px solid var(--border);
  padding: var(--s1) var(--s2);
  overflow-wrap: normal;
  vertical-align: top;
  text-align: left;
}
.summary pre { overflow-x: auto; }
.summary p { margin: 0 0 var(--s2); }
.summary p:last-child { margin-bottom: 0; }
.summary code { font-size: .9em; background: var(--surface); border-radius: 3px; padding: 0 .25em; }

.sumdoc { display: grid; gap: var(--s5); }
.sum-sec { min-width: 0; }
.sum-sec > h3 {
  margin: 0 0 var(--s3);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.sum-sec p, .sum-sec li { max-width: 70ch; }
.sum-sec h4, .sum-sec h5, .sum-sec h6 { font-size: 1rem; margin: var(--s3) 0 var(--s2); }
.summary strong { font-weight: 700; }
.summary strong.label { color: var(--cta); }

/* goal: the lead */
.sum-lead {
  font-size: 1.12rem;
  line-height: 1.5;
  padding: var(--s1) 0 var(--s1) var(--s4);
  border-left: 3px solid var(--cta);
}
.sum-lead p { max-width: 65ch; }

/* key takeaways: numbered callouts */
.sum-sec.sum-takeaways > ul,
.sum-sec.sum-takeaways > ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); counter-reset: tk; }
.sum-sec.sum-takeaways > ul > li,
.sum-sec.sum-takeaways > ol > li {
  margin: 0;
  counter-increment: tk;
  position: relative;
  padding: var(--s3) var(--s3) var(--s3) calc(var(--s3) + 2rem);
  background: var(--surface);
  border-radius: var(--radius);
}
.sum-sec.sum-takeaways > ul > li::before,
.sum-sec.sum-takeaways > ol > li::before {
  content: counter(tk);
  position: absolute;
  left: var(--s3);
  top: calc(var(--s3) + .1rem);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cta);
  color: var(--cta-foreground);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
}
.sum-takeaways li li { margin-top: var(--s1); }

/* topics: one card each */
.topic-list { display: grid; gap: var(--s3); }
.topic {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4) var(--s4);
}
.topic > h4 { margin: 0 0 var(--s2); font-size: 1.05rem; line-height: 1.3; }
.sum-sec ul, .sum-sec ol { margin: 0 0 var(--s2); padding-left: 1.25rem; }
.sum-sec ul:last-child, .sum-sec ol:last-child { margin-bottom: 0; }
.sum-sec li { margin: 0 0 var(--s2); }
.sum-sec li:last-child { margin-bottom: 0; }
.sum-sec li > ul,
.sum-sec li > ol {
  margin: var(--s2) 0 0;
  padding-left: var(--s4);
  border-left: 2px solid var(--border);
  list-style: none;
}
.sum-sec li > ul > li, .sum-sec li > ol > li { margin-bottom: var(--s1); }
.sum-sec li::marker { color: var(--muted-foreground); }

/* next steps: checklist */
.sum-sec.sum-next > ul,
.sum-sec.sum-next > ol { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.sum-sec.sum-next > ul > li,
.sum-sec.sum-next > ol > li { position: relative; padding-left: 1.9rem; margin: 0; }
.sum-sec.sum-next > ul > li::before,
.sum-sec.sum-next > ol > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--muted-foreground);
  border-radius: 4px;
}
.sum-sec.sum-next > ul > li.done::before,
.sum-sec.sum-next > ol > li.done::before {
  content: "✓";
  display: grid;
  place-items: center;
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-foreground);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
}
.sum-next li.done { color: var(--muted-foreground); }

/* timestamp chips */
.ts {
  position: relative;
  display: inline-block;
  margin-left: .2em;
  padding: 0 .5em;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: .08em;
}
a.ts:hover, a.ts:focus-visible { color: var(--cta); border-color: var(--cta); }
@media (pointer: coarse) {
  /* A larger hit area without growing the chip in the text. */
  a.ts::after { content: ""; position: absolute; inset: -10px -6px; }
}
.sum-lead .ts { font-size: .7rem; }

/* Desktop: player, summary and people on the left, transcript sticky on the right.
   The summary stays in the left column: a sticky transcript slides down its whole grid
   container, so a full-width row under it would be covered. */
@media (min-width: 1024px) {
  .wrap { max-width: 1280px; padding-left: var(--s5); padding-right: var(--s5); }
  .layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    grid-template-areas:
      "stage transcript"
      "actions transcript"
      "summary transcript"
      "people transcript";
    column-gap: var(--s5);
    align-items: start;
  }
  .stage { grid-area: stage; }
  .layout > .actions { grid-area: actions; }
  .panel-transcript { grid-area: transcript; }
  .panel-people { grid-area: people; }
  .panel-summary { grid-area: summary; }
  .js .tabs { display: none; }
  .js .panel[data-off] { display: block; }
  .js .panel-transcript[data-off] { display: flex; }
  .js .panel > h2 { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .panel-transcript {
    position: sticky;
    top: var(--s4);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2 * var(--s4));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: var(--s3);
  }
  .js .panel-transcript { padding-top: var(--s3); }
  .panel-transcript h2 { margin: 0 0 var(--s2); }
  .panel-transcript .cues { overflow-y: auto; flex: 1; min-height: 0; margin-right: calc(-1 * var(--s2)); padding-right: var(--s2); }
  .panel-people h2 { margin-top: var(--s5); }
  .chips { flex-wrap: wrap; overflow: visible; }
  .js .panel-people,
  .js .panel-summary { padding-top: 0; }
}

.neighbours {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
  margin: 2.5rem 0 0;
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}
.neighbours a { text-decoration: none; }
.neighbours .nb-title {
  display: block;
  color: var(--muted-foreground);
  font-size: .85rem;
  overflow-wrap: anywhere;
}
.neighbours .all { order: 3; }

@media (min-width: 640px) {
  .neighbours { grid-template-columns: 1fr auto 1fr; align-items: start; }
  .neighbours .all { order: 0; align-self: center; }
  .neighbours .next { text-align: right; }
}

@media (prefers-reduced-motion: no-preference) {
  .cue,
  .chip,
  .legend-item,
  .ctl,
  .played { transition: background-color .15s ease, border-color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
