:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e3e1dc;
  --accent: #2f6f5e;
  --bar: #2f6f5e;
  --bar-soft: #d8e6e1;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --card: #1e1e1f;
    --text: #f2f2f2;
    --muted: #a1a1a6;
    --line: #2e2e30;
    --accent: #7cc4ad;
    --bar: #7cc4ad;
    --bar-soft: #263a34;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
main { width: 100%; max-width: 30rem; margin: 0 auto; padding: 3.5rem 1rem 2rem; flex: 1; }

header { text-align: center; margin-bottom: 1.75rem; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0; }
.subtitle { color: var(--muted); margin: 0.35rem 0 0; }

.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.links a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.85rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.links a:hover, .links a:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.label { font-weight: 600; }
.note { color: var(--muted); font-size: 0.9rem; }

footer { text-align: center; padding: 1rem 1rem 2rem; font-size: 0.85rem; color: var(--muted); }
footer a { color: var(--muted); }

.prose { max-width: 40rem; }
.prose h1 { margin-bottom: 1rem; }
.prose h2 { font-size: 1.1rem; margin-top: 1.75rem; }
.prose li { margin: 0.25rem 0; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }

/* Statistik */
.stats main { max-width: 60rem; }
.stats h1 { margin-bottom: 0.75rem; }
.stats h2 { font-size: 1.15rem; margin: 2rem 0 0.6rem; }
.stats h3 { font-size: 0.95rem; margin: 0 0 0.4rem; }
.muted { color: var(--muted); }
.ranges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ranges a { padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.9rem; }
.ranges a.current { background: var(--accent); border-color: var(--accent); color: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-weight: 600; color: var(--muted); padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--line); }
td { padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.num { text-align: right; font-variant-numeric: tabular-nums; width: 4.5rem; }
td.bar { width: 35%; }
td.bar span { display: block; height: 0.55rem; border-radius: 3px; background: var(--bar); min-width: 2px; }
.days { display: flex; align-items: flex-end; gap: 2px; height: 6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.days span { flex: 1; background: var(--bar); border-radius: 2px 2px 0 0; min-width: 1px; }
.days span.zero { background: var(--bar-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; margin-top: 2rem; }
