/* Lacuna design tokens. Low-dimensional by design: ~25 semantic tokens plus
   personalization attributes retheme everything without per-screen overrides.
   Components read ONLY these variables; no component hardcodes a color.

   Brand palette (--lacuna-*) is the single source in ./tokens/brand.css.
   Shared light-mode values map from that palette; product-only tokens and
   theme knobs stay here. Prefixes are preserved so existing themes do not break.

   Knobs are attributes on <html>, set by the ThemeProvider:
     data-appearance = light | dark          (system is resolved in JS)
     data-type-scale = s | m | l | xl | 2xl | 3xl (--tf multiplies the type ramp)
     data-density    = compact | normal | full (--sf multiplies spacing)
     data-font-set   = house | plain | legible
     data-layout     = canvas | left-rail | top-menu | start-menu (shell chrome only)
     data-colorway, data-surface, data-background, data-motion, data-contrast
*/

/* Self-hosted fonts (SIL Open Font License 1.1; notices in /fonts/OFL-*.txt). Family names are the ones the tokens use. */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-normal-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-normal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-normal-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-normal-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-italic-400-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-italic-400-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/newsreader-normal-300-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/newsreader-normal-300-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/public-sans-normal-400-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/public-sans-normal-400-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/spline-sans-mono-normal-400-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/spline-sans-mono-normal-400-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/**
 * Lacuna brand tokens — canonical --lacuna-* palette.
 * Source of truth for brand surfaces, deck chrome, and logo-adjacent color.
 * Product UI maps from these in ../tokens.css (unprefixed --ink / --paper / …).
 * Docs: brand/TOKENS.md · brand/guidelines/BRAND-GUIDELINES.md
 */

:root {
  /* Logo / brand color */
  --lacuna-coral: #f06449;
  --lacuna-amber: #f2a33c;
  --lacuna-teal: #2eb8a6;
  --lacuna-violet: #7c6fe8;
  --lacuna-ink: #1a1a1a;
  --lacuna-paper: #ede7da;
  --lacuna-paper-bright: #f2ebdd;
  --lacuna-rust: #b5502a;
  --lacuna-ground: #fdfbf6;
  --lacuna-ground-2: #f4efe6;
  --lacuna-ground-dark: #211d1a;

  /* Deck / document surfaces */
  --lacuna-paper-2: #f4efe6;
  --lacuna-soft: #3d4a45;
  --lacuna-muted: #6b7a72;
  --lacuna-hair: #d4cbb8;
  --lacuna-white: #ffffff;
  --lacuna-deep: #211d1a;
  --lacuna-on-deep: #ede7da;
  --lacuna-on-deep-soft: #c9c2b2;
  --lacuna-on-deep-muted: #9a9284;

  /* Type families */
  --lacuna-font-display: "Newsreader", Georgia, serif;
  --lacuna-font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --lacuna-font-mono: "Spline Sans Mono", "SF Mono", Menlo, monospace;

  /* Type scale (16:9 deck @ 1280) */
  --lacuna-text-brand: 72px;
  --lacuna-text-cover: 40px;
  --lacuna-text-h2: 28px;
  --lacuna-text-lede: 16px;
  --lacuna-text-body: 14px;
  --lacuna-text-eyebrow: 11px;
  --lacuna-text-meta: 10px;
  --lacuna-text-kpi: 32px;

  /* Space */
  --lacuna-space-1: 4px;
  --lacuna-space-2: 8px;
  --lacuna-space-3: 12px;
  --lacuna-space-4: 16px;
  --lacuna-space-5: 24px;
  --lacuna-space-6: 32px;
  --lacuna-space-7: 48px;
  --lacuna-space-8: 64px;
  --lacuna-page-gutter: 56px;
  --lacuna-radius: 2px;
  --lacuna-radius-panel: 4px;

  /* Motion */
  --lacuna-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lacuna-duration-fast: 150ms;
  --lacuna-duration: 280ms;
  --lacuna-duration-slow: 480ms;

  /* Edge (prefer hairline over shadow) */
  --lacuna-shadow: 0 8px 24px rgba(26, 26, 26, 0.06);
  --lacuna-hairline: 0 1px 0 var(--lacuna-hair);

  /* Atmosphere */
  --lacuna-bg: linear-gradient(165deg, var(--lacuna-ground) 0%, var(--lacuna-paper) 55%, var(--lacuna-paper-2) 100%);
}


:root {
  /* ---- knob factors (overridden by attributes below) */
  --tf: 1;   /* type factor */
  --sf: 1;   /* spacing factor */

  /* ---- appearance: shell paper/ink — derived from --lacuna-* where mirrored */
  --ink: var(--lacuna-ink);                 /* #1A1A1A */
  --paper: var(--lacuna-ground-2);          /* #F4EFE6 stage / app ground */
  --paper-deep: var(--lacuna-paper);        /* #EDE7DA shelf, inactive title, chips */
  --accent: var(--lacuna-rust);             /* #B5502A heritage rust */
  --accent-soft: rgba(181, 80, 42, 0.10);
  --danger: #A33325;
  --dark: var(--lacuna-ground-dark);        /* #211D1A chrome band */
  --mid: #6B6257;            /* soft ink / secondary (product; not lacuna-muted) */
  --soft: #C9BFAC;           /* hair, shelf dividers, inactive shadow (product) */
  --on-dark: var(--lacuna-on-deep);         /* #EDE7DA text on --dark */
  --on-accent: #FFFFFF;      /* text on --accent / --ink fills */
  /* Status bar, inactive borders, meta. Darkened from #8A8177 so mono meta text
     reaches 4.5:1 on every light ground, including --accent-soft. */
  --mute: #696157;
  /* Accent used as text (links, accent labels). The raw accent is 4.1:1 on
     --paper-deep; mixing in a little ink keeps the hue and clears 5:1. Works for
     every colorway because it is derived. */
  --accent-ink: color-mix(in srgb, var(--accent) 80%, var(--ink));

  /* Text alphas. Each one clears 4.5:1 on --paper, --paper-deep, --ui-card and
     --accent-soft (computed, 2026-11-26). Hierarchy below --ink-60 comes from
     size, face and case, not from fading text past legibility. */
  --ink-80: rgba(26, 26, 26, 0.84);
  --ink-60: rgba(26, 26, 26, 0.70);
  --ink-40: rgba(26, 26, 26, 0.62);
  /* Decorative ink for rules and disabled glyphs only; never body text. */
  --ink-20: rgba(26, 26, 26, 0.24);
  --hair: #D8D0C0;           /* desktop dot grid (product; near lacuna-hair) */
  --hair-strong: rgba(26, 26, 26, 0.32);
  --hair-inv: rgba(237, 231, 218, 0.22);
  --od-85: rgba(237, 231, 218, 0.86);
  --od-55: rgba(168, 159, 146, 0.85);

  /* app surfaces */
  --ui-bg: #FBF8F1;          /* window body paper */
  --ui-card: #FBF8F1;        /* raised window */
  --ui-bright: #FFFFFF;      /* document/artboard "white" */
  --ui-line: rgba(26, 26, 26, 0.10);
  --ui-line2: rgba(26, 26, 26, 0.18);
  /* hard offset only — never blur (SHELL-SPEC.md) */
  --shadow: 2px 2px 0 #C9BFAC;
  --shadow-active: 3px 3px 0 #1A1A1A;
  --dim-veil: rgba(244, 239, 230, 0.55);
  --zoom-rect-ms: 150ms;
  --zoom-rect-ease: cubic-bezier(0.2, 0.8, 0.3, 1);
  --win-fade-ms: 100ms;
  --surface-mix: var(--ui-card);

  /* legacy-ugly layout mode (win95 chrome) */
  --w95-face: #C6C3BB;
  --w95-hi: #FFFFFF;
  --w95-lo: #7A776F;
  --w95-title: #17335B;

  /* suite plate hues — exact SHELL-SPEC / mockup A fills */
  --geo-verm: #B5502A;       /* Flagship / Professional / Legal-ish rust */
  --geo-cobalt: #4A5A9E;     /* Foundation / Business */
  --geo-comm: #3E6B8C;       /* Communication */
  --geo-gold: #C9971E;       /* Productivity */
  --geo-green: #4A7A5A;      /* Personal */
  --geo-legal: #8C5A3E;      /* Legal */
  --geo-teal: #2E7A72;       /* Healthcare */
  --geo-plum: #7A4E7E;       /* Create */
  --geo-slate: #45535E;      /* Work: the large apps */
  --geo-gold-press: #A87D14; /* Productivity pressed */
  --geo-gold-tint: #F0DCA8;  /* Productivity title tint */

  /* ---- font sets: house (default) — from brand */
  --serif: var(--lacuna-font-display);
  --sans: var(--lacuna-font-body);
  --mono: var(--lacuna-font-mono);

  /* ---- type scale. The only font sizes the kit uses. Base px at --tf 1:
     10 / 11 / 12 / 13.5 / 15 / 18 / 22 / 26. Nothing is smaller than 10px:
     mono uppercase labels sit on --fs-3xs, which is the floor. */
  --fs-3xs: calc(10px * var(--tf));   /* mono labels, status, counts */
  --fs-2xs: calc(11px * var(--tf));   /* meta lines, captions */
  --fs-xs: calc(12px * var(--tf));    /* secondary text, dense lists */
  --fs-sm: calc(13.5px * var(--tf));  /* UI text: buttons, fields, rows */
  --fs-md: calc(15px * var(--tf));    /* reading text, item titles */
  --fs-lg: calc(18px * var(--tf));    /* panel and card titles (serif) */
  --fs-xl: calc(22px * var(--tf));    /* section titles */
  --fs-2xl: calc(26px * var(--tf));   /* page titles, key numbers */
  --track-label: 0.08em;              /* mono uppercase tracking, one value */

  /* ---- spacing. The only paddings, gaps and margins the kit uses: a 4px grid,
     scaled by the density factor (CAMERA-READY rule 7). The step number is the
     multiple of 4, so --sp-3 is 12px at normal density. Values of 1 or 2px are
     hairline adjustments, not rhythm, and stay literal. */
  --sp-1: calc(4px * var(--sf));
  --sp-2: calc(8px * var(--sf));
  --sp-3: calc(12px * var(--sf));
  --sp-4: calc(16px * var(--sf));
  --sp-5: calc(20px * var(--sf));
  --sp-6: calc(24px * var(--sf));
  --sp-7: calc(28px * var(--sf));
  --sp-8: calc(32px * var(--sf));
  --sp-10: calc(40px * var(--sf));
  --sp-12: calc(48px * var(--sf));

  /* ---- pointer targets. The smallest hit area of anything a person clicks or
     taps (CAMERA-READY rule 12): 28px, 40px on a phone. Density never shrinks it. */
  --target: 28px;

  /* ---- controls. One height for buttons, fields and selects. Density scales
     it, with a 28px floor so a compact control is still a pointer target. */
  --control-h: max(28px, calc(32px * var(--sf)));
  --control-pad-x: calc(12px * var(--sf));
  --control-radius: 0px;
  --control-bg: var(--ui-bright);
  --control-border: var(--ink-60);
  --control-border-hover: var(--ink);
  --focus-ring: 2px solid var(--accent);
  --focus-offset: 2px;
  /* A text field is never wider than this, a form never wider than that
     (CAMERA-READY rule 4). Opt out with data-wide-ok on the element or a parent. */
  --field-max: 480px;
  --form-max: 640px;

  /* ---- panels in the app frame. Read by ResizablePanel through computed
     style, so they scale with type size. Shares cap a panel against its row. */
  --panel-rail-min: calc(184px * var(--tf));
  --panel-rail-default: calc(224px * var(--tf));
  --panel-rail-max: calc(360px * var(--tf));
  --panel-rail-share: 0.26;
  --panel-context-min: calc(248px * var(--tf));
  --panel-context-default: calc(280px * var(--tf));
  --panel-context-max: calc(440px * var(--tf));
  --panel-context-share: 0.32;
}

/* ---- surface layout (surface.css). Every app surface reads these: toolbar and
   tool heights, the status line, side panes, gutters and the column widths of each
   kind of surface. Heights and gaps are on the spacing scale; a toolbar tool is
   never smaller than a pointer target, so on a phone (--target 40px) it grows. */
:root {
  --sf-tool-h: max(var(--target), var(--sp-8));
  --sf-toolbar-h: calc(var(--sf-tool-h) + var(--sp-2));
  --sf-status-h: var(--sp-7);
  --sf-pane-w: calc(272px * var(--sf));
  --sf-rail-w: calc(176px * var(--sf));
  --sf-list-w: calc(360px * var(--sf));
  --sf-gutter: var(--sp-6);
  --sf-gap: var(--sp-4);
  --sf-read-w: 720px;
  --sf-record-w: 800px;
  --sf-form-w: var(--form-max);
  --sf-field-w: var(--field-max);
  --sf-desk: var(--paper-deep);
}

/* ---------------------------------------------------------- appearance */
:root[data-appearance='dark'] {
  --ink: #E7E3D7;
  --paper: #10171A;
  --paper-deep: #1A2327;
  --accent: #D8663D;
  --accent-soft: rgba(216, 102, 61, 0.16);
  --danger: #E06450;
  --dark: #060F10;
  --mid: #8AA6A9;
  --soft: #33443F;
  --on-dark: #EAEEE6;
  /* Every dark-theme accent (and --ink) is a light fill, so text on it is dark.
     White on #D8663D was 3.3:1; this is above 5:1 for all five colorways. */
  --on-accent: #10171A;
  --accent-ink: color-mix(in srgb, var(--accent) 75%, var(--ink));

  --ink-80: rgba(231, 227, 215, 0.86);
  --ink-60: rgba(231, 227, 215, 0.68);
  --ink-40: rgba(231, 227, 215, 0.58);
  --ink-20: rgba(231, 227, 215, 0.22);
  --hair: rgba(231, 227, 215, 0.16);
  --hair-strong: rgba(231, 227, 215, 0.34);

  --ui-bg: #151D21;
  --ui-card: #1C2529;
  --ui-bright: #212B30;
  --ui-line: rgba(231, 227, 215, 0.10);
  --ui-line2: rgba(231, 227, 215, 0.20);
  --shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow-active: 2px 2px 0 rgba(0, 0, 0, 0.55);

  --geo-cobalt: #6B7AB8;
  --geo-verm: #D4785A;
  --geo-comm: #6A8BA8;
  --geo-gold: #E0B44A;
  --geo-green: #6A9A7A;
  --geo-legal: #A87A5E;
  --geo-teal: #4A9A92;
  --geo-plum: #A77AAB;
  --geo-slate: #8A9BA8;
  --geo-gold-press: #C9A030;
  --geo-gold-tint: #3A3428;
  --mute: #A89F92;
  --dim-veil: rgba(16, 23, 26, 0.55);
}

/* Colorways keep Lacuna's semantic contrast while changing the focal accent. */
:root[data-colorway='cobalt'] { --accent: #365B9B; --accent-soft: rgba(54, 91, 155, 0.12); }
:root[data-colorway='teal'] { --accent: #167A73; --accent-soft: rgba(22, 122, 115, 0.12); }
:root[data-colorway='gold'] { --accent: #966300; --accent-soft: rgba(150, 99, 0, 0.14); } /* #A36C00 gave white text 4.47:1 */
:root[data-colorway='violet'] { --accent: #6550A4; --accent-soft: rgba(101, 80, 164, 0.12); }
:root[data-appearance='dark'][data-colorway='cobalt'] { --accent: #78A3E8; --accent-soft: rgba(120, 163, 232, 0.18); }
:root[data-appearance='dark'][data-colorway='teal'] { --accent: #58C2B8; --accent-soft: rgba(88, 194, 184, 0.18); }
:root[data-appearance='dark'][data-colorway='gold'] { --accent: #E0B44A; --accent-soft: rgba(224, 180, 74, 0.18); }
:root[data-appearance='dark'][data-colorway='violet'] { --accent: #B4A2F2; --accent-soft: rgba(180, 162, 242, 0.18); }

/* Surface treatment changes elevation, not component meaning. */
:root[data-surface='clean'] {
  --paper: #FFFFFF;
  --paper-deep: #F3F4F5;
  --ui-bg: #FFFFFF;
  --ui-card: #FFFFFF;
  --ui-bright: #FFFFFF;
}
:root[data-surface='soft'] {
  --ui-bg: var(--paper-deep);
  --ui-card: var(--paper);
  --ui-bright: #FFFFFF;
  --shadow: 1px 1px 0 var(--soft);
}
:root[data-appearance='dark'][data-surface='clean'] {
  --paper: #0B1113;
  --paper-deep: #131D21;
  --ui-bg: #10181C;
  --ui-card: #182328;
  --ui-bright: #202C31;
}
:root[data-appearance='dark'][data-surface='soft'] {
  --ui-bg: var(--paper-deep);
  --ui-card: var(--paper);
  --ui-bright: #212B30;
  --shadow: 1px 1px 0 var(--soft);
}
:root[data-background='plain'] { --hair: transparent; }

/* Explicit high contrast is available in addition to OS contrast settings. */
:root[data-contrast='high'] {
  --ink-80: var(--ink);
  --ink-60: var(--ink);
  --ink-40: var(--ink);
  --ui-line: var(--hair-strong);
  --ui-line2: var(--ink);
  --mute: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  :root[data-motion='full'] { --zoom-rect-ms: 0ms; --win-fade-ms: 0ms; }
}
:root[data-motion='reduced'] {
  --zoom-rect-ms: 0ms;
  --win-fade-ms: 0ms;
}

/* On a phone every control is a 40px thumb target (CAMERA-READY rule 12). */
@media (max-width: 720px) {
  :root { --control-h: max(40px, calc(40px * var(--sf))); --target: 40px; }
}

/* ---------------------------------------------------------- type scale */
:root[data-type-scale='s']  { --tf: 0.9; }
:root[data-type-scale='m']  { --tf: 1; }
:root[data-type-scale='l']  { --tf: 1.12; }
:root[data-type-scale='xl']  { --tf: 1.28; }
:root[data-type-scale='2xl'] { --tf: 1.52; }
:root[data-type-scale='3xl'] { --tf: 1.82; }

/* ---------------------------------------------------------- density */
:root[data-density='compact'] { --sf: 0.72; }
:root[data-density='normal']  { --sf: 1; }
:root[data-density='full']    { --sf: 1.3; }

/* ---------------------------------------------------------- font sets
   Use stable system families in every stack. Optional branded fonts can
   enhance a platform, but the first fallback remains visibly distinct. */
:root[data-font-set='plain'] {
  --serif: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
:root[data-font-set='legible'] {
  --serif: Verdana, Geneva, Tahoma, sans-serif;
  --sans: Verdana, Geneva, Tahoma, sans-serif;
  --mono: 'Courier New', Courier, monospace;
  letter-spacing: 0.01em;
}

/* generated: dark tokens for visitors whose system prefers dark */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E7E3D7;
    --paper: #10171A;
    --paper-deep: #1A2327;
    --accent: #D8663D;
    --accent-soft: rgba(216, 102, 61, 0.16);
    --danger: #E06450;
    --dark: #060F10;
    --mid: #8AA6A9;
    --soft: #33443F;
    --on-dark: #EAEEE6;
    /* Every dark-theme accent (and --ink) is a light fill, so text on it is dark.
       White on #D8663D was 3.3:1; this is above 5:1 for all five colorways. */
    --on-accent: #10171A;
    --accent-ink: color-mix(in srgb, var(--accent) 75%, var(--ink));
  
    --ink-80: rgba(231, 227, 215, 0.86);
    --ink-60: rgba(231, 227, 215, 0.68);
    --ink-40: rgba(231, 227, 215, 0.58);
    --ink-20: rgba(231, 227, 215, 0.22);
    --hair: rgba(231, 227, 215, 0.16);
    --hair-strong: rgba(231, 227, 215, 0.34);
  
    --ui-bg: #151D21;
    --ui-card: #1C2529;
    --ui-bright: #212B30;
    --ui-line: rgba(231, 227, 215, 0.10);
    --ui-line2: rgba(231, 227, 215, 0.20);
    --shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
    --shadow-active: 2px 2px 0 rgba(0, 0, 0, 0.55);
  
    --geo-cobalt: #6B7AB8;
    --geo-verm: #D4785A;
    --geo-comm: #6A8BA8;
    --geo-gold: #E0B44A;
    --geo-green: #6A9A7A;
    --geo-legal: #A87A5E;
    --geo-teal: #4A9A92;
    --geo-plum: #A77AAB;
    --geo-slate: #8A9BA8;
    --geo-gold-press: #C9A030;
    --geo-gold-tint: #3A3428;
    --mute: #A89F92;
    --dim-veil: rgba(16, 23, 26, 0.55);
  }
}

/* Static public pages (About, Contribute, legal, 404). Tokens only: no literal colors,
   sizes or spacing. site/build-site.mjs joins this after tokens.css into site.css. */
html { background: var(--paper); color: var(--ink); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.6;
}
.page-head, .page-main, .page-foot {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-4);
  box-sizing: border-box;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  border-bottom: 1px solid var(--hair);
}
.page-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--target);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-lg);
  text-decoration: none;
}
.page-brand img { width: var(--sp-6); height: var(--sp-6); }
.page-open {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-sm);
  text-decoration: none;
  border: 1px solid var(--accent);
}
.page-open:focus-visible, .page-brand:focus-visible, .page-main a:focus-visible, .page-foot a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.page-main { padding-top: var(--sp-8); padding-bottom: var(--sp-10); }
.page-main h1 { font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.2; margin: 0 0 var(--sp-4); font-weight: 500; }
.page-main h2 { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.25; margin: var(--sp-8) 0 var(--sp-3); font-weight: 500; }
.page-main h3, .page-main h4 { font-family: var(--serif); font-size: var(--fs-lg); margin: var(--sp-6) 0 var(--sp-2); font-weight: 500; }
.page-main p, .page-main ul, .page-main ol, .page-main table { margin: 0 0 var(--sp-4); }
.page-main ul, .page-main ol { padding-left: var(--sp-6); }
.page-main li { margin-bottom: var(--sp-1); }
.page-main a { color: var(--accent-ink); text-underline-offset: 2px; }
.page-main code {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  background: var(--paper-deep);
  padding: 1px var(--sp-1);
}
.page-main table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
.page-main th, .page-main td { text-align: left; vertical-align: top; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--hair); }
.page-main th { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--mid); }
.page-foot {
  border-top: 1px solid var(--hair);
  font-size: var(--fs-sm);
  color: var(--mid);
}
.page-foot ul { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
.page-foot a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--mid); }
.page-foot p { margin: 0; }
