/* patterns/axial.css — the corpus-owned stylesheet pattern for axial (timechorus.com).
 *
 * THIS FILE IS NOT LOADED BY ANYTHING. It lives outside engine/, schema/ and tools/, the
 * three trees tools/sync_engine.sh vendors, on purpose — so it never lands inside a
 * consumer's vendored `site/engine/` copy. It is documentation the engine repo ships
 * alongside v0.3.1 (task r3-2, "axial owns its own tokens"): the ready-to-land content of
 * `site/styles/axial.css` in the timechorus repo, where r3-4 is the task that actually
 * copies it there and links it in `index.html` — right after `engine/styles/engine.css` —
 * so the cascade order is: engine defaults, then this corpus's resets.
 *
 * It resets exactly the `--tc-*` tokens engine.css v0.3.1 introduced at `:root`
 * (docs/delivery_vision_r2-4.md §2.3 + §2.5, ruling L-50 — implemented here, not
 * redesigned). Two things, matching the two findings in that delivery:
 *
 *   1. Latin-first font stacks — engine/styles/sync.css's `.sync-home` already carries
 *      these verbatim (r1-2's own stacks, ported at r2-2). Promoted here to `:root` so
 *      every route gets them, not only the home screen — the fix for §2.5's SimSun
 *      finding (chunqiu's CJK-first `--serif`/`--sans` resolving on Latin text site-wide).
 *
 *   2. A whole-page dark palette under the standard `prefers-color-scheme: dark` query —
 *      the fix for §2.3's "dark island on a cream page": the exact page/surface/ink/soft/
 *      edge values r1-2 §8 measured and published (identical to the `.sync-home`-scoped
 *      dark block r2-6 removed under L-50 — "not-dark beats half-dark; Round-3 reinstates
 *      via corpus tokens" — this file is that reinstatement, now at `:root` so it reaches
 *      chronicle, relations, library, timeline, map and compare too, not just the home).
 *      `engine/styles/sync.css` v0.3.1 aliases five of `.sync-home`'s own `--sy-*` names to
 *      these same `--tc-*` tokens, so resetting them here also moves the home's own dark
 *      palette — nothing further is needed in this file for the home view specifically.
 *
 * No web fonts, no CDN, no script-driven styling: red line 7 holds. Nothing here needs a
 * build step or a preprocessor — plain CSS custom properties, reset once. */

:root {
  /* --- Latin-first stacks, verbatim from engine/styles/sync.css's `.sync-home` block ---
   * (r1-2's own font research: Latin faces first, then CJK/Hebrew/Devanagari fallbacks for
   * `name_original` / `quote_original` content, which still needs to render in its own
   * script wherever it appears on an otherwise-English page). */
  --tc-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Noto Serif", "Liberation Serif", Georgia, "Times New Roman", serif,
    "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun",
    "Noto Serif Hebrew", "David Libre", "Frank Ruhl Libre",
    "Noto Serif Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Mangal";
  --tc-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif,
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC",
    "Noto Sans Hebrew", "Arial Hebrew", "Nirmala UI", "Noto Sans Devanagari";
  --tc-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* --- axial light palette (Vision r3-6; lead decision, L-61) ----------------------------
   * Surfaces keep the inherited silk values. Four ink tokens are darkened just past the 4.5
   * text floor on --tc-surface #F4EDDF, the darker of the two light grounds (WCAG 2.1; the
   * figures are surface / surface-alt): */
  --tc-ink-soft: #71695f;  /* 4.64 / 5.05   was #7A7166  4.11 / 4.48 */
  --tc-accent: #9e5929;    /* 4.60 / 5.01   was #B4652F  3.72 / 4.05 */
  --tc-accent-2: #427268;  /* 4.70 / 5.11   was #44766B  4.45 / 4.84 */
  --tc-accent-3: #b84332;  /* 4.64 / 5.05   was #BC4433  4.49 / 4.89 */
}

/* --- whole-page dark palette --------------------------------------------------------
 * Values are r1-2 §8's own dark-theme table (docs/delivery_vision_r1-2.md), the same
 * numbers the `.sync-home`-scoped block carried before r2-6 removed it (L-50):
 *   --tc-surface     "page"    #191c21
 *   --tc-surface-alt "surface" #20242a
 *   --tc-ink                   #ece8e0   (12.76 on surface — r1-2 §8, floor 4.5)
 *   --tc-ink-soft    "role tag"#b6afa3   (7.16  on surface — r1-2 §8, floor 4.5)
 *   --tc-line        "edge"    #727b88   (3.64  on surface — r1-2 §8, floor 3.0;
 *                                         a meaningful border, not a decorative hairline)
 * r1-2 §8 never measured chunqiu's three accent hues (ochre/bronze/cinnabar) in dark
 * mode — the mock it measured had no accent hue at all, only page/surface/ink/soft/edge.
 * Left unlifted, two of the three fall under the 3:1 graphical-object floor against
 * `--tc-surface-alt` (measured: ochre 3.59, bronze 3.01, cinnabar 2.98 — cinnabar fails).
 * This file lifts all three toward white by 42%, the exact `liftColour()` formula
 * `engine/views/sync.js` already applies to region colours for the same reason (r1-2 §5's
 * recommendation, generalised here to the three functional accents rather than left as a
 * gap): `v + (255-v)*0.42`. Re-measured after the lift — all comfortably clear both
 * floors against both dark backgrounds:
 *   --tc-accent   (ochre,    #B4652F -> #d4a686)  7.12 / 7.81  (surface-alt / page)
 *   --tc-accent-2 (bronze,   #44766B -> #93b0a9)  6.70 / 7.34
 *   --tc-accent-3 (cinnabar, #BC4433 -> #d89389)  6.28 / 6.88
 * This is Skipper's engineering decision, not part of the r1-2/r2-4 design brief verbatim
 * — flagged here and in docs/delivery_skipper_r3-2.md so the lead or Vision can rule
 * otherwise if a different dark accent is wanted. Confirmed as shipped, Vision r3-6 (live origin, 2026-09-14). */
@media (prefers-color-scheme: dark) {
  :root {
    --tc-surface: #191c21;
    --tc-surface-alt: #20242a;
    --tc-ink: #ece8e0;
    --tc-ink-soft: #b6afa3;
    --tc-line: #727b88;
    --tc-accent: #d4a686;
    --tc-accent-2: #93b0a9;
    --tc-accent-3: #d89389;
  }
}
