:root {
  --tr4-plasma-cyan: rgba(39, 216, 244, 0.24);
  --tr4-plasma-aqua: rgba(104, 255, 228, 0.21);
  --tr4-plasma-violet: rgba(169, 140, 255, 0.17);
  --tr4-electric-line: rgba(122, 246, 232, 0.3);
  --tr4-electric-glass: rgba(5, 13, 18, 0.78);
  --tr4-electric-glass-strong: rgba(4, 10, 15, 0.92);
  --tr4-electric-shadow: 0 24px 64px rgba(0, 0, 0, 0.34), inset 0 1px rgba(240, 252, 252, 0.1);
  --tr4-nav-surface: rgba(3, 9, 13, 0.9);
  --tr4-nav-surface-strong: rgba(3, 8, 12, 0.97);
  --tr4-nav-edge: rgba(222, 238, 241, 0.14);
  --tr4-nav-edge-active: rgba(104, 255, 228, 0.72);
  --tr4-nav-text: rgba(235, 243, 247, 0.7);
  --tr4-nav-text-active: #f2f8f8;
  --tr4-nav-radius: 18px;
  --tr4-nav-target: 44px;
  --muted: rgba(235, 243, 251, 0.78);
  --dim: rgba(235, 243, 251, 0.58);
}

html {
  background: #02070a;
}

body {
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 8%, rgba(39, 216, 244, 0.15), transparent 29rem),
    radial-gradient(circle at 88% 24%, rgba(169, 140, 255, 0.13), transparent 31rem),
    radial-gradient(circle at 56% 78%, rgba(104, 255, 228, 0.09), transparent 34rem),
    linear-gradient(180deg, #020507 0%, #031016 46%, #020507 100%);
}

body::after {
  position: fixed;
  inset: -22vmax;
  z-index: -2;
  background:
    radial-gradient(ellipse at 24% 30%, var(--tr4-plasma-cyan), transparent 28%),
    radial-gradient(ellipse at 74% 34%, var(--tr4-plasma-violet), transparent 27%),
    radial-gradient(ellipse at 52% 72%, var(--tr4-plasma-aqua), transparent 31%);
  opacity: 0.46;
  transform: translate3d(-1.5%, -1%, 0) scale(1.02);
  animation: tr4-plasma-drift 16s var(--tr4-motion-easing-standard, cubic-bezier(0.2, 0.8, 0.2, 1)) infinite alternate;
  pointer-events: none;
  content: "";
  will-change: transform, opacity;
}

body.tr4-runtime-ready {
  transition: background-color var(--tr4-motion-duration-component, 480ms) var(--tr4-motion-easing-enter, ease-out);
}

:is(.page-hero, .content-band, .plain-band, .modalities-section, .member-section, .builder-section, .store-section) {
  background-color: rgba(2, 7, 10, 0.72);
  background-image:
    linear-gradient(180deg, rgba(14, 35, 41, 0.18), rgba(2, 7, 10, 0.28)),
    radial-gradient(circle at 82% 18%, rgba(39, 216, 244, 0.12), transparent 34rem),
    radial-gradient(circle at 12% 72%, rgba(169, 140, 255, 0.07), transparent 30rem);
}

body[data-page="home"] .ambient-video {
  opacity: 0.94;
  filter: brightness(1.06) saturate(1.3) contrast(1.04);
}

body:not([data-page="home"]) .page-hero > .section-video {
  opacity: 0.76;
  filter: brightness(0.84) saturate(1.28) contrast(1.06);
}

body[data-page="protocols"] .scene-protocols {
  opacity: 1;
  filter: brightness(1.12) saturate(1.22);
}

body[data-page="protocols"] .scene-medicine-list li {
  border-color: rgba(225, 247, 244, 0.22);
  color: rgba(239, 248, 248, 0.78);
  opacity: 0.9;
}

body[data-page="protocols"] .scene-protocols-field {
  box-shadow: inset 1px 1px rgba(232, 255, 251, 0.16), 0 0 88px rgba(39, 216, 244, 0.09), 24px 34px 90px rgba(0, 0, 0, 0.42);
}

:is(.shell-header, .mobile-menu, .portal-dock, .site-nav, .public-assistant, .public-assistant-launch) {
  border-color: rgba(151, 245, 234, 0.2);
  background-color: var(--tr4-electric-glass-strong);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.4), inset 0 1px rgba(226, 255, 251, 0.08);
  backdrop-filter: blur(18px) saturate(126%);
  -webkit-backdrop-filter: blur(18px) saturate(126%);
}

:is(
  [data-navigation-layer="public-chrome"],
  [data-navigation-layer="public-sheet"],
  [data-navigation-layer="public-dock"],
  [data-navigation-layer="member-primary"],
  .member-app-topbar
) {
  border-color: var(--tr4-nav-edge);
  background-color: var(--tr4-nav-surface);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.36), inset 0 1px rgba(239, 252, 253, 0.075);
  backdrop-filter: blur(18px) saturate(124%);
  -webkit-backdrop-filter: blur(18px) saturate(124%);
}

:is(
  [data-navigation-layer="public-primary"] > a:not(.tr4-button),
  [data-navigation-layer="public-primary"] > .nav-ecosystem > summary,
  [data-navigation-layer="public-sheet"] a,
  [data-navigation-layer="public-dock"] > a,
  [data-navigation-layer="public-dock"] > button,
  [data-navigation-layer="member-primary"] > .member-app-tab
) {
  position: relative;
  min-height: var(--tr4-nav-target);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--tr4-nav-text);
  text-shadow: none;
  transition:
    color var(--tr4-motion-duration-micro, 160ms) ease,
    border-color var(--tr4-motion-duration-micro, 160ms) ease,
    background-color var(--tr4-motion-duration-micro, 160ms) ease,
    transform var(--tr4-motion-duration-micro, 160ms) var(--tr4-motion-easing-standard, ease);
}

:is(
  [data-navigation-layer="public-primary"] > a:not(.tr4-button),
  [data-navigation-layer="public-primary"] > .nav-ecosystem > summary,
  [data-navigation-layer="public-sheet"] a,
  [data-navigation-layer="public-dock"] > a,
  [data-navigation-layer="public-dock"] > button,
  [data-navigation-layer="member-primary"] > .member-app-tab
):focus-visible {
  outline: 1px solid rgba(104, 255, 228, 0.78);
  outline-offset: -2px;
  color: var(--tr4-nav-text-active);
}

@media (hover: hover) and (pointer: fine) {
  :is(
    [data-navigation-layer="public-primary"] > a:not(.tr4-button),
    [data-navigation-layer="public-primary"] > .nav-ecosystem > summary,
    [data-navigation-layer="public-sheet"] a,
    [data-navigation-layer="public-dock"] > a,
    [data-navigation-layer="public-dock"] > button,
    [data-navigation-layer="member-primary"] > .member-app-tab
  ):hover {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--tr4-nav-text-active);
    text-shadow: none;
    transform: translate3d(0, -1px, 0);
  }
}

:is(
  [data-navigation-layer="public-primary"] > a[aria-current="page"],
  [data-navigation-layer="public-primary"] > .nav-ecosystem[data-current="true"] > summary,
  [data-navigation-layer="public-sheet"] a[aria-current="page"],
  [data-navigation-layer="public-dock"] > a[aria-current="page"],
  [data-navigation-layer="public-dock"] > button[aria-expanded="true"],
  [data-navigation-layer="member-primary"] > .member-app-tab[aria-selected="true"]
) {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--tr4-nav-text-active) !important;
  text-shadow: none !important;
}

:is(
  [data-navigation-layer="public-primary"] > a[aria-current="page"],
  [data-navigation-layer="public-primary"] > .nav-ecosystem[data-current="true"],
  [data-navigation-layer="public-sheet"] a[aria-current="page"],
  [data-navigation-layer="public-dock"] > a[aria-current="page"],
  [data-navigation-layer="public-dock"] > button[aria-expanded="true"],
  [data-navigation-layer="member-primary"] > .member-app-tab[aria-selected="true"]
)::after {
  position: absolute;
  right: 18%;
  bottom: 3px;
  left: 18%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--tr4-nav-edge-active), transparent);
  box-shadow: none;
  content: "";
}

[data-navigation-layer="public-sheet"] .sheet-title {
  border-color: var(--tr4-nav-edge);
  color: #68ffe4;
}

[data-navigation-layer="public-sheet"] .sheet-title button {
  min-width: var(--tr4-nav-target);
  min-height: var(--tr4-nav-target);
  border-color: var(--tr4-nav-edge);
  background: rgba(235, 243, 247, 0.035);
  box-shadow: none;
  color: var(--tr4-nav-text-active);
}

[data-navigation-layer="public-sheet"] .mobile-nav-group {
  min-width: 0;
  border-top: 1px solid rgba(222, 238, 241, 0.08);
  padding-top: 14px;
}

[data-navigation-layer="public-sheet"] .mobile-nav-group:first-of-type {
  border-top: 0;
}

[data-navigation-layer="public-sheet"] .mobile-nav-group h2 {
  margin: 0 0 8px;
  color: rgba(104, 255, 228, 0.82);
  font: 800 0.64rem/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

[data-navigation-layer="public-sheet"] .mobile-nav-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

[data-navigation-layer="public-sheet"] .mobile-nav-group a {
  min-width: 0;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 0 12px;
  overflow-wrap: anywhere;
  font: 800 clamp(0.66rem, 2.7vw, 0.78rem)/1.15 var(--font-mono);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

[data-navigation-layer="public-sheet"] [data-navigation-group="access"] a {
  border-color: rgba(104, 255, 228, 0.18);
}

[data-navigation-layer="public-primary"] .nav-ecosystem-panel {
  border-color: var(--tr4-nav-edge);
  background-color: var(--tr4-nav-surface-strong);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.5), inset 0 1px rgba(239, 252, 253, 0.08);
}

[data-navigation-layer="public-primary"] .nav-ecosystem-panel a {
  box-shadow: none;
  text-shadow: none;
}

[data-navigation-layer="member-primary"] > .member-app-tab {
  border-radius: 12px;
  font-family: var(--font-mono);
}

[data-navigation-layer="member-primary"] > .member-app-tab[aria-selected="true"] svg {
  color: #68ffe4;
  filter: none;
}

:is(.tr4-button.primary, .action-button.primary, button.action-button:not(.secondary), .login-panel button[type="submit"]) {
  border-color: rgba(188, 255, 247, 0.72);
  background: linear-gradient(105deg, #bffcf2 0%, #68ffe4 48%, #35ddef 100%);
  box-shadow: 0 12px 36px rgba(39, 216, 244, 0.22), inset 0 1px rgba(255, 255, 255, 0.58);
  color: #02070a;
}

:is(.tr4-button.secondary, .action-button.secondary) {
  border-color: rgba(157, 235, 226, 0.28);
  background: linear-gradient(145deg, rgba(15, 34, 40, 0.86), rgba(4, 10, 14, 0.9));
  box-shadow: inset 0 1px rgba(232, 255, 252, 0.08), 0 14px 34px rgba(0, 0, 0, 0.24);
}

:is(.value-card, .route-card, .modality-card, .protocol-card, .workflow-card, .gateway-step-card, .member-gate-card, .builder-workbench, .login-panel, .app-story-card, .app-view-card, .signal-card) {
  border-color: rgba(145, 232, 222, 0.2);
  background-color: var(--tr4-electric-glass);
  box-shadow: var(--tr4-electric-shadow);
}

:is(.eyebrow, .section-label, .result-kicker) {
  color: #67f6f1;
  text-shadow: 0 0 24px rgba(39, 216, 244, 0.24);
}

h1 span,
h2 span,
.hero-line {
  color: #68ffe4;
  text-shadow: 0 0 30px rgba(39, 216, 244, 0.2);
}

:is(.lead, .section-copy p, .modalities-head p, .protocol-card p, .route-card p, .value-card p, .app-story-card p) {
  color: rgba(236, 246, 249, 0.78);
}

@media (hover: hover) and (pointer: fine) {
  :is(.tr4-button, .action-button, .value-card, .route-card, .modality-card, .protocol-card, .workflow-card, .gateway-step-card, .app-story-card) {
    transition:
      transform var(--tr4-motion-duration-state, 280ms) var(--tr4-motion-easing-enter, ease-out),
      border-color var(--tr4-motion-duration-state, 280ms) ease,
      background-color var(--tr4-motion-duration-state, 280ms) ease,
      box-shadow var(--tr4-motion-duration-state, 280ms) ease,
      color var(--tr4-motion-duration-micro, 160ms) ease;
  }

  :is(.value-card, .route-card, .modality-card, .protocol-card, .workflow-card, .gateway-step-card, .app-story-card):hover {
    border-color: rgba(130, 255, 239, 0.38);
    box-shadow: 0 26px 58px rgba(0, 0, 0, 0.38), inset 0 1px rgba(238, 255, 253, 0.12);
    transform: translate3d(0, -3px, 0);
  }

  :is(.tr4-button, .action-button):hover {
    transform: translate3d(0, -2px, 0);
  }
}

body.tr4-touch-first :is(.tr4-button, .action-button, .mobile-menu a, .portal-dock a) {
  -webkit-tap-highlight-color: rgba(104, 255, 228, 0.16);
  touch-action: manipulation;
}

body.tr4-low-power::after,
body.motion-paused::after {
  opacity: 0.24;
  animation: none;
  transform: none;
  will-change: auto;
}

body.tr4-low-power :is(.shell-header, .mobile-menu, .portal-dock, .site-nav, .public-assistant, .public-assistant-launch) {
  backdrop-filter: blur(10px) saturate(112%);
  -webkit-backdrop-filter: blur(10px) saturate(112%);
}

@keyframes tr4-plasma-drift {
  0% {
    opacity: 0.34;
    transform: translate3d(-1.5%, -1%, 0) scale(1.02) rotate(-0.35deg);
  }

  100% {
    opacity: 0.52;
    transform: translate3d(1.5%, 1%, 0) scale(1.07) rotate(0.35deg);
  }
}

@media (max-width: 860px) {
  body:not([data-page="home"]) .mobile-shell {
    transition:
      border-color var(--tr4-motion-duration-micro, 160ms) ease,
      background-color var(--tr4-motion-duration-micro, 160ms) ease,
      box-shadow var(--tr4-motion-duration-micro, 160ms) ease,
      opacity var(--tr4-motion-duration-micro, 160ms) ease,
      transform var(--tr4-motion-duration-micro, 160ms) var(--tr4-motion-easing-standard, ease);
  }

  body::after {
    inset: -34vmax;
    opacity: 0.38;
    animation-duration: 20s;
  }

  body[data-page="home"] .ambient-video {
    opacity: 0.98;
    filter: brightness(1.1) saturate(1.34) contrast(1.02);
  }

  body:not([data-page="home"]) .page-hero > .section-video {
    opacity: 0.8;
    filter: brightness(0.9) saturate(1.24) contrast(1.03);
  }

  :is(.page-hero, .content-band, .plain-band, .modalities-section, .member-section, .builder-section, .store-section) {
    background-color: rgba(2, 7, 10, 0.64);
    background-image:
      linear-gradient(180deg, rgba(10, 39, 44, 0.2), rgba(2, 7, 10, 0.32)),
      radial-gradient(circle at 74% 16%, rgba(104, 255, 228, 0.09), transparent 24rem);
  }

  :is(.shell-header, .mobile-menu, .portal-dock, .site-nav, .public-assistant, .public-assistant-launch) {
    backdrop-filter: blur(13px) saturate(122%);
    -webkit-backdrop-filter: blur(13px) saturate(122%);
  }

  [data-navigation-layer="public-dock"],
  [data-navigation-layer="member-primary"] {
    border-radius: var(--tr4-nav-radius);
    background-color: rgba(3, 9, 13, 0.94);
  }

  [data-navigation-layer="public-dock"] > :is(a, button),
  [data-navigation-layer="member-primary"] > .member-app-tab {
    min-height: 56px;
  }

  [data-navigation-layer="public-dock"] > :is(a, button) {
    font-size: clamp(0.5rem, 1.9vw, 0.62rem);
    letter-spacing: 0.015em;
  }

  [data-navigation-layer="public-sheet"] {
    background-color: var(--tr4-nav-surface-strong) !important;
    background-image:
      radial-gradient(circle at 86% 8%, rgba(39, 216, 244, 0.11), transparent 24rem),
      radial-gradient(circle at 8% 92%, rgba(169, 140, 255, 0.08), transparent 22rem) !important;
  }

  body.nav-open [data-navigation-layer="public-sheet"] {
    z-index: 240 !important;
    isolation: isolate;
    border: 1px solid var(--tr4-nav-edge) !important;
    background:
      radial-gradient(circle at 86% 8%, rgba(39, 216, 244, 0.11), transparent 24rem),
      radial-gradient(circle at 8% 92%, rgba(169, 140, 255, 0.08), transparent 22rem),
      var(--tr4-nav-surface-strong) !important;
    box-shadow: 0 32px 110px rgba(0, 0, 0, 0.7), inset 0 1px rgba(239, 252, 253, 0.08) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  :is(.lead, .section-copy p, .modalities-head p, .protocol-card p, .route-card p, .value-card p, .app-story-card p) {
    color: rgba(240, 248, 250, 0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::after {
    opacity: 0.28;
    animation: none;
    transform: none;
    will-change: auto;
  }

  :is(.tr4-button, .action-button, .value-card, .route-card, .modality-card, .protocol-card, .workflow-card, .gateway-step-card, .app-story-card) {
    transition-duration: 0.01ms;
  }

  :is(
    [data-navigation-layer="public-primary"] > a,
    [data-navigation-layer="public-primary"] summary,
    [data-navigation-layer="public-sheet"] a,
    [data-navigation-layer="public-dock"] > a,
    [data-navigation-layer="public-dock"] > button,
    [data-navigation-layer="member-primary"] > .member-app-tab
  ) {
    transition-duration: 0.01ms;
  }
}

@media (forced-colors: active) {
  body::after {
    display: none;
  }
}

.pathway-preview,
.pathway-preview-shell,
.pathway-result,
.pathway-journey-map,
.pathway-journey-grid,
.pathway-journey-stage {
  min-width: 0;
  max-width: 100%;
}

.pathway-preview-shell,
.pathway-result,
.pathway-journey-grid,
.pathway-journey-stage {
  overflow: clip;
}

.site-footer,
body[data-page="home"] .site-footer,
body:not([data-page="home"]) .site-footer,
.trust-footer {
  min-height: 0 !important;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: 20px;
  margin: 0;
  padding: clamp(54px, 6vw, 82px) max(clamp(24px, 6vw, 96px), calc((100vw - 1480px) / 2)) clamp(34px, 4vw, 54px) !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(104, 255, 228, 0.07), transparent 25rem),
    linear-gradient(150deg, #04090c, #010304 72%) !important;
  isolation: isolate;
}

.site-footer::after,
.trust-footer::after {
  background: linear-gradient(180deg, rgba(6, 14, 17, 0.3), rgba(1, 3, 4, 0.86)) !important;
}

.site-footer .footer-video,
.trust-footer .footer-video {
  display: none !important;
}

.site-footer .footer-top,
.trust-footer .footer-top {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 360px;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 22px;
  border: 0;
  margin: 0;
  padding: 0;
}

.site-footer .footer-top img,
.trust-footer .footer-top img,
body[data-page="home"] .footer-top img {
  width: min(190px, 100%);
  margin: 0;
  opacity: 0.82;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.44));
}

.site-footer .badges,
.trust-footer .badges {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.site-footer .badges span,
.trust-footer .badges span,
body[data-page="home"] .badges span {
  min-height: 32px;
  border: 1px solid rgba(104, 255, 228, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(104, 255, 228, 0.035);
  color: rgba(104, 255, 228, 0.76);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.site-footer .footer-boundary,
.trust-footer .footer-boundary {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-width: 34ch;
  margin: -22px 0 0;
  color: rgba(235, 243, 247, 0.66);
  font-size: 0.92rem;
}

.site-footer .footer-grid,
.trust-footer .footer-grid,
body[data-page="home"] .footer-grid {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(20px, 4vw, 58px);
  border: 0;
  margin: 0;
  padding: 0;
}

.site-footer .footer-grid div,
.trust-footer .footer-grid div,
body[data-page="home"] .footer-grid div {
  min-width: 0;
  display: grid;
  justify-items: stretch;
  align-content: start;
  gap: 4px;
}

.site-footer .footer-grid h3,
.trust-footer .footer-grid h3,
body[data-page="home"] .footer-grid h3 {
  display: block;
  margin: 0 0 12px;
  color: rgba(104, 255, 228, 0.72);
  font: 900 0.64rem/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer .footer-grid a,
.trust-footer .footer-grid a,
body[data-page="home"] .footer-grid a,
body[data-page="home"] .footer-grid a[href="/terms"],
body[data-page="home"] .footer-grid a[href="/privacy"],
body[data-page="home"] .footer-grid a[href="/onboarding"] {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(226, 239, 242, 0.07);
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: rgba(235, 243, 247, 0.67);
  font-size: clamp(0.82rem, 1.2vw, 0.98rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.site-footer .footer-grid a[href="/onboarding"],
.trust-footer .footer-grid a[href="/onboarding"] {
  display: flex !important;
}

.site-footer .copyright,
.trust-footer .copyright,
body[data-page="home"] .copyright {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: none;
  border-top: 1px solid rgba(226, 239, 242, 0.09);
  margin: 0;
  padding-top: 22px;
  color: rgba(235, 243, 247, 0.48);
  font-size: 0.64rem;
  line-height: 1.4;
  text-align: left;
}

@media (max-width: 1023px) {
  .site-footer,
  body[data-page="home"] .site-footer,
  body:not([data-page="home"]) .site-footer,
  .trust-footer {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 24px;
    padding: 48px clamp(18px, 5vw, 44px) calc(96px + env(safe-area-inset-bottom)) !important;
  }

  .site-footer .footer-top,
  .trust-footer .footer-top {
    max-width: none;
    grid-column: 1;
    grid-row: auto;
    justify-items: start;
    border-bottom: 1px solid rgba(226, 239, 242, 0.09);
    padding-bottom: 24px;
  }

  .site-footer .badges,
  .trust-footer .badges {
    display: flex;
    flex-wrap: wrap;
  }

  .site-footer .footer-boundary,
  .trust-footer .footer-boundary {
    grid-column: 1;
    grid-row: auto;
    max-width: 58ch;
    margin: -8px 0 0;
  }

  .site-footer .footer-grid,
  .trust-footer .footer-grid,
  body[data-page="home"] .footer-grid {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 4vw, 30px);
  }

  .site-footer .copyright,
  .trust-footer .copyright,
  body[data-page="home"] .copyright {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  body.gateway-story-focus:not(.nav-open) :is(.portal-dock, .mobile-shell) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(18px) !important;
  }

  .pathway-preview {
    padding-right: 14px;
    padding-left: 14px;
  }

  .pathway-result {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  .pathway-journey-map {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 12px !important;
    overflow: clip !important;
    padding: 2px 0 6px !important;
  }

  .pathway-journey-map li {
    min-width: 0;
    overflow: hidden;
  }

  .pathway-journey-map li::after {
    display: none !important;
  }

  .pathway-journey-map button {
    min-width: 0;
    min-height: 116px;
    padding: 0;
    overflow: hidden;
  }

  .pathway-journey-map strong,
  .pathway-journey-map small {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .site-footer,
  body[data-page="home"] .site-footer,
  body:not([data-page="home"]) .site-footer,
  .trust-footer {
    justify-items: stretch;
    gap: 22px;
    border-top: 1px solid rgba(104, 255, 228, 0.12);
    padding: 42px 18px calc(96px + env(safe-area-inset-bottom)) !important;
  }

  .site-footer .footer-top,
  .trust-footer .footer-top {
    justify-items: start;
    gap: 16px;
    padding-bottom: 22px;
  }

  .site-footer .footer-top img,
  .trust-footer .footer-top img,
  body[data-page="home"] .footer-top img {
    width: min(164px, 52vw);
  }

  .site-footer .badges span:first-child,
  body[data-page="home"] .badges span:first-child {
    display: inline-flex;
  }

  .site-footer .footer-grid,
  .trust-footer .footer-grid,
  body[data-page="home"] .footer-grid {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border: 0;
    padding: 0;
  }

  .site-footer .footer-grid div,
  .trust-footer .footer-grid div,
  body[data-page="home"] .footer-grid div {
    display: grid;
    border: 1px solid rgba(226, 239, 242, 0.09);
    border-radius: 16px;
    padding: 16px 14px 10px;
    background: rgba(228, 244, 244, 0.022);
  }

  .site-footer .footer-grid div:last-child,
  .trust-footer .footer-grid div:last-child,
  body[data-page="home"] .footer-grid div:last-child {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 12px;
  }

  .site-footer .footer-grid div:last-child h3,
  .trust-footer .footer-grid div:last-child h3,
  body[data-page="home"] .footer-grid div:last-child h3 {
    grid-column: 1 / -1;
  }

  .site-footer .footer-grid a,
  .trust-footer .footer-grid a,
  body[data-page="home"] .footer-grid a,
  body[data-page="home"] .footer-grid a[href="/terms"],
  body[data-page="home"] .footer-grid a[href="/privacy"],
  body[data-page="home"] .footer-grid a[href="/onboarding"] {
    min-height: 38px;
    font-size: clamp(0.76rem, 3.25vw, 0.9rem);
  }

  .site-footer .copyright,
  .trust-footer .copyright,
  body[data-page="home"] .copyright {
    grid-column: 1;
    grid-row: auto;
    max-width: 34ch;
    padding-top: 18px;
    text-align: left;
  }
}

@media (max-width: 360px) {
  .site-footer .footer-grid,
  .trust-footer .footer-grid,
  body[data-page="home"] .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-grid div:last-child,
  .trust-footer .footer-grid div:last-child,
  body[data-page="home"] .footer-grid div:last-child {
    grid-column: 1;
  }
}

/* Final mobile heading authority: preserve complete words and scale the long legal/journey titles. */
@media (max-width: 560px) {
  body:not([data-page="home"]) main > .page-hero .hero-copy h1 {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  body[data-page="retreats"] main > .page-hero .hero-copy h1,
  body[data-page="terms"] main > .page-hero .hero-copy h1 {
    font-size: clamp(1.35rem, 7vw, 1.75rem) !important;
    line-height: 0.96 !important;
  }
}
