/* ── ECM design tokens ─────────────────────────────────────────────
   The BASE layer of the site's visual language. docs/design-system.md is
   the rulebook and it describes what actually renders.

   Read that before changing anything here: the values below are the base
   layer, and static/css/light.css REMAPS them to the light theme the
   site actually ships -- paper and teal, not the dark stage these values
   came from. The remap is the theme; these are the names.

   (They were once the whole theme, and the site rendered dark for a
   while. Then light.css took over the colour and the fonts, and these
   values were left behind as the layer underneath. So: --ecm-bg here is
   #0B0F14, and the page behind you is #FAFAFD, because light.css says
   --ecm-bg: var(--paper). Anything reading a --ecm-* token gets the light
   value; anything reading it HERE without light.css loaded gets the base.

   Tailwind utilities still own layout; this file owns *identity*.
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Color — dark-first platform (Ecidity = dark stage) */
  --ecm-bg:        #0B0F14;          /* deepest */
  --ecm-stage:     #11161D;         /* card b/g */
  --ecm-raised:    #171D25;         /* uplift */
  --ecm-line:      #242C37;         /* border */
  --ecm-ink:       #E6E7EA;         /* primary text */
  --ecm-muted:     #8B91A3;         /* secondary */
  --ecm-dim:       #5C6272;        /* tertiary */
  --ecm-brand:  #2AE5E5;            /* teal accent */
  --ecm-brand-deep:#1AAFBF;
  --ecm-warn:  #F1C40F;
  --ecm-danger:#FF5A5F;
  --ecm-success:#2ECE88;

  /* Type — Geist + Geist Mono, loaded vs system fallback */
  --font-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "Geist Mono", ui-monospaced, "JetBrains Mono", monospace;

  /* Type scale — minor third 1.200, base 1rem = 16px */
  /* 12px, and it is a floor, not a scale step. It was 0.6875rem (11px), and
     this file loads AFTER custom.css -- which has always said 0.75rem -- so
     the smaller of the two won and every `.text-xs`, `.chip` and `.badge` on
     the site rendered 11px. docs/design-system.md says nothing under 12px,
     and the chips carry metadata that has to clear AA. */
  --text-xs:   0.75rem;     /* 12px */
  --text-sm:   0.8125rem;   /* 13px */
  --text-base: 1rem;        /* 16px */
  --text-md:   1.2rem;      /* 19.2px */
  --text-lg:   1.44rem;     /* 23px */
  --text-xl:   1.728rem;    /* 27.6px */
  --text-2xl:  2.074rem;    /* 33.2px */
  --text-3xl:  2.488rem;    /* 39.8px */

  /* Spacing — 8pt grid, ramped.

     In PX, not rem, for the same reason the radii are: custom.css raises
     the root font-size to 1.125rem at >=900px, so a rem ramp is off the
     grid at exactly the widths people design at. The type scale is a
     decision; the grid is not. (These were .25rem/.5rem/... which
     measured 9 / 13.5 / 18 / 22.5 / 27 / 36 / 45 / 54 / 72px on a
     desktop -- not one of them a multiple of 8.)

     NOTE: this ramp is not wired up yet. Nothing in templates/ or in the
     stylesheets reads var(--space-*); the spacing in the site is
     hardcoded. The ramp is correct now so that it is correct when it is
     adopted. */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius — absolute, so a desktop root font-size cannot move them.
     The four the rulebook names are 6 / 8 / 12 / pill; --radius-2 and
     --radius-4 are the base layer's smaller steps and --radius-16 is
     unused, so nothing in the site should be painting them. */
  --radius-2:  2px;
  --radius-4:  4px;
  --radius-6:  6px;
  --radius-8:  8px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-pill: 9999px;

  /* Motion — Apple-esque ease-out expo */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.7, 0, 0.3, 1);
  --ease-spring:   cubic-bezier(0.175, 0.88, 0.24, 1);

  --motion-1: 120ms;
  --motion-2: 200ms;
  --motion-3: 320ms;
  --motion-4: 480ms;

  /* Shadows — lifted, soft (aero) */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.55);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.06);

  /* Tap target floor (WCAG 2.5.5) */
  --tap-min: 44px;

  /* Z-stack convention */
  --z-default: 1;
  --z-sticky:  40;
  --z-modal:   100;
  --z-toast:   200;
}

/* Utility overrides of tailwind reset-ish */
body { min-height: 100dvh; }
::selection { background: var(--ecm-brand); color: #0B0F14; }

/* Focus ring — single source across elements */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--ecm-brand);
  outline-offset: 3px;
  border-radius: var(--radius-4);
}

/* Reduced-motion: honor user preference globally (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
HTML