:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666666;
  --border: #e5e5e5;
  --code-bg: #f4f4f4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0d1117;
    --fg: #e6e6e6;
    --muted: #9aa0a6;
    --border: #30363d;
    --code-bg: #161b22;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --fg: #e6e6e6;
  --muted: #9aa0a6;
  --border: #30363d;
  --code-bg: #161b22;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666666;
  --border: #e5e5e5;
  --code-bg: #f4f4f4;
}

body {
  background: var(--bg);
  color: var(--fg);
}

a {
  color: inherit;
}

footer {
  margin-top: 48px;
  font-size: 0.85rem;
  color: var(--muted);
}

.theme-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

.theme-switcher button {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-switcher button[aria-pressed="true"] {
  background: var(--border);
  color: var(--fg);
  font-weight: 600;
}
