.cap-head { flex: none; padding: 14px var(--gutter) 0; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.cap-top { display: flex; align-items: center; gap: 10px; position: relative; }
.cap-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.cap-title h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }

.stages { position: relative; display: flex; gap: 26px; }
.stage { display: flex; align-items: center; gap: 8px; padding: 11px 0 13px; position: relative; font-size: 15px; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; transition: color var(--dur) var(--ease); }
.stage:hover { color: var(--ink); }
.stage.on { color: var(--ink); }
.stage-ink { position: absolute; left: 0; bottom: -1px; width: 0; height: 2px; background: var(--ink); border-radius: 2px 2px 0 0; pointer-events: none; }
.stage-ink.slide { transition: transform var(--dur) var(--ease), width var(--dur) var(--ease); }
.stage .stage-ico { width: 18px; height: 18px; flex: none; color: var(--ink-faint); transition: color var(--dur) var(--ease); }
.stage.on .stage-ico { color: var(--ink); }
.stage.done .stage-ico { color: var(--ok); }
.stage.locked { color: var(--ink-faint); font-weight: 600; cursor: default; }
.stage.locked:hover { color: var(--ink-faint); }
.stage .stage-state { width: 14px; height: 14px; flex: none; margin-left: -3px; color: var(--ink-faint); }
.stage.done .stage-state { color: var(--ok); }
.stage.locked .stage-ico { color: var(--ink-ghost); }

.toolbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); min-height: 60px; position: relative; }
.toolbar .st { font-size: 15px; }
.toolbar .busy-title { font-weight: 700; font-size: 15px; }

.work-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 20px var(--gutter); gap: 14px; overflow: auto; }
.rail-head { padding: 14px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.rail-body { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-hard) transparent; }
.list-none { font-size: 14px; color: var(--ink-soft); padding: 16px 20px; }

/* The player: Chrome's own <video controls>, nothing drawn over the seek bar. */
.player { position: relative; background: var(--player); border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; width: 100%; max-height: calc(100vh - 340px); display: flex; align-items: center; justify-content: center; flex: none; }
.player video { width: 100%; height: 100%; display: block; background: var(--player); }
.player video::cue { font: 500 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--cue-bg); }
.player .page-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--player); }
.player .page-frame img { max-width: 86%; max-height: 92%; border-radius: 4px; }
.player-note { position: absolute; inset: auto 0 0 0; padding: 14px 18px; background: var(--player-scrim); color: var(--on-player); font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.player-note .t { font-weight: 700; font-size: 16px; }

.caption { display: flex; align-items: center; gap: 14px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.caption .ct { font-weight: 700; font-size: 16px; }
.caption .btns { gap: 6px; }

.steplist { display: flex; flex-direction: column; }
.step { appearance: none; border: 0; background: none; width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; padding: 11px 20px; cursor: pointer; border-bottom: 1px solid var(--line); color: var(--ink); }
.step:hover { background: var(--surface); }
.step.on, .step.on:hover { background: var(--paper-2); }
.step .sb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* A recorded page's text can hold a word longer than the rail (Gmail's "AllNoneReadUnread…"). */
.step .stt { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.step .stt .step-kind { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; color: var(--ink-soft); }
.step .sm { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.step .sm .st { font-size: 13px; }
.step.dropped .stt { text-decoration: line-through; color: var(--ink-faint); }
.sthumb { display: block; width: 88px; aspect-ratio: 16 / 10; flex: none; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.sthumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.step.on .sthumb { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.frame-fig { display: flex; flex-direction: column; gap: 8px; }
.frame-fig img { width: 100%; border: 1px solid var(--line); border-radius: 4px; display: block; background: var(--surface); }
.say { display: flex; gap: 14px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); cursor: pointer; }
.say:hover { background: var(--surface); }
.say.on, .say.on:hover { background: var(--paper-2); box-shadow: inset 3px 0 0 var(--ink); }
.say .tc { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; width: 42px; flex: none; padding-top: 1px; }
.say .tx { font-size: 15px; line-height: 1.5; }
.req { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 2px 14px; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); font-size: 14.5px; }
.req .mono { color: var(--ink-soft); padding-top: 1px; }
.req .rs { font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.req .rn { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--ink-soft); }
.req-files { padding: 12px var(--gutter); }

.pics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pics figure { display: flex; flex-direction: column; gap: 4px; }
.pics img { width: 100%; border: 1px solid var(--line); border-radius: 4px; display: block; }
.later { flex: 1; display: flex; align-items: center; justify-content: center; }

#page-view { position: absolute; inset: 0; overflow: hidden; background: var(--surface); }
#page-view .page-view-mount { position: relative; width: 100%; height: 100%; overflow: hidden; }
#page-view .replayer-wrapper { position: relative; }
#page-view iframe { border: 0; pointer-events: none; }
#page-view .replayer-mouse::after { width: 26px; height: 26px; background: var(--click-wash); border: 2px solid var(--ember); box-shadow: 0 0 0 2px var(--click-halo); opacity: 1; transform: translate(-50%, -50%); }
.player .refusal { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-player); font-size: 15px; padding: 24px; text-align: center; }
.drawer-title { margin-top: 4px; font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.st.strong { font-weight: 600; }
.caption .st.sm { font-size: 13px; }

.tb-in { width: 100%; max-width: var(--column-w); margin: 0 auto; display: flex; align-items: center; gap: 12px; }
/* Every stage's reading column sits in the same place, under a toolbar of the same width. */
.doc-col { width: 100%; max-width: calc(var(--column-w) + 2 * var(--gutter)); margin: 0 auto; padding: var(--column-top) var(--gutter) var(--page-bottom); }
.cases-col { display: flex; flex-direction: column; gap: var(--section-gap); }
.edit-col { display: flex; flex-direction: column; gap: 28px; }
.edit-label { font-size: 16px; font-weight: 700; }
.edit-col .textarea { font-size: 15px; line-height: 1.65; }
.sk { display: block; height: 10px; border-radius: 4px; background: var(--line); }
.sk.sk-h { height: 14px; }
.md ol, .md ul { list-style: none; counter-reset: s; padding-left: 0; display: flex; flex-direction: column; gap: 12px; max-width: 72ch; }
.md ol > li, .md ul > li { counter-increment: s; position: relative; padding-left: 30px; line-height: 1.55; }
.md ol > li::before, .md ul > li::before { content: counter(s) "."; position: absolute; left: 0; top: 0; width: 22px; text-align: right; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.md p + ol, .md p + ul, .md ol + p, .md ul + p { margin-top: 12px; }
.refine-col { display: flex; flex-direction: column; gap: 32px; }
.question { display: flex; flex-direction: column; gap: 10px; }
.question .q-text { font-size: 16px; font-weight: 600; line-height: 1.45; }
.qa { display: flex; flex-direction: column; gap: 4px; }
.qa .qa-q { font-weight: 600; font-size: 15px; line-height: 1.45; }
.qa .qa-a { color: var(--ink); margin-top: 4px; padding-left: 12px; border-left: 2px solid var(--line-hard); }
.qa-now-list { display: flex; flex-direction: column; gap: 16px; }
.qa-now { display: flex; flex-direction: column; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.qa-now .qa-q { font-size: 16px; font-weight: 600; line-height: 1.45; }
.qa-now .qa-a { font-size: 15px; color: var(--ink); }
.case-head { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row.dense.case-row { appearance: none; background: none; border: 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--ink); min-height: 64px; padding: 12px; }
.case-text { font-size: 15px; line-height: 1.6; }
.var-chip { display: inline-block; padding: 0 6px; margin: 0 1px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); font-size: .92em; font-weight: 600; line-height: 1.45; white-space: nowrap; }
