.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 114px;
  border-bottom: 1px solid var(--line);
  transition: min-height .225s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: gap .225s ease;
}

.brand-logo {
  flex: none;
  object-fit: contain;
  width: 80px;
  height: 80px;
  transition: width .225s ease, height .225s ease;
}

.brand strong {
  display: block;
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.4;
  transition: font-size .225s ease;
}

.brand small {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .04em;
  max-height: 4rem;
  overflow: hidden;
  opacity: 1;
  transition: max-height .225s ease, opacity .225s ease;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.desktop-nav a {
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  padding: .45rem 0;
}

.desktop-nav a[aria-current=page] {
  border-bottom: 1px solid var(--petrol);
  color: var(--petrol);
}

.desktop-nav .nav-contact {
  border: 1px solid var(--petrol);
  padding: .5rem 1.2rem;
}

.desktop-nav .nav-contact:hover {
  background: var(--petrol);
  color: var(--white);
}

.mobile-nav {
  display: none;
}

@media (max-width:1160px) {
  .desktop-nav {
    gap: .9rem;
  }

  .brand {
    gap: .65rem;
  }

  .brand strong {
    font-size: 1rem;
  }
}

@media (max-width:1100px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    position: relative;
    flex: none;
    margin-left: auto;
  }

  .mobile-nav summary {
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .6rem .9rem;
    border: 1px solid var(--line);
    font-size: .9375rem;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav nav {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 12px);
    width: 280px;
    max-width: calc(100vw - 40px);
    max-height: var(--mobile-nav-height, calc(100dvh - 8rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: .5rem;
    padding: .75rem 1.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 12px 25px #25323814;
  }

  .mobile-nav nav a {
    font-weight: 500;
    display: block;
    padding: .7rem 0;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    font-size: .9375rem;
  }

  .mobile-nav nav a:last-child {
    border: 0;
  }

  .mobile-nav [aria-current=page] {
    font-weight: 600;
    color: var(--petrol);
  }

  .header-inner {
    min-height: 96px;
    flex-wrap: wrap;
    padding-block: .75rem;
    row-gap: .5rem;
  }

  .brand {
    max-width: 100%;
  }

  .brand>span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .brand-logo {
    width: 64px;
    height: 64px;
  }
}

@media (max-width:700px) {
  .header-inner {
    min-height: 87px;
    gap: .5rem 1rem;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }
}

@media (max-width:380px) {
  .header-inner {
    gap: .5rem;
  }

  .brand {
    gap: .5rem;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .mobile-nav summary {
    gap: .4rem;
    padding: .5rem .6rem;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  transition: background-color .225s ease;
}

.site-header.is-compact {
  background: #f0f2ef;
}

.site-header.is-compact .header-inner {
  min-height: 68px;
}

.site-header.is-compact .brand-logo {
  width: 42px;
  height: 42px;
}

.site-header.is-compact .brand {
  gap: .7rem;
}

.site-header.is-compact .brand strong {
  font-size: 1rem;
}

.site-header.is-compact .brand small {
  max-height: 0;
  opacity: 0;
}

@media (min-width: 701px) {
  .article-sidebar {
    top: calc(68px + 2rem);
  }
}

@media (max-width: 700px) {
  .site-header.is-compact .header-inner {
    min-height: 64px;
  }

  .site-header.is-compact .brand-logo {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 380px) {
  .site-header.is-compact .brand-logo {
    width: 38px;
    height: 38px;
  }
}
