/* De stamboom in de stijl van calvintomoor.com (wens gebruiker 2026-12-02: "in de stijl van calvintomoor ... logo bovenin,
   hele makeover zonder de stamboom of weergave daarvan aan te passen"). Alleen de omlijsting: de balk, de kop, de tabs, de
   knoppen en het laadscherm. De kleuren en letters van de tekeningen (--g*, --t*, --paper, --ink, --sans, IBM Plex op het
   canvas) blijven die van de pagina. Kleuren en letters van calvintomoor: frontend/assets/lectio.css in DigitalRivet.
   Opbouw (calvintomoor.js): body > .ctm-util, .ctm-head, nav#tabs, .wrap; de tabbalk staat op elke tab op dezelfde plek
   ("layout tussen tabs is niet consistent", 2026-12-02). */
html.ctm {
  --ctm-navy: #0f2342; --ctm-accent: #8c1d2c; --ctm-gold: #d9b45a; --ctm-onnavy: #c9d3e3;
  --ctm-bg: #f7f5f0; --ctm-paper: #fff; --ctm-ink: #222; --ctm-muted: #666; --ctm-rule: #e0dacd; --ctm-field: #bbb;
  --ctm-d: "Libre Baskerville", Georgia, serif; --ctm-s: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ctm-util: 26px; --ctm-headh: 56px;
  --ctm-top: calc(var(--ctm-util) + var(--ctm-headh) + env(safe-area-inset-top, 0px));
}
html.ctm body { background: var(--ctm-bg); margin: 0; }
html.ctm body::before { background: var(--ctm-navy); }

/* de bovenste balk en de kop met het logo */
.ctm-util { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: var(--ctm-util); box-sizing: border-box;
  padding: 0 24px; background: var(--ctm-navy); color: var(--ctm-onnavy); font: 13px var(--ctm-s); white-space: nowrap; overflow: hidden; flex: none; }
.ctm-util a { color: var(--ctm-onnavy); margin-left: 16px; text-decoration: none; }
.ctm-util a:hover { color: #fff; }
html.ctm header.ctm-head { display: flex; align-items: center; gap: 12px; height: var(--ctm-headh); box-sizing: border-box; padding: 0 24px;
  background: var(--ctm-paper); min-width: 0; flex: none; }   /* ook in body.full, waar de pagina elke header uitzet */
.ctm-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; border-radius: 3px; }
.ctm-brand img { height: 36px; width: 36px; display: block; }
.ctm-brand b { font: 700 20px var(--ctm-d); color: var(--ctm-navy); }
.ctm-sep { color: #aaa; font: 18px var(--ctm-s); flex: none; }
.ctm-title { font: 400 16px var(--ctm-d); color: var(--ctm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* de tabbalk: op elke tab dezelfde, direct onder de kop, over de hele breedte, met de rode streep eronder */
/* (tabs als die van Google Chrome, wens gebruiker 2026-12-03: "Alle tabs moeten tabs hebben zoals google chrome tabs (qua
   stijl)"): een donkerder strook, elke tab met ronde bovenhoeken, dunne streepjes ertussen; de gekozen tab heeft de kleur van
   de pagina eronder en loopt er met twee holle hoekjes in over */
html.ctm { --ctm-strip: #e4dfd3; --ctm-tabr: 9px; --ctm-tabbg: var(--ctm-bg); }
/* de gekozen tab is één met wat hij toont (wens gebruiker 2026-12-03: "doe tabs wel een eenheid laten zijn met datgene wat ze
   tonen"): de kleur van de pagina eronder, bij de stambomen op perkament het perkament (--gpaper van .gplate) */
html.ctm body:is([data-view="groot"], [data-view="bijbel"]) { --ctm-tabbg: var(--gpaper, #f1ead9); }
html.ctm nav#tabs, html.ctm body.full nav#tabs {
  position: sticky; top: 0; z-index: 20; flex: none; margin: 0; padding: 7px 18px 0; gap: 0;
  display: flex; flex-wrap: wrap; align-items: flex-end; overflow: visible;
  background: var(--ctm-strip); border-bottom: 0; font-family: var(--ctm-s); }
html.ctm nav#tabs a { position: relative; padding: 8px 18px 9px; font: 600 14px var(--ctm-s); color: #5a5a5a; text-decoration: none;
  border-radius: var(--ctm-tabr) var(--ctm-tabr) 0 0; white-space: nowrap; border-bottom: 0; margin-bottom: 0;
  background: linear-gradient(#b9b2a3, #b9b2a3) left 50% / 1px 18px no-repeat; }
html.ctm nav#tabs a:first-of-type, html.ctm nav#tabs a[aria-current="page"] + a { background-image: none; }
html.ctm nav#tabs a:hover { color: var(--ctm-navy); background: rgba(255, 255, 255, .45); }
html.ctm nav#tabs a[aria-current="page"] { color: var(--ctm-navy); background: var(--ctm-tabbg); z-index: 1;
  box-shadow: inset 0 3px 0 var(--ctm-accent); }
html.ctm nav#tabs a[aria-current="page"]::before, html.ctm nav#tabs a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 0; width: var(--ctm-tabr); height: var(--ctm-tabr); pointer-events: none; }
html.ctm nav#tabs a[aria-current="page"]::before { left: calc(-1 * var(--ctm-tabr));
  background: radial-gradient(circle at 0 0, transparent calc(var(--ctm-tabr) - .5px), var(--ctm-tabbg) var(--ctm-tabr)); }
html.ctm nav#tabs a[aria-current="page"]::after { right: calc(-1 * var(--ctm-tabr));
  background: radial-gradient(circle at 100% 0, transparent calc(var(--ctm-tabr) - .5px), var(--ctm-tabbg) var(--ctm-tabr)); }
.ctm-tabs { display: contents; }

/* de knoppen van de grote stamboom: route() zet ze op de tabbalk; op een breed scherm zet calvintomoor.js ze rechts in de kop */
html.ctm body.full :is(nav, .ctm-head, .ctm-tools) .crow { padding: 0; gap: 4px 6px; font: 14px var(--ctm-s); }
.ctm-tools { display: none; }
html.ctm body.full .ctm-tools:not(:empty) { display: flex; flex: none; justify-content: center; padding: 6px 10px;
  background: var(--ctm-tabbg); border-bottom: 0; }   /* (onder de gekozen tab, in zijn kleur) */
html.ctm .ctm-head .crow { margin-left: auto; padding: 0; flex-wrap: nowrap; flex: none; display: flex; align-items: center; }
html.ctm body.full :is(nav, .ctm-head, .ctm-tools) .crow :is(select, input[type=search], .btn) {
  font: 14px var(--ctm-s); padding: 4px 9px; border-radius: 3px; border: 1px solid var(--ctm-field); background: var(--ctm-paper); color: var(--ctm-ink); }
html.ctm body.full :is(nav, .ctm-head, .ctm-tools) .crow input[type=search] { width: 190px; }
html.ctm body.full :is(nav, .ctm-head, .ctm-tools) .crow .btn:hover { background: #eef1f6; }
html.ctm body.full :is(nav, .ctm-head, .ctm-tools) .crow .gtog[aria-pressed="true"], html.ctm #bzFilt[aria-pressed="true"] { background: var(--ctm-navy); border-color: var(--ctm-navy); color: #fff; }
html.ctm nav a:focus-visible, html.ctm button:focus-visible, html.ctm input:focus-visible, html.ctm select:focus-visible, html.ctm .ctm-brand:focus-visible {
  outline: 2px solid var(--ctm-navy); outline-offset: 2px; }

/* de grote stamboom vult de rest van het venster: de body als kolom, .wrap neemt wat over is */
html.ctm body.full { display: flex; flex-direction: column;
  height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
html.ctm body.full .wrap { flex: 1; height: auto; min-height: 0; width: 100%; margin: 0; box-sizing: border-box; }   /* margin: auto zou hem smal maken */

/* de andere tabs: de inhoud in de kolom eronder; de inleiding met de cijfers bovenaan de Ranglijst */
html.ctm .wrap { padding-top: 0; }
html.ctm header:not(.ctm-head) h1 { display: none; }
html.ctm .ctm-intro { padding: 0 0 20px; margin: 0 0 22px; border-bottom: 1px solid var(--ctm-rule); }
html.ctm .ctm-intro .sub { font-family: var(--ctm-s); font-size: 16px; color: var(--ctm-muted); margin-top: 0; }
html.ctm section > h2 { font: 400 26px/1.2 var(--ctm-d); color: var(--ctm-navy); }
html.ctm .lede { font-family: var(--ctm-s); font-size: 16px; }

/* het laadscherm: de blauwe band over een plank boekruggen, zoals bovenaan de startpagina van calvintomoor */
.ctm-load { display: none; }
html.ctm-wait body { overflow: hidden; }
html.ctm-wait .wrap, html.ctm-wait nav#tabs { visibility: hidden; }
html.ctm-wait .ctm-load { display: flex; position: fixed; inset: var(--ctm-top) 0 0 0; z-index: 50; align-items: center; justify-content: center;
  color: #fff; overflow: auto; border-top: 4px solid var(--ctm-accent);
  background: linear-gradient(rgba(15,35,66,.86), rgba(15,35,66,.93)),
    repeating-linear-gradient(90deg, #5a4630 0 18px, #6e5636 18px 22px, #4a3a28 22px 40px, #7a3a2a 40px 54px, #4a3a28 54px 62px); }
.ctm-load-in { max-width: 34em; padding: 24px; text-align: center; }
.ctm-load-in img { width: 76px; height: 76px; display: block; margin: 0 auto 18px; }
.ctm-kicker { font: 700 12px var(--ctm-s); letter-spacing: .1em; text-transform: uppercase; color: var(--ctm-gold); margin: 0 0 12px; }
.ctm-load-in h1 { font: 400 clamp(24px, 4vw, 36px)/1.3 var(--ctm-d); color: #fff; margin: 0 0 14px; text-wrap: balance; }
.ctm-say { font: 16px/1.55 var(--ctm-s); color: var(--ctm-onnavy); margin: 0 auto; max-width: 30em; }
.ctm-bar { width: 220px; height: 3px; margin: 26px auto 0; background: rgba(255,255,255,.16); border-radius: 2px; overflow: hidden; }
.ctm-bar i { display: block; width: 40%; height: 100%; background: var(--ctm-gold); animation: ctm-slide 1.4s ease-in-out infinite; }
@keyframes ctm-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .ctm-bar i { animation: none; width: 100%; opacity: .6; } }

/* telefoon: alleen de kop met het logo, de bovenste balk eraf; de tabs één rij om te vegen, de knoppen eronder */
@media (max-width: 640px) {
  html.ctm { --ctm-util: 0px; --ctm-headh: 50px; }
  .ctm-util { display: none; }
  html.ctm header.ctm-head { padding: 0 14px; gap: 8px; }
  .ctm-brand img { height: 30px; width: 30px; }
  .ctm-brand b { font-size: 17px; }
  .ctm-title { font-size: 14px; }
  html.ctm nav#tabs, html.ctm body.full nav#tabs { padding-inline: 6px; }
  html.ctm .ctm-tabs { display: flex; align-items: flex-end; flex: 1 0 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-inline: 9px; }
  html.ctm nav#tabs a { padding-inline: 13px; }
  html.ctm .ctm-tabs::-webkit-scrollbar { display: none; }
  html.ctm body.full :is(nav, .ctm-head, .ctm-tools) .crow input[type=search] { width: 150px; }
}
@media (max-width: 400px) { .ctm-sep, .ctm-title { display: none; } }
