/* AI-Ascension — Ascent Ledger design tokens.
   Source of truth for color, type, measure and motion. No external requests.
   Fonts are self-hosted under ../fonts (SIL OFL 1.1; see ../fonts/NOTICES.md). */

:root {
  --ground:#F4EEE2; --ground-2:#EBE3D3; --rule:#CFC3AE; --ink:#1A1712;
  --ink-dim:#5E564A; --ember:#9C5B12; --ember-hi:#C8782A;
  --confirmed:#2F7F66; --source-derived:#4E6A8F; --proposed:#9A7B1C;
  --inferred:#6F5A94; --unverified:#A8402F;
  --font-display:"Fraunces", Georgia, serif;
  --font-body:"Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-mono:"JetBrains Mono", Consolas, monospace;
  --measure:62ch; --page-max:76rem; --spire-x:38%;
  --motion:1;
  color-scheme: light;
}

/* Dark theme: system preference (unless the page forces light) … */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:#0B0A08; --ground-2:#15120E; --rule:#2A241C; --ink:#EDE4D3;
    --ink-dim:#A89F8C; --ember:#E39B3A; --ember-hi:#F2B75C;
    --confirmed:#5FA88F; --source-derived:#7F8FA6; --proposed:#D2B04C;
    --inferred:#A08AB8; --unverified:#C25B4A;
    color-scheme: dark;
  }
}
/* … or an explicit toggle. */
:root[data-theme="dark"] {
  --ground:#0B0A08; --ground-2:#15120E; --rule:#2A241C; --ink:#EDE4D3;
  --ink-dim:#A89F8C; --ember:#E39B3A; --ember-hi:#F2B75C;
  --confirmed:#5FA88F; --source-derived:#7F8FA6; --proposed:#D2B04C;
  --inferred:#A08AB8; --unverified:#C25B4A;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground:#F4EEE2; --ground-2:#EBE3D3; --rule:#CFC3AE; --ink:#1A1712;
  --ink-dim:#5E564A; --ember:#9C5B12; --ember-hi:#C8782A;
  --confirmed:#2F7F66; --source-derived:#4E6A8F; --proposed:#9A7B1C;
  --inferred:#6F5A94; --unverified:#A8402F;
  color-scheme: light;
}

/* Motion guard: multiply durations by var(--motion); 0 shows the final state. */
@media (prefers-reduced-motion: reduce) {
  :root { --motion:0; }
}

/* Self-hosted variable fonts (fontsource 5.3.0 latin subsets, wght axis). */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/fraunces-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/fraunces-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Base surface (opt-in by linking this file; keep minimal). */
html { background: var(--ground); color: var(--ink); }
body { font-family: var(--font-body); }

/* Wordmark helper: inline the outlined SVG (wordmark.svg) inside an element with this class.
   The SVG uses currentColor, so `color` sets the ink; the caret can be tinted via --wordmark-caret. */
.wordmark { display: inline-block; color: var(--ink); line-height: 0; }
.wordmark svg { display: block; height: 1em; width: auto; fill: currentColor; }
.wordmark svg #caret { fill: var(--wordmark-caret, currentColor); }
.wordmark--ember { --wordmark-caret: var(--ember); }

/* Evidence stamp: 20px seal + mono label. Only the icon carries the evidence colour;
   the label is always ink-dim (lead decision 2026-09-02: labels must meet AA text contrast).
   <span class="stamp stamp--confirmed"><svg class="stamp__icon" …inline stamps/confirmed.svg…></svg>confirmed</span>
   Inline SVGs use currentColor; <img> fallbacks carry the light colour baked in. */
.stamp {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-mono); font-size: .8125rem; font-weight: 500;
  letter-spacing: .02em; line-height: 1; color: var(--ink-dim);
  white-space: nowrap; vertical-align: middle;
}
.stamp__icon, .stamp > svg, .stamp > img { width: 20px; height: 20px; flex: none; }
.stamp--confirmed      > .stamp__icon, .stamp--confirmed      > svg { color: var(--confirmed); }
.stamp--source-derived > .stamp__icon, .stamp--source-derived > svg { color: var(--source-derived); }
.stamp--proposed       > .stamp__icon, .stamp--proposed       > svg { color: var(--proposed); }
.stamp--inferred       > .stamp__icon, .stamp--inferred       > svg { color: var(--inferred); }
.stamp--unverified     > .stamp__icon, .stamp--unverified     > svg { color: var(--unverified); }

/* Stamp print: a brief settle when a stamp enters (scaled by --motion). */
@keyframes stamp-print { from { transform: scale(1.18); opacity: 0; } to { transform: none; opacity: 1; } }
.stamp[data-print] > .stamp__icon, .stamp[data-print] > svg { animation: stamp-print calc(220ms * var(--motion)) cubic-bezier(.2,.8,.2,1) both; transform-origin: 50% 50%; }
