/* ============================================================
   Paragon Blueprint Portal — Design Tokens
   Source of truth: /Paragon/Brand/palette.md v1.1 (via palette.json)
   Rule: core three are locked. Status tokens appear on DATA only
   (dots, bars, pills, graded values) — never chrome or prose.
   ============================================================ */

@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'PT Mono';
  src: url('../assets/fonts/PTMono-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* ---- Core palette (locked) ---- */
  --cocoa: #2B1F1F;
  --dusty-blue: #728BA7;
  --bone: #EBEBDC;

  /* ---- Derived shades ---- */
  --cocoa-soft: #4A3A3A;
  --dusty-blue-soft: #A8B6C6;
  --card: #F4F4E6;
  --rule-soft: #CCCBB8;
  --text-mute: #6B655F;
  --card-deep: #EDEDD8;

  /* Accessible dusty for small text on light bg (WCAG fix, design review 2026-06-09) */
  --dusty-ink: #4A6280;
  --dusty-ink-deep: #3E5168;

  /* ---- Status tokens (data displays only) ---- */
  --st-optimal: #6E8B6E;
  --st-optimal-text: #5A7457;
  --st-optimal-pill: #42563F;
  --st-normal: #728BA7;
  --st-normal-text: #4A6280;
  --st-normal-pill: #3E5168;
  --st-borderline: #9A7843;
  --st-borderline-text: #8A6633;
  --st-borderline-pill: #6E5326;
  --st-flagged: #A4584E;
  --st-flagged-text: #8F4038;
  --st-flagged-pill: #7A2F28;

  /* Pill fills: token mark at ~18% alpha over card */
  --st-optimal-fill: rgba(110, 139, 110, 0.18);
  --st-normal-fill: rgba(114, 139, 167, 0.18);
  --st-borderline-fill: rgba(154, 120, 67, 0.18);
  --st-flagged-fill: rgba(164, 88, 78, 0.18);

  /* Band shading for charts (very low alpha, on card surfaces) */
  --band-optimal: rgba(110, 139, 110, 0.10);
  --band-normal: rgba(114, 139, 167, 0.10);
  --band-borderline: rgba(154, 120, 67, 0.10);
  --band-flagged: rgba(164, 88, 78, 0.10);

  /* ---- Typography ----
     Manrope text + PT Mono labels on a 16px root (base.css). Pick a token by
     ROLE; never hand-write a rem literal in a view. The reading ladder runs
     hero -> micro; --fs-small is the comfortable label size and --fs-micro the
     hard legibility floor (nothing renders smaller). Stat-tile numerals sit on
     their own display scale, outside the reading ladder. */
  --font-sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'PT Mono', 'Consolas', monospace;

  /* Reading ladder */
  --fs-hero: 2.6rem;     /* member greeting, login wordmark */
  --fs-title: 1.9rem;    /* h1 page title */
  --fs-section: 1.45rem; /* Blueprint / contact-detail section-band heading */
  --fs-h2: 1.35rem;      /* section heading */
  --fs-lead: 1.15rem;    /* lede / pull-quote prose (light weight) */
  --fs-h3: 1.06rem;      /* card / sub-section heading */
  --fs-body: 0.94rem;    /* reading baseline */
  --fs-small: 0.82rem;   /* dense UI labels — comfortable floor */
  --fs-micro: 0.72rem;   /* mono overlines, captions — legibility floor */

  /* Display numerals (stat tiles) — sized for glanceable figures, not reading */
  --fs-stat-sm: 1.3rem;  /* text-bearing stat values (dates, plan, stage) */
  --fs-stat: 1.7rem;     /* default stat numeral */
  --fs-stat-lg: 2rem;    /* dashboard / Blueprint headline numerals */
  --fs-stat-xl: 2.4rem;  /* hero stat numeral */

  /* Line-heights: tight for big numerals, heading for titles, body for prose */
  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-body: 1.6;

  /* Prose measure: caps body-text line length for comfortable reading.
     Consolidates the ad-hoc 46-80ch caps that were scattered inline. */
  --measure: 64ch;        /* body prose / clinician narratives / help text */
  --measure-narrow: 50ch; /* tight hints under a stepper or control */
  --measure-wide: 74ch;   /* denser staff explanatory blocks */
  --measure-lead: 54ch;   /* large-type ledes — fewer chars/line reads better */

  /* ---- Spacing ---- (a 0.25rem-based rhythm; step up the scale, don't invent
     in-between values in views) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;

  /* ---- Surfaces ---- */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgba(43, 31, 31, 0.07), 0 4px 14px rgba(43, 31, 31, 0.05);
  --shadow-raise: 0 2px 6px rgba(43, 31, 31, 0.10), 0 10px 28px rgba(43, 31, 31, 0.08);

  --content-max: 1180px;
  --report-max: 780px;
}
