/* =========================================================
   AgentAtlas — Core Stylesheet
   Modern, minimalist, mobile-first. Dark mode default.
   ========================================================= */

/* ---------- Theme Tokens ---------- */
:root {
  /* Dark theme (default) */
  --bg: #0a0e1a;
  --bg-elevated: #131826;
  --bg-surface: #1a2030;
  --border: #283142;
  --border-soft: #1f2638;
  --text: #e4e7ec;
  --text-muted: #9aa3b2;
  --text-soft: #6b7385;
  --accent: #7c8cff;
  --accent-hover: #9aa8ff;
  --accent-soft: rgba(124, 140, 255, 0.12);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --gradient-hero: radial-gradient(ellipse at top, rgba(124, 140, 255, 0.15), transparent 60%),
                   radial-gradient(ellipse at bottom right, rgba(167, 139, 250, 0.10), transparent 50%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --content-width: 760px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-surface: #ffffff;
  --border: #e2e8f0;
  --border-soft: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --gradient-hero: radial-gradient(ellipse at top, rgba(79, 70, 229, 0.08), transparent 60%),
                   radial-gradient(ellipse at bottom right, rgba(167, 139, 250, 0.06), transparent 50%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); margin: 2.5rem 0 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin: 2rem 0 0.75rem; }
h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1.25rem; }
.lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition);
}
[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.85); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--text); }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 6rem 0 4rem;
  background: var(--gradient-hero);
  overflow: hidden;
}
.hero-inner {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead { font-size: 1.25rem; margin-bottom: 2rem; }
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.card h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.2rem; }
.card p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem; }
.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.card-link::after {
  content: '→';
  transition: transform var(--transition);
}
.card:hover .card-link::after { transform: translateX(3px); }

/* Agent card variant */
.agent-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition);
}
.agent-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.agent-name { font-weight: 700; font-size: 1.1rem; }
.agent-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.agent-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}
.agent-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

/* ---------- Article List (Index Pages) ---------- */
.article-list { display: flex; flex-direction: column; gap: 1.25rem; }
.article-list-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
}
.article-list-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.article-list-item .tag-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.article-list-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--text);
}
.article-list-item:hover h3 { color: var(--accent); }
.article-list-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.article-list-item .meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ---------- Glossary ---------- */
.glossary { margin: 2rem 0; }
.glossary-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.glossary-item:last-child { border-bottom: none; }
.glossary-item h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.glossary-item h3 .letter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.glossary-item p { margin: 0; color: var(--text-muted); }
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.glossary-nav a {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.glossary-nav a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero stats ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: center;
}
.hero-stat .number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Update to Article list on mobile ---------- */
@media (max-width: 768px) {
  .article-list-item { flex-direction: column; gap: 0.75rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat .number { font-size: 1.5rem; }
}

/* ---------- Legal page styling ---------- */
.legal-body h2 { padding-top: 1rem; }
.legal-body h2::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--border-soft);
  margin: -1rem 0 1.5rem;
}
.legal-body h2:first-of-type::before { display: none; }
.legal-body .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ---------- 404 ---------- */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
}
.error-page .code {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page h1 { margin-bottom: 1rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; max-width: 500px; }
.error-page .hero-actions { justify-content: center; }

/* ---------- Article / Content ---------- */
.article-hero {
  background: var(--gradient-hero);
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border-soft);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.article-meta .tag {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
}
.article-body {
  padding: 3rem 0;
  font-size: 1.05rem;
}
.article-body h2 { padding-top: 1rem; }
.article-body h2::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--border-soft);
  margin: -1rem 0 1.5rem;
}
.article-body h2:first-child::before { display: none; }
.article-body p, .article-body li { color: var(--text); line-height: 1.75; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin-bottom: 1.5rem; padding-left: 1.75rem; }
.article-body li { margin-bottom: 0.6rem; }
.article-body a { text-decoration: underline; text-decoration-color: var(--accent-soft); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 700; }

/* ---------- Callout ---------- */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 1.75rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Comparison Table ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-elevated);
}
th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-surface);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-surface); }
td .check { color: var(--success); font-weight: 700; }
td .cross { color: var(--danger); font-weight: 700; }

/* ---------- Pros / Cons ---------- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}
.pros-cons-box {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.pros-cons-box h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pros h4 { color: var(--success); }
.cons h4 { color: var(--danger); }
.pros-cons-box ul { padding-left: 1.25rem; margin: 0; }
.pros-cons-box li { font-size: 0.95rem; margin-bottom: 0.5rem; }

/* ---------- Score Badge ---------- */
.score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.score-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.score-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- FAQ ---------- */
.faq-list { margin: 2rem 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--accent); margin-bottom: 0.75rem; }
.faq-item p { color: var(--text-muted); margin: 0; }

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  margin: 4rem 0;
}
.cta-section h2 { margin-top: 0; }
.cta-section p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; }
.footer-col h4 {
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--text-soft); }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform var(--transition);
    gap: 1.25rem;
  }
  .nav-links.open { transform: translateY(0); }
  .menu-toggle { display: grid; place-items: center; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-section { padding: 2rem 1.5rem; }
  .article-hero { padding: 3rem 0 2rem; }
  .article-body { padding: 2rem 0; }
}

/* ---------- 4-Column Footer ---------- */
.footer-grid-4 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) {
  .footer-grid-4 { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Article List (Index Pages) ---------- */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.article-list-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.article-list-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.article-list-item .tag-small {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.article-list-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
}
.article-list-item h3 a { color: var(--text); }
.article-list-item h3 a:hover { color: var(--accent); }
.article-list-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex: 1;
}
.article-list-item .meta {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ---------- Glossary ---------- */
.glossary-list { margin: 2rem 0; }
.glossary-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.glossary-item:last-child { border-bottom: none; }
.glossary-term {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  scroll-margin-top: 90px;
}
.glossary-item p { color: var(--text-muted); margin: 0; }
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.glossary-nav a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}
.glossary-nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Newsletter Form ---------- */
.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 1.5rem auto 0;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- 404 Page ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}
.error-code {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page h1 { margin-bottom: 1rem; }
.error-page p { color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem; }

/* ---------- Pricing Comparison Sticky ---------- */
.pricing-compare { margin: 2rem 0; }
.pricing-compare th { position: sticky; top: 64px; z-index: 5; }

/* ---------- Tag Cloud / Filter ---------- */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
}
.tag-filter button {
  padding: 0.4rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.tag-filter button:hover,
.tag-filter button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Inline Stat Block ---------- */
.stat-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

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