/* ASDL shared design system — identical copy ships in both sites so each
   remains independently publishable (no cross-site runtime dependency). */

:root {
  /* neutral ground */
  --paper: #f6f4ee;
  --surface: #fcfbf8;
  --ink: #1d1f23;
  --ink-2: #4a4f57;
  --ink-3: #626872;
  --rule: #d9d5ca;
  --rule-strong: #b3ae9f;
  --accent: #23467a;
  --accent-soft: #e3e9f3;
  --focus: #b25e00;

  /* shared status vocabulary (never colour alone: each also has a glyph + border style) */
  --declared: #23467a;
  --recorded: #4a4f57;
  --verified: #1f6b45;
  --unresolved: #8f5200;

  /* shared structural vocabulary */
  --s-descriptor: #23467a;
  --s-body: #2b2f36;
  --s-edges: #6a3f8c;
  --s-footing: #7d5a10;

  --font-serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --measure: 42rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: 1rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14161a;
    --surface: #1b1e23;
    --ink: #e9e7e1;
    --ink-2: #bcbfc6;
    --ink-3: #9aa0aa;
    --rule: #2d3138;
    --rule-strong: #484e58;
    --accent: #9bbdf0;
    --accent-soft: #212c3d;
    --focus: #f0b04d;
    --declared: #9bbdf0;
    --recorded: #bcbfc6;
    --verified: #74d3a0;
    --unresolved: #e8ad55;
    --s-descriptor: #9bbdf0;
    --s-body: #e9e7e1;
    --s-edges: #c9a9ea;
    --s-footing: #dcb865;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); line-height: 1.55; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
code, pre, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code { background: color-mix(in srgb, var(--rule) 55%, transparent); padding: 0.05em 0.3em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--surface); border: 1px solid var(--rule); padding: 0.9rem 1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 0.5rem; top: -4rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { top: 0.5rem; }
.wrap { max-width: 80rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header / navigation (shared) ---------- */
.site-header { border-bottom: 1px solid var(--rule-strong); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 2rem; padding-top: 0.8rem; padding-bottom: 0.7rem; }
.brand { margin: 0; line-height: 1.15; }
.brand a { color: inherit; text-decoration: none; display: block; }
.brand-mark { display: block; font-weight: 700; font-size: 1.35rem; letter-spacing: 0.14em; }
.brand-sub { display: block; font-size: 0.82rem; color: var(--ink-2); letter-spacing: 0.02em; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.1rem 1.25rem; }
.primary-nav a { display: inline-block; padding: 0.35rem 0; color: var(--ink-2); text-decoration: none; font-size: 0.92rem; border-bottom: 2px solid transparent; }
.primary-nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.primary-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.site-footer { border-top: 1px solid var(--rule-strong); margin-top: 4rem; padding: 1.5rem 0 3rem; color: var(--ink-2); font-size: 0.88rem; }
.site-footer p { margin: 0.3rem 0; max-width: 60rem; }

/* ---------- status vocabulary (declared / recorded / verified / unresolved) ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.3em; font: 600 0.72rem/1.4 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 0.05em 0.5em; border: 1.5px solid currentColor; border-radius: 3px; white-space: nowrap; vertical-align: middle; }
.badge::before { font-size: 0.95em; }
.badge[data-status="declared"] { color: var(--declared); border-style: solid; }
.badge[data-status="declared"]::before { content: "\25C7"; }            /* ◇ */
.badge[data-status="recorded"] { color: var(--recorded); background: color-mix(in srgb, var(--recorded) 14%, transparent); }
.badge[data-status="recorded"]::before { content: "\25C6"; }            /* ◆ */
.badge[data-status="verified"] { color: var(--verified); background: color-mix(in srgb, var(--verified) 14%, transparent); border-width: 2px; }
.badge[data-status="verified"]::before { content: "\2713"; }            /* ✓ */
.badge[data-status="unresolved"] { color: var(--unresolved); border-style: dashed; }
.badge[data-status="unresolved"]::before { content: "?"; font-weight: 800; }
.badge[data-status="invalid"] { color: var(--ink-3); border-style: dotted; }

.legend { display: grid; gap: 0.5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1rem 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--ink-2); }
.legend li { display: flex; gap: 0.6rem; align-items: baseline; }

/* ---------- placeholder (shown wherever authored content is absent) ---------- */
.placeholder { border: 1.5px dashed var(--rule-strong); background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--rule) 35%, transparent) 10px 11px); padding: 0.9rem 1.1rem; margin: 1rem 0; font-family: var(--font-sans); font-size: 0.92rem; color: var(--ink-2); }
.placeholder p { margin: 0.35rem 0; }
.placeholder-tag { display: inline-block; font: 700 0.7rem/1 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; border: 1.5px solid var(--ink-3); color: var(--ink-2); padding: 0.25em 0.5em; margin-right: 0.5rem; }
.absent { color: var(--ink-3); font-style: italic; }

/* ---------- markdown output ---------- */
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { line-height: 1.25; margin: 2em 0 0.5em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0.9em 0; }
.prose blockquote { border-left: 3px solid var(--rule-strong); padding: 0.1em 1em; color: var(--ink-2); }
.prose .anchor { visibility: hidden; text-decoration: none; margin-left: 0.3em; font-weight: 400; color: var(--ink-3); }
.prose :is(h1,h2,h3,h4,h5,h6):hover .anchor, .prose .anchor:focus { visibility: visible; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--rule); }
th { font: 600 0.74rem/1.3 var(--font-sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule-strong); }
.table-scroll { overflow-x: auto; }

@media print { .site-header { position: static; } .skip-link { display: none; } }
