/*
 * Design tokens (docs/usability.md §1.5; PLAN §4). The one place a colour, a
 * size or a font is named: public/style.css and every page use these and
 * nothing else — test/visual.test.js fails on a raw colour anywhere else, and
 * checks every text/background pair below against WCAG AA.
 *
 * The starting values were sampled from Covercy ONE on 2026-09-21. Two of
 * them do not meet AA as text and are kept for what they can carry:
 *   #768894 (muted labels) is 3.67:1 on white — it is the input border
 *           (3:1 is what a control's edge needs); muted TEXT is #5c7080.
 *   #00be82 (success) is 2.42:1 on white — decoration only (the stripe on
 *           a success notice); success TEXT is #006b49 on its tint.
 */

/* Inter, served by the app (investor pages load nothing from elsewhere).
   Variable weight, two subsets; SIL Open Font License — fonts/Inter-LICENSE.txt. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/public/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/public/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ---- The accent: the one colour for actions. An organisation swaps these
     five and nothing else (below); no page and no other rule names a hue. ---- */
  --accent: #3d41eb;          /* buttons, links, the active nav text, the focus ring */
  --accent-strong: #2f33c9;   /* hover and pressed; text on the chip tint */
  --accent-tint: #ebebfd;     /* the active nav background, a selected option */
  --accent-chip: #dfe1f4;     /* chips and badges */
  --on-accent: #ffffff;       /* text on the accent */

  /* ---- Surfaces and lines ---- */
  --page: #f2f4f5;
  --surface: #ffffff;
  --surface-sunken: #f7f9fa;  /* read-only blanks, the link box */
  --border: #ccd3d7;          /* a card's edge */
  --border-strong: #768894;   /* an input's edge: 3.67:1 on white */
  --divider: #e3e8eb;

  /* ---- Text ---- */
  --heading: #0a3048;
  --text: #4d6678;
  --muted: #5c7080;           /* labels, small caps, placeholders: 5.14:1 on white, 4.66:1 on the page */

  /* ---- State: one colour each, for state and never for decoration ---- */
  --success: #00be82;
  --success-text: #006b49;
  --success-tint: #e3f8f0;
  --warning: #f2a100;
  --warning-text: #855000;
  --warning-tint: #fff1d1;
  --error: #e5484d;           /* 3.91:1 on white: an invalid input's edge */
  --error-text: #b3261e;
  --error-tint: #fdeceb;
  --neutral-tint: #e3e8eb;

  /* ---- Who fills what (the document view, usability.md §2.3): one colour per
     owner, always beside its words; a signer's blocks take the same colour.
     Each text sits on its tint at AA and each edge on white at 3:1. ---- */
  --owner-gp: #6b3fa0;        --owner-gp-text: #4b2a78;       --owner-gp-tint: #efe7f8;
  --owner-advisor: #0b7285;   --owner-advisor-text: #095c6b;  --owner-advisor-tint: #e0f4f7;
  --owner-investor: #b45309;  --owner-investor-text: #8a3f05; --owner-investor-tint: #fdf0e0;
  --owner-either: #2563c9;    --owner-either-text: #1d4fa3;   --owner-either-tint: #e6eefb;

  /* ---- Type ---- */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-body: 1rem;          /* 16px: nothing a person reads in a sentence is smaller */
  --text-label: 0.875rem;     /* 14px */
  --text-small: 0.8125rem;    /* 13px */
  --text-caps: 0.75rem;       /* 12px small caps, tracked out */
  --text-h1: 1.5rem;
  --text-h2: 1.1875rem;
  --text-h3: 1rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --leading: 1.5;
  --leading-prose: 1.7;

  /* ---- Space (a 4px grid), shape, measure ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-pill: 999px;
  --tap: 2.75rem;             /* 44px: the smallest thing a finger is asked to hit */
  --measure-form: 42.5rem;    /* 680px: a form is one column, no wider */
  --measure-page: 70rem;
  --sidebar: 14.5rem;
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

/*
 * Per-organisation accent (v2, with the organisation silos — usability.md
 * §1.5): the page sets data-accent on <html> and a block like this one
 * overrides the five accent tokens. "forest" is here to prove the swap works
 * and keeps AA (test/visual.test.js checks every block); it is no sponsor's
 * brand.
 */
:root[data-accent="forest"] {
  --accent: #17694a;
  --accent-strong: #12543b;
  --accent-tint: #e4f3ec;
  --accent-chip: #d3e9de;
  --on-accent: #ffffff;
}
