/* Sternenreich — ein Stylesheet für die ganze Website.
   Bewusst ohne fremde Ressourcen: keine Schriftarten von Google, kein Framework,
   kein Analysewerkzeug. Was die Seite lädt, liegt auf demselben Server.
   Das ist keine Sparsamkeit, sondern die halbe Datenschutzerklärung. */

:root {
    --raum:      #04060c;
    --tafel:     rgba(11, 18, 32, 0.72);
    --schrift:   #c7d3e3;
    --leise:     #7d8a9d;
    --leuchte:   #58c8ff;   /* Kalt: Navigation, Verweise, Rahmen */
    --glut:      #ffb347;   /* Warm: Überschriften, Zahlen */
    --kante:     rgba(88, 200, 255, 0.16);
    --breite:    62rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--raum) url("bilder/bg_stars.webp") repeat top center;
    background-size: 512px 512px;
    color: var(--schrift);
    font-family: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
}

/* Ein Hauch Tiefe über dem gekachelten Sternenfeld, damit die Kachelkanten
   nicht als Raster ins Auge fallen. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1100px 700px at 78% -8%, rgba(88, 200, 255, 0.13), transparent 62%),
        radial-gradient(900px 620px at 12% 108%, rgba(255, 179, 71, 0.09), transparent 60%);
    z-index: 0;
}

.huelle { position: relative; z-index: 1; }

/* ---------- Kopf und Navigation ---------- */

header.kopf {
    border-bottom: 1px solid var(--kante);
    background: linear-gradient(180deg, rgba(4, 6, 12, 0.94), rgba(4, 6, 12, 0.62));
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.kopf-innen {
    max-width: var(--breite);
    margin: 0 auto;
    padding: 0.7rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.4rem;
}

.marke {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--schrift);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.95rem;
    margin-right: auto;
}

.marke img { width: 30px; height: 30px; border-radius: 7px; display: block; }

nav.haupt { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }

nav.haupt a {
    color: var(--leise);
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    padding: 0.2rem 0;
    border-bottom: 1px solid transparent;
}

nav.haupt a:hover,
nav.haupt a:focus-visible { color: var(--leuchte); border-bottom-color: var(--leuchte); }

nav.haupt a[aria-current="page"] { color: var(--schrift); border-bottom-color: var(--glut); }

/* ---------- Grundtypografie ---------- */

main {
    max-width: var(--breite);
    margin: 0 auto;
    padding: 2.6rem 1.2rem 4rem;
}

h1 {
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 1.1;
    margin: 0 0 0.6rem;
    letter-spacing: -0.01em;
    color: #eaf2ff;
}

h2 {
    font-size: 1.42rem;
    margin: 2.8rem 0 0.8rem;
    color: var(--glut);
    letter-spacing: 0.02em;
}

h3 { font-size: 1.08rem; margin: 1.8rem 0 0.5rem; color: #e3ecf8; }

p { margin: 0 0 1.05rem; }

a { color: var(--leuchte); }
a:hover { color: #9adcff; }

strong { color: #eaf2ff; font-weight: 600; }

code {
    font-family: "Cascadia Mono", Consolas, "SF Mono", monospace;
    font-size: 0.9em;
    background: rgba(88, 200, 255, 0.09);
    border: 1px solid var(--kante);
    border-radius: 4px;
    padding: 0.06em 0.36em;
}

ul, ol { margin: 0 0 1.05rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

hr { border: 0; border-top: 1px solid var(--kante); margin: 2.6rem 0; }

.leise { color: var(--leise); }
/* Nachsatz unter einer Tafel. Eigene Klasse statt style="" im HTML:
   ein style-Attribut waere von `style-src 'self'` in der CSP verboten. */
.hinweis { margin: 0.9rem 0 0; }
.klein { font-size: 0.9rem; }

/* ---------- Aufmacher ---------- */

.aufmacher {
    display: grid;
    grid-template-columns: 1fr minmax(0, 300px);
    gap: 2.4rem;
    align-items: center;
    padding: 1rem 0 2.2rem;
}

.aufmacher .vorspann {
    font-size: 1.16rem;
    color: #d9e4f2;
    max-width: 34rem;
}

.aufmacher figure { margin: 0; }

.aufmacher img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 42px rgba(88, 200, 255, 0.22));
}

.zeile {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--leuchte);
    border: 1px solid var(--kante);
    border-radius: 999px;
    padding: 0.22rem 0.8rem;
    margin-bottom: 1.1rem;
}

/* ---------- Tafeln und Raster ---------- */

.tafel {
    background: var(--tafel);
    border: 1px solid var(--kante);
    border-radius: 10px;
    padding: 1.3rem 1.4rem;
}

.raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
    margin: 1.4rem 0 1rem;
}

.raster h3 { margin-top: 0; }
.raster p:last-child { margin-bottom: 0; }
/* Letzter Absatz einer Tafel schliesst buendig ab -- fruehere style=""-Stellen. */
.tafel > p:last-child { margin-bottom: 0; }

.zahl {
    display: block;
    font-size: 1.9rem;
    line-height: 1.1;
    color: var(--glut);
    font-variant-numeric: tabular-nums;
}

/* ---------- Betriebsanzeige ---------- */

.melder {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem 1.5rem;
    font-size: 0.94rem;
}

.punkt {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: var(--leise);
    display: inline-block;
    margin-right: 0.45rem;
}

.punkt.gut    { background: #57d98a; box-shadow: 0 0 10px rgba(87, 217, 138, 0.75); }
.punkt.schwer { background: var(--glut); box-shadow: 0 0 10px rgba(255, 179, 71, 0.75); }
.punkt.weg    { background: #e0555f; box-shadow: 0 0 10px rgba(224, 85, 95, 0.7); }

/* ---------- Tabellen ---------- */

.tabellenrahmen { overflow-x: auto; margin: 0 0 1.4rem; }

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 34rem;
    font-size: 0.94rem;
}

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

th { color: var(--glut); font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: rgba(88, 200, 255, 0.045); }

/* ---------- Aufklappbare Kapitel ---------- */

details.kapitel {
    border: 1px solid var(--kante);
    border-radius: 10px;
    background: var(--tafel);
    margin-bottom: 0.7rem;
    overflow: hidden;
}

details.kapitel > summary {
    cursor: pointer;
    padding: 0.85rem 1.2rem;
    font-weight: 600;
    color: #e6eefb;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

details.kapitel > summary::-webkit-details-marker { display: none; }

details.kapitel > summary::after {
    content: "+";
    margin-left: auto;
    color: var(--leuchte);
    font-size: 1.2rem;
    line-height: 1;
}

details.kapitel[open] > summary::after { content: "\2212"; }
details.kapitel > summary:hover { background: rgba(88, 200, 255, 0.06); }
details.kapitel .inhalt { padding: 0 1.2rem 0.4rem; }

/* ---------- Knöpfe ---------- */

.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.5rem 0; }

.knopf {
    display: inline-block;
    padding: 0.62rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--leuchte);
    color: var(--leuchte);
    text-decoration: none;
    font-size: 0.96rem;
    letter-spacing: 0.02em;
}

.knopf:hover { background: rgba(88, 200, 255, 0.12); color: #d5efff; }

.knopf.voll {
    background: var(--leuchte);
    color: #04121e;
    font-weight: 600;
}

.knopf.voll:hover { background: #82d8ff; color: #04121e; }

.knopf.aus {
    border-color: rgba(125, 138, 157, 0.4);
    color: var(--leise);
    cursor: default;
}

.knopf.aus:hover { background: none; color: var(--leise); }

/* ---------- Fuß ---------- */

footer.fuss {
    border-top: 1px solid var(--kante);
    background: rgba(4, 6, 12, 0.86);
    margin-top: 3rem;
}

.fuss-innen {
    max-width: var(--breite);
    margin: 0 auto;
    padding: 1.6rem 1.2rem 2.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.4rem;
    font-size: 0.9rem;
    color: var(--leise);
}

.fuss-innen a { color: var(--leise); text-decoration: none; }
.fuss-innen a:hover { color: var(--leuchte); }
.fuss-innen .rechts { margin-left: auto; }

/* ---------- Schmale Geräte ---------- */

@media (max-width: 44rem) {
    body { font-size: 16px; }
    .aufmacher { grid-template-columns: 1fr; gap: 1.4rem; }
    .aufmacher figure { max-width: 15rem; margin: 0 auto; }
    .fuss-innen .rechts { margin-left: 0; }
}

/* Wer Bewegung nicht mag, bekommt keine. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}
