/* ================================================================
   LEX v2 — DESIGN SYSTEM
   rem-based: all sizing scales with html { font-size }
   Base: 16px. Scale: small=14px, medium=16px, large=18px, xlarge=20px
================================================================ */

:root {
  /* Palette */
  --ink:        #0F0F0D;
  --ink-2:      #1E1E1B;
  --ink-3:      #2D2D28;
  --mid:        #6B6B5E;
  --muted:      #9A9A8A;
  --border:     #E2E0D8;
  --border-2:   #F0EEE6;
  --surface:    #FAFAF7;
  --white:      #FFFFFF;
  --gold:       #C9A84C;
  --gold-dim:   #E8D9A8;
  --gold-bg:    #FBF6E9;
  --danger:     #C0392B;
  --danger-bg:  #FDF0EE;
  --success:    #2E7D52;
  --success-bg: #EBF5EF;
  --warn:       #B5651D;
  --warn-bg:    #FDF3E7;
  --info:       #1A5276;
  --info-bg:    #EBF2F8;

  /* High contrast overrides (applied via .hc class on body) */
  --hc-ink: #000000;
  --hc-surface: #FFFFFF;
  --hc-border: #000000;

  /* Typography */
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius */
  --r-sm: 0.25rem;
  --r-md: 0.5rem;
  --r-lg: 0.75rem;
  --r-xl: 1rem;

  /* Sidebar */
  --sidebar-w: 15rem;
  --sidebar-collapsed: 3.5rem;

  /* Transitions */
  --t: 180ms ease;
}

/* Font size scale */
html { font-size: 16px; }
html.fs-small  { font-size: 14px; }
html.fs-large  { font-size: 18px; }
html.fs-xlarge { font-size: 20px; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

body.hc {
  --ink: var(--hc-ink);
  --surface: var(--hc-surface);
  --border: var(--hc-border);
  filter: contrast(1.15);
}

