/* ════════════════════════════════════════════════════
   SiteTrace Design System — v3 (light-first)
   ════════════════════════════════════════════════════ */

/* ── Tokens: Light (default) ── */
:root {
  color-scheme: light;
  --bg:          #ffffff;
  --bg-subtle:   #f8fafc;
  --bg-muted:    #f1f5f9;
  --surface:     #ffffff;
  --line:        #e2e8f0;
  --line-strong: #cbd5e1;
  --text:        #0f172a;
  --muted:       #64748b;
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,.10);
  --green-dark:  #059669;
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,.10);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,.10);
  --blue:        #3b82f6;
  --blue-dim:    rgba(59,130,246,.10);
  --purple:      #8b5cf6;
  --purple-dim:  rgba(139,92,246,.10);
  --radius:      8px;
  --radius-lg:   16px;
  --radius-full: 9999px;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.10);
  --nav-bg:      rgba(255,255,255,.90);
}

/* ── Tokens: Dark (night mode) ── */
:root[data-theme="night"] {
  color-scheme: dark;
  --bg:          #0a0f1e;
  --bg-subtle:   #111827;
  --bg-muted:    #1e293b;
  --surface:     #1e293b;
  --line:        rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.20);
  --text:        #f8fafc;
  --muted:       #94a3b8;
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,.14);
  --green-dark:  #34d399;
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,.14);
  --red:         #f87171;
  --red-dim:     rgba(248,113,113,.14);
  --blue:        #60a5fa;
  --blue-dim:    rgba(96,165,250,.14);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167,139,250,.14);
  --shadow-sm:   0 1px 2px rgba(0,0,0,.25);
  --shadow:      0 4px 16px rgba(0,0,0,.35);
  --shadow-lg:   0 20px 60px rgba(0,0,0,.50);
  --nav-bg:      rgba(10,15,30,.90);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin-top: 0; }
ul { padding: 0; margin: 0; list-style: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ── Layout ── */
.container {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}
.container.narrow { width: min(800px, calc(100% - 40px)); }

/* ── Typography ── */
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.eyebrow {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--green); margin: 0 0 12px;
}
.lead { font-size: 1.1rem; color: var(--muted); line-height: 1.7; max-width: 600px; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 16px rgba(0,0,0,.07);
}
:root[data-theme="night"] .nav.scrolled { box-shadow: 0 1px 16px rgba(0,0,0,.3); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  letter-spacing: -.02em; flex-shrink: 0;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--green); color: #fff;
}
.brand-mark svg {
  width: 18px; height: 18px; fill: none;
  stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}
/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  display: inline-flex; align-items: center;
  padding: 7px 12px; border-radius: var(--radius);
  font-size: .93rem; font-weight: 500; color: var(--muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-muted); }
/* Nav controls (right side) */
.nav-controls {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.nav-sep {
  width: 1px; height: 24px; background: var(--line); margin: 0 4px;
}
.icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-muted); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Hamburger */
.nav-toggle {
  display: none; border: 0; background: transparent;
  color: var(--text); cursor: pointer; padding: 6px; border-radius: var(--radius);
}
.nav-toggle:hover { background: var(--bg-muted); }
.nav-toggle svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
/* Mobile nav open */
.nav-links.open {
  display: flex !important; flex-direction: column; align-items: stretch; gap: 2px;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 12px 20px 16px; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.nav-links.open a { padding: 10px 12px; font-size: 1rem; border-radius: var(--radius); }
.nav-links.open .button { margin-top: 6px; justify-content: center; }

/* ── Buttons ── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--radius); cursor: pointer; font-weight: 600;
  font-size: .95rem; transition: all .15s; white-space: nowrap;
  text-decoration: none;
}
.button          { min-height: 44px; padding: 0 20px; background: var(--green); color: #fff; }
.button:hover    { background: var(--green-dark); }
.button.secondary{ background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); }
.button.secondary:hover { background: var(--bg-muted); border-color: var(--line-strong); }
.button.ghost    { background: transparent; color: var(--muted); }
.button.ghost:hover { background: var(--bg-muted); color: var(--text); }
.button.small    { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.button.large    { min-height: 52px; padding: 0 28px; font-size: 1.05rem; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card.elevated { box-shadow: var(--shadow); }
.card.hover-lift { transition: box-shadow .2s, transform .2s; }
.card.hover-lift:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ── Inputs ── */
input[type="text"], input[type="url"], input[type="email"], input[type="password"] {
  width: 100%; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  color: var(--text); padding: 0 14px; min-height: 44px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
input::placeholder { color: var(--muted); }

/* ── Badges / Pills ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 600; border: 1px solid transparent;
}
.badge.green  { color: var(--green);  background: var(--green-dim);  border-color: rgba(16,185,129,.25); }
.badge.amber  { color: var(--amber);  background: var(--amber-dim);  border-color: rgba(245,158,11,.25); }
.badge.red    { color: var(--red);    background: var(--red-dim);    border-color: rgba(239,68,68,.25); }
.badge.blue   { color: var(--blue);   background: var(--blue-dim);   border-color: rgba(59,130,246,.25); }

/* ── Sections ── */
section { padding: 88px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p  { color: var(--muted); font-size: 1.1rem; }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  background: var(--bg);
  position: relative; overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(16,185,129,.12), transparent 70%),
    linear-gradient(180deg, rgba(16,185,129,.03) 0%, transparent 60%);
}
:root[data-theme="night"] .hero::before {
  background:
    radial-gradient(ellipse 60% 55% at 50% 0%, rgba(16,185,129,.15), transparent 70%),
    linear-gradient(180deg, rgba(16,185,129,.05) 0%, transparent 60%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto; text-align: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin: 0 auto 40px; }
/* Scanner card inside hero */
.scanner-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 24px; margin-bottom: 28px;
}
.scanner-form {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
}
.scanner-input-wrap {
  position: relative;
}
.scanner-input-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
.scanner-input-wrap input { padding-left: 42px; min-height: 52px; font-size: 1.05rem; }
.scanner-form .button { min-height: 52px; padding: 0 24px; font-size: 1.05rem; }
.trust-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
  font-size: .9rem; color: var(--muted);
}
.trust-item {
  display: flex; align-items: center; gap: 7px;
}
.trust-item svg {
  width: 16px; height: 16px; color: var(--green);
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Feature cards ── */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.feature-card {
  padding: 28px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--green-dim); color: var(--green);
}
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: .95rem; line-height: 1.65; }

/* ── Agency section ── */
.agency-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.agency-copy h2 { margin-bottom: 16px; }
.agency-copy .lead { margin-bottom: 28px; }
.check-list { display: grid; gap: 14px; margin-bottom: 32px; }
.check-item {
  display: flex; align-items: flex-start; gap: 12px; font-size: .97rem;
}
.check-item svg {
  width: 20px; height: 20px; color: var(--green); flex-shrink: 0; margin-top: 2px;
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
/* Mockup card */
.mockup-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.mockup-card::before {
  content: ""; position: absolute; inset: -30% 0 auto;
  height: 240px; pointer-events: none;
  background: radial-gradient(circle, rgba(16,185,129,.14), transparent 65%);
}
.mockup-head {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: .95rem;
}
.mockup-row {
  position: relative; display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.mockup-row:last-child { border-bottom: 0; }
.mockup-site { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.mockup-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.mockup-btn {
  border: 0; border-radius: 6px; min-height: 30px; padding: 0 11px;
  background: var(--bg-muted); color: var(--muted); cursor: pointer; font-size: .82rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.mockup-btn:hover { background: var(--line); color: var(--text); }

/* ── CTA band ── */
.cta-band {
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: var(--muted); max-width: 560px; }
.cta-band-btns { display: flex; gap: 12px; flex-shrink: 0; }

/* ── Why it matters (centered CTA) ── */
.why-band {
  background: var(--bg-subtle); border-radius: var(--radius-lg);
  padding: 64px; text-align: center; border: 1px solid var(--line);
}
.why-band h2 { margin-bottom: 20px; }
.why-band p  { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin: 0 auto; }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.price-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.price-card.highlight {
  border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--shadow);
}
.price-card.highlight::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--green);
}
.price-badge { margin-bottom: 10px; }
.price-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.price-amount {
  font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  margin-bottom: 8px; color: var(--text);
}
.price-amount small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-desc { font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.price-features { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; flex: 1; }
.price-features li {
  display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--muted);
}
.price-features li svg {
  width: 16px; height: 16px; color: var(--green); flex-shrink: 0; margin-top: 2px;
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.price-features li strong { color: var(--text); }
.price-card .button { margin-top: auto; width: 100%; justify-content: center; }
.pricing-note {
  margin-top: 16px; padding: 16px 20px;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: .9rem; color: var(--muted);
}
.pricing-note strong { color: var(--text); }

/* ── Result area ── */
.result-area { margin: 0; padding: 32px 0 56px; }
.result-shell {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  max-width: 960px; margin: 0 auto 28px;
}
.panel-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  background: var(--bg-subtle); flex-wrap: wrap;
}
.result-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border-bottom: 1px solid var(--line);
}
.result-summary-grid .priority-panel {
  padding: 20px 22px; border-right: 1px solid var(--line);
}
.result-summary-grid .priority-panel:last-child { border-right: 0; }
.result-categories { padding: 16px; }
.score-ring {
  width: 80px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--green) 0 82%, var(--line) 82% 100%);
  font-size: 1.35rem; font-weight: 800;
}
.score-ring::before {
  content: ""; position: absolute; inset: 8px;
  border-radius: inherit; background: var(--surface);
}
.score-ring span { position: relative; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.metric {
  padding: 18px 22px; border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric strong { display: block; font-size: 1.2rem; font-weight: 700; margin-bottom: 3px; }
.metric span   { font-size: .83rem; color: var(--muted); }
/* Check items */
.check-list-panel { padding: 16px; display: grid; gap: 10px; }
.check {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: start; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-subtle);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.dot.warning { background: var(--amber); }
.dot.fail    { background: var(--red); }
.dot.down    { background: var(--red); }
.dot.pending { background: var(--muted); }
.db-site-item .dot { width: 8px; height: 8px; margin-top: 0; }
.check-title { font-weight: 600; font-size: .93rem; margin: 0; }
.check-copy  { color: var(--muted); font-size: .85rem; margin: 3px 0 0; }
.check-value { color: var(--muted); font-size: .82rem; white-space: nowrap; }
/* Scan steps */
.scan-steps { padding: 24px; display: grid; gap: 10px; }
.scan-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted);
  background: var(--bg-subtle);
}
.scan-step-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line);
  flex-shrink: 0; font-size: .75rem; font-weight: 700;
}
.scan-step.active { color: var(--text); border-color: var(--green); }
.scan-step.active .scan-step-icon { border-color: var(--green); color: var(--green); }
.scan-step.done   { color: var(--text); }
.scan-step.done .scan-step-icon { border-color: var(--green); color: var(--green); background: var(--green-dim); }

/* ── How it works page ── */
.how-steps { position: relative; display: grid; gap: 40px; max-width: 760px; margin: 0 auto; }
.how-steps-line {
  position: absolute; left: 31px; top: 56px; bottom: 56px;
  width: 2px; background: var(--line);
}
.step-row { display: flex; gap: 28px; align-items: flex-start; }
.step-icon {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--line);
  position: relative; z-index: 1;
}
.step-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-icon.blue   { background: var(--blue-dim);   color: var(--blue); }
.step-icon.green  { background: var(--green-dim);  color: var(--green); }
.step-icon.amber  { background: var(--amber-dim);  color: var(--amber); }
.step-icon.purple { background: var(--purple-dim); color: var(--purple); }
.step-card {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 32px; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s; margin-top: 8px;
}
.step-card:hover { box-shadow: var(--shadow); }
.step-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.step-card p  { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.how-cta {
  margin-top: 80px;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: 24px; padding: 56px; text-align: center;
}
.how-cta h2 { margin-bottom: 14px; }
.how-cta p  { color: var(--muted); font-size: 1.05rem; margin-bottom: 32px; }
.how-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Demo page ── */
.demo-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.demo-header h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 4px; }
.demo-header-btns { display: flex; gap: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; }
.stat-card h4 { margin-bottom: 8px; }
.stat-card .stat-val { font-size: 1.8rem; font-weight: 700; }
.stat-val.green { color: var(--green); }
.stat-val.red   { color: var(--red); }
.site-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden;
  transition: border-color .2s;
}
.site-card:hover { border-color: var(--line-strong); }
.site-card.warning { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.03); }
.site-card.critical { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.03); }
:root[data-theme="night"] .site-card.warning  { background: rgba(245,158,11,.06); }
:root[data-theme="night"] .site-card.critical { background: rgba(239,68,68,.06); }
.site-card-main {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 20px 24px; flex-wrap: wrap;
}
.site-info { display: flex; align-items: center; gap: 16px; }
.site-globe {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
}
.site-globe svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-globe.green  { background: var(--green-dim);  color: var(--green); }
.site-globe.amber  { background: var(--amber-dim);  color: var(--amber); }
.site-globe.red    { background: var(--red-dim);    color: var(--red); }
.site-name { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.site-last { font-size: .85rem; color: var(--muted); }
.site-metrics { display: flex; gap: 32px; }
.site-metric { }
.site-metric-label { font-size: .8rem; color: var(--muted); margin-bottom: 3px; }
.site-metric-val { font-size: 1.05rem; font-weight: 600; }
.site-metric-val.green { color: var(--green); }
.site-metric-val.amber { color: var(--amber); }
.site-metric-val.red   { color: var(--red); }
.site-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--line); font-size: .9rem;
}
.site-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.site-alert.amber { color: var(--amber); }
.site-alert.red   { color: var(--red); }

/* ── Dashboard ── */
.dashboard-shell {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 68px);
}
.sidebar {
  border-right: 1px solid var(--line); background: var(--bg-subtle);
  padding: 20px 12px;
}
.sidebar-heading { padding: 0 8px; margin-bottom: 10px; }
.side-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s; cursor: pointer;
  border: 0; background: transparent; width: 100%; text-align: left;
}
.side-link:hover { background: var(--bg-muted); color: var(--text); }
.side-link.active { background: var(--green-dim); color: var(--green); font-weight: 600; }
.side-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.side-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--line); }
.side-dot.green { background: var(--green); }
.side-dot.amber { background: var(--amber); }
.side-dot.red   { background: var(--red); }
.dashboard-main { padding: 32px 36px; overflow: auto; }
.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.dashboard-head h1 { font-size: 1.5rem; }
.dash-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.dash-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.dash-card h4 { margin-bottom: 8px; }
.dash-card .val { font-size: 1.9rem; font-weight: 700; }
.dash-card .val.green { color: var(--green); }
.dash-card .val.red   { color: var(--red); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.detail-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.detail-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: .95rem;
}
.detail-panel-head svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.detail-panel-head .icon-red    { color: var(--red); }
.detail-panel-head .icon-amber  { color: var(--amber); }
.detail-panel-head .icon-green  { color: var(--green); }
.issue-row, .incident-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: .9rem;
}
.issue-row:last-child, .incident-row:last-child { border-bottom: 0; }
.issue-row svg, .incident-row svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.issue-row .icon-amber { color: var(--amber); }
.issue-row .icon-red   { color: var(--red); }
.incident-row .icon-green { color: var(--green); }
.issue-row .meta, .incident-row .meta { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.issue-row .time, .incident-row .time { color: var(--muted); font-size: .78rem; margin-left: auto; white-space: nowrap; }
/* Plan usage in sidebar */
.plan-usage-card {
  margin: 16px 0 0; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  font-size: .85rem;
}
.plan-usage-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-weight: 600; }
.plan-usage-bar { height: 4px; border-radius: 999px; background: var(--line); margin-bottom: 8px; overflow: hidden; }
.plan-usage-fill { height: 100%; border-radius: inherit; background: var(--green); }
.plan-usage-fill.over { background: var(--red); }
.plan-usage-note { color: var(--red); font-weight: 600; font-size: .8rem; }

/* ── Auth / Sign in ── */
.auth-page {
  min-height: calc(100vh - 68px); display: grid;
  place-items: center; padding: 60px 0;
  background: var(--bg-subtle);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px;
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.auth-card .lead { margin-bottom: 28px; font-size: .95rem; }
.auth-form { display: grid; gap: 12px; }
.form-label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── Sign in specific layout ── */
.signin-page { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 60px 0; }

/* ── Page shell (inner pages) ── */
.page-shell { padding: 64px 0 88px; min-height: calc(100vh - 68px); }
.page-shell .page-head { margin-bottom: 48px; }
.page-shell .page-head h1 { margin-bottom: 12px; }

/* ── Status page ── */
.status-page .page-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.public-status-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
}

/* ── Footer ── */
.footer {
  background: var(--bg); border-top: 1px solid var(--line);
  color: var(--muted); padding: 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px; padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .brand { font-size: 1.05rem; }
.footer-desc { color: var(--muted); font-size: .9rem; margin: 14px 0 0; max-width: 260px; line-height: 1.65; }
.footer-heading { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin: 0 0 14px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-list a { color: var(--muted); font-size: .9rem; transition: color .15s; }
.footer-list a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0 44px; font-size: .85rem; flex-wrap: wrap;
}

/* ── Misc ── */
.message { color: var(--muted); min-height: 1.4em; font-size: .9rem; }
.message.success { color: var(--green); }
.message.error   { color: var(--red); }
.level-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; color: var(--muted);
}
.level-badge.pass, .level-badge.online { color: var(--green); border-color: rgba(16,185,129,.3); background: var(--green-dim); }
.level-badge.warning { color: var(--amber); border-color: rgba(245,158,11,.3); background: var(--amber-dim); }
.level-badge.fail, .level-badge.down { color: var(--red); border-color: rgba(239,68,68,.3); background: var(--red-dim); }
.level-badge.maintenance { color: var(--blue); border-color: rgba(59,130,246,.3); background: var(--blue-dim); }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
code { font-family: "JetBrains Mono", "Fira Code", monospace; font-size: .9em; color: var(--green); }
pre { background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow: auto; }

/* ── Pricing page specifics ── */
.pricing-page .section-head { text-align: left; margin: 0 0 36px; max-width: 720px; }
.plan-split-band {
  margin-top: 20px; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-subtle); display: grid;
  grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}
.plan-split-band h2 { margin-bottom: 10px; }
.plan-split-band p { color: var(--muted); }
.plan-split-items { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-split-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; background: var(--surface);
}
.plan-split-item h4 { margin-bottom: 12px; }
.plan-split-item ul { display: grid; gap: 8px; }
.plan-split-item li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.plan-split-item li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

/* ── API/How it works page ── */
.how-page .page-head { text-align: center; max-width: 700px; margin: 0 auto 56px; }
.watch-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 36px; }
.watch-item {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  align-items: start; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.watch-item svg { width: 20px; height: 20px; color: var(--green); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.watch-item h4 { font-size: .9rem; font-weight: 600; margin-bottom: 4px; text-transform: none; letter-spacing: 0; color: var(--text); }
.watch-item p { color: var(--muted); font-size: .85rem; margin: 0; }

/* ── Utility classes used by app.js ── */
.muted { color: var(--muted); }
.eyebrow.compact { font-size: .75rem; margin-bottom: 6px; }

/* app.js-injected nav controls (language + theme toggle inside nav-links) */
.control-button {
  width: 36px; height: 36px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center; transition: color .15s, background .15s;
}
.control-button:hover { color: var(--text); background: var(--bg-muted); }
.control-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.language-control {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 10px; border-radius: var(--radius);
  color: var(--muted); cursor: pointer; font-size: .88rem;
  transition: background .15s, color .15s;
}
.language-control:hover { background: var(--bg-muted); color: var(--text); }
.language-control svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; stroke-linecap: round; }
.control-select {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: .85rem; outline: none;
  -webkit-appearance: none; appearance: none;
}
/* When nav-controls is injected inside nav-links (app.js) */
.nav-links > .nav-controls {
  margin-left: auto; padding-left: 4px;
  border-left: 1px solid var(--line);
}

/* ── Site list (sidebar + demo) ── */
.site-list { display: grid; }
.site-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--text);
  cursor: pointer; font: inherit; font-size: .9rem;
  transition: background .15s; border-radius: var(--radius);
}
.site-list-item:hover { background: var(--bg-muted); }
.site-list-item.active { background: var(--green-dim); color: var(--green-dark); }
.site-list-item strong { display: block; font-weight: 600; font-size: .92rem; }
.site-list-item small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.site-list-item em { margin-left: auto; flex-shrink: 0; font-style: normal; }
.site-list-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.compact-panel { padding: 12px 14px !important; }

/* ── Demo layout ── */
.demo-layout {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 20px; margin-bottom: 28px;
}
.demo-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}

/* ── Site detail panel ── */
.site-detail-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; min-height: 400px;
}
.site-detail.empty-state {
  display: grid; place-items: center; min-height: 300px;
  text-align: center; color: var(--muted); padding: 40px;
}
.site-detail.empty-state h2 { color: var(--text); font-size: 1.1rem; margin-bottom: 8px; }
.site-detail.is-loading { opacity: .6; pointer-events: none; }

/* ── Detail hero & metrics ── */
.detail-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.detail-hero h2 { font-size: 1.2rem; margin-bottom: 4px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-full);
  font-size: .9rem; font-weight: 600; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--bg-subtle);
}
.status-pill.online  { color: var(--green); border-color: rgba(16,185,129,.25); background: var(--green-dim); }
.status-pill.warning { color: var(--amber); border-color: rgba(245,158,11,.25); background: var(--amber-dim); }
.status-pill.down    { color: var(--red);   border-color: rgba(239,68,68,.25);  background: var(--red-dim); }
.detail-metrics {
  display: grid; grid-template-columns: repeat(4,1fr);
  padding: 16px 20px; gap: 12px; border-bottom: 1px solid var(--line);
}
.detail-metrics .dash-card { padding: 14px 18px; }

/* ── Uptime bars ── */
.uptime-strip {
  display: flex; gap: 3px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); align-items: center;
}
.uptime-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.uptime-bar.online  { background: var(--green); }
.uptime-bar.warning { background: var(--amber); }
.uptime-bar.down    { background: var(--red); }

/* ── Detail grid (issues + history side by side) ── */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
}
.detail-grid > * { border-right: 1px solid var(--line); overflow: hidden; }
.detail-grid > *:last-child { border-right: 0; }

/* ── Panels ── */
.panel, .flat-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.check.compact-check { padding: 10px 12px; }
.check-list-panel { padding: 0; }
.check-list { display: grid; }
.check.compact-check:first-child { border-radius: 0; }

/* ── Timeline ── */
.timeline { display: grid; }
.timeline-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.timeline-row:last-child { border-bottom: 0; }
.timeline-row strong { display: block; font-weight: 600; margin-bottom: 2px; }
.timeline-row small { display: block; color: var(--muted); font-size: .78rem; }

/* ── Empty states ── */
.empty { padding: 24px; text-align: center; color: var(--muted); font-size: .9rem; }
.empty.subtle { padding: 12px 16px; text-align: left; }

/* ── Conversion band (used in demo CTA) ── */
.conversion-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 36px 40px; background: var(--bg-subtle);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.conversion-band p { color: var(--muted); max-width: 560px; margin: 0; }
.demo-cta { margin-top: 0; }

/* ── Paid features lock panel ── */
.paid-lock {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding: 24px; background: var(--bg-subtle);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  margin-bottom: 20px; flex-wrap: wrap;
}
.paid-lock h3 { margin-bottom: 8px; }
.paid-lock p { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.summary-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.summary-pills span {
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--green-dim); color: var(--green);
  font-size: .8rem; font-weight: 600;
  border: 1px solid rgba(16,185,129,.25);
}

/* ── Plan usage bar ── */
.plan-usage {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 16px; background: var(--bg-subtle);
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 16px; font-size: .9rem; flex-wrap: wrap;
}
.plan-usage strong { display: block; margin-bottom: 2px; }
.plan-usage span { color: var(--muted); font-size: .85rem; }
.plan-usage.limit { border-color: var(--red); background: var(--red-dim); }

/* ── Alert status grid ── */
.alert-status-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 20px;
}
.alert-status-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.alert-status-card strong { display: block; font-size: .85rem; font-weight: 600; }
.alert-status-card small { display: block; color: var(--muted); font-size: .78rem; }

/* ── Scan result categories (home page) ── */
.result-category { margin-bottom: 12px; }
.result-category-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; background: var(--bg-subtle);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; font-size: .85rem;
}
.result-category-head strong { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--muted); }
.result-category-head span { color: var(--muted); font-size: .78rem; }
.priority-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 8px;
  background: var(--surface); font-size: .9rem;
}
.priority-item strong { display: block; margin-bottom: 3px; }
.priority-item p { color: var(--muted); margin: 0; font-size: .88rem; }

/* ── Link button (app.js uses for sign-out in older builds) ── */
.link-button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font: inherit; font-size: .9rem; padding: 7px 12px;
  border-radius: var(--radius); transition: color .15s, background .15s;
}
.link-button:hover { color: var(--text); background: var(--bg-muted); }

/* ── Section head (demo/pricing pages) ── */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h1, .section-head h2 { margin-bottom: 16px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }

/* ══ Action Plan (Phase 2) ══════════════════════════ */
.action-plan-shell {
  max-width: 800px;
  margin: 32px auto 0;
}
.action-plan-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--green-dim);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .9rem;
}
.ap-group { margin-bottom: 24px; }
.ap-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ap-severity {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sev-critical { background: var(--red-dim); color: var(--red); }
.sev-high { background: var(--amber-dim); color: var(--amber); }
.sev-medium { background: var(--blue-dim); color: var(--blue); }
.sev-low { background: var(--bg-muted); color: var(--muted); }
.ap-count { font-size: .8rem; color: var(--muted); }
.ap-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.ap-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
}
.ap-item-head strong { font-size: .95rem; }
.ap-category {
  font-size: .75rem;
  color: var(--muted);
  background: var(--bg-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.ap-item-body { padding: 16px 18px; display: grid; gap: 14px; }
.ap-row { display: grid; gap: 4px; }
.ap-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.ap-row p {
  margin: 0;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.55;
}
.ap-code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 8px 12px;
  border: 1px solid var(--line);
}
.ap-code {
  flex: 1;
  font-family: monospace;
  font-size: .8rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  background: none;
  border: none;
}
.ap-copy-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ap-copy-btn:hover { background: var(--green-dim); color: var(--green-dark); border-color: var(--green); }

/* ══ Client Report (Phase 3) ═════════════════════════ */
.rpt-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  margin-bottom: 8px;
}
.client-report {
  max-width: 820px;
  margin: 0 auto;
  font-family: inherit;
  color: var(--text);
}
.rpt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 20px;
  border-bottom: 2px solid var(--green);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.rpt-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}
.rpt-header-brand .brand-mark {
  width: 28px;
  height: 28px;
  background: var(--green);
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.rpt-header-brand .brand-mark svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.rpt-header-label {
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.rpt-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: .8rem;
  color: var(--muted);
}
.rpt-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.rpt-score-block { display: flex; align-items: center; gap: 18px; }
.rpt-score-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rpt-score-ring span {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--surface);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.rpt-score-block strong { font-size: .95rem; }
.rpt-score-block p { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.rpt-score-pills { display: flex; gap: 12px; flex-wrap: wrap; }
.rpt-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  min-width: 72px;
  text-align: center;
}
.rpt-pill strong { font-size: 1.4rem; font-weight: 800; }
.rpt-pill span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.rpt-pill-fail { background: var(--red-dim); color: var(--red); }
.rpt-pill-warn { background: var(--amber-dim); color: var(--amber); }
.rpt-pill-pass { background: var(--green-dim); color: var(--green-dark); }
.rpt-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.rpt-overview-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rpt-ov-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rpt-overview-card strong { font-size: 1.05rem; font-weight: 700; }
.rpt-section { margin-bottom: 28px; }
.rpt-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.rpt-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
}
.rpt-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.45;
}
.rpt-table tr:last-child td { border-bottom: none; }
.rpt-check-row.rpt-fail td:first-child { color: var(--red); font-weight: 600; }
.rpt-check-row.rpt-warning td:first-child { color: var(--amber); font-weight: 600; }
.rpt-check-row.rpt-pass td:first-child { color: var(--muted); }
.rpt-rec-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rpt-rec-item:last-child { border-bottom: none; }
.rpt-rec-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.rpt-rec-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-muted);
  font-size: .75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.rpt-rec-head > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rpt-rec-item > p { margin: 0; font-size: .875rem; color: var(--muted); line-height: 1.55; padding-left: 36px; }
.rpt-empty { color: var(--muted); font-size: .875rem; font-style: italic; margin: 0; }
.rpt-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}

/* ══ Print styles (Phase 4) ══════════════════════════ */
@media print {
  /* Hide nav, footer, and everything in main EXCEPT #results */
  nav, .nav, footer, .footer { display: none !important; }
  main > *:not(#results) { display: none !important; }

  /* Inside #results, hide scan/action-plan, show only the client report */
  #results > .result-report,
  #results > .action-plan-shell,
  .rpt-controls, #viewReportBtn, #closeReportBtn,
  .no-print { display: none !important; }

  #results { padding: 0 !important; }
  .client-report-shell { display: block !important; }
  .client-report { max-width: 100%; }

  .rpt-table { page-break-inside: auto; }
  .rpt-table tr { page-break-inside: avoid; }
  .rpt-section { page-break-inside: avoid; }
  .rpt-score-row { page-break-inside: avoid; }
  body { background: #fff !important; color: #000 !important; }
  a { color: inherit !important; text-decoration: none !important; }
  .level-badge { border: 1px solid currentColor !important; }
}

/* ══ Detail tabs ══════════════════════════════════════ */
.detail-tabs {
  display: flex; border-bottom: 1px solid var(--line);
  padding: 0 20px; gap: 2px; flex-shrink: 0;
}
.detail-tab {
  padding: 11px 14px; border: 0; border-radius: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: .88rem; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.detail-tab-panel { }

/* ── Detail actions row ── */
.detail-actions {
  display: flex; gap: 10px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--bg-subtle);
}
.button.danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
.button.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── Response time chart ── */
.response-chart-wrap {
  border-bottom: 1px solid var(--line); padding: 14px 20px 16px;
}
.response-chart-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: .85rem; font-weight: 600;
}
.response-chart {
  display: flex; align-items: flex-end; gap: 4px; height: 52px;
}
.resp-bar-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.resp-bar {
  width: 100%; border-radius: 3px 3px 0 0;
  background: var(--green); min-height: 3px;
}
.resp-bar.slow { background: var(--amber); }
.resp-bar.down { background: var(--red); }

/* ── Settings form helpers ── */
.settings-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.settings-head strong { display: block; margin-bottom: 4px; }
.toggle-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; }
.toggle-row input[type="checkbox"] { width: auto !important; min-height: auto !important; flex-shrink: 0; }
.locked-control { opacity: .55; }
.locked-note {
  color: var(--muted); font-size: .82rem; padding: 8px 12px;
  background: var(--bg-muted); border-radius: var(--radius);
}
.status-link { color: var(--blue); font-size: .85rem; word-break: break-all; }

/* ══ Alert Center ════════════════════════════════════ */
.alert-center-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.alert-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
}
.alert-center-head strong { font-size: .95rem; }
.alert-center-tagline {
  font-size: .8rem;
  color: var(--muted);
  padding: 6px 18px 10px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  line-height: 1;
}
.alert-list { max-height: 320px; overflow-y: auto; }
.alert-empty {
  padding: 24px 18px;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
}
.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background .15s;
}
.alert-row:last-child { border-bottom: none; }
.alert-row.unread { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.alert-row:hover { background: var(--bg-muted); }
.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-icon svg { width: 18px; height: 18px; fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-green { stroke: var(--green); }
.icon-red   { stroke: var(--red); }
.icon-amber { stroke: var(--amber); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: .88rem; font-weight: 600; margin-bottom: 2px; }
.alert-msg { font-size: .82rem; color: var(--muted); margin-bottom: 4px; line-height: 1.45; }
.alert-time { font-size: .75rem; color: var(--muted); }
.alert-unread-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 5px;
}
.link-button.small { font-size: .8rem; padding: 0; }

/* ══ Dashboard App Layout (db-*) ════════════════════ */
.db-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
}

/* ── Sidebar ── */
.db-sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px 12px 12px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
}
.db-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.db-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.db-search-input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  box-sizing: border-box;
}
.db-search-input:focus { border-color: var(--brand); }
.db-section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: 0 4px;
  margin-bottom: 6px;
}
.db-sites-list { flex: 1; overflow-y: auto; }
.db-site-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: background .14s;
  margin-bottom: 2px;
}
.db-site-item:hover { background: var(--bg-muted); }
.db-site-item.active { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.db-site-item-info { flex: 1; min-width: 0; }
.db-site-item-name {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-site-item-url {
  display: block;
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ── Content area ── */
.db-content {
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 28px 32px;
}

/* ── Content header ── */
.db-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.db-site-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.db-globe-icon {
  width: 22px; height: 22px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  flex-shrink: 0;
}
.db-site-name {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .73rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  text-transform: capitalize;
  flex-shrink: 0;
}
.db-status-badge.online  { background: var(--green-dim); color: var(--green); }
.db-status-badge.down    { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.db-status-badge.warning { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.db-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Add monitor form ── */
.db-add-form {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.db-add-form form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.db-add-form input { flex: 1; min-width: 180px; }

/* ── Auth gate ── */
.db-auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
}
.db-auth-inner {
  text-align: center;
  max-width: 400px;
  padding: 48px 32px;
}
.db-auth-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.db-auth-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
}
.db-auth-inner h2 { font-size: 1.5rem; margin-bottom: 10px; }
.db-auth-inner p  { color: var(--muted); margin-bottom: 20px; }

/* ── Dashboard view ── */
.db-dashboard-view { display: flex; flex-direction: column; }

/* ── Info banner ── */
.db-banner {
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

/* ── Dashboard message ── */
.db-message { margin-bottom: 16px; }

/* ── Site detail panel ── */
.db-site-detail { flex: 1; }
.db-site-detail.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  text-align: center;
  color: var(--muted);
}
.db-empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.db-empty-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
}
.db-site-detail.empty-state h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.db-site-detail.empty-state p  { font-size: .9rem; max-width: 340px; }
.db-alert-center-wrap { margin-bottom: 20px; }

/* ══ Responsive ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .dash-metrics { grid-template-columns: repeat(2,1fr); }
  .detail-metrics { grid-template-columns: repeat(2,1fr); }
  .db-app { grid-template-columns: 220px 1fr; }
}
@media (max-width: 768px) {
  .db-app { grid-template-columns: 1fr; }
  .db-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .db-content { padding: 16px; }
  .db-content-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 900px) {
  .features-grid, .pricing-grid, .stats-grid  { grid-template-columns: 1fr; }
  .agency-grid   { grid-template-columns: 1fr; gap: 40px; }
  .cta-band      { flex-direction: column; gap: 20px; }
  .cta-band-btns { flex-direction: row; }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand  { grid-column: 1 / -1; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .sidebar       { display: none; }
  .detail-grid   { grid-template-columns: 1fr; }
  .dash-metrics  { grid-template-columns: repeat(2,1fr); }
  .watch-grid    { grid-template-columns: 1fr; }
  .plan-split-band { grid-template-columns: 1fr; }
  .plan-split-items { grid-template-columns: 1fr; }
  .demo-layout   { grid-template-columns: 1fr; }
  .alert-status-grid { grid-template-columns: 1fr 1fr; }
  .detail-metrics { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1280px); }
  .nav-toggle { display: block; }
  .nav-links  { display: none; }
  .nav-controls .nav-sep,
  .nav-controls .icon-btn { display: none; }
  .nav-controls .button.ghost { display: none; }
  h1 { font-size: 2.2rem; }
  .hero { padding: 64px 0 56px; }
  .scanner-form { grid-template-columns: 1fr; }
  .scanner-form .button { width: 100%; }
  .site-card-main { flex-direction: column; align-items: flex-start; }
  .site-metrics { flex-wrap: wrap; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .how-cta { padding: 36px 24px; }
  .step-row { flex-direction: column; gap: 14px; }
  .how-steps-line { display: none; }
  .step-icon { width: 48px; height: 48px; }
  .how-cta-btns { flex-direction: column; }
  .how-cta-btns .button { width: 100%; }
  .demo-header { flex-direction: column; align-items: flex-start; }
  .cta-band-btns { flex-wrap: wrap; }
  .dashboard-main { padding: 20px 16px; }
  .pricing-page .section-head { text-align: center; }
  .auth-card { padding: 28px 20px; }
}
= */
.db-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
}

/* ── Sidebar ── */
.db-sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px 12px 12px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
}
.db-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.db-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.db-search-input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  box-sizing: border-box;
}
.db-search-input:focus { border-color: var(--brand); }
.db-section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: 0 4px;
  margin-bottom: 6px;
}
.db-sites-list { flex: 1; overflow-y: auto; }
.db-site-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: background .14s;
  margin-bottom: 2px;
}
.db-site-item:hover { background: var(--bg-muted); }
.db-site-item.active { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.db-site-item-info { flex: 1; min-width: 0; }
.db-site-item-name {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-site-item-url {
  display: block;
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ── Content area ── */
.db-content {
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 28px 32px;
}

/* ── Content header ── */
.db-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.db-site-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.db-globe-icon {
  width: 22px; height: 22px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  flex-shrink: 0;
}
.db-site-name {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .73rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  text-transform: capitalize;
  flex-shrink: 0;
}
.db-status-badge.online  { background: var(--green-dim); color: var(--green); }
.db-status-badge.down    { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.db-status-badge.warning { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.db-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Add monitor form ── */
.db-add-form {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.db-add-form form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.db-add-form input { flex: 1; min-width: 180px; }

/* ── Auth gate ── */
.db-auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
}
.db-auth-inner {
  text-align: center;
  max-width: 400px;
  padding: 48px 32px;
}
.db-auth-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.db-auth-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
}
.db-auth-inner h2 { font-size: 1.5rem; margin-bottom: 10px; }
.db-auth-inner p  { color: var(--muted); margin-bottom: 20px; }

/* ── Dashboard view ── */
.db-dashboard-view { display: flex; flex-direction: column; }

/* ── Info banner ── */
.db-banner {
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

/* ── Dashboard message ── */
.db-message { margin-bottom: 16px; }

/* ── Site detail panel ── */
.db-site-detail { flex: 1; }
.db-site-detail.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  text-align: center;
  color: var(--muted);
}
.db-empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.db-empty-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
}
.db-site-detail.empty-state h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.db-site-detail.empty-state p  { font-size: .9rem; max-width: 340px; }
.db-alert-center-wrap { margin-bottom: 20px; }

/* ══ Responsive ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .dash-metrics { grid-template-columns: repeat(2,1fr); }
  .detail-metrics { grid-template-columns: repeat(2,1fr); }
  .db-app { grid-template-columns: 220px 1fr; }
}
@media (max-width: 768px) {
  .db-app { grid-template-columns: 1fr; }
  .db-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .db-content { padding: 16px; }
  .db-content-header { flex-direction: column; align-items: flex-start; }
}

/* ══ Free check result ═══════════════════════════════ */
.free-result-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto;
  max-width: 820px;
}
.free-result-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}
.free-result-site {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--muted); margin-bottom: 6px;
}
.free-result-body { padding: 24px; display: grid; gap: 16px; }
.free-score-block {
  display: flex; align-items: center; gap: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.free-basics-row {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
}
.free-basic-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.free-basic-label { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.free-basic-val   { font-size: 1rem; font-weight: 700; }
.free-issues-block { background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.free-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: .85rem;
}
.free-issue-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.free-issue-row:last-child { border-bottom: none; }
.free-locked-section {
  background: var(--bg-subtle); border: 1px dashed var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.free-locked-inner {
  padding: 20px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted);
}
.free-locked-inner strong { color: var(--text); font-size: .9rem; }
.free-locked-inner p { font-size: .82rem; margin: 0; }
.free-result-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; flex-wrap: wrap;
}
.free-result-cta strong { display: block; margin-bottom: 4px; }
.free-result-cta p { margin: 0; font-size: .85rem; color: var(--muted); }

/* ══ Demo page ═══════════════════════════════════════ */
.demo-overview { display: grid; gap: 20px; }
.demo-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.demo-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.demo-stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.demo-stat-label { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.demo-stat-val   { font-size: 1.9rem; font-weight: 800; }
.demo-sites-list { display: grid; gap: 12px; }
.demo-site-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.demo-site-card.warning { border-color: color-mix(in srgb,var(--amber) 30%,transparent); background: color-mix(in srgb,var(--amber) 4%,var(--surface)); }
.demo-site-card.down    { border-color: color-mix(in srgb,var(--red) 30%,transparent); background: color-mix(in srgb,var(--red) 4%,var(--surface)); }
.demo-site-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap;
}
.demo-site-identity { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.demo-site-globe {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.demo-site-globe.online  { background: var(--green-dim); color: var(--green); }
.demo-site-globe.warning { background: color-mix(in srgb,var(--amber) 15%,transparent); color: var(--amber); }
.demo-site-globe.down    { background: color-mix(in srgb,var(--red) 15%,transparent); color: var(--red); }
.demo-site-metrics { display: flex; gap: 28px; align-items: center; }
.demo-metric-col  { text-align: right; }
.demo-metric-label { font-size: .73rem; color: var(--muted); margin-bottom: 2px; }
.demo-metric-val  { font-size: 1.05rem; font-weight: 700; }
.demo-site-alert {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 20px; font-size: .82rem; border-top: 1px solid var(--line);
}
.demo-site-alert.fail    { color: var(--red); }
.demo-site-alert.warning { color: var(--amber); }
.demo-detail-view { display: grid; gap: 0; }

/* ══ Scan proof bar ══════════════════════════════════ */
.scan-proof-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 16px;
  font-size: .82rem; color: var(--muted); margin-bottom: 16px;
}
.scan-proof-bar strong { color: var(--text); }
.scan-interval-badge {
  display: inline-flex; align-items: center;
  background: var(--green-dim); color: var(--green);
  border-radius: 99px; font-size: .72rem; font-weight: 700;
  padding: 2px 10px; white-space: nowrap;
}

/* ══ Checks table ════════════════════════════════════ */
.checks-table {
  width: 100%; border-collapse: collapse; font-size: .83rem;
}
.checks-table th {
  text-align: left; padding: 8px 12px;
  border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
}
.checks-table td {
  padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.checks-table tr:last-child td { border-bottom: none; }
.checks-table tr:hover td { background: var(--bg-muted); }

/* Responsive adjustments */
@media (max-width: 680px) {
  .free-basics-row { grid-template-columns: repeat(2,1fr); }
  .demo-stat-row   { grid-template-columns: repeat(2,1fr); }
  .demo-site-metrics { gap: 16px; }
  .demo-site-row   { flex-direction: column; align-items: flex-start; }
}

/* ── Live Ping Chart ── */
.live-ping-wrap {
  border-bottom: 1px solid var(--line);
  padding: 14px 20px 16px;
}
.live-ping-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; font-size: .85rem; font-weight: 600;
}
.live-ping-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
  border-radius: 20px; padding: 2px 8px;
}
@keyframes lpBlink {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(.7); }
}
.live-dot-blink {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: lpBlink 1.4s ease-in-out infinite;
}
.live-ping-canvas {
  display: block; width: 100%; border-radius: 6px;
}
.live-ping-stats {
  display: flex; gap: 0; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.live-ping-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px; gap: 2px;
  border-right: 1px solid var(--line);
  font-size: .78rem;
}
.live-ping-stat:last-child { border-right: none; }
.live-ping-stat .muted { font-size: .7rem; color: var(--muted); }
.live-ping-stat strong { font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Latest scan breakdown (paid dashboard) ── */
.scan-breakdown {
  border: 1px solid var(--line); border-radius: 10px;
  margin: 16px 0; overflow: hidden;
}
.scan-breakdown-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer; list-style: none;
  font-size: .88rem; font-weight: 600;
  background: var(--bg-subtle);
  user-select: none;
}
.scan-breakdown-head::-webkit-details-marker { display: none; }
.scan-breakdown-meta { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.scan-breakdown-chevron {
  width: 16px; height: 16px; color: var(--muted);
  margin-left: auto; transition: transform .2s;
}
details[open] .scan-breakdown-chevron { transform: rotate(180deg); }
.scan-breakdown-body { padding: 4px 0; }
.scan-check-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 16px; border-bottom: 1px solid var(--line);
  font-size: .84rem;
}
.scan-check-row:last-child { border-bottom: none; }
.scan-check-icon {
  flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px;
}
.scan-check-icon svg { width: 16px; height: 16px; }
.scan-check-fail .scan-check-icon { color: var(--red); }
.scan-check-warn .scan-check-icon { color: var(--amber); }
.scan-check-pass .scan-check-icon { color: var(--green); }
.scan-check-text { flex: 1; }
.scan-check-rec {
  margin: 2px 0 0; font-size: .78rem;
  color: var(--muted); line-height: 1.4;
}

/* ── Sidebar site cards ── */
.db-add-site-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px; margin-bottom: 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: .84rem; font-weight: 600; text-align: left;
  transition: opacity .15s;
}
.db-add-site-btn:hover { opacity: .88; }

.db-site-card {
  display: block; width: 100%; text-align: left;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 12px; margin-bottom: 6px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.db-site-card:hover { border-color: var(--accent); background: var(--bg); }
.db-site-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}
.db-site-card-top {
  display: flex; align-items: center; gap: 7px; margin-bottom: 4px;
}
.db-site-card-name {
  flex: 1; font-size: .86rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db-site-card-score { font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.db-site-card-url { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 19px; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-backdrop.hidden { display: none; }
.modal-box {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 2px; border-radius: 5px;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }
.modal-form { display: grid; gap: 14px; }
.modal-form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 500; }
.modal-form input { width: 100%; }
.modal-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ── Run full audit button — available state ── */
#runAuditBtn:not(:disabled) { background: var(--accent); color: #fff; }
#runAuditBtn:disabled { opacity: .45; cursor: not-allowed; }
#runAuditBtn.btn-available { animation: auditPulse .6s ease; }
@keyframes auditPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: none; }
}

/* ── Audit CTA band ── */
.audit-cta-band {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-subtle));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 9px; padding: 11px 16px; margin: 16px 0;
  font-size: .83rem; color: var(--muted);
}
.audit-cta-left { display: flex; align-items: flex-start; gap: 8px; flex: 1; line-height: 1.45; }

/* ── Scan breakdown v2 — category grouped ── */
.scan-breakdown-body { padding: 0; }

.scan-cat-group { border-bottom: 1px solid var(--line); }
.scan-cat-group:last-child { border-bottom: none; }

.scan-cat-head {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg-subtle); color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.scan-cat-head.scan-cat-fail { color: var(--red);   background: color-mix(in srgb, var(--red)   5%, var(--bg-subtle)); }
.scan-cat-head.scan-cat-warn,
.scan-cat-head.scan-cat-warning { color: var(--amber); background: color-mix(in srgb, var(--amber) 5%, var(--bg-subtle)); }
.scan-cat-head.scan-cat-pass { color: var(--green); background: color-mix(in srgb, var(--green) 4%, var(--bg-subtle)); }

.scan-check-row2 {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  font-size: .84rem; transition: background .1s;
}
.scan-check-row2:last-child { border-bottom: none; }
.scan-check-row2:hover { background: var(--bg-subtle); }

.scan-check-icon2 {
  flex-shrink: 0; margin-top: 1px;
}
.scan-check-icon2.lvl-pass    { color: var(--green); }
.scan-check-icon2.lvl-warn,
.scan-check-icon2.lvl-warning { color: var(--amber); }
.scan-check-icon2.lvl-fail    { color: var(--red);   }

.scan-check-body { flex: 1; min-width: 0; }

.scan-check-title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.scan-check-title {
  font-weight: 500; font-size: .85rem; flex: 1;
}
.scan-check-value {
  font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--bg-subtle);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 7px; white-space: nowrap; flex-shrink: 0;
}
.scan-check-desc {
  margin: 4px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45;
}
.scan-check-fix {
  margin: 4px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45;
}
.scan-check-fix strong { color: var(--text); }

/* ── Rich issue rows (Latest silent issues panel) ── */
.rich-issue-row {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.rich-issue-row:last-child { border-bottom: none; }
.rich-issue-row:hover { background: var(--bg-subtle); }

.rich-issue-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.rich-issue-icon { flex-shrink: 0; display: flex; }
.rich-issue-icon.lvl-fail  { color: var(--red);   }
.rich-issue-icon.lvl-warn,
.rich-issue-icon.lvl-warning { color: var(--amber); }

.rich-issue-title { font-size: .86rem; font-weight: 600; flex: 1; min-width: 0; }
.rich-issue-desc {
  margin: 3px 0 2px; font-size: .78rem; color: var(--muted);
  line-height: 1.5; padding-left: 23px;
}
.rich-issue-fix {
  margin: 3px 0 0; font-size: .78rem; color: var(--muted);
  line-height: 1.5; padding-left: 23px;
}
.rich-issue-fix strong { color: var(--text); }

/* ── Rich incident rows ── */
.rich-incident-row {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.rich-incident-row:last-child { border-bottom: none; }
.rich-incident-row:hover { background: var(--bg-subtle); }

.rich-incident-top {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; font-size: .86rem;
}
.rich-incident-time {
  margin-left: auto; font-size: .75rem;
  color: var(--muted); white-space: nowrap;
}
.rich-incident-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-left: 23px; margin-bottom: 5px;
}
.rich-meta-chip {
  font-size: .75rem; font-weight: 600;
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}
.rich-incident-issues {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding-left: 23px;
}
.rich-incident-issue-tag {
  font-size: .72rem; color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--bg-subtle));
  border: 1px solid color-mix(in srgb, var(--red) 20%, var(--line));
  border-radius: 4px; padding: 2px 7px;
}

/* ── Scan cooldown message ── */
.scan-cooldown-msg {
  font-size: .78rem; color: var(--muted);
  padding: 4px 16px 8px;
  min-height: 0;
}

/* ── Scan History table ── */
.scan-history-table {
  width: 100%; border-collapse: collapse;
  font-size: .82rem;
}
.scan-history-table th {
  text-align: left; padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  font-weight: 600; color: var(--muted);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.scan-history-table td {
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.scan-history-table tr:last-child td { border-bottom: none; }
.scan-history-table tr:hover td { background: var(--bg-subtle); }

/* ── API Access section ── */
.api-access-section {
  display: grid; gap: 20px;
}
.api-coming-soon-notice {
  background: color-mix(in srgb, var(--indigo) 8%, var(--bg-subtle));
  border: 1px solid color-mix(in srgb, var(--indigo) 25%, var(--line));
  border-radius: 8px; padding: 12px 16px;
  font-size: .85rem; color: var(--text);
}
.api-key-area {
  display: grid; gap: 8px;
}
.api-key-area label {
  font-size: .85rem; font-weight: 600; color: var(--muted);
}
.api-key-display {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.api-key-display code {
  font-family: 'Courier New', monospace;
  font-size: .85rem; background: var(--bg-subtle);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 12px; flex: 1; min-width: 200px;
}
.api-endpoints {
  display: grid; gap: 8px;
}
.api-endpoints h4 {
  font-size: .85rem; font-weight: 600; margin-bottom: 4px;
}
.api-endpoints code {
  display: block; font-family: 'Courier New', monospace;
  font-size: .82rem; background: var(--bg-subtle);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 5px 10px; margin-bottom: 4px;
}

/* ── Locked section (non-agency API) ── */
.locked-section {
  text-align: center; padding: 40px 20px;
  display: grid; gap: 12px; justify-items: center;
}
.locked-section .lock-icon {
  font-size: 2rem; margin-bottom: 4px;
}
.locked-section h3 {
  font-size: 1.1rem; font-weight: 700; margin: 0;
}
.locked-section p {
  color: var(--muted); font-size: .9rem;
  max-width: 380px; line-height: 1.6; margin: 0;
}

/* ── Sidebar navigation ── */
.db-sidebar-nav {
  display: grid; gap: 2px; margin-bottom: 4px;
}
.db-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px;
  font-size: .83rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: background .12s, color .12s;
}
.db-nav-item:hover {
  background: var(--bg-subtle); color: var(--text);
}
.db-nav-item-active {
  background: color-mix(in srgb, var(--indigo) 10%, var(--bg-subtle));
  color: var(--indigo); font-weight: 600;
}
