/* ONE place for brand tokens: colours, fonts, logo colours.
   Markherald, route A "Entered" (approved 11 Nov 2026). Source: brand/brand-book.html section 08 and brand/final/README.md.
   Contrast (WCAG 2.x, light): ink/paper 16.04, muted/paper 6.88, accent-text/paper 5.77, white/accent 4.69,
   clear/paper 5.92, conflict/paper 6.98, caution/paper 5.55. Dark: ink/paper 15.23, accent/paper 5.94. */
/* Fonts are self-hosted (audit L14/X3: no request to Google). OFL 1.1, from github.com/google/fonts (ofl/newsreader,
   ofl/instrumentsans, ofl/jetbrainsmono), converted losslessly from the variable TTF to woff2. Licences in fonts/OFL-*.txt. */
@font-face { font-family: "Newsreader"; src: url("../fonts/Newsreader.woff2") format("woff2"); font-style: normal; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/Newsreader-Italic.woff2") format("woff2"); font-style: italic; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans.woff2") format("woff2"); font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono.woff2") format("woff2"); font-style: normal; font-weight: 100 800; font-display: swap; }

:root {
  --paper: #F6F3EC;        /* page ground */
  --card: #FFFFFF;
  --ink: #16181C;          /* text, logo */
  --muted: #4F545C;        /* graphite: secondary text */
  --rule: #DCD6CA;         /* lines and borders only */
  --soft: #ECE7DC;         /* quiet fills */

  --accent: #D23F26;       /* vermilion: the entry line, the one primary button per screen */
  --accent-text: #B0301B;  /* links and small accent text */
  --on-accent: #FFFFFF;

  /* status: never the brand colour; always paired with a word */
  --clear: #1D6A45;        /* low risk, clear to file */
  --caution: #8A5600;      /* medium risk */
  --conflict: #9E2320;     /* high risk, deadline */

  /* header bar and logo */
  --bar-bg: #F6F3EC;
  --bar-ink: #16181C;
  --logo-tile: #16181C;    /* monogram tile */
  --logo-glyph: #F6F3EC;   /* the m */
  --logo-line: #D23F26;    /* the entry line (always vermilion) */

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111316; --card: #1A1D22; --ink: #ECE8E0; --muted: #A4A9B1; --rule: #2C3036; --soft: #20242A;
    --accent: #F0664B; --accent-text: #F0664B; --on-accent: #111316;
    --clear: #5CC392; --caution: #E0A84A; --conflict: #F08A80;
    --bar-bg: #111316; --bar-ink: #ECE8E0; --logo-tile: #F6F3EC; --logo-glyph: #16181C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111316; --card: #1A1D22; --ink: #ECE8E0; --muted: #A4A9B1; --rule: #2C3036; --soft: #20242A;
  --accent: #F0664B; --accent-text: #F0664B; --on-accent: #111316;
  --clear: #5CC392; --caution: #E0A84A; --conflict: #F08A80;
  --bar-bg: #111316; --bar-ink: #ECE8E0; --logo-tile: #F6F3EC; --logo-glyph: #16181C;
  color-scheme: dark;
}
