/* ==========================================================================
   Bibelarbeit – zentrales Stylesheet (modernisiert)
   Ersetzt die historischen Inline-Styles der ca. 25 Jahre alten Seiten.
   ========================================================================== */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #2b2a27;
  --ink-soft: #5c5a55;
  --accent: #7a5c2e;          /* gedämpftes Gold/Ocker */
  --accent-strong: #5d451f;
  --link: #1a5276;
  --link-visited: #1a5276;
  --border: #e3ded4;
  --shadow: 0 1px 3px rgba(43, 42, 39, 0.08), 0 8px 24px rgba(43, 42, 39, 0.06);
  --radius: 10px;
  --max-width: 62rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.7 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

/* --- Lesbarkeit Überspringen-Link --- */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* --- Kopf --- */
.site-header {
  background: linear-gradient(180deg, #fffdf9 0%, #f5efe4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2rem 1.6rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
}

.site-brand {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.site-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
  color: var(--ink);
}
.site-header h1 .aka {
  display: block;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink-soft);
  font-weight: normal;
  letter-spacing: 0.03em;
}

.hebrew-title {
  font-size: 1.5rem;
  color: var(--accent-strong);
  margin: 0.5rem 0 1rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.quick-links a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}
.quick-links a:hover { border-color: var(--link); }

/* --- Inhaltsverzeichnis --- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
}
.toc ul { margin: 0; padding: 0; list-style: none; column-count: 2; column-gap: 2rem; }
.toc a { text-decoration: none; color: var(--link); }
.toc a:hover { text-decoration: underline; }

/* --- Typografie --- */
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  color: var(--accent-strong);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.35rem;
  margin: 2.75rem 0 1rem;
}
h3 {
  font-size: 1.15rem;
  color: var(--accent-strong);
  margin: 1.75rem 0 0.5rem;
}

p, li, dd { max-width: 72ch; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.05rem; color: var(--ink-soft); }

a { color: var(--link); }
a:visited { color: var(--link-visited); }

[lang="he"], [lang="syr"] { font-family: "SBL Hebrew", "Times New Roman", serif; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code {
  background: #f1ede4;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* --- Kapitel-Navigation (Prolog, 1–52) --- */
.chapter-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
}
.chapter-nav a {
  display: inline-block;
  min-width: 2.4rem;
  text-align: center;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, background 0.15s;
}
.chapter-nav a:hover {
  border-color: var(--accent);
  background: #f7f2e8;
}

/* --- Sigla-Tabelle --- */
table.sigla {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.98rem;
  margin: 1rem 0 2rem;
}
table.sigla td {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  vertical-align: top;
}
table.sigla tr:first-child td { border-top: 0; }
table.sigla td:first-child {
  white-space: nowrap;
  font-weight: 600;
  color: var(--accent-strong);
  width: 22%;
}

/* --- Listen --- */
ol, ul { padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }
p.indent { padding-left: 1.5rem; }

/* --- Fundnotizen / Kommentare --- */
.comments {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow);
  font-size: 0.98rem;
}
.comment p { margin: 0 0 0.5rem; }
.comment p:last-child { margin-bottom: 0; }
.comment i { color: var(--ink); }

.update-note {
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}

/* --- Formular --- */
.comment-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.comment-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-width: 12rem;
}
.comment-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.comment-form input,
.comment-form textarea {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.comment-form .full { display: block; }
.comment-form textarea { resize: vertical; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.comment-form button {
  font: inherit;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.comment-form button[type="reset"] {
  background: transparent;
  color: var(--accent-strong);
}
.comment-form button:hover { filter: brightness(1.08); }

/* --- Fuß --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-footer a { color: var(--link); }
.site-footer p { margin: 0.25rem 0; max-width: none; }

/* --- Anpassungen --- */
@media (max-width: 40rem) {
  .toc ul { column-count: 1; }
  .site-header { padding: 1.25rem 1rem 1.25rem; }
  table.sigla td:first-child { width: 34%; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201f1c;
    --surface: #2a2825;
    --ink: #e8e4db;
    --ink-soft: #b3aea2;
    --accent: #c8a869;
    --accent-strong: #d9bd85;
    --link: #8ab4d8;
    --link-visited: #8ab4d8;
    --border: #44403a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
  .site-header { background: linear-gradient(180deg, #2e2b26 0%, #26241f 100%); }
  .comment-form input, .comment-form textarea { background: #1d1c1a; color: var(--ink); }
  code { background: #35322c; }
}

/* --- Artikel-Verweise (neu) --- */
.article-ref {
  background: #fdf8ec;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin-top: 2rem;
  font-size: 0.95rem;
}
.article-ref p { margin: 0; }

.crumbs {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.crumbs a { text-decoration: none; }
.crumbs a::before { content: "\2190 "; }

/* --- Aktuell-Seite: Zusammenstellungen mit Quellenlinks (neu) --- */
.aktuell-runde { margin-bottom: 3rem; }
.comment p.quelle {
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  margin: 0.5rem 0 0;
}
.comment p.quelle a { text-decoration: none; }
.comment p.quelle a:hover { text-decoration: underline; }

ul.portale { list-style: none; padding-left: 0; }
ul.portale li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
ul.portale li:last-child { border-bottom: 0; }
