/* Die Gedanken sind frei … – Gestaltung angelehnt an das alte Joomla-Template „epi6“ */

:root {
  --grund-oben: #0d1416;
  --grund-unten: #4d7684;
  --flaeche: #1f3237;
  --flaeche-dunkel: #172529;
  --linie: #33505a;
  --text: #c9dbe1;
  --text-leise: #8fa9b2;
  --akzent: #8cc9d6;
  --akzent-hell: #b5d9ed;
  --akzent-kraeftig: #5bacd7;
  --schrift: Verdana, Geneva, "DejaVu Sans", sans-serif;
  --schrift-titel: "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--text);
  background: var(--grund-oben) linear-gradient(var(--grund-oben) 0, var(--grund-unten) 40rem, #26404a 100%) no-repeat;
  background-attachment: fixed;
  font: 1rem/1.7 var(--schrift);
}

a { color: var(--akzent-hell); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--akzent-kraeftig); outline-offset: 2px; }

.springen {
  position: absolute; left: -999px; top: 0;
  background: #fff; color: #000; padding: .5rem 1rem; z-index: 10;
}
.springen:focus { left: 1rem; }

.nur-vorleser {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Rahmen */
.rahmen {
  max-width: 62rem;
  margin: 2rem auto;
  background: var(--flaeche);
  border-radius: 12px;
  box-shadow: 0 6px 30px rgb(0 0 0 / .5);
  overflow: hidden;
}

.banner img { display: block; width: 100%; height: auto; }

.oben {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem;
  padding: .45rem 1.25rem;
  background: linear-gradient(#2f4850 0, #426570 15%, #334e57 50%, #1e2e33 50%, #2b424a 100%);
  border-bottom: 1px solid #111c1f;
}
.oben a {
  color: #eef6f8; text-decoration: none;
  font: 1.1rem/1.6 var(--schrift);
}
.oben a.aktiv, .oben a:hover { color: var(--akzent-hell); text-decoration: underline; text-underline-offset: 4px; }
.oben .design-schalter {
  margin-left: auto; font-size: .9rem; padding: 0 .8rem; border-radius: 999px;
  background: linear-gradient(var(--akzent-hell), var(--akzent-kraeftig)); color: #10232b; font-weight: bold;
}
.oben .design-schalter:hover { color: #10232b; filter: brightness(1.1); text-decoration: none; }

/* Bereich mit Seitenmenü und Text */
.mitte-bereich {
  display: grid;
  grid-template-columns: 1fr;
}

.seitenmenue summary {
  cursor: pointer;
  padding: .7rem 1.25rem;
  background: var(--flaeche-dunkel);
  border-bottom: 1px solid var(--linie);
  font-weight: bold;
  list-style-position: inside;
}
.seitenmenue ul { list-style: none; margin: 0; padding: 0; }
.seitenmenue nav > ul { padding: .5rem; }
.seitenmenue a {
  display: block;
  padding: .35rem .75rem .35rem 1.6rem;
  border-bottom: 1px solid var(--linie);
  background: linear-gradient(#3c4c58 0, #4b6070 15%, #3c4f5c 50%, #29353d 50%, #384752 100%);
  color: #dce9ee; text-decoration: none; font-size: .9rem;
  position: relative;
}
.seitenmenue a::before { content: "✔"; position: absolute; left: .55rem; color: #8fbf9a; font-size: .75rem; top: .45rem; }
.seitenmenue a:hover { color: #fff; filter: brightness(1.15); }
.seitenmenue a.aktiv {
  background: linear-gradient(var(--akzent-hell) 0, var(--akzent-kraeftig) 100%);
  color: #10232b;
}
.seitenmenue ul ul { background: var(--flaeche-dunkel); padding: .2rem 0 .3rem; }
.seitenmenue ul ul a {
  background: none; border: 0; padding-left: 2.2rem;
  text-decoration: underline; text-underline-offset: 3px; color: var(--akzent);
}
.seitenmenue ul ul a::before { content: none; }
.seitenmenue ul ul a.aktiv { background: #d7e3e8; color: #10232b; }

@media (min-width: 52em) {
  .mitte-bereich { grid-template-columns: 14.5rem 1fr; }
  .seitenmenue summary { display: none; }
  .seitenmenue nav > ul { padding: 1rem 0 1rem .75rem; }
}

/* Text */
.artikel {
  padding: 1.25rem 1rem 2.5rem;
  min-width: 0;
  max-width: 48rem;
  overflow-wrap: break-word;
}
@media (min-width: 40em) { .artikel { padding: 1.5rem 2rem 3rem; } }

.artikel h1, .artikel h2, .artikel h3 {
  font-family: var(--schrift-titel);
  color: var(--akzent);
  line-height: 1.3;
  font-weight: bold;
}
.artikel h1 { font-size: 1.7rem; margin: 0 0 1rem; }
.artikel h2 { font-size: 1.35rem; margin: 2.2rem 0 .7rem; }
.artikel h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.artikel p { margin: 0 0 1rem; }
.artikel em { color: #e2ecef; }
.artikel .quelle, .artikel .quelle em { color: var(--text-leise); }
.artikel .mitte { text-align: center; }
.artikel .rechts { text-align: right; }
.artikel img { max-width: 100%; height: auto; border-radius: 3px; }
.artikel img.rechts { float: right; margin: 0 0 .5rem 1rem; }
.artikel p:has(> img:only-child), .artikel p:has(> em > img:only-child) { overflow: hidden; }
.artikel table { border-collapse: collapse; margin: 1rem 0; max-width: 100%; display: block; overflow-x: auto; }
.artikel td, .artikel th { border: 1px solid var(--linie); padding: .3rem .6rem; vertical-align: top; }
.artikel ul, .artikel ol { padding-left: 1.4rem; }

hr { border: 0; border-top: 1px solid var(--linie); margin: 2rem 0; }
hr.teil { margin: 2.5rem 0; border-top-style: dashed; }

.verzeichnis {
  background: var(--flaeche-dunkel);
  border-left: 3px solid var(--akzent-kraeftig);
  padding: .75rem 1.25rem .5rem;
  margin: 0 0 2rem;
  border-radius: 0 6px 6px 0;
}
.verzeichnis h2 { font-size: 1rem !important; margin: 0 0 .4rem !important; color: var(--text) !important; }
.verzeichnis ol { margin: 0 0 .5rem; padding-left: 1.4rem; }
.verzeichnis a { text-decoration: none; }
.verzeichnis a:hover { text-decoration: underline; }

/* Statistik */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.kachel {
  background: var(--flaeche-dunkel); border: 1px solid var(--linie); border-radius: 8px;
  padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem;
}
.kachel strong { font-size: 1.6rem; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kachel span { font-size: .8rem; color: var(--text-leise); }
.kachel .kachel-name { color: var(--text); font-size: .85rem; }
.leise { color: var(--text-leise); font-size: .85rem; }
.hinweis { background: #4a2f2f; border-left: 3px solid #d98c8c; padding: .5rem .8rem; }
.tabelle { width: 100%; display: table !important; font-size: .9rem; }
.tabelle th { text-align: left; background: var(--flaeche-dunkel); }
.tabelle .zahl, .tabelle th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.verlauf .balken-zelle { position: relative; min-width: 9rem; text-align: right; }
.verlauf .balken {
  position: absolute; left: .3rem; top: 25%; height: 50%; width: calc(var(--w) * .65);
  background: var(--akzent-kraeftig); border-radius: 2px; opacity: .8;
}
.verlauf .wert { position: relative; font-variant-numeric: tabular-nums; }
.anmeldung { display: flex; flex-direction: column; gap: .5rem; max-width: 20rem; }
.anmeldung input {
  font: inherit; padding: .5rem .6rem; border-radius: 4px; border: 1px solid var(--linie);
  background: #0f1a1d; color: var(--text);
}
.anmeldung button, .abmelden button {
  font: inherit; padding: .5rem 1rem; border: 0; border-radius: 4px; cursor: pointer;
  background: linear-gradient(var(--akzent-hell), var(--akzent-kraeftig)); color: #10232b; font-weight: bold;
}
.abmelden { margin-top: 2rem; }
code.hash { display: block; padding: .5rem; background: #0f1a1d; word-break: break-all; user-select: all; }

/* Fuß */
.fuss {
  background: linear-gradient(#6d9cab 0, #5d90a2 16%, #2d454e 100%);
  color: #e7f1f4;
  text-align: center;
  font-size: .85rem;
  padding: 1rem;
}
.fuss p { margin: 0; }

@media (max-width: 62rem) {
  .rahmen { margin: 0; border-radius: 0; }
}

@media print {
  body { background: #fff; color: #000; }
  .rahmen { box-shadow: none; margin: 0; max-width: none; background: #fff; }
  .oben, .seitenmenue, .springen, .fuss { display: none; }
  .mitte-bereich { display: block; }
  .artikel h1, .artikel h2, .artikel h3, .artikel em, a { color: #000; }
}
