/* Shared by the landing page and app. Keep page layout in their own stylesheets. */
:root {
  color-scheme: dark;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-code: 'IBM Plex Mono', ui-monospace, monospace;
  --bg: #111827;
  --bg-soft: #1f2937;
  --surface: #1f2937;
  --panel: rgba(31, 41, 55, 0.92);
  --panel-strong: rgba(31, 41, 55, 0.98);
  --header-bg: rgba(17, 24, 39, 0.82);
  --line: rgba(75, 85, 99, 0.4);
  --line-strong: rgba(75, 85, 99, 0.6);
  --line-subtle: rgba(75, 85, 99, 0.25);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-text: #fff;
  --control-bg: rgba(255, 255, 255, 0.03);
  --control-hover: rgba(255, 255, 255, 0.06);
  --control-line: rgba(255, 255, 255, 0.1);
  --error: #fca5a5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

html:not(.dark) {
  color-scheme: light;
  --bg: #f9fafb;
  --bg-soft: #f3f4f6;
  --surface: #fff;
  --panel: rgba(255, 255, 255, 0.95);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --header-bg: rgba(255, 255, 255, 0.88);
  --line: rgba(229, 231, 235, 0.8);
  --line-strong: rgba(209, 213, 219, 0.9);
  --line-subtle: rgba(229, 231, 235, 0.5);
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --control-bg: rgba(0, 0, 0, 0.02);
  --control-hover: rgba(0, 0, 0, 0.04);
  --control-line: #e5e7eb;
  --error: #b91c1c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.06);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: var(--font-heading);
}

code, pre {
  font-family: var(--font-code);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
}

/* Size and spacing belong to each page; color and shape stay consistent. */
.button-primary {
  color: var(--accent-text);
  background: var(--accent-strong);
  border: 1px solid var(--accent-strong);
  border-radius: 999px;
  font-weight: 600;
}

.button-primary:hover {
  color: var(--accent-text);
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-secondary {
  color: var(--text);
  background: var(--control-bg);
  border: 1px solid var(--control-line);
  border-radius: 999px;
}

.button-secondary:hover {
  background: var(--control-hover);
}

button.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

button.theme-toggle:hover {
  color: var(--text);
  background: var(--control-hover);
}

html.dark .theme-toggle .icon-sun,
html:not(.dark) .theme-toggle .icon-moon {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .button-primary, .button-secondary {
    transition: none;
  }
}
