
/* Wissensbasis-Wiki. Zwei Themes, weil dieselbe Seite am Schreibtisch
   und abends am Telefon gelesen wird. */
:root {
  --grund: #fdfcfa; --text: #211d1a; --gedaempft: #6b625b;
  --linie: #ded7cf; --feld: #f4f0ea;
  --deyis: #7a4b2a;      /* Deyiş: warm  */
  --ayet: #2f6b4f;       /* Kur'an: grün */
  --ehli: #8a6a2f;       /* Ehl-i Beyt: gold */
  --esma: #4a4a8a;       /* Esmâ: blau */
  --kisas: #6b4a7a;      /* Prophetenerzählung: violett */
  --ont:   #2f5f7a;      /* Ontologie: stahlblau */
  --warnung: #a33;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #16130f; --text: #ece5dc; --gedaempft: #9a8f84;
    --linie: #2f2823; --feld: #1e1a16;
    --deyis: #d8a271; --ayet: #7fc4a0; --ehli: #d9b46a;
    --esma: #a0a0e0; --kisas: #b98fd0; --ont: #7fb3d0;
    --warnung: #e08585;
  }
}
* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--grund); color: var(--text);
  line-height: 1.6; margin: 0; padding: 0 1rem 5rem;
  -webkit-text-size-adjust: 100%;
}
.huelle { max-width: 62rem; margin: 0 auto; }
a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }

/* Kopfleiste */
header.oben {
  position: sticky; top: 0; z-index: 10; background: var(--grund);
  border-bottom: 1px solid var(--linie); padding: .6rem 0; margin-bottom: 1.5rem;
}
header.oben nav { display: flex; flex-wrap: wrap; gap: .2rem .9rem;
  font-size: .88rem; max-width: 62rem; margin: 0 auto; }
header.oben nav a { text-decoration: none; color: var(--gedaempft);
  padding: .15rem 0; white-space: nowrap; }
header.oben nav a:hover { color: var(--text); }
header.oben nav a.hier { color: var(--text); font-weight: 600;
  border-bottom: 2px solid currentColor; }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.2rem 0 .3rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 .6rem; padding-top: .8rem;
     border-top: 1px solid var(--linie); }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.unterzeile { color: var(--gedaempft); margin: 0 0 1.5rem; }

/* Zahlenkacheln auf der Startseite */
.kacheln { display: grid; gap: .9rem; margin: 1.5rem 0;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.kachel { border: 1px solid var(--linie); border-radius: .5rem;
  padding: 1rem; text-decoration: none; display: block;
  border-left: 4px solid var(--linie); }
.kachel:hover { background: var(--feld); }
.kachel .zahl { font-size: 2rem; font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.kachel .was { font-weight: 600; margin-top: .2rem; }
.kachel .dazu { color: var(--gedaempft); font-size: .85rem; margin-top: .3rem; }
.k-deyis { border-left-color: var(--deyis); }
.k-ayet  { border-left-color: var(--ayet); }
.k-ehli  { border-left-color: var(--ehli); }
.k-esma  { border-left-color: var(--esma); }
.k-kisas { border-left-color: var(--kisas); }
.k-ont   { border-left-color: var(--ont); }

/* Suchfeld + Filter */
.werkzeug { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  margin: 1rem 0 1.5rem; position: sticky; top: 3rem; z-index: 5;
  background: var(--grund); padding: .6rem 0; border-bottom: 1px solid var(--linie); }
.werkzeug input[type=search], .werkzeug select {
  font: inherit; padding: .45rem .7rem; border: 1px solid var(--linie);
  border-radius: .35rem; background: var(--feld); color: var(--text);
  min-width: 12rem; flex: 1 1 14rem; }
.werkzeug .zaehler { color: var(--gedaempft); font-size: .85rem;
  font-variant-numeric: tabular-nums; }

/* Eintrag = ein Werk, eine Passage, ein Ayet */
.eintrag { border: 1px solid var(--linie); border-radius: .5rem;
  padding: .9rem 1.1rem; margin-bottom: .9rem; border-left: 4px solid var(--linie); }
.eintrag.e-deyis { border-left-color: var(--deyis); }
.eintrag.e-ayet  { border-left-color: var(--ayet); }
.eintrag.e-ehli  { border-left-color: var(--ehli); }
.eintrag.e-esma  { border-left-color: var(--esma); }
.eintrag.e-kisas { border-left-color: var(--kisas); }
.eintrag.e-ont   { border-left-color: var(--ont); }
.eintrag > .titel { font-weight: 600; font-size: 1.05rem; }
.eintrag > .titel a { text-decoration: none; }
.marke { color: var(--gedaempft); font-size: .82rem;
  font-variant-numeric: tabular-nums; margin-top: .15rem; }
.marke b { color: var(--text); font-weight: 600; }

/* Quelltext: Verse und Prosa, beide in Serif - sie sind das Eigentliche,
   alles andere ist Apparat. */
.quelltext { font-family: Georgia, "Times New Roman", serif;
  white-space: pre-wrap; margin: .6rem 0; font-size: 1.02rem; }
.prosa { font-family: Georgia, "Times New Roman", serif; margin: .6rem 0;
  font-size: .98rem; }
.ayettext { font-family: Georgia, serif; font-style: italic; margin: .3rem 0; }

/* zusammenklappbar - ohne das wären 562 Passagen auf einer Seite
   unbedienbar */
details.block { border: 1px solid var(--linie); border-radius: .5rem;
  margin-bottom: .7rem; }
details.block > summary { cursor: pointer; padding: .7rem 1rem;
  font-weight: 600; list-style-position: inside; }
details.block > summary:hover { background: var(--feld); }
details.block > .inhalt { padding: 0 1.1rem 1rem; }
details.block[open] > summary { border-bottom: 1px solid var(--linie); }

/* Tabellen */
table { border-collapse: collapse; width: 100%; font-size: .92rem;
  margin: 1rem 0; }
.tabellenrahmen { overflow-x: auto; }
th, td { text-align: left; padding: .45rem .6rem;
  border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-weight: 600; color: var(--gedaempft); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .03em; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }

/* Hinweise und Befunde */
.hinweis { background: var(--feld); border-left: 3px solid var(--gedaempft);
  padding: .8rem 1rem; margin: 1.2rem 0; border-radius: 0 .35rem .35rem 0; }
.hinweis.warn { border-left-color: var(--warnung); }
.hinweis p:first-child { margin-top: 0; }
.hinweis p:last-child { margin-bottom: 0; }
.warnfarbe { color: var(--warnung); }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .88em; background: var(--feld); padding: .1rem .35rem;
  border-radius: .25rem; }
pre { background: var(--feld); padding: .8rem 1rem; border-radius: .4rem;
  overflow-x: auto; font-size: .85rem; }
.chip { display: inline-block; background: var(--feld); border-radius: 1rem;
  padding: .1rem .6rem; font-size: .78rem; color: var(--gedaempft);
  margin: .1rem .2rem .1rem 0; white-space: nowrap; }
.leer { color: var(--gedaempft); font-style: italic; padding: 2rem 0;
  text-align: center; }
footer.unten { margin-top: 4rem; padding-top: 1rem;
  border-top: 1px solid var(--linie); color: var(--gedaempft);
  font-size: .82rem; }
.sprungliste { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0; }
.sprungliste a { text-decoration: none; padding: .2rem .5rem;
  border: 1px solid var(--linie); border-radius: .3rem; font-size: .82rem;
  font-variant-numeric: tabular-nums; }
.sprungliste a:hover { background: var(--feld); }
@media print {
  header.oben, .werkzeug { position: static; }
  .eintrag { break-inside: avoid; }
}
