/* ==========================================================================
   ChatBabe brand layer — woaixiaobao.top (main site)
   Source of truth: D:\代码库\探索\chatbabe-brand\ (final, 2026-09-15)
   Generated/owned by: chatbabe-android/brand/main-site/apply-head.mjs
   Loaded AFTER each page's inline <style>, so equal-specificity `:root`
   declarations here win over the inline tokens by document order.

   Scope is deliberately narrow (no layout redesign):
     1. real Instrument Serif webfont (the stacks already name it first, but no
        @font-face existed, so every page silently fell back to Georgia)
     2. dark --bg unified to the brand warm black #12100e (icon plate colour)
     3. the wordmark period (.dot) in brand gold #c9a227
     4. light-mode tokens aligned to the brand palette
   ========================================================================== */

/* --- 1. Instrument Serif (SIL OFL) ------------------------------------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}

/* --- brand tokens (single source of truth) ----------------------------- */
:root {
  --ink-900: #12100e;      /* warm black plate */
  --paper-50: #f2f0eb;     /* type on dark */
  --brand-gold: #c9a227;   /* the period */
  --site-bg: #fbfaf8;
  --site-fg: #0a0a0a;
  --hairline: #e8e6e1;
}

/* --- 4. light system aligned to brand tokens --------------------------- */
:root {
  --bg: #fbfaf8;   /* --site-bg   (unchanged) */
  --fg: #0a0a0a;   /* --site-fg   (was #0f0f0f) */
  --muted: #9a9a96; /* --muted    (unchanged) */
  --hair: #e8e6e1;  /* --hairline (unchanged) */
}

/* --- 2. dark system: one single warm black ----------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12100e;   /* --ink-900 (was #0a0a0a) */
    --fg: #f2f0eb;   /* --paper-50 */
    --muted: #6e6e6a;
    --hair: #1e1e1c;
  }
}

/* --- 3. the period is the brand asset -------------------------------- */
h1 span.dot,
h1 .dot,
.dot {
  color: var(--brand-gold);
}

/* Serif headings: the stacks already request Instrument Serif; state it once
   more here so the intent survives any later stack edit. Nothing else. */
h1 {
  font-family: "Instrument Serif", "Newsreader", Georgia, serif;
}
