/* style.css names the page gutter .container; the shell uses .wrap.
   Defining it here keeps both spellings working. */
.wrap{max-width:1200px;margin-inline:auto;padding-inline:2rem}
@media (max-width:560px){ .wrap{padding-inline:1rem} }
/* landscape on notched iPhones: the side insets are non-zero */
.site-head .wrap{
  padding-left:max(2rem,env(safe-area-inset-left,0px));
  padding-right:max(2rem,env(safe-area-inset-right,0px))}
@media (max-width:560px){
  .site-head .wrap{
    padding-left:max(1rem,env(safe-area-inset-left,0px));
    padding-right:max(1rem,env(safe-area-inset-right,0px))}
}

/* ============================================================
   SHELL — header, announcement bar, on-this-page menu, footer
   Loaded after style.css; uses its tokens so light and dark
   mode both come for free.
   ============================================================ */

/* ---- announcement bar ---------------------------------------------- */
.announce{background:var(--bg3);border-bottom:1px solid var(--border);
  font-family:var(--font-body);position:relative;z-index:60}
.announce[hidden]{display:none}
.announce-in{display:flex;align-items:center;gap:0.75rem;
  padding-block:0.55rem;flex-wrap:wrap}
.ann-tag{font-family:var(--font-sans);font-size:0.75rem;font-weight:800;
  letter-spacing:0.1em;text-transform:uppercase;color:#fff;background:var(--violet);
  border-radius:4px;padding:0.2rem 0.5rem;flex:none}
.announce p{margin:0;font-size:0.86rem;color:var(--text2);flex:1 1 16rem;min-width:0}
.announce p a{font-weight:600;white-space:nowrap}
.ann-x{flex:none;appearance:none;border:0;background:none;color:var(--text3);
  font-size:1.3rem;line-height:1;cursor:pointer;padding:0.25rem 0.4rem;
  border-radius:4px;min-width:32px;min-height:32px}
.ann-x:hover{color:var(--text);background:var(--violet-dim)}
@media (max-width:700px){
  .announce-in{position:relative;padding-right:2.4rem;gap:0.5rem}
  .ann-x{position:absolute;top:0.3rem;right:0}
  .ann-tag{align-self:flex-start}
}
/* --violet lightens in dark mode, so the badge text has to darken with it */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .ann-tag{color:#14131a}
}
:root[data-theme="dark"] .ann-tag{color:#14131a}

/* ---- header -------------------------------------------------------- */
.site-head{position:sticky;top:0;z-index:50;background:var(--bg-glass);
  backdrop-filter:saturate(180%) blur(12px);-webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);transition:padding .2s ease;
  /* viewport-fit=cover lets the page run under the notch / Dynamic Island.
     The sticky header is the element that actually touches that area, so the
     inset belongs here, not on the retired #navbar rule in style.css. */
  padding-top:env(safe-area-inset-top,0px)}
.head-in{display:flex;align-items:center;gap:1rem;padding-block:0.7rem;
  justify-content:space-between}
.brand{display:flex;align-items:center;gap:0.7rem;text-decoration:none;min-width:0}
.brand img{flex:none;width:44px;height:42px;object-fit:contain;transition:width .2s,height .2s}
.brand-txt{display:flex;flex-direction:column;min-width:0}
.brand-txt b{font-family:var(--font-serif);font-size:1.12rem;font-weight:700;
  color:var(--text);line-height:1.15;white-space:nowrap}
.brand-txt i{font-family:var(--font-sans);font-style:normal;font-size:0.75rem;
  font-weight:600;letter-spacing:0.02em;color:var(--violet);line-height:1.3}
.site-head.shrunk .brand img{width:34px;height:32px}
.site-head.shrunk .brand-txt i{display:none}

.mainmenu ul{display:flex;gap:0.15rem;list-style:none;margin:0;padding:0}
.mainmenu a{font-family:var(--font-sans);font-size:0.88rem;font-weight:600;
  color:var(--text2);text-decoration:none;padding:0.55rem 0.8rem;border-radius:8px;
  display:block;transition:var(--transition)}
.mainmenu a:hover{color:var(--violet);background:var(--violet-dim)}
.mainmenu a[aria-current="page"]{color:var(--violet);background:var(--violet-dim)}

.nav-burger{display:none;appearance:none;border:1px solid var(--border);
  background:var(--card);border-radius:8px;width:44px;height:44px;cursor:pointer;
  flex-direction:column;justify-content:center;align-items:center;gap:4px;flex:none}
.nav-burger span{display:block;width:18px;height:2px;background:var(--text2);border-radius:2px}

/* ---- theme toggle: auto -> light -> dark --------------------------- */
.theme-toggle{appearance:none;border:1px solid var(--border);background:var(--card);
  border-radius:8px;width:44px;height:44px;flex:none;cursor:pointer;color:var(--text2);
  display:flex;align-items:center;justify-content:center;
  margin-left:auto;transition:var(--transition)}
.theme-toggle:hover{color:var(--violet);border-color:var(--violet)}
.theme-toggle .ti{width:20px;height:20px;display:none}
.theme-toggle[data-theme-pref="auto"]  .ti-auto {display:block}
.theme-toggle[data-theme-pref="light"] .ti-light{display:block}
.theme-toggle[data-theme-pref="dark"]  .ti-dark {display:block}
/* the menu already owns the free space on wide screens */
@media (min-width:901px){ .theme-toggle{margin-left:0;order:3} .mainmenu{order:2} }
@media (prefers-reduced-motion:reduce){ .theme-toggle{transition:none} }
@media (forced-colors:active){
  .theme-toggle{border-color:ButtonBorder;color:ButtonText}
  .theme-toggle .ti{forced-color-adjust:auto}
}

@media (max-width:900px){
  .nav-burger{display:flex}
  .mainmenu{position:absolute;inset:100% 0 auto;background:var(--card);
    border-bottom:1px solid var(--border);box-shadow:var(--shadow);
    max-height:0;overflow:hidden;transition:max-height .24s ease}
  .mainmenu.open{max-height:24rem}
  .mainmenu ul{flex-direction:column;gap:0;padding:0.5rem 1rem 1rem}
  .mainmenu a{padding:0.8rem 0.6rem;border-radius:6px}
  .brand-txt b{font-size:1rem}
  .brand-txt i{font-size:0.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media (prefers-reduced-motion:reduce){
  .site-head,.brand img,.mainmenu{transition:none}
}

/* ---- on this page -------------------------------------------------- */
.onthispage{position:fixed;left:max(0.75rem,calc((100vw - 1200px)/2 - 12.5rem));
  top:calc(var(--nav-h) + 3.2rem);width:11.5rem;z-index:20;
  font-family:var(--font-sans)}
.otp-head span{display:block;font-size:0.75rem;font-weight:800;letter-spacing:0.12em;
  text-transform:uppercase;color:var(--text3);margin-bottom:0.6rem}
.otp-toggle{display:none}
.onthispage ul{list-style:none;margin:0;padding:0;border-left:2px solid var(--border)}
.onthispage li a{display:block;font-size:0.8rem;line-height:1.35;color:var(--text3);
  text-decoration:none;padding:0.42rem 0 0.42rem 0.75rem;margin-left:-2px;
  border-left:2px solid transparent;transition:var(--transition)}
.onthispage li a:hover{color:var(--violet)}
.onthispage li a.active{color:var(--violet);border-left-color:var(--violet);font-weight:600}

/* below the point where a left rail fits, it becomes a strip under the header */
@media (max-width:1450px){
  .onthispage{position:sticky;left:auto;top:calc(var(--nav-h) - 6px);width:100%;
    max-width:none;margin:0;padding:0;
    background:var(--bg-glass);backdrop-filter:blur(10px);
    border-bottom:1px solid var(--border);z-index:40}
  .onthispage > *{max-width:1200px;margin-inline:auto;padding-inline:2rem}
  .otp-head{display:flex;align-items:center;justify-content:space-between;
    padding-block:0.5rem;gap:1rem}
  .otp-head span{margin:0}
  .otp-toggle{display:block;appearance:none;border:1px solid var(--border);
    background:var(--card);color:var(--text2);border-radius:999px;
    font-family:var(--font-sans);font-size:0.78rem;font-weight:600;
    padding:0.35rem 0.8rem;min-height:32px;cursor:pointer}
  .otp-toggle[aria-expanded="true"]{color:var(--violet);border-color:var(--violet)}
  .onthispage ul{border-left:0;display:flex;flex-wrap:wrap;gap:0.3rem;
    padding:0 2rem 0.6rem;max-width:1200px;margin-inline:auto}
  .onthispage li a{border-left:0;padding:0.36rem 0.7rem;border-radius:999px;
    border:1px solid var(--border);font-size:0.78rem;margin:0}
  .onthispage li a.active{background:var(--violet-dim);border-color:var(--violet)}
  .otp-toggle{display:none}
}
@media (max-width:820px){
  /* The topics were hidden behind a "Sections" button. They are the fastest
     way into a long page, so they stay on screen as a scrollable chip row. */
  .onthispage ul{display:flex;flex-wrap:nowrap;overflow-x:auto;
    scrollbar-width:none;-webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;padding-block:0.1rem 0.55rem}
  .onthispage ul::-webkit-scrollbar{display:none}
  .otp-toggle{display:none}
  .onthispage li{flex:none;scroll-snap-align:start}
  .onthispage li a{border-left:0;padding:0.45rem 0.75rem;border-radius:999px;
    border:1px solid var(--border);font-size:0.78rem;margin:0;white-space:nowrap}
  .onthispage li a.active{background:var(--violet-dim);border-color:var(--violet)}
  .otp-head{padding-block:0.4rem 0.1rem}
}
@media (max-width:560px){ .onthispage > *{padding-inline:1rem}
  .onthispage ul{padding-inline:1rem} }

/* ---- footer -------------------------------------------------------- */
.site-foot{background:var(--bg2);border-top:1px solid var(--border);
  margin-top:4rem;padding-block:2.6rem 1.6rem;position:relative}
.foot-logo{width:48px;height:46px;object-fit:contain;opacity:0.85;margin-bottom:1.4rem}
.site-foot .fgrid{display:grid;gap:1.8rem;
  grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr))}
.site-foot h2{font-family:var(--font-sans);font-size:0.75rem;font-weight:800;
  letter-spacing:0.12em;text-transform:uppercase;color:var(--text3);margin-bottom:0.8rem}
.site-foot ul{list-style:none;margin:0;padding:0}
.site-foot li{font-size:0.84rem;color:var(--text2);line-height:1.75;overflow-wrap:anywhere}
.site-foot a{color:var(--text2);text-decoration:none}
.site-foot a:hover{color:var(--violet);text-decoration:underline}
.fbot{display:flex;flex-wrap:wrap;gap:0.5rem 1.5rem;align-items:baseline;
  margin-top:2rem;padding-top:1.2rem;border-top:1px solid var(--border-soft);
  font-size:0.78rem;color:var(--text3)}
.fbot .visits{font-family:var(--font-sans);font-weight:600;color:var(--violet)}
.fdisc{margin-top:0.8rem;font-size:0.75rem;color:var(--text3);opacity:0.85}

/* ---- shared page furniture ---------------------------------------- */
.page-head{padding-block:clamp(2rem,5vw,3.4rem) 1.4rem}
.page-head h1{margin-bottom:0.5rem}
.page-head .lede{font-size:1.05rem;color:var(--text2);max-width:62ch}
.sec{padding-block:clamp(1.8rem,4vw,2.8rem);scroll-margin-top:calc(var(--nav-h) + 4rem)}
.sec > h2{font-family:var(--font-serif);margin-bottom:0.3rem}
.sec-note{color:var(--text3);font-size:0.86rem;margin-bottom:1.4rem}
.figrow{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));
  margin-block:1.4rem}
.figrow figure{margin:0;border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;background:var(--card);min-width:0}
/* A fixed 4:3 box cropped the heads off every portrait photograph; fitting
   them inside it instead left tall letterbox bars that read as a rotation
   fault. Neither is right: each photograph now keeps its own proportions and
   the row simply aligns to the top. */
.figrow{align-items:start;
  grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}
.figrow img{display:block;width:100%;height:auto;aspect-ratio:auto;
  object-fit:fill;background:transparent}
.figrow figure{display:flex;flex-direction:column}
.figrow figcaption{margin-top:auto}
.figrow figcaption{font-size:0.8rem;color:var(--text2);padding:0.7rem 0.85rem;line-height:1.5}
.tight{max-width:66ch}

/* nothing may be wider than the column it sits in */
img, picture, video, canvas, svg { max-width: 100%; }
picture { display: block; }
table { max-width: 100%; }

/* scientific subscripts stay legible on a phone */
sub, sup { font-size: max(0.75rem, 0.75em); }

/* a heading the page needs for its outline but does not need to show */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* ---- small screens: the chrome must not own half the viewport ---------
   On an iPhone SE the announcement, header and section strip together came
   to 240px of a 568px screen. Below 700px tall the section strip stops
   being sticky and the header shrinks sooner. */
@media (max-height: 700px), (max-width: 380px) {
  .onthispage { position: static !important; }
  .announce-in { padding-block: 0.4rem; }
  .announce p { font-size: 0.8rem; }
  .head-in { padding-block: 0.45rem; }
  .brand img { width: 34px; height: 32px; }
  .brand-txt b { font-size: 0.95rem; }
  .brand-txt i { font-size: 0.75rem; }
}

/* ---- a DOI is a link you tap, so give it a tappable height ------------ */
.pub-meta a, .key-papers li a, .reslist a {
  display: inline-block;
  padding-block: 0.3rem;
  min-height: 24px;
}
.pub-meta a { line-height: 1.5; }

/* a publication title is a tap target: 23px was one pixel short of WCAG 2.5.8 */
.pub-title-link { display: block; padding-block: 0.15rem; min-height: 24px; line-height: 1.45; }

/* a long unbroken token (a DOI, a compound name) must wrap, not poke out */
.homehero .lede, .page-head .lede, .t-text, .nitem p, .lede, .sec-note,
.p-work, .ccard p, .i-txt p { overflow-wrap: anywhere; }

/* ---- lists that read as prose, not as bullets ------------------------ */
.clean-list{list-style:none;margin:0;padding:0}
.clean-list li{position:relative;padding-left:1.1rem;margin-bottom:0.65rem;
  color:var(--text2);line-height:1.6}
.clean-list li::before{content:"";position:absolute;left:0;top:0.62em;
  width:5px;height:5px;border-radius:50%;background:var(--violet)}
.clean-list li strong{color:var(--text)}

/* three across, but never squeezed: below 900px they stack */
@media (max-width:900px){ .grid-3{grid-template-columns:1fr} }

/* ---- two colours the ported sheets could not reach -------------------- */
/* These are set through tokens so light and dark each get a value that
   actually passes, rather than one value composited onto two grounds. */
:root{ --news-green:#12692f; --theme-num:rgba(124,58,237,0.85); }
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){ --news-green:#62d392; --theme-num:rgba(180,155,255,0.62); }
}
:root[data-theme="dark"]{ --news-green:#62d392; --theme-num:rgba(180,155,255,0.62); }
.news-cat.cat-project{color:var(--news-green)}
.research-num{color:var(--theme-num)}

/* ═══════════════════════════════════════════════════════════════════════
   NARROW SCREENS — the ported page components
   The eleven original pages carried their own CSS with almost no media
   queries: fixed grid tracks, a right-aligned money column and a 60px
   number gutter all held their width down to 320px and pushed the page
   sideways. Each one collapses here instead.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  /* funded projects: badge, title and amount stack instead of holding
     three tracks in 320px */
  .project-row{grid-template-columns:1fr;gap:0.6rem;padding:1rem}
  .project-row .agency-badge{justify-self:start}
  .project-row .amount{text-align:left;font-size:1rem}

  /* the theme number moves above its block rather than beside it */
  .research-block{grid-template-columns:1fr;gap:0.4rem;padding:2rem 0}
  .research-num{font-size:2rem}

  /* instrument cards */
  .system-card{padding:1.2rem}
  .spec-grid,.system-specs{grid-template-columns:1fr}
}

/* nothing in a ported card may set its own floor wider than the screen */
.card,.system-card,.project-row,.research-block,.mentor-card,
.pub-item,.vacancy-card,.link-card,.gal-item{min-width:0;max-width:100%}
.card > *,.system-card > *,.pub-item > *{min-width:0}

/* a long DOI, a grant code or a compound term must wrap, not poke out */
.pub-meta,.pub-title-link,.project-row p,.project-row h4,.amount,
.system-card p,.link-card p,.mentor-desc,.key-papers li{overflow-wrap:anywhere}

/* ---- tap targets (WCAG 2.5.8: 24×24 CSS px) --------------------------- */
.pub-doi a,.award-tag a,.hon-link,.pub-item a,.link-card a{
  display:inline-block;padding-block:0.35rem;min-height:24px;line-height:1.45}
#pq{min-height:44px;padding:0.6rem 0.9rem;font-size:1rem}
.award-body a,.timeline-desc a{display:inline-block;padding-block:0.3rem;min-height:24px}

/* an address is a link people tap, not just read */
.contact-value a,.contact-line a,a[href^="mailto:"]{display:inline-block;
  padding-block:0.3rem;min-height:24px}

/* A 1fr track is minmax(auto,1fr), and auto's floor is min-content — one
   long unbreakable string then makes the column wider than its own grid.
   minmax(0,1fr) lets the track shrink and the text wrap instead. */
.grid-2,.grid-3,.grid-4{grid-template-columns:repeat(var(--cols,2),minmax(0,1fr))}
.grid-3{--cols:3} .grid-4{--cols:4}
@media (max-width:768px){ .grid-2,.grid-3,.grid-4{--cols:1} }
.grid-2 > *,.grid-3 > *,.grid-4 > *{min-width:0}

/* an inline-flex link is still a tap target */
a[style*="inline-flex"]{min-height:24px;padding-block:0.25rem}

/* ---- publication finder ---------------------------------------------- */
.pubfind{margin:1.4rem 0 1rem}
.pf-row{display:flex;flex-wrap:wrap;gap:0.6rem;align-items:center}
.pf-row input[type="search"]{flex:1 1 18rem;min-width:0;min-height:44px;
  padding:0.6rem 0.9rem;font-size:1rem;font-family:var(--font-body);
  color:var(--text);background:var(--card);
  border:1px solid var(--border);border-radius:10px}
.pf-row input[type="search"]:focus-visible,
.pf-row select:focus-visible,.pf-row button:focus-visible{
  outline:3px solid var(--violet);outline-offset:2px}
.pf-row select,.pf-row button{min-height:44px;padding:0.5rem 0.8rem;
  font-family:var(--font-sans);font-size:0.86rem;color:var(--text2);
  background:var(--card);border:1px solid var(--border);border-radius:10px;
  cursor:pointer}
.pf-row button:hover{color:var(--violet);border-color:var(--violet)}
.pf-count{margin:0.8rem 0 0;font-family:var(--font-sans);font-size:0.86rem;
  color:var(--text3)}
.pf-hit{padding:0.9rem 0;border-bottom:1px solid var(--border-soft)}
.pf-hit:last-child{border-bottom:none}
.pf-hit mark{background:var(--violet-dim);color:inherit;border-radius:3px;padding:0 2px}
.pf-none{color:var(--text2);padding:1rem 0}
#orcid-pubs-container{margin-top:0.4rem}
.year-group{margin-bottom:1.6rem}
.year-heading{font-family:var(--font-sans);font-size:0.78rem;font-weight:800;
  letter-spacing:0.12em;text-transform:uppercase;color:var(--violet);
  padding-bottom:0.4rem;margin-bottom:0.6rem;border-bottom:1px solid var(--border)}
.pf-hit{background:var(--violet-dim);border-radius:3px;padding:0 2px;
  font-weight:600;color:var(--violet)}

/* ---- last of the fixed widths the ported sheets carried --------------- */
/* A 280px portrait cannot sit in a 196px card on a 320px screen. */
.pi-avatar{width:min(280px,100%);height:auto;aspect-ratio:1}
/* a flex row whose children refuse to shrink */
.funding-item,.spec-row,.project-row,.research-block{min-width:0}
.funding-item > *,.spec-row > *{min-width:0}
.spec-row{flex-wrap:wrap;gap:0.3rem 1rem}
@media (max-width:420px){
  .research-block{padding-inline:0}
  .funding-item{padding:0.9rem;gap:0.7rem}
}
.pf-row button[aria-pressed="true"]{color:#fff;background:var(--violet);border-color:var(--violet)}

/* the name on the papers differs from the name on the site; say so once,
   where a reader and a crawler both meet it first */
.hero-pubas{font-family:var(--font-sans);font-size:0.86rem;color:var(--text3);
  margin:0.3rem 0 0.2rem;max-width:44ch}
.hero-pubas strong{color:var(--violet);font-weight:600}


/* ---- collaborator cards ---------------------------------------------- */
.collab-place{font-size:0.82rem;color:var(--sky-ink);font-family:var(--font-sans);
  margin-bottom:0.5rem}
.collab-what{font-size:0.86rem;color:var(--text2);line-height:1.65;margin-bottom:0.7rem}
.flagline{display:block;font-family:var(--font-sans);font-size:0.75rem;font-weight:700;
  letter-spacing:0.1em;text-transform:uppercase;color:var(--text3);margin-bottom:0.4rem}

/* ---- media clippings -------------------------------------------------- */
.media-clip{margin:0;background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden}
.media-clip img{display:block;width:100%;height:auto;border-bottom:1px solid var(--border)}
.media-clip figcaption{padding:1rem 1.1rem;font-size:0.88rem;color:var(--text2);
  line-height:1.65}
.media-clip figcaption span{display:block;margin-top:0.6rem;font-size:0.85rem;
  color:var(--text3)}

/* ---- contact ---------------------------------------------------------- */
.contact-block{margin-bottom:2rem}
.contact-block h3{font-family:var(--font-sans);font-size:0.78rem;font-weight:800;
  letter-spacing:0.12em;text-transform:uppercase;color:var(--text3);margin-bottom:0.6rem}
.contact-block h3 i{color:var(--violet);margin-right:0.4rem}
.contact-value{font-size:0.98rem;color:var(--text);margin:0}
.contact-note{font-size:0.85rem;color:var(--text3);margin-top:0.4rem}

/* ---- CV lists on the about page --------------------------------------- */
.cv-list{list-style:none;margin:0;padding:0}
.cv-list li{display:grid;grid-template-columns:5.2rem minmax(0,1fr);gap:0.8rem;
  padding-block:0.6rem;border-bottom:1px solid var(--border-soft)}
.cv-list li:last-child{border-bottom:none}
.cv-when{font-family:var(--font-sans);font-size:0.8rem;font-weight:700;
  color:var(--violet);white-space:nowrap}
.cv-what{font-size:0.88rem;color:var(--text2);line-height:1.55}
.cv-what strong{color:var(--text);font-weight:600}
@media (max-width:430px){ .cv-list li{grid-template-columns:minmax(0,1fr);gap:0.15rem} }

/* ---- the footer address reads as an address, not a list ---------------- */
.site-foot address{font-style:normal;font-size:0.84rem;color:var(--text2);
  line-height:1.75;margin:0}

/* ═══════════════════════════════════════════════════════════════════════
   THE STICKY CHROME — keeping it off the reader's screen
   Announcement + header + topic strip came to 246px of a 568px phone.
   Three things fix it: a short announcement on narrow screens, the label
   inline with the chips, and the whole announcement + topic strip sliding
   away as you read down and returning the moment you scroll up.
   ═══════════════════════════════════════════════════════════════════════ */

/* 1 · one announcement, two lengths */
.ann-short{display:none}
@media (max-width:760px){
  .ann-long{display:none}
  .ann-short{display:inline}
}

/* 2 · the label sits with the chips rather than above them */
@media (max-width:1450px){
  .otp-head{padding-block:0.45rem 0.2rem}
  .otp-label{font-size:0.7rem}
}
@media (max-width:760px){
  .otp-label{position:absolute!important;width:1px;height:1px;padding:0;
    margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .otp-head{padding-block:0;min-height:0}
}

/* 3 · read down and the chrome gets out of the way; scroll up and it returns.
   Only the announcement and the topic strip move — the header itself stays,
   because that is how you get back to another page. */
.announce,.onthispage{transition:transform .26s ease, opacity .2s ease}
body.chrome-away .announce{transform:translateY(-100%);opacity:0;
  position:absolute;left:0;right:0;pointer-events:none}
body.chrome-away .onthispage{transform:translateY(-120%);opacity:0;
  pointer-events:none}
@media (prefers-reduced-motion:reduce){
  .announce,.onthispage{transition:none}
}

/* 4 · and the header itself gives back a few pixels once you are reading */
.site-head.shrunk .head-in{padding-block:0.38rem}
@media (max-width:760px){
  .head-in{padding-block:0.5rem}
  .brand img{width:38px;height:36px}
  .brand-txt b{font-size:0.98rem}
  .announce-in{padding-block:0.45rem}
  .announce p{font-size:0.82rem}
}

/* on a narrow screen the badge sits on the same line as the text, and the
   whole bar is one line rather than three */
@media (max-width:560px){
  .announce-in{flex-wrap:nowrap;align-items:center;gap:0.45rem;
    padding-block:0.4rem;padding-right:1.9rem}
  /* 12px is the floor; the bar stays on one line by tightening the
     padding and the letter-spacing instead of the type size */
  .ann-tag{align-self:center;font-size:0.75rem;letter-spacing:0.04em;
    padding:0.12rem 0.34rem}
  .announce p{font-size:0.8rem;flex:1 1 auto;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis}
  .announce p a{margin-left:0.3rem}
  .ann-x{top:50%;transform:translateY(-50%);min-width:26px;min-height:26px;
    font-size:1.1rem;padding:0 0.25rem}
}
