@charset "UTF-8";
/* ===========================================================================
   Bijbelbox - eigen stylesheet, vervangt jQuery Mobile.
   Licht en donker via tokens; alle kleuren staan in :root gedefinieerd.
   =========================================================================== */

:root {
  --groen:        #1d7a79;
  --groen-licht:  #2a9d9b;
  --papier:       #faf8f4;
  --vlak:         #ffffff;
  --rand:         #e4ded3;
  --rand-zacht:   #efeae1;
  --tekst:        #1f2326;
  --tekst-zacht:  #5f6a70;
  --tekst-licht:  #8b949a;
  --accent-vlak:  #e8f2f1;
  --schaduw:      0 1px 2px rgba(31,35,38,.06), 0 2px 8px rgba(31,35,38,.04);
  --radius:       12px;
  --kolom:        44rem;
  --leesmaat:     1.0625rem;
  --leeshoogte:   1.75;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --groen:        #4bb3b1;
    --groen-licht:  #63c7c5;
    --papier:       #15181a;
    --vlak:         #1c2023;
    --rand:         #2e3438;
    --rand-zacht:   #262c30;
    --tekst:        #e6e4df;
    --tekst-zacht:  #a3adb3;
    --tekst-licht:  #79848a;
    --accent-vlak:  #1b2e2e;
    --schaduw:      0 1px 2px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.2);
  }
}

:root[data-theme="dark"] {
  --groen:        #4bb3b1;
  --groen-licht:  #63c7c5;
  --papier:       #15181a;
  --vlak:         #1c2023;
  --rand:         #2e3438;
  --rand-zacht:   #262c30;
  --tekst:        #e6e4df;
  --tekst-zacht:  #a3adb3;
  --tekst-licht:  #79848a;
  --accent-vlak:  #1b2e2e;
  --schaduw:      0 1px 2px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.2);
}

/* Leesmaat-instelling van de bezoeker */
:root[data-leesmaat="groot"]      { --leesmaat: 1.1875rem; }
:root[data-leesmaat="groter"]     { --leesmaat: 1.375rem; --leeshoogte: 1.8; }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tekst);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--groen); }
img { max-width: 100%; height: auto; }

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--groen);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--kolom); margin: 0 auto; padding: 0 1.125rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--vlak); color: var(--tekst);
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* --- kopbalk ------------------------------------------------------------ */

.balk {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rand-zacht);
}
.balk-in {
  max-width: var(--kolom); margin: 0 auto;
  padding: .5rem 1.125rem;
  display: flex; align-items: center; gap: .5rem; min-height: 3.25rem;
}
.balk-titel {
  font-size: .9375rem; font-weight: 600; margin: 0;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--tekst);
}
.balk-merk {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; letter-spacing: -.01em;
  color: var(--tekst); text-decoration: none; flex: 1;
}
.balk-merk .vink {
  display: grid; place-items: center;
  width: 1.75rem; height: 1.75rem; border-radius: 7px;
  background: var(--groen); color: #fff; font-size: 1.1rem; line-height: 1;
}

.knop-icoon {
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem; flex: none;
  border: 1px solid var(--rand); border-radius: 9px;
  background: var(--vlak); color: var(--tekst-zacht);
  font-size: .9375rem; cursor: pointer; padding: 0;
  text-decoration: none; line-height: 1;
}
.knop-icoon:hover { color: var(--groen); border-color: var(--groen); }
.knop-icoon[aria-pressed="true"] { color: var(--groen); border-color: var(--groen); background: var(--accent-vlak); }

/* --- inhoud ------------------------------------------------------------- */

main { padding: 1.5rem 0 3rem; }

h1 {
  font-size: 1.75rem; line-height: 1.25; letter-spacing: -.02em;
  margin: 0 0 .5rem; font-weight: 700;
}
h2 { font-size: 1.1875rem; line-height: 1.35; margin: 2rem 0 .5rem; font-weight: 650; }
p  { margin: 0 0 1rem; }
.lead { color: var(--tekst-zacht); font-size: 1.0625rem; margin-bottom: 1.5rem; }
.klein { font-size: .8125rem; color: var(--tekst-licht); }

.kruimels {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  list-style: none; padding: 0; margin: 0 0 1.25rem;
  font-size: .8125rem; color: var(--tekst-licht);
}
.kruimels a { color: var(--tekst-zacht); text-decoration: none; }
.kruimels a:hover { color: var(--groen); text-decoration: underline; }
.kruimels .pijl { color: var(--tekst-licht); }

/* --- zoeken ------------------------------------------------------------- */

.zoek { position: relative; margin: 0 0 1.5rem; }
.zoek input {
  width: 100%; font: inherit; font-size: 1rem;
  padding: .8rem 1rem .8rem 2.6rem;
  border: 1px solid var(--rand); border-radius: var(--radius);
  background: var(--vlak); color: var(--tekst);
  box-shadow: var(--schaduw);
}
.zoek input::placeholder { color: var(--tekst-licht); }
.zoek input:focus { border-color: var(--groen); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--groen) 18%, transparent); }
.zoek .loep {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  color: var(--tekst-licht); pointer-events: none; font-size: 1rem;
}
.zoek-hint { font-size: .8125rem; color: var(--tekst-licht); margin: .5rem 0 0; }

/* --- lijsten ------------------------------------------------------------ */

.kaarten { display: grid; gap: .75rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.kaart {
  display: flex; align-items: center; gap: .875rem;
  padding: 1rem 1.125rem;
  background: var(--vlak); border: 1px solid var(--rand);
  border-radius: var(--radius); box-shadow: var(--schaduw);
  text-decoration: none; color: var(--tekst);
}
.kaart:hover { border-color: var(--groen); }
.kaart-tekst { flex: 1; min-width: 0; }
.kaart-titel { font-weight: 650; display: block; }
.kaart-bij { font-size: .8125rem; color: var(--tekst-zacht); display: block; margin-top: .125rem; }
.kaart-pijl { color: var(--tekst-licht); flex: none; }

.psalmlijst { list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--rand); border-radius: var(--radius);
  background: var(--vlak); overflow: hidden; box-shadow: var(--schaduw); }
.psalmlijst li + li { border-top: 1px solid var(--rand-zacht); }
.psalmlijst a {
  display: flex; align-items: baseline; gap: .875rem;
  padding: .8rem 1rem; text-decoration: none; color: var(--tekst);
}
.psalmlijst a:hover { background: var(--accent-vlak); }
.psalmlijst .nr {
  flex: none; min-width: 2.75rem;
  font-variant-numeric: tabular-nums; font-weight: 650;
  color: var(--groen); font-size: .9375rem;
}
.psalmlijst .regel {
  color: var(--tekst-zacht); font-size: .9375rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.psalmlijst mark { background: color-mix(in srgb, var(--groen) 25%, transparent);
  color: inherit; border-radius: 3px; padding: 0 .1em; }
.geen-treffers { padding: 1.5rem 1rem; text-align: center; color: var(--tekst-licht); }

/* --- psalmtekst --------------------------------------------------------- */

.psalm-kop { margin-bottom: 1.5rem; }
.psalm-kop .berijming { color: var(--tekst-zacht); font-size: .9375rem; margin: 0; }

.verzen { margin: 0 0 2rem; }
.vers { display: flex; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--rand-zacht); }
.vers:first-child { border-top: 0; padding-top: .25rem; }
.vers-nr {
  flex: none; width: 1.75rem; text-align: right;
  font-size: .8125rem; font-weight: 650; color: var(--groen);
  font-variant-numeric: tabular-nums;
  padding-top: .45em; user-select: none;
}
.vers-tekst {
  margin: 0; flex: 1; min-width: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: var(--leesmaat); line-height: var(--leeshoogte);
  hyphens: none;
}

.wissel {
  margin: 0 0 1.25rem; padding: .875rem 1.125rem;
  background: var(--accent-vlak); border-radius: var(--radius);
  font-size: .9375rem; color: var(--tekst-zacht);
}
.wissel a { font-weight: 600; }

.blader { display: flex; gap: .75rem; margin: 0 0 1.5rem; }
.blader a {
  flex: 1; display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem; border: 1px solid var(--rand);
  border-radius: var(--radius); background: var(--vlak);
  text-decoration: none; color: var(--tekst); font-size: .9375rem; font-weight: 600;
}
.blader a:hover { border-color: var(--groen); color: var(--groen); }
.blader .next { justify-content: flex-end; text-align: right; }
.blader .leeg { flex: 1; }

/* --- voettekst ---------------------------------------------------------- */

.voet {
  border-top: 1px solid var(--rand-zacht);
  padding: 1.75rem 0 2.5rem; margin-top: 2rem;
  font-size: .875rem; color: var(--tekst-zacht);
}
.voet nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-bottom: .875rem; }
.voet a { color: var(--tekst-zacht); text-decoration: none; }
.voet a:hover { color: var(--groen); text-decoration: underline; }

/* --- instellingenpaneel ------------------------------------------------- */

.paneel {
  position: absolute; right: 1.125rem; top: 3.5rem; z-index: 60;
  background: var(--vlak); border: 1px solid var(--rand);
  border-radius: var(--radius); box-shadow: var(--schaduw);
  padding: .875rem; min-width: 13rem;
}
.paneel-rij { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.paneel-rij + .paneel-rij { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--rand-zacht); }
.paneel-label { font-size: .8125rem; color: var(--tekst-zacht); font-weight: 600; }
.segment { display: inline-flex; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; }
.segment button {
  font: inherit; font-size: .8125rem; padding: .3rem .6rem;
  border: 0; background: var(--vlak); color: var(--tekst-zacht); cursor: pointer;
}
.segment button + button { border-left: 1px solid var(--rand); }
.segment button[aria-pressed="true"] { background: var(--groen); color: #fff; }

/* --- breder scherm ------------------------------------------------------ */

@media (min-width: 42rem) {
  h1 { font-size: 2.125rem; }
  main { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .balk, .voet, .blader, .wissel, .zoek, .paneel { display: none !important; }
  body { background: #fff; color: #000; }
  .vers-tekst { font-size: 11pt; }
}

/* zoekresultaten: beginregel met de berijming eronder */
.psalmlijst .treffer { flex: 1; min-width: 0; display: block; }
.psalmlijst .treffer .regel { display: block; }
.psalmlijst .bron {
  display: block; font-size: .75rem; color: var(--tekst-licht); margin-top: .1rem;
}
.psalmlijst a:has(.treffer) { align-items: flex-start; }
.psalmlijst a:has(.treffer) .nr { padding-top: .05rem; }

/* --- verzen als eigen pagina (stap 4) ---------------------------------- */
a.vers-nr { text-decoration: none; border-radius: 5px; }
a.vers-nr:hover { background: var(--accent-vlak); color: var(--groen-licht); }
.verzen.los .vers { border-top: 0; padding-top: .25rem; }
.verzen.los .vers-tekst { font-size: calc(var(--leesmaat) * 1.1); }

.verslijst {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.verslijst li { margin: 0; }
.verslijst a, .verslijst span {
  display: block; padding: .35rem .7rem;
  border: 1px solid var(--rand); border-radius: 8px;
  background: var(--vlak); color: var(--tekst-zacht);
  font-size: .8125rem; text-decoration: none; white-space: nowrap;
}
.verslijst a:hover { border-color: var(--groen); color: var(--groen); }
.verslijst .hier span {
  background: var(--groen); border-color: var(--groen);
  color: #fff; font-weight: 600;
}
.psalmlijst .nr small {
  display: block; font-size: .6875rem; font-weight: 400;
  color: var(--tekst-licht); letter-spacing: 0;
}
