/* Compass design tokens — the single source of truth for themes, colors,
   typography and spacing. Themes switch via data-theme on <html>. */

/* ---- Fonts (vendored, never CDN) ---- */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-sans-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/vendor/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 100 700; font-display: block;
  src: url('/vendor/fonts/material-symbols-outlined.woff2') format('woff2'); }

.msi {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal; font-size: 16px; line-height: 1;
  /* A fixed 1em square: until the font loads, the ligature name ("self_improvement")
     would otherwise be laid out as text and push rows and the tab bar apart. */
  width: 1em; height: 1em; overflow: hidden; flex-shrink: 0;
  letter-spacing: normal; text-transform: none; display: inline-block;
  white-space: nowrap; word-wrap: normal; direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased; user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.msi.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }

/* ---- Theme tokens ----
   Warm "crisp paper": near-white cards with a hairline edge and a small
   shadow over a deeper warm page; hairline dividers between rows; inputs and
   secondary buttons are outlined. Contrast is guarded by tests/contrast.test.ts
   (body ≥ 7:1, secondary ≥ 4.5:1 on bg/surface/raised; visible card edges). */
:root {
  --bg: #EDE6DA;
  --surface: #FFFEFB;
  --raised: #F4EFE6;
  --ink: #16130F;
  --muted: #4F473D;
  --faint: #62594E;
  --line: #DCD2C1;
  --divider: #EEE7DB;
  --line-strong: #CFC4B1;
  --accent: #235C42;
  --accent-bg: #DCEBE1;
  --on-accent: #FFFEFB;
  --danger: #A93A22;
  --danger-bg: color-mix(in srgb, var(--danger) 10%, transparent);
  --overlay: rgb(28 25 21 / 38%);
  --mark: color-mix(in srgb, var(--accent) 20%, transparent);
  --shadow-card: 0 1px 2px rgb(40 30 20 / 6%), 0 1px 0 rgb(40 30 20 / 3%);
  --shadow-pop: 0 12px 32px rgb(28 25 21 / 14%), 0 2px 6px rgb(28 25 21 / 8%);

  --prio-0: #6B6458;
  --prio-1: #2B6449;
  --prio-2: #904F0E;
  --prio-3: #A93A22;

  /* Logo mark only — the brand blue, kept apart from the green UI accent. */
  --brand: #2F6FEF;

  --gh-open: #2A6F39;
  --gh-merged: #6D47C9;

  /* Sidebar: a floating warm-charcoal panel, its own colour apart from the white
     top bar and the cream page. .sidebar remaps the base tokens onto these. */
  --side-bg: #2A2622;
  --side-raised: #38332D;
  --side-ink: #F4EFE6;
  --side-muted: #CBC2B5;
  --side-faint: #B8AE9F;
  --side-line: #4A443C;
  --side-active-bg: #F4EFE6;
  --side-active-ink: #1F1B17;
  --shadow-side: 0 10px 28px rgb(28 25 21 / 22%), 0 2px 6px rgb(28 25 21 / 12%);

  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --fs-meta: 12px;
  --fs-xs: var(--fs-meta);
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 15px;
  --fs-title: 17px;
  --fs-screen: 20px;

  --row-h: 36px;
  --sidebar-w: 236px;
  --drawer-w: 520px;
  --col-w: 260px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

html[data-theme='dark'] {
  --bg: #0E0C0A;
  --surface: #211E19;
  --raised: #2A2621;
  --ink: #F4EFE6;
  --muted: #C2B8A9;
  --faint: #A0968A;
  --line: #3A342D;
  --divider: #2F2A25;
  --line-strong: #4A443C;
  --accent: #7CC9A0;
  --accent-bg: #1C3A2B;
  --on-accent: #0E0C0A;
  --danger: #F08A6C;
  --overlay: rgb(0 0 0 / 55%);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-pop: 0 12px 32px rgb(0 0 0 / 40%), 0 2px 6px rgb(0 0 0 / 24%);

  --prio-0: #A79E90;
  --prio-1: #7CC9A0;
  --prio-2: #E9A85A;
  --prio-3: #F08A6C;

  --brand: #7CB0FF;

  --gh-open: #7ED990;
  --gh-merged: #B79AF2;

  --side-bg: #2E2A25;
  --side-raised: #3A352F;
  --side-ink: #F4EFE6;
  --side-muted: #C9C0B3;
  --side-faint: #B5AB9D;
  --side-line: #4D463E;
  --side-active-bg: #E9E2D6;
  --side-active-ink: #1F1B17;
  --shadow-side: 0 10px 28px rgb(0 0 0 / 45%), 0 2px 6px rgb(0 0 0 / 30%);
}
