/* Copied from Nogat design/tokens.css at commit 7786271 (DEV-15.3). Do not edit here:
   change Nogat, then copy again. */
/*
 * Nogat ecosystem: shared design tokens.
 * Brand from debever.pl (palette, waves favicon, Lato); UI from Archiwista
 * (dense functional UI: status colours, radii, shadows, 32 px controls).
 * Apps link this file before their own stylesheet.
 * No remote fonts: apps run under CSP 'self' and offline on the LAN.
 */

:root {
  color-scheme: light;

  /* Brand surfaces */
  --bg: #faf8f8;
  --surface: #ffffff;
  --surface-2: #f4f1f1;
  --line: #e5e5e5;
  --line-2: #d4cfcf;

  /* Text */
  --text: #2b2b2b;
  --text-2: #4e4e4e;
  --text-3: #6b6565;

  /* Accent */
  --accent: #284b63;
  --accent-hover: #1a3a50;
  --accent-soft: #e4ecf1;
  --accent-ink: #ffffff;
  --accent-green: #5f8a80;
  --focus: #284b63;
  --highlight: rgba(143, 159, 169, 0.15);

  /* Status */
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --ok-ink: #166534;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --bad-ink: #991b1b;
  --info: #1d4ed8;
  --info-bg: #dbeafe;
  --info-ink: #1e40af;

  /* Code and marks */
  --code-bg: #0d1117;
  --code-text: #e6edf3;
  --mark-frame: #0d1117;

  /* Tool accents (identity only, never status) */
  --tool-nogat: #284b63;
  --tool-archiwista: #4a776c;
  --tool-hydrograf: #12708a;
  --tool-kartograf: #8a5a1c;
  --tool-obserwator: #3b5bab;
  --tool-hydrolog: #3f7a3a;
  --tool-hydraulik: #5e4fa2;
  --tool-retman: #a4472f;

  /* Type */
  --font-sans: Lato, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "DejaVu Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-site: 16px;
  --line-height: 1.4;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Controls */
  --control-sm: 26px;
  --control: 32px;
  --control-lg: 38px;
  --control-touch: 44px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.08);

  /* Motion and layout */
  --transition: 0.2s ease;
  --container-max: 1200px;
  --header-height: 52px;

  /* Navigation rail */
  --rail-bg: #0d1117;
  --rail-hover: #161b22;
  --rail-active: #284b63;
  --rail-ink: #9da7b3;
  --rail-ink-active: #ffffff;
}

/* Dark theme: follows the OS unless the app forces light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    /* Brand surfaces */
    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #21262d;
    --line: #30363d;
    --line-2: #3d444d;

    /* Text */
    --text: #e6edf3;
    --text-2: #9da7b3;
    --text-3: #8b949e;

    /* Accent */
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --accent-soft: #132a44;
    --accent-ink: #0d1117;
    --accent-green: #3fb950;
    --focus: #58a6ff;
    --highlight: rgba(88, 166, 255, 0.1);

    /* Status */
    --ok: #3fb950;
    --ok-bg: #12261a;
    --ok-ink: #56d364;
    --warn: #d29922;
    --warn-bg: #2b2111;
    --warn-ink: #e3b341;
    --bad: #f85149;
    --bad-bg: #2d1215;
    --bad-ink: #ff7b72;
    --info: #58a6ff;
    --info-bg: #132a44;
    --info-ink: #79c0ff;

    /* Code and marks */
    --code-bg: #010409;
    --code-text: #e6edf3;
    --mark-frame: #0d1117;

    /* Tool accents */
    --tool-nogat: #58a6ff;
    --tool-archiwista: #7fbfae;
    --tool-hydrograf: #4cc3e0;
    --tool-kartograf: #d9a35f;
    --tool-obserwator: #8fa9f5;
    --tool-hydrolog: #7cc474;
    --tool-hydraulik: #b0a3f0;
    --tool-retman: #f0907a;

    /* Navigation rail */
    --rail-bg: #010409;
    --rail-hover: #161b22;
    --rail-active: #1f3a5c;
    --rail-ink: #9da7b3;
    --rail-ink-active: #ffffff;
  }
}

/* Dark theme: forced by the app */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* Brand surfaces */
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #21262d;
  --line: #30363d;
  --line-2: #3d444d;

  /* Text */
  --text: #e6edf3;
  --text-2: #9da7b3;
  --text-3: #8b949e;

  /* Accent */
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-soft: #132a44;
  --accent-ink: #0d1117;
  --accent-green: #3fb950;
  --focus: #58a6ff;
  --highlight: rgba(88, 166, 255, 0.1);

  /* Status */
  --ok: #3fb950;
  --ok-bg: #12261a;
  --ok-ink: #56d364;
  --warn: #d29922;
  --warn-bg: #2b2111;
  --warn-ink: #e3b341;
  --bad: #f85149;
  --bad-bg: #2d1215;
  --bad-ink: #ff7b72;
  --info: #58a6ff;
  --info-bg: #132a44;
  --info-ink: #79c0ff;

  /* Code and marks */
  --code-bg: #010409;
  --code-text: #e6edf3;
  --mark-frame: #0d1117;

  /* Tool accents */
  --tool-nogat: #58a6ff;
  --tool-archiwista: #7fbfae;
  --tool-hydrograf: #4cc3e0;
  --tool-kartograf: #d9a35f;
  --tool-obserwator: #8fa9f5;
  --tool-hydrolog: #7cc474;
  --tool-hydraulik: #b0a3f0;
  --tool-retman: #f0907a;

  /* Navigation rail */
  --rail-bg: #010409;
  --rail-hover: #161b22;
  --rail-active: #1f3a5c;
  --rail-ink: #9da7b3;
  --rail-ink-active: #ffffff;
}
