/* chris-macleod.ca - design tokens.
 *
 * GENERATED FILE. Edit shared/tokens.css, then run build-tokens.sh.
 * The scale itself comes from the Quiet Instrument token set, so this site
 * reads as part of one system rather than a one-off skin.
 *
 * Tokens are the single source of truth. Page CSS must not introduce raw
 * colours, sizes, or spacing outside this scale.
 */

/* BEGIN GENERATED TOKENS - do not edit; see shared/tokens.css */
/* From shared/tokens.css. Edit that file, then run build-tokens.sh. */

:root {
  color-scheme: light;
  color-scheme: light;

  /* Type. Serif for sustained reading, sans for interface and headings,
     mono for compact factual metadata. */
  --qi-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans", sans-serif;
  --qi-font-serif: "Iowan Old Style", "Palatino Linotype", "Noto Serif",
    Georgia, serif;
  --qi-font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;

  --qi-text-label: 0.75rem;
  --qi-text-sm: 0.875rem;
  --qi-text-md: 1rem;
  --qi-text-lg: 1.125rem;
  --qi-text-xl: 1.25rem;
  --qi-text-2xl: 1.5rem;
  --qi-text-3xl: 2rem;

  --qi-leading-heading: 1.25;
  --qi-leading-compact: 1.45;
  --qi-leading-body: 1.65;
  --qi-leading-prose: 1.72;

  --qi-weight-medium: 500;
  --qi-weight-semibold: 600;

  /* Space — four-pixel rhythm, contiguous so any page can reach any size. */
  --qi-space-1: 0.25rem;
  --qi-space-2: 0.5rem;
  --qi-space-3: 0.75rem;
  --qi-space-4: 1rem;
  --qi-space-5: 1.25rem;
  --qi-space-6: 1.5rem;
  --qi-space-8: 2rem;
  --qi-space-10: 2.5rem;
  --qi-space-12: 3rem;
  --qi-space-16: 4rem;

  /* Shape */
  --qi-radius-small: 2px;
  --qi-radius-control: 3px;
  --qi-radius-panel: 4px;
  --qi-hairline: 1px;
  --qi-rule: 2px;

  --qi-target-min: 2.75rem;

  /* Motion */
  --qi-duration: 180ms;
  --qi-easing: cubic-bezier(0.2, 0, 0, 1);

  /* Spacing and measure. Overridden per site; see the note at the top.

     There is deliberately no wide measure: the page chrome and the text column
     share one width, so the nav's right edge and the text's right edge line up
     on every page. A page that needs to break out should say so in its own
     layout rather than by widening the whole shell. */
  --qi-gutter: clamp(1.25rem, 5vw, 3rem);
  --qi-measure: 38rem;
  --qi-prose-space: 1.25rem;

  /* Colour — light */
  --qi-canvas: #eef0ef;
  --qi-surface: #f7f8f7;
  --qi-surface-raised: #ffffff;
  --qi-surface-sunken: #e4e7e4;
  --qi-text: #3a3d3c;
  --qi-text-muted: #5a605d;
  --qi-text-subtle: #666c69;
  --qi-border: #c4c9c6;
  --qi-border-strong: #6b716d;
  --qi-accent: #1d4f3f;
  --qi-accent-hover: #163c30;
  --qi-accent-contrast: #ffffff;
  --qi-accent-soft: #dce7e1;
  --qi-focus: #3c6e8c;
  --qi-selection: #d6e5de;

  /* Static-site only: page shapes the shared scale has no opinion about. */
  --qi-weight-regular: 400;
  --qi-space-24: 6rem;
  --qi-section: clamp(3rem, 7vw, 5rem);
  --qi-archive-gutter: 3.25rem;
  --qi-avatar: 2.75rem;
  --qi-code-canvas: #eaedea;
  --qi-code-text: #1d4f3f;
}

/* Dark theme follows the operating system by default. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    color-scheme: dark;

    --qi-canvas: #191c1b;
    --qi-surface: #1f2322;
    --qi-surface-raised: #262a28;
    --qi-surface-sunken: #141716;
    --qi-text: #e6eae8;
    --qi-text-muted: #b0b7b4;
    --qi-text-subtle: #8f9794;
    --qi-border: #3a403e;
    --qi-border-strong: #6e7673;
    --qi-accent: #7fbfa3;
    --qi-accent-hover: #9bd0b6;
    --qi-accent-contrast: #0f1a15;
    --qi-accent-soft: #1f2f28;
    --qi-focus: #7fb2d9;
    --qi-selection: #24332d;

  --qi-code-canvas: #161917;
  --qi-code-text: #7fbfa3;
  }
}
/* END GENERATED TOKENS */
