/* Atlas foundation: interface values shared by NEC, Regional Map and Hamlet.
   Domain data palettes (maps, graph categories, statuses) have separate owners. */
:root {
  --nec-paper: #f9f9f7;
  --nec-surface: #ffffff;
  --nec-ink: #2d0c20;
  --nec-muted: #5d605a;
  --nec-accent: #53603c;
  --nec-accent-strong: #3d492b;
  --nec-accent-wash: #eef0e8;
  --nec-line: #c8c9bf;
  --nec-line-soft: #e2e3db;
  --nec-line-control: #7d8075;
  --nec-font-editorial: "EB Garamond", Garamond, Georgia, serif;
  --nec-font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nec-type-meta: 0.75rem;
  --nec-type-control: 0.875rem;
  --nec-type-body: 1rem;
  --nec-type-subheading: 1.25rem;
  --nec-type-heading: 1.5rem;
  --nec-type-title: 2rem;
  --nec-control-compact: 32px;
  --nec-control-default: 40px;
  --nec-control-touch: 44px;
  --nec-radius: 3px;
  --nec-radius-dialog: 6px;
  --nec-radius-status: 999px;
  --nec-shadow-surface: none;
  --nec-shadow-overlay: 0 12px 28px rgb(45 12 32 / 16%);
  --nec-shadow-focus: 0 0 0 3px rgb(83 96 60 / 24%);
  --nec-focus-ring: 2px solid var(--nec-ink);
  --nec-focus-offset: 2px;

  /* Stable application aliases; domain data colors remain separate. */

  /* --- PALETTE --- */

  /* Ink & Paper (High Contrast Base) */
  --ink: var(--nec-ink);  /* Near black, softer than #000 */
  --ink-2: var(--nec-muted);  /* Dark grey for subheads */
  --paper: var(--nec-paper);  /* Warm, off-white paper tone */
  --paper-bright: var(--nec-surface);  /* Pure white for cards/inputs */

  /* Structural Lines */
  --line: var(--nec-line);  /* Standard border */
  --line-strong: var(--nec-line-control);  /* Darker border for emphasis */
  --line-faint: var(--nec-line-soft);  /* Very subtle divider */

  /* Semantic Colors (Restrained) */
  --sage-green: var(--nec-accent);  /* Primary brand/action color - Earthy, natural */
  --terra-cotta:  #a64d4d;  /* Destructive/Error - Muted red */
  --mustard:      #d4a017;  /* Warning/Attention - Muted yellow */
  --slate:        #4a5568;  /* Info/Secondary - Cool grey */
  --charcoal: var(--nec-ink);
  --dark-green: var(--nec-accent-strong);

  /* Neutrals */
  --gray-1: var(--nec-paper);  /* Lightest background wash */
  --gray-2:       #eeeeee;
  --gray-3:       #dddddd;
  --gray-4: var(--nec-muted);  /* Muted text */
  --gray-5: var(--nec-muted);

  /* Paints (Subtle background accents) */
  --paint-1: var(--nec-accent-wash);  /* Pale sage wash */
  --paint-2:      #fbe9e7;  /* Pale terra cotta wash */
  --paint-3:      #fff8e1;  /* Pale mustard wash */
  --paint-4:      #e3f2fd;  /* Pale slate wash */
  --paint-5:      #f3e5f5;  /* Pale purple wash */

  /* --- TYPOGRAPHY --- */

  /* Font Stacks */
  --font-serif: var(--nec-font-editorial);
  --font-sans: var(--nec-font-ui);
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Scale (Major Third - 1.25) */
  --fs-1: 3.052rem;  /* Display */
  --fs-2: var(--nec-type-title);  /* H1 */
  --fs-3: var(--nec-type-heading);  /* H2 */
  --fs-4: var(--nec-type-subheading);  /* H3 */
  --fs-5: 1.25rem;   /* H4/Large Body */
  --fs-6: 1rem;      /* Base Body */
  --fs-7: var(--nec-type-control);    /* Small/Caption */

  /* --- SPACING & LAYOUT --- */

  --spacing-unit: 8px;

  /* Space Steps */
  --s-1: calc(var(--spacing-unit) * 0.5); /* 4px */
  --s-2: var(--spacing-unit);             /* 8px */
  --s-3: calc(var(--spacing-unit) * 1.5); /* 12px */
  --s-4: calc(var(--spacing-unit) * 2);   /* 16px */
  --s-5: calc(var(--spacing-unit) * 3);   /* 24px */
  --s-6: calc(var(--spacing-unit) * 4);   /* 32px */
  --s-8: calc(var(--spacing-unit) * 6);   /* 48px */

  /* Radii */
  --r-1: var(--nec-radius);
  --r-2: var(--nec-radius);
  --r-3: var(--nec-radius-dialog);
  --r-pill: 9999px;

  /* Shadows (Soft, diffused) */
  --shadow-1: var(--nec-shadow-surface);
  --shadow-2: var(--nec-shadow-surface);
  --shadow-3: var(--nec-shadow-overlay);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t-fast: 150ms;
  --t-med:  300ms;

  /* Generic control and focus primitives used by app-level systems. */
  --control-height-compact: var(--nec-control-compact);
  --control-height-default: var(--nec-control-default);
  --control-height-touch: var(--nec-control-touch);
  --focus-ring: 2px solid var(--ink);
  --focus-ring-offset: 2px;
}

@media print {
  :root { --ink: #1a1a1a; --ink-2: #333333; --paper: #ffffff; --line: #e0e0e0; --line-strong: #bfbfbf; --fs-1: 3.052rem; --fs-2: 2.441rem; --fs-3: 1.953rem; --fs-4: 1.563rem; --fs-7: .8rem; }
}
