/* Design tokens — the single source of brand truth.
   Values are the signed-off design brief (design_handoff_rhellm). The register is a premium
   working journal, not a SaaS dashboard: warm paper, brand navy as the ink, ONE identity accent
   (terracotta), and a serif reserved strictly for the coach's voice.

   Decisions (David, 2026-07): the interface accent is terracotta — flame/coral read "too hot for
   sustained reading" — while the LOGO asset keeps its coral play button untouched. Newsreader
   carries the coach's voice; Montserrat keeps every piece of interface chrome.

   Legacy aliases are kept at the bottom so existing rules/views inherit the new palette without
   a rename sweep. Prefer the canonical names in new code. */
:root {
  /* ── Ink & text ─────────────────────────────────────────────── */
  --ink: #002558;          /* body, headings, primary buttons, rail. Brand navy. */
  --ink-soft: #33455F;     /* secondary body copy on paper */
  --slate: #6B809B;        /* labels, meta, ruled lines. 13px+ only, never small body text */
  --slate-light: #8A94AB;  /* column headers, quietest meta */
  --rail-text: #A9B4CF;    /* inactive nav labels and meta on navy */

  /* ── Surfaces ───────────────────────────────────────────────── */
  --paper: #FBF6EF;        /* cards and panels */
  --paper-warm: #F6EFE3;   /* card footers */
  --canvas: #EFE7DB;       /* page background */
  --mist: #E1E5EF;         /* progress track, inactive toggle background */
  --white: #FFFFFF;

  /* ── Accent ─────────────────────────────────────────────────── */
  --apricot: #F0D3AE;      /* voice pulse, file dot, celebration. SURFACE ONLY, never text. */
  --terracotta: #C36B45;   /* the one identity accent: active nav, eyebrows, links, over-runs */
  --terracotta-deep: #A85835;

  /* ── Accessible TEXT variants ───────────────────────────────────
     The brief's slate/terracotta are correct as colour, but as small text on paper/canvas they
     land at 3.1–3.8:1 — under WCAG AA (4.5:1), and 13px is not "large text". These are the same
     hues scaled down ~80% in lightness: identical family, ≥4.5:1 on both paper and canvas.
     The ORIGINAL values above remain the identity accent for every surface use (over-run bars,
     the active nav bar, borders), where only 3:1 applies. On the ink panel the relationship
     inverts — darker is worse — so accent text there uses apricot (10.4:1). */
  --slate-text: #596A81;
  --slate-light-text: #616878;
  --terracotta-text: #9C5637;
  --accent-on-ink: var(--apricot);

  /* ── Lines ──────────────────────────────────────────────────── */
  --border: #E0D6C6;       /* card borders */
  --border-strong: #C9BCA7;/* input borders, secondary button borders */
  --rule: #EDE4D5;         /* ruled lines inside the file, row dividers */
  --rule-strong: #DED3C0;  /* progress tracks, top-bar border */

  /* ── Callouts ───────────────────────────────────────────────── */
  --alert-bg: #FBF3E9;
  --alert-border: #E7CBA6;

  /* ── Semantic surfaces ──────────────────────────────────────── */
  --bg: var(--canvas);
  --surface: var(--paper);
  --surface-sunken: var(--paper-warm);
  --text: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-on-navy: #EFE7DB;
  --text-muted: var(--slate-light-text);

  /* ── The Three C's (brief §5): Compounds ink · Commodity slate · Comfort terracotta ── */
  --compounds: var(--ink);        --compounds-bg: #E6EAF2;
  --commodity: var(--slate);      --commodity-bg: #EDEFF4;
  --comfort: var(--terracotta);   --comfort-bg: #F6E7DC;
  --estimate-bar: #B9C2D4;        /* the muted "what you thought" bar in the reconciliation */

  /* ── Feedback. No green/red gamification: confirmations are textual, per the brief. ── */
  --success: var(--ink);
  --warning: var(--terracotta);
  --danger: #9E3B26;              /* restrained brick, for genuinely destructive actions only */

  /* ── Typography ─────────────────────────────────────────────── */
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-voice: "Newsreader", Georgia, "Times New Roman", serif; /* the coach's voice ONLY */

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;
  --fw-black: 700;   /* the brief tops out at 700 — no 800 weights */

  /* Role-based ramp (brief §Typography). Sizes are px because the brief specifies px. */
  --text-xs: 13px;    /* eyebrow, quietest meta — the floor for slate */
  --text-sm: 14px;    /* meta / caption */
  --text-base: 16.5px;/* body */
  --text-lg: 17px;    /* body intro */
  --text-xl: 22px;    /* insight sentence */
  --text-2xl: 28px;   /* file name, sub-heading */
  --text-3xl: 38px;   /* screen heading */
  --text-4xl: 52px;   /* sign-up hero */
  --text-question: 34px;  /* interview question */
  --text-checkin: 32px;   /* check-in question */

  --leading: 1.65;        /* body */
  --leading-file: 1.95;   /* file content — sits the text on the ruled lines */
  --leading-tight: 1.1;
  --tracking-tight: -0.01em;
  --tracking-wide: 0.14em;   /* eyebrows */
  --tracking-wordmark: 0.18em;

  /* ── Spacing ────────────────────────────────────────────────── */
  --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;    --sp-8: 4rem;
  --page-pad: clamp(28px, 5vw, 72px);

  /* ── Radius — stationery, not consumer app ──────────────────── */
  --r-sm: 5px;    /* buttons, inputs */
  --r-md: 6px;    /* cards, panels */
  --r-lg: 6px;
  --r-xl: 6px;
  --r-full: 40px; /* pills, chips, segmented toggles */

  /* ── Shadow — the file only ─────────────────────────────────── */
  --shadow-sm: 0 1px 0 #E9E0D0;
  --shadow-md: 0 1px 0 #E9E0D0, 0 18px 34px -28px rgba(0, 37, 88, 0.35);
  --shadow-lg: 0 1px 0 #E9E0D0, 0 30px 55px -34px rgba(0, 37, 88, 0.4);

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 272px;
  --maxw: 820px;

  /* ── Legacy aliases — existing rules inherit the new palette ── */
  --navy: var(--ink);
  --navy-700: #0A3168;
  --navy-600: #16407E;
  --coral: var(--terracotta);
  --coral-600: var(--terracotta-deep);
  --orange: var(--terracotta);
  --slate-300: var(--rail-text);
  --sand: var(--canvas);
}
