.site-header,
.site-header * { box-sizing: border-box; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 72px;
  padding: 0;
  background: #ffffff;
  color: #0e1114;
  border-bottom: 1px solid #e5e7eb;
  font-family: Inter, "Segoe UI", sans-serif;
  line-height: 1;
}

[data-theme="dark"] .site-header {
  background: #0e1114;
  color: #ffffff;
  border-bottom-color: #27303a;
}

.site-header .header-inner {
  width: min(1180px, calc(100% - 40px));
  height: 71px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header .brand-logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: 268px;
  height: 48px;
  overflow: hidden;
}

.site-header .brand-logo img {
  display: block;
  width: 268px;
  height: auto;
}

.site-header .logo-dark { display: none; }
[data-theme="dark"] .site-header .logo-light { display: none; }
[data-theme="dark"] .site-header .logo-dark { display: block; }

.site-header .site-nav {
  display: flex;
  align-items: center;
  gap: 19px;
  margin-left: auto;
}

.site-header .site-nav a {
  padding: 8px 0;
  color: #0e1114;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

[data-theme="dark"] .site-header .site-nav a { color: #ffffff; }
.site-header .site-nav a:hover,
.site-header .site-nav a[aria-current="page"] { color: currentColor; }
.site-header .site-nav a[aria-current="page"] { color: #0e1114; }
[data-theme="dark"] .site-header .site-nav a[aria-current="page"] { color: #ffffff; }
.site-header .nav-external::after { content: "↗"; margin-left: 4px; color: #16a34a; }

.site-header .header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.site-header .icon-button,
.site-header .menu-button {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
  color: #0e1114;
  cursor: pointer;
}

[data-theme="dark"] .site-header .icon-button,
[data-theme="dark"] .site-header .menu-button {
  border-color: #27303a;
  background: #151b22;
  color: #ffffff;
}

.site-header .icon-button svg,
.site-header .menu-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.site-header .theme-sun { display: none; }
[data-theme="dark"] .site-header .theme-moon { display: none; }
[data-theme="dark"] .site-header .theme-sun { display: block; }
.site-header .menu-button { display: none; }

.site-header .header-contact {
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #16a34a;
  border-radius: 0;
  background: #16a34a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.site-header .header-contact:hover { background: #117c38; border-color: #117c38; }

@media (max-width: 1100px) {
  .site-header .site-nav {
    position: fixed;
    inset: 72px 0 auto;
    display: none;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
  }
  [data-theme="dark"] .site-header .site-nav { background: #0e1114; border-bottom-color: #27303a; }
  .site-header .site-nav.open { display: grid; }
  .site-header .site-nav a { padding: 12px 4px; border-bottom: 1px solid #e5e7eb; }
  [data-theme="dark"] .site-header .site-nav a { border-bottom-color: #27303a; }
  .site-header .menu-button { display: grid; }
  .site-header .header-actions { margin-left: auto; }
}

@media (max-width: 600px) {
  .site-header { height: 62px; }
  .site-header .header-inner { width: calc(100% - 24px); height: 61px; gap: 8px; }
  .site-header .brand-logo { width: 190px; height: 37px; }
  .site-header .brand-logo img { width: 190px; }
  .site-header .site-nav { inset-block-start: 62px; }
  .site-header .header-contact { display: none; }
}

@media (max-width: 360px) {
  .site-header .brand-logo { width: 164px; }
  .site-header .brand-logo img { width: 164px; }
}

body.with-ribbon > .site-header {
  width: calc(100% + 40px);
  margin-left: -20px;
}

@media (max-width: 720px) {
  body.with-ribbon > .site-header {
    width: calc(100% + 28px);
    margin-left: -14px;
  }
}