:root {
  --header-height: 68px;
}

.site-header {
  position: absolute;
  top: 30px;
  right: 22px;
  left: 22px;
  z-index: 80;
  width: auto;
  height: var(--header-height);
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.site-header .container {
  width: min(100% - 192px, 1440px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.brand-logo {
  width: 30px;
  height: auto;
  flex: 0 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-subscribe {
  width: 132px;
  padding-right: 0;
  padding-left: 0;
  border-radius: 999px;
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: none;
  color: #ffffff;
}

.header-subscribe:hover {
  border-color: var(--color-primary-dark);
  background: var(--color-primary-dark);
  color: #ffffff;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.icon-button:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.82);
  background: #ffffff;
}

.icon-button[data-copy-link] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
}

.icon-button[data-copy-link]::before {
  content: none;
}

.icon-button[data-copy-link]:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.icon-button:focus-visible {
  outline: 3px solid rgba(49, 130, 246, 0.22);
  outline-offset: 2px;
}

.icon-button .icon {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: 84px;
  min-height: 40px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.language-switch button {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.language-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: var(--color-text);
  outline: 0;
}

@media (max-width: 760px) {
  :root {
    --header-height: 66px;
  }

  .site-header {
    position: absolute;
    top: 18px;
    right: 16px;
    left: 16px;
    width: auto;
    height: 56px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .site-header .container {
    width: 100%;
    padding: 0;
  }

  .header-inner {
    min-width: 0;
    gap: 10px;
  }

  .brand {
    color: #ffffff;
  }

  .brand-logo {
    filter: none;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

  .header-actions .button {
    min-height: 40px;
    font-size: 13px;
  }

  .header-subscribe {
    width: 84px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .language-switch {
    width: 76px;
    min-height: 38px;
  }

  .language-switch button {
    min-width: 0;
    height: 28px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .brand {
    max-width: calc(100vw - 236px);
    min-width: 0;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
