/* =================================================================
   FRAMEWORK-THEATER.CSS
   Dedicated styles for framework.html scrollytelling.
   Four theaters: Unboxing, States, Lanes, Operating Loop.
   All Safari-compatible: -webkit- prefixes, no flex gap, explicit colors.
   ================================================================= */

/* ========== FRAMEWORK HERO ========== */

.fw-hero {
  background-color: #1a5c57;
  background: linear-gradient(135deg, #1a5c57 0%, #0f3d39 100%);
  color: white;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.fw-hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.fw-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: white;
}

.fw-hero-master {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-style: italic;
  color: #d4a853;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.fw-hero-sub {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
  margin: 0;
}

/* ========== CHAPTER LAYOUT ========== */

.fw-chapter {
  padding: 4rem 0;
}

.fw-chapter .container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

.fw-chapter-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1a5c57;
  margin-bottom: 0.5rem;
}

.fw-chapter-label-light {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}

.fw-chapter-answer {
  font-size: 1rem;
  color: #666;
  margin: 0.25rem 0 2rem;
  max-width: 620px;
}

.fw-chapter-answer-light {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  margin: 0.25rem auto 2rem;
  max-width: 620px;
}

/* ========== QUESTION BLOCKS ========== */
/* Visible question blocks for scrollytelling sections */

.fw-question-block {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  text-align: center;
}

.fw-question-block-light {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  text-align: center;
}

.fw-visible-question {
  font-size: 1.2rem;
  font-style: italic;
  color: #d4a853 !important;
  text-align: center;
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}

.fw-visible-question-dark {
  font-size: 1.2rem;
  font-style: italic;
  color: #d4a853;
  text-align: center;
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}

.fw-transition {
  font-size: 0.95rem;
  font-style: italic;
  color: #888;
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8e2d8;
}


/* ========== SIX PRIMITIVES GRID ========== */

.fw-primitives-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 2rem -0.75rem 0;
}

.fw-primitive {
  -webkit-flex: 1 1 320px;
  flex: 1 1 320px;
  margin: 0.75rem;
  padding: 1.5rem;
  background: #faf7f2;
  border-radius: 10px;
  border-left: 4px solid #1a5c57;
}

.fw-primitive h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a5c57;
  margin: 0 0 0.75rem;
}

.fw-primitive p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 0.75rem;
  color: #444;
}

.fw-primitive-omega {
  font-size: 0.85rem !important;
  font-style: italic;
  color: #8a6914 !important;
  padding-top: 0.5rem;
  border-top: 1px solid #e8e2d8;
}


/* =================================================================
   UNBOXING THEATER (Chapter 2)
   ================================================================= */

.fw-unboxing-theater {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  position: relative;
}

.fw-unbox-card-column {
  -webkit-flex: 0 0 340px;
  flex: 0 0 340px;
  position: -webkit-sticky;
  position: sticky;
  top: 60px;
  height: -webkit-fit-content;
  height: fit-content;
  max-height: calc(100vh - 80px);
  z-index: 10;
}

.fw-unbox-narrative-column {
  -webkit-flex: 1;
  flex: 1;
  padding-left: 3rem;
  min-height: 100vh;
}

.fw-unbox-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.5s ease;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

.fw-unbox-card.is-ghost { opacity: 0.5; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.fw-unbox-card.is-building { opacity: 0.8; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.fw-unbox-card.is-review { opacity: 1; box-shadow: 0 4px 20px rgba(0,0,0,0.15); border: 2px solid #d4a853; }
.fw-unbox-card.is-active { opacity: 1; box-shadow: 0 6px 24px rgba(26,92,87,0.25); border: 2px solid #1a5c57; }

.fw-unbox-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eee;
  margin-bottom: 0.35rem;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.fw-unbox-header > * + * { margin-left: 0.75rem; }

.fw-unbox-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.5s ease;
  background: #e0e0e0;
  color: #757575;
}

.fw-unbox-chip.is-named { background: #e3f2fd; color: #1565c0; }
.fw-unbox-chip.is-scoped { background: #fff3e0; color: #e65100; }
.fw-unbox-chip.is-signal { background: #e8f5e9; color: #2e7d32; }
.fw-unbox-chip.is-review-ready { background: #fce4ec; color: #ad1457; }
.fw-unbox-chip.is-pilot-active { background: #1a5c57; color: white; }

.fw-unbox-title { font-size: 0.88rem; font-weight: 700; color: #333; }

.fw-unbox-progress { height: 4px; background: #eee; border-radius: 2px; margin-bottom: 0.5rem; overflow: hidden; -webkit-flex-shrink: 0; flex-shrink: 0; }
.fw-unbox-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #1a5c57, #d4a853); border-radius: 2px; transition: width 0.6s ease; }

/* Scrollable field area */
.fw-unbox-fields-scroll {
  -webkit-flex: 1;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.fw-unbox-field {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.4s ease;
  opacity: 0.3;
}

.fw-unbox-field-check {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  border: 2px solid #ddd;
  margin-right: 0.5rem;
  margin-top: 0.15rem;
  transition: all 0.4s ease;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.fw-unbox-field.is-revealed .fw-unbox-field-check {
  background: #1a5c57;
  border-color: #1a5c57;
}

.fw-unbox-field-content {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.fw-unbox-field .field-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #aaa; margin-bottom: 0.1rem; }
.fw-unbox-field .field-value { font-size: 0.78rem; color: #999; transition: all 0.4s ease; line-height: 1.4; }
.fw-unbox-field .field-value.fw-ghost { color: #ccc; font-style: italic; }
.fw-unbox-field.is-revealed { opacity: 1; }
.fw-unbox-field.is-revealed .field-label { color: #666; }
.fw-unbox-field.is-revealed .field-value { color: #333; font-style: normal; }
.fw-unbox-field.is-highlighted { opacity: 1; background: rgba(26,92,87,0.06); border-radius: 6px; padding: 0.35rem 0.5rem; margin: 0.1rem -0.5rem; }
.fw-unbox-field.is-highlighted .field-label { color: #1a5c57; }

/* Bottom footer with duplicate status */
.fw-unbox-footer {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding-top: 0.5rem;
  margin-top: 0.35rem;
  border-top: 2px solid #eee;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  transition: border-color 0.5s ease;
}

.fw-unbox-card.is-review .fw-unbox-footer { border-top-color: #d4a853; }
.fw-unbox-card.is-active .fw-unbox-footer { border-top-color: #1a5c57; }

.fw-unbox-footer-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.5s ease;
  background: #e0e0e0;
  color: #757575;
}

.fw-unbox-footer-chip.is-named { background: #e3f2fd; color: #1565c0; }
.fw-unbox-footer-chip.is-scoped { background: #fff3e0; color: #e65100; }
.fw-unbox-footer-chip.is-signal { background: #e8f5e9; color: #2e7d32; }
.fw-unbox-footer-chip.is-review-ready { background: #fce4ec; color: #ad1457; }
.fw-unbox-footer-chip.is-pilot-active { background: #1a5c57; color: white; }

.fw-unbox-footer-count {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  transition: color 0.4s ease;
}

.fw-unbox-step {
  min-height: 65vh;
  padding: 2rem 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}
.fw-unbox-step:first-child { padding-top: 4rem; }
.fw-unbox-step:last-child { min-height: 50vh; }

.fw-unbox-step-title { font-size: 1.25rem; font-weight: 700; color: white; margin: 0 0 1rem; }
.fw-unbox-step p { font-size: 0.95rem; line-height: 1.75; color: rgba(255,255,255,0.88); margin: 0 0 1rem; }
.fw-step-num { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; background: rgba(255,255,255,0.15); color: white; border-radius: 50%; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.75rem; }
.fw-step-hint { font-style: italic; color: rgba(255,255,255,0.5) !important; font-size: 0.85rem !important; }


/* =================================================================
   STATES THEATER (Chapter 3)
   Card state transitions — Spark → Draft → Active Pilot.
   ================================================================= */

.fw-states-theater {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  position: relative;
}

.fw-states-visual-column {
  -webkit-flex: 0 0 300px;
  flex: 0 0 300px;
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  height: -webkit-fit-content;
  height: fit-content;
  z-index: 10;
}

.fw-states-narrative-column {
  -webkit-flex: 1;
  flex: 1;
  padding-left: 3rem;
  min-height: 80vh;
}

.fw-states-visual {
  background: #faf7f2;
  border: 2px solid #e8e2d8;
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.5s ease;
}

.fw-states-visual.is-spark { border-color: #ffb74d; }
.fw-states-visual.is-draft { border-color: #42a5f5; }
.fw-states-visual.is-active-state { border-color: #66bb6a; background: #f5faf5; }

.fw-states-card-mini {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8e2d8;
}

.fw-states-card-mini > * + * { margin-left: 0.65rem; }

.fw-states-mini-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.5s ease;
  background: #fff3e0;
  color: #e65100;
}

.fw-states-mini-chip.is-spark { background: #fff3e0; color: #e65100; }
.fw-states-mini-chip.is-draft { background: #e3f2fd; color: #1565c0; }
.fw-states-mini-chip.is-active-pilot { background: #e8f5e9; color: #2e7d32; }

.fw-states-mini-title { font-size: 0.82rem; font-weight: 600; color: #444; }

.fw-states-checks { margin-bottom: 0.75rem; }

.fw-states-check {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 0.3rem 0;
  transition: opacity 0.4s ease;
  opacity: 0.35;
}

.fw-states-check > * + * { margin-left: 0.5rem; }

.fw-states-check.is-met { opacity: 1; }

.fw-check-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  transition: all 0.4s ease;
}

/* Default met color (fallback) */
.fw-states-check.is-met .fw-check-dot {
  background: #1a5c57;
  border-color: #1a5c57;
}

/* Stage-specific dot colors */
.fw-states-check.is-met.dot-spark .fw-check-dot {
  background: #e65100;
  border-color: #e65100;
}

.fw-states-check.is-met.dot-draft .fw-check-dot {
  background: #1565c0;
  border-color: #1565c0;
}

.fw-states-check.is-met.dot-active .fw-check-dot {
  background: #2e7d32;
  border-color: #2e7d32;
}

.fw-check-label {
  font-size: 0.75rem;
  color: #888;
  transition: color 0.4s ease;
}

.fw-states-check.is-met .fw-check-label { color: #333; }

.fw-states-progress-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e8e2d8;
  transition: color 0.4s ease;
}

/* State badges in narrative */
.fw-state-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.spark-badge { background: #fff3e0; color: #e65100; }
.draft-badge { background: #e3f2fd; color: #1565c0; }
.active-badge { background: #e8f5e9; color: #2e7d32; }

.fw-states-step {
  min-height: 60vh;
  padding: 2rem 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}
.fw-states-step:first-child { padding-top: 4rem; }
.fw-states-step:last-child { min-height: 50vh; }
.fw-states-step h3 { font-size: 1.25rem; font-weight: 700; color: #1a2a2a; margin: 0 0 1rem; }
.fw-states-step p { font-size: 0.95rem; line-height: 1.75; color: #444; margin: 0 0 1rem; }


/* =================================================================
   LANES THEATER (Chapter 4)
   ================================================================= */

.fw-lanes-theater {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
}

.fw-lanes-card-column {
  -webkit-flex: 0 0 340px;
  flex: 0 0 340px;
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  height: -webkit-fit-content;
  height: fit-content;
  z-index: 10;
}

.fw-lanes-narrative-column {
  -webkit-flex: 1;
  flex: 1;
  padding-left: 3rem;
  min-height: 100vh;
}

.fw-lanes-card { background: #1a3d3a; border-radius: 12px; padding: 1.25rem; box-shadow: 0 4px 20px rgba(0,0,0,0.25); }

.fw-lanes-card-header { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem; }
.fw-lanes-card-header > * + * { margin-left: 0.75rem; }

.fw-lanes-chip { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; background: #d4a853; color: #1a3d3a; }
.fw-lanes-title { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

.fw-lane-slot {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.5s ease;
  background: rgba(255,255,255,0.04);
  opacity: 0.4;
}
.fw-lane-slot.is-active { opacity: 1; background: rgba(255,255,255,0.1); }
.fw-lane-slot.is-assessed { opacity: 1; background: rgba(212,168,83,0.12); border-left: 3px solid #d4a853; }

.fw-lane-marker { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; text-align: center; transition: all 0.5s ease; white-space: nowrap; -webkit-align-self: flex-start; align-self: flex-start; margin-bottom: 0.3rem; }
.fw-lane-marker.build { background: rgba(26,92,87,0.3); color: rgba(255,255,255,0.5); }
.fw-lane-marker.safety { background: rgba(198,40,40,0.3); color: rgba(255,255,255,0.5); }
.fw-lane-marker.resources { background: rgba(212,168,83,0.3); color: rgba(255,255,255,0.5); }
.fw-lane-marker.chain { background: rgba(66,165,245,0.3); color: rgba(255,255,255,0.5); }

.fw-lane-slot.is-active .fw-lane-marker.build, .fw-lane-slot.is-assessed .fw-lane-marker.build { background: #1a5c57; color: white; }
.fw-lane-slot.is-active .fw-lane-marker.safety, .fw-lane-slot.is-assessed .fw-lane-marker.safety { background: #c62828; color: white; }
.fw-lane-slot.is-active .fw-lane-marker.resources, .fw-lane-slot.is-assessed .fw-lane-marker.resources { background: #d4a853; color: #1a3d3a; }
.fw-lane-slot.is-active .fw-lane-marker.chain, .fw-lane-slot.is-assessed .fw-lane-marker.chain { background: #42a5f5; color: white; }

.fw-lane-status { font-size: 0.72rem; color: rgba(255,255,255,0.4); transition: color 0.5s ease; line-height: 1.4; }
.fw-lane-slot.is-active .fw-lane-status, .fw-lane-slot.is-assessed .fw-lane-status { color: rgba(255,255,255,0.8); }

.fw-lanes-activation { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; }
.fw-lanes-activation span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); transition: color 0.5s ease; }

.fw-lane-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.fw-lane-badge.build { background: #e8f5f3; color: #1a5c57; }
.fw-lane-badge.safety { background: #fce4ec; color: #c62828; }
.fw-lane-badge.resources { background: #fff8e1; color: #8a6914; }
.fw-lane-badge.chain { background: #e3f2fd; color: #1565c0; }

.fw-lanes-step { min-height: 65vh; padding: 2rem 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; }
.fw-lanes-step:first-child { padding-top: 4rem; }
.fw-lanes-step:last-child { min-height: 50vh; }
.fw-lanes-step h3 { font-size: 1.25rem; font-weight: 700; color: white; margin: 0 0 1rem; }
.fw-lanes-step p { font-size: 0.95rem; line-height: 1.75; color: rgba(255,255,255,0.88); margin: 0 0 1rem; }


/* =================================================================
   TWO RAMPS (Chapter 5)
   ================================================================= */

.fw-ramps-split { display: -webkit-flex; display: flex; -webkit-flex-direction: row; flex-direction: row; margin: 2rem -0.75rem 0; }
.fw-ramp { -webkit-flex: 1; flex: 1; margin: 0.75rem; padding: 1.75rem; border-radius: 12px; }
.fw-ramp-energy { background: #fff8e1; border-left: 4px solid #d4a853; }
.fw-ramp-receipts { background: #e8f5f3; border-left: 4px solid #1a5c57; }
.fw-ramp h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.75rem; color: #333; }
.fw-ramp-when { font-size: 0.88rem; color: #555; margin-bottom: 1rem; }

.fw-ramp-steps { margin: 1rem 0; }
.fw-ramp-step { display: -webkit-flex; display: flex; -webkit-align-items: flex-start; align-items: flex-start; margin-bottom: 0.75rem; font-size: 0.88rem; line-height: 1.6; color: #444; }
.fw-ramp-step span { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; border-radius: 50%; background: rgba(0,0,0,0.08); font-size: 0.75rem; font-weight: 700; color: #666; margin-right: 0.75rem; margin-top: 0.1rem; }
.fw-ramp-omega { font-size: 0.85rem; font-style: italic; color: #8a6914; padding-top: 0.75rem; border-top: 1px solid rgba(0,0,0,0.08); margin-top: 0.5rem; margin-bottom: 0; }

@media (max-width: 700px) {
  .fw-ramps-split { -webkit-flex-direction: column; flex-direction: column; }
  .fw-ramp { margin: 0.5rem 0; }
}


/* =================================================================
   OPERATING LOOP THEATER (Chapter 6)
   ================================================================= */

.fw-loop-theater { display: -webkit-flex; display: flex; -webkit-flex-direction: row; flex-direction: row; max-width: 1100px; margin: 0 auto; padding: 0 2rem 4rem; position: relative; }
.fw-loop-visual-column { -webkit-flex: 0 0 300px; flex: 0 0 300px; position: -webkit-sticky; position: sticky; top: 100px; height: -webkit-fit-content; height: fit-content; z-index: 10; }
.fw-loop-narrative-column { -webkit-flex: 1; flex: 1; padding-left: 3rem; min-height: 100vh; }

.fw-loop-visual { background: #1a3d3a; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.fw-loop-card-mini { background: rgba(255,255,255,0.08); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; }
.fw-loop-mini-title { display: block; font-size: 0.8rem; font-weight: 700; color: white; margin-bottom: 0.25rem; }
.fw-loop-mini-signal { display: block; font-size: 0.75rem; color: #d4a853; }

.fw-loop-ring { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.fw-loop-stage { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 0.6rem 0.75rem; border-radius: 8px; margin-bottom: 0.35rem; transition: all 0.5s ease; opacity: 0.35; background: rgba(255,255,255,0.03); }
.fw-loop-stage > * + * { margin-left: 0.65rem; }
.fw-loop-stage.is-active { opacity: 1; background: rgba(212,168,83,0.15); border-left: 3px solid #d4a853; }
.fw-loop-stage.is-done { opacity: 0.7; background: rgba(255,255,255,0.06); border-left: 3px solid rgba(255,255,255,0.2); }

.fw-loop-stage-num { width: 28px; height: 28px; min-width: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); font-size: 0.75rem; font-weight: 700; transition: all 0.5s ease; }
.fw-loop-stage.is-active .fw-loop-stage-num { background: #d4a853; color: #1a3d3a; }
.fw-loop-stage.is-done .fw-loop-stage-num { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.6); }

.fw-loop-stage-name { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.4); transition: color 0.5s ease; }
.fw-loop-stage.is-active .fw-loop-stage-name { color: white; }
.fw-loop-stage.is-done .fw-loop-stage-name { color: rgba(255,255,255,0.6); }

.fw-loop-status { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.75rem; text-align: center; color: rgba(255,255,255,0.4); transition: color 0.5s ease; }

.fw-loop-step { min-height: 65vh; padding: 2rem 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; }
.fw-loop-step:first-child { padding-top: 4rem; }
.fw-loop-step:last-child { min-height: 50vh; }
.fw-loop-step h3 { font-size: 1.25rem; font-weight: 700; color: white; margin: 0 0 1rem; }
.fw-loop-step p { font-size: 0.95rem; line-height: 1.75; color: rgba(255,255,255,0.88); margin: 0 0 1rem; }
.fw-loop-step-num { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; background: rgba(255,255,255,0.15); color: white; border-radius: 50%; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.75rem; }
.fw-loop-freq { font-size: 0.8rem !important; font-style: italic; color: rgba(255,255,255,0.5) !important; }


/* =================================================================
   READINESS CHECKLIST (Chapter 7)
   ================================================================= */

.fw-checklist { margin: 1.5rem 0; }
.fw-check-item { display: -webkit-flex; display: flex; -webkit-align-items: flex-start; align-items: flex-start; padding: 1rem; border-radius: 8px; margin-bottom: 0.5rem; background: #faf7f2; transition: background 0.3s ease; }
.fw-check-item > * + * { margin-left: 0.75rem; }
.fw-check-item:hover { background: #f5f0e8; }
.fw-check-box { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; border-radius: 50%; background: #1a5c57; color: white; font-size: 0.8rem; font-weight: 700; margin-top: 0.1rem; }
.fw-check-text { font-size: 0.9rem; line-height: 1.6; color: #444; }
.fw-check-text strong { color: #1a2a2a; }
.fw-check-text span { display: block; margin-top: 0.25rem; font-size: 0.85rem; color: #777; }

/* ========== CLOSING SCORECARD ========== */

.fw-scorecard {
  margin-top: 3rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, #1a5c57 0%, #0f3d39 100%);
  border-radius: 16px;
  text-align: center;
  color: white;
}

.fw-scorecard-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: white !important;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.fw-scorecard-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65) !important;
  margin: 0 0 2rem;
}

.fw-scorecard-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-justify-content: center;
  justify-content: center;
  margin: 0 -0.5rem;
}

.fw-scorecard-item {
  -webkit-flex: 0 0 calc(33.333% - 1rem);
  flex: 0 0 calc(33.333% - 1rem);
  margin: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s ease;
}

.fw-scorecard-item:hover {
  background: rgba(255,255,255,0.12);
}

.fw-scorecard-highlight {
  background: rgba(212,168,83,0.18) !important;
  border-color: rgba(212,168,83,0.4) !important;
}

.fw-scorecard-highlight:hover {
  background: rgba(212,168,83,0.25) !important;
}

.fw-scorecard-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #d4a853;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.fw-scorecard-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
  margin-bottom: 0.35rem;
}

.fw-scorecard-desc {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

.fw-scorecard-close {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75) !important;
  line-height: 1.7;
  margin: 2rem auto 0;
  max-width: 600px;
}

@media (max-width: 600px) {
  .fw-scorecard-item {
    -webkit-flex: 0 0 calc(50% - 1rem);
    flex: 0 0 calc(50% - 1rem);
  }
  .fw-scorecard { padding: 1.5rem; }
}


/* =================================================================
   RESPONSIVE — MOBILE STACKING
   ================================================================= */

@media (max-width: 800px) {
  .fw-unboxing-theater, .fw-states-theater, .fw-lanes-theater, .fw-loop-theater {
    -webkit-flex-direction: column;
    flex-direction: column;
    padding: 0 1.5rem 3rem;
  }

  .fw-unbox-card-column, .fw-states-visual-column, .fw-lanes-card-column, .fw-loop-visual-column {
    -webkit-flex: none;
    flex: none;
    position: relative;
    top: auto;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
  }

  .fw-unbox-narrative-column, .fw-states-narrative-column, .fw-lanes-narrative-column, .fw-loop-narrative-column {
    padding-left: 0;
    min-height: auto;
  }

  .fw-unbox-step, .fw-states-step, .fw-lanes-step, .fw-loop-step {
    min-height: auto;
    padding: 1.5rem 0;
  }
}


/* =================================================================
   SAFARI BULLETPROOF OVERRIDES
   ================================================================= */

#fw-card { background-color: #1a5c57 !important; }
#fw-lanes { background-color: #1a5c57 !important; }
#fw-loop { background-color: #1a5c57 !important; }

#fw-card h2, #fw-card h3,
#fw-lanes h2, #fw-lanes h3,
#fw-loop h2, #fw-loop h3 { color: white !important; }

#fw-card p, #fw-lanes p, #fw-loop p { color: rgba(255,255,255,0.88) !important; }

#fw-card .fw-visible-question,
#fw-lanes .fw-visible-question,
#fw-loop .fw-visible-question { color: #d4a853 !important; }

#fw-card .fw-chapter-answer-light,
#fw-lanes .fw-chapter-answer-light,
#fw-loop .fw-chapter-answer-light { color: rgba(255,255,255,0.7) !important; }

/* ========== INLINE CODE STYLING ========== */
/* Gold-tinted code blocks that work on both light and dark backgrounds */

.fw-chapter code,
.fw-primitive code,
.fw-ramp code,
.fw-states-step code,
.fw-check-text code {
  background-color: #f5ead4 !important;
  color: #6b4c10 !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-size: 0.88em !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  white-space: nowrap !important;
}

/* Dark-section code (unboxing, lanes, loop theaters) */
#fw-card code,
#fw-lanes code,
#fw-loop code,
.fw-unbox-step code,
.fw-lanes-step code,
.fw-loop-step code {
  background-color: #d4a853 !important;
  color: #1a2a2a !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-size: 0.88em !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  white-space: nowrap !important;
}

/* ========== DAY-7 INCIDENT EMPHASIS ========== */
/* Visual emphasis for the signature moment in the operating loop */

.fw-loop-incident {
  border-left: 4px solid #c62828 !important;
  background: rgba(198, 40, 40, 0.12) !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  margin: 1rem 0 !important;
}

.fw-loop-incident h3 {
  color: #ff8a80 !important;
}

.fw-loop-incident-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #c62828;
  color: white;
  margin-bottom: 0.75rem;
}

.footer h4, .footer h5 { color: white !important; }
.footer p, .footer a, .footer li { color: rgba(255,255,255,0.8) !important; }
.footer a:hover { color: white !important; }
.footer-bottom p { color: rgba(255,255,255,0.6) !important; }
