.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  background: rgba(24, 55, 71, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header .header-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
  padding-block: 0;
}

.site-header .logo {
  display: flex;
  flex-direction: column;
  color: var(--white);
  font: 800 1rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .logo span {
  margin-top: 0.15rem;
  color: var(--green-200);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.site-header .nav-actions {
  display: flex;
  width: auto;
  margin-left: auto;
  justify-content: flex-end;
}

.site-header .toolbar-chapter-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.site-header .toolbar-chapter-nav a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 76px;
  min-height: 64px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.site-header .toolbar-chapter-nav .chapter-button-icon {
  display: block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.site-header .toolbar-chapter-nav a:hover,
.site-header .toolbar-chapter-nav a:focus-visible,
.site-header .toolbar-chapter-nav a[aria-current="page"] {
  background: rgba(197, 216, 226, 0.12);
  color: var(--green-200);
}

.site-header a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .site-header .toolbar-chapter-nav {
    gap: 4px;
  }

  .site-header .toolbar-chapter-nav a {
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
    color: var(--green-200);
  }

  .site-header .toolbar-chapter-nav .chapter-button-icon {
    width: 28px;
    height: 28px;
  }

  .site-header .toolbar-chapter-label {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header .container {
    width: min(1120px, calc(100% - 24px));
  }

  .site-header .header-inner {
    min-height: 68px;
    gap: 10px;
  }

  .site-header .logo {
    font-size: 0.92rem;
  }

  .site-header .logo span {
    font-size: 0.61rem;
  }
}
