/* =========================================================================
   L&D Foundry — Foundations
   Type and color tokens. Spreadsheet-grade clarity. Arial only, by design.
   ========================================================================= */

:root {
  /* ---------- Color: brand ---------- */
  --ldf-graphite:    #2B2B2B;  /* body text */
  --ldf-deep-navy:   #1F3864;  /* headers, primary brand */
  --ldf-off-white:   #F8F7F4;  /* page bg — never pure white */
  --ldf-slate:       #6B7280;  /* secondary text, dividers */
  --ldf-safety-orange: #F26B2B; /* single accent — never a fill */
  --ldf-light-line:  #E5E5E5;  /* table borders, subtle dividers */

  /* ---------- Color: status chip system ---------- */
  --ldf-ready-fg:        #1B5E20;
  --ldf-ready-bg:        #BFDDC2;
  --ldf-verified-fg:     #0F2A52;
  --ldf-verified-bg:     #B8C7DE;
  --ldf-needs-owner-fg:  #B84A12;
  --ldf-needs-owner-bg:  #FFCDB0;
  --ldf-gap-fg:          #8E1A1A;
  --ldf-gap-bg:          #F2BCBC;

  /* Readiness scale (used in ARC-001 audit-readiness) — Yes / Partial / No */
  --ldf-yes-fg:     #1B5E20;
  --ldf-yes-bg:     #BFDDC2;
  --ldf-partial-fg: #8A4B05;
  --ldf-partial-bg: #FBE2A0;
  --ldf-no-fg:      #8E1A1A;
  --ldf-no-bg:      #F2BCBC;

  /* ---------- Semantic color ---------- */
  --fg1: var(--ldf-graphite);       /* primary body */
  --fg2: var(--ldf-slate);          /* secondary */
  --fg-heading: var(--ldf-deep-navy);
  --fg-accent: var(--ldf-safety-orange);
  --bg-page: var(--ldf-off-white);
  --bg-surface: #FFFFFF;            /* used inside tables/cards on off-white */
  --border: var(--ldf-light-line);
  --border-strong: #CFCFCF;

  /* ---------- Type ---------- */
  --font-sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "Consolas", "Menlo", "Monaco", monospace; /* used only for IDs/codes in tables */

  /* Spreadsheet-grade scale: small, dense, dark */
  --fs-xs:   11px;   /* table meta, footnotes */
  --fs-sm:   12px;   /* table body, chips */
  --fs-base: 13px;   /* default body */
  --fs-md:   14px;   /* body emphasis, form labels */
  --fs-lg:   16px;   /* small headers */
  --fs-xl:   18px;   /* h3 */
  --fs-2xl:  22px;   /* h2 */
  --fs-3xl:  28px;   /* h1 */
  --fs-4xl:  36px;   /* page hero on marketing only */

  --lh-tight:  1.2;
  --lh-snug:   1.35;
  --lh-normal: 1.5;

  --fw-regular: 400;
  --fw-bold:    700;

  /* ---------- Spacing (4px grid) ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* ---------- Radii: small. Spreadsheet aesthetic. ---------- */
  --radius-0: 0;
  --radius-1: 2px;   /* chips, inputs */
  --radius-2: 4px;   /* cards, buttons */
  --radius-3: 6px;   /* modals */

  /* ---------- Borders ---------- */
  --bw-1: 1px;
  --bw-2: 2px;       /* focus ring, active tab */

  /* ---------- Shadows: minimal. Documents, not apps. ---------- */
  --shadow-0: none;
  --shadow-1: 0 1px 0 rgba(31, 56, 100, 0.06);
  --shadow-2: 0 1px 2px rgba(31, 56, 100, 0.08), 0 0 0 1px var(--border);
  --shadow-pop: 0 4px 12px rgba(31, 56, 100, 0.10), 0 0 0 1px var(--border);

  /* ---------- Layout ---------- */
  --maxw-doc: 960px;       /* document width */
  --maxw-marketing: 1120px;
}

/* =========================================================================
   Base
   ========================================================================= */

html, body {
  background: var(--bg-page);
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

/* Headings — navy, bold, tight */
h1, .h1 {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  color: var(--fg-heading);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4) 0;
}
h2, .h2 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  color: var(--fg-heading);
  margin: 0 0 var(--s-3) 0;
}
h3, .h3 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg-heading);
  margin: 0 0 var(--s-2) 0;
}
h4, .h4 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--fg-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 var(--s-2) 0;
}

p { margin: 0 0 var(--s-3) 0; }

em, .italic { font-style: italic; }
strong, b { font-weight: var(--fw-bold); }

small, .small { font-size: var(--fs-sm); color: var(--fg2); }
.meta { font-size: var(--fs-xs); color: var(--fg2); text-transform: uppercase; letter-spacing: 0.06em; }

a {
  color: var(--ldf-deep-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--ldf-safety-orange); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s-6) 0;
}

/* Brand mark byline — small italic, never dominant */
.ldf-byline {
  font-style: italic;
  font-size: var(--fs-xs);
  color: var(--fg2);
  letter-spacing: 0.02em;
}
.ldf-byline::before { content: "L&D Foundry"; }

/* =========================================================================
   Status chips — the visual language. Four states. Don't invent new ones.
   ========================================================================= */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.chip-ready    { color: var(--ldf-ready-fg);       background: var(--ldf-ready-bg); }
.chip-verified { color: var(--ldf-verified-fg);    background: var(--ldf-verified-bg); }
.chip-needs    { color: var(--ldf-needs-owner-fg); background: var(--ldf-needs-owner-bg); }
.chip-gap      { color: var(--ldf-gap-fg);         background: var(--ldf-gap-bg); }
.chip-yes      { color: var(--ldf-yes-fg);         background: var(--ldf-yes-bg); }
.chip-partial  { color: var(--ldf-partial-fg);     background: var(--ldf-partial-bg); }
.chip-no       { color: var(--ldf-no-fg);          background: var(--ldf-no-bg); }
