/* Lampblack — theme tokens
   Two themes: Plain (dark, default) and Paper (light).
   Paper is kept dim on purpose — it is not a white theme.
   Body and accent text verified at WCAG AAA (>=7:1) against --ink and --ink-2.
   --ink-3 / --ink-4 are chrome surfaces (chips, hover, inputs): no body text on them.
   Variable names are identical in every theme, so themes are interchangeable.
   Type stack is global (one editor face across all themes) — declared once in :root. */

:root {
  /* type — global, not themed */
  --font-editor: "Literata", "Iowan Old Style", Georgia, serif;
  --font-ui: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* reading metrics — global */
  --measure: 68ch;
  --editor-size: 19px;
  --editor-size-tablet: 21px;
  --editor-leading: 1.72;
  --ui-size: 14px;
  --touch: 44px;
}

/* ------------------------------------------------------- PLAIN (default) */
/* Quiet cool neutral, no costume. Applied when no theme is set. */
:root,
[data-theme="plain"] {
  --ink: #15171a;
  --ink-2: #1c1f23;
  --ink-3: #24282d;
  --ink-4: #2d3238;

  --parchment: #dfe3e8;
  --parchment-bright: #f2f5f8;
  --parchment-dim: #a7b0ba;

  --candle: #c9b98f;
  --candle-bright: #e4d7b4;
  --violet: #a9b6c8;
  --violet-dim: #4d5661;
  --ember: #d99b8c;

  --line: #2b3036;
  --line-strong: #3b424a;
  --radius: 12px;

  --texture: none;
  --surface-glow: none;
  --selection: #2d3238;
  --focus-ring: #a9b6c8;
}

/* ---------------------------------------------------- PAPER (light, dim) */
/* The exception. Warm unbleached ground, never #fff, no white-page glare.
   In a light theme the darkest text-bearing surface is --ink, so ratios are
   quoted against it; --candle-bright is DARKER than --candle, not lighter,
   because emphasis means more contrast, not more light. */
[data-theme="paper"] {
  --ink: #e7e2d7;
  --ink-2: #f2eee6;
  --ink-3: #dcd5c6;
  --ink-4: #d0c8b7;

  --parchment: #2b2720;       /* 11.50:1 */
  --parchment-bright: #16130e;
  --parchment-dim: #4c4640;   /* 7.20:1 */

  --candle: #5f400e;          /* 7.15:1 */
  --candle-bright: #4a3208;
  --violet: #453d63;          /* 7.74:1 */
  --violet-dim: #a9a08c;      /* structure only, never text */
  --ember: #732f19;           /* 7.56:1 */

  --line: #cfc7b5;
  --line-strong: #b1a795;
  --radius: 12px;

  --texture: none;
  --surface-glow: none;
  --selection: #ddd4bf;
  --focus-ring: #5f400e;
}
