/* Call Review design system: one set of tokens, light and dark themes, used by every page. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/Inter-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/JetBrainsMono-latin-wght.woff2") format("woff2"); }

:root {
  --font: "Inter", system-ui, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sb-w: 248px; --sb-w-min: 76px; --top-h: 64px; --radius: 14px; --radius-sm: 9px;
  --ease: cubic-bezier(.2, .7, .2, 1); --t: 180ms;
  /* light */
  --bg: #f3f5fb; --bg-tint: radial-gradient(1200px 600px at 100% -10%, rgba(99,102,241,.10), transparent 60%),
                            radial-gradient(900px 500px at -10% 110%, rgba(34,211,238,.08), transparent 60%);
  --panel: #ffffff; --panel-2: #f7f8fc; --sidebar: #ffffff; --elev: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --elev-hi: 0 12px 40px rgba(15,23,42,.14);
  --text: #0f172a; --muted: #5b6475; --line: #e3e7ef; --line-2: #d4d9e3;
  --accent: #5b5bd6; --accent-2: #0ea5c6; --accent-ink: #ffffff; --accent-soft: rgba(91,91,214,.10);
  --grad: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --prof: #c81e1e; --prof-bg: #fde8e8; --aggr: #b45309; --aggr-bg: #fef3c7; --loud: #7c3aed; --loud-bg: #ede9fe;
  --sarcasm: #eab308; --sarcasm-ink: #854d0e;
  --warm: #15803d; --warm-bg: #dcfce7; --distress: #7c3aed; --neutral: #64748b;
  --playing: rgba(91,91,214,.08); --hit: #fef08a; --ok: #15803d; --ok-bg: #dcfce7;
  --c0: #0f766e; --c0-bg: #ccfbf1; --c1: #1d4ed8; --c1-bg: #dbeafe; --c2: #7e22ce; --c2-bg: #f3e8ff;
  --c3: #b45309; --c3-bg: #fef3c7; --c4: #be123c; --c4-bg: #ffe4e6; --c5: #374151; --c5-bg: #e5e7eb;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0e17; --bg-tint: radial-gradient(1200px 600px at 100% -10%, rgba(99,102,241,.16), transparent 60%),
                            radial-gradient(900px 500px at -10% 110%, rgba(34,211,238,.10), transparent 60%);
  --panel: #111726; --panel-2: #0d1320; --sidebar: #0d1320; --elev: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35);
  --elev-hi: 0 18px 50px rgba(0,0,0,.55);
  --text: #e6e9f0; --muted: #9aa4b6; --line: #1f2838; --line-2: #2a3547;
  --accent: #8b8cf8; --accent-2: #22d3ee; --accent-ink: #0b0f1a; --accent-soft: rgba(139,140,248,.14);
  --grad: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%);
  --prof: #fb7185; --prof-bg: rgba(251,113,133,.14); --aggr: #fbbf24; --aggr-bg: rgba(251,191,36,.14);
  --sarcasm: #facc15; --sarcasm-ink: #fde047;
  --loud: #c4b5fd; --loud-bg: rgba(196,181,253,.14); --warm: #4ade80; --warm-bg: rgba(74,222,128,.13);
  --distress: #c084fc; --neutral: #94a3b8;
  --playing: rgba(139,140,248,.12); --hit: rgba(250,204,21,.24); --ok: #86efac; --ok-bg: rgba(134,239,172,.13);
  --c0: #5eead4; --c0-bg: rgba(94,234,212,.13); --c1: #93c5fd; --c1-bg: rgba(147,197,253,.14); --c2: #d8b4fe; --c2-bg: rgba(216,180,254,.14);
  --c3: #fcd34d; --c3-bg: rgba(252,211,77,.13); --c4: #fda4af; --c4-bg: rgba(253,164,175,.14); --c5: #d1d5db; --c5-bg: rgba(209,213,219,.12);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* class display rules (flex bars) must not un-hide elements */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg-tint), var(--bg); background-attachment: fixed; color: var(--text);
  font: 450 15px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.55rem; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; margin: 0 0 .25rem; }
h2 { font-size: 1.02rem; letter-spacing: -.01em; font-weight: 650; margin: 0 0 .7rem; }
h3 { font-size: .9rem; font-weight: 650; margin: .9rem 0 .35rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 .3em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.num, .ts, time, .kpi-value { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

/* ---------- controls ---------- */
button, .btn { font: inherit; font-weight: 550; font-size: .9rem; padding: .45rem .9rem; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); background: var(--panel); color: var(--text); cursor: pointer; line-height: 1.3;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); text-decoration: none; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; }
button.primary, .btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.28); }
:root[data-theme="dark"] button.primary, :root[data-theme="dark"] .btn.primary { color: #0b0f1a; }
button.primary:hover:not(:disabled) { box-shadow: 0 8px 26px rgba(99,102,241,.38); }
button.ghost { background: transparent; border-color: transparent; } button.ghost:hover:not(:disabled) { background: var(--accent-soft); border-color: transparent; }
button.danger { color: var(--prof); } button.danger:hover:not(:disabled) { border-color: var(--prof); background: var(--prof-bg); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.icon-btn svg { width: 19px; height: 19px; }
input, select, textarea { font: inherit; font-size: .92rem; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .45rem .65rem;
  transition: border-color var(--t), box-shadow var(--t); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 1rem; height: 1rem; }
label { color: var(--text); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--t) var(--ease); }
html.sb-min .shell { grid-template-columns: var(--sb-w-min) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 12px; gap: 6px; z-index: 30; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: var(--text); font-weight: 750; letter-spacing: -.02em; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(99,102,241,.35); }
.logo svg { width: 20px; height: 20px; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 10px; color: var(--muted); font-weight: 550; white-space: nowrap;
  transition: background var(--t), color var(--t); position: relative; }
.nav a svg { flex: none; width: 20px; height: 20px; }
.nav a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav .count-pill { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 0 .45rem; }
.nav-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 11px 4px; white-space: nowrap; }
.sidebar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.user-chip .who-name { font-weight: 650; font-size: .9rem; line-height: 1.2; } .user-chip .who-role { font-size: .75rem; color: var(--muted); }
html.sb-min .sidebar .hide-min { display: none; }
html.sb-min .nav a { justify-content: center; padding: 10px 0; } html.sb-min .brand { justify-content: center; padding-inline: 0; }
html.sb-min .user-chip { justify-content: center; padding: 6px; border: 0; background: none; }

.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1; max-width: 560px; position: relative; }
.topbar .search input { width: 100%; padding-left: 2.3rem; background: var(--panel); border-radius: 12px; }
.topbar .search svg { position: absolute; left: .75rem; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.topbar .grow { flex: 1; }
.page { padding: 26px 28px 60px; max-width: 1480px; margin: 0 auto; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin: 0; }
.flash { margin: 0 0 16px; padding: .65rem .9rem; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--line-2); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--elev-hi); padding: 8px; z-index: 40; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: .5rem .65rem; border-radius: 9px; border: 0;
  background: none; color: var(--text); font-weight: 500; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover:not(:disabled) { background: var(--accent-soft); text-decoration: none; }
.menu-pop .seg-ctl { display: flex; gap: 4px; padding: 4px; background: var(--panel-2); border-radius: 10px; margin: 4px 0 6px; }
.menu-pop .seg-ctl button { justify-content: center; padding: .35rem; font-size: .82rem; }
.menu-pop .seg-ctl button[aria-pressed="true"] { background: var(--panel); box-shadow: var(--elev); color: var(--accent); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.scrim { display: none; }

@media (max-width: 900px) {
  .shell, html.sb-min .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-102%); transition: transform var(--t) var(--ease); box-shadow: var(--elev-hi); }
  html.sb-open .sidebar { transform: none; }
  html.sb-open .scrim { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.45); z-index: 25; }
  html.sb-min .sidebar .hide-min { display: revert; } html.sb-min .nav a { justify-content: flex-start; padding: 9px 11px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .page { padding: 18px 16px 60px; }
}
@media (min-width: 901px) { .only-mobile { display: none !important; } }
@media (max-width: 900px) { .only-desktop { display: none !important; } }

/* ---------- cards, KPIs ---------- */
.card, .transcript, .table-wrap, .filters { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--elev); }
.card, .transcript { padding: 18px 20px; }
.grid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 600px) { .kpis { gap: 10px; } .kpi { padding: 12px 14px; } .kpi .kpi-value { font-size: 1.5rem; } }
.kpi { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--elev); }
.kpi::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%; background: var(--kpi-glow, var(--accent-soft)); filter: blur(10px); opacity: .9; }
.kpi .kpi-label { font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .kpi-label svg { width: 16px; height: 16px; }
.kpi .kpi-value { font-size: 1.85rem; font-weight: 750; letter-spacing: -.03em; margin-top: 4px; line-height: 1.1; }
.kpi .kpi-foot { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.kpi.prof { --kpi-glow: var(--prof-bg); } .kpi.prof .kpi-value { color: var(--prof); }
.kpi.aggr { --kpi-glow: var(--aggr-bg); } .kpi.aggr .kpi-value { color: var(--aggr); }
.kpi.loud { --kpi-glow: var(--loud-bg); } .kpi.loud .kpi-value { color: var(--loud); }
.kpi.warm { --kpi-glow: var(--warm-bg); } .kpi.warm .kpi-value { color: var(--warm); }

/* ---------- legacy page components, restyled ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; box-shadow: var(--elev); color: var(--muted); font-size: .85rem; }
.stats b { display: block; font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; color: var(--text); }
.stats .prof b { color: var(--prof); } .stats .aggr b { color: var(--aggr); }
.filters { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; padding: .85rem 1rem; }
.filters label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; color: var(--muted); }
.filters .export { margin-left: auto; }
.count { margin: .9rem 0 .4rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.calls { width: 100%; border-collapse: collapse; }
.calls th, .calls td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.calls tbody tr:last-child td { border-bottom: 0; }
.calls th { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: var(--muted); background: var(--panel-2); position: sticky; top: 0; }
.calls th a { color: var(--muted); } .calls th a.active { color: var(--accent); }
.calls tbody tr { cursor: pointer; transition: background var(--t); } .calls tbody tr:hover { background: var(--playing); }
.calls tr.done td { opacity: .62; }
.calls .num { text-align: right; } .calls .summary { min-width: 280px; color: var(--text); }
.pill { display: inline-block; border-radius: 999px; padding: .05rem .6rem; font-size: .78rem; font-weight: 650; background: var(--panel-2); border: 1px solid var(--line); }
.pill.prof { background: var(--prof-bg); color: var(--prof); border-color: transparent; }
.pill.aggr { background: var(--aggr-bg); color: var(--aggr); border-color: transparent; }
.pill.loud { background: var(--loud-bg); color: var(--loud); border-color: transparent; }
.crumbs { display: flex; justify-content: space-between; margin-bottom: 1rem; font-weight: 550; }
.crumbs span a { margin-left: 1rem; }
.call-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; margin-bottom: .4rem; }
.head-flags { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.head-flags .btn { padding: .05rem .7rem; font-size: .78rem; line-height: 1.5; border-radius: 999px; }
.player { position: sticky; top: var(--top-h); z-index: 9; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); padding: .8rem 0; margin: 0 -2px; }
.player audio { width: 100%; height: 44px; border-radius: 12px; }
.player-btns { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .5rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: 1rem; }
.card textarea { width: 100%; margin: .5rem 0; }
.check { display: flex; gap: .45rem; align-items: center; }
.summary-box { border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; padding-bottom: .8rem; }

.seg { position: relative; display: grid; grid-template-columns: 1.2rem 4.4rem 5.8rem 1fr; gap: .55rem; margin: 0; padding: .45rem .6rem;
  border-left: 3px solid transparent; border-radius: 8px; cursor: pointer; transition: background var(--t); }
.seg:hover { background: var(--playing); }
.seg.playing { background: var(--playing); border-left-color: var(--accent); }
.seg.target { outline: 2px solid var(--accent); }
.seg.loud { border-left-color: var(--loud); }
.seg.loud::after { content: "loud"; grid-column: 3; font-size: .68rem; color: var(--loud); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.seg .ts { color: var(--muted); font-family: var(--mono); font-size: .82rem; padding-top: .1rem; }
.seg .spk { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.seg .seg-sel { margin: .3rem 0 0; cursor: pointer; }
.seg.selected { background: var(--hit); }
.seg.in-clip { box-shadow: inset -3px 0 var(--c0); }
.seg .txt { padding-right: 4.5rem; }
mark { border-radius: 4px; padding: 0 3px; color: inherit; }
mark.profanity { background: var(--prof-bg); color: var(--prof); font-weight: 650; }
mark.aggression { background: var(--aggr-bg); color: var(--aggr); font-weight: 650; }
mark.fp { background: none; color: inherit; font-weight: inherit; text-decoration: underline dotted var(--muted); }
mark.hit { background: var(--hit); }

.flag-list { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.flag-list li { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; padding: .3rem 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.flag-list li:last-child { border-bottom: 0; }
.flag-list .type { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 750; }
.flag-list .profanity .type { color: var(--prof); } .flag-list .aggression .type { color: var(--aggr); } .flag-list .loud .type { color: var(--loud); }
.flag-list li.fp { opacity: .5; } .flag-list li.fp .term { text-decoration: line-through; }
.flag-list .manual { font-size: .68rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; }
.flag-del { padding: 0 .4rem; font-size: .75rem; line-height: 1.4; }
.result ul { margin: 0; padding-left: 1rem; } .result li { margin: .3rem 0; }
.result { margin-bottom: .9rem; } .result .ts { margin-right: .45rem; font-family: var(--mono); font-size: .85rem; }

.actions { display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: center; margin: 1rem 0 .6rem; }
.actions .count { margin: 0; } .actions label { display: flex; gap: .35rem; align-items: center; font-size: .9rem; color: var(--muted); }
.actions .spacer { flex: 1; }
.calls th.sel, .calls td.sel { width: 2.2rem; padding-right: 0; cursor: default; }
.queue-banner { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: 1rem; background: var(--panel);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: .75rem 1rem; box-shadow: 0 0 0 4px var(--accent-soft); }
.queue-banner .qb-text { flex: 1 1 320px; overflow-wrap: anywhere; }
.qb-bar { flex: 1 1 200px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
#qbFill { height: 100%; width: 0; background: var(--grad); transition: width .5s; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 1px 7px; letter-spacing: .01em; }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.queued { color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }
.badge.running { color: var(--accent); background: var(--accent-soft); }
.badge.error { color: var(--prof); background: var(--prof-bg); }
.badge.tone-calm { color: var(--warm); background: var(--warm-bg); }
.badge.tone-tense { color: var(--aggr); background: var(--aggr-bg); }
.badge.tone-hostile, .badge.tone-threatening { color: var(--prof); background: var(--prof-bg); }
.who small { color: var(--muted); font-size: .8rem; margin-left: .25rem; }
.notice { background: var(--aggr-bg); border: 1px solid color-mix(in srgb, var(--aggr) 45%, transparent); border-radius: 12px; padding: .6rem .9rem; margin: .6rem 0; }
.flag-notes { margin: 0; padding-left: 1.1rem; } .flag-notes a { font-family: var(--mono); font-size: .85rem; margin-right: .35rem; }
.scan-msg { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: .6rem .9rem; margin: .8rem 0 0; overflow-wrap: anywhere; }
.calls tr.new td { background: var(--playing); } .calls tr.new td:first-child { box-shadow: inset 3px 0 var(--accent); }

.clip-bar { position: fixed; bottom: 14px; left: calc(var(--sb-w) + (100vw - var(--sb-w)) / 2); transform: translateX(-50%); z-index: 15; margin: 0;
  width: min(860px, calc(100vw - var(--sb-w) - 28px)); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: .6rem .8rem; box-shadow: var(--elev-hi); }
html.sb-min .clip-bar { left: calc(var(--sb-w-min) + (100vw - var(--sb-w-min)) / 2); width: min(860px, calc(100vw - var(--sb-w-min) - 28px)); }
.clip-toast, #markMsg { position: fixed; bottom: 14px; left: calc(var(--sb-w) + (100vw - var(--sb-w)) / 2); transform: translateX(-50%); z-index: 14; margin: 0;
  width: min(860px, calc(100vw - var(--sb-w) - 28px)); background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: .55rem .9rem; box-shadow: var(--elev-hi); }
@media (max-width: 900px) { .clip-bar, .clip-toast, #markMsg, html.sb-min .clip-bar { left: 50%; width: calc(100vw - 20px); } }
.transcript { padding-bottom: 7rem; }
.clips audio { width: 180px; height: 34px; margin-top: .3rem; }
.clips .clip-note { width: 9rem; } .clip-note.saved { border-color: var(--c0); }
.clips .summary { min-width: 180px; }
.build { margin-top: 1rem; }
.build-form { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; }
.build-form label { display: flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .9rem; }
.built { list-style: none; padding: 0; margin: 0; } .built li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.built audio { width: 320px; max-width: 100%; vertical-align: middle; margin: .3rem .6rem .3rem 0; }

.seg-tools { position: absolute; right: .5rem; top: .4rem; display: flex; gap: .35rem; align-items: center; }
.seg-edit { padding: 0 .45rem; font-size: .85rem; line-height: 1.5; opacity: 0; }
.seg:hover .seg-edit, .seg-edit:focus { opacity: 1; }
.edited { font-size: .68rem; font-weight: 700; color: var(--c0); border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; cursor: help; background: var(--panel); }
.seg-editor { grid-column: 4; display: flex; flex-direction: column; gap: .35rem; }
.seg-editor textarea { width: 100%; font: inherit; }
.mark-bar { position: fixed; z-index: 20; display: flex; gap: .35rem; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: .35rem; box-shadow: var(--elev-hi); }
.mark-bar button { font-size: .84rem; padding: .3rem .65rem; }
.mark-bar .m-prof { color: var(--prof); border-color: var(--prof); } .mark-bar .m-aggr { color: var(--aggr); border-color: var(--aggr); }
.mark-all { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); padding: 0 .3rem; white-space: nowrap; }

.add-word { margin: 1rem 0; } .add-word input#wTerm { width: 18rem; max-width: 100%; }
.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.type-profanity { color: var(--prof); } .type-aggression { color: var(--aggr); }
.words td, .words th { padding: .45rem .6rem; } .words tbody tr { cursor: default; }
.w-del { padding: 0 .45rem; font-size: .8rem; }
.builtin { margin-top: .9rem; } .builtin summary { cursor: pointer; color: var(--muted); font-weight: 550; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 0; }
.chip { font-size: .8rem; border: 1px solid var(--line-2); border-radius: 999px; padding: .05rem .6rem; background: var(--panel-2); }

.spk-pick { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; width: 100%; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .5rem; }
.spk-btn { padding: .2rem .65rem; font-size: .85rem; }
.spk-stats { display: block; margin-top: .25rem; }
.seg .spk-set { font-weight: 650; font-size: .78rem; border-radius: 6px; padding: 0 .4rem; align-self: start; justify-self: start; max-width: 100%; }
.seg .spk-voice { font-style: italic; font-weight: 500; opacity: .85; }
.spk-c0 { color: var(--c0); background: var(--c0-bg); } .spk-c1 { color: var(--c1); background: var(--c1-bg); } .spk-c2 { color: var(--c2); background: var(--c2-bg); }
.spk-c3 { color: var(--c3); background: var(--c3-bg); } .spk-c4 { color: var(--c4); background: var(--c4-bg); } .spk-c5 { color: var(--c5); background: var(--c5-bg); }
.spk-btn.spk-c0, .spk-btn.spk-c1, .spk-btn.spk-c2, .spk-btn.spk-c3, .spk-btn.spk-c4 { border-color: currentColor; font-weight: 650; }
#acceptVoice { font-size: .8rem; padding: .15rem .55rem; margin: 0 .4rem; }
.voice-result { margin-top: .8rem; }

@media (max-width: 600px) {
  .seg { grid-template-columns: 1.2rem 3.4rem 1fr; } .seg .spk { display: none; }
  .seg .spk-set { display: inline-block; grid-column: 2; grid-row: 2; font-size: .68rem; }
  .seg .txt { padding-right: 1.8rem; } .seg-edit { opacity: .6; }
  .seg-editor { grid-column: 2 / -1; }
  .seg-tools:has(.edited:not([hidden])) { position: static; grid-column: 2 / -1; justify-content: flex-end; }
  .filters .export { margin-left: 0; }
  .mark-bar { flex-wrap: wrap; max-width: calc(100vw - 16px); }
  h1 { font-size: 1.3rem; }
}

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; box-shadow: var(--elev-hi); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.auth-card .brand { padding: 0 0 18px; }
.auth-card form { display: grid; gap: 14px; margin-top: 8px; }
.auth-card label { display: grid; gap: 6px; font-weight: 600; font-size: .88rem; }
.auth-card input { width: 100%; padding: .65rem .8rem; }
.auth-card button.primary { width: 100%; padding: .7rem; font-size: .95rem; margin-top: 4px; }
.form-error { color: var(--prof); background: var(--prof-bg); border-radius: 10px; padding: .55rem .75rem; font-size: .9rem; }
.form-ok { color: var(--ok); background: var(--ok-bg); border-radius: 10px; padding: .55rem .75rem; font-size: .9rem; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; box-shadow: var(--elev); }
.tabs a { display: flex; align-items: center; gap: 8px; padding: .5rem .9rem; border-radius: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs a svg { width: 17px; height: 17px; }
.tabs a:hover { color: var(--text); text-decoration: none; background: var(--accent-soft); }
.tabs a.active { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,.25); }
:root[data-theme="dark"] .tabs a.active { color: #0b0f1a; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; } .field > span { font-weight: 600; font-size: .88rem; } .field small { color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: background var(--t); cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--t) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.word-tile { display: flex; align-items: center; gap: 10px; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); }
.word-tile.off { opacity: .55; } .word-tile .w { font-weight: 650; flex: 1; overflow-wrap: anywhere; } .word-tile .h { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.colour-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-2); }
.key-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; } .dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); } .dot.bad { background: var(--prof); box-shadow: 0 0 0 4px var(--prof-bg); }
.table-plain { width: 100%; border-collapse: collapse; } .table-plain th, .table-plain td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-plain th { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: .7rem 1rem; box-shadow: var(--elev-hi); max-width: min(420px, calc(100vw - 36px)); }
.toast.err { border-color: var(--prof); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; } }

/* call list: names only in the table (the number is on the call page and in the tooltip) */
.calls .who small { display: none; }

/* ---------- dashboard, charts, drill-down (phase B) ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.1rem; padding: .8rem 1rem; margin-bottom: 10px; }
.tb-field { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .88rem; font-weight: 550; }
.chipset { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.chip-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.fchip { font-size: .82rem; padding: .28rem .7rem; border-radius: 999px; background: var(--panel-2); }
.fchip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.fchip.prof[aria-pressed="true"] { background: var(--prof-bg); border-color: var(--prof); color: var(--prof); }
.fchip.aggr[aria-pressed="true"] { background: var(--aggr-bg); border-color: var(--aggr); color: var(--aggr); }
.filter-note { margin: 0 0 10px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.dash-grid .span-2 { grid-column: span 2; } .dash-grid .span-3 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid .span-2, .dash-grid .span-3 { grid-column: auto; } }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-tools { display: flex; align-items: center; gap: 12px; }
.chart { width: 100%; min-height: 60px; }
.chart svg { display: block; overflow: visible; }
.bar-label { font-size: 13px; font-weight: 600; fill: var(--text); }
.bar-value { font-size: 12px; font-weight: 700; fill: var(--muted); font-variant-numeric: tabular-nums; }
.bar-hit { fill: transparent; }
.bar-row:hover .bar-hit, .bar-row:focus .bar-hit, .col:hover .bar-hit, .col:focus .bar-hit { fill: var(--accent-soft); }
.bar-row:focus, .col:focus, .cloud-word:focus { outline: none; }
.bar-row:focus-visible .bar-hit, .col:focus-visible .bar-hit { stroke: var(--accent); stroke-width: 2; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.axis { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.profanity { background: var(--prof); } .sw.aggression { background: var(--aggr); } .sw.loud { background: var(--loud); }
.cloud { min-height: 280px; } .cloud-big { min-height: 420px; }
.cloud-word { transition: opacity var(--t), transform var(--t); transform-box: fill-box; transform-origin: center; }
.cloud svg:hover .cloud-word { opacity: .45; } .cloud svg .cloud-word:hover, .cloud svg .cloud-word:focus-visible { opacity: 1; transform: scale(1.08); }
.cloud-word.flagged { paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.chart-tip { position: fixed; z-index: 70; pointer-events: none; background: var(--panel); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 10px; padding: .45rem .65rem; font-size: .83rem; line-height: 1.45; box-shadow: var(--elev-hi); max-width: 260px; }
.tip-type { font-size: .7rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.tip-type.profanity { color: var(--prof); } .tip-type.aggression { color: var(--aggr); } .tip-type.loud { color: var(--loud); }
.attn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attn-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: .55rem .7rem; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.attn-list a:hover { border-color: var(--accent); text-decoration: none; }
.at-date { font-weight: 650; font-variant-numeric: tabular-nums; } .at-who { grid-column: 1; font-size: .82rem; color: var(--muted); }
.at-flags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.at-sev { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 1.25rem; font-weight: 750; color: var(--prof); font-variant-numeric: tabular-nums; }
.seg-toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.seg-toggle button { border: 0; background: none; padding: .4rem .9rem; }
.seg-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.sortable th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }

.drill { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: var(--elev-hi); display: flex; flex-direction: column; animation: drill-in var(--t) var(--ease); }
@keyframes drill-in { from { transform: translateX(24px); opacity: 0; } }
.drill-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drill-crumbs { flex: 1; font-weight: 650; overflow-wrap: anywhere; }
.drill-body { padding: 14px 16px 40px; overflow-y: auto; }
.drill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drill-call { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: .6rem .75rem; background: var(--panel-2); }
.dc-date { font-weight: 650; font-variant-numeric: tabular-nums; } .dc-who { grid-column: 1; font-size: .82rem; color: var(--muted); font-weight: 500; }
.dc-count { grid-column: 2; grid-row: 1; font-weight: 750; color: var(--accent); } .drill-call .badge { grid-column: 2; grid-row: 2; justify-self: end; }
.occ { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem; margin-bottom: 10px; background: var(--panel-2); }
.occ-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.occ-play { width: 30px; height: 30px; font-size: .8rem; }
.occ-time { font-family: var(--mono); font-size: .85rem; font-weight: 600; }
.occ-spk { font-size: .75rem; font-weight: 700; color: var(--c1); background: var(--c1-bg); border-radius: 6px; padding: 0 .4rem; }
.occ-open { margin-left: auto; font-size: .85rem; font-weight: 600; }
.occ-ctx { margin: 2px 0; color: var(--muted); font-size: .88rem; } .occ-line { margin: 4px 0; font-weight: 550; }
@media (max-width: 600px) { .drill { width: 100vw; } .toolbar { gap: .6rem; } }

/* ---------- phase D: call page visualisation ---------- */
.wave { margin-top: .6rem; }
.wave-canvas { display: block; width: 100%; height: 76px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.wave-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wave-legend { gap: 10px; font-size: .76rem; }
.mk { font-weight: 650; } .mk.prof { color: var(--prof); } .mk.aggr { color: var(--aggr); } .mk.loud { color: var(--loud); } .mk.warm { color: var(--warm); }

.summary-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.2rem; align-items: start; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; padding-bottom: .8rem; }
.summary-grid .summary-box { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
@media (max-width: 1280px) { .summary-grid { grid-template-columns: 1fr; } }
.viz-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.viz-card h2 { margin: 0 0 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.radar { display: block; max-width: 280px; margin: 0 auto; overflow: visible; }
.radar-grid { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radar-label { font-size: 11px; font-weight: 600; fill: var(--muted); text-transform: capitalize; }
.radar-values { margin-top: 6px; font-size: .82rem; } .radar-values summary { cursor: pointer; color: var(--muted); }
.radar-table th, .radar-table td { padding: .3rem .35rem; font-size: .8rem; }

.sent-bar { margin-top: 14px; }
.sb-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.sb-score { font-family: var(--mono); font-size: 1.35rem; }
.sb-track { position: relative; display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; height: 16px; margin-bottom: 26px; }
.sb-track > span { border-radius: 3px; }
.sb-marker { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--panel-2); }
.sb-tick { position: absolute; top: 18px; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-bottom-color: var(--tick); }
.sb-tick em { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-size: .7rem; font-style: normal; font-weight: 650; color: var(--tick); white-space: nowrap; }
.sb-meta { margin: 0; }

.tr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; scroll-margin-top: calc(var(--top-h) + 190px); }
.tr-head h2 { margin: 0; }
.transcript.chat-mode .seg { display: none; }
.filtered-out { display: none !important; }

.chat { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.bubble { max-width: min(78%, 620px); padding: 8px 12px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.bubble.left { align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.right { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--accent-soft); }
.bubble.centre { align-self: center; max-width: 90%; background: transparent; border-style: dashed; }
.bubble.voice { border-style: dotted; }
.bubble.playing { box-shadow: 0 0 0 2px var(--accent); }
.bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 3px; font-size: .76rem; }
.b-meta .spk-set { font-weight: 700; border-radius: 6px; padding: 0 .4rem; }
.b-time { font-family: var(--mono); color: var(--muted); }
.emo-badge { display: inline-block; font-size: .72rem; font-weight: 650; border-radius: 999px; padding: 1px 8px; text-transform: capitalize; color: var(--neutral); background: color-mix(in srgb, var(--neutral) 14%, transparent); }
.emo-badge.fam-positive { color: var(--warm); background: color-mix(in srgb, var(--warm) 15%, transparent); }
.emo-badge.fam-negative { color: var(--prof); background: color-mix(in srgb, var(--prof) 14%, transparent); }
.emo-badge.fam-distress { color: var(--distress); background: color-mix(in srgb, var(--distress) 15%, transparent); }
.emo-badge.fam-sarcasm { color: var(--sarcasm-ink); background: color-mix(in srgb, var(--sarcasm) 24%, transparent); }

.analytics .an-sec { padding: 10px 0; border-bottom: 1px solid var(--line); }
.analytics .an-sec:first-child { padding-top: 0; }
.analytics h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.traj { display: block; border-radius: 8px; overflow: visible; }
.traj-pt { fill: var(--accent); fill-opacity: 0; cursor: pointer; transition: fill-opacity var(--t); }
.traj-pt:hover, .traj-pt:focus-visible { fill-opacity: 1; outline: none; }
.traj-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.dist { display: flex; flex-direction: column; gap: 7px; }
.dist-row { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: 8px; font-size: .85rem; }
.dist-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); }
.dist-bar i { display: block; height: 100%; }
.drivers { display: flex; flex-direction: column; gap: 4px; }
.driver-link { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-align: left; width: 100%; border: 1px solid transparent; background: none; border-radius: 8px; padding: .3rem .45rem; font-size: .86rem; }
.driver-link:hover, .driver-link:focus-visible { background: var(--accent-soft); border-color: var(--line); }
.an-counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.an-count { display: flex; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.an-count b { font-size: 1.3rem; font-family: var(--mono); } .an-count span { font-size: .76rem; color: var(--muted); }
.tip-emo { text-transform: capitalize; font-weight: 650; }
@media (max-width: 600px) { .bubble { max-width: 92%; } .dist-row { grid-template-columns: 1fr; gap: 3px; } }
.analytics h3 .small { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ---------- phase E: whole-period tone, analysis filters, call report ---------- */
.tone-tl .band-pos { fill: var(--warm); fill-opacity: .06; } .tone-tl .band-neg { fill: var(--prof); fill-opacity: .06; }
.zero-line { stroke: var(--line-2); stroke-width: 1.5; }
.tone-avg { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.tone-dot { fill-opacity: .75; stroke: var(--panel); stroke-width: 1.5; transition: fill-opacity var(--t); }
.tone-dot:hover, .tone-dot:focus-visible { fill-opacity: 1; stroke: var(--text); outline: none; }
.sw.sw-warm { background: var(--warm); } .sw.sw-neutral { background: var(--neutral); } .sw.sw-neg { background: var(--prof); }
.sw.sw-avg { background: var(--accent); height: 3px !important; vertical-align: 3px !important; }

.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.month-cell { display: block; color: inherit; text-decoration: none; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; transition: border-color var(--t), box-shadow var(--t); }
.month-cell:hover, .month-cell:focus-within { border-color: var(--accent); box-shadow: var(--elev); }
.mc-open { display: block; color: inherit; text-decoration: none; }
.mc-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.mc-emo { color: var(--accent); text-decoration: none; border-bottom: 1px dotted currentColor; }
.mc-emo:hover, .mc-emo:focus-visible { border-bottom-style: solid; }
a.legend-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; padding: 2px 8px; margin: -2px -4px;
  border-radius: 999px; border: 1px solid transparent; transition: border-color var(--t), background var(--t); }
a.legend-link:hover, a.legend-link:focus-visible { border-color: var(--accent); background: var(--panel-2); }
.col .seg { cursor: pointer; transition: opacity var(--t); }
.col:hover .seg:not(:hover) { opacity: .55; }
.mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.mc-score, .tone-score { font-family: var(--mono); font-weight: 700; color: var(--neutral); }
.mc-score.pos, .tone-score.pos { color: var(--warm); } .mc-score.neg, .tone-score.neg { color: var(--prof); }
.mc-radar .radar { max-width: 190px; }
.mc-radar .radar-label { font-size: 13px; }

.an-filters { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: .5rem; }
.an-filters summary { cursor: pointer; font-weight: 600; }
.an-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .6rem; }

/* one-page call report: on screen it looks like a sheet of paper; printed it fills A4 */
body.report { background: var(--bg); color: var(--text); font-family: var(--font); margin: 0; }
.rp-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.rp-bar button { margin-left: auto; }
.rp-page { max-width: 190mm; margin: 16px auto; padding: 12mm; background: #fff; box-shadow: var(--elev); border-radius: 6px; font-size: 10.5pt; line-height: 1.4; }
.rp-page h1 { margin: 0; font-size: 18pt; } .rp-page h2 { margin: 0 0 6px; font-size: 11pt; }
.rp-kicker { margin: 0; font-size: 8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.rp-meta { margin: 2px 0 0; color: var(--muted); font-size: 9pt; }
.rp-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 2px solid var(--text); padding-bottom: 8px; margin-bottom: 10px; }
.rp-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 45%; }
.rp-top { display: grid; grid-template-columns: minmax(0, 1fr) 62mm; gap: 14px; }
.rp-summary p { margin: 0 0 6px; } .rp-summary ul { margin: 0; padding-left: 1.1rem; } .rp-summary li { margin-bottom: 2px; }
.rp-viz .radar { max-width: 60mm; } .rp-viz .sb-track { margin-bottom: 22px; }
.rp-wave { margin-top: 8px; } .rp-wave .wave-canvas { height: 56px; } .rp-wave .wave-legend { font-size: 7.5pt; gap: 8px; }
.rp-an { columns: 2; column-gap: 14px; margin-top: 6px; }
.rp-an .an-sec { break-inside: avoid; border-bottom: 0; padding: 4px 0 8px; }
.rp-an .an-sec h3 .small, .rp-an > p:last-child { display: none; }
.rp-an .traj-pt { display: none; }
.rp-an .driver-link { padding: 1px 0; font-size: 9pt; }
.rp-flags { margin-top: 6px; }
.rp-flags th, .rp-flags td { padding: 3px 5px; font-size: 8.5pt; }
.rp-flags .mono { font-family: var(--mono); }
.rp-line { color: var(--muted); }
.rp-notes p { white-space: pre-wrap; margin: 0; }
.rp-foot { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 7.5pt; color: var(--muted); }
@page { size: A4; margin: 10mm; }
@media print {
  .no-print { display: none !important; }
  body.report { background: #fff; }
  .rp-page { max-width: none; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 700px) {
  .rp-page { padding: 16px; margin: 0; border-radius: 0; }
  .rp-head, .rp-bar { flex-wrap: wrap; } .rp-badges { max-width: none; justify-content: flex-start; }
  .rp-top { grid-template-columns: 1fr; } .rp-an { columns: 1; }
}
.rp-viz .radar-values { display: none; }
/* report: tighter so a typical call fits one A4 page */
.rp-page { font-size: 9pt; line-height: 1.35; }
.rp-page h1 { font-size: 15pt; } .rp-page h2 { font-size: 10pt; margin-bottom: 4px; break-after: avoid; }
.rp-top { grid-template-columns: minmax(0, 1fr) 58mm; }
.rp-viz .radar { max-width: 48mm; overflow: visible; }
.rp-viz #radar { padding: 0 6mm; }
.rp-viz .legend { font-size: 7.5pt; margin-top: 2px; }
.rp-wave { break-inside: avoid; }
.rp-an h3 { font-size: 7.5pt; margin-bottom: 4px; }
.rp-an .traj { max-height: 30mm; }
.rp-an .dist-row { font-size: 8.5pt; } .rp-an .dist .legend { font-size: 7.5pt; gap: 8px; }
.rp-an .an-counts { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.rp-an .an-count { padding: 3px 6px; } .rp-an .an-count b { font-size: 11pt; } .rp-an .an-count span { font-size: 7pt; }
.rp-an .emo-badge { font-size: 7.5pt; padding: 0 6px; }
.rp-flags .rp-line { max-width: 0; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-flags tr { break-inside: avoid; }
@media print { .rp-page { zoom: .82; } }

/* ---------- interviews ---------- */
.badge.iv-ready { color: var(--c1); background: var(--c1-bg); }
.badge.iv-recording { color: #fff; background: var(--prof); }
.badge.iv-paused { color: var(--aggr); background: var(--aggr-bg); }
.badge.iv-stopped { color: var(--ok); background: var(--ok-bg); }
.pill.ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.pill svg, .card-head h2 svg { width: 14px; height: 14px; vertical-align: -2px; }
.card-head h2 svg { width: 17px; height: 17px; margin-right: 4px; }
.mono { font-family: var(--mono); }
.warn { color: var(--aggr) !important; font-weight: 600; }

.iv-new { margin-bottom: 1rem; }
.iv-new h2 { margin-top: 0; }
.iv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem 1rem; }
.iv-span2 { grid-column: span 2; }
.iv-people { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem .8rem; margin: 1rem 0 .8rem; }
.iv-people legend { font-weight: 600; font-size: .88rem; padding: 0 .3rem; }
.iv-person { display: grid; grid-template-columns: minmax(0, 1fr) 11rem auto; gap: .5rem; margin-bottom: .5rem; }
.iv-person input, .iv-person select { width: 100%; }
.iv-consent { display: block; margin: .4rem 0 .8rem; }
.iv-actions, .iv-note-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .5rem; }
.iv-note-tools { justify-content: space-between; }
.iv-table td:nth-child(2) { font-weight: 600; }

.rec { margin: .6rem 0 1.2rem; }
.rec-main { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.rec-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }
.rec-btn { display: inline-flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 650; padding: .7rem 1.2rem; border-radius: 999px; }
.rec-btn svg { width: 20px; height: 20px; }
.rec-btn.start { background: var(--prof); border-color: transparent; color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--prof) 35%, transparent); }
.rec-btn.start:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.rec-btn.stop { border-color: var(--prof); color: var(--prof); }
.rec-clock { min-width: 9rem; }
.rec-time { font-family: var(--mono); font-size: 2.2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.rec-sub { font-size: .85rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.rec-dot.on { background: var(--prof); animation: recpulse 1.2s ease-in-out infinite; }
.rec-dot.paused { background: var(--aggr); }
@keyframes recpulse { 50% { opacity: .35; } }
.rec-level { flex: 1 1 160px; max-width: 320px; height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.rec-level div { height: 100%; width: 0; background: linear-gradient(90deg, var(--warm), var(--sarcasm) 70%, var(--prof)); transition: width 80ms linear; }
.rec-opts { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.rec-opts select { max-width: 22rem; }
.rec-done { margin-top: .9rem; }
.rec-done audio { width: 100%; height: 44px; }
.rec-done-meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: .5rem; }
.rec-done-meta .mono { word-break: break-all; }

.iv-lines { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: .6rem; }
.iv-line { display: grid; grid-template-columns: 4.2rem 1fr; gap: .6rem; padding: .35rem .5rem; border-radius: 8px; border-left: 3px solid transparent; }
.iv-line:not(.final) .iv-x { color: color-mix(in srgb, var(--text) 82%, transparent); }
.iv-line.final { cursor: pointer; } .iv-line.final:hover { background: var(--playing); }
.iv-line.playing { background: var(--playing); border-left-color: var(--accent); }
.iv-t { color: var(--muted); font-size: .85rem; padding-top: .1rem; }
.iv-partial { margin: .3rem .5rem 0 5.3rem; color: var(--muted); font-style: italic; min-height: 1.2em; }
.iv-partial:empty { display: none; }
.side textarea#notes { width: 100%; min-height: 12rem; resize: vertical; font: inherit; line-height: 1.45; }
.iv-details { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .8rem; margin-bottom: .4rem; }
.iv-details .field:first-child, .iv-details .field:nth-child(4), .iv-details .field:nth-child(5) { grid-column: span 2; }
.iv-audit { margin-top: 1.2rem; }
.table-wrap-inner { overflow-x: auto; }
.iv-audit-table td { vertical-align: top; font-size: .88rem; }
.iv-audit-table .au-detail { word-break: break-word; max-width: 38rem; }
.iv-audit-table tr.au-start td b, .iv-audit-table tr.au-resume td b { color: var(--prof); }
.iv-audit-table tr.au-pause td b { color: var(--aggr); }
.iv-audit-table tr.au-stop td b, .iv-audit-table tr.au-final_transcript td b { color: var(--ok); }
.iv-audit-table tr.au-interrupted td b, .iv-audit-table tr.au-transcript_failed td b { color: var(--prof); }
.iv-audit-table tr.au-notes_saved { color: var(--muted); }
@media (max-width: 900px) { .iv-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .iv-grid, .iv-details { grid-template-columns: 1fr; } .iv-span2, .iv-details .field { grid-column: auto !important; }
  .iv-person { grid-template-columns: 1fr auto; } .iv-person .p-role { grid-column: 1; grid-row: 2; }
  .rec-btn { padding: .6rem 1rem; } .rec-time { font-size: 1.8rem; }
}
:where(button, .btn) > svg { width: 1.1em; height: 1.1em; vertical-align: -.2em; flex: none; }
/* interviews: analysis */
.iv-analysis { margin: 0 0 1.2rem; }
.iv-analysis .summary-grid { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.iv-line.analysed { grid-template-columns: 4.2rem minmax(0, 1fr) auto; align-items: start; }
.iv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.iv-spk { font-size: .78rem; padding: .1rem .3rem; max-width: 9rem; }
.iv-x mark.profanity { background: var(--prof-bg); color: var(--prof); border-radius: 4px; padding: 0 2px; }
.iv-x mark.aggression { background: var(--aggr-bg); color: var(--aggr); border-radius: 4px; padding: 0 2px; }
.rec-done .wave { margin-top: .6rem; }
@media (max-width: 600px) { .iv-line.analysed { grid-template-columns: 3.4rem minmax(0, 1fr); } .iv-meta { grid-column: 2; flex-direction: row; justify-content: flex-start; } }
.sb-tick.low em { top: 19px; }
.sb-track:has(.sb-tick.low) { margin-bottom: 40px; }

/* ---------- radial home menu ---------- */
:root {
  --rm-dashboard: #4f46e5; --rm-calls: #0f766e; --rm-interviews: #be123c; --rm-search: #b45309;
  --rm-clips: #7c3aed; --rm-voices: #0369a1; --rm-admin: #475569; --rm-idle: #94a3b8;
  --rm-dashboard-ink: #fff; --rm-calls-ink: #fff; --rm-interviews-ink: #fff; --rm-search-ink: #fff;
  --rm-clips-ink: #fff; --rm-voices-ink: #fff; --rm-admin-ink: #fff;
  --rm-wedge: #eef1f6; --rm-wedge-edge: #dfe4ec; --rm-wedge-ink: #475569; --rm-plate: #ffffff;
  --rm-hub-hi: #ffffff; --rm-hub-mid: #e9ecf3; --rm-hub-lo: #c7cedb;
}
:root[data-theme="dark"] {
  --rm-dashboard: #a5b4fc; --rm-calls: #5eead4; --rm-interviews: #fda4af; --rm-search: #fcd34d;
  --rm-clips: #c4b5fd; --rm-voices: #7dd3fc; --rm-admin: #cbd5e1; --rm-idle: #64748b;
  --rm-dashboard-ink: #0b0f1a; --rm-calls-ink: #0b0f1a; --rm-interviews-ink: #0b0f1a; --rm-search-ink: #0b0f1a;
  --rm-clips-ink: #0b0f1a; --rm-voices-ink: #0b0f1a; --rm-admin-ink: #0b0f1a;
  --rm-wedge: #1b2230; --rm-wedge-edge: #273143; --rm-wedge-ink: #cbd5e1; --rm-plate: #111723;
  --rm-hub-hi: #5b6576; --rm-hub-mid: #2b3342; --rm-hub-lo: #151a24;
}
.rm-page { display: grid; justify-items: center; align-content: center; min-height: calc(100vh - var(--top-h) - 70px);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--panel) 90%, transparent), transparent); border-radius: 24px; }
.rm-stage { position: relative; width: min(100%, 1100px); aspect-ratio: 1040 / 740; container-type: inline-size; }
.rm-stage.small { aspect-ratio: 1; width: min(100%, 440px); }
.rm-wheel { display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--font); }
.rm-plate { fill: var(--rm-plate); }
.rm-ring { fill: none; stroke: var(--active); stroke-width: 5; stroke-dasharray: .8 5.2; stroke-linecap: round; opacity: .85; transition: stroke .35s; }
.rm-ring-draw { fill: none; stroke: var(--active); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .55;
  transition: stroke-dashoffset 1s var(--ease) .25s, stroke .35s; }
.rm-stage.ready .rm-ring-draw { stroke-dashoffset: 0; }

.rm-wrap { transform-box: view-box; transform-origin: 0 0;   /* the canvas origin is the wheel centre */ opacity: 0; transform: scale(.55) rotate(-14deg);
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.15) calc(var(--i) * 55ms), opacity .35s ease calc(var(--i) * 55ms); }
.rm-stage.ready .rm-wrap { opacity: 1; transform: none; }
.rm-wedge { cursor: pointer; outline: none; transition: transform .22s var(--ease); }
.rm-wedge:hover, .rm-wedge:focus-visible, .rm-wedge.active { transform: var(--lift); }
.rm-shape { fill: var(--rm-wedge); stroke: var(--rm-wedge-edge); stroke-width: 1;
  transition: fill .28s ease, stroke .28s ease, d .42s cubic-bezier(.2, .9, .25, 1.2); }
.rm-wedge:hover .rm-shape { fill: color-mix(in srgb, var(--c) 20%, var(--rm-wedge)); }
.rm-wedge:focus-visible .rm-shape { stroke: var(--c); stroke-width: 3; }
.rm-wedge.active .rm-shape { fill: var(--c); stroke: color-mix(in srgb, var(--c) 70%, #000); filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--c) 45%, transparent)); }
.rm-icon { color: var(--rm-wedge-ink); transition: color .25s; pointer-events: none; }
.rm-label { fill: var(--rm-wedge-ink); font-size: 12.5px; font-weight: 650; letter-spacing: .02em; pointer-events: none; transition: fill .25s; }
.rm-wedge:hover .rm-icon, .rm-wedge:focus-visible .rm-icon { color: var(--c); }
.rm-wedge.active .rm-icon { color: var(--ink); }
.rm-wedge.active .rm-label { fill: var(--ink); font-weight: 750; }

.rm-hub { cursor: pointer; outline: none; transform-box: view-box; transform-origin: 0 0; opacity: 0; transform: scale(.7);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.2) .1s, opacity .3s ease .1s; }
.rm-stage.ready .rm-hub { opacity: 1; transform: none; }
.rm-hub:hover .rm-hub-ball { filter: brightness(1.04); }
.rm-hub-ring { fill: none; stroke: var(--active); stroke-width: 6; transition: stroke .35s; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--active) 60%, transparent)); }
.rm-hub-ball { stroke: color-mix(in srgb, var(--text) 8%, transparent); }
.hub-hi { stop-color: var(--rm-hub-hi); } .hub-mid { stop-color: var(--rm-hub-mid); } .hub-lo { stop-color: var(--rm-hub-lo); }
.rm-hub-logo { color: var(--active); transition: opacity .25s, color .35s; pointer-events: none; }
.rm-hub-title { fill: var(--text); font-size: 15px; font-weight: 750; pointer-events: none; }
.rm-hub-sub { fill: var(--muted); font-size: 10px; letter-spacing: .03em; pointer-events: none; }

.rm-sub { position: absolute; inset: 0; pointer-events: none; }
.rm-item { position: absolute; pointer-events: auto; white-space: nowrap; text-decoration: none;
  font-size: clamp(12px, 1.4cqw, 16px); font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 72%, transparent); padding: .3em .6em; border-radius: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  opacity: 0; transform: translate(var(--ax), -50%) var(--from) rotate(var(--tilt));
  transition: opacity .28s ease, transform .4s cubic-bezier(.2, .9, .25, 1.1), color .15s, background .15s; }
.rm-item.anchor-start { --ax: 0%; transform-origin: 0 50%; } .rm-item.anchor-end { --ax: -100%; transform-origin: 100% 50%; }
.rm-item.anchor-middle { --ax: -50%; transform-origin: 50% 50%; }
.rm-item.in { opacity: 1; transform: translate(var(--ax), -50%) rotate(var(--tilt)); }
.rm-item:hover, .rm-item:focus-visible { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); outline: none; }
.rm-item:focus-visible { box-shadow: 0 0 0 2px var(--c); }

.rm-list { width: min(100%, 440px); display: grid; gap: 6px; margin-top: .6rem; }
.rm-list-head { margin: 0 0 .2rem; font-weight: 750; color: var(--c); letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
.rm-list a { display: block; padding: .75rem 1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--c); color: var(--text); text-decoration: none; font-weight: 600; }
.rm-list a:focus-visible, .rm-list a:hover { background: color-mix(in srgb, var(--c) 10%, var(--panel)); outline: none; box-shadow: 0 0 0 2px var(--c); }
.rm-list a.rm-open { color: var(--c); }
.rm-hint { text-align: center; margin: .4rem 0 0; }
@media (prefers-reduced-motion: reduce) {
  .rm-wrap, .rm-hub, .rm-item, .rm-shape, .rm-ring-draw, .rm-wedge { transition-delay: 0s !important; }
}
@media (max-width: 640px) { .rm-page { min-height: auto; align-content: start; padding-top: .8rem; } }
/* interviews: delete (admins) */
.iv-delbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 .8rem; padding: .7rem 1rem;
  border: 1px solid color-mix(in srgb, var(--prof) 45%, transparent); background: var(--prof-bg); border-radius: 12px; }
.iv-delbar input { min-width: 16rem; }
.iv-deletions { margin-top: 1.2rem; } .iv-deletions summary { cursor: pointer; }
.iv-hash { word-break: break-all; }
.iv-danger { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; margin-top: 1.2rem;
  border-color: color-mix(in srgb, var(--prof) 35%, var(--line)); }
.iv-danger p { margin: .2rem 0 0; }
/* call and interview lists: the list scrolls in its own panel (about a screen high) with the column headers
   fixed at its top; it still scrolls sideways when the columns are wider than the screen */
/* short enough that, with the page scrolled to the bottom, its header row sits clear of the top bar */
.table-wrap:has(> table.calls) { max-height: calc(100vh - var(--top-h) - 80px); overflow: auto; overscroll-behavior: contain; }
.calls th { top: 0; z-index: 3; box-shadow: 0 1px 0 var(--line); }
/* ---------- background activity: the logo pulses while work runs; hover or focus it for the list ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-wrap { position: relative; }
.logo { position: relative; }
.is-busy .brand .logo { animation: logoPulse 1.6s ease-in-out infinite; }
.is-busy .brand .logo::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent-2); border: 2px solid var(--sidebar); }
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(99,102,241,.35), 0 0 0 0 color-mix(in srgb, var(--accent-2) 55%, transparent); filter: brightness(1); }
  50% { box-shadow: 0 6px 18px rgba(99,102,241,.35), 0 0 0 9px color-mix(in srgb, var(--accent-2) 0%, transparent); filter: brightness(1.18); }
}
@media (prefers-reduced-motion: reduce) { .is-busy .brand .logo { animation: none; outline: 2px solid var(--accent-2); outline-offset: 2px; } }
.activity { position: absolute; left: 8px; top: calc(100% - 6px); z-index: 60; width: max(260px, 100%); display: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--elev-hi); padding: .5rem; }
.brand-wrap:hover .activity, .brand-wrap:focus-within .activity { display: block; }
.act-head { margin: .2rem .4rem .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.activity a { display: block; padding: .45rem .55rem; border-radius: 8px; color: var(--text); font-size: .86rem; line-height: 1.35; white-space: normal; }
.activity a:hover, .activity a:focus-visible { background: var(--accent-soft); text-decoration: none; }
.activity a::before { content: "●"; margin-right: .45rem; color: var(--accent-2); font-size: .7em; vertical-align: .15em; }
.activity a.act-interview::before { color: var(--prof); }
html.sb-min .activity { width: 260px; }
/* radial menu phase 2: count badges and the hub's account menu */
.rm-badge { pointer-events: none; transform-box: fill-box; animation: rmBadgeIn .35s cubic-bezier(.2, .9, .25, 1.4) .7s both; }
.rm-badge circle { fill: var(--c); stroke: var(--rm-plate); stroke-width: 2.5; }
.rm-badge text { fill: var(--ink); font-size: 11px; font-weight: 800; }
.rm-wedge.active .rm-badge circle { fill: var(--ink); } .rm-wedge.active .rm-badge text { fill: var(--c); }
@keyframes rmBadgeIn { from { opacity: 0; scale: .2; } to { opacity: 1; scale: 1; } }
.rm-acc-btn { cursor: pointer; outline: none; }
.rm-acc-btn circle { fill: var(--rm-plate); stroke: var(--active); stroke-width: 2; transition: stroke .3s; }
.rm-acc-btn svg { color: var(--rm-wedge-ink); }
.rm-acc-btn:hover circle, .rm-acc-btn:focus-visible circle { fill: color-mix(in srgb, var(--active) 18%, var(--rm-plate)); stroke-width: 3; }
.rm-account { position: absolute; left: 50%; transform: translateX(-50%); z-index: 6; width: min(92%, 340px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--elev-hi); padding: .8rem .9rem; }
.rm-acc-who { margin: 0 0 .6rem; font-size: .9rem; }
.rm-acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .55rem; }
.rm-acc-row span { width: 100%; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rm-acc-row button { padding: .3rem .7rem; font-size: .85rem; }
.rm-acc-row button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.rm-acc-links { display: flex; justify-content: space-between; align-items: center; gap: .6rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.rm-acc-links form { margin: 0; }
.seg-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .rm-badge { animation: none; } }
.rm-acc-links svg { width: 1.05em; height: 1.05em; vertical-align: -.18em; margin-right: .3rem; }
/* dashboard tiles are links to the matching calls */
a.kpi { display: block; color: inherit; text-decoration: none; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t); }
a.kpi:hover, a.kpi:focus-visible { transform: translateY(-2px); box-shadow: var(--elev-hi); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); text-decoration: none; outline: none; }
a.kpi:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft), var(--elev-hi); }
