@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-base: #08090d;
  --bg-surface: #0f131c;
  --bg-surface-elevated: #161c28;
  --bg-surface-overlay: rgba(15, 19, 28, 0.85);

  --border-subtle: #1e2638;
  --border-strong: #2a354c;
  --border-highlight: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-rose: #ef4444;
  --accent-rose-glow: rgba(239, 68, 68, 0.25);
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
}

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

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

/* Background Atmosphere */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow-1 {
  position: absolute;
  top: -15%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  filter: blur(80px);
}

.ambient-glow-2 {
  position: absolute;
  bottom: 5%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
  filter: blur(90px);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
}

/* App Header */
.app-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 9, 13, 0.8);
  backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--ease-spring), opacity 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.brand:active {
  transform: scale(0.98);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(56, 189, 248, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
}

.header-stats {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Main Layout */
.main-wrapper {
  position: relative;
  z-index: 10;
  flex: 1;
  max-width: 78rem;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 2rem) clamp(0.75rem, 2vw, 1.25rem) clamp(2.5rem, 5vw, 3.75rem);
  box-sizing: border-box;
}

/* Screen Transitions */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   HERO / INTRO SECTION ("ОКОЛОЛЕНДИНГ")
   ========================================================== */
.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 18px;
}

.hero-title span {
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 32px;
}

/* Trust Metric Grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.trust-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.trust-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.trust-lbl {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Hero Demographics Age Selector */
.hero-demographics-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.demo-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.demo-label {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.age-picker-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 12, 22, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.age-stepper-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.age-stepper-btn:hover {
  background: var(--accent-cyan);
  color: #050811;
  border-color: var(--accent-cyan);
}

.hero-age-num-input {
  width: 60px;
  height: 34px;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.hero-age-num-input::-webkit-outer-spin-button,
.hero-age-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.demo-unit {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Friendly Plain-Language Explainer ("Для людей / простыми словами") */
.q-simple-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 12px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #e2e8f0;
}

.q-simple-hint .hint-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.q-simple-hint strong {
  color: var(--accent-cyan);
  font-weight: 700;
}

.q-age-picker-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
}

.age-picker-prompt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Call to Action */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
    align-items: center;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-emerald-glow);
  transition: all 0.25s var(--ease-spring);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--accent-emerald-glow);
  background: linear-gradient(135deg, #34d399, #059669);
}

.btn-primary:active {
  transform: translateY(0);
}

.hero-notice {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================
   QUIZ ASSESSMENT COCKPIT
   ========================================================== */
.quiz-header {
  margin-bottom: 24px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #059669, #10b981);
  box-shadow: 0 0 12px var(--accent-emerald);
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-spring);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.cat-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.q-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.q-heading {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 16px;
  text-wrap: balance;
  max-width: 42em;
}

/* Plain-Language Explainer Callout ("Простыми словами") */
.q-simple-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.5;
}

.q-simple-hint .hint-icon {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
}

.q-simple-hint .hint-text {
  flex: 1;
}

/* Inline Exact Age Picker on Question 1 */
.q-age-picker-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 16px;
}

.q-age-picker-wrap .age-picker-prompt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Research Info Button */
.study-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 24px;
  transition: all 0.2s var(--ease-spring);
}

.study-trigger-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

/* Options Grid */
.options-list {
  display: grid;
  gap: 12px;
}

.opt-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  position: relative;
}

.opt-card:hover {
  border-color: var(--border-highlight);
  background: #172033;
  transform: translateX(4px);
}

.opt-card:focus-visible {
  outline: 2px solid var(--accent-cyan);
}

.opt-card.selected {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

.opt-key {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.opt-body {
  flex: 1;
}

.opt-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.opt-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

.opt-delta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.opt-delta.pos {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
}

.opt-delta.neg {
  color: var(--accent-rose);
  background: rgba(239, 68, 68, 0.12);
}

.opt-delta.zero {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

/* Quiz Navigation */
.quiz-nav {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.quiz-nav .btn-primary {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
}

.btn-calc-ready {
  animation: pulse-emerald 2s infinite ease-in-out;
}

@keyframes pulse-emerald {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6), 0 4px 16px rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 6px 22px rgba(16, 185, 129, 0.6);
  }
}

.quiz-kbd-tip {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================
   SIMULATION LOADING TERMINAL
   ========================================================== */
.loading-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.radar-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(16, 185, 129, 0.15);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-phase {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.loading-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
}

.log-terminal {
  background: #06080c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a0aec0;
  text-align: left;
  line-height: 1.7;
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  animation: log-fade 0.3s ease-out;
}

@keyframes log-fade {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-bullet {
  color: var(--accent-emerald);
  font-weight: bold;
}

/* ==========================================================
   RESULTS DASHBOARD
   ========================================================== */
.results-header {
  text-align: center;
  margin-bottom: 36px;
}

.results-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.results-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Key Metrics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.metric-card.highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-surface) 100%);
}

.metric-card.accent {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, var(--bg-surface) 100%);
}

.metric-num {
  font-size: 38px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 8px;
  white-space: nowrap;
}

.metric-num.emerald { color: var(--accent-emerald); }
.metric-num.cyan { color: var(--accent-cyan); }

.metric-lbl {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-diff {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.stat-diff.pos { color: var(--accent-emerald); }
.stat-diff.neg { color: var(--accent-rose); }
.stat-diff.zero { color: var(--text-muted); }

/* Milestone Full Card */
.milestone-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 32px;
}

.milestone-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.milestone-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Visualization Panels */
.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 32px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.chart-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.chart-canvas-wrap {
  position: relative;
  height: 340px;
  width: 100%;
}

.radar-canvas-wrap {
  position: relative;
  height: 380px;
  width: 100%;
}

/* Factors Grid */
.factors-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.factor-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.factor-col-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.factor-col-title.pos { color: var(--accent-emerald); }
.factor-col-title.neg { color: var(--accent-rose); }

.factor-cards-stack {
  display: grid;
  gap: 12px;
}

.factor-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
}

.factor-card.pos { border-left-color: var(--accent-emerald); }
.factor-card.neg { border-left-color: var(--accent-rose); }

.factor-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.factor-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.factor-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
}

.text-emerald { color: var(--accent-emerald); }
.text-rose { color: var(--accent-rose); }

.factor-study-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--accent-cyan);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.factor-study-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.factor-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

/* Optimization Roadmap */
.roadmap-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

.roadmap-title-main {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.roadmap-desc-main {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.roadmap-list {
  display: grid;
  gap: 12px;
}

.roadmap-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

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

.roadmap-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.roadmap-years {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.roadmap-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Results Actions */
.results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.disclaimer-box {
  margin-top: 48px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

/* ==========================================================
   RESEARCH STUDY MODAL
   ========================================================== */
.study-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.study-modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.study-modal.active,
.study-modal.active ~ .study-modal-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.study-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease-spring);
  overflow: hidden;
}

.study-modal.active .study-modal-card {
  transform: scale(1);
}

.study-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.study-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.study-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.study-modal-close:hover {
  color: #ffffff;
}

.study-modal-body {
  padding: 24px;
  overflow-y: auto;
  line-height: 1.6;
}

.study-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.study-mechanism-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.study-links-stack {
  display: grid;
  gap: 12px;
}

.study-card-link {
  display: block;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  transition: all 0.2s var(--ease-spring);
}

.study-card-link:hover {
  border-color: var(--accent-cyan);
  background: #172238;
  transform: translateY(-1px);
}

.study-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.study-journal {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.study-ext {
  font-size: 11px;
  color: var(--text-muted);
}

.study-title-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-card {
    padding: 28px 20px;
  }
  .quiz-card {
    padding: 24px 16px;
  }
  .chart-canvas-wrap {
    height: 280px;
  }
  .radar-canvas-wrap {
    height: 320px;
  }
  .btn-primary {
    width: 100%;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
