/* ===================================
   Return On Courage: Rally Cry Architect
   Core Styles
   =================================== */

:root {
  --yellow: #F2C94C;
  --black: #000000;
  --white: #FFFFFF;
  --dark-gray: #333333;
  --soft-gray: #E6E6E6;
  --yellow-dim: rgba(242, 201, 76, 0.15);
  --yellow-glow: rgba(242, 201, 76, 0.4);
  --transition-fast: 0.2s ease;
  --transition-med: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--dark-gray);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 0.75rem; }

/* ===================================
   Onboarding Screen
   =================================== */
#onboarding-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--black);
  padding: 2rem;
}

.onboarding-container {
  max-width: 520px;
  width: 100%;
}

.onboarding-brand {
  text-align: center;
  margin-bottom: 3rem;
}

.onboarding-brand h1 {
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.onboarding-brand h1 span {
  color: var(--yellow);
}

.onboarding-brand .subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--border-radius);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input::placeholder {
  color: rgba(255,255,255,0.25);
}

.form-group input:focus {
  outline: none;
  border-color: var(--yellow);
  background: rgba(255,255,255,0.08);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-top: 0.75rem;
}

.btn-primary:hover:not(:disabled) {
  background: #e6bc3a;
  transform: translateY(-1px);
}

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

.resume-link {
  text-align: center;
  margin-top: 1.5rem;
}

.resume-link button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.resume-link button:hover {
  color: var(--yellow);
}

/* ===================================
   App Shell (3-column layout)
   =================================== */
#app-shell {
  display: none;
  height: 100vh;
  overflow: hidden;
}

#app-shell.active {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  grid-template-rows: auto 1fr;
}

/* Top bar */
.top-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar-brand {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
}

.top-bar-brand span {
  color: var(--yellow);
}

.top-bar-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.save-indicator {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.save-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27ae60;
  display: inline-block;
}

.save-indicator.saving .dot {
  background: var(--yellow);
  animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.btn-settings {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-settings:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ===================================
   Left Panel: Stage Navigator
   =================================== */
.stage-nav {
  background: var(--black);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  overflow-y: auto;
}

.stage-nav-list {
  list-style: none;
}

.stage-nav-item {
  position: relative;
}

.stage-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: default;
  text-align: left;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.stage-nav-btn .stage-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.stage-nav-btn .stage-label {
  flex: 1;
}

.stage-nav-btn .stage-check {
  opacity: 0;
  color: #27ae60;
  font-size: 0.75rem;
  transition: opacity var(--transition-fast);
}

/* Unlocked stage */
.stage-nav-item.unlocked .stage-nav-btn {
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

.stage-nav-item.unlocked .stage-nav-btn:hover {
  background: rgba(255,255,255,0.04);
}

/* Active stage */
.stage-nav-item.active .stage-nav-btn {
  color: var(--white);
  border-left-color: var(--yellow);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}

.stage-nav-item.active .stage-nav-btn .stage-num {
  background: var(--yellow);
  color: var(--black);
}

/* Completed stage */
.stage-nav-item.completed .stage-nav-btn {
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}

.stage-nav-item.completed .stage-nav-btn .stage-num {
  background: rgba(39, 174, 96, 0.2);
  color: #27ae60;
}

.stage-nav-item.completed .stage-nav-btn .stage-check {
  opacity: 1;
}

/* Lock icon for locked stages */
.stage-nav-btn .lock-icon {
  font-size: 0.625rem;
  opacity: 0.3;
}

/* ===================================
   Center Panel: Stage Content
   =================================== */
.center-panel {
  overflow-y: auto;
  padding: 2.5rem 3rem;
  background: var(--white);
}

.stage-header {
  margin-bottom: 2rem;
}

.stage-header .stage-label-sm {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

.stage-header h2 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.stage-header .stage-desc {
  color: rgba(51,51,51,0.6);
  font-size: 0.9375rem;
  max-width: 600px;
}

/* Form fields for stages */
.stage-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 640px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dark-gray);
}

.field-group .field-hint {
  font-size: 0.75rem;
  color: rgba(51,51,51,0.5);
  margin-top: -0.25rem;
}

.field-group input[type="text"],
.field-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--dark-gray);
  transition: border-color var(--transition-fast);
  background: var(--white);
}

.field-group textarea {
  min-height: 100px;
  resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim);
}

/* Tags input (for values) */
.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  min-height: 48px;
  cursor: text;
  transition: border-color var(--transition-fast);
}

.tags-input-container:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.625rem;
  background: var(--yellow-dim);
  border: 1px solid rgba(242, 201, 76, 0.3);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dark-gray);
}

.tag .tag-remove {
  background: none;
  border: none;
  color: var(--dark-gray);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
  padding: 0;
}

.tag .tag-remove:hover {
  opacity: 1;
}

.tags-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 120px;
  font-family: inherit;
  font-size: 0.8125rem;
  padding: 0.25rem 0;
  background: transparent;
}

/* Values Ranker (drag and drop) */
.values-ranker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ranker-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  cursor: grab;
  transition: all var(--transition-fast);
  user-select: none;
}

.ranker-item:active {
  cursor: grabbing;
}

.ranker-item:hover {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}

.ranker-item.dragging {
  opacity: 0.5;
  border-color: var(--yellow);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.ranker-item .rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dark-gray);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ranker-item .rank-num.top {
  background: var(--yellow);
  color: var(--black);
}

.ranker-item .drag-handle {
  color: rgba(51,51,51,0.25);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.ranker-item .rank-label {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Continue button section */
.stage-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-continue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-continue:hover:not(:disabled) {
  background: #e6bc3a;
  transform: translateY(-1px);
}

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

.btn-continue.loading {
  position: relative;
  color: transparent;
}

.btn-continue.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.gate-message {
  font-size: 0.8125rem;
  color: #e74c3c;
  font-weight: 500;
}

/* ===================================
   Coach Response Area
   =================================== */
.coach-response {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--soft-gray);
  animation: fadeIn var(--transition-slow);
}

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

.coach-response h3 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: 1rem;
  font-weight: 500;
}

.coach-reply {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--dark-gray);
}

.coach-reply h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.coach-reply ul, .coach-reply ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.coach-reply li {
  margin-bottom: 0.35rem;
}

.coach-reply strong {
  color: var(--black);
  font-weight: 700;
}

/* Insight Cards */
.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.insight-card {
  background: var(--white);
  border: 1px solid var(--soft-gray);
  border-left: 3px solid var(--yellow);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  animation: slideIn var(--transition-med);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.insight-card .ic-headline {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.insight-card .ic-insight {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.insight-card .ic-tension {
  font-size: 0.8125rem;
  color: rgba(51,51,51,0.7);
  margin-bottom: 0.35rem;
  font-style: italic;
}

.insight-card .ic-implication {
  font-size: 0.8125rem;
  color: rgba(51,51,51,0.6);
}

/* Coach Note (inline coaching callout) */
.coach-note {
  background: var(--yellow-dim);
  border-left: 3px solid var(--yellow);
  padding: 0.875rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-gray);
}

/* Micro Lesson Accordion */
.micro-lesson {
  margin-top: 1.5rem;
}

.micro-lesson-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  padding: 0.625rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dark-gray);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.micro-lesson-toggle:hover {
  border-color: var(--yellow);
}

.micro-lesson-toggle .ml-icon {
  transition: transform var(--transition-fast);
  font-size: 0.625rem;
}

.micro-lesson-toggle.open .ml-icon {
  transform: rotate(90deg);
}

.micro-lesson-content {
  display: none;
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(51,51,51,0.75);
  border: 1px solid var(--soft-gray);
  border-top: none;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.micro-lesson-content.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Next Questions (gate fail prompts) */
.next-questions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.next-question-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #FFF9E6;
  border: 1px solid rgba(242, 201, 76, 0.3);
  border-radius: var(--border-radius);
}

.next-question-item .nq-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-gray);
  flex: 1;
}

.next-question-item textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--soft-gray);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8125rem;
  min-height: 60px;
  resize: vertical;
  margin-top: 0.5rem;
}

.next-question-item textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

/* ===================================
   Right Panel: Dashboard
   =================================== */
.right-panel {
  background: #FAFAFA;
  border-left: 1px solid var(--soft-gray);
  padding: 1.5rem;
  overflow-y: auto;
}

.dashboard-section {
  margin-bottom: 2rem;
}

.dashboard-section h4 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(51,51,51,0.4);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Score Meters */
.meter {
  margin-bottom: 1.25rem;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.meter-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dark-gray);
}

.meter-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black);
}

.meter-bar {
  width: 100%;
  height: 6px;
  background: var(--soft-gray);
  border-radius: 3px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

.meter-fill.courage {
  background: var(--yellow);
}

.meter-fill.alignment {
  background: #27ae60;
}

.meter-fill.tension {
  background: #e74c3c;
}

/* Dashboard bullets */
.dash-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--dark-gray);
  line-height: 1.5;
}

.dash-bullet::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--yellow);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* Dashboard session info */
.session-info {
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.session-info .si-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--black);
}

.session-info .si-company {
  font-size: 0.8125rem;
  color: rgba(51,51,51,0.6);
}

.session-info .si-industry {
  font-size: 0.75rem;
  color: rgba(51,51,51,0.4);
  margin-top: 0.25rem;
}

/* Stage progress mini */
.progress-bar-container {
  margin-bottom: 1.5rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(51,51,51,0.5);
  margin-bottom: 0.375rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--soft-gray);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================
   Archetype Cards (Stage 2)
   =================================== */
.archetype-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.archetype-card {
  padding: 1.25rem;
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius-lg);
  text-align: center;
}

.archetype-card.believer {
  border-color: rgba(39, 174, 96, 0.3);
  background: rgba(39, 174, 96, 0.04);
}

.archetype-card.neutral {
  border-color: rgba(242, 201, 76, 0.3);
  background: var(--yellow-dim);
}

.archetype-card.resistor {
  border-color: rgba(231, 76, 60, 0.3);
  background: rgba(231, 76, 60, 0.04);
}

.archetype-card .ac-type {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.archetype-card.believer .ac-type { color: #27ae60; }
.archetype-card.neutral .ac-type { color: #b8860b; }
.archetype-card.resistor .ac-type { color: #e74c3c; }

.archetype-card .ac-desc {
  font-size: 0.8125rem;
  color: var(--dark-gray);
  line-height: 1.6;
}

/* ===================================
   Fear Frontier (Stage 3)
   =================================== */
.fear-frontier {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.fear-zone {
  padding: 1.25rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
}

.fear-zone.safe {
  background: rgba(39, 174, 96, 0.06);
  border: 1px solid rgba(39, 174, 96, 0.2);
}

.fear-zone.stretch {
  background: var(--yellow-dim);
  border: 1px solid rgba(242, 201, 76, 0.3);
}

.fear-zone.avoided {
  background: rgba(231, 76, 60, 0.06);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.fear-zone .fz-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.fear-zone.safe .fz-label { color: #27ae60; }
.fear-zone.stretch .fz-label { color: #b8860b; }
.fear-zone.avoided .fz-label { color: #e74c3c; }

.fear-zone .fz-content {
  font-size: 0.8125rem;
  color: var(--dark-gray);
  line-height: 1.6;
}

/* Cost Breakdown */
.cost-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.cost-column h5 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(51,51,51,0.5);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.cost-column ul {
  list-style: none;
}

.cost-column li {
  font-size: 0.8125rem;
  color: var(--dark-gray);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(230,230,230,0.5);
  line-height: 1.5;
}

/* ===================================
   Purpose Canvas (Stage 4)
   =================================== */
.purpose-canvas {
  background: var(--black);
  color: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  margin: 2rem 0;
  max-width: 640px;
}

.purpose-canvas .pc-thesis {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.purpose-canvas .pc-tension {
  font-size: 1rem;
  color: var(--yellow);
  font-weight: 500;
  font-style: italic;
}

/* ===================================
   Rally Cry Picker (Stage 5)
   =================================== */
.rally-cry-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.rc-option {
  border: 2px solid var(--soft-gray);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.rc-option:hover {
  border-color: rgba(242, 201, 76, 0.5);
}

.rc-option.selected {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-dim);
}

.rc-option-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.rc-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--soft-gray);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.rc-option.selected .rc-radio {
  border-color: var(--yellow);
  background: var(--yellow);
}

.rc-option.selected .rc-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--black);
}

.rc-cry-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black);
  flex: 1;
}

.rc-expand-btn {
  background: none;
  border: none;
  color: rgba(51,51,51,0.3);
  cursor: pointer;
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
  padding: 0.25rem;
}

.rc-option.expanded .rc-expand-btn {
  transform: rotate(180deg);
}

.rc-option-details {
  display: none;
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--soft-gray);
}

.rc-option.expanded .rc-option-details {
  display: block;
}

.rc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.rc-detail-item .rc-detail-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(51,51,51,0.5);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.rc-detail-item .rc-detail-value {
  font-size: 0.8125rem;
  color: var(--dark-gray);
  line-height: 1.5;
}

.rc-why {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--yellow-dim);
  border-radius: var(--border-radius);
  font-size: 0.8125rem;
  color: var(--dark-gray);
  line-height: 1.6;
}

/* ===================================
   Stress Test (Stage 6)
   =================================== */
.stress-test-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.st-item {
  padding: 1rem 1.25rem;
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  background: var(--white);
}

.st-item .st-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.st-item textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--soft-gray);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
  min-height: 70px;
  resize: vertical;
}

.st-item textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

/* ===================================
   Results / Export (Stage 7)
   =================================== */
.results-section {
  max-width: 700px;
}

.result-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--soft-gray);
}

.result-block:last-child {
  border-bottom: none;
}

.final-rally-cry {
  background: var(--black);
  color: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  margin-bottom: 2rem;
}

.final-rally-cry .frc-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.final-rally-cry .frc-text {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.export-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--dark-gray);
  border-radius: var(--border-radius);
  background: var(--white);
  color: var(--dark-gray);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-export:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-export i {
  font-size: 0.875rem;
}

/* ===================================
   Settings Modal
   =================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal .form-group {
  margin-bottom: 1.25rem;
}

.modal .form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dark-gray);
  margin-bottom: 0.375rem;
}

.modal .form-group input,
.modal .form-group select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--soft-gray);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--dark-gray);
}

.modal .form-group input:focus,
.modal .form-group select:focus {
  outline: none;
  border-color: var(--yellow);
}

.modal .form-group .field-hint {
  font-size: 0.75rem;
  color: rgba(51,51,51,0.5);
  margin-top: 0.25rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-secondary {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--soft-gray);
  background: var(--white);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--dark-gray);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
  #app-shell.active {
    grid-template-columns: 200px 1fr 260px;
  }
  .center-panel {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  #app-shell.active {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }
  .stage-nav {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem;
  }
  .stage-nav-list {
    display: flex;
    overflow-x: auto;
    gap: 0.25rem;
  }
  .stage-nav-btn {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .stage-nav-item.active .stage-nav-btn {
    border-left-color: transparent;
    border-bottom-color: var(--yellow);
  }
  .right-panel {
    display: none;
  }
  .center-panel {
    padding: 1.5rem;
  }
  .archetype-cards,
  .fear-frontier,
  .cost-breakdown {
    grid-template-columns: 1fr;
  }
  .rc-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   Utility
   =================================== */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.2);
}

/* Selection color */
::selection {
  background: var(--yellow);
  color: var(--black);
}

/* ===================================
   Onboarding Entrance Animation
   =================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.onboarding-container {
  animation: fadeInUp 0.6s ease-out;
}

.onboarding-brand h1 {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.onboarding-form {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* ===================================
   API Key Missing Hint
   =================================== */
.api-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(242, 201, 76, 0.1);
  border: 1px solid rgba(242, 201, 76, 0.25);
  border-radius: var(--border-radius);
  font-size: 0.8125rem;
  color: var(--dark-gray);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.api-hint:hover {
  background: rgba(242, 201, 76, 0.2);
  border-color: var(--yellow);
}

.api-hint i {
  color: var(--yellow);
}

/* ===================================
   Mobile Dashboard Toggle
   =================================== */
@media (max-width: 768px) {
  .mobile-dash-toggle {
    display: flex;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--black);
    color: var(--yellow);
    border: none;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }

  .right-panel.mobile-visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99;
    padding-top: 3rem;
  }

  .right-panel.mobile-visible .mobile-close {
    display: block;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--dark-gray);
  }
}

@media (min-width: 769px) {
  .mobile-dash-toggle { display: none; }
}

/* ===================================
   Export Tab Active State  
   =================================== */
.export-tab.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ===================================
   Stage Intensity (Fears visual shift)
   =================================== */
.stage-form.fears-intensity {
  border-left: 3px solid #e74c3c;
  padding-left: 1.5rem;
  margin-left: -1.5rem;
}

/* Contradiction callout */
.contradiction-callout {
  background: rgba(231, 76, 60, 0.06);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-left: 3px solid #e74c3c;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: 1rem 0;
}

.contradiction-callout .cc-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e74c3c;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contradiction-callout .cc-text {
  font-size: 0.875rem;
  color: var(--dark-gray);
  line-height: 1.6;
}
