/* Limen's design tokens, shared by limen-lang.org (home.css) and the book
   (book.css): the fonts, colours, type scale, spacing, radii and shadows, in
   light and dark. DESIGN.md says what each one is for. Nothing else in either
   stylesheet names a colour or a font. */

/* The fonts are served by this site (assets/fonts, SIL Open Font License,
   subset to Latin): no visitor's browser contacts a font service. */
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2?v=7b2f046ec5") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Regular.woff2?v=24005205f5") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Medium.woff2?v=e1d423096d") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* neutrals: surfaces, ink, hairlines */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --surface: #ffffff;
  --surface-sunken: #f5f5f4;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --ink: #0c0a09;
  --ink-2: #44403c;
  --ink-3: #78716c;
  /* brand: the logo's night blue. Capabilities: ochre, and only them
     (the same warm colour as the lamplight in the logo) */
  --brand: #1f3a70;
  --brand-ink: #24498f;
  --brand-soft: #e9eef8;
  /* the logo tile's edge: none on light, a faint one on dark, where the
     night-blue tile would otherwise sink into the page */
  --mark-edge: transparent;
  --cap: #8a5400;
  --cap-soft: #fdf1d8;
  /* code: always a dark surface, in both themes */
  --code-bg: #141210;
  --code-bar: #1c1a17;
  --code-line: #2a2724;
  --code-fg: #ece9e5;
  --code-muted: #8f8a84;
  --code-k: #93b4f5;
  --code-s: #a7d8a3;
  --code-t: #9ec5f0;
  --code-f: #d7c2f5;
  --code-n: #f2c780;
  --code-c: #7f7a74;
  --code-cap-fg: #f5c46a;
  --code-cap-bg: rgba(245, 196, 106, .12);
  --grid: rgba(12, 10, 9, .06);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 12px; --text-sm: 14px; --text-md: 16px; --text-lg: 18px;
  --text-xl: 21px; --text-2xl: 28px; --text-3xl: 40px; --text-4xl: clamp(40px, 7vw, 68px);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(12, 10, 9, .05);
  --shadow-md: 0 1px 2px rgba(12, 10, 9, .04), 0 8px 24px -8px rgba(12, 10, 9, .12);
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0b0a; --bg-subtle: #11100f; --surface: #151412; --surface-sunken: #1b1a18;
    --line: #2a2826; --line-strong: #3a3734; --ink: #f5f4f2; --ink-2: #cfcbc6; --ink-3: #8f8a84;
    --brand: #3a62b0; --brand-ink: #9dbbf5; --brand-soft: #16213a; --mark-edge: #34405c; --cap: #f0c06a; --cap-soft: #2a2110;
    --code-bg: #100f0e; --code-bar: #171614; --code-line: #2a2826; --grid: rgba(255, 255, 255, .05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0b0a; --bg-subtle: #11100f; --surface: #151412; --surface-sunken: #1b1a18;
  --line: #2a2826; --line-strong: #3a3734; --ink: #f5f4f2; --ink-2: #cfcbc6; --ink-3: #8f8a84;
  --brand: #3a62b0; --brand-ink: #9dbbf5; --brand-soft: #16213a; --mark-edge: #34405c; --cap: #f0c06a; --cap-soft: #2a2110;
  --code-bg: #100f0e; --code-bar: #171614; --code-line: #2a2826; --grid: rgba(255, 255, 255, .05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* terminal output colours, the same in both themes */
:root { --term-err: #ff8f80; --term-warn: #ffd27a; --term-ok: #8fdcab; --term-loc: #8ec5ff; }
