/*
 * Member Learning Needs Survey (/needs-assessment/). Uses the :root tokens in style.css
 * and the site header/footer; the field grammar follows speaker-forms.css / contact.css.
 * 🔴 Enqueued on is_page_template('page-needs-assessment.php') || is_page('needs-assessment')
 * (reference_wp_page_template_slug_trap).
 */

/* Page head: .phead/.kicker/.lede are not global, so redefined locally (the contact.css
   and cpd-log precedent). */
.phead.na-head {
  padding: 84px 48px 52px;
  background:
    radial-gradient(ellipse 60% 120% at 88% 0%, rgba(122,175,201,0.10) 0%, transparent 58%),
    linear-gradient(180deg, #16202e 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--line);
}
.na-head .phead-inner { max-width: 820px; margin: 0 auto; }
.na-head .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--blue-bright); margin-bottom: 14px;
}
.na-head .kicker::before { content: ''; width: 26px; height: 1px; background: var(--blue); }
.na-head h1 {
  font-size: clamp(30px, 4vw, 48px); font-weight: 700; color: var(--t-strong);
  letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 16px;
}
.na-head .lede { font-size: 15.5px; color: var(--t-mid); line-height: 1.7; margin: 0; }

.na-wrap { padding: 36px 24px 96px; }
.na-col { max-width: 820px; margin: 0 auto; }

.na-test, .na-errsum {
  border-radius: 12px; padding: 14px 18px; margin: 0 0 22px; font-size: 14.5px; line-height: 1.6;
}
.na-test { background: rgba(122,175,201,0.10); border: 1px solid rgba(122,175,201,0.35); color: var(--t-strong); }
.na-errsum { background: rgba(217,154,154,0.08); border: 1px solid rgba(217,154,154,0.4); color: var(--t-strong); }
.na-errsum:focus { outline: none; }

.na-section {
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.03);
  padding: 26px 28px 8px; margin: 0 0 18px; min-width: 0;
}
.na-section legend {
  padding: 0 8px; margin-left: -8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue-bright);
}

.na-q { padding: 6px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.na-q:last-child { border-bottom: 0; margin-bottom: 0; }
.na-label { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--t-strong); }
.na-n { color: var(--t-soft); font-weight: 700; margin-right: 2px; }
.na-q .hint { font-size: 13px; color: var(--t-soft); margin: 0 0 12px; }
.req { color: var(--blue-bright); font-weight: 700; margin-left: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.na-opts { display: grid; gap: 8px; margin-top: 10px; }
.na-opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-deep);
  font-size: 15px; color: var(--t-mid); transition: border-color .2s var(--ease-out), background .2s;
}
.na-opt:hover { border-color: rgba(122,175,201,0.45); }
.na-opt input { accent-color: var(--blue); width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.na-opt:has(input:checked) { border-color: var(--blue); background: rgba(122,175,201,0.08); color: var(--t-strong); }
.na-opt.off { opacity: 0.45; cursor: not-allowed; }

.na-follow { margin: 12px 0 0 2px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.na-follow[hidden] { display: none; }
.na-follow .f { display: block; font-size: 13px; font-weight: 600; color: var(--t-strong); margin: 0 0 8px; }
.na-follow .na-follow { border-left: 0; padding-left: 0; }

.na-form select, .na-form input[type="text"], .na-form textarea {
  width: 100%; font-family: inherit; font-size: 15px; line-height: 1.5;
  color: var(--t-strong); background: var(--bg-deep);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  -webkit-appearance: none; appearance: none;
}
.na-form select { background-image: linear-gradient(45deg, transparent 50%, var(--t-soft) 50%), linear-gradient(135deg, var(--t-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.na-form textarea { resize: vertical; min-height: 96px; margin-top: 6px; }
.na-q.prominent textarea { min-height: 130px; }
.na-form select:focus, .na-form input:focus, .na-form textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(122,175,201,0.18);
}

/* Q5: a grid on wide screens, stacked choices per area on phones. */
.na-matrix { margin-top: 12px; }
.na-mhead, .na-mrow { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(4, 1fr); gap: 6px; align-items: center; }
.na-mhead { font-size: 11.5px; font-weight: 600; color: var(--t-soft); text-align: center; padding: 0 0 6px; }
.na-mrow { padding: 8px 0; border-top: 1px solid var(--line); }
.na-mname { font-size: 14.5px; color: var(--t-strong); }
.na-mcell { display: flex; justify-content: center; cursor: pointer; padding: 8px 0; border-radius: 8px; }
.na-mcell:hover { background: rgba(122,175,201,0.06); }
.na-mcell input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.na-mcell span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 720px) {
  .phead.na-head { padding: 52px 16px 36px; }
  .na-wrap { padding: 24px 16px 72px; }
  .na-section { padding: 20px 16px 4px; }
  .na-mhead { display: none; }
  .na-mrow { grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px 0; }
  .na-mname { grid-column: 1 / -1; font-weight: 600; margin-bottom: 2px; }
  .na-mcell { justify-content: flex-start; align-items: center; gap: 8px; padding: 10px 10px; border: 1px solid var(--line-2); background: var(--bg-deep); line-height: 1.3; }
  .na-mcell:has(input:checked) { border-color: var(--blue); background: rgba(122,175,201,0.08); }
  .na-mcell span { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 13.5px; color: var(--t-mid); }
}

.err { display: none; margin: 8px 0 0; font-size: 13px; color: #e79a9a; }
.na-q.bad .err { display: block; }
.na-q.bad .na-opt, .na-q.bad textarea { border-color: rgba(217,154,154,0.5); }

.na-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.na-actions { margin-top: 26px; }
.na-actions .hint { font-size: 13px; color: var(--t-soft); margin: 12px 0 0; }
.na-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--navy-deeper);
  background: var(--blue); border: 0; border-radius: 999px; padding: 14px 30px; cursor: pointer;
  transition: background .2s var(--ease-out), transform .2s var(--ease-out);
}
.na-btn:hover { background: var(--blue-bright); }
.na-btn:disabled { opacity: 0.6; cursor: default; }

.na-end {
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.03);
  padding: 34px 30px; text-align: left;
}
.na-end h2 { margin: 0 0 10px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; color: var(--t-strong); letter-spacing: -0.01em; }
.na-end p { color: var(--t-mid); font-size: 15.5px; margin: 0 0 20px; }
.na-end p:last-child { margin-bottom: 0; }
.na-end a:not(.na-btn) { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 3px; }
.na-broken { border-color: rgba(217,154,154,0.4); }
.na-head .lede a { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 3px; }
