/* The public header: a quiet bar that stays with the page. Paper and ink surfaces, Archivo wordmark; only tokens. Used by the marketing page and the library shell for signed-out visitors. */
 .public-bar { position:sticky;top:0;z-index:var(--z-chrome);background:var(--bg);border-bottom:1px solid var(--line);padding:env(safe-area-inset-top,0px) max(var(--page-pad,var(--sp-6)),env(safe-area-inset-right,0px)) 0 max(var(--page-pad,var(--sp-6)),env(safe-area-inset-left,0px)); }
.public-header-inner { display:flex;align-items:center;gap:var(--sp-4);max-width:1240px;min-height:68px;margin-inline:auto;padding:var(--sp-2) 0; }
.pb-brand { flex: none; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); color: var(--text); text-decoration: none; font: var(--fw-heavy) var(--fs-24)/1 var(--font-display); letter-spacing: var(--ls-display); white-space: nowrap; }
.pb-nav { display: flex; align-items: center; gap: var(--sp-1); margin-inline: auto; }
.pb-nav a, .pb-signin, .pb-menu > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-4); border-radius: var(--r-2); color: var(--text2); text-decoration: none; font-size: var(--fs-14); font-weight: var(--fw-semibold); }
.pb-nav a:hover, .pb-signin:hover, .pb-menu > a:not(.btn):hover { background: var(--panel3); color: var(--text); }
.pb-nav a[aria-current=page] { background: var(--panel3); color: var(--text); box-shadow: inset 0 0 0 1px var(--edge); }
.pb-actions { flex: none; display: flex; align-items: center; gap: var(--sp-2); }
.pb-start { min-height: 44px; padding: 0 var(--sp-5); border-radius: var(--r-2); white-space: nowrap; }
.pb-theme { flex: none; display: inline-flex; }
.pb-theme:empty { display: none; }
.pb-menu-button { display: none; flex: none; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4); border-radius: var(--r-2); background: var(--panel2); font-size: var(--fs-14); font-weight: var(--fw-semibold); }
.pb-menu { position: absolute; z-index: 1; top: calc(100% + var(--sp-2)); right: var(--page-pad, var(--sp-6)); width: min(340px, calc(100% - var(--sp-8))); display: grid; gap: var(--sp-1); padding: var(--sp-3); border: 1px solid var(--line2); border-radius: var(--r-4); background: var(--panel); box-shadow: var(--sh-4); pointer-events: auto; }
.pb-menu[hidden] { display: none; }
.pb-menu > .btn { min-height: 48px; border-radius: var(--r-2); justify-content: center; margin-bottom: var(--sp-1); }
.pb-note { margin: var(--sp-1) var(--sp-2) 0; color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-snug); }
/* Page anchors and filters stay below the shared header. */
:root:has(.public-bar) { --public-bar-h: 68px; scroll-padding-top: calc(var(--public-bar-h) + var(--sp-4)); }
:root:has(.public-bar) .fbar { z-index:var(--z-ui); }
/* Shared list filters use relative positioning; a sticky offset would shift them over results. */
:root:has(.public-bar) .fbar:not(.list-filters) { top: var(--public-bar-h); }
@media (max-width: 1000px) { .pb-nav a { padding: 0 var(--sp-3); } .pb-brand { font-size: var(--fs-20); } }
@media (max-width: 900px) {
  .public-bar { padding-inline: max(var(--sp-3), env(safe-area-inset-left, 0px)) max(var(--sp-3), env(safe-area-inset-right, 0px)); }
  .public-header-inner { min-height: 60px; gap: var(--sp-2); padding: var(--sp-1h) var(--sp-2) var(--sp-1h) var(--sp-4); }
  .pb-nav { margin-inline: 0 auto; }
  .pb-nav a:not([data-nav=discover]), .pb-signin { display: none; }   /* Discover stays one tap away; the rest wait in the menu */
  .pb-menu-button { display: inline-flex; }
  :root:has(.public-bar) { --public-bar-h: 60px; }
  .pb-menu { right: var(--sp-3); }
}
@media (max-width: 400px) {
  .public-header-inner { min-width: 0; }
  .pb-brand { min-width: 0; font-size: var(--fs-18); }
  .pb-nav a[data-nav=discover] { padding-inline: var(--sp-2); }
}
/* On the narrowest phones the menu keeps its name for screen readers and shows only the icon, so brand, Discover and both buttons fit in 320px. */
@media (max-width: 359px) { .pb-menu-button { padding-inline: var(--sp-3); } .pb-menu-button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
@media (max-width: 479px) { .pb-actions { display: none; } }   /* Get started waits at the top of the menu */
@media (min-width: 901px) { .pb-menu { display: none !important; } }

.pb-menu > .pb-theme { display: flex; padding: var(--sp-1) var(--sp-4); }
.pb-menu > .pb-theme .account-panel { left: 0; right: auto; }
@media (max-width: 650px) { .pb-brand > span { display: none; } }
