/*
  Design tokens
  Direction: a bright ivory reading room with pine-green ink. Serif headlines
  set like a research memo, a plain institutional sans for reading, and one
  deep pine band (compensation) as the single bold moment on the page.
*/

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin.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: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/public-sans-latin.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;
}
/* Metric-adjusted fallbacks so the swap does not reflow text */
@font-face {
  font-family: "Serif Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Liberation Serif");
  size-adjust: 96%;
  ascent-override: 98%;
  descent-override: 30%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 102%;
  ascent-override: 93%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  /* Color roles */
  --canvas: #FBFAF6;        /* bright ivory page */
  --surface: #FFFFFF;       /* cards, form, ticket */
  --surface-2: #F4F3EC;     /* quiet panels, table heads */
  --ink: #15211C;           /* headlines and body, green-black */
  --ink-2: #3F4B45;         /* secondary text, 8.7:1 on canvas */
  --ink-3: #5E6963;         /* captions and labels, 5.5:1 on canvas */
  --line: #E2E0D6;          /* hairlines */
  --line-strong: #C9C6B8;   /* input borders, emphasized rules */
  --pine: #1D4A38;          /* action and the one bold band */
  --pine-deep: #153829;     /* hover and pressed */
  --pine-tint: #E6EEE9;     /* redaction pills, selected states */
  --pine-line: #B9CEC2;
  --on-pine: #F6F4EC;       /* text on pine */
  --on-pine-2: #C9D7CF;     /* secondary text on pine, 6.8:1 */
  --error: #A3312A;
  --focus: #1D4A38;

  /* Type */
  --font-display: "Source Serif 4", "Serif Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Sans Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Type scale, 1.25 ratio on a 17px base */
  --step--1: 0.875rem;   /* 14px captions */
  --step-0: 1.0625rem;   /* 17px body */
  --step-1: 1.25rem;     /* 20px */
  --step-2: 1.5625rem;   /* 25px h3 */
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);   /* h2 */
  --step-4: clamp(2.375rem, 1.6rem + 3.2vw, 4rem);    /* h1 */
  --step-num: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); /* compensation figures */

  /* Space, 4/8 based */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section: clamp(72px, 9vw, 128px);

  /* Shape */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --hairline: 1px solid var(--line);
  --shadow-lift: 0 1px 0 rgba(21, 33, 28, 0.04), 0 18px 40px -24px rgba(21, 33, 28, 0.28);

  /* Layout */
  --wrap: 1200px;
  --measure: 64ch;
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;

  color-scheme: light;
}
