/* Late-cascade presentation for the automatic Ghost Period story. */
.problem-lab {
  z-index: 61;
}

.problem-intro-copy mark {
  padding-inline: 2px;
  background: rgba(255, 90, 0, 0.1);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.lead-simulator {
  min-height: 422px;
  background: rgba(255, 255, 255, 0.98);
}

.simulator-toolbar {
  position: relative;
  min-height: 88px;
  padding: 13px clamp(18px, 2.3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  overflow: hidden;
}

.simulator-toolbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--amber);
}

.lead-simulator.is-stage-running .simulator-toolbar::after {
  animation: simulatorStageProgress var(--stage-duration, 3s) linear forwards;
}

@keyframes simulatorStageProgress {
  to { width: 100%; }
}

.scenario-picker {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
}

.scenario-picker .mono-label {
  flex: 0 0 auto;
  margin: 0;
}

.scenario-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.scenario-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid #c4c5c6;
  border-right: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #777a7f;
  background: #fff;
  font-family: var(--mono-font);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: color 260ms ease, background-color 260ms ease, border-color 260ms ease;
}

.scenario-tabs button:last-child {
  border-right: 1px solid #c4c5c6;
}

.scenario-tabs button i {
  color: #a0a2a5;
  font-style: normal;
  font-weight: 600;
}

.scenario-tabs button[aria-current="true"] {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.scenario-tabs button[aria-current="true"] i {
  color: var(--amber);
}

.simulator-panel {
  grid-template-rows: 58px minmax(264px, 1fr);
  min-height: 334px;
}

.lead-simulator.is-scene-changing .simulator-panel {
  animation: simulatorSceneIn 720ms var(--ease-out) both;
}

@keyframes simulatorSceneIn {
  from { opacity: 0.62; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.scenario-brief {
  padding-top: 22px;
}

.scenario-situation {
  margin-top: 17px;
}

.scenario-situation strong {
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.06;
}

.scenario-setup {
  margin-top: 9px;
  color: #43464b;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.handling-switch {
  width: min(100%, 330px);
  min-height: 42px;
  margin-right: clamp(18px, 2.3vw, 34px);
}

.handling-switch button {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #aaabad;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777a7f;
  background: #fff;
  font-family: var(--mono-font);
  font-size: 0.64rem;
  font-weight: 750;
  text-transform: uppercase;
  box-shadow: none;
  cursor: pointer;
  transition: color 260ms ease, background-color 260ms ease;
}

.handling-switch button:last-child {
  border-right: 0;
}

.handling-switch button[aria-current="true"] {
  color: #fff;
  background: var(--ink);
}

.lead-simulator.is-virgox .handling-switch button[aria-current="true"] {
  color: var(--ink);
  background: var(--amber);
}

.lead-simulator.is-virgox .operational-feed {
  border-left-color: rgba(255, 90, 0, 0.58);
}

.operational-feed {
  margin-bottom: 18px;
}

.feed-header {
  min-height: 34px;
  padding-bottom: 9px;
}

.feed-header strong {
  color: #4d5055;
  font-size: 0.69rem;
}

.feed-source {
  min-width: 92px;
  padding: 8px 12px;
  font-size: 0.67rem;
}

.feed-list {
  height: 204px;
  min-height: 204px;
  padding: 5px 0 3px;
  display: grid;
  grid-auto-rows: 1fr;
}

.feed-list::before,
.feed-list::after {
  top: 21px;
}

.feed-list::before {
  bottom: 21px;
}

.feed-list::after {
  height: calc((100% - 42px) * var(--feed-progress) / 100%);
}

.feed-row {
  min-height: 0;
  grid-template-columns: 94px 36px minmax(0, 1fr);
  transition: opacity 420ms ease, background-color 420ms ease, box-shadow 420ms ease;
}

.feed-row time {
  font-size: 0.7rem;
}

.feed-row > span {
  color: #505359;
  font-size: 0.77rem;
  line-height: 1.22;
  text-transform: none;
}

.feed-row.is-active {
  padding-left: 9px;
  background: rgba(255, 90, 0, 0.055);
  box-shadow: inset 3px 0 0 var(--amber);
}

.feed-row.is-active > span {
  color: var(--ink);
  font-size: 0.81rem;
}

.feed-final {
  min-height: 46px;
  padding: 8px 14px;
}

.feed-final strong {
  font-size: 0.92rem;
}

.scenario-result {
  min-height: 116px;
  padding-bottom: 21px;
}

.scenario-outcome {
  min-height: 84px;
  padding-top: 13px;
}

.scenario-outcome p {
  max-width: 340px;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.scenario-outcome.is-visible p {
  animation: outcomeCopyIn 680ms var(--ease-out) both;
}

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

.proof-transition {
  margin-top: 76px;
  margin-bottom: 24px;
}

.booking-proof {
  min-height: 390px;
  grid-template-columns: minmax(0, 1.9fr) minmax(330px, 1fr);
}

.booking-graph {
  padding: 27px clamp(24px, 2.8vw, 40px) 20px;
}

.booking-graph > header {
  align-items: end;
}

.graph-context {
  color: var(--amber-deep);
}

.booking-graph h3 {
  font-size: clamp(1.65rem, 2.35vw, 2.5rem);
}

.booking-chart {
  height: 228px;
  margin-top: 2px;
}

.booking-proof .chart-line-before,
.booking-proof .chart-line-after {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

.booking-proof .chart-node-before,
.booking-proof .chart-node-after,
.booking-proof .chart-gain-label {
  opacity: 0;
}

.booking-proof.is-chart-visible .chart-line-before {
  animation: bookingLineDraw 900ms var(--ease-out) 120ms forwards;
}

.booking-proof.is-chart-visible .chart-line-after {
  animation: bookingLineDraw 1.35s var(--ease-out) 720ms forwards;
}

.booking-proof.is-chart-visible .chart-node-before {
  animation: bookingPointIn 260ms ease 640ms forwards;
}

.booking-proof.is-chart-visible .chart-node-after,
.booking-proof.is-chart-visible .chart-gain-label {
  animation: bookingPointIn 280ms ease forwards;
  animation-delay: calc(1.05s + var(--point-index) * 250ms);
}

@keyframes bookingLineDraw {
  to { stroke-dashoffset: 0; }
}

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

.booking-summary {
  padding: 27px clamp(24px, 2.8vw, 38px) 24px;
  color: #fff;
  background: var(--ink);
}

.booking-summary dl {
  margin: 0;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.booking-summary dt {
  color: rgba(255, 255, 255, 0.56);
}

.booking-summary dd {
  color: #fff;
  font-size: 2.55rem;
}

.booking-summary dd span::after {
  content: "/mo";
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono-font);
  font-size: 0.64rem;
  font-weight: 650;
  text-transform: uppercase;
}

.summary-gain {
  margin-top: 18px;
  padding: 18px 0 16px;
  border-top: 0;
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.summary-gain strong {
  position: relative;
  color: var(--amber);
  font-size: clamp(4rem, 5.7vw, 6.4rem);
  padding-bottom: 5px;
  border-bottom: 2px dotted rgba(255, 90, 0, 0.78);
  box-shadow: none;
}

.summary-gain strong::after {
  content: "";
  position: absolute;
  top: 8px;
  right: -18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: liveResultSync 2.2s ease-in-out infinite;
}

@keyframes liveResultSync {
  0%, 68%, 100% {
    opacity: 0.35;
    box-shadow: 0 0 0 0 rgba(255, 90, 0, 0);
  }
  78% {
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(255, 90, 0, 0.14);
  }
}

.summary-gain span {
  color: #fff;
  font-size: 0.68rem;
}

.revenue-impact {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.revenue-impact p {
  min-width: 0;
  margin: 0;
  padding: 13px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.revenue-impact p + p {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.revenue-impact span,
.revenue-impact small {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono-font);
  font-size: 0.55rem;
  font-weight: 650;
  line-height: 1.3;
  text-transform: uppercase;
}

.revenue-impact strong {
  margin-top: 6px;
  color: #fff;
  font-family: var(--display-font);
  font-size: clamp(1.15rem, 1.8vw, 1.85rem);
  line-height: 1;
}

.annual-impact strong {
  color: var(--amber);
}

.revenue-impact small {
  margin-top: 6px;
  font-size: 0.49rem;
}

.spend-status {
  margin-top: auto;
}

.spend-status span {
  color: rgba(255, 255, 255, 0.55);
}

.spend-status strong {
  color: #fff;
}

.booking-proof.is-chart-visible .summary-gain,
.booking-proof.is-chart-visible .revenue-impact {
  animation: proofResultIn 620ms var(--ease-out) both;
}

.booking-proof.is-chart-visible .revenue-impact {
  animation-delay: 420ms;
}

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

.fact-bridge {
  margin-top: 36px;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.98);
}

.fact-bridge header {
  padding: 23px clamp(20px, 2.5vw, 36px);
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1.55fr);
  align-items: center;
  gap: 24px;
}

.fact-bridge .eyebrow {
  margin: 0;
  color: var(--amber-deep);
}

.fact-bridge h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.1vw, 2.25rem);
  line-height: 1.08;
}

.fact-cards {
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact-cards article {
  min-height: 92px;
  padding: 18px clamp(16px, 2vw, 28px);
  border-right: 1px solid #c0c1c2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
}

.fact-cards article:last-child {
  border-right: 0;
}

.problem-lab.is-visible .fact-cards article {
  animation: factCardIn 480ms var(--ease-out) forwards;
}

.problem-lab.is-visible .fact-cards article:nth-child(2) { animation-delay: 120ms; }
.problem-lab.is-visible .fact-cards article:nth-child(3) { animation-delay: 240ms; }

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

.fact-cards span {
  color: #777a7f;
  font-family: var(--mono-font);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fact-cards strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.55vw, 1.42rem);
  line-height: 1.1;
}

.fact-cards article:last-child strong {
  color: var(--amber-deep);
}

.response-evidence {
  position: relative;
  margin-top: 0;
  border-top: 0;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
}

.response-evidence::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 74%;
  height: 3px;
  background: var(--amber);
}

.response-evidence > section {
  min-height: 224px;
  padding: 25px clamp(22px, 2.5vw, 36px);
}

.response-window h3 {
  max-width: 650px;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.response-window > p {
  margin-top: 12px;
  font-size: 0.98rem;
}

.response-rail {
  margin-top: 31px;
}

.response-rail strong {
  font-size: 0.72rem;
}

.response-rail span {
  font-size: 0.61rem;
}

.lead-self-check h3 {
  font-size: clamp(1.25rem, 1.65vw, 1.65rem);
}

.problem-lab .eyebrow,
.problem-lab .mono-label,
.problem-lab .graph-context {
  font-size: 0.74rem;
}

.problem-lab .scenario-time span,
.problem-lab .scenario-outcome span,
.problem-lab .feed-final span {
  font-size: 0.68rem;
}

@media (min-width: 981px) {
  .problem-intro {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(30px, 3vw, 46px);
  }

  .problem-intro-heading,
  .problem-intro-copy {
    grid-column: auto;
  }

  .problem-intro h2 {
    font-size: clamp(2.3rem, 2.85vw, 3.4rem);
    line-height: 1.01;
  }

  .problem-intro-copy > p {
    line-height: 1.55;
  }
}

@media (max-width: 980px) {
  .simulator-toolbar {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .booking-proof,
  .response-evidence {
    grid-template-columns: 1fr;
  }

  .booking-summary {
    min-height: 390px;
  }

  .response-evidence > section {
    border-right: 0;
    border-bottom: 1px solid #bfc0c2;
  }

  .response-evidence > section:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .lead-simulator {
    height: 850px;
  }

  .scenario-picker {
    display: block;
  }

  .scenario-picker .mono-label {
    padding: 0 18px;
  }

  .scenario-tabs {
    width: auto;
    margin-top: 12px;
    padding: 0 18px 17px;
    overflow: visible;
  }

  .scenario-tabs button {
    min-width: 0;
    min-height: 44px;
    padding: 0 7px;
    gap: 4px;
    font-size: 0.58rem;
    white-space: normal;
    text-align: center;
  }

  .scenario-tabs button i {
    display: none;
  }

  .simulator-panel {
    display: flex;
    min-height: 0;
  }

  .scenario-brief {
    padding-bottom: 18px;
  }

  .handling-switch {
    width: auto;
    margin: 0 18px 18px;
  }

  .handling-switch button {
    min-height: 44px;
    padding: 0 7px;
    font-size: 0.58rem;
  }

  .operational-feed {
    margin: 0 18px;
  }

  .feed-list {
    height: 202px;
    min-height: 202px;
  }

  .feed-list::before,
  .feed-list::after {
    left: 91px;
  }

  .feed-row {
    grid-template-columns: 74px 34px minmax(0, 1fr);
  }

  .feed-row time {
    font-size: 0.6rem;
  }

  .feed-row > span,
  .feed-row.is-active > span {
    font-size: 0.67rem;
  }

  .scenario-result {
    min-height: 0;
    padding: 20px 18px 24px;
  }

  .booking-proof {
    min-height: 0;
  }

  .booking-chart {
    height: auto;
    min-height: 170px;
  }

  .booking-summary {
    min-height: 360px;
  }

  .revenue-impact {
    grid-template-columns: 0.75fr 1.25fr;
  }

  .revenue-impact p + p {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
  }

  .revenue-impact strong {
    font-size: 1.55rem;
  }

  .fact-bridge header {
    display: block;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .fact-bridge h3 {
    margin-top: 11px;
  }

  .fact-cards {
    grid-template-columns: 1fr;
  }

  .fact-cards article {
    min-height: 64px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid #c0c1c2;
  }

  .fact-cards article:last-child {
    border-bottom: 0;
  }

  .response-evidence {
    display: grid;
  }

  .response-evidence > section {
    min-height: 0;
    padding: 24px 20px;
  }

  .response-rail {
    margin-top: 28px;
  }
}

@media (max-width: 420px) {
  .feed-header strong {
    max-width: 158px;
  }

  .feed-source {
    min-width: 76px;
  }

  .booking-summary dd {
    font-size: 2.2rem;
  }

  .summary-gain strong {
    font-size: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead-simulator .simulator-toolbar::after {
    width: 100%;
    animation: none !important;
  }

  .lead-simulator.is-scene-changing .simulator-panel,
  .booking-proof.is-chart-visible .summary-gain,
  .booking-proof.is-chart-visible .revenue-impact,
  .problem-lab.is-visible .fact-cards article {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .summary-gain strong::after,
  .scenario-outcome.is-visible p,
  .booking-proof.is-chart-visible .chart-line-before,
  .booking-proof.is-chart-visible .chart-line-after,
  .booking-proof.is-chart-visible .chart-node-before,
  .booking-proof.is-chart-visible .chart-node-after,
  .booking-proof.is-chart-visible .chart-gain-label {
    animation: none !important;
  }

  .booking-proof .chart-line-before,
  .booking-proof .chart-line-after {
    stroke-dashoffset: 0;
  }

  .booking-proof .chart-node-before,
  .booking-proof .chart-node-after,
  .booking-proof .chart-gain-label {
    opacity: 1;
  }
}
