/* ============================================================
   WHAT IT IS — design tokens
   Generated from DESIGN.md (the SSOT). Components read these;
   nothing re-declares a brand value.
   Provenance: [context] extracted from lib/global/theme.dart
   (ApplicationThemeDark.darkThemeDefault), pubspec.yaml, and the
   asset set; [derived] computed from context; [invented] this
   run's taste-fill, awaiting adversarial review.
   ============================================================ */

:root {
  /* ============ PRIMITIVES — the palette spec, immutable.
     Swatch chips and pairing demos read these; they never flip
     (not even in print). Every value [context] unless noted. ============ */

  /* The void ramp — every dark surface in the app */
  --p-void-0: #121212;  /* background / canvas / dialog */
  --p-void-1: #151515;  /* app bar */
  --p-void-2: #181818;  /* bottom app bar */
  --p-void-3: #222327;  /* tab bar */
  --p-void-4: #303238;  /* card */
  --p-void-5: #313538;  /* primary / highlight / splash */
  --p-void-6: #353535;  /* disabled */
  --p-void-7: #45474C;  /* raised card */
  --p-black:  #000000;  /* shadow ink — never a surface */

  /* Ink */
  --p-ink:   #FFFFFF;   /* accent, titles, body, borders */
  --p-muted: #9C9C9C;   /* muted captions */

  /* The gold trio */
  --p-gold:        #EBC878;  /* dividers + app-bar icons ("old gold") */
  --p-gold-bright: #FDC100;  /* selected tab state */
  --p-gold-amber:  #FFC107;  /* default icon tint */

  /* Paper accents — light values on dark */
  --p-parchment:  #F4EBBD;  /* snackbar / banner surface */
  --p-powder:     #C1DEE0;  /* banner background */
  --p-blue-light: #DAF9FB;  /* headlineSmall, primary-mapped */
  --p-blue-mid:   #9BDEF5;  /* displayMedium, text selection */
  --p-blue-deep:  #0B0080;  /* overline underline color */
  --p-abyss:      #0C2838;  /* primaryDark — text on parchment */
  --p-abyss-2:    #49575B;  /* secondaryDark — decorative only */

  /* Signal */
  --p-red: #E63634;         /* search-highlight + error; primary and secondary red */

  /* ============ SEMANTIC ALIASES — what components read.
     These may flip per medium (see the print block below). ============ */
  --void-0: var(--p-void-0);
  --void-1: var(--p-void-1);
  --void-2: var(--p-void-2);
  --void-3: var(--p-void-3);
  --void-4: var(--p-void-4);
  --void-5: var(--p-void-5);
  --void-6: var(--p-void-6);
  --void-7: var(--p-void-7);
  --black:  var(--p-black);
  --ink:    var(--p-ink);
  --muted:  var(--p-muted);
  --gold:        var(--p-gold);
  --gold-bright: var(--p-gold-bright);
  --gold-amber:  var(--p-gold-amber);
  --parchment:  var(--p-parchment);
  --powder:     var(--p-powder);
  --blue-light: var(--p-blue-light);
  --blue-mid:   var(--p-blue-mid);
  --blue-deep:  var(--p-blue-deep);
  --abyss:      var(--p-abyss);
  --abyss-2:    var(--p-abyss-2);
  --red: var(--p-red);

  /* ---- Interactive accent [context: accentColor is white] ---- */
  --accent: var(--ink);
  --accent-contrast: var(--void-0);  /* buttonText: #121212 on light fills */

  /* ---- Typography ---- */
  /* [context] display: Arial Black (assets/fonts/ariblk.ttf, headlineMedium
     family "Arial"); Archivo Black is the [invented] web-safe stand-in. */
  --font-display: 'Arial Black', 'Archivo Black', 'Arial Bold', sans-serif;
  /* [context] body: Poppins (theme fontName + GoogleFonts.poppins body1) */
  --font-body: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  /* [invented] mono for spec surfaces of this document only */
  --font-mono: 'SF Mono', 'Menlo', 'Consolas', monospace;

  /* App scale [context]: display 34 · displayLarge 26 · headline 24 ·
     title 28/18 · body 18/16 · caption 14 · muted 12. Fluid doc scale
     [derived] from those stops. */
  --text-hero:    clamp(2.6rem, 1.6rem + 4.5vw, 5.2rem);
  --text-h1:      clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  --text-h2:      clamp(1.45rem, 1.2rem + 1.1vw, 2rem);
  --text-h3:      clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --text-h4:      1.05rem;
  --text-body-lg: 1.125rem;   /* body1: 18 [context] */
  --text-body:    1rem;       /* body2: 16 [context] */
  --text-body-sm: 0.875rem;   /* caption: 14 [context] */
  --text-caption: 0.75rem;    /* muted caption: 12 [context] */
  --text-label:   0.6875rem;

  /* Letter-spacing quirks [context: theme.dart] */
  --ls-display: 0.75px;   /* displayLarge letterSpacing .75 */
  --ls-tight:  -1px;      /* titleMedium / overline letterSpacing -1 */

  /* ---- Spacing [context: EdgeInsets 8/16/24/32 rhythm → 8px base] ---- */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4rem;
  --sp-7: 6rem;
  --sp-8: 8rem;
  --section-pad: clamp(4rem, 8vw, 7rem);

  /* ---- Radii [context: square by default; radius 20–22 ONLY on
     Nothing/currency surfaces; slider thumb r15 → pill] ---- */
  --r-none: 0;
  --r-currency: 20px;
  --r-ad: 22px;
  --r-pill: 999px;

  /* ---- Borders [context: Border.all(width: 2, white); divider 3px gold] ---- */
  --border-w: 2px;
  --border: var(--border-w) solid var(--ink);
  --border-thin: 1px solid var(--ink);
  --divider-w: 3px;
  --divider: var(--divider-w) solid var(--gold);

  /* ---- Shadows [context: theme.dart BoxShadows] ---- */
  --sh-rb: 2px 2px 8px var(--black);               /* defaultShadowRB */
  --sh-b:  0 2px 8px rgba(0, 0, 0, 0.39);          /* defaultShadowB, alpha 100/255 */
  --sh-t:  0 -2px 8px var(--black);                /* defaultShadowT */

  /* ---- Motion [context: fadeIn routes, shimmer, typewriter exist;
     all numeric values are [invented] — no measured durations in source] ---- */
  --dur-fast:   120ms;
  --dur-normal: 240ms;
  --dur-slow:   480ms;
  --dur-type:   2400ms;   /* typewriter line */
  --ease-out:   cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-type:  steps(16, end);

  /* ---- Layout [invented for this document; app is portrait-only] ---- */
  --max-w: 72rem;
  --max-w-narrow: 46rem;
  --max-w-wide: 88rem;
  --nav-w: 232px;
}

/* ---- Print token flip — the dark book prints as a light document.
   [derived] print-legibility inversion; swatch/pair chips keep brand
   values because they reference the palette tokens above directly. ---- */
@media print {
  :root {
    --void-0: #FFFFFF;
    --void-1: #FFFFFF;
    --void-2: #FFFFFF;
    --void-3: #F2F2F2;
    --void-4: #DDDDDD;
    --void-7: #CCCCCC;
    --ink: #121212;
    --accent: #121212;
    --accent-contrast: #FFFFFF;
    --muted: #555555;
  }
}
