/* FlyFish NWA — CDN & Edge Delivery Knowledge Base
   Design: Clean light editorial — Teal accent (#0D9488) + cool neutrals
   Typography: IBM Plex Sans (display) + Source Sans 3 (body)
   Mobile-first, WCAG AAA, light-only, no JavaScript
   CSP: script-src 'none' — all interactivity is CSS-only */

/* ========= DESIGN TOKENS ========= */
:root {
  /* --- Color Palette — Light Only --- */
  --bg: #FFFFFF;
  --bg-alt: #F8FAFB;
  --surface: #FFFFFF;
  --surface-alt: #F3F6F8;
  --surface-hover: #EEF2F5;
  --text: #1A2332;
  --text-2: #3D4F5F;
  --text-muted: #6B7C8A;
  --border: #DDE3E9;
  --border-light: #EDF0F4;
  --accent: #0D9488;
  --accent-hover: #0F766E;
  --accent-subtle: #E6FAF7;
  --accent-text: #FFFFFF;
  --code-bg: #F4F7FA;
  --code-border: #DDE3E9;
  --code-text: #2D5F8A;
  --link: #0D9488;
  --link-hover: #115E59;
  --danger: #DC2626;
  --success: #16A34A;
  --info: #0284C7;

  /* Level badge colors */
  --level-beginner: #10B981;
  --level-beginner-bg: #ECFDF5;
  --level-beginner-text: #065F46;
  --level-intermediate: #3B82F6;
  --level-intermediate-bg: #EFF6FF;
  --level-intermediate-text: #1E3A5F;
  --level-advanced: #8B5CF6;
  --level-advanced-bg: #F5F3FF;
  --level-advanced-text: #4C1D95;
  --level-expert: #EF4444;
  --level-expert-bg: #FEF2F2;
  --level-expert-text: #7F1D1D;

  /* Shadows — neutral, no tint */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.09);
  --shadow-xl: 0 20px 40px rgba(0,0,0,.1);

  /* --- Layout --- */
  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --transition: 160ms ease;
  --max-width: 1120px;
  --content-width: 720px;
  --gutter: 1.25rem;

  /* --- Typography --- */
  --font-display: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-sans: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;

  /* Type scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;

  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;
}

/* ========= RESET & BASE ========= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

@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;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  background: var(--bg);
  color: var(--text);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition);
  cursor: pointer;
}
a:hover { color: var(--link-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ========= HEADER ========= */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}
.site-logo:hover { color: var(--text); }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.05em;
}

/* Desktop nav */
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color var(--transition);
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active {
  color: var(--accent);
  font-weight: 600;
}
.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px 1px 0 0;
}

/* Mobile nav — CSS-only using <details> */
.mobile-nav {
  display: none;
}

@media (max-width: 600px) {
  .site-nav { display: none; }
  .mobile-nav {
    display: block;
  }
  .mobile-nav summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    list-style: none;
    border: none;
    background: none;
    color: var(--text);
    border-radius: var(--radius);
    transition: background var(--transition);
  }
  .mobile-nav summary:hover {
    background: var(--surface-hover);
  }
  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }
  .mobile-nav summary .menu-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    position: relative;
    border-radius: 1px;
  }
  .mobile-nav summary .menu-icon::before,
  .mobile-nav summary .menu-icon::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    position: absolute;
    left: 0;
    border-radius: 1px;
  }
  .mobile-nav summary .menu-icon::before { top: -6px; }
  .mobile-nav summary .menu-icon::after { top: 6px; }

  .mobile-nav ul {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
    z-index: 99;
  }
  .mobile-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem var(--gutter);
    color: var(--text-muted);
    font-size: var(--fs-base);
    font-weight: 500;
    min-height: 44px;
    transition: background var(--transition), color var(--transition);
  }
  .mobile-nav a:hover {
    background: var(--surface-hover);
    color: var(--text);
  }
  .mobile-nav a.active {
    color: var(--accent);
    font-weight: 600;
  }

  .header-inner {
    height: 50px;
    position: relative;
  }
}

/* ========= HERO SECTION ========= */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--gutter) 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(var(--fs-2xl), 4.5vw, var(--fs-3xl));
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 680px;
  text-wrap: balance;
}

.hero-desc {
  font-size: var(--fs-md);
  color: var(--text-2);
  max-width: 580px;
  line-height: var(--lh-normal);
}

@media (max-width: 600px) {
  .hero {
    padding: 2rem var(--gutter) 1.5rem;
  }
  .hero h1 {
    font-size: clamp(1.5rem, 6vw, var(--fs-2xl));
  }
}

/* ========= STATS BAR ========= */
.stats-bar {
  display: flex;
  gap: 2.5rem;
  margin-top: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--accent);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .stats-bar {
    gap: 1.5rem;
  }
  .stat-number {
    font-size: var(--fs-lg);
  }
}

/* ========= LEARNING PATHS GRID ========= */
.paths-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--gutter) 1rem;
}

.paths-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 1rem;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.path-card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  border-left: 3px solid var(--path-color, var(--accent));
}
.path-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.path-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.path-card span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .paths-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .path-card {
    padding: 0.75rem 1rem;
  }
}
@media (max-width: 400px) {
  .paths-grid {
    grid-template-columns: 1fr;
  }
}

/* ========= CLUSTER NAV — Horizontal Scrollable Tabs ========= */
.cluster-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--bg);
  padding-top: 0.5rem;
  padding-bottom: 0;
}

.cluster-nav::-webkit-scrollbar {
  display: none;
}

.cluster-nav a {
  scroll-snap-align: start;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.625rem 1rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.cluster-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--border);
}
.cluster-nav a.active,
.cluster-nav a:target {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 600px) {
  .cluster-nav {
    top: 50px;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .cluster-nav a {
    font-size: var(--fs-xs);
    padding: 0.5rem 0.75rem;
  }
}

/* ========= CLUSTER SECTION ========= */
.cluster-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 1rem;
}

.cluster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.cluster-header h2 {
  font-size: var(--fs-lg);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: var(--lh-snug);
}

.cluster-header h2 .count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ========= LEVEL BADGES ========= */
.level-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
}

.level-beginner {
  background: var(--level-beginner-bg);
  color: var(--level-beginner-text);
}
.level-intermediate {
  background: var(--level-intermediate-bg);
  color: var(--level-intermediate-text);
}
.level-advanced {
  background: var(--level-advanced-bg);
  color: var(--level-advanced-text);
}
.level-expert {
  background: var(--level-expert-bg);
  color: var(--level-expert-text);
}

/* ========= SECTION TITLE ========= */
.section-title {
  font-size: var(--fs-xs);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

/* ========= ARTICLE CARDS — Grid Layout ========= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.article-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  color: inherit;
}
.article-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

/* Pillar article highlight */
.pillar-card {
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
}
.pillar-card:hover {
  background: var(--surface-hover);
  border-left-color: var(--accent);
}

.card-content { flex: 1; min-width: 0; }

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  width: fit-content;
}

.card-title {
  font-size: var(--fs-base);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--text);
  margin-bottom: 0.375rem;
}
.article-card:hover .card-title {
  color: var(--accent);
}

.card-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-normal);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}
.card-meta .dot { opacity: 0.3; }

.pillar-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.pillar-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-card {
    padding: 1rem 1.25rem;
  }
}

/* ========= BREADCRUMB NAVIGATION ========= */
.breadcrumb {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem var(--gutter) 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { margin: 0 0.15rem; opacity: 0.35; }

/* ========= ARTICLE DETAIL (single article page) ========= */
.article-detail {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem var(--gutter) 5rem;
}

.article-detail .breadcrumbs,
.article-detail .breadcrumb {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumbs a {
  color: var(--text-muted);
  cursor: pointer;
}
.breadcrumbs a:hover { color: var(--accent); }

.article-detail h1 {
  font-size: clamp(1.75rem, 4vw, var(--fs-2xl));
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.article-meta,
article header .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.article-meta .divider { opacity: 0.25; }

/* ========= ARTICLE CONTENT ========= */
.article-content,
article {
  line-height: var(--lh-relaxed);
}

/* Headings */
.article-content h2,
article h2 {
  font-size: var(--fs-xl);
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
  color: var(--text);
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}

.article-content h3,
article h3 {
  font-size: var(--fs-lg);
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.article-content h4,
article h4 {
  font-size: var(--fs-md);
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Paragraphs */
.article-content p,
article p {
  margin-bottom: 1.25rem;
  color: var(--text-2);
  font-size: var(--fs-base);
  max-width: 65ch;
}

/* Lists */
.article-content ul,
.article-content ol,
article ul,
article ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-2);
}
.article-content li,
article li {
  margin-bottom: 0.5rem;
  line-height: var(--lh-normal);
}

.article-content strong,
article strong {
  color: var(--text);
  font-weight: 600;
}

/* Links */
.article-content a,
article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.article-content a:hover,
article a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

/* Blockquotes */
.article-content blockquote,
article blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  background: var(--accent-subtle);
  color: var(--text-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* Code blocks */
.article-content pre,
article pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--text);
  tab-size: 2;
}

.article-content code,
article code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  color: var(--code-text);
}
.article-content pre code,
article pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.article-content table,
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.article-content th,
article th {
  text-align: left;
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.75rem;
  border-bottom: 2px solid var(--accent);
  white-space: nowrap;
}
.article-content td,
article td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  vertical-align: top;
}
.article-content tr:nth-child(even),
article tr:nth-child(even) {
  background: var(--surface-alt);
}
.article-content tr:last-child td,
article tr:last-child td {
  border-bottom: none;
}
.article-content tbody tr:hover,
article tbody tr:hover {
  background: var(--surface-hover);
}

/* Definition lists */
.article-content dl,
article dl {
  margin: 1.5rem 0;
}
.article-content dt,
article dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}
.article-content dd,
article dd {
  color: var(--text-2);
  margin-left: 0;
  padding-left: 0.75rem;
  margin-bottom: 0.75rem;
  line-height: var(--lh-normal);
}

/* Images inside articles */
.article-content img,
article img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

/* Horizontal rules */
.article-content hr,
article hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5rem 0;
}

/* ========= ARTICLE PAGE — bare <article> layout ========= */
body > article,
body > .breadcrumb + article,
body > nav.breadcrumb + article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem var(--gutter) 4rem;
}

body > article > header h1,
body > .breadcrumb + article > header h1,
body > nav.breadcrumb + article > header h1 {
  font-size: clamp(1.75rem, 4vw, var(--fs-2xl));
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

body > article > header .meta,
body > .breadcrumb + article > header .meta,
body > nav.breadcrumb + article > header .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

body > nav.breadcrumb {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: 1rem;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ========= TABLE OF CONTENTS ========= */
.toc {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.toc-title,
.toc > strong {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

.toc ol,
.toc ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc li {
  margin-bottom: 0.375rem;
}

.toc a {
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
  min-height: 44px;
  transition: color var(--transition);
}
.toc a:hover { color: var(--accent); }

.toc ol ol,
.toc ul ul {
  padding-left: 1rem;
  margin-top: 0.25rem;
}

/* ========= FAQ SECTION ========= */
.faq {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 4rem;
}

.faq h2 {
  font-size: var(--fs-xl);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.faq-item:last-child { border-bottom: none; }
.faq-item:hover { background: var(--surface-hover); }

.faq-item h3 {
  font-size: var(--fs-base);
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: var(--lh-snug);
}

.faq-item p {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: var(--lh-normal);
}

/* FAQ accordion — CSS-only using <details> */
.faq-accordion details {
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.faq-accordion details:last-child { border-bottom: none; }
.faq-accordion details:hover { background: var(--surface-hover); }

.faq-accordion summary {
  padding: 1.25rem 1.5rem;
  font-size: var(--fs-base);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
.faq-accordion summary::-webkit-details-marker { display: none; }

.faq-accordion summary::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-accordion details[open] summary::after {
  transform: rotate(-135deg);
}

.faq-accordion details > div,
.faq-accordion details > p {
  padding: 0 1.5rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: var(--lh-normal);
}

/* ========= PAGE CONTENT (About, Editorial, Privacy, Contact) ========= */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem var(--gutter) 5rem;
}

.page-content h1 {
  font-size: clamp(1.75rem, 4vw, var(--fs-2xl));
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.page-content .lead {
  font-size: var(--fs-md);
  color: var(--text-2);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  line-height: var(--lh-normal);
}

.page-content h2 {
  font-size: var(--fs-xl);
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  letter-spacing: -0.015em;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}

.page-content h3 {
  font-size: var(--fs-md);
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.page-content p {
  color: var(--text-2);
  margin-bottom: 1rem;
  line-height: var(--lh-normal);
  max-width: 65ch;
}

.page-content ul, .page-content ol {
  color: var(--text-2);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.page-content li {
  margin-bottom: 0.4rem;
  line-height: var(--lh-normal);
}
.page-content strong { color: var(--text); font-weight: 600; }

/* ========= TEAM GRID ========= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 2rem 0;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.team-card:hover {
  border-color: var(--border);
}

.team-card .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  margin-bottom: 0.2rem;
  color: var(--text);
}
.team-card .role {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.625rem;
}
.team-card p {
  font-size: var(--fs-sm);
  margin-bottom: 0;
  line-height: var(--lh-normal);
}

/* ========= POLICY BOX ========= */
.policy-box {
  background: var(--accent-subtle);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 1.125rem 1.375rem;
  margin: 1.25rem 0;
}
.policy-box strong { color: var(--accent); }

/* ========= BUTTONS ========= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--accent-text);
}

/* ========= FOOTER ========= */
.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border-light);
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--accent); }

/* Simple footer for article pages */
body > footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border-light);
  margin-top: 3rem;
  padding: 1.5rem var(--gutter);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    gap: 1rem;
  }
}

/* ========= 404 PAGE ========= */
.error-page {
  text-align: center;
  padding: 4rem var(--gutter);
  max-width: var(--content-width);
  margin: 0 auto;
}

.error-page h1 {
  font-size: var(--fs-3xl);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.error-page p {
  font-size: var(--fs-md);
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

/* ========= UTILITIES ========= */
.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;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }


/* ========= RELATED ARTICLES ========= */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-light);
}

.related-articles h2 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.related-articles h3 {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--fs-sm);
}

.related-grid {
  display: grid;
  gap: 0.375rem;
}

.related-link {
  display: block;
  padding: 0.625rem 1rem;
  border-left: 3px solid var(--border-light);
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.related-link:hover {
  border-left-color: var(--accent);
  background: var(--surface-alt);
  color: var(--text);
}

.related-icon {
  margin-right: 0.375rem;
  font-size: var(--fs-sm);
}

.pillar-link {
  background: var(--accent-subtle);
  border-left-color: var(--accent);
  font-weight: 600;
  color: var(--text);
}
.pillar-link:hover {
  background: var(--accent-subtle);
  border-left-color: var(--accent-hover);
}

.cross-link {
  border-left-color: transparent;
  padding-left: 1rem;
  color: var(--text-muted);
}
.cross-link:hover {
  border-left-color: var(--border);
  color: var(--text);
}

/* ========= GUIDE BOX (pillar articles) ========= */
.guide-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.guide-box h2 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.guide-box p {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-bottom: 0.75rem;
  line-height: var(--lh-normal);
}

.guide-toc {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}

.guide-toc li {
  padding: 0.25rem 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

.guide-toc a {
  color: var(--text-2);
}
.guide-toc a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .related-link {
    padding: 0.5rem 0.75rem;
    font-size: var(--fs-xs);
  }
  .guide-box {
    padding: 1rem;
  }
}

/* ========= PRINT STYLES ========= */
@media print {
  .site-header,
  .site-footer,
  .site-nav,
  .mobile-nav,
  .cluster-nav,
  .breadcrumb,
  .toc {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .article-detail,
  .page-content {
    max-width: 100%;
    padding: 0;
  }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
  .article-card { break-inside: avoid; }
  pre {
    white-space: pre-wrap;
    border: 1px solid #ccc;
  }
}

/* ========= DIAGRAMS ========= */
.diagram {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-alt, #F8FAFB);
  border: 1px solid var(--border, #DDE3E9);
  border-radius: var(--radius-lg, 10px);
  overflow-x: auto;
}
.diagram svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.diagram figcaption {
  text-align: center;
  font-size: var(--fs-sm, 0.875rem);
  color: var(--text-muted, #6B7C8A);
  margin-top: 0.75rem;
  font-style: italic;
}
@media (max-width: 600px) {
  .diagram {
    padding: 1rem 0.75rem;
    margin: 1.5rem -0.5rem;
    border-radius: var(--radius, 6px);
  }
}
