/* ==========================================================
   NIOtoets-oefenen.nl – huisstijl
   Idee: een toetsboekje dat stickers heeft gekregen.
   Ruitjespapier, inktblauwe lijnen, en per onderdeel een eigen kleur.
   ========================================================== */

:root{
  --ink:#1A1C3A;
  --ink-soft:#4A4D6E;
  --paper:#F7F8FC;
  --grid:rgba(26,28,58,.055);
  --white:#FFFFFF;

  /* één kleur per onderdeel */
  --syn:#FF8AC4;   /* synoniemen  – roze   */
  --get:#FFD23F;   /* getallen    – geel   */
  --rek:#4ADE9B;   /* rekenen     – mint   */
  --uit:#6E9BFF;   /* uitslagen   – blauw  */
  --ana:#FF7A45;   /* analogieën  – oranje */
  --cat:#BBA6FF;   /* categorieën – lila   */

  --ok:#16A35F;
  --ok-bg:#DDF7E9;
  --no:#E5364F;
  --no-bg:#FFE3E7;

  --c:var(--get);             /* accent van de huidige pagina */
  --line:2.5px solid var(--ink);
  --pop:4px 4px 0 var(--ink); /* harde 'sticker'-schaduw */

  --display:"Unbounded", "Arial Black", system-ui, sans-serif;
  --body:"Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --wrap:1120px;
  --gutter:clamp(16px, 4vw, 40px);
}

body.p-syn{--c:var(--syn)}
body.p-get{--c:var(--get)}
body.p-rek{--c:var(--rek)}
body.p-uit{--c:var(--uit)}
body.p-ana{--c:var(--ana)}
body.p-cat{--c:var(--cat)}

*,*::before,*::after{box-sizing:border-box}

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

body{
  margin:0;
  font-family:var(--body);
  font-size:1.0625rem;
  line-height:1.55;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size:26px 26px;
  min-height:100vh;
  overflow-x:hidden;
}

img{max-width:100%;height:auto}

a{color:inherit}

:focus-visible{
  outline:3px solid var(--ink);
  outline-offset:3px;
  border-radius:6px;
}

.wrap{
  width:100%;
  max-width:var(--wrap);
  margin-inline:auto;
  padding-inline:var(--gutter);
}

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

/* ---------- kop ---------- */

.top{
  border-bottom:var(--line);
  background:var(--white);
  position:sticky;top:0;z-index:50;
}
.top .wrap{
  display:flex;align-items:center;gap:20px;
  min-height:64px;
}
.logo{
  display:inline-flex;align-items:center;gap:10px;
  text-decoration:none;
  font-family:var(--display);
  font-weight:700;
  font-size:1rem;
  letter-spacing:-.01em;
  white-space:nowrap;
  flex-shrink:0;
}
.logo-mark{
  width:34px;height:34px;flex:none;
}
.logo small{
  font-family:var(--body);
  font-weight:400;
  font-size:.8rem;
  color:var(--ink-soft);
  display:block;
  letter-spacing:0;
  line-height:1;
}
.logo span{line-height:1.1}

.nav{
  display:flex;gap:8px;
  margin-left:auto;
  overflow-x:auto;
  scrollbar-width:none;
  padding:10px 2px;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);
          mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);
}
.nav::-webkit-scrollbar{display:none}
.nav a{
  flex:none;
  text-decoration:none;
  font-weight:700;
  font-size:.92rem;
  padding:6px 14px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:var(--white);
  transition:transform .12s ease, box-shadow .12s ease;
}
.nav a:last-child{margin-right:22px}
.nav a:hover{transform:translate(-1px,-1px);box-shadow:2px 2px 0 var(--ink)}
.nav a[aria-current="page"]{background:var(--c)}
.nav .d-syn:hover{background:var(--syn)}
.nav .d-get:hover{background:var(--get)}
.nav .d-rek:hover{background:var(--rek)}
.nav .d-uit:hover{background:var(--uit)}
.nav .d-ana:hover{background:var(--ana)}
.nav .d-cat:hover{background:var(--cat)}

@media (max-width:760px){
  .top{position:static}
  .top .wrap{flex-wrap:wrap;gap:0;padding-top:12px}
  .nav{margin-left:calc(var(--gutter) * -1);margin-right:calc(var(--gutter) * -1);padding-inline:var(--gutter);width:calc(100% + 2 * var(--gutter))}
}

/* ---------- advertenties ---------- */

.ad{
  margin-block:28px;
}
.ad-label{
  display:block;
  font-size:.75rem;
  color:var(--ink-soft);
  margin-bottom:6px;
}
.ad-gif{
  display:block;
  max-width:728px;
  margin-inline:auto;
}
.ad-gif a{
  display:block;
  border:var(--line);
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--pop);
  background:#79BE3A;
  line-height:0;
}
.ad-gif img{
  width:100%;
  height:auto;
  aspect-ratio:1910/241;
  display:block;
}

/* NIO-banner: opgebouwd in HTML, schuift mee met elke schermbreedte */
.promo{
  container-type:inline-size;
}
.promo a{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  text-decoration:none;
  background:var(--white);
  border:var(--line);
  border-radius:20px;
  box-shadow:var(--pop);
  overflow:hidden;
  transition:transform .15s ease, box-shadow .15s ease;
}
.promo a:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink)}
.promo a:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.promo-q{
  background:var(--ink);
  color:var(--white);
  padding:18px 22px;
  font-family:var(--display);
  font-weight:800;
  font-size:clamp(1.5rem, 8cqi, 2.4rem);
  line-height:1;
  letter-spacing:-.02em;
  display:flex;align-items:center;gap:14px;
}
.promo-q .bubbles{display:flex;gap:6px;margin-left:auto}
.promo-q .bubbles i{
  width:16px;height:16px;border-radius:50%;
  border:2px solid var(--white);
}
.promo-q .bubbles i:nth-child(2){background:var(--get);border-color:var(--get)}
.promo-body{
  padding:18px 22px 20px;
  display:grid;
  gap:4px;
}
.promo-body strong{
  font-size:1.15rem;
  line-height:1.3;
}
.promo-body span{color:var(--ink-soft)}
.promo-cta{
  white-space:nowrap;
  margin:0 22px 22px;
  justify-self:start;
  display:inline-flex;align-items:center;gap:10px;
  background:var(--get);
  border:2px solid var(--ink);
  border-radius:999px;
  padding:10px 18px;
  font-weight:700;
}
.promo-cta svg{width:18px;height:18px}

/* breed: alles naast elkaar */
@container (min-width:740px){
  .promo a{grid-template-columns:auto minmax(0,1fr) auto;align-items:center}
  .promo-q{height:100%;padding:22px 26px;font-size:1.7rem;white-space:nowrap}
  .promo-q .bubbles{display:none}
  .promo-body{padding:18px 24px}
  .promo-cta{margin:0 24px 0 0;justify-self:end}
}

/* ---------- homepage ---------- */

.hero{
  padding-block:clamp(36px, 7vw, 80px) 24px;
}
.hero h1{
  font-family:var(--display);
  font-weight:800;
  font-size:clamp(2.2rem, 7.2vw, 5rem);
  line-height:.98;
  letter-spacing:-.035em;
  margin:0 0 20px;
  max-width:13ch;
}
.hero p{
  font-size:clamp(1.05rem, 2.2vw, 1.25rem);
  max-width:44ch;
  margin:0;
  color:var(--ink-soft);
}
.hero-row{
  display:grid;
  gap:28px;
  align-items:end;
}
.free-sticker{
  justify-self:start;
  font-family:var(--display);
  font-weight:800;
  font-size:1.05rem;
  background:var(--get);
  border:var(--line);
  border-radius:50%;
  width:112px;height:112px;
  display:grid;place-items:center;
  text-align:center;
  line-height:1.05;
  transform:rotate(-12deg);
  box-shadow:var(--pop);
}
.tiles-wrap{position:relative}
.free-sticker--m{
  position:absolute;z-index:2;
  top:-34px;right:-4px;
  width:86px;height:86px;font-size:.85rem;
  transform:rotate(12deg);
}
.hero-row .free-sticker{display:none}
@media (max-width:640px){
  .tile a{min-height:170px}
}
@media (min-width:860px){
  .free-sticker--m{display:none}
  .hero-row .free-sticker{display:grid}
  .hero-row{grid-template-columns:1fr auto}
  .free-sticker{justify-self:end;width:140px;height:140px;font-size:1.25rem;margin-bottom:10px}
}

.tiles{
  list-style:none;
  margin:28px 0 0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap:18px;
}
.tile a{
  position:relative;
  display:flex;flex-direction:column;
  min-height:220px;
  height:100%;
  padding:20px 22px 22px;
  text-decoration:none;
  background:var(--c);
  border:var(--line);
  border-radius:22px;
  box-shadow:var(--pop);
  transition:transform .15s ease, box-shadow .15s ease;
}
.tile a:hover{transform:translate(-3px,-3px) rotate(-.6deg);box-shadow:7px 7px 0 var(--ink)}
.tile a:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.tile.p-syn{--c:var(--syn)}
.tile.p-get{--c:var(--get)}
.tile.p-rek{--c:var(--rek)}
.tile.p-uit{--c:var(--uit)}
.tile.p-ana{--c:var(--ana)}
.tile.p-cat{--c:var(--cat)}

.puzzle{
  flex:1;
  display:flex;align-items:center;
  font-family:var(--display);
  font-weight:600;
  font-size:clamp(1.25rem, 2.6vw, 1.55rem);
  letter-spacing:-.02em;
  line-height:1.2;
  padding:10px 0 18px;
}
.puzzle .blank{
  display:inline-block;
  min-width:1.6em;
  border-bottom:3px solid var(--ink);
  text-align:center;
  margin-left:.15em;
}
.box{
  display:inline-grid;place-items:center;
  width:1.35em;height:1.35em;
  border:2.5px solid var(--ink);
  border-radius:6px;
  background:var(--white);
  font-size:.8em;
  margin-inline:.12em;
  vertical-align:-.15em;
}
.puzzle svg{height:74px;width:auto}
.q-focus .box{width:1.25em;height:1.25em;font-size:.85em;color:var(--ink-soft)}
.tile-foot{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;
  border-top:2px dashed var(--ink);
  padding-top:14px;
}
.tile h2{
  font-family:var(--display);
  font-weight:700;
  font-size:1.3rem;
  letter-spacing:-.02em;
  margin:0;
  line-height:1.1;
}
.tile p{margin:4px 0 0;font-size:.95rem}
.go{
  flex:none;
  width:44px;height:44px;border-radius:50%;
  background:var(--white);
  border:2.5px solid var(--ink);
  display:grid;place-items:center;
}
.go svg{width:20px;height:20px}

.info{
  display:grid;
  gap:28px;
  margin-block:56px 20px;
}
.info h2{
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(1.5rem, 3.6vw, 2.1rem);
  letter-spacing:-.025em;
  line-height:1.1;
  margin:0 0 14px;
}
.info p{margin:0 0 12px;max-width:62ch}
@media (min-width:900px){
  .info{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);align-items:start;gap:48px}
}

/* ---------- oefenpagina ---------- */

.wrap--ex{max-width:calc(820px + 2 * var(--gutter))}
.ex-head{
  padding-block:clamp(28px, 5vw, 52px) 8px;
  display:flex;flex-wrap:wrap;align-items:center;gap:14px 22px;
}
.ex-title{
  font-family:var(--display);
  font-weight:800;
  font-size:clamp(2rem, 7vw, 3.6rem);
  letter-spacing:-.035em;
  line-height:1;
  margin:0;
  background:var(--c);
  border:var(--line);
  border-radius:18px;
  padding:.18em .42em .22em;
  box-shadow:var(--pop);
  transform:rotate(-1.5deg);
}
.ex-sub{
  margin:0;
  font-size:1.1rem;
  max-width:40ch;
  color:var(--ink-soft);
}

.quiz{
  margin:28px 0 0;
}

/* scorebalk (Hot Potatoes schrijft hier de score in) */
#InstructionsDiv{
  background:var(--ink);
  color:var(--white);
  border-radius:16px 16px 0 0;
  padding:12px 20px;
  font-weight:700;
  line-height:1.4;
  border:var(--line);
  border-bottom:0;
}
#InstructionsDiv:has(> #Instructions:empty){display:none}

.quiz-card{filter:drop-shadow(6px 6px 0 var(--ink))}
#MainDiv{
  background:var(--white);
  border:var(--line);
  border-radius:22px;
  overflow:hidden;
}
#InstructionsDiv:not(:has(> #Instructions:empty)) + #MainDiv{border-radius:0 0 22px 22px}

.QuestionNavigation{
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;
  gap:10px 16px;
  padding:14px 18px;
  background:var(--c);
  border-bottom:var(--line);
}
.QuestionNavigation p{margin:0}
#OneByOneReadout{
  display:flex;align-items:center;gap:10px;
}
#OneByOneReadout br{display:none}
.QNum{
  font-family:var(--display);
  font-weight:700;
  font-size:1rem;
  min-width:4.5ch;
  text-align:center;
}

/* alle knoppen die Hot Potatoes gebruikt (de klassenaam wisselt bij hover) */
button[class^="FuncButton"]{
  font:inherit;
  color:var(--ink);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.nav-btn{
  width:44px;height:44px;
  border-radius:50%;
  border:2.5px solid var(--ink)!important;
  background:var(--white)!important;
  display:grid;place-items:center;
  padding:0;
  box-shadow:2px 2px 0 var(--ink);
  transition:transform .1s ease, box-shadow .1s ease;
}
.nav-btn:hover{transform:translate(-1px,-1px);box-shadow:3px 3px 0 var(--ink)}
.nav-btn:active{transform:translate(2px,2px);box-shadow:0 0 0 var(--ink)}
.nav-btn svg{width:20px;height:20px;pointer-events:none}

#ShowMethodButton{
  white-space:nowrap;
  background:transparent;
  border:0;
  padding:6px 2px;
  font-weight:700;
  font-size:.92rem;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:4px;
}

ol.QuizQuestions{
  list-style:none!important;
  margin:0;
  padding:0;
  counter-reset:q;
}
li.QuizQuestion{
  counter-increment:q;
  padding:clamp(20px, 4vw, 34px) clamp(18px, 4vw, 38px) clamp(22px, 4vw, 34px);
}
#Questions[style*="decimal"] li.QuizQuestion + li.QuizQuestion{border-top:2px dashed var(--ink)}
#Questions[style*="decimal"] li.QuizQuestion::before{
  content:"Vraag " counter(q);
  display:inline-block;
  font-family:var(--display);
  font-weight:700;
  font-size:.85rem;
  background:var(--c);
  border:2px solid var(--ink);
  border-radius:999px;
  padding:3px 12px;
  margin-bottom:12px;
}

.QuestionText{
  font-size:clamp(1.15rem, 2.6vw, 1.35rem);
  line-height:1.45;
  font-weight:400;
}
.QuestionText b{
  font-weight:700;
}
/* de rij / som / woordpaar zelf */
.QuestionText .q-focus{
  display:block;
  margin-top:16px;
  font-family:var(--display);
  font-weight:600;
  font-size:clamp(1.35rem, 4.6vw, 2rem);
  letter-spacing:-.02em;
  line-height:1.3;
  background:var(--paper);
  border:2px dashed var(--ink);
  border-radius:14px;
  padding:14px 18px;
  overflow-wrap:anywhere;
}
.QuestionText .q-word{
  font-family:var(--display);
  font-weight:700;
  background:var(--c);
  padding:0 .3em .05em;
  border-radius:8px;
  white-space:nowrap;
}
.QuestionText img{
  display:block;
  margin:16px 0;
  max-height:220px;
  width:auto;
}
.QuestionText .q-note{
  display:block;
  font-size:.92rem;
  color:var(--ink-soft);
  border-left:4px solid var(--c);
  padding-left:12px;
  margin-top:6px;
}

ol.MCAnswers{
  list-style:none;
  margin:22px 0 0;
  padding:0;
  display:grid;
  gap:12px;
  counter-reset:opt;
}
.p-cat ol.MCAnswers{grid-template-columns:repeat(auto-fill, minmax(min(100%, 200px), 1fr))}
.p-uit ol.MCAnswers{grid-template-columns:repeat(auto-fill, minmax(min(100%, 230px), 1fr))}

ol.MCAnswers li{
  counter-increment:opt;
  position:relative;
  display:flex;align-items:center;gap:14px;
  min-height:58px;
  padding:8px 16px 8px 10px;
  border:2.5px solid var(--ink);
  border-radius:16px;
  background:var(--white);
  font-size:1.15rem;
  font-weight:700;
  transition:transform .1s ease, box-shadow .1s ease, background-color .15s ease;
}
ol.MCAnswers li:hover{background:color-mix(in srgb, var(--c) 22%, white);transform:translate(-1px,-1px);box-shadow:3px 3px 0 var(--ink)}
ol.MCAnswers li:active{transform:translate(1px,1px);box-shadow:none}
ol.MCAnswers li:focus-within{box-shadow:3px 3px 0 var(--ink)}

ol.MCAnswers li > button{
  flex:none;
  width:40px;height:40px;
  border-radius:50%;
  border:2.5px solid var(--ink);
  background:var(--white);
  padding:0;
  display:grid;place-items:center;
  font-size:0;          /* verbergt de oude '?' */
  line-height:1;
}
ol.MCAnswers li > button::before{
  content:counter(opt, upper-alpha);
  font-family:var(--display);
  font-weight:700;
  font-size:1rem;
}
/* het hele vak is klikbaar, niet alleen het rondje */
ol.MCAnswers li > button::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:14px;
}
ol.MCAnswers li > button:focus-visible{outline:none}
ol.MCAnswers li:has(> button:focus-visible){outline:3px solid var(--ink);outline-offset:3px}

ol.MCAnswers li > button:has(.mark)::before{content:none}
.mark{
  font-family:var(--body);
  font-size:1.35rem;
  font-weight:700;
  line-height:1;
  color:var(--white);
}
ol.MCAnswers li:has(.mark.ok){background:var(--ok-bg);border-color:var(--ok);box-shadow:3px 3px 0 var(--ok)}
ol.MCAnswers li:has(.mark.ok) > button{background:var(--ok);border-color:var(--ok)}
ol.MCAnswers li:has(.mark.no){background:var(--no-bg);color:color-mix(in srgb, var(--ink) 60%, white)}
ol.MCAnswers li:has(.mark.no) .opt{text-decoration:line-through;text-decoration-color:var(--no);text-decoration-thickness:2px}
ol.MCAnswers li:has(.mark.no) img{opacity:.45}
ol.MCAnswers li:has(.mark.no) > button{background:var(--no);border-color:var(--no)}

.opt img{display:block;max-height:180px;width:auto;margin:6px 0}
.p-uit ol.MCAnswers li{align-items:flex-start;padding-top:12px}

/* pop-up met feedback */
div.Feedback{
  display:none;
  position:fixed;
  top:50%!important;
  left:50%;
  transform:translate(-50%,-50%);
  width:min(420px, calc(100vw - 32px));
  max-height:calc(100vh - 40px);
  overflow:auto;
  background:var(--white);
  border:var(--line);
  border-radius:24px;
  padding:26px 24px 22px;
  text-align:center;
  box-shadow:6px 6px 0 var(--ink), 0 0 0 100vmax rgba(26,28,58,.45);
  animation:pop .22s cubic-bezier(.2,1.4,.5,1);
}
@keyframes pop{from{transform:translate(-50%,-46%) scale(.94);opacity:0}}
.FeedbackText{
  font-size:1.1rem;
  line-height:1.45;
}
.FeedbackText::first-line{
  font-family:var(--display);
  font-weight:800;
  font-size:1.6rem;
  letter-spacing:-.02em;
}
.Feedback.is-right{background:var(--ok-bg)}
.Feedback.is-right .FeedbackText::first-line{color:var(--ok)}
.Feedback.is-wrong{background:var(--no-bg)}
.Feedback.is-wrong .FeedbackText::first-line{color:var(--no)}
.FeedbackText img{display:block;margin:10px auto;max-height:200px;width:auto;border-radius:10px}
.FeedbackText i{font-style:normal;font-weight:700}
#FeedbackOKButton{
  margin-top:4px;
  min-width:140px;
  padding:12px 26px;
  border-radius:999px;
  border:2.5px solid var(--ink);
  background:var(--ink);
  color:var(--white);
  font-weight:700;
  font-size:1.05rem;
  box-shadow:3px 3px 0 color-mix(in srgb, var(--ink) 35%, white);
}
#FeedbackOKButton:hover{background:var(--ink-soft)}

/* volgende onderdeel onder de quiz */
.next-up{
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  margin:28px 0 0;
}
.next-up span{font-weight:700;margin-right:4px}
.next-up a{
  text-decoration:none;font-weight:700;font-size:.92rem;
  padding:6px 14px;border:2px solid var(--ink);border-radius:999px;background:var(--white);
}
.next-up a:hover{background:var(--get)}

/* ---------- voet ---------- */

.foot{
  margin-top:56px;
  border-top:var(--line);
  background:var(--white);
  font-size:.9rem;
  color:var(--ink-soft);
}
.foot .wrap{
  padding-block:22px;
  display:flex;flex-wrap:wrap;gap:8px 24px;justify-content:space-between;
}
.foot p{margin:0}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;animation:none!important}
  .tile a:hover,.promo a:hover{transform:none}
}

@media (max-width:420px){
  #ShowMethodButton{font-size:.82rem}
  .QuestionNavigation{padding:12px 14px;gap:8px}
}
@media (max-width:374px){
  .QuestionNavigation{flex-wrap:wrap-reverse;justify-content:center}
}
