/* ============================================================================
   AfriVal — The Line 2.0 + Decision D2 (Datum 1D + Survey Amber)
   Single source of truth for all colors, typography, and spacing.
   Zero third-party font or asset requests.
   ============================================================================ */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-600.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400 600; font-display: swap; unicode-range: U+0100-02BA, U+02C6-02CF, U+1E00-1EFF, U+20A6; src: url("fonts/noto-sans-african-a.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400 600; font-display: swap; unicode-range: U+0253-0292, U+0300-036F; src: url("fonts/noto-sans-african-b.woff2") format("woff2"); }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/charissil-400-core.woff2") format("woff2"); }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1EFF, U+0300-036F; src: url("fonts/charissil-400-african.woff2") format("woff2"); }
@font-face { font-family: "Charis SIL"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/charissil-400i-core.woff2") format("woff2"); }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/charissil-700-core.woff2") format("woff2"); }
@font-face { font-family: "Charis SIL"; font-style: normal; font-weight: 700; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1EFF, U+0300-036F; src: url("fonts/charissil-700-african.woff2") format("woff2"); }
@font-face { font-family: "Noto Serif Ethiopic"; font-style: normal; font-weight: 400 700; font-display: swap; size-adjust: 90%; src: url("fonts/notoserifethiopic-400_700-ethiopic.woff2") format("woff2"); }
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 400 700; font-display: swap; size-adjust: 94%; src: url("fonts/notonaskharabic-400_700-arabic.woff2") format("woff2"); }

:root {
  color-scheme: light;

  /* Archival Mineral Paper */
  --paper:        #FAF9F6;
  --paper-elev:   #FFFFFF;
  --paper-2:      #F3F1EC;
  --paper-3:      #E7E4DC;

  /* Carbon Ink & Tonal Rules */
  --ink:          #111316;
  --ink-2:        #3C3F45;
  --ink-3:        #65686E;
  --rule:         #DDD9D0;
  --rule-strong:  #B5B0A5;
  --rule-2:       #7D7970;

  /* Survey Amber (Decision D2 — measurement ink & Datum shelf, never paint) */
  --line:         #A85600;
  --line-dash:    #C47520;
  --line-tint:    rgba(168, 86, 0, 0.09);
  --line-border:  rgba(168, 86, 0, 0.34);
  --sign-datum:   var(--line);
  --mast-bg:      rgba(250, 249, 246, 0.94);

  /* Three Typographic Registers (SIL OFL self-hosted + system fallback) */
  --font-inst:    "IBM Plex Sans", "Noto Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-voice:   "Charis SIL", "Noto Serif Ethiopic", "Noto Naskh Arabic", Georgia, serif;
  --font-mono:    "IBM Plex Mono", "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max-w:        980px;
  --measure:      660px;
  --head-h:       58px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Obsidian Slate Dark */
  --paper:        #0E1013;
  --paper-elev:   #14171C;
  --paper-2:      #181C22;
  --paper-3:      #222730;

  --ink:          #ECEAE4;
  --ink-2:        #B6B3AB;
  --ink-3:        #85827A;
  --rule:         #252A32;
  --rule-strong:  #3A404A;
  --rule-2:       #6E727A;

  /* Luminous Survey Amber (8.41:1 AAA on #0E1013) */
  --line:         #EB9B34;
  --line-dash:    #D98E2E;
  --line-tint:    rgba(235, 155, 52, 0.14);
  --line-border:  rgba(235, 155, 52, 0.38);
  --sign-datum:   var(--line);
  --mast-bg:      rgba(14, 16, 19, 0.94);
}

@media print {
  :root, :root[data-theme="dark"] {
    --paper: #FFFFFF;
    --paper-elev: #FFFFFF;
    --paper-2: #F5F5F5;
    --ink: #000000;
    --ink-2: #222222;
    --ink-3: #555555;
    --rule: #CCCCCC;
    --sign-datum: #000000;
  }
}
