/* Pointer Gold — the review interface.
   Ground #05070a and accent #ff6000 are the Pointer brand (pointer_atlas base.css); surfaces are translucent
   layers on that ground, hairline borders, soft radii, no heavy shadows. Type: Inter for the interface,
   JetBrains Mono for anything a reviewer must read exactly (slugs, codes, quoted evidence). */

:root {
  color-scheme: dark;
  --bg: #05070a;
  --bg-2: #090c11;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --surface-solid: #10141a;
  --surface-solid-2: #151a21;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: rgba(255, 255, 255, 0.94);
  --text-2: rgba(255, 255, 255, 0.68);
  --text-3: rgba(255, 255, 255, 0.45);
  --text-4: rgba(255, 255, 255, 0.3);
  --accent: #ff6000;
  --accent-hover: #ff7526;
  --accent-soft: rgba(255, 96, 0, 0.14);
  --accent-line: rgba(255, 96, 0, 0.5);
  --accent-ink: #1a0c04;
  --ok: #3fd98a;     --ok-soft: rgba(63, 217, 138, 0.13);   --ok-line: rgba(63, 217, 138, 0.45);
  --warn: #f6c453;   --warn-soft: rgba(246, 196, 83, 0.13); --warn-line: rgba(246, 196, 83, 0.45);
  --bad: #ff6b6b;    --bad-soft: rgba(255, 107, 107, 0.13); --bad-line: rgba(255, 107, 107, 0.45);
  --info: #6ea8ff;   --info-soft: rgba(110, 168, 255, 0.13);
  --radius-lg: 8px;
  --radius: 7px;
  --radius-sm: 6px;
  --radius-xs: 5px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --topbar-h: 56px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── base ─────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss03";
}
/* body:not(.body--review) {
  background:
    radial-gradient(900px 520px at 0% -10%, rgba(255, 96, 0, 0.09), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--bg);
  background-attachment: fixed;
} */
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; letter-spacing: -0.02em; }
h2 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--text-3); }
.soft { color: var(--text-2); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.error { color: var(--bad); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
::selection { background: rgba(255, 96, 0, 0.35); }
kbd {
  font-family: var(--mono); font-size: 10.5px; line-height: 1; padding: 3px 5px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong); color: var(--text-3);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 14px; height: 14px; }
.icon--xs { width: 12px; height: 12px; }

/* ── scrollbars ───────────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; }

/* ── topbar ───────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px;
  position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; border-radius: 8px; }
.brand__tile {
  width: 40px; height: 40px; border-radius: 5px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 96, 0, 0.28); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.brand:hover .brand__tile { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 96, 0, 0.4); }
.brand__tile img { height: 18px; width: auto; display: block; }
.topbar__nav { display: flex; align-items: center; gap: 2px; }
.topbar__link {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500;
  color: var(--text-2); transition: background .15s, color .15s;
}
.topbar__link:hover { background: var(--surface-2); color: var(--text); }
.topbar__link.is-active { background: var(--surface-2); color: var(--text); }
.topbar__sep { width: 1px; height: 20px; background: var(--line); margin: 0 8px; }
.user { display: inline-flex; align-items: center; gap: 8px; padding-right: 4px; }
.user__avatar {
  width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--accent-line);
}
.user__name { font-size: 13px; color: var(--text-2); font-weight: 500; }
.topbar form { margin: 0; }

/* ── page frame ───────────────────────────────────────────────────── */
.main { padding: 36px 32px 64px; max-width: 1360px; margin: 0 auto; }
.main--narrow { max-width: 960px; }
.body--review .main { max-width: none; padding: 0; height: calc(100% - var(--topbar-h)); }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page__head p { margin-top: 4px; color: var(--text-3); font-size: 13px; }
.page__actions { display: flex; align-items: center; gap: 10px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}
.card + .card { margin-top: 20px; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card__head p { margin-top: 3px; color: var(--text-3); font-size: 13px; }
.card--flush { padding: 0; overflow: hidden; }
.card--flush .card__head { padding: 20px 24px 0; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat--ok b { color: var(--ok); } .stat--accent b { color: var(--accent); } .stat--warn b { color: var(--warn); }

/* ── controls ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s; user-select: none;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn kbd { margin-left: 2px; }
.btn--primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(255, 96, 0, 0.25); }
.btn--primary:hover { background: var(--accent-hover); border-color: transparent; box-shadow: 0 6px 18px rgba(255, 96, 0, 0.35); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn--ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.btn--ok:hover { background: rgba(63, 217, 138, 0.22); border-color: var(--ok); }
.btn--bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.btn--bad:hover { background: rgba(255, 107, 107, 0.22); border-color: var(--bad); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 5px; gap: 6px; }
.btn--xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 5px; gap: 4px; }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 28px; } .btn--icon.btn--xs { width: 24px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ok kbd { color: var(--ok); background: rgba(63, 217, 138, 0.12); border-color: rgba(63, 217, 138, 0.3); }
.btn--bad kbd { color: var(--bad); background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.3); }

.input, .select, textarea.input {
  height: 36px; width: 100%; min-width: 0; padding: 0 12px; border-radius: 6px; font-size: 13.5px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line-strong); color: var(--text); transition: border-color .15s, background .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-4); }
.input:hover, .select:hover { border-color: rgba(255, 255, 255, 0.24); }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: rgba(255, 255, 255, 0.06); }
.input[disabled] { opacity: .5; cursor: not-allowed; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select option { background: var(--surface-solid-2); color: var(--text); }
.select--sm, .input--sm { height: 30px; font-size: 12.5px; border-radius: 5px; padding-left: 10px; }
.select--auto { width: auto; }
textarea.input { min-height: 84px; height: auto; padding: 9px 12px; resize: vertical; line-height: 1.45; font-family: var(--mono); font-size: 12.5px; }
.input--code {
  height: 60px; font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: .45em; text-align: center; text-transform: uppercase;
  padding-left: calc(12px + .45em); border-radius: 8px;
}
.input--code::placeholder { letter-spacing: .45em; color: var(--text-4); font-weight: 400; }
.input--date { font-family: var(--mono); font-size: 12.5px; }
.input--date::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; cursor: pointer; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 11.5px; font-weight: 500; letter-spacing: .02em; color: var(--text-3); text-transform: uppercase; }
.field__hint { font-size: 12px; color: var(--text-3); }
.search { position: relative; }
.search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 32px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 30px; height: 18px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background .15s, border-color .15s; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 999px; background: var(--text-2); transition: transform .18s var(--ease), background .15s; }
.switch input:checked + .switch__track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(12px); background: #fff; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

.segctl { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.segctl button { height: 24px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--text-3); font-size: 12px; font-weight: 500; transition: background .15s, color .15s; }
.segctl button:hover { color: var(--text); }
.segctl button.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.segctl button b { font-weight: 600; color: var(--warn); margin-left: 5px; font-variant-numeric: tabular-nums; }
.segctl button b.is-info { color: var(--info); }
.segctl button b:empty { display: none; }

.check { width: 16px; height: 16px; appearance: none; -webkit-appearance: none; border-radius: 4px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); cursor: pointer; display: inline-grid; place-content: center; transition: background .12s, border-color .12s; margin: 0; vertical-align: middle; }
.check::before { content: ""; width: 9px; height: 9px; transform: scale(0); transition: transform .12s var(--ease); background: #fff; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::before { transform: scale(1); }
.check:indeterminate { background: var(--accent); border-color: var(--accent); }
.check:indeterminate::before { transform: scale(1); clip-path: polygon(10% 40%, 90% 40%, 90% 60%, 10% 60%); }

/* pills and states */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11.5px; font-weight: 500; letter-spacing: .01em; background: var(--surface-3); color: var(--text-2); border: 1px solid transparent; white-space: nowrap; }
.pill--outline { background: transparent; border-color: var(--line-strong); }
.pill--review, .pill--prelabeled, .pill--in_review, .pill--in_progress, .pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--scratch, .pill--accent { background: var(--accent-soft); color: var(--accent); }
.pill--reviewed, .pill--done, .pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--missing, .pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--assigned { background: var(--surface-3); color: var(--text-2); }
.pill--admin, .pill--info { background: var(--info-soft); color: var(--info); }
.pill--clinician { background: var(--surface-3); color: var(--text-2); }
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill--mono { font-family: var(--mono); font-weight: 500; }

.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 120px; }
.bar__fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s var(--ease); }
.bar--ok .bar__fill { background: var(--ok); }
.seg { display: flex; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; gap: 2px; }
.seg span { height: 100%; transition: width .35s var(--ease); min-width: 0; }
.seg__confirmed { background: var(--ok); } .seg__edited { background: var(--warn); } .seg__rejected { background: var(--bad); } .seg__added { background: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.legend b { color: var(--text); font-weight: 600; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--text-3); font-weight: 500; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 0 14px; height: 40px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.table tr.is-picked td { background: rgba(255, 96, 0, 0.06); }
.table tr.is-queued td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.queue-n { color: var(--info); font-weight: 600; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .col-check { width: 44px; }
.row-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.empty { padding: 48px 24px; text-align: center; color: var(--text-3); display: grid; justify-items: center; gap: 10px; }
.empty .icon { width: 28px; height: 28px; stroke-width: 1.5; color: var(--text-4); }
.empty b { color: var(--text-2); font-weight: 500; }

/* ── login ────────────────────────────────────────────────────────── */
.login { min-height: calc(100vh - var(--topbar-h) - 100px); display: grid; place-items: center; }
.login__card { width: min(400px, 100%); padding: 36px 32px 32px; text-align: center; animation: rise .5s var(--ease) both; }
.login__mark { width: 56px; height: 56px; border-radius: 12px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(255, 96, 0, 0.35); }
.login__mark img { height: 26px; width: auto; }
.login__card h1 { font-size: 20px; margin-bottom: 6px; }
.login__card .muted { font-size: 13.5px; }
.login__form { display: grid; gap: 12px; margin-top: 26px; }
.login__error { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.login__foot { margin-top: 22px; font-size: 12px; color: var(--text-4); }

/* ── queue ────────────────────────────────────────────────────────── */
.queue { display: grid; gap: 10px; }
.qrow {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr) 80px auto; align-items: center; gap: 20px;
  padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.qrow:hover { background: var(--surface-2); border-color: var(--line-strong); transform: translateY(-1px); }
.qrow--done { opacity: .72; }
.qrow__title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.qrow__sub { margin-top: 4px; font-size: 12px; color: var(--text-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qrow__sub .mono { font-size: 11.5px; color: var(--text-4); }
.qrow__progress { display: grid; gap: 6px; }
.qrow__progress .small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.qrow__minutes { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* ── review page ──────────────────────────────────────────────────── */
.review { display: flex; flex-direction: column; height: 100%; min-height: 0; --chart-w: 50%; }
.rv-head {
  display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(320px, 1.4fr) auto; align-items: center; gap: 28px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.rv-id { min-width: 0; }
.rv-id__title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; min-width: 0; }
.rv-id__title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-id__sub { margin-top: 3px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 8px; min-width: 0; }
.rv-id__sub > span { white-space: nowrap; }
.rv-id__sub .mono { flex: 1; }
.rv-id__sub .mono { font-size: 11px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-progress { display: grid; gap: 7px; min-width: 0; }
.rv-progress__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rv-progress__count { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-progress__count b { color: var(--text); font-weight: 600; }
.rv-actions { display: flex; align-items: center; gap: 8px; }
.rv-minutes { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); padding: 0 10px; font-variant-numeric: tabular-nums; }
.rv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--chart-w) 6px minmax(0, 1fr); }
.rv-gutter { background: transparent; cursor: col-resize; position: relative; z-index: 5; }
.rv-gutter::after { content: ""; position: absolute; inset: 0 2px; background: var(--line); transition: background .15s; }
.rv-gutter:hover::after, .rv-gutter.is-dragging::after { background: var(--accent); }
body.is-resizing { cursor: col-resize; user-select: none; }
.pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.pane--facts { background: var(--bg-2); container-type: inline-size; position: relative; }
@container (max-width: 640px) { .pane--facts .pane__tools .hint { display: none; } }
.pane__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; height: 44px; border-bottom: 1px solid var(--line); flex: none; }
.pane__head--tabs { padding: 0 8px; }
.pane__title { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pane__tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; height: 46px; border-bottom: 1px solid var(--line); flex: none; }
.pane__tools .spacer { flex: 1; }
.segctl.is-muted { opacity: .45; }
.citechip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 8px 0 10px; border-radius: 5px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); font-size: 12px; animation: pop .15s var(--ease) both; }
.citechip b { color: var(--accent); font-family: var(--mono); font-weight: 500; font-size: 11.5px; }
.citechip .icon { color: var(--accent); }
.citechip:hover { background: rgba(255, 96, 0, 0.22); }
.tab__n.is-cite { color: var(--accent); background: var(--accent-soft); }
.fact.is-cited { border-color: var(--accent-line); background: rgba(255, 96, 0, 0.04); }
.chart { overflow-y: auto; overflow-x: hidden; padding: 20px 24px 60vh; font-size: 13.5px; scroll-behavior: smooth; overflow-wrap: anywhere; }
.facts { overflow-y: auto; overflow-x: hidden; padding: 14px 16px 50vh; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; height: 100%; align-items: stretch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; color: var(--text-3); padding: 0 9px; border-bottom: 2px solid transparent; font-size: 12.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: color .15s, border-color .15s; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.tab__n { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); padding: 1px 6px; border-radius: 4px; min-width: 18px; display: inline-flex; justify-content: center; align-items: center; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.tab__n.has-pending { color: var(--warn); background: var(--warn-soft); }
.tab__n.is-done { color: var(--ok); background: var(--ok-soft); }
.readonly { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; border-bottom: 1px solid rgba(63, 217, 138, 0.2); flex: none; }

/* fact cards: one row of title + actions; a quiet attribute line; evidence as links; decided cards fold to a row */
.facts { gap: 6px; }
.fact {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 12px 10px 16px; display: grid; gap: 6px;
  grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; overflow-wrap: anywhere;
  transition: border-color .15s, background .15s, box-shadow .15s; animation: rise .2s var(--ease) both;
}
.fact > * { min-width: 0; }
.fact::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--text-4); transition: background .15s; }
.fact:hover { border-color: var(--line-strong); }
.fact:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-soft); }
.fact:focus-visible { outline: none; }
.fact--confirmed::before { background: var(--ok); }
.fact--edited::before { background: var(--warn); }
.fact--rejected::before { background: var(--bad); }
.fact--added::before { background: var(--accent); }
.fact--collapsed { padding: 6px 8px 6px 16px; background: transparent; }
.fact--collapsed .fact__row { cursor: pointer; min-height: 24px; }
.fact--collapsed .fact__title { font-size: 13px; font-weight: 500; color: var(--text-2); }
.fact--rejected.fact--collapsed .fact__title { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.3); color: var(--text-3); }
.fact__row { display: flex; align-items: center; gap: 6px 10px; min-width: 0; flex-wrap: wrap; }
.fact__title { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; min-width: 0; flex: 1 1 180px; }
.fact__tools { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
.fact__tools .btn--ghost { color: var(--text-3); }
.fact__tools .btn--ghost:hover { color: var(--text); }
.fact__notemark { color: var(--warn); display: inline-flex; }
.state { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; flex: none; background: var(--surface-3); color: var(--text-3); }
.state .icon { width: 11px; height: 11px; stroke-width: 2.5; }
.state--confirmed { background: var(--ok-soft); color: var(--ok); }
.state--edited { background: var(--warn-soft); color: var(--warn); }
.state--rejected { background: var(--bad-soft); color: var(--bad); }
.state--added { background: var(--accent-soft); color: var(--accent); }
.state--unsure { background: var(--info-soft); color: var(--info); }
.fact--unsure { border-style: dashed; border-color: rgba(110, 168, 255, 0.45); }
.fact--unsure:hover { border-color: rgba(110, 168, 255, 0.7); }
.btn.is-on { color: var(--info); background: var(--info-soft); border-color: rgba(110, 168, 255, 0.35); }
.btn--ghost.is-on:hover { color: var(--info); background: rgba(110, 168, 255, 0.22); }
.state small { font-weight: 500; opacity: .85; font-size: 11px; }
.fact__line { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.fact__line .k { color: var(--text-4); }
.fact__line .sep { color: var(--text-4); margin: 0 6px; }
.fact__line .dt { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }
.fact__ev { display: flex; flex-wrap: wrap; gap: 2px 14px; min-width: 0; }
.ev { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; min-width: 0; flex: 0 1 auto; padding: 0; border: 0; background: none; color: var(--text-3); font-family: var(--mono); font-size: 11.5px; line-height: 1.6; text-align: left; cursor: pointer; transition: color .12s; }
.ev:hover { color: var(--text); }
.ev:hover .ev__q { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.ev .ev__ref { color: var(--accent); font-weight: 500; flex: none; }
.ev .ev__q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fact__flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); flex-wrap: wrap; min-width: 0; }
.fact__flag--dup { color: var(--accent); }
.fact__flag--dup .k { color: var(--text-3); }
.fact__flag--dup .btn { margin-left: 4px; }
.fact.is-picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent-line); }
.mergebar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: var(--surface-solid-2); color: var(--text-2); font-size: 12.5px; box-shadow: var(--shadow); animation: rise .15s var(--ease) both; }
.mergebar .icon { color: var(--accent); }
.mergebar b { color: var(--text); font-weight: 600; }
.mergebar .btn { margin-left: auto; }
.fact__concept { font-family: var(--mono); font-size: 11px; color: var(--text-3); line-height: 1.5; overflow-wrap: anywhere; }
.fact__concept .k { font-family: var(--sans); color: var(--text-4); margin: 0 6px 0 0; }
.fact__concept .k + .k, .fact__concept span.k:not(:first-child) { margin: 0 6px; }
.fact__note { display: flex; gap: 7px; align-items: baseline; font-size: 12.5px; color: var(--warn); }
.fact__note .icon { align-self: center; }
.facts__quiet { padding: 10px 4px 4px; font-size: 12.5px; color: var(--text-3); }
.facts__foot { color: var(--text-4); font-size: 12px; padding-top: 14px; }
.group { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 9px 12px 9px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--text-3); font-size: 12.5px; font-weight: 500; text-align: left; transition: background .12s, color .12s, border-color .12s; }
.group:hover { color: var(--text); background: var(--surface); border-color: rgba(255, 255, 255, 0.24); }
.group .icon { transition: transform .15s var(--ease); color: var(--text-4); }
.group[aria-expanded="true"] { border-style: solid; color: var(--text-2); }
.group[aria-expanded="true"] .icon { transform: rotate(180deg); }
.group__n { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); }
.group__p { font-size: 11.5px; color: var(--warn); }
.group__hint { margin-left: auto; font-size: 11.5px; color: var(--text-4); }
.group:hover .group__hint { color: var(--accent); }
.facts__empty { padding: 48px 24px; text-align: center; color: var(--text-3); display: grid; justify-items: center; gap: 10px; }
.facts__empty .icon { width: 30px; height: 30px; stroke-width: 1.5; color: var(--ok); }
.facts__empty b { color: var(--text-2); font-weight: 500; font-size: 14px; }

/* identity */
.identity { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 16px; }
.identity__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.identity__head h3 { font-size: 14.5px; }
.identity__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.identity__field { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.identity__field .input, .identity__field .select { height: 32px; font-size: 13px; }
.identity__field .input--ev { height: 28px; font-family: var(--mono); font-size: 11.5px; background: transparent; border-color: transparent; padding-left: 8px; }
.identity__field .input--ev:hover { border-color: var(--line-strong); }
.identity__field .input--ev:focus { background: rgba(255, 255, 255, 0.04); }
.identity__actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.identity__actions .spacer { flex: 1; }
.identity__state { display: flex; gap: 6px; align-items: center; }

/* chart prose */
.prose > h1 { display: none; }
.prose h2 { font-size: 11px; margin: 28px 0 10px; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 13px; margin: 18px 0 6px; color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prose .note { margin: 0 -8px; padding: 2px 8px 14px; border-bottom: 1px solid var(--line); }
.prose .note:last-child { border-bottom: 0; }
.prose h3.note-head { position: sticky; top: -20px; z-index: 2; margin: 0 0 8px; padding: 10px 0 8px; background: rgba(5, 7, 10, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: background .2s, border-color .2s; }
.prose h3.note-head .notetitle { font-weight: 600; color: var(--text); }
.prose h3.note-head.is-target { border-radius: 4px; padding-left: 10px; margin-left: -10px; }
.prose .soap { display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; margin: 6px 0 10px; align-items: start; }
.prose .soap__k { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 4px; height: 20px; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; cursor: help; }
.prose .soap__v, .prose .lines { min-width: 0; color: var(--text-2); line-height: 1.55; }
.prose .soap__v > p, .prose .soap__v > .lines { margin: 0 0 8px; }
.prose .soap__v > :last-child { margin-bottom: 0; }
.prose .ln { margin: 1px 0; white-space: pre-wrap; }
.prose .kvl { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr); gap: 0 10px; padding: 1px 0; align-items: baseline; }
.prose .kvl__k { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose .kvl__v { color: var(--text); white-space: pre-wrap; }
.prose .kvl--quiet .kvl__k { color: var(--text-4); }
.prose .kvl--quiet .kvl__v { color: var(--text-4); }
.prose .lines { margin: 6px 0 10px; }
.prose h3.note-head .noteid { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 4px; }
.prose h3.note-head .notedate { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.prose h3.is-target, .prose li.is-target, .prose p.is-target { background: var(--accent-soft); border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
.prose h3.is-target { color: var(--text); }
.prose li.is-target { border-radius: 6px; margin-left: -8px; padding-left: 8px; }
.prose ul { padding-left: 20px; margin: 4px 0; } .prose li { margin: 3px 0; color: var(--text-2); }
.prose li::marker { color: var(--text-4); }
.prose p { margin: 6px 0 10px; color: var(--text-2); line-height: 1.6; }
.prose strong { color: var(--text); font-weight: 600; }
.prose table { border-collapse: separate; border-spacing: 0; font-size: 12px; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 6px; display: block; max-width: 100%; width: max-content; overflow-x: auto; }
.prose th, .prose td { padding: 5px 10px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--surface-2); font-weight: 600; color: var(--text-3); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; text-align: left; }
.prose .rowid { font-family: var(--mono); color: var(--accent); font-size: 11px; font-weight: 500; background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; margin-right: 4px; scroll-margin-top: 60px; opacity: .75; }
.prose .rowid.has-cites { opacity: 1; cursor: pointer; transition: background .12s, box-shadow .12s; }
.prose .rowid.has-cites::after { content: attr(data-n); font-size: 9px; margin-left: 5px; padding-left: 5px; border-left: 1px solid rgba(255, 96, 0, 0.35); color: var(--text-2); }
.prose .rowid.has-cites:hover { background: rgba(255, 96, 0, 0.3); box-shadow: 0 0 0 1px var(--accent-line); }
.prose h3.note-head.has-cites { cursor: pointer; }
.prose h3.note-head.has-cites:hover .noteid { background: rgba(255, 96, 0, 0.3); }
.prose .cites { margin-left: auto; border: 0; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--surface-2); color: var(--text-3); font-size: 11px; font-weight: 500; font-family: var(--sans); transition: background .12s, color .12s; }
.prose .cites:hover, .prose h3.note-head.has-cites:hover .cites { background: var(--accent-soft); color: var(--accent); }
.prose mark { background: rgba(255, 96, 0, 0.28); color: var(--text); border-radius: 3px; padding: 0 2px; box-shadow: 0 0 0 1px rgba(255, 96, 0, 0.6); animation: pulse 1.2s var(--ease) 1; }
.prose code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* codebook */
.codebook { max-width: 800px; margin: 0 auto; font-size: 14.5px; padding: 40px 48px; }
.codebook > h1 { display: block; font-size: 28px; font-family: var(--sans); color: var(--text); letter-spacing: -0.02em; margin-bottom: 8px; }
.codebook h2 { font-size: 18px; text-transform: none; letter-spacing: -0.01em; color: var(--text); margin: 40px 0 12px; padding-bottom: 8px; }
.codebook h3 { font-size: 15px; margin: 24px 0 8px; }
.codebook p, .codebook li { color: var(--text-2); line-height: 1.65; }
.codebook p { margin: 0 0 12px; }
.codebook strong { color: var(--text); }
.codebook code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.codebook pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; overflow: auto; font-size: 12.5px; line-height: 1.5; }
.codebook pre code { background: none; padding: 0; }
.codebook table { font-size: 13px; width: 100%; }
.codebook blockquote { margin: 12px 0; padding: 8px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.codebook a { color: var(--accent); }

/* ── modal, popover, toast ────────────────────────────────────────── */
.modal { position: fixed; inset: 0; background: rgba(2, 3, 5, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; animation: fade .15s ease both; }
.modal__card { width: min(720px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: var(--radius-lg); background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: rise .2s var(--ease) both; }
.modal__card--sm { width: min(480px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal__head h2 { font-size: 17px; }
.modal__head p { margin-top: 3px; color: var(--text-3); font-size: 13px; }
.modal__body { padding: 20px 24px 24px; }
.form { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.form__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.form__actions .spacer { flex: 1; }
.dupe { display: flex; align-items: flex-start; gap: 7px; margin-top: -6px; font-size: 12.5px; color: var(--warn); line-height: 1.45; }
.dupe .icon { margin-top: 3px; }
.dupe b { font-weight: 600; }
.same { display: grid; gap: 10px; }
.same__fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); min-width: 0; overflow-wrap: anywhere; }
.same__fact h3 { font-size: 14px; }
.same__label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); display: flex; align-items: center; gap: 8px; }
.same__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.same__row .same__fact { border-color: var(--accent-line); }
.form__section { grid-column: 1 / -1; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.picker { position: relative; display: grid; gap: 8px; }
.picker__list { position: absolute; top: 100%; z-index: 5; left: 0; right: 0; margin-top: 4px; background: var(--surface-solid-2); border: 1px solid var(--line-strong); border-radius: 6px; max-height: 240px; overflow: auto; box-shadow: var(--shadow); }
.picker__item { padding: 8px 12px; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.picker__item:hover { background: var(--accent-soft); }
.picker__item .mono { color: var(--text-3); font-size: 11.5px; }
.picker__line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); padding: 7px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line-strong); }
.picker__line.is-set { border-style: solid; border-color: var(--ok-line); color: var(--ok); background: var(--ok-soft); }
.picker__line .mono { font-size: 11.5px; }
.reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.reason { position: relative; }
.reason input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.reason span { display: flex; align-items: center; justify-content: center; height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font-size: 12.5px; color: var(--text-2); transition: border-color .12s, background .12s, color .12s; text-align: center; }
.reason input:hover + span { border-color: var(--line-strong); color: var(--text); }
.reason input:checked + span { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); font-weight: 500; }
.reason input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; font-size: 13px; color: var(--text-2); }
.shortcuts kbd { font-size: 11.5px; padding: 4px 7px; }
.shortcuts div { display: flex; gap: 4px; justify-content: flex-end; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 7px; background: var(--surface-solid-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow); z-index: 60; font-size: 13px; color: var(--text); animation: rise .2s var(--ease) both; max-width: min(560px, 90vw); }
.toast .icon { width: 16px; height: 16px; color: var(--ok); }
.toast--bad .icon { color: var(--bad); }
.toast--bad { border-color: var(--bad-line); }

.float-add { position: fixed; z-index: 40; height: 32px; padding: 0 12px 0 10px; border-radius: 6px; background: var(--accent); color: #fff; border: 0; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 8px 24px rgba(255, 96, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.4); animation: pop .15s var(--ease) both; }
.float-add:hover { background: var(--accent-hover); }

/* ── admin ────────────────────────────────────────────────────────── */
.reveal { margin-top: 16px; padding: 16px 20px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; animation: rise .25s var(--ease) both; }
.reveal__code { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: .3em; color: var(--text); }
.reveal__text { flex: 1; font-size: 12.5px; color: var(--text-2); min-width: 220px; }
.reveal__text b { color: var(--text); font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.assign-bar { display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); flex-wrap: wrap; position: sticky; top: var(--topbar-h); z-index: 10; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s; }
.assign-bar.has-picks { background: rgba(255, 96, 0, 0.07); border-color: var(--accent-line); }
.assign-bar__count { font-size: 12.5px; color: var(--text-3); min-width: 90px; font-variant-numeric: tabular-nums; }
.assign-bar.has-picks .assign-bar__count { color: var(--accent); font-weight: 600; }
.assign-bar .select { width: auto; min-width: 180px; }
.assign-bar .spacer { flex: 1; }
.chart-cell { display: grid; gap: 2px; min-width: 0; }
.chart-cell__title { font-weight: 500; font-size: 13px; overflow-wrap: anywhere; }
.chart-cell { min-width: 0; }
.chart-cell__slug { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* the charts table always fits its card: fixed columns, cells wrap or clip */
#charts { table-layout: fixed; width: 100%; }
#charts th:nth-child(1) { width: 44px; } #charts th:nth-child(2) { width: 18%; } #charts th:nth-child(3) { width: 112px; } #charts th:nth-child(4) { width: 64px; }
#charts th:nth-child(5) { width: 108px; } #charts th:nth-child(6) { width: 100px; } #charts th:nth-child(7) { width: 21%; }
#charts td { overflow: hidden; }
#charts .chip { max-width: 100%; }
#charts .chip > span:not(.chip__mode), #charts .chip { overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); margin: 2px 4px 2px 0; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--text-4); flex: none; }
.chip .dot--in_progress { background: var(--warn); } .chip .dot--done { background: var(--ok); } .chip .dot--assigned { background: var(--text-4); }
.chip__mode { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.chip__mode--scratch { color: var(--accent); }
.chip .btn--xs { height: 20px; width: 20px; padding: 0; border-radius: 4px; }
/* one reviewer's line in the charts table: name + status dot and Promote on top, the bar and numbers below */
.rev { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; padding: 4px 0; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.rev + .rev { border-top: 1px solid var(--line); }
.rev__who { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev__who .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--text-4); flex: none; }
.rev__who .dot--in_review { background: var(--warn); } .rev__who .dot--reviewed { background: var(--ok); }
.rev__who { grid-column: 1; grid-row: 1; }
.rev__meta { grid-column: 1; grid-row: 2; }
.rev__promote { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.rev__meta { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.rev .bar { width: 64px; min-width: 64px; height: 5px; }
.rev__n { font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; font-size: 12px; }

/* ── motion ───────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 1px rgba(255, 96, 0, 0.6), 0 0 0 6px rgba(255, 96, 0, 0.25); } 100% { box-shadow: 0 0 0 1px rgba(255, 96, 0, 0.6), 0 0 0 0 rgba(255, 96, 0, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ── narrow screens ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .rv-head { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
  .rv-id { grid-row: 1; grid-column: 1; }
  .rv-actions { grid-row: 1; grid-column: 2; }
  .rv-progress { grid-row: 2; grid-column: 1 / -1; }
}
@media (max-width: 920px) {
  .rv-body { grid-template-columns: 1fr !important; grid-template-rows: 45% 6px 1fr; }
  .rv-gutter { cursor: row-resize; } .rv-gutter::after { inset: 2px 0; }
  .qrow { grid-template-columns: 1fr; gap: 10px; }
  .qrow__minutes { justify-content: flex-start; }
  .identity__grid, .form { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 48px; }
  .codebook { padding: 24px 16px; }
}
