/* =========================================================================
   AncientBytes.org — "Edition"
   Leitbild: eine gut gesetzte Buchausgabe, keine App-Oberfläche.
   Papier, Tinte, eine Rubrik-Farbe; dazu typografische Buchumschläge in
   gedeckten Farben. Dieses eine Stylesheet ersetzt Bulma und alle Inline-Styles.
   ========================================================================= */

/* ---------- Schrift (selbst ausgeliefert, SIL Open Font License, siehe fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/literata-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/literata-latin-opsz-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/literata-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/literata-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Grundwerte ---------- */
:root {
  --paper: #F7F3EB;
  --paper-deep: #EFE8DB;
  --paper-light: #FBF8F2;
  --ink: #221A14;
  --ink-soft: #4F443A;
  --ink-faint: #6E6155;      /* auf Papier gut lesbar (Kontrast > 5:1) */
  --rule: #DDD2C1;
  --rule-strong: #C9BBA5;
  --rubric: #8E3B28;         /* Rubrizierung: Initialen, Ziffern, Hover */
  --link: #6B4A35;
  --shadow: 0 1px 2px rgba(34, 26, 20, 0.06), 0 8px 24px rgba(34, 26, 20, 0.07);

  --measure: 36rem;          /* ~70 Zeichen pro Zeile */
  --wide: 76rem;
  --gutter: 1.5rem;
  --radius: 4px;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --step--2: 0.8rem;
  --step--1: 0.9rem;
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.12rem, 1.07rem + 0.25vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.25rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.3vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: var(--step-0);
  font-weight: 380;
  line-height: 1.7;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3 { font-weight: 360; line-height: 1.15; margin: 0; text-wrap: balance; }
strong, b { font-weight: 560; }
p { margin: 0 0 1em; }
cite { font-style: italic; }
img { max-width: 100%; height: auto; }
::selection { background: color-mix(in srgb, var(--rubric) 22%, transparent); }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--rubric); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; border-radius: 2px; }

.sc, .label {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.07em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus { top: 0.8rem; color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Kopf: Titelzeile wie bei einer Literaturzeitschrift ---------- */
.masthead {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 0;
}
.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1rem;
}
.brand { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.wordmark {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 460;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { font-style: normal; font-weight: 400; color: var(--rubric); }
.wordmark:hover { color: var(--ink); }
.tagline { margin: 0; color: var(--ink-faint); font-size: var(--step--1); font-style: italic; }

.masthead-nav {
  border-top: 1px solid var(--rule);
  border-bottom: 3px double var(--rule-strong);
}
.masthead-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1rem 0.4rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
}
.masthead-nav a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  color: var(--ink-soft);
  text-decoration: none;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.masthead-nav a:hover { color: var(--rubric); background: var(--paper-deep); }
.masthead-nav a[aria-current="page"] { color: var(--rubric); }

.masthead .masthead-search { flex: 0 1 17rem; max-width: 17rem; margin: 0; font-size: var(--step--1); }

/* ---------- Seitenkopf ---------- */
.page {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3rem var(--gutter) 1rem;
}
.page.is-wide { max-width: calc(46rem + 2 * var(--gutter)); }

.page-head { text-align: center; margin-bottom: 2.4rem; }
.page-head h1 { font-size: var(--step-3); letter-spacing: -0.012em; }
.standfirst { margin: 0 0 0.8rem; color: var(--ink-faint); }
.standfirst cite, .standfirst a { color: inherit; }
.lede {
  margin: 1rem auto 0;
  max-width: 32rem;
  color: var(--ink-soft);
  font-style: italic;
  text-wrap: pretty;
}
.page-head .themes { margin: 0.9rem 0 0; }
.page-head .jumpnav { margin: 1.1rem 0 0; }

/* Schmuckzeichen: kleine Raute zwischen zwei Haarlinien (in CSS, kein Schriftzeichen nötig) */
.fleuron {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
}
.fleuron::before, .fleuron::after { content: ""; width: 2.4rem; border-top: 1px solid var(--rule-strong); }
.fleuron i { width: 0.4rem; height: 0.4rem; background: var(--rubric); transform: rotate(45deg); }

/* Wegweiser: wo bin ich, wohin kann ich */
.crumbs {
  margin: 0 0 1.8rem;
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.crumbs a { color: var(--ink-soft); text-decoration-color: var(--rule-strong); }
.crumbs span[aria-hidden] { margin: 0 0.45rem; color: var(--rule-strong); }

.jumpnav { margin: 0 0 2rem; text-align: center; font-size: var(--step--1); color: var(--ink-faint); }
.jumpnav a { color: var(--ink-soft); }

/* ---------- Leseseite: Randnotizen | Text | Begleitspalte ---------- */
.leaf {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.6rem var(--gutter) 1rem;
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, var(--measure)) minmax(15rem, 1.2fr);
  column-gap: 3.2rem;
}
.leaf > * { grid-column: 2; }
.leaf > .crumbs { grid-column: 1 / -1; }
.leaf > .page-head { margin-bottom: 2.2rem; }

.marginalia {
  grid-column: 1;
  grid-row: 3 / span 6;
  justify-self: end;
  align-self: start;
  max-width: 12.5rem;
  padding-top: 0.35rem;
  text-align: right;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-faint);
}
.marginalia dl { margin: 0; }
.marginalia dt { color: var(--ink-soft); font-variant-caps: all-small-caps; letter-spacing: 0.07em; }
.marginalia dd { margin: 0 0 0.9rem; }
.marginalia a { color: inherit; }
.marginalia small { font-size: 0.85em; }
.marginalia .cover { margin: 0 0 1.2rem auto; }

/* Das Fragment selbst: der eigentliche Text der Seite */
.fragment {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.75;
  hanging-punctuation: first;
  text-wrap: pretty;
}
.initial::first-letter {
  float: left;
  font-size: 3.15em;
  line-height: 0.85;
  padding: 0.09em 0.09em 0 0;
  color: var(--rubric);
  font-weight: 420;
}

.prose p { text-wrap: pretty; }
.prose.is-soft { color: var(--ink-soft); }
.prose.is-italic { font-style: italic; }
.prose > :last-child { margin-bottom: 0; }

.section-mark {
  margin: 2.8rem 0 0.9rem;
  font-size: var(--step-0);
  font-weight: 400;
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.07em;
}
.section-mark::before { content: "§"; color: var(--rubric); font-variant-caps: normal; }
.section-mark::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--rule);
  transform: translateY(-0.3em);
}

/* Kennzeichnung KI-erzeugter Texte: steht direkt unter jedem solchen Text */
.ai-label {
  margin: 0.7rem 0 0;
  color: var(--ink-faint);
  font-size: var(--step--1);
  font-style: italic;
}
.page-head .ai-label { margin-top: 0.4rem; }

.ai-mark { color: var(--rubric); font-size: 0.8em; vertical-align: super; line-height: 0; text-decoration: none; font-variant-caps: normal; }

.thesis {
  margin: 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 2px solid var(--rubric);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.55;
}

.themes { margin: 2.4rem 0 0; color: var(--ink-faint); font-size: var(--step--1); text-align: center; }
.themes a { color: var(--ink-soft); }

.leaf-foot {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.leaf-foot p { margin: 0 0 0.5rem; }

/* Vorheriges / nächstes Fragment */
.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.6rem 0 0;
}
.prevnext a {
  display: block;
  height: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.prevnext a:hover { border-color: var(--rule-strong); background: var(--paper-light); color: var(--rubric); }
.prevnext small { display: block; margin-bottom: 0.15rem; color: var(--ink-faint); font-variant-caps: all-small-caps; letter-spacing: 0.07em; }
.prevnext .next { text-align: right; }

/* ---------- Begleitspalte rechts ---------- */
.companion {
  grid-column: 3;
  grid-row: 3 / span 8;
  align-self: start;
  padding-top: 0.35rem;
  font-size: var(--step--1);
  line-height: 1.5;
}
.companion section { margin: 0 0 2rem; }
.companion h2 {
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.07em;
}
.companion ul { list-style: none; margin: 0; padding: 0; }
.companion li { padding: 0.3rem 0; }
.companion li a { color: var(--ink); text-decoration: none; }
.companion li a:hover { color: var(--rubric); }
.companion li .w { display: block; color: var(--ink-faint); font-style: italic; font-size: 0.92em; }
.companion .all { display: inline-block; margin-top: 0.45rem; }

/* Das Buch: Umschlag links, Lese- und Kauflinks rechts. Kein Kasten, nur Luft. */
.book-panel { display: grid; grid-template-columns: 4.6rem 1fr; gap: 0 1rem; align-items: start; }
.book-panel h2 { grid-column: 1 / -1; }
.book-panel .cover { grid-row: 2 / span 3; }
.book-panel .title { margin: 0; font-size: var(--step-0); line-height: 1.3; }
.book-panel .title a { color: var(--ink); text-decoration: none; }
.book-panel .title a:hover { color: var(--rubric); }
.book-panel .by { margin: 0.1rem 0 0.6rem; color: var(--ink-faint); }
.book-panel .actions { list-style: none; margin: 0; padding: 0; }
.book-panel .actions li { padding: 0.12rem 0; }
.book-panel .actions a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 30%, transparent); }
.book-panel .actions .buy a { color: var(--rubric); font-weight: 480; }
.book-panel .note { grid-column: 1 / -1; margin: 0.8rem 0 0; color: var(--ink-faint); font-size: var(--step--2); font-style: italic; }

/* ---------- Typografische Buchumschläge (ohne Bilder) ---------- */
.cover {
  --tone: #6B3A2E;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 3;
  padding: 12% 10%;
  border-radius: 2px 4px 4px 2px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0, rgba(0, 0, 0, 0) 7%, rgba(255, 255, 255, 0.06) 8%, rgba(0, 0, 0, 0) 12%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 6px),
    var(--tone);
  box-shadow: 0 1px 1px rgba(34, 26, 20, 0.15), 0 6px 14px rgba(34, 26, 20, 0.14);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 6%;
  border: 1px solid rgba(255, 244, 225, 0.35);
  border-radius: 1px;
  pointer-events: none;
}
.cover .cover-label {
  position: relative;
  padding: 0.55em 0.45em 0.6em;
  background: #F5EEDF;
  border-radius: 1px;
  text-align: center;
  line-height: 1.15;
}
.cover .cover-title { display: block; font-style: italic; font-size: 0.92em; hyphens: auto; }
.cover .cover-author { display: block; margin-top: 0.35em; color: #6B5D50; font-size: 0.62em; font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
a.cover:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 2px 2px rgba(34, 26, 20, 0.15), 0 12px 24px rgba(34, 26, 20, 0.18); }
.cover.is-small { font-size: 0.62rem; padding: 10% 8%; }
.cover.is-large { font-size: 1.05rem; max-width: 11rem; }

.tone-1 { --tone: #7A3B2E; }  /* Ochsenblut */
.tone-2 { --tone: #2F4A3E; }  /* Waldgrün */
.tone-3 { --tone: #2C3E55; }  /* Tinte blau */
.tone-4 { --tone: #8A6A2F; }  /* Ocker */
.tone-5 { --tone: #5B3A52; }  /* Pflaume */
.tone-6 { --tone: #4A5058; }  /* Schiefer */
.tone-7 { --tone: #6E4B35; }  /* Nussbraun */
.tone-8 { --tone: #3E5A5E; }  /* Petrol */

/* Bücherregal: Umschläge im Raster */
.bookshelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 1.6rem 1.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bookshelf li { display: flex; flex-direction: column; gap: 0.5rem; }
.bookshelf .cover { font-size: 0.72rem; }
.bookshelf .meta { font-size: var(--step--2); color: var(--ink-faint); text-align: center; line-height: 1.35; }

/* Kompaktes Regal (Archiv): Titel mit Anzahl, zweispaltig */
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shelf li { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px dotted var(--rule-strong); }
.shelf li::before { content: ""; flex: 0 0 0.55rem; height: 0.8rem; border-radius: 1px; background: var(--tone, var(--rule-strong)); transform: translateY(0.1rem); }
.shelf a { flex: 1; color: var(--ink); text-decoration: none; font-style: italic; }
.shelf a:hover { color: var(--rubric); }
.shelf .n { color: var(--ink-faint); font-size: var(--step--1); font-variant-numeric: oldstyle-nums tabular-nums; }

/* Bücherliste mit Umschlag und Beschreibung */
.book-list { list-style: none; margin: 0; padding: 0; }
.book-list > li {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 1.3rem;
  align-items: start;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.book-list .cover { font-size: 0.58rem; }
.book-list h2 { font-size: var(--step-1); font-weight: 420; margin: 0 0 0.15rem; }
.book-list h2 a { color: var(--ink); text-decoration: none; }
.book-list h2 a:hover { color: var(--rubric); }
.book-list .by { margin: 0 0 0.5rem; color: var(--ink-faint); font-size: var(--step--1); }
.book-list p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.55; }

/* ---------- Inhaltsverzeichnis (alle Listen) ---------- */
.contents { list-style: none; padding: 0; margin: 0; }
.contents > li {
  position: relative;
  margin: 0 -0.8rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}
.contents > li:hover { background: var(--paper-light); }
.contents .line { display: flex; align-items: baseline; gap: 0.55rem; }
.contents .no {
  min-width: 2rem;
  color: var(--rubric);
  font-size: var(--step--1);
  font-variant-numeric: oldstyle-nums tabular-nums;
}
.contents .t { color: var(--ink); text-decoration: none; font-weight: 420; }
.contents .t:hover { color: var(--rubric); }
.contents > li:hover .t { color: var(--rubric); }
.contents .leader {
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--ink-faint);
  opacity: 0.5;
  transform: translateY(-0.28em);
}
.contents .w { color: var(--ink-faint); font-style: italic; white-space: nowrap; font-size: var(--step--1); }
.contents .w.is-upright { font-style: normal; }
.contents .excerpt {
  margin: 0.2rem 0 0 2.55rem;
  color: var(--ink-faint);
  font-size: var(--step--1);
  line-height: 1.55;
  text-wrap: pretty;
}
.contents .excerpt em { color: var(--rubric); font-style: normal; }
.contents.is-plain .excerpt { margin-left: 0; }

/* ---------- Blättern ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 2.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.pager a { text-decoration: none; }
.pager .pager-slot { min-width: 7rem; }
.pager .pager-slot:last-child { text-align: right; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-light);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--ink-soft); color: var(--ink); background: #fff; }
.btn.is-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.is-primary:hover { background: var(--rubric); border-color: var(--rubric); color: #fff; }

/* ---------- Startseite ---------- */
.notice {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 2rem auto 0;
  padding: 0.8rem var(--gutter);
  text-align: center;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
.notice strong { color: var(--rubric); }

.title-page {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 4rem var(--gutter) 1.5rem;
  text-align: center;
}
.title-page h1 {
  max-width: 15ch;
  margin: 0 auto 1.2rem;
  font-size: var(--step-4);
  font-weight: 340;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.title-page h1 em { color: var(--rubric); font-weight: 340; }
.title-page .intro {
  max-width: 33rem;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.search-line {
  display: flex;
  align-items: center;
  max-width: 28rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.15s ease;
}
.search-line:focus-within { border-bottom-color: var(--rubric); }
.search-line input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 0.5rem 0.2rem;
}
.search-line input::placeholder { color: var(--ink-faint); font-style: italic; }
.search-line input:focus { outline: none; }
.search-line button {
  border: 0;
  background: none;
  font: inherit;
  color: var(--link);
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.07em;
}
.search-line button:hover { color: var(--rubric); }

.frontispiece {
  position: relative;
  max-width: calc(var(--measure) + 6rem);
  margin: 3.5rem auto 0;
  padding: 2.6rem 2.6rem 2.2rem;
  background: var(--paper-light);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.frontispiece .label { display: block; margin-bottom: 1rem; color: var(--ink-faint); font-size: var(--step--1); }
.frontispiece blockquote {
  margin: 0 0 1.1rem;
  font-size: var(--step-1);
  line-height: 1.65;
  font-style: italic;
  text-wrap: pretty;
}
.frontispiece blockquote::before { content: "“"; color: var(--rubric); }
.frontispiece blockquote::after { content: "”"; color: var(--rubric); }
.frontispiece .attrib { margin: 0 0 1.2rem; color: var(--ink-faint); font-size: var(--step--1); }

.section {
  max-width: calc(46rem + 2 * var(--gutter));
  margin: 4rem auto 0;
  padding: 0 var(--gutter);
}
.section.is-wide { max-width: calc(60rem + 2 * var(--gutter)); }
.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.6rem;
  font-size: var(--step-0);
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
}
.section-title::before, .section-title::after { content: ""; flex: 1; border-bottom: 1px solid var(--rule); }
.section .more { margin: 1.4rem 0 0; text-align: center; font-size: var(--step--1); }

.ways {
  max-width: calc(60rem + 2 * var(--gutter));
  margin: 4.5rem auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.ways > div {
  position: relative;
  padding: 1.3rem 1.2rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-light);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ways > div:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); }
.ways h3 { margin: 0 0 0.35rem; font-size: var(--step-1); font-weight: 420; }
.ways h3 a { color: var(--ink); text-decoration: none; }
.ways h3 a::after { content: ""; position: absolute; inset: 0; }
.ways > div:hover h3 a { color: var(--rubric); }
.ways p { margin: 0; font-size: var(--step--1); color: var(--ink-faint); line-height: 1.5; }

/* Themen als ruhige Wortfolge mit Trennpunkten */
.theme-cloud { margin: 0; text-align: center; line-height: 2; color: var(--rule-strong); text-wrap: balance; }
.theme-cloud a { color: var(--ink-soft); text-decoration-color: var(--rule-strong); }
.theme-cloud a:hover { color: var(--rubric); }
.theme-cloud .sep { margin: 0 0.45rem; }
.theme-cloud .all { font-style: italic; }

.theme-index { columns: 3 12rem; column-gap: 2.4rem; margin: 0; padding: 0; list-style: none; }
.theme-index li { break-inside: avoid; padding: 0.2rem 0; }
.theme-index .n { color: var(--ink-faint); font-size: var(--step--1); }
.theme-letter .section-mark { margin-top: 2rem; }

.browse { margin: 0 0 2.6rem; }

/* ---------- Suche ---------- */
.results-group { margin: 2.8rem 0 0; }
.inline-list { color: var(--ink-faint); }
.inline-list a { color: var(--ink-soft); }
.empty-note { text-align: center; color: var(--ink-faint); font-style: italic; }

/* ---------- Rechtliches: Deutsch | English ---------- */
.bilingual { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.bilingual h2 { font-size: var(--step-1); margin: 0 0 1.2rem; }
.bilingual .lang { margin: 0 0 0.4rem; color: var(--rubric); }
.bilingual address { font-style: normal; margin: 0 0 1em; }

/* ---------- Inhaltswarnung: ein richtiger Dialog ---------- */
.content-note {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgba(34, 26, 20, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.content-note[hidden] { display: none; }
.content-note-card {
  width: 100%;
  max-width: 30rem;
  padding: 2.2rem 2rem 1.8rem;
  background: var(--paper-light);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(34, 26, 20, 0.28);
  text-align: center;
}
.content-note-card .fleuron { margin: 0 0 1rem; }
.content-note-card .label { display: block; margin-bottom: 0.4rem; color: var(--rubric); font-size: var(--step--1); }
.content-note-card h2 { font-size: var(--step-2); margin: 0 0 0.9rem; }
.content-note-card p { color: var(--ink-soft); font-size: var(--step--1); line-height: 1.6; }
.content-note-actions { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.has-content-note .leaf > :not(.page-head):not(.crumbs) { filter: blur(7px); }
.content-note-fallback { text-align: center; color: var(--ink-faint); font-style: italic; }

/* ---------- Fuß ---------- */
.colophon {
  width: 100%;
  margin-top: 5rem;
  border-top: 3px double var(--rule-strong);
  background: var(--paper-deep);
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.colophon-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.4rem var(--gutter) 1.2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.colophon .wordmark { font-size: 1.2rem; }
.colophon p { margin: 0.6rem 0 0; max-width: 28rem; line-height: 1.6; }
.colophon h2 { margin: 0 0 0.6rem; font-size: var(--step--1); font-weight: 400; color: var(--ink-soft); font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.colophon ul { margin: 0; padding: 0; list-style: none; }
.colophon li { padding: 0.15rem 0; }
.colophon a { color: var(--ink-soft); text-decoration-color: var(--rule-strong); }
.colophon-base {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem var(--gutter) 1.6rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--2);
}

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1100px) {
  .leaf {
    display: flex;
    flex-direction: column;
    max-width: calc(var(--measure) + 2 * var(--gutter));
  }
  /* Fakten direkt unter dem Titel, Begleitspalte nach dem Text */
  .marginalia {
    align-self: stretch;
    max-width: none;
    margin: 0 0 2rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    text-align: left;
  }
  .marginalia dl { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
  .marginalia dd { margin-bottom: 0.3rem; }
  .marginalia .cover { display: none; }
  .companion { order: 10; margin-top: 2.6rem; }
  .leaf-foot { order: 11; }
  .ways { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .masthead .masthead-search, .tagline { display: none; }
  .masthead-top { justify-content: center; }
  .colophon-inner { grid-template-columns: 1fr 1fr; }
  .colophon-inner > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .bilingual { grid-template-columns: 1fr; gap: 2.4rem; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.1rem; }
  .masthead { padding-top: 1rem; }
  .masthead-nav a { padding: 0.25rem 0.45rem; }
  .leaf, .page { padding-top: 1.6rem; }
  .title-page { padding-top: 2.6rem; }
  .frontispiece { padding: 1.8rem 1.3rem 1.6rem; margin-left: var(--gutter); margin-right: var(--gutter); }
  .contents .line { flex-wrap: wrap; }
  .contents .leader { display: none; }
  .contents .w { flex-basis: 100%; margin-left: 2.55rem; white-space: normal; }
  .contents.is-plain .w { margin-left: 0; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { text-align: left; }
  .ways { grid-template-columns: 1fr; }
  .bookshelf { grid-template-columns: repeat(3, 1fr); gap: 1.2rem 0.9rem; }
  .book-list > li { grid-template-columns: 4.2rem 1fr; gap: 1rem; }
}

/* ---------- Druck: nur der Text ---------- */
@media print {
  :root { --paper: #fff; --paper-light: #fff; --paper-deep: #fff; }
  .masthead-nav, .masthead-search, .colophon, .skip-link, .pager, .content-note,
  .leaf-foot .share, .companion, .crumbs, .jumpnav, .prevnext { display: none !important; }
  .leaf { display: block; }
  .marginalia { text-align: left; max-width: none; }
  a { color: inherit; text-decoration: none; }
}
