/* FIELD design tokens for the public site and the signed-in data site.
   Source: FIELD web2 design system (field-ds, Slate theme + Orchid accent),
   copied by hand. This file never imports from FIELD and FIELD never reads it.
   FIELD's app is light-only; the dark values below are derived for this site.

   Contrast: every text/background pair is checked by shared/scripts/check-contrast.mjs
   (WCAG 2.2 AA: 4.5:1 body text, 3:1 large text and UI parts). `npm run check` runs it.

   Adjustments from the FIELD originals, made for contrast:
   - ink-2 #56606e becomes #4a5462 and ink-3 #626c79 becomes #5b6572 so they clear 4.5:1
     on every surface (FIELD's ink-3 is 4.4:1 on its page bg).
   - line-strong (input borders) is #6f7a88 so it clears 3:1.
   - Orchid #8c2394 is kept for fills and for link text on light (7+:1 on white).
   - Triad/semantic colors are never used as text here; where one must carry text,
     use the -ink variant (darker on light, lighter on dark).
     The accent fill is only checked as a bare mark on bg and surface; buttons are checked by their text pair.
   - The amber "gap" and neutral colors are for marks only (3:1 non-text), never text. */

:root {
  color-scheme: light dark;

  /* Type families (roles from FIELD: serif = display and section headings only,
     sans = all UI and body, mono = every number, id, hash and code). */
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale. FIELD's app is dense (body 14px). A public reading site needs more,
     so the sizes below keep FIELD's ratios but start from 17px body. */
  --text-display: 2.25rem;   /* FIELD display 30px, scaled */
  --text-title: 1.5rem;      /* FIELD title 19px, scaled */
  --text-lead: 1.25rem;
  --text-body: 1.0625rem;    /* 17px */
  --text-small: 0.9375rem;   /* 15px */
  --text-tiny: 0.8125rem;    /* 13px, labels only */
  --leading-body: 1.6;
  --leading-tight: 1.2;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --tracking-label: 0.5px;
  --tracking-eyebrow: 1.3px;
  --measure: 68ch;

  /* Space (FIELD scale 4/6/8/10/14/18/26/36 px) and layout. */
  --space-1: 0.25rem;
  --space-2: 0.375rem;
  --space-3: 0.5rem;
  --space-4: 0.625rem;
  --space-5: 0.875rem;
  --space-6: 1.125rem;
  --space-7: 1.625rem;
  --space-8: 2.25rem;
  --gutter: 1rem;            /* 16px side gutter at phone width, a hard rule */
  --radius-card: 13px;
  --radius-control: 9px;
  --radius-sm: 8px;
  --radius-pill: 20px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-fast: 0.12s;
  --dur: 0.34s;

  /* Light palette (FIELD Slate + Orchid). */
  --bg: #eef1f4;
  --bg-2: #e4e8ee;
  --surface: #ffffff;
  --card: #ffffff;
  --card-2: #f6f8fa;
  --ink: #131922;
  --ink-2: #4a5462;
  --ink-3: #5b6572;
  --line: #d0d7df;
  --line-strong: #6f7a88;      /* 3:1 against bg and surface, for input borders */
  --accent: #8c2394;           /* fills: buttons, marks */
  --accent-ink: #ffffff;       /* text on an accent fill */
  --link: #8c2394;             /* link text on bg/surface */
  --link-hover: #6d1a74;
  --focus: #3a63c0;            /* focus ring, 3:1 on bg and surface */
  --good: #16895b;
  --good-ink: #0f6b46;
  --bad: #cb2f3f;
  --bad-ink: #a82331;
  --warn: #e8a31a;
  --warn-ink: #7a5200;
  --notice-bg: #fff6df;        /* loud banners (e.g. unconfirmed contact) */
  --notice-ink: #5c3d00;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --bg-2: #151b24;
    --surface: #171e27;
    --card: #1b2430;
    --card-2: #202a37;
    --ink: #e8edf3;
    --ink-2: #b4bdc9;
    --ink-3: #9ba6b4;
    --line: #2c3745;
    --line-strong: #6f7b8b;
    --accent: #a83bb0;          /* FIELD's bright orchid */
    --accent-ink: #ffffff;
    --link: #de9ee3;
    --link-hover: #efc4f2;
    --focus: #8fb0ff;
    --good: #5cb088;
    --good-ink: #7fcba4;
    --bad: #e08b91;
    --bad-ink: #f0a9ae;
    --warn: #e8a31a;
    --warn-ink: #f2c35c;
    --notice-bg: #3a2c0c;
    --notice-ink: #ffd98a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0s; --dur: 0s; }
}
