/* ============================================================
   theme-dark.css — Dark theme overrides.
   Shared by the standalone dark theme and dark Gentle variants.
   ============================================================ */

:is([data-theme="dark"], [data-theme$="-dark"]) {
  color-scheme: dark;

  --color-bg:               #0F0F10;
  --color-bg-secondary:     #1B1B1E;
  --color-bg-subtle:        #09090A;
  --color-surface:          #1E1E22;
  --color-surface-raised:   #2C2C32;
  --color-border:           #3A3A42;

  --color-text:             #F4F4F5;
  --color-text-primary:     #F4F4F5;
  --color-text-secondary:   #D4D4D8;
  --color-text-muted:       #A1A1AA;
  --color-text-inverse:     #111113;
  --color-heading:          #FAFAFA;

  /* Light gray ink on the dark canvas. text-inverse is the dark label
     that sits on these fills (buttons, heroes, badges). */
  --color-brand-primary:    #D4D4D8;
  --color-brand-secondary:  #E4E4E7;
  --color-brand-accent:     #A1A1AA;
  --color-brand-gold:       #F6C945;
  --color-accent:           #D4D4D8;

  --color-success:          #A9DCC4;
  --color-warning:          #F6C945;
  --color-error:            #FFC8C2;
  --color-info:             #B9D7FF;

  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 12px 32px rgba(0, 0, 0, 0.6);

  /* --- Reader surface -----------------------------------------
     WHY: the reader paints from its own tokens rather than
     --color-surface, so that the sepia/night/forest/dusk reading
     themes can override it. Without dark values here, the "Default"
     reading theme kept tokens.css's #FFFFFF and lit up as a white
     slab in an otherwise dark app — rough on the eyes at night.

     Deliberately a shade darker than --color-surface: the reader is
     a full page of text, so it should emit less light than the
     chrome around it, and it reads as "paper" distinct from the bar
     sitting on top of it.

     Text is off-white rather than --color-text-primary (#F7FAFC).
     Pure white on a dark background haloes at long reading lengths;
     easing it back keeps the contrast ratio well past WCAG AA. */
  --reader-bg-default: #161618;
  --reader-text:       #D4D4D8;
}
