/* A backgroundless bar across the top 80px: the logo sits at the left, the category icons are
   centred independent of it. scene.js keeps every shell below this band (its topInset). */
.category-nav {
  position: fixed; z-index: 30; inset: 0 0 auto 0;
  height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  pointer-events: none;                 /* the empty strip stays click-through; only the links catch */
}
.category-nav .brand {
  pointer-events: auto; display: grid; place-items: center; color: var(--ink);
}
.category-nav .brand-mark { width: 34px; height: 34px; display: block; }

/* Centred on the bar, not between the logo and the right edge. */
.category-nav .cats {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0; pointer-events: auto;
}
.category-nav .cats a {
  display: grid; place-items: center; width: 34px; height: 44px;
  color: var(--muted); text-decoration: none;      /* inactive: grey, no background */
}
.category-nav .cats a:hover { color: var(--ink); }
.category-nav .cats a[aria-current="page"] { color: var(--ink); }   /* active: black */
.category-nav .cats svg { width: 23px; height: 23px; }

/* Text link at the right edge. */
.category-nav .affiliates {
  pointer-events: auto; color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.category-nav .affiliates:hover { color: var(--ink); }
.category-nav .affiliates[aria-current="page"] { color: var(--ink); }

/* The phone's menu button and the names under the icons are the phone's alone (below); on the
   desktop the menu's wrapper steps aside, so the logo, the icons and About stay the bar's own. */
.category-nav .nav-burger { display: none; }
.category-nav .nav-menu { display: contents; }
.category-nav .cat-label { display: none; }

/* A phone's bar is the menu button alone, at the right (Patryk, 2026-10-16): the logo, the three categories and
   About open under it as one panel, the page dimmed behind it (js/nav.js opens and shuts it). */
@media (max-width: 700px) {
  .category-nav { height: 60px; padding: 0 12px; }
  .category-nav .nav-burger {
    position: relative; z-index: 1; pointer-events: auto;
    display: grid; place-items: center; width: 40px; height: 40px; margin: 0 -6px 0 auto;
    color: var(--ink); border-radius: 10px;
  }
  .category-nav .nav-burger svg { width: 24px; height: 24px; }
  .category-nav .nav-burger .i-close,
  .category-nav.is-open .nav-burger .i-open { display: none; }
  .category-nav.is-open .nav-burger .i-close { display: block; }
  .category-nav .nav-menu { display: none; }
  .category-nav.is-open::before {
    content: ""; position: fixed; inset: 0; background: oklch(0 0 0 / .12); pointer-events: auto;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  .category-nav.is-open .nav-menu {
    position: fixed; top: 60px; right: 12px; width: min(260px, calc(100vw - 24px));
    display: flex; flex-direction: column; padding: 8px;
    background: var(--surface); border-radius: 14px;
    box-shadow: 0 0 0 1px var(--line), 0 12px 32px oklch(0 0 0 / .14);
    pointer-events: auto;
  }
  .category-nav .nav-menu .brand { justify-items: start; padding: 8px 10px 12px; }
  .category-nav .brand-mark { width: 30px; height: 30px; }
  /* The three categories one under another, each its icon and its name; the page you are on on the
     grey the list rows use. */
  .category-nav .nav-menu .cats {
    position: static; transform: none; flex-direction: column; gap: 2px;
    padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .category-nav .nav-menu .cats a {
    width: auto; height: 44px; display: flex; align-items: center; justify-content: flex-start; gap: 12px;
    padding: 0 10px; border-radius: 10px; color: var(--muted-strong);
  }
  .category-nav .nav-menu .cats a[aria-current="page"] { color: var(--ink); background: var(--tile); }
  .category-nav .nav-menu .cats svg { width: 22px; height: 22px; }
  .category-nav .cat-label { display: inline; font-size: 15px; font-weight: 500; }
  .category-nav .nav-menu .affiliates {
    display: flex; align-items: center; height: 44px; margin-top: 6px; padding: 0 10px;
    border-radius: 10px; font-size: 15px; color: var(--muted-strong);
  }
  .category-nav .nav-menu .affiliates[aria-current="page"] { color: var(--ink); background: var(--tile); }
}
