/* ==========================================================================
   Giza & Sterrenhemel – Egyptisch thema
   Bouwt voort op Bootstrap 5.3. Textures: /img/textures/
   Herbruikbare onderdelen: .hero, .stat-tile, .section-heading, .card-egypt,
   .figure-egypt, .fact-list, .fact-table, .timeline-egypt, .callout, .site-footer
   ========================================================================== */

:root {
  --gold: #c9a227;
  --gold-light: #e6c65c;
  --gold-dark: #6b520d;
  --lapis: #17304f;
  --turquoise: #2a8c8c;
  --sand: #f3e7c9;
  --ink: #2b2118;
  --night: #14110d;
  --border-gold: 1px solid rgba(138, 109, 20, .55);
  --shadow-soft: 0 6px 18px rgba(20, 17, 13, .25);

  --paper: #f6edd3;
  --night2: #1c1712;
  --tex-stone: url('../img/textures/hieroglyph_texture.jpg');
  --tex-papyrus: url('../img/textures/papyrus-texture.jpg');
  --tex-dark: url('../img/textures/dark-texture.jpg');
  --tex-dark-relief: url('../img/textures/darkhieroglyph-texture.jpg');

  --bs-link-color: var(--lapis);
  --bs-link-hover-color: var(--gold-dark);
}

/* ---------- Basis ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--tex-stone) center / 520px auto repeat fixed;
  background-color: #d9c9a3;
}

h1, h2, h3, h4, h5, .navbar-brand, .btn, .stat-tile .value {
  font-family: 'Cinzel', 'Times New Roman', serif;
  letter-spacing: .03em;
}

img { max-width: 100%; }

/* ---------- Navbar ---------- */
.navbar-egypt {
  background: var(--night2);
  border-bottom: 3px solid var(--gold);
  box-shadow: var(--shadow-soft);
}
.navbar-egypt .navbar-brand {
  color: var(--gold-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.navbar-egypt .navbar-brand img {
  width: 38px; height: 38px;
  border-radius: 6px;
  border: 1px solid var(--gold);
}
.navbar-egypt .nav-link { color: #eadcb5; font-family: 'Cinzel', serif; font-size: .9rem; }
.navbar-egypt .nav-link:hover,
.navbar-egypt .nav-link:focus { color: var(--gold-light); }
.navbar-egypt .navbar-toggler { border-color: var(--gold); }
.navbar-egypt .btn-outline-light { border-color: var(--gold); color: var(--gold-light); }
.navbar-egypt .btn-outline-light:hover { background: var(--gold); color: var(--night); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #f3e7c9;
  padding: 4.5rem 0 5rem;
  background:
    linear-gradient(180deg, #2a221a, #14110d);
  border-bottom: 4px solid var(--gold);
  text-align: center;
}
.hero::after { /* gouden sierrand */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-logo {
  width: 110px; height: 110px;
  border-radius: 14px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(201,162,39,.2), var(--shadow-soft);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--gold-light);
  text-shadow: 0 2px 6px rgba(0,0,0,.7);
}
.hero .lead { max-width: 46rem; margin: 1rem auto 0; color: #eadcb5; }
.hero .kicker {
  text-transform: uppercase; letter-spacing: .25em;
  font-size: .8rem; color: var(--gold);
}

/* ---------- Stat tiles (kerncijfers) ---------- */
.stat-tile {
  background: rgba(20,17,13,.55);
  border: 1px solid var(--gold);
  border-radius: .5rem;
  padding: 1rem .75rem;
  height: 100%;
  backdrop-filter: blur(2px);
}
.stat-tile .value { font-size: 1.7rem; color: var(--gold-light); line-height: 1.1; }
.stat-tile .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #d9c9a3; }

/* ---------- Sectiekoppen ---------- */
.section-heading {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.5rem;
  padding: .7rem 1.25rem;
  color: var(--gold-light);
  background: var(--night2);
  border: var(--border-gold);
  border-left: 8px solid var(--gold);
  border-radius: .35rem;
  box-shadow: var(--shadow-soft);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}
.section-heading .bi { color: var(--gold); }
.section-title { /* oude klasse, nu Egyptisch */
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  background: var(--night2);
  border-left: 8px solid var(--gold);
  border-radius: .35rem;
  padding: .6rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.subheading {
  font-size: 1.25rem; color: var(--gold-dark);
  border-bottom: 2px solid var(--gold); padding-bottom: .25rem; margin: 2rem 0 1rem;
}

/* ---------- Kaarten ---------- */
.card { border: var(--border-gold); border-radius: .5rem; }
.card-egypt {
  background: var(--paper);
  border: var(--border-gold);
  border-top: 4px solid var(--gold);
  border-radius: .5rem;
  box-shadow: var(--shadow-soft);
  height: 100%;
}
.card-egypt .card-body { padding: 1.25rem 1.4rem; }
.card-egypt h3, .card-egypt h4, .card-egypt h5 { color: var(--lapis); }
.card-egypt .card-title-icon { color: var(--gold-dark); margin-right: .4rem; }

.card .card-body,
.card-egypt .card-body { color: var(--ink); }

/* Papyrus-look voor de bestaande (dynamische) kaarten */
.card:not(.card-egypt):not(.thema-block) { background: var(--paper); }

/* ---------- Afbeeldingen (herbruikbaar) ----------
   .figure-egypt        : lijst met gouden lijst + bijschrift
   .ratio-map / -photo  : vaste beeldverhouding, object-fit
   .fit-contain         : hele afbeelding tonen (kaarten, diagrammen)
   .fit-cover           : vullen en bijsnijden (foto's)
   ---------------------------------------------------------- */
.figure-egypt {
  margin: 0;
  background: var(--paper);
  border: var(--border-gold);
  border-radius: .5rem;
  padding: .6rem;
  box-shadow: var(--shadow-soft);
  height: 100%;
  display: flex; flex-direction: column;
}
.figure-egypt .frame {
  position: relative;
  overflow: hidden;
  border-radius: .3rem;
  border: 2px solid var(--gold-dark);
  background: #e8dab5;
  display: block;
  width: 100%;
  cursor: zoom-in;
  padding: 0;
}
.figure-egypt img {
  display: block; width: 100%; height: 100%;
  transition: transform .5s ease;
}
.figure-egypt .frame:hover img { transform: scale(1.03); }
.figure-egypt.fit-contain .frame:hover img { transform: none; }

.ratio-wide   .frame { aspect-ratio: 16 / 9; }
.ratio-photo  .frame { aspect-ratio: 4 / 3; }
.ratio-square .frame { aspect-ratio: 1 / 1; }
.ratio-tall   .frame { aspect-ratio: 3 / 4; }
.fit-cover   img { object-fit: cover; }
.fit-contain img { object-fit: contain; }

.figure-egypt figcaption {
  font-size: .85rem; padding: .55rem .3rem .1rem; color: #4a3b26;
  font-style: italic;
}
.figure-egypt figcaption strong { font-style: normal; color: var(--lapis); font-family: 'Cinzel', serif; }

/* Lightbox */
.lightbox-img { max-height: 80vh; width: auto; max-width: 100%; margin: 0 auto; display: block; }
.modal-lightbox .modal-content {
  background: var(--night2); color: var(--sand); border: var(--border-gold);
}
.modal-lightbox .modal-header { border-bottom: 1px solid var(--gold-dark); }
.modal-lightbox .modal-title { color: var(--gold-light); font-size: 1rem; }

/* Oude placeholder */
.placeholder-img {
  background: var(--paper);
  border: 2px dashed var(--gold-dark);
  height: 160px; display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark); border-radius: .5rem; font-size: .9rem;
}

/* ---------- Feitenlijst & tabel ---------- */
.fact-list { list-style: none; padding: 0; margin: 0; }
.fact-list li {
  padding: .45rem 0 .45rem 1.6rem;
  position: relative;
  border-bottom: 1px dotted rgba(138,109,20,.45);
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list li::before { /* ankh-achtig gouden ruitje */
  content: '\25C6'; color: var(--gold); position: absolute; left: 0; top: .5rem; font-size: .8rem;
}

.fact-table {
  width: 100%; background: transparent;
  border-collapse: separate; border-spacing: 0;
  border: var(--border-gold); border-radius: .5rem; overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.fact-table thead th {
  background: var(--night2); color: var(--gold-light);
  font-family: 'Cinzel', serif; font-weight: 600; font-size: .85rem; letter-spacing: .06em;
  padding: .7rem .8rem; white-space: nowrap;
}
.fact-table tbody td, .fact-table tbody th {
  background: rgba(243, 231, 201, .92);
  padding: .6rem .8rem; border-top: 1px solid rgba(138,109,20,.35);
  vertical-align: top;
}
.fact-table tbody th { color: var(--lapis); font-family: 'Cinzel', serif; font-size: .9rem; }
.fact-table tbody tr:nth-child(even) td,
.fact-table tbody tr:nth-child(even) th { background: rgba(232, 216, 176, .92); }

/* ---------- Tijdlijn ---------- */
.timeline-egypt { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; }
.timeline-egypt::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 3px;
  background: linear-gradient(var(--gold), var(--gold-dark)); border-radius: 2px;
}
.timeline-egypt li { position: relative; padding: 0 0 1.2rem 1rem; }
.timeline-egypt li::before {
  content: ''; position: absolute; left: -1.6rem; top: .25rem;
  width: 17px; height: 17px; transform: rotate(45deg);
  background: var(--gold); border: 2px solid var(--night);
}
.timeline-egypt .when { font-family: 'Cinzel', serif; color: var(--lapis); font-weight: 700; }

/* ---------- Callout ---------- */
.callout {
  background: rgba(31,58,95,.08);
  border-left: 5px solid var(--turquoise);
  border-radius: .35rem;
  padding: .9rem 1.2rem;
  margin: 1.25rem 0;
}
.callout.callout-gold { border-left-color: var(--gold); background: rgba(201,162,39,.12); }
.callout .callout-title { font-family: 'Cinzel', serif; color: var(--lapis); font-weight: 700; }

/* ---------- Inhoudspaneel (leesbare tekst op de steen-achtergrond) ---------- */
.content-panel {
  background: var(--paper);
  border: var(--border-gold);
  border-radius: .5rem;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-soft);
}
.content-panel p:last-child { margin-bottom: 0; }
.content-panel .lead-first::first-letter {
  font-family: 'Cinzel', serif; font-size: 3.2rem; float: left; line-height: .9;
  padding: .25rem .5rem 0 0; color: var(--gold-dark);
}

/* ---------- Bestaand beheer-gedeelte ---------- */
.thema-block { border-left: 6px solid var(--gold); margin-bottom: 2rem; background: var(--paper); }
.thema-block .card-header.bg-success,
.card-header.bg-secondary {
  background: var(--night2) !important; color: var(--gold-light) !important;
  font-family: 'Cinzel', serif;
}
.onderwerp-card { border-left: 4px solid var(--turquoise); }
.afbeelding-item {
  background: rgba(255,255,255,.55); border: var(--border-gold);
  border-radius: .4rem; padding: .75rem; margin-bottom: .5rem;
}
.btn-success, .btn-primary, .btn-info {
  --bs-btn-bg: var(--gold-dark); --bs-btn-border-color: var(--gold);
  --bs-btn-hover-bg: var(--gold); --bs-btn-hover-border-color: var(--gold-light);
  --bs-btn-hover-color: var(--night); --bs-btn-color: #fff;
  --bs-btn-active-bg: var(--gold); --bs-btn-active-border-color: var(--gold-light);
  --bs-btn-active-color: var(--night);
}
.btn-outline-primary { --bs-btn-color: var(--lapis); --bs-btn-border-color: var(--lapis);
  --bs-btn-hover-bg: var(--lapis); --bs-btn-hover-border-color: var(--lapis); }
hr { border-color: var(--gold-dark); opacity: .6; }

#beheer-titel { color: var(--night); text-shadow: 0 1px 0 rgba(255,255,255,.4); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 4rem; padding: 2rem 0;
  background: var(--night2);
  border-top: 4px solid var(--gold);
  color: #d9c9a3; text-align: center; font-size: .9rem;
}
.site-footer .footer-logo { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--gold); margin-bottom: .5rem; }

/* ---------- Responsief ---------- */
@media (max-width: 767.98px) {
  .hero { padding: 3rem 0 3.5rem; }
  .content-panel { padding: 1.1rem; }
  body { background-attachment: scroll; }
  .fact-table { font-size: .88rem; }
}

/* ==========================================================================
   Hoofdstukken, inhoudsopgave, bronverwijzingen, literatuur
   ========================================================================== */
.chapter { scroll-margin-top: 80px; }
.chapter-heading {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
  margin: 0 0 1.25rem; padding: .8rem 1.25rem;
  color: var(--gold-light);
  background: var(--night2);
  border: var(--border-gold); border-left: 8px solid var(--gold);
  border-radius: .35rem; box-shadow: var(--shadow-soft);
}
.chapter-num {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .2em; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 2rem; padding: .15rem .8rem; white-space: nowrap;
}
.chapter-title { font-size: clamp(1.25rem, 2.6vw, 1.85rem); flex: 1 1 18rem; }
.chapter-title .bi { color: var(--gold); margin-right: .35rem; }
.badge-status {
  display: inline-block; font-family: 'Cinzel', serif; font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .15rem .6rem; border-radius: 2rem;
  background: rgba(201,162,39,.2); color: var(--gold-dark); border: 1px solid var(--gold-dark);
}
.chapter-heading .badge-status { color: var(--gold-light); border-color: var(--gold); }
.chapter-intro { margin-bottom: 1rem; }
.chapter-lead { font-size: 1.1rem; font-style: italic; margin: 0; }
.chapter-section { margin-bottom: 1.5rem; }
.subheading .num { font-family: 'Cinzel', serif; color: var(--lapis); margin-right: .4rem; }
.sub2 { font-size: 1.05rem; color: var(--lapis); margin: 1rem 0 .5rem; }

/* Inhoudsopgave */
.toc-wrap {
  background: var(--paper); border: var(--border-gold);
  border-radius: .5rem; box-shadow: var(--shadow-soft); padding: 1.25rem 1.5rem;
}
.toc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.toc-head h2 { font-size: 1.5rem; color: var(--gold-dark); margin: 0; }
.toc-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.toc-tools input { width: 16rem; max-width: 100%; }
.toc-chapter { border-bottom: 1px solid rgba(138,109,20,.35); }
.toc-chapter:last-child { border-bottom: 0; }
.toc-chapter summary {
  display: flex; align-items: flex-start; gap: .9rem; padding: .7rem .25rem; cursor: pointer; list-style: none;
}
.toc-chapter summary::-webkit-details-marker { display: none; }
.toc-chapter summary::after {
  content: '\F282'; font-family: 'bootstrap-icons'; margin-left: auto; align-self: center;
  color: var(--gold-dark); transition: transform .2s;
}
.toc-chapter[open] summary::after { transform: rotate(180deg); }
.toc-chapter summary:hover { background: rgba(201,162,39,.12); }
.toc-num {
  flex: 0 0 2.2rem; height: 2.2rem; display: grid; place-items: center;
  font-family: 'Cinzel', serif; font-weight: 700; color: var(--gold-light);
  background: var(--night); border: 1px solid var(--gold); border-radius: 50%;
}
.toc-title { flex: 1; font-family: 'Cinzel', serif; font-weight: 600; }
.toc-title a { color: var(--ink); text-decoration: none; }
.toc-title a:hover { color: var(--gold-dark); text-decoration: underline; }
.toc-title small { display: block; font-family: Arial, Helvetica, sans-serif; font-weight: 400; font-size: .85rem; color: #5b4a33; margin-top: .15rem; }
.toc-count { font-size: .75rem; color: #6b5a3f; white-space: nowrap; align-self: center; }
.toc-sections { list-style: none; margin: 0 0 .75rem 3.1rem; padding: 0; columns: 2 18rem; column-gap: 2rem; }
.toc-sections li { break-inside: avoid; padding: .15rem 0; }
.toc-sections li.toc-sub { margin-left: 1.6rem; font-size: .92em; }
.toc-sections li.toc-sub::before { content: '\2013\00a0'; color: var(--gold-dark); }
.toc-sections a { color: var(--lapis); text-decoration: none; }
.toc-sections a:hover { color: var(--gold-dark); text-decoration: underline; }
.toc-sections .num, .toc-num-sm { font-family: 'Cinzel', serif; color: var(--gold-dark); margin-right: .35rem; }
.toc-chapter.is-active summary { background: rgba(201,162,39,.18); }
.toc-chapter.is-hidden, .toc-sections li.is-hidden { display: none; }
.toc-empty { padding: 1rem .5rem; font-style: italic; color: #5b4a33; }
.toc-chapter mark { background: rgba(201,162,39,.45); padding: 0 .1em; }

/* Navbar-dropdown */
.dropdown-menu-egypt {
  background: var(--night2); border: 1px solid var(--gold);
  max-height: 75vh; overflow-y: auto; min-width: 20rem;
}
.dropdown-menu-egypt .dropdown-item { color: #eadcb5; white-space: normal; font-size: .9rem; padding: .4rem 1rem; }
.dropdown-menu-egypt .dropdown-item:hover,
.dropdown-menu-egypt .dropdown-item:focus,
.dropdown-menu-egypt .dropdown-item.active { background: rgba(201,162,39,.25); color: var(--gold-light); }
.dropdown-menu-egypt .dropdown-divider { border-color: rgba(201,162,39,.4); }
.dropdown-menu-egypt .toc-num-sm { color: var(--gold); display: inline-block; min-width: 1.2rem; }
.navbar-egypt .nav-link.active, .navbar-egypt .nav-link.show { color: var(--gold-light); }

/* Voortgangsbalk en knop naar boven */
#readProgress {
  position: absolute; left: 0; bottom: -3px; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--turquoise), var(--gold-light)); pointer-events: none;
}
.navbar-egypt { position: sticky; }
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030;
  width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--gold);
  background: var(--night); color: var(--gold-light); box-shadow: var(--shadow-soft); cursor: pointer;
}
.to-top:hover { background: var(--gold); color: var(--night); }
.to-top[hidden] { display: none; }

/* Knop */
.btn-gold { background: var(--gold); border: 1px solid var(--gold-dark); color: var(--night); font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); color: var(--night); }

/* Bronverwijzingen */
.pdf-ref {
  display: inline-flex; align-items: baseline; gap: .25rem; font-size: .88em;
  color: var(--lapis); text-decoration: underline dotted; text-underline-offset: 2px;
}
.pdf-ref:hover { color: var(--gold-dark); text-decoration-style: solid; }
.pdf-ref .bi { color: #a23b2a; }
.source-line {
  margin: .9rem 0 0; padding-top: .5rem; border-top: 1px dashed rgba(138,109,20,.5);
  font-size: .85rem; color: #5b4a33;
}
.source-label { font-family: 'Cinzel', serif; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--gold-dark); margin-right: .25rem; }
.src-general { font-style: italic; }
.src-general .bi { margin-right: .25rem; }

/* Goden en sterrenbeelden */
.god-card { display: flex; flex-direction: column; height: 100%; }
.god-card .god-star {
  font-size: .8rem; color: var(--turquoise); font-family: 'Cinzel', serif; letter-spacing: .05em;
}
.stat-light .value { color: var(--gold-dark); }
.stat-light .label { color: #5b4a33; }
.stat-light { background: rgba(255,255,255,.35); border-color: var(--gold-dark); }

/* Literatuur */
.lit-list { padding-left: 1.5rem; }
.lit-list li { margin-bottom: 1rem; padding-left: .25rem; }
.lit-cite { font-size: .95rem; }
.lit-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .25rem; font-size: .85rem; }
.lit-used { color: #5b4a33; }
.lit-used a { color: var(--lapis); }
.lit-list li:target { background: rgba(201,162,39,.2); border-radius: .25rem; }

@media (max-width: 575.98px) {
  .toc-wrap { padding: 1rem; }
  .toc-sections { margin-left: .5rem; }
  .chapter-heading { padding: .7rem .9rem; }
}
@media print { .navbar-egypt, .to-top, #readProgress, .toc-tools { display: none !important; } }

/* Leesbaarheid koppen op de steentextuur */
.chapter-section > .subheading {
  background: rgba(243, 231, 201, .93);
  padding: .5rem .9rem; border: var(--border-gold); border-bottom: 3px solid var(--gold);
  border-radius: .35rem; margin: 0 0 1rem; box-shadow: 0 2px 8px rgba(20,17,13,.15);
}
.chapter-intro > .chapter-lead {
  background: rgba(243, 231, 201, .93); padding: .75rem 1rem; border-radius: .35rem; border: var(--border-gold);
}

/* ==========================================================================
   Layout-regels (definitief)
   1. Doorlopende tekst in Arial; koppen blijven Cinzel.
   2. Tekst staat altijd op een effen vlak: licht vlak met donkere tekst, of
      donker vlak met lichte tekst. Texturen zijn alleen nog paginaachtergrond.
   3. Afbeeldingen staan nooit achter tekst.
   4. Tussen alle onderdelen zit ruimte.
   ========================================================================== */
body { font-size: 1rem; line-height: 1.65; }
p, li, td, th, figcaption, .callout, .lit-cite, .lit-meta, .source-line { font-family: Arial, Helvetica, sans-serif; }
.fact-table tbody th, .timeline-egypt .when, .callout .callout-title, .source-label,
.toc-title, .toc-num, .chapter-num, .subheading, .card-egypt h4, .card-egypt h5 { font-family: 'Cinzel', Georgia, serif; }
.toc-title small, .toc-sections a { font-family: Arial, Helvetica, sans-serif; }
.chapter-lead { font-style: normal; }

/* Effen lichte vlakken (donkere tekst) */
.callout, .callout.callout-gold {
  background: #efe3bd; color: var(--ink);
  border: var(--border-gold); border-left: 6px solid var(--turquoise);
  box-shadow: 0 2px 8px rgba(20,17,13,.15);
}
.callout.callout-gold { border-left-color: var(--gold); background: #f1e2a8; }
.content-panel .callout { box-shadow: none; }
.timeline-egypt {
  background: var(--paper); color: var(--ink); border: var(--border-gold); border-radius: .5rem;
  padding: 1.25rem 1.25rem 0 2.6rem; box-shadow: var(--shadow-soft); height: 100%;
}
.timeline-egypt::before { left: 1.3rem; top: 1.5rem; bottom: 1.5rem; }
.timeline-egypt li::before { left: -1.6rem; }
.content-panel .timeline-egypt, .card-egypt .timeline-egypt { box-shadow: none; border: 0; padding: 0 0 0 1.6rem; background: transparent; }
.content-panel .timeline-egypt::before, .card-egypt .timeline-egypt::before { left: 7px; top: 6px; bottom: 6px; }
.fact-list { color: var(--ink); }
.chapter-section > .fact-list, .chapter-section > p, .chapter-section > ul,
.chapter-intro > p:not(.chapter-lead) {
  background: var(--paper); color: var(--ink); border: var(--border-gold); border-radius: .5rem; padding: 1rem 1.25rem;
}
.chapter-lead, .stat-light { background: var(--paper); color: var(--ink); }
.figure-egypt figcaption { color: var(--ink); font-style: normal; font-size: .9rem; }
.fact-table tbody td, .fact-table tbody th { background: #f3e7c9; color: var(--ink); }
.fact-table tbody tr:nth-child(even) td, .fact-table tbody tr:nth-child(even) th { background: #e8d8b0; }

/* Effen donkere vlakken (lichte tekst) */
.navbar-egypt, .hero, .site-footer, .dropdown-menu-egypt, .chapter-heading, .section-heading,
.fact-table thead th { background-image: none; }
.site-footer { background: var(--night2); color: #eadcb5; }
.site-footer a { color: var(--gold-light); }

/* Ruimte tussen onderdelen */
.chapter { margin-bottom: 4rem !important; }
.chapter-heading { margin-bottom: 1.75rem; }
.chapter-intro { margin-bottom: 2rem; }
.chapter-section { margin-bottom: 2.75rem; }
.chapter-section > .subheading { margin-bottom: 1.5rem; }
.chapter-section > * + * { margin-top: 1.5rem; }
.chapter-section > .subheading + * { margin-top: 0; }
.chapter-section .row { --bs-gutter-x: 1.75rem; --bs-gutter-y: 1.75rem; }
.chapter-section .mt-3, .chapter > .mt-3 { margin-top: 1.75rem !important; }
.chapter-section .table-responsive { margin: 1.25rem 0; }
.content-panel .table-responsive:first-child { margin-top: 0; }
.content-panel .table-responsive:last-child { margin-bottom: 0; }
.content-panel > * + * { margin-top: 1rem; }
.content-panel > p { margin-bottom: 0; }
.card-egypt .card-body > * + * { margin-top: .85rem; }
.figure-egypt figcaption { padding: .75rem .35rem .35rem; }
.toc-wrap { margin-bottom: 4rem !important; }
.source-line { margin-top: 1.25rem; }
@media (max-width: 767.98px) {
  .chapter-section .row { --bs-gutter-y: 1.5rem; }
  .chapter-section { margin-bottom: 2.25rem; }
}

/* Aanvullingen na controle op leesbaarheid */
.hero { background: linear-gradient(180deg, #2a221a, #14110d) !important; background-color: #1c1712 !important; }
.stat-tile:not(.stat-light) { background: #2a221a; }
.god-card {
  background: var(--paper); color: var(--ink); border: var(--border-gold); border-top: 4px solid var(--gold);
  border-radius: .5rem; padding: 1.25rem; box-shadow: var(--shadow-soft); margin-bottom: 1.75rem;
}
.god-card .figure-egypt { box-shadow: none; }
.subheading, .subheading.sub2 {
  background: var(--paper); color: var(--gold-dark); padding: .5rem .9rem; border: var(--border-gold);
  border-bottom: 3px solid var(--gold); border-radius: .35rem; margin: 2rem 0 1.25rem;
}
.subheading .num { color: var(--lapis); }
#onderzoek > .d-flex:first-of-type, #onderzoek > .alert, #onderzoek > .text-center {
  background: var(--paper); color: var(--ink); border: var(--border-gold); border-radius: .5rem; padding: 1rem 1.25rem; margin-bottom: 1.75rem !important;
}
#onderzoek { margin-top: 2rem; }
.btn-outline-secondary { color: #3a3025; border-color: #5b4a33; background: rgba(255,255,255,.4); }
.source-label { color: var(--gold-dark); }
.toc-head h2 { color: var(--gold-dark); }
.badge-status { color: #5a4409; }
a { text-underline-offset: 2px; }
.chapter a:not(.btn):not(.pdf-ref) { color: var(--lapis); }
.chapter a:not(.btn):not(.pdf-ref):hover { color: var(--gold-dark); }
.god-card .god-star { color: #135353; }
code { color: #7a1f3d; }
.chapter-num.d-inline-block { color: var(--gold-dark); }
.chapter-heading .chapter-num { color: var(--gold-light); }
.chapter-section > .mt-3 > p, .chapter-section > .mt-3 > .source-line, .chapter > .mt-3 > p,
.chapter-section > .source-line, .chapter > .source-line {
  background: var(--paper); color: var(--ink); border: var(--border-gold); border-radius: .5rem; padding: .75rem 1.1rem;
}
.chapter > p { background: var(--paper); color: var(--ink); border: var(--border-gold); border-radius: .5rem; padding: .75rem 1.1rem; margin-top: 1.75rem; }
.chapter > p .source-line { border: 0; padding: 0; margin: 0; background: none; }
.chapter-section > .subheading, .chapter-intro > .chapter-lead { background: var(--paper); }

/* Kaart + afbeelding onder elkaar in één kolom: geen 100%-hoogte, anders loopt de afbeelding over de volgende sectie */
.card-egypt:not(:only-child) { height: auto; }
.card-egypt + .mt-3 { margin-top: 1.75rem !important; }
.card-egypt + .mt-3 .figure-egypt { height: auto; }
.card-egypt + .mt-3 > .source-line { background: var(--paper); color: var(--ink); border: var(--border-gold); border-radius: .5rem; padding: .6rem 1rem; margin-top: 1rem; }

/* Marges koppen: hoofdstuk 2rem ervoor / .5rem erna; subhoofdstuk 1rem ervoor / .5rem erna */
.chapter { margin-bottom: 0 !important; }
.chapter > .chapter-heading { margin: 2rem 0 .5rem !important; }
.chapter-intro { margin-bottom: 0; }
.chapter-section { margin-bottom: 0; }
.chapter-section > .subheading, .subheading, .subheading.sub2 { margin: 1rem 0 .5rem !important; }
.chapter-section > .subheading + * { margin-top: 0 !important; }
.chapter-intro + .chapter-section > .subheading { margin-top: 1rem !important; }

/* Donkere texturen terug op donkere vlakken (met lichte overlay-laag voor leesbaarheid, tekst is licht) */
.navbar-egypt { background: linear-gradient(rgba(20,17,13,.35), rgba(20,17,13,.35)), var(--tex-dark-relief) center / cover !important; }
.hero { background: linear-gradient(180deg, rgba(20,17,13,.45), rgba(20,17,13,.75)), var(--tex-dark) center / cover !important; background-color: #1c1712 !important; }
.chapter-heading, .section-heading, .section-title, .site-footer, .dropdown-menu-egypt {
  background: linear-gradient(rgba(20,17,13,.4), rgba(20,17,13,.4)), var(--tex-dark) center / cover !important;
}
.fact-table thead th { background: linear-gradient(rgba(20,17,13,.4), rgba(20,17,13,.4)), var(--tex-dark) center / cover !important; }
.thema-block .card-header.bg-success, .card-header.bg-secondary { background: linear-gradient(rgba(20,17,13,.4), rgba(20,17,13,.4)), var(--tex-dark) center / cover !important; }
.toc-num { background: linear-gradient(rgba(20,17,13,.3), rgba(20,17,13,.3)), var(--tex-dark) center / cover; }
.stat-tile:not(.stat-light) { background: rgba(20,17,13,.6); }

/* Afbeeldingen die onder elkaar in één kolom staan: hoogte volgt de inhoud, zodat ze niet in de volgende sectie lopen */
.figure-egypt:not(:only-child), .mt-4 > .figure-egypt { height: auto; }
[class*="col-"] > .figure-egypt:has(+ div) { height: auto; }
.fact-table td:last-child .pdf-ref { white-space: nowrap; }

/* ---------- Deel 2: bewijssysteem en Stellarium-placeholders ---------- */
.subheading-sm { font-family: 'Cinzel', serif; font-size: 1.05rem; color: var(--lapis); margin: 0 0 .9rem; padding-bottom: .35rem; border-bottom: 1px solid rgba(138,109,20,.45); }
.table-note { font-size: .82rem; color: #5b4a33; margin: .5rem 0 0; }
.ext-ref { display: inline-block; font-size: .8rem; color: #5a4409; background: #f1e2a8; border: 1px dashed var(--gold-dark); border-radius: .3rem; padding: 0 .4rem; }
.ext-ref i { margin-right: .25rem; }

.evid { display: inline-block; min-width: 1.6rem; text-align: center; font-family: 'Cinzel', serif; font-weight: 700; font-size: .85rem;
  border-radius: .3rem; padding: .05rem .4rem; color: #fff; }
.evid-A { background: #1f6b3a; }
.evid-B { background: #2a8c8c; }
.evid-C { background: #17304f; }
.evid-D { background: #8a6d14; }
.evid-E { background: #8a3b2a; }

.verdict { margin-top: 1rem; padding: .7rem .9rem; border-left: 4px solid var(--gold); background: #f1e2a8; border-radius: 0 .4rem .4rem 0; font-size: .95rem; }
.verdict-label { font-family: 'Cinzel', serif; font-weight: 700; color: var(--lapis); margin-right: .4rem; text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }

.stel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.stel-slot { margin: 0; background: var(--paper); border: var(--border-gold); border-radius: .5rem; overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.stel-empty { padding: .85rem .95rem; border: 2px dashed var(--gold-dark); margin: .5rem; border-radius: .4rem; font-size: .88rem; color: var(--ink); background: rgba(255,255,255,.35); }
.stel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.stel-id { font-family: 'Cinzel', serif; font-weight: 700; background: var(--lapis); color: var(--gold-light); border-radius: .3rem; padding: .05rem .5rem; }
.stel-title { font-weight: 700; color: var(--lapis); flex: 1 1 auto; }
.stel-state { font-size: .72rem; color: #8a3b2a; text-transform: uppercase; letter-spacing: .04em; }
.stel-set { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .7rem; margin: 0 0 .5rem; }
.stel-set dt { font-weight: 700; color: #5a4409; }
.stel-set dd { margin: 0; }
.stel-expect ul { margin: .2rem 0 .5rem; padding-left: 1.1rem; }
.stel-test { margin-bottom: .5rem; }
.stel-file { font-size: .78rem; color: #5b4a33; }
.stel-file code { color: var(--lapis); }
.stel-slot figcaption { padding: .55rem .9rem .8rem; font-size: .84rem; border-top: 1px dotted rgba(138,109,20,.45); }
.stel-slot.is-filled .stel-cap-test { display: inline; }
.stel-slot:not(.is-filled) figcaption { display: none; }
.stel-slot.is-filled .frame { display: block; width: 100%; padding: 0; border: 0; background: var(--night2); cursor: zoom-in; aspect-ratio: 16 / 10; }
.stel-slot.is-filled .frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 575px) { .stel-grid { grid-template-columns: 1fr; } }
@media print { .stel-slot { break-inside: avoid; } }

/* Controle-screens */
.ctrl-details { margin-top: 1rem; border: var(--border-gold); border-radius: .5rem; background: rgba(255,255,255,.35); }
.ctrl-details > summary { cursor: pointer; padding: .6rem .9rem; font-weight: 700; color: var(--lapis); }
.ctrl-details > summary i { color: var(--gold-dark); margin-right: .3rem; }
.ctrl-details > .table-note, .ctrl-details > .stel-grid { margin: .3rem .9rem .9rem; }
.ctrl-details .stel-slot { background: #fbf4dd; }

/* Afbeeldingen van internet die nog niet zijn gedownload */
.img-missing { display: none; padding: 1.2rem; margin: .5rem; text-align: center; font-size: .85rem; color: #5a4409; border: 2px dashed var(--gold-dark); border-radius: .4rem; background: var(--paper); }
.figure-egypt.is-missing .frame { display: none; }
.figure-egypt.is-missing .img-missing { display: block; }
.img-credit { display: block; margin-top: .25rem; font-size: .78rem; color: #5b4a33; }

/* Blok-timer (8.6) */
.block-timer-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.block-timer-count { font-family: 'Cinzel', serif; font-size: 1.6rem; color: var(--gold-dark); }
.block-timer .progress { height: 1rem; background: rgba(0,0,0,.1); }
.block-timer-bar { background: var(--gold-dark); transition: none; }
.block-timer.is-placed > .progress .block-timer-bar { background: var(--lapis); }
.block-timer.is-placed > .block-timer-head span { font-weight: 700; }
.block-timer-text { font-size: .95rem; margin: .75rem 0; }
.block-timer-count-line { font-size: .9rem; }
.block-timer-alt { border-top: 1px solid rgba(0,0,0,.12); padding-top: .75rem; }
.block-timer-alt .block-timer-count { font-size: 1.3rem; }
.block-timer-alt .block-timer-bar { background: var(--lapis); }
.block-timer-alt.is-placed > .progress .block-timer-bar { background: var(--gold-dark); }

/* ==========================================================================
   Herziening 20-09-2026
   1. compactere ruimte tussen de blokken
   2. tabellen duidelijk zichtbaar (kader, vaste kop, scroll-aanwijzing)
   3. maximale hoogte voor afbeeldingen die onnodig groot worden
   4. preloader en overgang
   5. toetskaart en bronlinks zonder pdf
   ========================================================================== */

:root {
  --fig-max-h: 340px;        /* gewone afbeelding in een kolom */
  --fig-max-h-lg: 440px;     /* afbeelding over de volle breedte */
  --fig-max-h-sm: 260px;     /* afbeelding in een smalle kolom of kaart */
  --tbl-max-h: none;        /* tabellen altijd volledig tonen; zet op bv. 70vh om lange tabellen zelf te laten scrollen */
}

/* ---------- 1. Compactere ruimte ---------- */
#inhoud.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.chapter > .chapter-heading { margin: 1.6rem 0 .45rem !important; }
.chapter-heading { padding: .6rem 1.1rem; }
.chapter-section > .subheading, .subheading, .subheading.sub2 { margin: .95rem 0 .45rem !important; }
.chapter-intro + .chapter-section > .subheading { margin-top: .95rem !important; }
.chapter-section > * + * { margin-top: .95rem !important; }
.chapter-section > .subheading + * { margin-top: 0 !important; }
.chapter-section .row { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.chapter-section .mt-3, .chapter > .mt-3, .card-egypt + .mt-3 { margin-top: 1rem !important; }
.chapter-section .mt-4 { margin-top: 1rem !important; }
.chapter-section .table-responsive { margin: .8rem 0; }
.content-panel { padding: 1rem 1.15rem; }
.content-panel > * + * { margin-top: .7rem; }
.card-egypt .card-body { padding: 1rem 1.1rem; }
.card-egypt .card-body > * + * { margin-top: .6rem; }
.chapter > p { margin-top: 1rem; padding: .7rem 1.05rem; }
.chapter-section > .fact-list, .chapter-section > p, .chapter-section > ul,
.chapter-intro > p:not(.chapter-lead) { padding: .8rem 1.05rem; }
.figure-egypt { padding: .4rem; }
.figure-egypt figcaption { padding: .5rem .3rem .2rem; font-size: .85rem; }
.god-card { padding: 1rem; margin-bottom: 1rem; }
.callout { margin: .9rem 0; padding: .75rem 1rem; }
.source-line { margin-top: .8rem !important; padding-top: .4rem; }
.verdict { margin-top: .8rem; }
.stel-grid { gap: .75rem; }
.toc-wrap { margin-bottom: 2rem !important; padding: 1rem 1.15rem; }
.site-footer { margin-top: 2.5rem; padding: 1.5rem 0; }
.hero { padding: 3rem 0 3.25rem; }
.timeline-egypt li { padding-bottom: .8rem; }
@media (max-width: 767.98px) {
  .chapter-section .row { --bs-gutter-y: .85rem; }
  .chapter > .chapter-heading { margin: 1.1rem 0 .4rem !important; }
  #inhoud.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
}

/* ---------- 2. Tabellen duidelijk zichtbaar ---------- */
.table-responsive {
  position: relative;
  border: 2px solid var(--gold-dark);
  border-radius: .5rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  max-height: var(--tbl-max-h);
  overflow: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--gold-dark) rgba(0, 0, 0, .1);
}
.table-responsive > .fact-table { margin-bottom: 0; border-radius: 0; box-shadow: none; }
.fact-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.fact-table thead th {
  position: sticky; top: 0; z-index: 3;
  color: var(--gold-light);
  font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 2px solid var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
  white-space: normal;
}
.fact-table thead th + th { border-left: 1px solid rgba(201, 162, 39, .35); }
.fact-table tbody td + td, .fact-table tbody td + th, .fact-table tbody th + td {
  border-left: 1px solid rgba(138, 109, 20, .28);
}
.fact-table tbody tr:hover td, .fact-table tbody tr:hover th { background: #f8eec9; }
.fact-table caption { caption-side: top; padding: .5rem .8rem; font-family: 'Cinzel', serif; color: var(--lapis); font-weight: 700; }
.fact-table td, .fact-table th { vertical-align: top; }
/* eerste kolom blijft staan bij horizontaal scrollen in brede tabellen */
.table-responsive.is-wide .fact-table tbody th:first-child,
.table-responsive.is-wide .fact-table tbody td:first-child {
  position: sticky; left: 0; z-index: 2;
  box-shadow: 1px 0 0 rgba(138, 109, 20, .45);
}
.table-responsive.is-wide .fact-table thead th:first-child { position: sticky; left: 0; z-index: 4; }
/* aanwijzing dat er meer kolommen zijn */
.table-hint {
  display: none;
  font-size: .78rem; color: #5a4409; background: #f1e2a8;
  border: 1px dashed var(--gold-dark); border-radius: .3rem;
  padding: .15rem .5rem; margin: .35rem 0 0 !important;
}
.table-responsive.is-wide + .table-hint { display: inline-block; }
@media (max-width: 575.98px) { .fact-table { font-size: .84rem; } .fact-table thead th { font-size: .74rem; } }

/* ---------- 3. Maximale hoogte voor afbeeldingen ---------- */
.figure-egypt .frame { max-height: var(--fig-max-h); }
.figure-egypt img { max-height: var(--fig-max-h); }
.col-12 > .figure-egypt .frame, .col-12 > .figure-egypt img,
.chapter-section > .mt-3 > .figure-egypt .frame,
.chapter-section > .mt-3 > .figure-egypt img { max-height: var(--fig-max-h-lg); }
.col-md-3 > .figure-egypt .frame, .col-md-4 > .figure-egypt .frame,
.col-lg-3 > .figure-egypt .frame, .col-lg-4 > .figure-egypt .frame,
.god-card .figure-egypt .frame,
.col-md-3 > .figure-egypt img, .col-md-4 > .figure-egypt img,
.col-lg-3 > .figure-egypt img, .col-lg-4 > .figure-egypt img,
.god-card .figure-egypt img { max-height: var(--fig-max-h-sm); }
.stel-slot.is-filled .frame { max-height: 300px; }
.stel-slot.is-filled .frame img { max-height: 300px; }
.hero-logo { max-height: 110px; width: auto; }
@media (max-width: 767.98px) {
  :root { --fig-max-h: 250px; --fig-max-h-lg: 290px; --fig-max-h-sm: 210px; }
}

/* ---------- 4. Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: linear-gradient(180deg, rgba(20,17,13,.92), rgba(20,17,13,.98)), var(--tex-dark) center / cover;
  background-color: #14110d;
  color: #eadcb5; text-align: center;
  transition: opacity .45s ease, visibility .45s ease;
}
#preloader img { width: 72px; height: 72px; border-radius: 8px; border: 1px solid var(--gold); animation: pre-pulse 1.6s ease-in-out infinite; }
#preloader .pre-title { font-family: 'Cinzel', 'Times New Roman', serif; color: var(--gold-light); letter-spacing: .08em; font-size: 1.05rem; }
#preloader .pre-sub { font-size: .8rem; color: #c9bb96; }
#preloader .pre-bar { width: min(16rem, 60vw); height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
#preloader .pre-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s ease; }
#preloader.is-done { opacity: 0; visibility: hidden; }
@keyframes pre-pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #preloader img { animation: none; } }
html.is-loading { overflow: hidden; }

/* ---------- 5. Toetskaart en externe bronnen ---------- */
.toetskaart { margin: .8rem 0; border: 2px solid var(--gold-dark); border-radius: .5rem; background: var(--paper); box-shadow: var(--shadow-soft); overflow: hidden; }
.toetskaart > .tk-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .45rem .8rem; color: var(--gold-light);
  background: linear-gradient(rgba(20,17,13,.4), rgba(20,17,13,.4)), var(--tex-dark) center / cover;
  font-family: 'Cinzel', serif; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
}
.toetskaart > .tk-head .tk-label { flex: 1 1 auto; }
.toetskaart dl { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; }
.toetskaart dt {
  padding: .45rem .8rem; font-family: 'Cinzel', serif; font-size: .8rem; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  border-top: 1px solid rgba(138,109,20,.3); background: rgba(232,216,176,.6);
}
.toetskaart dd { margin: 0; padding: .45rem .8rem; border-top: 1px solid rgba(138,109,20,.3); border-left: 1px solid rgba(138,109,20,.28); font-size: .93rem; }
@media (max-width: 575.98px) {
  .toetskaart dl { grid-template-columns: 1fr; }
  .toetskaart dd { border-left: 0; padding-top: .1rem; }
  .toetskaart dt { border-top: 1px solid rgba(138,109,20,.45); }
}
/* link naar een bron die (nog) niet als pdf in /pdf/ staat */
a.web-ref {
  display: inline-block; font-size: .8rem; color: #14435e; text-decoration: none;
  background: #dbe9f1; border: 1px solid #5c86a0; border-radius: .3rem; padding: 0 .4rem;
}
a.web-ref:hover, a.web-ref:focus { background: #c6dcea; color: #0d2c3f; text-decoration: underline; }
a.web-ref i { margin-right: .25rem; }
.lit-web-note { font-size: .82rem; color: #5b4a33; }

/* voortgang van de screenshots */
.shot-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .88rem; margin: .5rem 0 0; }
.shot-progress .progress { flex: 1 1 10rem; height: .7rem; background: rgba(0,0,0,.12); }
.shot-progress .progress-bar { background: var(--gold-dark); }
.shot-progress b { font-family: 'Cinzel', serif; color: var(--lapis); }

/* Kopjes boven de screenshot-blokken leesbaar op de donkere achtergrond (21-09-2026) */
.chapter-section > .subheading-sm {
  background: var(--paper); color: var(--lapis); border: var(--border-gold); border-radius: .35rem;
  padding: .45rem .8rem; margin: .8rem 0 .5rem;
}

/* ---------- Plaatshouders voor afbeeldingen die nog gezocht worden (21-09-2026) ---------- */
.img-slot { margin: 0 0 1rem; background: var(--paper); border: var(--border-gold); border-radius: .5rem; box-shadow: var(--shadow-soft); }
.img-slot-body { margin: .5rem; padding: .8rem .9rem; border: 2px dashed #2a8c8c; border-radius: .4rem; background: rgba(255,255,255,.4); font-size: .88rem; color: var(--ink); }
.img-slot-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; margin-bottom: .4rem; }
.img-slot-id { font-family: 'Cinzel', serif; font-weight: 700; color: #135353; }
.img-slot-title { font-weight: 700; flex: 1 1 auto; }
.img-slot-state { font-size: .75rem; color: #135353; border: 1px solid #2a8c8c; border-radius: 1rem; padding: 0 .5rem; }
.img-slot p { margin: 0 0 .35rem; }
.img-slot-zoek, .img-slot-file { font-size: .8rem; color: #5b4a33; }
/* ---------- Tijdlijn (15.3) ---------- */
.tl-app { background: var(--paper); border: var(--border-gold); border-radius: .5rem; padding: 1rem; box-shadow: var(--shadow-soft); }
.tl-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.tl-tools .is-on { background: var(--lapis); color: #fff; border-color: var(--lapis); }
.tl-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .8rem; margin-bottom: .6rem; }
.tl-leg::before { content: ''; display: inline-block; width: .8rem; height: .8rem; border-radius: .15rem; margin-right: .3rem; vertical-align: -1px; background: var(--c); }
.tl-track { position: relative; height: 3.2rem; border-radius: .4rem; background: linear-gradient(#efe3c3, #e3d3ab); border: 1px solid rgba(138,109,20,.45); margin: .3rem 0 .2rem; }
.tl-khufu { position: absolute; top: 0; bottom: 0; background: rgba(201,162,39,.45); border-left: 1px solid var(--gold-dark); border-right: 1px solid var(--gold-dark); }
.tl-mark { position: absolute; top: .3rem; bottom: .3rem; width: 4px; margin-left: -2px; padding: 0; border: 0; border-radius: 2px; background: var(--c); cursor: pointer; opacity: .85; }
.tl-mark:hover, .tl-mark:focus, .tl-mark.is-active { opacity: 1; top: 0; bottom: 0; width: 6px; margin-left: -3px; outline: 2px solid var(--ink); }
.tl-range { width: 100%; }
.tl-scale { display: flex; justify-content: space-between; font-size: .8rem; color: #5b4a33; }
.tl-card { margin-top: .6rem; padding: .8rem 1rem; border-left: 6px solid var(--c); background: rgba(255,255,255,.5); border-radius: .35rem; }
.tl-card-year { font-family: 'Cinzel', serif; color: var(--lapis); font-weight: 700; }
.tl-card-title { font-weight: 700; margin: .1rem 0 .3rem; }
.tl-nav { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tl-all { margin-top: 1rem; }
.tl-c-geschiedenis { --c: #6b520d; } .tl-c-hemel { --c: #17304f; } .tl-c-bouwwerk { --c: #8b3a2b; }
.tl-c-tekst { --c: #2a8c8c; } .tl-c-mythe { --c: #b0527a; } .tl-c-onderzoek { --c: #c9a227; }
/* ---------- Deel 2 als tussenpagina ---------- */
.part-intro { margin: 3rem 0; }

.toc-part { margin: .6rem 0 .3rem; padding: .35rem .8rem; font-family: 'Cinzel', serif; font-weight: 700; border-top: 2px solid var(--gold); }
.toc-part a { color: var(--gold-dark); text-decoration: none; }

/* Aantekening onder een Stellarium-screenshot */
.stel-note { display: block; margin-top: .45rem; padding: .4rem .7rem; background: var(--paper); color: var(--ink); border: var(--border-gold); border-left: 4px solid var(--gold-dark); border-radius: .35rem; font-size: .88rem; line-height: 1.5; }
.stel-note strong { color: var(--lapis); }

/* ---------- Leesbaarheid: kopjes, tabelnoten en tekst die los op de steen-achtergrond stonden ----------
   Lichte (papier)achtergrond met donkere tekst, gelijk aan de overige tekstblokken. */
.chapter-section > h4.h6.text-uppercase,
.chapter-section .row > [class*="col-"] > h4.h6.text-uppercase,
.chapter > h4.h6.text-uppercase {
  background: var(--paper); color: var(--lapis);
  border: var(--border-gold); border-left: 4px solid var(--gold-dark); border-radius: .5rem;
  padding: .55rem .9rem; margin-bottom: 0;
  font-family: 'Cinzel', Georgia, serif; font-size: .95rem; font-weight: 700; letter-spacing: .03em; line-height: 1.35;
}
.chapter-section > p.table-note,
.chapter-section .row > [class*="col-"] > p.table-note,
.chapter > p.table-note {
  background: var(--paper); color: var(--ink);
  border: var(--border-gold); border-radius: .5rem;
  padding: .6rem .9rem; margin: .6rem 0 0 !important;
  font-size: .88rem; line-height: 1.55;
}
.chapter-section .row > [class*="col-"] > p:not(.table-note):not(.source-line) {
  background: var(--paper); color: var(--ink);
  border: var(--border-gold); border-radius: .5rem;
  padding: .8rem 1.05rem; margin: .75rem 0 0;
}
.chapter-section .row > [class*="col-"] > h4.h6.text-uppercase.mt-3 { margin-top: 1rem !important; }
.chapter-section .row > [class*="col-"] > h4.h6.text-uppercase + .table-responsive,
.chapter-section > h4.h6.text-uppercase + .table-responsive { margin-top: .6rem; }
/* dezelfde kopjes binnen een papieren paneel (o.a. 13.2): geen dubbel vlak, wel dezelfde kleur en gouden balk */
.content-panel h4.h6.text-uppercase,
.card-egypt h4.h6.text-uppercase {
  color: var(--lapis); border-left: 4px solid var(--gold-dark); padding: .15rem 0 .15rem .7rem;
  font-family: 'Cinzel', Georgia, serif; font-size: .95rem; font-weight: 700; letter-spacing: .03em; line-height: 1.35;
}

/* ==========================================================================
   Texturen voor lichte vlakken: papyrus (grote tekstblokken) en lichte steen (kleine stukken)
   --paper       = papyrus-texture.jpg  : panelen, kaarten, alinea's, toetskaarten, tabelrijen (om-en-om)
   --paper-light = light-texture.jpg    : kopjes, noten, bronregels, aantekeningen, even tabelrijen
   ========================================================================== */
:root {
  --tex-papyrus-bg: url('../img/textures/papyrus-texture.jpg');
  --tex-light: url('../img/textures/light-texture.jpg');
  --paper: #ebe0c4 var(--tex-papyrus-bg) 0 0 / 800px auto repeat;
  --paper-light: #e6e2df var(--tex-light) 0 0 / 960px auto repeat;
}
/* kleine stukken: lichte textuur */
.chapter-section > .subheading, .subheading, .subheading.sub2, .subheading-sm,
.chapter-intro > .chapter-lead,
.chapter-section > h4.h6.text-uppercase,
.chapter-section .row > [class*="col-"] > h4.h6.text-uppercase,
.chapter > h4.h6.text-uppercase,
.chapter-section > p.table-note,
.chapter-section .row > [class*="col-"] > p.table-note,
.chapter > p.table-note,
.chapter-section > .source-line, .chapter > .source-line,
.chapter-section > .mt-3 > .source-line, .card-egypt + .mt-3 > .source-line,
.stel-note, .form-control, .form-control:focus,
.img-missing, .toc-part {
  background: var(--paper-light);
}
/* tabellen: papyrus en lichte steen wisselen om-en-om af */
.fact-table tbody td, .fact-table tbody th { background: var(--paper); }
.fact-table tbody tr:nth-child(even) td,
.fact-table tbody tr:nth-child(even) th {
  background: linear-gradient(rgba(138, 109, 20, .06), rgba(138, 109, 20, .06)), var(--paper-light);
}
.fact-table tbody tr:hover td, .fact-table tbody tr:hover th {
  background: linear-gradient(rgba(201, 162, 39, .22), rgba(201, 162, 39, .22)), var(--paper);
}
.ctrl-details .stel-slot { background: var(--paper); }

/* ==========================================================================
   04-10-2026: bredere inhoud, kopjes boven screenshot-groepen, kruisverwijzingen, navmenu
   ========================================================================== */
/* Bredere inhoud: de witte ruimte naast de inhoud is gehalveerd.
   Bootstrap: 1320px bij >= 1400px. Nu: 1320 + de helft van de rest (1920px scherm: 1620px). */
@media (min-width: 1400px) {
  .container { max-width: calc(50vw + 660px); }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .container { max-width: calc(50vw + 570px); }
}

/* Kopjes (h5) boven de screenshot-groepen (o.a. 11.6b en 12.4b): lichte achtergrond zoals de andere kopjes */
.chapter-section > h5.h6.text-uppercase,
.chapter-section .row > [class*="col-"] > h5.h6.text-uppercase {
  background: var(--paper-light); color: var(--lapis);
  border: var(--border-gold); border-left: 4px solid var(--gold-dark); border-radius: .5rem;
  padding: .55rem .9rem; margin-bottom: .6rem;
  font-family: 'Cinzel', Georgia, serif; font-size: .95rem; font-weight: 700; letter-spacing: .03em; line-height: 1.35;
}
.chapter-section > p:not([class]) { background: var(--paper-light); color: var(--ink); border: var(--border-gold); border-radius: .5rem; padding: .6rem .9rem; font-size: .92rem; }

/* Verwijzing naar een eerder (of later) stuk tekst */
a.xref {
  color: var(--lapis); font-weight: 600; text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 2px; white-space: nowrap;
}
a.xref:hover, a.xref:focus { color: var(--gold-dark); text-decoration-style: solid; }

/* Rechterkolom die naar links is verhuisd omdat de tabel anders niet past */
.merged-side { margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }

/* Navmenu: hoofdstukken met hun paragrafen */
.nav-toc-menu { min-width: 26rem; max-width: min(34rem, 92vw); }
.dropdown-menu-egypt .dropdown-item.nav-ch { font-weight: 700; margin-top: .25rem; }
.dropdown-menu-egypt .dropdown-item.nav-par { font-size: .8rem; padding: .15rem 1rem .15rem 2.6rem; color: #d8c99f; }
.dropdown-menu-egypt .nav-par-num { display: inline-block; min-width: 2.3rem; color: var(--gold); font-family: 'Cinzel', serif; }
@media (max-width: 991.98px) { .nav-toc-menu { min-width: 0; max-width: none; } }

/* Taalkeuze NL | EN in de navbar (04-10-2026) */
.lang-switch{display:inline-flex;align-items:center;gap:.35rem;font-family:'Cinzel',serif;font-size:.85rem;letter-spacing:.05em}
.lang-switch a{color:rgba(255,255,255,.65);text-decoration:none;padding:.15rem .25rem;border-radius:.2rem}
.lang-switch a:hover,.lang-switch a:focus{color:#fff}
.lang-switch a.active{color:#f0d58c;font-weight:700}
.lang-switch span{color:rgba(255,255,255,.35)}

/* Auteur (SEO/E-E-A-T, 04-10-2026) */
.hero .byline{margin:.6rem 0 0;font-size:.95rem;color:rgba(245,234,210,.8);font-style:italic}
.hero .byline a,.site-footer .footer-author a{color:#e8c46a;text-decoration:none;border-bottom:1px solid rgba(232,196,106,.4)}
.hero .byline a:hover,.site-footer .footer-author a:hover{color:#fff}
.site-footer .footer-author{display:inline-block;margin-top:.35rem;font-size:.9rem;opacity:.85}

/* Reacties van bezoekers (04-10-2026) */
.reacties-kop{display:flex;align-items:center;justify-content:space-between;margin-bottom:.8rem;padding-bottom:.4rem;border-bottom:1px solid rgba(184,137,46,.35)}
.reacties-lijst{display:flex;flex-direction:column;gap:.9rem}
.reacties-leeg{color:#6b5a3a;font-style:italic;margin:0}
.reactie{background:#fbf5e6;border:1px solid #d9c79a;border-radius:.45rem;padding:.9rem 1rem;box-shadow:0 1px 2px rgba(60,40,10,.06)}
.reactie-antwoord{margin:.8rem 0 0 1.4rem;background:#fffaf0;border-left:3px solid #b8892e}
.reactie-kop{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .6rem;margin-bottom:.45rem}
.reactie-avatar{width:2rem;height:2rem;border-radius:50%;background:#2b2116;color:#e8c46a;display:inline-flex;align-items:center;justify-content:center;font-family:'Cinzel',serif;font-weight:700;flex:0 0 auto}
.reactie-auteur>.reactie-kop .reactie-avatar{background:#b8892e;color:#fff}
.reactie-naam{font-weight:600;color:#2b2116}
.reactie-badge{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;background:#b8892e;color:#fff;border-radius:.2rem;padding:.05rem .35rem}
.reactie-datum{font-size:.82rem;color:#7a6847}
.reactie-taal{font-size:.7rem;border:1px solid #c9b07a;color:#7a6847;border-radius:.2rem;padding:0 .3rem;cursor:help}
.reactie-tekst p{margin:0 0 .5rem;overflow-wrap:anywhere}
.reactie-tekst p:last-child{margin-bottom:0}
.reactie-form-kaart{position:sticky;top:5rem}
.reactie-hp{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
.reactie-privacy{line-height:1.4}
@media (max-width:991.98px){.reactie-form-kaart{position:static}}
.reactie-email-uitleg{color:#6b5a3a}
.reactie-email-uitleg .bi{color:#b8892e}

/* Reacties: lichte achtergrond achter de lijst (04-10-2026) */
.reacties-paneel {
  background: var(--paper-light);
  border: 1px solid #d9c79a; border-radius: .5rem;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(60, 40, 10, .08);
  min-height: 100%;
}
.reacties-paneel .reactie { background: #fffaf0; }
.reacties-paneel .reactie-antwoord { background: #fbf3df; }
