/* ═══════════════ SEO Audit Pro — Deep Purple Dream Theme ═══════════════ */

:root {
  --bg-deep: #04030f;
  --bg-card: #0a0718;
  --bg-soft: #0f0b20;
  --purple-950: #120a2b;
  --purple-900: #1a1033;
  --purple-700: #2d1b5e;
  --purple-500: #6d28d9;
  --purple-400: #8b5cf6;
  --purple-300: #a78bfa;
  --purple-200: #c4b5fd;
  --text: #f5f3ff;
  --muted: #a194c7;
  --line: rgba(139, 92, 246, 0.16);
  --line-strong: rgba(139, 92, 246, 0.28);
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.09);
  --glass: rgba(15, 11, 32, 0.72);
  --glass-border: rgba(139, 92, 246, 0.2);
  --good: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --glow-purple: 0 0 40px rgba(139, 92, 246, 0.35), 0 0 80px rgba(109, 40, 217, 0.18);
  --glow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 1px var(--glass-border);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --radius: 22px;
  --radius-lg: 30px;
  --radius-sm: 16px;
  --info: #38bdf8;
  --neutral: #64748b;
  --touch-target: 44px;
  --mobile-nav-height: 76px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}

body[data-theme="light"] {
  --bg-deep: #f7f7fb;
  --bg-card: #ffffff;
  --bg-soft: #eef0f7;
  --purple-950: #ede9fe;
  --purple-900: #ddd6fe;
  --purple-700: #7c3aed;
  --purple-500: #6d28d9;
  --purple-400: #7c3aed;
  --purple-300: #5b21b6;
  --purple-200: #4c1d95;
  --text: #171327;
  --muted: #5b5870;
  --line: rgba(91, 33, 182, 0.16);
  --line-strong: rgba(91, 33, 182, 0.28);
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.95);
  --glass: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(91, 33, 182, 0.18);
  --glow-card: 0 10px 32px rgba(29, 23, 53, 0.08), 0 0 0 1px rgba(91, 33, 182, 0.08);
  --shadow: 0 24px 70px rgba(29, 23, 53, 0.16);
  background: linear-gradient(160deg, #f7f7fb 0%, #eef0f7 52%, #f9fafb 100%);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--purple-700); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-500); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    /* mesh gradient background */
    radial-gradient(ellipse 80% 60% at 15% 5%, rgba(109, 40, 217, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 70% at 85% 15%, rgba(139, 92, 246, 0.14), transparent 50%),
    radial-gradient(ellipse 40% 40% at 50% 80%, rgba(167, 139, 250, 0.08), transparent 45%),
    linear-gradient(160deg, #04030f 0%, #0a061a 40%, #0f0b20 70%, #0c0818 100%);
}
body.sheet-open { overflow: hidden; }
body.sidebar-open { overflow: hidden; }

/* ── Neon animated mesh behind hero ── */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 36%, rgba(139,92,246,.12), transparent 38%),
    radial-gradient(circle at 78% 22%, rgba(196,181,253,.09), transparent 32%);
  animation: meshFloat 12s ease-in-out infinite;
}
@keyframes meshFloat {
  0%, 100% { opacity: 0.8; transform: scale(1) translate(0, 0); }
  33% { opacity: 1; transform: scale(1.04) translate(8px, -12px); }
  66% { opacity: 0.75; transform: scale(0.97) translate(-6px, 8px); }
}

/* ── Typography ── */
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1 { font-size: clamp(42px, 6vw, 78px); line-height: 0.93; margin: 12px 0 18px; letter-spacing: -0.07em; }
.subtitle { max-width: 760px; color: #c4b5fd; font-size: 18px; line-height: 1.65; margin: 0; }

/* ── Skip Link ── */
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 60; transform: translateY(-140%);
  background: var(--purple-200); color: #0a061a; padding: 12px 16px; border-radius: 999px;
  font-weight: 900; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.skip-link:focus, .skip-link:focus-visible { transform: translateY(0); outline: 3px solid var(--purple-400); outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--purple-400); outline-offset: 3px; border-radius: 6px; }

.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;
}

/* ── App Shell ── */
.app-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ── */
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 24px;
  background: linear-gradient(180deg, rgba(10,7,24,.92), rgba(4,3,15,.94));
  border-right: 1px solid var(--line); backdrop-filter: blur(28px); z-index: 20;
  will-change: transform;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 30px; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 14px; color: white; font-size: 24px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-400));
  box-shadow: 0 0 30px rgba(139,92,246,.45), 0 8px 24px rgba(109,40,217,.35);
  animation: brandPulse 3s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(139,92,246,.45), 0 8px 24px rgba(109,40,217,.35); }
  50% { box-shadow: 0 0 50px rgba(139,92,246,.65), 0 12px 32px rgba(109,40,217,.5); }
}
.brand strong { display: block; font-size: 16px; background: linear-gradient(135deg, var(--purple-200), white); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }

.nav-links { display: grid; gap: 6px; }
.nav-links a {
  text-decoration: none; color: var(--muted); padding: 13px 14px; border-radius: 14px;
  min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: all .25s ease; position: relative;
}
.nav-links a::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; border-radius: 999px; background: var(--purple-400);
  transition: height .2s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: white; background: var(--card); border-color: var(--glass-border);
}
.nav-links a.active::before { height: 24px; }

.sidebar-card { margin-top: 28px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; contain: content; }
.sidebar-card::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent, rgba(139,92,246,.06)); pointer-events: none;
}
.sidebar-card span, .panel-label, .eyebrow { color: var(--purple-300); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 800; }
.sidebar-card strong { display: block; margin: 8px 0; font-size: 14px; }
.sidebar-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.mobile-menu { display: none; }
.bottom-nav { display: none; }
.mobile-topbar, .more-sheet, .sheet-backdrop, .mobile-record-list { display: none; }

.theme-toggle {
  position: fixed;
  right: 72px;
  top: 18px;
  z-index: 35;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  color: var(--text);
  background: var(--glass);
  box-shadow: var(--glow-card);
  cursor: pointer;
}

.mobile-icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  color: var(--text);
  background: var(--glass);
  box-shadow: var(--glow-card);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.mobile-topbar {
  position: fixed;
  inset: calc(env(safe-area-inset-top, 0px) + 8px) 10px auto;
  z-index: 42;
  min-height: 56px;
  border-radius: 18px;
  padding: 6px;
  border: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--glass) 88%, var(--bg-card));
  backdrop-filter: blur(24px);
  box-shadow: var(--glow-card);
  align-items: center;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
}

.mobile-brand {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}
.mobile-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-400));
  color: white;
  flex: 0 0 auto;
}
.mobile-brand strong,
.mobile-brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-brand strong { font-size: 14px; }
.mobile-brand small { color: var(--muted); font-size: 11px; margin-top: 1px; }
.mobile-top-actions { display: flex; gap: 6px; }
.mobile-notification-button { position: relative; }
#mobileNotificationBadge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  background: var(--bad);
  color: white;
  font-size: 10px;
  font-weight: 900;
}
#mobileNotificationBadge:empty { display: none; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 3, 15, 0.62);
  backdrop-filter: blur(10px);
}
.sheet-backdrop.show,
body.sidebar-open .sheet-backdrop { display: block; }
.more-sheet {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 75;
  max-height: min(80dvh, 620px);
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--bg-card) 88%, black);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
  transform: translateY(18px);
  opacity: 0;
}
.more-sheet.show {
  display: block;
  animation: sheetIn .2s ease forwards;
}
@keyframes sheetIn {
  to { transform: translateY(0); opacity: 1; }
}
.sheet-handle {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 4px auto 12px;
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.sheet-header h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: 0; }
.sheet-search-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 6px;
}
.sheet-search {
  width: 100%;
  margin-bottom: 14px;
}
.more-sheet-groups {
  display: grid;
  gap: 14px;
}
.more-group h3 {
  margin: 0 0 8px;
  color: var(--purple-300);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.more-group-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.more-sheet-link {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 800;
}
.more-sheet-link span { line-height: 1.2; }
.more-sheet-link span,
.more-sheet-link small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.more-sheet-link small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.more-sheet-link.active {
  color: var(--purple-200);
  border-color: var(--purple-400);
  background: rgba(139,92,246,.14);
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: start center;
  padding: 8vh 16px;
  background: rgba(4, 3, 15, 0.72);
  backdrop-filter: blur(16px);
}
.command-palette.show { display: grid; }
.command-box {
  width: min(720px, 100%);
  border-radius: 22px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  padding: 14px;
}
.command-box input { width: 100%; font-size: 16px; }
.command-results { display: grid; gap: 8px; margin-top: 12px; max-height: 55vh; overflow: auto; }
.command-result {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}
.command-result strong { display: block; }
.command-result small { color: var(--muted); }

/* ── Main Content ── */
.main { padding: 28px; min-width: 0; max-width: 100%; }
.section { scroll-margin-top: 28px; }

/* ── Hero ── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr); gap: 22px;
  align-items: stretch; min-height: 360px; padding: 34px;
  border-radius: var(--radius-lg); border: 1px solid var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    radial-gradient(circle at 85% 15%, rgba(139,92,246,.38), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(109,40,217,.2), transparent 40%);
  box-shadow: var(--glow-card), 0 0 100px rgba(139,92,246,.08);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto -100px -160px auto;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196,181,253,.1), transparent 70%);
  filter: blur(40px); animation: heroOrb 8s ease-in-out infinite;
}
@keyframes heroOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -20px) scale(1.1); }
}
.hero-copy { position: relative; z-index: 1; align-self: center; }
.hero-actions, .toolbar, .card-actions, .report-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-actions { margin-top: 26px; }

/* ── Buttons ── */
.button {
  border: 0; cursor: pointer; text-decoration: none; border-radius: 999px;
  padding: 12px 18px; min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; transition: all .2s ease;
  position: relative; overflow: hidden;
}
.button::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  transition: opacity .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:hover::after { opacity: 1; }
.button:active { transform: translateY(0); }
.button.primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-400));
  color: white; box-shadow: 0 8px 28px rgba(139,92,246,.4), 0 0 20px rgba(109,40,217,.15);
}
.button.primary:hover { box-shadow: 0 12px 36px rgba(139,92,246,.55), 0 0 30px rgba(109,40,217,.25); }
.button.ghost { color: var(--purple-200); background: rgba(139,92,246,.08); border: 1px solid var(--glass-border); }
.button.ghost:hover { background: rgba(139,92,246,.16); border-color: var(--purple-400); }
.button.light { color: #0a061a; background: var(--purple-200); font-weight: 800; }
.button.danger { color: white; background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); }
.button.tiny { padding: 8px 12px; font-size: 12px; min-height: 36px; }
.button.full { width: 100%; }

/* ── Glass Cards 2.0 ── */
.glass, .metric-card, .panel, .site-card, .lane-card, .opportunity-card, .source-card, .client-report, .ops-card, .agent-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: var(--glow-card);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.site-card, .lane-card, .opportunity-card, .source-card, .client-report, .ops-card, .agent-card,
.paperclip-grid article, .company-unit, .link-kpi, .link-card, .suggestion-card,
.activity-feed, .audit-progress, .audit-history, .hero-panel {
  contain: content;
}

.hero-panel { position: relative; z-index: 1; border-radius: 24px; padding: 24px; align-self: end; }
.hero-panel strong { display: block; font-size: 56px; margin: 12px 0; letter-spacing: -0.06em; background: linear-gradient(135deg, var(--purple-200), white); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-panel p { color: var(--muted); line-height: 1.6; }
.progress { height: 8px; background: rgba(139,92,246,.12); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple-500), var(--purple-300), var(--purple-200)); border-radius: inherit; transition: width .5s ease; box-shadow: 0 0 12px rgba(139,92,246,.4); }

/* ── Metrics ── */
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin: 22px 0; }
.metric-card { border-radius: var(--radius); padding: 20px; transition: transform .2s ease, box-shadow .2s ease; contain: content; }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--glow-purple), 0 4px 24px rgba(0,0,0,.3); }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { display: block; font-size: 36px; margin: 8px 0 4px; }
.metric-card small { color: var(--muted); }

/* ── Panels ── */
.panel { border-radius: var(--radius-lg); padding: 24px; margin-bottom: 22px; }
.main > .panel.section,
.charts-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 820px;
}
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(25px, 3vw, 38px); letter-spacing: -0.04em; margin: 6px 0 0; }
.section-sub { color: var(--muted); max-width: 840px; line-height: 1.6; margin: 8px 0 0; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.module-card {
  border-radius: var(--radius);
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-card);
  contain: content;
}
.module-card h3 { margin: 8px 0; font-size: 18px; }
.module-card p, .module-card li { color: var(--muted); line-height: 1.55; }
.module-card ul { margin: 12px 0 0; padding-left: 18px; }
.module-card .value { font-size: 34px; font-weight: 900; color: var(--text); letter-spacing: -0.04em; }
.module-card.critical { border-color: rgba(239,68,68,.35); }
.module-card.warning { border-color: rgba(245,158,11,.4); }
.module-card.good { border-color: rgba(16,185,129,.4); }
.module-card.info { border-color: rgba(56,189,248,.35); }

.audit-progress {
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.audit-history {
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 18px;
}
.audit-history h3 { margin: 0 0 12px; }
.evidence-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(4, minmax(70px, .45fr));
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.evidence-row small { color: var(--muted); }
.audit-progress-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.audit-progress-grid div { padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.audit-progress-grid span { display: block; color: var(--muted); font-size: 12px; }
.audit-progress-grid strong { font-size: 22px; }

/* ── Form Elements ── */
.search, .select, input, textarea {
  color: var(--text); background: rgba(139,92,246,.06); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; outline: none; min-height: 44px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search { min-width: min(360px, 100%); }
.select { min-width: 170px; }
textarea { min-height: 94px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 4px rgba(139,92,246,.12), 0 0 20px rgba(139,92,246,.08);
}

/* ── Sites ── */
.split-layout { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 20px; }
.site-form { border-radius: var(--radius); padding: 18px; align-self: start; }
.site-form h3 { margin: 0 0 12px; font-size: 18px; }
.site-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.form-note, .list-count { color: var(--muted); line-height: 1.6; }
.empty {
  color: var(--muted);
  line-height: 1.6;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
}

.button[disabled], .button[aria-busy="true"] {
  cursor: wait;
  opacity: .72;
  pointer-events: none;
}

.button[aria-busy="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.site-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.site-card, .lane-card, .opportunity-card, .source-card { border-radius: var(--radius); padding: 18px; transition: transform .2s ease, box-shadow .2s ease; }
.site-card:hover, .lane-card:hover, .opportunity-card:hover { transform: translateY(-3px); box-shadow: var(--glow-card), 0 0 20px rgba(139,92,246,.1); }

.site-top, .source-top, .opportunity-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

/* ── Status Pills ── */
.status-pill {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px;
  font-size: 12px; font-weight: 800; background: rgba(255,255,255,.1);
  color: var(--muted); border: 1px solid var(--line); text-transform: capitalize;
}
.status-pill.active, .status-pill.green { color: #001a0a; background: var(--good); border-color: transparent; }
.status-pill.queued, .status-pill.gated { color: #1a0d00; background: var(--warn); border-color: transparent; }
.status-pill.review { color: white; background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.4); }

.site-card h3, .lane-card h3, .opportunity-card h3, .source-card h3 { margin: 12px 0 8px; font-size: 20px; }
.site-url {
  color: var(--purple-300); word-break: break-word; display: inline-flex; align-items: center;
  min-height: 44px; padding: 6px 0; line-height: 1.35; transition: color .2s;
}
.site-url:hover { color: var(--purple-200); }
.site-card p, .source-card p { color: var(--muted); line-height: 1.55; }

.mini-columns { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 14px 0; }
.mini-columns > div { min-width: 0; }
.mini-columns small { color: var(--purple-300); font-weight: 800; }
ul { margin: 8px 0 0; padding-left: 18px; color: #d4c9fc; }
li { margin-bottom: 7px; }

/* ── Grids ── */
.lane-grid, .opportunity-grid, .source-grid, .paperclip-grid, .company-unit-grid, .link-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.lane-card.purple { background: linear-gradient(135deg, rgba(109,40,217,.2), rgba(139,92,246,.08)); }
.lane-card.light { background: rgba(196,181,253,.1); }
.lane-card.black { background: rgba(0,0,0,.2); }
.lane-card span, .source-card small { color: var(--muted); }
.opportunity-top span { color: var(--purple-400); font-weight: 900; }
.opportunity-top strong { font-size: 28px; }

/* ── Coding CLI Agents ── */
.agent-selection-panel { position: relative; overflow: hidden; }
.agent-selection-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 88% 10%, rgba(139,92,246,.16), transparent 34%);
}
.agent-toolbar { position: relative; z-index: 1; justify-content: flex-end; }
.agent-summary {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.agent-summary div { padding: 12px; border-radius: 16px; background: rgba(139,92,246,.055); border: 1px solid var(--line); }
.agent-summary span { display: block; color: var(--purple-300); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 900; }
.agent-summary strong { display: block; margin: 6px 0 3px; font-size: 28px; letter-spacing: -.04em; }
.agent-summary small { color: var(--muted); line-height: 1.45; }
.agent-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agent-card { border-radius: var(--radius); padding: 16px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.agent-card:hover, .agent-card.selected { transform: translateY(-2px); border-color: rgba(196,181,253,.45); box-shadow: var(--glow-card), 0 0 32px rgba(139,92,246,.13); }
.agent-card.selected { background: linear-gradient(135deg, rgba(109,40,217,.22), rgba(139,92,246,.08)); }
.agent-card-toggle { min-height: 56px; display: grid; grid-template-columns: 24px 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; cursor: pointer; }
.agent-card-toggle input { width: 22px; height: 22px; min-height: 22px; accent-color: var(--purple-400); cursor: pointer; }
.agent-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 16px; color: white; font-weight: 900; background: linear-gradient(135deg, var(--purple-500), var(--purple-400)); box-shadow: 0 0 24px rgba(139,92,246,.32); }
.agent-title { min-width: 0; }
.agent-title strong, .agent-title small { display: block; }
.agent-title small { color: var(--muted); line-height: 1.35; margin-top: 3px; }
.agent-status { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--line); }
.agent-status.online { color: #001a0a; background: var(--good); border-color: transparent; }
.agent-status.busy { color: #1a0d00; background: var(--warn); border-color: transparent; }
.agent-status.idle { color: var(--purple-200); background: rgba(139,92,246,.12); }
.agent-config { display: grid; grid-template-columns: 1.2fr .75fr; gap: 10px; margin-top: 14px; }
.agent-config label, .agent-routing-controls label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.agent-config input, .agent-config select { width: 100%; min-width: 0; color: var(--text); background: rgba(139,92,246,.06); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; min-height: 44px; }
.agent-toolset-label { grid-column: 1 / -1; }
.agent-settings { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 18px; align-items: end; margin-top: 16px; border-radius: var(--radius); padding: 18px; }
.agent-settings h3 { margin: 6px 0 8px; }
.agent-settings p { margin: 0; color: var(--muted); line-height: 1.55; }
.agent-routing-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.agent-routing-controls .select { width: 100%; min-width: 0; }

/* ── Ops Strip ── */
.ops-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: -6px 0 18px; }
.ops-card { border-radius: 20px; padding: 16px; }
.ops-card span { color: var(--purple-300); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 900; }
.ops-card strong { display: block; margin: 8px 0 4px; font-size: 18px; }
.ops-card small, .activity-feed small { color: var(--muted); line-height: 1.5; }
.activity-feed { margin-top: 18px; border-radius: var(--radius); padding: 18px; }
.activity-feed h3 { margin: 0 0 12px; }
.activity-feed ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.activity-feed li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; margin: 0; border-top: 1px solid var(--line); color: #d4c9fc; }
.activity-feed li:first-child { border-top: 0; }
.activity-feed strong { color: white; }

.operations-control { margin-top: 18px; border-radius: var(--radius); padding: 18px; }
.operations-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.operations-header h3 { margin: 0 0 6px; }
.operations-header p { margin: 0; color: var(--muted); line-height: 1.55; }
.ops-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.ops-control-grid article { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.035); }
.ops-control-grid h4 { margin: 0 0 10px; }
.ops-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ops-row:first-of-type { border-top: 0; }
.ops-row strong, .ops-row small { display: block; }
.ops-row small { color: var(--muted); line-height: 1.45; margin-top: 4px; }

/* ── Import ── */
.import-box { display: grid; grid-template-columns: 1fr minmax(280px, .8fr) auto; gap: 16px; align-items: center; margin-top: 18px; border-radius: var(--radius); padding: 18px; }
.import-box h3 { margin: 0 0 8px; }
.import-box p { margin: 0; color: var(--muted); }

/* ── Reports ── */
.report-preview { min-height: 160px; }
.client-report { border-radius: 24px; padding: 22px; }
.report-cover { border-radius: var(--radius); padding: 24px; background: linear-gradient(135deg, rgba(109,40,217,.4), rgba(139,92,246,.12)); margin-bottom: 18px; position: relative; overflow: hidden; }
.report-cover::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(196,181,253,.08); filter: blur(30px); }
.report-cover h3 { font-size: 38px; margin: 8px 0; letter-spacing: -0.04em; position: relative; z-index: 1; }
.report-cover strong { font-size: 28px; }
.report-section { margin: 16px 0; padding: 16px; border-radius: 16px; background: rgba(139,92,246,.04); border: 1px solid var(--line); }
.report-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.report-grid > div { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }

/* ── Paperclip ── */
.paperclip-grid article, .company-unit, .link-kpi, .link-card { border-radius: var(--radius); padding: 18px; transition: transform .2s ease; }
.paperclip-grid article:hover, .company-unit:hover, .link-card:hover { transform: translateY(-2px); }
.paperclip-grid p, .company-unit p, .link-card p, .workflow-step p { color: var(--muted); line-height: 1.6; }
.company-units { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.section-head.compact { align-items: center; margin-bottom: 16px; }
.company-unit a { margin-top: 12px; }
.unit-suggestions { display: grid; gap: 12px; margin: 16px 0 4px; }
.unit-suggestions-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--purple-300); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.unit-suggestions-head strong { color: var(--text); font-size: 18px; letter-spacing: 0; }
.suggestion-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}
.suggestion-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.suggestion-top strong { line-height: 1.3; }
.suggestion-top span {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #001a0a;
  background: var(--good);
  font-size: 11px;
  font-weight: 900;
}
.suggestion-card p { margin: 0; }
.suggestion-card small { color: var(--muted); line-height: 1.45; }
.suggestion-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestion-meta span, .execution-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(139,92,246,.08);
  border: 1px solid var(--line);
  color: var(--purple-200);
  font-size: 12px;
  font-weight: 800;
}
.suggestion-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.execution-state { color: var(--muted); background: rgba(255,255,255,.04); }
.execution-state.queued { color: #001a0a; background: var(--good); border-color: transparent; }
.section-sub { color: var(--muted); line-height: 1.55; margin: 8px 0 0; max-width: 760px; }

/* ── Link Building ── */
.link-kpi-grid { margin-bottom: 16px; }
.link-kpi span, .link-card small { color: var(--muted); }
.link-kpi strong { display: block; font-size: 32px; margin: 8px 0 4px; }
.link-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.link-tabs .active { background: var(--purple-200); color: #0a061a; border-color: transparent; }
.link-panel { min-height: 220px; }
.link-grid { display: grid; gap: 16px; }
.link-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.mini-stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.mini-stat-row span, .score-chip, .flag-chip {
  display: inline-flex; align-items: center; min-height: 32px; border-radius: 999px; padding: 6px 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: #e9dffc; font-size: 12px; font-weight: 800;
}
.risk-low { color: var(--good) !important; }
.risk-medium { color: var(--warn) !important; }
.risk-high { color: var(--bad) !important; }
.flag-chip { color: #ffd0d8; border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.1); margin: 3px; }

/* ── Tables ── */
.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.data-table th, .data-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--purple-300); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.data-table td small { display: block; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.data-table tr:last-child td { border-bottom: 0; }
.mini-select { min-height: 44px; min-width: 150px; color: var(--text); background: rgba(139,92,246,.06); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.mobile-record-list { gap: 10px; }
.mobile-record-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: var(--card);
}
.mobile-record-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
}
.mobile-record-card dl {
  display: grid;
  grid-template-columns: minmax(88px, .45fr) minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
}
.mobile-record-card dt {
  color: var(--purple-300);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mobile-record-card dd {
  margin: 0;
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ── Outreach ── */
.outreach-board { display: grid; grid-template-columns: repeat(4, minmax(220px,1fr)); gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.outreach-column { border-radius: 18px; padding: 14px; }
.outreach-column h3 { margin: 0 0 12px; text-transform: capitalize; }
.outreach-card { border-radius: 14px; padding: 13px; margin-bottom: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.outreach-card strong, .outreach-card small { display: block; }
.outreach-card small { color: var(--muted); margin-top: 4px; }
.risk-line { border-left: 3px solid var(--bad); padding-left: 12px; }

/* ── Workflow ── */
.workflow-list { display: grid; gap: 12px; }
.workflow-step { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; border-radius: 18px; padding: 16px; }
.workflow-step span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--purple-500), var(--purple-400)); font-weight: 900; box-shadow: 0 0 16px rgba(139,92,246,.2); }

/* ── Handoff ── */
.handoff { white-space: pre-wrap; overflow: auto; max-height: 420px; margin-top: 16px; padding: 18px; border-radius: 16px; color: #d4c9fc; background: var(--bg-deep); border: 1px solid var(--line); }

/* ── Toast ── */
.toast {
  position: fixed; right: 22px; bottom: 22px; transform: translateY(18px); opacity: 0;
  pointer-events: none; background: var(--purple-200); color: #0a061a; padding: 13px 16px;
  border-radius: 14px; box-shadow: var(--shadow), var(--glow-purple); font-weight: 800;
  transition: .25s ease; z-index: 40;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Charts ── */
.charts-section { margin: 0 0 32px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.chart-card { padding: 20px; border-radius: 20px; transition: box-shadow .2s ease; contain: content; }
.chart-card:hover { box-shadow: 0 0 30px rgba(139,92,246,.12); }
.chart-card canvas { width: 100% !important; height: 260px !important; will-change: contents; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-header h3 { margin: 0; font-size: 14px; color: var(--muted); }

/* ── Notifications ── */
.notification-panel {
  position: fixed; right: 22px; top: 22px; width: 340px; max-height: 480px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px;
  box-shadow: var(--glow-card); z-index: 45; display: none; overflow: hidden;
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
}
.notification-panel.show { display: block; }
.notification-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.notification-header h4 { margin: 0; font-size: 14px; }
.notification-list { max-height: 400px; overflow-y: auto; padding: 12px; }
.notification-item {
  padding: 12px; margin-bottom: 8px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; line-height: 1.5;
}
.notification-item.success { border-color: var(--good); }
.notification-item.warning { border-color: var(--warn); }
.notification-item.error { border-color: var(--bad); }
.notification-time { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }

.notification-toggle {
  display: grid; place-items: center; position: fixed; right: 70px; top: 16px;
  width: 46px; height: 46px; z-index: 30; border: 1px solid var(--glass-border);
  border-radius: 14px; color: white; background: var(--glass);
  backdrop-filter: blur(20px); cursor: pointer; transition: all .2s ease;
}
.notification-toggle:hover { background: rgba(139,92,246,.25); border-color: var(--purple-400); box-shadow: 0 0 20px rgba(139,92,246,.2); }
#notificationBadge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px;
  background: var(--bad); color: white; border-radius: 999px; font-size: 11px;
  font-weight: 900; display: grid; place-items: center; padding: 0 6px;
  box-shadow: 0 0 12px rgba(239,68,68,.4);
}
#notificationBadge:empty { display: none; }

/* ── Live Indicator ── */
.live-indicator { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.live-dot {
  width: 8px; height: 8px; background: var(--good); border-radius: 50%;
  animation: pulse 2s infinite; box-shadow: 0 0 12px rgba(16,185,129,.5);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px rgba(16,185,129,.5); }
  50% { opacity: 0.5; transform: scale(1.3); box-shadow: 0 0 20px rgba(16,185,129,.8); }
}

/* ═══════════════ FAB — Floating Action Button ═══════════════ */
.fab {
  display: none; position: fixed; right: 18px; bottom: calc(var(--mobile-nav-height) + 20px + env(safe-area-inset-bottom, 0px)); z-index: 35;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-400));
  color: white; font-size: 24px; box-shadow: 0 8px 28px rgba(139,92,246,.45), 0 0 30px rgba(109,40,217,.2);
  transition: all .25s ease; align-items: center; justify-content: center;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 12px 36px rgba(139,92,246,.6), 0 0 40px rgba(109,40,217,.35); }
.fab:active { transform: scale(0.95); }
.fab-menu {
  position: fixed; right: 18px; bottom: calc(var(--mobile-nav-height) + 86px + env(safe-area-inset-bottom, 0px)); z-index: 34; display: none; flex-direction: column; gap: 10px;
}
.fab-menu.show { display: flex; }
.fab-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--purple-200);
  font-weight: 700; font-size: 13px; cursor: pointer; backdrop-filter: blur(20px);
  box-shadow: var(--glow-card); transition: all .2s ease; white-space: nowrap;
  animation: fabSlideIn .2s ease;
}
.fab-item:hover { background: rgba(139,92,246,.15); border-color: var(--purple-400); transform: translateX(-4px); }
.fab-item span { font-size: 18px; }
@keyframes fabSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
/* Individual site detail profile */
.site-detail-mode .main > :not(#site-detail) {
  display: none !important;
}

.site-title-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.site-title-button:hover,
.site-title-button:focus-visible {
  color: #c4b5fd;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-back-button {
  margin-bottom: var(--space-4);
}

.site-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: var(--space-5);
  align-items: stretch;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(196, 181, 253, 0.28);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 20%, rgba(168, 85, 247, 0.34), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(99, 102, 241, 0.32), transparent 30%),
    linear-gradient(135deg, rgba(30, 27, 75, 0.92), rgba(15, 23, 42, 0.86));
  box-shadow: 0 28px 80px rgba(3, 7, 18, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.site-hero::after {
  content: '';
  position: absolute;
  inset: auto -15% -45% 38%;
  height: 240px;
  background: linear-gradient(90deg, transparent, rgba(216, 180, 254, 0.22), transparent);
  transform: rotate(-10deg);
  pointer-events: none;
}

.site-hero-copy,
.site-hero-score {
  position: relative;
  z-index: 1;
}

.site-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.site-hero .site-url {
  display: inline-flex;
  margin-bottom: 14px;
  color: #ddd6fe;
  font-weight: 800;
}

.site-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.site-hero-score {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-hero-score strong {
  display: block;
  font-size: clamp(54px, 7vw, 82px);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.site-hero-score small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.site-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-5) 0;
}

.site-metric-card,
.site-list-card {
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.54));
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.site-metric-card {
  display: flex;
  gap: 14px;
  min-height: 148px;
  padding: 20px;
}

.site-metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(196, 181, 253, 0.24);
  font-size: 23px;
}

.site-metric-card small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.site-metric-card strong {
  display: block;
  margin: 5px 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.site-metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--space-5);
}

.site-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.site-list-card {
  height: 100%;
  padding: clamp(22px, 3vw, 30px);
}

.site-list-card h2 {
  margin: 8px 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.site-done-list ul,
.site-next-list ul {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-done-list li,
.site-next-list li {
  position: relative;
  padding: 14px 14px 14px 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.42);
  color: var(--text);
}

.site-done-list li::before,
.site-next-list li::before {
  position: absolute;
  left: 14px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-weight: 900;
}

.site-done-list li::before {
  content: '✓';
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
}

.site-next-list li::before {
  content: '→';
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.18);
}

.site-audit-history .site-list-card {
  padding-bottom: 18px;
}

.audit-timeline {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.audit-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(#a78bfa, rgba(167, 139, 250, 0.08));
}

.audit-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.44);
}

.audit-timeline-dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 6px solid rgba(30, 27, 75, 0.9);
  background: linear-gradient(135deg, #c084fc, #818cf8);
  box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.34), 0 0 24px rgba(168, 85, 247, 0.45);
}

.audit-timeline-item strong {
  display: block;
  font-size: 16px;
}

.audit-timeline-item p {
  margin: 5px 0 10px;
  color: var(--muted);
}

.mini-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-stat-row span {
  padding: 6px 10px;
  border: 1px solid rgba(196, 181, 253, 0.16);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: #ddd6fe;
  font-size: 12px;
  font-weight: 800;
}

.site-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  margin: 8px 0 var(--space-5);
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(18px);
}

.site-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 11px 16px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.site-tab::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-200));
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity .2s ease, transform .2s ease;
}

.site-tab:hover,
.site-tab.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.16);
  transform: translateY(-1px);
}

.site-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-tab-content {
  animation: siteTabFade .22s ease;
}

.site-tab-content.active {
  display: block;
}

@keyframes siteTabFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-overview-grid,
.site-tab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.site-tab-grid .wide {
  grid-column: 1 / -1;
}

.radar-placeholder {
  display: grid;
  gap: 12px;
}

.radar-spoke {
  display: grid;
  grid-template-columns: 112px 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.radar-spoke span,
.quick-stat-grid span,
.trend-chart span,
.gbp-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.radar-spoke strong {
  color: #fff;
}

.radar-spoke i,
.trend-chart i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-200));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.28);
}

.radar-spoke i { width: var(--value); }

.quick-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-stat-grid div,
.cwv-card,
.check-item,
.gap-analysis-grid article {
  padding: 14px;
  border: 1px solid rgba(196, 181, 253, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.42);
}

.quick-stat-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.site-data-table-wrap {
  background: rgba(2, 6, 23, 0.26);
}

.site-data-table tbody tr:hover td {
  background: rgba(139, 92, 246, 0.055);
}

.site-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.site-status-pill.green { color: #bbf7d0; background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.32); }
.site-status-pill.yellow { color: #fde68a; background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.34); }
.site-status-pill.red { color: #fecaca; background: rgba(239, 68, 68, 0.17); border-color: rgba(239, 68, 68, 0.38); }
.site-status-pill.blue { color: #bae6fd; background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.32); }

.site-activity-list,
.site-gap-list,
.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-activity-list li,
.site-gap-list li,
.checklist li {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(196, 181, 253, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.36);
}

.site-activity-list small,
.site-gap-list small,
.muted-copy,
.gap-analysis-grid small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.activity-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}
.activity-dot.success { background: var(--good); box-shadow: 0 0 14px rgba(16, 185, 129, 0.45); }
.activity-dot.warning { background: var(--warn); box-shadow: 0 0 14px rgba(245, 158, 11, 0.45); }
.activity-dot.error { background: var(--bad); box-shadow: 0 0 14px rgba(239, 68, 68, 0.45); }

.cwv-grid,
.checklist-grid,
.gap-analysis-grid,
.citation-list {
  display: grid;
  gap: 12px;
}

.cwv-card strong,
.gbp-card strong {
  display: block;
  margin: 6px 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}
.cwv-card.green { border-color: rgba(16, 185, 129, 0.34); }
.cwv-card.yellow { border-color: rgba(245, 158, 11, 0.38); }
.cwv-card.red { border-color: rgba(239, 68, 68, 0.4); }

.checklist li::before,
.check-item span {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 900;
}
.checklist li.pass::before { content: '✓'; color: #bbf7d0; background: rgba(16, 185, 129, 0.16); }
.checklist li.warn::before { content: '!'; color: #fde68a; background: rgba(245, 158, 11, 0.16); }
.check-item { display: flex; align-items: center; gap: 10px; }
.check-item.pass span { color: #bbf7d0; background: rgba(16, 185, 129, 0.16); }
.check-item.warn span { color: #fde68a; background: rgba(245, 158, 11, 0.16); }

.trend-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 220px;
}
.trend-chart div {
  display: grid;
  gap: 8px;
  align-items: end;
  text-align: center;
}
.trend-chart i {
  width: 100%;
  height: var(--bar);
  min-height: 20px;
  align-self: end;
}

.gbp-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(196, 181, 253, 0.18);
}
.gbp-card p { color: var(--muted); line-height: 1.5; }

.citation-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(196, 181, 253, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.36);
}

.review-stars {
  color: #fbbf24;
  font-size: 30px;
  letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
}

.gap-analysis-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gap-analysis-grid article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.gap-analysis-grid article span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-400));
  font-weight: 900;
}
.gap-analysis-grid article small { grid-column: 2; }

@media (max-width: 900px) {
  .site-overview-grid,
  .site-tab-grid,
  .gap-analysis-grid { grid-template-columns: 1fr; }
  .radar-spoke { grid-template-columns: 92px 52px minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .site-tabs { border-radius: 16px; margin-top: var(--space-4); }
  .site-tab { flex: 1 0 42%; }
  .quick-stat-grid,
  .trend-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .citation-list div { align-items: flex-start; flex-direction: column; }
  .review-stars { font-size: 24px; }
}

@media (max-width: 1180px) {
  .site-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .site-hero,
  .site-detail-columns {
    grid-template-columns: 1fr;
  }

  .site-hero-score {
    align-content: start;
  }
}

@media (max-width: 680px) {
  .site-hero { padding: 24px; border-radius: 26px; }
  .site-metrics { grid-template-columns: 1fr; }
  .site-detail-actions .button { flex: 1 1 100%; justify-content: center; }
  .audit-timeline-item { grid-template-columns: 26px minmax(0, 1fr); padding: 14px; }
  .audit-timeline::before { left: 13px; }
  .audit-timeline-dot { width: 26px; height: 26px; border-width: 5px; }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .25s ease;
    width: min(310px, 88vw);
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 76;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu {
    display: grid; position: fixed; right: 16px; top: 16px; z-index: 30;
    width: 46px; height: 46px; place-items: center; border: 1px solid var(--glass-border);
    border-radius: 14px; color: white; background: var(--glass); backdrop-filter: blur(20px);
    font-size: 20px;
  }
  .theme-toggle { right: 74px; top: 16px; }
  .mobile-topbar { display: grid; }
  .mobile-menu, .theme-toggle, .notification-toggle { display: none; }
  .main { padding-top: calc(82px + env(safe-area-inset-top, 0px)); }

  /* Bottom Nav: 7 primary destinations with internal scroll instead of page overflow */
  .bottom-nav {
    position: fixed; left: 10px; right: 10px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 28;
    display: flex; gap: 4px;
    min-height: var(--mobile-nav-height);
    padding: 6px max(6px, env(safe-area-inset-left, 0px)) 6px max(6px, env(safe-area-inset-right, 0px));
    border: 1px solid var(--glass-border); border-radius: 22px;
    background: var(--glass); backdrop-filter: blur(22px); box-shadow: var(--glow-card);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .bottom-nav a,
  .bottom-nav button {
    flex: 0 0 58px;
    min-width: 58px;
    min-height: var(--touch-target);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    text-decoration: none; color: var(--muted); border-radius: 16px; font-size: 9px; font-weight: 800;
    line-height: 1.15;
    text-align: center;
    transition: all .2s ease;
    border: 0;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    touch-action: manipulation;
  }
  .bottom-nav a .nav-icon,
  .bottom-nav button .nav-icon { font-size: 19px; line-height: 1; }
  .bottom-nav a.active, .bottom-nav a:hover,
  .bottom-nav button.active, .bottom-nav button:hover {
    color: var(--purple-200); background: rgba(139,92,246,.12);
  }

  .fab {
    display: flex;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--mobile-nav-height) + 32px + env(safe-area-inset-bottom, 0px));
  }
  .main { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
  .seo-suite { scroll-margin-bottom: calc(var(--mobile-nav-height) + 96px); }
  .seo-suite-grid { padding-bottom: calc(var(--mobile-nav-height) + 26px + env(safe-area-inset-bottom, 0px)); }
  .hero { grid-template-columns: 1fr; }
  .metrics-grid, .site-grid, .lane-grid, .opportunity-grid, .source-grid, .paperclip-grid, .company-unit-grid, .ops-strip, .link-kpi-grid, .link-grid.two, .module-grid, .ops-control-grid, .agent-summary, .agent-grid, .agent-settings, .agent-routing-controls { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-layout { grid-template-columns: 1fr; }
  .import-box { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .main { padding: calc(82px + env(safe-area-inset-top, 0px)) 10px calc(var(--mobile-nav-height) + 42px + env(safe-area-inset-bottom, 0px)); }
  .app-shell, .main, .panel { max-width: 100vw; min-width: 0; overflow-x: clip; }
  .hero, .panel { border-radius: 16px; padding: var(--space-4); }
  .hero {
    min-height: 0;
    gap: var(--space-3);
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }
  .hero::after { display: none; }
  .hero-copy { align-self: start; }
  .hero-actions { margin-top: var(--space-4); }
  .hero-panel { padding: var(--space-4); border-radius: 16px; }
  .live-indicator { margin-top: var(--space-2); }
  .subtitle { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .metrics-grid, .site-grid, .lane-grid, .opportunity-grid, .source-grid, .paperclip-grid, .company-unit-grid, .report-grid, .mini-columns, .ops-strip, .link-kpi-grid, .link-grid.two, .module-grid, .ops-control-grid, .agent-summary, .agent-grid, .agent-settings, .agent-routing-controls, .agent-config { grid-template-columns: 1fr; }
  .operations-header, .ops-row { flex-direction: column; }
  .section-head { flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
  .section-head h2 { font-size: 24px; letter-spacing: -0.02em; }
  .toolbar, .hero-actions, .report-actions, .card-actions { width: 100%; }
  .search, .select, .button { width: 100%; }
  a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"]) { min-height: var(--touch-target); }
  .button.tiny, .mini-stat-row span, .score-chip, .flag-chip, .status-pill, .suggestion-meta span, .execution-state { min-height: var(--touch-target); }
  input[type="checkbox"], input[type="radio"], .agent-card-toggle input { min-width: var(--touch-target); min-height: var(--touch-target); }
  .site-top, .source-top, .opportunity-top, .suggestion-top, .suggestion-actions, .chart-header { flex-direction: column; align-items: stretch; }
  .site-card, .lane-card, .opportunity-card, .source-card, .module-card, .company-unit, .link-card, .metric-card { border-radius: 16px; padding: var(--space-4); }
  h1 { font-size: 30px; line-height: 1.02; letter-spacing: -0.01em; margin: 6px 0 10px; }
  .hero-panel strong { font-size: 38px; margin: 8px 0; }
  .notification-panel { width: calc(100vw - 24px); right: 12px; top: calc(74px + env(safe-area-inset-top, 0px)); max-height: min(70dvh, 480px); }
  .notification-toggle { right: 12px; top: 70px; }
  .theme-toggle { left: 70px; right: auto; top: 16px; }
  .fab { right: 14px; bottom: calc(var(--mobile-nav-height) + 18px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav { left: 6px; right: 6px; bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
  .fab-menu { right: 14px; bottom: calc(var(--mobile-nav-height) + 84px + env(safe-area-inset-bottom, 0px)); }
  .more-group-links { grid-template-columns: 1fr; }
  .suggestion-top span, .execution-state { justify-content: center; }
  .audit-progress-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .table-wrap { max-width: 100%; }
  .table-wrap.has-mobile-cards .data-table { display: none; }
  .table-wrap.has-mobile-cards { overflow: visible; border: 0; border-radius: 0; }
  .table-wrap.has-mobile-cards .mobile-record-list { display: grid; }
  .mobile-record-card { border-radius: 16px; padding: var(--space-4); }
  .mobile-record-card dl { grid-template-columns: 1fr; gap: 4px; }
  .mobile-record-card dd { margin-bottom: 8px; }
  .data-table { min-width: 0; }
  .evidence-row { grid-template-columns: 1fr; border-radius: 14px; padding: var(--space-3); margin-bottom: var(--space-2); background: var(--card); }
  .chart-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .chart-card { padding: var(--space-4); border-radius: 16px; }
  .chart-card canvas { height: 220px !important; }
  body::before { animation: none; opacity: .55; }
}

@media (max-width: 360px) {
  .main { padding: calc(82px + env(safe-area-inset-top, 0px)) 8px calc(var(--mobile-nav-height) + 38px + env(safe-area-inset-bottom, 0px)); }
  .hero, .panel { padding: 14px; }
  h1 { font-size: 28px; }
  .hero-panel strong { font-size: 34px; }
  .bottom-nav a, .bottom-nav button { flex-basis: 54px; min-width: 54px; font-size: 8px; }
  .table-wrap { max-width: 100%; }
}

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

@media (prefers-contrast: more) {
  :root {
    --muted: #ded7ff;
    --line: rgba(196, 181, 253, 0.45);
    --line-strong: rgba(196, 181, 253, 0.7);
    --glass-border: rgba(196, 181, 253, 0.55);
  }
  .button.ghost,
  .more-sheet-link,
  .mobile-record-card,
  .status-pill {
    border-width: 2px;
  }
}

/* ── Print ── */
@media print {
  body { background: white; color: #111; }
  .sidebar, .mobile-menu, .bottom-nav, .hero, .metrics-grid, #portfolio, #pipeline, #opportunities, #link-building, #sources, #paperclip, .section-head .toolbar, .toast, .notification-panel, .notification-toggle, .fab, .fab-menu { display: none !important; }
  .app-shell, .main { display: block; padding: 0; }
  .panel { box-shadow: none; border: 0; margin: 0; padding: 0; page-break-inside: avoid; }
  .client-report { color: #111; background: white; border: 0; box-shadow: none; }
  .report-cover { color: white; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .chart-card { page-break-inside: avoid; border: 1px solid #ddd; box-shadow: none; }
  .charts-section { display: block !important; }
  .chart-grid { display: block; }
}

/* Loading skeleton shimmer */
.is-loading { position: relative; overflow: hidden; min-height: 120px; }
.is-loading::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(139,92,246,.08) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 
  0% { transform: translateX(-100%); } 
  100% { transform: translateX(100%); } 
}

/* Toast notifications */
.toast-container { position: fixed; bottom: 100px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { 
  padding: 14px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  backdrop-filter: blur(20px); animation: slideInRight .3s ease; 
  box-shadow: 0 8px 32px rgba(0,0,0,.4); display: flex; align-items: center; gap: 10px;
}
.toast-error { background: rgba(220,38,38,.85); color: white; border: 1px solid rgba(239,68,68,.4); }
.toast-success { background: rgba(22,163,74,.85); color: white; border: 1px solid rgba(34,197,94,.4); }
.toast-info { background: rgba(109,40,217,.85); color: white; border: 1px solid rgba(139,92,246,.4); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Spinner */
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--purple-400); border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Global loading bar */
.global-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; opacity: 0; transition: opacity .2s; }
.global-loader.active { opacity: 1; }
.global-loader::after {
  content: ''; display: block; height: 100%; width: 30%;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-300));
  animation: loadingBar 1.2s ease infinite;
  border-radius: 0 3px 3px 0;
}
@keyframes loadingBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ═══════════════ Professional Visual Polish Upgrade ═══════════════ */
:root {
  --space-section: 38px;
  --glow-card-hover: 0 18px 54px rgba(0, 0, 0, 0.5), 0 0 34px rgba(139, 92, 246, 0.18), 0 0 0 1px rgba(196, 181, 253, 0.16);
}

body[data-theme="light"] {
  --glow-card-hover: 0 18px 44px rgba(29, 23, 53, 0.13), 0 0 0 1px rgba(91, 33, 182, 0.16);
}

h1 {
  font-size: clamp(40px, 5.4vw, 70px);
  line-height: .96;
  letter-spacing: -.065em;
}

.main { padding: 32px; }
.section { scroll-margin-top: 32px; }
.main > .section:not(:first-child) { margin-top: var(--space-section); }
.main > .section:not(:first-child)::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 0 28px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .12), rgba(196, 181, 253, .44), rgba(139, 92, 246, .12), transparent);
  opacity: .82;
}

.sidebar-card span,
.panel-label,
.eyebrow,
.data-table th,
.more-group h3,
.agent-summary span,
.ops-card span,
.unit-suggestions-head,
.mobile-record-card dt {
  letter-spacing: .145em;
  font-weight: 900;
}

.hero {
  min-height: 340px;
  position: relative;
  isolation: isolate;
  border-color: rgba(196, 181, 253, .28);
  box-shadow: var(--shadow), 0 0 110px rgba(139, 92, 246, .1), 0 0 0 1px rgba(139, 92, 246, .12);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(139,92,246,.22), transparent 28%),
    radial-gradient(circle at 72% 44%, rgba(56,189,248,.12), transparent 24%),
    radial-gradient(circle at 46% 74%, rgba(16,185,129,.08), transparent 24%);
  filter: blur(34px);
  opacity: .7;
  animation: heroMeshShift 16s ease-in-out infinite alternate;
}

@keyframes heroMeshShift {
  0% { transform: translate(-1%, -1%) rotate(0deg) scale(1); }
  50% { transform: translate(2%, -3%) rotate(8deg) scale(1.04); }
  100% { transform: translate(-2%, 2%) rotate(-6deg) scale(1.02); }
}

.hero-actions {
  margin-top: 28px;
  gap: 12px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(139,92,246,.14);
  border-radius: 999px;
  background: rgba(4,3,15,.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass,
.metric-card,
.panel,
.site-card,
.lane-card,
.opportunity-card,
.source-card,
.client-report,
.ops-card,
.agent-card,
.chart-card,
.activity-feed,
.audit-progress,
.audit-history,
.site-form,
.import-box,
.agent-summary,
.agent-settings,
.operations-control,
.paperclip-grid article,
.company-unit,
.link-kpi,
.link-card,
.suggestion-card,
.outreach-column,
.workflow-step {
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.032)), var(--glass);
  border-color: color-mix(in srgb, var(--glass-border) 82%, white 18%);
  backdrop-filter: blur(30px) saturate(1.18);
  -webkit-backdrop-filter: blur(30px) saturate(1.18);
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  margin-bottom: 0;
  border-color: rgba(196,181,253,.24);
  box-shadow: var(--shadow), 0 0 0 1px rgba(139,92,246,.1);
}

.panel.section::after,
.hero > .hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--purple-500), var(--purple-200), var(--info), var(--purple-500), transparent);
  background-size: 220% 100%;
  opacity: .62;
  animation: gradientBorderFlow 8s linear infinite;
}

.hero > .hero-copy::before { right: auto; width: 100%; }
@keyframes gradientBorderFlow { to { background-position: 220% 0; } }

.section-head {
  gap: 22px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.section-head h2 {
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.04;
  letter-spacing: -.055em;
  margin-top: 7px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 12%, var(--purple-200) 48%, var(--purple-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-panel {
  padding: 26px;
  border-color: rgba(196,181,253,.28);
  box-shadow: var(--glow-card-hover);
}

.metrics-grid {
  gap: 18px;
  margin: 28px 0 34px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-top: 3px solid var(--purple-400);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.metric-card::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  margin-bottom: 14px;
  background: var(--purple-400);
  box-shadow: 0 0 18px rgba(139,92,246,.62);
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  opacity: .42;
}

.metric-card:nth-child(1) { border-top-color: var(--info); }
.metric-card:nth-child(1)::before { background: var(--info); box-shadow: 0 0 18px rgba(56,189,248,.56); }
.metric-card:nth-child(2) { border-top-color: var(--good); }
.metric-card:nth-child(2)::before { background: var(--good); box-shadow: 0 0 18px rgba(16,185,129,.56); }
.metric-card:nth-child(3) { border-top-color: var(--warn); }
.metric-card:nth-child(3)::before { background: var(--warn); box-shadow: 0 0 18px rgba(245,158,11,.56); }

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 900;
}

.metric-card strong {
  font-size: clamp(42px, 4vw, 56px);
  line-height: .95;
  margin: 9px 0 7px;
  letter-spacing: -.07em;
}

.site-card,
.lane-card,
.opportunity-card,
.source-card,
.module-card,
.agent-card,
.ops-card,
.paperclip-grid article,
.company-unit,
.link-card,
.link-kpi,
.chart-card,
.audit-progress,
.audit-history,
.activity-feed,
.client-report,
.suggestion-card,
.outreach-card,
.workflow-step {
  position: relative;
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.module-card::before,
.lane-card::before,
.opportunity-card::before,
.source-card::before,
.agent-card::before,
.ops-card::before,
.paperclip-grid article::before,
.company-unit::before,
.link-card::before,
.link-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-300), transparent);
  opacity: .78;
}

.metric-card:hover,
.site-card:hover,
.lane-card:hover,
.opportunity-card:hover,
.source-card:hover,
.module-card:hover,
.agent-card:hover,
.ops-card:hover,
.paperclip-grid article:hover,
.company-unit:hover,
.link-card:hover,
.link-kpi:hover,
.chart-card:hover,
.audit-progress:hover,
.audit-history:hover,
.activity-feed:hover,
.client-report:hover,
.suggestion-card:hover,
.outreach-card:hover,
.workflow-step:hover {
  transform: translateY(-5px);
  border-color: rgba(196,181,253,.4);
  box-shadow: var(--glow-card-hover);
}

.site-card:hover { transform: translateY(-5px) scale(1.012); }

.site-top strong {
  font-size: 32px;
  line-height: 1;
  letter-spacing: -.06em;
  background: linear-gradient(135deg, white, var(--purple-200));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-top strong::after {
  content: " complete";
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  margin-left: 5px;
}

.site-card h3,
.lane-card h3,
.opportunity-card h3,
.source-card h3 {
  margin: 14px 0 8px;
  font-size: 21px;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.status-pill {
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.status-pill.active,
.status-pill.green {
  background: linear-gradient(135deg, #34d399, var(--good));
  box-shadow: 0 0 18px rgba(16,185,129,.22);
}

.status-pill.queued,
.status-pill.gated {
  background: linear-gradient(135deg, #fbbf24, var(--warn));
  box-shadow: 0 0 18px rgba(245,158,11,.2);
}

.status-pill.review {
  background: linear-gradient(135deg, rgba(239,68,68,.88), rgba(239,68,68,.42));
  box-shadow: 0 0 18px rgba(239,68,68,.18);
}

.mini-columns { margin: 16px 0 4px; }
.card-actions {
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  :root { --space-section: 30px; }
}

@media (max-width: 680px) {
  :root { --space-section: 24px; }
  .main { padding: calc(82px + env(safe-area-inset-top, 0px)) 12px calc(var(--mobile-nav-height) + 48px + env(safe-area-inset-bottom, 0px)); }
  .main > .section:not(:first-child)::before { margin-bottom: 20px; }
  .hero-actions { width: 100%; border-radius: 20px; padding: 8px; }
  .hero-actions .button { justify-content: center; }
  .section-head h2 { font-size: 27px; line-height: 1.08; }
  .panel { padding: var(--space-4); }
  .metric-card strong { font-size: 44px; }
  .site-top { align-items: flex-start; }
  .site-top strong { font-size: 34px; }
  .card-actions { justify-content: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .panel.section::after,
  .hero > .hero-copy::before {
    animation: none !important;
  }
}

/* ═══════════════ Site Detail Professional Polish ═══════════════ */
.site-breadcrumb {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.site-breadcrumb a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(196, 181, 253, .16);
  border-radius: 999px;
  color: #ddd6fe;
  text-decoration: none;
  background: rgba(139, 92, 246, .08);
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.site-breadcrumb a:hover,
.site-breadcrumb a:focus-visible {
  color: #fff;
  border-color: rgba(196, 181, 253, .42);
  box-shadow: 0 0 18px rgba(139, 92, 246, .2);
  transform: translateY(-1px);
  outline: none;
}

.site-breadcrumb span:last-child {
  color: white;
  padding: 6px 0;
}

.empty-state,
.empty {
  border: 1px dashed rgba(196, 181, 253, .28);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at 16% 20%, rgba(139, 92, 246, .18), transparent 34%),
    rgba(15, 23, 42, .34);
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 220px;
  text-align: center;
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #f5f3ff;
  background: linear-gradient(135deg, rgba(139, 92, 246, .75), rgba(56, 189, 248, .35));
  box-shadow: 0 0 34px rgba(139, 92, 246, .28);
  font-size: 26px;
}

.empty-state strong { color: #fff; font-size: 20px; }
.empty-state small { max-width: 520px; color: var(--muted); }

.site-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  align-items: stretch;
  margin: 24px 0 22px;
  padding: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: 999px;
  background: rgba(4, 3, 15, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-overflow-scrolling: touch;
}

.site-tab {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
  touch-action: manipulation;
  white-space: nowrap;
}

.site-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-200), #38bdf8);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}

.site-tab:hover,
.site-tab:focus-visible {
  color: #f5f3ff;
  background: rgba(139, 92, 246, .1);
  box-shadow: 0 0 22px rgba(139, 92, 246, .18);
  outline: none;
}

.site-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, .24), rgba(59, 130, 246, .12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 28px rgba(139, 92, 246, .18);
}

.site-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-tab-content.active {
  animation: siteTabFadeIn 250ms ease-out both;
}

@keyframes siteTabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-metric-card,
.metric-card {
  will-change: transform;
}

.site-metric-card::before,
.metric-card::before {
  pointer-events: none;
}

.site-metric-card::after,
.metric-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, transparent, rgba(196, 181, 253, .52), rgba(56, 189, 248, .28), transparent);
  background-size: 260% 260%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .24s ease;
  pointer-events: none;
}

.site-metric-card:hover,
.metric-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--glow-card-hover);
}

.site-metric-card:hover::after,
.metric-card:hover::after {
  opacity: 1;
  animation: metricBorderFlow 1.8s linear infinite;
}

@keyframes metricBorderFlow { to { background-position: 260% 0; } }

.status-pill-good,
.status-pill.good,
.status-pill.green,
.site-status-pill.green {
  color: #052e16;
  background: linear-gradient(135deg, #86efac, #22c55e);
  border-color: rgba(34, 197, 94, .45);
  box-shadow: 0 0 18px rgba(34, 197, 94, .22);
}

.status-pill-warning,
.status-pill.warning,
.status-pill.warn,
.status-pill.yellow,
.status-pill.queued,
.status-pill.gated,
.site-status-pill.yellow {
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-color: rgba(245, 158, 11, .5);
  box-shadow: 0 0 18px rgba(245, 158, 11, .2);
  animation: warningPulse 2.2s ease-in-out infinite;
}

.status-pill-bad,
.status-pill.bad,
.status-pill.red,
.status-pill.review,
.site-status-pill.red {
  color: #fff1f2;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  border-color: rgba(248, 113, 113, .52);
  box-shadow: 0 0 20px rgba(239, 68, 68, .22);
}

.status-pill-info,
.status-pill.info,
.status-pill.blue,
.site-status-pill.blue {
  color: #f5f3ff;
  background: linear-gradient(135deg, var(--purple-500), rgba(59, 130, 246, .76));
  border-color: rgba(167, 139, 250, .52);
  box-shadow: 0 0 18px rgba(139, 92, 246, .22);
}

@keyframes warningPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .28), 0 0 18px rgba(245, 158, 11, .2); }
  50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0), 0 0 24px rgba(245, 158, 11, .32); }
}

.activity-feed ul,
.site-activity-list {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.activity-feed li,
.site-activity-list li {
  display: grid;
  grid-template-columns: 16px minmax(112px, auto) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 16px;
  background: rgba(15, 23, 42, .35);
}

.activity-feed li:nth-child(even),
.site-activity-list li:nth-child(even) {
  background: rgba(139, 92, 246, .08);
}

.activity-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--purple-400);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .12), 0 0 18px rgba(139, 92, 246, .28);
}

.activity-dot.success,
.activity-dot.good { background: var(--good); box-shadow: 0 0 0 4px rgba(34,197,94,.12), 0 0 18px rgba(34,197,94,.28); }
.activity-dot.warning,
.activity-dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(245,158,11,.12), 0 0 18px rgba(245,158,11,.28); }
.activity-dot.bad,
.activity-dot.error { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.12), 0 0 18px rgba(239,68,68,.28); }
.activity-dot.info { background: var(--purple-400); }

.activity-feed time,
.site-activity-list time {
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-feed li > div,
.site-activity-list li > div { min-width: 0; }
.activity-feed li strong,
.site-activity-list li strong { display: block; color: #fff; }
.activity-feed li small,
.site-activity-list li small { display: block; margin-top: 3px; }

.review-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 4px 0 12px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
  letter-spacing: .02em;
}

.review-stars .star {
  color: rgba(196, 181, 253, .28);
  filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0));
}

.review-stars .star.filled {
  color: #fbbf24;
  text-shadow: 0 0 18px rgba(245, 158, 11, .34);
}

.checklist,
.site-gap-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li,
.site-gap-list li,
.check-item {
  position: relative;
  min-height: 44px;
  padding: 12px 14px 12px 44px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(15, 23, 42, .36);
}

.checklist li::before,
.site-gap-list li::before,
.check-item > span {
  position: absolute;
  left: 13px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-weight: 900;
}

.checklist li::before,
.site-gap-list li::before { content: "→"; color: #ddd6fe; background: rgba(139, 92, 246, .18); }
.checklist li.pass::before,
.check-item.pass > span { content: "✓"; color: #bbf7d0; background: rgba(34, 197, 94, .16); }
.checklist li.warn::before,
.check-item.warn > span { content: "→"; color: #fde68a; background: rgba(245, 158, 11, .16); }
.checklist li.fail::before,
.checklist li.failed::before,
.check-item.fail > span,
.check-item.failed > span { content: "✗"; color: #fecaca; background: rgba(239, 68, 68, .16); }

.site-tab-grid,
.site-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.site-tab-grid .wide,
.site-overview-grid .wide { grid-column: 1 / -1; }

.site-data-table-wrap { max-width: 100%; overflow-x: auto; }
.site-data-table { min-width: 820px; }

.radar-placeholder,
.quick-stat-grid,
.cwv-grid,
.citation-list,
.gap-analysis-grid,
.trend-chart {
  max-width: 100%;
}

canvas,
svg { max-width: 100%; }

@media (max-width: 860px) {
  .site-tabs {
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 20px;
  }
  .site-tab-grid,
  .site-overview-grid { grid-template-columns: 1fr; }
  .site-data-table { min-width: 720px; }
}

@media (max-width: 680px) {
  .site-breadcrumb { gap: 6px; font-size: 12px; }
  .site-tabs { padding: 5px; }
  .site-tab { padding-inline: 14px; }
  .activity-feed li,
  .site-activity-list li { grid-template-columns: 14px minmax(0, 1fr); }
  .activity-feed time,
  .site-activity-list time { grid-column: 2; white-space: normal; }
  .activity-feed li > div,
  .site-activity-list li > div { grid-column: 2; }
  .site-data-table { min-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-tab-content.active,
  .site-metric-card:hover::after,
  .metric-card:hover::after,
  .status-pill-warning,
  .status-pill.warning,
  .status-pill.warn,
  .status-pill.yellow,
  .status-pill.queued,
  .status-pill.gated {
    animation: none !important;
  }
}
