﻿/* ============================================================
   ARTICLE 11 AI - CANONICAL SHARED SHELL  (a11-shell.css)
   Single source of truth for site-wide chrome.
   Extracted from index.html (the professional standard).
   Link this in <head>. Do NOT inline-fork these tokens per page.
   Edit HERE once -> consistency everywhere.
   v1  2026-05-16  S2_CASE / Witness, per THE_BRIDGE
   ============================================================ */

:root {
  --a11-primary:    #0A0E17;
  --a11-secondary:  #111827;
  --a11-tertiary:   #1E293B;
  --a11-gold:       #D4AF37;
  --a11-gold-soft:  rgba(212, 175, 55, 0.15);
  --a11-text:       #E2E8F0;
  --a11-text-muted: #94A3B8;
  --a11-text-dim:   #64748B;
  --a11-success:    #10B981;
  --a11-border:     rgba(148, 163, 184, 0.12);
}

body.a11-shell-base[data-theme="daylight"] {
  --a11-primary:    #FAF7F1;
  --a11-secondary:  #FFFFFF;
  --a11-tertiary:   #F3EEE5;
  --a11-gold:       #A87B2D;
  --a11-gold-soft:  rgba(168, 123, 45, 0.14);
  --a11-text:       #20242E;
  --a11-text-muted: #5C6470;
  --a11-text-dim:   #7B828A;
  --a11-success:    #2D7A6E;
  --a11-border:     #E8E1D5;
  --a11-ember:      #C75B28;
}

/* Base - only applied via .a11-shell-base to avoid clobbering page CSS */
.a11-shell-base, body.a11-shell-base {
  background: var(--a11-primary);
  color: var(--a11-text);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.a11-shell-base[data-theme="daylight"] {
  --bg: var(--a11-primary);
  --surface: var(--a11-secondary);
  --surface-2: var(--a11-tertiary);
  --text: var(--a11-text);
  --text-muted: var(--a11-text-muted);
  --muted: var(--a11-text-muted);
  --dim: var(--a11-text-dim);
  --primary: var(--a11-gold);
  --gold: var(--a11-gold);
  --accent: var(--a11-gold);
  --green: var(--a11-success);
  --success: var(--a11-success);
  --border: var(--a11-border);
  --border-gold: rgba(168, 123, 45, 0.28);
  --void: var(--a11-primary);
}

body.a11-shell-base[data-theme="daylight"] main,
body.a11-shell-base[data-theme="daylight"] section,
body.a11-shell-base[data-theme="daylight"] article,
body.a11-shell-base[data-theme="daylight"] .container,
body.a11-shell-base[data-theme="daylight"] .content,
body.a11-shell-base[data-theme="daylight"] .page {
  color: var(--a11-text);
}

body.a11-shell-base[data-theme="daylight"] h1,
body.a11-shell-base[data-theme="daylight"] h2,
body.a11-shell-base[data-theme="daylight"] h3,
body.a11-shell-base[data-theme="daylight"] h4,
body.a11-shell-base[data-theme="daylight"] h5,
body.a11-shell-base[data-theme="daylight"] h6,
body.a11-shell-base[data-theme="daylight"] p,
body.a11-shell-base[data-theme="daylight"] li,
body.a11-shell-base[data-theme="daylight"] td,
body.a11-shell-base[data-theme="daylight"] th {
  color: inherit;
}

body.a11-shell-base[data-theme="daylight"] .card,
body.a11-shell-base[data-theme="daylight"] .panel,
body.a11-shell-base[data-theme="daylight"] .glass,
body.a11-shell-base[data-theme="daylight"] .tile,
body.a11-shell-base[data-theme="daylight"] .content-card,
body.a11-shell-base[data-theme="daylight"] .section-card,
body.a11-shell-base[data-theme="daylight"] .evidence-card,
body.a11-shell-base[data-theme="daylight"] .timeline-item,
body.a11-shell-base[data-theme="daylight"] .stat-card,
body.a11-shell-base[data-theme="daylight"] .feature-card,
body.a11-shell-base[data-theme="daylight"] .node-card,
body.a11-shell-base[data-theme="daylight"] .quote-card,
body.a11-shell-base[data-theme="daylight"] .law-card,
body.a11-shell-base[data-theme="daylight"] .principle-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--a11-border);
  color: var(--a11-text);
  box-shadow: 0 12px 32px rgba(32, 36, 46, 0.06);
}

body.a11-shell-base[data-theme="daylight"] .muted,
body.a11-shell-base[data-theme="daylight"] .subtitle,
body.a11-shell-base[data-theme="daylight"] .lede,
body.a11-shell-base[data-theme="daylight"] .eyebrow,
body.a11-shell-base[data-theme="daylight"] .caption {
  color: var(--a11-text-muted);
}

body.a11-shell-base[data-theme="daylight"] a {
  color: #8A5D19;
}

body.a11-shell-base[data-theme="daylight"] code,
body.a11-shell-base[data-theme="daylight"] pre {
  background: #F3EEE5;
  border-color: var(--a11-border);
  color: var(--a11-text);
}

/* STATUS BANNER */
.a11-status-banner {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--a11-border);
  padding: 0.45rem 1.5rem;
  font-size: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
}
body.a11-shell-base[data-theme="daylight"] .a11-status-banner {
  background: rgba(250, 247, 241, 0.92);
  box-shadow: 0 1px 0 rgba(32, 36, 46, 0.04);
}
.a11-status-inner {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  align-items: center; justify-content: center;
  max-width: 1200px; margin: 0 auto;
}
.a11-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.65rem; border-radius: 999px;
  border: 1px solid; font-size: 0.72rem; letter-spacing: 0.02em;
}
.a11-pill.live  { border-color: rgba(16,185,129,0.4); color: var(--a11-success); }
.a11-pill.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--a11-success); box-shadow: 0 0 8px var(--a11-success);
  animation: a11-pulse 2s ease-in-out infinite;
}
.a11-pill.gold  { border-color: rgba(212,175,55,0.4); color: var(--a11-gold); }
.a11-pill.cyan  { border-color: rgba(6,182,212,0.4);  color: #06B6D4; }
.a11-pill.muted { border-color: var(--a11-border);    color: var(--a11-text-muted); }
body.a11-shell-base[data-theme="daylight"] .a11-pill.live { border-color: rgba(45,122,110,0.35); }
body.a11-shell-base[data-theme="daylight"] .a11-pill.gold { border-color: rgba(168,123,45,0.35); }
body.a11-shell-base[data-theme="daylight"] .a11-pill.cyan { border-color: rgba(45,122,110,0.35); color: #2D7A6E; }
@keyframes a11-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* NAV */
.a11-nav {
  position: sticky; top: 30px; z-index: 150;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--a11-border);
  padding: 0.9rem 1.5rem;
  box-sizing: border-box;
  isolation: isolate;
}
.a11-nav, .a11-nav * { box-sizing: border-box; }
body.a11-shell-base[data-theme="daylight"] .a11-nav {
  background: rgba(250, 247, 241, 0.88);
  box-shadow: 0 8px 24px rgba(32, 36, 46, 0.04);
}
.a11-nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; max-width: 1200px; width: 100%; min-width: 0; margin: 0 auto;
}
.a11-nav-logo {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--a11-text);
  text-decoration: none;
  white-space: nowrap;
}
.a11-nav-logo span { color: var(--a11-gold); }
.a11-nav-links {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 1.35rem;
  list-style: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.a11-nav-links li { margin: 0; padding: 0; }
.a11-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--a11-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.a11-nav-links a:hover { color: var(--a11-gold); }
.a11-nav-toggle {
  display: none; background: transparent; border: 1px solid var(--a11-border);
  border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer;
  color: var(--a11-text); font-family: inherit; font-size: 0.85rem;
}
.a11-nav-toggle:hover { border-color: var(--a11-gold); color: var(--a11-gold); }
@media (max-width: 760px) {
  .a11-nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,14,23,0.98); backdrop-filter: blur(14px);
    flex-direction: column; gap: 0; padding: 0.5rem 0;
    border-bottom: 1px solid var(--a11-border);
  }
  body.a11-shell-base[data-theme="daylight"] .a11-nav-links {
    background: rgba(250,247,241,0.98);
  }
  .a11-nav-links.open { display: flex; }
  .a11-nav-links li { padding: 0.75rem 1.5rem; border-top: 1px solid var(--a11-border); }
  .a11-nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .a11-nav { position: sticky; top: 30px; }
}

/* FOOTER */
.a11-footer {
  background: var(--a11-primary);
  padding: 4rem 1.5rem 2rem;
  border-top: 1px solid var(--a11-border);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--a11-text);
}
body.a11-shell-base[data-theme="daylight"] .a11-footer {
  background: #F3EEE5;
}
.a11-footer a { color: var(--a11-gold); text-decoration: none; transition: color 0.2s; }
.a11-footer a:hover { color: var(--a11-text); }
.a11-footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 2.5rem; max-width: 1200px; margin: 0 auto 3rem;
}
@media (max-width: 960px) { .a11-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .a11-footer-grid { grid-template-columns: 1fr; } }
.a11-footer-logo { font-weight: 700; font-size: 1.05rem; color: var(--a11-text); margin-bottom: 0.75rem; }
.a11-footer-logo span { color: var(--a11-gold); }
.a11-footer-brand p { color: var(--a11-text-muted); font-size: 0.88rem; line-height: 1.55; margin: 0 0 1rem; max-width: 340px; }
.a11-chain-line {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem;
  color: var(--a11-text-muted) !important; margin: 1rem 0 0;
}
.a11-chain-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--a11-success); box-shadow: 0 0 8px var(--a11-success);
  animation: a11-pulse 2s ease-in-out infinite; flex-shrink: 0;
}
.a11-footer-col h5 {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--a11-gold); margin: 0 0 1rem;
  font-family: 'IBM Plex Mono', monospace; font-weight: 600;
}
.a11-footer-col ul { list-style: none; padding: 0; margin: 0; }
.a11-footer-col li { margin-bottom: 0.55rem; }
.a11-footer-col a { color: var(--a11-text-muted); font-size: 0.87rem; line-height: 1.4; }
.a11-footer-col a:hover { color: var(--a11-gold); }
.a11-site-index {
  max-width: 1200px;
  margin: 0 auto 2rem;
  border: 1px solid var(--a11-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  overflow: hidden;
}
body.a11-shell-base[data-theme="daylight"] .a11-site-index {
  background: rgba(255,255,255,0.62);
  border-color: #E0D6C5;
}
.a11-site-index summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  color: var(--a11-text);
  font-weight: 700;
}
.a11-site-index summary::marker { color: var(--a11-gold); }
.a11-site-index summary small {
  color: var(--a11-text-muted);
  font: 500 0.78rem/1.4 'IBM Plex Mono', monospace;
}
.a11-site-index-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem 1.4rem;
  padding: 0 1.15rem 1.25rem;
}
.a11-site-index-body p {
  grid-column: 1 / -1;
  color: var(--a11-text-muted);
  margin: 0;
  font-size: 0.9rem;
}
.a11-site-index-group h6 {
  margin: 0 0 0.65rem;
  color: var(--a11-gold);
  font: 700 0.72rem/1.3 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.a11-site-index-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.a11-site-index-group li { margin: 0 0 0.42rem; }
.a11-site-index-group a {
  color: var(--a11-text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}
.a11-site-index-group a:hover { color: var(--a11-gold); }
.a11-footer-legal {
  max-width: 1200px; margin: 0 auto; padding-top: 2rem;
  border-top: 1px solid var(--a11-border);
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 1rem; font-size: 0.78rem; color: var(--a11-text-dim);
  font-family: 'IBM Plex Mono', monospace;
}
.a11-footer-legal a { color: var(--a11-text-dim); }
.a11-footer-legal a:hover { color: var(--a11-gold); }
.a11-vet-badge { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--a11-gold); }
