:root {
  --z4-header-height: clamp(60px, 3.82vw, 74px);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

#nav.z4-site-header {
  position: relative;
  inset: auto;
  z-index: 30;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: var(--z4-header-height);
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #ffffff13;
  border-radius: 0;
  background: #101011ed;
  color: #f1f1f1;
  box-shadow: none;
  backdrop-filter: none;
  font: 400 14px/18px "Segoe UI", Arial, sans-serif;
  letter-spacing: normal;
}

.z4-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(1364px, calc(100% - clamp(48px, 10vw, 192px)));
  height: 100%;
  margin: 0 auto;
  padding: 0;
}

#nav.z4-site-header a {
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.z4-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
}

.z4-header-brand img {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
}

.z4-header-links,
.z4-header-actions {
  display: flex;
  align-items: center;
}

.z4-header-links {
  gap: 5px;
  margin-left: 36px;
}

.z4-header-actions {
  gap: 8px;
  margin-left: auto;
}

.z4-header-link,
.z4-header-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: border-color 200ms, background-color 200ms, box-shadow 200ms;
}

.z4-header-button {
  border-color: #332f2d;
  background: #0a0909;
}

.z4-header-button svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.z4-header-link:hover {
  border-color: #ffffff18;
  background: #ffffff08;
}

.z4-header-button:hover {
  border-color: #77777e;
  box-shadow: 0 2px 12px #ffffff0e;
}

.z4-header-link[aria-current],
.z4-header-button[aria-current] {
  border-color: transparent;
  background: transparent;
  -webkit-text-stroke: .22px currentColor;
}

.z4-nav-indicator {
  position: absolute;
  inset: 0;
  border: 1px solid #0188ff;
  border-radius: 6px;
  background: #0188ff16;
  pointer-events: none;
}

#nav.z4-site-header a:focus-visible {
  outline: 2px solid #efefef;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  :root { --z4-header-height: 54px; }
  .z4-header-row { width: calc(100% - 36px); gap: 8px; }
  .z4-header-brand { font-size: 20px; gap: 7px; }
  .z4-header-brand img { width: 26px; height: 26px; }
  .z4-header-links { margin-left: 4px; gap: 0; }
  .z4-header-actions { gap: 6px; }
  .z4-header-link,
  .z4-header-button { padding: 7px 9px; font-size: 12px; }
}

@media (max-width: 500px) {
  .z4-header-button { width: 40px; min-height: 40px; padding: 0; }
  .z4-header-button span:not(.z4-nav-indicator) { display: none; }
}

@media (max-width: 380px) {
  .z4-header-row { width: calc(100% - 16px); gap: 4px; }
  .z4-header-links { margin-left: 0; }
  .z4-header-link { padding-inline: 5px; }
  .z4-header-actions { gap: 4px; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  #nav.z4-site-header { view-transition-name: z4-header; }

  ::view-transition { pointer-events: none; }
  ::view-transition-group(*) {
    animation-duration: 290ms;
    animation-timing-function: cubic-bezier(.2,.72,.25,1);
  }
  ::view-transition-group(z4-header),
  ::view-transition-new(z4-header) { animation: none; }
  ::view-transition-old(z4-header) { display: none; }
  ::view-transition-old(root) { animation: z4-page-out 210ms ease both; }
  ::view-transition-new(root) { animation: z4-page-in 270ms cubic-bezier(.2,.72,.25,1) both; }
}

@keyframes z4-page-out { to { opacity: 0; transform: translateY(-3px); } }
@keyframes z4-page-in { from { opacity: 0; transform: translateY(7px); } }
