/* Mainline design tokens — Edition 01, May 2026 */
/* Downstream of Mainline_Brand_Language.docx. Do not modify in isolation. */

:root {
  /* Colour — locked palette */
  --mainline-navy:           #0A2540;
  --mainline-ink:            #0E1A2B;
  --mainline-rail-grey:      #4A5568;
  --mainline-steel:          #E2E5EA;
  --mainline-paper:          #F7F5F0;
  --mainline-white:          #FFFFFF;
  --mainline-saffron:        #C97B2E;
  --mainline-saffron-shadow: #9A5E22;

  /* Semantic layer — built only from the locked palette above; use these in
     component CSS instead of a raw --mainline-* name where the meaning is
     structural (surface, border, text) rather than a brand colour choice. */
  --surface:        var(--mainline-paper);
  --surface-raised:  var(--mainline-white);
  --border:          var(--mainline-steel);
  --text:            var(--mainline-ink);
  --text-muted:      var(--mainline-rail-grey);
  --text-on-navy:    var(--mainline-white);
  --accent:          var(--mainline-saffron);
  --accent-text:     var(--mainline-saffron-shadow);

  /* State colours */
  --ok:    var(--mainline-navy);
  --warn:  var(--mainline-saffron-shadow);
  --error: #9B2226; /* the one exception to the locked palette; error text only, mirrors the former atlas.css .gate-error */

  /* Data colours — chart fills and 6px dots only, never a chip background */
  --data-1: var(--mainline-navy);
  --data-2: #3E5A56; /* verdigris, formerly atlas.css --atlas-verdigris */
  --data-3: #A18866; /* sandstone, formerly atlas.css --atlas-sandstone */
  --data-4: var(--mainline-rail-grey);
  --data-5: var(--mainline-steel);

  /* Breakpoints — documented constants; CSS custom properties cannot be used
     inside @media, so this is the reference, not a usable value. 640px (s),
     880px (m), 1100px (l) are the only three widths allowed in @media —
     tools/test_tokens.mjs enforces this. */

  /* Type — Source Serif 4 stands in for Tiempos Headline while licensing is in process */
  --font-display: "Source Serif 4", "Tiempos Headline", Cambria, Georgia, serif;
  --font-body:    "Inter", Calibri, -apple-system, "Segoe UI", sans-serif;

  /* Type scale — pt converted to px for screen, scaled for web reading distance */
  --type-display:  clamp(48px, 6.5vw, 84px);
  --type-h1:       clamp(34px, 4vw, 48px);
  --type-h1-app:   clamp(28px, 3vw, 38px);   /* Atlas page titles: dense app pages, one size down */
  --type-h2:       clamp(24px, 2.4vw, 30px);
  --type-h3:       clamp(19px, 1.6vw, 22px);
  --type-body:     16px;
  --type-body-lg:  18px;
  --type-caption:  13px;
  --type-eyebrow:  12px;
  --type-small:    14px; /* secondary text — readability pass, 25 Sept 2026 */
  --type-micro:    12px;

  --lh-display:    1.05;
  --lh-h1:         1.10;
  --lh-h2:         1.20;
  --lh-h3:         1.25;
  --lh-body:       1.55;
  --lh-caption:    1.35;

  --tr-display:   -0.02em;
  --tr-h1:        -0.01em;
  --tr-h2:        -0.005em;
  --tr-eyebrow:    0.08em;

  /* Grid */
  --grid-max:        1200px;
  --grid-gutter:     80px;
  --line-length-max: 78ch;

  /* Spacing — 8pt base */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  /* Layout — Atlas app; shared with site.css via this one file */
  --radius: 3px;
  --bar-h:  56px;
  --rule:   1px solid var(--mainline-steel);
}
