/* =========================================================================
   three-functions.css — Three Functions

   A semantic FUNCTION-color system: a small, identity-free vocabulary of three
   ROLE colors — legislative, executive, judicial — that marks which invariant
   structural FUNCTION an element performs. A sibling to Spectral State, not a
   profile under it: Spectral State encodes the STATE of an element; Three
   Functions encodes its FUNCTION. Different axis.

   SPECIALIZED, OPT-IN foundation primitive. It is for surfaces that encode a
   separation of functions in an apparatus — e.g. a method diagram whose parts
   author a rule, realize candidates under it, and select and close against it.
   It is NOT general UI color, and the static diagram scaffolds
   (`diagram-static-H` / `-V` / `-SEQ` / `-FLOW`) do NOT use it.

   NOT A PALETTE EXPANSION. The three role values are existing ASK values — two
   emphasis accents (magenta, cyan) plus the neutral white / lavender-ASK
   identity value. This primitive is a new SEMANTIC BINDING over the closed
   palette, not a new hue.

   Layer this ON TOP of `colors_and_type.css` — it relies on that file's theme
   resolution (`[data-theme]` + `prefers-color-scheme`) and its palette tokens.
   Offline; no CDN.

   STATUS: v0.2 — semantic generation. Authorized by ASK source-of-intent
   (2026-07-12; source-role correction 2026-09-11). Landed public consumption
   is recorded in CONSUMERS.md, which remains the record of what consumers
   have actually landed. three-functions.md documents the upstream
   FUNCTION-ADMISSIBILITY CRITERIA and illustrates them through bounded
   generativity; each consumer owns its CONCRETE ELEMENT BINDING under those
   criteria. A landed consumption record is not, by itself, a portability,
   usability, or generality verdict.
   v0.2 CHANGES WHICH ELEMENTS QUALIFY FOR `legislative`, NOT HOW THE ROLE
   RENDERS ONCE ASSIGNED. No role token, palette binding, selector, cascade
   or resolved value changes — the two comment blocks are the whole
   CSS-FILE change. The role list is fixed at three and the role-to-palette
   mappings are unchanged and remain the portable part; the ADMISSIBLE
   POPULATION OF `legislative` is what this generation revises.

   ---------------------------------------------------------------------------
   ROLE MAP
   ---------------------------------------------------------------------------
   Function       Meaning                                          ASK mapping
     legislative  adopts or authorizes the governing standard,     --ask-emphasis-magenta
                  or carries it into operative scope through a       (#FF00FF)
                  grammar, brief, rule or grant; the grant
                  produces the aperture. The APERTURE itself is
                  the permission produced — a neutral quantity,
                  not apparatus. Standing intent, and passive
                  storage / citation / routing / relay /
                  preservation, take NO function color. See
                  three-functions.md for the full boundary.
     executive    realizes candidates under the rule; does not     theme-neutral:
                  author it and does not judge the result            #FFFFFF light /
                                                                     lavender-ASK dark
     judicial     evaluates candidates against the standard,       --ask-emphasis-cyan
                  selects one, ratifies, and closes                  (#00BEFF)

   The executive role is deliberately HUE-LESS. Its neutrality is the signal:
   execution fills the aperture but neither originates the norm nor closes the
   judgment. In light it is white (#FFFFFF); on the dark ink field pure white is
   too hot, so it resolves to lavender-ASK (#D4C6E1), the dark-mode neutral
   foreground value. legislative (magenta) and judicial (cyan) are the two hot
   points; the executive neutral reads by contrast between them.

   CHANNEL DISCIPLINE (coexistence with Spectral State / Evidence State).
   Function, element state, and evidence state are three separate semantic axes.
   Reused hue does NOT create semantic identity: magenta is both
   --function-legislative and --state-proposed; cyan is both --function-judicial
   and --state-held. They are not aliases. On one element, function / state /
   evidence must not compete for the same visual channel:
     function role   -> fill / principal node treatment
     state           -> outline, badge, or separate state marker
     evidence state  -> evidence marker, rail, dash, or labelled annotation
   Color stays redundant with visible labels and geometry: a consuming surface
   must still read legislative / executive / judicial in monochrome.
   ========================================================================= */

/* ---------- Light (default) — on the light lavender field ----------
   legislative + judicial bind to the fixed emphasis accents (hot points on the
   calm field); executive is the neutral white value (not body text). */
:root {
  --function-legislative: var(--ask-emphasis-magenta);   /* #FF00FF */
  --function-executive:   var(--ask-white);              /* #FFFFFF — neutral executor */
  --function-judicial:    var(--ask-emphasis-cyan);      /* #00BEFF */
}

/* ---------- Dark — on the dark ink field ----------
   legislative + judicial are unchanged (the emphasis accents already read on
   both fields); only executive flips: pure white is too hot on ink, so it
   resolves to lavender-ASK, the dark-mode neutral foreground. Explicit + auto
   blocks mirror each other, matching the foundation's theme model. */
:root[data-theme="dark"] {
  --function-executive:   var(--ask-lavender-ask);       /* #D4C6E1 */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --function-executive: var(--ask-lavender-ask);       /* #D4C6E1 */
  }
}
