:root {
  --ph-ink: #f4f8fc;
  --ph-muted: rgba(222, 233, 244, 0.72);
  --ph-faint: rgba(204, 222, 240, 0.46);
  --ph-bridge: rgba(201, 222, 240, 0.62);
  --ph-bg: #050b12;
  --ph-rule: rgba(191, 220, 246, 0.28);
  --ph-chrome-pad: calc(var(--aa-chrome-header-height, 150px) + env(safe-area-inset-top, 0px) + 8px);
}

html[data-theme="light"] {
  --ph-ink: #141820;
  --ph-muted: #3a4554;
  --ph-faint: rgba(58, 69, 84, 0.58);
  --ph-bridge: rgba(58, 69, 84, 0.72);
  --ph-bg: #e8f1fa;
  --ph-rule: rgba(168, 196, 220, 0.35);
}

html[data-theme="stellar"] {
  --ph-ink: #f4f8fc;
  --ph-muted: rgba(222, 233, 244, 0.72);
  --ph-faint: rgba(204, 222, 240, 0.46);
  --ph-bridge: rgba(201, 222, 240, 0.62);
  --ph-bg: #03070c;
  --ph-rule: rgba(191, 220, 246, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body.ph-home {
  min-height: 100%;
  overflow-x: clip;
  background: var(--ph-bg);
  color: var(--ph-ink);
}

body.ph-home .aa-chrome-header {
  position: fixed;
  inset: 0 auto auto 0;
  right: 0;
  z-index: 80;
}

html[data-theme="stellar"] body.ph-home .aa-chrome-header {
  background-color: #03070c;
}

html[data-theme="dark"] body.ph-home .aa-chrome-header {
  background-color: #050b12;
}

html[data-theme="light"] body.ph-home .aa-chrome-header {
  background-color: #f7fbff;
}

body.ph-home .aa-chrome-header-spacer {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 0 !important;
  overflow: hidden !important;
}

html[data-theme="light"] body.ph-home {
  background:
    radial-gradient(ellipse 120% 55% at 18% 0%, rgba(206, 228, 248, 0.42) 0%, transparent 58%),
    radial-gradient(ellipse 100% 65% at 88% 18%, rgba(192, 218, 242, 0.28) 0%, transparent 62%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(255, 255, 255, 0.65) 0%, transparent 68%),
    linear-gradient(
      180deg,
      #f7fbff 0%,
      #eef5fc 28%,
      #e8f1fa 52%,
      #f3f9ff 78%,
      #ffffff 100%
    );
  background-repeat: no-repeat;
  background-attachment: fixed;
}

html[data-theme="light"] body.ph-home.toward-mission.aa-chrome-page {
  color: var(--ph-ink);
}

html[data-theme="stellar"] body.ph-home {
  background:
    radial-gradient(circle at 72% 18%, rgba(53, 92, 128, 0.14), transparent 32%),
    radial-gradient(circle at 8% 78%, rgba(43, 79, 112, 0.1), transparent 28%),
    linear-gradient(180deg, #03070c 0%, #07111c 54%, #081521 100%);
  background-attachment: fixed;
}

html[data-theme="stellar"] body.ph-home.toward-mission.aa-chrome-page {
  color: var(--ph-ink);
}

html[data-theme="dark"] body.ph-home {
  background:
    radial-gradient(circle at 70% 12%, rgba(48, 84, 118, 0.16), transparent 34%),
    linear-gradient(180deg, #050b12 0%, #07111c 54%, #081521 100%);
  background-attachment: fixed;
}

html[data-theme="dark"] body.ph-home.toward-mission.aa-chrome-page {
  color: var(--ph-ink);
}

.ph-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.ph-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding-top: calc(var(--ph-chrome-pad) + 16px);
  padding-left: max(var(--aa-chrome-rail-pad, 20px), env(safe-area-inset-left));
  padding-right: max(var(--aa-chrome-rail-pad, 20px), env(safe-area-inset-right));
  padding-bottom: 0;
}

.ph-composition {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding-top: clamp(2px, 1.2vh, 12px);
  text-align: left;
}

.ph-headline {
  width: 100%;
  max-width: 40rem;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.02;
  font-size: clamp(2.1rem, 7.4vw, 3.65rem);
  text-align: left;
  text-wrap: balance;
}

.ph-headline__line {
  display: block;
}

.ph-support {
  max-width: 40rem;
  width: 100%;
  margin-top: clamp(12px, 1.8vh, 20px);
  margin-bottom: 0;
  color: var(--ph-muted);
  font-size: clamp(1.12rem, 3.2vw, 1.35rem);
  font-weight: 450;
  line-height: 1.48;
  letter-spacing: -0.01em;
  text-align: left;
  text-wrap: pretty;
}

.ph-hero-cta {
  margin: clamp(18px, 2.8vh, 28px) 0 0;
}

.ph-hero-cta__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 2px;
  background: #d7ecff;
  color: #07111c;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-decoration: none;
  text-transform: uppercase;
  transition: outline 0.2s ease, outline-offset 0.2s ease;
}

html[data-theme="light"] .ph-hero-cta__link {
  background: #123044;
  color: #f7fbff;
}

.ph-hero-cta__link:hover,
.ph-hero-cta__link:focus-visible {
  outline: 2px solid rgba(121, 189, 241, 0.55);
  outline-offset: 3px;
}

.ph-hero-cta-note {
  margin: 10px 0 0;
  max-width: 36rem;
  color: var(--ph-muted);
  font-size: clamp(0.88rem, 2vw, 0.98rem);
  line-height: 1.5;
}

html[data-theme="light"] .ph-hero-cta-note {
  color: #3a4554;
}

.ph-hero-cta-follow {
  margin: 10px 0 0;
}

.ph-hero-cta-follow__link {
  color: var(--ph-bridge);
  font-size: clamp(0.82rem, 1.9vw, 0.9rem);
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.4;
  text-decoration: underline;
  text-transform: none;
  text-underline-offset: 0.2em;
}

html[data-theme="light"] .ph-hero-cta-follow__link {
  color: #3d4a58;
}

.ph-hero-cta-follow__link:hover,
.ph-hero-cta-follow__link:focus-visible {
  color: var(--ph-ink);
  outline: none;
}

.ph-services {
  width: 100%;
  max-width: none;
  margin: 0;
  scroll-margin-top: calc(var(--ph-chrome-pad, 132px) + 12px);
  padding:
    48px
    max(var(--public-composition-gutter, clamp(20px, 4vw, 48px)), env(safe-area-inset-right))
    clamp(48px, 8vh, 96px)
    max(var(--public-composition-gutter, clamp(20px, 4vw, 48px)), env(safe-area-inset-left));
}

.ph-services__rail {
  width: 100%;
  max-width: var(--public-composition-rail, 40rem);
  margin: 0 auto;
}

.ph-service-block {
  padding: clamp(28px, 4vh, 44px) 0;
  border-top: 1px solid var(--ph-rule);
}

.ph-service-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.ph-service-block__name,
.ph-service-block__headline {
  margin: 0 0 clamp(12px, 1.6vh, 18px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
  color: var(--ph-ink);
}

.ph-service-block__benefit {
  margin: 0 0 clamp(8px, 1.2vh, 12px);
  color: var(--ph-ink);
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.ph-service-block__body {
  margin: 0 0 clamp(10px, 1.4vh, 14px);
  color: var(--ph-muted);
  font-size: clamp(1.05rem, 2.8vw, 1.18rem);
  font-weight: 450;
  line-height: 1.5;
  text-wrap: pretty;
}

.ph-service-block__note,
.ph-service-block__trust {
  margin: 0 0 clamp(8px, 1vh, 10px);
  font-size: clamp(0.88rem, 2.2vw, 0.96rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ph-bridge);
}

html[data-theme="light"] .ph-service-block__note,
html[data-theme="light"] .ph-service-block__trust {
  color: #0e3f56;
}

.ph-service-block__link-wrap {
  margin: clamp(14px, 2vh, 20px) 0 0;
}

.ph-service-block__link {
  display: inline-block;
  color: var(--ph-bridge);
  font-size: clamp(0.9rem, 2vw, 0.98rem);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(191, 220, 246, 0.32);
  padding-bottom: 2px;
}

html[data-theme="light"] .ph-service-block__link {
  color: #141820;
  border-bottom-color: #5d6b7c;
}

.ph-service-block__link:hover,
.ph-service-block__link:focus-visible {
  color: var(--ph-ink);
  border-bottom-color: currentColor;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 430px) {
  .ph-headline {
    font-size: clamp(1.85rem, 8.2vw, 2.45rem);
  }

  .ph-support {
    font-size: clamp(1.05rem, 4vw, 1.18rem);
  }

  .ph-services {
    padding-top: 32px;
  }
}

/* Commercial homepage: one header inset, content-height hero, shared text rail.
   Loaded after shared composition rules so these win. */
body.ph-home.toward-mission .ph-stage {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding-top: calc(var(--ph-chrome-pad) + 16px) !important;
  padding-bottom: 0 !important;
  padding-left: max(var(--public-composition-gutter, clamp(20px, 4vw, 48px)), env(safe-area-inset-left)) !important;
  padding-right: max(var(--public-composition-gutter, clamp(20px, 4vw, 48px)), env(safe-area-inset-right)) !important;
}

body.ph-home .aa-chrome-header-spacer {
  display: none !important;
  height: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .ph-hero-cta__link,
  .ph-service-block__link {
    transition: none;
  }
}

/* Correction 02: homepage Stellar hero stays luminous and does not pulse. */
html[data-theme="stellar"] body.ph-home .ph-headline,
html[data-theme="stellar"] body.ph-home .ph-support {
  animation: none !important;
}

/* The homepage has no redundant Home destination in either chrome state. */
body.ph-home.aa-public-chrome.aa-chrome-collapse .aa-chrome-header .aa-chrome-home-slot[hidden] {
  display: none !important;
}

/* Mobile compact top bar on homepage (<=700px): fixed solid header, content inset. */
@media (max-width: 700px) {
  body.ph-home[data-aa-mobile-compact-topbar="home"] {
    --ph-chrome-pad: calc(env(safe-area-inset-top, 0px) + 52px + 8px);
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome {
    --aa-chrome-collapse-top-width: 100% !important;
    --aa-chrome-collapse-controls-width: auto !important;
    --aa-chrome-collapse-top-height: 48px !important;
    --aa-chrome-collapse-controls-height: 48px !important;
    --aa-chrome-collapse-top-radius: 0px !important;
    --aa-chrome-collapse-controls-radius: 0px !important;
    --aa-chrome-collapse-chrome-gap: 0px !important;
    --aa-chrome-collapse-lockup-height: 40px !important;
    --aa-chrome-collapse-lockup-opacity: 1 !important;
    --aa-chrome-collapse-mark-opacity: 0 !important;
    --aa-chrome-collapse-mark-visibility: hidden !important;
    --public-chrome-expanded-height: calc(env(safe-area-inset-top, 0px) + 52px) !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header.site-header {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 90 !important;
    padding: env(safe-area-inset-top, 0px) 0 0 !important;
    pointer-events: auto !important;
    background-color: #050b12 !important;
  }

  html[data-theme="light"] body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header.site-header {
    background-color: #f7fbff !important;
  }

  html[data-theme="stellar"] body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header.site-header {
    background-color: #03070c !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header .header-bars {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    padding: 0 4px 0 0 !important;
    gap: 0 !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header .glass-bar.top-bar,
  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header .glass-bar.controls-bar {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header .glass-bar.top-bar {
    flex: 1 1 auto !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header .glass-bar {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: transparent !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header .aa-chrome-controls.header-controls {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: auto !important;
    min-height: 48px !important;
    padding: 0 8px 0 0 !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"] .aa-chrome-header-spacer {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].aa-public-chrome .aa-chrome-header.site-header {
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: 0 !important;
  }

  body.ph-home[data-aa-mobile-compact-topbar="home"].toward-mission .ph-stage {
    padding-top: calc(var(--ph-chrome-pad) + 16px) !important;
  }
}

.ph-next-step { max-width: 40rem; padding-top: 28px; border-top: 1px solid var(--ph-rule); }
.ph-next-step h2 { color: var(--ph-ink); font-size: clamp(1.4rem,3vw,1.75rem); line-height: 1.25; }
.ph-next-step p, .ph-next-step li { color: var(--ph-muted); font-size: 1rem; line-height: 1.6; }
.ph-next-step ul { padding-left: 1.2rem; }
.ph-next-step li { margin-bottom: .5rem; }
.ph-next-step a { color: var(--ph-ink); text-underline-offset: .2em; }
