/* Atlas 0.1 — premium operations console
   Surface: Operate | Dials: V4 / M2 / D7 */

:root {
  --ink: #101311;
  --ink-soft: #313733;
  --rail: #171b18;
  --rail-soft: #222823;
  --canvas: #f1f0ea;
  --paper: #fbfaf6;
  --paper-strong: #ffffff;
  --line: #d7d7cf;
  --line-strong: #bfc1b8;
  --muted: #737970;
  --muted-light: #a8ada6;
  --signal: #315ee7;
  --signal-soft: #e8edff;
  --moss: #3f7354;
  --moss-soft: #e8f1ea;
  --amber: #a96819;
  --amber-soft: #f8eddd;
  --critical: #a9443d;
  --critical-soft: #f7e7e4;
  --shadow-xs: 0 1px 2px rgba(16, 19, 17, .06);
  --shadow-sm: 0 6px 18px rgba(16, 19, 17, .07);
  --shadow-md: 0 18px 48px rgba(16, 19, 17, .11);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --rail-width: 232px;
  --topbar-height: 74px;
  --content-max: 1440px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Iowan Old Style, Baskerville, Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(49, 94, 231, .28);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.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;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--signal);
  border-radius: var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.app-shell { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #f6f7f3;
  background: var(--rail);
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--signal);
  border-radius: 11px 11px 11px 3px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-family: var(--font-serif); font-size: 20px; letter-spacing: -.02em; }
.brand-copy span { margin-top: 4px; color: #89918a; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  color: #aeb5ae;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.is-active { color: white; background: #292f2a; box-shadow: inset 3px 0 0 var(--signal); }
.nav-icon { color: #8b948c; font-size: 17px; text-align: center; }
.nav-item.is-active .nav-icon { color: #8da7ff; }
.nav-count {
  min-width: 22px;
  padding: 1px 6px;
  color: #cfd7d0;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
}
.rail-spacer { flex: 1; }
.system-state {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  padding: 13px 10px;
  color: #c5cbc5;
  border-top: 1px solid rgba(255,255,255,.08);
}
.state-dot { width: 8px; height: 8px; margin-top: 5px; background: var(--amber); border: 2px solid #5a4024; border-radius: 50%; }
.system-state div { display: flex; flex-direction: column; }
.system-state strong { font-size: 11px; font-weight: 650; }
.system-state span { margin-top: 2px; color: #818982; font-size: 10px; }
.rail-action {
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  color: #8f9790;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.rail-action:hover { color: white; background: rgba(255,255,255,.05); }

.main-column { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  background: rgba(241,240,234,.94);
  border-bottom: 1px solid rgba(191,193,184,.72);
  backdrop-filter: blur(12px);
}
.mobile-menu { display: none; }
.topbar-context { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-context strong { font-size: 17px; letter-spacing: -.02em; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 12px; }
.quiet-button, .text-button, .back-button {
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.quiet-button:hover, .text-button:hover, .back-button:hover { color: var(--signal); }
.owner-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}
.workspace { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 32px 34px 56px; }
.screen { display: none; }
.screen.is-active { display: block; animation: screen-in .18s ease-out; }
@keyframes screen-in { from { opacity: .55; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.screen-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.screen-heading--row { align-items: center; }
.kicker { margin: 0 0 5px; color: var(--signal); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(29px, 3vw, 43px); line-height: 1.05; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 17px; letter-spacing: -.025em; }
h3 { letter-spacing: -.025em; }
.screen-intro { max-width: 410px; margin-bottom: 2px; color: var(--muted); font-size: 13px; }

.critical-banner {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  margin-bottom: 18px;
  padding: 14px 17px;
  background: var(--critical-soft);
  border: 1px solid #e8c8c3;
  border-left: 4px solid var(--critical);
  border-radius: var(--radius-md);
}
.critical-banner.is-clear { background: var(--moss-soft); border-color: #cadfce; border-left-color: var(--moss); }
.critical-icon { width: 30px; height: 30px; display: grid; place-items: center; color: white; background: var(--critical); border-radius: 50%; font-size: 14px; font-weight: 800; }
.critical-banner.is-clear .critical-icon { background: var(--moss); }
.critical-banner strong { font-size: 13px; }
.critical-banner p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; }
.critical-banner button { padding: 8px 11px; color: var(--critical); background: rgba(255,255,255,.48); border: 1px solid rgba(169,68,61,.2); border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
.metric { position: relative; min-height: 126px; padding: 19px 21px; }
.metric + .metric::before { content: ""; position: absolute; inset: 18px auto 18px 0; width: 1px; background: var(--line); }
.metric span { display: block; color: var(--muted); font-size: 11px; font-weight: 650; }
.metric strong { display: block; margin: 7px 0 1px; font-size: 35px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted-light); font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(285px, .75fr); gap: 18px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.panel-heading { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-heading > div { display: flex; align-items: center; gap: 10px; }
.panel-index { color: var(--muted-light); font-family: var(--font-serif); font-size: 11px; }
.text-button { font-size: 11px; font-weight: 650; }
.pipeline-panel { min-width: 0; grid-row: span 1; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(80px, 1fr)); padding: 23px 18px 26px; overflow-x: auto; }
.pipeline-step { position: relative; min-width: 90px; padding-right: 18px; }
.pipeline-step:not(:last-child)::after { content: ""; position: absolute; top: 15px; right: 3px; width: 16px; height: 1px; background: var(--line-strong); }
.pipeline-step span { display: block; color: var(--muted); font-size: 10px; }
.pipeline-step strong { display: block; margin-top: 7px; font-size: 27px; letter-spacing: -.04em; }
.pipeline-bar { width: 100%; height: 4px; margin-top: 12px; overflow: hidden; background: #e3e3dc; border-radius: 99px; }
.pipeline-bar i { display: block; height: 100%; background: var(--signal); border-radius: inherit; }
.priority-panel { overflow: hidden; }
.priority-body { min-height: 170px; padding: 22px 20px; background: linear-gradient(160deg, #fbfaf6 0%, #ecece5 100%); }
.priority-label { display: inline-flex; padding: 4px 7px; color: var(--critical); background: var(--critical-soft); border-radius: 5px; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.priority-body h3 { max-width: 310px; margin: 16px 0 9px; font-size: 21px; line-height: 1.15; }
.priority-body p { max-width: 330px; margin-bottom: 0; color: var(--muted); font-size: 12px; }
.recent-panel { grid-column: 1 / -1; }
.data-freshness { color: var(--muted-light); font-size: 10px; }
.compact-list { min-height: 90px; }
.compact-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(110px, .8fr) 120px 100px 22px; align-items: center; gap: 14px; min-height: 62px; padding: 10px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.compact-row:last-child { border-bottom: 0; }
.compact-row:hover { background: #f6f5ef; }
.compact-row strong { display: block; font-size: 12px; }
.compact-row small { color: var(--muted); font-size: 10px; }
.row-arrow { color: var(--muted-light); }
.empty-inline { padding: 28px 18px; color: var(--muted); font-size: 12px; text-align: center; }

.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { padding: 7px 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; cursor: pointer; }
.filter-chip:hover { border-color: var(--line-strong); }
.filter-chip.is-active { color: white; background: var(--ink); border-color: var(--ink); }
.lead-table-wrap { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.lead-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lead-table th { height: 42px; padding: 0 16px; color: var(--muted); background: #e9e8e2; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.lead-table td { height: 70px; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lead-table tr:last-child td { border-bottom: 0; }
.lead-table tbody tr { cursor: pointer; transition: background-color .12s ease; }
.lead-table tbody tr:hover { background: #f5f4ee; }
.contact-cell { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 11px; }
.contact-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: #e4e4dc; border-radius: 50%; font-size: 11px; font-weight: 800; }
.contact-copy { min-width: 0; }
.contact-copy strong, .contact-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-copy strong { font-size: 12px; }
.contact-copy span { color: var(--muted); font-size: 10px; }
.source-cell strong, .source-cell span { display: block; }
.source-cell strong { font-size: 11px; font-weight: 650; }
.source-cell span { color: var(--muted); font-size: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: var(--ink-soft); background: #e9e9e2; border-radius: 99px; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.status-pill::before { content: ""; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; }
.status-pill--new { color: #2245a9; background: var(--signal-soft); }
.status-pill--new::before { background: var(--signal); }
.status-pill--paid, .status-pill--completed { color: #2e6442; background: var(--moss-soft); }
.status-pill--paid::before, .status-pill--completed::before { background: var(--moss); }
.status-pill--lost, .status-pill--spam, .status-pill--refunded { color: #8d3833; background: var(--critical-soft); }
.status-pill--lost::before, .status-pill--spam::before, .status-pill--refunded::before { background: var(--critical); }
.duplicate-flag { display: inline-block; margin-left: 5px; padding: 2px 5px; color: var(--amber); background: var(--amber-soft); border-radius: 4px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.date-cell { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.row-button { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; cursor: pointer; }
.row-button:hover { color: var(--signal); background: var(--signal-soft); border-color: #cad5ff; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state > span { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 14px; color: var(--muted); background: #e9e8e2; border-radius: 50%; font-size: 19px; }
.empty-state h2 { margin-bottom: 6px; font-size: 17px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }

.back-button { margin: 0 0 20px; font-size: 11px; }
.detail-shell { min-height: 300px; }
.detail-header { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; margin-bottom: 22px; }
.detail-identity { display: flex; align-items: center; gap: 15px; }
.detail-avatar { width: 54px; height: 54px; display: grid; place-items: center; color: white; background: var(--ink); border-radius: 16px 16px 16px 5px; font-size: 17px; font-weight: 800; }
.detail-identity h1 { font-size: 32px; }
.detail-identity p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.detail-actions { display: flex; align-items: center; gap: 8px; }
.status-select { min-height: 38px; padding: 0 34px 0 11px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 8px; font-size: 11px; }
.primary-button { min-height: 40px; padding: 0 16px; color: white; background: var(--signal); border: 1px solid var(--signal); border-radius: 9px; font-size: 11px; font-weight: 750; cursor: pointer; box-shadow: var(--shadow-xs); }
.primary-button:hover { background: #244ed1; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr); gap: 18px; }
.detail-main, .detail-side { display: grid; align-content: start; gap: 18px; }
.info-panel { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); }
.info-panel h2 { margin-bottom: 17px; }
.lead-message { min-height: 92px; margin: 0; padding: 15px; color: var(--ink-soft); background: #f1f0ea; border-left: 3px solid var(--signal); font-size: 13px; white-space: pre-wrap; }
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.fact { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fact-wide { grid-column: 1 / -1; }
.fact:nth-child(odd) { padding-right: 18px; }
.fact span, .fact strong { display: block; }
.fact span { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.fact strong { overflow-wrap: anywhere; font-size: 11px; font-weight: 600; }
.timeline { position: relative; display: grid; gap: 16px; margin-left: 6px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 5px; width: 1px; background: var(--line); }
.timeline-event { position: relative; display: grid; grid-template-columns: 11px 1fr; gap: 11px; }
.timeline-dot { z-index: 1; width: 11px; height: 11px; margin-top: 4px; background: var(--paper); border: 3px solid var(--signal); border-radius: 50%; }
.timeline-copy strong, .timeline-copy span { display: block; }
.timeline-copy strong { font-size: 11px; }
.timeline-copy span { margin-top: 2px; color: var(--muted); font-size: 9px; }

.site-list { display: grid; gap: 14px; }
.site-card { display: grid; grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(120px, .65fr)) auto; align-items: center; gap: 18px; min-height: 112px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.site-identity { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 13px; }
.site-monogram { width: 42px; height: 42px; display: grid; place-items: center; color: var(--signal); background: var(--signal-soft); border-radius: 12px 12px 12px 4px; font-weight: 800; }
.site-identity strong, .site-identity span { display: block; }
.site-identity strong { font-size: 13px; }
.site-identity span { color: var(--muted); font-size: 10px; }
.site-signal span, .site-signal strong { display: block; }
.site-signal span { margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.site-signal strong { font-size: 11px; }
.signal-critical { color: var(--critical); }
.signal-warning { color: var(--amber); }
.signal-healthy { color: var(--moss); }
.site-chevron { color: var(--muted-light); }

.auth-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: #111512; }
.auth-gate[hidden] { display: none; }
.auth-gate::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; }
.auth-card { position: relative; width: min(100%, 410px); padding: 32px; color: var(--ink); background: var(--paper); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-lg); box-shadow: 0 30px 90px rgba(0,0,0,.36); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 38px; font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.auth-brand .brand-mark { width: 34px; height: 34px; font-size: 19px; }
.auth-card h1 { margin-bottom: 12px; font-size: 31px; }
.auth-card > p:not(.kicker):not(.form-error) { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.auth-card label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-card input { width: 100%; height: 44px; padding: 0 12px; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: 9px; }
.auth-card .primary-button { width: 100%; margin-top: 8px; }
.form-error { min-height: 18px; margin: 6px 0 0; color: var(--critical); font-size: 10px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 70; max-width: 340px; padding: 11px 14px; color: white; background: var(--ink); border-radius: 9px; box-shadow: var(--shadow-md); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .16s ease, transform .16s ease; }
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-error { background: var(--critical); }

@media (max-width: 1100px) {
  :root { --rail-width: 204px; }
  .workspace { padding-inline: 24px; }
  .topbar { padding-inline: 24px; }
  .metric { padding-inline: 15px; }
  .overview-grid { grid-template-columns: 1fr; }
  .recent-panel { grid-column: auto; }
  .site-card { grid-template-columns: minmax(200px, 1.3fr) repeat(2, minmax(100px, .6fr)) auto; }
  .site-card .site-signal:nth-of-type(3) { display: none; }
}

@media (max-width: 820px) {
  :root { --topbar-height: 64px; }
  .app-shell { display: block; }
  .main-column { min-width: 0; }
  .rail { width: min(280px, 84vw); transform: translateX(-102%); box-shadow: var(--shadow-md); transition: transform .18s ease; }
  body.menu-open .rail { transform: translateX(0); }
  body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 19; background: rgba(16,19,17,.42); }
  .mobile-menu { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
  .topbar { justify-content: flex-start; padding-inline: 16px; }
  .topbar-actions { margin-left: auto; }
  .topbar-actions time, .quiet-button { display: none; }
  .workspace { padding: 24px 16px 42px; }
  .screen-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 20px; }
  .screen-heading--row { align-items: flex-start; }
  .screen-intro { max-width: none; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3)::before { display: none; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .compact-row { grid-template-columns: minmax(145px, 1fr) 100px 22px; }
  .compact-row > :nth-child(2), .compact-row > :nth-child(4) { display: none; }
  .lead-table { min-width: 670px; }
  .lead-table-wrap { overflow-x: auto; }
  .detail-header { align-items: flex-start; grid-template-columns: 1fr; }
  .detail-actions { width: 100%; }
  .status-select, .detail-actions .primary-button { flex: 1; }
  .detail-grid { grid-template-columns: 1fr; }
  .site-card { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
  .site-card .site-signal { display: none; }
}

@media (max-width: 520px) {
  .topbar-context .eyebrow { display: none; }
  .owner-avatar { width: 31px; height: 31px; }
  h1 { font-size: 31px; }
  .critical-banner { grid-template-columns: 30px 1fr; }
  .critical-banner button { display: none; }
  .metric { min-height: 106px; padding: 15px; }
  .metric strong { font-size: 29px; }
  .metric small { display: none; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; padding-inline: 14px; overflow: visible; }
  .pipeline-step { min-width: 0; padding-right: 0; }
  .pipeline-step:not(:last-child)::after { display: none; }
  .pipeline-step span { white-space: normal; }
  .panel-heading > .text-button { flex: 0 0 auto; white-space: nowrap; }
  .panel-heading { padding-inline: 14px; }
  .filter-group { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .filter-chip { white-space: nowrap; }
  .detail-identity { align-items: flex-start; }
  .detail-avatar { width: 46px; height: 46px; }
  .detail-identity h1 { font-size: 26px; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact:nth-child(odd) { padding-right: 0; }
  .auth-card { padding: 24px; }
  .toast { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
