/* BetterLife SG Family Trusts v39.4 — Priority 1 and 2 correction layer */

/* Reliable viewport sizing, including Safari before svh support. */
html,
body,
#root {
  height: 100%;
}

body {
  height: 100vh;
  height: 100svh;
}

.experience-shell {
  height: 100vh;
  height: 100svh;
}

.sr-only-v394 {
  width: 1px;
  height: 1px;
  position: fixed;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Restore compliant contrast for functional labels and state indicators. */
.journey-nav button {
  color: #5f6e67;
}

.choice-indicator-v392 {
  border-color: #747f79;
}

.source-drawer a > span:first-child,
.source-copy + svg {
  color: var(--v38-copper);
}

.scenario-tabs button[aria-selected="true"],
.mobile-scenario-toggle button[aria-selected="true"] {
  border-color: var(--v38-copper);
}

.scenario-video :focus-visible,
.intro-video-frame :focus-visible,
.intro-drawer-video :focus-visible {
  outline-color: var(--v38-gold-pale);
}

.scenario-media-copy > button,
.more-detail-v391 summary,
.decision-lanes article > button {
  min-height: 44px;
}

/* Keep the audited start composition intact across tablets and small laptops. */
@media (min-width: 821px) and (max-width: 1100px) {
  .start-screen {
    grid-template-rows: minmax(0, 1.2fr) 24px auto auto;
  }

  .decision-lanes {
    align-items: start;
  }

  .decision-lanes article {
    align-self: start;
    grid-template-rows: auto auto;
    align-content: start;
  }

  .decision-lanes article > button {
    margin-top: 8px;
  }
}

/* Preserve the full-width exclusive choice at iPad portrait widths. */
@media (min-width: 821px) and (max-width: 900px) {
  .question-choices button.choice-exclusive-v392 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  /* A filtered ancestor becomes the containing block for fixed children. */
  .app-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .footer-start {
    grid-template-columns: 1fr;
  }
}

/* Print the evidence and boundaries that explain the educational output. */
@media print {
  @page {
    margin: 14mm;
  }

  html,
  body {
    height: auto;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .answers-disclosure-v391,
  .boundaries-v391 {
    display: block !important;
  }

  .answers-disclosure-v391 > *,
  .boundaries-v391 > * {
    display: revert !important;
  }

  .intro-video-frame,
  .scenario-video,
  .intro-drawer-video,
  .intro-caption-band {
    display: none !important;
  }
}
