/* Design tokens, shared by the app shell and the public pages.
   Loaded before either stylesheet, and the only place a colour, radius
   or type size is defined. `public.css` used to carry its own copy under
   different names and the two drifted.

   One accent (indigo). Green/amber/red are reserved for eligibility and deadline
   urgency only, so semantic colour never competes with the accent. */

:root {
  color-scheme: light dark;

  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-text: #ffffff;

  --ok: #15803d;        --ok-bg: #dcfce7;
  --warn: #b45309;      --warn-bg: #fef3c7;
  --bad: #b91c1c;       --bad-bg: #fee2e2;
  --neutral: #475569;   --neutral-bg: #f1f5f9;

  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --border: #e3e6ea;
  --border-strong: #cdd2d9;
  --text: #14161a;
  --text-2: #5b6472;
  /* 4.5:1 against every surface above, checked rather than eyeballed. The
     previous #8b94a3 was 3.06:1 on white, which is the whole of the muted
     scale, so every timestamp, count and caption on both surfaces failed. */
  --text-3: #67707e;

  --radius: 8px;
  --radius-sm: 5px;
  --overlay-shadow: 0 8px 28px rgba(20, 22, 26, .14);
  /* No elevation token. Surfaces are separated by hairlines, not shadow.
     The two floating layers, the dialog and the menu, carry their own. */

  /* Type scale, 1.2 ratio off 13px */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 15px;
  --fs-lg: 19px;
  --fs-xl: 24px;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #818cf8;
    --accent-soft: #201f45;
    --accent-text: #0b0b12;

    --ok: #4ade80;        --ok-bg: #0f2a1b;
    --warn: #fbbf24;      --warn-bg: #2e2410;
    --bad: #f87171;       --bad-bg: #2d1414;
    --neutral: #94a3b8;   --neutral-bg: #1c2029;

    --bg: #0d0f13;
    --surface: #14171d;
    --surface-2: #191d24;
    --border: #252a33;
    --border-strong: #333b47;
    --text: #e8eaee;
    --text-2: #9aa4b2;
    --text-3: #808a9b;      /* 4.85:1 on the darkest surface */
    --overlay-shadow: 0 8px 28px rgba(0, 0, 0, .55);
  }
}

/* Some people get motion sick, and the operating system already knows. This is
   the only place both stylesheets share, so it is the only place this can be
   said once. Not zero: a duration of exactly 0 skips the transitionend event
   some code waits on, and 0.01ms is instant to a person either way. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
