/*
 * Design tokens — the ONLY place raw hex values, scales, and primitives live.
 * Everything downstream (elements, objects, components) references these via
 * var(--token); never paste a literal hex/px into a component. Source of truth:
 * docs/02-design-spec.md §3 and docs/mockup-jewel.html.
 *
 * The "Jewel Console": light greenish canvas, deep jewel-tone accents, a rich
 * dark pine-teal command rail, and a warm cream skin for the public side
 * (applied by overriding the canvas tokens on a scope — see t-public).
 */

:root {
  /* ── Color · neutrals & canvas (BLUE — navy/steel palette) ───────────
   * Always-on theme (public + admin). Source palette:
   * #111844 navy / #4B5694 indigo / #7288AE steel / #EAE0CF cream.
   * The canvas is the steel #7288AE (per stakeholder); cards are cream, so
   * content reads as a soft light theme with navy chrome. */
  --bg:      #7288ae;   /* app canvas (steel blue) */
  --surf:    #eae0cf;   /* cards, panels (cream) */
  --surf-2:  #f1ebdf;   /* raised surfaces (table header — lighter cream) */
  --paper:   #ffffff;   /* print-artifact sheet (includes/print/*) — see note below */
  --ink:     #111844;   /* primary text (navy) */
  --ink-2:   #39426e;   /* secondary text */
  --ink-3:   #5f6890;   /* muted / captions */
  --ink-4:   #9a93a0;   /* disabled / faint */
  --on-canvas: #ffffff; /* light ink for prose on the canvas, not on a card
                           (the page-hero lead); flip it if --bg lightens */
  --line:    #d8cfbc;   /* hairline borders (on cream) */
  --line-2:  #e3dccb;   /* faint inner rules */
  /* --paper is the one deliberately theme-INDEPENDENT surface: the print
     artifacts under includes/print/ are sheets of paper, and inheriting the app
     canvas made them preview as navy-on-steel while printing as navy-on-white
     (browsers drop backgrounds by default) — the same document looking like two.
     A palette swap moves everything else; paper stays paper. */

  /* ── Color · accent set (palette indigo primary + categorical jewels) ─
   * Saturated for legibility on the light cream cards; the matching *-wash is
   * a light tint (accent mixed into the card surface). */
  --teal:        #4b5694;  --teal-wash:   color-mix(in srgb, #4b5694 13%, var(--surf));  --teal-line: #7288ae;  /* primary / actions / accepted */
  --indigo:      #2f3196;  --indigo-wash: color-mix(in srgb, #2f3196 13%, var(--surf));
  --plum:        #7a1f6a;  --plum-wash:   color-mix(in srgb, #7a1f6a 13%, var(--surf));
  --saph:        #1f5bd6;  --saph-wash:   color-mix(in srgb, #1f5bd6 13%, var(--surf));
  --gold:        #b07a12;  --gold-wash:   color-mix(in srgb, #b07a12 13%, var(--surf));  /* pending / Hafiz tag */
  --garnet:      #9e2b25;  --garnet-wash: color-mix(in srgb, #9e2b25 13%, var(--surf));  /* rejected */
  --green:       #2f7d4f;  --green-wash:  color-mix(in srgb, #2f7d4f 13%, var(--surf));  --green-line: #5fa97e;  /* success */

  /* ── Color · command rail + chrome (navy) ────────────────────────────
   * The rail and public masthead use this deep navy so the chrome is a
   * distinct dark band against the steel canvas. Rail text uses the --rail-*
   * tokens (always light) so it stays legible independent of the theme. */
  --rail:      #111844;   /* deep navy chrome */
  --rail-2:    #20284f;   /* hover / active row fill */
  --rail-line: #2b3460;
  --rail-ink:  #d6dcee;   /* rail text (light) */
  --rail-mut:  #828bac;   /* muted rail text */
  --rail-acc:  #9fb1d6;   /* active keyline / glow (light periwinkle — pops on navy) */
  --on-rail-acc: #111844; /* navy ink on the bright accent mark */

  /* ── Semantic aliases (status / feedback) ────────────────────────── */
  --ok:      var(--teal);    --ok-wash:      var(--teal-wash);
  --success: var(--green);   --success-wash: var(--green-wash);   --success-line: var(--green-line);
  --warn:    var(--gold);    --warn-wash:    var(--gold-wash);
  --danger:  var(--garnet);  --danger-wash:  var(--garnet-wash);
  --on-accent: #ffffff;      /* white ink on a solid (saturated) accent fill */

  /* ── Form fields — kept crisp WHITE so inputs stand out on the cream
   * cards and typed text is clearly legible (04-elements/_forms.css). ─ */
  --field-bg:          #ffffff;   /* white field background */
  --field-ink:         #111844;   /* navy text typed into a field */
  --field-line:        #cbd0de;   /* field border */
  --field-placeholder: #8b90a6;   /* placeholder text */

  /* ── Typography ──────────────────────────────────────────────────── */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* One scale, one source. Bump a value here and every token-driven element
   * (and every component that references these instead of a px literal) grows.
   * Base bumped 13→15px on 2026-06-10 for readability; --fs-lead is the
   * "a notch above body" step for reading content (instructions, schedule,
   * hero lead). */
  --fs-display:  2.1rem;   /* ~34px hero figures */
  --fs-h1:       1.6rem;   /* ~26px page titles */
  --fs-h2:       1.125rem; /* 18px section heads */
  --fs-h3:       1rem;     /* 16px box heads */
  --fs-lead:     1rem;     /* 16px reading content (a notch above body) */
  --fs-body:     0.9375rem;/* 15px base */
  --fs-sm:       0.8125rem;/* 13px */
  --fs-cap:      0.75rem;  /* 12px captions */
  --fs-eyebrow:  0.6875rem;/* 11px uppercase labels */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-label:   600;
  --fw-bold:    700;
  --fw-black:   800;

  --lh-tight: 1.15;
  --lh-base:  1.5;
  --tracking-tight: -0.02em;
  --tracking-wide:  0.14em;  /* eyebrow / uppercase */

  /* ── Radius ──────────────────────────────────────────────────────── */
  --r-sm:   9px;
  --r:      14px;
  --r-pill: 999px;

  /* ── Spacing scale ───────────────────────────────────────────────── */
  --space-2xs: 0.25rem;  /* 4 */
  --space-xs:  0.5rem;   /* 8 */
  --space-sm:  0.75rem;  /* 12 */
  --space-md:  1rem;     /* 16 */
  --space-lg:  1.5rem;   /* 24 */
  --space-xl:  2rem;     /* 32 */
  --space-2xl: 3rem;     /* 48 */

  /* ── Layout ──────────────────────────────────────────────────────── */
  --rail-w:          224px;
  --container-max:   1200px;
  --container-gutter: 1.25rem;
  --reading-max:     780px;  /* public single-column measure */

  /* ── Elevation ───────────────────────────────────────────────────── */
  --shadow-lift: 0 14px 30px -14px rgba(17, 24, 68, 0.30);

  /* ── Motion ──────────────────────────────────────────────────────── */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 130ms;
  --dur:      180ms;

  /* ── Z-index scale ───────────────────────────────────────────────── */
  --z-rail:    40;
  --z-sticky:  60;
  --z-drawer:  80;
  --z-overlay: 90;
}

/*
 * The public (applicant) pages share the same greenish canvas + component set
 * as the staff console (decided 2026-06-09: a single form/component system is
 * easier to maintain than a separate warm skin). No token override is needed —
 * public pages just use the :root tokens above. If a distinct public skin is
 * ever wanted again, add a `.t-public { --bg: …; }` scope here (the skin
 * mechanism), never duplicated component rules.
 */
