/* =========================================================================
   Peter Pröll — glossar.css
   dpn_glossary: Übersicht (List) + Einzelansicht (Show).
   Lädt zusätzlich zu base.css; Design-Tokens & Grundtypografie kommen von dort.
   Wird per f:asset.css nur auf den Glossar-Templates eingebunden.
   ========================================================================= */

/* =========================================================================
   ÜBERSICHT
   ========================================================================= */

.glossar-liste { padding-block: 56px 0; max-width: 820px; }

.gl-kopf { margin-bottom: 40px; }
.gl-kopf .gl-titel {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--tinte);
  letter-spacing: -.01em;
  margin-top: 4px;
}

/* ---- Buchstabengruppe: großer Serifen-Marker links, Einträge rechts ---- */
.gl-gruppe {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 24px;
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--linie);
}
.gl-gruppe:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

.gl-buchstabe {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: var(--hauch);
  position: sticky;
  top: 28px;
}

/* ---- Einträge ---- */
.gl-eintraege { list-style: none; margin: 0; padding: 0; }
.gl-eintrag {
  padding: 14px 0;
  border-top: 1px solid var(--linie);
}
.gl-eintrag:first-child { border-top: none; padding-top: 2px; }

.gl-begriff {
  display: inline-block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tinte);
  border: 0;
  text-decoration: none;
}
.gl-begriff:hover,
.gl-begriff:focus-visible { color: var(--rot); }
.gl-begriff:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; }

.gl-gloss {
  display: block;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--gedaempft);
  margin-top: 2px;
  max-width: 60ch;
}

/* =========================================================================
   EINZELANSICHT
   ========================================================================= */

.glossar-detail { padding-block: 56px 0; }

/* Standard (ohne Bild): eine Spalte in Lesebreite. */
.gd-inhalt { min-width: 0; max-width: 680px; }

/* Mit Bild: Text links, Porträt rechts. */
.glossar-detail.hat-bild {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}

/* ---- Kopf ---- */
.gd-kopf { margin-bottom: 24px; }
.gd-titel {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.12;
  font-weight: 600;
  color: var(--tinte);
  letter-spacing: -.01em;
  margin-top: 4px;
}
.gd-sprache {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--hauch);
  margin-top: 8px;
}

/* ---- Definitionstext ---- */
.gd-text { font-size: 18px; line-height: 1.65; color: var(--text); }
.gd-text p { margin-bottom: 1em; }
.gd-text p:last-child { margin-bottom: 0; }
.gd-text a { color: var(--rot); }
.gd-text a:hover { color: var(--rot-tief); }
/* Glossar-Begriffe im Fließtext bleiben leise (Fließtextfarbe, gepunktet) –
   sonst überschreibt ".gd-text a" (rot) die globale .glossary-term-Optik. */
.gd-text a.glossary-term,
.gd-text a.glossary-term:hover { color: inherit; }

.gd-bedeutung {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rot);
  margin: 0 0 6px;
}
.gd-text .gd-bedeutung + p { margin-top: 0; }

.gd-trenner {
  border: 0;
  border-top: 1px solid var(--linie);
  margin: 28px 0;
}

/* ---- Synonyme ---- */
.gd-synonyme {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--gedaempft);
  margin-top: 28px;
}
.gd-synonyme .label { color: var(--hauch); margin-right: 4px; }

/* ---- Zurück-Link ---- */
.gd-zurueck {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--linie);
}
.gd-zurueck a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--tinte);
  color: var(--papier);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background-color .15s ease, transform .15s ease;
}
.gd-zurueck a:hover {
  color: var(--papier);
  background: #000;
  transform: translateY(-1px);
}

/* ---- Porträt / Bild ---- */
.gd-bild { position: sticky; top: 28px; }
.gd-bild figure { margin: 0; }
.gd-bild .rahmen {
  aspect-ratio: 1 / 1;
  background: var(--karton);
  border-radius: 10px;
  overflow: hidden;
}
.gd-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-bild figcaption {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--gedaempft);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gd-bild figcaption .credit { color: var(--hauch); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 720px) {
  .gl-gruppe { grid-template-columns: 1fr; gap: 4px; }
  .gl-buchstabe { position: static; font-size: 30px; margin-bottom: 4px; }
  .gl-kopf .gl-titel,
  .gd-titel { font-size: 30px; }

  .glossar-detail.hat-bild { grid-template-columns: 1fr; gap: 0; }
  .glossar-detail.hat-bild .gd-bild {
    position: static;
    order: -1;
    margin-bottom: 28px;
    max-width: 260px;
  }
}
