.pm3k-modern-header-frame {
  width: min(100%, 1040px);
  min-height: 116px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

.pm3k-modern-header {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 36px;
  color: var(--txt, #e9e9ef);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.pm3k-modern-header-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--txt, #e9e9ef);
  text-decoration: none;
}

.pm3k-modern-header-logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 16px;
}

.pm3k-modern-header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.pm3k-modern-header-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  color: var(--txt, #e9e9ef);
  background: rgba(255, 255, 255, .05);
  font: 700 22px/1 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  cursor: pointer;
}

.pm3k-modern-header-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.pm3k-modern-menu-open {
  overflow: hidden;
}

.pm3k-modern-header-nav a,
.pm3k-modern-header-link-button {
  margin: 0;
  padding: 0;
  color: rgba(246, 247, 251, .76);
  background: transparent;
  border: 0;
  font: 600 13px/1.4 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.pm3k-modern-header-link-button {
  cursor: pointer;
}

.pm3k-modern-header-link-button:disabled {
  opacity: .6;
  cursor: wait;
}

.pm3k-modern-header-nav a:hover,
.pm3k-modern-header-nav a:focus-visible,
.pm3k-modern-header-link-button:hover,
.pm3k-modern-header-link-button:focus-visible {
  color: var(--txt, #e9e9ef);
}

.pm3k-modern-header-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--accent, #7aa2ff);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.pm3k-modern-header-status {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  color: #ffb7b7;
  font-size: 12px;
  font-weight: 600;
}

.pm3k-modern-header-status[hidden] {
  display: none;
}

.pm3k-modern-header :where(a, button):focus-visible {
  outline: 3px solid rgba(142, 245, 255, .85);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 760px) {
  .pm3k-modern-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .pm3k-modern-header-toggle {
    display: inline-flex;
  }

  .pm3k-modern-header-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1200;
    width: min(92vw, 340px);
    max-width: 100%;
    max-height: calc(100vh - 120px);
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: var(--card, #171821);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    text-align: left;
  }

  .pm3k-modern-header.is-menu-open .pm3k-modern-header-nav {
    display: flex;
  }

  .pm3k-modern-header-nav a {
    display: block;
    width: 100%;
    padding: 8px 2px;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
  }

  .pm3k-modern-header-status {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
  }
}
