/* ===================== Assessment form ===================== */

body.assess { background: #fff; }

/* minimal header */
.assess-header {
  position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border);
}
.assess-header .bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.assess-header .sec-indicator { font-size: 13px; font-weight: 600; color: var(--text-helper); font-family: var(--font-mono); letter-spacing: 0.04em; white-space: nowrap; }

/* progress bar */
.progress-wrap { border-bottom: 1px solid var(--border); background: #fff; }
.progress-wrap.hidden-on-entry { display: none; }
/* padding-top/bottom only — a `padding` shorthand here would clobber .container's
   horizontal padding (same specificity, later file) and push the count off-screen */
.progress-inner { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.progress-bar { flex: 1; height: 6px; background: #EDEDED; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 999px; transition: width .3s ease; }
.progress-count { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; font-family: var(--font-mono); }

/* form shell */
.form-main { padding: 36px 0 140px; }
.form-wrap { max-width: 680px; margin: 0 auto; }
.form-screen { display: none; }
.form-screen.active { display: block; }

/* entry / intro screens — display gated to .active so it hides like other screens */
.entry-screen { min-height: 62vh; flex-direction: column; justify-content: center; text-align: center; }
.form-screen.active.entry-screen { display: flex; }
.entry-screen h1 { margin-bottom: 18px; }
.entry-screen p { font-size: 18px; color: var(--text-secondary); margin: 0 auto 32px; max-width: 560px; }

/* section header */
.section-label { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; color: var(--primary); margin-bottom: 12px; }
.section-title-row { margin-bottom: 28px; }
.section-desc { font-size: 16px; color: var(--text-secondary); margin-top: 8px; line-height: 1.6; }

/* test score repeatable rows */
.test-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.test-row .field { margin-bottom: 0; }

/* activity blocks */
.activity-block { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; margin-bottom: 20px; background: #FCFCFD; }
@media (min-width:768px){ .activity-block { padding: 24px; } }
.activity-block .act-sublabel { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-helper); margin-bottom: 16px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle-row { display: flex; gap: 10px; }
.toggle-row .pill { min-width: 88px; }

/* essay block */
.essay-block { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; margin-bottom: 20px; background: #FCFCFD; }
@media (min-width:768px){ .essay-block { padding: 24px; } }
.essay-block .essay-sublabel { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-helper); margin-bottom: 16px; }

/* info / no-essay message box */
.message-box {
  background: var(--locked-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; font-size: 14.5px; color: var(--text-secondary); line-height: 1.6;
}

/* story progressive reveal */
.story-q { margin-bottom: 4px; }
.story-q.q-hidden { display: none; }
/* conditional fields (IB follow-up) reuse the same hidden convention */
.field.q-hidden { display: none; }

/* review summary */
.review-card { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px 22px; margin-bottom: 16px; }
.review-card .rc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.review-card .rc-title { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); font-family: var(--font-mono); }
.review-card .rc-edit { font-size: 14px; font-weight: 600; }
.review-row { display: grid; grid-template-columns: 180px 1fr; gap: 8px 18px; padding: 9px 0; border-top: 1px solid #F0F0F0; font-size: 15px; }
.review-row:first-of-type { border-top: none; }
.review-row .rr-key { color: var(--text-helper); font-size: 13.5px; }
.review-row .rr-val { color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.review-row .rr-val.empty { color: #B0B0B0; font-style: italic; }
@media (max-width: 560px){ .review-row { grid-template-columns: 1fr; gap: 2px; } }

/* sticky nav */
.form-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px); border-top: 1px solid var(--border);
}
.form-nav-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 24px; }
.form-nav .btn-next-wrap { margin-left: auto; }
.form-nav .nav-spacer { flex: 1; }

/* Next button visually-disabled (kept clickable so tooltip + error-scroll work) */
.btn.is-disabled { background: #EDEDED; color: #AAAAAA; }
.btn.is-disabled:hover { background: #EDEDED; }
.btn.is-disabled:active { transform: none; }

/* fine print under submit */
.submit-fine { font-size: 13px; color: var(--text-helper); text-align: center; margin-top: 14px; }

/* ===================== Voice-to-text (Section D story questions) ===================== */
.voice-wrap { position: relative; }
.voice-wrap .textarea { resize: none; padding-bottom: 46px; }

.mic-btn {
  position: absolute; right: 8px; bottom: 8px;
  width: 36px; height: 36px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-helper); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.mic-btn svg { width: 18px; height: 18px; display: block; }
.mic-btn:hover { color: var(--primary); border-color: var(--primary); }
.mic-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.2); }

.mic-btn.listening,
.mic-btn.listening:hover {
  background: var(--error); border-color: var(--error); color: #fff;
  animation: mic-pulse 1.4s ease-out infinite;
}
@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(217,48,37,0.35); }
  70%  { box-shadow: 0 0 0 9px rgba(217,48,37,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,48,37,0); }
}
@media (prefers-reduced-motion: reduce) {
  .mic-btn.listening { animation: none; }
}

.mic-status {
  display: none;
  position: absolute; right: 52px; bottom: 16px;
  font-size: 12px; font-weight: 600; color: var(--error);
  background: rgba(255,255,255,0.9); padding: 2px 7px; border-radius: 4px;
  pointer-events: none; white-space: nowrap;
}
.voice-wrap.listening .mic-status { display: block; }

.voice-tip { color: var(--text-helper); margin-top: 7px; }

