/* ═══════════════════════════════════════════════════════════════════════
   fgf-palette.css — Desert Fog Mycology colour. THE ONLY FILE IN THIS
   REPO THAT MAY CONTAIN A HEX VALUE.

   See GRUSH-SHELL-CONTRACT.md §1. grush-tokens.css owns the names and
   every non-colour value; this file supplies what those names mean here.

   WHERE THESE VALUES CAME FROM. Nothing was invented. Every colour below
   was already in this repo — spread across five separate inline palettes
   in seven pages, plus lfg-theme.css. Consolidating them is the whole
   change; the site's colour does not move.

   THE NAMES USED TO LIE, AND THAT IS WHY THIS EXISTS. These pages were
   built by copying Lancer Farms, so they inherited its NAMES while
   carrying Desert Fog's VALUES:

       --forest: #5e8ca8    a slate blue called forest
       --lime:   #89aec4    a pale blue called lime
       --green:  #5e8ca8    also the blue
       --paper:  #1f252a    a near-black called paper

   Every one of those still resolves, as a legacy alias at the bottom, so
   no page breaks. But new work uses the role-agnostic names, which cannot
   drift away from what they describe: --accent is whatever this venture's
   accent is, forever.

   TWO GROUNDS EXISTED AND ONE HAD TO WIN. Pages carried both #171b1f
   (data.html) and #1f252a (index, app, manual, lfg-theme.css). #1f252a
   wins on headcount. data.html will shift one step lighter when it is
   converted; that is a real, visible change and it is the point of having
   one palette.
   ═══════════════════════════════════════════════════════════════════════ */

:root{
  /* The deployment's scheme, declared rather than left to the browser.
     Without this a browser decides for itself and Chrome's auto-dark
     inverts the page into a washed-out negative of the design. */
  color-scheme: dark;


  /* ── GROUND AND SURFACES ──────────────────────────────────────────── */
  --ground:        #1F252A;
  --surface:       #29313A;
  --surface-lift:  #333C44;   /* was --mist in the staff pages */
  --line:          #384049;
  --line-strong:   #4A535C;

  /* ── TEXT ─────────────────────────────────────────────────────────── */
  --ink:           #F0EDE2;   /* 13.2:1 */
  --ink-dim:       #97A3AC;   /* 6.0:1  — was --ink-soft */
  --ink-faint:     #77828C;   /* 4.0:1  — new; no page had a third step */

  /* ── THE ONE ACCENT ───────────────────────────────────────────────── */
  /* Slate blue. Cool on purpose — this is a controlled-environment
     growing operation, not a garden. */
  --accent:        #5E8CA8;   /* 4.3:1 */
  --accent-lit:    #89AEC4;   /* 6.6:1 — the text-safe one */
  --accent-deep:   #3E6E88;   /* 2.8:1 — A FILL, NEVER TEXT */
  --accent-ground: rgba(94,140,168,.14);

  /* Text drawn ON the accent, not on the ground. */
  --on-accent:     #0F161C;

  /* ── STATE ────────────────────────────────────────────────────────── */
  /* --ok is new: no page in this repo has ever signalled success, and the
     palette has no green left to borrow now that --green turned out to be
     a blue. Provisional until a page actually says "saved". */
  --ok:            #5F9E6B;
  --ok-ground:     rgba(95,158,107,.14);
  --warn:          #C9973F;   /* the amber already in app and index */
  --warn-ground:   rgba(201,151,63,.14);
  --danger:        #D15A48;   /* app.html's red */
  --danger-ground: rgba(209,90,72,.16);

  /* ── CHROME ───────────────────────────────────────────────────────── */
  /* No grush-nav.js here yet — only the footer. Defined so it can be. */
  --nav-ground:    #171B1F;
  --nav-line:      #384049;
  --nav-ink:       #F0EDE2;
  --nav-dim:       #97A3AC;
  --nav-accent:    #5E8CA8;

  /* ── THIS DEPLOYMENT'S OWN COLOURS ────────────────────────────────── */
  --cream:         #F4F1E8;   /* splash and hero mark, drawn on accent */
  --alert:         #C97A4A;   /* lfg-theme.css's warmer alert */
  --on-alert:      #FDF1E8;

  /* The "managed by grush" signature, in Yellowtail.

     UNRESOLVED, AND WORTH SETTLING: getgrush.com draws the same signature
     in #D94F1E. Two ventures, one signature, two colours. Either the mark
     is fixed everywhere — in which case §1 needs a home for a colour that
     does NOT vary, which it currently lacks — or it is per-venture and
     these are both right. Left as found; decide it deliberately, not by
     one of them quietly winning. */
  --grush-mark:    #C34044;

  /* Text drawn ON a filled accent or amber, not on the ground. Both
     measured: #0F161C is 5.0:1 on the accent where white is only 3.6:1,
     and #3A2C08 is 5.2:1 on the amber where white is 2.6:1. The dark
     option wins on both, which is why visitor.html's mix of white and
     dark labels on the same two fills was worth settling rather than
     preserving. */
  --on-warn:       #3A2C08;
  --warn-lit:      #E3B778;
  --warn-deep:     #43371E;   /* the amber chip's own ground */

  /* A paler blue than --accent-lit, for small text on a raised chip:
     7.0:1 there against --accent-lit's 5.7:1. Kept because the job is
     small type, where the extra step is the difference. */
  --accent-pale:   #9FC0D2;

  /* Deep/lit pairs, mirroring --warn-deep/--warn-lit. Used by the status
     badges in data.html: a sunk ground with a lifted text colour, so a
     badge reads as a badge without borrowing the accent. */
  --danger-deep:   #45261E;
  --danger-lit:    #E8A488;
  --accent-sunk:   #26374A;
  --ok-deep:       #2D5A3D;

  /* A fifth badge pair with no role meaning — manual.html's pH badge.
     Named for the hue rather than a job, honestly: it is a category, not
     a state, and pretending otherwise would put a fake meaning in the
     vocabulary. */
  --violet-deep:   #382A46;
  --violet-lit:    #CBAEE2;

  /* ── SOIL MIX ─────────────────────────────────────────────────────
     manual.html's mix bar. Categorical: the four components must stay
     apart from each other, and they are the physical materials, so the
     colours are chosen to look like what they are. */
  --soil-topsoil:  #D4C47A;
  --soil-compost:  var(--accent);
  --soil-perlite:  #AAAAAA;
  --soil-native:   #8B6914;

  /* ── CONTAINER ZONES ──────────────────────────────────────────────
     The seven rooms of the 40ft container, in process order: substrate,
     steam, lab, incubate, fruiting, cold, pack. Categorical, like the
     chart series — they must stay distinguishable from each other, and
     they mean the same thing wherever the container is drawn. They match
     the room names in container/DATUM_SPEC.md, which is the point of
     naming them here rather than writing them into one SVG. */
  --zone-substrate: #3A4A2E;
  --zone-steam:     #4A3A22;
  --zone-lab:       #26374A;
  --zone-incubate:  #241F1A;
  --zone-fruiting:  #3E5C42;
  --zone-cold:      #2B3A44;
  --zone-pack:      #3A352C;

  /* ── CATEGORY COLOURS ─────────────────────────────────────────────
     The visitor hub's four destinations. A categorical set like the
     chart series: the requirement is that they stay distinguishable
     from EACH OTHER, so they sit outside the §1 floor. Two of the four
     ARE the accent and the amber; only See and Share are their own. */
  --cat-learn:     var(--accent);
  --cat-see:       #4A86A8;
  --cat-do:        var(--warn);
  --cat-share:     #8A6D9E;

  /* admin.html's theme carries a SECOND four-category set, from before
     the visitor hub existed: explore / act / manage / entry. They overlap
     in meaning with the four above (explore≈see, act≈do) without being
     the same values. Both are kept because both are in use; collapsing
     them is a design decision, not a rename. */
  --cat-explore:   #5FA0A8;
  --cat-act:       var(--warn);
  --cat-manage:    var(--accent);
  --cat-entry:     #6E8290;

  /* ── LEGACY ALIASES ─────────────────────────────────────────────────
     Every name the seven pages and lfg-theme.css already use. Each is
     deleted once no page references it. New work uses the names above. */
  --paper:         var(--ground);
  --bg:            var(--ground);
  --bg-dark:       var(--nav-ground);
  --bg-deeper:     var(--nav-ground);
  --green-d:       var(--ground);
  --card:          var(--surface);
  --card-bg:       var(--surface);
  --surface2:      var(--surface);
  --mist:          var(--surface-lift);
  --border:        var(--line);
  --card-border:   var(--line);
  --ink-soft:      var(--ink-dim);
  --cream-dim:     var(--ink-dim);
  --green:         var(--accent);
  --forest:        var(--accent);
  --forest-mid:    var(--accent-deep);
  --accent-2:      var(--accent-lit);
  --leaf:          var(--accent-lit);
  --lime:          var(--accent);
  --lime-pale:     var(--accent-lit);
  --amber:         var(--warn);
  --orange:        var(--warn);
  --orange-dim:    var(--alert);
  --red:           var(--danger);
}

/* ═══ PAPER MODE — the light ground ═══════════════════════════════════
   `<html class="paper">`. Same names, light values. A mode is not a
   venture: this is still Desert Fog, and geometry, type and motion do not
   change — only colour does, which is what keeps a mode from reading as a
   different product.

   WHY IT EXISTS AT ALL. calculator.html was the last page still wearing
   the old warm Fun Guy Fungi identity — a cream ground with moss, clay
   and gold — from before the site was recoloured slate blue. Rather than
   guess whether that lightness was deliberate, it is declared here as a
   mode. Deleting this block and the page's `class="paper"` turns the
   calculator dark like everything else; that is a one-line decision now
   instead of a rebuild.

   The accent does NOT change hue between modes. It steps darker so it
   clears contrast on a light ground — a deployment gets one accent, and
   a mode that changes it is a second venture wearing the first one's
   name. */

html.paper{
  /* The one place this venture is light — controls and scrollbars follow. */
  color-scheme: light;

  --ground:        #F3EFE6;
  --surface:       #FFFFFF;
  --surface-lift:  #FBF8F1;
  --line:          #DCD6C6;
  --line-strong:   #C6BFAC;

  --ink:           #2B2A26;   /* 12.5:1 */
  --ink-dim:       #6B6A63;   /* 4.7:1  */
  --ink-faint:     #7F7A6D;   /* 3.7:1  */

  --accent:        #3E6E88;   /* 4.8:1 — the dark step, text-safe here */
  --accent-lit:    #5E8CA8;   /* 3.2:1 — fill and large text only */
  --accent-deep:   #2C536B;   /* 7.2:1 */
  --accent-ground: rgba(62,110,136,.12);
  --on-accent:     #F4F1E8;   /* 4.9:1 against --accent */

  --ok:            #3F6B49;   /* 5.4:1 */
  --ok-ground:     rgba(63,107,73,.12);
  --warn:          #7A5C15;   /* 5.4:1 — the dark amber; #C9973F is 2.3:1
                                 on this ground and cannot carry text */
  --warn-ground:   rgba(122,92,21,.12);
  --danger:        #8F2228;   /* 7.5:1 */
  --danger-ground: rgba(143,34,40,.12);

  --nav-ground:    #E9E4D8;
  --nav-line:      #DCD6C6;
  --nav-ink:       #2B2A26;
  --nav-dim:       #6B6A63;
  --nav-accent:    #3E6E88;

  --cream:         #FFFFFF;
}

/* ═══ CATEGORICAL SERIES ══════════════════════════════════════════════
   Four colours for charts, and only for charts. They are not chrome and
   never carry interface meaning — the requirement is that they stay
   distinguishable FROM EACH OTHER, which is a different job from the
   accent's, and why they sit outside the §1 floor.

   These are the old warm identity's colours, kept because a categorical
   scale that already reads well is worth more than palette tidiness.
   Measured on the paper ground: 5.3, 3.9, 2.1, 8.6 — the gold is a fill
   only and must never carry a label. */
:root{
  --series-1:      #4B6B3F;
  --series-2:      #B4602F;
  --series-3:      #C9A227;
  --series-4:      #33492B;

  /* calculator.html's names for them. */
  --moss:          var(--series-1);
  --clay:          var(--series-2);
  --gold:          var(--series-3);
  --moss-dark:     var(--series-4);
  --track:         var(--line);
}

/* ═══ DEEPER MODE — the per-visitor toggle ════════════════════════════
   `<html data-mode="dark">`, toggled and remembered by data.html and
   admin.html.

   THE NAME IS A PROBLEM AND IT IS NOT MINE TO RENAME. This site's default
   is already dark; what this mode does is go darker AND drop the blue for
   neutral greys. "dark" describes it only by accident. Renaming it means
   touching the stored preference key in two pages, so it is left alone
   and written down instead.

   Values are exactly what those two pages already carried — the neutral
   greys included, which do not match the blue scheme and are preserved as
   found rather than quietly harmonised. */

html[data-mode="dark"]{
  --ground:        #171B1F;
  --surface:       #262626;
  --surface-lift:  #383838;
  --line:          #384049;
  --line-strong:   #4A535C;

  --ink:           #F0EDE6;
  --ink-dim:       #A8A39A;
  --ink-faint:     #7E7A72;

  --nav-ground:    #101315;
}
