:root {
  --bg: #fbfaf7;
  --fg: #1d1d1b;
  --muted: #5f5e58;
  --accent: #1f5f8b;
  --rule: #d9d6cc;
  --ok: #2e7d32;
  --nok: #c62828;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --fg: #ecebe6;
    --muted: #a9a79f;
    --accent: #7fb6dc;
    --rule: #3a3936;
    --ok: #81c784;
    --nok: #ef9a9a;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.site-header, main, .site-footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.site-header .brand {
  margin-right: auto;
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

h1 { font-size: 2rem; line-height: 1.2; margin: 2rem 0 1rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
.lead { font-size: 1.25rem; }
.reference { color: var(--muted); font-size: 0.9rem; }

.tex-display { display: block; margin: 1rem 0; overflow-x: auto; text-align: center; }

.curve-plot { margin: 1rem 0; }
.curve-plot svg { display: block; width: 100%; height: auto; }
.curve-plot .axis { stroke: var(--rule); stroke-width: 1; }
.curve-plot .curve { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.curve-plot figcaption { color: var(--muted); font-size: 0.9rem; }

.status { padding: 0.5rem 0.75rem; border-left: 3px solid var(--rule); }
.status.ok { border-color: var(--ok); }
.status.nok { border-color: var(--nok); }

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
}

.disclaimer { color: var(--muted); font-size: 0.9rem; }
