/* Maturity assessment, scoped styles. Builds on the global site styles. */

.assessment-app {
  margin-top: 28px;
  max-width: 820px;
}

/* Progress */
.progress-wrap { max-width: 820px; margin-top: 20px; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--ink-soft, #6B7177);
  margin-bottom: 8px;
  font-feature-settings: "tnum" 1;
}
.progress-bar {
  height: 6px; border-radius: 3px;
  background: rgba(0,0,0,0.06);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #C9A24A;
  transition: width 240ms ease;
}

/* Pages */
.page { display: grid; gap: 18px; }
.page-head h2 {
  font-size: 28px; line-height: 1.2; margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.page-head p { margin: 0; color: var(--ink-soft, #6B7177); max-width: 640px; }
.page-head .iso { font-size: 13px; color: var(--ink-soft, #6B7177); margin-top: 6px; }

/* Form fields */
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--ink-soft, #6B7177); }
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid #C9A24A;
  outline-offset: 1px;
  border-color: transparent;
}

.field-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
}

/* Likert questions */
.q-block {
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  background: #fff;
}
.q-block + .q-block { margin-top: 12px; }
.q-text { font-weight: 500; margin: 0 0 12px; line-height: 1.4; }
.likert {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
@media (max-width: 720px) {
  .likert { grid-template-columns: 1fr; }
  .likert label { min-height: 0; flex-direction: row; gap: 10px; justify-content: flex-start; text-align: left; }
  .likert .lk-num { margin-bottom: 0; }
}
.likert > div { display: flex; }
.likert input { position: absolute; opacity: 0; pointer-events: none; }
.likert label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 84px;
  padding: 10px 8px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  background: #FAFAF7;
  transition: all 120ms ease;
  user-select: none;
  box-sizing: border-box;
}
.likert label:hover { background: #fff; border-color: #C9A24A; }
.likert input:checked + label {
  background: #1F2937;
  color: #fff;
  border-color: #1F2937;
}
.likert input:focus-visible + label {
  outline: 2px solid #C9A24A;
  outline-offset: 1px;
}
.likert .lk-num { font-weight: 600; font-size: 16px; display: block; margin-bottom: 2px; }

/* Consent */
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: #FAFAF7;
}
.consent input { margin-top: 3px; }
.consent label { font-size: 14px; line-height: 1.5; }

/* Nav */
.assessment-nav {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 820px;
}
.assessment-nav .btn { min-width: 120px; }
.assessment-nav .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Error */
.error-msg {
  padding: 12px 14px;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #9F1239;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 14px;
}

/* Result page */
.result-wrap { display: grid; gap: 28px; }
.result-headline {
  padding: 24px;
  border-radius: 12px;
  background: #1F2937;
  color: #fff;
  display: grid; gap: 8px;
}
.result-headline .label { font-size: 13px; opacity: 0.7; letter-spacing: 0.06em; text-transform: uppercase; }
.result-headline .score { font-size: 48px; font-weight: 700; line-height: 1; font-feature-settings: "tnum" 1; }
.result-headline .band { font-size: 22px; font-weight: 600; }
.result-headline .definition { color: #C9A24A; font-size: 14px; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 820px) {
  .result-grid { grid-template-columns: 1fr; }
}

.radar-card, .dims-card {
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  background: #fff;
}
.radar-card h3, .dims-card h3 {
  margin: 0 0 12px; font-size: 16px; font-weight: 600;
}
.dims-list { display: grid; gap: 10px; }
.dim-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.dim-row:last-child { border-bottom: 0; }
.dim-row .dim-name { font-weight: 500; }
.dim-row .dim-score { font-feature-settings: "tnum" 1; color: var(--ink-soft, #6B7177); }
.dim-row .dim-band {
  font-size: 12px; font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(201, 162, 74, 0.15);
  color: #7A5A20;
}
.dim-band.b-Exploring   { background: #FEF3C7; color: #92400E; }
.dim-band.b-Developing  { background: #DBEAFE; color: #1E40AF; }
.dim-band.b-Established { background: #D1FAE5; color: #065F46; }
.dim-band.b-Embedded    { background: #1F2937; color: #FFF; }

.next-step {
  padding: 20px 24px;
  border-radius: 12px;
  background: #FAFAF7;
  border: 1px solid rgba(0,0,0,0.06);
}
.next-step h3 { margin: 0 0 6px; font-size: 18px; }
.next-step p { margin: 0; color: var(--ink-soft, #6B7177); }

.radar-svg { width: 100%; max-width: 360px; display: block; margin: 0 auto; }

.submit-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
