/* AI Search Readiness Audit — web app CSS.
   Token system is shared between landing, progress, and report chrome
   so the journey feels continuous: same fonts, same surfaces, same
   accent. */

:root {
  --bg: #FBFAF7;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-soft: #F4F2EC;
  --surface-sunk: #F7F5F0;
  --border: #ECE9E1;
  --border-strong: #DCD7CB;
  --ink: #1A1816;
  --ink-secondary: #4A4742;
  --ink-muted: #79756E;
  --ink-faint: #A8A39A;

  --accent: #0F7D6E;
  --accent-hover: #0B6359;
  --accent-soft: #E0F0EC;
  --accent-tint: #F1F8F6;
  --accent-ink: #FFFFFF;
  --accent-strong: var(--accent-hover);

  --sev-critical: #B53F2E;
  --sev-critical-bg: #FBE9E5;
  --sev-critical-ink: #7A2C20;
  --sev-warning: #B8731A;
  --sev-warning-bg: #FAEED7;
  --sev-warning-ink: #7A4D11;
  --sev-good: #0F7D5A;
  --sev-good-bg: #DEF1E7;
  --sev-good-ink: #0B5A41;
  --sev-info: var(--sev-good);

  --shadow-xs: 0 1px 1px rgba(20, 18, 16, 0.04);
  --shadow-sm: 0 1px 2px rgba(20, 18, 16, 0.05), 0 0 0 1px rgba(20, 18, 16, 0.025);
  --shadow-md: 0 6px 24px rgba(20, 18, 16, 0.07), 0 0 0 1px rgba(20, 18, 16, 0.03);
  --shadow-lg: 0 20px 48px rgba(20, 18, 16, 0.12), 0 0 0 1px rgba(20, 18, 16, 0.04);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-card: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --sans: "Geist", "Inter", "SF Pro Display", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Match body's overflow clip so decorative effects (e.g. .hero-halo
     that bleeds past the viewport) can't trigger a horizontal scrollbar. */
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "tnum";
  /* Decorative halos and other bleeding effects must not push a
     horizontal scrollbar onto the page. */
  overflow-x: clip;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent-soft); color: var(--ink); }

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
}
.topbar-spacer { flex: 0 0 auto; }
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.topbar-nav a, .topbar-nav button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.topbar-nav a:hover, .topbar-nav button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}
.topbar-cta {
  background: var(--ink) !important;
  color: var(--bg-elevated) !important;
}
.topbar-cta:hover {
  background: var(--ink-secondary) !important;
  color: var(--bg-elevated) !important;
}

/* ---- Page shell ---- */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}
.page-narrow { max-width: 720px; }

/* ---- Eyebrow ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.eyebrow.muted::before { background: var(--ink-faint); }

/* ---- Hero (landing) ---- */
.hero {
  margin-bottom: 88px;
  position: relative;
}
.hero > * { position: relative; }
.hero-halo {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
  background:
    radial-gradient(60% 60% at 20% 30%, color-mix(in oklch, var(--accent) 14%, transparent) 0%, transparent 70%),
    radial-gradient(50% 50% at 80% 20%, color-mix(in oklch, var(--accent) 9%, transparent) 0%, transparent 70%);
  filter: blur(6px);
  animation: haloDrift 22s ease-in-out infinite alternate;
}
@keyframes haloDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -1%, 0) scale(1.04); }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.02); }
}
.hero-title {
  margin: 0 0 22px;
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 580;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink);
  text-wrap: balance;
  max-width: 18ch;
}
.hero-title em {
  font-style: normal;
  color: var(--ink);
  animation: emInk 900ms 500ms cubic-bezier(.2,.7,.2,1) both;
}
@keyframes emInk {
  from { color: var(--ink); }
  to   { color: var(--accent); }
}

/* Staggered entrance for landing hero */
.land-rise {
  opacity: 0;
  transform: translateY(10px);
  animation: landRise 700ms cubic-bezier(.2,.7,.2,1) forwards;
}
.land-rise.d1 { animation-delay: 60ms; }
.land-rise.d2 { animation-delay: 140ms; }
.land-rise.d3 { animation-delay: 230ms; }
.land-rise.d4 { animation-delay: 320ms; }
.land-rise.d5 { animation-delay: 420ms; }
.land-rise.d6 { animation-delay: 540ms; }
@keyframes landRise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .land-rise { opacity: 1; transform: none; animation: none; }
  .hero-title em { animation: none; color: var(--accent); }
  .hero-halo { animation: none; }
}
.hero-sub {
  margin: 0 0 40px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ---- Mode toggle (segmented) ---- */
.mode-toggle {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.mode-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.mode-toggle button.active {
  background: var(--bg-elevated);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

/* ---- Audit form (single URL row) ---- */
.audit-form { max-width: 640px; }
.input-group {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.audit-url, .input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.audit-url:focus, .input:focus { outline: none; }
.audit-url::placeholder, .input::placeholder { color: var(--ink-faint); }
.audit-submit {
  appearance: none;
  border: 0;
  margin: 4px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 120ms ease, transform 120ms ease;
}
.audit-submit:hover { background: var(--accent-hover); color: var(--accent-ink); }
.audit-submit:active { transform: translateY(1px); }
.audit-submit svg { flex-shrink: 0; }

/* ---- Standalone input (used by compare card) ---- */
.input-standalone {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input-standalone:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input-standalone::placeholder { color: var(--ink-faint); }

/* ---- Compare card (compare mode on landing) ---- */
.compare-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.compare-field { display: flex; flex-direction: column; gap: 8px; }
.compare-field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.compare-card .competitor-field.hidden { display: none; }
.compare-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  gap: 12px;
}
.add-competitor {
  appearance: none;
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--ink-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.add-competitor:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Hero meta row ---- */
[hidden] { display: none !important; }
.hero-meta-row {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.meta-item svg { flex-shrink: 0; color: var(--ink-muted); }
.example-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.example-link:hover { color: var(--accent-hover); }

/* ---- Three-question cards ---- */
.bullets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.bullets article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.bullets article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.bullet-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}
.bullets h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bullets p { margin: 0; font-size: 14px; color: var(--ink-muted); }

.section-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.12;
  max-width: 22ch;
}

/* ---- Built for non-technical readers ---- */
.nontech {
  margin-top: 88px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 48px;
  align-items: start;
}
.nontech-title {
  margin: 4px 0 14px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  max-width: 14ch;
}
.nontech-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 36ch;
}
.nontech-steps {
  display: grid;
  gap: 14px;
}
.nontech-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
}
.nontech-step-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 3px;
}
.nontech-step h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nontech-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---- Preview card ---- */
.preview-card {
  margin-top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.preview-card-head { padding: 28px 32px 0; }
.preview-card-head .section-title { font-size: 22px; max-width: 26ch; }
.preview-card-head p { margin: 8px 0 24px; color: var(--ink-muted); font-size: 14px; }
.preview-mock {
  background: var(--surface-sunk);
  border-top: 1px solid var(--border);
  padding: 28px 32px;
}
.preview-mock-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}
.preview-mock-url {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}
.preview-mock-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.preview-ring {
  width: 64px;
  height: 64px;
  position: relative;
  flex-shrink: 0;
}
.preview-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.preview-ring-text .grade {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.preview-ring-text .val {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.sev-bar {
  display: flex;
  height: 8px;
  width: 120px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
}
.sev-bar-critical { background: var(--sev-critical); }
.sev-bar-warning { background: var(--sev-warning); }
.sev-bar-good { background: var(--sev-good); }
.preview-findings { display: grid; gap: 8px; }
.preview-finding {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
}
.preview-card-foot {
  padding: 18px 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.btn-quiet {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  border: 0;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease;
}
.btn-quiet:hover { background: var(--border); color: var(--ink); }

/* ---- Prose pages (how-it-works, waitlist) ---- */
.prose {
  max-width: 720px;
}
.prose.narrow { max-width: 560px; }
.prose h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.prose h2 {
  margin: 48px 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prose h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.prose p {
  margin: 12px 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-secondary);
}
.prose p strong, .prose li strong {
  color: var(--ink);
  font-weight: 600;
}
.prose-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}
.prose-card-body { min-width: 0; }
.prose-card-body p { margin: 6px 0 0; }
.prose-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-tint);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.prose-list {
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.prose-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border);
}
.prose-list li:last-child { border-bottom: none; }
.prose-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.prose-feature {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}
.prose-cta { margin-top: 32px; }
.waitlist-form {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.waitlist-form .btn-primary { align-self: flex-start; }
.waitlist-helper {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-faint);
  max-width: 56ch;
}
.btn-primary {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 120ms ease, transform 120ms ease;
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-primary:active { transform: translateY(1px); }

/* ---- Methodology page ---- */
.method-page { max-width: 1080px; }
.method-hero { max-width: 720px; margin: 0 0 56px; }
.method-hero h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 580;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}
.method-hero .lede {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 62ch;
}

.method-section { margin: 0 0 64px; }
.method-section h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.method-section .section-intro {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 60ch;
  line-height: 1.55;
}

/* Numbered category cards */
.method-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.method-cat-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
}
.method-cat-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.method-cat-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.method-cat-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Sources — sticky-rail + source group cards */
.method-sources-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: start;
}
.method-source-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.method-source-rail a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 8px 10px;
  border-left: 2px solid var(--border);
}
.method-source-rail a:hover {
  color: var(--ink);
  border-left-color: var(--ink-muted);
}
.method-source-rail .rail-num {
  opacity: 0.55;
  margin-right: 8px;
}

.method-source-list { display: flex; flex-direction: column; gap: 28px; }
.method-source-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.method-source-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px;
}
.method-source-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.method-source-card > p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 62ch;
}
.method-source-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.method-source-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.method-source-items li:first-child { border-top: none; }
.method-source-items .source-label {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.method-source-items .source-label:hover { color: var(--accent); }
.method-source-items .source-host {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.method-source-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 4px;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-style: italic;
  line-height: 1.5;
}

/* Confidence rows */
.method-tag {
  display: inline-flex; align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}
.method-tag--good {
  background: var(--sev-good-bg);
  color: var(--sev-good-ink);
}
.method-tag--warning {
  background: var(--sev-warning-bg);
  color: var(--sev-warning-ink);
}
.method-conf-rows { display: grid; gap: 10px; }
.method-conf-row {
  display: grid;
  grid-template-columns: 180px 1fr 1.4fr;
  gap: 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
}
.method-conf-desc { font-size: 14px; line-height: 1.55; color: var(--ink); }
.method-conf-example { font-size: 13px; line-height: 1.55; color: var(--ink-muted); }

/* About this audit run */
.method-run-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.method-run-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 18px;
}
.method-run-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.method-run-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.method-run-card > p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 62ch;
}
.method-run-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}
.method-run-cell {
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--border);
}
.method-run-grid .method-run-cell:nth-child(n+4) { border-bottom: none; }
.method-run-key {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.method-run-value { font-size: 13.5px; color: var(--ink); word-break: break-word; }
.method-run-value--mono { font-family: var(--mono); }

.method-cta { margin: 0 0 48px; }

@media (max-width: 800px) {
  .method-cats { grid-template-columns: 1fr; }
  .method-sources-layout { grid-template-columns: 1fr; gap: 20px; }
  .method-source-rail { display: none; }
  .method-conf-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
  .method-conf-example { display: none; }
  .method-run-grid { grid-template-columns: 1fr; }
  .method-run-grid .method-run-cell { border-bottom: 1px solid var(--border); }
  .method-run-grid .method-run-cell:last-child { border-bottom: none; }
}

/* ---- Footer ---- */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 32px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.footer a {
  color: var(--ink-muted);
  text-decoration: none;
}
.footer a:hover { color: var(--accent); }
.footer-sep { color: var(--ink-faint); margin: 0 8px; }

/* ---- Progress page ---- */
.progress-shell {
  max-width: 640px;
  margin: 0 auto;
}
.progress-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.progress-url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--surface-soft);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}
.phase-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.phase-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--ink-muted);
}
.phase-list li.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  color: var(--ink);
}
.phase-list li.done {
  color: var(--ink-muted);
  background: var(--surface-soft);
}
.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}
.phase-list li.active .phase-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 1.4s ease-in-out infinite;
}
.phase-list li.done .phase-dot { background: var(--sev-good); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.progress-meta {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.error-card {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--sev-critical);
  background: var(--sev-critical-bg);
  border-radius: var(--radius-card);
  color: var(--sev-critical-ink);
  font-size: 14px;
}

/* ---- Full-page error template (404, 429, 400, 500) ---- */
.error-shell {
  max-width: 560px;
  margin: 24px auto;
  padding: 40px 0 0;
  text-align: left;
}
.error-code {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.error-code::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.error-headline {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}
.error-body {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-secondary);
}
.error-body code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--surface-soft);
  padding: 1px 6px;
  border-radius: 4px;
}
.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .error-shell { padding: 24px 0 0; }
  .error-headline { font-size: clamp(22px, 7vw, 30px); }
  .error-body { font-size: 16px; }
  .error-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .error-actions .btn-primary,
  .error-actions .btn-quiet { width: 100%; text-align: center; }
}

/* ---- Result page chrome (used by injected report wrapper) ---- */
.result-chrome {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 32px 0 0;
  box-shadow: var(--shadow-sm);
}
.next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 100%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 20px 0;
}
.next-step-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.next-step-text span { font-size: 13px; color: var(--ink-muted); }
.next-step a {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  transition: background 120ms ease;
}
.next-step a:hover { background: var(--accent-hover); }
.utility-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.utility-row a, .utility-row button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.utility-row a:hover, .utility-row button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Comparison form (post-audit) ---- */
.compare-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.compare-form-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.compare-form-card .helper {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--ink-muted);
}
.compare-form .field {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
}
.compare-form label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.compare-form input[type="url"], .compare-form input[type="text"] {
  font-family: var(--sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.compare-form input:disabled {
  background: var(--surface-soft);
  color: var(--ink-muted);
}
.compare-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.compare-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 0;
}
.compare-time {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.competitor-field.hidden { display: none; }
.optional-tag {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 0.95em;
  font-weight: 400;
}

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .page { padding: 36px 18px 60px; }
  .bullets { grid-template-columns: 1fr; }
  .topbar { padding: 12px 18px; }
  .hero-title { max-width: none; font-size: clamp(30px, 8vw, 44px); }
  .hero-meta-row { gap: 12px; }
  .example-link { margin-left: 0; }
  .compare-actions { flex-direction: column-reverse; gap: 12px; align-items: stretch; }
  .compare-actions .audit-submit { width: 100%; }
  .preview-mock-header { grid-template-columns: 1fr; gap: 12px; }
  .nontech { grid-template-columns: 1fr; gap: 24px; }
  .nontech-title { max-width: none; }
  .nontech-sub { max-width: none; }
  .footer { flex-direction: column; gap: 8px; padding: 20px 18px; }
}
