/* Section switcher strip — identical on every section page (see hub-nav.js). */
.hub-strip {
  --hub-bg: #18181b; --hub-fg: #a1a1aa; --hub-fg-on: #f4f4f5;
  --hub-line: rgba(255, 255, 255, .08); --hub-acc: #a78bfa; --hub-acc-soft: rgba(167, 139, 250, .14);
  position: relative; z-index: 50; flex: none;
  box-sizing: border-box; height: 48px; margin: 0; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--hub-bg); border-bottom: 1px solid var(--hub-line);
  font: 600 13px/1 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .01em;
}
html[data-theme="light"] .hub-strip {
  --hub-bg: #f0f1f3; --hub-fg: #475569; --hub-fg-on: #0f172a;
  --hub-line: rgba(15, 23, 42, .14); --hub-acc: #4338ca; --hub-acc-soft: rgba(67, 56, 202, .10);
}
.hub-strip *, .hub-strip *::before, .hub-strip *::after { box-sizing: border-box; }
.hub { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.hub::-webkit-scrollbar { display: none; }
.hub a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; margin: 0;
  border-radius: 6px; border: 1px solid transparent;
  color: var(--hub-fg); text-decoration: none; white-space: nowrap;
  transition: color .15s, background-color .15s, border-color .15s;
}
.hub a:hover { color: var(--hub-fg-on); background: var(--hub-acc-soft); }
.hub a[aria-current="page"] {
  color: var(--hub-acc); background: var(--hub-acc-soft);
  border-color: color-mix(in srgb, var(--hub-acc) 35%, transparent);
}
.hub a:focus-visible { outline: 2px solid var(--hub-acc); outline-offset: 2px; }
.hub-end { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 480px) { .hub-strip { padding: 0 10px; gap: 8px; } .hub { gap: 2px; } .hub a { padding: 0 7px; } }

/* The strip's height comes out of full-screen app layouts (problem pages). */
html.has-hub { --app-vh: calc(100vh - 48px); }

/* One theme button for every page: the strip's. Page-level toggles stay in the
   DOM (the hub button clicks them) but are never shown. */
.has-hub :is(#theme-toggle-btn, .theme-toggle-btn, #themeBtn, .theme-toggle, #theme):not(.hub-theme) { display: none !important; }
.hub-theme {
  all: unset; box-sizing: border-box; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--hub-fg); background: transparent;
  box-shadow: inset 0 0 0 1px var(--hub-line);
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.hub-theme svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-theme:hover { color: var(--hub-acc); background: var(--hub-acc-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hub-acc) 40%, transparent); }
.hub-theme:focus-visible { outline: 2px solid var(--hub-acc); outline-offset: 2px; }

/* Full-screen editing modes cover the whole window; the strip steps aside. */
body.is-fullscreen-app > .hub-strip, body.distraction-free-code > .hub-strip { display: none; }
