@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400;500;700&display=swap');
/* Substrate theme: Accessible Edition (high-contrast / dyslexia-friendly)
 * Single typeface throughout (--font-institutional aliased to the primary
 * face). Violet aliased to Iron — PKD/Coherence content carries a mandatory
 * text label so the semantic distinction is preserved without color.
 * See instructions_visual_style_guide_accessible.md.
 *
 * An explicitly-selected theme: it applies only under
 * [data-theme="accessible"]. The default ground state (no data-theme, or an
 * unrecognized one) is the Rim theme — see substrate-theme-rim.css. */

:root[data-theme="accessible"] {
  color-scheme: light;
  --sub-bg:           #FFFFFF;
  --sub-surface:      #F2F2F0;
  --sub-border:       #8A8A8A;
  --sub-text:         #1A1A1A;
  --sub-muted:        #505050;

  --sub-teal:         #0D3D7A;
  --sub-teal-light:   #E2EBF5;
  --sub-amber:        #6B4400;
  --sub-amber-light:  #F3EDD8;
  --sub-violet:       #404040;   /* aliased to Iron */
  --sub-violet-light: #F2F2F0;
  --sub-iron:         #404040;
  --sub-ember:        #7A0000;
  --sub-ember-light:  #F5E0E0;

  --sub-success:      #1A6629;
  --sub-danger:       var(--sub-ember);
  --sub-danger-light: var(--sub-ember-light);

  --sub-stamp-flagged:    var(--sub-teal);
  --sub-stamp-restricted: var(--sub-violet);
  --sub-stamp-audited:    var(--sub-amber);
  --sub-stamp-frozen:     var(--sub-iron);
  --sub-stamp-disputed:   var(--sub-ember);

  --sub-roll-critical: var(--sub-success);
  --sub-roll-fumble:   var(--sub-ember);

  --font-primary:       'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', sans-serif;
  --font-institutional: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', sans-serif;

/* ─── Rim system contract ─────────────────────────────────────────────
 * Consumed by every component stylesheet (css/substrate-nav.css documents
 * the contract). The theme keeps its own faces and palette; the discipline
 * — three type roles, a heading range, 1px rules, 2px control corners —
 * is shared. */
  --font-display:       'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', sans-serif;
  --h1-color:           #1A1A1A;   /* Ink throughout: no information by color */
  --h2-color:           #1A1A1A;
  --h3-color:           #1A1A1A;
  --h4-color:           #1A1A1A;
  --rule-weight:        1px;
  --radius-control:     2px;
  --radius-plate:       0;
  --track-body:         0.04em;
  --track-inst:         0.08em;
}

@media screen {
  :root[data-theme="accessible"][data-color-mode="dark"] {
    color-scheme: dark;
    --sub-bg:           #121212;
    --sub-surface:      #1E1E1E;
    --sub-border:       #6A6A6A;
    --sub-text:         #EEEEEE;
    --sub-muted:        #B8B8B8;

    --sub-teal:         #6EA8E0;
    --sub-teal-light:   #1A2535;
    --sub-amber:        #E0B050;
    --sub-amber-light:  #2A2418;
    --sub-violet:       #B8B8B8;
    --sub-violet-light: #1E1E1E;
    --sub-iron:         #B8B8B8;
    --sub-ember:        #E07070;
    --sub-ember-light:  #2A1818;

    --sub-success:      #66D27E;
    --h1-color:         #EEEEEE;
    --h2-color:         #EEEEEE;
    --h3-color:         #EEEEEE;
    --h4-color:         #EEEEEE;
  }
}

@media screen and (prefers-color-scheme: dark) {
  :root[data-theme="accessible"]:not([data-color-mode="light"]) {
    color-scheme: dark;
    --sub-bg:           #121212;
    --sub-surface:      #1E1E1E;
    --sub-border:       #6A6A6A;
    --sub-text:         #EEEEEE;
    --sub-muted:        #B8B8B8;

    --sub-teal:         #6EA8E0;
    --sub-teal-light:   #1A2535;
    --sub-amber:        #E0B050;
    --sub-amber-light:  #2A2418;
    --sub-violet:       #B8B8B8;
    --sub-violet-light: #1E1E1E;
    --sub-iron:         #B8B8B8;
    --sub-ember:        #E07070;
    --sub-ember-light:  #2A1818;

    --sub-success:      #66D27E;
    --h1-color:         #EEEEEE;
    --h2-color:         #EEEEEE;
    --h3-color:         #EEEEEE;
    --h4-color:         #EEEEEE;
  }
}

