/* THE SHARED TOPBAR — one stylesheet, linked by every app page.
 *
 * WHY THIS FILE EXISTS. This CSS used to live only inside src/dashboard/server.ts
 * and was INJECTED as <style data-leif-topbar-style> when the local dashboard
 * served a page. F2-finish deliberately stripped the per-page .topbar rules so
 * there would be exactly one source — a good call that had one consequence
 * nobody had exercised: the files in web/ stopped being standalone documents.
 *
 * Cloudflare serves web/ RAW through the ASSETS binding and injects nothing. So
 * every app page deployed to the edge rendered with a bare topbar — brand,
 * crumb, pill and nav links stacked vertically down the left edge, because
 * <header class="topbar"> had no rules at all. Measured on the live deploy:
 * display:block, children at y=0/41/69/89, background transparent.
 *
 * SCOPED TO header.topbar, NOT header[data-leif-topbar]. The injected header
 * carries both; the hand-rolled markup in web/*.html carries only the class.
 * Scoping to the class means a page looks right whether the local dashboard
 * rewrote its header or Cloudflare handed the file over untouched — which is
 * the whole point of moving it here rather than teaching the worker to inject.
 * A second injector would have been a second implementation, and those drift.
 *
 * GENERATED ONCE from TOPBAR_STYLE and now owned here. server.ts links this
 * file instead of carrying the rules.
 */
:root {
  --topbar-accent: rgba(76, 196, 255, 0.1);
  --topbar-accent-edge: rgba(127, 215, 255, 0.25);
}
header.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 12, 22, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-soft, rgba(255, 255, 255, 0.07));
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  white-space: nowrap;
}
header.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
header.topbar .brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}
header.topbar .brand-name .dim {
  color: var(--text-4);
  font-weight: 400;
}
header.topbar .crumb,
header.topbar .crumbs {
  font-size: 11px;
  color: var(--text-3);
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  font-family: var(--font-mono);
  letter-spacing: 0.4px;
}
header.topbar .crumbs a {
  color: inherit;
  text-decoration: none;
}
header.topbar .spacer {
  flex: 1;
}
header.topbar > *:not(.spacer) {
  flex-shrink: 0;
}
header.topbar .topbar-link {
  font-size: 13px;
  color: var(--text-3);
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--dur-fast, 0.14s);
}
header.topbar .topbar-link:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
}
header.topbar .topbar-link.here {
  color: #fff;
  background: var(--topbar-accent);
  border: 1px solid var(--topbar-accent-edge);
}
header.topbar .topbar-link:focus-visible {
  outline: 2px solid var(--border-focus, rgba(78, 194, 255, 0.5));
  outline-offset: 2px;
}
header.topbar .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  background: linear-gradient(135deg, rgba(63, 209, 124, 0.15), rgba(76, 196, 255, 0.1));
  border: 1px solid rgba(63, 209, 124, 0.28);
  color: var(--ok);
  font-family: var(--font-mono);
}
header.topbar .status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
@media (max-width: 900px) {
  header.topbar {
    padding: 10px 12px;
    gap: 10px;
  }
  header.topbar .spacer {
    flex: 0 0 4px;
  }
  header.topbar .topbar-link {
    padding: 6px 9px;
  }
}
