/*
 * Design tokens. The canonical values and the reasoning live in
 * blueprint/design/tokens.md — this file is a projection of that document, and the
 * console's app/assets/stylesheets/tokens.css is the other one. A value that
 * differs between the two is a bug in one of them.
 *
 * The short version: near-black on near-white, one yellow accent. #F2C200 is
 * 1.7:1 on white, so on light surfaces it is graphic only — a bar, a rule, the
 * switch in the mark, never text. On the near-black terminal surface it is 10.6:1,
 * and there it carries text. That is where the black/yellow lives.
 */

/* IBM Plex Sans and IBM Plex Mono, self-hosted (OFL). Latin subsets, two weights.
   font-display: swap — the page is readable before the fonts land, and every
   stack below ends in a system fallback, so no webfont is load-bearing. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* The home page's title faces, and nowhere else (blueprint/design/tokens.md). */
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/fonts/cinzel-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Neutrals — light. Contrast against --paper in the comment. */
  --paper: #fafaf8;
  --card: #ffffff;
  --inset: #f2f1ee;
  --ink: #121212;        /* 17.9:1 */
  --ink-soft: #565451;   /*  7.2:1 */
  --ink-faint: #6e6b66;  /*  5.1:1 on --paper, 4.7:1 on --inset — the floor */
  --line: #e4e2dd;
  --line-strong: #c9c6bf;

  /* The accent. Graphic use only on light surfaces. */
  --brand-yellow: #f2c200;
  --brand-yellow-dim: #c9a200;
  --yellow-deep: #7a5f00; /* 5.8:1 — the only yellow that may carry text on light */

  /* The terminal surface, where yellow is text-safe. */
  --term-bg: #121212;
  --term-ink: #e8e6e1;    /* 15.0:1 */
  --term-muted: #9a968e;  /*  6.4:1 */
  --term-yellow: #f2c200; /* 11.1:1 */
  --term-line: #2c2a28;

  /* Status. Never the only signal — always beside a word. */
  --ok: #146b34;
  --warn: #8a5a00;
  --bad: #a81e14;

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  /* Display faces — the home page title (Bodoni) and its subheading (Cinzel) only. */
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-inscription: "Cinzel", "Trajan Pro", Georgia, serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 2rem;
  /* Set by arithmetic, not taste: a help page is 78 columns (core.HelpWidth), and
     IBM Plex Mono advances 0.6em per character — 78 × 0.6 × 13px ≈ 608px, inside
     the content column with room to spare. Change one and check the other. */
  --text-code: 0.8125rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --measure: 42rem;  /* prose */
  --content: 50rem;  /* the content column */
  --sidebar: 15rem;
  --page: 76rem;     /* content + sidebar + gutters */
}
