/* GEXYRAL M01 mobile global shell
 * Scope: <= 860px only. Desktop/PC >= 861px remains governed by the existing CSS authority.
 * Purpose: predictable gutters, safe-area handling, thumb-sized navigation, overflow containment,
 *          mobile form stability and compact footer composition without changing desktop layout.
 */
@media (max-width: 860px) {
  :root {
    --gexyral-m01-gutter: clamp(14px, 4vw, 20px);
    --gexyral-m01-safe-bottom: max(10px, env(safe-area-inset-bottom));
    --gexyral-m01-touch: 44px;
  }

  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  @supports (overflow: clip) {
    html,
    body {
      overflow-x: clip;
    }
  }

  img,
  video,
  iframe,
  svg,
  canvas {
    max-width: 100%;
  }

  input,
  textarea,
  select {
    max-width: 100%;
    font-size: 16px;
  }

  button,
  input,
  textarea,
  select,
  summary,
  a {
    -webkit-tap-highlight-color: transparent;
  }

  :is(button, input, textarea, select, summary, a):focus-visible {
    outline: 2px solid rgba(91, 184, 255, .88);
    outline-offset: 3px;
  }

  /* ---------------- Home shell ---------------- */
  body[data-home-cms-ready="1"] .gexyral-site-shell {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  @supports (overflow: clip) {
    body[data-home-cms-ready="1"] .gexyral-site-shell {
      overflow-x: clip;
    }
  }

  body[data-home-cms-ready="1"] .gexyral-container {
    width: calc(100% - (var(--gexyral-m01-gutter) * 2));
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  body[data-home-cms-ready="1"] .gexyral-rail {
    top: auto;
    left: var(--gexyral-m01-gutter);
    right: var(--gexyral-m01-gutter);
    bottom: var(--gexyral-m01-safe-bottom);
    width: auto;
    height: 68px;
    padding: 5px 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(73, 151, 255, .34);
    border-radius: 18px;
    background: rgba(3, 12, 28, .985);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .44), inset 0 1px 0 rgba(255, 255, 255, .04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    isolation: isolate;
  }

  body[data-home-cms-ready="1"] .gexyral-rail::before,
  body[data-home-cms-ready="1"] .gexyral-rail::after,
  body[data-home-cms-ready="1"] .gexyral-rail-nav::before {
    display: none;
  }

  body[data-home-cms-ready="1"] .gexyral-brand,
  body[data-home-cms-ready="1"] .gexyral-rail-status {
    display: none;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav a {
    width: auto;
    min-width: 0;
    min-height: 54px;
    height: 58px;
    padding: 5px 3px 4px;
    flex: 1 1 0;
    transform: none !important;
    gap: 3px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    box-shadow: none;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav a:nth-child(4),
  body[data-home-cms-ready="1"] .gexyral-rail-nav a:nth-child(6) {
    display: none;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav a:hover,
  body[data-home-cms-ready="1"] .gexyral-rail-nav a.is-active {
    transform: none !important;
    border: 0;
    background: linear-gradient(180deg, rgba(20, 91, 181, .48), rgba(6, 29, 67, .5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav a.is-active::before {
    left: 50%;
    top: auto;
    bottom: -2px;
    width: 22px;
    height: 2px;
    transform: translateX(-50%);
    border-radius: 6px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav i {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav i svg {
    width: 18px;
    height: 18px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav span {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.15;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-home-cms-ready="1"] .gexyral-global-contact-dock {
    right: var(--gexyral-m01-gutter);
    bottom: calc(86px + var(--gexyral-m01-safe-bottom));
  }

  body[data-home-cms-ready="1"] .gexyral-global-contact-popover {
    left: var(--gexyral-m01-gutter);
    right: var(--gexyral-m01-gutter);
    bottom: calc(146px + var(--gexyral-m01-safe-bottom));
    width: auto;
    max-width: none;
  }

  body[data-home-cms-ready="1"] .gexyral-footer {
    padding-bottom: calc(118px + env(safe-area-inset-bottom)) !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-brand {
    grid-column: 1 / -1;
    min-width: 0;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:not(.gexyral-footer-brand) a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 5px 0;
    line-height: 1.45;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-bottom-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-legal {
    justify-content: center;
    flex-wrap: wrap;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-legal a {
    min-height: var(--gexyral-m01-touch);
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
  }

  /* ---------------- Inner-page shell ---------------- */
  body.gexyral-inner-body {
    --gexyral-mobile-gutter: var(--gexyral-m01-gutter);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  @supports (overflow: clip) {
    body.gexyral-inner-body {
      overflow-x: clip;
    }
  }

  body.gexyral-inner-body .gexyral-inner-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  @supports (overflow: clip) {
    body.gexyral-inner-body .gexyral-inner-shell {
      overflow-x: clip;
    }
  }

  body.gexyral-inner-body .gexyral-inner-container {
    width: calc(100% - (var(--gexyral-m01-gutter) * 2));
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-bar {
    top: max(8px, env(safe-area-inset-top));
    left: var(--gexyral-m01-gutter);
    right: var(--gexyral-m01-gutter);
    width: auto;
    height: 60px;
    padding: 0 8px 0 12px;
    border-radius: 16px;
    background: rgba(4, 20, 44, .985);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .045);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-brand {
    min-height: var(--gexyral-m01-touch);
    min-width: 0;
    flex: 1 1 auto;
    gap: 9px;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-brand span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-brand strong {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.gexyral-inner-body .gexyral-inner-menu-toggle,
  body.gexyral-inner-body [data-inner-menu-close] {
    width: var(--gexyral-m01-touch);
    min-width: var(--gexyral-m01-touch);
    height: var(--gexyral-m01-touch);
    min-height: var(--gexyral-m01-touch);
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu {
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding: calc(16px + env(safe-area-inset-top)) var(--gexyral-m01-gutter) calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #020713;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu-head {
    min-height: 48px;
    gap: 12px;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu-head > span {
    min-width: 0;
    overflow: hidden;
    line-height: 1.45;
    text-overflow: ellipsis;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu nav {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu nav a {
    min-width: 0;
    min-height: 56px;
    height: auto;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(73, 151, 255, .16);
    border-radius: 14px;
    background: rgba(7, 27, 58, .52);
    line-height: 1.4;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu nav a span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu nav a.is-active {
    border-color: rgba(86, 174, 255, .42);
    background: rgba(18, 80, 158, .42);
  }

  body.gexyral-inner-body .gexyral-inner-mobile-cta {
    min-height: 54px;
    height: auto;
    margin-top: 14px;
    padding: 13px 16px;
  }

  body.gexyral-inner-body .gexyral-inner-guide {
    left: var(--gexyral-m01-gutter);
    right: var(--gexyral-m01-gutter);
    width: auto;
  }

  body.gexyral-inner-body .gexyral-inner-guide-toggle,
  body.gexyral-inner-body .gexyral-inner-back-top,
  body.gexyral-inner-body .gexyral-inner-btn {
    min-height: var(--gexyral-m01-touch);
  }

  body.gexyral-inner-body .gexyral-inner-footer {
    padding-bottom: calc(34px + env(safe-area-inset-bottom));
  }

  body.gexyral-inner-body .gexyral-inner-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
  }

  body.gexyral-inner-body .gexyral-inner-footer-brand {
    grid-column: 1 / -1;
    min-width: 0;
  }

  body.gexyral-inner-body .gexyral-inner-footer-group {
    min-width: 0;
  }

  body.gexyral-inner-body .gexyral-inner-footer-group a {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 5px 0;
    line-height: 1.45;
  }

  body.gexyral-inner-body .gexyral-inner-footer-bottom-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  body.gexyral-inner-body .gexyral-inner-footer-bottom-row nav {
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  body.gexyral-inner-body .gexyral-inner-footer-bottom-row nav a {
    min-height: var(--gexyral-m01-touch);
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
  }

  body.gexyral-inner-body .gexyral-inner-footer-icp {
    max-width: 100%;
    width: fit-content;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  :root {
    --gexyral-m01-gutter: 12px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail {
    left: 8px;
    right: 8px;
    padding-left: 4px;
    padding-right: 4px;
    border-radius: 16px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav span {
    font-size: 9px;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid,
  body.gexyral-inner-body .gexyral-inner-footer-grid {
    grid-template-columns: 1fr;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-brand,
  body.gexyral-inner-body .gexyral-inner-footer-brand {
    grid-column: auto;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu nav {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  body.gexyral-inner-body .gexyral-inner-mobile-menu nav a {
    min-height: 52px;
  }
}

@media (max-width: 360px) {
  body[data-home-cms-ready="1"] .gexyral-rail-nav a {
    padding-left: 1px;
    padding-right: 1px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav i {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  body[data-home-cms-ready="1"] .gexyral-rail-nav span {
    font-size: 8px;
  }
}

@media (hover: none) and (max-width: 860px) {
  body[data-home-cms-ready="1"] .gexyral-rail-nav a:hover,
  body.gexyral-inner-body .gexyral-inner-mobile-menu nav a:hover,
  body.gexyral-inner-body .gexyral-inner-footer-group a:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 860px) {
  body[data-home-cms-ready="1"] .gexyral-rail,
  body[data-home-cms-ready="1"] .gexyral-rail-nav a,
  body.gexyral-inner-body .gexyral-inner-mobile-bar,
  body.gexyral-inner-body .gexyral-inner-mobile-menu,
  body.gexyral-inner-body .gexyral-inner-mobile-menu nav a {
    transition: none !important;
  }
}

/* GEXYRAL N01 shared mobile header + right drawer
 * One mobile navigation authority for homepage and all inner public pages.
 * Desktop >= 861px remains unchanged.
 */
.gexyral-mobile-site-header,
.gexyral-mobile-site-overlay,
.gexyral-mobile-site-drawer {
  display: none;
}

@media (max-width: 860px) {
  body.gexyral-mobile-nav-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .gexyral-mobile-site-header {
    position: fixed;
    z-index: 120;
    top: max(8px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    min-height: 60px;
    padding: 7px 8px 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(77, 151, 240, .3);
    border-radius: 17px;
    background: rgba(3, 12, 28, .975);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .04);
  }

  .gexyral-mobile-site-brand {
    min-width: 0;
    min-height: 44px;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 9px;
    color: #f3f8ff;
    text-decoration: none;
  }

  .gexyral-mobile-site-brand > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: block;
    background: var(--gexyral-mobile-site-logo) center / contain no-repeat;
    filter: drop-shadow(0 0 11px rgba(46, 149, 255, .32));
  }

  .gexyral-mobile-site-brand > strong {
    min-width: 0;
    overflow: hidden;
    color: #f5f9ff;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: .055em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gexyral-mobile-site-menu-toggle,
  .gexyral-mobile-site-drawer-head > button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border: 1px solid rgba(70, 145, 229, .22);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f4f9ff;
    background: rgba(12, 40, 78, .62);
    cursor: pointer;
    touch-action: manipulation;
  }

  .gexyral-mobile-site-menu-toggle {
    flex-direction: column;
    gap: 5px;
  }

  .gexyral-mobile-site-menu-toggle i {
    width: 19px;
    height: 1px;
    display: block;
    background: #c6e4ff;
    transition: transform .2s ease, opacity .2s ease;
  }

  .gexyral-mobile-site-menu-toggle[aria-expanded="true"] i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .gexyral-mobile-site-menu-toggle[aria-expanded="true"] i:nth-child(2) {
    opacity: 0;
  }
  .gexyral-mobile-site-menu-toggle[aria-expanded="true"] i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .gexyral-mobile-site-overlay {
    position: fixed;
    z-index: 130;
    inset: 0;
    display: block;
    background: rgba(0, 4, 12, .62);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
  }

  .gexyral-mobile-site-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .gexyral-mobile-site-drawer {
    position: fixed;
    z-index: 140;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 380px);
    max-width: calc(100vw - 28px);
    height: 100dvh;
    padding: calc(15px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) 14px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid rgba(78, 153, 241, .24);
    background: linear-gradient(180deg, #031127 0%, #020914 100%);
    box-shadow: -24px 0 70px rgba(0, 0, 0, .48);
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .24s ease, visibility .24s ease;
  }

  .gexyral-mobile-site-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .gexyral-mobile-site-drawer-head {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .gexyral-mobile-site-drawer-head > div {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .gexyral-mobile-site-drawer-head strong {
    color: #f5f9ff;
    font-size: 14px;
    letter-spacing: .05em;
  }

  .gexyral-mobile-site-drawer-head span {
    overflow: hidden;
    color: #7187a4;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gexyral-mobile-site-drawer-head > button {
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
  }

  .gexyral-mobile-site-drawer nav {
    margin-top: 18px;
    display: grid;
    gap: 8px;
  }

  .gexyral-mobile-site-drawer nav a {
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid rgba(71, 142, 226, .16);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(7, 27, 58, .56);
    color: #b5c7db;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    touch-action: manipulation;
  }

  .gexyral-mobile-site-drawer nav a b {
    color: #5cb4ff;
    font-size: 15px;
    font-weight: 500;
  }

  .gexyral-mobile-site-drawer nav a.is-active {
    border-color: rgba(86, 174, 255, .42);
    background: linear-gradient(135deg, rgba(19, 104, 207, .36), rgba(7, 35, 76, .72));
    color: #f3f9ff;
  }

  /* Retire the two legacy mobile-header implementations after the shared N01 shell loads. */
  body[data-home-cms-ready="1"] .gexyral-home-mobile-header,
  body.gexyral-inner-body .gexyral-inner-mobile-bar,
  body.gexyral-inner-body .gexyral-inner-mobile-menu {
    display: none !important;
  }

  /* Shared header occupies the same visual band on home and inner pages. */
  body[data-home-cms-ready="1"] .gexyral-ai-clean-hero .gexyral-hero-content,
  body.gexyral-inner-body .gexyral-inner-hero-content {
    padding-top: max(104px, calc(88px + env(safe-area-inset-top)));
  }
}

@media (max-width: 380px) {
  .gexyral-mobile-site-header {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    padding-left: 9px;
  }
  .gexyral-mobile-site-drawer {
    width: min(91vw, 360px);
    max-width: calc(100vw - 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gexyral-mobile-site-menu-toggle i,
  .gexyral-mobile-site-overlay,
  .gexyral-mobile-site-drawer {
    transition: none !important;
  }
}

/* N04-E2: mobile HERO background parity with desktop.
 * Reuse the existing desktop media only; no new image asset or JS request is introduced.
 * Home gets a mobile crop/overlay tuned to keep the city/AI depth visible behind copy.
 * Inner pages keep their route-specific crops while guaranteeing the existing hero media stays visible.
 */
@media (max-width: 860px) {
  body[data-home-cms-ready="1"] .gexyral-ai-clean-hero .gexyral-hero-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-image: url('../images/gexyral-hero-ai-depth-v4.webp') !important;
    background-size: cover !important;
    background-position: 84% 68% !important;
    background-repeat: no-repeat !important;
    filter: saturate(.88) brightness(.82) contrast(1.02) !important;
  }

  body[data-home-cms-ready="1"] .gexyral-ai-clean-hero .gexyral-hero-image::before {
    background:
      radial-gradient(ellipse at 76% 54%, rgba(8, 76, 176, .08) 0, rgba(2, 8, 20, .14) 42%, rgba(2, 6, 17, .48) 88%),
      linear-gradient(180deg, rgba(2, 6, 17, .46) 0%, rgba(2, 6, 17, .18) 48%, rgba(2, 6, 17, .46) 100%) !important;
  }

  body[data-home-cms-ready="1"] .gexyral-ai-clean-hero .gexyral-hero-image::after {
    background:
      linear-gradient(90deg, rgba(2, 6, 17, .28) 0%, rgba(2, 6, 17, .08) 52%, rgba(2, 6, 17, .14) 100%),
      linear-gradient(180deg, rgba(2, 6, 17, .10) 0%, rgba(2, 6, 17, .03) 58%, rgba(2, 6, 17, .34) 100%) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.has-background-image .gexyral-inner-hero-media,
  body.gexyral-inner-body .gexyral-inner-hero.has-background-image .gexyral-inner-hero-media img {
    display: block !important;
    visibility: visible !important;
  }
}


/* N04-E3: all published inner-page HERO sections must retain visible real imagery on mobile.
 * 1) Reveal existing route-specific desktop HERO media instead of letting the old mobile mask
 *    collapse into an almost-solid navy field.
 * 2) Eight published product/research routes that intentionally have no desktop route banner
 *    use a mobile-only first-party fallback via --gexyral-mobile-hero-image.
 * 3) /resources keeps its dedicated resource-hub image authority; only its mobile overlay is
 *    lightened here. No SEO/OG image authority is changed.
 */
@media (max-width: 860px) {
  body.gexyral-inner-body .gexyral-inner-hero.is-hero-system-v1.has-hero-banner-v1::before {
    background:
      linear-gradient(90deg, rgba(2, 7, 19, .80) 0%, rgba(2, 7, 19, .58) 52%, rgba(2, 7, 19, .30) 100%),
      linear-gradient(180deg, rgba(2, 7, 19, .14) 0%, rgba(2, 7, 19, .32) 100%) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.is-hero-system-v1.has-hero-banner-v1 .gexyral-inner-hero-media::after {
    background:
      linear-gradient(90deg, rgba(2, 7, 19, .30) 0%, rgba(2, 7, 19, .08) 70%, rgba(2, 7, 19, .03) 100%),
      linear-gradient(180deg, rgba(2, 7, 19, .08) 0%, rgba(2, 7, 19, .20) 100%) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.is-hero-system-v1.has-hero-banner-v1 .gexyral-inner-hero-media img {
    width: 116% !important;
    max-width: none !important;
    right: -10% !important;
    opacity: .82 !important;
    filter: saturate(.94) brightness(.92) contrast(1.03) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.has-mobile-hero-fallback-v1::before {
    background:
      linear-gradient(90deg, rgba(2, 7, 19, .80) 0%, rgba(2, 7, 19, .58) 54%, rgba(2, 7, 19, .30) 100%),
      linear-gradient(180deg, rgba(2, 7, 19, .12) 0%, rgba(2, 7, 19, .34) 100%) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.has-mobile-hero-fallback-v1 .gexyral-inner-hero-media {
    position: absolute !important;
    inset: 0 !important;
    z-index: -3 !important;
    display: block !important;
    visibility: visible !important;
    overflow: hidden !important;
    background-color: #020713 !important;
    background-image: var(--gexyral-mobile-hero-image) !important;
    background-size: cover !important;
    background-position: var(--gexyral-mobile-hero-position, center) !important;
    background-repeat: no-repeat !important;
    opacity: .86 !important;
    filter: saturate(.94) brightness(.92) contrast(1.03) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.has-mobile-hero-fallback-v1 .gexyral-inner-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(2, 7, 19, .28) 0%, rgba(2, 7, 19, .08) 72%, rgba(2, 7, 19, .03) 100%),
      linear-gradient(180deg, rgba(2, 7, 19, .06) 0%, rgba(2, 7, 19, .18) 100%);
  }

  body[data-page-type="resource_hub"] .gexyral-inner-hero::after {
    background:
      linear-gradient(180deg, rgba(2, 7, 19, .68) 0%, rgba(2, 7, 19, .38) 36%, rgba(2, 7, 19, .32) 62%, rgba(2, 7, 19, .58) 100%),
      url('/public/assets/images/resources/resource-hub-banner-hero-v2.webp') center / cover no-repeat !important;
  }
}

@media (max-width: 600px) {
  body.gexyral-inner-body .gexyral-inner-hero.is-hero-system-v1.has-hero-banner-v1::before {
    background:
      linear-gradient(90deg, rgba(2, 7, 19, .78) 0%, rgba(2, 7, 19, .56) 56%, rgba(2, 7, 19, .34) 100%),
      linear-gradient(180deg, rgba(2, 7, 19, .12) 0%, rgba(2, 7, 19, .34) 100%) !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.is-hero-system-v1.has-hero-banner-v1 .gexyral-inner-hero-media img {
    width: 126% !important;
    right: -20% !important;
    opacity: .78 !important;
  }

  body.gexyral-inner-body .gexyral-inner-hero.has-mobile-hero-fallback-v1 .gexyral-inner-hero-media {
    opacity: .82 !important;
  }
}

/* GEXYRAL N04-E5: compact two-column mobile footer
 * Human visual blocker: footer navigation collapsed to one column <=560px and
 * legacy contact-dock footer padding left excessive empty space at page end.
 * Scope: mobile <=860px only; desktop footer is unchanged.
 */
@media (max-width: 860px) {
  body[data-home-cms-ready="1"] .gexyral-footer,
  body.gexyral-inner-body .gexyral-inner-footer {
    padding-top: 44px !important;
  }

  /* Fixed conversion controls already have their own shell/body reserve. */
  body[data-home-cms-ready="1"] .gexyral-footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
  body.gexyral-inner-body:has(.gexyral-mobile-conversion-bar) .gexyral-inner-footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
  /* Pages without the conversion bar retain only enough room for the compact contact dock. */
  body.gexyral-inner-body:not(:has(.gexyral-mobile-conversion-bar)) .gexyral-inner-footer {
    padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid,
  body.gexyral-inner-body .gexyral-inner-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 18px !important;
    align-items: start;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-brand,
  body.gexyral-inner-body .gexyral-inner-footer-brand {
    grid-column: 1 / -1 !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:not(.gexyral-footer-brand),
  body.gexyral-inner-body .gexyral-inner-footer-group {
    min-width: 0;
    padding: 11px 2px 0 !important;
    border-top: 1px solid rgba(73, 139, 226, .12);
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:not(.gexyral-footer-brand) h3,
  body.gexyral-inner-body .gexyral-inner-footer-group h3 {
    margin-bottom: 9px !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:not(.gexyral-footer-brand) > a,
  body.gexyral-inner-body .gexyral-inner-footer-group > a {
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    display: flex !important;
    align-items: center;
    line-height: 1.42;
    overflow-wrap: anywhere;
  }

  /* The third navigation group uses the full row and keeps its links in two columns. */
  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:last-child:not(.gexyral-footer-brand),
  body.gexyral-inner-body .gexyral-inner-footer-group:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:last-child:not(.gexyral-footer-brand) > h3,
  body.gexyral-inner-body .gexyral-inner-footer-group:last-child > h3 {
    grid-column: 1 / -1;
  }

  body[data-home-cms-ready="1"] .gexyral-copyright,
  body.gexyral-inner-body .gexyral-inner-copyright {
    margin-top: 24px !important;
    padding: 14px 12px 12px !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-bottom-row,
  body.gexyral-inner-body .gexyral-inner-footer-bottom-row {
    gap: 6px !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-legal,
  body.gexyral-inner-body .gexyral-inner-footer-bottom-row nav {
    gap: 4px 12px !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-legal a,
  body.gexyral-inner-body .gexyral-inner-footer-bottom-row nav a {
    min-height: 34px !important;
    padding: 0 3px !important;
  }

  body[data-home-cms-ready="1"] .gexyral-footer-icp,
  body.gexyral-inner-body .gexyral-inner-footer-icp {
    margin-top: 8px !important;
    padding-top: 9px !important;
  }
}

@media (max-width: 360px) {
  body[data-home-cms-ready="1"] .gexyral-footer-grid,
  body.gexyral-inner-body .gexyral-inner-footer-grid {
    gap: 18px 12px !important;
  }
  body[data-home-cms-ready="1"] .gexyral-footer-grid > div:last-child:not(.gexyral-footer-brand),
  body.gexyral-inner-body .gexyral-inner-footer-group:last-child {
    column-gap: 12px;
  }
}
