:root {
  /* Coral Reef Palette */
  --color-reef-deep: #831843;
  --color-reef-primary: #be185d;
  --color-reef-warm: #db2777;
  --color-reef-coral: #f472b6;
  --color-reef-light: #fce7f3;
  --color-reef-pale: #fdf2f8;

  /* Ocean Accent */
  --color-ocean-deep: #0e7490;
  --color-ocean-mid: #06b6d4;
  --color-ocean-light: #67e8f9;

  /* Realm variables (mapped to reef colors) */
  --color-realm-deep: #831843;
  --color-realm-mid: #be185d;
  --color-realm-light: #db2777;
  --color-realm-pale: #fce7f3;
  --color-realm-gradient: linear-gradient(
    135deg,
    #831843 0%,
    #be185d 50%,
    #db2777 100%
  );

  /* Flow Colors (for connection badges) */
  --flow-heat: #f59e0b;
  --flow-nutrient: #10b981;
  --flow-carbon: #8b5cf6;
  --flow-energy: #06b6d4;
  --flow-water: #3b82f6;

  /* Text */
  --color-text-primary: #1c1917;
  --color-text-secondary: #57534e;
  --color-text-muted: #78716c;

  /* Background */
  --color-bg-primary: #fdf2f8;
  --color-bg-secondary: #ffffff;
  --color-border: #f9a8d4;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, sans-serif;

  /* Layout */
  --content-width: 740px;
  --section-gap: 4rem;
}

/* Dark Mode Variables */
[data-theme='dark'] {
  --color-text-primary: #f5f5f4;
  --color-text-secondary: #d6d3d1;
  --color-text-muted: #a8a29e;
  --color-bg-primary: #1c1917;
  --color-bg-secondary: #292524;
  --color-border: #44403c;
  --color-reef-pale: #292524;
  --color-reef-light: #44403c;
}

/* Theme Toggle */

/* Top Navigation */
.top-nav {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease;
}
.top-nav-content {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.top-nav-brand:hover {
  color: var(--color-reef-primary);
}
.top-nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.top-nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.top-nav-link:hover {
  color: var(--color-reef-primary);
}
.top-nav-link.active {
  color: var(--color-reef-primary);
}
@media (max-width: 600px) {
  .top-nav-links {
    gap: 1rem;
  }
  .top-nav-link {
    font-size: 0.8rem;
  }
}

/* Figure/Image Styles */
.figure {
  margin: 2rem 0;
  background: var(--color-bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
}
.figure img {
  width: 100%;
  height: auto;
  display: block;
}
.figure-caption {
  padding: 1rem 1.25rem;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
}
.figure-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-reef-primary);
  margin-bottom: 0.25rem;
}
.figure-title {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-reef-primary),
    var(--color-ocean-mid)
  );
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Header */
.guide-header {
  background: linear-gradient(
    135deg,
    var(--color-reef-deep) 0%,
    var(--color-reef-primary) 50%,
    var(--color-reef-warm) 100%
  );
  color: white;
  padding: 8rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}

.guide-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.08;
}

/* Animated coral/bubble effect */
.guide-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 15%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 18%
    );
  pointer-events: none;
}

.header-content {
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.guide-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.guide-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.guide-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  opacity: 0.9;
  max-width: 560px;
  font-style: italic;
}

/* Flow Connection Tags in Header */
.header-flows {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.flow-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.flow-tag.primary {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation */
.guide-nav {
  background: white;
  border-bottom: 1px solid #e7e5e4;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--color-reef-primary);
  border-bottom-color: var(--color-reef-primary);
}

/* Main Content */
.guide-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* Sections */
.section {
  margin-bottom: var(--section-gap);
  scroll-margin-top: 5rem;
}

.section-number {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-reef-primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.section p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

.section p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph */
.lead {
  font-size: 1.125rem;
  color: var(--color-text-primary);
  font-weight: 400;
}

/* Key concept callout */
.key-concept {
  background: linear-gradient(135deg, var(--color-reef-light) 0%, white 100%);
  border-left: 4px solid var(--color-reef-primary);
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
}

.key-concept-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-reef-primary);
  margin-bottom: 0.5rem;
}

.key-concept p {
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.key-concept p:last-child {
  margin-bottom: 0;
}

/* The Paradox Box - Special callout */
.paradox-box {
  /* background: linear-gradient(135deg, #fef3c7 0%, white 100%); */
  border: 2px solid #f59e0b;
  padding: 1.75rem;
  margin: 2rem 0;
  border-radius: 12px;
  position: relative;
}

.paradox-box::before {
  content: '?';
  position: absolute;
  top: -12px;
  left: 20px;
  background: #f59e0b;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.paradox-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.75rem;
}

.paradox-box p {
  color: var(--color-text-primary);
}

/* Flow Connection Box */
.flow-connection {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1px solid #a7f3d0;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
}

.flow-connection-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.flow-connection-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.flow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.flow-dot.heat {
  background: var(--flow-heat);
  box-shadow: 0 0 6px var(--flow-heat);
}
.flow-dot.nutrient {
  background: var(--flow-nutrient);
  box-shadow: 0 0 6px var(--flow-nutrient);
}
.flow-dot.carbon {
  background: var(--flow-carbon);
  box-shadow: 0 0 6px var(--flow-carbon);
}
.flow-dot.energy {
  background: var(--flow-energy);
  box-shadow: 0 0 6px var(--flow-energy);
}
.flow-dot.water {
  background: var(--flow-water);
  box-shadow: 0 0 6px var(--flow-water);
}

.flow-connection p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* Data Highlight Cards */
.data-highlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.data-card {
  background: white;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
}

.data-card:hover {
  border-color: var(--color-reef-coral);
  box-shadow: 0 4px 20px rgba(190, 24, 93, 0.1);
}

.data-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-reef-primary);
  margin-bottom: 0.25rem;
}

.data-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Species Cards */
.species-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.species-card {
  background: white;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.species-card:hover {
  border-color: var(--color-ocean-mid);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

.species-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.species-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.species-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-ocean-deep);
  margin-bottom: 0.5rem;
}

.species-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Cast Section - Role Groups */
.cast-group {
  margin: 2rem 0;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e7e5e4;
}

.cast-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e7e5e4;
}

.cast-icon {
  font-size: 1.5rem;
}

.cast-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.cast-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.cast-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.cast-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.cast-item-name {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 0.9rem;
}

.cast-item-role {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* Threat Box */
.threat-box {
  background: linear-gradient(135deg, #fef2f2 0%, white 100%);
  border-left: 4px solid #ef4444;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
}

.threat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.threat-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.threat-box p {
  color: var(--color-text-secondary);
}

/* Section Divider */
.section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-reef-coral),
    transparent
  );
  margin: 3rem 0;
  opacity: 0.4;
}

/* Why It Matters Box */
.why-matters {
  background: linear-gradient(
    135deg,
    var(--color-reef-light) 0%,
    #fae8ff 50%,
    #e0f2fe 100%
  );
  border: 2px solid var(--color-reef-coral);
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
}

.why-matters-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-reef-deep);
  margin-bottom: 1rem;
}

.why-matters p {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.why-matters p:last-child {
  margin-bottom: 0;
}

/* Summary Box */
.summary-box {
  background: linear-gradient(
    135deg,
    var(--color-reef-deep) 0%,
    var(--color-reef-primary) 100%
  );
  color: white;
  padding: 2rem;
  border-radius: 16px;
  margin: 2rem 0;
}

.summary-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.summary-list {
  list-style: none;
}

.summary-list li {
  padding: 0.75rem 0;
  padding-left: 1.75rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.95rem;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-reef-coral);
}

/* Flow Connection Summary Table */
.flow-summary {
  margin: 2rem 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e7e5e4;
}

.flow-summary-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-bottom: 1px solid #e7e5e4;
}

.flow-summary-row:last-child {
  border-bottom: none;
}

.flow-summary-label {
  background: #f5f5f4;
  padding: 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flow-summary-content {
  padding: 1rem;
  background: white;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Next Module */
.next-module {
  background: white;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.next-module:hover {
  border-color: var(--color-reef-coral);
  box-shadow: 0 8px 30px rgba(190, 24, 93, 0.15);
  transform: translateY(-2px);
}

.next-module-content {
  flex: 1;
}

.next-module-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.next-module-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.next-module-arrow {
  width: 48px;
  height: 48px;
  background: var(--color-reef-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-reef-primary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.next-module:hover .next-module-arrow {
  background: var(--color-reef-primary);
  color: white;
}

/* Media placeholder */
.media-placeholder {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  border-radius: 12px;
  padding: 3rem 2rem;
  margin: 2rem 0;
  text-align: center;
}

.media-placeholder-content {
  color: white;
}

.media-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.media-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.media-description {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Source note */
.source-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .guide-header {
    padding: 3rem 1.5rem 4rem;
  }

  .guide-content {
    padding: 2rem 1.5rem 4rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section {
    scroll-margin-top: 6rem; /* Increased for mobile sticky nav */
  }

  .data-highlight {
    grid-template-columns: 1fr;
  }

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

  .cast-list {
    grid-template-columns: 1fr;
  }

  .flow-summary-row {
    grid-template-columns: 1fr;
  }

  .flow-summary-label {
    border-bottom: 1px solid #e7e5e4;
  }

  .next-module {
    flex-direction: column;
    text-align: center;
  }
}

/* Interactive Elements CSS */
.interactive-break {
  margin: 3rem 0;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Pause & Predict */
.pause-predict {
  background: linear-gradient(135deg, #f0fdfa 0%, white 100%);
  border: 2px solid #14b8a6;
  border-radius: 16px;
  padding: 2rem;
}

.pause-predict-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pause-predict-icon {
  font-size: 1.5rem;
}

.pause-predict-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f766e;
}

.pause-predict-question {
  font-size: 1.05rem;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.pause-predict-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pause-predict-option {
  background: white;
  border: 2px solid #e7e5e4;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pause-predict-option:hover {
  border-color: #14b8a6;
  background: #f0fdfa;
  transform: translateX(4px);
}

.pause-predict-option.selected {
  border-color: #14b8a6;
  background: #ccfbf1;
}

.pause-predict-option.correct {
  border-color: #10b981;
  background: #d1fae5;
}

.pause-predict-option.incorrect {
  border-color: #f59e0b;
  background: #fef3c7;
  opacity: 0.6;
}

.option-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #d4d4d8;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pause-predict-option.selected .option-checkbox {
  background: #14b8a6;
  border-color: #14b8a6;
}

.pause-predict-option.correct .option-checkbox {
  background: #10b981;
  border-color: #10b981;
}

.option-checkbox::after {
  content: '✓';
  color: white;
  font-weight: bold;
  font-size: 0.85rem;
  opacity: 0;
}

.pause-predict-option.selected .option-checkbox::after,
.pause-predict-option.correct .option-checkbox::after {
  opacity: 1;
}

.pause-predict-reveal {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  display: none;
}

.pause-predict-reveal.show {
  display: block;
  animation: slideDown 0.3s ease;
}

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

.reveal-title {
  font-weight: 700;
  color: #0f766e;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reveal-text {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.reveal-continue-btn {
  background: var(--color-realm-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.reveal-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Apply It Scenario */
.apply-scenario {
  background: linear-gradient(135deg, #fef3c7 0%, white 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 2rem;
}

.apply-scenario-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.apply-scenario-icon {
  font-size: 1.5rem;
}

.apply-scenario-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #b45309;
}

.scenario-text {
  font-size: 1.05rem;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.scenario-options {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.scenario-option {
  background: white;
  border: 2px solid #e7e5e4;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.scenario-option:hover {
  border-color: #f59e0b;
  background: #fffbeb;
  transform: translateX(4px);
}

.scenario-option.selected {
  border-color: #f59e0b;
  background: #fef3c7;
}

.scenario-option.selected.excellent {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, white 100%);
  border-width: 3px;
}

.scenario-option.selected.limited {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, white 100%);
  border-width: 3px;
}

.scenario-feedback {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  display: none;
}

.scenario-feedback.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.feedback-verdict {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feedback-verdict.works {
  color: #10b981;
}
.feedback-verdict.partial {
  color: #f59e0b;
}
.feedback-verdict.nope {
  color: #ef4444;
}

.feedback-text {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Connection Challenge */
.connection-challenge {
  background: linear-gradient(135deg, #fee2e2 0%, white 100%);
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 2rem;
}

.connection-challenge-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.connection-challenge-icon {
  font-size: 1.5rem;
}

.connection-challenge-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #dc2626;
}

.challenge-text {
  font-size: 1.05rem;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.phrase-bank {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.phrase-category {
  background: white;
  border-radius: 10px;
  padding: 1rem;
}

.category-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #dc2626;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.phrase-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.phrase-btn {
  background: #fee2e2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.phrase-btn:hover {
  background: #fecaca;
  border-color: #ef4444;
  transform: translateY(-2px);
}

.phrase-btn:active {
  transform: scale(0.95);
}

.phrase-btn.used {
  opacity: 0.4;
  cursor: default;
}

.phrase-btn.used:hover {
  transform: none;
}

.answer-builder {
  background: white;
  border: 2px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  min-height: 100px;
}

.builder-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.answer-workspace {
  margin: 1.5rem 0;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.workspace-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.built-answer {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  line-height: 1.8;
  min-height: 60px;
}

.placeholder-text {
  color: #9ca3af;
  font-style: italic;
}

.built-phrase {
  display: inline-block;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.built-phrase:hover {
  background: #bbf7d0;
  transform: scale(1.05);
}

.clear-answer-btn {
  background: transparent;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #6b7280;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: all 0.2s ease;
}

.clear-answer-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.challenge-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
/* Challenge Submit Button — Light Mode */
.challenge-submit-btn {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.challenge-submit-btn.secondary {
  background: white;
  color: #ef4444;
  border: 2px solid #ef4444;
}

.challenge-submit-btn.secondary:hover {
  background: #fef2f2;
}

.challenge-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===========================
   Dark Mode Overrides
   =========================== */

[data-theme='dark'] .challenge-submit-btn {
  background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
  color: #ffffff;
}

[data-theme='dark'] .challenge-submit-btn.secondary {
  background: var(--color-bg-secondary);
  color: #f87171;
  border-color: #f87171;
}

[data-theme='dark'] .challenge-submit-btn.secondary:hover {
  background: rgba(239, 68, 68, 0.15);
}

[data-theme='dark'] .challenge-submit-btn:hover {
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.35);
}

.challenge-response {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  display: none;
}

.challenge-response.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.response-title {
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.response-text {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Quiz Section */
.quiz-section {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 2.5rem;
  margin: 3rem 0;
}

.quiz-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f3f4f6;
}

.quiz-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.quiz-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.quiz-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.quiz-questions {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quiz-question {
  background: #fafaf9;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e7e5e4;
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.question-number {
  background: var(--color-realm-mid);
  color: #ffffff;
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

[data-theme='dark'] .question-number {
  background: var(--color-realm-light);
  color: #ffffff;
}

.question-text {
  font-size: 1.05rem;
  color: var(--color-text-primary);
  font-weight: 500;
  line-height: 1.5;
  flex: 1;
}

.select-multiple-hint {
  font-size: 0.85rem;
  color: var(--color-realm-mid);
  font-weight: 600;
  font-style: italic;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.question-option {
  background: white;
  border: 2px solid #e7e5e4;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.question-option:hover {
  border-color: var(--color-realm-mid);
  background: #f8fafc;
}

.question-option.selected {
  border-color: var(--color-realm-mid);
  background: var(--color-realm-pale);
}

.question-option.correct {
  border-color: #10b981;
  background: #ecfdf5;
}

.question-option.incorrect {
  border-color: #ef4444;
  background: #fef2f2;
}

.question-option.missed {
  border-color: #f59e0b;
  background: #fffbeb;
}

.option-checkbox {
  min-width: 24px;
  height: 24px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.question-option.selected .option-checkbox {
  background: var(--color-realm-mid);
  border-color: var(--color-realm-mid);
}

.question-option.selected .option-checkbox::after {
  content: '✓';
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.question-option.correct .option-checkbox {
  background: #10b981;
  border-color: #10b981;
}

.question-option.correct .option-checkbox::after {
  content: '✓';
  color: white;
  font-weight: bold;
}

.question-option.incorrect .option-checkbox::after {
  content: '✗';
  color: #ef4444;
  font-weight: bold;
  font-size: 1.1rem;
}

.question-option.missed .option-checkbox {
  background: #fef3c7;
  border-color: #f59e0b;
}

.question-option.missed .option-checkbox::after {
  content: '!';
  color: #b45309;
  font-weight: bold;
}

.check-answer-btn {
  background: var(--color-realm-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.check-answer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.check-answer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.question-feedback {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: white;
  border-left: 4px solid #10b981;
  border-radius: 0 8px 8px 0;
  display: none;
}

.question-feedback.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.feedback-title {
  font-weight: 600;
  color: #059669;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.feedback-explanation {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.quiz-complete-btn {
  background: var(--color-realm-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  margin: 2rem auto 0;
}

.quiz-complete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .realm-header {
    padding: 3rem 1.5rem 4rem;
  }
  .realm-content {
    padding: 2rem 1.5rem 3rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .species-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .realm-specs {
    gap: 1.5rem;
  }
  .footer-nav {
    flex-direction: column;
  }
  .footer-nav-link.prev,
  .footer-nav-link.next {
    text-align: center;
  }
  .interactive-break {
    margin: 2rem 0;
  }
  .pause-predict,
  .apply-scenario,
  .connection-challenge,
  .quiz-section {
    padding: 1.5rem;
  }
  .phrase-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }
  .challenge-actions {
    flex-direction: column;
  }
  .challenge-submit-btn {
    width: 100%;
  }
}

/* Learning Objectives Section */
.objectives-section {
  /* background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%); */
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 2rem 0 3rem;
  border: 1px solid rgba(178, 49, 112, 0.1);
}

.objectives-header {
  text-align: center;
  margin-bottom: 2rem;
}

.objectives-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-reef-deep);
  margin-bottom: 0.5rem;
}

.objectives-subtitle {
  font-size: 1rem;
  color: var(--color-reef-mid);
  font-weight: 500;
}

.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.objective-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(178, 49, 112, 0.15);
  transition: all 0.3s ease;
}

.objective-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(178, 49, 112, 0.15);
  border-color: var(--color-reef-primary);
}

.objective-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.objective-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-reef-deep);
  margin-bottom: 0.5rem;
}

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

.objectives-footer {
  text-align: center;
  margin-top: 2rem;
}

.start-journey-btn {
  background: linear-gradient(
    135deg,
    var(--color-reef-primary) 0%,
    var(--color-reef-deep) 100%
  );
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(178, 49, 112, 0.3);
}

.start-journey-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(178, 49, 112, 0.4);
}

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

@media (max-width: 768px) {
  .objectives-section {
    padding: 2rem 1.5rem;
    margin: 1.5rem 0 2rem;
  }

  .objectives-title {
    font-size: 1.5rem;
  }

  .objectives-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .objective-card {
    padding: 1.25rem;
  }

  .start-journey-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

/* =====================================================
           DARK MODE OVERRIDES - Must be at end of stylesheet
           ===================================================== */

/* Interactive element text colors */
[data-theme='dark'] .pause-predict-option,
[data-theme='dark'] .scenario-option,
[data-theme='dark'] .question-option {
  color: var(--color-text-primary);
}

/* Selection states */
[data-theme='dark'] .selected {
  background: #134e4a;
  border-color: #14b8a6;
  color: #ccfbf1;
}

[data-theme='dark'] .correct {
  background: #14532d;
  border-color: #10b981;
  color: #d1fae5;
}

[data-theme='dark'] .incorrect {
  background: #451a03;
  border-color: #f59e0b;
  color: #fef3c7;
}

[data-theme='dark'] .missed {
  background: #1e3a5f;
  border-color: #3b82f6;
  color: #dbeafe;
}

/* Phrase builder */
[data-theme='dark'] .phrase-btn {
  background: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}

[data-theme='dark'] .phrase-btn:hover {
  background: #4b5563;
}

[data-theme='dark'] .phrase-btn.used {
  background: #1f2937;
  color: #6b7280;
}

[data-theme='dark'] .category-label {
  color: #f9a8d4;
}

[data-theme='dark'] .phrase-category {
  background: #292524;
}

[data-theme='dark'] .built-answer {
  background: #1f2937;
  color: #f3f4f6;
}

[data-theme='dark'] .built-phrase {
  background: #374151;
  color: #f3f4f6;
}

/* Interactive containers */
[data-theme='dark'] .pause-predict {
  background: linear-gradient(
    135deg,
    #134e4a 0%,
    var(--color-bg-secondary) 100%
  );
  border-color: #14b8a6;
}

[data-theme='dark'] .pause-predict-title {
  color: #5eead4;
}

[data-theme='dark'] .apply-scenario,
[data-theme='dark'] .scenario-box {
  background: linear-gradient(
    135deg,
    #451a03 0%,
    var(--color-bg-secondary) 100%
  );
  border-color: #f59e0b;
}

[data-theme='dark'] .apply-scenario-title,
[data-theme='dark'] .scenario-title {
  color: #fbbf24;
}

[data-theme='dark'] .connection-challenge {
  background: linear-gradient(
    135deg,
    #450a0a 0%,
    var(--color-bg-secondary) 100%
  );
  border-color: #f87171;
}

[data-theme='dark'] .connection-challenge-title {
  color: #fca5a5;
}

/* Text in interactive containers */
[data-theme='dark'] .challenge-text,
[data-theme='dark'] .scenario-text,
[data-theme='dark'] .pause-predict-question {
  color: var(--color-text-primary);
}

/* Quiz section */
[data-theme='dark'] .quiz-section,
[data-theme='dark'] .knowledge-check {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme='dark'] .quiz-title,
[data-theme='dark'] .quiz-subtitle {
  color: var(--color-text-primary);
}

[data-theme='dark'] .question-text {
  color: var(--color-text-primary);
}

/* Reveals and feedback */
[data-theme='dark'] .pause-predict-reveal,
[data-theme='dark'] .reveal-box {
  background: var(--color-bg-secondary);
}

[data-theme='dark'] .reveal-title {
  color: #5eead4;
}

[data-theme='dark'] .incorrect-reveal .reveal-title {
  color: #fbbf24;
}

[data-theme='dark'] .reveal-text {
  color: var(--color-text-secondary);
}

[data-theme='dark'] .feedback-verdict.works {
  color: #34d399;
}

[data-theme='dark'] .feedback-verdict.partial {
  color: #fbbf24;
}

[data-theme='dark'] .feedback-verdict.nope {
  color: #f87171;
}

[data-theme='dark'] .feedback-text {
  color: var(--color-text-secondary);
}

[data-theme='dark'] .scenario-feedback {
  background: var(--color-bg-secondary);
}

[data-theme='dark'] .question-feedback {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

[data-theme='dark'] .feedback-title {
  color: var(--color-text-primary);
}

[data-theme='dark'] .feedback-explanation {
  color: var(--color-text-secondary);
}

/* Key concept boxes */
[data-theme='dark'] .key-concept {
  background: linear-gradient(
    135deg,
    #831843 0%,
    var(--color-bg-secondary) 100%
  );
  border-color: #be185d;
}

[data-theme='dark'] .key-concept p {
  color: var(--color-text-secondary);
}

/* Threat boxes */
[data-theme='dark'] .threat-box {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

/* Cast groups */
[data-theme='dark'] .cast-group {
  background: var(--color-bg-secondary);
}

/* Species cards */
[data-theme='dark'] .species-card {
  background: var(--color-bg-secondary);
}

/* Footer nav */
[data-theme='dark'] .footer-nav-link {
  background: var(--color-bg-secondary);
}

[data-theme='dark'] .footer-nav-title {
  color: var(--color-text-primary);
}

/* Guide nav */
[data-theme='dark'] .guide-nav {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme='dark'] .nav-link {
  color: var(--color-text-secondary);
}

[data-theme='dark'] .nav-link:hover,
[data-theme='dark'] .nav-link.active {
  color: var(--color-reef-coral);
}

/* Interactive option text - CRITICAL for legibility */
[data-theme='dark'] .pause-predict-option,
[data-theme='dark'] .scenario-option,
[data-theme='dark'] .question-option {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

[data-theme='dark'] .pause-predict-option span,
[data-theme='dark'] .scenario-option span,
[data-theme='dark'] .question-option span {
  color: var(--color-text-primary);
}

/* Selected state - must override the white background */
[data-theme='dark'] .pause-predict-option.selected,
[data-theme='dark'] .scenario-option.selected,
[data-theme='dark'] .question-option.selected {
  background: #14b8a6;
  border-color: #0d9488;
}

[data-theme='dark'] .pause-predict-option.selected span,
[data-theme='dark'] .scenario-option.selected span,
[data-theme='dark'] .question-option.selected span {
  color: #ffffff;
}

/* Correct state */
[data-theme='dark'] .pause-predict-option.correct,
[data-theme='dark'] .scenario-option.correct,
[data-theme='dark'] .question-option.correct {
  background: #10b981;
  border-color: #059669;
}

[data-theme='dark'] .pause-predict-option.correct span,
[data-theme='dark'] .scenario-option.correct span,
[data-theme='dark'] .question-option.correct span {
  color: #ffffff;
}

/* Incorrect state */
[data-theme='dark'] .pause-predict-option.incorrect,
[data-theme='dark'] .scenario-option.incorrect,
[data-theme='dark'] .question-option.incorrect {
  background: #ef4444;
  border-color: #dc2626;
}

[data-theme='dark'] .pause-predict-option.incorrect span,
[data-theme='dark'] .scenario-option.incorrect span,
[data-theme='dark'] .question-option.incorrect span {
  color: #ffffff;
}

/* Missed state */
[data-theme='dark'] .question-option.missed {
  background: #f59e0b;
  border-color: #d97706;
}

[data-theme='dark'] .question-option.missed span {
  color: #ffffff;
}

/* Excellent/works feedback state for scenarios */
[data-theme='dark'] .scenario-option.excellent,
[data-theme='dark'] .scenario-option.works {
  background: #10b981;
  border-color: #059669;
}

[data-theme='dark'] .scenario-option.excellent span,
[data-theme='dark'] .scenario-option.works span {
  color: #ffffff;
}

/* Objective cards */
[data-theme='dark'] .objective-card {
  background: var(--color-bg-secondary);
}

[data-theme='dark'] .objective-title {
  color: var(--color-text-primary);
}

[data-theme='dark'] .objective-description {
  color: var(--color-text-secondary);
}

/* Key concept and highlight boxes */
[data-theme='dark'] .key-concept p,
[data-theme='dark'] .symbiosis-box p,
[data-theme='dark'] .bleaching-box p {
  color: #e5e7eb;
}
/* Why It Matters – Light Mode */
.why-matters {
  background: linear-gradient(
    135deg,
    var(--color-reef-light) 0%,
    #fae8ff 50%,
    #e0f2fe 100%
  );
  border: 2px solid var(--color-reef-coral);
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
}

/* Why It Matters – Dark Mode */
[data-theme='dark'] .why-matters {
  background: linear-gradient(
    135deg,
    var(--color-bg-secondary) 0%,
    #312e81 50%,
    #0e7490 100%
  );
  border-color: var(--color-reef-warm);
}
/* Data Card – Light Mode */
.data-card {
  background: var(--color-bg-secondary);
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
}

/* Data Card – Dark Mode */
[data-theme='dark'] .data-card {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

/* Quiz Question – Light Mode */
.quiz-question {
  background: #fafaf9;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e7e5e4;
}

/* Quiz Question – Dark Mode */
[data-theme='dark'] .quiz-question {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

/* Flow Summary Label – Light Mode */
.flow-summary-label {
  background: #f5f5f4;
  padding: 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Flow Summary Content – Light Mode */
.flow-summary-content {
  padding: 1rem;
  background: var(--color-bg-secondary);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* ---------- Dark Mode ---------- */
[data-theme='dark'] .flow-summary-label {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

[data-theme='dark'] .flow-summary-content {
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
}
/* Summary Box – Base (works for both modes) */
.summary-box {
  background: linear-gradient(
    135deg,
    var(--color-reef-deep) 0%,
    var(--color-reef-primary) 100%
  );
  color: #ffffff;
  padding: 2rem;
  border-radius: 16px;
  margin: 2rem 0;
}

/* Dark Mode – subtle polish (optional but safe) */
[data-theme='dark'] .summary-box {
  background: linear-gradient(
    135deg,
    var(--color-reef-primary) 0%,
    var(--color-reef-warm) 100%
  );
}

/* Objectives Section – Light Mode */
.objectives-section {
  /* background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%); */
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 2rem 0 3rem;
  border: 1px solid rgba(178, 49, 112, 0.1);
}

/* Objectives Section – Dark Mode */
[data-theme='dark'] .objectives-section {
  border-color: var(--color-border);
}
/* Next Module – Light Mode */
.next-module {
  background: var(--color-bg-secondary);
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

/* Next Module – Dark Mode */
[data-theme='dark'] .next-module {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}
/* Flow Connection – Light Mode */
.flow-connection {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1px solid #a7f3d0;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
}

/* Flow Connection – Dark Mode */
[data-theme='dark'] .flow-connection {
  background: linear-gradient(
    135deg,
    var(--color-bg-secondary) 0%,
    #134e4a 100%
  );
  border-color: var(--color-border);
}

/* Answer Workspace – Light Mode */
.answer-workspace {
  margin: 1.5rem 0;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
}

/* Answer Workspace – Dark Mode */
[data-theme='dark'] .answer-workspace {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}
.scenario-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* Challenge Response – Light Mode */
.challenge-response {
  margin-top: 1.25rem;
  display: none;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
}

/* Challenge Response – Dark Mode */
[data-theme='dark'] .challenge-response {
  background: var(--color-bg-secondary);
}
