* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f2f5f8;
  color: #1d2733;
}

header {
  background: #ff7a00;
  color: #fff;
  padding: 0.6rem 1.2rem;
}
header h1 { margin: 0; font-size: 1.4rem; }

.screen { max-width: 960px; margin: 1rem auto; padding: 0 1rem; }
[hidden] { display: none !important; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.card h2 { margin-top: 0; }
.hint { color: #5a6775; margin-top: -0.4rem; }

.categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.category { border: 1px solid #dde3ea; border-radius: 8px; padding: 0.6rem 0.8rem; }
.category .cat-head { font-weight: 600; border-bottom: 1px solid #dde3ea; padding-bottom: 0.4rem; margin-bottom: 0.4rem; display: block; }
.category label { display: block; padding: 0.12rem 0; cursor: pointer; }
.radio { display: inline-block; margin-right: 1.4rem; cursor: pointer; }

.actions { display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; }

button {
  font: inherit;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  border: 1px solid transparent;
}
button.primary { background: #0b63c4; color: #fff; }
button.primary:hover { background: #094f9c; }
button.secondary { background: #fff; color: #0b63c4; border-color: #0b63c4; }
button.secondary:hover { background: #eaf2fc; }
button.link { background: none; color: #5a6775; text-decoration: underline; padding: 0.3rem 0; margin-top: 1.2rem; }
button:disabled { opacity: 0.6; cursor: default; }

.error { color: #b00020; text-align: right; }

/* Toets */
.quiz {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  height: calc(100vh - 2.9rem);
}
#map { flex: 1; min-width: 0; background: #aad3df; }
.panel {
  width: 340px;
  padding: 1rem 1.2rem;
  background: #fff;
  overflow-y: auto;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.08);
}
.progress { display: flex; justify-content: space-between; color: #5a6775; font-size: 0.95rem; }
.progressbar { height: 6px; background: #e3e8ee; border-radius: 3px; margin: 0.4rem 0 1rem; }
#q-bar { height: 100%; width: 0; background: #ff7a00; border-radius: 3px; transition: width 0.3s; }
#q-text { font-size: 1.2rem; }

#type-form { display: flex; flex-direction: column; gap: 0.5rem; }
#type-input { font: inherit; padding: 0.55rem; border: 1px solid #b8c2cc; border-radius: 6px; }

.choices { display: flex; flex-direction: column; gap: 0.5rem; }
.choices button { background: #f2f5f8; border-color: #b8c2cc; text-align: left; }
.choices button:hover:not(:disabled) { background: #e3ecf7; }
.choices button.correct { background: #d6f5dd; border-color: #2e9d48; }
.choices button.wrong { background: #fbdcdc; border-color: #c62828; }
.choices kbd { color: #8692a0; margin-right: 0.4rem; font-family: inherit; }

.feedback { margin: 1rem 0 0.6rem; padding: 0.6rem 0.8rem; border-radius: 6px; }
.feedback.good { background: #d6f5dd; color: #1d6b31; }
.feedback.bad { background: #fbdcdc; color: #8e1c1c; }
#btn-next { width: 100%; }

.study-list { columns: 2; padding-left: 1.1rem; font-size: 0.92rem; }
.study-list li { cursor: pointer; }
.study-list li:hover { text-decoration: underline; }

.leaflet-tooltip.topo-label { font-weight: 600; }

/* Resultaat */
.big { font-size: 2rem; font-weight: 700; margin: 0.2rem 0; }
table.mistakes { width: 100%; border-collapse: collapse; margin-top: 0.8rem; }
table.mistakes th, table.mistakes td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid #e3e8ee; }
table.mistakes td.given { color: #c62828; }
table.mistakes td.answer { color: #1d6b31; font-weight: 600; }

@media (max-width: 760px) {
  .quiz { flex-direction: column; height: auto; }
  #map { height: 55vh; flex: none; }
  .panel { width: auto; box-shadow: none; }
}
