/* omnist.world: Grundgeruest
   Reset, Seitenrahmen, Kopf mit Menue, Fuss, Cookie-Hinweis. Von klein
   nach gross gebaut: die Grundregeln gelten auf dem Telefon, ab 640 und
   960 Pixeln kommen Erweiterungen dazu (zwei Umbruchpunkte, nicht fuenf). */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    font-family: var(--serif);
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-hell); color: var(--ink); }
h1, h2, h3 { font-weight: 600; line-height: 1.25; text-wrap: balance; }
p { text-wrap: pretty; }

.seite { max-width: var(--breite); margin: 0 auto; padding: var(--s-4) var(--rand) var(--s-8); }
.nur-lesen { position: absolute; width: 1px; height: 1px; overflow: hidden;
             clip: rect(0 0 0 0); white-space: nowrap; }
.sprungmarke {
    position: absolute; left: var(--s-3); top: -4rem; z-index: 100;
    background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4);
    border-radius: var(--radius-klein); font-family: var(--sans); text-decoration: none;
}
.sprungmarke:focus { top: var(--s-3); }

/* ─── Kopf ─────────────────────────────────────────────────────────────── */

.kopf { position: relative; z-index: 30; border-bottom: 1px solid var(--line); background: var(--paper); }
.kopf-innen {
    max-width: var(--breite); margin: 0 auto;
    padding: var(--s-3) var(--rand);
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.kopf, .kopf a, .kopf button, .kopf label { font-family: var(--sans); }

.marke {
    display: inline-flex; align-items: center; gap: 0.55rem;
    color: var(--ink); text-decoration: none; font-size: 1.12rem;
    font-weight: 650; letter-spacing: -0.01em; min-height: var(--tipp);
}
.marke svg { width: 30px; height: 30px; flex: none; }
.marke .endung { color: var(--muted); font-weight: 400; }

/* Menue auf dem Telefon: ein Kontrollkasten, kein Skript. */
.menue-schalter { position: absolute; opacity: 0; pointer-events: none; }
.menue-knopf {
    display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
    min-height: var(--tipp); padding: 0 var(--s-3); border-radius: var(--radius-klein);
    border: 1px solid var(--line-stark); color: var(--ink); font-size: var(--t-s);
}
.menue-knopf::before { content: "☰"; font-size: 1.1rem; line-height: 1; }
.menue-schalter:checked + .menue-knopf::before { content: "✕"; }
.menue-schalter:focus-visible + .menue-knopf { outline: 3px solid var(--accent); outline-offset: 2px; }

.menue {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: var(--s-3) var(--rand) var(--s-5);
    flex-direction: column; gap: var(--s-2);
    max-height: calc(100vh - 4rem); overflow-y: auto;
    box-shadow: var(--schatten);
}
.menue-schalter:checked ~ .menue { display: flex; }
.menue a, .menue .gruppe-titel {
    display: flex; align-items: center; min-height: var(--tipp);
    color: var(--ink); text-decoration: none; font-size: var(--t-m);
}
.menue a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.menue a:hover { color: var(--accent); }
.menue-links, .menue-werkzeuge { display: flex; flex-direction: column; gap: 0; }
.gruppe-titel {
    background: none; border: 0; font: inherit; cursor: default; text-align: left;
    color: var(--leise) !important; font-size: var(--t-xs) !important;
    text-transform: uppercase; letter-spacing: 0.08em; min-height: 2rem !important;
    margin-top: var(--s-2);
}
.untermenue { display: flex; flex-direction: column; padding-left: var(--s-3); }
.menue-werkzeuge {
    border-top: 1px solid var(--line); margin-top: var(--s-3); padding-top: var(--s-3);
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s-3);
}
.menue-werkzeuge a.spenden { color: var(--accent); font-weight: 600; }
.sprachwechsel {
    border: 1px solid var(--line-stark); border-radius: 999px; padding: 0 var(--s-4);
    font-size: var(--t-s) !important; letter-spacing: 0.04em; font-weight: 600;
}
.theme-knopf {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--tipp); height: var(--tipp); border-radius: 50%;
    background: none; border: 1px solid var(--line-stark); color: var(--ink); cursor: pointer;
}
.theme-knopf:hover { color: var(--accent); border-color: var(--accent); }
.theme-knopf svg { width: 20px; height: 20px; }
.theme-knopf .sonne { display: none; }
:root[data-theme="dark"] .theme-knopf .sonne { display: block; }
:root[data-theme="dark"] .theme-knopf .mond { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-knopf .sonne { display: block; }
    :root:not([data-theme="light"]) .theme-knopf .mond { display: none; }
}

@media (min-width: 960px) {
    .menue-knopf { display: none; }
    .menue {
        display: flex; position: static; flex-direction: row; align-items: center;
        flex: 1; justify-content: space-between; gap: var(--s-4);
        padding: 0; border: 0; box-shadow: none; max-height: none; overflow: visible;
        background: none;
    }
    .menue-links { flex-direction: row; align-items: center; gap: var(--s-1); margin-left: var(--s-5); }
    .menue-links > a, .gruppe-titel {
        padding: 0 var(--s-3); border-radius: var(--radius-klein); font-size: var(--t-s);
        min-height: var(--tipp);
    }
    .gruppe-titel {
        display: inline-flex !important; cursor: pointer; text-transform: none; letter-spacing: 0;
        font-size: var(--t-s) !important; color: var(--ink) !important; margin: 0;
        min-height: var(--tipp) !important;
    }
    .gruppe-titel::after { content: "▾"; margin-left: 0.35rem; font-size: 0.75em; color: var(--leise); }
    .gruppe { position: relative; }
    .untermenue {
        display: none; position: absolute; top: 100%; left: 0; min-width: 14rem;
        padding: var(--s-2); background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--radius); box-shadow: var(--schatten);
    }
    .gruppe:hover .untermenue, .gruppe:focus-within .untermenue { display: flex; }
    .untermenue a { padding: 0 var(--s-3); border-radius: var(--radius-klein); font-size: var(--t-s); }
    .untermenue a:hover { background: var(--paper-tief); }
    .menue-werkzeuge {
        border: 0; margin: 0; padding: 0; flex-wrap: nowrap; gap: var(--s-3);
    }
}

/* ─── Fuss ─────────────────────────────────────────────────────────────── */

.fuss { border-top: 1px solid var(--line); margin-top: var(--s-8); padding-top: var(--s-6);
        font-family: var(--sans); font-size: var(--t-s); color: var(--muted); }
.fuss-raster { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
.fuss h2 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em;
           color: var(--leise); font-weight: 600; margin-bottom: var(--s-3); }
.fuss ul { list-style: none; display: grid; gap: var(--s-2); }
.fuss a { color: var(--muted); text-decoration: none; }
.fuss a:hover { color: var(--accent); text-decoration: underline; }
.fuss .leitsatz { font-family: var(--serif); font-size: var(--t-m); color: var(--ink); max-width: 34ch; }
.fuss .unterstuetzen { display: inline-block; margin-top: var(--s-3); font-weight: 600; color: var(--accent); }
.fuss-unten { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line);
              display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); color: var(--leise);
              font-size: var(--t-xs); }
@media (min-width: 640px) { .fuss-raster { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ─── Cookie-Hinweis ───────────────────────────────────────────────────── */
/* Ein Formular am unteren Rand: breit genug fuer einen Satz, schmal genug,
   um nicht zu druecken. Ein Klick ist ein echtes POST, kein Skript. */

.cookie-banner {
    position: fixed; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); z-index: 50;
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2);
    max-width: 44rem; margin-inline: auto;
    background: var(--surface); border: 1px solid var(--line-stark); border-radius: var(--radius);
    box-shadow: var(--schatten); padding: var(--s-3) var(--s-4);
    font-family: var(--sans); font-size: var(--t-xs); color: var(--muted);
}
.cookie-banner p { margin: 0; }
.cookie-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.cookie-ja, .cookie-nein {
    font: inherit; cursor: pointer; border-radius: var(--radius-klein);
    padding: 0 var(--s-4); min-height: 36px;
}
.cookie-ja { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); font-weight: 600; }
.cookie-nein { background: transparent; border: 1px solid var(--line-stark); color: var(--ink); }
.cookie-banner a { color: var(--muted); }
@media (min-width: 640px) {
    .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-4); }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
