/* Statische KBGA-Edition — MODERNES SHELL.
   Der Textkörper (.content, tei-* Klassen) wird ausschliesslich von der
   geernteten ODD-CSS (/assets/odd/{odd}.css) gestylt -> 1:1 wie die Live-App.
   Diese Datei stylt nur den Rahmen und setzt die von der ODD-CSS erwarteten
   CSS-Variablen. */

:root {
  --measure: 40rem;          /* Lesebreite (frei wählbar; Druck legt sie nicht fest) */
  --ink: #1a1a1a;
  --ink-soft: #5b5750;
  --paper: #fbfaf7;
  --accent: #22adeb;         /* Blau der alten Edition (theme-barth.css) */
  --rule: #e3ddd2;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Von der ODD-CSS referenzierte Variablen (sonst undefiniert) */
  --pb-link-color: var(--accent);
  --pb-heading-font-family: var(--sans);
  --pb-heading-font-weight: 600;
  --pb-heading-line-height: 1.2;
  --pb-footnote-font-size: 0.84rem;
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.62;
}

/* ---- Shell: Header/Footer ---- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.brand { display: flex; align-items: center; gap: .95rem; color: var(--ink); text-decoration: none; }
/* Auf Textseiten lädt die ODD-CSS eine globale Regel `a:link, a:visited { color: --pb-link-color }`
   (blau). Der Brand-Titel ist Seiten-Chrome, kein TEI-Link → mit höherer Spezifität schwarz halten. */
.brand:link, .brand:visited { color: var(--ink); }
.brand-logo { height: 3rem; width: auto; display: block; }
.brand-title { font-weight: 650; letter-spacing: -.01em; font-size: 1.12rem; line-height: 1; }
/* Varianten-Badge (z. B. "Pilot") — kennzeichnet Nicht-Produktiv-Builds. */
.brand-badge { align-self: center; font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: var(--accent); padding: .12rem .42rem;
  border-radius: .5rem; line-height: 1; white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.site-nav > a { color: var(--accent); text-decoration: none; font-size: .9rem; }
.site-nav > a:hover { text-decoration: underline; }

/* Register-Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; color: var(--accent); font-size: .9rem;
  display: inline-flex; align-items: center; gap: .25rem;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: "▾"; font-size: .8em; opacity: .7; }
.nav-dropdown[open] summary::after { content: "▴"; }
.nav-menu {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 20;
  display: flex; flex-direction: column; min-width: 11rem;
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: .35rem;
}
.nav-menu a {
  color: var(--ink); text-decoration: none; font-size: .88rem;
  padding: .45rem .7rem; border-radius: 5px;
}
.nav-menu a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }

/* Pagefind-UI an die Editionsfarben anpassen */
/* ===================== Facettierte Suche ===================== */
.search-app { max-width: 64rem; margin: 0 auto; font-family: var(--sans); }
.search-bar input {
  width: 100%; font-size: 1.1rem; padding: .8rem 1rem; box-sizing: border-box;
  border: 1px solid var(--rule); border-radius: 10px; font-family: var(--sans);
}
.search-bar input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.search-grid { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; margin-top: 1.4rem; }
@media (max-width: 52rem) { .search-grid { grid-template-columns: 1fr; } }

.facets { display: flex; flex-direction: column; gap: 1.4rem; align-self: start; }
.facet h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); margin: 0 0 .6rem; font-weight: 600; }
.facet-search { width: 100%; box-sizing: border-box; font-size: .85rem; font-family: var(--sans);
  padding: .4rem .6rem; border: 1px solid var(--rule); border-radius: 6px; margin-bottom: .5rem; }

/* Histogramm */
.histogram { display: flex; align-items: flex-end; gap: 1px; height: 56px; margin-bottom: .3rem; }
.hbar { flex: 1; background: var(--rule); border-radius: 1px 1px 0 0; min-width: 1px; }
.hbar.in { background: color-mix(in srgb, var(--accent) 55%, transparent); }

/* Dual-Range-Slider (zwei überlagerte Inputs) */
.range { position: relative; height: 1.4rem; }
.range input { position: absolute; left: 0; top: 0; width: 100%; margin: 0; -webkit-appearance: none;
  appearance: none; background: none; pointer-events: none; }
.range input::-webkit-slider-runnable-track { height: 3px; background: var(--rule); border-radius: 3px; }
.range input::-moz-range-track { height: 3px; background: var(--rule); border-radius: 3px; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 15px; height: 15px;
  margin-top: -6px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
.range input::-moz-range-thumb { pointer-events: auto; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-soft); }

/* Checkbox-Listen */
.check-list { display: flex; flex-direction: column; gap: .1rem; }
.check-list.scroll { max-height: 14rem; overflow-y: auto; }
.check-list label { display: flex; align-items: center; gap: .45rem; font-size: .85rem;
  padding: .2rem .3rem; border-radius: 4px; cursor: pointer; }
.check-list label:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.check-list label.on { color: var(--accent); }
.check-list label span:nth-of-type(1) { flex: 1; }
.check-list .cnt { color: var(--ink-soft); font-size: .75rem; }
.check-list input { accent-color: var(--accent); }
.facet-empty { color: var(--ink-soft); font-size: .82rem; margin: .2rem; }

/* Aktive Filter */
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip { font-family: var(--sans); font-size: .8rem; cursor: pointer; border: 0;
  background: var(--accent); color: #fff; padding: .25rem .3rem .25rem .7rem; border-radius: 999px; }
.chip span { opacity: .8; padding: 0 .3rem; }
.chip:hover { opacity: .9; }

/* Ergebnisse */
.result-count { font-size: .8rem; color: var(--ink-soft); margin: 0 0 1rem; }
.result { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.result a { text-decoration: none; }
.r-title { font-size: 1.05rem; color: var(--accent); }
.result a:hover .r-title { text-decoration: underline; }
.r-meta { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; margin: .15rem 0; }
.r-excerpt { font-size: .9rem; line-height: 1.5; margin: .3rem 0 0; color: #3a3733; }
.r-excerpt mark { background: color-mix(in srgb, var(--accent) 20%, transparent); color: inherit; }
.more-btn { margin-top: 1.2rem; font-family: var(--sans); font-size: .85rem; cursor: pointer;
  padding: .55rem 1.2rem; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--accent); }
.more-btn:hover { border-color: var(--accent); }

.site-footer {
  margin-top: 4rem; border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-size: .85rem; font-family: var(--sans);
  background: color-mix(in srgb, var(--paper) 60%, #efe9df);
}
.footer-inner {
  max-width: 72rem; margin: 0 auto;
  padding: 2.2rem clamp(1rem, 4vw, 2.5rem);
  display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: center; justify-content: space-between;
}
.footer-col { flex: 0 1 auto; }
.footer-address { font-style: normal; line-height: 1.55; }
.footer-address a { color: var(--accent); text-decoration: none; }
.footer-address a:hover { text-decoration: underline; }
.footer-nav { display: flex; flex-direction: column; gap: .45rem; }
.footer-nav > a { color: var(--accent); text-decoration: none; }
.footer-nav > a:hover { text-decoration: underline; }
.footer-social { display: flex; gap: .9rem; margin-top: .35rem; }
.footer-social a { color: var(--ink-soft); display: inline-flex; }
.footer-social a:hover { color: var(--accent); }
.footer-sagw { display: block; }
.footer-sagw img { height: 4.2rem; width: auto; display: block; }
.footer-ee { display: block; }
.footer-ee img { width: 155px; height: auto; display: block; }
@media (max-width: 48rem) {
  .footer-inner { justify-content: flex-start; gap: 1.6rem 2.5rem; }
}
.footer-meta {
  margin: 0; text-align: center; padding: .9rem 1rem;
  border-top: 1px solid var(--rule); font-size: .78rem;
}
.footer-meta a { color: var(--accent); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }

/* ---- Lesespalte (Rahmen um den ODD-Textkörper) ---- */
.reading { padding: 0 clamp(1rem, 4vw, 0); }
.tei-document { max-width: var(--measure); margin: 2.5rem auto 0; }

.doc-head { margin-bottom: 2rem; }
.doc-meta { font-family: var(--sans); font-size: .72rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .4rem; }
.doc-head h1 { font-size: 1.7rem; line-height: 1.2; margin: 0; letter-spacing: -.01em;
  font-family: var(--sans); font-weight: 650; }

/* Fussnoten-Apparat etwas vom Text absetzen (Inhalt bleibt ODD-gestylt) */
.apparatus { display: block; margin-top: 2.4rem; padding-top: 1.2rem;
  border-top: 1px solid var(--rule); }
/* Endnoten-Apparat kompakt layouten (jede Note ist ein <dl><dt>Nr</dt><dd>Text</dd></dl>;
   Browser-Defaults geben dd 40px Einzug und jedem dl 1em Abstand). */
.apparatus .footnotes { display: block; text-align: left; }
.apparatus dl.footnote {
  display: flex; align-items: baseline; gap: .45em;
  margin: 0 0 .3em; padding: 0;
}
.apparatus dl.footnote dt.fn-number {
  flex: 0 0 auto; min-width: 1.5em; text-align: right;
  color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.apparatus dl.footnote dd.fn-content { flex: 1 1 auto; margin: 0; }
.apparatus .fn-back { margin-left: .3em; text-decoration: none; opacity: .45; }
/* Notentexte enthalten teils Blöcke (<p>, Zitat-<div>, Tabellen). Deren Aussenabstände
   sind INNERHALB einer Note unerwünscht: oben schöben sie die Note von ihrer Ziffer weg,
   unten hängten sie eine Leerzeile an. Gilt ebenso im Fussnoten-Tooltip. */
.apparatus dl.footnote dd.fn-content > :first-child,
.fn-tooltip > :first-child { margin-top: 0; }
.apparatus dl.footnote dd.fn-content > :last-child,
.fn-tooltip > :last-child { margin-bottom: 0; }
/* Liste/Tabelle am Notenende: dort bleibt der Rücksprungpfeil aussen (ein <a> als
   direktes Kind wäre ungültig), der Abstand des Blocks davor muss trotzdem weg. */
.apparatus dl.footnote dd.fn-content > :has(+ .fn-back) { margin-bottom: 0; }

/* ================= Textseite: Zwei-Spalten-Layout ================= */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) 16rem;
  justify-content: center;
  align-items: start;
  /* Gutter ≥ 95px, weil die ODD-CSS Seitenzahlen (.pb-column) mit right:-95px
     aus der Lesespalte in den rechten Rand ragen — sonst überdeckt die Info-Spalte sie. */
  column-gap: 7rem;
  max-width: calc(var(--measure) + 16rem + 7rem);
  margin: 0 auto;
}
.doc-layout .tei-document { max-width: none; margin: 1.4rem 0 0; }

/* Band-Navigation (über beide Spalten) */
.band-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem 0;
  margin-top: .5rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: .82rem;
}
.band-nav a { text-decoration: none; color: var(--ink); }
.band-nav a:hover { text-decoration: underline; }
/* Drei-teilige Navigation: lange Nachbar-Titel kürzen (…) statt überlappen.
   min-width:0 + overflow/ellipsis lässt jeden Teil schrumpfen; die Seiten teilen
   sich den Platz gleichmässig (flex:1), die Mitte schrumpft zuletzt. */
.band-prev, .band-pos, .band-next { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-prev, .band-next, .band-nav > span:empty { flex: 1 1 0; }
.band-next { text-align: right; }
.band-pos { flex: 0 1 auto; text-align: center; color: var(--ink-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.band-nav .arr { opacity: .6; }

/* Metadaten-Spalte */
.meta-col {
  position: sticky; top: 4.5rem;
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: .8rem; line-height: 1.5; color: #3a3733;
}
.meta-block { margin-bottom: 1.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.meta-block:last-child { border-bottom: 0; }
.meta-block h2 {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); margin: 0 0 .6rem; font-weight: 600;
}
.cite-suggest { margin: 0; }
.cite-suggest a { word-break: break-word; }
/* Links der Metadaten-Spalte (Zitiervorschlag, Textgrundlage …) im Akzent-Blau ohne
   Unterstreichung. Nötig, seit die ODD-CSS auf .tei-document gescopt ist und die meta-col
   (ausserhalb) nicht mehr einfärbt — sonst Browser-Default-Blau mit Unterstreichung. */
.meta-col a { color: var(--accent); text-decoration: none; }
.meta-col a:hover { text-decoration: underline; }
.witness, .print-source { margin: 0 0 .7rem; }
.print-source .ps-label { color: var(--ink-soft); }

@media (max-width: 64rem) {
  .doc-layout { grid-template-columns: minmax(0, var(--measure)); }
  .meta-col { position: static; border-top: 1px solid var(--rule); padding-top: 1.4rem; }
}

/* ---- Register ---- */
.register-page { max-width: 46rem; }
.register-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.4rem; }
.register-tabs a { font-family: var(--sans); font-size: .82rem; text-decoration: none;
  padding: .35rem .8rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); }
.register-tabs a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.register-tabs a span { opacity: .6; font-size: .9em; }
.reg-filter { width: 100%; font-family: var(--sans); font-size: .95rem;
  padding: .6rem .9rem; border: 1px solid var(--rule); border-radius: 8px; margin-bottom: 1rem; }
.reg-list { list-style: none; padding: 0; margin: 0;
  columns: 2; column-gap: 2.5rem; font-family: var(--sans); font-size: .9rem; }
.reg-list li { break-inside: avoid; padding: .2rem 0; }
.reg-list a { text-decoration: none; color: var(--ink); }
.reg-list a:hover { color: var(--accent); text-decoration: underline; }
.reg-empty { color: var(--ink-soft); font-family: var(--sans); }
@media (max-width: 40rem) { .reg-list { columns: 1; } }

.bible-testament { font-family: var(--sans); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-soft); margin: 1.6rem 0 .6rem;
  border-bottom: 1px solid var(--rule); padding-bottom: .3rem; }
.bible-book { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: .4rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.bb-name { font-weight: 600; }
.bb-passages { font-family: var(--sans); font-size: .85rem; line-height: 1.7; }
.bb-passages a { text-decoration: none; color: var(--accent); }
.bb-passages a:hover { text-decoration: underline; }
@media (max-width: 34rem) { .bible-book { grid-template-columns: 1fr; gap: .1rem; } }

.entity-body { margin-top: 1rem; }
.entity-body .entity-details { line-height: 1.6; }

/* Fundstellen im Text */
.occurrences { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.occurrences h2 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft); margin: 0 0 .7rem; font-weight: 600; }
.occurrences h2 span { opacity: .6; }
.occurrences ul { list-style: none; padding: 0; margin: 0; }
.occurrences li { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.occ-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  text-decoration: none; }
.occ-title { color: var(--accent); }
.occ-head:hover .occ-title { text-decoration: underline; }
.occ-date { font-family: var(--sans); font-size: .75rem; color: var(--ink-soft); white-space: nowrap; }
.occ-snippet { margin: .35rem 0 0; font-size: .85rem; line-height: 1.5; color: #443f3a; }
.occ-snippet mark { background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: inherit; padding: 0 .1em; border-radius: 2px; }

/* Externe Links (rechte Spalte der Entitätsseite) */
.ext-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ext-links a { display: inline-block; font-size: .8rem; text-decoration: none;
  padding: .25rem .65rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--accent); }
.ext-links a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---- Popover-Tooltip (Vanilla, ersetzt pb-popover) ---- */
pb-popover.has-popover {
  color: var(--accent); cursor: help;
}
a[rel="footnote"] { cursor: help; }
/* Nicht-online-Verweis (tei-ref type="pub-"): kein Link, Hinweis nur als Mouseover (title). */
.tei-ref.alternate[title] { cursor: help; }
.kbga-tip {
  position: absolute; z-index: 50; max-width: 30rem; max-height: 50vh; overflow-y: auto;
  background: #fff; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: .8rem 1rem;
  font-family: var(--sans); font-size: .85rem; line-height: 1.5;
}
.kbga-tip .entity-details { font-family: inherit; }
.kbga-tip a { color: var(--accent); }
.kbga-tip .tip-empty { color: var(--ink-soft); margin: 0; }
/* "Detail"-Link im Popover: eigene Zeile, rechtsbündig, Akzent-Blau, ohne Unterstreichung. */
.kbga-tip .tip-detail { margin: .6rem 0 0; padding-top: .5rem; border-top: 1px solid var(--rule); text-align: right; }
.kbga-tip .tip-detail a { color: var(--accent); text-decoration: none; font-size: .82rem; }
/* Bibel-Popover/-Seite: Abstand zwischen Versziffer und Verstext. */
.verse-number { margin-right: .3em; }

/* ---- Ohne pb-components-JS: Quellblöcke verstecken ---- */
/* Fussnoten-Quellen (werden im Live-Betrieb von pb-popover als Hover-Popover konsumiert) */
.content .popovers { display: none; }
/* Platzhaltertext "Lade …" der Remote-Popover (Personen/Orte/Bibel) */
[slot="alternate"] { display: none; }

/* ---- Startseite ---- */
.intro { font-size: 1.05rem; color: #2c2a27; margin: 1.2rem 0; }
.intro-actions { display: flex; gap: .7rem; margin: 1.4rem 0 2.5rem; }
.btn { display: inline-block; font-family: var(--sans); font-size: .85rem;
  padding: .5rem 1.1rem; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--rule); }
.btn:hover { opacity: .9; }
.section-title { font-family: var(--sans); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-soft); margin: 2rem 0 .8rem; }

.volume-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.volume-cards a { display: flex; flex-direction: column; gap: .15rem;
  padding: .9rem 1.1rem; border: 1px solid var(--rule); border-radius: 8px;
  text-decoration: none; color: var(--ink); background: #fff; }
.volume-cards a:hover { border-color: var(--accent); }
.vc-title { font-size: 1.02rem; }
.vc-meta { font-family: var(--sans); font-size: .72rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .03em; }

/* ---- Band-Inhaltsverzeichnis ---- */
.toc { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .6rem 0; text-decoration: none; color: var(--ink); }
.toc a:hover .toc-title { color: var(--accent); text-decoration: underline; }
.toc-title { flex: 1; }
.toc-date { font-family: var(--sans); font-size: .75rem; color: var(--ink-soft); white-space: nowrap; }

/* ---- Übersicht: Bände ---- */
.volume { margin: 2.2rem 0; }
.volume-title { font-family: var(--sans); font-size: 1.05rem; font-weight: 600;
  margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 2px solid var(--rule); }
.volume-count { font-weight: 400; font-size: .72rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .03em; margin-left: .4rem; }

/* ---- Übersichtsliste ---- */
.doc-list { list-style: none; padding: 0; margin: .4rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .2rem .8rem; }
.doc-list li { padding: .35rem 0; border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; }
.doc-list a { font-size: .95rem; text-decoration: none; color: var(--accent); }
.doc-list a:hover { text-decoration: underline; }
.doc-list-meta { font-family: var(--sans); font-size: .72rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .03em; }

/* Fundstellen-Sprungziele: nicht unter dem Sticky-Header verstecken + kurz hervorheben. */
[id^="occ-"] { scroll-margin-top: 5.5rem; }
[id^="occ-"]:target { background: #fde68a; box-shadow: 0 0 0 .2em #fde68a; border-radius: .1em;
  animation: occ-fade 2.5s ease-out forwards; }
@keyframes occ-fade { 0%,40% { background: #fde68a; box-shadow: 0 0 0 .2em #fde68a; }
  100% { background: transparent; box-shadow: 0 0 0 .2em transparent; } }

/* Prosa-Seiten (Über die Edition, Changelog) */
.prose { font-family: var(--sans); line-height: 1.65; }
.prose h2 { font-size: 1.15rem; margin: 2rem 0 .6rem; font-weight: 650; }
.prose h3 { font-size: 1rem; margin: 1.4rem 0 .4rem; font-weight: 650; color: var(--ink-soft); }
.prose p { margin: .7rem 0; }
.prose ul { margin: .6rem 0; padding-left: 1.2rem; }
.prose li { margin: .25rem 0; }
.prose a { color: var(--accent); }
.prose address { font-style: normal; line-height: 1.7; }
.tei-download { color: var(--accent); text-decoration: none; font-family: var(--sans); font-size: .85rem; }
.tei-download::before { content: "⤓ "; }
.tei-download:hover { text-decoration: underline; }

/* Prosa-Seiten mit Inhaltsverzeichnis (linke Spalte) */
.prose-layout {
  display: grid; grid-template-columns: 13rem minmax(0, var(--measure)); gap: 2.5rem;
  width: fit-content; max-width: 100%; margin: 2.5rem auto 0; padding: 0 clamp(1rem, 4vw, 0);
}
.prose-layout .tei-document { margin: 0; }
.prose-toc { align-self: start; position: sticky; top: 5rem; font-family: var(--sans); font-size: .82rem; }
.toc-title { text-transform: uppercase; letter-spacing: .05em; font-size: .68rem; color: var(--ink-soft); margin: 0 0 .6rem; }
.prose-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.prose-toc a { color: var(--ink-soft); text-decoration: none; display: block; line-height: 1.3;
  border-left: 2px solid var(--rule); padding: .12rem 0 .12rem .6rem; }
.prose-toc a:hover { color: var(--accent); border-color: var(--accent); }
.prose h2[id] { scroll-margin-top: 5rem; }
@media (max-width: 56rem) {
  .prose-layout { grid-template-columns: 1fr; width: auto; max-width: var(--measure); }
  .prose-toc { position: static; top: auto; display: none; }
}

/* Fußnoten-Tooltip (Text der Fussnote beim Überfahren der Ziffer) */
.fn-tooltip {
  position: absolute; z-index: 50; max-width: 28rem; width: max-content;
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: .7rem .9rem;
  font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--ink);
}
.fn-tooltip a { color: var(--accent); }
.fn-tooltip .fn-number { font-weight: 650; margin-right: .3rem; }

/* Fussnoten-Marken einheitlich. rem statt em: absolute, vom Eltern-Span unabhängige
   Grösse (öffnende Marke sitzt in .tei-anchor2 = normal, schliessende in .tei-note5 =
   smaller -> sonst ungleich gross). Farbe für beide gleich (öffnende war schwarz). */
.content a[rel="footnote"] { font-size: .72rem; color: var(--accent); cursor: pointer; text-decoration: none; }
.content a[rel="footnote"]:hover { text-decoration: underline; }

/* Gruppierter Fußnoten-Apparat (Original / Textkritik / Sach / Digital) */
.fn-group + .fn-group { margin-top: 1.3rem; }
.fn-group-title { font-family: var(--sans); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-soft); margin: 0 0 .4rem; font-weight: 600; }

/* Startseite: Bände nach Abteilung gruppiert */
.abteilung { margin-top: 1.6rem; }
.abteilung-title { font-family: var(--sans); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-soft); margin: 0 0 .6rem; font-weight: 600; }

/* Register-Detailseite: Externe Links inline (einspaltig wie die Registerliste,
   damit die Seitenränder beim Wechsel Liste -> Eintrag nicht springen). */
.ext-links-inline { font-family: var(--sans); font-size: .85rem; margin: 1.1rem 0 0; }
.ext-links-inline a { color: var(--accent); text-decoration: none; }
.ext-links-inline a:hover { text-decoration: underline; }
