/* Smooth cross-document navigation (e.g. the profession switch): a subtle, fast cross-fade
   between pages instead of a hard white flash. Progressive enhancement. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.2s; animation-timing-function: ease; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* instant-nav.js moves focus to the new page's <h1>/<main> after a swap; hide the box. */
[tabindex="-1"]:focus { outline: none; }

/* ── "Three equal doors" header (Nov 2026 mockup) ──────────────────────────────
   Row (desktop): brand · profession switch · Pay Careers Money Tools · search.
   Phone: row 1 brand + switch, row 2 four equal menu buttons + search icon.
   No horizontal scroller anywhere, so the old fade cue and its JS are gone. */
.site-header { position: relative; overflow: visible; background: #0f172a; color: #e5e7eb; border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-header,
.site-header * { line-height: 1.2; }
.site-header .shell { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; overflow: visible; }
.site-header .brand { color: #fff; text-decoration: none; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; line-height: 1; flex: 0 0 auto; }
.site-header .brand-main { font-weight: 700; letter-spacing: 0.2px; font-size: 15px; }
.site-header .brand-tagline { display: none; font-size: 11px; font-weight: 500; color: #cbd5e1; white-space: nowrap; }
@media (min-width: 1200px) { .site-header .brand-tagline { display: block; } }

.site-header .header-nav-shell { position: relative; flex: 1 1 auto; min-width: 0; overflow: visible; }
.site-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; min-width: 0; }
.site-header .guides-item { flex: 0 0 auto; position: relative; }
.site-header .guides-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  color: #e5e7eb; padding: 7px 11px; border-radius: 6px; font-size: 13.5px; font-weight: 600;
  border: 0; background: transparent; font-family: inherit; line-height: inherit;
  appearance: none; -webkit-appearance: none; cursor: pointer; user-select: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.site-header .guides-toggle::after { content: "▾"; font-size: 11px; opacity: 0.8; transition: transform 0.22s ease; }
.site-header .guides-item.is-open > .guides-toggle { background: rgba(255,255,255,0.08); color: #fff; }
.site-header .guides-toggle:hover { background: rgba(255,255,255,0.06); color: #fff; }
.site-header .guides-item.is-open > .guides-toggle::after { transform: rotate(180deg); }
/* the menu that holds the current page: a 2px white underline */
.site-header .guides-item.is-current > .guides-toggle { color: #fff; box-shadow: inset 0 -2px 0 #fff; border-radius: 6px 6px 2px 2px; }
.site-header .guides-toggle:focus-visible,
.site-header .guides-panel a:focus-visible,
.site-header .disc-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* ── Panels: one layout for every menu (up to 3 columns, one per section heading) ── */
.site-header .guides-panel {
  position: absolute; top: calc(100% + 10px); left: 0;
  width: 640px; max-width: calc(100vw - 20px); box-sizing: border-box;
  padding: 12px 12px 10px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  background: #0f172a; box-shadow: 0 14px 28px rgba(0,0,0,0.28);
  z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}
.site-header .guides-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
/* widths sized so the Pay panel starts exactly under its button on a 1366px screen; panels for
   buttons further right slide left only as far as the shell edge needs (site-header.js) */
.site-header .door-panel--pay { width: 600px; }
.site-header .door-panel--careers { width: 620px; }
.site-header .door-panel--tools, .site-header .door-panel--money { width: 560px; }
.site-header .guides-panel a {
  display: block; padding: 7px 9px; color: #e5e7eb; font-size: 13px; text-decoration: none;
  border-radius: 6px; white-space: normal;
}
.site-header .guides-panel a:hover { background: #1e3a8a; color: #fff; }
.site-header .guides-panel .guides-cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: #8b93a7; font-weight: 700;
  padding: 4px 9px 5px;
}
.site-header .dp-cols { display: grid; gap: 2px 14px; }
.site-header .dp-cols--1 { grid-template-columns: 1fr; }
.site-header .dp-cols--2 { grid-template-columns: 1fr 1fr; }
.site-header .dp-cols--3 { grid-template-columns: 1.15fr 1fr 1fr; }
.site-header .dp-sec { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.site-header .guides-panel a.dp-lead {
  font-weight: 700; font-size: 14px; color: #fff; padding: 9px 10px; margin: 0 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08); border-radius: 6px 6px 0 0;
}
.site-header .guides-panel a.dp-strong { font-weight: 700; color: #fff; }
.site-header .dp-sub { font-size: 11px; font-weight: 700; color: #cbd5e1; padding: 8px 9px 2px; }
/* state chips: pill grid, 4 across */
.site-header .dp-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 2px 4px 6px; }
.site-header .guides-panel .dp-chips a,
.site-header .dp-chips span {
  text-align: center; padding: 6px 0; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
}
.site-header .guides-panel .dp-chips a:hover { border-color: #1e3a8a; }
.site-header .dp-pills { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 4px 6px; }
.site-header .guides-panel .dp-pills a {
  display: inline-block; padding: 5px 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
}
.site-header .guides-panel .dp-pills a:hover { border-color: #1e3a8a; }
/* caret: points at the button that opened the panel (left set by site-header.js) */
.site-header .guides-panel::before {
  content: ""; position: absolute; top: -6px; left: var(--caret, 28px); width: 10px; height: 10px;
  background: #0f172a; border-left: 1px solid rgba(255,255,255,0.45); border-top: 1px solid rgba(255,255,255,0.45);
  transform: translateX(-50%) rotate(45deg);
}
/* preview door (allied health): one "coming soon" line, then the shared pages that already work */
.site-header .door-panel--preview { width: 360px; }
.site-header .dp-preview { display: flex; flex-direction: column; gap: 1px; }
.site-header .guides-panel p.dp-note { margin: 0 0 8px; padding: 6px 9px 10px; font-size: 13px; line-height: 1.45; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-header .guides-panel .dp-note a { display: inline; padding: 0; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.site-header .guides-panel .dp-note a:hover { background: none; }

/* ── Discipline dropdown (Nov 2026 proposal; replaced the Doctors | Nurses switch) ──
   Closed: a bordered button, "Viewing" + the current discipline + a down chevron, so it reads
   as "tap to change". Open: a small dark panel in the header-menu style, the current discipline
   ticked, allied health muted with a "Coming soon" pill while ALLIED_DOOR is "off".
   Desktop (1025px+): the panel opens under the button's left edge; at 1024px and below the
   button sits at the right end of row 1, so the panel hangs from its right edge. */
.site-header .disc-menu { position: relative; flex: 0 0 auto; }
.site-header .disc-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 8px 5px 12px;
  border: 1px solid rgba(255,255,255,0.34); border-radius: 8px; background: rgba(255,255,255,0.06);
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; white-space: nowrap;
  appearance: none; -webkit-appearance: none; cursor: pointer; user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.site-header .disc-pre { font-size: 12px; font-weight: 500; color: #cbd5e1; }
.site-header .disc-cur { display: inline-grid; justify-items: start; }
.site-header .disc-cur > span { grid-area: 1 / 1; }
.site-header .disc-sz { visibility: hidden; }
.site-header .disc-chev { flex: 0 0 auto; width: 16px; height: 16px; margin-left: 1px; transition: transform 0.2s ease; }
.site-header .disc-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }
.site-header .disc-menu.is-open .disc-btn { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.6); }
.site-header .disc-menu.is-open .disc-chev { transform: rotate(180deg); }
.site-header .disc-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1001;
  width: 250px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 6px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  background: #0f172a; box-shadow: 0 14px 28px rgba(0,0,0,0.28);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px);
  /* visibility flips at once on open (so keyboard focus can land on an item straight away)
     and only after the fade on close */
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.site-header .disc-menu.is-open .disc-panel {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
.site-header .disc-head {
  margin: 0; padding: 5px 10px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: #8b93a7;
}
.site-header .disc-list { list-style: none; margin: 0; padding: 0; }
.site-header .disc-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 40px; padding: 0 10px; border-radius: 8px;
  color: #e5e7eb; font-size: 14px; font-weight: 600; text-decoration: none;
}
.site-header .disc-opt:hover, .site-header .disc-opt:focus { background: #1e3a8a; color: #fff; outline: none; }
.site-header .disc-opt:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.site-header .disc-opt[aria-current] { color: #fff; font-weight: 700; }
.site-header .disc-check { flex: 0 0 auto; width: 18px; height: 18px; color: #93c5fd; visibility: hidden; }
.site-header .disc-opt[aria-current] .disc-check { visibility: visible; }
.site-header .disc-opt:hover .disc-check, .site-header .disc-opt:focus .disc-check { color: #fff; }
.site-header .disc-opt--soon { color: #94a3b8; font-weight: 500; }
.site-header .disc-soon {
  flex: 0 0 auto; padding: 2px 8px; border: 1px solid rgba(255,255,255,0.16); border-radius: 999px;
  background: rgba(255,255,255,0.06); color: #cbd5e1; font-size: 11px; font-weight: 600;
}

/* Between 1025 and 1199 the row is tight: trim paddings a little. */
@media (max-width: 1199px) and (min-width: 1025px) {
  .site-header .guides-toggle { padding: 7px 9px; }
  .nav-search input { width: 150px !important; }
}

/* iPad-portrait / small-laptop band (769–1024px): the four menu buttons get their own
   full-width row so the switch stops pinching them. */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-header .header-nav-shell { flex: 1 0 100%; order: 3; margin-top: 2px; }
  /* the dropdown sits at the right end of row 1 here: hang its panel from the right edge */
  .site-header .disc-panel { left: auto; right: 0; }
}

/* ── Phone (≤768px): two rows, no hamburger, nothing off-screen ── */
@media (max-width: 768px) {
  .site-header .shell { padding: 8px 12px; row-gap: 7px; column-gap: 8px; }
  .site-header .brand-main { font-size: 14px; }
  /* row 1 top-right: 44px tall tap target, panel under its right edge */
  .site-header .disc-btn { min-height: 44px; padding: 0 8px 0 12px; }
  .site-header .disc-panel { left: auto; right: 0; }
  .site-header .disc-opt { min-height: 44px; }
  .site-header .header-nav-shell { flex: 1 0 100%; order: 3; gap: 6px; }
  .site-header nav { flex: 1 1 auto; gap: 6px; }
  .site-header nav > .guides-item { flex: 1 1 0; min-width: 0; }
  /* four equal-width buttons: "the same four everywhere", visibly */
  .site-header .guides-toggle {
    width: 100%; justify-content: center; gap: 4px; min-height: 32px; padding: 5px 4px;
    font-size: 12.5px; white-space: nowrap; background: rgba(255,255,255,0.06); border-radius: 8px;
  }
  .site-header .guides-item.is-current > .guides-toggle { box-shadow: inset 0 -2px 0 #fff; border-radius: 8px 8px 3px 3px; }
  .site-header .guides-item { position: static; }
  /* panels open as a full-width sheet under row 2, sections stacked */
  .site-header .guides-panel {
    left: 0 !important; right: 0; width: auto !important; max-width: none;
    top: calc(100% + 6px); max-height: min(75vh, 640px); overflow-y: auto; overflow-x: hidden;
    padding: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  }
  .site-header .dp-cols, .site-header .dp-cols--2, .site-header .dp-cols--3 { grid-template-columns: 1fr; gap: 0; }
  .site-header .dp-sec + .dp-sec { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 4px; padding-top: 4px; }
  .site-header .guides-panel a { font-size: 13.5px; min-height: 38px; padding: 7px 10px; display: flex; align-items: center; }
  .site-header .guides-panel .dp-chips a, .site-header .dp-chips span { min-height: 36px; justify-content: center; padding: 0; display: flex; align-items: center; }
  .site-header .guides-panel .dp-pills a { min-height: 34px; display: inline-flex; }
  .site-header .guides-panel a.dp-lead { margin-bottom: 4px; gap: 6px; }
  .site-header .guides-panel::before { display: none; }
  .site-header .guides-panel .dp-note a { display: inline; min-height: 0; }
  /* bottom fade on a sheet that still overflows (.has-scroll set on open by site-header.js) */
  .site-header .guides-panel.has-scroll:not(.at-bottom)::after {
    content: ""; position: sticky; bottom: -8px; display: block; height: 30px; margin: -30px -8px -8px;
    background: linear-gradient(to bottom, rgba(15,23,42,0), #0f172a 80%); pointer-events: none;
  }
}
/* 360px Androids: shave the brand and the dropdown's padding so row 1 still fits */
@media (max-width: 374px) {
  .site-header .brand-main { font-size: 13px; }
  .site-header .disc-btn { padding: 0 6px 0 10px; gap: 5px; }
  .site-header .guides-toggle { font-size: 12px; }
}

/* ── Accessibility: skip link + visually-hidden utility ─────────────────────── */
.skip-link { position:absolute; left:-9999px; top:0; z-index:1200; background:#0f172a; color:#fff;
  padding:10px 16px; border-radius:0 0 8px 0; font-weight:600; text-decoration:none; }
.skip-link:focus { left:0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ── Front door ("/"): no discipline chosen yet. One deliberate 60px row on every width:
   the wordmark on the left, search on the right (a 44px icon on phone, a field on desktop).
   The tagline keeps the site-wide rule (desktop 1200px+ only), so on phone it never sits
   right above an H1 that says nearly the same thing. The cards are the choice, so there is
   no switch and no menu row. Every selector here is scoped to the chooser. ── */
.site-header--chooser .shell { flex-wrap: nowrap; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.site-header--chooser .brand { gap: 3px; }
.site-header--chooser .brand-main { font-size: 17px; letter-spacing: 0; }
.site-header--chooser .brand-tagline { font-size: 12px; }
.site-header--chooser .header-nav-shell { justify-content: flex-end; }
.site-header--chooser .nav-search input { width: 280px; padding: 8px 14px; font-size: 13.5px; }
.site-header--chooser .nav-search-btn:focus-visible,
.site-header--chooser .nav-search-close:focus-visible,
.site-header--chooser .brand:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
@media (min-width: 769px) and (max-width: 1024px) {
  .site-header--chooser .header-nav-shell { flex: 1 1 auto; order: 0; margin-top: 0; }
}
@media (max-width: 768px) {
  .site-header--chooser .shell { position: relative; padding: 8px 16px; column-gap: 12px; }
  .site-header--chooser .brand-main { font-size: 17px; }
  .site-header--chooser .header-nav-shell { flex: 0 0 auto; order: 0; position: static; }
  /* 44px tap targets; the icon itself stays the same size */
  .site-header--chooser .nav-search-btn { width: 44px; height: 44px; border-radius: 12px; }
  .site-header--chooser .header-nav-shell.search-open .nav-search-close { width: 44px; height: 44px; border-radius: 12px; }
  /* tapping the icon lays the field over the whole row (the shell), as the chip row does elsewhere */
  .site-header--chooser .header-nav-shell.search-open .nav-search { padding: 0 8px 0 16px; }
  .site-header--chooser .header-nav-shell.search-open .nav-search input { min-height: 44px; font-size: 16px; padding: 8px 14px; }
  .site-header--chooser .nav-ss-drop { left: 16px; right: 16px; }
}
@media (max-width: 340px) {
  .site-header--chooser .brand-main { font-size: 16px; }
}
