:root {
  color-scheme: dark;
  --bg: #000;
  --text: #f2f2f2;
  --muted: #b8b8b8;
  --line: #333;
  --shot-border: #8a8a8a;
}
/* Heller Modus: folgt dem System, ausser der Besucher hat umgeschaltet (theme.js setzt data-theme). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --text: #161616;
  --muted: #555;
  --line: #d4d4d4;
  --shot-border: #bdbdbd;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fafafa;
    --text: #161616;
    --muted: #555;
    --line: #d4d4d4;
    --shot-border: #bdbdbd;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 680px; margin: 0 auto; padding: 48px 20px 80px; }
header { text-align: center; margin-bottom: 40px; }
header img { width: 96px; height: 96px; border-radius: 22px; }
h1 { font: 300 2rem/1.2 ui-serif, "New York", Georgia, serif; margin: 16px 0 4px; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 36px 0 8px; }
/* Kategorie in der H1 der Startseite, sieht aus wie die Zeile darunter */
.h1-zusatz { display: block; font: 18px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; color: var(--muted); margin-top: 8px; }
h1 + p.muted { margin-top: 0; }
h3 { font-size: 18px; font-weight: 600; margin: 24px 0 4px; }
p, li { color: var(--text); }
.muted { color: var(--muted); }
a { color: var(--text); text-underline-offset: 3px; }
nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
address { font-style: normal; }
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 40px 0; }
.screens img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--shot-border); }
@media (max-width: 560px) { .screens { grid-template-columns: repeat(2, 1fr); } }
ul { padding-left: 1.2em; }
li { margin-bottom: 8px; }
.badge { text-align: center; margin: 32px 0 0; }
footer { display: flex; gap: 20px; justify-content: center; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.9rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.langs { margin-top: 20px; font-size: 0.9rem; }
.safety-note { margin-top: 24px; padding: 12px 16px; border-left: 3px solid var(--text); }
.share { text-align: center; margin: 48px 0; }
.share p { margin: 0 0 12px; }
.share button { font: inherit; font-weight: 600; font-size: 1.1rem; color: var(--bg); background: var(--text); border: 0; border-radius: 999px; padding: 14px 36px; cursor: pointer; }
.share button:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
#share-status { min-height: 1.6em; margin-top: 12px; }
/* Bereich Hintergrund (scripts/wissen.py) */
header.small { margin-bottom: 32px; }
header.small .brand { font: 300 1.6rem/1.2 ui-serif, "New York", Georgia, serif; color: var(--text); text-decoration: none; }
h1.artikel { font: 300 1.9rem/1.25 ui-serif, "New York", Georgia, serif; margin: 8px 0 20px; text-align: left; }
p.lead { font-size: 1.1rem; }
sup a.ref { color: var(--muted); text-decoration: none; font-size: 0.75rem; padding-left: 1px; }
.quellen { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.85rem; }
.quellen li { color: var(--muted); word-break: break-word; }
.quellen a { color: var(--muted); }
.artikelliste { list-style: none; padding-left: 0; }
.artikelliste li { margin-bottom: 18px; }
.theme-toggle { font: inherit; font-size: 0.9rem; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.theme-toggle:hover { color: var(--text); }
.theme-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
/* Hintergrund-Artikel: Orientierung */
.breadcrumb { display: block; text-align: left; font-size: 0.9rem; color: var(--muted); margin: 0 0 8px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a, .breadcrumb span { white-space: normal; }
.breadcrumb span[aria-current] { color: var(--text); }
.meta { font-size: 0.9rem; color: var(--muted); margin: 0 0 24px; }
.toc { display: block; border-left: 2px solid var(--line); padding: 4px 0 4px 16px; margin: 0 0 32px; }
.toc p { margin: 0 0 6px; font-size: 0.9rem; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 4px 0; font-size: 0.95rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
h2[id] { scroll-margin-top: 16px; }
/* Illustrationen (wissen/bilder, inline eingebunden). Linienfarben folgen dem Umschalter. */
main .illu svg { --ink: var(--text); --soft: var(--muted); display: block; width: 100%; height: auto; }
.illu-titel { margin: 8px 0 32px; }
.illu-erkl { margin: 36px 0; }
.illu-mobil { display: none; }
.illu-labels { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.illu-labels.n2 { grid-template-columns: repeat(2, 1fr); }
.illu-labels.n3 { grid-template-columns: repeat(3, 1fr); }
.illu-labels li { margin: 0; }
.illu-erkl figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--muted); text-align: left; }
@media (max-width: 560px) {
  /* Die gestapelte Mobilfassung waere sehr lang und trennt Bild und Beschriftung; die breite Fassung bleibt lesbar. */
  .illu-labels { font-size: 0.78rem; gap: 6px; }
}
.cards { list-style: none; padding: 0; margin: 12px 0 8px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards li { margin: 0; }
.card { display: flex; flex-direction: column; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--text); }
.card:hover, .card:focus-visible { border-color: var(--muted); }
.card .illu-titel { margin: 0 0 12px; }
.card-titel { font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.card-text { font-size: 0.92rem; color: var(--muted); line-height: 1.5; flex: 1; }
.card-meta { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
/* Kopf im Bereich Hintergrund: kleines Icon mit Lichtkreis ueber dem Schriftzug */
header.small .brand-link { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
/* Titelbild im Artikel nicht hoeher als etwa ein Drittel des Bildschirms (in den Cards unveraendert) */
main > .illu-titel svg { max-height: 300px; }
/* Randnotiz am Artikelende, z. B. Datenschutz: abgesetzt und kleiner */
aside.randnotiz { margin: 40px 0 0; padding: 4px 20px 8px; border: 1px solid var(--line); border-radius: 14px; font-size: 0.92rem; }
aside.randnotiz h2 { font-size: 1rem; margin-top: 16px; }
aside.randnotiz p { color: var(--muted); }
aside.randnotiz a { color: var(--text); }
/* Vorlesen */
.vorlesen { display: flex; gap: 10px; flex-wrap: wrap; margin: -8px 0 28px; }
.vorlesen-knopf { font: inherit; font-size: 0.95rem; color: var(--text); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.vorlesen-knopf:hover { border-color: var(--muted); }
.vorlesen-knopf:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.vorlesen-knopf.nebenknopf { color: var(--muted); }
.liest { background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 6px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--text) 8%, transparent); }
/* Sprachwahl oben rechts (sprache.js) */
.sprachwahl { position: absolute; top: 14px; right: 16px; }
.sprachwahl select { font: inherit; font-size: 0.85rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 28px 5px 12px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.sprachwahl select:hover { color: var(--text); border-color: var(--muted); }
.sprachwahl select:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Verweis vom Artikel auf die App */
.zur-app { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.badge-artikel { margin: 12px 0 32px; }
.badge-artikel img { display: block; }

/* Obere Leiste (seit 2026-11-06): bleibt beim Scrollen stehen, auf allen Seiten gleich */
.leiste { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.leiste-innen { max-width: 680px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.leiste-marke { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font: 400 1.3rem/1 ui-serif, "New York", Georgia, serif; margin-right: auto; padding: 4px 0; }
.leiste-marke img { width: 32px; height: 32px; border-radius: 8px; }
.leiste-nav { display: flex; align-items: center; gap: 4px; margin: 0; flex-wrap: nowrap; }
.leiste-nav a { color: var(--text); text-decoration: none; font-size: 17px; padding: 10px 10px; border-radius: 10px; white-space: nowrap; }
.leiste-nav a:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.leiste-nav a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.leiste a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.leiste .sprachwahl { position: relative; display: flex; align-items: center; gap: 6px; color: var(--text);
  font-size: 17px; padding: 10px 10px; border-radius: 10px; }
.leiste .sprachwahl:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.leiste .sprachwahl select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  font-size: 16px; padding: 0; border: 0; background: none; }
.leiste .sprachwahl:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
.leiste-laden { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 599px) {
  .leiste .sprachname { display: none; }
}
@media (min-width: 700px) {
  .leiste-innen { max-width: 920px; }
  .leiste-nav a.leiste-laden { display: inline-block; margin-left: 8px; font-weight: 600; color: var(--bg); background: var(--text);
    border-radius: 999px; padding: 9px 18px; }
  .leiste-nav a.leiste-laden:hover { background: var(--text); opacity: 0.85; }
}
header.unterseite { margin-bottom: 24px; }
.leiste .sprachplatz { display: flex; align-items: center; }
.leiste .sprachwahl svg { display: block; }
@media (max-width: 479px) {
  .leiste-innen { gap: 4px; padding: 8px 10px; }
  .leiste-marke > span:not(.sr) { display: none; }
  .leiste-nav a, .leiste .sprachwahl { padding: 10px 8px; }
}
.leiste .sprachwahl { top: auto; right: auto; }
.leiste-marke img { box-shadow: 0 0 0 1px var(--line); }

/* Weitere Apps desselben Entwicklers, vor der Fusszeile jeder Seite (Liste aus apps.toml) */
.weitere-apps { margin-top: 64px; padding-top: 8px; border-top: 1px solid var(--line); text-align: left; }
.weitere-app { display: flex; gap: 16px; align-items: flex-start; margin: 20px 0 0; }
.weitere-app img { flex: none; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--line); }
.weitere-app h3 { margin: 0 0 4px; }
.weitere-app p { margin: 0 0 6px; }
.weitere-app-store { font-size: 0.9rem; }
.weitere-apps + footer { margin-top: 40px; }

/* Startseite in der Leiste: Wort ab 600 px, darunter nur das Haus */
.leiste-nav a.leiste-home { display: flex; align-items: center; }
.leiste-home svg { display: none; }
@media (max-width: 599px) {
  .leiste-home svg { display: block; }
  .leiste-home-wort { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 399px) {
  .leiste-innen { gap: 0; padding: 8px 6px; }
  .leiste-nav a, .leiste .sprachwahl { padding: 10px 6px; }
}
@media (max-width: 599px) {
  .leiste-nav a.leiste-home[aria-current="page"] { background: color-mix(in srgb, var(--text) 14%, transparent); }
  .leiste-home[aria-current="page"] svg { stroke-width: 2.2; }
}
/* App-eigene Ergaenzung aus website-inhalt/zusatz.css (Who's Shotgun?) */
/* Who's Shotgun: hell und freundlich, Farben aus Shared/Palette.swift.
   Geprueft nach WCAG 2.2 AA: Text #12283A auf Weiss 15 zu 1, gedaempft #4A5B6A auf Weiss 7 zu 1,
   Sprechblasen weisse Schrift auf #0A7CC1 4,5 zu 1, #1F7A3E 5,4 zu 1, #C2410C 5,2 zu 1. */
:root:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #ffffff;
  --text: #12283a;
  --muted: #4a5b6a;
  --line: #c9d9e6;
  --shot-border: #9db4c6;
  --buehne: #eaf4fa;
}
/* Dunkle Ansicht nur auf eigenen Wunsch: Nachtblau statt Schwarz */
:root[data-theme="dark"] {
  --bg: #0e1f2e;
  --text: #eef5fa;
  --muted: #b5c6d4;
  --line: #2c4459;
  --shot-border: #5d7d96;
  --buehne: #17324a;
}
/* Schrift wie in der App: die runde Systemschrift */
h1, h2, h3, .ruf, .leiste-marke span { font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
h1 { font-weight: 800; font-size: 2.3rem; letter-spacing: -0.01em; }
h2 { font-weight: 700; font-size: 1.3rem; }
header img { box-shadow: 0 6px 18px rgba(18, 40, 58, 0.18); }
.share button { background: #2a72a8; color: #fff; }
.share button:focus-visible { outline-color: #2a72a8; }

/* Der Wortwechsel von der Rueckbank: drei Sprechblasen in Kinderfarben auf heller Buehne */
.dialog { background: var(--buehne); border-radius: 28px; padding: 22px 18px 14px; margin: 0 0 32px; display: flex; flex-direction: column; gap: 12px; }
.ruf { margin: 0; max-width: 82%; padding: 12px 20px; border-radius: 24px; color: #fff; font-weight: 700; font-size: 1.25rem; line-height: 1.3; position: relative; }
.ruf::after { content: ""; position: absolute; bottom: -7px; width: 18px; height: 18px; background: inherit; border-radius: 4px; transform: rotate(45deg); }
.ruf-1 { background: #0a7cc1; align-self: flex-start; border-bottom-left-radius: 6px; }
.ruf-1::after { left: 14px; }
.ruf-2 { background: #c2410c; align-self: flex-end; border-bottom-right-radius: 6px; }
.ruf-2::after { right: 14px; }
.ruf-3 { background: #1f7a3e; align-self: flex-start; border-bottom-left-radius: 6px; margin-bottom: 8px; }
.ruf-3::after { left: 14px; }
/* Jede Blase huepft einmal herein, nacheinander. Ohne Bewegung stehen sie einfach da. */
@media (prefers-reduced-motion: no-preference) {
  .ruf { animation: ruf-rein 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
  .ruf-2 { animation-delay: 0.5s; }
  .ruf-3 { animation-delay: 1s; }
  @keyframes ruf-rein { from { opacity: 0; transform: translateY(14px) scale(0.9); } to { opacity: 1; transform: none; } }
}
.bald { text-align: center; font-weight: 700; color: var(--text); background: var(--buehne); border-radius: 999px; padding: 10px 20px; width: fit-content; margin: 28px auto 0; }
.safety-note { border-left-color: #d9620f; background: var(--buehne); border-radius: 0 14px 14px 0; }
