/* ============================================================
   SexInfo — Design System
   Mobile-first, ShadCN-inspired, clinical & readable
   ============================================================ */

/* ── Custom Properties ───────────────────────────────────── */
:root {
  /* Colors */
  --white:    #ffffff;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  /* Semantic */
  --bg:           var(--white);
  --bg-secondary: var(--gray-50);
  --bg-card:      var(--white);
  --border:       var(--gray-200);
  --text:         var(--gray-900);
  --text-2:       var(--gray-600);
  --text-muted:   var(--gray-400);
  --accent:       var(--blue-600);
  --accent-hover: var(--blue-700);
  --accent-light: var(--blue-50);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;

  /* Spacing scale */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  20px;
  --s6:  24px;
  --s8:  32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;

  /* Radii */
  --r-sm: 6px;
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);

  /* Layout */
  --max-w:         1200px;
  --content-w:     720px;
  --header-h:      60px;

  /* Transitions */
  --t: 150ms ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

ul, ol { padding-left: var(--s6); }

/* ── Layout Containers ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s4);
}

@media (min-width: 640px)  { .container { padding: 0 var(--s6); } }
@media (min-width: 1024px) { .container { padding: 0 var(--s8); } }

/* ── Header / Navigation ─────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--s4);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); text-decoration: none; }
.site-logo svg { color: var(--accent); }

.site-nav {
  display: none;
  align-items: center;
  gap: var(--s1);
}

.site-nav a {
  padding: var(--s2) var(--s3);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: all var(--t);
}
.site-nav a:hover {
  color: var(--text);
  background: var(--gray-100);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 8px 16px;
  background: var(--accent);
  color: var(--white) !important;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--t) !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; text-decoration: none !important; }

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
  border-radius: var(--r-sm);
  transition: background var(--t);
}
.nav-toggle:hover { background: var(--gray-100); }

@media (min-width: 768px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--s3) var(--s4);
  gap: var(--s1);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: var(--s3) var(--s3);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
}
.mobile-nav a:hover {
  color: var(--text);
  background: var(--gray-100);
  text-decoration: none;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s1);
  font-size: .8125rem;
  color: var(--text-muted);
  padding: var(--s4) 0;
}
.breadcrumb a {
  color: var(--text-2);
  font-weight: 500;
}
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb svg { width: 14px; height: 14px; flex-shrink: 0; }
.breadcrumb span { color: var(--text-muted); }

/* ── Hero (Homepage) ─────────────────────────────────────── */
.home-hero {
  padding: var(--s12) 0 var(--s10);
  background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.home-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 4px 12px;
  background: var(--blue-100);
  color: var(--blue-600);
  border-radius: var(--r-full);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: var(--s4);
}

.home-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: var(--s4);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero p {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto var(--s8);
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: .8125rem;
  color: var(--text-2);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.hero-badge svg { width: 14px; height: 14px; color: var(--accent); }

@media (min-width: 768px) {
  .home-hero h1 { font-size: 2.75rem; }
  .home-hero p  { font-size: 1.125rem; }
}

/* ── Section headers ─────────────────────────────────────── */
.section-heading {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--text);
  margin-bottom: var(--s2);
}

.section-sub {
  font-size: .9375rem;
  color: var(--text-2);
  margin-bottom: var(--s6);
}

.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s6);
}

.view-all {
  font-size: .875rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.view-all:hover { text-decoration: underline; }

/* ── Cluster Grid ────────────────────────────────────────── */
.clusters-section { padding: var(--s12) 0; }

.cluster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

@media (min-width: 640px)  { .cluster-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .cluster-grid { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }

.cluster-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5) var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--t);
  box-shadow: var(--shadow-sm);
}
.cluster-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.cluster-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  margin-bottom: var(--s1);
}

.cluster-card-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.cluster-card-count {
  font-size: .8125rem;
  color: var(--text-muted);
}

/* ── Article Cards ───────────────────────────────────────── */
.articles-section { padding: var(--s10) 0 var(--s12); background: var(--bg-secondary); }

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}

@media (min-width: 640px)  { .article-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all var(--t);
  box-shadow: var(--shadow-sm);
}
.article-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-body { padding: var(--s5); flex: 1; display: flex; flex-direction: column; gap: var(--s2); }

.article-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 600;
  width: fit-content;
}

.article-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: var(--s1);
}

.article-card-excerpt {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
  margin-top: auto;
  font-size: .8125rem;
  color: var(--text-muted);
}
.article-card-meta span { display: flex; align-items: center; gap: 4px; }
.article-card-meta svg { width: 13px; height: 13px; }

/* ── Article Page Layout ─────────────────────────────────── */
.article-page {
  min-height: calc(100vh - var(--header-h));
}

.article-hero-band {
  padding: var(--s10) 0;
  border-bottom: 1px solid var(--border);
}

.article-hero-band .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: var(--s4);
}

.article-hero-band h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--s4);
  max-width: 680px;
}

.article-lead {
  font-size: 1.0625rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: var(--s5);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
  font-size: .8125rem;
  color: var(--text-muted);
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-meta svg { width: 14px; height: 14px; }

@media (min-width: 768px) {
  .article-hero-band h1 { font-size: 2.25rem; }
  .article-lead { font-size: 1.125rem; }
}

/* ── Article Body Layout ─────────────────────────────────── */
.article-body {
  padding: var(--s10) 0 var(--s16);
}

.article-layout {
  display: block;
}

@media (min-width: 1024px) {
  .article-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--s12);
    align-items: start;
  }
}

/* Table of Contents */
.toc-sidebar {
  display: none;
  position: sticky;
  top: calc(var(--header-h) + var(--s6));
}

@media (min-width: 1024px) { .toc-sidebar { display: block; } }

.toc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5);
}

.toc-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: var(--s3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-title svg { width: 13px; height: 13px; }

.toc-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.toc-list a {
  display: block;
  padding: 5px var(--s2);
  font-size: .8125rem;
  color: var(--text-2);
  border-radius: var(--r-sm);
  line-height: 1.4;
  transition: all var(--t);
}
.toc-list a:hover {
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

/* Mobile TOC Toggle */
.toc-mobile {
  display: block;
  margin-bottom: var(--s8);
}
@media (min-width: 1024px) { .toc-mobile { display: none; } }

.toc-mobile-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--s3) var(--s4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
}
.toc-mobile-trigger svg { width: 16px; height: 16px; transition: transform var(--t); }
.toc-mobile-trigger.open svg { transform: rotate(180deg); }

.toc-mobile-body {
  display: none;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: var(--s3) var(--s4);
  background: var(--bg-secondary);
}
.toc-mobile-body.open { display: block; }
.toc-mobile-body .toc-list a { font-size: .9rem; }

/* ── Article Content ─────────────────────────────────────── */
.article-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--text);
  margin: var(--s10) 0 var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: var(--s6) 0 var(--s3);
  line-height: 1.35;
}

.article-content p {
  margin-bottom: var(--s4);
  color: var(--text);
  line-height: 1.75;
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--s5);
  padding-left: var(--s6);
}

.article-content li {
  margin-bottom: var(--s2);
  line-height: 1.65;
  color: var(--text);
}

.article-content strong { font-weight: 600; }

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Key Takeaways Box ───────────────────────────────────── */
.key-takeaways {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-left: 4px solid var(--blue-600);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
  margin: var(--s8) 0;
}

.key-takeaways-title {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue-600);
  margin-bottom: var(--s4);
}
.key-takeaways-title svg { width: 16px; height: 16px; }

.key-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.key-takeaways li {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  font-size: .9375rem;
  color: var(--gray-800);
  line-height: 1.55;
  margin: 0;
}

.key-takeaways li svg {
  width: 16px;
  height: 16px;
  color: var(--blue-600);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── FAQ Section ─────────────────────────────────────────── */
.faq-section {
  margin-top: var(--s12);
  border-top: 1px solid var(--border);
  padding-top: var(--s10);
}

.faq-section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.faq-section-title svg { width: 20px; height: 20px; color: var(--accent); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  width: 100%;
  padding: var(--s4) var(--s5);
  background: var(--bg);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  transition: background var(--t);
}
.faq-question:hover { background: var(--gray-50); }
.faq-question svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; transition: transform var(--t); }
.faq-question.open { background: var(--bg-secondary); }
.faq-question.open svg { transform: rotate(45deg); color: var(--accent); }

.faq-answer {
  display: none;
  padding: 0 var(--s5) var(--s5);
  background: var(--bg-secondary);
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}
.faq-answer.open { display: block; padding-top: var(--s4); }

/* ── Sources Section ─────────────────────────────────────── */
.sources-section {
  margin-top: var(--s10);
  border-top: 1px solid var(--border);
  padding-top: var(--s8);
}

.sources-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.sources-title svg { width: 14px; height: 14px; }

.sources-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.sources-list li {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: .875rem;
  margin: 0;
}

.sources-list a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t);
}
.sources-list a:hover { color: var(--accent); }
.sources-list a svg { width: 12px; height: 12px; flex-shrink: 0; }
.source-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); flex-shrink: 0; }

/* ── Related Articles ────────────────────────────────────── */
.related-section {
  border-top: 1px solid var(--border);
  padding: var(--s10) 0;
  margin-top: var(--s10);
  background: var(--bg-secondary);
}

.related-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--s6);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
}
@media (min-width: 640px)  { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

.related-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--t);
}
.related-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.related-card-cluster {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.related-card-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.related-card-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: auto;
}
.related-card-arrow svg { width: 14px; height: 14px; }

/* ── Disclaimer Box ──────────────────────────────────────── */
.disclaimer {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s8);
  font-size: .8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  line-height: 1.55;
}
.disclaimer svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Trust Banner ────────────────────────────────────────── */
.trust-banner {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--s8) 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s2);
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: var(--r);
  color: var(--accent);
}
.trust-icon svg { width: 22px; height: 22px; }

.trust-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}

.trust-desc {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--s12) 0 var(--s8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s8);
  margin-bottom: var(--s10);
}

@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand { display: flex; flex-direction: column; gap: var(--s3); }

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.footer-logo:hover { color: var(--gray-200); text-decoration: none; }
.footer-logo svg { color: var(--blue-500); }

.footer-tagline {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--gray-500);
  max-width: 240px;
}

.footer-col h4 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-300);
  margin-bottom: var(--s3);
}

.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.footer-col a {
  font-size: .875rem;
  color: var(--gray-500);
  transition: color var(--t);
}
.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--s6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.footer-bottom-copy {
  font-size: .8125rem;
  color: var(--gray-600);
}

.footer-bottom-links {
  display: flex;
  gap: var(--s4);
}
.footer-bottom-links a { font-size: .8125rem; color: var(--gray-600); }
.footer-bottom-links a:hover { color: var(--gray-300); text-decoration: none; }

.footer-disclaimer {
  font-size: .8125rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--gray-800);
}

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

.visually-section { padding: var(--s12) 0; }

/* Article page hero illustration area */
.article-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  border-radius: var(--r-xl);
  margin-bottom: var(--s8);
  overflow: hidden;
}

@media (min-width: 768px) { .article-illustration { height: 220px; } }

/* Inline highlight */
.highlight {
  background: var(--blue-50);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  font-weight: 500;
  color: var(--blue-700);
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .toc-sidebar,
  .related-section, .nav-toggle, .mobile-nav { display: none !important; }
  body { font-size: 12pt; }
  .article-content { max-width: 100%; }
}
