/* The design tokens of the website, art direction "Instrument" (docs/art-direction.md; WD2:
   the owner gave full authority to redesign, 3 Oct 2026, and chose this design for the live site
   on 4 Oct 2026). Light by default; dark when the visitor switches it on (data-theme="dark" on
   <html>). .theme-light and .theme-dark scope a part of a page. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-opsz-normal.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: 'Geist Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/geist-mono-latin-wght-normal.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;
}

/* While Inter loads, text is set in a local sans adjusted to Inter's size and line metrics, so
   the swap to Inter moves nothing (no layout shift) and no font needs to block the first paint. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Arimo'), local('Liberation Sans'), local('Helvetica');
  size-adjust: 107.06%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}
/* Headlines (--font-display) are set in Inter's display cut (its optical size), about 6% narrower
   than the text sizes the stand-in above is matched to. Theirs is sized to that width, so a
   headline breaks on the same lines before and after Inter arrives (measured 6 Oct 2026: Inter
   600 at 32 to 64 px sets the same words 1.008 times as wide as Arial). */
@font-face {
  font-family: 'Inter Display Fallback';
  src: local('Arial'), local('Arimo'), local('Liberation Sans'), local('Helvetica');
  size-adjust: 100.8%;
  ascent-override: 96.11%;
  descent-override: 23.93%;
  line-gap-override: 0%;
}
/* While Geist Mono loads, labels use Consolas (where it is installed, as on Windows) sized to
   Geist Mono's 0.6 em advance (Consolas's is 0.55 em; measured in Chrome, 109.17% matches it to
   within 0.05%), so a label or a row of chips does not re-wrap when the font arrives. Elsewhere
   the system's monospace follows, already close to 0.6 em. */
@font-face {
  font-family: 'Geist Mono Fallback';
  src: local('Consolas');
  size-adjust: 109.17%;
  ascent-override: 92.06%;
  descent-override: 27.02%;
  line-gap-override: 0%;
}

/* ---------- tokens ---------- */
:root,
.theme-light {
  color-scheme: light;
  /* paper and ink: about 90% of every screen */
  --bg: #f6f6f3; /* paper */
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --surface-sunk: #efefeb; /* wells, table heads, inactive tracks */
  --surface-hover: #f4f4f1;
  --surface-active: #ebebe6;
  --text: #0d1117; /* ink */
  --text-2: #4b5361;
  --text-3: #646c79; /* captions and labels only */
  --border: #e4e4df; /* hairline */
  --border-strong: #d3d3cc;
  --field: #858c97; /* input borders, 3:1 on white */
  /* cobalt: action and trust */
  --brand: #2b4ee6;
  --brand-hover: #2140c2;
  --on-brand: #ffffff;
  --link: #2443c9;
  --focus: #2b4ee6;
  --info-bg: #eceffe;
  --info-text: #1e3ab8;
  /* signal orange: attention, your limit, stop */
  --critical: #e8590c;
  --critical-bg: #fdefe7;
  --critical-text: #b23f07;
  --warning-bg: #fdefe7;
  --warning-text: #b23f07;
  /* pass green: approved and checked */
  --success: #1a7f4e;
  --success-bg: #e6f4ec;
  --success-text: #146a40;
  --fill-mark: #fff1a6; /* owner input still needed (review only) */
  /* glass, for things that float */
  --glass: color-mix(in srgb, var(--surface) 70%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg) 82%, transparent);
  --glass-edge: color-mix(in srgb, var(--border-strong) 70%, transparent);
  --glass-blur: saturate(160%) blur(18px);
  /* depth: soft, never seen from across the room */
  --shadow-card:
    0 1px 0 rgba(13, 17, 23, 0.03), 0 1px 2px rgba(13, 17, 23, 0.04),
    0 8px 24px -12px rgba(13, 17, 23, 0.1);
  --shadow-lift:
    0 1px 0 rgba(13, 17, 23, 0.03), 0 2px 6px rgba(13, 17, 23, 0.05),
    0 24px 56px -24px rgba(13, 17, 23, 0.22);
  --bevel: inset 0 0 0 1px var(--border);
  --btn: inset 0 0 0 1px var(--border-strong), 0 1px 2px rgba(13, 17, 23, 0.05);
  --btn-pressed: inset 0 0 0 1px var(--border-strong), inset 0 1px 2px rgba(13, 17, 23, 0.12);
  --btn-primary:
    inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(13, 17, 23, 0.12),
    0 8px 20px -10px rgba(43, 78, 230, 0.65);
  --btn-primary-pressed: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  /* light behind headers only: the gate's glow and the faint paper grid */
  --orb-a: rgba(43, 78, 230, 0.16);
  --orb-b: rgba(111, 134, 255, 0.12);
  --orb-c: rgba(232, 89, 12, 0.08);
  --grid-line: rgba(13, 17, 23, 0.045);
  /* the gate: the instrument ring that stands for your rules */
  --gate: #2b4ee6;
  --gate-ring: rgba(13, 17, 23, 0.16);
  --gate-tick: rgba(13, 17, 23, 0.28);
  --gate-glow: rgba(43, 78, 230, 0.28);
  --gate-pass: #1a7f4e;
  --gate-bounce: #e8590c;
}
:root[data-theme='dark'],
.theme-dark {
  color-scheme: dark;
  --bg: #0b0d11; /* night */
  --surface: #12151b;
  --surface-2: #161a21;
  --surface-sunk: #0e1015;
  --surface-hover: #191d25;
  --surface-active: #1f242d;
  --text: #edeff3;
  --text-2: #a3abb8;
  --text-3: #8a929f;
  --border: #222731;
  --border-strong: #2e3440;
  --field: #6b7380;
  --brand: #7b90ff;
  --brand-hover: #98a8ff;
  --on-brand: #0a0f2e;
  --link: #a9b7ff;
  --focus: #98a8ff;
  --info-bg: #1a2142;
  --info-text: #b4c0ff;
  --critical: #ff7a3d;
  --critical-bg: #33190d;
  --critical-text: #ffab85;
  --warning-bg: #33190d;
  --warning-text: #ffab85;
  --success: #4cc38a;
  --success-bg: #10291c;
  --success-text: #7fd8aa;
  --fill-mark: #4d4300;
  --glass: color-mix(in srgb, var(--surface) 66%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg) 80%, transparent);
  --glass-edge: color-mix(in srgb, #ffffff 9%, transparent);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 28px 64px -24px rgba(0, 0, 0, 0.85);
  --btn: inset 0 0 0 1px var(--border-strong), 0 1px 2px rgba(0, 0, 0, 0.4);
  --btn-pressed: inset 0 0 0 1px var(--border-strong), inset 0 1px 3px rgba(0, 0, 0, 0.5);
  --btn-primary: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px -12px rgba(123, 144, 255, 0.6);
  --btn-primary-pressed: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  --orb-a: rgba(123, 144, 255, 0.16);
  --orb-b: rgba(123, 144, 255, 0.08);
  --orb-c: rgba(255, 122, 61, 0.06);
  --grid-line: rgba(255, 255, 255, 0.04);
  --gate: #8ea0ff;
  --gate-ring: rgba(255, 255, 255, 0.16);
  --gate-tick: rgba(255, 255, 255, 0.3);
  --gate-glow: rgba(123, 144, 255, 0.26);
  --gate-pass: #4cc38a;
  --gate-bounce: #ff7a3d;
}
:root {
  /* type: Inter for reading (optical sizes), Geist Mono for labels only */
  --font:
    'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial,
    sans-serif;
  /* the same Inter, for headlines of 28 px and up: only its stand-in differs (see above) */
  --font-display:
    'Inter', 'Inter Display Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial,
    sans-serif;
  --font-mono:
    'Geist Mono', 'Geist Mono Fallback', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-display: clamp(2.625rem, 1.35rem + 5vw, 5rem); /* 42 to 80 px */
  --fs-h1: clamp(2.375rem, 1.5rem + 3.6vw, 4rem); /* 38 to 64 px */
  --fs-h2: clamp(2rem, 1.45rem + 2.3vw, 3.25rem); /* 32 to 52 px */
  --fs-h3: 1.3125rem; /* 21 px */
  --fs-lede: clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem); /* 19 to 22 px */
  --fs-body: 1.0625rem; /* 17 px */
  --fs-small: 0.9375rem; /* 15 px */
  --fs-fine: 0.84375rem; /* 13.5 px */
  --fs-label: 0.75rem; /* 12 px mono labels */
  --fs-eyebrow: 0.75rem;
  --tracking-display: -0.045em;
  --tracking-h2: -0.035em;
  --tracking-h3: -0.015em;
  --tracking-label: 0.04em;
  --measure: 68ch;
  --measure-lede: 56ch;
  /* space: a 4 px base */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;
  --section: clamp(80px, 11vw, 160px);
  /* layout: 12 columns, content never wider than 1,200 px */
  --max: 1200px;
  --narrow: 760px;
  --gutter: 16px;
  --columns: 4;
  /* shape: radii nest (inner = outer minus padding) */
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-xs: 6px;
  --r-pill: 999px;
  /* motion tokens (roadmap 6.4) */
  --dur-1: 150ms; /* small details */
  --dur-2: 250ms; /* interface changes */
  --dur-3: 600ms; /* reveals */
  --dur-4: 1000ms; /* scene changes */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* the smooth slow-down for reveals */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: linear(
    0,
    0.063 2.6%,
    0.237 5.6%,
    0.513 9.6%,
    0.778 14%,
    0.96 18.6%,
    1.054 23.4%,
    1.083 27.4%,
    1.078 31.4%,
    1.04 38.6%,
    1.006 47%,
    0.995 56%,
    1.001 72%,
    1
  ); /* a gentle spring, for the button press only */
  --stagger: 60ms;
  --rise: 20px; /* movement: 16 to 24 px */
}
@media (min-width: 720px) {
  :root {
    --gutter: 24px;
    --columns: 12;
  }
}
@media (min-width: 1100px) {
  :root {
    --gutter: 32px;
  }
}
