/* ============================================================
   EGAProtocol — Main Stylesheet
   Brand system: MIRASTACK LABS (egaprotocol.org sub-brand)
   Tokens: brand-tokens.css / visual-identity-guidelines.md
   ============================================================ */

/* ── Brand Tokens — Light mode (default) ─────────────────── */
:root {
  color-scheme: light;

  /* Backgrounds */
  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F5F7FA;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #EFF2F6;
  --bg-nav:        rgba(255, 255, 255, 0.94);

  /* Text */
  --text-primary:   #1A2332;
  --text-secondary: #4A5568;
  --text-muted:     #8896A4;

  /* Accent — teal (deeper for contrast on white) */
  --accent:         #009E8C;
  --accent-hover:   #007A6E;
  --accent-dim:     rgba(0, 158, 140, 0.08);
  --accent-glow:    rgba(0, 158, 140, 0.10);
  --accent-border:  rgba(0, 158, 140, 0.25);

  /* Signal — orange */
  --signal:         #D9541A;
  --signal-dim:     rgba(217, 84, 26, 0.08);
  --signal-border:  rgba(217, 84, 26, 0.20);

  /* Neutral steel */
  --neutral:        #8A9299;

  /* Borders */
  --border:         #E2E8F0;
  --border-light:   #CBD5E0;

  /* Typography */
  --font-primary: "JetBrains Mono", "Courier New", monospace;

  /* Shape */
  --radius-sm: 4px;
  --radius:    8px;

  /* Shadow */
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  /* Layout */
  --max-width:   1100px;
  --section-pad: 96px;
}

/* ── Dark mode — OS preference ────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-primary:    #090C10;
    --bg-secondary:  #0F1318;
    --bg-card:       #131920;
    --bg-card-hover: #1A2130;
    --bg-nav:        rgba(9, 12, 16, 0.94);
    --text-primary:   #DDE3EA;
    --text-secondary: #7A8694;
    --text-muted:     #4A5563;
    --accent:         #00C9B1;
    --accent-hover:   #2fe8d1;
    --accent-dim:     rgba(0, 201, 177, 0.10);
    --accent-glow:    rgba(0, 201, 177, 0.18);
    --accent-border:  rgba(0, 201, 177, 0.30);
    --signal:         #FF671F;
    --signal-dim:     rgba(255, 103, 31, 0.10);
    --signal-border:  rgba(255, 103, 31, 0.25);
    --neutral:        #CED4DA;
    --border:         #1C2230;
    --border-light:   #232e42;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  }
}

/* ── Dark mode — explicit JS override ────────────────────── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary:    #090C10;
  --bg-secondary:  #0F1318;
  --bg-card:       #131920;
  --bg-card-hover: #1A2130;
  --bg-nav:        rgba(9, 12, 16, 0.94);
  --text-primary:   #DDE3EA;
  --text-secondary: #7A8694;
  --text-muted:     #4A5563;
  --accent:         #00C9B1;
  --accent-hover:   #2fe8d1;
  --accent-dim:     rgba(0, 201, 177, 0.10);
  --accent-glow:    rgba(0, 201, 177, 0.18);
  --accent-border:  rgba(0, 201, 177, 0.30);
  --signal:         #FF671F;
  --signal-dim:     rgba(255, 103, 31, 0.10);
  --signal-border:  rgba(255, 103, 31, 0.25);
  --neutral:        #CED4DA;
  --border:         #1C2230;
  --border-light:   #232e42;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

/* ── Accessibility ────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 0; z-index: 9999;
  background: var(--accent); color: var(--bg-primary);
  padding: 8px 16px; font-size: 13px;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Container ────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}
.nav-brand:hover { color: var(--text-primary); }
.nav-mark {
  width: auto;
  height: 28px;
  flex-shrink: 0;
}
/* Override hardcoded SVG fill attrs with CSS tokens */
.nav-mark polygon:nth-child(1) { fill: var(--accent); }
.nav-mark polygon:nth-child(2) { fill: var(--signal); }
.nav-mark polygon:nth-child(3) { fill: var(--neutral); }
.nav-wordmark {
  font-family: var(--font-primary);
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1;
}
.brand-egap    { font-weight: 700; color: var(--accent); letter-spacing: 2px; margin-right: -2px; }
.brand-rotocol { font-weight: 400; color: var(--text-secondary); letter-spacing: 0.5px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 12px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  transition: 0.2s;
}

/* ── Theme Toggle ─────────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-glow) 0%, transparent 65%),
    var(--bg-primary);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--signal-dim);
  border: 1px solid var(--signal-border);
  color: var(--signal);
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
}
.hero-badge::before {
  content: "";
  display: block;
  width: 6px; height: 6px;
  background: var(--signal);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.hero h1 {
  font-family: var(--font-primary);
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  max-width: 760px;
  margin: 0 auto 24px;
}
.hero-description {
  font-family: var(--font-primary);
  font-size: clamp(13px, 1.6vw, 15px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.9;
}
.hero-pillars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 44px;
}
.hero-pillar {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: #2fe8d1;
  color: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 201, 177, 0.30);
}
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  border-style: solid;
}

/* ── Roadmap ──────────────────────────────────────────────── */
.roadmap { background: var(--bg-secondary); }
.roadmap-list {
  list-style: none;
  display: grid;
  gap: 16px;
  margin: 40px 0 32px;
  padding: 0;
  counter-reset: roadmap;
}
.roadmap-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  padding: 22px 24px;
  transition: border-color 0.2s;
}
.roadmap-item.is-current { border-left-color: var(--accent); }
.roadmap-item:hover { border-color: var(--accent-border); }
.roadmap-when {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.roadmap-version {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.roadmap-date {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.roadmap-body h3 {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.roadmap-body p {
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.roadmap-body code {
  font-family: inherit;
  font-size: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}
.roadmap-status {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
}
.roadmap-status-wip {
  color: var(--text-muted);
  background: transparent;
  border-color: var(--border-light);
}
.roadmap-status-future {
  color: var(--text-secondary);
  background: transparent;
  border-color: var(--border-light);
  border-style: dashed;
}
.roadmap-note {
  font-family: var(--font-primary);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 680px;
}
@media (max-width: 640px) {
  .roadmap-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── Section Base ─────────────────────────────────────────── */
section {
  padding: var(--section-pad) 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

.section-label {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-primary);
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 16px;
}
.section-lead {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.9;
  margin-bottom: 48px;
}

/* ── Governance Gap ───────────────────────────────────────── */
.governance-gap { background: var(--bg-secondary); }

.protocol-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  margin-bottom: 32px;
}
.protocol-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-primary);
  font-size: 13px;
}
.protocol-table th {
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.protocol-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-secondary);
}
.protocol-table td:first-child { color: var(--text-primary); }
.protocol-table tr:last-child td { border-bottom: none; }
.protocol-table tr.egap-row { background: rgba(0, 201, 177, 0.04); }
.protocol-table tr.egap-row td:first-child {
  color: var(--accent);
  font-weight: 700;
}

.badge-none {
  display: inline-block;
  background: rgba(232, 69, 106, 0.08);
  color: #e8456a;
  border: 1px solid rgba(232, 69, 106, 0.20);
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.badge-required {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.gap-callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.9;
}
.gap-callout strong { color: var(--text-primary); }

/* ── Five Primitives ──────────────────────────────────────── */
.primitives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.primitive-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 26px 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.primitive-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.primitive-icon { font-size: 22px; margin-bottom: 14px; }
.primitive-card h3 {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.primitive-card p {
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ── 5AG Framework Eyebrow ────────────────────────────────── */
.fiveag-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 8px 14px 8px 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  max-width: 100%;
  flex-wrap: wrap;
}
.fiveag-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.fiveag-expand {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.6;
}
.fiveag-expand strong {
  color: var(--signal);
  font-weight: 700;
}
.fiveag-expand em {
  font-style: normal;
  color: var(--signal);
  font-weight: 700;
}

/* ── Protocol Specification ───────────────────────────────── */
.spec-overview { background: var(--bg-primary); }

.spec-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}
.spec-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
}
.spec-meta-label {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.spec-meta-value {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.spec-meta-sub {
  font-family: var(--font-primary);
  font-size: 11px;
  color: var(--text-secondary);
}

.spec-block {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px dashed var(--border);
}
.spec-block:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.spec-block-title {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.spec-block-desc {
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 680px;
}

.spec-bindings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.spec-binding-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 22px 24px;
  transition: border-color 0.2s;
}
.spec-binding-card:hover { border-color: var(--accent-border); }
.spec-binding-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.spec-binding-tag {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}
.spec-binding-card h4 {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.spec-binding-card p {
  font-family: var(--font-primary);
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 6px;
}

/* Normative-sections TOC as compact pill chips */
.spec-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.spec-toc-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.spec-toc-chip:hover {
  border-color: var(--accent-border);
  color: var(--text-primary);
  background: var(--accent-dim);
}
.spec-toc-chip span {
  font-weight: 700;
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: 0.3px;
}

.spec-code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--font-primary);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-primary);
}
.spec-code code {
  font-family: inherit;
  color: inherit;
  background: none;
  padding: 0;
  white-space: pre;
}

.spec-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 56px;
}

/* ── Protocol Ecosystem ───────────────────────────────────── */
.ecosystem { background: var(--bg-secondary); }

.ecosystem-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto 40px;
}
.stack-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  transition: border-color 0.2s;
}
.stack-item:hover { border-color: var(--border-light); }
.stack-item.stack-egap {
  border-color: var(--accent-border);
  background: rgba(0, 201, 177, 0.03);
}
.stack-item.stack-egap:hover { border-color: var(--accent); }

.stack-badge {
  min-width: 50px;
  text-align: center;
  padding: 3px 8px;
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.stack-mcp  { background: rgba(99,102,241,0.10); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.20); }
.stack-a2a  { background: rgba(16,185,129,0.10); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.20); }
.stack-egap-badge { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); }

.stack-desc { flex: 1; }
.stack-desc h4 {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.stack-desc p {
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ecosystem-note {
  text-align: center;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.9;
}
.ecosystem-note strong { color: var(--text-primary); }

/* ── Who Implements ───────────────────────────────────────── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.audience-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  transition: border-color 0.2s;
}
.audience-card:hover { border-color: var(--accent-border); }
.audience-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.audience-card h4 {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.audience-card p {
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Status + Get Involved ────────────────────────────────── */
.status-involve { background: var(--bg-secondary); }
.status-involve-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.status-card, .involve-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 32px;
}
.status-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.status-card h3, .involve-card h3 {
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.status-card p {
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 10px;
}
.involve-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}
.involve-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.involve-link:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.involve-link-icon { font-size: 15px; flex-shrink: 0; }
.involve-link-text { flex: 1; }
.involve-link-text strong { display: block; font-size: 12px; color: var(--text-primary); font-weight: 600; }
.involve-link-text span { font-size: 11px; color: var(--text-muted); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  margin-bottom: 48px;
}
.egap-footer-logo {
  height: 30px;
  width: auto;
  margin-bottom: 12px;
}
.logo-light { display: block; }
.logo-dark  { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark  { display: block; }
}
.footer-tagline {
  font-family: var(--font-primary);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 200px;
  margin-bottom: 24px;
}
.footer-mirastack-label {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.footer-mirastack-logo {
  height: 18px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.footer-mirastack-logo:hover { opacity: 1; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-family: var(--font-primary);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.9;
}
.footer-bottom a { color: var(--text-secondary); }
.footer-bottom a:hover { color: var(--accent); }
.footer-copy { margin-top: 4px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --section-pad: 64px; }
  .status-involve-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --section-pad: 48px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 2px;
  }
  .nav-links--open { display: flex; }
  .nav-toggle { display: flex; }
  .primitives-grid { grid-template-columns: 1fr 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .status-card, .involve-card { padding: 20px; }
}

@media (max-width: 400px) {
  .primitives-grid { grid-template-columns: 1fr; }
}
