/* ============================================================
   TG-26 — COLOUR · TG-26.2 integrated edition
   TWO REGISTERS, never mixed on one artifact:
   · PRINT — four "shaders", [data-palette="station|ultramarine|
     acid|tauceti"]. STATION leads print. All four KEPT (TG-26.2).
   · SCREEN — the folio worlds, [data-world="tuned|broadcast|
     millennium|ghost"]. Dark TUNED leads the folio. GHOST is
     EARNED — never an ungated option. PASTE-UP archived.
   Volt #C9F211 is the constant identity (--fill / the plate).
   All text-role colours pass WCAG AA (>=4.5:1) on their panel.
   --signal is graphics-only; never sets small text.
   :root == STATION (the print default).
   ============================================================ */

/* ════════ PRINT REGISTER — THE FOUR SHADERS ════════ */

/* ---- STATION — print default. sand / vermillion / violet / volt / signal orange ---- */
:root,
[data-palette="station"]{
  --bg:#C7C0AE;          /* page field (greige) */
  --panel:#EFE8D8;       /* sheet (sand) */
  --ink:#1A1611;         /* primary text */
  --ink-soft:#4D473C;    /* secondary text */
  --ink-faint:#645D4F;   /* metadata / furniture */
  --uv:#C02B00;          /* primary text accent — proven heat ceiling on sand */
  --uv-dim:#E5A98F;      /* decorative underlines */
  --cy:#5646C2;          /* violet counter — labels, links */
  --line:#D8D0BC;        /* rules */
  --fill:#C9F211;        /* volt — the runner */
  --on-fill:#1A1611;     /* text/figure on a volt fill */
  --signal:#FF4D00;      /* pure neon — graphic elements only */
  --plate:var(--signal); /* misregistration underprint (volt is 1.06:1 on sand — invisible) */
  --reg:rgba(26,22,17,.5);   /* fiducials, scattered crosses */
  --shadow:0 20px 50px rgba(0,0,0,.16);
  --grainblend:multiply; /* @kind other */
  --grainop:.05;         /* @kind other */
}

/* ---- ULTRAMARINE — cobalt field, volt figure, cyan microtext, orange blocks ---- */
[data-palette="ultramarine"]{
  --bg:#070C2E; --panel:#111A52;
  --ink:#EDEEF8; --ink-soft:#ACB3E2; --ink-faint:#8E96CE;
  --uv:#5FD9EC; --uv-dim:#3D4FBF; --cy:#A99BFF; --line:#2B3878;
  --fill:#C9F211; --on-fill:#111A52; --signal:#FF7A1A;
  --plate:var(--fill);
  --reg:rgba(195,210,255,.45);
  --shadow:0 40px 120px rgba(2,5,30,.65);
  --grainblend:screen; /* @kind other */ --grainop:.05; /* @kind other */
}

/* ---- ACID — volt, magenta and signal red on cool black ---- */
[data-palette="acid"]{
  --bg:#040506; --panel:#08090B;
  --ink:#E9F0E6; --ink-soft:#A9B6A9; --ink-faint:#86947F;
  --uv:#C9F211; --uv-dim:#4E5F12; --cy:#FF3DAE; --line:#1A1D22;
  --fill:#C9F211; --on-fill:#08090B; --signal:#FF3527;
  --plate:var(--fill);
  --reg:rgba(201,242,17,.45);
  --shadow:0 40px 120px rgba(0,0,0,.6);
  --grainblend:screen; /* @kind other */ --grainop:.05; /* @kind other */
}

/* ---- TAU CETI — violet field, pink type, cyan microtext, green ticks ---- */
[data-palette="tauceti"]{
  --bg:#120737; --panel:#251069;
  --ink:#F1EEFB; --ink-soft:#C6BBEF; --ink-faint:#A89AE0;
  --uv:#FF7AD9; --uv-dim:#4A35A8; --cy:#5FD9EC; --line:#3A2A85;
  --fill:#C9F211; --on-fill:#251069; --signal:#45E879;
  --plate:var(--fill);
  --reg:rgba(220,205,255,.45);
  --shadow:0 40px 120px rgba(10,2,40,.65);
  --grainblend:screen; /* @kind other */ --grainop:.05; /* @kind other */
}

/* ============================================================
   SEMANTIC ALIASES — role-named handles that resolve through
   whatever shader is active. Prefer these in product code; the
   raw shader tokens above are the machine truth they point to.
   ============================================================ */
:root{
  --text-primary:var(--ink);
  --text-secondary:var(--ink-soft);
  --text-meta:var(--ink-faint);
  --text-accent:var(--uv);        /* working accent: labels, kickers, year columns */
  --text-counter:var(--cy);       /* counter accent: secondary labels, links */

  --surface-page:var(--bg);
  --surface-panel:var(--panel);

  --identity-fill:var(--fill);    /* volt — plates, numerals, swatches */
  --on-identity:var(--on-fill);
  --graphic-signal:var(--signal); /* structural neon — ticks, rules, bars, blocks */

  --border-rule:var(--line);
  --plate-print:var(--plate);     /* misregistration underprint colour */
  --reg-mark:var(--reg);          /* registration furniture */

  --elevation-sheet:var(--shadow);
}

/* ---- Wide-gamut inks — same luminance, more poison.
        Print and sRGB fall back to the hexes above. ---- */
@supports (color: color(display-p3 1 0 0)){
  :root,
  [data-palette="station"]{
    --uv:color(display-p3 .72 .17 0);
    --signal:color(display-p3 1 .3 0);
    --fill:color(display-p3 .78 .95 .07);
  }
  [data-palette="ultramarine"]{
    --uv:color(display-p3 .37 .85 .92);
    --cy:color(display-p3 .66 .6 1);
    --signal:color(display-p3 1 .48 .1);
    --fill:color(display-p3 .78 .95 .07);
  }
  [data-palette="acid"]{
    --uv:color(display-p3 .78 .95 .07);
    --cy:color(display-p3 1 .24 .68);
    --signal:color(display-p3 1 .21 .15);
    --fill:color(display-p3 .78 .95 .07);
  }
  [data-palette="tauceti"]{
    --uv:color(display-p3 1 .5 .85);
    --cy:color(display-p3 .42 .85 .93);
    --signal:color(display-p3 .32 .92 .5);
    --fill:color(display-p3 .78 .95 .07);
  }
}

/* ============================================================
   ════════ SCREEN REGISTER — THE FOLIO WORLDS ════════
   (ratified TG-26.1 · 02 JUL 2026 — integrated TG-26.2)
   THREE worlds + earned GHOST, set with [data-world="…"] on
   <html>. DARK TUNED LEADS THE FOLIO; STATION remains the
   default for print / CV artifacts — the register decides.
   PASTE-UP is ARCHIVED — parked in the v13 archive block,
   deliberately NOT registered here. Never back on the dial.
   THE PLATE: --plate = VOLT + SCREEN — the volt underprint
   softened by the dot-screen mask (devices.css:
   --plate-screen-mask / .tg-plate-screen). Olive #4E5F12 as a
   plate is DEAD. Exceptions, by physics and on purpose:
   light MILLENNIUM plates lavender (volt is invisible on ice —
   the same law that gives STATION its signal plate), and GHOST's
   whisper-volt plate stays: the underprint is the only colour left.
   ============================================================ */

/* A // TUNED — editorial, volt on black. THE FOLIO LEAD. */
[data-world="tuned"]{
  --bg:#040506; --panel:#0A0C0E;
  --ink:#F2F0E8; --ink-soft:#AEB4AC; --ink-faint:#7C857C;
  --uv:#C9F211; --uv-dim:#4E5F12; --cy:#FF3DAE; --line:#1A1F22;
  --fill:#C9F211; --on-fill:#0A0C0E; --signal:#FF3527;
  --plate:#C9F211; --reg:rgba(201,242,17,.42);
  --shadow:0 40px 120px rgba(0,0,0,.6);
  --grainblend:screen; /* @kind other */ --grainop:.05; /* @kind other */
}

/* B // BROADCAST — pirate signal, cyan on blue-black. The plate stays volt — the runner. */
[data-world="broadcast"]{
  --bg:#020709; --panel:#06121A;
  --ink:#EAF6F4; --ink-soft:#B0C6C4; --ink-faint:#73908E;
  --uv:#45E8E0; --uv-dim:#0F4744; --cy:#C9F211; --line:#0E2730;
  --fill:#45E8E0; --on-fill:#020709; --signal:#FF7A1A;
  --plate:#C9F211; --reg:rgba(69,232,224,.4);
  --shadow:0 40px 120px rgba(0,4,8,.65);
  --grainblend:screen; /* @kind other */ --grainop:.05; /* @kind other */
}

/* D // MILLENNIUM — the light world: offset-litho blue, lavender misregistration, magenta counter */
[data-world="millennium"]{
  --bg:#C9CFDA; --panel:#EEF1F6;
  --ink:#0F1320; --ink-soft:#3C4356; --ink-faint:#5D6577;
  --uv:#1F2FE0; --uv-dim:#98A4E8; --cy:#C2128A; --line:#B4BBC9;
  --fill:#1F2FE0; --on-fill:#EEF1F6; --signal:#00B7E8;
  --plate:#9D93EA; --reg:rgba(31,47,224,.34);
  --shadow:0 20px 50px rgba(15,19,32,.18);
  --grainblend:multiply; /* @kind other */ --grainop:.05; /* @kind other */
}

/* GHOST — earned. bone & ink, the volt underprint the only colour left.
   Two doors, one palette: [data-world="ghost"] (the routed world) and
   html[data-skin="ghost"] (the wash the konami/terminal/password earns —
   html[…] outranks the active [data-world] on the same element). */
[data-world="ghost"],
html[data-skin="ghost"]{
  --bg:#E9E7DD; --panel:#F4F2EA;
  --ink:#161510; --ink-soft:#45433B; --ink-faint:#6E6C62;
  --uv:#161510; --uv-dim:#B9B6AA; --cy:#161510; --line:#CCC9BA;
  --fill:#C9F211; --on-fill:#161510; --signal:#161510;
  --plate:#C9F211; --reg:rgba(22,21,16,.4);
  --shadow:0 20px 50px rgba(22,21,16,.16);
  --grainblend:multiply; /* @kind other */ --grainop:.05; /* @kind other */
}

/* ---- Wide-gamut folio inks — same luminance, more poison ---- */
@supports (color: color(display-p3 1 0 0)){
  [data-world="tuned"]{
    --uv:color(display-p3 .78 .95 .07);
    --cy:color(display-p3 1 .24 .68);
    --signal:color(display-p3 1 .21 .15);
    --fill:color(display-p3 .78 .95 .07);
    --plate:color(display-p3 .78 .95 .07);
  }
  [data-world="broadcast"]{
    --uv:color(display-p3 .27 .91 .88);
    --signal:color(display-p3 1 .48 .1);
    --plate:color(display-p3 .78 .95 .07);
  }
  [data-world="millennium"]{
    --uv:color(display-p3 .14 .2 .86);
    --signal:color(display-p3 0 .72 .9);
    --fill:color(display-p3 .14 .2 .86);
    --cy:color(display-p3 .73 .09 .52);
  }
}
