/* ==========================================================================
   Next-Gen MBA Research Survey — Design System
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;

  /* Light Palette */
  --bg-page: #f4f7fb;
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-solid: #ffffff;
  --bg-subtle: #eef2f8;
  --bg-hover: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);

  /* Brand & Accent — Vibrant Next-Gen Palette */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-violet: #7c3aed;
  --accent-pink: #ec4899;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-glow: rgba(79, 70, 229, 0.28);
  --accent-2: #0ea5e9;
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.14);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);

  /* Elevation & Radii */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --transition-fast: 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-med: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --bg-page: #0b1120;
  --bg-surface: rgba(17, 24, 39, 0.86);
  --bg-surface-solid: #111827;
  --bg-subtle: #1e293b;
  --bg-hover: #172033;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.18);
  --accent-glow: rgba(99, 102, 241, 0.3);
  --accent-2: #38bdf8;
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.15);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 36px -8px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, 0.65);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient Animated Aurora Background — Rich & Vivid */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.34), transparent 46%),
    radial-gradient(circle at 88% 14%, rgba(6, 182, 212, 0.32), transparent 46%),
    radial-gradient(circle at 78% 82%, rgba(236, 72, 153, 0.26), transparent 48%),
    radial-gradient(circle at 25% 84%, rgba(16, 185, 129, 0.24), transparent 46%),
    linear-gradient(135deg, #eef2ff 0%, #e0f2fe 50%, #fdf2f8 100%);
  background-size: 165% 165%;
  animation: auroraShift 14s ease-in-out infinite alternate;
}

[data-theme="dark"] .ambient-bg {
  background:
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.34), transparent 46%),
    radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.30), transparent 46%),
    radial-gradient(circle at 75% 85%, rgba(236, 72, 153, 0.24), transparent 48%),
    radial-gradient(circle at 25% 85%, rgba(16, 185, 129, 0.22), transparent 46%),
    linear-gradient(135deg, #090d1f 0%, #0f172a 55%, #1a1033 100%);
}

@keyframes auroraShift {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 20% 100%; }
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.68;
  will-change: transform;
}

[data-theme="dark"] .ambient-orb {
  opacity: 0.42;
}

.orb-1 {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, #6366f1, #a855f7 52%, transparent 72%);
  top: -140px;
  left: -100px;
  animation: floatOrb1 14s ease-in-out infinite alternate;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #06b6d4, #10b981 55%, transparent 72%);
  bottom: -130px;
  right: -90px;
  animation: floatOrb2 18s ease-in-out infinite alternate;
}

.orb-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #ec4899, #f59e0b 52%, transparent 72%);
  top: 32%;
  right: 10%;
  opacity: 0.46;
  animation: floatOrb3 20s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 50px) scale(1.12); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, -60px) scale(1.15); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.95); }
  100% { transform: translate(-50px, 60px) rotate(25deg) scale(1.1); }
}

/* Sticky Top Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px var(--accent-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-solid);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.icon-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

[data-theme="light"] .moon-icon { display: inline; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: inline; }

/* Progress Track */
.progress-track {
  height: 3px;
  width: 100%;
  background: var(--bg-subtle);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-violet), var(--accent-2), var(--success));
  background-size: 200% 100%;
  animation: shimmerFlow 3s linear infinite;
  transition: width 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes shimmerFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Main Layout */
.survey-layout {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  flex: 1;
  align-items: start;
}

/* Guided Section Rail */
.section-rail {
  position: sticky;
  top: 84px;
}

.rail-card {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow:
    0 24px 56px -10px rgba(15, 23, 42, 0.36),
    0 10px 24px -6px rgba(79, 70, 229, 0.22);
}

.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.rail-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.rail-percent {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

.stepper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.stepper-item:hover:not(.locked) {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.stepper-item.locked {
  cursor: default;
  opacity: 0.55;
}

.stepper-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  border-color: rgba(79, 70, 229, 0.2);
}

.stepper-item.completed {
  color: var(--text-primary);
}

.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.stepper-item.active .step-dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulseRing 2.2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 7px rgba(79, 70, 229, 0.06); }
}

.stepper-item.completed .step-dot {
  background: var(--success-soft);
  color: var(--success);
}

.rail-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.text-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link-btn:hover {
  color: var(--accent);
}

/* Main Stage & Section Card */
.survey-stage {
  min-width: 0;
}

.section-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-top: 3px solid transparent;
  background-clip: padding-box;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  animation: fadeSlideIn 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-violet), var(--accent-2), var(--success));
  background-size: 200% 100%;
  animation: shimmerFlow 5s linear infinite;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.question-block {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  animation: questionStagger 360ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.question-block:nth-child(1) { animation-delay: 30ms; }
.question-block:nth-child(2) { animation-delay: 75ms; }
.question-block:nth-child(3) { animation-delay: 120ms; }
.question-block:nth-child(4) { animation-delay: 165ms; }
.question-block:nth-child(5) { animation-delay: 210ms; }
.question-block:nth-child(6) { animation-delay: 255ms; }

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

.section-header {
  margin-bottom: 24px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.25;
}

.section-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* Guided Tip Banner */
.guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  margin-bottom: 26px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.guide-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-banner strong {
  color: var(--text-primary);
}

/* Intro / Consent Brief */
.intro-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.intro-box p {
  margin: 0;
}

.researcher-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.researcher-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Question Blocks */
.questions-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-block {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.question-block.answered {
  border-color: rgba(16, 185, 129, 0.28);
}

.question-block.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

body.focus-mode .question-block {
  opacity: 0.45;
  transform: scale(0.992);
}

body.focus-mode .question-block.is-focused {
  opacity: 1;
  transform: scale(1);
  border-color: var(--accent);
  box-shadow: 0 10px 28px -10px var(--accent-glow);
}

.question-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.question-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.45;
}

.q-code {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  margin-right: 8px;
  vertical-align: middle;
}

.q-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.q-tag.required {
  color: var(--accent);
  background: var(--accent-soft);
}

.error-msg {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--danger);
  font-weight: 500;
  display: none;
}

.question-block.invalid .error-msg {
  display: block;
}

/* Tactile Choice Cards (Radio / Checkbox) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.options-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-hover);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
}

.option-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-card.is-checkbox .option-indicator {
  border-radius: 5px;
}

.option-card.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), rgba(14, 165, 233, 0.08));
  box-shadow: 0 4px 14px var(--accent-glow);
  animation: popSelect 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popSelect {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.option-card.selected .option-indicator {
  border-color: var(--accent);
  background: var(--accent);
}

.option-card.selected .option-indicator::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.option-card.is-checkbox.selected .option-indicator::after {
  width: 9px;
  height: 5px;
  border-radius: 0;
  background: transparent;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.other-input-wrap {
  margin-top: 10px;
  display: none;
}

.other-input-wrap.visible {
  display: block;
  animation: fadeSlideIn 200ms ease;
}

.text-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface-solid);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* 5-Point Likert Scale Pills */
.likert-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.likert-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.likert-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 11px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-hover);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  user-select: none;
}

.likert-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.likert-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.likert-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 3px;
}

.likert-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.likert-pill.selected {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
  color: #fff;
  box-shadow: 0 8px 18px var(--accent-glow);
  animation: popSelect 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.likert-pill.selected .likert-num,
.likert-pill.selected .likert-lbl {
  color: #fff;
}

/* Stage Navigation */
.stage-nav {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nav-center-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 5px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 0 var(--border-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 8px 20px -4px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -4px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-surface-solid);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Completion / Exit Screens & Radar Profile */
.outcome-hero {
  text-align: center;
  padding: 12px 0 24px;
}

.outcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  background: var(--success-soft);
  color: var(--success);
}

.outcome-icon.exit {
  background: var(--accent-soft);
  color: var(--accent);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
}

.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dimension-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dim-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dim-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
}

.dim-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
}

.dim-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Footer & Modal */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.modal-desc {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 960px) {
  .survey-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-rail {
    position: static;
  }

  .stepper-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .stepper-item {
    white-space: nowrap;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 10px 14px;
  }

  .time-pill,
  .btn-label,
  .nav-center-hint {
    display: none;
  }

  .survey-layout {
    padding: 14px 12px 24px;
    gap: 14px;
  }

  .rail-card {
    padding: 12px 14px;
    border-radius: var(--radius-md);
  }

  .rail-footer {
    margin-top: 10px;
    padding-top: 10px;
  }

  .section-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .question-block {
    padding: 16px 14px;
  }

  .option-card {
    min-height: 48px;
    padding: 12px 14px;
  }

  .likert-legend {
    display: none;
  }

  .likert-bar {
    gap: 6px;
  }

  .likert-pill {
    min-height: 56px;
    padding: 10px 4px;
  }

  .likert-lbl {
    font-size: 0.6rem;
  }

  .stage-nav {
    position: sticky;
    bottom: 10px;
    z-index: 30;
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 8px 10px;
    box-shadow: var(--shadow-lg);
  }

  .stage-nav .btn {
    padding: 11px 16px;
    font-size: 0.88rem;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Curved Left-Edge AI Artwork Panel (Inspired by Reference Layout)
   ========================================================================== */
.left-curved-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 34vw;
  min-width: 320px;
  max-width: 460px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 12px 0 40px -10px rgba(15, 23, 42, 0.14);
}

.left-curved-img {
  position: absolute;
  inset: -4%;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(79, 70, 229, 0.18) 100%),
    url("../assets/side-ai-artwork.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(1.18) contrast(1.04);
  animation: kenBurnsLeft 24s ease-in-out infinite alternate;
}

.panel-holo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

@keyframes kenBurnsLeft {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -1.5%); }
}

.left-curved-wave {
  position: absolute;
  top: 0;
  right: -1px;
  width: 96px;
  height: 100%;
  filter: drop-shadow(-6px 0 14px rgba(15, 23, 42, 0.12));
}

.left-curved-pill {
  position: absolute;
  top: -36px;
  left: 56px;
  width: 68px;
  height: 170px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #facc15, #f59e0b);
  transform: rotate(-34deg);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.65);
  z-index: 2;
}

.geo-accent {
  position: fixed;
  pointer-events: none;
  z-index: 2;
}

.geo-triangle {
  top: 165px;
  left: clamp(340px, 35vw, 480px);
  width: 18px;
  height: 18px;
  border-left: 2px solid rgba(245, 158, 11, 0.55);
  border-bottom: 2px solid rgba(245, 158, 11, 0.55);
  transform: rotate(-28deg);
  animation: floatGeo 6s ease-in-out infinite alternate;
}

.geo-ring {
  bottom: 70px;
  left: clamp(330px, 34.5vw, 470px);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(79, 70, 229, 0.35);
  animation: floatGeo 8s ease-in-out infinite alternate-reverse;
}

@keyframes floatGeo {
  0% { transform: translateY(0) rotate(-28deg); }
  100% { transform: translateY(-10px) rotate(-18deg); }
}

@media (max-width: 1080px) {
  .left-curved-backdrop,
  .geo-accent {
    display: none;
  }
}

/* ==========================================================================
   Sliding GenAI Background Artwork & Neural Canvas
   ========================================================================== */
.bg-slide-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 200%;
  height: 100%;
  opacity: 0.12;
  animation: bgSlidePan 48s linear infinite;
  will-change: transform;
}

[data-theme="dark"] .bg-slide-track {
  opacity: 0.08;
}

.bg-slide-img {
  width: 50%;
  height: 100%;
  background-image: url("../assets/hero-artwork.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(1.2) blur(2px);
}

.bg-slide-img:nth-child(2) {
  transform: scaleX(-1);
}

@keyframes bgSlidePan {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.genai-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ==========================================================================
   Left-Pane Centered 3D Robot Overlay (Always Visible in Viewport, On Top)
   ========================================================================== */
.robot-overlay {
  position: fixed;
  left: max(24px, calc((100vw - 1200px) / 2 + 24px));
  bottom: 10px;
  width: 270px;
  height: 300px;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.robot-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 960px) {
  .robot-overlay {
    left: 10px;
    bottom: 64px;
    width: 170px;
    height: 185px;
    z-index: 60;
  }
}
