#followup-open { grid-column: 1 / -1; justify-self: start; }
#followup { max-height: 85vh; overflow: auto; }
.followup-choices { border: 0; margin: 1rem 0; padding: 0; min-width: 0; }
.system-marker { transform-box: fill-box; transform-origin: center; }
#start-button { transform-origin: left bottom; position: relative; z-index: 2; }
#next-button.map-zoom { transform-origin: right bottom; position: relative; z-index: 2; }
.intro .signals li { transform-origin: left center; position: relative; background: #11182d; }
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) #scene-1:not([hidden]) .system-marker {
    animation: ef-marker 5s ease-in-out infinite;
  }
  body:not(.motion-off) #scene-1:not([hidden]) .signals li {
    animation: ef-signal 9s ease-in-out infinite;
  }
  body:not(.motion-off) #scene-1:not([hidden]) #start-button,
  body:not(.motion-off) #next-button.map-zoom {
    animation: ef-button 3s ease-in-out;
  }
  body:not(.motion-off) #system-art svg > g:has(> .system-marker):nth-last-child(4) .system-marker { animation-delay: 1s; }
  body:not(.motion-off) #system-art svg > g:has(> .system-marker):nth-last-child(3) .system-marker { animation-delay: 2s; }
  body:not(.motion-off) #system-art svg > g:has(> .system-marker):nth-last-child(2) .system-marker { animation-delay: 3s; }
  body:not(.motion-off) #system-art svg > g:has(> .system-marker):last-child .system-marker { animation-delay: 4s; }
  body:not(.motion-off) #scene-1 .signals li:nth-child(2) { animation-delay: 3s; }
  body:not(.motion-off) #scene-1 .signals li:nth-child(3) { animation-delay: 6s; }
}
@keyframes ef-marker {
  0%, 20%, 100% { scale: 1; }
  10% { scale: 2; }
}
@keyframes ef-signal {
  0%, 33.333%, 100% { scale: 1; z-index: 0; }
  16.667% { scale: 1.7; z-index: 1; }
}
@keyframes ef-button {
  0%, 100% { scale: 1; }
  50% { scale: 2; }
}
#followup-insight {
  margin: .5rem 0;
  padding: .65rem .9rem;
  border-left: 3px solid var(--cyan);
  background: #191b36;
  border-radius: 0 9px 9px 0;
}
#followup-insight strong { color: var(--cyan); display: block; }
.diagnostic-choices { display: flex; flex-wrap: wrap; gap: .6rem; }
#scene-6 .diagnostic-choices .button,
#diagnostic-video-toggle {
  min-height: 52px;
  padding: .65rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  white-space: normal;
  text-align: center;
}
#diagnostic-interview { border-color: #a99af6; }
#diagnostic-video-toggle { border-color: var(--cyan); }
@media (max-width: 760px) {
  #scene-6 .diagnostic-stage { grid-template-rows: minmax(150px, 1fr) auto; }
  .diagnostic-choices .button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) .scene:not([hidden]) :is(.scene-heading h2, .diagnostic-copy h2, .story-ending h2) {
    animation: experience-heading 650ms ease-out both;
  }
  body:not(.motion-off) #scene-2:not([hidden]) .question:not([hidden]),
  body:not(.motion-off) #scene-6:not([hidden]) .diagnostic-choices,
  body:not(.motion-off) #scene-6:not([hidden]) #diagnostic-video-toggle {
    animation: experience-block 460ms ease-out both;
  }
  body:not(.motion-off) #scene-2 .question:nth-child(2) { animation-delay: 85ms; }
  body:not(.motion-off) .story-scene:not(.story-motion-off) .story-card :is(h2, .story-indicators) {
    animation: experience-heading 540ms ease-out both;
  }
}
@keyframes experience-heading {
  0% { opacity: .2; transform: translateY(10px) scale(.97); }
  55% { opacity: 1; transform: translateY(-2px) scale(1.035); text-shadow: 0 0 20px #8f80ffb3; }
  100% { transform: none; }
}
@keyframes experience-block {
  from { opacity: .25; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
#scene-3 .story-stage { grid-template-rows: auto auto minmax(min-content, 1fr); }
#scene-3 .story-visual { min-height: 150px; }
#scene-3 .story-stage, #scene-6 .diagnostic-stage { overflow: auto; }
@media (max-width: 760px) {
  #scene-3 .story-layout { grid-template-rows: minmax(150px, 1fr) auto; }
}
@media (max-height: 440px) and (orientation: landscape) {
  #scene-3 .story-tools { position: static; width: auto; display: flex; }
  #scene-3 .story-layout { grid-template-rows: minmax(min-content, 1fr); }
  #scene-3 .story-visual { padding-top: 0; }
  #scene-6 .diagnostic-stage { grid-template-rows: minmax(min-content, 1fr); }
}
.story-choice-row { display: flex; gap: 5px; min-width: 0; }
.story-choice-row .story-choice { flex: 1; min-width: 0; }
.story-choice-row .story-choice-info { flex: none; min-width: 44px; padding: 0; font-size: 1.15rem; }
.story-prompt { color: var(--cyan); font-weight: 700; width: fit-content; margin-top: .6rem; }
.story-actions { flex-wrap: wrap; }
.story-prompt, .story-actions .button { transform-origin: left center; }
.ef-graph-node { transform-box: fill-box; transform-origin: center; }
.ef-continue-four, .ef-continue-five { transform-origin: right bottom; position: relative; z-index: 2; }
@media (max-height: 440px) and (orientation: landscape) {
  #scene-3 .story-phase-2 .story-choices { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) #scene-3:not(.story-motion-off) .ef-story-short {
    --ef-peak: 2;
    animation: ef-pulse 1s ease-in-out;
  }
  body:not(.motion-off) #scene-3:not(.story-motion-off) .ef-story-alternative {
    animation: ef-pulse 2s ease-in-out infinite;
  }
  body:not(.motion-off) #scene-3:not(.story-motion-off) .ef-story-author {
    animation: ef-pulse 3s ease-in-out infinite;
  }
  body:not(.motion-off) .ef-continue-four,
  body:not(.motion-off) .ef-continue-five { animation: ef-pulse 5s ease-in-out; }
  body:not(.motion-off) #scene-4:not([hidden]) .ef-graph-node {
    animation: ef-four-nodes 4s ease-in-out var(--ef-delay) infinite;
  }
  body:not(.motion-off) #scene-6:not([hidden]) .ef-graph-node {
    animation: ef-six-nodes 6s ease-in-out var(--ef-delay) infinite;
  }
  body:not(.motion-off) #scene-6:not([hidden]) :is(.diagnostic-beam, .diagnostic-wave) {
    animation-iteration-count: infinite;
  }
  body:not(.motion-off) #scene-6:not([hidden]) :is(#diagnostic-video-toggle, #diagnostic-interview) {
    animation: ef-pulse 3s ease-in-out;
  }
  body:not(.motion-off) #scene-7:not([hidden]) #interview-whatsapp {
    --ef-peak: 1.5;
    animation: ef-pulse 3s ease-in-out;
  }
}
@keyframes ef-pulse {
  0%, 100% { scale: 1; }
  50% { scale: var(--ef-peak, 1.7); }
}
@keyframes ef-four-nodes {
  0%, 25%, 100% { scale: 1; }
  12.5% { scale: 2; }
}
@keyframes ef-six-nodes {
  0%, 16.6667%, 100% { scale: 1; }
  8.3333% { scale: 2; }
}
#discovery-form { grid-template-columns: minmax(0, 1fr); max-width: 44rem; }
#concern-open { justify-self: start; }
#concern-dialog, #followup { max-height: 85vh; overflow: auto; }
#followup-confirm { transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) #followup[open] #followup-confirm:not([hidden]) {
    animation: ef-button 3s ease-in-out;
  }
  body:not(.motion-off) #scene-3.story-awaiting-choice:not(.story-motion-off):not([hidden]) .ef-graph-node {
    animation: ef-six-nodes 6s ease-in-out var(--ef-delay) infinite;
  }
}

.guide-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.guide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 9px 0 2px;
  border: 1px solid #78f1e588;
  border-radius: 999px;
  background: #112b34;
  color: #f4fffd;
  font: inherit;
  font-size: .8125rem;
  font-weight: 750;
  cursor: pointer;
}
.guide-toggle:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.guide-symbol {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #52f5dd;
  color: #08242b;
  font-size: 1.6rem;
  line-height: 1;
}
.guide-cue {
  margin: 0;
  color: var(--cyan);
  font-size: .875rem;
  line-height: 1.3;
  text-align: right;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) .guide-pulse .guide-symbol {
    animation: guide-halo 1s ease-out 2;
  }
}
@keyframes guide-halo {
  from { box-shadow: 0 0 0 0 #52f5ddc0; }
  to { box-shadow: 0 0 0 8px #52f5dd00; }
}
#guide-actions {
  display: grid;
  gap: .45rem;
  margin-top: .8rem;
}
#guide-actions .button { white-space: normal; text-align: left; }
#guide-dialog { max-height: calc(100dvh - 24px); overflow: auto; }

@media (max-width: 760px) {
  .header-inner { min-height: 51px; }
  .header-inner .brand img { width: 34px; height: 34px; }
  .footer-inner { min-height: 49px; padding-block: 0; }
  .guide-bar { gap: 8px; }
  .guide-cue { font-size: .8125rem; text-align: left; }
  .scene { padding-block: 8px; }
  .intro { gap: 8px; }
  .intro h1, .conversation h2, .story-ending h2 { font-size: clamp(27px, 8vw, 41px); }
  .intro .lede, .conversation .lede, .story-ending .lede { font-size: .875rem; line-height: 1.3; }
  .intro .signals { margin-block: 6px; }
  .intro figure svg { max-height: clamp(90px, 24svh, 195px); }
  .conversation .questions { gap: 6px; }
  #activity-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #activity-options .option > span { padding-inline: 7px; }
  #scene-2 :is(.story-dialog) { padding: 12px; }
  #scene-2 .followup-choices { margin-block: .5rem; }
  #scene-2 .option > span { min-height: 44px; }
  #scene-3 .story-stage { grid-template-rows: auto auto minmax(0, 1fr); }
  #scene-3 .story-layout { grid-template-rows: minmax(72px, 1fr) auto; }
  #scene-3 .story-visual { min-height: 72px; }
  #scene-3 .story-card h2 { font-size: clamp(21px, 6vw, 30px); }
  #scene-3 .story-premise { font-size: 13px; line-height: 1.3; }
  #followup-insight { padding: .3rem .55rem; margin: .2rem 0; font-size: .75rem; }
  .story-prompt { display: none; }
  .consultant-media video, .consultant-placeholder { max-height: 30svh; }
  .consultant-network { max-height: 16svh; }
  #scene-6 .diagnostic-stage { grid-template-rows: minmax(90px, 1fr) auto; }
  #scene-6 .diagnostic-choices { gap: 4px; }
  #scene-6 .diagnostic-choices .button, #diagnostic-video-toggle {
    min-height: 44px;
    font-size: .8125rem;
    padding: .35rem .6rem;
  }
  #interview-video { max-height: 35svh; object-fit: contain; }
  #interview-whatsapp { white-space: normal; text-align: center; }
}

.header-inner .brand .brand-logo {
  display: block;
  width: 145px;
  height: auto;
}
@media (max-width: 760px) {
  .header-inner .brand .brand-logo { width: clamp(90px, 32vw, 115px); }
}
