/* ──────────────────────────────────────────────────────────────────────
   Shared site header — used by index.html and the three legal pages
   (/privacy-policy, /terms-of-use, /cookie-policy) so all four pages
   show an identical statusbar + brand row.

   Self-contained: uses literal hex values so it works on pages that
   define their own --bg / --text / --hairline tokens (the legal pages)
   without colliding.
   ────────────────────────────────────────────────────────────────────── */

:root {
  --header-h: 112px;             /* statusbar 36 + header-inner 76 */
}

/* Push body content below the fixed header */
body { padding-top: var(--header-h); overflow-x: hidden; }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: auto;
  background: #06070C;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 30;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* Statusbar — live network telemetry */
.site-header .statusbar {
  height: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(242, 243, 248, 0.80);
}
.site-header .statusbar-inner {
  width: 100%;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-header .statusbar-l,
.site-header .statusbar-r { display: flex; gap: 22px; align-items: center; }
.site-header .statusbar strong {
  font-weight: 500;
  color: rgba(242, 243, 248, 0.80);
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
}
.site-header .live-pip {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E7011F;
  box-shadow: 0 0 8px rgba(231, 1, 31, 0.55);
  margin-right: 8px;
  animation: siteHeaderPulse 2.4s infinite;
}
@keyframes siteHeaderPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Brand row */
.site-header .header-inner {
  width: 100%;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 76px;
}
.site-header .brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #FFFFFF;
  text-decoration: none;
}
.site-header .brand-mark .xst-mark {
  width: 22px; height: 30px;
  display: block;
  color: #FFFFFF;
  flex-shrink: 0;
}
.site-header .brand-mark .wordmark {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  line-height: 1;
}
.site-header .brand-mark .wordmark .wm-accent {
  color: #E7011F;
  font-weight: 700;
}

/* Search field */
.site-header .search-field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  height: 44px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0 16px;
  transition: border-color 0.15s, background 0.15s;
}
.site-header .search-field:focus-within {
  border-color: #E7011F;
  background: rgba(231, 1, 31, 0.04);
}
.site-header .search-field svg {
  color: rgba(242, 243, 248, 0.62);
  flex-shrink: 0;
  margin-right: 12px;
}
.site-header .search-field input {
  width: 100%;
  border: 0; outline: 0;
  background: transparent;
  color: #F2F3F8;
  font-family: 'IBM Plex Mono', ui-monospace, "SF Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.site-header .search-field input::placeholder {
  color: rgba(242, 243, 248, 0.62);
}

.site-header .network-select {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  color: #F2F3F8;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  height: 44px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.site-header .network-select .pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6ED25C;
  box-shadow: 0 0 6px rgba(110, 210, 92, 0.4);
}
.site-header .network-select svg { color: rgba(242, 243, 248, 0.62); }

.site-header .search-btn {
  background: #E7011F;
  color: #fff;
  border: 0;
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.site-header .search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(231, 1, 31, 0.35);
}

.site-header .icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(242, 243, 248, 0.80);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer;
}
.site-header .icon-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
  .site-header .header-inner { gap: 12px; }
  .site-header .network-select { display: none; }
}
@media (max-width: 900px) {
  /* Each statusbar span keeps text together — no mid-item wrapping. */
  .site-header .statusbar-l > span,
  .site-header .statusbar-r > span { white-space: nowrap; }
  /* Drop INTERVAL on the left, NODES + CHAIN on the right. */
  .site-header .statusbar-l > span:nth-child(n+3),
  .site-header .statusbar-r > span:nth-child(1),
  .site-header .statusbar-r > span:nth-child(2) { display: none; }
  .site-header .statusbar-inner { padding: 0 24px; gap: 16px; }
  .site-header .statusbar-l, .site-header .statusbar-r { gap: 14px; }
}
@media (max-width: 720px) {
  :root { --header-h: 96px; }    /* statusbar 36 + header-inner 60 */
  .site-header .statusbar { font-size: 11px; letter-spacing: 0.06em; }
  .site-header .statusbar-inner { padding: 0 20px; gap: 12px; }
  .site-header .header-inner { padding: 8px 20px; height: 60px; gap: 10px; }
  /* Wordmark + logo stay at full size on mobile — no scaling. */
  /* On mobile the search field is hidden, so the search button has no
     field to dispatch to — drop it too. Hamburger anchors the right.
     menu.js wraps .icon-btn in .site-menu-wrap, so margin-left:auto
     has to live on the wrapper to push the actual flex item right. */
  .site-header .search-field { display: none; }
  .site-header .search-btn   { display: none; }
  .site-header .site-menu-wrap,
  .site-header .icon-btn     { margin-left: auto; }
}
@media (max-width: 460px) {
  :root { --header-h: 92px; }    /* statusbar 36 + header-inner 56 */
  .site-header .statusbar { font-size: 10px; }
  .site-header .statusbar-inner { padding: 0 16px; gap: 10px; }
  .site-header .header-inner { padding: 6px 16px; height: 56px; gap: 10px; }
  /* Wordmark + xst-mark stay at full size — no scaling on mobile. */
  .site-header .icon-btn { width: 40px; height: 40px; }
}
