/* =====================================================================
   GOVERNEDAI.AI — Editorial Authority Stylesheet · v2.0
   ---------------------------------------------------------------------
   Aesthetic family: Stripe Press × Brookings × Apple ML × New Yorker
   Palette:          vellum (page) · ink (text) · foundry (accent) · seal (gold)
   Typography:       Cormorant Garamond (display) — system serif fallback
                     Source Serif 4 (body) — Georgia fallback
                     Geist (sans) — system-ui fallback
                     JetBrains Mono (code) — Menlo fallback
   Note:             All fonts have full system-font fallbacks. Site
                     renders correctly without any third-party CDN.
   ===================================================================== */

/* -- Color tokens -------------------------------------------------- */
:root {
  --ink:        #0A0E14;   /* Body text and primary structure */
  --vellum:     #F5F2EA;   /* Page background — warm cream */
  --paper:      #FBFAF5;   /* Card / inset background */
  --foundry:    #1B2A3A;   /* Deep institutional blue accent */
  --seal:       #B8860B;   /* Burnished gold for hexagon + receipts */
  --verdigris:  #3D6B5B;   /* Green for "PASS" / "running" maturity */
  --iron:       #8B2A2A;   /* Deep red for "FAIL" / fail-closed */
  --granite:    #5A6373;   /* Muted gray for metadata + secondary */
  --rule:       #C8C0B0;   /* Hairline rule between sections */
  --linkhover:  #2D4A66;   /* Hover state */
}

/* -- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; line-height: 1.65; }
body {
  margin: 0;
  background: var(--vellum);
  color: var(--ink);
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -- Layout container --------------------------------------------- */
.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}
.shell--wide { max-width: 980px; }

/* -- Masthead ----------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
}
.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem;
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--granite);
  margin-bottom: 1rem;
}
.masthead__nav a {
  color: var(--granite);
  text-decoration: none;
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a.active { color: var(--ink); border-bottom: 1px solid var(--seal); padding-bottom: 0.2em; }

.masthead__brand {
  font-family: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.masthead__brand a {
  color: inherit;
  text-decoration: none;
}
.masthead__tagline {
  font-style: italic;
  color: var(--granite);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* -- Hexagonal seal ----------------------------------------------- */
.seal {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  vertical-align: middle;
  fill: var(--seal);
  margin: 0 0.1em;
}
.seal-line {
  text-align: center;
  margin: 3rem 0 2rem;
  color: var(--granite);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'Geist', system-ui, sans-serif;
}
.seal-line::before { content: "⬡"; color: var(--seal); margin-right: 0.5em; }
.seal-line::after  { content: "⬡"; color: var(--seal); margin-left: 0.5em; }

/* -- Headings ----------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
}
h1 {
  font-size: 2.8rem;
  letter-spacing: -0.01em;
  margin: 1rem 0 1.5rem;
}
h2 {
  font-size: 2rem;
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
h3 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  font-style: italic;
  font-weight: 500;
}
h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  font-family: 'Geist', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--granite);
  font-weight: 500;
}

/* -- Lede --------------------------------------------------------- */
.lede {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
  margin: 2rem 0;
  font-family: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  font-weight: 500;
  line-height: 1.45;
}

/* -- Body text ---------------------------------------------------- */
p { margin: 0 0 1.25rem; }
p > a, li > a {
  color: var(--foundry);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
p > a:hover, li > a:hover {
  color: var(--linkhover);
  border-bottom-color: var(--linkhover);
}

/* -- Pull-quote / doctrine block ----------------------------------- */
.doctrine {
  border-left: 3px solid var(--seal);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--paper);
  font-family: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
}

/* -- Code / hash ---------------------------------------------------- */
code, pre {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', Menlo, Consolas, monospace;
  font-size: 0.85rem;
}
code { background: var(--paper); padding: 0.05em 0.3em; border-radius: 2px; }
pre {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
pre code { background: transparent; padding: 0; font-size: 0.8rem; line-height: 1.45; }

/* -- Maturity badge ----------------------------------------------- */
.maturity {
  display: inline-flex;
  align-items: center;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2em 0.7em;
  border-radius: 3px;
  margin-right: 0.5em;
  border: 1px solid currentColor;
}
.maturity--drafted     { color: var(--granite); }
.maturity--sealed      { color: var(--seal); border-color: var(--seal); }
.maturity--replayable  { color: var(--foundry); border-color: var(--foundry); }
.maturity--reviewed    { color: var(--verdigris); border-color: var(--verdigris); }
.maturity--cited       { color: var(--ink); }

/* -- Status pill (running / specified / etc.) ------------------- */
.status {
  display: inline-block;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: 2px;
}
.status--running    { background: var(--verdigris); color: var(--paper); }
.status--specified  { background: var(--granite); color: var(--paper); }
.status--accumulating { background: var(--seal); color: var(--ink); }
.status--blocked    { background: var(--iron); color: var(--paper); }
.status--attested-pending { background: var(--foundry); color: var(--paper); }

/* -- Provenance bar ---------------------------------------------- */
.provenance {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
  margin: 2rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--granite);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}
.provenance__hash { color: var(--ink); }

/* -- Pillar grid (homepage + /architecture/) -------------------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.pillar {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.pillar:hover { border-color: var(--seal); }
.pillar__name {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.pillar__role {
  color: var(--granite);
  font-size: 0.85rem;
  font-style: italic;
  font-family: 'Source Serif 4', Georgia, serif;
}
.pillar__line {
  margin-top: 1rem;
  font-size: 0.95rem;
}
.pillar__verb {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--seal);
  margin-top: 1rem;
}

/* -- Tables (status / verifier-state) ---------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--rule);
}
th {
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--granite);
}

/* -- Footer ------------------------------------------------------ */
.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  background: var(--paper);
}
.colophon__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-size: 0.8rem;
  color: var(--granite);
  font-family: 'Geist', system-ui, sans-serif;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
.colophon h5 {
  font-family: 'Geist', system-ui, sans-serif;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.colophon a { color: var(--granite); display: block; line-height: 1.8; text-decoration: none; }
.colophon a:hover { color: var(--ink); }
.colophon__seal {
  grid-column: 1 / -1;
  text-align: center;
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--granite);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}

/* -- Lists ------------------------------------------------------- */
ul.clean { list-style: none; padding: 0; }
ul.clean li {
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--rule);
}
ul.clean li:last-child { border-bottom: none; }

/* -- Tier-0 disclosure note --------------------------------------- */
.tier-note {
  border-left: 2px solid var(--granite);
  padding: 0.5rem 1rem;
  margin: 2rem 0;
  font-size: 0.85rem;
  color: var(--granite);
  font-style: italic;
  background: transparent;
}

/* -- Locked surface (for /diligence/ skeleton) -------------------- */
.locked-room {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--paper);
  border: 2px solid var(--rule);
  margin: 3rem 0;
}
.locked-room__icon {
  font-size: 3rem;
  color: var(--seal);
  margin-bottom: 1rem;
  line-height: 1;
}
.locked-room__title {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}
.locked-room__sub {
  color: var(--granite);
  font-style: italic;
  margin-bottom: 2rem;
}

/* -- Access-request CTA box --------------------------------------- */
.cta-box {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  margin: 2rem 0;
}
.cta-box__title {
  font-family: 'Cormorant Garamond', Garamond, serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.cta-box__action {
  display: inline-block;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--foundry);
  color: var(--paper);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border: none;
  margin-top: 1rem;
}
.cta-box__action:hover { background: var(--ink); }

/* -- Mobile responsiveness --------------------------------------- */
@media (max-width: 720px) {
  html { font-size: 16px; }
  .shell { padding: 2rem 1.25rem 4rem; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .masthead__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .colophon__inner {
    grid-template-columns: 1fr;
  }
}
