/* The site-wide header.
 *
 * Every page under public/ is reachable from every other page through
 * this one bar. Before it there was no path at all between the landing
 * page, the deep-link pages and the season portal — each was an island
 * you could only arrive at by typing its address or following a link
 * from outside.
 *
 * It lives in its own file rather than in shared.css because index.html
 * deliberately does NOT load shared.css: that file centres the body as a
 * single card, which is right for the small deep-link pages and wrong
 * for a long marketing page. nav.css carries no layout opinion beyond
 * the bar itself, so both can load it.
 *
 * Colours come from whichever palette the page already defines (both
 * shared.css and index.html declare the same :root variables), with the
 * literal hex as a fallback so the bar never renders unstyled on a page
 * that defines neither.
 *
 * Load it AFTER the page's own styles — the body padding below has to
 * win over shared.css's own padding. */

.sitenav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 14px;
  background: var(--backboard, #1D2126);
  border-bottom: 1px solid var(--hairline, rgba(244, 244, 242, 0.08));
  /* A hairline alone disappeared against a dark page below it — nothing
     marked where the bar ends and the content begins. A soft shadow
     gives it an edge without adding visible weight. */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  /* Narrow screens scroll the bar sideways rather than wrapping it to a
     second row, which would change the page's top offset and push the
     content under it. */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.sitenav::-webkit-scrollbar { display: none; }

.sitenav .brand {
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--buzzer, #FF7A1A);
  text-decoration: none;
  padding: 0 12px 0 4px;
  margin-right: 4px;
  border-right: 1px solid var(--hairline, rgba(244, 244, 242, 0.08));
  align-self: stretch;
  display: flex;
  align-items: center;
}

.sitenav a.nav {
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--chalk-dim, #8A9099);
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.sitenav a.nav:hover { color: var(--chalk, #F4F4F2); background: rgba(244, 244, 242, 0.05); }

/* The page you are on. Set with aria-current so the marker is announced,
   not only drawn. A border, not just a fill, so the marker still reads
   in a bright room where a 7%-opacity fill nearly disappears. */
.sitenav a.nav[aria-current="page"] {
  color: var(--chalk, #F4F4F2);
  background: rgba(244, 244, 242, 0.08);
  border-color: var(--hairline, rgba(244, 244, 242, 0.08));
}

/* The portal is a different surface from the marketing pages, so it sits
   apart from them rather than reading as one more page in the run. */
.sitenav .spacer { flex: 1 1 auto; min-width: 12px; }

.sitenav a.nav.portal {
  color: var(--buzzer, #FF7A1A);
  border: 1px solid rgba(255, 122, 26, 0.35);
  margin-left: 4px;
}
.sitenav a.nav.portal:hover {
  color: var(--blacktop, #14171A);
  background: var(--buzzer, #FF7A1A);
}

/* Phones held upright: the bar is one row that scrolls sideways, which
   left "My account" cut off at the right edge and looking broken. Tighter
   spacing, a smaller logo and slightly smaller labels fit the whole bar on
   a 375-point-wide screen. */
@media (max-width: 480px) {
  .sitenav { padding: 0 8px; gap: 0; }
  .sitenav .brand { font-size: 11px; letter-spacing: 1px; padding: 0 8px 0 2px; margin-right: 2px; }
  .sitenav .brand img { height: 26px !important; width: 26px !important; }
  /* Smaller labels, but the place a thumb can land stays at least 44
     points tall (Apple's minimum touch target): the link fills that
     height and centres its label inside it. */
  .sitenav a.nav {
    padding: 0 7px; font-size: 10px; letter-spacing: 0.5px;
    min-height: 44px; display: inline-flex; align-items: center;
  }
  .sitenav a.nav.portal { margin-left: 2px; }
}
@media (max-width: 359px) {
  /* The oldest, narrowest iPhones: the logo mark alone, where there is one. */
  .sitenav .brand:has(img) { font-size: 0; gap: 0; }
}

/* Clears the fixed bar. Overrides shared.css's own body padding, which
   is why this file loads after it. */
body { padding-top: 52px; }

/* The site footer.
 *
 * Privacy, Terms and Support existed only on a personal GitHub Pages
 * address and were linked from nowhere on netspect.app. They are now
 * served from this site, and every page carries this footer so the legal
 * pages are never more than one click away — which matters more now that
 * the App charges a referee fee.
 *
 * Deliberately NOT fixed to the bottom of the window: these pages vary
 * from one short card to a long policy, and a pinned bar would sit over
 * the content on the short ones. It flows at the end of the document. */
.sitefoot {
  border-top: 1px solid var(--hairline, rgba(244, 244, 242, 0.08));
  padding: 22px 16px 30px;
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.7px;
  color: var(--chalk-faint, #8C929B);
}
.sitefoot a {
  color: var(--chalk-dim, #8A9099);
  text-decoration: none;
  white-space: nowrap;
}
.sitefoot a:hover { color: var(--chalk, #F4F4F2); }
.sitefoot .co { width: 100%; text-align: center; margin-top: 4px; }

/* shared.css makes the body a centring flex ROW, so a footer added as a
   second child would sit BESIDE the card rather than under it. Column
   keeps the card centred and puts the footer beneath. Inert on
   index.html, which is not a flex body. */
body { flex-direction: column; }
.sitefoot { width: 100%; }
