/* ʻĀina to Table — design tokens
   🔒 INSTITUTIONAL GREEN PALETTE, 2026-11-22 — Adrian, after the bright
   teal-on-tinted-page direction shipped across six rounds: "my suggestions
   are not landing in the tone and quality intended... let's aim for the
   legitimacy of those market sites like Kalshi, JP Morgan, Charles Schwab."
   One colour named directly as his own: #407A52. Everything else here was
   worked out from that anchor plus direct research, not guessed: visited
   jpmorgan.com, schwab.com and kalshi.com and read real computed colours off
   the live pages (see the Decision Log entry for the exact values and where
   each one is used) rather than reasoning from a memory of "bank blue."
   What that research actually showed: JPMorgan and Schwab run on white, not
   a tinted page, with ONE confident brand colour plus tonal variation of it
   for emphasis, and a near-black (not colourful) wordmark. Kalshi, despite
   being the reference for the EARLIER direction, turns out to be the least
   restrained of the three on its own current page -- which is the direct
   evidence that "sterile Kalshi" and "legitimate like these three" are not
   the same target, and the second one is what's being built now.

   This is a reversal, not an edit, the same way the 2026-11-21 "Earthen
   Wall Reversed" pass was -- see the Decision Log for the prior palette,
   kept as history, not deleted.
   🔴 Use the values, never the palette names as brand terms.

   Every ratio below is WCAG relative luminance, computed — not estimated. */

:root {
  /* ---- GROUNDS --------------------------------------------------------- */
  --page:           #FFFFFF;  /* True white -- both JPMorgan and Schwab run
                                 their entire page on white, not a tinted
                                 field. The cool cyan tint (#EBF6F7) the last
                                 six rounds built on was never matched by
                                 either stated reference site, confirmed by
                                 sampling their actual computed background
                                 colour rather than assumed from a vibe.       */
  --panel:          #EAEDE8;  /* Cards/tables/bands -- a barely-there warm-
                                 neutral, 1.18 against page. Deliberately
                                 subtle: a confident, restrained system
                                 separates surfaces by a whisper, not a
                                 visible colour field the way the tinted
                                 cyan panel (1.27, but a real colour cast)
                                 did.                                          */
  --surface-dark:   #141D17;  /* the reverse surface -- a near-black with a
                                 whisper of the brand green's own undertone,
                                 replacing the cool navy-charcoal the last
                                 reversal used. Echoes JPMorgan's own
                                 near-black wordmark ink (#31373D, sampled
                                 live) more than it echoes any prior surface
                                 on this site.                                 */
  --surface-dark-2: #1F2A22;  /* raised element on the dark surface           */
  /* page/panel 1.18 · page/dark ~18 · panel/dark ~15                         */

  /* ---- TEXT ------------------------------------------------------------- */
  --ink:      #1A231D;  /* body, near-black with the same green whisper as
                            surface-dark. 16.13 on page · 14.71 on panel      */
  --ink-soft: #4F5B52;  /* secondary. 7.12 on page · 6.02 on panel            */
  --on-dark:      #F2F5F1;  /* text on surface-dark. 15.69                    */
  --on-dark-soft: #AEBBAF;  /* secondary on surface-dark. 8.64                */

  /* ---- LINE -------------------------------------------------------------- */
  --line: #CBD2C5;  /* 1.55 on page · 1.31 on panel -- same subtlety class as
                       the border this replaces, recomputed for the new
                       neutral family.                                        */
  --line-dark: #3A463D;  /* 1.74 on surface-dark                              */

  /* ---- ACCENTS ----------------------------------------------------------- */
  --accent: #841A1A;  /* Ruby Leaf brick, UNCHANGED across every palette this
                         site has had -- still 9.80 on the new page · 8.29 on
                         the new panel.
                         🔴 Still DARK-SURFACE FAILS: 1.76 on the new
                         surface-dark, same failure mode as every prior
                         version, re-verified against the new dark value. */
  /* 🔴 DARK SURFACE ONLY. Both fail on every light ground, unchanged roles.  */
  --accent-warm:      #F8B500;  /* kept, dark-surface button role unchanged;
                                   re-verify against the new surface-dark
                                   before relying on the old figure.           */
  --accent-warm-deep: #E08A1E;

  /* ---- BRAND, Adrian's own anchor ------------------------------------------ */
  /* 🔒 Adrian, 2026-11-22: "#407A52 is the only color I'm partial to." This
     is now the site's ONE confident brand colour, not a wordmark-only
     constant the way --header-green was -- it IS the wordmark, AND the
     primary link/accent/button colour everywhere on a light ground. A
     single confident colour doing both jobs is the actual pattern the
     research found (Schwab's blue is both the logo block and reappears as
     the brand's own identity elsewhere), not two unrelated roles that
     happen to share a hue family.
     5.09 on page -- clears 4.5:1 for NORMAL body text, not just large/bold
     the way the previous bright green (--accent-bright, 3.73/2.93) could
     only ever manage. 4.64 on panel. White text on this as a button fill:
     5.09, passes normal text comfortably -- the previous green's own
     fill case (3.86 actual, against the documented-but-unreproducible 7.47)
     never cleared that bar at all.                                           */
  --brand-green: #407A52;
  --brand-green-deep: #2E5A3C;  /* hover/active state, and anywhere the plain
                                   brand colour needs more weight -- tonal
                                   variation of ONE colour, not a second hue,
                                   the same restraint the research found.
                                   7.94 on page -- passes AAA normal text.     */
  /* Kept as a dedicated alias so no call site needs to change meaning:
     .lockup still reads --header-green specifically for the wordmark. */
  --header-green: var(--brand-green);
  --brand-green-tint: #DCE8E0;  /* pale hover/zebra tint -- 1.26 against page,
                                   a whisper, not a colour field. Replaces
                                   --accent-bright-tint's role on Market's
                                   row hover.                                  */

  /* ---- TABLE HEADERS / EMPHASIS --------------------------------------------- */
  /* Replaces --highlight (#5A4F74, violet). Neither JPMorgan, Schwab nor
     Kalshi uses purple anywhere on their own pages -- confirmed by looking,
     not assumed absent. A dark neutral reads as the restrained, confident
     choice the research actually showed; introducing a second decorative
     hue here would be the opposite move from "one brand colour, used with
     discipline."                                                             */
  --emphasis: #242E28;  /* 14.03 on page as a header fill w/ on-dark text.    */

  /* ---- BORDERS, NON-TEXT ----------------------------------------------------- */
  --border-soft:      #8FA8AB;  /* .note border on light ground -- unchanged
                                    value, re-verify contrast before reuse.    */
  --border-soft-dark: #71868F;  /* .hero .note border on the dark surface --
                                    unchanged value, re-verify before reuse.   */

  /* --accent-bright, --accent-bright-tint and --accent-blue (the prior
     direction's bright teal/blue) RETIRED from this file, 2026-11-22:
     Adrian, after seeing Market's trading floor and the range-bar left on
     the old colours while the rest of the site moved to this palette,
     "bring everything into the new color palette." Every call site that
     used them (Market's top bar/hover/price text, viz.py's range-bar and
     span-bar) now reads --brand-green/--brand-green-tint/--line instead --
     confirmed by grep, not assumed, before deleting these three outright.
     The merch-bound favicon/icon set (tools/make_icons.py) is untouched: it
     hard-codes its own literal hex constants for a stated, separate
     purpose (physical merch, not screen tone) and was never wired to these
     tokens in the first place, so nothing there needed to change for this. */

  /* ---- CATALOGUE SEMANTICS ----------------------------------------------- */
  /* season-peak/shoulder/none and gap-contractable/input-limited/blocked
     REMOVED 2026-11-21, round-six panel: all six were unused. The season
     tokens styled season_cell()'s dot strip, which main() never called; the
     gap tokens implied a three-tier severity read is_gap() never built.
     Adrian's call on both: delete rather than wire up. Left here as a
     one-line record rather than silently vanishing from history. The rule
     these existed to serve stays true of what actually ships: colour never
     carries meaning alone, every chip ships its own text label, and the
     2010 UCCE matrix lost its meaning to exactly that once already.         */
  /* 🔴 Chip TEXT is always --ink-soft. Only the chip BORDER carries the class
     colour.                                                                  */

  /* ---- TYPE --------------------------------------------------------------- */
  --font-display: "Noto Serif", Georgia, serif;   /* SELF-HOSTED — fonts.css  */
  --font-ui:      "Inter", "Segoe UI", -apple-system, sans-serif;
  --fs-base: 17px;        /* scale ratio 1.25 (major third) */
  --fs-display: 2.441rem; --fs-h1: 1.953rem; --fs-h2: 1.563rem; --fs-h3: 1.25rem;
  --fs-body: 1rem; --fs-data: 0.9375rem; --fs-caption: 0.8125rem;
  --lh-tight: 1.2; --lh-body: 1.55;

  /* ---- SPACE (4px base) ---------------------------------------------------- */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px;
  --sp-5:24px; --sp-6:32px; --sp-7:48px; --sp-8:64px;

  /* ---- MEASURE ------------------------------------------------------------- */
  --max-width: 800px;         /* prose */
  --max-width-table: 1240px;  /* the catalogue is EXEMPT: 800px cannot hold 12
                                 month columns plus crop, cuisine and status  */
  --radius: 3px;
  --bp-sm: 640px; --bp-md: 960px; --bp-lg: 1280px;
  --mark-min: 32px;           /* below this use the purpose-drawn 16px glyph  */
  --lockup-min-width: 237px;  /* below this: the mark alone                   */
}

/* Tables use tabular figures so columns align. Non-negotiable in the catalogue. */
table, .data { font-variant-numeric: tabular-nums; font-size: var(--fs-data); }

/* The mark inherits colour. Never hard-code its fill. */
.mark { color: var(--accent); }
.on-dark .mark, .reverse .mark { color: var(--on-dark); }

/* 🔴 FORBIDDEN — stated so a builder cannot do it by accident:
   color: var(--accent-warm);      background: var(--page);   fails, re-verify before reuse
   color: var(--accent-warm-deep); background: var(--page);   fails, re-verify before reuse
   color: var(--accent);           background: var(--surface-dark); 1.76 — fails
   color: var(--brand-green) or --brand-green-deep; background: var(--surface-dark) as
     BODY TEXT — 3.39/2.17, only the deep variant even reaches 3:1, and that's the
     large-text/non-text bar, not body text. Use --on-dark for dark-surface text.
   color: var(--border-soft) or var(--border-soft-dark) at body text size — fails
   🔴 No red works on any dark surface. The reverse treatment uses --on-dark. */
