/* The case study header (13 Oct 2026, chat CASE HEADER, his note via BUPA
   HUB): not the site's main nav, but a header like the design-system view's.
   A back arrow, his mark and wordmark, the study you are in, and on some
   options the study's own sections or a drop-down to the other studies.
   It stays sticky and open.
   Locked to Study only, <html data-cs-head="switcher"> (14 Oct, chat FRAME
   DEFAULTS); the Sections, Both and Site nav options left on 20 Oct (chat
   FRAME SPLIT, backup _before-split-5/). */

/* The back arrow, his mark and the study drop-down; the site nav steps aside
   (two attribute selectors, to outrank site-header.css's .hdr\:flex at 75em). */
.csh-back { display: inline-flex; color: var(--color-text-primary); }
[id=site-header] [id=site-nav] { display: none; }
.csh-pick { display: block; position: relative; }

/* The back arrow: the design-system view's, a plain icon button. */

/* Study name: a small eyebrow over the client, after a hairline. */
.csh-pick-btn {
  flex-direction: column; justify-content: center; margin: 0;
  padding-inline-start: var(--space-300); border-inline-start: var(--border-hairline);
  min-height: var(--touch-target-min); line-height: var(--line-heading); white-space: nowrap;
  display: flex; align-items: flex-start; background: none; border-block: 0; border-inline-end: 0;
  cursor: pointer; text-align: start; border-radius: 0;
  /* the full tap target, drawn at the site header's control height, so the bar
     is as tall as the site's (his pick 24 Oct, chat VIRGIN CLEANUP) */
  margin-block: calc((var(--header-control) - var(--touch-target-min)) / 2);
}
/* his photo at the site header's size: the study's global img cap stops at 100% */
[id=site-header] .profile-mark__head { max-width: none; }
.csh-eyebrow {
  font-family: var(--font-body); font-size: var(--text-caption); font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-secondary);
}
.csh-client {
  display: inline-flex; align-items: center; gap: var(--space-100);
  font-family: var(--font-body); font-size: var(--text-nav); font-weight: var(--weight-semibold); color: var(--color-text-primary);
}

/* The drop-down: a disclosure (a button and a list of links), not a menu. */
.csh-pick-btn:focus-visible { outline: var(--border-focus); outline-offset: var(--focus-ring-offset); }
.csh-chev { width: var(--btn-glyph-sm); height: var(--btn-glyph-sm); transition: transform var(--duration-fast) var(--ease-default); }
.csh-pick-btn[aria-expanded="true"] .csh-chev { transform: rotate(180deg); }
@media (hover: hover) { .csh-pick-btn:hover .csh-client { text-decoration: underline; text-underline-offset: 3px; } }
.csh-list {
  position: absolute; inset-block-start: calc(100% + var(--space-200)); inset-inline-start: 0;
  /* as wide as its longest name, and never wider than the screen less a small gap each side (20 Nov 2026, chat
     READABILITY FIX): at 200% text on a 320 wide phone the names wrap instead of running off; case-header.js slides
     the list left by what would be cut */
  z-index: var(--z-dropdown); inline-size: max-content; max-inline-size: calc(100vw - 2 * var(--space-300)); margin: 0; padding: var(--space-200);
  list-style: none; background: var(--color-surface); border: var(--border-hairline);
  border-radius: var(--radius-md);
}
.csh-list a {
  display: flex; align-items: center; min-height: var(--touch-target-min); padding-inline: var(--space-300);
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: var(--text-nav);
  font-weight: var(--weight-medium); color: var(--color-text-secondary); text-decoration: none;
}
.csh-list a:hover, .csh-list a:focus-visible { color: var(--color-text-primary); background: var(--color-surface-sunken); }
.csh-list a[aria-current="page"] { color: var(--color-text-primary); font-weight: var(--weight-semibold); }
.csh-list a[aria-current="page"]::after { content: ""; inline-size: var(--space-200); block-size: var(--space-200); margin-inline-start: var(--space-300); border-radius: var(--dot-radius); background: var(--brand-primary); }

/* Phones and tablets: the wordmark stays, as on the site, and the back arrow
   gives way to it. There is no menu: his mark (home) and the drop-down are the
   way out. */
@media (max-width: 47.99875em) {
  .csh-back { display: none; }
}
[data-site-menu] { display: none; }

/* The header mail button (2026-11-05, chat COPY EMAIL). Words from 768 up, the
   icon alone below; display:none also takes the hidden one out of the Tab order.
   The words button joins the bar by height, with a 44 tap ghost, as Ask AI does
   on the home page. */
.csh-mail-words { display: none; position: relative; flex-shrink: 0; white-space: nowrap; }
@media (min-width: 48em) {
  .csh-mail-icon { display: none; }
  .csh-mail-words { display: inline-flex; }
}
@media (min-width: 48em) and (hover: hover) and (pointer: fine) {
  [id=site-header] .csh-mail-words {
    height: var(--header-control);
    min-height: var(--header-control); /* visual size only; the ::after ghost keeps the 44px pointer target */
    padding-block: 0;
  }
  [id=site-header] .csh-mail-words::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: var(--touch-target-min);
    transform: translateY(-50%);
  }
}
/* Ask AI (26 Nov 2026, chat CASE HEADER ASK): the home page's button, its look and its widths from ask-ai.css (from 544,
   the round door below that). It joins the bar by height with a 44 tap ghost, on the same widths as the home page's
   header rule for it (sections.css, "Ask AI joins the cluster"). */
@media (max-width: 47.99875em), (min-width: 48em) and (hover: hover) and (pointer: fine) {
  [id=site-header] .header-ask { height: var(--header-control); min-height: var(--header-control); /* visual size only; the ::after ghost keeps the 44px pointer target */ padding-block: 0; }
  [id=site-header] .header-ask::after { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: var(--touch-target-min); transform: translateY(-50%); }
}
/* The pill those five links fill on the home page never opens here: the chat copies them and is the one home. */
[id="ask-ai-drop"][hidden] { display: none; }
/* Under 368 the bar cannot hold the mark, the study switcher and this button, so
   the mark keeps only his face. The link keeps its own name. */
@media (max-width: 22.99875em) {
  .header-brand-link > :not(.avatar) { display: none; }
}
