/*
 * Canonical site chrome, loaded after the page stylesheet.
 * The Orders header supplies the shared geometry and light slate palette.
 */

html:has(> body:is(.public-home-page, .public-auth-page, .legal-page)),
body:is(.public-home-page, .public-auth-page, .legal-page) {
  min-width: 0;
}

/* The old floating navigation's fixed top mask would cover the normal-flow header. */
body.public-home-page:has(> .topbar)::before {
  content: none;
}

/* Keep the landing's independent hero canvas at its established document origin. */
body.public-home-page > main.page-shell:has(> #home-panel > .saas-landing) {
  margin-block-start: calc(-1 * var(--site-header-height));
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) {
  --site-header-height: 64px;
  --site-header-content-rail: 1240px;
  --site-header-gutter: 16px;
  --site-header-surface: linear-gradient(110deg, #ffffff, #fcfdff 65%, #f8fafd);
  scrollbar-gutter: auto;
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > .topbar,
body.public-home-page > .topbar.is-condensed {
  --shell-header-height: var(--site-header-height);
  --shell-bg: #ffffff;
  --shell-bg-strong: #f3f6fb;
  --shell-text: #142135;
  --shell-muted: #52637a;
  --shell-accent: #2458b7;
  --shell-line: #dfe6f0;
  --floating-nav-top: 0px;
  --floating-nav-height: var(--site-header-height);
  position: relative;
  z-index: 80;
  inset: auto;
  align-self: stretch;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: none;
  height: var(--site-header-height);
  min-height: var(--site-header-height);
  margin: 0;
  padding-block: 0;
  padding-inline:
    max(
      var(--site-header-gutter),
      calc((100% - var(--site-header-content-rail)) / 2)
    );
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  transform: none;
  transition: none;
  isolation: isolate;
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > .topbar::before,
body.public-home-page > .topbar.is-condensed::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  width: auto;
  transform: none;
  border: 0;
  border-bottom: 1px solid #e0e6ef;
  border-radius: 0;
  background: var(--site-header-surface);
  box-shadow: 0 1px 0 rgba(20, 33, 53, 0.02), 0 4px 16px rgba(20, 33, 53, 0.025);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  pointer-events: none;
  transition: none;
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > .topbar::after {
  content: none;
  animation: none;
}

body > .topbar .site-brand {
  grid-column: 1;
}

body:is(.public-home-page, .public-auth-page, .legal-page, .admin-page, .auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav {
  grid-column: 2;
  align-self: center;
  justify-self: center;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  gap: 4px;
  margin: 0 16px;
}

/* One customer navigation row is shared by the workspace and authenticated pages. */
body:is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav {
  display: flex;
}

body:is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav .nav-link:focus-visible {
  outline: 2px solid #3269cf;
  outline-offset: 3px;
}

/* Public navigation uses the same controls on the landing, prices and sign-in. */
body:is(.public-home-page, .public-auth-page, .legal-page, .auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page, .admin-page) > .topbar .topbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--shell-muted);
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  transform: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

body:is(.public-home-page, .public-auth-page, .legal-page, .auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page, .admin-page) > .topbar .topbar-nav .nav-link::after {
  content: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page, .auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page, .admin-page) > .topbar .topbar-nav .nav-link:is(:hover, :focus-visible, .is-active, [aria-current="page"]) {
  border-color: #dce5f2;
  background: #eff4fb;
  color: #193f80;
  box-shadow: none;
  transform: none;
}

/* Shared customer tabs: the same vector mark, spacing and selected surface on
   Orders, Analytics and the other authenticated customer pages. */
body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav {
  position: relative;
  justify-self: start;
  gap: 8px;
  margin-inline: 28px 16px;
}

body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav::before {
  content: "";
  position: absolute;
  inset-inline-start: -18px;
  top: 50%;
  width: 1px;
  height: 24px;
  background: #dfe6f0;
  transform: translateY(-50%);
  pointer-events: none;
}

body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav .nav-link {
  gap: 9px;
  height: 40px;
  min-height: 40px;
  padding-inline: 14px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: #52637a;
  font-weight: 650;
}

body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav .nav-link::before {
  content: "";
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--workspace-header-icon) center / contain no-repeat;
  -webkit-mask: var(--workspace-header-icon) center / contain no-repeat;
}

body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav a[href="/orders"] {
  --workspace-header-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5'/%3E%3C/svg%3E");
}

body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav a[href="/analytics"] {
  --workspace-header-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='12' width='3' height='8' rx='1'/%3E%3Crect x='10.5' y='7' width='3' height='13' rx='1'/%3E%3Crect x='17' y='3' width='3' height='17' rx='1'/%3E%3C/svg%3E");
}

body:not(.admin-page):is(.auth-header-active, .orders-page, .user-order-wizard, .billing-page, .profile-page) > .topbar .topbar-nav .nav-link:is(.is-active, [aria-current="page"]) {
  border-color: #d9e4f5;
  background: linear-gradient(180deg, #f0f5fd, #e9f0fc);
  color: #214b91;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(34, 64, 107, .04);
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar :is(.language-trigger, .mobile-menu-trigger) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--shell-line);
  border-radius: 12px;
  background: #f6f8fc;
  color: var(--shell-text);
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  transform: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .language-trigger {
  width: auto;
  min-width: 0;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .language-trigger :is(.language-icon, .language-chevron) {
  width: 17px;
  height: 17px;
  color: inherit;
  opacity: 1;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .language-trigger .language-chevron {
  opacity: 0.7;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-trigger {
  display: flex;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  gap: 5px;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar :is(.language-trigger, .mobile-menu-trigger):is(:hover, :focus-visible),
body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar :is(.language-switcher, .mobile-menu)[open] > summary {
  border-color: #cbd9ec;
  background: #edf3fc;
  color: #214b91;
  box-shadow: none;
  transform: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .login-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 40px;
  min-height: 40px;
  gap: 0;
  padding: 0 18px;
  border: 1px solid #152741;
  border-radius: 10px;
  background: linear-gradient(180deg, #1b304e, #14243c);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 4px rgba(20, 36, 60, .1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transform: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .login-cta::after {
  content: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .login-cta:is(:hover, :focus-visible) {
  border-color: #294263;
  background: linear-gradient(180deg, #263e5e, #1b304e);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 4px rgba(20, 36, 60, .1);
  transform: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page, .orders-page, .user-order-wizard, .billing-page, .profile-page, .admin-page) > .topbar :is(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid #3269cf;
  outline-offset: 3px;
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > .topbar .topbar-actions {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  gap: 15px;
}

/* A single balance pill keeps the same footprint on every authenticated page. */
.topbar .user-balance-widget[data-inline-topup] {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: max-content;
  min-width: 135px;
  max-width: none;
  height: 42px;
  min-height: 42px;
  gap: 8px;
  padding: 4px 4px 4px 14px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafd, #f2f5fa);
  color: #18263b;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(20, 33, 53, .035);
  cursor: default;
}

.topbar .user-balance-widget[data-inline-topup]::after {
  content: none;
}

.topbar .user-balance-widget[data-inline-topup]:focus-within {
  border-color: #b8cce8;
}

.topbar [data-inline-topup] .user-balance-pill {
  overflow: visible;
  color: #18263b;
  font-size: 16px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
}

.topbar [data-inline-topup] .balance-topup-action {
  flex: 0 0 32px;
  display: inline-grid;
  align-items: center;
  justify-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #314b70;
  box-shadow: 0 1px 3px rgba(34, 64, 107, .08);
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.topbar [data-inline-topup] .balance-topup-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar [data-inline-topup] .balance-topup-action:not(:disabled):hover,
.topbar [data-inline-topup] .balance-topup-action:focus-visible {
  background: #e6eefb;
  color: #1b4d9b;
}

.topbar [data-inline-topup] .balance-topup-action:focus-visible {
  outline: 2px solid #3269cf;
  outline-offset: 2px;
}

.topbar [data-inline-topup] .balance-topup-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.topbar .topbar-actions .user-label {
  width: 172px;
  min-width: 172px;
  max-width: 172px;
  height: 42px;
  min-height: 42px;
  gap: 10px;
  padding: 0 12px 0 10px;
  border-color: #dfe6f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
  color: #18263b;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(20, 33, 53, .035);
  font-size: 14px;
  font-weight: 650;
  transform: none;
}

.topbar .topbar-actions .user-label::before {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.topbar .topbar-actions .user-label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .topbar-actions .user-label:is(:hover, :focus-visible, [aria-expanded="true"]) {
  border-color: #c3d2e6;
  background: #f0f5fc;
  color: #142e54;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(20, 33, 53, .035);
  transform: none;
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > .topbar :is(.account-menu-panel, .mobile-menu-panel, .language-menu) {
  --shell-bg: #ffffff;
  --shell-bg-strong: #f3f6fb;
  --shell-text: #142135;
  --shell-muted: #52637a;
  --shell-accent: #2458b7;
  --shell-line: #dfe6f0;
  border-color: var(--shell-line);
  background: #ffffff;
  color: var(--shell-text);
  box-shadow: 0 14px 36px rgba(28, 46, 75, .12), 0 2px 6px rgba(28, 46, 75, .04);
}

.topbar .account-menu-item {
  color: #43566f;
  font-weight: 600;
}

.topbar .account-menu-item:is(:hover, :focus-visible) {
  background: #eef4fd;
  color: #214b91;
}

.topbar .account-menu-item-danger {
  color: #b42336;
}

.topbar .account-menu-item-danger:is(:hover, :focus-visible) {
  background: #fff1f3;
  color: #9d1c2d;
}

.topbar .mobile-menu-panel::before {
  border-color: #dfe6f0;
  background: #ffffff;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-panel {
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(28, 46, 75, .12), 0 2px 6px rgba(28, 46, 75, .04);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  animation: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-panel::before {
  display: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-link {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #e2e9f3;
  border-radius: 10px;
  background: #f8fafd;
  color: var(--shell-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  transform: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-link:is(:hover, :focus-visible, .is-active) {
  border-color: #d2dff0;
  background: #eef4fd;
  color: #214b91;
  transform: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-account > div {
  display: grid;
  width: 100%;
  gap: 8px;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #152741;
  border-radius: 10px;
  background: linear-gradient(180deg, #1b304e, #14243c);
  color: #ffffff;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-login::after {
  content: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-login:is(:hover, :focus-visible) {
  border-color: #294263;
  background: linear-gradient(180deg, #263e5e, #1b304e);
  color: #ffffff;
  box-shadow: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .language-menu {
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 164px;
  gap: 4px;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(28, 46, 75, .12), 0 2px 6px rgba(28, 46, 75, .04);
  animation: none;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .language-menu button {
  min-height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--shell-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
}

body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .language-menu button:is(:hover, :focus-visible, [aria-selected="true"]) {
  border-color: var(--shell-line);
  background: #eef4fd;
  color: #214b91;
}

.topbar .mobile-menu-languages button {
  border-color: #e2e9f3;
  background: #f8fafd;
  color: #52637a;
}

.topbar .mobile-menu-languages button:is(:hover, :focus-visible, [aria-current="true"]) {
  border-color: #d2dff0;
  background: #eef4fd;
  color: #214b91;
}

/* Admin identity is informational; its existing logout stays a separate action. */
body.admin-page > .topbar #admin-user-label {
  cursor: default;
}

body.admin-page > .topbar #admin-user-label::after {
  content: none;
}

body.admin-page > .topbar #admin-logout-btn {
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #f6f8fc;
  color: #43566f;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  transform: none;
}

body.admin-page > .topbar #admin-logout-btn:is(:hover, :focus-visible) {
  border-color: #c3d2e6;
  background: #edf3fc;
  color: #214b91;
}

@media (max-width: 1040px) {
  body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar,
  body.public-home-page > .topbar.is-condensed {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .topbar-nav {
    display: none;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar :is(.language-switcher, .login-cta) {
    display: none;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .topbar-actions {
    grid-column: 2;
    gap: 8px;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar {
    grid-template-columns: 160px minmax(0, 1fr) auto;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .topbar-nav {
    display: flex;
    grid-column: 2;
    margin-inline: 6px;
    gap: 4px;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .topbar-nav::before { content: none; }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .topbar-actions {
    grid-column: 3;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .user-label {
    justify-content: center;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    gap: 0;
    padding: 0;
    font-size: 0;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .user-label::after {
    content: none;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .account-menu:not(.hidden) {
    display: block;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .mobile-menu {
    display: none;
  }

  /* Keep the existing touch menu, including its authenticated account actions. */
  body:is(.public-home-page, .public-auth-page, .legal-page):not(.auth-header-active) > .topbar .mobile-menu:not(.hidden) {
    display: block;
  }

  body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar .mobile-menu-panel {
    top: calc(var(--site-header-height) + 10px);
    max-height: calc(100dvh - var(--site-header-height) - 26px);
  }
}

/* The two full labels plus icons stop fitting beside the balance below 640px. */
@media (max-width: 640px) {
  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .topbar-nav {
    margin-inline: 4px;
    gap: 2px;
  }

  /* Keep both destinations directly reachable beside the compact account
     control. Native link text still supplies each icon's accessible name. */
  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar .topbar-nav .nav-link {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }

}

@media (max-width: 620px) {
  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar {
    grid-template-columns: 140px minmax(0, 1fr) auto;
  }
  body:is(.public-home-page, .public-auth-page, .legal-page).auth-header-active > .topbar [data-inline-topup] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar [data-inline-topup] .balance-topup-action,
  .topbar .topbar-actions .user-label,
  body:is(.public-home-page, .public-auth-page, .legal-page) > .topbar :is(.nav-link, .language-trigger, .mobile-menu-trigger, .mobile-menu-link, .mobile-menu-login, .language-menu button) {
    transition: none;
  }
}

/* A separate light footer surface; the shared header and page rails stay unchanged. */
body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > .site-footer {
  --site-footer-surface: #ffffff;
  --shell-bg: #ffffff;
  --shell-bg-strong: #f5f8fc;
  --shell-text: #19283f;
  --shell-muted: #607089;
  --shell-accent: #334760;
  --shell-line: #dce4ef;
  background: transparent;
  color: var(--shell-muted);
}

body:is(
  .public-home-page,
  .public-auth-page,
  .legal-page,
  .orders-page,
  .user-order-wizard,
  .billing-page,
  .profile-page,
  .admin-page
) > footer.site-footer::before {
  border-radius: 0;
  background: var(--site-footer-surface);
  box-shadow: inset 0 1px 0 var(--shell-line);
}

.site-footer .footer-legal-links,
.site-footer .footer-legal-links::before {
  border-color: var(--shell-line);
}

.site-footer .footer-legal-links::before,
.site-footer .footer-support > span {
  font-weight: 750;
  letter-spacing: 0.06em;
}

.site-footer .footer-legal-links a {
  font-weight: 560;
}

.site-footer .footer-legal-links a::before {
  background: #9aabc1;
}

.site-footer .footer-legal-links a:hover,
.site-footer .footer-legal-links a:focus-visible {
  color: #1457cf;
}

.site-footer .payment-icon {
  border-color: var(--shell-line);
  background: var(--shell-bg);
}

.site-footer .footer-support-links a {
  border-color: var(--shell-line);
  background: var(--shell-bg-strong);
  color: var(--shell-accent);
  font-weight: 650;
}

.site-footer .footer-support-links a:hover,
.site-footer .footer-support-links a:focus-visible {
  border-color: #b4c8e5;
  background: #eaf1fc;
  color: #1457cf;
}

.site-footer a:focus-visible {
  outline: 2px solid #1457cf;
  outline-offset: 3px;
}
