/* Gemeinsame Grundlagen aller Mathe-Tools: Farben, Schrift, Buttons. */

:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --text: #2b2d42;
  --muted: #6b6f80;
  --border: #e3e0d6;
  --accent: #3a7bd5;
  --accent-text: #ffffff;
  --good: #2e9e5b;
  --bad: #d9534f;
  --slow: #e0a800;
  --star: #f2b705;
  --radius: 16px;
  --shadow: 0 2px 8px rgb(0 0 0 / 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1f27;
    --surface: #282b36;
    --text: #eceef4;
    --muted: #a4a8b8;
    --border: #3a3e4c;
    --accent: #6aa2ef;
    --accent-text: #10131a;
    --good: #5cc98a;
    --bad: #ef7c78;
    --slow: #f2c94c;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.75rem; margin: 0.5em 0; }
h2 { font-size: 1.25rem; margin: 1.5em 0 0.5em; }

a { color: var(--accent); }

button {
  font: inherit;
  padding: 0.6em 1.2em;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
}

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

input {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.5em 0.75em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
