:root{--word:#ffd54a;--bg:#fff;--fg:#1c1c1e;--muted:#6b6b70;--accent:#0b5fff;--hl:#dce8ff;--hit:#fff1a8;--line:#e3e3e6}
@media (prefers-color-scheme:dark){:root{--bg:#141416;--fg:#ececee;--muted:#9a9aa0;--accent:#6ea0ff;--word:#8a6d00;--hl:#1f3358;--hit:#5a4b00;--line:#2a2a2e}}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.5 system-ui,sans-serif;display:flex;flex-direction:column;height:100dvh}
header{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;padding:.5rem 1rem}
header select,header input[type=search]{font:inherit;padding:.3rem .5rem;background:var(--bg);color:var(--fg);border:1px solid var(--line);border-radius:6px}
#jump{display:flex;gap:.25rem}
header input[type=text],header button{font:inherit;padding:.3rem .5rem;background:var(--bg);color:var(--fg);border:1px solid var(--line);border-radius:6px}
header button{cursor:pointer}
header input[type=search]{flex:1;min-width:10rem}
.follow{color:var(--muted);font-size:.9rem}
audio{width:calc(100% - 2rem);margin:0 1rem}
#status{padding:.25rem 1rem;color:var(--muted);font-size:.85rem;min-height:1.6rem}
#transcript{flex:1;overflow-y:auto;padding:0 1rem 2rem;border-top:1px solid var(--line)}
.turn{display:flex;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--line)}
.who{flex:0 0 9rem;font-weight:600;font-size:.9rem;color:var(--muted)}
.who time{display:block;font-weight:400;font-variant-numeric:tabular-nums}
.who time a{color:var(--accent);text-decoration:none}
.text{flex:1}
.seg{cursor:pointer;border-radius:3px}
.seg:hover{background:var(--line)}
.seg.active{background:var(--hl)}
mark{background:var(--hit);color:inherit}
@media (max-width:600px){.turn{flex-direction:column;gap:.1rem}.who{flex:none}.who time{display:inline;margin-left:.5rem}}

::highlight(word){background:var(--word);color:inherit}

/* speaker legend (swimlanes) */
.turn{border-left:4px solid var(--c,transparent);padding-left:.5rem}
.turn.dim{opacity:.35}
#legend{padding:.25rem 1rem}
#legend summary{cursor:pointer;color:var(--muted);font-size:.9rem}
#legend-hint{font-size:.85rem}
#legend-scroll{--labw:11rem;--arrw:4rem;margin:.3rem 0;max-height:8.8rem;overflow-y:auto;border-radius:4px;scrollbar-gutter:stable;scrollbar-width:thin;
  /* scroll shadows: shown only where content is hidden */
  background:linear-gradient(var(--bg) 30%,#0000) top,linear-gradient(#0000,var(--bg) 70%) bottom,
    radial-gradient(farthest-side at 50% 0,#0006,#0000) top,radial-gradient(farthest-side at 50% 100%,#0006,#0000) bottom;
  background-repeat:no-repeat;background-size:100% 2rem,100% 2rem,100% .6rem,100% .6rem;background-attachment:local,local,scroll,scroll}
#lanes{position:relative}
.lane{display:flex;align-items:center;height:1.6rem}
.lane.sel{background:var(--hl)}
.lane-label{flex:0 0 var(--labw);font:inherit;font-size:.8rem;background:none;border:0;color:var(--fg);text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0}
.swatch{display:inline-block;width:.8em;height:.8em;border-radius:2px;margin-right:.4rem;vertical-align:-.05em}
.lane-track{position:relative;flex:1;height:60%;background:var(--line);border-radius:3px;cursor:pointer}
.lane-track i{position:absolute;top:0;bottom:0;background:var(--c)}
.lane-arrows{flex:0 0 var(--arrw);text-align:right}
.lane-arrows button{font:inherit;font-size:.8rem;background:var(--bg);color:var(--fg);border:1px solid var(--line);border-radius:6px;cursor:pointer;padding:0 .4rem;margin-left:.2rem}
#playhead{position:absolute;top:0;bottom:0;width:2px;background:var(--fg);pointer-events:none}
#legend button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* disclaimer */
#disclaimer{padding:.35rem 1rem;border-top:1px solid var(--line);color:var(--muted);font-size:.78rem;line-height:1.3}
