/* ============================================================================
   theme.css — PER-APP palette + brand overrides (the only design file a new
   site rewrites). tokens.css supplies structure; this supplies colour and the
   handful of brand-distinguishing knobs (--display serif, --radius, hero
   texture, chip style). Light + dark from the brand-doc palette columns.

   Folded brand: editorial/memoir — a SERIF display face, a warm Paper canvas, and
   a muted sepia-amber accent (old ink on paper). Palette read from the app's own
   colorsets (the upstream source of truth, oomny-design rule): AccentColor
   #B07A3C (light) / #C99655 (dark), Paper #FAF9F5 / #1A1614, Ink #141413 / #EFEEEC.

   Because the fill amber #B07A3C is only ~3.5:1 on the Paper canvas, the contract's
   --accent-text escape hatch carries a darkened amber tuned to AA (≥4.5:1) for links
   + small text; the warmer amber stays for fills, the brand mark and large accents
   (web≠app accent is intentional for AA — oomny-design). Accent-tinted surfaces use
   color-mix(var(--accent)) so re-hueing cascades to the halo + chips automatically.
   ============================================================================ */

/* ---- light (warm Paper canvas) ---- */
:root,
[data-theme="light"] {
  --display:"New York","Iowan Old Style",Georgia,"Times New Roman",serif;
  --bg:#faf9f5; --bg-2:#f1efe7; --surface:#ffffff;
  --text:#141413; --text-soft:#6b6358;
  --accent:#b07a3c; --accent-2:#c79256; --accent-ink:#ffffff;
  --accent-text:#8a5a28;                 /* darkened sepia-amber, AA ≈5.3:1 on --bg / 5.6:1 on white */
  --line:#e6e0d4;
  --verified:#5a7a3c; --caution:#b07d22; --caution-text:#8a6014;
  --halo: radial-gradient(58% 55% at 80% -10%,
            color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%);
}

/* ---- dark (deep warm-paper palette, faint amber atmosphere) ---- */
[data-theme="dark"] {
  --display:"New York","Iowan Old Style",Georgia,"Times New Roman",serif;
  --bg:#1a1614; --bg-2:#221d19; --surface:#2a2420;
  --text:#efeeec; --text-soft:#a89e90;
  --accent:#c99655; --accent-2:#d6a868; --accent-ink:#1a1410;
  --accent-text:#d6a868;                 /* AA ≈7.8:1 on --bg */
  --line:#332b24;
  --verified:#9bbd7a; --caution:#d9b36a; --caution-text:#e0bd79;
  --chip-bg:#2a2420;
  --halo: radial-gradient(58% 55% at 80% -10%,
            color-mix(in oklab, var(--accent) 22%, transparent), transparent 72%);
}

/* Follow the OS when the document hasn't pinned a theme via [data-theme]. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --display:"New York","Iowan Old Style",Georgia,"Times New Roman",serif;
    --bg:#1a1614; --bg-2:#221d19; --surface:#2a2420;
    --text:#efeeec; --text-soft:#a89e90;
    --accent:#c99655; --accent-2:#d6a868; --accent-ink:#1a1410;
    --accent-text:#d6a868;
    --line:#332b24;
    --verified:#9bbd7a; --caution:#d9b36a; --caution-text:#e0bd79;
    --chip-bg:#2a2420;
    --halo: radial-gradient(58% 55% at 80% -10%,
              color-mix(in oklab, var(--accent) 22%, transparent), transparent 72%);
  }
}

/* ---- brand wordmark: the real OOMNY letterforms as a themeable mask -----------
   Brand-specific asset → lives in this per-app file, never shared site.css (C3/C4).
   Rendered as a mask so the colour follows --text and adapts to light/dark; pair it
   with the cloud tile icon (oomny-icon.png). Aspect ratio of the artwork ≈ 4.869. */
.wordmark{display:inline-flex;align-items:center;flex:0 0 auto}
.wordmark img{display:block;width:auto}
.brand .wordmark img{height:18px}
.foot-brand .wordmark img{height:15px}
.wordmark .wm-on-dark{display:none}
[data-theme="dark"] .wordmark .wm-on-light{display:none}
[data-theme="dark"] .wordmark .wm-on-dark{display:block}
@media (prefers-color-scheme:dark){
  :root:not([data-theme]) .wordmark .wm-on-light{display:none}
  :root:not([data-theme]) .wordmark .wm-on-dark{display:block}
}
