.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto;
  align-items: center;
  min-height: 74px;
  gap: 22px;
  padding: 0 max(20px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid rgba(231, 198, 139, 0.24);
  color: #f3e5c8;
  background:
    linear-gradient(90deg, rgba(180, 126, 53, 0.05), transparent 28%, transparent 72%, rgba(80, 119, 92, 0.05)),
    rgba(39, 29, 19, 0.98);
  box-shadow: 0 6px 22px rgba(38, 22, 12, 0.25);
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.site-header .brand-logo {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(18, 11, 6, 0.28));
}

.site-header .brand-copy {
  display: grid;
  min-width: 0;
}

.site-header .brand-copy strong {
  color: #f3e4c5;
  font: 700 1.02rem/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.site-header .brand-copy small {
  margin-top: 3px;
  color: #baa98b;
  font-size: 0.53rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-header .site-nav {
  display: flex;
  min-width: 0;
  justify-content: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-header .site-nav::-webkit-scrollbar { display: none; }

.site-header .site-nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 8px 8px;
  border-radius: 3px 6px 2px 5px;
  color: #c9b89a;
  background: transparent;
  font-size: 0.69rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .site-nav a:hover {
  color: #fff0d2;
  background: rgba(233, 205, 155, 0.07);
}

.site-header .site-nav a.active {
  color: #2f281d;
  background: #d7c783;
  box-shadow: 2px 3px 0 rgba(16, 10, 6, 0.2);
  transform: rotate(-0.6deg);
}

.site-header .edition-badge,
.site-header .version-badge,
.site-header .privacy-badge {
  padding: 6px 9px;
  border: 1px solid rgba(213, 170, 97, 0.31);
  border-radius: 2px 5px 2px 4px;
  color: #d0ba91;
  background: rgba(211, 165, 85, 0.045);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
    gap: 12px;
    padding-inline: 15px;
  }
  .site-header .edition-badge,
  .site-header .version-badge,
  .site-header .privacy-badge { display: none; }
  .site-header .site-nav { justify-content: flex-end; }
  .site-header .site-nav a { padding-inline: 7px; font-size: 0.66rem; }
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 66px;
    padding-inline: 10px;
  }
  .site-header .brand-logo { width: 47px; height: 47px; }
  .site-header .brand > .brand-copy { display: none; }
  .site-header .site-nav {
    grid-row: auto;
    width: auto;
    margin: 0;
    padding: 0;
    border-top: 0;
  }
  .site-header .site-nav a { padding: 8px 7px; }
}
