:root {
  --background: #faf8f4;
  --foreground: #1c1814;
  --muted: #6f6964;
  --border: #e7e5e0;
  --card: #ffffff;
  --accent: #b45309;
  --radius: 0.85rem;
  /* No font files ship with these static pages (and nothing may be fetched), so the stacks stay on system fonts. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

.dark {
  --background: #1c1814;
  --foreground: #faf8f4;
  --muted: #a8a29e;
  --border: #2d2520;
  --card: #28221d;
  --accent: #f59e0b;
  color-scheme: dark;
}

html,
body {
  background: var(--background);
  color: var(--foreground);
}

body {
  font-family: var(--font-sans);
  margin: 0;
}

/* The site header and footer themselves are styled by /demos/site-nav.css. */

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.55rem 0.85rem;
  min-height: 2.4rem;
  min-width: 2.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

.theme-toggle:hover {
  opacity: 0.85;
}

.theme-toggle:active {
  transform: scale(0.97);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  /* phone: the theme button is a full 44px tap target */
  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="on"]) .theme-toggle {
    transition: none;
  }
  :root:not([data-motion="on"]) .theme-toggle:active {
    transform: none;
  }
}

:root[data-motion="off"] .theme-toggle {
    transition: none;
  }

:root[data-motion="off"] .theme-toggle:active {
    transform: none;
  }
