/* ===========================================================================
   BRIDGE AI — design tokens
   ---------------------------------------------------------------------------
   The single source of every colour, size, weight and duration in the panel.
   Nothing below this file may invent a hex value.

   AESTHETIC: "evidence ledger". BRIDGE AI is a rejection machine whose output
   is a permanent written record, so the surface reads like an instrument and a
   ledger, not a trading dashboard: near-black green ink, hairline rules,
   tabular monospace numerals, one accent per screen, and colour used only to
   say what a number MEANS (cleared a bar / missed it / was never scored).

   TYPE: no webfont is fetched at runtime (house rule: no external CDNs, and no
   Google Fonts request). The identity therefore comes from the MONOSPACE
   stack, which carries every heading, verdict, rule id, threshold and figure;
   prose falls to a tight system sans. Numerals are tabular everywhere a column
   of them can be compared.

   COLOUR SEMANTICS — fixed, and used nowhere else:
     green   a bar was CLEARED (or a thing is alive/healthy)
     coral   a bar was MISSED, decisively, on evidence we have
     amber   the FRAGILE outcome (had an edge, could not survive R7)
     yellow  the PRE-REGISTERED BAR itself (thresholds, captions, caution)
     steel   INSUFFICIENT EVIDENCE — deliberately cool: NOT a failure
     stone   UNSPECIFIABLE — a recorded result, not an error
     rust    DISQUALIFIED — hatched, because the run was never a result at all
     mute    NOT SCORED — dashed, low contrast, never mistaken for a pass
   =========================================================================== */

:root {
  /* -- ink ramp (the brand ink #081408, extended into a neutral ramp) ------ */
  --ink-1000: #040A04;   /* page floor                                       */
  --ink-950:  #060F06;   /* page                                             */
  --ink-900:  #081408;   /* BRAND INK — chrome                               */
  --ink-850:  #0A1A0B;   /* surface                                          */
  --ink-800:  #0D210E;   /* raised surface                                   */
  --ink-750:  #112A13;   /* hover                                            */
  --ink-700:  #163318;   /* pressed / selected                               */

  --line:     #1A2D1B;   /* hairline                                         */
  --line-2:   #26412A;   /* hairline, emphasised                             */
  --line-3:   #375A3C;   /* focus ring base                                  */

  --text:     #ECF5E9;   /* primary                                          */
  --text-2:   #9FB89B;   /* secondary                                        */
  --text-3:   #6B846A;   /* tertiary / captions                              */
  /* --text-4 is READABLE TEXT, not a disabled colour, and it has to measure
     like one. It carries every NOT SCORED rung, the ladder legend that
     explains what cleared/missed/not scored mean, every table head, every KPI
     label, and the "does not trade / not investment advice" footnote on every
     screen. At #4A5F4A that was 2.44:1–2.81:1 against the four ink grounds it
     is used on — AA needs 4.5:1 — so a reader who could not read the legend
     could not check any colour on the ladder against its meaning.
     #7A9479 measures 5.44:1 on --ink-850, 5.88:1 on --ink-950 and 5.11:1 on
     --ink-800. The muted LOOK of a not-scored rung is kept by muting its
     background and keeping its dashed border, not by making its words faint. */
  --text-4:   #7A9479;   /* tertiary, on the AA side of the line             */
  --text-disabled: #4A5F4A;  /* genuinely disabled controls, and placeholders */

  /* -- identity ----------------------------------------------------------- */
  --yellow:      #FFD64D;
  --yellow-deep: #E8B00F;
  --yellow-wash: rgba(255, 214, 77, .10);
  --yellow-line: rgba(255, 214, 77, .32);

  --green:      #3DDC84;
  --green-deep: #1BA75D;
  --green-wash: rgba(61, 220, 132, .10);
  --green-line: rgba(61, 220, 132, .34);

  /* -- semantic ----------------------------------------------------------- */
  --coral:      #FF8D7D;
  --coral-wash: rgba(255, 141, 125, .10);
  --coral-line: rgba(255, 141, 125, .34);

  --amber:      #FFA95C;
  --amber-wash: rgba(255, 169, 92, .10);
  --amber-line: rgba(255, 169, 92, .32);

  --steel:      #93AECD;
  --steel-wash: rgba(147, 174, 205, .10);
  --steel-line: rgba(147, 174, 205, .30);

  --stone:      #B3AF9C;
  --stone-wash: rgba(179, 175, 156, .10);
  --stone-line: rgba(179, 175, 156, .28);

  --rust:       #E2594E;
  --rust-wash:  rgba(226, 89, 78, .10);
  --rust-line:  rgba(226, 89, 78, .38);

  --mute:       var(--text-3);
  --mute-wash:  rgba(107, 132, 106, .08);
  --mute-line:  rgba(107, 132, 106, .34);

  /* -- type --------------------------------------------------------------- */
  --font-sans: ui-sans-serif, "Segoe UI Variable Text", "Segoe UI",
               -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
               "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Cascadia Code", "SF Mono",
               "JetBrains Mono", "Roboto Mono", "DejaVu Sans Mono", Menlo,
               Consolas, monospace;

  --t-2xs:  0.625rem;    /* 10 — rule ids, micro labels                      */
  --t-xs:   0.6875rem;   /* 11 — eyebrows, table heads                       */
  --t-sm:   0.8125rem;   /* 13 — captions, meta                             */
  --t-base: 0.9375rem;   /* 15 — body                                       */
  --t-md:   1.0625rem;   /* 17 — lead                                       */
  --t-lg:   1.375rem;    /* 22 — section heads                              */
  --t-xl:   1.875rem;    /* 30 — page heads                                 */
  --t-2xl:  2.5rem;      /* 40 — hero                                       */
  --t-3xl:  3.25rem;     /* 52 — hero, wide viewports                       */

  --lh-tight: 1.1;
  --lh-snug:  1.35;
  --lh-body:  1.6;

  --track-wide:  0.18em;   /* eyebrows / uppercase micro labels             */
  --track-tight: -0.02em;  /* display                                       */

  /* -- 8px spacing grid --------------------------------------------------- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* -- shape -------------------------------------------------------------- */
  --r-sm: 5px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* -- elevation (a research tool: shadows are depth cues, never drama) ---- */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 6px 20px -8px rgba(0, 0, 0, .55);
  --sh-3: 0 24px 60px -24px rgba(0, 0, 0, .75);
  --glow-green:  0 0 0 1px var(--green-line), 0 12px 36px -18px rgba(61, 220, 132, .55);
  --glow-yellow: 0 0 0 1px var(--yellow-line), 0 12px 36px -18px rgba(255, 214, 77, .5);

  /* -- motion (only where it communicates progress) ----------------------- */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 120ms;
  --mid:  220ms;
  --slow: 420ms;

  /* -- layout ------------------------------------------------------------- */
  --rail: 236px;          /* desktop nav rail                                */
  --wrap: 1180px;         /* content max width                               */
  --wrap-narrow: 780px;   /* reading measure                                 */
  --gutter: 16px;         /* minimum side gutter at 390px                    */
}

/* The panel is dark by design — it is an instrument read in a dark room, and
   the verdict palette is tuned for this ground. A light-mode override would
   have to re-tune every semantic hue, so it is declared, not faked. */
@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --fast: 0ms; --mid: 0ms; --slow: 0ms; }
}
