/**
 * Global stylesheet.
 *
 * Shadow DOM keeps component styles isolated, but CSS custom properties cross
 * shadow boundaries. That makes them the supported way to theme components
 * from the outside, so design tokens live here rather than in any one element.
 */

:root {
  color-scheme: light dark;

  --app-font-sans:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  --app-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --app-color-bg: light-dark(#fbfbfd, #131316);
  --app-color-surface: light-dark(#ffffff, #1c1c21);
  --app-color-border: light-dark(#e3e3e8, #2f2f37);
  --app-color-text: light-dark(#18181b, #ededf0);
  --app-color-muted: light-dark(#63636b, #a0a0ab);
  --app-color-accent: light-dark(#3b5bdb, #91a7ff);
  --app-color-accent-contrast: light-dark(#ffffff, #12121a);

  --app-radius: 0.625rem;
  --app-space: 1rem;
  --app-max-width: 46rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--app-font-sans);
  line-height: 1.6;
  background: var(--app-color-bg);
  color: var(--app-color-text);
}

/* Respect users who have asked the OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
