/* ArkTech Schematic — Color tokens
   A two-ink drafting palette: warm paper + near-black ink, inverted for a
   darkroom "dark" plate. There are effectively TWO colors (paper + ink) plus
   graded transparencies of the ink for rule lines. No accent hues, no
   gradients — chromatic restraint is the brand. */

:root {
  /* ---- base plate: LIGHT (default) — the drafting-paper plate ---- */
  --ark-paper:        #f2efe8;  /* sheet / surface */
  --ark-ink:          #1a1712;  /* primary ink: lines, type, fills */
  --ark-faint:        rgba(26, 23, 18, 0.42);  /* secondary rule lines */
  --ark-faint-strong: rgba(26, 23, 18, 0.50);  /* dotted leaders, hatch */
  --ark-hair:         rgba(26, 23, 18, 0.28);  /* hairline / dash-dot */

  /* Fixed reference swatches (do NOT invert with theme) — for specimens */
  --ark-paper-light:  #f2efe8;
  --ark-ink-light:    #1a1712;
  --ark-paper-dark:   #0e0f11;
  --ark-ink-dark:     #ece9e2;

  /* ---- semantic aliases (consume these in product code) ---- */
  --surface:        var(--ark-paper);   /* page / sheet background */
  --surface-inset:  transparent;        /* panels are transparent, framed by rule */
  --text:           var(--ark-ink);     /* body + headings ink */
  --text-muted:     var(--ark-faint-strong);
  --line:           var(--ark-ink);     /* primary borders / frame */
  --line-faint:     var(--ark-faint);   /* inner frames, dividers */
  --line-hair:      var(--ark-hair);    /* centerlines, ticks */

  /* inverted "chip" pairing (active toggle, filled badge) */
  --chip-fill:      var(--ark-ink);
  --chip-text:      var(--ark-paper);
}

/* ---- dark plate — apply data-ark-theme="dark" on any ancestor ---- */
[data-ark-theme="dark"] {
  --ark-paper:        #0e0f11;
  --ark-ink:          #ece9e2;
  --ark-faint:        rgba(236, 233, 226, 0.42);
  --ark-faint-strong: rgba(236, 233, 226, 0.50);
  --ark-hair:         rgba(236, 233, 226, 0.28);

  /* Semantic aliases must be RE-DECLARED here. A custom property that
     references another (--text: var(--ark-ink)) is resolved once, on the
     element where it is declared (:root), then inherited as that fixed value.
     Overriding only the base --ark-* tokens above does NOT re-resolve the
     aliases; they must be restated in this scope so they recompute against
     the dark base values. */
  --surface:        var(--ark-paper);
  --text:           var(--ark-ink);
  --text-muted:     var(--ark-faint-strong);
  --line:           var(--ark-ink);
  --line-faint:     var(--ark-faint);
  --line-hair:      var(--ark-hair);
  --chip-fill:      var(--ark-ink);
  --chip-text:      var(--ark-paper);
}
