/**
 * tokens.css: the shared design tokens for Petitti Ops and the Petitti Portal (single source;
 * petitti_ops/web/static/tokens.css is an identical copy, a test keeps them equal).
 *
 * Two looks only (Nov 2026): Light (default, data-theme="light") and Dark (data-theme="dark", the
 * original instrument look). Type: Inter for everything people read, IBM Plex Mono for codes.
 * Spacing: only the --space-* steps and --gutter (house rules in docs/design-references.md).
 */

:root {
  /* Surfaces */
  --bg: #0a0c0f;
  --surface: #12151a;
  --surface-2: #171b21;
  --surface-3: #1c2129;
  --rule: #232830;
  --rule-soft: #1a1e24;
  --road: #262c35;

  /* Ink */
  --ink: #f2f4f7;
  --ink-soft: #a7afbc;
  --ink-mute: #6b7280;
  --ink-on-accent: #0b0d1f;

  /* Accents */
  --accent: #818cf8;
  --accent-soft: rgba(129, 140, 248, 0.16);
  --accent-2: #f2b134;
  --accent-2-soft: rgba(242, 177, 52, 0.14);
  --blue: #7aa7ff;
  --blue-soft: rgba(122, 167, 255, 0.14);
  --cyan: #4dd0e1;
  --cyan-soft: rgba(77, 208, 225, 0.14);

  /* Status */
  --good: #2bd48a;
  --good-soft: rgba(43, 212, 138, 0.14);
  --warning: #f2b134;
  --warning-soft: rgba(242, 177, 52, 0.14);
  --critical: #f2554b;
  --critical-soft: rgba(242, 85, 75, 0.14);

  /* Shape & motion */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  /* Spacing: the only margin/padding/gap values (4px steps, Atlassian scale). --gutter = the page edge. */
  --space-05: 2px; --space-1: 4px; --space-15: 6px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;
  --gutter: 24px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---- Light mode (Sep 2026) ----
   Same token names, light values. Applied with data-theme="light" on <html>
   (the default choice; theme.js / the pgc_theme cookie). */
:root { color-scheme: dark; --shimmer: rgba(255, 255, 255, 0.035); --accent-hover: #a5b4fc; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --surface-3: #e9edf2;
  --rule: #dde2e8;
  --rule-soft: #e9edf1;
  --road: #d7dde4;
  --ink: #111418;
  --ink-soft: #4a5261;
  --ink-mute: #6b7382;
  --ink-on-accent: #ffffff;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.10);
  --accent-hover: #4338ca;
  --accent-2: #b7790b;
  --accent-2-soft: rgba(183, 121, 11, 0.12);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.10);
  --cyan: #0891b2;
  --cyan-soft: rgba(8, 145, 178, 0.10);
  --good: #0e9a5f;
  --good-soft: rgba(14, 154, 95, 0.12);
  --warning: #b45309;
  --warning-soft: rgba(180, 83, 9, 0.10);
  --critical: #dc2626;
  --critical-soft: rgba(220, 38, 38, 0.10);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shimmer: rgba(0, 0, 0, 0.045);
}
/* Baseline reset used by every page that loads this file. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent-soft); }
