/* Design tokens. Every colour, size, radius, shadow and duration used by the
   site is defined here. Light mode only.

   Breakpoints (media queries cannot read variables):
     36rem  small phones      52rem  phone → tablet (tab bar below, rail above)
     68rem  rail → sidebar    80rem  wide two-column layouts */

:root {
  color-scheme: light;

  /* Brand */
  --navy-950: #16263d;
  --navy-900: #1f3450;
  --navy-800: #294260;
  --navy-700: #365273;
  --accent-800: #0a4c3b;
  --accent-700: #0c5c47;
  --accent-600: #0f6b53;
  --accent-300: #8fd9c0;
  --accent-100: #d6f0e6;
  --accent-50: #ecf8f3;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-300: #5eead4;
  --teal-100: #ccfbf1;
  --teal-50: #effcf9;

  /* Surfaces and text */
  --bg: #f6f8f6;
  /* A quiet green-grey for bands and panels, and the rule that goes with it. */
  --wash: #eef4f1;
  --wash-line: #d8e4de;
  --surface: #ffffff;
  --surface-2: #f8f9f8;
  --surface-3: #ebeeec;
  --text: #14233a;
  --text-2: #404c5e;
  --text-3: #586476;
  --border: #e1e7e3;
  --border-strong: #cbd5cf;
  --border-control: #7f8da3;
  --on-dark: #f8fafc;
  --on-dark-2: #c3cde0;
  --on-dark-3: #9fabc4;
  --line-dark: rgb(148 163 184 / 0.2);

  /* Semantic states */
  --good: #046c4e;
  --good-bg: #ecfdf5;
  --good-line: #a7f3d0;
  --warn: #8a4b08;
  --warn-bg: #fff8e8;
  --warn-line: #f6d58e;
  --bad: #b3261e;
  --bad-bg: #fef2f2;
  --bad-line: #fbc6c2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --info-line: #bfdbfe;

  /* Typography */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 0.984rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --fs-3xl: clamp(1.9rem, 1.45rem + 1.8vw, 2.75rem);

  /* Spacing (4px base) */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s7: 2rem;
  --s8: 3rem;
  --s9: 4rem;
  --gutter: clamp(1rem, 3vw, 2rem);

  /* Shape and elevation */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --e1: none;
  --e2: 0 6px 18px -12px rgb(20 35 58 / 0.3);
  --e3: 0 20px 48px -22px rgb(20 35 58 / 0.45);

  /* Component sizes */
  --control: 2.75rem;
  --control-sm: 2.25rem;
  --sidebar: 16rem;
  --rail: 4.75rem;
  --topbar: 4rem;
  --tabbar: 4.25rem;

  /* Motion */
  --t-fast: 120ms;
  --t: 200ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Topic colour families. A topic takes the family of its category. */
.tone-1 { --tone: #0f7259; --tone-soft: #e9f6f1; --tone-line: #cbe8dd; --tone-ink: #0b4f3f; }
.tone-2 { --tone: #0d9488; --tone-soft: #e8f8f5; --tone-line: #bfe9e1; --tone-ink: #0f665f; }
.tone-3 { --tone: #0284c7; --tone-soft: #e8f5fd; --tone-line: #c3e4f8; --tone-ink: #075985; }
.tone-4 { --tone: #c2710c; --tone-soft: #fdf3e3; --tone-line: #f4dcb2; --tone-ink: #874c06; }
.tone-5 { --tone: #db2f5b; --tone-soft: #fdeef2; --tone-line: #f7ccd7; --tone-ink: #9d1c40; }
.tone-6 { --tone: #52637c; --tone-soft: #eef2f7; --tone-line: #d6dee9; --tone-ink: #334155; }
