/* Linear tokens + Instantly density. SSR/CSP: no inline style="", no CDN fonts. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2");
}

:root {
  --font: Inter, "SF Pro Display", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #f7f8f8;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #08090a;
  --text-2: #2c2e33;
  --muted: #5a5f6b;
  --faint: #8a8f98;
  --border: rgba(0, 0, 0, 0.06);
  --border-2: rgba(0, 0, 0, 0.1);
  --hover: rgba(0, 0, 0, 0.04);
  --active: rgba(94, 106, 210, 0.1);
  --green: #27a644;
  --amber: #c98500;
  --red: #e53935;
  --accent: #5e6ad2;
  --accent-hover: #4b57c8;
  --sidebar: #f7f8f8;
  --sidebar-text: #5a5f6b;
  --radius: 6px;
  --sidebar-w: 240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08090a;
    --panel: #0f1011;
    --card: #191a1b;
    --text: #f7f8f8;
    --text-2: #d0d6e0;
    --muted: #8a8f98;
    --faint: #62666d;
    --border: rgba(255, 255, 255, 0.06);
    --border-2: rgba(255, 255, 255, 0.1);
    --hover: rgba(255, 255, 255, 0.05);
    --active: rgba(94, 106, 210, 0.18);
    --green: #27a644;
    --amber: #f59e0b;
    --red: #e53935;
    --accent: #5e6ad2;
    --accent-hover: #828fff;
    --sidebar: #0f1011;
    --sidebar-text: #8a8f98;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  font-feature-settings: "cv01", "ss03";
  font-variation-settings: "wght" 400;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text-2);
  letter-spacing: 0;
  padding-bottom: 56px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--mono); font-size: 12px; }

.ico { width: 16px; height: 16px; flex: none; display: block; }

.shell { min-height: 100vh; }
.sidebar {
  display: none;
  background: var(--sidebar);
  color: var(--sidebar-text);
  border-right: 1px solid var(--border-2);
}
.workspace { min-width: 0; background: var(--bg); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 8px 28px 48px; }

.sidebar > .mark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  color: var(--text);
  font-variation-settings: "wght" 510;
  font-size: 14px;
  letter-spacing: -0.012em;
}
.sidebar > .mark:hover { color: var(--text); }
.mark-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--accent);
  color: #f7f8f8;
  font-size: 9px;
  font-variation-settings: "wght" 590;
  letter-spacing: 0.04em;
  flex: none;
}
.mark-copy { color: var(--text); }

.sidenav { display: flex; flex-direction: column; gap: 1px; padding: 4px 12px 16px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-variation-settings: "wght" 510;
  line-height: 1.2;
}
.nav-item .nav-label { flex: 1; }
.nav-item .ico { opacity: 0.85; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.on {
  background: var(--active);
  color: var(--text);
}
.nav-item.on .ico { color: var(--accent); opacity: 1; }
.nav-sub {
  margin: 18px 10px 6px;
  font-size: 11px;
  font-variation-settings: "wght" 510;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.nav-item .badge { margin-left: 0; }

.side-foot {
  margin-top: auto;
  padding: 12px 12px 16px;
  border-top: 1px solid var(--border);
}
.sidebar .brandswitch { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.sidebar .brandswitch a {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  font-size: 11px;
  font-variation-settings: "wght" 510;
  color: var(--muted);
  margin: 0;
}
.sidebar .brandswitch a.on {
  background: var(--accent);
  color: #f7f8f8;
  border-color: var(--accent);
}
.sidebar .logout { font-size: 12px; color: var(--faint); }
.sidebar .logout:hover { color: var(--text); }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px 4px;
  min-height: 52px;
}
.pagetitle {
  margin: 0;
  font-size: 22px;
  font-variation-settings: "wght" 510;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--text);
}
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 10px;
  min-width: 220px;
  background: var(--hover);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  font-variation-settings: "wght" 400;
  cursor: pointer;
}
.search-pill .ico { width: 14px; height: 14px; }
.search-pill span { flex: 1; text-align: left; }
.search-pill kbd {
  margin-left: auto;
  background: var(--card);
  color: var(--faint);
}
.search-pill:hover { border-color: var(--border-2); color: var(--text-2); background: var(--card); }
.icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  font-size: 14px;
  font-variation-settings: "wght" 510;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { color: var(--text); background: var(--hover); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
  }
}

/* Login — Linear marketing black, not a white card on charcoal. */
.login-body {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(94, 106, 210, 0.2) 0%, transparent 60%),
    #08090a;
  color: #d0d6e0;
  font-feature-settings: "cv01", "ss03";
}
.login-wrap { width: min(100%, 380px); margin: 0; }
.login-g { width: 28px; height: 28px; font-size: 10px; border-radius: 6px; }
.login-wrap input[type=password],
.login-wrap input[type=submit] { width: 100%; }
.login-wrap input[type=password] {
  margin: 16px 0 12px;
  background: #0f1011;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7f8f8;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 6px;
}
.login-wrap input[type=submit] {
  padding: 10px 14px;
  font-size: 14px;
  font-variation-settings: "wght" 510;
  border-radius: 6px;
}
.login-err { color: #ff8b8b; font-size: 13px; margin: 0 0 8px; }

.card.login-card {
  background: #191a1b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d0d6e0;
  padding: 28px 24px;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.card.login-card h2 {
  font-size: 22px;
  font-variation-settings: "wght" 510;
  letter-spacing: -0.022em;
  text-transform: none;
  margin: 14px 0 4px;
  color: #f7f8f8;
}
.card.login-card .muted { color: #8a8f98; }

/* Instantly-style compact status, not a compiler dump. */
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--card);
  margin-bottom: 16px;
}
.callout.warn { border-color: rgba(201, 133, 0, 0.35); background: rgba(201, 133, 0, 0.08); }
.callout.bad { border-color: rgba(229, 57, 53, 0.35); background: rgba(229, 57, 53, 0.08); }
.callout-title { font-size: 14px; font-variation-settings: "wght" 510; color: var(--text); letter-spacing: -0.012em; }
.callout-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.callout-action {
  flex: none;
  font-size: 13px;
  font-variation-settings: "wght" 510;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: var(--card);
  color: var(--text);
}
.callout-action:hover { color: var(--text); background: var(--hover); }

.tiles {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 16px;
}
.tile {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 18px 20px 16px;
  box-shadow: none;
}
.tile:last-child { border-right: 0; }
.tile .num {
  font-size: 26px;
  font-variation-settings: "wght" 510;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--text);
}
.tile .lbl { font-size: 12px; color: var(--muted); margin-top: 6px; font-variation-settings: "wght" 400; }
.tile.warn .num { color: var(--amber); }
.tile.bad .num { color: var(--red); }
.tile.good .num { color: var(--green); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-variation-settings: "wght" 510;
  padding: 0 6px;
  margin-left: 6px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.card h2 {
  font-size: 13px;
  font-variation-settings: "wght" 510;
  letter-spacing: 0;
  margin: 0 0 12px;
  color: var(--muted);
}
.card.list { padding: 12px 0 0; }
.card.list > h2, .card.list > .precision-row, .card.list > .filters, .card.list > .kbdhint,
.card.list > form { padding-left: 18px; padding-right: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  color: var(--muted);
  font-variation-settings: "wght" 510;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.g { background: var(--green); }
.dot.y { background: var(--amber); }
.dot.r { background: var(--red); }

.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-variation-settings: "wght" 510;
  border: 1px solid var(--border-2);
}
.pill.on { color: var(--green); border-color: rgba(39, 166, 68, 0.4); }
.pill.off { color: var(--muted); }

.funnelbar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; min-width: 180px; background: var(--hover); }
.funnelbar .funnel-seg, .funnelbar div { height: 100%; }
.legend { font-size: 12px; margin-top: 6px; }

.hint { font-size: 13px; }
.hint-sm { font-size: 12px; }
.hint-xs { font-size: 11px; }
.mt { margin-top: 8px; }
.mb { margin-bottom: 10px; }
.ml { margin-left: 14px; }
.num-sm { width: 60px; }
.num-md { width: 70px; }
.score-in { width: 96px; }
.fail { color: var(--red); font-size: 12px; }
.unsigned, .gate-miss, .bounce-hot { color: var(--red); }
.kill-state.on { color: var(--red); }
.kill-state.off { color: var(--green); }
.muted { color: var(--muted); }

button, input[type=submit] {
  background: var(--accent);
  color: #f7f8f8;
  border: 0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  font-variation-settings: "wght" 510;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
button:hover, input[type=submit]:hover { background: var(--accent-hover); }
button.danger { background: var(--red); }
button.danger:hover { filter: brightness(1.05); }
button.ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
button.ghost:hover { background: var(--hover); }
button.big { font-size: 14px; padding: 8px 14px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
form.inline { display: inline; }

/* Superhuman/Linear inbox rows, not stacked admin cards. */
.leadcard {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 18px;
  margin: 0;
  background: transparent;
}
.leadcard:last-of-type { border-bottom: 0; }
.leadcard:hover { background: var(--hover); }
.leadcard .co { font-variation-settings: "wght" 510; font-size: 14px; letter-spacing: -0.012em; color: var(--text); }
.leadcard .meta { color: var(--muted); font-size: 12px; margin: 3px 0; }
.leadcard form { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.snippet {
  background: var(--bg);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

nav.tabs {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--panel);
  border-top: 1px solid var(--border-2);
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
nav.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px 2px 12px;
  font-size: 10px;
  font-variation-settings: "wght" 510;
  color: var(--muted);
}
nav.tabs a.on { color: var(--accent); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-h { font-size: 16px; font-variation-settings: "wght" 510; color: var(--text); margin-bottom: 8px; letter-spacing: -0.015em; }
.empty-b { font-size: 13px; max-width: 460px; margin: 0 auto 10px; line-height: 1.55; }
.empty-n {
  font-size: 12px;
  display: inline-block;
  margin-top: 6px;
  padding: 6px 12px;
  border: 1px dashed var(--border-2);
  border-radius: 6px;
}

.reasons { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.reason {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
}
.reason.pos { color: var(--green); border-color: rgba(39, 166, 68, 0.35); }
.reason.neg { color: var(--red); border-color: rgba(229, 57, 53, 0.35); }

.meter { font-variation-settings: "wght" 510; font-size: 13px; }
.meter.good { color: var(--green); }
.meter.warn { color: var(--amber); }
.meter.bad { color: var(--red); }

.setup li { list-style: none; font-size: 13px; padding: 5px 0; }
.setup ul { padding-left: 0; margin: 8px 0 0; }
.setup .done { color: var(--muted); }
.setup .todo { color: var(--text-2); }
.setup .blocker { color: var(--red); font-variation-settings: "wght" 510; }

.draft {
  background: var(--bg);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.draft textarea {
  width: 100%;
  min-height: 130px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  font-size: 13px;
}
.draft-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
  font-size: 12px;
}
.reply-links { margin: 4px 0; }
.sla { font-size: 12px; font-variation-settings: "wght" 510; }
.sla.ok { color: var(--muted); }
.sla.soon { color: var(--amber); }
.sla.late { color: var(--red); }

.leadcard.focused { outline: 2px solid var(--accent); outline-offset: -2px; }
.kbdhint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
kbd {
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
  font-family: var(--mono);
  background: var(--card);
}

@media (max-width: 700px) {
  th, td { font-size: 12px; padding: 6px 6px; }
  .tiles { flex-wrap: wrap; }
  .tile { flex: 1 1 45%; border-bottom: 1px solid var(--border); }
  .search-pill { min-width: 0; width: 32px; padding: 0; justify-content: center; }
  .search-pill span, .search-pill kbd { display: none; }
  table.stack thead { display: none; }
  table.stack tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
  }
  table.stack td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    padding: 3px 0;
    white-space: normal;
  }
  table.stack td::before { content: attr(data-l); color: var(--muted); font-size: 11px; }
  .kbdhint { display: none; }
  .toasts { left: 12px; right: 12px; max-width: none; }
}

.fleet { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-bottom: 14px; }
.fleet-hero {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: left;
  min-width: 100px;
}
.fleet-hero .num { font-size: 28px; font-variation-settings: "wght" 510; letter-spacing: -0.022em; color: var(--text); }
.fleet-hero .lbl { font-size: 11px; color: var(--muted); font-variation-settings: "wght" 510; letter-spacing: 0.04em; text-transform: uppercase; }
.fleet-chip { border: 1px solid var(--border-2); border-radius: 999px; padding: 5px 10px; font-size: 12px; align-self: center; font-variation-settings: "wght" 510; }
.fleet-chip .n { font-variation-settings: "wght" 590; }
.fleet-chip.good { color: var(--green); border-color: rgba(39, 166, 68, 0.4); }
.fleet-chip.warn { color: var(--amber); border-color: rgba(201, 133, 0, 0.45); }
.fleet-chip.bad { color: var(--red); border-color: rgba(229, 57, 53, 0.4); }
.pill.status-healthy { color: var(--green); border-color: rgba(39, 166, 68, 0.4); }
.pill.status-warming { color: var(--muted); }
.pill.status-throttled { color: var(--amber); border-color: rgba(201, 133, 0, 0.45); }
.pill.status-at_risk, .pill.status-blocked { color: var(--red); border-color: rgba(229, 57, 53, 0.4); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.health-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg);
}

.check {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: flex-start;
}
.check:last-child { border-bottom: 0; }
.check .mark { flex: none; width: 18px; text-align: center; }
.check.blocker .mark { color: var(--red); }
.check.todo .mark { color: var(--amber); }
.check.done .mark { color: var(--green); }
.check .fix { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.setup-counts { display: flex; gap: 8px; flex-wrap: wrap; }

.precision-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.leaddetail { margin: 6px 0; }
.leaddetail summary { font-size: 12px; cursor: pointer; }
.leaddetail pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  overflow-x: auto;
  max-height: 240px;
}
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; font-size: 13px; padding: 0 18px 12px; }
.ghost-link {
  padding: 5px 10px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  color: var(--text-2);
}

.kill {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: var(--card);
  margin-bottom: 16px;
}
.kill-title { font-size: 14px; font-variation-settings: "wght" 510; color: var(--text); margin-bottom: 2px; }
.kill.engaged { border-color: rgba(229, 57, 53, 0.4); background: rgba(229, 57, 53, 0.08); }
.feed { font-size: 13px; }
.feed li { margin-bottom: 8px; list-style: none; }
.feed ul { padding-left: 0; margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 8px 12px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
time[data-ts] { cursor: help; }

.toasts {
  position: fixed; top: 14px; right: 14px; left: auto; z-index: 60;
  display: flex; flex-direction: column; gap: 8px; max-width: min(92vw, 380px);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border-2);
  border-left: 2px solid var(--muted);
  border-radius: 8px;
  padding: 10px 12px; font-size: 13px;
  box-shadow: 0 16px 40px rgba(8, 9, 10, 0.18);
  animation: toast-in 0.14s ease-out;
}
.toast.good { border-left-color: var(--green); }
.toast.warn { border-left-color: var(--amber); }
.toast.bad { border-left-color: var(--red); }
.toast.leaving { opacity: 0; transform: translateX(12px); transition: opacity 0.2s, transform 0.2s; }
.toast-msg { flex: 1; }
.toast .link, button.link {
  background: none; border: 0; color: var(--accent); padding: 0 4px;
  font-size: 13px; font-variation-settings: "wght" 510; cursor: pointer; text-decoration: none;
}
.toast-x { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.cmdk, .help {
  position: fixed; inset: 0;
  background: rgba(8, 9, 10, 0.5);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.cmdk.on, .help.on { display: flex; }
.cmdk-box, .help-box {
  width: min(92vw, 560px);
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.help-box { width: min(92vw, 420px); padding: 18px 20px; overflow: visible; }
.cmdk-input {
  width: 100%; border: 0; border-bottom: 1px solid var(--border);
  border-radius: 0; background: var(--card); color: var(--text);
  font-size: 16px; padding: 14px 16px; font-variation-settings: "wght" 400;
}
.cmdk-input:focus { outline: none; }
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.cmdk-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 6px; font-size: 13px; cursor: pointer;
  font-variation-settings: "wght" 510;
}
.cmdk-item.sel { background: var(--accent); color: #f7f8f8; }
.cmdk-item.sel kbd { border-color: rgba(255, 255, 255, 0.45); color: #fff; background: transparent; }
.cmdk-item kbd { flex: none; }
.help-box h2 { margin: 0 0 12px; font-size: 15px; color: var(--text); font-variation-settings: "wght" 510; }
.help-box dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.help-box dt { margin: 0; }
.help-box dd { margin: 0; color: var(--muted); }
.help-box .hint-sm { margin-top: 14px; }

.spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 28px; vertical-align: middle; }
.spark i { display: block; width: 7px; height: 8%; min-height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.spark i.has-bounce { background: var(--red); }
.fleet-spark { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12px; }

.leadcard.removing { opacity: 0; transform: translateY(-4px); transition: opacity 0.16s, transform 0.16s; }
@media (prefers-reduced-motion: reduce) {
  .toast, .leadcard.removing, .toast.leaving { animation: none; transition: none; }
  .cmdk, .help { backdrop-filter: none; }
}

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  nav.tabs { display: none; }
}

button.search-pill {
  background: var(--hover);
  color: var(--muted);
  border: 1px solid var(--border-2);
  font-variation-settings: "wght" 400;
  padding: 0 10px;
}
button.search-pill:hover { background: var(--card); color: var(--text-2); }
button.icon-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-2);
  padding: 0;
}
button.icon-btn:hover { background: var(--hover); color: var(--text); }
