:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --hover: #f3f3f7;
  --border: #e7e7ec;
  --border-strong: #d6d6de;
  --text: #17161c;
  --text-2: #55545f;
  --text-3: #8a8995;
  --brand: #0000fe; /* Hud blue, from the logo */
  --accent: #0000fe;
  --accent-hover: #0000c4;
  --accent-soft: #ececff;
  --accent-text: #0000d6;
  --good: #11845b;
  --good-soft: #e3f6ee;
  --warn: #a35a00;
  --warn-soft: #fff1dc;
  --bad: #c2353b;
  --bad-soft: #fde9ea;
  --hs: #ff5c35;
  --li: #0a66c2;
  --shadow-sm: 0 1px 2px rgba(20, 18, 40, .05);
  --shadow: 0 1px 2px rgba(20, 18, 40, .05), 0 4px 16px rgba(20, 18, 40, .06);
  --shadow-lg: 0 12px 40px rgba(20, 18, 40, .18), 0 2px 6px rgba(20, 18, 40, .08);
  --bar-bg: #18171f;
  --bar-fg: #f4f2f8;
  --bar-2: #2a2833;
  --radius: 12px;
  color-scheme: light;
}

/* Dark tokens: follow the OS unless the toggle picked a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f13;
    --surface: #17171d;
    --surface-2: #1b1b22;
    --hover: #202029;
    --border: #2a2a33;
    --border-strong: #383844;
    --text: #efeef4;
    --text-2: #b0afbc;
    --text-3: #7d7c89;
    --accent: #4d4dff;
    --accent-hover: #6b6bff;
    --accent-soft: #15154a;
    --accent-text: #a8a8ff;
    --good: #4cd29b;
    --good-soft: #12301f;
    --warn: #f0b155;
    --warn-soft: #33260f;
    --bad: #ff7a80;
    --bad-soft: #3a1619;
    --li: #5aa4ef;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    --bar-bg: #24232d;
    --bar-2: #34323f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f13;
  --surface: #17171d;
  --surface-2: #1b1b22;
  --hover: #202029;
  --border: #2a2a33;
  --border-strong: #383844;
  --text: #efeef4;
  --text-2: #b0afbc;
  --text-3: #7d7c89;
  --accent: #4d4dff;
  --accent-hover: #6b6bff;
  --accent-soft: #15154a;
  --accent-text: #a8a8ff;
  --good: #4cd29b;
  --good-soft: #12301f;
  --warn: #f0b155;
  --warn-soft: #33260f;
  --bad: #ff7a80;
  --bad-soft: #3a1619;
  --li: #5aa4ef;
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  --bar-bg: #24232d;
  --bar-2: #34323f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
svg { width: 16px; height: 16px; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--text-3); }
.pad { padding: 14px; }
.grow { flex: 1; min-width: 0; }
kbd {
  font: 500 11px/1 "Space Grotesk", sans-serif;
  padding: 3px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  color: var(--text-3);
  background: var(--surface);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--hover); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.btn.soft:hover { filter: brightness(.97); }
.btn svg { width: 14px; height: 14px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; opacity: .7; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- avatars & logos ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 12px; font-weight: 600; color: #fff; background: var(--accent);
  letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.logo-tile {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 9px; overflow: hidden;
  background: var(--hover); border: 1px solid var(--border);
  font-weight: 700; font-size: 14px; color: var(--text-2);
}
.logo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.logo-tile.lg { width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 56px; padding: 0 16px 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.logo {
  display: grid; place-items: center; width: 34px; height: 34px; aspect-ratio: 1; border-radius: 8px; background: var(--brand); flex: none;
}
.logo img { width: 78%; height: auto; display: block; }
.brand .plays-word {
  font-weight: 700; font-size: 19px;
  letter-spacing: -.04em; color: var(--text); line-height: 1;
}
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.sdr-picker {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
}
.sdr-picker select { border: 0; background: transparent; font-weight: 500; padding-right: 4px; cursor: pointer; outline: none; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 56px); }

.rail {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--border);
}
.rail-head { padding: 16px 14px 8px; display: grid; gap: 10px; }
.rail-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding-left: 4px; }
.plays { flex: 1; overflow: auto; padding: 4px 8px 12px; display: grid; align-content: start; gap: 2px; }
.play {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start;
  width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 9px;
  background: transparent; cursor: pointer;
}
.play:hover { background: var(--hover); }
.play.active { background: var(--accent-soft); }
.play .dot { width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; background: var(--text-3); }
.play .name { font-weight: 550; line-height: 1.3; }
.play.active .name { color: var(--accent-text); }
.play .dates { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.play .count {
  min-width: 24px; height: 20px; padding: 0 7px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 600; background: var(--hover); color: var(--text-2);
}
.play.active .count { background: var(--accent); color: #fff; }
.play .count.loading { color: transparent; background: linear-gradient(90deg, var(--hover), var(--border), var(--hover)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.play .prog { grid-column: 2 / 4; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 4px; }
.play .prog i { display: block; height: 100%; background: var(--good); border-radius: 3px; }
.rail-foot {
  display: flex; gap: 8px; align-items: center; padding: 12px 18px; font-size: 12px; color: var(--text-3);
  border-top: 1px solid var(--border); cursor: pointer;
}

.main { overflow: auto; padding: 28px 36px 140px; min-width: 0; }

/* ---------- search ---------- */
.search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface);
  color: var(--text-3);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.search.sm { height: 32px; }
.search.grow { flex: 1 1 280px; min-width: 260px; max-width: 420px; }

/* ---------- empty state ---------- */
.empty-state { max-width: 460px; margin: 12vh auto 0; text-align: center; color: var(--text-2); }
.empty-state h1 { color: var(--text); font-size: 22px; margin: 16px 0 8px; letter-spacing: -.02em; }
.empty-art { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.empty-art svg { width: 26px; height: 26px; }

/* ---------- play header ---------- */
.play-head { margin-bottom: 22px; }
.play-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.play-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.play-head h1 { margin: 0; font-size: 26px; letter-spacing: -.025em; line-height: 1.2; }
.when {
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--hover); color: var(--text-2);
}
.when:empty { display: none; }
.when.live { background: var(--good-soft); color: var(--good); }
.when.soon { background: var(--warn-soft); color: var(--warn); }
.play-notes { margin: 8px 0 0; color: var(--text-2); max-width: 760px; }
.play-notes:empty { display: none; }
.play-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.play-meta:empty { display: none; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; max-width: 860px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.kpi .l { font-size: 12px; color: var(--text-3); font-weight: 500; }
.kpi .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.kpi .bar { height: 4px; border-radius: 4px; background: var(--border); margin-top: 10px; overflow: hidden; }
.kpi .bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.kpi .bar.good i { background: var(--good); }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: -28px; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 0; margin: 0 0 6px; background: var(--bg);
}
.tabs { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hover); border: 1px solid var(--border); }
.tabs button {
  border: 0; background: transparent; cursor: pointer; padding: 5px 12px; border-radius: 7px;
  font-weight: 550; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center;
}
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.tabs .n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 30px; padding: 0 11px; border-radius: 999px; border: 1px dashed var(--border-strong);
  background: transparent; cursor: pointer; font-size: 13px; color: var(--text-2);
}
.chip:hover { background: var(--hover); }
.chip.on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 550; }
.sort { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; color: var(--text-3); }
.sort select { height: 30px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 8px; }

/* ---------- account cards ---------- */
.accounts { display: grid; gap: 14px; }
.account {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.account.has-sel { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.account-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.account-head .title { font-weight: 650; font-size: 15px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-head .facts { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.links { display: flex; gap: 2px; }
.ilink {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  color: var(--text-3); text-decoration: none; border: 0; background: none; cursor: pointer;
}
.ilink:hover { background: var(--hover); color: var(--text); }
.ilink.hs:hover { color: var(--hs); }
.ilink.li:hover { color: var(--li); }
.ilink.li.has { color: var(--li); }
.ilink.dim { opacity: .55; }
.ilink svg { width: 15px; height: 15px; }

.why-strip {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 16px 12px; padding: 10px 12px; border-radius: 9px;
  background: var(--accent-soft); color: var(--text); font-size: 13px; cursor: pointer;
  border: 1px solid transparent;
}
.why-strip:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.why-strip svg { color: var(--accent); margin-top: 2px; }
.why-strip .more { margin-left: auto; color: var(--accent-text); font-weight: 600; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--hover); color: var(--text-2);
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge .pip { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* people rows */
.row {
  display: grid; grid-template-columns: 20px 32px minmax(180px, 1.4fr) minmax(140px, 1fr) auto auto;
  gap: 12px; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--border); cursor: pointer;
  transition: background .1s;
}
.row:hover { background: var(--surface-2); }
.row.selected { background: var(--accent-soft); }
.row.focused { box-shadow: inset 3px 0 0 var(--accent); }
.row.is-done .who .n { color: var(--text-2); }
.who { min-width: 0; }
.who .n { font-weight: 550; }
.who .t { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.status .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.status .sdot.new { background: var(--accent); }
.status .sdot.open { background: #2f9bd8; }
.status .sdot.prog { background: var(--warn); }
.status .sdot.attempt { background: #d4730d; }
.status .sub { color: var(--text-3); }
.badges { display: flex; gap: 4px; justify-content: flex-end; }
.linkset { display: flex; }

input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; }

.notice {
  padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px dashed var(--border-strong); color: var(--text-2);
}
.notice.err { border-style: solid; border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }

.skeleton {
  height: 12px; border-radius: 6px; margin: 8px 0;
  background: linear-gradient(90deg, var(--hover), var(--border), var(--hover)); background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.kbd-hint { margin-top: 18px; font-size: 12px; color: var(--text-3); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }

/* ---------- research panel ---------- */
.panel {
  position: fixed; top: 56px; right: 0; bottom: 0; z-index: 30;
  width: min(540px, 100vw); background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.panel.open { transform: none; }
.panel-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.panel-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.panel-body { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 22px; }
/* A column of sections that scrolls: never squeeze one to fit the panel height. */
.panel-body > * { flex: none; }
.panel-body h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.panel-body p { margin: 0; color: var(--text-2); }
.panel-body ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.panel-body li { position: relative; padding-left: 20px; }
.panel-body li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.fit-hero {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
}
.fit-ring {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
}
.fit-ring.high { background: var(--good-soft); color: var(--good); }
.fit-ring.medium { background: var(--warn-soft); color: var(--warn); }
.fit-ring.low { background: var(--bad-soft); color: var(--bad); }
.fit-hero .r { color: var(--text-2); font-size: 13px; }
.signal { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); display: grid; gap: 4px; }
.signal .s { font-weight: 600; }
.signal .w { color: var(--text-2); font-size: 13px; }
.signal a { font-size: 12px; color: var(--accent-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal a:hover { text-decoration: underline; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.person { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.person .ph { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.person .ph .n { font-weight: 600; }
.person .ph .t { font-size: 12px; color: var(--text-3); }
.person .angle { padding: 0 12px 10px; font-size: 13px; color: var(--text-2); }
.opener {
  padding: 12px 12px 12px 14px; background: var(--surface-2); border-top: 1px solid var(--border);
  font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
}
.opener .txt { flex: 1; }
.synced { font-size: 11.5px; color: var(--good); display: inline-flex; align-items: center; gap: 4px; }
.synced.no { color: var(--warn); }
.sources { display: grid; gap: 4px; }
.sources a { font-size: 12.5px; color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources a:hover { color: var(--accent-text); }
.panel-foot { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.research-wait { display: grid; gap: 14px; justify-items: start; color: var(--text-2); }
.research-wait .steps { display: grid; gap: 8px; font-size: 13px; }
.research-wait .steps div { display: flex; gap: 8px; align-items: center; color: var(--text-3); }
.research-wait .steps div.on { color: var(--text); }
.research-wait .steps div::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.research-wait .steps div.on::before { background: var(--accent); animation: pulse 1s infinite; }
.research-wait .steps div.ok::before { background: var(--good); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- action bar ---------- */
.actionbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40;
  width: min(880px, calc(100vw - 32px));
  color: var(--bar-fg); animation: rise .18s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }
.actionbar-inner {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  background: var(--bar-bg); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.sel-count { font-weight: 650; white-space: nowrap; }
.divider { width: 1px; height: 22px; background: var(--bar-2); }
.seq-picker {
  position: relative; flex: 1; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px; border-radius: 9px; background: var(--bar-2); color: #a9a6b8;
}
.seq-picker input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--bar-fg); }
.seq-picker input::placeholder { color: #a9a6b8; }
.seq-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); max-height: 340px; overflow: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px;
}
.seq-group { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px 4px; }
.seq-opt { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: grid; gap: 2px; }
.seq-opt:hover { background: var(--hover); }
.seq-opt .sn { font-weight: 550; }
.seq-opt .sm { font-size: 12px; color: var(--text-3); }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; color: #cfcbdc; cursor: pointer; }
.seq-warning {
  margin: 0 8px 8px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  box-shadow: var(--shadow);
}

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 22px; left: 22px; z-index: 50; max-width: 420px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--good); box-shadow: var(--shadow-lg);
  animation: rise2 .18s ease-out;
}
.toast.err { border-left-color: var(--bad); }
.toast a { color: var(--accent-text); }
@keyframes rise2 { from { opacity: 0; transform: translateY(6px); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .row { grid-template-columns: 20px 32px minmax(0, 1fr) auto auto; }
  .row .status { display: none; }
  .main { padding: 22px 20px 140px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; height: auto; }
  .rail { border-right: 0; border-bottom: 1px solid var(--border); max-height: 280px; }
  .main { overflow: visible; padding: 18px 16px 160px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { top: 56px; }
  .sort { margin-left: 0; }
  .row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .row .avatar, .row .badges { display: none; }
  .account-head { flex-wrap: wrap; }
  .actionbar-inner { flex-wrap: wrap; }
  .seq-picker { flex-basis: 100%; order: 5; }
  .divider, .kbd-hint { display: none; }
  .topbar .brand span:last-child { display: none; }
}

/* ---------- contact panel ---------- */

.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.small { font-size: 12.5px; }
.c-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.c-actions a.btn { text-decoration: none; color: inherit; }
.c-actions .btn.hs svg { color: var(--hs); }
.c-actions .btn.li svg { color: var(--li); }
.btn.ghost { border-color: transparent; background: none; padding: 0 6px; color: var(--text-3); }
.btn.ghost:hover { color: var(--text); background: var(--hover); }

.alerts { display: grid; gap: 8px; }
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.45; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.alert b { color: var(--text); }
.alert a { color: inherit; }
.alert.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.alert.bad b { color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert.warn b { color: var(--warn); }
.alert.good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.alert.good b { color: var(--good); }
.alert.info svg { color: var(--accent-text); }

.facts-grid {
  display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: clip;
}
.fact { padding: 10px 14px; border-bottom: 1px solid var(--border); min-width: 0; }
.fact:nth-child(odd) { border-right: 1px solid var(--border); }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact .k { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.fact .v { font-weight: 550; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fact .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.fact .sdot.new { background: var(--accent); }
.fact .sdot.open { background: #2f9bd8; }
.fact .sdot.prog { background: var(--warn); }
.fact .sdot.attempt { background: #d4730d; }
.tz { font-size: 11.5px; font-weight: 500; color: var(--warn); }
.tz.good { color: var(--good); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.stat .v { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.stat .k { font-size: 11.5px; color: var(--text-2); }
.stat .s { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.good .v { color: var(--good); }
.conv { margin-top: 8px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.conv svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: 2px; }

.reach { display: grid; gap: 2px; }
.reach .line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; min-height: 30px; }
.reach .line > svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.reach .line.muted { color: var(--text-3); }

.row-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.synced svg { width: 13px; height: 13px; }
.whyhud { margin: 0; white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--text-2); padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.panel-body h3 .badge { margin-left: 6px; vertical-align: 1px; }

.timeline { display: grid; gap: 0; }
.ev { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.ev:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--border); }
.ev .ic { flex: none; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--text-2); }
.ev .ic svg { width: 14px; height: 14px; }
.ev.meeting .ic { background: var(--accent-soft); color: var(--accent-text); }
.ev.call .ic { background: var(--good-soft); color: var(--good); }
.ev .t { font-weight: 550; font-size: 13.5px; }
.ev .b { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ev .m { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.play-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.play-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer;
}
.play-chip:hover { background: var(--hover); }
.play-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.play-chip .sw { width: 8px; height: 8px; border-radius: 3px; }

.acct { display: flex; gap: 12px; align-items: center; }
.acct .n { font-weight: 600; }
.acct .t { font-size: 12px; color: var(--text-3); }
.past-deals { display: grid; gap: 4px; margin-top: 10px; }
.past-deals a { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-2); text-decoration: none; }
.past-deals a:hover { color: var(--accent-text); }
.past-deals svg { width: 13px; height: 13px; }

.row { cursor: pointer; }
.row.open-in-panel { box-shadow: inset 3px 0 0 var(--accent); }

@media (max-width: 560px) {
  .topbar { padding: 0 10px 0 12px; gap: 8px; }
  .topbar-right { gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar-right > * { flex: none; }
  #meAvatar { display: none; }
  .sdr-picker select { max-width: 84px; text-overflow: ellipsis; }
  .topbar-right form .btn { height: 30px; padding: 0 9px; font-size: 13px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .fact:nth-child(odd) { border-right: 0; }
  .fact:nth-last-child(2) { border-bottom: 1px solid var(--border); }
}

/* ---------- not relevant ---------- */
.row.is-nr { opacity: .6; }
.row.is-nr:hover, .row.is-nr.focused, .row.is-nr.open-in-panel { opacity: 1; }
.ilink.nr-btn:hover, .ilink.nr-btn.on { color: var(--bad); }
.alert.bad svg { color: var(--bad); }

.nr-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.nr-dialog::backdrop { background: rgba(10, 10, 20, .35); }
.nr-dialog form { padding: 20px; display: grid; gap: 12px; }
.nr-dialog h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.nr-dialog p { margin: 0; }
.nr-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nr-reason {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; font-size: 13px;
}
.nr-reason:hover { background: var(--hover); }
.nr-reason:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.nr-reason input { accent-color: var(--bad); margin: 0; }
.nr-dialog textarea {
  width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: 13px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text);
}
.nr-dialog textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.nr-foot { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 480px) { .nr-reasons { grid-template-columns: 1fr; } }

/* ---------- pace & gamification ---------- */
.ring .track { fill: none; stroke: var(--border); }
.ring .fill { fill: none; stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.ring.full .fill { stroke: var(--good); }

.goal-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.goal-pill:hover { background: var(--hover); }
.goal-pill .g { color: var(--text-2); }
.goal-pill .g b { color: var(--text); }
.goal-pill .streak, .goal-pill .pts { font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-pill .pts { color: var(--accent-text); }

.myday-btn {
  display: flex; gap: 10px; align-items: center; width: calc(100% - 20px); margin: 0 10px 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.myday-btn:hover { background: var(--hover); }
.myday-btn.active { background: var(--accent-soft); border-color: transparent; }
.myday-btn .name { font-weight: 600; font-size: 13.5px; }
.myday-btn .dates { font-size: 12px; color: var(--text-3); }
.ring-sm { display: inline-flex; }
.play .dates .left { color: var(--warn); font-weight: 550; }
.play .dates .clear { color: var(--good); font-weight: 550; }

.kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1040px; }
.kpi .sub { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

.day-head h1 { margin: 4px 0 6px; font-size: 26px; letter-spacing: -.02em; }
.day-head p { margin: 0; }
.day-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-top: 22px; }
.goal-card {
  padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: grid; gap: 6px; align-content: start;
}
.goal-card .l { font-size: 12px; color: var(--text-3); font-weight: 500; }
.goal-card .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.goal-card .v small { font-size: 14px; font-weight: 500; color: var(--text-3); }
.goal-card .bar, .mini .bar { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; display: block; }
.goal-card .bar i, .mini .bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.goal-card .bar.good i, .mini .bar.good i { background: var(--good); }
.goal-card.big { grid-template-columns: auto 1fr; align-items: center; gap: 18px; }
.ring-wrap { position: relative; width: 112px; height: 112px; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-size: 28px; letter-spacing: -.02em; line-height: 1; }
.ring-label span { font-size: 12px; color: var(--text-3); }

.day-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.pace-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pace-table th { text-align: left; font-size: 11.5px; font-weight: 550; color: var(--text-3); padding: 0 8px 8px; }
.pace-table td { padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
.pace-table tbody tr { cursor: pointer; }
.pace-table tbody tr:hover td { background: var(--hover); }
.pace-table .num { text-align: right; font-variant-numeric: tabular-nums; width: 48px; }
.pace-table .go { text-align: right; width: 90px; }
.pace-table .pn { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pace-table .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.mini { display: grid; gap: 5px; min-width: 90px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.mini b { color: var(--text); }

.lb { display: grid; gap: 2px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; font-size: 13.5px; }
.lb-row.me { background: var(--accent-soft); }
.lb-row .rank { width: 22px; text-align: center; font-weight: 600; color: var(--text-3); }
.lb-row .pts { font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.badges-earned { display: grid; gap: 8px; }
.earned { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.earned .e { font-size: 20px; }
.earned b { display: block; font-size: 13px; }

.seq-new { display: block; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--accent-text); text-decoration: none; font-size: 13px; font-weight: 550; }
.seq-new:hover { background: var(--hover); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day-grid { grid-template-columns: 1fr 1fr; }
  .day-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .goal-pill .g, .goal-pill .pts { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-grid { grid-template-columns: 1fr; }
  .pace-table th:nth-child(4), .pace-table td:nth-child(4) { display: none; }
}

/* ---------- admin: campaigns ---------- */
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0 12px; }
.admin-bar .search.grow { flex: 1 1 260px; max-width: 420px; }
#adminShow button { display: inline-flex; gap: 6px; }
.camps { padding: 6px; display: grid; gap: 2px; }
.camp { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.camp:hover { background: var(--hover); }
.camp .sw-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.camp .cn { display: block; font-weight: 600; }
.camp .cm { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.camp:not(.on) .cn { color: var(--text-2); font-weight: 500; }
.camp .when { font-size: 11px; padding: 1px 6px; }

/* iOS-style switch on a plain checkbox */
input.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 34px; height: 20px; margin: 0;
  border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background .15s;
}
input.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(14px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.admin-save {
  position: sticky; bottom: 16px; margin-top: 14px; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.admin-save > span { margin-right: auto; font-size: 13px; color: var(--text-2); }
.admin-save.show { border-color: var(--accent); box-shadow: var(--shadow-lg); }

/* ---------- team analytics ---------- */
/* Chart series: reference categorical slots 1-2, stepped per theme. */
:root { --series-1: #2a78d6; --series-2: #eb6834; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --series-1: #3987e5; --series-2: #d95926; }
}
:root[data-theme="dark"] { --series-1: #3987e5; --series-2: #d95926; }

.an-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.an-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 22px 0 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-h h3 { margin: 0; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend i.s1 { background: var(--series-1); }
.legend i.s2 { background: var(--series-2); }

.team-chart { width: 100%; height: 220px; display: block; overflow: visible; }
.team-chart .grid { stroke: var(--border); stroke-width: 1; }
.team-chart .ax { fill: var(--text-3); font-size: 10.5px; }
.team-chart .s1 { fill: var(--series-1); }
.team-chart .s2 { fill: var(--series-2); }
.team-chart .hit { fill: transparent; }
.team-chart .bar-g:hover .hit { fill: var(--hover); }

.table-scroll { overflow-x: auto; }
.an-table td, .an-table th { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.an-table .mini { min-width: 64px; }
.an-table .pn { gap: 10px; }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.matrix td .mini { min-width: 70px; }
.matrix tbody tr { cursor: default; }

.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(0, 1fr) 1.2fr 24px; align-items: center; gap: 10px; font-size: 13px; }
.hb .hl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .ht { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.hb .ht i { display: block; height: 100%; border-radius: 4px; background: var(--series-1); }
.hb b { text-align: right; font-variant-numeric: tabular-nums; }

.viz-tip {
  position: fixed; z-index: 90; pointer-events: none; padding: 8px 10px; border-radius: 8px; font-size: 12.5px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.viz-tip b { display: block; margin-bottom: 2px; }
.viz-tip div { color: var(--text-2); }

@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .an-kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- outcomes ---------- */
.badge.win { background: var(--good); color: #fff; }
:root[data-theme="dark"] .badge.win { color: #0f0f13; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.win { color: #0f0f13; } }
.kpi.outcome .v small { margin-left: 6px; }
.lb-row .mtg { color: var(--good); font-weight: 650; }
.an-kpis.outcomes { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: -4px; }
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1180px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-kpis.outcomes { grid-template-columns: 1fr 1fr; } }

/* ---------- morning Slack DM preview ---------- */
.digest-card { margin-top: 24px; }
.access-card { margin-top: 24px; }
.access-intro { margin: 0 0 14px; }
.access-add { display: flex; gap: 8px; margin-bottom: 16px; }
.access-field {
  display: flex; align-items: center; flex: 1 1 auto; max-width: 360px; min-width: 0; height: 32px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); overflow: hidden;
}
.access-field:focus-within { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.access-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; padding: 0 10px; background: transparent; color: var(--text); }
.access-field input::placeholder { color: var(--text-3); }
.access-field .sfx { padding: 0 10px; height: 100%; display: grid; place-items: center; color: var(--text-3); background: var(--hover); border-left: 1px solid var(--border); font-size: 13px; }
.access-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; min-height: 30px; }
.access-search { max-width: 200px; height: 30px; }
.access-list { display: grid; border-top: 1px solid var(--border); }
.access-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 148px; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.access-row:hover { background: var(--hover); }
.access-row.asking { background: var(--bad-soft); }
.access-row.asking .st { visibility: hidden; }
.access-row .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.access-row .em { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-row .act { display: flex; justify-content: flex-end; }
.access-x { opacity: 0; transition: opacity .12s; }
.access-row:hover .access-x, .access-x:focus-visible { opacity: 1; }
@media (hover: none) { .access-x { opacity: 1; } }
.access-lock { font-size: 12px; color: var(--text-3); padding-right: 6px; }
.access-confirm { display: flex; gap: 6px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(.95); }
.access-empty { padding: 14px 4px; }
.access-foot { margin-top: 10px; }
@media (max-width: 640px) {
  .access-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .access-row .st { grid-column: 2; grid-row: 2; }
  .access-row .act { grid-column: 3; grid-row: 1 / span 2; }
  .access-add { flex-wrap: wrap; }
  .access-tools { flex-wrap: wrap; }
  .access-search { max-width: none; flex: 1 1 100%; order: -1; }
  .access-field { max-width: none; }
}
.digest-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.slack-msg {
  display: flex; gap: 10px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); font-family: -apple-system, "Segoe UI", Lato, sans-serif; font-size: 14.5px; line-height: 1.5;
}
.slack-av img { width: 36px; height: 36px; border-radius: 6px; display: block; }
.slack-who b { font-weight: 800; }
.slack-body { margin-top: 2px; color: var(--text); }
.slack-body a { color: #1264a3; }
:root[data-theme="dark"] .slack-body a { color: #4ea6ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slack-body a { color: #4ea6ff; } }
.digest-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }

/* ---------- plays / signals switch ---------- */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--hover); border: 1px solid var(--border); }
.mode-switch button {
  height: 30px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.mode-switch button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.mode-switch .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); position: relative; }
.mode-switch .pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--bad); opacity: 0; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mode-switch .pulse::after { animation: none; } }

/* ---------- signals rail ---------- */
.play.sig { grid-template-columns: 22px minmax(0, 1fr) auto; }
.logo-tile.xs { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; margin-top: 1px; }
.logo-tile.xs img { padding: 3px; }
.play .in-hs { display: inline-flex; vertical-align: -2px; color: #ff7a59; }
.play .in-hs svg { width: 13px; height: 13px; }
.imp { font-weight: 600; }
.imp.bad { color: var(--bad); }
.imp.warn { color: var(--warn); }
.imp.deg { color: #a8860f; }
:root[data-theme="dark"] .imp.deg { color: #e3c25a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .imp.deg { color: #e3c25a; } }
.ongoing { color: var(--bad); font-weight: 600; }
.ongoing::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 4px; vertical-align: 1px; }
.empty-art.sig { background: var(--bad-soft); color: var(--bad); }
.empty-state a { color: var(--accent-text); }

/* ---------- signal header ---------- */
.when.imp-bad { background: var(--bad-soft); color: var(--bad); }
.when.imp-warn { background: var(--warn-soft); color: var(--warn); }
.when.imp-deg { background: var(--warn-soft); color: #a8860f; }
.play-meta a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.signal-brief { margin-top: 16px; max-width: 860px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 6px; }
.brief-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 10px 6px; }
.brief-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.brief-head svg { width: 15px; height: 15px; color: var(--bad); }
.incident { display: flex; gap: 12px; padding: 10px; border-radius: 9px; color: inherit; text-decoration: none; }
.incident:hover { background: var(--hover); }
.incident > .imp { flex: none; width: 104px; font-size: 12.5px; padding-top: 1px; }
.incident .it { display: block; font-weight: 550; }
.incident .iw { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.incident .grow { min-width: 0; }
.incident .is { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.signal-brief .link-btn { margin: 2px 10px 6px; }
.kpi .v.sm { font-size: 17px; padding-top: 5px; }

/* ---------- signal leads ---------- */
.who .n .badge { margin-left: 4px; vertical-align: 1px; font-size: 11px; height: 18px; }
.row.is-theirs { opacity: .55; }
.row.is-theirs:hover { opacity: .8; }
.row input:disabled { cursor: not-allowed; }
@media (max-width: 640px) {
  .incident { flex-direction: column; gap: 2px; }
  .incident > .imp { width: auto; }
}

/* ---------- signal sources ---------- */
.src-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 2px 8px; }
.src-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; cursor: pointer; font-size: 12px; color: var(--text-2);
}
.src-chip svg { width: 12px; height: 12px; }
.src-chip .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.src-chip:hover:not(:disabled) { background: var(--hover); }
.src-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.src-chip:disabled { opacity: .45; cursor: help; }
.src-icons { display: flex; gap: 5px; margin-top: 4px; color: var(--text-3); }
.src-icons svg { width: 12px; height: 12px; display: block; }
.imp.soc { color: var(--accent-text); }
.when.imp-soc { background: var(--accent-soft); color: var(--accent-text); }
.brief-sub { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 12px 10px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.mention { display: flex; gap: 12px; padding: 10px; border-radius: 9px; }
.mention:hover { background: var(--hover); }
.mention .msrc { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--hover); color: var(--text-2); }
.mention .msrc svg { width: 14px; height: 14px; }
.msrc.s-bluesky { color: #1185fe; }
.msrc.s-hn { color: #ff6600; }
.msrc.s-linkedin { color: #0a66c2; }
.mention .grow { min-width: 0; }
.mention .mh { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mention .ma { font-weight: 600; color: var(--text); text-decoration: none; flex: none; }
.mention .ma:hover { text-decoration: underline; }
.mention .mhl { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention .mt { display: block; margin-top: 3px; color: var(--text); text-decoration: none; font-weight: 550; }
.mention .mt:hover { text-decoration: underline; }
.mention .mt .badge { vertical-align: 1px; margin-right: 2px; }
.mention .ms { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--text-2); margin-top: 4px; white-space: pre-line; }
.mention .iw { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.mention .iw a { color: inherit; }
.incident > .imp.soc { display: inline-flex; align-items: center; gap: 5px; }
.incident > .imp.soc svg { width: 13px; height: 13px; }

/* ---------- signal score ---------- */
.sig-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sig-n { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.score-pill {
  min-width: 30px; height: 22px; padding: 0 7px; border-radius: 7px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--hover); color: var(--text-2);
}
.score-pill.hot { background: var(--bad); color: #fff; }
.score-pill.warm { background: var(--warn-soft); color: var(--warn); }
.tier-chips { display: flex; gap: 4px; padding: 0 2px 8px; }
.tier-chip {
  height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
  cursor: pointer; font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px;
}
.tier-chip .n { color: var(--text-3); font-variant-numeric: tabular-nums; }
.tier-chip.hot::before, .tier-chip.warm::before, .tier-chip.cold::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.tier-chip.hot::before { background: var(--bad); }
.tier-chip.warm::before { background: var(--warn); }
.tier-chip.cold::before { background: var(--text-3); }
.tier-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.score-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 12px 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.score-total { display: grid; align-content: start; justify-items: start; gap: 2px; }
.score-num { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-card.hot .score-num { color: var(--bad); }
.score-card.warm .score-num { color: var(--warn); }
.score-tier { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.score-card.hot .score-tier { color: var(--bad); }
.score-card.warm .score-tier { color: var(--warn); }
.score-card.cold .score-tier { color: var(--text-3); }
.score-parts { display: grid; gap: 6px; }
.score-part { display: grid; grid-template-columns: 104px minmax(60px, 1fr) 46px; gap: 2px 10px; align-items: center; font-size: 12.5px; }
.sp-l { color: var(--text-2); font-weight: 550; }
.sp-bar { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.sp-bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.sp-v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.sp-v small { color: var(--text-3); font-weight: 500; }
.sp-why { grid-column: 2 / 4; font-size: 11.5px; color: var(--text-3); margin-top: -1px; }
@media (max-width: 640px) {
  .score-card { grid-template-columns: 1fr; gap: 10px; }
  .score-total { grid-auto-flow: column; align-items: baseline; justify-content: start; gap: 10px; }
}
.scoring-card { margin-top: 24px; }
.weights { display: grid; gap: 2px; }
.weights.tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.weight { display: grid; grid-template-columns: minmax(0, 1fr) 72px 44px; gap: 10px; align-items: center; padding: 6px 4px; }
.weight .wl { font-weight: 600; font-size: 13px; }
.weight .wh { display: block; font-weight: 400; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.weight input { height: 30px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }
.weight input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.weight .wp { font-size: 12px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.tiers .weight { grid-template-columns: minmax(0, 1fr) 72px 0; }

/* ---------- consumption ---------- */
.usage-card { margin-top: 24px; }
.usage-card .card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ukpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.uchart { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding: 6px 0 0; border-bottom: 1px solid var(--border); }
.ubar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.ubar i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--accent); }
.ubar:hover i { background: var(--accent-hover); }
.uchart-x { display: flex; justify-content: space-between; margin: 4px 0 14px; }
.utable { display: grid; border-top: 1px solid var(--border); }
.urow {
  display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px 80px; gap: 12px; align-items: center;
  padding: 10px 6px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; color: inherit;
}
.urow:hover, .urow.open { background: var(--hover); }
.uname { display: grid; gap: 1px; min-width: 0; }
.uname .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucalls, .ucost { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.ucalls small { font-weight: 500; color: var(--text-3); }
.uamt { text-align: right; }
.uops { padding: 4px 6px 8px 18px; border-bottom: 1px solid var(--border); background: var(--hover); }
.uop { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px 80px; gap: 12px; padding: 3px 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.uop > span:not(.uopn) { text-align: right; }
.uopn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upeople { display: grid; gap: 2px; }
.uperson { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 13px; }
.uperson b { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .ukpis { grid-template-columns: 1fr; }
  .urow, .uop { grid-template-columns: minmax(0, 1fr) 70px 64px; }
  .urow .uamt, .uop > span:nth-child(3) { display: none; }
}
