/*
 * Design tokens — CSS custom properties.
 *
 * Custom properties inherit through shadow DOM boundaries, so every Lit
 * component reads these via var(--…) without re-declaring them. Changing a
 * value here restyles the whole playground; the [data-theme="dark"] block
 * shows how a token swap re-themes everything at once.
 */

:root {
  /* Color — light theme (default) */
  --color-bg: #f6f7fb;
  --color-surface: #ffffff;
  --color-border: #e3e6ef;
  --color-text: #1c2230;
  --color-text-muted: #687087;
  --color-accent: #5b5bd6;
  --color-accent-hover: #4a4ac4;
  --color-accent-contrast: #ffffff;
  --color-success: #1f9d63;
  --color-success-bg: #e6f6ee;
  --color-error: #d6455b;
  --color-error-bg: #fce8eb;
  --color-code-bg: #f1f2f7;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Shadow */
  --shadow-card: 0 1px 2px rgba(20, 24, 40, 0.04), 0 8px 24px rgba(20, 24, 40, 0.06);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-md: 15px;
  --font-size-lg: 19px;
  --font-size-xl: 28px;
}

[data-theme="dark"] {
  --color-bg: #0f1117;
  --color-surface: #181b24;
  --color-border: #2a2f3d;
  --color-text: #e8eaf2;
  --color-text-muted: #9098ad;
  --color-accent: #8b8bf0;
  --color-accent-hover: #9d9df3;
  --color-accent-contrast: #11131a;
  --color-success: #46cf8b;
  --color-success-bg: #14271d;
  --color-error: #f0697d;
  --color-error-bg: #2a161a;
  --color-code-bg: #11141c;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
