/* Design tokens and self-hosted fonts (OFL licences in app/assets/fonts). Loaded on every layout. */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/hanken-grotesk-latin-wght-normal-7b3229a0.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: "Hanken Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/hanken-grotesk-latin-ext-wght-normal-b6254e3b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/ibm-plex-mono-latin-400-normal-d803141a.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/assets/ibm-plex-mono-latin-500-normal-3f7bbac1.woff2") format("woff2");
}

:root {
  /* Colour */
  --ink: #0E1726;
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --line: #D9DFE7;
  --line-strong: #B9C2CF;
  --muted: #4B5667;
  --accent: #1F4BD8;
  --accent-strong: #1738A8;
  --accent-tint: #E8EEFC;
  /* Violet: the second brand colour (logo star, the Complete package). 7:1 on white as text. */
  --violet: #6D28D9;
  --violet-strong: #5B21B6;
  --violet-tint: #F1EBFD;
  --violet-light: #B79CF5;
  --night: #0B1220;
  --night-line: #26324A;
  --night-text: #C9D1DC;
  --night-muted: #AAB4C3;
  --night-accent: #8FA8F5;

  /* Severity: solid chip fill, the text colour on that fill, a rule colour (3:1 or better on white)
     and a pale tint. Critical/High/Low chips use white text (7.8 / 5.2 / 5.0:1); Medium uses ink (10:1). */
  --critical: #A3161D;
  --critical-on: #FFFFFF;
  --critical-rule: #A3161D;
  --critical-text: #A3161D;
  --critical-tint: #FBEAE8;
  --high: #C2410C;
  --high-on: #FFFFFF;
  --high-rule: #C2410C;
  --high-text: #9A3412;
  --high-tint: #FDEDE3;
  --medium: #F5B700;
  --medium-on: #0E1726;
  --medium-rule: #B07D00;
  --medium-text: #7A5700;
  --medium-tint: #FDF4D6;
  --low: #15803D;
  --low-on: #FFFFFF;
  --low-rule: #15803D;
  --low-text: #166534;
  --low-tint: #E4F3E9;

  /* Status and score bands, used for score rings, bars and the progress donut.
     Every value is 3:1 or better on white and paper as a graphic. */
  --good: #1E7B4C;
  --good-tint: #E3F2EA;
  --fair: #B46A00;
  --fair-text: #8A5100;
  --fair-tint: #FCF0DC;
  --poor: #C0262D;
  --poor-tint: #FBE9EA;
  --teal: #0B7285;
  --teal-strong: #095C6B;
  --teal-tint: #E2F3F5;

  /* Type */
  --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-md: 1.1875rem;
  --text-lg: 1.375rem;
  --text-xl: clamp(1.625rem, 1.35rem + 1.1vw, 2.125rem);
  --text-display: clamp(2.25rem, 1.55rem + 2.9vw, 3.75rem);
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading: 1.6;
  --measure: 66ch;

  /* Space: 8px grid */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4rem;
  --s7: 6rem;

  /* Shape */
  --radius-control: 4px;
  --radius-panel: 8px;
  --page-max: 75rem;
  --gutter: 1rem;
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

@media (min-width: 48rem) {
  :root {
    --text-base: 1.125rem;
    --gutter: 2rem;
  }
}
