/*
  Keystone Precision — design tokens.

  The brief forbids the AI/SaaS house style, so the constraints are written in
  here rather than left to discipline later:

    - One accent colour. Cyan is for state and emphasis, never decoration.
    - No gradient is defined. There is nothing to reach for.
    - Radii stop at 4px. Nothing becomes a bubble.
    - Separators are solid 1px rules, not shadows.
    - Three state colours only: healthy, concern, critical.

  Type is a system stack. A self-hosted face can replace it in one place, but
  a webfont is not worth the LCP until there is a brand reason for one.
*/

:root {
  /* ---- surface ---- */
  --ink: #0b0f14; /* near-black, body text */
  --navy: #112a3d; /* dark bands and the hero. The category standard: every UK
                      MRP competitor reviewed uses a navy band rather than a
                      near-black page. White on it is 14.8:1. */
  --graphite: #1c242e; /* dark panel */
  --slate-800: #2c3742;
  --slate-600: #4d5a68;
  --slate-400: #66727f; /* secondary text on LIGHT backgrounds only (4.57:1 on paper-alt) */
  --slate-300: #a8b4c0; /* secondary text on dark */
  --line: #d9dee4; /* rules on light */
  --line-dark: #2a343f; /* rules on dark */
  --paper: #ffffff;
  --paper-alt: #f5f7f9; /* banded section */

  /* ---- accent ---- */
  --cyan: #0c7488; /* 5.43:1 on white, and white on it, both ways AA */
  --cyan-bright: #23c3e0; /* on dark only */
  --cyan-wash: #e6f4f7;

  /* ---- state ---- */
  --healthy: #276645;
  --concern: #7d5812;
  --critical: #b3352c;
  --healthy-wash: #eaf3ee;
  --concern-wash: #f8f2e4;
  --critical-wash: #f7eceb;

  /* ---- type ---- */
  --font-body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
    'Liberation Mono', monospace;

  /* A fourth-root scale. Deliberately tight: this is a dense, factual site. */
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);

  --track-tight: -0.015em;
  --track-flat: -0.005em;
  --track-mono: 0.08em;

  /* ---- space ---- */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  /* ---- geometry ---- */
  --radius: 4px;
  --rule: 1px;
  --measure: 68ch;
  --wrap: 1180px;

  --ease: cubic-bezier(0.2, 0, 0.1, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: var(--track-tight);
  font-weight: 650;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
