.site-shell,
body {
  --site-header-height: 125px;
}

.site-header {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  display: flex;
  height: var(--site-header-height);
  inset: 0 0 auto;
  top: var(--modopen-toolbar-offset, 0px);
  justify-content: center;
  position: fixed;
  transition: background 200ms ease, backdrop-filter 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  z-index: 1000;
}

body.menu-open {
  overflow: hidden;
}

/* Core's mobile toolbar scrolls away; theme.js keeps the visible offset current. */
body.admin-bar { --modopen-toolbar-offset: 32px; }
@media (max-width: 782px) {
  body.admin-bar { --modopen-toolbar-offset: 46px; }
}

.site-header.scrolled {
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  background: rgba(17, 23, 29, 0.5);
  border-bottom-color: rgba(240, 246, 255, 0.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.site-header .nav-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  width: min(1440px, calc(100% - 64px));
}

.site-header .brand {
  align-items: center;
  display: inline-flex;
  gap: 14px;
  min-width: 220px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-header .brand:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.site-header .brand-logo {
  width: 212px;
}

.drawer-logo,
.drawer-logo .brand-logo {
  display: block;
}

.drawer-logo .brand-logo {
  width: 170px;
}

.site-header .nav-links {
  flex-shrink: 0;
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  gap: clamp(22px, 2.35vw, 46px);
  justify-content: center;
}

.site-header .nav-links a {
  align-items: center;
  color: var(--text-secondary);
  display: inline-flex;
  height: var(--site-header-height);
  position: relative;
  transition: color 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.site-header .nav-links a::after {
  background: var(--cyan);
  bottom: 34px;
  box-shadow: var(--cyan-glow);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-header .nav-links a:hover,
.site-header .nav-links a.active {
  color: var(--text-primary);
}

.site-header .nav-links a:hover {
  transform: translateY(-1px);
}

.site-header .nav-links a:hover::after,
.site-header .nav-links a.active::after {
  transform: scaleX(1);
}

.site-header .top-actions {
  flex-shrink: 0;
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 340px;
}

.header-auth-action.signed-in,
.drawer-auth-action.signed-in {
  gap: 8px;
}

.header-auth-action.signed-in > span:last-child,
.drawer-auth-action.signed-in > span:last-child {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account-avatar {
  align-items: center;
  background: rgba(147, 254, 77, 0.1);
  border: 1px solid rgba(147, 254, 77, 0.34);
  border-radius: 50%;
  color: var(--lime);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.header-language {
  position: relative;
}

.header-language > button {
  align-items: center;
  background: rgba(20, 38, 68, 0.42);
  border: 1px solid var(--navy-border);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  white-space: nowrap;
}

.header-language > button:hover,
.header-language.open > button {
  background: rgba(2, 227, 254, 0.08);
  border-color: var(--cyan);
  color: var(--text-primary);
}

.header-language > button > img,
.header-language-option img {
  border-radius: 2px;
  flex: 0 0 auto;
  object-fit: cover;
}

.header-language > button > img {
  height: 15px;
  width: 20px;
}

.header-language > button > svg {
  height: 14px;
  transition: transform 180ms ease;
  width: 14px;
}

.header-language.open > button > svg {
  transform: rotate(180deg);
}

.header-language-menu {
  background: #111a25;
  border: 1px solid #2a3849;
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  display: none;
  max-height: min(460px, calc(100vh - 150px));
  min-width: 200px;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 1300;
}

.header-language.open .header-language-menu {
  display: grid;
}

.header-language-option {
  align-items: center;
  border-radius: 4px;
  color: var(--text-secondary);
  display: flex;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  gap: 10px;
  min-height: 38px;
  padding: 7px 9px;
  transition: background 180ms ease, color 180ms ease;
}

.header-language-option:hover,
.header-language-option.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.site-header .btn {
  border-radius: 999px;
  font-size: 14px;
  min-height: 44px;
  padding: 12px 24px;
  transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header .btn:hover {
  transform: translateY(-2px);
}

.site-header .btn:active {
  transform: translateY(0) scale(0.98);
}

.site-header .btn-primary {
  background: var(--lime);
  border: 1.5px solid var(--lime);
  color: var(--navy-primary);
}

.site-header .btn-primary:hover {
  background: var(--lime-hover);
  border-color: var(--lime-hover);
  box-shadow: 0 0 0 1px rgba(240, 246, 255, 0.16), 0 0 26px rgba(147, 254, 77, 0.38), 0 16px 36px rgba(0, 0, 0, 0.3);
  color: var(--navy-primary);
  transform: translateY(-2px) scale(1.03);
}

.site-header .btn-primary:focus-visible {
  outline: 3px solid rgba(147, 254, 77, 0.25);
  outline-offset: 3px;
}

.site-header .btn-ghost {
  background: transparent;
  border: 1.5px solid var(--navy-border);
  color: var(--text-primary);
}

.site-header .btn-ghost:hover {
  background: rgba(2, 227, 254, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(2, 227, 254, 0.18), 0 14px 34px rgba(0, 0, 0, 0.26);
  color: var(--cyan);
}

.mobile-menu-btn {
  align-items: center;
  background: rgba(20, 38, 68, 0.72);
  border: 1.5px solid var(--navy-border);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
  display: none;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
  width: 40px;
}

.mobile-menu-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.mobile-menu-btn svg {
  height: 20px;
  width: 20px;
}

.mobile-drawer {
  background: var(--navy-surface);
  border-left: 1px solid var(--navy-border);
  bottom: 0;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.42);
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  padding: 20px;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: var(--modopen-toolbar-offset, 0px);
  transform: translateX(100%);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
  width: min(360px, 86vw);
  z-index: 1200;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.drawer-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mobile-drawer a {
  align-items: center;
  border-bottom: 1px solid var(--navy-border);
  color: var(--text-secondary);
  display: flex;
  font-family: var(--font-ui);
  font-weight: 600;
  min-height: 48px;
  transition: color 180ms ease, transform 180ms ease;
}

.mobile-drawer a:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.mobile-drawer .drawer-auth-action {
  border: 1px solid var(--navy-border);
  border-radius: 4px;
  gap: 10px;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
}

.mobile-drawer .drawer-auth-action:hover {
  border-color: var(--cyan);
  transform: none;
}

.mobile-drawer .header-language {
  width: 100%;
}

.mobile-drawer .header-language > button {
  border-radius: 4px;
  justify-content: flex-start;
  width: 100%;
}

.mobile-drawer .header-language > button > svg {
  margin-left: auto;
}

.mobile-drawer .header-language-menu {
  box-shadow: none;
  margin-top: 8px;
  max-height: 260px;
  min-width: 0;
  position: static;
  width: 100%;
}

.mobile-drawer .header-language-option {
  border-bottom: 0;
  min-height: 40px;
  padding: 7px 9px;
}

.mobile-drawer .header-language-option:hover {
  transform: none;
}

.mobile-drawer > .btn-primary {
  background: var(--lime);
  border: 1.5px solid var(--lime);
  border-radius: 999px;
  color: var(--navy-primary);
  margin-top: 4px;
}

.mobile-drawer > .btn-primary:hover {
  background: var(--lime-hover);
  border-color: var(--lime-hover);
  box-shadow: 0 0 26px rgba(147, 254, 77, 0.34);
  color: var(--navy-primary);
  transform: translateY(-2px) scale(1.02);
}

.site-footer {
  background: #071020;
  border-top: 1px solid rgba(30, 52, 88, 0.86);
  margin-top: 0;
  padding: 58px 0 34px;
}

.footer-inner {
  margin: 0 auto;
  width: min(1180px, calc(100% - 64px));
}

.footer-top {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(118px, 1fr)) minmax(170px, 1fr);
}

.footer-brand {
  color: var(--text-secondary);
  display: grid;
  gap: 16px;
}

.footer-logo {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  transition: opacity 180ms ease, transform 180ms ease;
  width: max-content;
}

.footer-logo:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.footer-logo img {
  height: auto;
  object-fit: contain;
  width: 176px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  max-width: 320px;
}

.footer-col {
  min-width: 0;
}

.footer-col h3 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.footer-links {
  color: var(--text-secondary);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
}

.footer-links a,
.footer-links button {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  padding: 0;
  position: relative;
  text-align: left;
  transition: color 180ms ease, transform 180ms ease;
  width: max-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.footer-links a:focus-visible {
  color: var(--cyan);
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.footer-links a::after,
.footer-links button::after {
  background: var(--cyan);
  bottom: -3px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer-links a:hover::after,
.footer-links button:hover::after {
  transform: scaleX(1);
}

.footer-bottom {
  align-items: center;
  border-top: 1px solid rgba(30, 52, 88, 0.7);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 18px;
  justify-content: space-between;
  margin-top: 46px;
  padding-top: 22px;
}

.footer-company {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  min-width: 0;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.footer-company-icon {
  display: inline-flex;
  flex: 0 0 18px;
  margin-top: 2px;
}

.footer-company-icon svg {
  width: 18px;
  height: 18px;
}

.footer-company-separator {
  margin: 0 8px;
}

.footer-language-nav {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(18px, 2vw, 30px);
  justify-content: center;
  margin: 48px auto 0;
  width: 100%;
}

.footer-language-link {
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: block;
  flex: 0 0 24px;
  height: 18px;
  opacity: 0.72;
  overflow: hidden;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  width: 24px;
}

.footer-language-link img {
  height: 18px;
  object-fit: cover;
  width: 24px;
}

.footer-language-link:hover,
.footer-language-link:focus-visible,
.footer-language-link.active {
  box-shadow: 0 0 0 1px rgba(2, 227, 254, 0.72), 0 0 16px rgba(2, 227, 254, 0.22);
  opacity: 1;
  transform: translateY(-2px) scale(1.08);
}

.footer-cookie-settings {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font: inherit;
  font-family: var(--font-ui);
  padding: 0;
  transition: color 180ms ease, transform 180ms ease;
}

.prd-page-route .footer-cookie-settings {
  display: inline-flex;
}

.footer-cookie-settings:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-badges span {
  align-items: center;
  border: 1px solid rgba(30, 52, 88, 0.9);
  border-radius: 4px;
  color: var(--text-secondary);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  min-height: 28px;
  padding: 5px 9px;
}

@media (max-width: 1180px) {
  .site-header .nav-links {
    gap: 18px;
  }

  .site-header .brand {
    min-width: 198px;
  }

  .site-header .brand-logo {
    width: 190px;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1041px) and (max-height: 760px) {
  .site-shell,
  body {
    --site-header-height: 100px;
  }

  .site-header {
    height: var(--site-header-height);
  }

  .site-header .nav-inner {
    width: min(1440px, calc(100% - 64px));
  }

  .site-header .brand {
    min-width: 190px;
  }

  .site-header .brand-logo {
    width: 184px;
  }

  .site-header .nav-links {
    font-size: 15px;
    gap: clamp(18px, 2vw, 34px);
  }

  .site-header .nav-links a {
    height: var(--site-header-height);
  }

  .site-header .nav-links a::after {
    bottom: 26px;
  }

  .site-header .top-actions .btn {
    min-height: 48px;
    padding: 12px 22px;
  }
}

/* Keep long localized labels separate from the language and account controls. */
@media (min-width: 1281px) and (max-width: 1440px) {
  .site-header .brand { min-width: 170px; }
  .site-header .brand-logo { width: 170px; }
  .site-header .nav-links { font-size: 14px; gap: 18px; }
  .site-header .nav-links a:last-child { display: none; }
  .site-header .top-actions .btn { padding: 12px 16px; }
}

@media (max-width: 1280px) {
  .site-shell,
  body {
    --site-header-height: 64px;
  }

  .site-header {
    height: var(--site-header-height);
  }

  .site-header .nav-inner {
    width: calc(100% - 32px);
  }

  .site-header .brand {
    min-width: 0;
  }

  .site-header .top-actions {
    min-width: 0;
  }

  .site-header .brand-logo {
    width: 142px;
  }

  .site-header .nav-links,
  .site-header .top-actions .btn {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 1040px) {
  .footer-inner {
    width: calc(100% - 40px);
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-header .brand-logo {
    width: 128px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-language-nav {
    gap: 18px 22px;
    margin-top: 40px;
    max-width: 320px;
    flex-wrap: wrap;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
