/* Shared site header — compare.html, table.html
   Relies on CSS vars defined by each page's :root */

header {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.header--sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; user-select: none;
}

.logo-mark {
  width: 37px; height: 37px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark img { width: 37px; height: 37px; display: block; }

.logo-text {
  font-size: 1.06rem; font-weight: 700; color: #fff; white-space: nowrap;
}
.logo-text em { font-style: normal; color: var(--c1); }

.logo-by {
  font-size: 0.68rem; font-weight: 400;
  color: var(--muted); text-decoration: none;
  opacity: 0.45; margin-left: 0.3em;
  vertical-align: middle;
  transition: opacity .15s;
}
.logo-by:hover { opacity: 0.75; }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
.site-nav {
  display: flex; align-items: center; gap: 2px;
  justify-content: center;
}

.snav-link {
  padding: 5px 14px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.snav-link:hover { color: var(--text); background: rgba(255,255,255,.05); border-color: var(--border); }
.snav-link.active { color: var(--text); background: rgba(255,255,255,.08); border-color: var(--border2); }

/* ── Right slot ────────────────────────────────────────────────────────────── */
.header-right {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}
