/* Interactive Scenario Styles
   Ported onto the Terrarium design-token system (design-tokens.css).
   Warm daylight palette: sage/mustard/terracotta on cream — no cool blues.

   Local derived shades below are mixed from the tokens with color-mix so
   every color still traces back to design-tokens.css. The few remaining
   rgba() values are neutral black drop-shadows and white overlays on the
   dark hero — deliberate one-off art, same idiom as the --shadow-* tokens. */
:root {
  --scn-tint-primary: color-mix(in srgb, var(--color-sage-green) 18%, var(--color-background-primary));
  --scn-tint-success: color-mix(in srgb, var(--color-success) 14%, var(--color-background-primary));
  --scn-tint-warning: color-mix(in srgb, var(--color-warning) 18%, var(--color-background-primary));
  --scn-success-ink: color-mix(in srgb, var(--color-success) 55%, var(--color-graphite));
  --scn-warning-ink: color-mix(in srgb, var(--color-warning) 50%, var(--color-graphite));
}

/* ========== HERO SECTION ========== */
.scenario-hero--interactive {
  background: linear-gradient(135deg, var(--color-deep-cedar) 0%, var(--color-moss-shadow) 100%);
  color: var(--color-ceramic-cream);
  padding: var(--space-3xl) 0;
}

.scenario-hero__lead {
  font-size: var(--text-body-lg);
  line-height: 1.6;
  max-width: 700px;
  margin: var(--space-lg) 0;
  opacity: 0.95;
}

/* Progress Bar */
.scenario-progress {
  margin-top: var(--space-xl);
  background: rgba(255,255,255,0.1);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.scenario-progress__text {
  font-size: var(--text-small);
  margin-bottom: var(--space-xs);
  opacity: 0.9;
}

.scenario-progress__bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.scenario-progress__fill {
  height: 100%;
  background: var(--color-mustard-gold);
  transition: width 0.5s ease;
}

.scenario-progress__count {
  font-size: var(--text-small);
  opacity: 0.8;
}

/* ========== NARRATIVE LAYOUT ========== */
.narrative-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-2xl);
  margin: var(--space-3xl) 0;
}

@media (max-width: 968px) {
  .narrative-layout {
    grid-template-columns: 1fr;
  }

  .narrative-sidebar {
    order: -1;
  }
}

/* ========== STORY SECTIONS ========== */
.narrative-section {
  margin-bottom: var(--space-3xl);
  scroll-margin-top: 80px; /* Smooth scroll offset for nav */
}

.narrative-time {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-sage-green);
}

.narrative-time__icon {
  font-size: 24px;
}

.narrative-time__text {
  font-size: var(--text-body-lg);
  font-weight: 600;
  color: var(--color-terracotta-rust);
}

.narrative-text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}

.narrative-text strong {
  font-weight: 600;
  color: var(--color-deep-cedar);
}

.narrative-text em {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ========== EMBEDDED QUESTIONS ========== */
.narrative-question {
  margin: var(--space-2xl) 0;
}

.question-card {
  background: var(--color-soft-white);
  border: 2px solid var(--color-sage-green);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.question-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.question-card__icon {
  font-size: 32px;
  flex-shrink: 0;
}

.question-card__prompt {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.question-card__context {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0 var(--space-lg);
  font-style: italic;
}

/* ========== CHOICE QUESTIONS (LEGACY - keeping for backwards compat) ========== */
.question-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: white;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-option:hover {
  border-color: var(--color-terracotta-rust);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.choice-option--selected {
  border-color: var(--color-terracotta-rust);
  background: var(--scn-tint-primary);
}

.choice-input {
  margin-top: var(--space-xs);
  flex-shrink: 0;
}

.choice-label {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.choice-description {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ========== CHOOSE YOUR OWN ADVENTURE STYLE ========== */
.cyoa-question {
  margin: var(--space-2xl) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-soft-white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-light);
}

@media (max-width: 968px) {
  .cyoa-question {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.cyoa-question-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cyoa-question-icon {
  font-size: 40px;
}

.cyoa-question-prompt {
  font-size: var(--text-body-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.3;
}

.cyoa-question-context {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 0;
}

/* Story context panel (left side) */
.cyoa-story-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cyoa-story-context {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
}

.cyoa-context-text {
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.cyoa-context-text:last-child {
  margin-bottom: 0;
}

/* Compact bold text in context */
.cyoa-context-text strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.cyoa-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Large clickable answer cards */
.cyoa-choice-card {
  display: block;
  position: relative;
  padding: 14px var(--space-md);
  background: white;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cyoa-choice-card:hover {
  border-color: var(--color-terracotta-rust);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--color-deep-cedar) 15%, transparent);
  transform: translateY(-2px);
}

.cyoa-choice-card--selected {
  border-color: var(--color-terracotta-rust);
  background: linear-gradient(135deg, var(--scn-tint-primary) 0%, var(--color-soft-white) 100%);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-deep-cedar) 20%, transparent);
}

/* Hide checkbox but keep it accessible */
.cyoa-choice-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cyoa-choice-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cyoa-choice-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cyoa-choice-emoji {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.cyoa-choice-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.cyoa-choice-description {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  padding-left: 36px;
}

/* Profile impact preview */
.cyoa-choice-impact {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: var(--space-sm) 12px;
  background: color-mix(in srgb, var(--color-deep-cedar) 6%, transparent);
  border-radius: 6px;
  margin-top: 6px;
  font-size: var(--text-xs);
  line-height: 1.4;
}

.impact-arrow {
  font-weight: 700;
  color: var(--color-terracotta-rust);
  flex-shrink: 0;
}

.impact-text {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.impact-tag {
  display: inline-block;
  margin-right: var(--space-sm);
  color: var(--color-terracotta-rust);
  font-weight: 600;
}

/* Keyboard shortcut hint */
.cyoa-choice-shortcut {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: var(--text-xs);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.cyoa-choice-shortcut kbd {
  display: inline-block;
  padding: 2px var(--space-sm);
  background: var(--color-soft-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cyoa-choice-card:hover .cyoa-choice-shortcut kbd {
  background: var(--color-sage-green);
  color: white;
  border-color: var(--color-terracotta-rust);
}

.cyoa-choice-card--selected .cyoa-choice-shortcut kbd {
  background: var(--color-sage-green);
  color: white;
  border-color: var(--color-terracotta-rust);
}

/* ========== SCALE QUESTIONS ========== */
.question-scale {
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-md);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.scale-label {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

.scale-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-ceramic-cream);
  border-radius: var(--radius-sm);
  outline: none;
}

.scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--color-sage-green);
  border-radius: 50%;
  cursor: pointer;
}

.scale-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--color-sage-green);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.scale-value {
  text-align: center;
  margin-top: var(--space-md);
  font-size: var(--text-body);
}

.scale-value__number {
  font-weight: 600;
  color: var(--color-terracotta-rust);
}

/* ========== MULTISELECT QUESTIONS ========== */
.question-multiselect {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: white;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.multiselect-option:hover {
  border-color: var(--color-sage-green);
}

.multiselect-option--selected {
  border-color: var(--color-terracotta-rust);
  background: var(--scn-tint-primary);
}

.multiselect-input {
  flex-shrink: 0;
}

.multiselect-label {
  font-size: var(--text-body);
  color: var(--color-text-primary);
}

/* ========== SAVE STATUS ========== */
.question-save-status {
  margin-top: var(--space-lg);
  text-align: center;
}

.save-status {
  font-size: var(--text-small);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}

.save-status--idle {
  color: var(--color-text-secondary);
}

.save-status--saving {
  color: var(--color-terracotta-rust);
  font-weight: 600;
}

.save-status--saved {
  color: var(--scn-success-ink);
  font-weight: 600;
}

.save-status--error {
  color: var(--color-error);
  font-weight: 600;
}

/* ========== SIDEBAR ========== */
.narrative-sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 32px;
}

.sidebar-card {
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.sidebar-card--profile {
  background: var(--color-soft-white);
  border: 2px solid var(--color-sage-green);
}

.sidebar-card__icon {
  font-size: 32px;
  margin-bottom: var(--space-sm);
}

.sidebar-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--space-md);
}

.sidebar-card__hint {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Profile Insights */
.profile-insights {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.insight-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: white;
  border-radius: 6px;
}

.insight-icon {
  font-size: var(--text-body-lg);
  flex-shrink: 0;
}

.insight-text {
  font-size: var(--text-small);
  color: var(--color-text-primary);
  line-height: 1.4;
}

/* Capability Tags */
.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.capability-tag {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--scn-tint-primary);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
}

/* ========== END CARD ========== */
.narrative-end {
  margin: var(--space-4xl) 0;
  padding: var(--space-3xl);
  background: var(--color-soft-white);
  border-radius: var(--radius-lg);
  text-align: center;
}

.end-card h2 {
  font-size: var(--text-h3);
  margin-bottom: var(--space-lg);
}

.reflection-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

@media (max-width: 768px) {
  .reflection-cards {
    grid-template-columns: 1fr;
  }
}

.end-next-steps {
  margin: var(--space-xl) 0;
}

.next-steps-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.end-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Container and responsive */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Button defaults */
.btn {
  display: inline-block;
  padding: 12px var(--space-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-sage-green);
  color: white;
}

.btn-primary:hover {
  background: var(--color-moss-grey);
}

.btn-outline {
  border: 2px solid var(--color-sage-green);
  color: var(--color-terracotta-rust);
  background: transparent;
}

.btn-outline:hover {
  background: var(--scn-tint-primary);
}

/* ========== PHASE 10 STYLES ========== */

/* Recommended Scenarios Hero */
.scenarios-recommended {
  background: linear-gradient(135deg, var(--scn-tint-primary) 0%, var(--color-soft-white) 100%);
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-2xl);
  border-bottom: 2px solid var(--color-border-light);
}

.recommended-header {
  margin-bottom: 40px;
}

.recommended-header .section-title {
  color: var(--color-deep-cedar);
  font-size: var(--text-h2);
  margin-bottom: 12px;
}

.recommended-header .section-description {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  max-width: 600px;
}

.scenarios-grid--recommended {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.scenario-card--recommended {
  position: relative;
  border: 3px solid var(--color-sage-green);
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.scenario-card--recommended:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-deep-cedar) 15%, transparent);
  transform: translateY(-4px);
}

.recommendation-badge {
  position: absolute;
  top: -16px;
  right: 20px;
  background: linear-gradient(135deg, var(--color-terracotta-rust) 0%, var(--color-mustard-gold) 100%);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 700;
  text-align: center;
  min-width: 80px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-deep-cedar) 30%, transparent);
}

.recommendation-score {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.recommendation-label {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.recommendation-reason {
  margin-top: 12px;
  padding: var(--space-sm) 12px;
  background: var(--scn-tint-warning);
  border-left: 3px solid var(--color-warning);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-terracotta-rust);
  font-weight: 500;
}

.recommendation-progress {
  margin-top: 12px;
}

.progress-bar {
  height: 6px;
  background: var(--color-border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-sage-green) 0%, var(--color-grass-green) 100%);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.scenario-completion-status {
  margin-left: var(--space-sm);
  font-size: var(--text-body-lg);
}

/* Household Context Card (Intelligent Selection Feedback) */
.household-context-card {
  background: linear-gradient(135deg, var(--scn-tint-primary) 0%, var(--color-ceramic-cream) 100%);
  border: 1px solid var(--color-wheat-linen);
  border-radius: var(--radius-lg);
  padding: var(--space-md) 20px;
  margin-bottom: var(--space-lg);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-deep-cedar) 10%, transparent);
}

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

.context-header h3 {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-terracotta-rust);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.context-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.context-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.item-label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.item-value {
  font-size: var(--text-small);
  color: var(--color-text-primary);
  font-weight: 500;
}

.item-value abbr {
  cursor: help;
  text-decoration: none;
  border-bottom: 1px dotted var(--color-sage-green);
}

/* Act-Based Navigation (Phase 10) */
.scenario-acts-container {
  max-width: 100%;
  margin: 0;
}

.act-navigation {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 2px solid var(--color-border-light);
  overflow-x: auto;
  padding-bottom: 0;
  -webkit-overflow-scrolling: touch;
}

.act-tab {
  padding: var(--space-md) 20px;
  cursor: pointer;
  border-bottom: 4px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  font-family: inherit;
}

.act-tab:hover {
  background: var(--color-soft-white);
}

.act-tab--active {
  border-bottom-color: var(--color-sage-green);
  background: var(--scn-tint-primary);
  font-weight: 600;
  color: var(--color-deep-cedar);
}

.act-tab__number {
  font-size: var(--text-xs);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.act-tab__title {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 15px;
  margin-top: 2px;
}

.act-tab__phase {
  font-size: 11px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-xs);
  font-weight: 500;
}

/* Progress Bar (Phase 10 variant) */
.progress-phase10 {
  background: color-mix(in srgb, var(--color-deep-cedar) 8%, transparent);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-sage-green);
}

.progress-phase10 .scenario-progress__count {
  font-size: var(--text-small);
  color: var(--color-terracotta-rust);
  font-weight: 500;
}

/* Keep Continue / act chrome out from under the sticky header. */
html {
  scroll-padding-top: 140px;
}

/* Act Content */
.act-content {
  opacity: 1;
  transition: opacity 0.3s ease;
  scroll-margin-top: 140px;
}

.act-navigation,
.act-tab,
.scene,
.act-footer {
  scroll-margin-top: 140px;
}

.act--hidden {
  display: none;
  opacity: 0;
}

.act-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-border-light);
}

.act-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.act-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.act-phase {
  display: inline-block;
  background: var(--color-ceramic-cream);
  color: var(--color-deep-cedar);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: capitalize;
}

.act-duration {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Scenes */
.scene {
  margin-bottom: var(--space-2xl);
  scroll-margin-top: 120px;
}

.scene--answered {
  opacity: 0.8;
}

.scene-narrative {
  background: var(--color-soft-white);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-sage-green);
  border-radius: var(--radius-md);
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text-primary);
}

.scene-narrative:empty,
.scene-narrative[hidden] {
  display: none;
}

.cyoa-choice-shortcut {
  display: none;
}

.scene-title {
  font-size: var(--text-body-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-md) 0;
}

.narrative-paragraph {
  margin-bottom: var(--space-md);
}

/* Phase 10 Choice Scene */
.phase10-choice-scene {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: start;
}

@media (max-width: 768px) {
  .phase10-choice-scene {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.question-prompt {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.question-context {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-top: 12px;
}

.cyoa-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cyoa-choice-card {
  position: relative;
  cursor: pointer;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.25s ease;
  background: white;
}

.cyoa-choice-card:hover {
  border-color: var(--color-terracotta-rust);
  background: var(--color-soft-white);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-deep-cedar) 10%, transparent);
}

.choice-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cyoa-choice-card--selected {
  border-color: var(--color-terracotta-rust);
  background: linear-gradient(135deg, var(--scn-tint-primary) 0%, var(--color-soft-white) 100%);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-deep-cedar) 20%, transparent);
}

.cyoa-choice-card label {
  display: block;
  cursor: pointer;
  user-select: none;
}

.cyoa-choice-content {
  padding: 0;
}

.cyoa-choice-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: var(--space-sm);
}

.cyoa-choice-emoji {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.cyoa-choice-label {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.cyoa-choice-description {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: var(--space-sm);
}

.cyoa-choice-impact {
  margin-top: var(--space-sm);
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.impact-signal,
.impact-archetype {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.impact-signal {
  background: var(--scn-tint-success);
  color: var(--scn-success-ink);
}

.impact-archetype {
  background: var(--color-wheat-linen);
  color: var(--color-deep-cedar);
}

.cyoa-choice-shortcut {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-light);
  font-weight: 500;
}

.cyoa-choice-shortcut kbd {
  display: inline-block;
  background: var(--color-soft-white);
  border: 1px solid var(--color-border-light);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.cyoa-hint {
  margin-top: var(--space-md);
  font-size: var(--text-small);
  color: var(--color-terracotta-rust);
  font-weight: 500;
  text-align: center;
}

/* Phase 10 Diagnostic Scene */
.phase10-diagnostic-scene {
  margin-bottom: var(--space-2xl);
}

.diagnostic-header {
  margin-bottom: var(--space-lg);
}

.diagnostic-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.diagnostic-option {
  position: relative;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all 0.25s ease;
  background: white;
}

.diagnostic-option:hover {
  border-color: var(--color-terracotta-rust);
  background: var(--color-soft-white);
}

.diagnostic-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.diagnostic-option:has(input:checked) {
  border-color: var(--color-terracotta-rust);
  background: linear-gradient(135deg, var(--scn-tint-primary) 0%, var(--color-soft-white) 100%);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-deep-cedar) 20%, transparent);
}

.diagnostic-option label {
  display: block;
  cursor: pointer;
  user-select: none;
}

.diagnostic-option-content {
  padding: 0;
}

.option-emoji {
  font-size: var(--text-h3);
  display: block;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.option-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.option-description {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 6px;
  line-height: 1.4;
}

.diagnostic-hint {
  margin-top: var(--space-md);
  font-size: var(--text-small);
  color: var(--color-terracotta-rust);
  font-weight: 500;
  text-align: center;
}

/* Question Type Badges (Single vs Multi-Select) */
.question-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--scn-tint-primary);
  border: 1px solid var(--color-wheat-linen);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  margin-bottom: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-terracotta-rust);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-icon {
  font-size: var(--text-small);
}

.badge-label {
  white-space: nowrap;
}

/* Single-Select Specific Styling */
.scene-single-select {
  border-left: 4px solid var(--color-sage-green);
  background: color-mix(in srgb, var(--color-deep-cedar) 2%, transparent);
}

.choices-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-card-single {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  transition: all 0.25s ease;
}

.choice-card-single:hover {
  border-color: var(--color-terracotta-rust);
  background: var(--color-soft-white);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-deep-cedar) 10%, transparent);
}

.choice-radio:checked + label .radio-indicator::before {
  width: 6px;
  height: 6px;
  background: var(--color-sage-green);
  border-radius: 50%;
}

.radio-indicator {
  width: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-soft-white);
  border-right: 2px solid var(--color-border-light);
  transition: all 0.25s ease;
  position: relative;
}

.radio-indicator::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-medium);
  border-radius: 50%;
  transition: all 0.25s ease;
}

.choice-radio:checked + label .radio-indicator {
  background: var(--scn-tint-primary);
  border-right-color: var(--color-terracotta-rust);
}

.choice-radio:checked + label .radio-indicator::before {
  border-color: var(--color-terracotta-rust);
}

/* Multi-Select Specific Styling */
.scene-multi-select {
  border-left: 4px solid var(--color-success);
  background: color-mix(in srgb, var(--color-success) 2%, transparent);
}

.options-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.option-card-multi {
  position: relative;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all 0.25s ease;
  background: white;
}

.option-card-multi:hover {
  border-color: var(--color-success);
  background: var(--scn-tint-success);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-success) 10%, transparent);
}

.option-card-multi:has(input:checked) {
  border-color: var(--color-success);
  background: linear-gradient(135deg, var(--scn-tint-success) 0%, var(--color-soft-white) 100%);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-success) 20%, transparent);
}

.checkbox-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-medium);
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagnostic-checkbox:checked + label .checkbox-indicator {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
}

.diagnostic-checkbox:checked + label .checkbox-indicator::after {
  content: '✓';
  font-size: var(--text-small);
  font-weight: bold;
  color: white;
}

/* Act Footer & Completion */
.act-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-top: 2px solid var(--color-border-light);
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.btn-next-act {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-body);
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  scroll-margin-top: 140px;
  background: var(--color-deep-cedar);
  color: var(--color-soft-white);
  transition: background-color 0.2s ease, opacity 0.2s ease;
  position: relative;
  z-index: 5;
}

.btn-next-act:not(.btn--ready) {
  opacity: 0.72;
}

.btn-next-act.btn--ready {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.scenario-complete[hidden] {
  display: none;
}

.scenario-complete {
  text-align: center;
  padding: var(--space-2xl);
  background: linear-gradient(135deg, var(--scn-tint-success) 0%, var(--color-soft-white) 100%);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-success);
  margin-top: var(--space-xl);
}

.scenario-complete h3 {
  font-size: var(--text-h3);
  color: var(--scn-success-ink);
  margin: 0 0 12px 0;
}

.complete-message {
  font-size: var(--text-body);
  color: var(--scn-success-ink);
  margin-bottom: var(--space-lg);
}

.archetype-summary {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  text-align: left;
}

.archetype-summary h4 {
  margin: 0 0 12px 0;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.archetypes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.archetype-item {
  padding: 12px;
  background: var(--color-soft-white);
  border-radius: 6px;
  font-size: var(--text-small);
  border-left: 3px solid var(--color-sage-green);
}

.archetype-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.archetype-strength {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

.complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

/* Save Status Indicator */
.question-save-status {
  margin-top: var(--space-sm);
  min-height: 20px;
}

.save-status {
  font-size: var(--text-xs);
  font-weight: 500;
  transition: all 0.3s ease;
}

.save-status--idle {
  color: var(--color-text-light);
}

.save-status--saving {
  color: var(--color-terracotta-rust);
  font-weight: 600;
}

.save-status--saved {
  color: var(--scn-success-ink);
  font-weight: 600;
}

.save-status--error {
  color: var(--color-error);
  font-weight: 600;
}

/* ===== EMOJI ALGEBRA RADIAL DISPLAYS ===== */

.archetype-section,
.threat-section {
  margin-top: 3rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--color-soft-white) 0%, var(--color-background-primary) 100%);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-sage-green);
}

.threat-section {
  border-left-color: var(--color-error);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.section-description {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.radial-displays-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.archetype-radar-container,
.threat-radar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Archetype Legend */
.archetype-legend,
.threat-legend {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.archetype-item,
.threat-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--color-border-light);
  transition: all 0.25s ease;
}

.archetype-item:hover,
.threat-item:hover {
  border-color: var(--color-terracotta-rust);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-deep-cedar) 10%, transparent);
}

.archetype-item.proximity-high,
.threat-item.threat-critical {
  border-color: var(--color-terracotta-rust);
  background: var(--scn-tint-primary);
}

.archetype-item.proximity-medium,
.threat-item.threat-moderate {
  border-color: var(--scn-warning-ink);
  background: var(--scn-tint-warning);
}

.archetype-item.proximity-low,
.threat-item.threat-minor {
  border-color: var(--color-border-medium);
  background: var(--color-soft-white);
}

.archetype-name,
.threat-name {
  font-weight: 600;
  font-size: var(--text-small);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  text-transform: capitalize;
}

.archetype-proximity,
.threat-level {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.proximity-bar,
.level-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border-light);
  border-radius: 3px;
  overflow: hidden;
}

.proximity-fill,
.level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-sage-green), var(--color-grass-green));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.threat-item.threat-critical .level-fill {
  background: linear-gradient(90deg, var(--color-terracotta-rust), var(--color-mustard-gold));
}

.threat-item.threat-moderate .level-fill {
  background: linear-gradient(90deg, var(--color-mustard-gold), var(--color-honey-amber));
}

.proximity-value,
.level-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-terracotta-rust);
  min-width: 40px;
  text-align: right;
}

.threat-item.threat-critical .level-value {
  color: var(--color-error);
}

.threat-item.threat-moderate .level-value {
  color: var(--scn-warning-ink);
}

/* ========== ACTION CHECKLIST SCENES ========== */
.phase10-action-scene {
  background: var(--color-background-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.action-header {
  margin-bottom: 1.5rem;
}

.action-prompt {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0.75rem 0;
}

.action-context {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.action-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-soft-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.action-item-card:hover {
  background: var(--color-ceramic-cream);
  border-color: var(--color-border-medium);
}

.action-item-card.priority-high {
  border-left: 3px solid var(--color-error);
}

.action-item-card.priority-medium {
  border-left: 3px solid var(--color-warning);
}

.action-item-card.priority-low {
  border-left: 3px solid var(--color-success);
}

.action-item-card .action-checkbox {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--color-success);
  flex-shrink: 0;
}

.action-item-card label {
  flex: 1;
  cursor: pointer;
}

.action-item-card .action-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-item-card .action-text {
  font-size: 1rem;
  color: var(--color-text-primary);
  line-height: 1.5;
  margin: 0;
}

.action-item-card .action-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  background: var(--scn-tint-warning);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-top: 0.25rem;
}

.action-item-card .tip-icon {
  flex-shrink: 0;
}

.action-item-card .action-priority {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* Completed state */
.action-item-card:has(.action-checkbox:checked) {
  background: var(--scn-tint-success);
  border-color: var(--color-success);
}

.action-item-card:has(.action-checkbox:checked) .action-text {
  text-decoration: line-through;
  color: var(--color-text-light);
}

/* Loading state */
.action-item-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.action-summary {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
  text-align: center;
}

.action-summary .summary-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.action-summary .summary-hint {
  font-size: 0.8rem;
  color: var(--color-success);
  font-weight: 500;
}
