/* ════════════════════════════════════════════════════════
   WIZARD — Sociodynamic Diagnostics Tool
   Theme: matches Dashboard (dark, amber accent)
   ════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #0D0D1A;
  --bg-primary: #1A1A2E;
  --bg-elevated: #222240;
  --bg-card: #1E1E36;
  --bg-card-hover: #26264A;
  --amber: #D4A843;
  --amber-dim: rgba(212,168,67,0.15);
  --amber-glow: rgba(212,168,67,0.25);
  --red: #E05555;
  --red-dim: rgba(224,85,85,0.12);
  --orange: #E08A45;
  --orange-dim: rgba(224,138,69,0.12);
  --teal: #45B8A0;
  --teal-dim: rgba(69,184,160,0.12);
  --blue: #5588CC;
  --blue-dim: rgba(85,136,204,0.12);
  --text-primary: #E8E4DC;
  --text-secondary: #9A96A6;
  --text-dim: #6A6678;
  --border: rgba(255,255,255,0.06);
  --border-active: rgba(212,168,67,0.3);
}

html { font-size: 15px; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── LAYOUT ── */

.wizard {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  position: relative;
  z-index: 1;
}

.wizard-header {
  text-align: center;
  margin-bottom: 36px;
}

.wizard-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.wizard-header .subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── PROGRESS BAR ── */

.progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 32px;
}

.progress-segment {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  transition: background 0.4s ease;
}

.progress-segment.done {
  background: var(--amber);
}

.progress-segment.current {
  background: var(--amber-glow);
  box-shadow: 0 0 8px var(--amber-glow);
}

.progress-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 8px;
}

/* ── STEP CONTAINER ── */

.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 28px 24px;
}

.step-number {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 6px;
}

.step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.step-question {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── TEXT INPUTS ── */

.field {
  margin-bottom: 18px;
}

.field-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: block;
}

.field-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.field-input:focus {
  border-color: var(--amber);
}

.field-input::placeholder {
  color: var(--text-dim);
}

/* ── SLIDER ── */

.slider-wrap {
  margin-bottom: 8px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.slider-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--amber);
  min-width: 48px;
  text-align: right;
}

.slider-range {
  font-size: 0.68rem;
  color: var(--text-dim);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber-glow);
  cursor: pointer;
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber-glow);
  border: none;
  cursor: pointer;
}

/* ── SLIDER ANCHORS ── */

.anchors {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.anchor {
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s, opacity 0.2s;
  cursor: pointer;
  opacity: 0.45;
}

.anchor.highlighted {
  opacity: 1;
  background: rgba(255,255,255,0.03);
}

.anchor-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--amber);
  min-width: 20px;
  flex-shrink: 0;
  padding-top: 1px;
}

.anchor-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.anchor.highlighted .anchor-text {
  color: var(--text-primary);
}

/* ── RADIO OPTIONS ── */

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.option:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.option.selected {
  border-color: var(--amber);
  background: var(--amber-dim);
}

.option input[type="radio"] {
  display: none;
}

.option-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s;
  position: relative;
}

.option.selected .option-radio {
  border-color: var(--amber);
}

.option.selected .option-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--amber);
}

.option-content {
  flex: 1;
}

.option-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.option-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.option.selected .option-desc {
  color: var(--text-secondary);
}

/* ── BOUNDARY GROUP (3 columns) ── */

.boundary-group {
  margin-bottom: 24px;
}

.boundary-group-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.boundary-group-question {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.5;
}

.boundary-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.boundary-opt {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.boundary-opt:hover {
  border-color: var(--border-active);
}

.boundary-opt.selected {
  border-color: var(--amber);
  background: var(--amber-dim);
}

.boundary-opt .bo-code {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.boundary-opt.selected .bo-code { color: var(--amber); }

.boundary-opt .bo-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.boundary-opt.selected .bo-label {
  color: var(--text-secondary);
}

/* ── TRIPLE SLIDER (Trust, Lock-in, Attention) ── */

.triple-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.triple-item .slider-wrap {
  margin-bottom: 0;
}

.triple-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.triple-question {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ── NAVIGATION ── */

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

.btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-back:hover {
  border-color: var(--text-dim);
  color: var(--text-primary);
}

.btn-next {
  background: var(--amber-dim);
  border: 1px solid var(--amber);
  color: var(--amber);
}

.btn-next:hover {
  background: rgba(212,168,67,0.25);
}

.btn-compute {
  background: var(--amber);
  color: var(--bg-deep);
  font-weight: 700;
  padding: 12px 36px;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.btn-compute:hover {
  background: #e0b44e;
  box-shadow: 0 0 20px var(--amber-glow);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── INFO TOGGLE ── */

.info-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.info-toggle:hover {
  color: var(--text-secondary);
  border-color: var(--text-dim);
}

.info-toggle.open {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-dim);
}

.info-box {
  display: none;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.info-box.open {
  display: block;
  animation: fadeIn 0.25s ease;
}

.info-box strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── RESPONSIVE ── */

@media (max-width: 600px) {
  .wizard { padding: 20px 16px 48px; }
  .step-card { padding: 20px 18px; }
  .boundary-options { grid-template-columns: 1fr; }
  .slider-value { font-size: 1.5rem; }
}
