/* Keep the primary authentication entry visible at every viewport width. */
.topbar .top-link.auth-out{display:inline-flex;align-items:center;justify-content:center;min-height:0;padding:8px 6px;border:0;border-radius:0;white-space:nowrap}
html[data-auth="in"] .topbar .auth-out{display:none}
html:not([data-auth="in"]) .topbar .auth-in{display:none}
.topbar .top-link.auth-out:focus-visible{outline:3px solid var(--brand-ink,#425d6d);outline-offset:3px}
@media(max-width:520px){.topbar .top-actions{gap:8px}.topbar .top-link.auth-out{padding:8px 6px}}
/* Removing an unpublished social link must not pull the legal paragraph into
   the copyright/navigation row. Keep the original text measure on its own row. */
.foot-base{display:grid;grid-template-columns:minmax(0,1fr) auto}
.foot-base .foot-legal{grid-column:1/-1}
@media(max-width:700px){.foot-base{grid-template-columns:minmax(0,1fr)}}
/* Long AP availability labels need their own row on a phone. A squeezed
   search input otherwise overlaps the first filter and intercepts taps. */
@media(max-width:380px){
  .rail .rail-tools{display:flex;flex-wrap:wrap;gap:10px;min-width:0}
  .rail .rail-tools .search-wrap{flex:1 1 100%;width:100%;min-width:0}
  .rail .rail-tools .search{width:100%;max-width:100%;min-width:0}
  .rail .rail-tools .seg{flex:0 1 auto;max-width:100%;margin-left:0}
}

/* The secondary group contains only Account in this prototype. Hide the
   empty group while signed out; keep it when another entry is present. */
html:not([data-auth="in"]) .mn-head:has(+ .mn-more > .mn-acct:only-child),
html:not([data-auth="in"]) .mn-more:has(> .mn-acct:only-child){display:none}

/* Native Tab scrolling must leave room for the external keyboard focus ring. */
footer a{scroll-margin-block:16px}

/* Contents rails can scroll internally: keep keyboard targets clear of both
   viewport edges and the rail's clipping boundary. */
.toc a{scroll-margin-block:16px}
.toc a:focus-visible{outline-offset:-2px}

/* Contact legal links need space for their focus ring during native Tab scrolling. */
.form-note a{scroll-margin-top:80px;scroll-margin-bottom:16px}
/* Successive keyboard focus moves must not race smooth page scrolling. */
html:has(#contactForm :focus-visible){scroll-behavior:auto!important}
