/* ====== Questionnaire experience ====== */
.psy-brief2 {
  --psy-ink: #173632;
  --psy-muted: #637774;
  --psy-petrol: #1a6c7a;
  --psy-petrol-dark: #125562;
  --psy-mist: #edf5f4;
  --psy-cream: #fbf8f2;
  --psy-line: #dce7e3;
  --psy-orange: #ef9a37;
  --psy-radius: 22px;
  --psy-shadow: 0 18px 50px rgba(27, 55, 51, .08);

  width: min(100%, 960px);
  margin: 0 auto;
  padding: clamp(8px, 2.5vw, 24px);
  color: var(--psy-ink);
  box-sizing: border-box;
}

.page-id-31039 .entry-title {
  display: none;
}

.psy-brief2 *,
.psy-brief2 *::before,
.psy-brief2 *::after {
  box-sizing: border-box;
}

.psy-brief2__hero {
  position: relative;
  overflow: hidden;
  margin-bottom: clamp(18px, 3vw, 30px);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--psy-line);
  border-radius: clamp(22px, 4vw, 32px);
  background:
    radial-gradient(circle at 92% 10%, rgba(239, 154, 55, .16) 0 72px, transparent 73px),
    linear-gradient(135deg, #fff 0%, var(--psy-cream) 100%);
  box-shadow: var(--psy-shadow);
}

.psy-brief2__hero::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 170px;
  height: 170px;
  border: 26px solid rgba(26, 108, 122, .07);
  border-radius: 50%;
  pointer-events: none;
}

.psy-brief2__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--psy-petrol-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.psy-brief2__eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--psy-orange);
  box-shadow: 0 0 0 5px rgba(239, 154, 55, .15);
}

.psy-brief2 .psy-brief2__title {
  margin: 0 0 12px;
  color: var(--psy-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.psy-brief2__intro {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0;
  color: #405753;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
}

.psy-brief2__assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.psy-brief2__assurances span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(26, 108, 122, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #405753;
  font-size: 14px;
  line-height: 1.2;
}

.psy-brief2__assurances span::before {
  content: "\2713";
  color: var(--psy-petrol);
  font-weight: 800;
}

.psy-brief2__form {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.psy-brief2 fieldset {
  min-width: 0;
}

.psy-brief2__meta,
.psy-consent {
  border: 1px solid var(--psy-line);
  border-radius: var(--psy-radius);
  background: #fff;
  box-shadow: 0 10px 32px rgba(27, 55, 51, .055);
}

.psy-brief2__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  padding: clamp(22px, 4vw, 34px);
}

.psy-brief2__meta legend {
  padding: 0 10px;
  color: var(--psy-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 700;
}

.psy-field {
  display: grid;
  gap: 9px;
  min-width: 0;
  color: var(--psy-ink);
  font-size: 16px;
  font-weight: 700;
}

.psy-brief2 input[type="number"],
.psy-brief2 select {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  border: 1px solid #cbd9d5;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: var(--psy-ink);
  font-size: 17px;
  line-height: 1.3;
  box-shadow: 0 2px 5px rgba(27, 55, 51, .04);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.psy-brief2 input[type="number"]:focus,
.psy-brief2 select:focus {
  border-color: var(--psy-petrol);
  box-shadow: 0 0 0 4px rgba(26, 108, 122, .12);
}

.psy-consent {
  display: block;
  padding: clamp(20px, 4vw, 30px);
  color: #405753;
}

.psy-consent h3 {
  margin: 0 0 12px;
  color: var(--psy-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.psy-consent p {
  margin: 6px 0;
  line-height: 1.55;
}

.psy-brief2__progress {
  position: sticky;
  top: 88px;
  z-index: 20;
  padding: 15px 18px;
  border: 1px solid rgba(26, 108, 122, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 30px rgba(27, 55, 51, .1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.psy-brief2__progress-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
  color: var(--psy-muted);
  font-size: 14px;
  line-height: 1.3;
}

.psy-brief2__progress-head span {
  color: var(--psy-ink);
  font-weight: 800;
}

.psy-brief2__progress-head strong {
  font-weight: 650;
}

.psy-brief2__progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e5eeeb;
}

.psy-brief2__progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--psy-petrol), #54a28f);
  transition: width .25s ease;
}

.psy-fieldset-questions {
  margin: 0;
  padding: 0;
  border: 0;
}

.psy-fieldset-questions > .psy-legend {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  color: var(--psy-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
}

.psy-age-question-hint {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid #f0d7b2;
  border-radius: 16px;
  background: #fff8ec;
  color: #765d38;
}

.psy-brief2-items {
  display: grid;
  gap: 14px;
}

.psy-item {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--psy-line);
  border-radius: var(--psy-radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(27, 55, 51, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.psy-item::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: transparent;
  transition: background .18s ease;
}

.psy-item.is-answered {
  border-color: #c9ddd6;
  box-shadow: 0 9px 28px rgba(27, 55, 51, .065);
}

.psy-item.is-answered::before {
  background: #73a997;
}

.psy-q {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--psy-ink);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.45;
}

.psy-q-num {
  flex: 0 0 auto;
  min-width: 34px;
  color: var(--psy-petrol);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.3;
}

.psy-optrow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.psy-item .psy-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #d3dfdc;
  border-radius: 13px;
  background: #fbfcfb;
  color: #405753;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}

.psy-item .psy-opt:hover {
  border-color: #9dbcb4;
  background: #f3f8f6;
}

.psy-item .psy-opt:active {
  transform: translateY(1px);
}

.psy-item .psy-opt.is-selected {
  border-color: var(--psy-petrol);
  background: var(--psy-mist);
  color: var(--psy-petrol-dark);
  box-shadow: inset 0 0 0 1px var(--psy-petrol), 0 4px 12px rgba(26, 108, 122, .08);
}

@supports selector(.psy-opt:has(input:checked)) {
  .psy-item .psy-opt:has(input[type="radio"]:checked) {
    border-color: var(--psy-petrol);
    background: var(--psy-mist);
    color: var(--psy-petrol-dark);
    box-shadow: inset 0 0 0 1px var(--psy-petrol), 0 4px 12px rgba(26, 108, 122, .08);
  }
}

.psy-item .psy-opt > input[type="radio"] {
  appearance: auto !important;
  -webkit-appearance: radio !important;
  position: static !important;
  display: inline-block !important;
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  accent-color: var(--psy-petrol);
  clip: auto !important;
  clip-path: none !important;
}

.psy-item .psy-opt:focus-within {
  outline: 3px solid rgba(26, 108, 122, .22);
  outline-offset: 2px;
}

.psy-brief2__submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--psy-line);
  border-radius: var(--psy-radius);
  background: linear-gradient(135deg, #f6faf8, #fff);
}

.psy-brief2__submit > div {
  display: grid;
  gap: 3px;
}

.psy-brief2__submit strong {
  color: var(--psy-ink);
  font-size: 18px;
}

.psy-brief2__submit span {
  color: var(--psy-muted);
  font-size: 14px;
  line-height: 1.4;
}

.psy-brief2__submit .psy-btn {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 13px 22px;
  border: 0;
  border-radius: 13px;
  background: var(--psy-petrol);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(26, 108, 122, .2);
  transition: background .15s ease, transform .08s ease, box-shadow .15s ease;
}

.psy-brief2__submit .psy-btn:hover,
.psy-brief2__submit .psy-btn:focus {
  background: var(--psy-petrol-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(26, 108, 122, .24);
}

.psy-brief2__submit .psy-btn:focus-visible {
  outline: 3px solid rgba(26, 108, 122, .25);
  outline-offset: 3px;
}

.psy-brief2__submit .psy-btn:active {
  transform: translateY(1px);
}

.psy-brief2__submit .psy-btn:disabled {
  cursor: wait;
  opacity: .7;
}

.psy-wait {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--psy-muted);
  font-size: 15px;
}

.psy-wait__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, .2);
  border-top-color: var(--psy-petrol);
  border-radius: 50%;
  display: inline-block;
  animation: psyspin .7s linear infinite;
}

@keyframes psyspin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .page-id-31039 .ast-container {
    padding-right: 10px;
    padding-left: 10px;
  }

  .psy-brief2 {
    padding: 4px 0;
  }

  .psy-brief2__hero {
    padding: 24px 20px;
  }

  .psy-brief2__hero::after {
    right: -72px;
    bottom: -80px;
  }

  .psy-brief2__assurances {
    gap: 6px;
    margin-top: 18px;
  }

  .psy-brief2__assurances span {
    padding: 7px 9px;
    font-size: 12px;
  }

  .psy-brief2__meta {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .psy-brief2__progress {
    top: 76px;
    padding: 13px 14px;
    border-radius: 14px;
  }

  .psy-brief2__progress-head {
    font-size: 12px;
  }

  .psy-item {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .psy-item::before {
    top: 18px;
    bottom: 18px;
  }

  .psy-q {
    gap: 7px;
    margin-bottom: 15px;
  }

  .psy-q-num {
    min-width: 28px;
    font-size: 19px;
  }

  .psy-optrow {
    gap: 7px;
  }

  .psy-item .psy-opt {
    min-height: 48px;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 11px;
    font-size: 14px;
  }

  .psy-item .psy-opt > input[type="radio"] {
    width: 17px !important;
    height: 17px !important;
  }

  .psy-brief2__submit {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 20px 18px;
  }

  .psy-brief2__submit .psy-btn {
    width: 100%;
  }
}

@media (max-width: 350px) {
  .psy-optrow {
    grid-template-columns: 1fr;
  }

  .psy-item .psy-opt {
    justify-content: flex-start;
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .psy-brief2 *,
  .psy-brief2 *::before,
  .psy-brief2 *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
/* ===========================================================
   BRIEF-2 (mobiel + layout) — compacte fixes, non-breaking
   Scope: alleen binnen .psy-brief2
   =========================================================== */

/* Kaarten forceren nooit breder dan container */
.psy-brief2 section.card{
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* ---------- Profiel-grafiek ---------- */
.psy-brief2 .chart-wrap{
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 640px){
  .psy-brief2 .chart-wrap{ height: 260px; padding: 6px 0; }
  .psy-brief2 #brief2Chart{ display:block; width:100% !important; height:100% !important; }
}

/* Bandgrenzen-regel onder Profiel verbergen */
.psy-brief2 .chart-wrap + p.range{ display: none !important; }

/* ---------- Overzichtstabel (scrollbaar en compact) ---------- */
.psy-brief2 .table-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.psy-brief2 .table-wrap table{ border-collapse: collapse; }

@media (max-width: 640px){
  .psy-brief2 .table-wrap table{
    width: max-content;      /* krimpt naar inhoud i.p.v. uitrekken */
    min-width: 420px;        /* blijft swipebaar */
    table-layout: auto;
    font-size: 14px;
  }
  .psy-brief2 .table-wrap th,
  .psy-brief2 .table-wrap td{
    padding: 6px 8px;
    line-height: 1.25;
  }
  /* Afkorting klein en ongebroken */
  .psy-brief2 .table-wrap th:first-child,
  .psy-brief2 .table-wrap td:first-child{
    width: 72px !important;
    white-space: nowrap;
  }
  /* T-score zo smal mogelijk + rechts uitlijnen */
  .psy-brief2 .table-wrap th:last-child,
  .psy-brief2 .table-wrap td:last-child{
    width: 1%;               /* minimal width trick */
    white-space: nowrap;
    text-align: right;
    padding-left: 8px;
  }
  /* Eventuele eerdere min-width op kolom 2 ongedaan maken */
  .psy-brief2 .table-wrap th:nth-child(2),
  .psy-brief2 .table-wrap td:nth-child(2){
    min-width: unset;
  }
}

/* ---------- Legenda in toelichtingskaarten ---------- */
.psy-brief2 .legend{
  display: flex;
  flex-wrap: wrap;           /* totale legenda mag wrappen */
  gap: 6px 16px;
  align-items: center;
  max-width: 100%;
}
.psy-brief2 .legend .legend-item{
  display: inline-flex;      /* bolletje + label blijven samen */
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.psy-brief2 .legend .legend-box{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}

/* Veilige kleurfallbacks voor legenda-bolletjes (gebruikt jullie var's indien aanwezig) */
.psy-brief2 .legend-box.band-green  { background: var(--band-green,  var(--green-strong,  #22c55e)); }
.psy-brief2 .legend-box.band-yellow { background: var(--band-yellow, var(--yellow-strong, #f59e0b)); }
.psy-brief2 .legend-box.band-orange { background: var(--band-orange, var(--orange-strong, #fb923c)); }
.psy-brief2 .legend-box.band-red    { background: var(--band-red,    var(--red-strong,    #ef4444)); }

/* Autismescreening: eigen instrument- en contextvragen, binnen dezelfde portalstijl. */
.psy-autism-license-notice,
.psy-autism-context__intro {
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid #ead9b9;
  border-radius: 18px;
  background: #fff8ec;
  color: #5f5038;
}

.psy-autism-context {
  display: grid;
  gap: 14px;
}

.psy-autism-context__intro span {
  color: var(--psy-petrol);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.psy-autism-context__intro h3 {
  margin: 7px 0;
  color: var(--psy-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 32px);
}

.psy-autism-context__intro p {
  margin: 0;
}

.psy-autism-question {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--psy-line);
  border-radius: var(--psy-radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(27, 55, 51, .045);
}

.psy-autism-question legend {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 8px;
  color: var(--psy-ink);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 750;
  line-height: 1.45;
}

.psy-autism-question label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 54px;
  padding: 11px 13px;
  border: 1px solid #d3dfdc;
  border-radius: 13px;
  background: #fbfcfb;
  color: #405753;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.psy-autism-question label:has(input:checked) {
  border-color: var(--psy-petrol);
  background: var(--psy-mist);
  color: var(--psy-petrol-dark);
  box-shadow: inset 0 0 0 1px var(--psy-petrol);
}

.psy-autism-question input[type="radio"] {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: var(--psy-petrol);
}

@media (max-width: 760px) {
  .psy-autism-question {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .psy-autism-question label {
    min-height: 50px;
  }
}
