@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
/* Layout: smalle missaalkolom op koel papier; rubriekrood voor labels en knoppen, zoals de rode aanwijzingen in een missaal. */
:root {
  --papier: #f6f6f3;
  --vlak: #ffffff;
  --inkt: #1d1f2a;
  --zacht: #5d6070;
  --lijn: #dcdcd6;
  --rubriek: #a3241f;
  --rubriek-zacht: #f4e3e1;
  --goed: #2f6b45;
  --matig: #9a6a12;
  --slecht: #a3241f;
  --font-kop: "Alegreya", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-tekst: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #15161c; --vlak: #1d1f27; --inkt: #ecebe6; --zacht: #a3a5b2; --lijn: #33353f;
    --rubriek: #e4675f; --rubriek-zacht: #3a1f1e; --goed: #6cc08a; --matig: #e0a948; --slecht: #ef766d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --papier: #15161c; --vlak: #1d1f27; --inkt: #ecebe6; --zacht: #a3a5b2; --lijn: #33353f;
  --rubriek: #e4675f; --rubriek-zacht: #3a1f1e; --goed: #6cc08a; --matig: #e0a948; --slecht: #ef766d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--papier); color: var(--inkt);
  font-family: var(--font-tekst); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rubriek); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rubriek); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--font-kop); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }

.rubriek {
  font-family: var(--font-tekst); font-weight: 700; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rubriek);
}
.zacht { color: var(--zacht); }
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

/* Kop en voet */
.kop { border-bottom: 1px solid var(--lijn); background: var(--vlak); }
.kop-binnen, .voet-binnen, .inhoud {
  max-width: 880px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.kop-binnen { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.merk { display: flex; align-items: center; gap: 12px; color: var(--inkt); text-decoration: none; font-family: var(--font-kop); font-size: 1.05rem; line-height: 1.15; }
.merk strong { font-size: 1.2rem; }
.merk-logo { width: 40px; height: 40px; flex: none; }
.kop-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.kop-nav a:not(.knop) { color: var(--inkt); text-decoration: none; font-weight: 500; }
.kop-nav a:not(.knop):hover { color: var(--rubriek); }
.demo-balk { background: var(--rubriek-zacht); color: var(--inkt); text-align: center; font-size: .9rem; padding: 6px 16px; }
.inhoud { padding-block: 40px 64px; display: grid; gap: 40px; outline: none; }
.voet { border-top: 1px solid var(--lijn); }
.voet-binnen { padding-block: 24px; display: grid; gap: 6px; font-size: .9rem; color: var(--zacht); }

/* Knoppen */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rubriek); color: #fff; border: 0; border-radius: 4px;
  padding: 12px 22px; font: 700 1rem var(--font-tekst); text-decoration: none; cursor: pointer;
}
.knop:hover { filter: brightness(1.08); }
.knop[disabled] { opacity: .55; cursor: wait; }
.knop-klein { padding: 7px 14px; font-size: .92rem; }
.knop-rand { background: transparent; color: var(--rubriek); box-shadow: inset 0 0 0 1.5px var(--rubriek); }
.linkknop { background: none; border: 0; padding: 0; color: var(--zacht); font: inherit; font-size: .88rem; text-decoration: underline; cursor: pointer; }
.linkknop:hover { color: var(--rubriek); }

/* Home */
.held { display: grid; gap: 18px; max-width: 46rem; }
.held p { font-size: 1.15rem; max-width: 38rem; }
.held-acties { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.stappen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; padding: 0; margin: 0; list-style: none; counter-reset: stap; }
.stappen li { counter-increment: stap; display: grid; gap: 4px; border-top: 2px solid var(--inkt); padding-top: 12px; }
.stappen li::before { content: counter(stap, upper-roman) "."; font-family: var(--font-kop); color: var(--rubriek); font-size: 1.3rem; font-weight: 700; }

/* Zoeken + lijsten */
.zoek { display: grid; gap: 8px; }
.zoek input { width: 100%; }
.sectie { display: grid; gap: 16px; }
.kruimel { font-size: .92rem; color: var(--zacht); display: flex; flex-wrap: wrap; gap: 6px; }
.kruimel a { color: var(--zacht); }
.lijst { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lijn); }
.lijst > li { border-bottom: 1px solid var(--lijn); }
.regel { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 4px; color: var(--inkt); text-decoration: none; }
a.regel:hover { background: var(--vlak); }
a.regel:hover .regel-titel { color: var(--rubriek); }
.regel > div { min-width: 0; }
.regel-titel { font-family: var(--font-kop); font-size: 1.15rem; font-weight: 700; }
.regel-sub { color: var(--zacht); font-size: .93rem; }
.regel-rechts { text-align: right; display: grid; justify-items: end; gap: 2px; }
.niet-klaar { color: var(--zacht); }
.niet-klaar .regel-titel { color: var(--zacht); }
.label-binnenkort { font-size: .8rem; border: 1px solid var(--lijn); border-radius: 99px; padding: 1px 10px; }

/* Cijfer */
.cijfer {
  display: inline-flex; align-items: baseline; justify-content: center;
  font-family: var(--font-data); font-weight: 500; font-variant-numeric: tabular-nums;
  min-width: 3.2em; padding: 2px 8px; border-radius: 4px; border: 1.5px solid currentColor;
}
.cijfer-goed { color: var(--goed); }
.cijfer-matig { color: var(--matig); }
.cijfer-slecht { color: var(--slecht); }
.cijfer-geen { color: var(--zacht); border-style: dashed; }
.cijfer-groot { font-size: 2.6rem; padding: 6px 16px; border-width: 2px; }

/* Kerkpagina */
.kerk-kop { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.kerk-kop > div { min-width: 0; display: grid; gap: 8px; }
.score-blok { display: grid; justify-items: center; gap: 4px; text-align: center; }
.feiten { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: .95rem; }
.feiten dt { color: var(--zacht); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.feiten dd { margin: 0; }
.balken { display: grid; gap: 8px; }
.balk { display: grid; grid-template-columns: minmax(0, 15rem) 1fr 2.5rem; gap: 12px; align-items: center; font-size: .93rem; }
.balk-spoor { height: 8px; background: var(--lijn); border-radius: 99px; overflow: hidden; }
.balk-vul { height: 100%; background: var(--rubriek); }
.melding { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--lijn); }
.melding:first-child { border-top: 1px solid var(--lijn); }
.melding-kop { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.melding-tekst { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 42rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .82rem; background: var(--rubriek-zacht); color: var(--inkt); border-radius: 3px; padding: 2px 8px; }
.vlag-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.leeg { padding: 28px; border: 1px dashed var(--lijn); border-radius: 4px; color: var(--zacht); text-align: center; }

.duimen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.duim {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px;
  border: 1.5px solid var(--lijn); background: var(--vlak); color: var(--zacht); font: inherit; font-size: .9rem; cursor: pointer;
}
.duim:hover { color: var(--inkt); border-color: var(--zacht); }
.duim-af svg { transform: rotate(180deg); }
.duim-gekozen { color: var(--rubriek); border-color: var(--rubriek); background: var(--rubriek-zacht); }
.duim[disabled] { opacity: .6; cursor: wait; }

/* Ranglijst en laatste meldingen */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters > div { display: grid; gap: 4px; min-width: 0; }
.filters select { width: auto; }
.rang { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lijn); counter-reset: rang; }
.rang > li { counter-increment: rang; border-bottom: 1px solid var(--lijn); }
.rang .regel { grid-template-columns: 2.4rem 1fr auto; }
.rang .regel::before { content: counter(rang) "."; font-family: var(--font-data); color: var(--zacht); font-variant-numeric: tabular-nums; }
.laatste { display: grid; gap: 0; }
.laatste .melding-tekst { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kerk-link { font-family: var(--font-kop); font-weight: 700; font-size: 1.1rem; color: var(--inkt); text-decoration: none; }
.kerk-link:hover { color: var(--rubriek); }

/* Formulier */
form { display: grid; gap: 26px; max-width: 40rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
legend, label.veld-label { font-weight: 700; padding: 0; margin-bottom: 4px; }
.hulp { color: var(--zacht); font-size: .9rem; }
input[type=text], input[type=date], input[type=time], input[type=email], input[type=password], input[type=search], select, textarea {
  font: inherit; color: var(--inkt); background: var(--vlak);
  border: 1.5px solid var(--lijn); border-radius: 4px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
.twee { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vinkjes { display: grid; gap: 8px; }
.vinkje { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; cursor: pointer; }
.vinkje input { margin-top: .3em; width: 1.05rem; height: 1.05rem; accent-color: var(--rubriek); }
.vinkje small { display: block; color: var(--zacht); }
.cijferkeuze { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.cijferkeuze input { position: absolute; opacity: 0; pointer-events: none; }
.cijferkeuze label {
  display: grid; place-items: center; height: 2.6rem; border: 1.5px solid var(--lijn); border-radius: 4px;
  font-family: var(--font-data); cursor: pointer; background: var(--vlak);
}
.cijferkeuze input:checked + label { background: var(--rubriek); border-color: var(--rubriek); color: #fff; }
.cijferkeuze input:focus-visible + label { outline: 2px solid var(--rubriek); outline-offset: 2px; }
.schaal { display: flex; justify-content: space-between; font-size: .85rem; color: var(--zacht); }
.fout { color: var(--slecht); font-weight: 500; }
.melding-ok { background: var(--rubriek-zacht); padding: 14px 16px; border-radius: 4px; }
.verstopt { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tekstpagina */
.tekst { display: grid; gap: 14px; max-width: 40rem; }
.tekst ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }

/* Beheer */
.beheer-regel { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--lijn); }
.beheer-acties { display: flex; gap: 8px; flex-wrap: wrap; }
.status-verborgen { color: var(--slecht); font-weight: 700; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .inhoud { padding-block: 28px 48px; gap: 32px; }
  .kop-nav { gap: 14px; }
  .kerk-kop { grid-template-columns: 1fr; }
  .score-blok { justify-items: start; text-align: left; }
  .twee { grid-template-columns: 1fr; }
  .cijferkeuze { grid-template-columns: repeat(5, 1fr); }
  .balk { grid-template-columns: 1fr 2.5rem; }
  .balk-spoor { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
