:root{
  --bg:#070A12;
  --panel:#0E1426;
  --text:#EAF0FF;
  --muted:#A9B4D0;
  --line: rgba(255,255,255,.12);
  --shadow: 0 12px 28px rgba(0,0,0,.45);
  --radius: 16px;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% 0%, #111a39 0%, var(--bg) 55%, #050712 100%);
  color: var(--text);
  line-height: 1.55;
}
.container{ width:min(1100px, 92vw); margin: 0 auto; padding: 26px 0 46px; }
header{
  display:flex; gap:16px; align-items:flex-end; justify-content:space-between;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
}
.brand h1{ margin:0; font-size: clamp(22px, 3.4vw, 34px); letter-spacing:.2px; }
.brand p{ margin:6px 0 0; color: var(--muted); }
.badge{
  font-size: 12px; color: var(--muted);
  padding: 8px 10px; border:1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.04);
}
.nav{
  display:flex; gap:10px; flex-wrap:wrap;
  padding: 14px 0 0;
}
.nav a{
  color: var(--text); text-decoration:none;
  padding: 8px 10px; border:1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.04);
  font-size: 13px;
}
.nav a:hover{ background: rgba(255,255,255,.06); }
h2{ margin: 24px 0 12px; font-size: 18px; }
.grid{
  display:grid;
  grid-template-columns: repeat( auto-fit, minmax(170px, 1fr) );
  gap: 14px;
}
.card{
  display:flex; flex-direction:column; gap:10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  text-decoration:none;
  color: var(--text);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.card:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.card img{
  width:100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
}
.card .title{ font-weight: 700; }
.card .meta{ color: var(--muted); font-size: 12px; }
.page{
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  padding: 16px;
  box-shadow: var(--shadow);
}
.page img{
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
}
.small{ color: var(--muted); font-size: 12px; }
.footer{
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* --- Toegankelijkheid (WCAG) aanvullingen --- */
.skip-link{
  position:absolute; left:-9999px; top:12px;
  padding:10px 14px; border-radius:999px;
  background:#ffffff; color:#000000; z-index:9999;
  border:2px solid #000;
}
.skip-link:focus{ left:12px; }

:focus-visible{
  outline: 3px solid #5aa9ff;
  outline-offset: 3px;
}

/* Links altijd herkenbaar */
a{ text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nav a, .card{ text-decoration: none; }
.nav a:hover, .nav a:focus-visible{ text-decoration: underline; }
.card:hover .title, .card:focus-visible .title{ text-decoration: underline; }

/* Minder beweging als gebruiker dat wil */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; }
  .card{ transition:none !important; }
}

/* Visueel verborgen, maar wel voor screenreaders */
.visually-hidden{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* Knoppen voor a11y */
.a11y-tools{
  display:flex; gap:8px; flex-wrap:wrap;
  justify-content:flex-end; align-items:center;
}
.a11y-tools button{
  font: inherit;
  color: var(--text);
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
}
.a11y-tools button:hover{ background: rgba(255,255,255,.06); }
.a11y-tools button:focus-visible{ outline: 3px solid #5aa9ff; outline-offset: 3px; }

/* Thema's */
html.theme-light{
  --bg:#ffffff;
  --panel:#f5f7ff;
  --text:#0b1220;
  --muted:#33415e;
  --line: rgba(0,0,0,.14);
  --shadow: 0 12px 28px rgba(0,0,0,.12);
}

html.theme-light .card img,
html.theme-light .page img{ background: rgba(255,255,255,.92); }
html.high-contrast{
  --bg:#000000;
  --panel:#000000;
  --text:#ffffff;
  --muted:#ffffff;
  --line: rgba(255,255,255,.8);
  --shadow:none;
}
html.high-contrast a{ text-decoration: underline; }

/* Zorg dat main focusbaar is (skip-link) */
main:focus{ outline:none; }


/* --- Accessibility helpers --- */
:root { --font-scale: 1; }
html { font-size: calc(16px * var(--font-scale)); }

.skip-link{
  position:absolute; left:-9999px; top:0;
  padding:10px 12px; z-index:9999;
  background:#000; color:#fff; border-radius:10px;
}
.skip-link:focus{ left:12px; top:12px; }

.a11y-toolbar{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin: 10px 0 16px 0;
}
.a11y-toolbar button{
  cursor:pointer;
}

/* Themes */
html[data-theme="dark"] body{ background:#0b0f14; color:#e7eef7; }
html[data-theme="dark"] a{ color:#8ab4ff; }
html[data-theme="light"] body{ background:#ffffff; color:#111; }
html[data-theme="light"] a{ color:#0b57d0; }

/* High contrast */
html[data-contrast="high"] body{ background:#000 !important; color:#fff !important; }
html[data-contrast="high"] a{ color:#00e5ff !important; }
html[data-contrast="high"] *{ box-shadow:none !important; }

.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}



/* === Toegankelijkheid 4.1.2: betere leesbaarheid & contrast === */
body{
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.2px;
}

a:focus-visible, button:focus-visible{
  outline: 3px solid #5aa9ff;
  outline-offset: 3px;
}

/* Zorg dat de knoppen rechtsboven altijd bovenop liggen */
header.site-header, .a11y-tools{
  position: relative;
  z-index: 9999;
}

/* Beter contrast voor knoppen in lichte modus */
html.theme-light .a11y-tools button{
  background: rgba(0,0,0,.08);
  border: 2px solid var(--line);
}
html.theme-light .a11y-tools button:hover{
  background: rgba(0,0,0,.12);
}

/* Maak knoppen iets groter en duidelijker */
.a11y-tools button{
  padding: 10px 12px;
  font-weight: 600;
}

/* Link-contrast verbeteren */
a{ text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Verminder "drukke" animaties als iemand dat wil */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}

/* Link als knop */
a.btn-link{
  display:inline-block;
  padding:10px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 2px solid var(--line);
}
a.btn-link:hover{ filter: brightness(1.05); }


/* --- 4.2.x / 4.3: extra kaarten & a11y --- */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.card-link{ text-decoration:none; color: inherit; display:block; }
.card{
  border:1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
}
.card img{
  width:100%;
  height:auto;
  border-radius: 10px;
  border:1px solid rgba(255,255,255,0.12);
}
.card h3{ margin: 10px 0 6px; }
.card p{ margin: 0; }

/* Font scaling: JS sets html{font-size: ...%} */
html{ font-size: 100%; }

/* High contrast mode (toggle) */
body.contrast{
  background:#000 !important;
  color:#fff !important;
}
body.contrast a{ color:#7ff !important; }
body.contrast .card{
  background:#000 !important;
  border-color:#fff !important;
}
body.contrast .nav a, body.contrast .btn{
  border-color:#fff !important;
}

.version{opacity:0.8; font-size:0.95em;}


/* FORCE REMOVE ACCESSIBILITY TOOLBAR */
#a11y-toolbar, .a11y-tools { display:none !important; }
