/* tokens.css — generated for the "torc" instance from its
 * manifest. Not a file: src/pages/tokens.ts emits it. To change a color or
 * a family, change instances/<slug>/manifest.json and redeploy.
 *
 * The seven-value theme contract is design-system.md §The theme contract;
 * the derived roles below are its §Color table, computed by the browser in
 * OKLab so no instance carries a hand-maintained palette.
 */

/* the manifest speaks */
:root {
  --accent: #7d4060;
  --accent-ink: #ffffff;
  --bg: #f7f4ef;
  --font-display: "EB Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --font-text: "DM Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

/* everything else is derived */
:root {
  --ink: color-mix(in oklab, var(--accent) 12%, #262220);
  --muted: color-mix(in oklab, var(--ink) 68%, var(--bg));
  --faint: color-mix(in oklab, var(--ink) 40%, var(--bg));
  --line: color-mix(in oklab, var(--ink) 15%, var(--bg));
  --rule: color-mix(in oklab, var(--ink) 32%, var(--bg));
  --surface: color-mix(in oklab, #ffffff 60%, var(--bg));
  --field: color-mix(in oklab, #ffffff 82%, var(--bg));
  --accent-tint: color-mix(in oklab, var(--accent) 8%, var(--bg));
  --accent-hover: color-mix(in oklab, var(--accent) 85%, #1a1a1a);
  --ok: #38754a;
  --ok-tint: color-mix(in oklab, var(--ok) 10%, var(--bg));
  --error: #a63d3d;
  --error-tint: color-mix(in oklab, var(--error) 9%, var(--bg));
  --warn: #8f6a1e;
  --warn-tint: color-mix(in oklab, var(--warn) 10%, var(--bg));
}

/* self-hosted, per instance — no font CDN on an auth page */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
