/* public-nav.css: the menu on About, Privacy and Terms (public-nav.tsx). A bookmark hangs from the top edge
   over the page you are on, in the red of the page's large initial, and dips over a link you point at.
   That is the only movement, and it is opt-in under prefers-reduced-motion:no-preference. */
.pn{
  position:sticky;top:0;z-index:40;
  padding-top:env(safe-area-inset-top);
  background:var(--bg);
}
/* A solid bar, as the signed-in mast is: no blur or glass (#192). public-nav.tsx measures it into --pn-h. */
html:has(.pn){scroll-padding-top:calc(var(--pn-h,6rem) + .5rem)}
/* Two hairlines, as on the plates' engraved frames. */
.pn::after{
  content:"";position:absolute;inset:auto 0 0;height:3px;pointer-events:none;
  border-top:1px solid var(--gold);border-bottom:1px solid color-mix(in srgb,var(--gold) 35%,transparent);
}
.pn-bar,.pn-sections{width:min(72rem,100%);margin-inline:auto;padding-inline:clamp(.75rem,4vw,4rem)}
/* The wordmark and the page links sit together on the left, so a wide bar has no gap across its middle (it was
   691px at 1280). */
.pn-bar{display:flex;align-items:center;justify-content:flex-start;column-gap:clamp(1.5rem,4vw,3rem);row-gap:0;min-width:0;flex-wrap:wrap}
.pn-mark{
  display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;
  font-family:var(--font-display);font-size:1.5rem;line-height:1;color:var(--color-fg);
}
.pn-pages{display:flex;flex-wrap:wrap;justify-content:flex-start;min-width:0;max-width:100%}
.pn-link{
  position:relative;display:inline-flex;align-items:center;gap:.3rem;
  min-height:44px;padding-inline:.75rem;white-space:nowrap;
  font-family:var(--font-display);font-size:1.125rem;color:color-mix(in srgb,var(--color-fg) 78%,transparent);
}
.pn-link:hover,.pn-link[aria-current]{color:var(--gold)}
.pn-back{width:1em;height:1em;flex:none}
/* The bookmark: a notched ribbon, held above the bar until it is wanted. */
.pn-pages .pn-link{min-height:3.5rem;padding-top:.85rem}
.pn-pages .pn-link::before{
  content:"";position:absolute;top:0;left:50%;width:.8rem;height:1.35rem;margin-left:-.4rem;
  background:var(--accent);clip-path:polygon(0 0,100% 0,100% 100%,50% 76%,0 100%);
  transform:translateY(-100%);
}
.pn-pages .pn-link:hover::before,.pn-pages .pn-link:focus-visible::before{transform:translateY(-52%)}
.pn-pages .pn-link[aria-current]::before{transform:translateY(-8%)}
/* The sections wrap onto a second line before they fold into the list (public-nav.tsx, MAX_SECTION_LINES). */
.pn-sections{display:flex;flex-wrap:wrap;overflow-x:auto;scrollbar-width:none;padding-bottom:3px}
.pn-sections::-webkit-scrollbar{display:none}
.pn-sections .pn-link{font-size:1rem}
.pn-sections .pn-link[aria-current]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.3em}
/* A row narrower than its labels is kept only to measure (public-nav.tsx); the sections fold into the
   "On this page" list instead, so no label is ever cut at the scroller's edge (CoS, Nov 20: "How it wo" at 320px). */
.pn-sections[data-fits="false"]{position:absolute;inset-inline:0;height:0;padding-bottom:0;overflow:hidden;visibility:hidden;pointer-events:none}
.pn-menu{width:min(72rem,100%);margin-inline:auto;padding-inline:clamp(.75rem,4vw,4rem);padding-bottom:var(--space-1)}
/* A 44px target, the summary itself and not only the links under it (Design S2-1, Nov 20). */
.pn-menu>summary{display:flex;align-items:center;min-height:2.75rem;list-style:none;cursor:pointer;font-size:1rem}
.pn-menu>summary::-webkit-details-marker{display:none}
.pn-menu>summary::after{content:"";flex:none;width:.4em;height:.4em;margin-left:.4rem;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-.15em) rotate(45deg)}
.pn-menu[open]>summary::after{transform:translateY(.1em) rotate(-135deg)}
.pn-menu-list{display:flex;flex-direction:column;list-style:none;margin:0;padding:0 0 .5rem;max-height:calc(100dvh - 9rem);overflow-y:auto}
.pn-menu-list .pn-link{display:flex;min-height:44px;white-space:normal;font-size:1rem}
.pn-menu-list .pn-link[aria-current]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.3em}
/* html already keeps room for the bar with scroll-padding-top; this adds the gap under it. */
.pn ~ main h2{scroll-margin-top:2rem}

/* The engraved-book craft (Josh, Nov 20): the wordmark as engraved display type, the links in small caps, and
   the page you are on underlined in gilt as well as marked by its bookmark. */
.pn-mark{font-size:1.75rem;letter-spacing:.01em;text-shadow:0 1px 0 rgba(0,0,0,.55)}
.pn-link{font-variant-caps:all-small-caps;letter-spacing:.08em}
.pn-pages .pn-link{font-size:1.1875rem}
.pn-pages .pn-link[aria-current]{text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:1px;text-underline-offset:.45em}
.pn-sections .pn-link[aria-current]{text-decoration-color:var(--gold)}
/* The section row keeps tighter small caps, so all five sections still fit in two lines at 390px. */
.pn-sections .pn-link{letter-spacing:.03em;padding-inline:.5rem}

@media (max-width:30rem){
  /* Hidden but measured (public-nav.tsx reads its width to decide whether it fits beside the folded buttons). */
  .pn-mark{position:absolute;visibility:hidden;pointer-events:none}
  .pn-bar{justify-content:center}
  .pn-pages{justify-content:center}
  .pn-sections{justify-content:center}
  .pn-link{padding-inline:.6rem}
}

@media (prefers-reduced-motion:no-preference){
  html:has(.pn){scroll-behavior:smooth}
  .pn-link{transition:color .25s}
  .pn-pages .pn-link::before{transition:transform .42s cubic-bezier(.3,.7,.2,1)}
}
/* Hold the art still (plate-hold.tsx, the kit's 44px IconButton) ends the bar at every width, right after the
   page links, so the bar has no gap across its middle. Under the links' one-row width the links fold behind the
   Pages button (public-nav.tsx), the same IconButton, so the bar is one row of matching controls at any root
   text size (Josh's About 320 large-text shot, Nov 27 7:26 PM ET). */
.pn-bar{flex-wrap:nowrap}
.pn-pages{flex-wrap:nowrap}
.pn-bar>[data-ui="icon-button"]{flex:none}
.pn-bar>[data-ui="icon-button"]+[data-ui="icon-button"]{margin-inline-start:calc(.5rem - clamp(1.5rem,4vw,3rem))}
/* Folded: the links are kept only to measure, like a folded section row. The wordmark returns beside the buttons. */
.pn-pages[data-fits="false"]{position:absolute;inset-inline-start:0;top:0;visibility:hidden;pointer-events:none}
.pn-bar[data-folded="true"] .pn-mark{position:absolute;visibility:hidden;pointer-events:none}
/* Folded, the wordmark comes back beside the two 2.75rem buttons only where the bar holds it whole: "Avouch Social"
   is about 9.8rem, plus the 1.5rem gap, the buttons and their 0.5rem: 17.3rem, so 18rem with room to spare. A
   container query, not a script measure, so it holds the first frame and at any root size (plate-credit gate,
   320px at root 20). */
.pn-bar{container:pn-bar/inline-size}
@container pn-bar (min-width:18rem){
  .pn-bar[data-folded="true"] .pn-mark{position:static;visibility:visible;pointer-events:auto;flex:none}
}
.pn-bar[data-folded="true"]{justify-content:center}
.pn-bar[data-folded="true"]{min-height:3.5rem}
