:root {
  --wit: #ffffff;
  --kop: #4a4a4d;
  --tekst: #5a5a5d;
  --stil: #8a8a8e;
  --lijn: #ececee;
  --vlak: #f7f7f8;
  --salie: #4f7a5e;
  --salie-vlak: #edf3ef;
  --blauw: #5b7c99;
  --rose: #a8616f;
  --rose-vlak: #f8eef0;
  --stift: #f5e994;
  --regel: 1.6;
  --f-kop: "Sora", system-ui, sans-serif;
  --f-lees: "Libre Baskerville", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-bottom: 72px;
  background: var(--wit);
  color: var(--tekst);
  font: 18px/var(--regel) var(--f-lees);
  font-variant-numeric: lining-nums;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

a { color: var(--salie); text-underline-offset: 3px; }

b { color: var(--kop); font-weight: 700; }

h1, h2, h3 {
  font-family: var(--f-kop);
  font-weight: 500;
  color: var(--kop);
  line-height: 1.25;
  text-wrap: balance;
}

h1 { font-size: 44px; margin: 8px 0 20px; letter-spacing: -0.015em; }
h2 { font-size: 26px; margin: 0 0 20px; letter-spacing: -0.005em; }
h3 { font-size: 19px; margin: 0 0 6px; }
h3.sub { margin-top: 36px; }

p { margin: 0 0 16px; text-wrap: pretty; }

.stift {
  background: linear-gradient(transparent 55%, var(--stift) 55%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.label, .bron, .teller, dt {
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.label { color: var(--stil); margin: 0; }
.bron { color: var(--stil); margin: 20px 0 0; }
.bron a { color: inherit; }
.stil { color: var(--stil); }

section {
  padding: 48px 0;
  border-top: 1px solid var(--lijn);
}

/* Kop */

.lead, .blik { display: none; }

.nu { margin-top: 32px; }

.nu-temp {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--f-kop);
  color: var(--kop);
}

#nu-temp { font-size: 56px; font-weight: 400; line-height: 1; letter-spacing: -0.03em; }
.nu-plek { font-size: 16px; color: var(--stil); }
.nu-weg { margin: 12px 0 0; }
.nu-weg:empty { display: none; }

/* Bronnenregel met een stip die laat zien dat er iets loopt */

:root {
  --mark-1: #b3e3d4;
  --mark-2: #d7a0d6;
  --mark-3: #b3d9e3;
  --mark-4: #f3bda9;
}

.bronnen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--stil);
}

.stip {
  position: relative;
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: conic-gradient(var(--mark-1), var(--mark-2), var(--mark-3), var(--mark-4), var(--mark-1));
}

.stip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--mark-2);
  animation: radar 2.4s ease-out infinite;
}

@keyframes radar {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stip::after { animation: none; opacity: 0; }
}

/* Wist je dat */

.weetje { margin: 0 0 28px; font-size: 17px; line-height: 1.6; color: var(--tekst); }
.weetje .label { display: block; margin-bottom: 6px; color: var(--salie); }

/* Webcams */

.webcams { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--lijn); }

.webcam-hoofd {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
  font-family: var(--f-kop);
  font-size: 18px;
  line-height: 1.6;
  color: var(--kop);
  text-decoration: none;
}

.webcam-hoofd .stip { background: var(--salie); }
.webcam-hoofd .stip::after { border-color: var(--salie); }
.webcam-hoofd .stil { font-family: var(--f-lees); font-size: 16px; }
.webcam-hoofd:hover { color: var(--salie); }

.webcam-meer { margin: 4px 0 0; }
.webcam-meer summary { font-size: 16px; }

#webcam-groepen {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px 24px;
  padding: 12px 0 4px;
}

.webcam-groep ul { list-style: none; margin: 6px 0 0; padding: 0; }
.webcam-groep li { font-size: 16px; line-height: 1.8; }
.webcam-groep .stil { font-family: var(--f-mono); font-size: 12px; }

/* Planning */

.planning { margin: 0 0 28px; padding: 20px 0 0; border-top: 1px solid var(--kop); }
.planning ol { list-style: none; margin: 12px 0 0; padding: 0; }
.planning li { padding: 12px 0; border-bottom: 1px solid var(--lijn); font-size: 16px; line-height: 1.5; }
.planning li:first-child { padding-top: 0; }
.planning li:last-child { border-bottom: 0; }
.planning .wanneer { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--salie); margin-bottom: 4px; }
.planning b { display: block; font-family: var(--f-kop); font-weight: 500; font-size: 17px; }
.planning li span:last-child:not(.wanneer) { display: block; margin-top: 4px; color: var(--tekst); }

/* Meldingen */

.melding { padding: 0 0 0 20px; border-left: 2px solid var(--lijn); margin-bottom: 24px; }
.melding:last-child { margin-bottom: 0; }
.melding h3 { font-size: 18px; }
.melding p { margin: 0; }
.melding p + p { margin-top: 8px; }
.melding.let { border-left-color: var(--rose); }

/* Lijsten: tekst links, status rechts op de eerste regel */

.lijst { list-style: none; margin: 0; padding: 0; }

.lijst li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "tekst status";
  column-gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--lijn);
}

.lijst li:first-child { padding-top: 0; }
.lijst li:last-child { border-bottom: 0; padding-bottom: 0; }
.lijst li > div { grid-area: tekst; }

.st {
  grid-area: status;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: calc(1em * var(--regel));
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--stil);
  white-space: nowrap;
}

.lijst .st { height: calc(18px * var(--regel)); }

.st::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.st.open { color: var(--salie); }
.st.dicht { color: var(--rose); }
.st.rustig::before { display: none; }

/* Weer */

.dagen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
}

.dag { padding: 0 20px; border-left: 1px solid var(--lijn); }
.dag:first-child { padding-left: 0; border-left: 0; }
.dag .label { margin-bottom: 10px; }
.dag .temp { font-family: var(--f-kop); font-size: 22px; color: var(--kop); line-height: 1.2; white-space: nowrap; }
.dag .lucht { font-size: 16px; margin: 8px 0 0; min-height: 3.2em; }
.dag .klein { font-family: var(--f-mono); font-size: 12px; color: var(--stil); margin: 10px 0 0; line-height: 1.7; }

/* Dieren */

.scoop {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
}

.scoop img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }
.scoop h3 { margin-top: 6px; font-size: 22px; }
.scoop p:last-child { margin: 0; }

.kaarten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px 24px;
  margin: 20px 0 28px;
}

.kaart img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--vlak); display: block; }
.kaart h4 { font-family: var(--f-kop); font-weight: 500; font-size: 18px; color: var(--kop); margin: 14px 0 0; }
.kaart .fr { font-style: italic; color: var(--stil); font-size: 16px; margin: 0 0 8px; }
.kaart p { font-size: 16px; margin: 0 0 6px; }
.kaart .waar { color: var(--stil); }

.uitklap { margin: 8px 0 28px; }
.uitklap summary { cursor: pointer; font-family: var(--f-kop); font-size: 17px; color: var(--salie); padding: 8px 0; }

/* Vogellijst */

.vogels { list-style: none; margin: 20px 0 28px; padding: 0; }
.vogels li { border-bottom: 1px solid var(--lijn); }
.vogels li:last-child { border-bottom: 0; }

.vogels label {
  display: grid;
  grid-template-columns: 56px 1fr 26px;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  cursor: pointer;
}

.vogels img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; display: block; }
.vogels .naam { font-family: var(--f-kop); font-weight: 500; color: var(--kop); font-size: 18px; line-height: 1.4; }
.vogels .fr { font-family: var(--f-lees); font-style: italic; font-weight: 400; color: var(--stil); font-size: 15px; }
.vogels .weet { font-size: 16px; margin: 4px 0 0; }
.vogels .seizoen { font-family: var(--f-mono); font-size: 12px; color: var(--stil); margin-top: 6px; }

.vogels input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1.5px solid #cfcfd3;
  border-radius: 6px;
  display: grid;
  place-content: center;
  transition: background .2s, border-color .2s;
}

.vogels input::after {
  content: "";
  width: 11px;
  height: 6px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: translateY(-2px) rotate(-45deg);
  opacity: 0;
  transition: opacity .2s;
}

.vogels input:checked { background: var(--salie); border-color: var(--salie); }
.vogels input:checked::after { opacity: 1; }

.teller { color: var(--salie); white-space: nowrap; }

/* Nummers */

.nummers { list-style: none; margin: 0; padding: 0; }
.nummers li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--lijn); }
.nummers li:last-child { border-bottom: 0; }
.nummers a { font-family: var(--f-kop); white-space: nowrap; text-decoration: none; }

/* Delen en notities */

.acties { display: flex; gap: 20px; margin-top: 16px; }

.actie {
  font-family: var(--f-mono);
  font-size: 12px;
  color: #b4b4b8;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}

.actie:hover, .actie.heeft { color: var(--salie); }

.notitie {
  width: 100%;
  min-height: 88px;
  margin-top: 8px;
  padding: 12px;
  font: 16px/1.5 var(--f-lees);
  color: var(--tekst);
  border: 1px solid var(--lijn);
  border-radius: 8px;
  resize: vertical;
}

.notitie:focus { outline: 2px solid var(--salie-vlak); border-color: var(--salie); }

.voet { padding-top: 40px; border-top: 1px solid var(--lijn); }
.voet .stil { font-size: 16px; }
.notities { margin-bottom: 24px; }

.knop {
  margin-top: 8px;
  font-family: var(--f-kop);
  font-size: 16px;
  color: #fff;
  background: var(--salie);
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
}

#notities-export { width: 100%; min-height: 160px; margin-top: 12px; font: 14px/1.5 var(--f-mono); }

.melding-kort {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: var(--kop);
  color: #fff;
  font-family: var(--f-kop);
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.melding-kort.zicht { opacity: 1; }

/* Ontwerpkeuze tijdens de testfase */

.ontwerpen {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--lijn);
  font: 12px/1 var(--f-mono);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.ontwerpen span { color: var(--stil); margin-right: 6px; }
.ontwerpen a { color: var(--tekst); text-decoration: none; padding: 8px 10px; border-radius: 6px; white-space: nowrap; }
.ontwerpen a.actief { background: var(--kop); color: #fff; }

/* Variant Overzicht: kerngetallen bovenaan, rubrieken naast elkaar op de iPad */

[data-ontwerp="overzicht"] .nu { display: none; }
[data-ontwerp="overzicht"] .intro { color: var(--stil); font-size: 17px; }

[data-ontwerp="overzicht"] .blik {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 32px 0 0;
  border-top: 1px solid var(--kop);
}

.blik div { padding: 16px 16px 0 0; }
.blik div + div { padding-left: 16px; border-left: 1px solid var(--lijn); }
.blik dt { color: var(--stil); }
.blik dd { margin: 8px 0 0; font-family: var(--f-kop); font-size: 30px; line-height: 1.1; color: var(--kop); letter-spacing: -0.02em; }
.blik dd span { display: block; margin-top: 8px; font-family: var(--f-lees); font-size: 15px; line-height: 1.4; letter-spacing: 0; color: var(--stil); }

@media (min-width: 900px) {
  [data-ontwerp="overzicht"] .wrap {
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 64px;
    align-items: start;
  }

  [data-ontwerp="overzicht"] .kop,
  [data-ontwerp="overzicht"] #let-op,
  [data-ontwerp="overzicht"] #weer,
  [data-ontwerp="overzicht"] #dieren,
  [data-ontwerp="overzicht"] #vogels,
  [data-ontwerp="overzicht"] .voet { grid-column: 1 / -1; }

  [data-ontwerp="overzicht"] .kop { padding-bottom: 48px; }
  [data-ontwerp="overzicht"] #vogellijst { columns: 2; column-gap: 48px; }
  [data-ontwerp="overzicht"] #vogellijst li { break-inside: avoid; }
}

/* Variant Redactie: een openingszin uit de live data, genummerde rubrieken */

[data-ontwerp="redactie"] .nu { display: none; }
[data-ontwerp="redactie"] h1 { font-size: 20px; letter-spacing: 0; margin: 12px 0 28px; }

[data-ontwerp="redactie"] .lead {
  display: block;
  font-size: 30px;
  line-height: 1.4;
  color: var(--kop);
  margin: 0 0 28px;
  text-wrap: pretty;
}

[data-ontwerp="redactie"] .lead:empty::before { content: "Even kijken hoe het er vandaag voor staat."; color: var(--stil); }
[data-ontwerp="redactie"] .intro { color: var(--stil); font-size: 17px; }

[data-ontwerp="redactie"] main { counter-reset: rubriek; }
[data-ontwerp="redactie"] section { counter-increment: rubriek; }

[data-ontwerp="redactie"] section h2::before {
  content: counter(rubriek, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  font: 12px/1.5 var(--f-mono);
  letter-spacing: 0.02em;
  color: var(--stil);
}

@media (min-width: 900px) {
  [data-ontwerp="redactie"] .wrap { max-width: 1040px; }
  [data-ontwerp="redactie"] .kop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 56px;
    align-content: start;
    padding-bottom: 24px;
  }

  [data-ontwerp="redactie"] .kop > * { grid-column: 1; }
  [data-ontwerp="redactie"] .kop > .planning { grid-column: 2; grid-row: 1 / span 8; align-self: start; margin: 0; }
  [data-ontwerp="redactie"] .lead { font-size: 34px; }

  [data-ontwerp="redactie"] section {
    display: grid;
    grid-template-columns: 240px 1fr;
    column-gap: 48px;
  }

  [data-ontwerp="redactie"] section > * { grid-column: 2; }
  [data-ontwerp="redactie"] section > h2 {
    grid-column: 1;
    grid-row: 1 / span 20;
    align-self: start;
    position: sticky;
    top: 32px;
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .wrap { padding-top: 28px; }
  h1 { font-size: 36px; }
  h2 { font-size: 24px; }
  section { padding: 40px 0; }
  #nu-temp { font-size: 52px; }

  .dagen { grid-template-columns: 1fr; }
  .dag { display: grid; grid-template-columns: 88px 1fr; gap: 4px 16px; padding: 16px 0; border-left: 0; border-top: 1px solid var(--lijn); }
  .dag:first-child { border-top: 0; padding-top: 0; }
  .dag .label { margin: 0; grid-row: span 3; padding-top: 6px; }
  .dag .lucht { min-height: 0; margin: 0; }
  .dag .klein { margin: 0; }

  .scoop { grid-template-columns: 1fr; }
  .scoop img { aspect-ratio: 16 / 9; }
  .kaarten { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .kaart h4 { font-size: 17px; }

  [data-ontwerp="overzicht"] .blik { grid-template-columns: 1fr 1fr; }
  .blik div:nth-child(3) { padding-left: 0; border-left: 0; }
  .blik div:nth-child(n+3) { border-top: 1px solid var(--lijn); margin-top: 16px; }
  .blik dd { font-size: 26px; }

  [data-ontwerp="redactie"] .lead { font-size: 24px; }

  .ontwerpen span { display: none; }
}
