/* Shared by every page: the AI SDR screens (index.html) and the SDR dashboard (sdr.html).
   Served at /static/app.css to everyone, signed in or not (app/ui.py). Change the look here once. */
/* WizCommerce design system: Orange (brand) + Black/Neutral + Yellow accent.
   RecifeText Book for brand moments, General Sans for product UI, Geist Mono for eyebrows and identifiers. */
:root {
  --orange: #FD691F; --orange-400: #FF7E3D; --orange-300: #FB905B; --orange-200: #F9C597; --orange-100: #F1E1CD;
  --black-900: #100E0B; --black-700: #36332F; --black-500: #8A857F; --black-300: #C7C2BC; --black-100: #E7E2DC;
  --yellow: #FFEC71;

  --bg: #F6F3EF; --surface: #FFFFFF; --ink: var(--black-900); --ink-2: var(--black-700); --muted: var(--black-500);
  --line: var(--black-100); --line-strong: var(--black-300);
  --accent: var(--orange); --accent-hover: var(--orange-400); --accent-ink: var(--black-900); --accent-soft: #FAF1E6;
  --p1: var(--black-900); --p1-bg: var(--orange); --p2: var(--black-900); --p2-bg: var(--orange-200);
  --p3: var(--black-700); --p3-bg: var(--black-100);
  --on: var(--black-900); --on-bg: var(--orange-100); --tag: var(--black-900); --tag-bg: var(--yellow);
  --bad: #A3271B; --bad-bg: #FBE7E2;
  --good: #1E6B3A; --good-bg: #E2F3E6;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,14,11,.05), 0 12px 32px rgba(16,14,11,.08);
  --font-display: "RecifeText", "Recife Text", "Recife", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
/* Dark follows the device unless the person picks a theme: data-theme on <html> wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100E0B; --surface: #1A1714; --ink: #F3EFEA; --ink-2: #C7C2BC; --muted: #8A857F;
    --line: #2C2925; --line-strong: #36332F;
    --accent-soft: #2A1D12; --p3: #E7E2DC; --p3-bg: #36332F;
    --on: #F1E1CD; --on-bg: #3A2716;
    --bad: #FF9C8F; --bad-bg: #3D1A16;
    --good: #8FD9A6; --good-bg: #16301F;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #100E0B; --surface: #1A1714; --ink: #F3EFEA; --ink-2: #C7C2BC; --muted: #8A857F;
    --line: #2C2925; --line-strong: #36332F;
    --accent-soft: #2A1D12; --p3: #E7E2DC; --p3-bg: #36332F;
    --on: #F1E1CD; --on-bg: #3A2716;
    --bad: #FF9C8F; --bad-bg: #3D1A16;
    --good: #8FD9A6; --good-bg: #16301F;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45); color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/22px var(--font-ui); -webkit-font-smoothing: antialiased; }
main { max-width: 1160px; width: 100%; margin: 0 auto; padding: 36px 32px 96px; }
@media (max-width: 640px) { main { padding: 28px 16px 72px; } }

/* Eyebrow recipe: Geist Mono SemiBold, 10px, uppercase, 0.8px tracking */
.eyebrow, h2, th, .stat span { font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); }

/* Recife carries the brand voice: page title and the account name only. Book weight, never italic. */
h1 { font: 350 36px/41px var(--font-display); letter-spacing: -.025em; margin: 0; font-style: normal; }
@media (max-width: 640px) { h1 { font-size: 28px; line-height: 34px; letter-spacing: -.02em; } }
h2 { margin: 32px 0 12px; }
header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }

.sources { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; line-height: 19px; }
.chip { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.chip.on { color: var(--on); background: var(--on-bg); border-color: transparent; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font: 400 13px/19px var(--font-mono); background: var(--line); padding: 1px 6px; border-radius: 4px; color: var(--ink); }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius-sm); padding: 10px 20px; font-weight: 600; transition: background .15s; }
.btn:hover:not(:disabled) { background: var(--accent-hover); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.link:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
input[type="checkbox"] { accent-color: var(--orange); width: 16px; height: 16px; }

/* upload */
.upload { padding: 20px; display: grid; gap: 14px; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 30px 16px; text-align: center; color: var(--ink-2); transition: background .15s, border-color .15s; }
.drop.over { border-color: var(--orange); background: var(--accent-soft); color: var(--ink); }
.drop strong { color: var(--ink); font-weight: 600; font-size: 18px; line-height: 27px; }
.drop .hint { margin-top: 6px; }
.upload-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.upload-row label[hidden] { display: none; }
.upload-row > .btn { margin-left: auto; }
.upload-row label { display: flex; align-items: center; gap: 8px; }
/* Company website toggle: who reads the company's own site in research */
.seg { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg > span { font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); }
.seg-buttons { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg-buttons button { background: var(--surface); color: var(--ink); border: 0; padding: 7px 14px; font-weight: 500; cursor: pointer; }
.seg-buttons button + button { border-left: 1px solid var(--line-strong); }
.seg-buttons button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg-buttons button:disabled { color: var(--muted); cursor: not-allowed; }
.seg-buttons button:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.hint { color: var(--ink-2); font-size: 13px; line-height: 19px; }
.msg { font-size: 13px; line-height: 19px; padding: 10px 12px; border-radius: var(--radius-sm); }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.msg.warn { background: var(--orange-100); color: var(--black-900); }
.msg ul { margin: 4px 0 0; padding-left: 18px; }
.msg.pause { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 0; }
.msg.pause[hidden] { display: none; }
.msg.pause > div { flex: 1; min-width: 220px; }

/* run bar */
.runbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 32px 0 12px; }
.runbar .grow { flex: 1; min-width: 180px; }
.runbar .hint { margin-bottom: 6px; font-weight: 500; font-feature-settings: "tnum"; letter-spacing: -.01em; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--orange); width: 0; transition: width .4s; }
.runbar input, .runbar select { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 12px; }
.runbar input::placeholder { color: var(--muted); }
.runbar input:hover, .runbar select:hover { border-color: var(--black-500); }

/* table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { text-align: left; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
th button:hover { color: var(--orange); }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover, tbody tr.selected { background: var(--accent-soft); }
tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
tbody tr:last-child td { border-bottom: 0; }
.co { font-weight: 600; }
.co small { display: block; font-weight: 400; font-size: 13px; line-height: 19px; color: var(--muted); }
/* Numbers are always General Sans Medium, tabular, -0.01em */
.num, .score b, .stat strong { font-family: var(--font-ui); font-weight: 500; letter-spacing: -.01em; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.score { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.score b { width: 34px; text-align: right; }
.bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 110px; }
.bar > div { height: 100%; background: var(--orange); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; line-height: 19px; font-weight: 600; white-space: nowrap; }
.P1 { background: var(--p1-bg); color: var(--p1); } .P2 { background: var(--p2-bg); color: var(--p2); }
.P3 { background: var(--p3-bg); color: var(--p3); }
.none { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.bad { background: var(--bad-bg); color: var(--bad); }
.dim { color: var(--muted); }
.empty { padding: 56px 16px; text-align: center; color: var(--ink-2); }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--line-strong); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } .progress > div, .btn, .drop, tbody tr { transition: none; } }

/* sidebar */
.scrim { position: fixed; inset: 0; background: rgba(16,14,11,.4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
aside { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .22s ease; overflow-y: auto; padding: 28px 28px 48px; visibility: hidden; }
@media (max-width: 640px) { aside { padding: 20px 16px 40px; } }
aside.open { transform: none; visibility: visible; }
@media (prefers-reduced-motion: reduce) { aside, .scrim { transition: none; } }
.side-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.side-head h3 { margin: 0 0 2px; font: 350 28px/34px var(--font-display); letter-spacing: -.02em; font-style: normal; }
.close { background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); width: 32px; height: 32px; font-size: 18px; line-height: 1; flex: none; }
.close:hover { border-color: var(--black-500); background: var(--accent-soft); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat span { display: block; margin-bottom: 10px; }
.stat strong { font-size: 20px; line-height: 24px; }
.what { font-size: 18px; line-height: 27px; font-weight: 600; margin: 0 0 8px; }
.why { margin: 0; color: var(--ink-2); }
.signal { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; }
.signal .name { font-weight: 600; }
.signal .meta { font-size: 13px; line-height: 19px; color: var(--ink-2); margin-top: 6px; display: flex; gap: 4px 12px; flex-wrap: wrap; }
.signal p { margin: 4px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.signal.dq { border-color: transparent; background: var(--bad-bg); color: var(--bad); }
.signal.dq p, .signal.dq .meta { color: inherit; }
.signal a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; overflow-wrap: anywhere; }
.signal a:hover { color: var(--orange); }
.tabs { display: flex; gap: 6px; margin: 32px 0 12px; flex-wrap: wrap; }
.tab { background: none; border: 1px solid var(--line-strong); border-radius: 99px; padding: 5px 14px; font-size: 13px; line-height: 19px; font-weight: 500; color: var(--ink-2); }
.tab:hover { border-color: var(--black-500); }
.tab[aria-selected="true"] { background: var(--orange); border-color: var(--orange); color: var(--black-900); font-weight: 600; }
.tag { display: inline-block; font: 600 10px/16px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; padding: 1px 8px; border-radius: 99px; background: var(--tag-bg); color: var(--tag); margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
.tag.dq { background: var(--bad); color: #fff; }
/* Email status from ZeroBounce, next to each contact's address. */
.es { display: inline-block; font: 600 10px/16px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; padding: 1px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.es-ok { background: var(--good-bg); color: var(--good); }
.es-risky { background: var(--tag-bg); color: var(--tag); }
.es-bad { background: var(--bad-bg); color: var(--bad); }
.es-none { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.email-facts { display: block; color: var(--muted); font-size: 12px; line-height: 18px; }
.tag.zen { background: var(--black-900); color: #fff; cursor: help; }
:root[data-theme="dark"] .tag.zen { background: var(--orange-100); color: var(--black-900); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.zen { background: var(--orange-100); color: var(--black-900); } }
.verdict .dim { font-weight: 400; font-size: 13px; }
.data { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: 13px; line-height: 19px; }
.data dt { color: var(--muted); }
.data dd { margin: 0; overflow-wrap: anywhere; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.plain li:last-child { border-bottom: 0; }
.plain small { color: var(--muted); white-space: nowrap; }
.group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; }
.group .why-missing { font-weight: 600; }
.group ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 19px; }
.steps { font-size: 13px; line-height: 19px; color: var(--ink-2); columns: 2; margin: 0; padding: 0; list-style: none; }
.steps li { break-inside: avoid; padding: 2px 0; }
.steps .failed { color: var(--bad); }

/* account panel: fixed header, four tabs, one line per signal */
aside.wide { width: min(760px, 100vw); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
aside.wide .side-top { padding: 24px 28px 0; border-bottom: 1px solid var(--line); flex: none; }
aside.wide .pane { padding: 4px 28px 48px; overflow-y: auto; flex: 1; }
@media (max-width: 640px) { aside.wide .side-top { padding: 18px 16px 0; } aside.wide .pane { padding: 4px 16px 40px; } }
.verdict { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 500; }
.verdict.no { color: var(--bad); }
.tabs.main { margin: 18px 0 0; gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
.tabs.main .tab { border: 0; border-radius: 0; padding: 10px 12px; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); white-space: nowrap; }
.tabs.main .tab:hover { color: var(--ink); }
.tabs.main .tab[aria-selected="true"] { background: none; color: var(--ink); font-weight: 600; border-bottom-color: var(--orange); }
.tabs.sub { margin: 20px 0 14px; }
.pane h2:first-child { margin-top: 24px; }
.pane-summary { display: flex; align-items: center; gap: 14px; margin: 20px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pane-summary > span { font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); }
.pane-summary .score { min-width: 0; }
.lens-head { margin: 22px 0 8px; }
.lens-head:first-child { margin-top: 4px; }
details.row { border-bottom: 1px solid var(--line); }
details.row summary { display: flex; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; list-style: none; }
details.row summary::-webkit-details-marker { display: none; }
details.row summary::before { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .12s; }
details.row[open] summary::before { transform: rotate(45deg); }
details.row summary:hover { background: var(--accent-soft); }
.row-name { flex: 1; min-width: 0; font-weight: 500; }
.row-src { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.row-body { padding: 0 2px 14px 18px; }
.row-body p { margin: 0 0 6px; color: var(--ink-2); font-size: 13px; line-height: 19px; }
.row-body .meta { font-size: 13px; line-height: 19px; color: var(--muted); display: flex; gap: 4px 12px; flex-wrap: wrap; }
.row-body a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; overflow-wrap: anywhere; }
details.row.dq .row-name { color: var(--bad); }
.pill { flex: none; font: 600 10px/16px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; padding: 1px 8px; border-radius: 99px; background: var(--line); color: var(--ink-2); }
.pill.strong { background: var(--orange); color: var(--black-900); }
.pill.medium { background: var(--orange-200); color: var(--black-900); }
.pill.off { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.data.facts { grid-template-columns: 140px 1fr; gap: 8px 12px; margin-top: 24px; font-size: 15px; }
.grade { display: inline-block; min-width: 22px; margin-left: 2px; padding: 0 6px; border-radius: 99px; font: 600 11px/18px var(--font-ui); text-align: center; font-style: normal; background: var(--line); color: var(--ink-2); }
.grade.fit.g-a { background: var(--orange); color: var(--black-900); }
.grade.fit.g-b { background: var(--orange-200); color: var(--black-900); }
.grade.ready.g-hot { background: var(--orange); color: var(--black-900); }
.grade.ready.g-warm { background: var(--orange-200); color: var(--black-900); }
.grade.ready.g-watch { background: var(--yellow); color: var(--black-900); }
.bar.ready > div { background: var(--black-700); }
:root[data-theme="dark"] .bar.ready > div { background: var(--orange-200); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar.ready > div { background: var(--orange-200); } }
.badge.pr1 { background: var(--orange); color: var(--black-900); }
.badge.pr2 { background: var(--orange-200); color: var(--black-900); }
.badge.pr3 { background: var(--p3-bg); color: var(--p3); }
.badge.pr4 { background: none; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge.park { background: var(--yellow); color: var(--black-900); }
.stat strong em { font-size: 13px; vertical-align: 3px; }
.flags { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 19px; }
.flags li::marker { color: var(--orange); }
.row-pts.neg { color: var(--bad); }
.pc-stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.gate-allow { color: var(--ink); } .gate-park { color: var(--black-700); } .gate-exclude, .gate-block_as_lead { color: var(--bad); }
.pts-row summary { align-items: center; }
.fit-notes.loading .note-text { color: var(--ink-2); }
.note-text { font-weight: 500; }
.pts-big { flex: none; min-width: 48px; text-align: right; font: 600 18px/24px var(--font-ui); letter-spacing: -.01em; font-feature-settings: "tnum"; color: var(--ink); }
.pts-big.neg { color: var(--bad); } .pts-big.zero { color: var(--muted); }
.pts-row .row-name small { display: block; font-weight: 400; font-size: 13px; line-height: 19px; color: var(--muted); }
.conf { flex: none; font-size: 12px; padding: 2px 10px; border-radius: 99px; white-space: nowrap; background: var(--line); color: var(--ink-2); cursor: help; }
.conf.c-high { background: var(--orange-100); color: var(--black-900); }
.conf.c-medium { background: var(--yellow); color: var(--black-900); }
.conf.c-low { background: var(--bad-bg); color: var(--bad); }
.pts-total { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 2px; border-top: 2px solid var(--line-strong); color: var(--ink-2); font-feature-settings: "tnum"; }
.pts-total b { color: var(--ink); }
.row-pts { flex: none; font-weight: 500; font-size: 13px; color: var(--ink-2); font-feature-settings: "tnum"; }
.stat.pick { cursor: pointer; box-shadow: inset 0 0 0 1px var(--orange-200); }
.stat.pick:hover { box-shadow: inset 0 0 0 1px var(--orange); }
.pick-wrap { position: relative; }
.pick-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: 500 20px/24px var(--font-ui); letter-spacing: -.01em; text-align: left; }
.pick-btn svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.pick-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.pick-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 4px; }
.pick-menu { position: absolute; z-index: 30; top: calc(100% + 14px); left: -15px; right: -15px; min-width: 260px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.pick-menu li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; }
.pick-menu li:hover, .pick-menu li:focus { background: var(--accent-soft); outline: none; }
.pick-menu li[aria-selected="true"] { background: var(--orange-100); color: var(--black-900); }
/* the box's own label style (".stat span") must not reach the button or the list */
.stat .pick-wrap span { display: inline; margin: 0; font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.stat .pick-wrap .badge { display: inline-block; font: 600 13px/19px var(--font-ui); padding: 2px 10px; color: var(--black-900); }
.stat .pick-wrap .badge.P3 { color: var(--p3); }
.stat .pick-wrap .badge.none { color: var(--muted); }
.pick-menu li .badge { min-width: 30px; text-align: center; }
.pick-menu .pick-name { flex: 1; }
.pick-menu small { color: var(--muted); font-size: 13px; white-space: nowrap; font-feature-settings: "tnum"; }
.pick-menu li[aria-selected="true"] small { color: var(--black-700); }
@media (prefers-reduced-motion: reduce) { .pick-btn svg { transition: none; } }
.stat-select { display: block; width: 100%; margin: 0; padding: 0 22px 0 0; border: 0; background: transparent; color: var(--ink); font: 500 20px/24px var(--font-ui); letter-spacing: -.01em; cursor: pointer; }
.stat-select:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 4px; }
h2.with-badge { display: flex; align-items: center; gap: 8px; }
h2.with-badge .badge { font: 600 11px/16px var(--font-ui); letter-spacing: 0; text-transform: none; padding: 1px 8px; }
.pc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.pc-top h2 { margin: 0 0 10px; }
.product-pick { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 12px; font-weight: 600; min-width: 220px; }
.product-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 8px; margin-top: 12px; }
.pc-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pc-stat span { display: block; font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.pc-stat b.num { font-size: 20px; line-height: 24px; font-weight: 500; font-feature-settings: "tnum"; letter-spacing: -.01em; }
.pc-stat .score b { font-size: 20px; }
.pc-reason { margin: 14px 0 4px; font-weight: 500; }
.data.compare { grid-template-columns: 200px 1fr; gap: 6px 12px; margin: 10px 0 4px; }
.range { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.range input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 8px; color: var(--ink); }
.range input[type="number"] { width: 70px; }
.range input[type="date"] { width: 148px; }
.score-filters { flex-basis: 100%; margin: 4px 0 0; }
ul.hint { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { details.row summary::before { transition: none; } }

/* header actions, ranked products */
.head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.btn.ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); padding: 7px 14px; font-weight: 500; }
.btn.ghost:hover:not(:disabled) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--black-500); }
.others { display: block; font-size: 13px; line-height: 19px; color: var(--muted); }
.others b { font: 600 10px/10px var(--font-mono); letter-spacing: .8px; color: var(--ink-2); margin-right: 3px; }
.rank { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank:last-child { border-bottom: 0; }
.rank .badge { min-width: 34px; text-align: center; }
.rank .grow { flex: 1; font-weight: 600; }
.rank.off .grow { font-weight: 400; color: var(--ink-2); }
.rank small { color: var(--ink-2); font-size: 13px; white-space: nowrap; font-feature-settings: "tnum"; }

/* left sidebar: a dark floating panel with icons. Collapses to an icon rail with tooltips. */
.shell { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 100vh; }
.rail { --rail-ink: #E7E2DC; --rail-dim: #8A857F; --rail-hover: rgba(231,226,220,.08); --rail-line: rgba(231,226,220,.10);
  position: sticky; top: 12px; align-self: start; height: calc(100vh - 24px); width: 236px; margin: 12px 0 12px 12px;
  display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 12px; border-radius: 18px;
  background: var(--black-900); color: var(--rail-ink); box-shadow: 0 1px 2px rgba(16,14,11,.2), 0 16px 40px rgba(16,14,11,.18);
  transition: width .18s ease; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rail { background: #1A1714; box-shadow: inset 0 0 0 1px #2C2925; } }
:root[data-theme="dark"] .rail { background: #1A1714; box-shadow: inset 0 0 0 1px #2C2925; }
.rail .icon-sun, :root[data-theme="dark"] .rail .icon-moon { display: none; }
:root[data-theme="dark"] .rail .icon-sun { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rail .icon-moon { display: none; } :root:not([data-theme="light"]) .rail .icon-sun { display: block; } }
.rail .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--rail-line); white-space: nowrap; }
.rail .mark { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--orange); color: var(--black-900); display: grid; place-items: center; font: 600 15px/1 var(--font-ui); }
.rail .brand strong { font-size: 15px; line-height: 22px; font-weight: 600; color: #fff; }
.rail .brand small { display: block; font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--rail-dim); margin-top: 2px; }
.rail .rail-group { font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--rail-dim); padding: 12px 10px 8px; white-space: nowrap; }
.rail-items { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.rail .tab { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 10px; padding: 9px 10px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--rail-ink); background: none; white-space: nowrap; transition: background .12s, color .12s; }
.rail .tab svg { flex: none; width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.rail .tab:hover { background: var(--rail-hover); color: #fff; border: 0; }
.rail .tab[aria-selected="true"] { background: var(--orange); color: var(--black-900); font-weight: 600; box-shadow: none; }
.rail .tab[aria-selected="true"] svg { opacity: 1; }
.rail .tab:focus-visible { outline: 2px solid var(--orange-300); outline-offset: 2px; }
.rail .rail-foot { border-top: 1px solid var(--rail-line); margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.rail .rail-foot .tab { color: var(--rail-dim); }
.rail .rail-foot .tab:hover { color: #fff; }
.rail #collapseRail svg { transition: transform .18s ease; }

/* collapsed: icons only, the label shows as a tooltip beside the icon */
.shell.collapsed .rail { width: 64px; }
.shell.collapsed .rail .lbl, .shell.collapsed .rail .rail-group, .shell.collapsed .rail .brand div { display: none; }
.shell.collapsed .rail .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.shell.collapsed .rail .tab { justify-content: center; padding: 10px 0; }
.shell.collapsed .rail #collapseRail svg { transform: rotate(180deg); }
.shell.collapsed .rail .tab::after { content: attr(data-label); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); background: var(--black-900); color: #fff; font-size: 13px; line-height: 19px; font-weight: 500; padding: 5px 10px; border-radius: 8px; box-shadow: 0 6px 20px rgba(16,14,11,.25); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.shell.collapsed .rail .tab:hover::after, .shell.collapsed .rail .tab:focus-visible::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rail, .rail .tab, .rail #collapseRail svg { transition: none; } }
@media (max-width: 860px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .rail, .shell.collapsed .rail { position: static; width: auto; height: auto; margin: 12px 12px 0; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 10px 12px; }
  .rail .brand { border-bottom: 0; padding: 0 8px 0 0; margin: 0; }
  .rail .brand small, .rail .rail-group, .rail #collapseRail { display: none; }
  .rail-items { flex-direction: row; flex: 1; flex-wrap: wrap; min-width: 0; }
  .rail .rail-foot { border-top: 0; margin: 0; padding: 0; flex-direction: row; }
  .rail .tab, .shell.collapsed .rail .tab { width: auto; padding: 8px 12px; }
  .shell.collapsed .rail .lbl { display: inline; }
  .shell.collapsed .rail .tab::after { display: none; }
}
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 14px 16px; }
.kpi span { display: block; font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.kpi strong { font: 500 28px/34px var(--font-ui); letter-spacing: -.01em; font-feature-settings: "tnum"; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input[type="search"], .filters select { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 12px; }
.filters input[type="search"] { flex: 1; min-width: 200px; }
.filters label { display: flex; align-items: center; gap: 8px; }
.filters .hint { margin-left: auto; }
.report td.why { color: var(--ink-2); max-width: none; }
.report td:first-child { width: 240px; }
.report td.prod { white-space: nowrap; }
.run-cell { white-space: nowrap; color: var(--ink-2); font-size: 13px; font-feature-settings: "tnum"; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pg-buttons { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pg { min-width: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 500; font-feature-settings: "tnum"; }
.pg:hover:not(:disabled) { border-color: var(--black-500); }
.pg.on { background: var(--orange); border-color: var(--orange); color: var(--black-900); font-weight: 600; }
.pg:disabled { opacity: .4; cursor: not-allowed; }
.pg-gap { padding: 0 4px; color: var(--muted); }
.report .score { min-width: 110px; }
.report .bar { max-width: 70px; }
.report td.why div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.report td small { display: block; color: var(--muted); font-size: 13px; line-height: 19px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
a.btn { text-decoration: none; display: inline-block; }
a.btn[hidden] { display: none; }
.note p { margin: 0 0 8px; }
.points { margin: 0; padding-left: 18px; }
.points li { margin-bottom: 8px; }
.points li::marker { color: var(--orange); }
.opener { margin: 0; padding: 12px 16px; border-left: 3px solid var(--orange); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-weight: 500; }
aside .actions { margin: 18px 0 20px; }
.note .lead { font-size: 18px; line-height: 27px; font-weight: 600; }

/* settings */
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0; width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(16,14,11,.45); }
.dlg-head { padding: 24px 28px 16px; border-bottom: 1px solid var(--line); }
.dlg-head .side-head h3 { font-size: 28px; }
.dlg-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 760px; }
.dlg-head .tabs { margin: 16px 0 0; }
.dlg-body { overflow: auto; padding: 0 28px; flex: 1; }
/* SDR notes & mails window: note on the left, mails on the right, each scrolling on its own */
dialog.rs { width: min(520px, calc(100vw - 32px)); }
.rs-body { padding: 20px 22px; display: grid; gap: 12px; }
.rs-body h2 { margin: 0; font-size: 18px; line-height: 24px; }
.rs-body p { margin: 0; color: var(--ink-2); }
.rs-body label { display: flex; gap: 8px; align-items: flex-start; }
.cb-name { flex-direction: column; gap: 6px; }
.cb-name input { width: 100%; box-sizing: border-box; }
.cb-runs { display: grid; gap: 2px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.cb-run { align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.cb-run:hover { background: var(--bg); }
.cb-run-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-actions { display: flex; gap: 8px; justify-content: flex-end; }
dialog.nm { width: min(1320px, calc(100vw - 32px)); height: calc(100vh - 48px); }
.nm-head { padding-bottom: 14px; }
.nm-head .actions { margin: 12px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nm-head .nm-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; color: var(--ink-2); }
.nm-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); flex: 1; min-height: 0; }
.nm-col { overflow-y: auto; padding: 18px 28px 32px; min-height: 0; }
.nm-col + .nm-col { border-left: 1px solid var(--line); background: var(--bg); }
.nm-label { font: 600 10px/10px var(--font-mono); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.nm-col h2:first-of-type { margin-top: 18px; }
@media (max-width: 900px) {
  .nm-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .nm-col { overflow: visible; padding: 16px; }
  .nm-col + .nm-col { border-left: 0; border-top: 1px solid var(--line); }
}
.report td.mails-cell { white-space: nowrap; color: var(--ink-2); }
.report td.mails-cell small { white-space: normal; max-width: 360px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dlg-foot { padding: 14px 28px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dlg-foot .grow { flex: 1; min-width: 160px; }
@media (max-width: 640px) { .dlg-head, .dlg-foot { padding-left: 16px; padding-right: 16px; } .dlg-body { padding: 0 16px; } }
.matrix { min-width: 720px; }
.matrix th { position: sticky; top: 0; background: var(--surface); z-index: 1; padding-left: 8px; padding-right: 8px; }
.matrix th:first-child, .matrix td:first-child { padding-left: 0; }
.matrix td { padding: 10px 8px; }
.matrix tbody tr { cursor: default; }
.matrix tbody tr:hover { background: none; }
.matrix .lens td { padding: 26px 0 8px; border-bottom: 1px solid var(--line-strong); }
.matrix .lens .eyebrow { margin: 0; }
.matrix .sig { font-weight: 500; }
.matrix .sig small { display: block; font-weight: 400; font-size: 13px; line-height: 19px; color: var(--muted); }
select.level { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 5px 8px; min-width: 64px; font-weight: 500; }
select.level[data-level="P1"] { background: var(--orange); border-color: var(--orange); color: var(--black-900); }
select.level[data-level="P2"] { background: var(--orange-200); border-color: var(--orange-200); color: var(--black-900); }
select.level[data-level="P3"] { background: var(--line); border-color: var(--line); }
select.level[data-level=""] { color: var(--muted); }
select.level.changed { box-shadow: 0 0 0 2px var(--yellow); }
.level-chip { display: inline-block; min-width: 26px; text-align: center; padding: 1px 6px; border-radius: 99px; font: 600 11px/17px var(--font-ui); background: var(--line); color: var(--ink-2); }
.level-chip.lp0 { background: var(--orange); color: var(--black-900); }
.level-chip.lp1 { background: var(--orange-200); color: var(--black-900); }
.level-chip.lp2 { background: var(--orange-100); color: var(--black-900); }
.status-chip { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--line); color: var(--ink-2); white-space: nowrap; }
.status-chip.s-live { background: var(--orange-100); color: var(--black-900); }
.status-chip.s-bonus, .status-chip.s-live-here { background: var(--yellow); color: var(--black-900); }
.gate-chip { font-size: 12px; padding: 1px 8px; border-radius: 99px; white-space: nowrap; background: var(--line); color: var(--ink-2); }
.gate-chip.g-exclude { background: var(--bad-bg); color: var(--bad); }
.gate-chip.g-park { background: var(--yellow); color: var(--black-900); }
.gate-chip.g-block_as_lead { background: var(--orange-100); color: var(--black-900); }

/* ---------- SDR access, Assign companies and the SDR dashboard: small pieces built on the above ---------- */
.msg.ok { background: var(--good-bg); color: var(--good); }
table.static tbody tr { cursor: default; }
table.static tbody tr:hover { background: none; }
tr.changed td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
tr.reveal td { background: var(--accent-soft); }
.btn.sm { padding: 5px 12px; font-size: 13px; line-height: 19px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.upload-row > .row-actions { margin-left: auto; }
.stat strong em.grade { margin-left: 8px; }
.select, .input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 10px; color: var(--ink); }
.select:hover, .input:hover { border-color: var(--black-500); }
.select { max-width: 240px; }
.input { min-width: 240px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.secret { font: 600 15px/22px var(--font-mono); letter-spacing: .04em; background: var(--surface); color: var(--ink); padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line-strong); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 32px 0 12px; }
.section-head h2 { margin: 0; }
.board { padding: 4px 18px; }
.board details.row summary { padding: 14px 2px; }
.board .row-name { font-weight: 600; }
.board .plain li { align-items: center; }
.board .plain .co small { white-space: normal; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 4px; font-size: 13px; line-height: 19px; }
.chips .chip b { margin-left: 4px; color: inherit; }
