/*
  Gemeinsames Layout für die statischen Inhaltsseiten (about.html, /mathe/…).

  Diese Seiten existieren, weil die Flutter-App per CanvasKit in ein <canvas>
  zeichnet und für Suchmaschinen deshalb textlos ist. Hier steht echter,
  indexierbarer Inhalt – bewusst als klassisches HTML ohne JavaScript.

  Keine externen Schriften oder CDNs: Das hält die Seiten schnell und vermeidet
  Drittanbieter-Anfragen, die in der Datenschutzerklärung stehen müssten.
*/

:root {
  --bg: #fff7ea;
  --card: #fffbf4;
  --text: #102a43;
  --muted: #5b6b7c;
  --accent: #16324f;
  --accent-contrast: #ffffff;
  --border: #e7dcc8;
  --soft: #e6eef7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --card: #1e1e1e;
    --text: #f2f2f2;
    --muted: #b8b8b8;
    --accent: #e6eef7;
    --accent-contrast: #121212;
    --border: #333333;
    --soft: #252525;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

.container {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Kopfzeile mit Logo und Rücksprung in die App. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-header a.brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

nav.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

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

@media (prefers-color-scheme: dark) {
  a {
    color: #9dc4ea;
  }
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.5rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.4rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* Formeln: bewusst als Text und nicht als Bild, damit sie lesbar und
   indexierbar bleiben. */
.formula {
  display: block;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--soft);
  border-radius: 10px;
  font-family: "Cambria Math", Cambria, Georgia, serif;
  font-size: 1.05rem;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.98rem;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 700;
}

.cta {
  display: inline-block;
  margin: 0.4rem 0.5rem 0.4rem 0;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
}

.cta.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

footer.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site-footer a {
  color: var(--muted);
}

ul.topics {
  list-style: none;
  padding: 0;
}

ul.topics li {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

ul.topics li a {
  font-weight: 700;
  text-decoration: none;
}

ul.topics li p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
