/* ==============================
   Wizard Shell — Cyber Risk Alignment
   ============================== */

.wizard-body {
  background: var(--bg);
  min-height: 100vh;
}

/* Disclaimer Banner */
.disclaimer-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(0, 212, 170, 0.08);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.disclaimer-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--teal);
}

/* Resume Banner */
.resume-banner {
  background: #FFF8E6;
  border-bottom: 1px solid #F0D580;
  padding: 12px 24px;
}
.resume-inner {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.resume-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(245, 166, 35, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  flex-shrink: 0;
}
.resume-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.resume-text strong {
  font-size: 14px;
  color: var(--text);
}
.resume-text #resumeMeta {
  font-size: 12px;
  color: var(--text-muted);
}
.resume-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-resume {
  padding: 8px 16px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.btn-resume:hover { background: var(--navy-mid); }
.btn-fresh {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, color 0.15s;
}
.btn-fresh:hover { border-color: var(--text-muted); color: var(--text); }

/* Main layout */
.wizard-main {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Step Indicator */
.step-indicator {
  margin-bottom: 32px;
}
.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.step-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.step-progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.step-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  background: var(--teal-dim);
  padding: 3px 10px;
  border-radius: 20px;
}
.step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* Wizard Card */
.wizard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(11, 29, 51, 0.06);
}

.step-intro {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* Question blocks */
.questions {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.question-block.error .question-label {
  color: var(--red);
}
.question-block.error::after {
  content: 'This field is required';
  font-size: 12px;
  color: var(--red);
  margin-top: -4px;
}

.question-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: default;
}
.question-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-dim);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  font-family: 'DM Sans', monospace;
}
.question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}
.question-required {
  color: var(--red);
  font-size: 14px;
  line-height: 1;
}

/* Input, select, textarea */
.q-input, .q-select, .q-textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.q-input::placeholder, .q-textarea::placeholder { color: var(--text-light); }
.q-input:focus, .q-select:focus, .q-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
}
.q-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C6E80' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.q-textarea { resize: vertical; min-height: 100px; }
.q-number { max-width: 200px; }

/* Radio options */
.q-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.q-option:hover { border-color: var(--teal); background: var(--teal-dim); }
.q-option input[type="radio"] {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.q-option-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}
.q-option:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-dim);
}

/* Yes/No buttons */
.q-yesno {
  display: flex;
  gap: 12px;
}
.q-yesno-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  justify-content: center;
  transition: all 0.15s;
}
.q-yesno-btn:hover { border-color: var(--teal); background: var(--teal-dim); }
.q-yesno-btn input[type="radio"] {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
}
.q-yesno-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.q-yesno-btn:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-dim);
}
.q-yesno-btn.required .q-yesno-label::after {
  content: ' *';
  color: var(--red);
}

/* Review placeholder */
.review-placeholder {
  text-align: center;
  padding: 40px 0;
}
.review-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--teal);
}
.review-placeholder h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--navy);
  margin-bottom: 12px;
}
.review-placeholder p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* Navigation */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.wizard-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-back:hover { border-color: var(--text-muted); color: var(--text); }
.btn-save {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-save:hover { border-color: var(--navy); color: var(--navy); }
.btn-save.saved {
  border-color: var(--green);
  color: var(--green);
}
.btn-next {
  background: var(--navy);
  color: white;
}
.btn-next:hover { background: var(--navy-mid); }

/* ─── Question Header Row ─────────────────────────────────────────── */
.question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* ─── Help Button ──────────────────────────────────────────────────── */
.help-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.help-btn:hover, .help-btn.active {
  background: var(--teal-dim);
  color: var(--teal);
}
.help-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  background: var(--navy);
  color: white;
  font-size: 13px;
  line-height: 1.55;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 29, 51, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 100;
  text-align: left;
}
.help-btn.active .help-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.help-popup::before {
  content: '';
  position: absolute;
  right: 12px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: var(--navy);
  transform: rotate(45deg);
}

/* ─── Question Input Area ───────────────────────────────────────────── */
.question-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Yes / No / Partial ────────────────────────────────────────────── */
.q-yesno-partial {
  gap: 8px;
}
.q-yesno-partial .q-yesno-btn {
  padding: 12px 18px;
  font-size: 14px;
}

/* ─── Multiselect ────────────────────────────────────────────────────── */
.q-checkbox-option {
  gap: 12px;
}
.q-checkbox-option input[type="checkbox"] {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.q-checkbox-option:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-dim);
}

/* ─── Evidence Prompt ────────────────────────────────────────────────── */
.evidence-prompt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.evidence-prompt-inner {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  min-width: 200px;
}
.evidence-prompt-inner svg { color: var(--text-light); flex-shrink: 0; }
.evidence-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.evidence-upload-btn:hover { border-color: var(--teal); color: var(--teal); }
.evidence-file-input {
  display: none;
}
.evidence-file-name {
  font-size: 11px;
  color: var(--teal);
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Submit Button ──────────────────────────────────────────────────── */
.btn-submit {
  background: var(--teal);
  color: white;
}
.btn-submit:hover { background: #00b89c; }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wizard-main { padding: 24px 16px 60px; }
  .wizard-card { padding: 24px 20px; }
  .step-indicator { margin-bottom: 24px; }
  .resume-inner { flex-direction: column; align-items: flex-start; }
  .wizard-nav { flex-direction: column; align-items: stretch; }
  .wizard-nav-right { justify-content: flex-end; }
  .q-yesno { flex-direction: column; }
  .q-yesno-btn { justify-content: flex-start; }
  .q-yesno-partial { flex-direction: column; }
  .help-popup { width: 220px; right: -8px; }
}

/* ================================================================
   Results Dashboard (wizard step 15)
   ================================================================ */

/* Loading overlay */
.scoring-loader {
  position: fixed;
  inset: 0;
  background: rgba(247, 249, 248, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loader-inner {
  text-align: center;
}
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-inner p {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Score Banner */
.score-banner {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 40px;
  margin-bottom: 32px;
}

.score-gauge-wrap {
  flex-shrink: 0;
}

.score-gauge {
  width: 180px;
  height: 180px;
}

.gauge-track {
  fill: none;
  stroke: var(--gauge-track, #D8EAE4);
  stroke-width: 16;
}

.gauge-fill {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-score {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  fill: var(--text);
}

.gauge-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  fill: var(--text-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.score-meta {
  flex: 1;
}

.score-tier {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 8px;
}

.score-tier.tier-strong { color: #00C97A; }
.score-tier.tier-moderate { color: #F5A623; }
.score-tier.tier-gaps { color: #F97316; }
.score-tier.tier-critical { color: #E84040; }

.score-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.score-questions {
  font-size: 13px;
  color: var(--text-light);
}

/* Results sections */
.results-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.results-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.results-section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

.gap-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 500;
}

/* Category breakdown bars */
.category-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cat-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-bar-wrap {
  flex: 1;
}

.cat-bar {
  height: 8px;
  background: var(--gauge-track, #D8EAE4);
  border-radius: 4px;
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.cat-pct {
  font-size: 13px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

/* Radar chart */
.radar-wrap {
  margin-top: 8px;
}

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

/* Gap table */
.gap-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gap-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.gap-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

.gap-table tr:last-child td { border-bottom: none; }
.gap-table tr:hover td { background: var(--bg); }

.gap-q {
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 2px;
}

.gap-id {
  font-size: 11px;
  color: var(--text-light);
  font-family: 'Courier New', monospace;
}

.cat-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.sev-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

.your-status {
  font-size: 13px;
}

.gap-action {
  max-width: 260px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Roadmap */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.roadmap-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.roadmap-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 2px solid;
}

.roadmap-icon {
  font-size: 20px;
  line-height: 1;
}

.roadmap-label {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  font-weight: 400;
}

.roadmap-count {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 2px;
}

.roadmap-sublabel {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 20px 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.roadmap-list {
  list-style: none;
  padding: 12px 20px 16px;
  margin: 0;
}

.roadmap-item {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.roadmap-item:last-child { border-bottom: none; }

.roadmap-item-id {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  display: inline-block;
  min-width: 48px;
  margin-right: 4px;
}

/* Action buttons */
.results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--teal);
  color: var(--navy);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-download:hover { background: #00b893; transform: translateY(-1px); }

.btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-restart:hover { border-color: var(--text-muted); color: var(--text); }

/* Disclaimer */
.results-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  padding: 16px;
  background: var(--bg);
  border-radius: 10px;
}
.results-disclaimer svg { flex-shrink: 0; margin-top: 1px; }

/* Mobile responsive */
@media (max-width: 600px) {
  .score-banner { flex-direction: column; align-items: center; text-align: center; padding: 24px 20px; }
  .cat-name { min-width: 140px; font-size: 12px; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .gap-table td { font-size: 12px; }
  .gap-action { max-width: 180px; }
  .results-section { padding: 20px 16px; }
}