/* ====================================
   DeerLabs, Design Tokens & Reset
   ====================================
   Single source of truth for colors, spacing, typography.
   Every other CSS file imports these variables.
   ==================================== */

/* ── Palette ── */
:root {
  --bg1: #07090a;
  --bg2: #071e2d;

  --fg: #f2f0ea;
  --muted: #9ba4a8;

  --brand: #f2f0ea;
  --brand-hover: #f5f4ef;
  --brand-dim: rgba(242,240,234,0.12);

  --ok: #5e8f72;
  --ok-dim: rgba(94,143,114,0.12);
  --warn: #c79a45;
  --warn-dim: rgba(199,154,69,0.12);
  --err: #c75a55;
  --err-dim: rgba(199,90,85,0.12);

  /* ── Component surfaces (themeable individually via /dashboard/theme) ──
     Each defaults to a primitive token so changing a primitive cascades.
     Override any of these to peel a single component off the cascade. */
  --page-bg: var(--bg1);
  --navbar-bg: #07090a;
  --sidebar-bg: #071e2d;
  --card-bg: #071e2d;
  --post-bg: #071e2d;
  --input-bg: rgba(0,0,0,0.3);

  --btn-bg: rgba(242,240,234,0.12);
  --btn-fg: var(--fg);
  --btn-hover-bg: rgba(242,240,234,0.18);

  --heading-color: var(--fg);
  --text-color: var(--fg);
  --link-color: var(--brand);

  /* ── Spacing / layout ── */
  --navbar-h: 56px;
  --sidebar-w: 250px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* ── Borders ── */
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.10);
  --border-focus: var(--brand);

  /* ── Shadows ── */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);

  /* ── Transitions ── */
  --ease: 0.15s ease;

  /* ── Typography (themeable via /dashboard/theme) ── */
  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', ui-monospace, Consolas, monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link-color); text-decoration: none; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; line-height: 1.3; color: var(--heading-color); }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

p { margin: 0; }

img, svg { vertical-align: middle; }

/* ── Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-err { color: var(--err); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }
