/* geoguess.es — the app shell (docs/redesign/FINAL.md §6 as amended by DECISIONS #26c: "Move the top bar to side bar").
   ≥ 768 px  a quiet LEFT SIDEBAR on paper with one hairline: the mark + wordmark · Play (⌄ six ways to play) · Charts ·
             Learn (⌄ guides, drills, passports) · Leaderboards · Watch · Friends · Messages ·· the account (or Sign in /
             Sign up) · search, the bell, theme and the collapse toggle. 232 px wide, or a 72 px icon rail
             (<html data-sidebar="rail">: remembered from 1200 px; always the layout below it, where the toggle floats
             the full sidebar over the page — js/early.js sets it before paint).
   < 768 px  a 64 px top bar: logo ·· bell (or Sign in) · menu — the menu opens a bottom sheet with everything.
   bare      (account pages, the queue) the logo only, in that same bar, at every width.
   in game   no chrome at all (#game-root owns the viewport, Street View stays full-bleed).
   The admin console (admin/index.html) still uses the top bar further down (.topbar / .topnav / .tb-*). */

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "top" "main";
  min-height: 100vh;
  min-height: 100dvh;
}
.tabbar { display: none !important; } /* legacy markup, if any page still prints it */

/* keyboard focus never lands under the sticky top bar (WCAG 2.4.11): scrolling into view stops below it. The
   sidebar is beside the page, not over it, so --topbar-h is 0 there; the game has no chrome at all. */
html { scroll-padding-top: calc(var(--topbar-h) + var(--sp-3)); }
:root:has(body[data-chrome="game"]) { scroll-padding-top: 0; }
:root:has(body[data-chrome="full"], body[data-chrome="bare"]) { --topbar-h: 64px; }
@media (min-width: 768px) { :root:has(body[data-chrome="full"]) { --topbar-h: 0px; } }

/* ------------------------------------------------------------------ the logo (sidebar, phone bar, footer, admin) */
/* the sextant exactly as drawn (colour file by Day, reverse file at Night) + the wordmark in Geist Mono (#26c) */
.brand { display: inline-flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 44px; min-width: 44px; flex: none; color: var(--ink); text-decoration: none; border-radius: var(--r-pill); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark-night { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark-day { display: none; }
  :root:not([data-theme="light"]) .brand-mark-night { display: block; }
}
:root[data-theme="dark"] .brand-mark-day { display: none; }
:root[data-theme="dark"] .brand-mark-night { display: block; }
.wordmark { display: inline-flex; align-items: center; font: 500 18px/1 var(--font-ui); letter-spacing: -0.02em; white-space: nowrap; color: var(--ink); }
.wordmark .wm-star { width: 7px; height: 9px; margin: 1px 1px 0 2px; fill: var(--brass); flex: none; }

/* ------------------------------------------------------------------ the shell, phone form (also bare pages): a 64 px top bar */
.sidebar {
  grid-area: top;
  position: sticky; top: 0; z-index: var(--z-rail);
  display: flex; align-items: center; gap: var(--sp-3);
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  background: var(--paper);
}
@supports (backdrop-filter: blur(8px)) {
  .sidebar { background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.nv-head { display: flex; align-items: center; flex: none; min-width: 0; }
.sidebar .nv-nav, .nv-more-item { display: none; }
.nv-foot { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.nv-account, .nv-tools { display: flex; align-items: center; gap: 4px; }
.sidebar :is(.nv-search, .nv-theme, .nv-collapse, .nv-signup, .nv-me) { display: none; }
.nv-account .btn .icon { display: none; }
.nv-bell { display: contents; }
.tb-bell { position: relative; }
.tb-bell .count-badge { position: absolute; top: 3px; right: 1px; }
.nv-menu-btn { display: inline-grid; }
body[data-chrome="bare"] .nv-foot { display: none; }

/* labels: shown in the expanded sidebar, hidden (still read) in the rail */
.nv-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ the sidebar (≥ 768 px, full chrome) */
@media (min-width: 768px) {
  body[data-chrome="full"] { --sb-w: var(--rail-w); }
  :root[data-sidebar="rail"] body[data-chrome="full"] { --sb-w: var(--rail-w-collapsed); }
  body[data-chrome="full"] .app { grid-template-columns: var(--sb-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "side main"; }

  body[data-chrome="full"] .sidebar {
    grid-area: side; align-self: start;
    flex-direction: column; align-items: stretch; gap: 0;
    height: 100vh; height: 100dvh;
    padding: var(--sp-5) var(--sp-3) var(--sp-3);
    background: var(--paper);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-right: 1px solid var(--line);
  }
  body[data-chrome="full"] .nv-head { padding: 0 4px; margin-bottom: var(--sp-6); }

  /* the nav scrolls on its own when a short window cannot hold it; the inline padding keeps focus rings unclipped */
  body[data-chrome="full"] .nv-nav {
    display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    margin: 0 calc(-1 * var(--sp-3)); padding: 4px var(--sp-3);
    scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
    /* a cut-off list says so (macOS hides scrollbars until you scroll): a soft edge shows at the top / bottom only
       while there is more to scroll that way. The two `local` paper covers travel with the list and hide the two
       fixed (`scroll`) edges whenever the list is at that end, or short enough to fit. */
    background:
      linear-gradient(var(--paper) 40%, transparent) top / 100% 20px no-repeat local,
      linear-gradient(transparent, var(--paper) 60%) bottom / 100% 20px no-repeat local,
      linear-gradient(color-mix(in srgb, var(--ink) 9%, transparent), transparent) top / 100% 10px no-repeat scroll,
      linear-gradient(transparent, color-mix(in srgb, var(--ink) 9%, transparent)) bottom / 100% 10px no-repeat scroll;
  }
  .nv-list { display: flex; flex-direction: column; gap: 2px; }
  .nv-item { position: relative; }
  .nv-row {
    position: relative; display: flex; align-items: center; gap: var(--sp-3);
    width: 100%; min-height: 44px; padding: 0 14px;
    border: 0; border-radius: var(--r-pill); background: transparent;
    color: var(--ink-2); font-size: var(--fs-14); font-weight: 400; line-height: 1.3; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
  }
  .nv-row .icon { width: 18px; height: 18px; color: var(--ink-2); transition: color var(--t-fast) var(--ease); }
  .nv-row:hover { color: var(--ink); background: var(--paper-2); }
  .nv-row:hover .icon, .nv-row[aria-expanded="true"] .icon { color: var(--ink); }
  .nv-row[aria-expanded="true"] { color: var(--ink); background: var(--paper-2); }
  /* where you are: ink, weight 500 and the 5 px signal dot in the gutter (never colour alone); the group a page
     belongs to (Play while on Rush) is ink + 500 without the dot */
  .nv-row:is([aria-current="page"], .is-current, .is-group) { color: var(--ink); font-weight: 500; }
  .nv-row:is([aria-current="page"], .is-current, .is-group) .icon { color: var(--ink); }
  .nv-row:is([aria-current="page"], .is-current)::before {
    content: ""; position: absolute; left: 4px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
    border-radius: 50%; background: var(--signal);
  }
  /* colour pass (DECISIONS #27): the current row also sits on a soft action wash with its icon in action-ink; the
     label stays ink 500 (14.1:1) and the signal dot stays (4.5:1 on the wash) — never colour alone */
  .nv-row:is([aria-current="page"], .is-current) { background: var(--action-wash); }
  .nv-row:is([aria-current="page"], .is-current) .icon { color: var(--action-ink); }
  .nv-row:is([aria-current="page"], .is-current):hover { background: var(--action-wash-hover); }

  /* Play and Learn fold the old "More" items under a disclosure */
  .nv-has-sub > .nv-row { padding-right: 44px; }
  .nv-disc {
    position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer;
    transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
  }
  .nv-disc:hover { color: var(--ink); background: var(--paper-3); }
  .nv-disc .icon { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
  .nv-disc[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .nv-sub { display: flex; flex-direction: column; margin: 0 0 var(--sp-2); }
  .nv-subrow { padding-left: 44px; font-size: var(--fs-13); }
  .nv-subrow:is([aria-current="page"], .is-current)::before { left: 21px; } /* a sub-item's dot sits in its parent's icon column */

  /* the foot: the account, then the tools row */
  body[data-chrome="full"] .nv-foot { flex-direction: column; align-items: stretch; gap: var(--sp-2); margin: 0; padding-top: var(--sp-4); }
  body[data-chrome="full"] .nv-account { gap: var(--sp-2); }
  body[data-chrome="full"] .nv-account .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
  body[data-chrome="full"] .sidebar :is(.nv-search, .nv-theme, .nv-collapse, .nv-signup) { display: inline-grid; }
  body[data-chrome="full"] .sidebar .nv-signup { display: inline-flex; }
  body[data-chrome="full"] .sidebar .nv-me { display: flex; }
  body[data-chrome="full"] .nv-tools { gap: 2px; padding: 0 2px; }
  body[data-chrome="full"] .nv-collapse { margin-left: auto; }
  body[data-chrome="full"] .nv-menu-btn { display: none; }
  .nv-tool .icon { color: var(--ink-2); }
  .nv-tool:hover .icon, .nv-tool[aria-expanded="true"] .icon { color: var(--ink); }
  .nv-tool[aria-expanded="true"]:not(.nv-collapse) { background: var(--paper-2); }

  /* the account row: avatar · name · flag ·· ⋯ */
  .nv-me {
    align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 10px 0 6px;
    border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font-size: var(--fs-14); text-align: left; cursor: pointer;
    transition: background-color var(--t-fast) var(--ease);
  }
  .nv-me:hover, .nv-me[aria-expanded="true"] { background: var(--paper-2); }
  .nv-me .avatar { --d: 36px; }
  .nv-me .nv-label { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* one line: "pampa-pilot" broke at its hyphen */
  .nv-me .nv-end { margin-left: auto; width: 16px; height: 16px; color: var(--ink-2); }
  .nv-me[aria-current="page"] .nv-label { font-weight: 500; }
}

/* ------------------------------------------------------------------ the icon rail (≥ 768 px, data-sidebar="rail") */
@media (min-width: 768px) {
  :root[data-sidebar="rail"] body[data-chrome="full"] .sidebar { padding-inline: 14px; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-head { padding: 0; justify-content: center; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-nav { margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-nav::-webkit-scrollbar { display: none; }
  :root[data-sidebar="rail"] body[data-chrome="full"] :is(.wordmark, .nv-disc, .nv-sub, .nv-me .flag, .nv-me .flag-rose, .nv-me .nv-end) { display: none; }
  :root[data-sidebar="rail"] body[data-chrome="full"] :is(.nv-label, .nv-account .btn > span) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-more-item { display: block; }
  :root[data-sidebar="rail"] body[data-chrome="full"] :is(.nv-row, .nv-me) { width: 44px; min-height: 44px; padding: 0; justify-content: center; gap: 0; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-has-sub > .nv-row { padding-right: 0; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-me .avatar { --d: 32px; }
  /* in the rail the dot sits under the icon, as under a selected tab */
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-row:is([aria-current="page"], .is-current)::before { left: 50%; top: auto; bottom: 2px; margin: 0 0 0 -2.5px; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-account { flex-direction: column; align-items: center; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-account .btn { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-account .btn .icon { display: block; width: 18px; height: 18px; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-tools { flex-direction: column; align-items: center; padding: 0; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-collapse { margin-left: 0; }
  :root[data-sidebar="rail"] body[data-chrome="full"] .nv-me { align-self: center; }
}

/* ------------------------------------------------------------------ the floating sidebar (768–1199 px, chrome.js)
   Below 1200 px the page always keeps the rail's width (beside a 232 px sidebar a tablet's content column would be
   phone-narrow under desktop rules). The toggle opens the full sidebar OVER the page instead, raised like a menu,
   until a link is picked, Esc, a click outside or Tab out of it. */
@media (min-width: 768px) {
  :root[data-sidebar-float] body[data-chrome="full"] { --sb-w: var(--rail-w-collapsed); }
  :root[data-sidebar-float] body[data-chrome="full"] .sidebar { width: var(--rail-w); box-shadow: var(--shadow-pop); }
}

/* the tooltip that names an icon-only control (the tools, and every row of the rail) — chrome.js places it */
.tooltip.nv-tip { position: fixed; z-index: var(--z-tooltip); white-space: nowrap; animation: gg-rise var(--t-fast) var(--ease); }
.tooltip.nv-tip kbd { margin-left: var(--sp-2); color: var(--paper); border-color: color-mix(in srgb, var(--paper) 45%, transparent); }

/* ------------------------------------------------------------------ main */
.main { grid-area: main; min-width: 0; }
.main:focus { outline: none; }
.page { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--sp-12) var(--gutter) var(--sp-24); min-width: 0; }
.page-loading { min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; gap: var(--sp-4) var(--sp-6); flex-wrap: wrap; margin-bottom: var(--sp-12); }
.page-head > div:first-child { flex: 1; min-width: 0; }
.page-head .eyebrow { margin-bottom: var(--sp-2); }
.page-head .flavour { margin: var(--sp-2) 0 0; font-size: var(--fs-15); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-12); }
.col-8 { grid-column: span 8; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; } .col-12 { grid-column: 1 / -1; }
.col-6 { grid-column: span 6; }
/* main column + a 280 px side column, 96 px apart (C) */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) var(--side-col); gap: var(--sp-12) var(--sp-24); align-items: start; }

/* the footer (components.js siteFooter()) and the legacy .footer */
.site-footer, .footer {
  max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--sp-8) var(--gutter) var(--sp-12);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-6);
  color: var(--ink-2); font-size: var(--fs-13);
}
.site-footer { border-top: 1px solid var(--line); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 var(--sp-6); }
.site-footer a, .footer a { position: relative; color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav a::after { content: ""; position: absolute; inset: 0 -8px; } /* "Help" is 32 px wide: a 44 px hit area, same layout */
.site-footer a:hover, .footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .wordmark { font-size: var(--fs-15); margin-right: var(--sp-4); }
.site-footer .sf-end { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }

/* ------------------------------------------------------------------ the phone menu sheet + search */
.menu-sheet .dialog-body { padding-top: var(--sp-5); }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.ms-group { display: flex; flex-direction: column; padding: var(--sp-2) 0; }
.ms-group + .ms-group { border-top: 1px solid var(--line); }
.ms-label { font-size: var(--fs-12); font-weight: 500; letter-spacing: var(--tracking-label); color: var(--ink-2); padding: var(--sp-2) 0 2px; }
.ms-link { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; padding: 0 var(--sp-2); margin: 0 calc(-1 * var(--sp-2)); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); text-decoration: none; font-size: var(--fs-15); text-align: left; cursor: pointer; width: calc(100% + 2 * var(--sp-2)); }
.ms-link:hover { background: var(--raised-2); color: var(--ink); }
.ms-link[aria-current="page"] { font-weight: 500; background: var(--action-wash); }   /* colour pass: + the action wash */
.ms-link[aria-current="page"] .icon { color: var(--action-ink); }
.ms-link[aria-current="page"]::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); margin-left: -1px; }
.ms-link .icon { width: 18px; height: 18px; color: var(--ink-2); }
.ms-link .menu-meta { margin-left: auto; }
.ms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-4); }
.ms-actions { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-4); }
.search-pop { width: min(420px, calc(100vw - 16px)); padding: 10px; }
.search-results { display: flex; flex-direction: column; margin-top: 6px; }
.search-results:empty { display: none; }
.search-results .menu-label { padding-left: 14px; }
.search-hit { display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-size: var(--fs-14); }
.search-hit:hover, .search-hit:focus-visible { background: var(--raised-2); outline: none; color: var(--ink); }
.search-hit:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.search-hit .icon { width: 16px; height: 16px; color: var(--ink-2); }
.search-hit .who-name { font-weight: 400; }
.search-note { padding: 8px 14px; font-size: var(--fs-13); color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------------ breakpoints (content) */
@media (max-width: 959.98px) {
  :root { --gutter: 32px; }
  .grid-12 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--sp-8); }
  .col-8, .col-4, .col-5, .col-7, .col-6 { grid-column: 1 / -1; }
  .with-side { grid-template-columns: minmax(0, 1fr); gap: var(--sp-12); }
}
@media (max-width: 719.98px) {
  :root { --gutter: 20px; }
  h1, .h1 { font-size: var(--fs-28); line-height: 1.15; }
  .display { font-size: var(--fs-34); }
  .page { padding-top: var(--sp-8); padding-bottom: var(--sp-16); }
  .page-head { margin-bottom: var(--sp-8); }
  .grid-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); }
  .site-footer .sf-end { margin-left: 0; }
  .dialog-body { padding: var(--sp-6); }
}
@media (max-width: 419.98px) { .sidebar { gap: var(--sp-2); } .nv-foot, .nv-account, .nv-tools { gap: 0; } }
@media (max-width: 359.98px) { :root { --gutter: 16px; } .sidebar .wordmark { display: none; } } /* below 360 the mark carries the brand */
.label-short { display: none; }
@media (max-width: 719.98px) { .label-long { display: none; } .label-short { display: inline; } }

/* ------------------------------------------------------------------ chrome modes */
body[data-chrome="game"] .app { display: none; }
body[data-chrome="game"] { overflow: hidden; }
.game-root { position: fixed; inset: 0; z-index: var(--z-base); background: var(--paper); }

/* The keep-alive Maps stage lives here when no page holds it (never display:none: it would stop rendering). */
.stage-park { position: fixed; left: -12000px; top: 0; width: 640px; height: 400px; visibility: hidden; pointer-events: none; overflow: hidden; }

/* ------------------------------------------------------------------ toasts: bottom-centre of the page, 24 px above the edge */
.toasts { position: fixed; left: calc(50% + var(--sb-w, 0px) / 2); bottom: calc(var(--sp-6) + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); width: max-content; max-width: calc(100vw - var(--sb-w, 0px) - 2 * var(--sp-4)); pointer-events: none; }
.toasts > * { pointer-events: auto; }

/* the site-wide notices (chrome.js): quiet, above the page, dismissible */
.site-banner { width: calc(100% - 2 * var(--gutter)); max-width: var(--content-max); margin: var(--sp-4) auto 0; }
.site-banner-text { flex: 1; min-width: 0; }
.site-banner-x { flex: none; margin: -8px -10px -8px 0; color: inherit; }

/* ================================================================== the admin console's top bar (admin/index.html, WP10)
   The public site moved to the sidebar above; the console keeps the redesign's top bar unchanged. */
.topbar {
  position: sticky; top: 0; z-index: var(--z-rail);
  display: flex; align-items: center; gap: var(--sp-8);
  height: 72px;
  padding: 0 var(--gutter);
  background: var(--paper);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar { background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.topnav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.topnav-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2);
  font-size: var(--fs-14); font-weight: 400; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.topnav-link:hover { color: var(--ink); background: var(--paper-2); }
.topnav-link[aria-current="page"], .topnav-link.is-current { color: var(--ink); font-weight: 500; }
.topnav-link[aria-current="page"]::after, .topnav-link.is-current::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--signal); }
.topnav-link .icon { width: 14px; height: 14px; color: var(--ink-2); }
.topnav-link[aria-expanded="true"] { color: var(--ink); background: var(--paper-2); }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.tb-slot { display: flex; align-items: center; gap: 4px; }
.tb-me { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 4px 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font-size: var(--fs-14); cursor: pointer; max-width: 240px; }
.tb-me:hover, .tb-me[aria-expanded="true"] { background: var(--paper-2); }
.tb-me .tb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tb-me .avatar { --d: 32px; }
.topbar .tb-menu-btn { display: none; }
@media (max-width: 1199.98px) { .tb-me .tb-name { display: none; } .tb-me { padding-left: 4px; } }
@media (max-width: 1099.98px) { .topbar { gap: var(--sp-4); } .topbar .tb-theme { display: none; } }
@media (max-width: 859.98px) {
  .topbar { height: 64px; gap: var(--sp-3); }
  .topbar .topnav, .topbar .tb-search, .topbar .tb-signup { display: none; }
  .topbar .tb-menu-btn { display: inline-grid; }
  .tb-me { padding: 0 6px; } .tb-me .flag, .tb-me .flag-rose { display: none; }
}
@media (max-width: 419.98px) { .topbar { gap: var(--sp-2); } .tb-actions { gap: 0; } }
@media (max-width: 359.98px) { .topbar .wordmark { display: none; } }

/* forced colours (Windows High Contrast): the "you are here" dot is a fill, so it is drawn in CanvasText there */
@media (forced-colors: active) {
  :root .nv-row:is([aria-current], .is-current)::before { forced-color-adjust: none; background: CanvasText; }
  :root .nv-row:is([aria-current="page"], .is-current), :root .ms-link[aria-current="page"] { outline: 2px solid Highlight; outline-offset: -2px; } /* the wash is gone there */
}
