/* Dark mode is the default look — the light theme is an explicit opt-in via
   the toggle, not something derived from system preference (product
   decision: dark-first, "data center" feel). */
:root,
:root[data-theme="dark"] {
  --bg: #0a0e14;
  --bg-elevated: #10151f;
  --bg-card: #12181f;
  --border: #1f2937;
  --text: #e6edf3;
  --text-dim: #8b98a8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-rgb: 34, 211, 238;
  --critical: #f87171;
  --warning: #fbbf24;
  --good: #34d399;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.35);
  --particle-alpha: 0.55;
  --hero-glow: 0.16;
}

:root[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #dbe6ee;
  --text: #0f172a;
  --text-dim: #55647a;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-rgb: 8, 145, 178;
  --critical: #dc2626;
  --warning: #b45309;
  --good: #15803d;
  --shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.1), 0 8px 20px rgba(15, 23, 42, 0.06), 0 0 28px rgba(var(--accent-rgb), 0.06);
  --particle-alpha: 0.75;
  --hero-glow: 0.32;
}

* { box-sizing: border-box; }

/* Theme-switch smoothness: every themed surface fades color/border/shadow
   together, not just the page background — without this, cards and panels
   (anything without its own more-specific transition rule) snap instantly
   while the body fades, which reads as disconnected/janky mid-switch. */
*, *::before, *::after {
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background 0.15s ease, color 0.15s ease;
}

body { min-height: 100vh; position: relative; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- reveal-on-scroll --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  /* Also carries the theme-switch color/border/shadow transition — a plain
     selector like this beats the lower-specificity global `*` rule, which
     would otherwise leave every revealed element (nearly everything on the
     page) snapping instantly on theme changes instead of fading smoothly. */
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- top bar --- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  min-height: 66px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 7px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover { color: var(--text); background: rgba(var(--accent-rgb), 0.08); }
.nav-link.active { color: var(--accent); }

.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), 0.6));
  animation: logoSpin 12s linear infinite;
  transform-origin: 14px 14px;
}

@keyframes logoSpin {
  0%, 92% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background-color 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

.cta-button {
  background: var(--accent);
  color: #041014;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.cta-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.cta-button.active { background: var(--accent-strong); }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 6px var(--accent); }
  50% { box-shadow: 0 0 14px 2px var(--accent); }
}

/* --- hero --- */
.hero {
  position: relative;
  padding: 64px 0 40px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), var(--hero-glow, 0.16)), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hero h1 {
  font-size: 2.3rem;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.glow-text {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.45);
}

.hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.uniqueness-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 8px;
  padding: 12px 20px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 28px 0 8px;
  flex-wrap: wrap;
}

.cta-button-lg {
  padding: 13px 26px;
  font-size: 0.95rem;
  border-radius: 9px;
}

.cta-secondary {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.cta-secondary:hover { color: var(--accent); }

.usp-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 8px;
}

.usp-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  text-align: left;
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.25s ease, border-color 0.25s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.usp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.usp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.usp-card:hover::before { opacity: 1; }

.usp-card .label {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.usp-card p { margin: 0; color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; }

/* --- section headings (reused by outcomes, and get-started.html) --- */
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 36px;
}

.section-head h2 {
  font-size: 1.7rem;
  margin: 12px 0 10px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* --- outcomes --- */
.outcomes { padding: 40px 0 64px; }

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* "enlarges as you scroll" — a distinct reveal profile from the default
   translateY one: starts slightly scaled down as well as faded, settles to
   full size. Higher specificity than the base [data-reveal] rule so it
   wins for elements that carry both. */
[data-reveal].outcome-card {
  transform: scale(0.9) translateY(16px);
}

[data-reveal].outcome-card.in-view {
  transform: scale(1) translateY(0);
}

.outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.outcome-card:hover { border-color: rgba(var(--accent-rgb), 0.4); }

.outcome-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  margin-bottom: 16px;
}

.outcome-icon svg { width: 24px; height: 24px; }

.outcome-icon.step-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 700;
}

.outcome-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.outcome-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- get-started: access info --- */
.access-info { padding: 8px 0 64px; }

.access-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.access-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.access-card h3 { margin: 0 0 8px; font-size: 0.95rem; }
.access-card p { margin: 0; color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; }

/* --- health score gauge --- */
.score-block {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.score-gauge {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.score-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.score-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
}

.score-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1s cubic-bezier(0.2, 0.7, 0.2, 1), stroke 0.18s ease;
}

.score-number-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-number {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.score-outof { font-size: 0.65rem; color: var(--text-dim); }

.score-side { flex: 1; min-width: 0; }

.score-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }

.score-caption { color: var(--text-dim); font-size: 0.78rem; margin-bottom: 12px; }

.score-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.score-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.score-cat-label { width: 62px; flex-shrink: 0; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.68rem; }

.score-cat-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.score-cat-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.score-cat-num { width: 26px; text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; }

/* --- demo section --- */
.demo {
  padding: 24px 0 80px;
}

.demo-panel {
  --mx: 50%;
  --my: 50%;
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.demo-panel:hover::before { opacity: 1; }

.demo-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.demo-panel h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.demo-panel .sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
  max-width: 440px;
}

.currency-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.currency-select select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.demo-form {
  display: flex;
  gap: 10px;
  position: relative;
}

.demo-form input[type="text"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.demo-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.demo-form button {
  background: var(--accent);
  color: #041014;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}

.demo-form button:hover:not(:disabled) { background: var(--accent-strong); transform: translateY(-1px); }
.demo-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.skip-preview {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.skip-preview button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.skip-preview button:hover { color: var(--accent-strong); }
.skip-preview button:disabled { opacity: 0.6; cursor: not-allowed; text-decoration: none; }

/* --- scanning indicator --- */
.scan {
  display: none;
  margin-top: 18px;
}

.scan.active { display: block; }

.scan-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}

.scan-fill {
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanSweep 1.3s ease-in-out infinite;
}

@keyframes scanSweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

.scan-label {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.demo-status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
  min-height: 1.2em;
}

.demo-status.error { color: var(--critical); }

/* --- results --- */
.results { margin-top: 24px; display: none; }
.results.visible { display: block; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.metric-card .num {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.metric-card .lbl { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.metric-card .caption { font-size: 0.7rem; color: var(--text-dim); opacity: 0.75; margin-top: 4px; }

.tracking-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.issue-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
  background: var(--bg-card);
  animation: fadeUp 0.4s ease both;
}

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

.issue-card .head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge.critical { background: rgba(248, 113, 113, 0.15); color: var(--critical); }
.badge.warning { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.badge.good { background: rgba(52, 211, 153, 0.15); color: var(--good); }

.issue-card .title { font-weight: 600; }
.issue-card .why { color: var(--text-dim); font-size: 0.88rem; margin: 10px 0 0; line-height: 1.5; }

.fix-teaser {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fix-teaser .lock-icon { filter: blur(0); }

.locked-list {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 6px;
}

.locked-list-head {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.locked-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  filter: blur(3px);
  opacity: 0.6;
  user-select: none;
}

.unlock-cta {
  margin-top: 16px;
  text-align: center;
}

.unlock-cta button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #041014;
  border-radius: 8px;
  padding: 11px 22px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.unlock-cta button:hover:not(:disabled) { background: var(--accent-strong); transform: translateY(-1px); }
.unlock-cta button:disabled { opacity: 0.6; cursor: not-allowed; }

.unlock-cta .note {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 40px;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 640px) {
  .usp-row, .metric-row { grid-template-columns: 1fr; }
  .demo-form { flex-direction: column; }
  .demo-panel-head { flex-direction: column; }
  .hero h1 { font-size: 1.7rem; }
  .brand-name { display: none; }
  .nav-link { padding: 7px 8px; font-size: 0.8rem; }
  .theme-toggle, .cta-button { padding: 8px 10px; font-size: 0.78rem; }
  .topbar-actions { gap: 6px; }
  .outcome-grid { grid-template-columns: 1fr; }
  .score-block { flex-direction: column; align-items: flex-start; }
  .score-categories { grid-template-columns: 1fr; }
  .access-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
}

@media (max-width: 900px) {
  .access-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .scan-fill, .pulse-dot, .logo-mark { animation: none; }
}

/* ================= Dashboard ================= */

.state-message {
  padding: 80px 0;
  text-align: center;
  color: var(--text-dim);
}

.state-message.error { color: var(--critical); }

.dash-head {
  padding: 40px 0 24px;
}

.dash-head h1 {
  margin: 10px 0 8px;
  font-size: 1.5rem;
  word-break: break-word;
}

.dash-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dash-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.recrawl-block { text-align: right; }

.recrawl-status {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 260px;
}

.recrawl-status.error { color: var(--critical); }

@media (max-width: 640px) {
  .dash-head-row { flex-direction: column; align-items: flex-start; }
  .recrawl-block { text-align: left; }
}

.dash-metric-row {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 24px;
}

.critical-num { color: var(--critical); }

.dash-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover { border-color: var(--accent); color: var(--text); }

.filter-pill.active {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.issue-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--bg-card);
  overflow: hidden;
}

.issue-row-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.issue-row-title { font-weight: 600; flex: 1; }

.issue-row-meta {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.badge.sitewide {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
}

.chevron {
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.18s ease;
  font-size: 0.9rem;
}

.issue-row-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}

.issue-row-body .why {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 14px 0 0;
}

.row-impact {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--accent);
}

.impact-note {
  color: var(--text-dim);
  font-style: italic;
}

.fix-steps {
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.fix-steps li { margin-bottom: 6px; line-height: 1.5; }

.affected-pages {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.affected-pages-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.affected-pages ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
}

.affected-pages a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.affected-pages a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .dash-metric-row { grid-template-columns: repeat(2, 1fr); }
  .issue-row-meta { display: none; }
}
