/*
 * Shared top navigation for the Gbely pages.
 *
 * One stylesheet rather than a copy per page, because there are five of
 * them across four directories and they had no way to reach each other
 * at all — every page was a dead end you had to leave by editing the URL.
 *
 * The pages do not share a palette *definition*: the rules document and
 * the web pages call their background `--paper`, the architecture page
 * calls it `--ground`, and its muted text is `--ink-muted` rather than
 * `--muted`. So every colour here is a fallback chain ending in the
 * Panaxeo brand value, which means the bar adopts whichever palette the
 * page it sits on already declared — including that page's dark mode,
 * without this file knowing anything about dark mode.
 *
 * `web/status.html` is deliberately not in the bar, though it is one of
 * the five pages. It answers about *one* submission and needs that
 * submission's id in the query string; reached without one it can only
 * say "V adrese chýba id odovzdania". There are exactly two ways to
 * arrive holding an id — the redirect `web/index.html` performs after an
 * upload, and the link in the result e-mail — and a nav item is neither.
 * It was a menu entry whose every use was a dead end.
 */

.gbely-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--paper, var(--ground, #F2F2F2));
  border-bottom: 1px solid var(--line, #DEDFE0);
  /* No webfont in this stack on purpose. Two of the seven pages load
     IBM Plex Mono and five do not, so naming it first made the bar render
     in a different face — and at visibly different metrics — depending on
     which page you were standing on, all at an identical 11.52px. A
     system stack resolves the same everywhere because no page can change
     what it lands on. */
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas,
               'Liberation Mono', monospace;
  font-size: 0.72rem;
  /* Declared, not inherited: the pages set body line-heights between 1.08
     and 1.62, which moved the bar's height around by a pixel. */
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gbely-nav__mark {
  font-size: 0.72rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent, #16AB8B);
  text-decoration: none;
  margin-right: auto;
}

.gbely-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: none;
}

.gbely-nav li { margin: 0; }

.gbely-nav a {
  /* Stated here, not merely inherited from .gbely-nav: a directly
     declared font-size on a page's own `nav a` rule beats an inherited
     one no matter how much less specific it is, which is exactly how
     three of these pages ended up with a larger bar than the rest. */
  font-size: 0.72rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--muted, var(--ink-muted, #717375));
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.gbely-nav a:hover,
.gbely-nav a:focus-visible {
  color: var(--ink, #000);
}

/* The page you are on, marked once in the markup so it cannot drift out
   of step with the file it actually lives in. */
.gbely-nav a[aria-current="page"] {
  color: var(--accent, #16AB8B);
  border-bottom-color: var(--accent, #16AB8B);
}

@media (max-width: 520px) {
  .gbely-nav { padding: 0.7rem 1rem; font-size: 0.68rem; }
  .gbely-nav__mark { margin-right: 0; width: 100%; }
}
