.gc-template-menu {
  position: relative;
  color: inherit;
  font: inherit;
}

.gc-template-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
}

.gc-template-menu summary::-webkit-details-marker { display: none; }

.gc-template-menu svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.gc-template-menu summary svg:last-child { transition: transform .18s ease; }
.gc-template-menu[open] summary svg:last-child { transform: rotate(180deg); }

.gc-template-menu__links {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  color: #172033;
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  box-shadow: 0 12px 28px #1018271a;
}

.gc-template-menu .gc-template-menu__links a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  color: #172033;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  white-space: normal;
  border-radius: 6px;
  transition: background-color .15s ease;
}

.gc-template-menu .gc-template-menu__links a:hover { background: #f1f4f8; }

.gc-template-menu .gc-template-menu__links .gc-template-menu__all {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #e3e7ed;
  border-radius: 0;
}

.gc-template-menu__badge {
  margin-left: auto;
  padding: 3px 6px;
  color: #fff;
  background: #172033;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}

.site-header .gc-template-menu__links {
  left: auto;
  right: 0;
}

.gc-template-menu summary:focus-visible,
.gc-template-menu a:focus-visible {
  outline: 2px solid #1485b8;
  outline-offset: 3px;
}

.gc-header-mobile {
  max-height: calc(100dvh - 100%);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

@media (max-width: 1023px) {
  .gc-header-mobile .gc-template-menu__links {
    position: static;
    width: 100%;
    margin-top: 4px;
  }
  .gc-header-mobile .gc-template-menu summary { font-size: 18px; }
}

@media (max-width: 900px) {
  .site-header .gc-template-menu { position: static; }
  .site-header .gc-template-menu__links {
    left: 18px;
    right: 18px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 700px) {
  .site-header .site-header__inner { gap: 8px; }
  .site-header .brand { min-width: 0; flex: 0 1 120px; }
  .site-header .brand img { max-width: 100%; }
  .site-header .gc-template-menu summary {
    min-width: 44px;
    justify-content: center;
    gap: 4px;
  }
  .site-header .gc-template-menu__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .site-header .site-nav .site-nav__cta {
    padding-inline: 8px;
    font-size: 12px;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-template-menu summary svg:last-child,
  .gc-template-menu__links a { transition: none; }
}
