/* ===== Free ADA Checker — v4 Visual Impact Redesign ===== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --brand: #0f172a;
  --brand-light: #1e293b;
  --brand-glow: rgba(37, 99, 235, .25);

  /* Accent */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-subtle: #eff6ff;

  /* Card accent palette */
  --accent-1: #3b82f6;
  --accent-2: #10b981;
  --accent-3: #f59e0b;
  --accent-4: #f43f5e;

  /* Surfaces */
  --surface: #f8fafc;
  --surface-raised: #ffffff;
  --bg-body: #ffffff;

  /* Borders */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-dark: #f1f5f9;
  --text-on-dark-muted: #cbd5e1;

  /* Semantic */
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --bad-border: #fecaca;
  --minor: #64748b;
  --minor-bg: #f1f5f9;
  --minor-border: #e2e8f0;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3.25rem;

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Shadows */
  --shadow: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.03);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration: 200ms;
  --duration-slow: 400ms;
}


/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--accent-hover); }

nav a, .cta, .cta-outline, .logo { text-decoration: none; }

img { max-width: 100%; display: block; }

code, kbd, pre { font-family: var(--font-mono); }

code {
  background: var(--brand-light);
  color: #e2e8f0;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
}

pre {
  background: var(--brand-light);
  padding: var(--sp-4);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: var(--sp-4) 0;
}
pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }


/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--accent);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  z-index: 100;
  text-decoration: none;
  transition: top var(--duration) var(--ease);
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}


/* ---------- Layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--sp-6); }
.center { text-align: center; }
.muted { color: var(--text-muted); }


/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--brand);
  color: var(--text-on-dark);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo:hover { color: #fff; }

/* H1 wrapper for logo */
header h1 { margin: 0; font-size: inherit; }
header h1 .logo { font-size: var(--text-xl); }

nav#main-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
nav#main-nav a {
  color: var(--text-on-dark-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
nav#main-nav a:hover,
nav#main-nav a:focus {
  color: #fff;
  background: rgba(255,255,255,.08);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-3);
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: rgba(255,255,255,.08); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-on-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ---------- Hero ---------- */
.hero {
  background: var(--brand);
  color: var(--text-on-dark);
  padding: var(--sp-16) 0 var(--sp-12);
  position: relative;
  overflow: hidden;
}

/* Animated gradient orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -30%;
  right: -30%;
  bottom: -60%;
  background:
    radial-gradient(ellipse 600px 400px at 25% 50%, rgba(37, 99, 235, 0.35), transparent 70%),
    radial-gradient(ellipse 500px 350px at 75% 40%, rgba(56, 189, 248, 0.2), transparent 70%),
    radial-gradient(ellipse 450px 300px at 50% 20%, rgba(99, 102, 241, 0.2), transparent 70%);
  animation: heroOrbs 25s ease-in-out infinite;
  pointer-events: none;
}

/* Subtle grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-full);
  color: #93c5fd;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--sp-6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Gradient text for hero heading */
.hero h2 {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 20%, #60a5fa 60%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-on-dark-muted);
  font-size: var(--text-lg);
  margin: 0 auto var(--sp-4);
  max-width: 640px;
  line-height: 1.7;
}
.hero .scan {
  display: flex;
  gap: var(--sp-3);
  max-width: 640px;
  margin: var(--sp-6) auto var(--sp-4);
}
.hero input[type=url],
.hero input[type=text] {
  flex: 1;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.hero input:focus {
  border-color: rgba(37, 99, 235, .6);
  background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.hero input::placeholder { color: var(--text-on-dark-muted); }

/* Glowing hero CTA */
.hero button,
.hero .cta {
  padding: var(--sp-4) var(--sp-8);
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.4), 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: background var(--duration) var(--ease), transform 100ms var(--ease), box-shadow var(--duration) var(--ease);
}
.hero button:hover,
.hero .cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 36px rgba(37, 99, 235, 0.6), 0 8px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.hero button:active,
.hero .cta:active { transform: scale(0.97); }

.hero .trust {
  color: var(--text-on-dark-muted);
  font-size: var(--text-sm);
  margin-top: var(--sp-2);
}
.hero .powered-by {
  font-size: var(--text-sm);
  margin-top: var(--sp-2);
  color: var(--text-on-dark-muted);
}
.hero .powered-by a { color: #93c5fd; }
.hero .sample-link { font-size: var(--text-sm); margin-top: var(--sp-2); }
.hero .sample-link a { color: #93c5fd; text-decoration: underline; text-underline-offset: 2px; }

/* Staggered hero entrance */
.hero > .container > * {
  animation: fadeInUp 600ms var(--ease-out) both;
}
.hero > .container > *:nth-child(1) { animation-delay: 0ms; }
.hero > .container > *:nth-child(2) { animation-delay: 80ms; }
.hero > .container > *:nth-child(3) { animation-delay: 160ms; }
.hero > .container > *:nth-child(4) { animation-delay: 240ms; }
.hero > .container > *:nth-child(5) { animation-delay: 320ms; }
.hero > .container > *:nth-child(6) { animation-delay: 400ms; }
.hero > .container > *:nth-child(7) { animation-delay: 480ms; }


/* ---------- Sections ---------- */
.section {
  padding: var(--sp-10) 0;
  position: relative;
}
.section.tight { padding: var(--sp-6) 0; }

/* Alternating section background */
.section-alt { background: var(--surface); }

.section h2 {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Section heading accent line — disabled (too small to act as divider) */

.section h3 { margin: 0 0 var(--sp-2); }
.section > .container > p.muted { margin-bottom: var(--sp-5); }


/* ---------- Cards / Features Grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-5);
  margin: var(--sp-5) auto;
}
.feature {
  grid-column: span 6;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

/* Colored top accent borders cycling through 4 colors */
.features > .feature:nth-child(4n+1) { border-top: 3px solid var(--accent-1); }
.features > .feature:nth-child(4n+2) { border-top: 3px solid var(--accent-2); }
.features > .feature:nth-child(4n+3) { border-top: 3px solid var(--accent-3); }
.features > .feature:nth-child(4n+4) { border-top: 3px solid var(--accent-4); }

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
/* Preserve accent border-top on hover */
.features > .feature:nth-child(4n+1):hover { border-top-color: var(--accent-1); }
.features > .feature:nth-child(4n+2):hover { border-top-color: var(--accent-2); }
.features > .feature:nth-child(4n+3):hover { border-top-color: var(--accent-3); }
.features > .feature:nth-child(4n+4):hover { border-top-color: var(--accent-4); }

.feature.span-3 { grid-column: span 3; }
.feature.span-4 { grid-column: span 4; }
.feature.span-12 { grid-column: span 12; }

.feature h3 {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-lg);
  font-weight: 700;
}
.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.feature .stat {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--accent);
}
.feature ul {
  margin: var(--sp-2) 0 0;
  padding-left: var(--sp-5);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.feature li { margin: var(--sp-1) 0; }

.features.left-align { text-align: left; }


/* ---------- CTA Buttons ---------- */
.cta, .cta-outline {
  display: inline-block;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration) var(--ease), transform 100ms var(--ease), box-shadow var(--duration) var(--ease), color var(--duration) var(--ease);
}
.cta {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .2);
}
.cta:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, .35);
  transform: translateY(-1px);
}
.cta:active { transform: scale(0.97); }

.cta-outline {
  background: var(--surface-raised);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.cta-outline:hover {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}
.cta-outline:active { transform: scale(0.97); }

.cta + .cta-outline,
.cta-outline + .cta { margin-left: var(--sp-2); }


/* ---------- Pills & Chips ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-weight: 600;
  font-size: var(--text-sm);
  border: 1px solid #bfdbfe;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
}
.chip.critical { background: var(--bad-bg); color: #991b1b; border: 1px solid var(--bad-border); }
.chip.serious  { background: var(--warn-bg); color: #92400e; border: 1px solid var(--warn-border); }
.chip.moderate { background: var(--ok-bg); color: #065f46; border: 1px solid var(--ok-border); }
.chip.minor    { background: var(--minor-bg); color: #334155; border: 1px solid var(--minor-border); }


/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--sp-2);
  margin-top: var(--sp-3);
}
.table thead th {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 0 var(--sp-4);
  font-weight: 600;
}
.table tbody tr {
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}
.table tbody td {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.table tbody tr td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.table tbody tr td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}


/* ---------- Issue Cards (Results) ---------- */
.issues {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-5);
  margin: var(--sp-5) 0;
}
.issue {
  grid-column: span 6;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.issue:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.issue h4 { margin: 0 0 var(--sp-2); font-size: var(--text-base); }
.issue .meta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.issue .issue-description {
  margin: var(--sp-3) 0 var(--sp-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.issue .issue-fix {
  margin: 0;
  font-size: var(--text-sm);
}
.issue.error-card {
  border-left: 4px solid var(--bad);
}
.issue.success-card {
  border-left: 4px solid var(--ok);
  text-align: center;
  padding: var(--sp-8);
}
.issue.success-card h3 { color: var(--ok); margin: 0 0 var(--sp-2); }
.issue.success-card .share-buttons {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}


/* ---------- Badge Card ---------- */
.badge-card {
  text-align: center;
  padding: var(--sp-8);
  border-left: 4px solid var(--accent);
}
.badge-card h3 { margin: 0 0 var(--sp-2); }
.badge-preview {
  margin: var(--sp-4) 0;
  display: flex;
  justify-content: center;
}
.embed-code-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 640px;
  margin: var(--sp-3) auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.embed-code {
  flex: 1;
  display: block;
  padding: var(--sp-3);
  font-size: var(--text-xs);
  background: var(--surface);
  color: var(--text-secondary);
  text-align: left;
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.5;
}
.copy-btn {
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
  white-space: nowrap;
}
.copy-btn:hover { background: #1d4ed8; }

/* ---------- Sticky Summary ---------- */
.sticky-summary {
  position: sticky;
  top: 64px;
  z-index: 9;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) 0;
  margin: 0 0 var(--sp-4);
}
.sticky-summary .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.sticky-summary .url-display {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.sticky-summary .url-text {
  font-weight: 600;
  word-break: break-all;
}


/* ---------- Progress & Scanning ---------- */
.scan-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-md);
}
.scan-card h2 { margin: 0 0 var(--sp-2); }

.progress {
  height: 10px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--sp-4) 0;
}

/* Shimmer progress bar */
.bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #60a5fa, var(--accent));
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
  animation: shimmer 2s linear infinite;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  word-break: break-all;
}

.scan-hint {
  font-size: var(--text-xs);
  margin: var(--sp-2) 0 0;
}

.scan-container { max-width: 760px; margin: var(--sp-10) auto; }


/* ---------- FAQ ---------- */
.faq-section { margin-top: var(--sp-10); }
.faq-section > h2 {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--border);
}

.faq-item {
  margin-bottom: var(--sp-5);
  padding: var(--sp-6);
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}
.faq-item h3 {
  margin: 0 0 var(--sp-3);
  font-size: var(--text-lg);
}
.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}
.faq-item p + p { margin-top: var(--sp-3); }


/* ---------- Guide / Article Content ---------- */
.guide-section { margin-bottom: var(--sp-10); }
.guide-section h2 {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--border);
}
.guide-section h3 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  color: var(--accent);
}
.guide-section p {
  line-height: 1.8;
  margin-bottom: var(--sp-4);
}
.guide-section ul,
.guide-section ol {
  margin: var(--sp-4) 0 var(--sp-5) var(--sp-6);
  line-height: 1.8;
}
.guide-section li { margin-bottom: var(--sp-2); }

.article-content { max-width: 800px; margin: 0 auto; }
.article-content h2 {
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--border);
}
.article-content h3 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  color: var(--accent);
}
.article-content p {
  line-height: 1.8;
  margin-bottom: var(--sp-4);
}
.article-content ul,
.article-content ol {
  margin: var(--sp-4) 0 var(--sp-5) var(--sp-6);
  line-height: 1.8;
}
.article-content li { margin-bottom: var(--sp-2); }
.article-content > p:first-of-type { font-size: var(--text-lg); }


/* ---------- Info / Tip / Example Boxes ---------- */
.info-box, .tip-box {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  padding: var(--sp-6);
  margin: var(--sp-5) 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.info-box.warning { border-left-color: var(--warn); }
.info-box h4, .tip-box h4 {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-base);
}
.info-box p, .tip-box p { margin: 0; line-height: 1.7; }

.example-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--sp-6);
  margin: var(--sp-5) 0;
}
.example-box h4 { margin: 0 0 var(--sp-4); }
.example-box .bad { color: var(--bad); margin-bottom: var(--sp-2); }
.example-box .good { color: var(--ok); margin-bottom: var(--sp-2); }

.intro-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin: var(--sp-5) 0;
}
.intro-box p { margin: 0; line-height: 1.75; }
.intro-box h2 { margin: 0 0 var(--sp-4); }


/* ---------- Table of Contents ---------- */
.toc {
  background: var(--surface);
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-8);
  border: 1px solid var(--border);
}
.toc h3 { margin: 0 0 var(--sp-4); }
.toc ul { margin: 0; padding-left: var(--sp-5); }
.toc li { margin-bottom: var(--sp-2); }
.toc a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.toc a:hover { text-decoration: underline; }


/* ---------- Resource Cards & Grid ---------- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}
.resource-card {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.resource-card h3 { margin: 0 0 var(--sp-3); }
.resource-card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.resource-card h3 a:hover { color: var(--accent); }
.resource-card p {
  margin: 0 0 var(--sp-4);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: var(--text-sm);
}
.resource-card .meta { font-size: var(--text-sm); color: var(--text-muted); }
.resource-card .tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 3px var(--sp-2);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  margin-right: var(--sp-2);
}


/* ---------- Category Sections ---------- */
.category-section { margin-top: var(--sp-10); }
.category-section h2 {
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--border);
}
.category-section > p {
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}


/* ---------- Mistake Cards ---------- */
.mistake-card {
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  margin: var(--sp-5) 0;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}
.mistake-card h2 {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-xl);
}
.mistake-card .wcag-ref {
  color: var(--accent);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
  display: block;
}
.mistake-card h3 {
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
  font-size: var(--text-base);
}
.mistake-card p { line-height: 1.75; margin-bottom: var(--sp-3); }
.mistake-card ul {
  margin: var(--sp-3) 0 var(--sp-3) var(--sp-6);
  line-height: 1.75;
}
.mistake-card li { margin-bottom: var(--sp-2); }

.severity {
  display: inline-block;
  padding: 3px var(--sp-2);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-left: var(--sp-2);
  vertical-align: middle;
}
.severity-critical { background: var(--bad-bg); color: var(--bad); }
.severity-serious { background: var(--warn-bg); color: var(--warn); }
.severity-moderate { background: var(--accent-light); color: var(--accent); }


/* ---------- Contrast Demos ---------- */
.contrast-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin: var(--sp-5) 0;
}
.contrast-example {
  padding: var(--sp-6);
  border-radius: var(--radius);
  text-align: center;
}
.contrast-example .ratio { font-size: var(--text-sm); margin-top: var(--sp-2); }
.contrast-pass { border: 2px solid var(--ok); }
.contrast-fail { border: 2px solid var(--bad); }

.ratio-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-5) 0;
}
.ratio-table th,
.ratio-table td {
  padding: var(--sp-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.ratio-table th {
  background: var(--surface);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
}


/* ---------- Blog Meta ---------- */
.blog-meta {
  display: flex;
  gap: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: var(--sp-2) 0 var(--sp-4);
}


/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }


/* ---------- Pricing ---------- */
.plan {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow);
  max-width: 320px;
  margin: 0 auto;
}
.price {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  margin: var(--sp-3) 0;
}


/* ---------- Ad Containers ---------- */
.ad-container {
  padding: var(--sp-3) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ad-container.ad-top { margin-top: 0; }
.ad-container.ad-middle { margin: var(--sp-2) 0; }
.ad-container.ad-bottom { margin-bottom: 0; }
.ad-slot {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
}
.ad-slot::before { content: "Advertisement"; }


/* ---------- Footer ---------- */
footer {
  background: var(--brand);
  color: var(--text-on-dark-muted);
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: var(--sp-10);
}

/* Multi-column footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: var(--sp-6);
}

.footer-brand .footer-logo {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 800;
  color: #fff;
  margin: 0 0 var(--sp-3);
}
.footer-brand p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 320px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--sp-3);
}
.footer-col a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--duration) var(--ease);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { margin: 0; font-size: var(--text-sm); }
.footer-bottom a {
  color: var(--text-on-dark-muted);
  transition: color var(--duration) var(--ease);
}
.footer-bottom a:hover { color: #fff; }
.footer-powered {
  font-size: var(--text-xs);
  color: #8393a7;
}

/* Legacy footer support (backwards compat during transition) */
footer .footer-links { font-size: var(--text-sm); margin: 0; }
footer .footer-links + .footer-powered { margin-top: var(--sp-2); }

/* Callout card for protect page */
.callout-warning {
  background: var(--bad-bg);
  color: #991b1b;
  padding: var(--sp-3);
  border-radius: var(--radius);
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
}

/* Section with results scan-again form */
.scan-again { max-width: 600px; margin: var(--sp-3) auto; }

/* Summary features override for tighter top margin */
.features.summary { margin-top: 0; }

/* Findings heading */
.findings-heading { margin: var(--sp-3) 0; }

/* Results ad spacing */
.ad-container.ad-results { margin-bottom: var(--sp-4); }
.ad-container.ad-results-middle { margin: var(--sp-4) 0; }
.ad-container.ad-results-bottom { margin-top: var(--sp-4); }


/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ---------- Focus & A11y ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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


/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

@keyframes heroOrbs {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(3%, -5%) rotate(3deg); }
  50% { transform: translate(-4%, 4%) rotate(-4deg); }
  75% { transform: translate(4%, 3%) rotate(2deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.section, main > .scan-card, main > .section {
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}


/* ---------- Result Page: Score Hero ---------- */
.result-hero {
  background: var(--brand);
  color: var(--text-on-dark);
  padding: var(--sp-10) 0 var(--sp-8);
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  inset: -60% -30%;
  pointer-events: none;
}
.result-hero--green::before {
  background: radial-gradient(ellipse 500px 350px at 30% 50%, rgba(16, 185, 129, .25), transparent 70%);
}
.result-hero--blue::before {
  background: radial-gradient(ellipse 500px 350px at 30% 50%, rgba(59, 130, 246, .25), transparent 70%);
}
.result-hero--amber::before {
  background: radial-gradient(ellipse 500px 350px at 30% 50%, rgba(245, 158, 11, .25), transparent 70%);
}
.result-hero--red::before {
  background: radial-gradient(ellipse 500px 350px at 30% 50%, rgba(239, 68, 68, .25), transparent 70%);
}
.result-hero--clean::before {
  background:
    radial-gradient(ellipse 500px 350px at 30% 50%, rgba(16, 185, 129, .3), transparent 70%),
    radial-gradient(ellipse 400px 300px at 70% 40%, rgba(56, 189, 248, .15), transparent 70%);
}
.result-hero--green { color: #34d399; }
.result-hero--blue { color: #60a5fa; }
.result-hero--amber { color: #fbbf24; }
.result-hero--red { color: #f87171; }

.result-hero > .container { position: relative; z-index: 1; }

.result-hero__content {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.result-hero__ring-wrap {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  height: 160px;
}
.result-hero__ring { width: 100%; height: 100%; }
.result-hero__ring-progress {
  transition: stroke-dashoffset 1.2s var(--ease-out);
}
.result-hero__grade {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.result-hero__grade-letter {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1;
  color: var(--text-on-dark);
}
.result-hero__grade-pct {
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  margin-top: var(--sp-1);
}
.result-hero__checkmark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-hero__check-path {
  transition: stroke-dashoffset 0.5s var(--ease-out);
}
.result-hero__text { flex: 1; min-width: 0; }
.result-hero__heading {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin: 0 0 var(--sp-2);
  color: var(--text-on-dark);
}
.result-hero__heading--clean {
  background: linear-gradient(135deg, #ffffff 20%, #34d399 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result-hero__url {
  font-size: var(--text-base);
  color: var(--text-on-dark-muted);
  margin: 0 0 var(--sp-1);
  word-break: break-all;
}
.result-hero__meta {
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  margin: 0;
  opacity: .8;
}
.result-hero__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.result-hero__actions .cta {
  box-shadow: 0 0 24px rgba(37, 99, 235, .4);
}
.result-hero__actions .cta-outline {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
  color: var(--text-on-dark);
}
.result-hero__actions .cta-outline:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}


/* ---------- Result Page: Stat Bar ---------- */
.result-stats {
  display: flex;
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
  flex-wrap: wrap;
}
.result-stat {
  flex: 1;
  min-width: 100px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  text-align: center;
  box-shadow: var(--shadow);
}
.result-stat__count {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1;
}
.result-stat__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}
.result-stat--critical .result-stat__count { color: var(--bad); }
.result-stat--serious .result-stat__count { color: var(--warn); }
.result-stat--moderate .result-stat__count { color: var(--accent); }
.result-stat--minor .result-stat__count { color: var(--minor); }
.result-stat--passed .result-stat__count { color: var(--ok); }


/* ---------- Result Page: Issue Cards ---------- */
.result-issues__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.result-issues__title {
  margin: 0;
  font-size: var(--text-xl);
}
.result-expand-toggle {
  font-size: var(--text-xs);
  padding: var(--sp-2) var(--sp-3);
}
.result-issues {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.result-issue {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.result-issue--critical { border-left: 4px solid var(--bad); }
.result-issue--serious { border-left: 4px solid var(--warn); }
.result-issue--moderate { border-left: 4px solid var(--accent); }
.result-issue--minor { border-left: 4px solid var(--minor); }

.result-issue__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  list-style: none;
  gap: var(--sp-3);
}
.result-issue__summary::-webkit-details-marker { display: none; }
.result-issue__summary::marker { display: none; content: ''; }

.result-issue__title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  flex: 1;
}
.result-issue__title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-issue__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.result-issue__chevron {
  transition: transform var(--duration) var(--ease);
  flex-shrink: 0;
}
.result-issue[open] .result-issue__chevron {
  transform: rotate(180deg);
}

.result-issue__body {
  padding: 0 var(--sp-5) var(--sp-5);
  border-top: 1px solid var(--border);
}
.result-issue__explain {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
}
.result-issue__explain h5 {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}
.result-issue__explain p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}
.result-issue__snippets {
  margin-top: var(--sp-4);
}
.result-issue__snippets h5 {
  margin: 0 0 var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 700;
}
.result-issue__snippets pre {
  margin: var(--sp-2) 0;
  font-size: var(--text-xs);
  max-height: 80px;
  overflow: auto;
}


/* ---------- Result Page: Share & Badge Sections ---------- */
.result-share-section {
  text-align: center;
  padding: var(--sp-8) 0 var(--sp-4);
}
.result-share-section h3 { margin: 0 0 var(--sp-4); }
.result-share-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.result-share-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-5);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.result-share-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.result-share-card strong {
  font-family: var(--font-heading);
  color: var(--text);
}
.result-share-card span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.result-badge-section {
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-4);
}
.result-badge-section h3 { margin: 0 0 var(--sp-2); }


/* ---------- Result Page: Next Steps ---------- */
.result-next {
  padding: var(--sp-8) 0 var(--sp-4);
}
.result-next h3 { margin: 0 0 var(--sp-4); }
.result-next__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-3);
}
.result-next__card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-5);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.result-next__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.result-next__card strong {
  font-family: var(--font-heading);
  color: var(--text);
  font-size: var(--text-sm);
}
.result-next__card span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}


/* ---------- Result Page: Scan Scope ---------- */
.result-scope {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  margin-top: var(--sp-6);
}
.result-scope h3 { margin: 0 0 var(--sp-3); }
.result-scope p { margin: 0 0 var(--sp-3); color: var(--text-secondary); font-size: var(--text-sm); }
.result-scope p:last-child { margin-bottom: 0; }
.result-scope a { color: var(--accent); text-decoration: underline; }


/* ---------- Result Page: Rescan ---------- */
.result-rescan {
  text-align: center;
  padding: var(--sp-8) 0;
}
.result-rescan h3 { margin: 0 0 var(--sp-4); }


/* ---------- Result Page: Score Ring Animation ---------- */
@keyframes scoreRingIn {
  from { stroke-dashoffset: 439.82; }
}

@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}


/* ---------- Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0f172a;
    --surface-raised: #1e293b;
    --bg-body: #020617;
    --border: #334155;
    --border-strong: #475569;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-subtle: #172554;
    --accent-light: #1e3a5f;
    --bad-bg: #450a0a;
    --bad-border: #7f1d1d;
    --warn-bg: #451a03;
    --warn-border: #78350f;
    --ok-bg: #022c22;
    --ok-border: #064e3b;
    --minor-bg: #1e293b;
    --minor-border: #334155;
  }
  .chip.critical { color: #fca5a5; }
  .chip.serious { color: #fcd34d; }
  .chip.moderate { color: #6ee7b7; }
  .chip.minor { color: #cbd5e1; }
  .sticky-summary { background: rgba(15, 23, 42, .85); }
  .ad-container { background: #0a0f1a; border-color: var(--border); }
  .ad-slot { background: var(--surface); border-color: var(--border-strong); color: var(--text-muted); }
  code { background: #0f172a; color: #e2e8f0; }
  pre { background: #0f172a; }
}


/* ---------- Print ---------- */
@media print {
  header, footer, .sticky-summary, .ad-container, .skip-link, .nav-toggle { display: none; }
  .feature, .plan, .issue, .resource-card { box-shadow: none; border: 1px solid #d1d5db; }
  body { background: #fff; }
}


/* ---------- Responsive ---------- */

/* Tablet: 768px and below */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  nav#main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand);
    flex-direction: column;
    padding: var(--sp-2) var(--sp-6) var(--sp-4);
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow-lg);
  }
  nav#main-nav.open { display: flex; }
  nav#main-nav a {
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-base);
    border-radius: var(--radius-sm);
  }

  .hero { padding: var(--sp-10) 0 var(--sp-8); }
  .hero h2 { font-size: var(--text-3xl); }
  .hero .scan { flex-direction: column; }
  .hero button { width: 100%; }

  .section h2 { font-size: var(--text-2xl); }

  .feature, .feature.span-3, .feature.span-4 { grid-column: span 12; }
  .issue { grid-column: span 12; }
  .features { gap: var(--sp-3); }
  .issues { gap: var(--sp-3); }

  .resource-grid { grid-template-columns: 1fr; }
  .contrast-demo { grid-template-columns: 1fr; }

  /* Result page responsive */
  .result-hero__content { flex-direction: column; text-align: center; gap: var(--sp-5); }
  .result-hero__ring-wrap { width: 120px; height: 120px; }
  .result-hero__heading { font-size: var(--text-2xl); }
  .result-hero__actions { justify-content: center; }
  .result-stats { gap: var(--sp-2); }
  .result-stat { min-width: 80px; padding: var(--sp-3); }
  .result-stat__count { font-size: var(--text-xl); }
  .result-issue__explain { grid-template-columns: 1fr; }
  .result-issue__title { white-space: normal; }
  .result-issue__meta { flex-wrap: wrap; }
  .result-share-cards { grid-template-columns: 1fr; }
  .result-next__cards { grid-template-columns: 1fr; }

  /* Footer stacks on mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-2);
    text-align: center;
  }
}

/* Small mobile: 480px and below */
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-4); }
  .hero h2 { font-size: var(--text-2xl); }
  .hero p { font-size: var(--text-base); }
  .feature { padding: var(--sp-4); }
  .issue { padding: var(--sp-4); }
  .faq-item { padding: var(--sp-4); }
  .scan-card { padding: var(--sp-5); }
  .mistake-card { padding: var(--sp-5); }
  .result-hero { padding: var(--sp-6) 0; }
  .result-hero__ring-wrap { width: 100px; height: 100px; }
  .result-hero__grade-letter { font-size: var(--text-2xl); }
  .result-stat { min-width: 60px; padding: var(--sp-2) var(--sp-3); }
  .result-stat__count { font-size: var(--text-lg); }
  .result-issue__summary { padding: var(--sp-3) var(--sp-4); flex-wrap: wrap; }
  .result-issue__count { display: none; }
  .result-issue__rule { display: none; }
}
