/* Dashboard design tokens: Slate & Teal.
 * One neutral ramp (blue-grey), one calm accent (teal), semantic hues only for state. Light and dark are both intended:
 * every colour is declared once with light-dark(). A pinned theme: <html data-theme="light|dark">. */

/* Faces: Onest (text) and JetBrains Mono (figures, ids, timestamps). Self-hosted, variable weight, Cyrillic included. */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/Onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/Onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/JetBrainsMono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/JetBrainsMono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;

  /* space: a 4-based scale; inside a block < between blocks < between sections */
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;

  /* type scale */
  --text-xs: 0.75rem; --text-sm: 0.8125rem; --text-md: 0.875rem; --text-lg: 1rem; --text-xl: 1.125rem; --text-2xl: 1.75rem; --text-3xl: 2.125rem;
  --text-display: 1.375rem; --text-section: 0.9375rem; --text-title: 0.875rem; --text-lead: 0.875rem;

  /* motion: state only, always under 250 ms */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 200ms;

  /* layout */
  --container: 1440px; --gutter: 24px; --header-h: 56px;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 300; --z-tooltip: 600;

  /* surfaces: page < card < raised */
  --color-paper:   light-dark(oklch(96.8% 0.006 235), oklch(16.5% 0.012 245));
  --color-paper-2: light-dark(oklch(94.5% 0.008 235), oklch(21.5% 0.014 245));
  --color-paper-3: light-dark(oklch(91.5% 0.01 235),  oklch(25.5% 0.016 245));
  --color-surface: light-dark(oklch(99.4% 0.002 235), oklch(20% 0.013 245));
  --color-raised:  light-dark(oklch(100% 0 0),        oklch(24% 0.015 245));

  /* text */
  --color-ink:   light-dark(oklch(24% 0.025 245), oklch(94% 0.006 245));
  --color-ink-2: light-dark(oklch(40% 0.025 245), oklch(86% 0.01 245));
  --color-muted: light-dark(oklch(50% 0.022 245), oklch(78% 0.016 245));
  --color-faint: light-dark(oklch(64% 0.016 245), oklch(64% 0.016 245));

  /* hairlines */
  --color-rule:   light-dark(oklch(90.5% 0.01 235), oklch(28% 0.014 245));
  --color-rule-2: light-dark(oklch(83% 0.012 235),  oklch(46% 0.016 245));

  /* accent: selection, primary action, focus. Used sparingly. */
  --color-accent:      light-dark(oklch(50% 0.09 195), oklch(75% 0.1 190));
  --color-accent-ink:  light-dark(oklch(99% 0.004 195), oklch(18% 0.02 195));
  --color-accent-2:    light-dark(oklch(42% 0.09 195), oklch(87% 0.1 190));
  --color-accent-wash: light-dark(oklch(50% 0.09 195 / 0.09), oklch(75% 0.1 190 / 0.13));
  --color-focus:       light-dark(oklch(50% 0.09 195), oklch(75% 0.1 190));

  /* state: ink for text, wash for backgrounds, mark for bars and dots */
  --color-ok:    light-dark(oklch(44% 0.1 160), oklch(78% 0.12 160));   --color-ok-wash:    light-dark(oklch(95.5% 0.03 160), oklch(28% 0.045 160));   --color-ok-mark:    light-dark(oklch(60% 0.11 160), oklch(70% 0.12 160));
  --color-warn:  light-dark(oklch(46% 0.1 70),  oklch(82% 0.12 80));    --color-warn-wash:  light-dark(oklch(95.5% 0.045 85), oklch(30% 0.05 75));      --color-warn-mark:  light-dark(oklch(74% 0.13 78), oklch(78% 0.13 80));
  --color-error: light-dark(oklch(48% 0.16 27), oklch(83% 0.13 25));    --color-error-wash: light-dark(oklch(95.5% 0.03 25), oklch(29% 0.06 25));       --color-error-mark: light-dark(oklch(60% 0.17 27), oklch(70% 0.16 25));
  --color-info:  light-dark(oklch(45% 0.09 245), oklch(80% 0.09 245));  --color-info-wash:  light-dark(oklch(95.5% 0.02 245), oklch(28% 0.04 245));     --color-info-mark:  light-dark(oklch(60% 0.09 245), oklch(72% 0.1 245));
  --color-neutral-mark: light-dark(oklch(72% 0.014 245), oklch(46% 0.016 245));
  --color-success: var(--color-ok);

  /* type */
  --font-display: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --font-body: var(--font-display);
  --font-outlier: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --tracking-display: -0.015em; --display-weight: 600;

  /* shape and depth: cards are a 1px ring plus a short soft shadow; no heavy blur */
  --radius-card: 10px; --radius-input: 8px; --radius-pill: 999px; --rule-hair: 1px;
  --shadow-card: 0 0 0 1px light-dark(oklch(25% 0.03 245 / 0.06), oklch(100% 0 0 / 0.06)), 0 1px 2px light-dark(oklch(25% 0.03 245 / 0.06), oklch(0% 0 0 / 0.3));
  --shadow-pop: 0 0 0 1px light-dark(oklch(25% 0.03 245 / 0.1), oklch(100% 0 0 / 0.1)), 0 8px 24px -6px light-dark(oklch(25% 0.03 245 / 0.22), oklch(0% 0 0 / 0.5));
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }
@media (max-width: 60rem) { :root { --gutter: 16px; } }
@media (max-width: 40rem) { :root { --gutter: 12px; } }

:root {
  /* icons as tokens: a mask for currentColor chevrons, a ready fill for native selects */
  --mask-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-select: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2371808f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
