/* ─── Site header: the one header every page uses ─── */
/* Source of truth for both page kinds: the Vite pages pull it in via @import in src/shell/styles.css,
   and the hand-written/static pages (blog, teachers, about, privacy, countries) link /assets/site-nav.css.
   Selectors are class-based so they win over any leftover element rules on a static page. */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 400;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  /* If a phone's fonts are wider than ours, the links drop to a second row instead of running off the screen. */
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 0.7rem 1.2rem;
  background: rgba(15, 12, 41, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.2;
}
.site-nav a,
.site-nav button.nav-avatar {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}
.site-nav a:hover { text-decoration: none; }
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: #ffd166;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.site-nav .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.site-nav .nav-links { display: flex; gap: 0.7rem; align-items: center; flex-wrap: nowrap; margin-left: auto; }
/* 44px tall tap targets; the side padding is part of the gap between links, so the row is no wider than before. */
.site-nav .nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.4rem; color: #f4f1ea; font-weight: 600; white-space: nowrap; }
.site-nav .nav-links a:hover { color: #ffd166; }
.site-nav .nav-streak { color: #ffd166; font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
.site-nav .nav-streak:empty { display: none; }

/* Phones: one row. My Quiz is on the home page and footer, so it can leave the header here. */
@media (max-width: 520px) {
  .site-nav { padding: 0.2rem 0.9rem; gap: 0 0.6rem; }
  .site-nav .brand { font-size: 1.2rem; gap: 0.45rem; }
  .site-nav .brand-mark { width: 32px; height: 32px; }
  .site-nav .nav-links { gap: 0; }
  .site-nav .nav-links a { font-size: 0.9rem; padding: 0 0.42rem; }
  .site-nav .nav-links .nav-optional { display: none; }
  /* Just the flame and the number: the words pushed the header wider than the phone. */
  .site-nav .nav-streak-word { display: none; }
}
/* Learning is wider than Blog was. At 320–360px the brand and Daily, Teachers, Learning still share one row. */
@media (max-width: 380px) {
  .site-nav .nav-streak { display: none; }
  .site-nav { padding: 0.15rem 0.45rem; gap: 0 0.3rem; }
  .site-nav .brand { font-size: 0.95rem; gap: 0.25rem; }
  .site-nav .brand-mark { width: 26px; height: 26px; }
  .site-nav .nav-links a { font-size: 0.78rem; padding: 0 0.12rem; }
}
