/* Loaded after the vendored HDS sheets so these height rules win. */

.modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card {
  aspect-ratio: 344 / 280;
  max-height: 320px;
}

@media (min-width: 640px) {
  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card {
    max-height: 100%;
  }
}

@media (min-width: 940px) {
  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card.modular-solutions-bento__card-payments {
    aspect-ratio: 816 / 360;
    max-height: 360px;
  }

  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card.modular-solutions-bento__card-billing,
  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card.modular-solutions-bento__card-issuing,
  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card.modular-solutions-bento__card-radar,
  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card.modular-solutions-bento__card-crypto {
    aspect-ratio: 400 / 360;
    max-height: 360px;
  }

  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card.modular-solutions-bento__card-connect {
    aspect-ratio: 1232 / 200;
    max-height: 220px;
  }
}

/* Keep a hidden ticker in the hero grid so the title does not jump up into row 1. */
.hero-section__eyebrow[hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}

/* Win over vendored Sessions min-height (560px / 400px). */
.sessions-section .sessions-register.sessions-register--reimply {
  min-height: 0;
}

.sessions-section .sessions-register--reimply .sessions-register-content-text {
  grid-row: 1;
}

/* Vendored HDS hides .sessions-register-subtitle from 640px up. We need that
   copy: the badge and the short body are the informative part of the standout. */
#security-tools .sessions-register--reimply .sessions-register-subtitle {
  display: block;
  color: #fff;
  max-width: 44rem;
}

#security-tools .sessions-section {
  --section-container-pbs: var(--hds-space-core-400);
  --section-container-pbs-tb: var(--hds-space-core-500);
  --section-container-pbs-dt: var(--hds-space-core-600);
  --section-container-pbe: var(--hds-space-core-400);
  --section-container-pbe-tb: var(--hds-space-core-500);
  --section-container-pbe-dt: var(--hds-space-core-600);
}

/* Mobile and tablet bento: the 320px / 1.12-scale treatment left the convert
   window chrome over the title, the green preview bar running edge to edge,
   and a dead gap in shorter demos. Keep the tighter desktop sizes at 940px+. */
@media (max-width: 939px) {
  .modular-solutions-section.section-row-gap {
    --section-row-gap-mb: var(--hds-space-core-700);
    --section-row-gap-tb: var(--hds-space-core-700);
  }

  .modular-solutions-bento .modular-solutions-bento__layout .modular-solutions-bento-card {
    aspect-ratio: 344 / 390;
    max-height: 440px;
    overflow: hidden;
  }

  .modular-solutions-bento .modular-solutions-bento-card__text {
    top: var(--hds-space-core-300);
    left: var(--hds-space-core-300);
  }

  .modular-solutions-bento .modular-solutions-bento-card .modular-solutions-bento-card__graphic,
  .modular-solutions-bento .modular-solutions-bento__card-payments .modular-solutions-bento-card__graphic,
  .modular-solutions-bento .modular-solutions-bento__card-billing .modular-solutions-bento-card__graphic,
  .modular-solutions-bento .modular-solutions-bento__card-radar .modular-solutions-bento-card__graphic,
  .modular-solutions-bento .modular-solutions-bento__card-issuing .modular-solutions-bento-card__graphic,
  .modular-solutions-bento .modular-solutions-bento__card-crypto .modular-solutions-bento-card__graphic,
  .modular-solutions-bento .modular-solutions-bento__card-connect .modular-solutions-bento-card__graphic {
    inset: var(--hds-space-core-1200) var(--hds-space-core-200) var(--hds-space-core-200);
  }

  .modular-solutions-bento .modular-solutions-bento-card__graphic .rx-hds-art,
  .modular-solutions-bento .modular-solutions-bento__card-connect .modular-solutions-bento-card__graphic .rx-hds-art {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: auto;
    max-height: 100%;
    transform: none;
    transform-origin: center center;
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 939px) {
  .modular-solutions-section .modular-solutions-bento {
    margin-block-start: var(--hds-space-core-300);
  }
}


/* Homepage nav: keep the locale codes readable over the hero wave.
   Idle state uses white type (the wave is mid purple). When the nav is
   hovered or a menu is open, the white bar fades in and the default
   dark link colour returns. Sign in uses the existing knockout mask. */
@media (min-width: 940px) {
  .hds-mode--light .navigation-menu--homepage .navigation-item__locale .navigation-locale a.hds-link {
    transition: color var(--navigation-duration-slow, 0.3s) var(--navigation-easing, ease);
  }

  .hds-mode--light .navigation-menu--homepage:not(:hover):not(.hds-navigation-menu--open) .navigation-item__locale .navigation-locale a.hds-link {
    color: #fff;
    text-shadow: 0 1px 8px rgb(20 16 80 / 35%);
  }

  .hds-mode--light .navigation-menu--homepage:is(:hover, .hds-navigation-menu--open) .navigation-item__locale .navigation-locale a.hds-link {
    transition-delay: 0.1s;
  }
}

.navigation-item__sign-in__mask {
  font-family: inherit;
  font-weight: inherit;
}


/* ---- DS-58: stats globe, developers paths, security gap, footer strip ---- */

.stats-section__globe {
  min-height: 280px;
}
.stats-section__globe .stats-globe,
.stats-section__globe .data-viz__canvas {
  width: 100%;
  height: 280px;
  display: block;
}
@media (min-width: 640px) {
  .stats-section__globe,
  .stats-section__globe .stats-globe,
  .stats-section__globe .data-viz__canvas {
    min-height: 360px;
    height: 360px;
  }
}
.data-viz .stats-globe,
.data-viz .data-viz__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#developers .hds-dev__paths {
  display: grid;
  gap: var(--hds-space-layout-gap, 1.5rem);
  width: 100%;
}
@media (min-width: 940px) {
  #developers .hds-dev__paths {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.hds-format-marquee {
  overflow: hidden;
  position: relative;
  height: 100%;
}
.hds-format-marquee__grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 12px;
}
.hds-format-marquee__row {
  display: flex;
  gap: 16px;
  width: max-content;
}
.hds-format-marquee__row--left {
  animation: hds-format-marquee-left 42s linear infinite;
}
.hds-format-marquee__row--right {
  animation: hds-format-marquee-right 42s linear infinite;
}
@keyframes hds-format-marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes hds-format-marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hds-format-marquee__row--left,
  .hds-format-marquee__row--right {
    animation: none;
  }
}
.hds-format-tile {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 56px;
  padding: 0 12px;
  border-radius: 12px;
  background: #1a2a6b;
  color: #f2f7fe;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hds-systems-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.06em;
  color: #fefeff;
  line-height: 1;
}
.hds-systems-label-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
}
.hds-systems-label-tile__text {
  font-size: 0.62rem;
  font-weight: 600;
  color: #f2f7fe;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Kill the leftover Sessions min-height / empty logo row above the standout. */
#security-tools .sessions-register,
#security-tools .sessions-register.sessions-register--reimply {
  min-height: 0 !important;
  height: auto;
}
#security-tools .sessions-register-content-description {
  grid-template-rows: auto !important;
  flex-grow: 0 !important;
  margin-block: var(--hds-space-core-400, 1.5rem);
}
#security-tools .sessions-register-content-text {
  grid-row: 1 !important;
}
#security-tools .sessions-register-background,
#security-tools .sessions-register-content-logo {
  display: none;
}

.hds-sec__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hds-sec__art {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 56px;
  margin-bottom: 0.35rem;
}
.hds-sec__card {
  padding: 0.9rem 1rem 1rem;
}

/* Footer bottom: globe + language, short copyright, quiet registration line. */
.footer-bottom {
  align-items: flex-start;
  gap: var(--hds-space-core-300, 1rem);
}
@media (max-width: 639px) {
  .footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .footer-bottom .footer-disclaimer {
    grid-column: 1 / -1;
  }
}
.footer-bottom__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  padding-inline: var(--hds-space-core-200, 0.75rem);
  padding-block-start: var(--hds-space-core-200, 0.75rem);
}
.footer-bottom__copyright {
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--hds-color-text-solid);
}
.footer-bottom .footer-disclaimer {
  margin: 0;
  padding: 0;
  max-width: 42rem;
}
.hds-footer-locale {
  position: relative;
}
.hds-footer-locale__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  cursor: pointer;
  color: var(--hds-color-util-brand-600, #533afd);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0;
}
.hds-footer-locale__summary::-webkit-details-marker { display: none; }
.hds-footer-locale__summary::marker { content: ""; }
.hds-footer-locale__globe {
  flex: 0 0 auto;
}
.hds-footer-locale__menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  min-width: 12rem;
  padding: 0.4rem 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.16);
  border: 1px solid rgba(10, 37, 64, 0.08);
}
.hds-footer-locale__item {
  display: block;
  padding: 0.4rem 0.85rem;
  color: var(--hds-color-text-solid);
  text-decoration: none;
  font-size: 0.875rem;
}
.hds-footer-locale__item:hover,
.hds-footer-locale__item[aria-current="true"] {
  background: rgba(83, 58, 253, 0.06);
  color: var(--hds-color-util-brand-600, #533afd);
}


#developers .feature-detail__image,
#developers .no-code-graphic__card {
  overflow: hidden;
}
#developers .no-code-graphic__qr-code-image,
#developers .no-code-graphic__qr-code-image svg {
  max-width: 100%;
  height: auto;
  display: block;
}
#developers .no-code-graphic__qr-code-container {
  min-width: 0;
}
