:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e4e6ee;
  --text: #14151f;
  --text-muted: #6b6d7c;
  --accent: #173ded;
  --accent-soft: #eaedff;
  --accent-contrast: #ffffff;
  --good: #12875c;
  --good-soft: #e6f7ef;
  --warn: #b3690a;
  --warn-soft: #fdf1e0;
  --bad: #d13438;
  --bad-soft: #fdeceb;
  --nav-bg: #ffffff;
  --nav-width: 220px;
  --topbar-height: 72px;
  --shadow-sm: 0 1px 2px rgba(20, 21, 31, 0.04), 0 1px 1px rgba(20, 21, 31, 0.03);
  --shadow-md: 0 8px 24px rgba(20, 21, 31, 0.06), 0 2px 6px rgba(20, 21, 31, 0.04);
}

[data-theme="dark"] {
  --bg: #111218;
  --surface: #191a22;
  --surface-raised: #1e2029;
  --border: #2a2c38;
  --text: #f0f0f4;
  --text-muted: #9799a8;
  --accent: #6b83ff;
  --accent-soft: #232842;
  --accent-contrast: #ffffff;
  --good: #33c481;
  --good-soft: #17301f;
  --warn: #e0a53e;
  --warn-soft: #332711;
  --bad: #ff6b6f;
  --bad-soft: #3a1f1e;
  --nav-bg: #15161d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

/* Buttons: square corners, no default browser focus ring. Click feedback is
   explicit — dim the fill and show a solid border — instead of relying on
   each browser's own outline/highlight, which rendered as a single stray
   highlighted edge against these shapes. .stat-chip is excluded: it's a
   metrics-row divider that reuses the <button> element, not a button. */
button:not(.stat-chip),
.btn,
.btn--secondary,
.chip,
.pagination__btn,
.filter-toggle {
  border-radius: 4px;
}

button:not(.stat-chip):focus,
button:not(.stat-chip):focus-visible,
.btn:focus,
.btn:focus-visible,
.btn--secondary:focus,
.btn--secondary:focus-visible,
.chip:focus,
.chip:focus-visible,
.pagination__btn:focus,
.pagination__btn:focus-visible,
.filter-toggle:focus,
.filter-toggle:focus-visible {
  outline: none;
}

button:not(.stat-chip):active,
button:not(.stat-chip):focus-visible,
.btn:active,
.btn:focus-visible,
.btn--secondary:active,
.btn--secondary:focus-visible,
.chip:active,
.chip:focus-visible,
.pagination__btn:active,
.pagination__btn:focus-visible,
.filter-toggle:active,
.filter-toggle:focus-visible {
  filter: brightness(0.88);
  border: 1px solid var(--accent);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%),
    radial-gradient(circle at 90% 30%, color-mix(in srgb, var(--good) 8%, transparent), transparent 40%),
    radial-gradient(circle at 40% 90%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 45%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

input {
  font-family: inherit;
}

[x-cloak] { display: none !important; }
