/* The site's masthead: the one look of topnav() on every surface, 2026-11-13.

   The home page, Council, My Z1RR and the Race Viewer each carried their own
   copy of these rules, and the copies drifted: My Z1RR never muted its links,
   so every section was bright; the viewer set its own size and centred the
   bar; only Council lit the section being read. topnav() links this file
   itself, and /styles.css imports it for Randometrics, so a page cannot drift
   from it by forgetting a rule. Pages style what is around the bar, never the
   bar. Selectors start at nav.topnav so they win over a page's .wrap.

   It sticks where it sits at the top of the page (the site, My Z1RR). Inside
   Council's and the Race Viewer's strips it scrolls away with the strip, and
   the strip isolates it so it stays under their cards and chat panel. */

nav.topnav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  /* Full-width strip; the links sit in the site's 1160px column. */
  padding: 12px max(clamp(20px, 5vw, 64px), calc(50% - 580px + 64px));
  border-bottom: 1px solid #2c3522;
  background: rgba(10, 12, 9, 0.93);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  color: #97a188;
  font: 400 14.08px/1.65 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
}

nav.topnav .home, nav.topnav .topnav-links a { color: #97a188; text-decoration: none; overflow-wrap: normal; }

/* The section being read is lit, as Council is on Council pages. */
nav.topnav .topnav-links a:hover,
nav.topnav .topnav-links a[aria-current="page"] { color: #ece3cf; }

nav.topnav a:focus-visible { outline: 2px solid #d9a441; outline-offset: 3px; }

nav.topnav .home { display: flex; align-items: center; align-self: center; flex: none; opacity: 1; pointer-events: auto; }
nav.topnav .home img { display: block; width: 26px; height: 26px; object-fit: contain; }

nav.topnav .topnav-links { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 18px; min-width: 0; }
nav.topnav .topnav-links .short { display: none; }

/* The account entry in the bar's own colours, not a page's: Council's --muted is blue-grey. */
nav.topnav .portal-signin { text-decoration: none; }
nav.topnav .portal-signin svg { color: #97a188; border-color: #2c3522; }
nav.topnav .portal-account summary img { border-color: #4f8f2c; }
/* A page's generic summary rules (the viewer's chevron, gap, hover and open border) stay off it. */
nav.topnav .portal-account summary { gap: 0; border: 0; background: none; border-radius: 0; }
nav.topnav .portal-account summary::before { content: none; }

/* My Z1RR is the account's own page: its entry is the one lit. */
nav.topnav .portal-account[data-here] .portal-signin svg { color: #ece3cf; border-color: #ece3cf; }
nav.topnav .portal-account[data-here] summary img { border-color: #ece3cf; }

/* TTP and TC are what the community calls them anyway; below 620px the short
   forms show, and the full names stay in the markup for screen readers. */
@media (max-width: 620px) {
  nav.topnav .topnav-links .full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  nav.topnav .topnav-links .short { display: inline; }
}
