/* The colour variables of the site and the page itself. Linked from index.html, so the page paints
   its colours before the scripts run. The variables inherit into the shadow root of every screen.
   The rest of the styles live in src/styles/site.js. */

:root {
  --sidebar-width: 290px;
  --sidebar-bg: #d946ef;
  --main-bg: #ffffff;
  --main-text: #1a1a1a;
  --main-text-secondary: #666666;
  --card-bg: #f5f5f5;
  --card-bg-hover: #ebebeb;
  --border-color: #e0e0e0;
  --accent-primary: #d946ef;
}

[data-theme='dark'] {
  --main-bg: #1a1f2e;
  --main-text: #e5e7eb;
  --main-text-secondary: #9ca3af;
  --card-bg: #252b3b;
  --card-bg-hover: #2d3548;
  --border-color: #374151;
}

/* Before main.js sets data-theme, follow the device. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --main-bg: #1a1f2e;
    --main-text: #e5e7eb;
    --main-text-secondary: #9ca3af;
    --card-bg: #252b3b;
    --card-bg-hover: #2d3548;
    --border-color: #374151;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  color: var(--main-text);
  background-color: var(--main-bg);
  transition: background-color 0.3s, color 0.3s;
}
