/* The nav bar: shared by every app page and by the diagnostic test (which has its own page styles).
   Only .top and its children, so it can't clash with whatever page it sits on. Uses theme.css tokens. */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 14px; line-height: 1.4; }
.top .top-in { max-width: var(--page-w); margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; gap: 28px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top .brand { font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.005em; white-space: nowrap; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; align-self: stretch; }
.top nav a { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.top nav a:hover { color: var(--ink); }
.top nav a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.top nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 6px; }
.top .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
@media print { .top { display: none !important; } }
.top .nav-me { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.top .nav-me:hover, .top .nav-me.on { color: var(--ink); border-color: var(--accent); }
