/* magalia.wiki — shared design tokens (the PKU History-Department system).
 * Single source of truth, extracted verbatim from index.html's :root (the graph-home,
 * the one page already fully on-palette). Link this FIRST, then a page may override
 * --accent for its family signature. See PKU-DESIGN-REFERENCE.md + RESEARCHER-AUDIT.md §4.
 * Light + dark; every page that links this inherits the same palette + type stack. */
:root{
  /* PKU triad */
  --pku-crimson:#BE1E2D;   /* active / selected / one small accent — never large fills */
  --pku-navy:#1F3A66;      /* structure, chrome, headings (as foreground — flips lighter in dark) */
  --pku-navy-slab:#1F3A66; /* navy as a full BACKGROUND band (bar/footer) — stays dark in both themes */
  --pku-gold:#B8985A;      /* citation / cluster / sparse hairline accent */
  /* paper-to-ink ramp */
  --paper:#fffdf9;         /* canvas */
  --ink:#232323;           /* body + titles */
  --muted:#9A9A9A;         /* secondary labels, "MORE >" */
  --hairline:#E2E2E2;      /* card borders, dividers */
  --sub:#f4f1ea;           /* tint panels / hints */
  /* per-family signature accent — pages override this one line; defaults to crimson */
  --accent:var(--pku-crimson);
  /* protected semantic hues (promoted from ~26 inline literals; do not collapse to --accent) */
  --sdam:#4d7c8a;          /* SDAM / Aegean-survey teal — was inline #4d7c8a */
  --entry:#7a5a99;         /* dictionary-entry violet — was inline #7a5a99 */
  /* type stack */
  --font-sans:-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --font-serif:"Iowan Old Style",Palatino,"Palatino Linotype",Georgia,"Times New Roman",serif;
  --font-classical:"Cardo","EB Garamond",Palatino,Georgia,serif;
  --font-mono:"SF Mono",ui-monospace,"DM Mono",Menlo,Consolas,monospace;
  --font-cjk:"Songti SC","Source Han Serif SC","Noto Serif CJK SC",serif;
}
@media(prefers-color-scheme:dark){
  :root:not([data-theme=light]){
    --paper:#13151b; --ink:#e9e6df; --muted:#7f8794; --hairline:#2a2f3a; --sub:#1b1f27;
    --pku-crimson:#e0566a; --pku-navy:#7ba0db; --pku-gold:#d3b06a; --pku-navy-slab:#16294a;
    --sdam:#6f9aa6; --entry:#a587be;  /* protected hues, ~+18% L for dark canvas */
  }
}
