:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #f0f2f5;
  --text: #1b1f24;
  --muted: #5d6673;
  --border: #d6dae0;
  --accent: #1f4e8c;
  --accent-text: #ffffff;
  --accent-soft: #e3ecf8;
  --rec: #c62828;
  --rec-soft: #fde8e8;
  --ok: #2e7d32;
  --warn: #b26a00;
  --sealed: #6b3fa0;
  --sidebar: #c77700;
  --select: rgba(31, 78, 140, 0.28);
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
  --radius: 8px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171b; --panel: #1d2127; --panel-2: #252a31; --text: #e8eaed; --muted: #9aa3ae; --border: #343a43;
    --accent: #6ea2e6; --accent-text: #0b1220; --accent-soft: #1f3048; --rec: #ef5350; --rec-soft: #3a1d1d;
    --ok: #66bb6a; --warn: #ffb74d; --sealed: #b394e0; --sidebar: #ffb74d; --select: rgba(110, 162, 230, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171b; --panel: #1d2127; --panel-2: #252a31; --text: #e8eaed; --muted: #9aa3ae; --border: #343a43;
  --accent: #6ea2e6; --accent-text: #0b1220; --accent-soft: #1f3048; --rec: #ef5350; --rec-soft: #3a1d1d;
  --ok: #66bb6a; --warn: #ffb74d; --sealed: #b394e0; --sidebar: #ffb74d; --select: rgba(110, 162, 230, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 14px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

button, .button {
  font: inherit; border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 6px;
  padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 32px;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary, a.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { background: var(--rec); color: #fff; border-color: var(--rec); }
button.toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
button.small { padding: 2px 8px; min-height: 26px; font-size: 13px; }
button.icon { padding: 4px 8px; min-width: 34px; justify-content: center; font-variant-numeric: tabular-nums; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; min-height: 32px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; }
input[type="range"] { padding: 0; }
textarea { width: 100%; resize: vertical; }

/* App frame */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 4px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { font-weight: 700; margin-right: 10px; display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.nav a:hover { background: var(--panel-2); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge { background: var(--accent); color: var(--accent-text); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.status-dot.green { background: var(--ok); } .status-dot.yellow { background: var(--warn); } .status-dot.red { background: var(--rec); }
main { flex: 1; padding: 16px; max-width: 1500px; width: 100%; margin: 0 auto; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 12px; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }

/* Tables */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th, table.list td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list th { position: sticky; top: 0; background: var(--panel-2); font-weight: 600; user-select: none; white-space: nowrap; }
table.list th.sortable { cursor: pointer; }
table.list tbody tr { cursor: default; }
table.list tbody tr:hover { background: var(--panel-2); }
table.list tbody tr.selected { background: var(--accent-soft); }
.table-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: var(--radius); }
.pill { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.rec { background: var(--rec); color: #fff; } .pill.ok { background: var(--ok); color: #fff; } .pill.warn { background: var(--warn); color: #fff; }
.pill.sealed { background: var(--sealed); color: #fff; }

/* Forms and dialogs */
.form { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-weight: 600; font-size: 13px; }
.field small { color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 6px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 12px; }
.form-error { color: var(--rec); min-height: 1em; }
.note { color: var(--muted); }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow: auto; }
.dialog { background: var(--panel); border-radius: 10px; padding: 18px; width: min(480px, 100%); box-shadow: var(--shadow); }
.dialog.wide { width: min(900px, 100%); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.key-box { font-family: var(--mono); font-size: 26px; letter-spacing: 2px; text-align: center; padding: 14px; border: 2px dashed var(--sealed); border-radius: 8px; margin: 10px 0; user-select: all; }
#toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 420px; }
.toast.error { background: var(--rec); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* Login */
.login { max-width: 380px; margin: 10vh auto; }
.login h1 { text-align: center; }

/* Main menu */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.menu a { display: block; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.menu a:hover { border-color: var(--accent); }
.menu b { display: block; font-size: 16px; margin-bottom: 4px; }

/* Monitor */
.monitor { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(360px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1000px) { .monitor { grid-template-columns: 1fr; } }
.room-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.room-tabs button.active { background: var(--accent); color: var(--accent-text); }
.rec-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-btn { font-size: 16px; padding: 10px 16px; min-width: 110px; justify-content: center; }
.rec-btn.record { color: var(--rec); border-color: var(--rec); font-weight: 700; }
.rec-btn.record.on, .rec-btn.record.on:disabled { background: var(--ok); border-color: var(--ok); color: #fff; opacity: 1; }
/* Recording state: NOT RECORDING large, red and flashing; RECORDING large and green; PAUSED large and amber. */
.rec-state { font-weight: 800; letter-spacing: 1px; font-size: 26px; }
.rec-state.idle { color: var(--rec); animation: blink 1.2s steps(2, start) infinite; }
.rec-state.recording { color: var(--ok); }
.rec-state.paused { color: var(--warn); }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .rec-state.idle { animation: none; } }
.big-clock { font-family: var(--mono); font-size: 28px; }
.clock-stack { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.rec-length { font-family: var(--mono); font-size: 16px; color: var(--muted); }
.meters { display: grid; gap: 4px; }
.meter { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; font-size: 12px; }
.meter .bar { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .15s; }
.meter .bar i.hot { background: var(--rec); }
.tag-line { display: flex; gap: 6px; }
.tag-line input { flex: 1; }
.quicktags { display: flex; flex-wrap: wrap; gap: 4px; }
.quicktags button { font-size: 13px; }
.quicktags kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tag-list { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.tag-item { display: grid; grid-template-columns: 78px 1fr auto; gap: 8px; padding: 4px 8px; border-bottom: 1px solid var(--border); align-items: baseline; }
.tag-item:last-child { border-bottom: 0; }
.tag-item.private { color: var(--sealed); font-style: italic; }
.tag-item.current { background: var(--accent-soft); }
.tag-item .t { font-family: var(--mono); font-size: 12px; color: var(--muted); cursor: pointer; }
.tag-item .who { font-size: 11px; color: var(--muted); }
.transcript { max-height: min(420px, 30vh); overflow: auto; border: 1px solid var(--border); border-radius: 6px; padding: 4px 0; background: var(--panel); }
.tx-line { padding: 3px 10px; display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: baseline; }
.tx-line .t { font-family: var(--mono); font-size: 12px; color: var(--muted); cursor: pointer; }
.tx-line .sp { font-weight: 700; margin-right: 6px; }
.tx-line.current { background: var(--accent-soft); }
.tx-line.hidden-part { color: var(--muted); font-style: italic; }
.tx-line.edited .text { text-decoration: underline dotted var(--muted); }

/* Player */
.player { display: flex; flex-direction: column; gap: 8px; }
.player-head { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.player-head b { font-family: var(--mono); font-weight: 600; }
.timeline { position: relative; height: 34px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; touch-action: none; user-select: none; }
.timeline .range { position: absolute; top: 0; bottom: 0; }
.timeline .range.sealed { background: repeating-linear-gradient(45deg, var(--sealed), var(--sealed) 3px, transparent 3px, transparent 7px); opacity: .55; }
.timeline .range.sidebar { background: var(--sidebar); opacity: .35; }
.timeline .range.pause { background: var(--muted); opacity: .25; }
.timeline .range.sel { background: var(--select); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.timeline .tick { position: absolute; top: 0; width: 1px; height: 8px; background: var(--accent); }
.timeline .head { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--rec); border-radius: 2px; }
.timeline .live-edge { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(90deg, transparent, transparent 4px, var(--border) 4px, var(--border) 5px); }
.transport { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.transport .sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.videos .cam { position: relative; background: #000; border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; }
.videos video { width: 100%; height: 100%; object-fit: contain; display: block; }
.videos .cam span { position: absolute; left: 6px; top: 4px; color: #fff; font-size: 12px; text-shadow: 0 0 3px #000; }
.videos .cam .none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; }
.play-layout { display: grid; grid-template-columns: minmax(420px, 1.2fr) minmax(320px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .play-layout { grid-template-columns: 1fr; } }

/* Captions for a courtroom (Hearing Access): a caption code and its QR code */
.caption-code-shown { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.caption-code-shown > .stack { flex: 1 1 260px; min-width: 0; }
.caption-qr { width: 180px; max-width: 100%; }
.caption-qr svg { width: 100%; height: auto; display: block; }
/* Setting up an authenticator app */
.mfa-qr { width: 200px; max-width: 100%; background: #fff; padding: 6px; border-radius: var(--radius); }
.mfa-qr svg { width: 100%; height: auto; display: block; }
.mfa-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05em; letter-spacing: .05em; user-select: all; }
.mfa-steps { margin: 0; padding-left: 1.3em; }
.mfa-code { font-size: 1.3em; letter-spacing: .15em; max-width: 12em; }
.mfa-recovery { columns: 2; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05em; list-style: none; padding: 0; user-select: all; }
.needs { display: inline-flex; flex-wrap: wrap; gap: 4px; }

/* Live captions */
.captions { font-size: var(--caption-size, 32px); line-height: 1.35; max-height: calc(100vh - 160px); overflow: auto; padding: 12px 20px; background: var(--panel); border-radius: var(--radius); }
.captions p { margin: 0 0 .5em; }
.captions .sp { font-weight: 800; color: var(--accent); margin-right: .4em; }

/* Recorders */
.recorders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 620px), 1fr)); gap: 12px; }
.recorder-card .sources-wrap { overflow-x: auto; }
.recorder-card .row { justify-content: space-between; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 2px 10px; font-size: 13px; margin: 8px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.alert { padding: 6px 10px; border-radius: 6px; margin: 4px 0; border-left: 4px solid var(--warn); background: var(--panel-2); }
.alert.red { border-color: var(--rec); }
.problem details summary { cursor: pointer; }
.problem.compact { padding: 4px 8px; font-size: 13px; }
.problem-detail { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 4px 0 0; max-height: 200px; overflow: auto; }
.problem-fix ol { margin: 0; padding-left: 22px; line-height: 1.5; }
.problem-fix ol li + li { margin-top: 6px; }
.problem-fix code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; }
.tabs button.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--panel-2); }

@media (max-width: 640px) {
  main { padding: 10px; }
  .nav a { padding: 6px 6px; }
}
@media print {
  .topbar, .toolbar, .no-print { display: none !important; }
}

/* Scheduling */
.assign-chip { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--accent-soft); border-left: 4px solid var(--accent); flex-wrap: wrap; }
.assign-chip.relief { border-left-color: var(--ok); }
.assign-chip.backup { border-left-color: var(--muted); background: var(--panel-2); }
.my-assignments { margin-bottom: 16px; }
.my-assignments .row { justify-content: space-between; border-bottom: 1px solid var(--border); padding: 6px 0; }
.my-assignments .row:last-child { border-bottom: 0; }

/* Scheduling: the list of all assignments, grouped by date, and a case's Assign button on the docket. */
.list .day-row th { background: var(--panel-2); text-align: left; padding-top: 10px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { text-decoration: underline; }
.docket-case { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.assign-chip.open { background: transparent; border: 1px dashed var(--warn); border-left: 4px solid var(--warn); }

/* Record page: live cameras. */
.live-cams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin-top: 8px; }
.live-cam { position: relative; background: #000; border-radius: 6px; overflow: hidden; }
.live-cam canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 30vh; object-fit: contain; }
.block.sized .live-cam canvas { max-height: none; }
.live-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.live-badge { font-variant-numeric: tabular-nums; }
.live-badge.ok::before { content: '● '; color: #4caf50; }
.live-badge.warn { color: #ffb74d; }
/* Camera controls under a live camera: hold-to-move pad, zoom, speed, saved positions. */
.ptz { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding: 8px 2px 4px; }
.ptz-move { display: flex; gap: 8px; align-items: center; }
.ptz-pad { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 30px); gap: 2px; }
.ptz-zoom { display: grid; grid-template-rows: repeat(2, 30px); gap: 4px; }
.ptz-btn { padding: 0; min-width: 34px; font-size: 14px; line-height: 1; touch-action: none; user-select: none; -webkit-user-select: none; }
.ptz-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ptz-dot { align-self: center; justify-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.ptz-speed { display: grid; gap: 2px; font-size: 12px; }
.ptz-side { flex: 1; min-width: 160px; display: grid; gap: 6px; }
.ptz-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.ptz-note { font-size: 12px; }
.ptz-note:empty { display: none; }

/* Arrangeable blocks (Record, Note Take): two columns with a bar between them that sets their widths. */
.monitor.blocks { grid-template-columns: minmax(0, var(--left, 1fr)) 0 minmax(0, var(--right, 1fr)); column-gap: 6px; }
.block-col { min-height: 80px; align-content: start; }
.block-split { visibility: hidden; } /* keeps its empty place in the grid, so the second column stays in the third track */
.block-grip { display: none; }
.block.sized { overflow: auto; }
.monitor.blocks.arranging { grid-template-columns: minmax(0, var(--left, 1fr)) 10px minmax(0, var(--right, 1fr)); }
.arranging .block-split { visibility: visible; cursor: col-resize; border-radius: 5px; background: var(--accent-soft); border: 1px dashed var(--accent); }
.arranging .block-col { outline: 1px dashed var(--border); outline-offset: 2px; border-radius: 8px; }
.arranging .block { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 8px; overflow: auto; min-height: 48px; cursor: grab; }
/* While arranging, a block is moved by any part of it: its contents don't take clicks until Done. */
.arranging .block > :not(.block-grip):not(.block-resize) { pointer-events: none; user-select: none; }
.block-resize { display: none; }
.arranging .block-resize { display: block; position: sticky; bottom: 0; cursor: ns-resize; text-align: center; font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent); padding: 3px; border-radius: 0 0 6px 6px; user-select: none; }
.arrange-btn { font-weight: 600; border-color: var(--accent); color: var(--accent); }
.arrange-btn.primary { color: var(--accent-text); }
/* A block given a height fills it: its panel stretches, and a list or transcript inside takes the rest. */
.block.sized { display: flex; flex-direction: column; }
.block.sized > .panel, .block.sized > div:not(.block-grip):not(.block-resize) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.block.sized .panel > .stack { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.block.sized .transcript, .block.sized .tag-list { flex: 1; min-height: 0; max-height: none; }
.arranging .block-grip { display: block; cursor: grab; user-select: none; font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent); padding: 3px 8px; border-radius: 6px 6px 0 0; }
.block.dragging { opacity: .45; }
@media (max-width: 1000px) {
  .monitor.blocks, .monitor.blocks.arranging { grid-template-columns: 1fr; }
  .arranging .block-split { display: none; }
}
.page-head { gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.page-head .room-tabs { margin-bottom: 0; }
.block-note { display: none; }
.arranging .block > :empty + .block-note { display: block; padding: 14px 12px; color: var(--muted); font-style: italic; background: var(--panel); border: 1px solid var(--border); border-top: 0; }

/* Realtime: a stenographer's realtime text with page:line numbers, and each viewer's highlights and notes. */
.rt-uncertified { font-size: 12px; color: var(--muted); border-left: 3px solid var(--warn); padding: 2px 8px; margin: 8px 0 0; }
.rt-held { background: var(--rec); color: #fff; font-weight: 700; font-size: 20px; letter-spacing: .04em; padding: 6px 12px; border-radius: 6px; margin-top: 8px; }
.rt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
@media (max-width: 900px) { .rt-layout { grid-template-columns: minmax(0, 1fr); } }
.rt-text { position: relative; height: calc(100vh - 300px); min-height: 260px; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 0 24px;
  font: var(--rt-size, 18px)/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.rt-line { position: relative; display: flex; gap: 14px; padding: 0 12px; cursor: pointer; white-space: pre-wrap; }
.rt-line:hover { background: var(--panel-2); }
.rt-num { flex: none; min-width: 3.6em; text-align: right; color: var(--muted); font-size: .72em; padding-top: .35em; user-select: none; }
.rt-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rt-line.page-start { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 4px; }
.rt-line.page-start::before { content: attr(data-page); position: absolute; right: 12px; top: -1.25em; font: 11px/1 system-ui, sans-serif; color: var(--muted); background: var(--panel); padding: 0 4px; }
.rt-line.held .rt-t { color: var(--muted); font-style: italic; }
.rt-line.has-note .rt-num::after { content: " ✎"; color: var(--accent); }
.rt-line.current { outline: 2px solid var(--accent); outline-offset: -2px; }
.rt-line.flash { animation: rt-flash 1.4s ease-out; }
@keyframes rt-flash { from { background: var(--accent-soft); } to { background: transparent; } }
.rt-text mark { background: rgba(255, 152, 0, .45); color: inherit; border-radius: 2px; }
.hl-yellow { background: rgba(255, 214, 0, .30); } .hl-green { background: rgba(76, 175, 80, .26); }
.hl-blue { background: rgba(33, 150, 243, .24); } .hl-pink { background: rgba(233, 30, 99, .22); }
.rt-menu { position: absolute; z-index: 5; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; gap: 6px; align-items: center; padding: 6px 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.rt-swatch { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--border); }
.rt-swatch.on { border-color: var(--text); }
.rt-notes h2 { margin-top: 0; }
.rt-notes-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 420px); overflow: auto; }
.rt-note { display: flex; gap: 6px; align-items: baseline; text-align: left; border: 0; border-radius: 6px; padding: 4px 6px; background: transparent; }
.rt-note:hover { background: var(--panel-2); }
.rt-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border); }
.rt-dot.hl-none { background: transparent; }

/* Reporters page: each court reporter's rates, dictionaries and files under their row. */
table.list tr.reporter-extra td { border-top: 0; padding-top: 0; font-size: 13px; color: var(--muted); }
label.button input[type=file] { display: none; }

/* Realtime, Live Editors: edited lines have a bar at the left; each editor's marker has their own color. */
.rt-line.edited { box-shadow: inset 4px 0 0 var(--accent); }
.rt-line.edited .rt-num { color: var(--accent); }
.rt-line.reporter-changed { box-shadow: inset 4px 0 0 var(--warn); }
.rt-line.locked { cursor: default; }
.rt-line.locked .rt-t { color: var(--muted); }
.rt-line.editing { background: var(--accent-soft); }
.rt-input { width: 100%; font: inherit; line-height: inherit; padding: 0 2px; margin: 0 -3px; border: 1px solid var(--accent); border-radius: 3px; background: var(--panel); color: var(--text); min-height: 0; }
.rt-who { position: absolute; right: 8px; top: 0; display: flex; gap: 3px; pointer-events: none; }
.rt-badge { display: inline-block; min-width: 1.9em; padding: 0 4px; border-radius: 9px; font: 600 11px/1.6 system-ui, sans-serif; text-align: center; color: #fff; background: var(--muted); }
.rt-badge.ed-0 { background: #1e7b5f; } .rt-badge.ed-1 { background: #8e3b9e; } .rt-badge.ed-2 { background: #b8541b; }
.rt-badge.ed-3 { background: #2a63b8; } .rt-badge.ed-4 { background: #a3324a; } .rt-badge.ed-5 { background: #5d6b1e; }
.rt-editors { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 8px; font-size: 14px; }
.rt-editor { display: inline-flex; gap: 4px; align-items: center; }
.rt-history-text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; }

/* Assign dialog: whom to choose, with each reporter's details for that time and courtroom. */
.candidates-box { display: flex; flex-direction: column; gap: 6px; }
.candidates-tools { margin: 0; }
.candidates { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.candidate { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.candidate .candidate-main { flex: 1; }
.candidate.chosen { background: var(--accent-soft); }
.candidate.busy .candidate-main > b { opacity: .7; }
.candidate .candidate-why { color: var(--warn); }
.pill.home { background: var(--accent); color: var(--accent-text, #fff); }
.stars { display: inline-flex; gap: 2px; }
.stars button { min-height: 0; padding: 0 2px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.stars button.on { color: #f5a623; }

/* Shown when SmartRM was updated while the page was open. */
.update-bar { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; margin-top: 4px; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--accent); }
.update-bar > span { flex: 1; min-width: 0; }

/* Speak into Crtrm: held down to talk; red while live in the courtroom. */
.talk-btn { font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; }
.talk-btn.talking { background: var(--rec); border-color: var(--rec); color: #fff; }
.talk-note { font-size: 13px; }

/* Which SmartRM this is, in the top bar: small, readable, click for the details. */
.version-btn { font: 12px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 3px 6px; min-height: 0; }
.version-btn:hover { border-color: var(--border); color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
.report-btn { white-space: nowrap; }
.report-preview { max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 12px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin: 6px 0 0; }
.prompt-text { width: 100%; font: 12px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; }
.verify-head { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.verify-head strong { font-size: 18px; }
.verify-ok { color: var(--ok); }
.verify-bad { color: var(--rec); }
.verify-warn { color: var(--warn); }
.verify-head.verify-ok { border-color: currentColor; }
.verify-head.verify-bad { border-color: currentColor; }
.sso-button { display: block; text-align: center; text-decoration: none; }
.login-or { text-align: center; margin: 0; }
.update-changes { margin: 0; padding-left: 18px; max-height: 320px; overflow: auto; }
