/**
 * Leermeesterlijk — Nulmeting (gebouwde CSS, geen Tailwind Play CDN)
 *
 * De adaptieve nulmeting Nederlands draait op deze stylesheet in plaats van op
 * de Tailwind-CDN die de rest van de site nog gebruikt. De Play CDN genereert
 * alle CSS runtime in JavaScript en is een dev-tool, geen productiemiddel.
 *
 * Alle kleuren komen uit de tokens in style.css (--hs-*), zodat de nulmeting
 * dezelfde huisstijl heeft als de rest van de site.
 */

body.nm-body {
  background: #f8fafc;
  margin: 0;
}

/* ------------------------------------------------------------------ HEADER */
.nm-header {
  background: #fff;
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nm-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nm-header-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  color: #64748b;
}

.nm-header-back i { font-size: 1.25rem; color: #94a3b8; }
.nm-header-back:hover { color: var(--hs-primary); }
.nm-header-back:hover i { color: var(--hs-accent); }

.nm-header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--hs-primary);
}

.nm-header-brand img { height: 1.5rem; width: auto; }
.nm-header-brand span i { color: var(--hs-accent); font-style: normal; }

.nm-wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.nm-center { text-align: center; }
.nm-hidden { display: none; }

/* ------------------------------------------------------------- TYPOGRAFIE */
.nm-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  color: var(--hs-primary);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.nm-subtitle {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hs-primary);
  margin: 0 0 0.75rem;
}

.nm-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #64748b;
  font-weight: 500;
  margin: 0 0 2rem;
}

.nm-lead--left { text-align: left; }

.nm-muted {
  color: #64748b;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.nm-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.nm-fineprint {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.nm-email {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hs-primary);
  margin: 0 0 1.5rem;
}

/* ------------------------------------------------------------------ ICONEN */
.nm-icon-xl {
  width: 5rem;
  height: 5rem;
  border-radius: 1.5rem;
  background: var(--hs-light);
  color: var(--hs-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  margin: 0 auto 2rem;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.06);
}

.nm-icon-xl--success {
  background: var(--hs-success);
  color: #27ae60;
  border-radius: 50%;
}

.nm-icon-sm {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  background: var(--hs-light);
  color: var(--hs-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ KAARTEN */
.nm-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 1.75rem;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.nm-card--choice { text-align: left; margin-bottom: 2rem; }
.nm-card--question { text-align: left; }

.nm-card--result {
  padding: 2rem 1.75rem 2.5rem;
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.nm-result-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.5rem;
  background: linear-gradient(90deg, var(--hs-primary), var(--hs-accent));
}

@media (min-width: 640px) {
  .nm-card { padding: 2.75rem; }
  .nm-card--result { padding: 3rem 2.5rem; }
}

/* ------------------------------------------------------------ NIVEAUKEUZE */
.nm-niveau-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.nm-niveau-btn {
  padding: 1.1rem 0.5rem;
  border-radius: 1rem;
  border: 2px solid #f1f5f9;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
  text-align: center;
}

.nm-niveau-btn:hover { border-color: var(--hs-accent); transform: translateY(-2px); }
.nm-niveau-btn.is-selected { border-color: var(--hs-accent); background: var(--hs-light); }

.nm-niveau-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.nm-niveau-cijfer {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--hs-primary);
  line-height: 1.2;
}

.nm-niveau-doel {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hs-accent);
}

/* ---------------------------------------------------------------- TEGELS */
.nm-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2.25rem;
  text-align: left;
}

.nm-tile {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
}

.nm-tile-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.nm-tile-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hs-primary);
}

/* -------------------------------------------------------------- VOORTGANG */
.nm-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.nm-progress-meta { display: flex; align-items: center; gap: 0.75rem; }

.nm-progress-meta .nm-eyebrow { margin-bottom: 0.1rem; }

.nm-progress-count {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hs-primary);
}

.nm-progress-track {
  width: 8rem;
  height: 0.5rem;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.nm-progress-fill {
  height: 100%;
  background: var(--hs-accent);
  transition: width 0.5s ease;
}

/* ------------------------------------------------------------- LEESTEKST */
.nm-text {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-left: 4px solid var(--hs-accent);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.nm-text--repeat { border-left-color: #cbd5e1; }

.nm-text-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.nm-text-bron {
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
}

.nm-text-titel {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hs-primary);
  margin: 0.25rem 0 0;
  line-height: 1.3;
}

.nm-text-body {
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* In de leesfase klapt de tekst helemaal uit. Een scrollkader zou de
   tijdmeting vertroebelen: dan meet je mede het zoeken in een venster. */
.nm-text--reading .nm-text-body {
  max-height: none;
  overflow-y: visible;
  font-size: 1.05rem;
}

.nm-text--reading .nm-text-body p { line-height: 1.85; }

.nm-card--reading { text-align: left; margin-bottom: 1.25rem; }

.nm-reading-intro {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--hs-primary);
  margin: 0 0 0.75rem;
}

.nm-card--reading .nm-muted { margin: 0; font-size: 0.95rem; }

.nm-actions--reading { justify-content: center; margin-top: 1.5rem; }

.nm-text-body p {
  margin: 0 0 0.85rem;
  line-height: 1.75;
  color: #334155;
}

.nm-text-body p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- VRAAG */
.nm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--hs-accent);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.nm-badge--soft {
  background: #f1f5f9;
  color: #64748b;
  margin-bottom: 0;
  white-space: nowrap;
}

.nm-question {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hs-primary);
  line-height: 1.6;
  margin: 0 0 1.75rem;
}

@media (min-width: 640px) {
  .nm-question { font-size: 1.35rem; }
}

/* -------------------------------------------------------------- ANTWOORDEN */
.nm-options { display: grid; gap: 0.65rem; }

.nm-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  border: 2px solid #f1f5f9;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--hs-primary);
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.nm-option:hover { border-color: var(--hs-accent); background: rgba(235, 245, 251, 0.5); }
.nm-option.is-selected { border-color: var(--hs-accent); background: var(--hs-light); }

.nm-option-letter {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.nm-option.is-selected .nm-option-letter { background: var(--hs-accent); color: #fff; }

.nm-input {
  width: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  border: 2px solid #f1f5f9;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hs-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.nm-input::placeholder { color: #cbd5e1; font-weight: 500; }

.nm-input:focus {
  border-color: var(--hs-accent);
  box-shadow: 0 0 0 4px rgba(36, 113, 163, 0.1);
}

.nm-open { max-width: 26rem; }

.nm-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0.75rem 0 0;
}

.nm-error {
  font-size: 0.875rem;
  font-weight: 700;
  color: #c0392b;
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
}

.nm-actions {
  margin-top: 1.75rem;
  display: flex;
  justify-content: flex-end;
}

.nm-btn-start { width: 100%; }
.nm-btn-block { width: 100%; }

@media (min-width: 640px) {
  .nm-btn-start { width: auto; }
}

.hs-btn.is-disabled,
.hs-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* -------------------------------------------------------------- RESULTAAT */
.nm-placement {
  display: inline-block;
  background: var(--hs-light);
  border-radius: 1.5rem;
  padding: 1.25rem 2rem;
  margin-bottom: 2.5rem;
}

.nm-placement .nm-eyebrow { color: var(--hs-accent); margin-bottom: 0.25rem; }

.nm-placement-value {
  display: block;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--hs-primary);
  line-height: 1.2;
}

.nm-placement-goal {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.35rem;
}

.nm-domains { display: grid; gap: 0.75rem; margin-bottom: 2.25rem; }

.nm-domain {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
}

.nm-domain-body { flex: 1; min-width: 0; }

.nm-domain-name {
  display: block;
  font-weight: 700;
  color: var(--hs-primary);
}

.nm-domain-meta {
  display: block;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

.nm-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nm-status.is-sterk { background: var(--hs-success); color: #27ae60; }
.nm-status.is-aandacht { background: var(--hs-warning); color: #b9770e; }
.nm-status.is-oefenen { background: #fdedec; color: #c0392b; }

@media (max-width: 30rem) {
  .nm-domain { flex-wrap: wrap; }
  .nm-status { margin-left: 3.6rem; }
}

.nm-panel {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.nm-panel p { color: #475569; line-height: 1.7; font-weight: 500; margin: 0; }

.nm-panel--accent { background: var(--hs-light); border-color: transparent; }

/* ----------------------------------------------------------- LEESTEMPO */
.nm-panel--tempo { background: #fff; }

.nm-tempo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.nm-tempo-head .nm-subtitle { margin-bottom: 0.2rem; }

.nm-tempo-sub { margin: 0; font-size: 0.85rem; }

.nm-tempo-cijfer {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-shrink: 0;
  background: var(--hs-light);
  border-radius: 1rem;
  padding: 0.6rem 1rem;
}

.nm-tempo-wpm {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--hs-primary);
  line-height: 1;
}

.nm-tempo-eenheid {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hs-accent);
  line-height: 1.25;
}

.nm-tempo-uitleg {
  margin: 0.85rem 0 0 !important;
  line-height: 1.7;
}

@media (max-width: 30rem) {
  .nm-tempo-head { flex-direction: column; }
}

.nm-panel--accent .nm-eyebrow { color: var(--hs-accent); }

.nm-advies-titel {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--hs-primary);
  margin: 0 0 0.5rem;
}

.nm-panel--form {
  background: #fff;
  border: 2px solid rgba(36, 113, 163, 0.2);
}

.nm-form-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.nm-form-head .nm-muted { margin: 0; font-size: 0.875rem; }
.nm-form-head .nm-subtitle { margin-bottom: 0.25rem; }

#report-form .nm-input { margin-bottom: 0.75rem; font-size: 1rem; }

.nm-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.6;
  cursor: pointer;
  margin-bottom: 1rem;
}

.nm-consent input {
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--hs-accent);
  flex-shrink: 0;
}

.nm-consent a { color: var(--hs-accent); font-weight: 700; }

.nm-feedback {
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  color: #64748b;
}

.nm-feedback.is-error { color: #c0392b; }

.nm-back {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}

.nm-back:hover { color: var(--hs-primary); }

/* --------------------------------------------------------------- SPINNER */
.nm-spinner {
  width: 5rem;
  height: 5rem;
  border: 4px solid #f1f5f9;
  border-top-color: var(--hs-accent);
  border-radius: 50%;
  margin: 4rem auto 2rem;
  animation: nm-spin 1s linear infinite;
}

@keyframes nm-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .nm-spinner { animation-duration: 3s; }
  .nm-progress-fill, .nm-niveau-btn, .nm-option { transition: none; }
}
