html:has(#herorientatie[open]) { overflow: hidden; }

#herorientatie {
  --dialoog-marge: clamp(12px, 3vw, 28px);
  width: min(36rem, calc(100% - 2 * var(--dialoog-marge)));
  max-width: none;
  max-height: calc(100vh - 2 * var(--dialoog-marge));
  max-height: calc(100dvh - 2 * var(--dialoog-marge));
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--rand-licht);
  border-radius: var(--vlak-radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 84px rgb(24 39 72 / 22%);
}
#herorientatie::backdrop {
  background: rgb(255 255 255 / 57%);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
#herorientatie [hidden] { display: none; }
.herorientatie-pagina {
  --hero-bovenruimte: clamp(38px, 7vw, 94px);
  padding-block: var(--hero-bovenruimte);
  background: var(--kaart-licht, #f4f7fc);
}
.herorientatie-pagina #herorientatie {
  max-height: none;
  overflow: visible;
  box-shadow: 0 12px 44px rgb(24 39 72 / 7%);
}
.herorientatie-pagina #herorientatie :is(h1, h2) { padding-inline-end: 0; }
#herorientatie .herorientatie-email { margin-bottom: 16px; }

.herorientatie-inhoud {
  position: relative;
  padding: clamp(23px, 4.8vw, 42px);
}
.herorientatie-sluiten {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid var(--rand-licht);
  border-radius: 999px;
  background: #f5f7fc;
  color: var(--muted);
  font-size: 1.375rem;
  line-height: 1;
}
.herorientatie-sluiten:hover { background: #e9effa; color: var(--action-blue); }

.herorientatie-kop { margin-bottom: 22px; }
#herorientatie :is(h1, h2, h3) {
  padding-inline-end: 44px;
  font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: var(--section-tracking);
}
#herorientatie h2[tabindex="-1"]:focus { outline: none; }
#herorientatie h1 { letter-spacing: var(--display-tracking); }
.herorientatie-kop p {
  margin: 0 42px 8px 0;
  color: var(--action-blue);
  font-size: .875rem;
  font-weight: 590;
}
.herorientatie-bedankt p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.herorientatie-velden, .herorientatie-duo { display: grid; gap: 12px; min-width: 0; }
#herorientatie fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#herorientatie .form-field { margin-block: 0; }
#herorientatie .veld-tekstregel:has(input:placeholder-shown):not(:focus-within) > label {
  /* Het zwevende label wordt bij een leeg veld tot 115% vergroot. */
  max-width: calc(100% / 1.15);
}
.herorientatie-keuzes { display: grid; gap: 9px; }
.herorientatie-keuze {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 13px 17px;
  border: 1px solid #cbd7ec;
  border-radius: var(--kaart-radius);
  background: var(--kaart-licht);
  color: var(--ink);
  text-align: start;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.4;
}
.herorientatie-keuze:is(:hover, :focus-visible) {
  border-color: var(--action-blue);
  background: #eaf0fd;
  color: var(--action-blue);
}
.herorientatie-keuze::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border: solid var(--action-blue);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.herorientatie-terug {
  min-height: 44px;
  margin-inline-end: auto;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--action-blue);
  font-size: .9375rem;
  font-weight: 550;
}
.herorientatie-acties {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}
#herorientatie .action {
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--knopverloop);
  color: #fff;
  font-size: .9375rem;
  font-weight: 590;
  line-height: 1.3;
}
#herorientatie .action:is(:hover, :focus-visible) { background: var(--knop-hover); }
#herorientatie-form[aria-busy="true"] { opacity: .65; }
.herorientatie-hint, .herorientatie-fout {
  margin-top: 6px;
  font-size: .875rem;
  line-height: 1.45;
}
.herorientatie-hint { color: var(--muted); overflow-wrap: anywhere; }
#herorientatie-herkenning {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rand-licht);
}
.herorientatie-fout { color: #9b281f; }
.herorientatie-ondergrens {
  margin: 0;
  padding: 14px 16px;
  border-inline-start: 3px solid var(--action-blue);
  border-radius: 0 10px 10px 0;
  background: var(--paneel-licht);
  color: var(--ink);
  line-height: 1.5;
}

@media (min-width: 550px) {
  .herorientatie-duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .herorientatie-duo > .form-field:has(+ [hidden]) { grid-column: 1 / -1; }
}
