/* ============================================================
   AI to AI Connect -- style.css
   Dark navy theme. Tokens injected as :root vars by PHP.
   ============================================================ */

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

:root {
  /* Fallback tokens -- overridden by PHP-injected :root block */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-bg: #080d1a;
  --color-surface: #0f1628;
  --color-panel: #131b2e;
  --color-text: #e0e8f8;
  --color-text-muted: #7a8db5;
  --color-accent: #00d4ff;
  --color-accent-strong: #0099bb;
  --color-border: #1e2d4a;
  --header-height: 64px;
}

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  padding-top: var(--header-height);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 400; }

p { max-width: 72ch; }

/* ── Layout ───────────────────────────────────────────────── */

.page-body { min-height: 70vh; }

.content-wrap {
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  gap: 3rem;
}

.content-wrap.has-sidebar {
  grid-template-columns: 1fr 300px;
}

.content-wrap.no-sidebar {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .content-wrap.has-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar { order: -1; }
}

/* ── Header ───────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(8, 13, 26, 0.97);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  gap: 2rem;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--color-accent); }

.logo-primary { color: var(--color-accent); }

/* ── Desktop Nav ──────────────────────────────────────────── */

.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}

.nav-item { position: relative; }

.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.5rem 0.75rem;
  display: block;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--color-accent); }

.nav-caret { font-size: 0.7em; margin-left: 0.25rem; }

.nav-toggle { display: flex; align-items: center; gap: 0; }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  min-width: 220px;
  list-style: none;
  z-index: 200;
  padding: 0.5rem 0;
}

.nav-dropdown li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color 0.15s;
}
.nav-dropdown li a:hover { color: var(--color-accent); }

/* ── Mobile toggle ────────────────────────────────────────── */

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 1px;
  transition: background 0.15s;
}
.nav-mobile-toggle:hover .hamburger-bar { background: var(--color-accent); }

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

/* ── Mobile Menu ──────────────────────────────────────────── */

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 999;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.mobile-nav-list { list-style: none; padding: 1rem 0; }

.mobile-nav-item { border-bottom: 1px solid var(--color-border); }
.mobile-nav-item:last-child { border-bottom: none; }

.mobile-nav-link {
  display: block;
  padding: 0.875rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.mobile-nav-link:hover { color: var(--color-accent); }

.mobile-nav-details summary { list-style: none; }
.mobile-nav-details summary::-webkit-details-marker { display: none; }

.mobile-nav-summary {
  display: block;
  padding: 0.875rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  cursor: pointer;
}
.mobile-nav-summary:hover { color: var(--color-accent); }

.mobile-nav-children {
  list-style: none;
  background: var(--color-panel);
  border-top: 1px solid var(--color-border);
}
.mobile-nav-children li a {
  display: block;
  padding: 0.625rem 2rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.mobile-nav-children li a:hover { color: var(--color-accent); }

/* ── Breadcrumbs ──────────────────────────────────────────── */

.breadcrumb-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.breadcrumb-item a { color: var(--color-text-muted); }
.breadcrumb-item a:hover { color: var(--color-accent); }
.breadcrumb-sep { margin: 0 0.25rem; }

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s;
  text-align: center;
}

.btn-primary {
  background: var(--color-accent);
  color: #000;
}
.btn-primary:hover { background: var(--color-accent-strong); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.btn-secondary:hover { background: var(--color-accent); color: #000; }

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-panel) 50%, #0a1520 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 5rem 1.5rem 4rem;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 200;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin: 0 auto 2rem;
  max-width: 60ch;
}

.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Section layouts ──────────────────────────────────────── */

.section-inner, .pillars-inner, .service-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

/* ── Pillars ──────────────────────────────────────────────── */

.pillars-section { border-bottom: 1px solid var(--color-border); }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  list-style: none;
}

.pillar-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
}

.pillar-icon { font-size: 1.5rem; display: block; margin-bottom: 0.75rem; }
.pillar-title { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; }
.pillar-desc { font-size: 0.875rem; color: var(--color-text-muted); }

/* ── Article / Category grids ─────────────────────────────── */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  list-style: none;
}

.article-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.article-card:hover { border-color: var(--color-accent); }

.article-card-link {
  display: block;
  padding: 1.5rem;
  color: var(--color-text);
  height: 100%;
}
.article-card-link:hover { color: var(--color-text); }

.article-card-title { font-size: 1.05rem; font-weight: 400; margin-bottom: 0.5rem; }
.article-card-excerpt { font-size: 0.875rem; color: var(--color-text-muted); }
.article-card-date { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.75rem; display: block; }

.section-cta-link { margin-top: 2rem; text-align: center; }
.section-cta-link a { color: var(--color-accent); font-size: 0.9rem; }

/* ── Category grid ────────────────────────────────────────── */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
}

.category-card a {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  transition: border-color 0.2s;
}
.category-card a:hover { border-color: var(--color-accent); }

.category-card-title { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.category-card-desc { display: block; font-size: 0.85rem; color: var(--color-text-muted); }

/* ── Service CTA ──────────────────────────────────────────── */

.service-cta-section {
  background: var(--color-panel);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.service-cta-heading { font-size: 1.8rem; margin-bottom: 1rem; }
.service-cta-body { color: var(--color-text-muted); margin-bottom: 1.5rem; }
.service-cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Article page ─────────────────────────────────────────── */

.article-page { max-width: 72ch; }

.article-header { margin-bottom: 2.5rem; }
.article-category-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 0.75rem; }
.article-category-label a { color: inherit; }
.article-title { margin-bottom: 1rem; }
.article-excerpt { font-size: 1.1rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.article-meta { font-size: 0.85rem; color: var(--color-text-muted); }
.article-updated { margin-left: 1rem; }

.ai-summary {
  background: var(--color-panel);
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
.ai-summary-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 0.4rem; }

.article-body { margin-bottom: 2.5rem; }
.article-section { margin-bottom: 2rem; }
.article-section h2 { margin-bottom: 0.75rem; }

.article-faq { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.article-faq h2 { margin-bottom: 1.5rem; }

.faq-list { display: flex; flex-direction: column; gap: 1.25rem; }

.faq-item { }
.faq-question { font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }
.faq-answer { color: var(--color-text-muted); font-size: 0.95rem; padding-left: 0; }

.article-entities { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.entities-label { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.entity-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.entity-list li { background: var(--color-panel); border: 1px solid var(--color-border); border-radius: 3px; padding: 0.2rem 0.6rem; font-size: 0.8rem; color: var(--color-text-muted); }

.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.related-heading { margin-bottom: 1.25rem; }
.related-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.related-list li a { font-weight: 500; }
.related-excerpt { font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* ── Category page ────────────────────────────────────────── */

.category-header { margin-bottom: 2rem; }
.category-title { margin-bottom: 0.75rem; }
.category-desc { color: var(--color-text-muted); }

/* ── Library page ─────────────────────────────────────────── */

.library-header { margin-bottom: 2.5rem; }
.library-title { margin-bottom: 0.75rem; }
.library-desc { color: var(--color-text-muted); }
.library-categories, .library-featured { margin-bottom: 3rem; }

/* ── Service page ─────────────────────────────────────────── */

.service-page { max-width: 72ch; }
.service-header { margin-bottom: 2.5rem; }
.service-title { margin-bottom: 1rem; }
.service-desc { color: var(--color-text-muted); margin-bottom: 1.5rem; }

.service-deliverables, .service-ideal-for, .service-faq { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--color-border); }
.service-deliverables h2, .service-ideal-for h2, .service-faq h2 { margin-bottom: 1rem; }

.deliverables-list, .ideal-for-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.deliverable-item { padding: 0.75rem 1rem; background: var(--color-panel); border: 1px solid var(--color-border); border-radius: 4px; }
.deliverable-item strong { display: block; margin-bottom: 0.25rem; }
.deliverable-item span { font-size: 0.875rem; color: var(--color-text-muted); }
.ideal-for-list li { padding-left: 1.25rem; position: relative; color: var(--color-text-muted); font-size: 0.95rem; }
.ideal-for-list li::before { content: '...'; position: absolute; left: 0; color: var(--color-accent); }

.service-section { margin-bottom: 2rem; }
.service-section h2 { margin-bottom: 0.75rem; }

.service-cta-bottom { padding: 2.5rem 0; }
.service-cta-bottom h2 { margin-bottom: 1.25rem; }

/* ── Contact page ─────────────────────────────────────────── */

.contact-page { max-width: 640px; }
.contact-header { margin-bottom: 2rem; }
.contact-title { margin-bottom: 0.75rem; }
.contact-desc { color: var(--color-text-muted); }

.form-status {
  padding: 0.875rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.form-status-success { background: rgba(0, 212, 255, 0.1); border: 1px solid var(--color-accent); color: var(--color-accent); }
.form-status-error { background: rgba(255, 80, 80, 0.08); border: 1px solid #ff5050; color: #ff8888; }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.875rem; color: var(--color-text-muted); }
.form-field input, .form-field textarea, .form-field select {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.625rem 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--color-accent); }
.form-field.has-error input, .form-field.has-error textarea { border-color: #ff5050; }
.field-error { font-size: 0.8rem; color: #ff8888; }

/* ── Glossary ─────────────────────────────────────────────── */

.glossary-header { margin-bottom: 2rem; }
.glossary-desc { color: var(--color-text-muted); margin-top: 0.75rem; }

.glossary-sections-nav { margin-bottom: 2rem; }
.glossary-sections-label { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.glossary-sections-list { display: flex; gap: 0.75rem; flex-wrap: wrap; list-style: none; }
.glossary-sections-list li a { font-size: 0.875rem; }

.glossary-alpha-nav { margin-bottom: 2.5rem; }
.alpha-nav-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
.alpha-nav-list li a {
  display: block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.alpha-nav-list li a:hover { border-color: var(--color-accent); color: var(--color-accent); }

.glossary-letter-group { margin-bottom: 2.5rem; }
.glossary-letter { font-size: 1.5rem; font-weight: 200; margin-bottom: 1rem; color: var(--color-accent); }

.term-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.term-entry { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: baseline; }
.term-name { font-weight: 500; }
.term-name a { color: var(--color-text); }
.term-name a:hover { color: var(--color-accent); }
.term-short-def { font-size: 0.875rem; color: var(--color-text-muted); }

@media (max-width: 600px) {
  .term-entry { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Glossary term page */
.glossary-term-page { max-width: 72ch; }
.term-header { margin-bottom: 2rem; }
.term-glossary-label { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.term-glossary-label a { color: var(--color-text-muted); }
.term-name { margin-bottom: 0.75rem; }
.term-short-def { font-size: 1.05rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.term-aka { font-size: 0.875rem; color: var(--color-text-muted); }

.term-definition { margin-bottom: 2rem; }
.term-article-link { margin-bottom: 2rem; font-size: 0.9rem; }

.term-related { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.term-related h2 { margin-bottom: 1.25rem; }
.related-terms-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.related-terms-list li a { font-weight: 500; }
.related-term-def { font-size: 0.875rem; color: var(--color-text-muted); }

/* ── Directory ────────────────────────────────────────────── */

.directory-header { margin-bottom: 2.5rem; }
.directory-desc { color: var(--color-text-muted); margin-top: 0.75rem; }

.directory-category-grid, .directory-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  list-style: none;
}

.dir-category-card a {
  display: block;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  transition: border-color 0.2s;
  height: 100%;
}
.dir-category-card a:hover { border-color: var(--color-accent); }

.dir-category-title { display: block; font-weight: 500; margin-bottom: 0.4rem; }
.dir-category-desc { display: block; font-size: 0.875rem; color: var(--color-text-muted); }

.dir-listing-card a {
  display: block;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  transition: border-color 0.2s;
}
.dir-listing-card a:hover { border-color: var(--color-accent); }

.dir-listing-title { font-size: 1rem; font-weight: 500; margin-bottom: 0.4rem; }
.dir-listing-excerpt { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.dir-listing-vendor { font-size: 0.8rem; color: var(--color-accent); margin-right: 0.75rem; }
.dir-listing-pricing { font-size: 0.8rem; color: var(--color-text-muted); }

/* Listing detail page */
.directory-listing-page { max-width: 72ch; }
.listing-header { margin-bottom: 2rem; }
.listing-category-label { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.listing-category-label a { color: var(--color-text-muted); }
.listing-title { margin-bottom: 0.75rem; }
.listing-excerpt { font-size: 1.05rem; color: var(--color-text-muted); }

.listing-fields { display: flex; flex-direction: column; gap: 0; margin-bottom: 2rem; }
.listing-field { display: grid; grid-template-columns: 160px 1fr; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.listing-field dt { color: var(--color-text-muted); }
.listing-field dd a { word-break: break-all; }

.listing-description { margin-bottom: 1.5rem; }
.listing-tags { margin-top: 2rem; }
.tags-label { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
.tag-list li { background: var(--color-panel); border: 1px solid var(--color-border); border-radius: 3px; padding: 0.2rem 0.6rem; font-size: 0.8rem; color: var(--color-text-muted); }

/* ── Sidebar ──────────────────────────────────────────────── */

.sidebar { min-width: 0; }

.sidebar-block { margin-bottom: 2rem; }

.sidebar-cta {
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.sidebar-cta-accent { background: var(--color-panel); border-color: var(--color-accent); }
.sidebar-cta-muted { background: var(--color-panel); }

.sidebar-cta-heading { font-size: 1rem; margin-bottom: 0.5rem; }
.sidebar-cta-body { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.sidebar-cta-btn { display: block; text-align: center; padding: 0.625rem 1rem; font-size: 0.875rem; }

.sidebar-heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 0.75rem; }

.sidebar-article-list, .sidebar-browse-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-article-list li a, .sidebar-browse-list li a { font-size: 0.875rem; color: var(--color-text-muted); }
.sidebar-article-list li a:hover, .sidebar-browse-list li a:hover { color: var(--color-accent); }

/* ── Error page ───────────────────────────────────────────── */

.error-page { text-align: center; padding: 4rem 0; }
.error-title { margin-bottom: 1rem; }
.error-desc { color: var(--color-text-muted); margin: 0 auto 2rem; }
.error-links { display: flex; gap: 1rem; justify-content: center; }

/* ── Generic page ─────────────────────────────────────────── */

.generic-page { max-width: 72ch; }
.page-header { margin-bottom: 2.5rem; }
.page-title { margin-bottom: 0.75rem; }
.page-desc { color: var(--color-text-muted); }
.page-section { margin-bottom: 2rem; }
.page-section h2 { margin-bottom: 0.75rem; }
.section-items { padding-left: 1.5rem; color: var(--color-text-muted); font-size: 0.95rem; }
.section-items li { margin-bottom: 0.35rem; }

/* ── Constellation strip ──────────────────────────────────── */

.constellation-strip {
  background: var(--color-panel);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
}

.constellation-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.constellation-label { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; }
.constellation-list { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; list-style: none; }
.constellation-list li a { font-size: 0.8rem; color: var(--color-text-muted); }
.constellation-list li a:hover { color: var(--color-accent); }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1rem;
  color: var(--color-text);
  display: block;
  margin-bottom: 0.5rem;
}
.footer-logo:hover { color: var(--color-accent); }
.footer-tagline { font-size: 0.875rem; color: var(--color-text-muted); }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { font-size: 0.875rem; color: var(--color-text-muted); }
.footer-links a:hover { color: var(--color-accent); }

.footer-copy { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.3rem; }
.footer-ai { font-size: 0.75rem; color: var(--color-text-muted); }
.footer-ai a { color: var(--color-text-muted); }
.footer-ai a:hover { color: var(--color-accent); }

/* ── Misc ─────────────────────────────────────────────────── */

.empty-state { color: var(--color-text-muted); font-style: italic; padding: 2rem 0; }
