/* ivy design tokens — light only, permanently. Copied verbatim into the product.
   Every value is a CSS custom property on :root. No prefers-color-scheme, no toggle.
   Hex values are the sRGB rendering of the oklch picks noted beside them. */
:root {
  color-scheme: light;

  /* ---- Color: ground & ink ------------------------------------------------ */
  --ground: #f6f3eb; /* Warm paper behind the lesson. */
  --surface: #ffffff;       /* a thing that exists: a planned lesson, an attempted exercise, the reading column, a card */
  --sunk: #ebe9e5;          /* a recessed track: the empty part of a readiness bar, a gauge trough. Non-text only */
  --ink: #29332d; /* Primary ink. */
  --ink-2: #615d56;         /* secondary text: labels, counts, metadata. 6.5:1 on white — the floor for any text */
  --ink-3: #a8a49e;         /* hairline glyphs and disabled controls only. 2.5:1 — never for text that carries meaning */
  --line: #e3e1dd;          /* hairlines between rows and panes */
  --line-strong: #c6c4be;   /* control borders, focus-less inputs */

  /* ---- Color: the one accent ---------------------------------------------- */
  --live: #ac452a; /* Rust accent for the current position, controls, and Field Notes identity. */
  --live-ink: #82351f; /* Accent text on a warm field. */
  --live-soft: #f2e4d8; /* Warm field behind an active row. */

  /* ---- Color: verdicts. Semantic only, where a thing genuinely passed or failed. Todo is neither. */
  --pass: #04773b;          /* oklch(50% .13 152). 5.7:1 */
  --pass-soft: #def6e3;
  --fail: #b02b27;          /* oklch(50% .17 27). 6.5:1 */
  --fail-soft: #ffe9e5;
  --note: #a56300;          /* "worth revisiting": a section you skipped or half-got. Not a verdict. 4.8:1 — use at 14px+ weight 500 */
  --note-soft: #fdecd1;

  --font-editorial: Georgia, "Times New Roman", serif;

  /* ---- Type: system families ------------------------------------------------- */
  /* Text: the system grotesque. It does not earn 100 KB of webfont; every OS ships a good one and a lesson is mostly prose read at arm's length. */
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  /* Mono: self-hosted IBM Plex Mono (Regular + Medium, ~110 KB woff2 total, see @font-face below). It earns its bytes:
     machine values are load-bearing here and ui-monospace resolves to Menlo, Consolas, or Courier depending on the OS —
     three different widths for "0.145 mm". Falls back to the system mono if the files are absent. */
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shared interface scale. Field Notes uses a larger editorial title and reading scale. */
  --text-xs: 12px;  --lh-xs: 16px;   /* labels, counts, metadata, capability marks, readout captions */
  --text-sm: 14px;  --lh-sm: 20px;   /* UI body: rows, controls, transcript, outline */
  --text-md: 17px;  --lh-md: 27px;   /* reading: lesson prose, a quiz question, a verdict sentence */
  --text-lg: 26px;  --lh-lg: 32px;   /* one per screen: the lesson title, the ratio on the wall */
  --text-read: 32px; --lh-read: 36px; /* a live readout number in mono, weight 400 — the one thing bigger than a title */
  --tracking-label: .06em;           /* only on 12px uppercase labels */
  --weight-regular: 400;
  --weight-medium: 500;              /* emphasis. There is no 600/700 in the product */
  --numeric: tabular-nums;           /* on every number that sits in a column or changes live */

  /* ---- Space: 8px rhythm, 4px half-step ------------------------------------ */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;  --s-6: 24px;  --s-8: 32px;  --s-12: 48px;
  --measure: 62ch;                   /* the reading column's max width */
  --hit: 32px;                       /* min height of any control on desktop; 44px on narrow */

  /* ---- Radius --------------------------------------------------------------- */
  --r-1: 2px;   /* bars and gauges — a measured strip, not a pill */
  --r-2: 4px;   /* controls, inputs, chips */
  --r-3: 8px;   /* cards, the visual frame */
  --r-4: 12px;  /* the one popover */

  /* ---- Elevation: barely. One shadow, one place (the settings popover). Everything else is a hairline. */
  --shadow-pop: 0 1px 2px rgb(29 26 22 / .06), 0 12px 32px rgb(29 26 22 / .10);

  /* ---- Motion: rare, under 200 ms, no springs ------------------------------- */
  --dur-1: 120ms;   /* hover, press, focus */
  --dur-2: 180ms;   /* a pane swapping (notes → visual), a popover opening, a verdict landing */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* IBM Plex Mono, OFL. Drop the two files into fonts/; until then local() or the system mono serves. */
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap;
  src: local("IBM Plex Mono"), local("IBMPlexMono"), url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap;
  src: local("IBM Plex Mono Medium"), local("IBMPlexMono-Medium"), url("fonts/IBMPlexMono-Medium.woff2") format("woff2"); }
