/* LeadManager — shared tokens, type, shell, and the Pipeline work screen. */
:root {
  --page: #f6f7f8;
  --rail: #fafbfc;
  --surface: #ffffff;
  --border: #e7e9eb;
  --border-strong: #d8dee5;
  --ink: #1a1d21;
  --mute: #5b6470;
  --faint: #8a939d;
  --slate: #46698f;
  --slate-deep: #33506f;
  --slate-wash: #e6edf4;
  --amber: #b9852c;
  --amber-text: #96690f;
  --green: #1d6b3f;
  --red: #b4302b;
  --red-line: #e3c5c4;
  --shadow-menu: 0 12px 32px rgba(26,29,33,.12);
  --shadow-rail: 8px 0 24px rgba(26,29,33,.06);
  --ring: 0 0 0 3px rgba(70,105,143,.22);
  --scrim: rgba(26,29,33,.35);
  --font-sans: "Geist", "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; }
.hidden, [hidden] { display: none !important; }
button, input, select, textarea, summary { font: 13px var(--font-sans); color: inherit; }
button, summary, .file-btn { cursor: pointer; }
button, input, select, textarea { min-height: 32px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); padding: 6px 10px; }
input, select, textarea { width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.55; }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--slate); flex: 0 0 auto; }
input[type="date"], input[type="tel"], input[type="number"] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
button:hover, summary:hover { background: var(--rail); }
:where(button, input, select, textarea, summary, a):focus-visible { outline: 1px solid var(--slate); box-shadow: var(--ring); outline-offset: 1px; }
button:disabled { opacity: .5; cursor: default; }
label, .field { color: var(--mute); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
h1 { margin: 0; font: 600 22px/1.2 var(--font-serif); }
h2 { font: 600 21px/1.2 var(--font-serif); }
p { max-width: 70ch; }
a, .linklike, .ghost-btn { color: var(--slate-deep); }
.primary-btn { background: var(--slate); color: var(--surface); border-color: var(--slate); font-weight: 500; }
.primary-btn:hover { background: var(--slate-deep); }
.secondary-btn, .att-btn { border-color: var(--border); background: var(--surface); }
.ghost-btn, .linklike { background: transparent; border-color: transparent; min-height: 26px; }
.linklike { text-decoration: underline; text-underline-offset: 3px; }
.delete-btn, .att-undo { color: var(--red); border: 0; background: transparent; text-decoration: underline; text-decoration-color: var(--red-line); text-underline-offset: 3px; }
.hint, .sc-note, .sc-foot, .rv-foot, .tagline, .modal-sub { font-size: 12px; color: var(--mute); font-weight: 400; }
.count, .stage-count { font: 12px var(--font-mono); color: var(--mute); font-variant-numeric: tabular-nums; }
kbd { border: 1px solid var(--border); border-radius: 3px; padding: 2px 4px; font: 11.5px var(--font-mono); color: var(--mute); white-space: nowrap; }
/* The path and folded rail never change the content's inset. */
.header { height: 50px; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.app-mark { width: 22px; height: 22px; border-radius: 4px; background: var(--slate); flex-shrink: 0; }
.header-path { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.path-slash { color: var(--faint); }
.header-search { width: 220px; min-width: 120px; position: relative; margin-left: auto; }
.header-search input { padding-right: 62px; }
.header-search kbd { position: absolute; right: 8px; top: 7px; pointer-events: none; }
.status-word { font-size: 12px; color: var(--amber-text); white-space: nowrap; }
.status-word::before, .status-line::before, .dh-line::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: var(--amber); margin-right: 7px; }
.status-word.active { color: var(--ink); }
.status-word.active::before { background: var(--green); }
.initials { width: 26px; height: 26px; border-radius: 999px; background: var(--slate-wash); color: var(--slate-deep); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 500; }
#role-word { color: var(--mute); font-size: 12px; }
.menu { position: relative; }
.menu > summary { min-height: 32px; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 6px; list-style: none; white-space: nowrap; }
.menu > summary::-webkit-details-marker { display: none; }
.workspace-menu > summary::after, .more-menu > summary::after { content: '⌄'; color: var(--faint); }
.menu-panel { position: absolute; z-index: 45; top: calc(100% + 6px); left: 0; width: 280px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-menu); padding: 4px; }
.menu-panel button { width: 100%; display: flex; align-items: flex-start; flex-direction: column; text-align: left; border: 0; padding: 8px 10px; gap: 4px; white-space: normal; }
.menu-panel button span { font-size: 12px; color: var(--mute); }
.menu-panel button[aria-current] { background: var(--slate-wash); }
.person-menu .menu-panel { left: auto; right: 0; width: 160px; }
.rail { position: fixed; z-index: 25; top: 50px; bottom: 0; left: 0; width: 56px; background: var(--rail); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 12px 6px; transition: width .15s ease; }
.rail:hover, .rail:has(:focus-visible), .rail.pinned { width: 232px; background: var(--surface); box-shadow: var(--shadow-rail); }
.rail button { display: flex; align-items: center; gap: 16px; width: 100%; height: 38px; padding: 0 12px; border: 0; background: transparent; position: relative; text-align: left; white-space: nowrap; }
.rail button:hover { background: var(--rail); }
.rail button[aria-current] { color: var(--slate-deep); background: var(--slate-wash); }
.rail-icon { position: relative; width: 18px; height: 18px; flex: 0 0 18px; color: var(--faint); }
.rail [aria-current] .rail-icon { color: var(--slate); }
.rail-icon svg { width: 18px; height: 18px; }
.waiting-dot { position: absolute; width: 5px; height: 5px; border-radius: 999px; top: -2px; right: -3px; background: var(--slate); }
.rail-label { opacity: 0; overflow: hidden; }
.rail:is(:hover, :has(:focus-visible), .pinned) .rail-label { opacity: 1; }
#rail-pin { margin-top: auto; }
#rail-pin[aria-pressed="true"] { color: var(--slate-deep); }
.rail-meta { display: none; margin-left: auto; align-items: center; gap: 8px; font: 12px var(--font-mono); color: var(--mute); font-variant-numeric: tabular-nums; }
.rail:is(:hover, :has(:focus-visible), .pinned) .rail-meta { display: inline-flex; }
.phone-screens { display: none; }
.workspace-content { margin-left: 56px; padding: 20px; min-width: 0; }
.screen-band { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
#band-scope { margin-left: auto; }
#band-scope label { flex-direction: row; align-items: center; gap: 8px; }
#band-scope select { width: auto; }
.bottom-bar { display: flex; align-items: center; gap: 12px; padding: 12px 0; margin-top: 16px; border-top: 1px solid var(--border); background: var(--page); position: sticky; bottom: 0; font-size: 12px; color: var(--mute); }
.bottom-bar > span:first-child { margin-right: auto; }
.more-menu > summary { border: 1px solid var(--border); padding: 6px 10px; background: var(--surface); }
.more-menu .menu-panel { top: auto; bottom: calc(100% + 6px); right: 0; left: auto; }
.before, .config-warn, .flag, .rv-recon { border-left: 2px solid var(--amber); padding: 8px 12px; margin: 12px 0; }
.rv-note { color: var(--mute); font-size: 13px; margin: 8px 0; max-width: 70ch; }
.before:empty { display: none; }
.before.error { border-color: var(--red); }
.before.ok { border-color: var(--green); }
/* Sign in is the one letter-spaced wordmark. */
.login-wrap { width: min(360px, calc(100% - 24px)); margin: auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 0; }
.wordmark { color: var(--slate); display: inline-block; font: 600 17px/1.1 var(--font-serif); letter-spacing: 3.5px; margin-bottom: 24px; }
.wordmark span { display: block; margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--slate); text-align: center; font: 500 8px var(--font-sans); letter-spacing: 4.5px; text-transform: uppercase; }
.login-card { margin-top: 16px; }
#login-form { display: grid; gap: 14px; }
#login-btn { width: 100%; }
.foot { color: var(--mute); font-size: 11.5px; max-width: 70ch; margin-top: 28px; }
/* Existing lead groups and rows, shared by all three lists. */
.lead-list { min-width: 0; max-width: 100%; overflow-x: auto; }
.empty, .form-card, .dq-box, .rv-preview, .cl-form, .ot-row { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 14px; }
.empty { max-width: 560px; color: var(--mute); }
.stage-group { margin-bottom: 20px; }
.stage-label, .notice-title { color: var(--mute); font-size: 12px; font-weight: 400; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.contact-edit, .detail-grid, .att-log, .ot-status, .ai-block, .upd-row, .fu-field, .rv-langpicks, .oc-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.contact-edit { align-items: flex-start; gap: 14px; }
.contact-edit label { flex: 1 1 180px; max-width: 320px; }
.detail-grid { font-size: 12px; color: var(--mute); gap: 8px 20px; margin-top: 12px; overflow-wrap: anywhere; }
.detail-grid b { color: var(--ink); font-weight: 500; margin-right: 4px; }
.detail-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-h { font-size: 13px; font-weight: 500; margin: 20px 0 8px; }
.upd-row { flex-wrap: nowrap; margin: 12px 0; }
.upd-row input { flex: 1; }
.upd-row button { flex-shrink: 0; }
.att-log + .att-log { margin-top: 6px; }
.att-method { width: 32px; color: var(--mute); font-size: 12px; }
.att-line, .tl-line { font-size: 12px; padding: 4px 0; color: var(--mute); overflow-wrap: anywhere; }
.att-line, .tl-when, .ot-ret-note, .cl-date, .stale-meta, .gc-id { font: 12px/1.55 var(--font-mono); font-variant-numeric: tabular-nums; }
.tl-when { margin-right: 8px; }
.att-undo { margin-left: 8px; }
.value-field { margin-top: 12px; max-width: 240px; }
.fu-field { flex-direction: row; margin-top: 12px; }
.fu-field input { width: auto; }
.status-line { font-size: 12px; }
.status-line.failed { color: var(--red); }
.status-line.failed::before { background: var(--red); }
.ai-grade { font: 13px var(--font-mono); }
.ai-strong { color: var(--green); }
.ai-moderate, .ai-ask { color: var(--amber-text); }
.ai-weak { color: var(--mute); }
.ai-likely_dq { color: var(--red); }
.notice-head, .dq-line, .ot-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.form-card { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.pill-group { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { border-radius: 999px; border-color: var(--border); font-size: 12px; font-weight: 500; }
.pill[aria-pressed="true"] { background: var(--slate-wash); border-color: var(--slate); }
.consent-check { display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 8px; }
.consent-check .hint { grid-column: 2; }
.form-actions { background: var(--surface); flex-wrap: wrap; }
.form-msg { color: var(--green); }
.form-actions .primary-btn { order: 2; margin-left: auto; }
/* Every numeric table scrolls within its own pane. */
.sc-head, .rv-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.spend-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.spend-field { width: 200px; }
.spend-auto { font: 13px var(--font-mono); }
.spend-auto i { display: block; color: var(--mute); font: 12px var(--font-sans); }
.sc-table, .rv-scroll, .rv-sample { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.sc-table .sc-tr { display: grid; grid-template-columns: 1.4fr 1fr .7fr .9fr .7fr 1.1fr 1.1fr; min-width: 700px; }
.sc-tr, .rv-tr { gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); font: 12px/1.55 var(--font-mono); font-variant-numeric: tabular-nums; }
.sc-tr > *, .rv-tr > * { min-width: 0; text-align: right; }
.sc-tr > :first-child, .rv-tr > :first-child { text-align: left; }
.sc-tr:last-child, .rv-tr:last-child { border-bottom: 0; }
.sc-th, .rv-th { background: var(--rail); color: var(--mute); font: 12px/1.55 var(--font-sans); }
.sc-total, .h2h-roll { background: var(--rail); font-weight: 500; }
.h2h-me .rv-name { font-weight: 500; }
.sc-ch, .rv-name { font-family: var(--font-sans); }
.dq-box { margin-top: 20px; max-width: 720px; }
.dq-line { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dq-n { font-family: var(--font-mono); }
.mtd-strip { font: 13px/1.6 var(--font-sans); font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.mtd-strip i { font-style: normal; color: var(--mute); }
.mtd-strip.over { color: var(--red); }
.rv-scroll .rv-table { min-width: 900px; }
.rv-scroll .rv-table-meta { min-width: 760px; }
.rv-tr { display: grid; grid-template-columns: 1.6fr repeat(8, 1fr); }
.rv-table-meta .rv-tr { grid-template-columns: 2fr repeat(6, 1fr); }
.rv-scroll .rv-table-h2h { min-width: 820px; }
.rv-table-h2h .rv-tr { grid-template-columns: 2fr repeat(7, 1fr); }
.rv-name { overflow-wrap: anywhere; }
.rv-lang { color: var(--mute); font: 11.5px var(--font-sans); }
.rv-i1 .rv-name { padding-left: 16px; }
.rv-i2 .rv-name { padding-left: 32px; }
.rv-dim, .gr.na { color: var(--faint); }
.gr { display: inline-flex; flex-direction: column; }
.gr.g, .lsa-new { color: var(--green); }
.gr.y { color: var(--amber-text); }
.gr.r { color: var(--red); }
.gr-note { color: var(--mute); font: 11.5px/1.4 var(--font-sans); }
.gr.r .gr-note { color: var(--red); }
.flag-action { font-weight: 500; }
.flag-why { margin: 4px 0 0; }
.flag-cause { font-style: normal; }
.rv-ann, .rv-diag, .cl-line, .stale-line { padding: 8px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.stale-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stale-line b { font: 600 14.5px var(--font-serif); }
.rv-import, .rv-settings { margin-top: 20px; }
.rv-settings summary, .rv-mapping summary { min-height: 32px; padding: 8px 0; font-weight: 500; }
.rv-preview { margin-top: 12px; }
.rv-mode { margin-top: 0; }
.rv-mapping { margin: 12px 0; }
.rv-mapping label { display: inline-flex; width: 200px; margin: 4px 8px 4px 0; }
.rv-langpick { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.rv-scroll .rv-sample-tr { min-width: 720px; display: grid; grid-template-columns: 1fr 2fr 2fr 2fr 1fr; gap: 8px; padding: 8px 12px; font: 12px var(--font-mono); }
.cl-form { display: flex; flex-wrap: wrap; gap: 12px; }
.cl-form label { flex: 1 1 180px; }
.cl-date, .cl-target, .cl-by { margin-right: 8px; color: var(--mute); font-style: normal; }
.bench-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.bench-row input { max-width: 120px; }
.ot-row { margin: 8px 0; }
.ot-key { font: 12px var(--font-mono); color: var(--mute); }
.ot-on { flex-direction: row; align-items: center; }
.ot-subj { margin: 8px 0; }
.ot-body { margin-top: 8px; }
.dh-line { padding: 4px 0; }
.oc-block { grid-column: 1 / -1; }
.oc-line { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.oc-line button { margin-left: auto; }
.oc-add input { flex: 1 1 160px; }
.gc-row { display: grid; grid-template-columns: 1.2fr 2fr 1fr 1.4fr; gap: 8px; align-items: center; padding: 8px 0; }
.gc-id { overflow-wrap: anywhere; color: var(--mute); }
.modal-scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-menu); }
.modal h2 { margin: 0 0 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
#done-extra { justify-content: flex-start; }
/* layoutFor is the only JS viewport decision. */
body.phone .rail { display: none; }
body.phone .header { height: auto; min-height: 50px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 8px 12px; }
body.phone .header-path { grid-column: 1 / 3; grid-row: 2; gap: 6px; font-size: 12px; }
body.phone .app-mark { grid-column: 1; grid-row: 1; }
body.phone .header-search { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; }
body.phone .header-search kbd { display: none; }
body.phone .header-search input { padding-right: 10px; }
body.phone .person-menu { grid-column: 3; grid-row: 1; }
body.phone .status-word { grid-column: 3; grid-row: 2; font-size: 11.5px; }
body.phone .status-word::before { margin-right: 4px; width: 5px; height: 5px; }
body.phone .header .path-slash:first-child { display: none; }
body.phone .header .menu-panel { position: fixed; top: 110px; left: 12px; right: 12px; width: auto; max-width: none; }
body.phone .person-menu .menu-panel { top: 60px; }
body.phone .phone-screens { display: flex; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface); padding: 0 12px; }
body.phone .phone-screens button { flex-shrink: 0; min-height: 44px; border: 0; border-radius: 0; background: transparent; }
body.phone .phone-screens button[aria-current] { color: var(--slate-deep); border-bottom: 2px solid var(--slate); }
body.phone .workspace-content { margin-left: 0; padding: 16px 12px; }
body.phone button, body.phone select, body.phone input:not([type="checkbox"]), body.phone textarea, body.phone summary, body.phone .file-btn { min-height: 44px; }
body.phone input, body.phone select, body.phone textarea { font-size: 16px; }
body.phone .form-grid { grid-template-columns: minmax(0, 1fr); }
body.phone .bottom-bar { flex-wrap: wrap; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
body.phone .bottom-bar > span:first-child { flex: 1 1 100%; }
body.phone .form-actions { margin-left: -2px; margin-right: -2px; }
body.phone .gc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.phone .gc-row .gc-id { grid-column: 1 / -1; }
body.phone .contact-edit label { max-width: none; }
body.phone .upd-row { flex-wrap: wrap; }
body.phone .upd-row input { flex-basis: 100%; }
body.phone .oc-line { flex-wrap: wrap; }
/* Phone-sized fields remain safe even if the module cannot start. */
@media (max-width: 719px) {
  input, select, textarea { font-size: 16px; min-height: 44px; }
  input[type="checkbox"] { min-height: 0; }
}
/* Pipeline: fixed work area, with scrolling owned by each pane. */
.path-part { color: var(--mute); white-space: normal; overflow-wrap: anywhere; }
#rail-screens { overflow-x: hidden; overflow-y: auto; min-height: 0; }
.rail button { flex-shrink: 0; }
.rail-heading { height: 1px; border-top: 1px solid var(--border); margin: 12px 6px; overflow: hidden; color: var(--mute); font-size: 12px; }
.rail:is(:hover, :has(:focus-visible), .pinned) .rail-heading { height: auto; border: 0; padding: 0 6px; margin: 16px 0 6px; }
.status-index { display: grid; place-items: center; }
.status-index::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--faint); }
.source-index { font: 12px/18px var(--font-mono); text-align: center; }
#rail-pin { min-height: 38px; }
#app-view:has(#tab-pipeline:not(.hidden)) { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
#app-view:has(#tab-pipeline:not(.hidden)) .header { flex-shrink: 0; }
.workspace-content:has(#tab-pipeline:not(.hidden)) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.workspace-content:has(#tab-pipeline:not(.hidden)) > .foot { display: none; }
#tab-pipeline { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.work-panes { overflow: auto; display: grid; grid-template-columns: 236px minmax(320px, 1fr) 372px; gap: 14px; flex: 1; min-height: 0; }
/* Decisions sit in the wide middle column (owner, 2026-09-07); the fields keep a form's width. */
.decisions-body { max-width: 600px; }
.work-pane { min-width: 0; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; display: flex; flex-direction: column; }
.pane-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 500; flex-shrink: 0; }
.pane-header > .hint { margin-left: auto; }
.pane-scroll { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; }
.queue-pane .stage-group { margin: 0; }
.queue-pane .stage-label, .notice-head { padding: 12px 10px 6px; margin: 0; }
.queue-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 7px; gap: 7px; align-items: start; width: 100%; border: 0; border-bottom: 1px solid var(--border); border-left: 2px solid transparent; border-radius: 0; padding: 8px; text-align: left; }
.queue-row.open { border-left-color: var(--slate); background: var(--page); }
.row-position { font: 11.5px/1.55 var(--font-mono); color: var(--faint); }
.row-copy { min-width: 0; }
.lead-name { display: block; font: 600 14.5px/1.2 var(--font-serif); overflow-wrap: anywhere; }
.lead-context { display: block; color: var(--mute); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; margin-top: 4px; }
.lead-timer { font: 12px var(--font-mono); font-variant-numeric: tabular-nums; }
.lead-timer.overdue { color: var(--red); }
.lead-dot { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 999px; margin-top: 5px; }
.tone-faint { background: var(--faint); }
.tone-red { background: var(--red); }
.tone-amber { background: var(--amber); }
.tone-green { background: var(--green); }
.state-line { display: flex; align-items: baseline; gap: 7px; font-size: 12px; overflow-wrap: anywhere; }
.state-line .lead-dot { align-self: flex-start; }
.empty-pane, .record-body, .decisions-body { padding: 12px 14px; }
.empty-pane { color: var(--mute); }
.record-body .detail-h:first-child { margin-top: 0; }
.record-body .detail-h { display: flex; justify-content: space-between; gap: 12px; }
.record-body p { max-width: 70ch; }
.record-line { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px; color: var(--ink); font: 13px/1.55 var(--font-sans); padding: 6px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.record-line .tl-when { margin: 0; color: var(--mute); }
.message-sent { color: var(--green); }
.message-failed { color: var(--red); }
.message-skipped { color: var(--mute); }
.decisions-body .contact-edit { display: grid; gap: 4px; }
.contact-edit input { border-color: transparent; padding: 4px 0; font-family: var(--font-mono); }
.contact-edit input:hover { border-color: var(--border); }
.contact-edit input.phone-invalid { border-color: var(--red); }
.contact-edit .decision-name { font: 600 21px/1.2 var(--font-serif); }
.decision-status { margin: 12px 0 20px; }
.decision-field { display: block; margin: 0 0 20px; }
.decision-field > h3 { font: 400 12px/1.55 var(--font-sans); color: var(--mute); margin: 0 0 6px; }
.decision-field > input, .decision-field > select { margin-top: 6px; }
.decision-field .fu-field { margin-top: 0; }
.decision-field .att-log { gap: 4px; flex-wrap: nowrap; }
.decision-field .att-btn { padding: 6px; font-size: 12px; }
.decision-field .att-method { flex: 0 0 30px; }
.decision-field .hint { margin: 6px 0 0; }
.warn { background: transparent; border-color: transparent; color: var(--red); }
.bar-separator { align-self: stretch; width: 1px; background: var(--border); }
#pipeline-bar { flex-shrink: 0; margin-top: 14px; }
.phone-pane-nav, .scope-menu { display: none; }
.scope-heading { padding: 8px 10px; color: var(--mute); font-size: 12px; }
.scope-menu .menu-panel { max-height: 60dvh; overflow-y: auto; width: 220px; left: auto; right: 0; }
.palette-scrim { position: fixed; inset: 0; z-index: 55; background: var(--scrim); padding: 12vh 12px 24px; display: flex; justify-content: center; align-items: flex-start; }
.palette { width: 560px; max-width: 100%; max-height: 76dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-menu); overflow: hidden; }
.palette-input { display: flex; padding: 12px; gap: 8px; border-bottom: 1px solid var(--border); }
.palette-results { overflow: auto; padding: 12px; min-height: 0; }
.palette > .hint { padding: 0 12px; }
.palette-result { width: 100%; display: block; text-align: left; border: 0; padding: 8px 10px; }
.palette-result.selected { background: var(--slate-wash); }
body.phone #app-view:has(#tab-pipeline:not(.hidden)) .phone-screens { flex-shrink: 0; }
body.phone .header-path { min-width: 0; flex-wrap: wrap; }
body.phone .workspace-content:has(#tab-pipeline:not(.hidden)) { padding: 12px; }
body.phone .work-panes { display: flex; overflow: visible; }
body.phone .work-pane { width: 100%; display: none; }
body.phone .work-panes[data-pane="list"] .queue-pane, body.phone .work-panes[data-pane="record"] .record-pane, body.phone .work-panes[data-pane="decisions"] .decisions-pane { display: flex; }
body.phone .phone-pane-nav { display: flex; flex-direction: column; width: 100%; }
body.phone .phone-pane-nav > button { text-align: left; padding-left: 0; }
body.phone .phone-pane-nav [aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }
body.phone .scope-menu { display: block; margin-left: auto; }
body.phone #pipeline-bar { gap: 4px; margin-top: 8px; flex-wrap: nowrap; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
body.phone #pipeline-bar > span, body.phone #pipeline-bar .walk-btn { display: none; }
body.phone #pipeline-bar > .primary-btn { margin-left: auto; }
body.phone #pipeline-bar > button { padding: 6px 8px; }
body.phone #pipeline-bar:not(:has(button)) > span:first-child { display: block; }
body.phone .decision-field .att-log { flex-wrap: wrap; }
body.phone .contact-edit input { font-size: 16px; }
body.phone .palette-scrim { display: none; }
body:has(.palette-scrim) { overflow: hidden; }

/* Weekly review parts and the rail's second column share their status text. */
.header-path { min-width: 0; }
.rail-chevron { color: var(--faint); margin-left: 2px; }
.status-word button { background: transparent; border: 0; padding: 0; font: inherit; color: inherit; }
.status-word.errors, .status-word.errors button { color: var(--red); text-decoration: underline; text-decoration-color: var(--red-line); text-underline-offset: 3px; }
.status-word.errors::before { background: var(--red); }
.review-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.part { min-width: 0; border-bottom: 1px solid var(--border); scroll-margin-top: 70px; }
.part > summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; font-size: 13px; font-weight: 500; list-style: none; }
.part > summary::-webkit-details-marker { display: none; }
.part > summary::before { content: '›'; color: var(--faint); flex-shrink: 0; }
.part[open] > summary::before { transform: rotate(90deg); }
.part-status { display: flex; align-items: baseline; gap: 7px; margin-left: auto; color: var(--mute); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.part-status .lead-dot { flex-shrink: 0; }
.part-body { min-width: 0; padding: 0 0 16px 18px; overflow-wrap: anywhere; }
.part-body > :first-child, .part-body .rv-settings { margin-top: 0; }
.review-pullout { position: absolute; top: 0; bottom: 0; left: 231px; width: 236px; overflow-y: auto; padding: 12px 8px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-rail); }
.pullout-title { padding: 8px 10px 12px; font-size: 13px; font-weight: 500; }
.rail .review-pullout button { height: auto; padding: 8px 10px; flex-direction: column; align-items: flex-start; gap: 4px; white-space: normal; }
.review-pullout .part-status { margin-left: 0; }
.rail:not(:hover):not(:has(:focus-visible)):not(.pinned) .review-pullout { display: none; }
body.phone .review-pullout { display: none; }
body.phone .header-path { white-space: normal; }
body.phone .part { scroll-margin-top: 160px; }
body.phone .part > summary { flex-wrap: wrap; gap: 4px 8px; }
body.phone .part > summary .part-status { flex: 1 1 100%; margin-left: 14px; }
body.phone .part-body { padding-left: 0; }
body.phone #band-scope { margin-left: 0; width: 100%; }
body.phone .spend-field { width: 100%; }
body.phone .cl-form { flex-direction: column; }
body.phone .cl-form label { flex: auto; min-width: 0; }
body.phone .rv-import .modal-actions { flex-direction: column; }
body.phone .rv-mapping label { width: 100%; margin-right: 0; }
body.phone .rv-preview { padding: 10px; }
body.phone .file-btn { display: flex; justify-content: center; }
body.phone .ot-meta { flex-wrap: wrap; }
body.phone .record-line { grid-template-columns: 96px minmax(0, 1fr); }
body.phone .bottom-bar .more-menu .menu-panel { position: fixed; left: 12px; right: 12px; bottom: 80px; width: auto; }

/* The client-guard contract requires these two explicit review chips. */
.client-match-chip { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px; color: var(--amber-text); font-size: 11px; max-width: 100%; }
.client-review { margin-top: 0; overflow-wrap: anywhere; }
.client-review p { margin: 6px 0 10px; }
.client-review-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.client-review-actions button { max-width: 100%; white-space: normal; }
body.phone .client-review-actions button { flex: 1 1 100%; min-height: 44px; }
body.phone .status-word.roster-warning { grid-column: 1 / -1; grid-row: 3; white-space: normal; }

/* Source evidence and the deliberate duplicate choice. */
.source-evidence { display: block; font-size: 12px; font-weight: 400; color: var(--mute); line-height: 1.5; }
.duplicate-lead { padding: 12px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
