.site-global-header,
.site-global-header * {
  box-sizing: border-box;
}

html:has(.site-global-header),
body:has(.site-global-header) {
  overflow-x: hidden;
}

.ad-placeholder,
.adsense-placeholder,
[data-ad-placeholder] {
  display: none !important;
}

.site-global-header {
  --site-header-bg: #ffffff;
  --site-header-ink: #111820;
  --site-header-muted: #5f6d79;
  --site-header-line: #e2e8f0;
  --site-header-accent: #2F6BFF;
  --site-header-accent-hover: #1D4ED8;
  --site-header-accent-soft: #EFF6FF;
  --site-header-accent-strong: #1E40AF;
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100vw;
  max-width: none;
  margin: 0 0 0 calc(50% - 50vw);
  padding: 0;
  border-bottom: 1px solid var(--site-header-line);
  background: color-mix(in srgb, var(--site-header-bg) 94%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(24, 33, 39, .05);
}

.site-global-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 12px;
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--site-header-ink);
  text-decoration: none;
  line-height: 1;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand-mark {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #1D4ED8 44%, var(--site-header-line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--site-header-bg) 88%, #2563EB 12%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.site-brand-mark svg {
  position: absolute;
  inset: 5px;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--site-header-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: .22;
}

.site-brand-mark b {
  position: relative;
  display: inline-block;
  padding: 1px 2px;
  border-radius: 4px;
  color: #1D4ED8;
  background: color-mix(in srgb, var(--site-header-bg) 82%, transparent);
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0;
  transform: skewX(-8deg);
}

.site-wordmark {
  color: #1E40AF;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-wordmark span {
  color: #2563EB;
}

.site-brand:hover .site-wordmark,
.site-brand:hover .site-brand-mark b {
  color: #2F6BFF;
}

.site-global-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0 0 2px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.site-global-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: color-mix(in srgb, var(--site-header-ink) 70%, var(--site-header-muted));
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.site-global-nav a:hover,
.site-global-nav a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--site-header-accent) 35%, var(--site-header-line));
  color: var(--site-header-accent-strong);
  background: color-mix(in srgb, var(--site-header-accent-soft) 84%, var(--site-header-bg));
  text-decoration: none;
}

.site-global-nav a[aria-current="page"] {
  font-weight: 800;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--site-header-accent) 14%, transparent);
}

@media (max-width: 720px) {
  .site-global-inner {
    gap: 12px;
    padding: 10px;
  }

  .site-brand {
    gap: 7px;
  }

  .site-brand-mark {
    width: 32px;
    height: 32px;
  }

  .site-brand-mark svg {
    inset: 4px;
    width: 24px;
    height: 24px;
  }

  .site-wordmark {
    font-size: 16px;
  }

  .site-global-nav a {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }
}

body:not(.light) .site-global-header {
  --site-header-bg: #0f172a;
  --site-header-ink: #e2e8f0;
  --site-header-muted: #93a4b8;
  --site-header-line: rgba(148, 163, 184, .22);
  --site-header-accent: #60A5FA;
  --site-header-accent-hover: #6F94FF;
  --site-header-accent-soft: rgba(96, 165, 250, .12);
  --site-header-accent-strong: #BFDBFE;
}

body:not(.light) .site-wordmark {
  color: #e2e8f0;
}

body:not(.light) .site-wordmark span,
body:not(.light) .site-brand-mark b {
  color: #60A5FA;
}

body:not(.light) .site-brand:hover .site-wordmark span,
body:not(.light) .site-brand:hover .site-brand-mark b {
  color: #6F94FF;
}
