.phantom-hero .phantom-hero-title {
  max-width: min(70rem, 100%);
  text-wrap: balance;
}

.phantom-hero-title-line {
  display: block;
}

.phantom-hero .phantom-hero-copy {
  display: flex;
  align-items: flex-end;
  text-align: right;
}

.phantom-hero-copy > p {
  width: 100%;
  max-width: 100%;
  text-align: right;
}

.phantom-hero-copy > div {
  align-self: flex-end;
}

@media (min-width: 768px) {
  .phantom-hero {
    padding-right: 16px;
  }
}

@media (max-width: 767px) {
  .phantom-hero .phantom-hero-copy {
    position: static;
    width: 100%;
    margin-left: auto;
  }
}

/* A full-width background starts at the same height on both columns. */
#autonomy-operations {
  background: #000;
  position: relative;
  isolation: isolate;
  padding-block: 48px;
}
#autonomy-operations > div { margin-top: 0 !important; }
#autonomy-operations img { object-fit: contain; }
.phantom-loading-counter { top: max(12vh, 5rem); bottom: auto; }
.phantom-loading-counter > div { display: none; }
.phantom-loading-counter p { font-size: 24px; letter-spacing: .08em; color: #c8ced6; }
@media(max-width:767px) {
 #autonomy-operations { padding-block: 24px; }
}
.phantom-loading-counter { opacity: 1 !important; z-index: 1100; }

/* Keep the final panel adjacent to the compact footer. */
.home-main #footer { height: auto; min-height: 0; padding-top: 48px; }
#autonomy-operations [aria-hidden="true"] { display: none; }
#autonomy-operations > div > div:first-child { aspect-ratio: 3 / 2; }
#autonomy-operations > div > div:first-child > div { position: absolute; inset: 0; }
#autonomy-operations > div > div:first-child > div > div {
  width: 100%; left: 0; transform: none; aspect-ratio: auto;
}
@media (max-width: 1023px) {
 #autonomy-operations > div > div:first-child { height: auto; }
}
#autonomy-operations > div > div:first-child > div > div { translate: none; }

.phantom-footer-meta {
  display: flex;
  width: 100%;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.phantom-footer-brand { order: 0; margin-left: 0; text-align: left; }
.phantom-footer-meta > div { order: 1; margin-left: auto; }
@media (max-width: 767px) {
 .phantom-footer-brand { width: 100%; }
}

.home-main #footer { padding-left: 16px; padding-right: 16px; }
.phantom-contract-copy { position: relative; cursor: pointer; color: inherit; background: none; border: 0; padding: 8px 0; }
.phantom-contract-copy:hover { text-decoration: underline; text-underline-offset: 4px; }
.phantom-contract-copy:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.phantom-copy-status { position: absolute; right: 0; bottom: 100%; font-size: 12px; white-space: nowrap; color: #c8ced6; }
.phantom-specs-copy { display: block; pointer-events: auto; margin-top: 8px; padding: 4px 0; font-family: monospace; font-size: 14px; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.phantom-specs-copy .phantom-copy-status { top: 100%; bottom: auto; left: 0; right: auto; }
@media (max-width: 1023px) { .phantom-specs-copy { font-size: 12px; } }

/* Phone layout: keep the same scene order and callout connectors. */
.phantom-mobile-title { display: none; }
@media (max-width: 767px) {
  .phantom-hero, .phantom-swarm {
    padding: 76px 20px max(24px, calc(env(safe-area-inset-bottom) + 12px));
    background: linear-gradient(180deg, transparent 32%, rgba(0,0,0,.12) 48%, rgba(0,0,0,.68) 75%, rgba(0,0,0,.88) 100%);
  }
  .phantom-hero > div, .phantom-swarm > div { gap: 18px; }
  .phantom-hero .phantom-hero-title { font-size: clamp(28px, 8.4vw, 36px); line-height: 1.08; letter-spacing: -.035em; }
  .phantom-hero-title-line { display: none; }
  .phantom-mobile-title { display: block; }
  .phantom-hero .phantom-hero-copy { gap: 20px; }
  .phantom-hero-copy > p { font-size: 16px; line-height: 1.45; }
  .phantom-hero-copy > div { width: 100%; }
  .phantom-hero-copy button { width: 100%; min-height: 52px; padding: 14px 20px; font-size: 16px; background: rgba(255,255,255,.18); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.14); }
  .phantom-swarm h2 { font-size: clamp(28px, 8vw, 34px); line-height: 1.1; letter-spacing: -.035em; }
  .phantom-swarm-copy > p { font-size: 16px; line-height: 1.4; }
  .phantom-reward-row { gap: 14px; padding-block: 9px; }
  .phantom-reward-row > p { font-size: 13px; line-height: 1.4; }
  .phantom-reward-row > p:first-child { width: 84px; flex-shrink: 0; color: rgba(255,255,255,.6); }
  .phantom-reward-row > p:last-child { min-width: 0; }
  .phantom-callout { width: calc((100vw - 60px) / 2) !important; }
  .phantom-callout[data-mobile-side$="left"] { translate: calc(-50vw + 20px) 0 !important; }
  .phantom-callout[data-mobile-side$="right"] { translate: 10px 0 !important; }
  .phantom-callout h3, .phantom-callout p { width: 100%; text-shadow: 0 1px 5px #000, 0 2px 18px #000; }
  .phantom-callout h3 { top: auto; bottom: calc(100% + 12px); font-weight: 500; font-size: 17px; line-height: 1.18; letter-spacing: -.02em; }
  .phantom-callout h3 > span, .phantom-callout p > span { width: 100%; }
  .phantom-callout p { font-size: 13px; line-height: 1.4; }
  .phantom-specs-copy { min-height: 44px; margin-top: 5px; padding: 10px 0; font-size: clamp(10px, 3vw, 12px); }
  #autonomy-operations { padding: 32px 20px 36px; }
  #autonomy-operations > div { padding: 0; gap: 24px; }
  #autonomy-operations > div > div:last-child { gap: 24px; }
  #autonomy-operations > div > div:last-child > div { gap: 14px; }
  #autonomy-operations p:first-child { font-size: 28px; line-height: 1.12; letter-spacing: -.025em; }
  #autonomy-operations p + p { font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.72); }
  #autonomy-operations a { min-height: 52px; width: 100%; max-width: none; padding: 14px 20px; font-size: 16px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.12); }
  #autonomy-operations a [aria-hidden="true"] { display: inline; }
  .home-main #footer { padding: 28px 20px max(24px, env(safe-area-inset-bottom)); }
  .home-main #footer > div { padding-bottom: 0; }
  .phantom-footer-meta { gap: 20px; }
  .phantom-footer-brand { font-size: 13px; color: rgba(255,255,255,.5); }
  .phantom-footer-meta > div { width: 100%; margin: 0; }
  .phantom-footer-meta .phantom-contract-copy { display: flex; align-items: center; justify-content: space-between; min-height: 52px; width: 100%; padding: 14px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; font-family: monospace; font-size: 14px; background: rgba(255,255,255,.04); }
  .phantom-footer-meta .phantom-contract-copy::after { content: '⧉'; font-size: 20px; color: rgba(255,255,255,.6); }
}
@media (max-width: 767px) and (max-height: 720px) {
  .phantom-hero > div, .phantom-swarm > div { gap: 12px; }
  .phantom-hero { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .phantom-hero .phantom-hero-title { font-size: clamp(26px, 8vw, 32px); }
  .phantom-hero-copy > p { font-size: 14px; line-height: 1.35; }
  .phantom-hero .phantom-hero-copy { gap: 14px; }
  .phantom-swarm h2 { font-size: 28px; }
  .phantom-swarm-copy > p { font-size: 14px; }
  .phantom-reward-row { padding-block: 7px; }
  .phantom-callout p { font-size: 12px; line-height: 1.35; }
  .phantom-callout h3 { font-size: 16px; }
}

@media (max-width: 767px) {
  nav.z-navbar { padding-inline: 20px; }
  nav.z-navbar > button { min-height: 44px; }
  nav.z-navbar [data-slot="sheet-trigger"] { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-right: -8px; }
}
