/* The shared staff header (templates/_staff_header.html), built from the landing page's bar:
   paper bar, line border, pill links, brand fill on the current page. Tokens: static/depot-tokens.css.
   Self-contained so it renders the same on Tailwind pages and style.css pages. */
.sh { position: sticky; top: 0; z-index: 40; background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); font-family: var(--font); }
.sh a { text-decoration: none; }
.sh-row, .sh-sub { display: flex; align-items: center; gap: var(--s4); max-width: 80rem; margin: 0 auto; padding: 0 var(--pad-x); }
/* staff pages share this container: 80rem wide (Tailwind max-w-80) with the site side padding px-[var(--pad-x)] */
.sh-row { min-height: 64px; }
.sh-subwrap { border-top: 1px solid var(--line); }
.sh-sub { min-height: 48px; justify-content: space-between; }
.sh-logo { flex: none; display: block; border-radius: 8px; }
.sh-logo img { display: block; height: 40px; width: auto; }

.sh-nav { display: flex; gap: var(--s1); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sh-nav::-webkit-scrollbar { display: none; }
.sh-nav a, .sh-out { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 560; white-space: nowrap; color: var(--ink-2);
  transition: color var(--dur-micro) var(--ease), background-color var(--dur-micro) var(--ease), transform var(--dur-micro) var(--ease); }
.sh-nav a[aria-current="page"] { background: var(--brand); color: var(--on-dark); }
.sh-nav-sub a { min-height: 36px; font-size: var(--fs-xs); padding: 0 var(--s3); }
.sh-nav-sub a[aria-current="page"] { background: var(--canvas-2); color: var(--brand); }
.sh-out { flex: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.sh-count { margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: var(--r-pill); background: #fcebec; color: #a3172a;
  font-size: 12px; font-weight: 650; line-height: 20px; text-align: center; }
.sh-nav a[aria-current="page"] .sh-count { background: var(--on-dark); }
.sh-div { flex: none; width: 1px; margin: 8px var(--s1); background: var(--line); }

/* Office and the tech's name: small menus (details/summary, no script needed to open) */
.sh-menu { position: relative; flex: none; }
.sh-menu:first-of-type { margin-left: auto; }
.sh-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 560; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.sh-menu > summary::-webkit-details-marker { display: none; }
.sh-menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); }
.sh-menu[open] > summary, .sh-menu.sh-on > summary { background: var(--canvas-2); color: var(--brand); }
.sh-me > summary { border: 1px solid var(--line); background: var(--paper); color: var(--ink); max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.sh-missing > summary { border-color: #c8283d; color: #a3172a; }
.sh-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 20rem; padding: var(--s2); border: 1px solid var(--line);
  border-radius: 14px; background: var(--paper); display: grid; gap: 2px; max-height: calc(100dvh - 88px); overflow-y: auto; }
.sh-pop a { display: grid; gap: 1px; padding: var(--s2) var(--s3); border-radius: 10px; color: var(--ink); }
.sh-pop a b { font-size: var(--fs-sm); font-weight: 600; }
.sh-pop a span { font-size: 13px; color: var(--ink-2); }
.sh-pop a:hover, .sh-pop a[aria-current="page"] { background: var(--canvas-2); }
.sh-pop a[aria-current="page"] b { color: var(--brand); }
.sh-pop-h { margin: var(--s2) var(--s3) 2px; font-size: 12px; font-weight: 600; color: var(--ink-3, var(--ink-2)); }
.sh-pop-h:first-child { margin-top: 0; }
form.sh-pop { gap: var(--s2); padding: var(--s3); }
form.sh-pop label { font-size: 13px; color: var(--ink-2); }
form.sh-pop input { min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: 10px; font: 500 var(--fs-sm) var(--font); }
form.sh-pop button { min-height: 40px; border: 0; border-radius: var(--r-pill); background: var(--brand); color: var(--on-dark);
  font: 600 var(--fs-sm) var(--font); cursor: pointer; }
.sh-who { flex: none; font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.sh-who a { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #b9a9de; }
.sh a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sh-nav a:active, .sh-out:active { transform: scale(0.97); }
@media (hover: hover) {
  .sh-nav a:not([aria-current="page"]):hover { background: var(--canvas-2); color: var(--brand); }
  .sh-out:hover { border-color: #b9a9de; }
}

/* the gear: a round icon button in place of the Office word; its popover also holds the Bench actions as rows like the links */
.sh-gear > summary { width: 40px; padding: 0; justify-content: center; }
.sh-gear > summary::after { display: none; }
.sh-pop .sh-act { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 40px; padding: var(--s2) var(--s3); border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: 600 var(--fs-sm) var(--font); text-align: left; cursor: pointer; }
.sh-pop .sh-act:hover { background: var(--canvas-2); }
.sh-pop .sh-tick { font-weight: 500; color: var(--ink-2); min-height: 32px; }
.sh-pop .sh-tick input { margin: 0; }
.sh-pop .sh-rule { margin: var(--s2) var(--s3); border: 0; border-top: 1px solid var(--line, var(--canvas-2)); }
.sh-pop .sh-nested { margin-left: var(--s3); width: auto; }
.sh-pop .sh-note { margin: 0 var(--s3) var(--s2) calc(var(--s3) * 2 + var(--s2)); font-size: 12px; color: var(--ink-2); }

.sh-pop a.sh-narrow { display: none; }

/* phone: logo and sign out on the first row, the page links under them, sharing the width so none
   runs off the edge (Help moves into the Office menu) */
@media (max-width: 767px) {
  .sh-nav .sh-wide, .sh-row > .sh-nav .sh-div { display: none; }
  .sh-pop a.sh-narrow { display: grid; }
  .sh-row > .sh-nav a { flex: 1 0 auto; justify-content: center; padding: 0 var(--s3); }
  .sh-row { flex-wrap: wrap; gap: var(--s2) var(--s3); padding-top: var(--s2); padding-bottom: var(--s2); }
  .sh-logo img { height: 34px; }
  .sh-row > .sh-nav { order: 3; flex: 1 1 100%; margin: 0 calc(-1 * var(--pad-x)); padding: 0 var(--pad-x); }
  .sh-menu > summary, .sh-out { padding: 0 var(--s3); }
  .sh-me > summary { max-width: 9rem; }
  .sh-pop { position: fixed; left: 12px; right: 12px; top: auto; width: auto; margin-top: 6px; }
  .sh-sub { flex-wrap: wrap; gap: var(--s1); padding-top: var(--s2); padding-bottom: var(--s2); }
  .sh-sub .sh-nav { flex: 1 1 100%; margin: 0 calc(-1 * var(--pad-x)); padding: 0 var(--pad-x); }
}

/* The Bench header (templates/_bench_header.html): the Helper's header. Tabs on the left, icons on the right. */
.sh-bench .sh-tabs { flex: 0 1 auto; }
.sh-right { display: flex; align-items: center; gap: var(--s1); margin-left: auto; flex: none; }
.sh-right .sh-menu:first-of-type { margin-left: 0; }
.sh-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; font: inherit; }
.sh-ic:hover, .sh-ic:focus-visible { background: var(--canvas-2); color: var(--brand); }
/* a visible tooltip, not only the title attribute: it shows on hover and on keyboard focus */
.sh-ic[data-tip]::after, .sh-chip[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  padding: 4px 10px; border-radius: 8px; background: var(--brand); color: var(--on-dark); font: 600 12px/1.4 var(--font);
  white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-2px);
  transition: opacity var(--dur-micro) var(--ease), transform var(--dur-micro) var(--ease); }
.sh-ic:hover::after, .sh-ic:focus-visible::after, .sh-chip:hover::after, .sh-chip:focus-visible::after { opacity: 1; transform: none; }
.sh-menu[open] > .sh-chip::after { display: none; }
.sh-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 var(--s3) 0 5px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: var(--fs-sm); font-weight: 560; cursor: pointer; max-width: 15rem; }
.sh-menu > .sh-chip::after { position: absolute; display: block; width: auto; height: auto; border: 0; transform: translateY(-2px); }
.sh-chip .sh-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: #dbe7fb; color: #1d3f8f; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.sh-chip[data-color="green"] .sh-av { background: #d8f1df; color: #17622e; }
.sh-chip[data-color="red"] .sh-av { background: #fbdada; color: #a3172a; }
.sh-chip[data-color="pink"] .sh-av { background: #fbdcec; color: #a3205f; }
.sh-chip[data-color="magenta"] .sh-av { background: #f3d4f5; color: #8a1d93; }
.sh-chip[data-color="purple"] .sh-av { background: #e3dbf7; color: #4a2a9c; }
.sh-chip[data-color="orange"] .sh-av { background: #fde6cf; color: #9b4a07; }
.sh-chip[data-color="black"] .sh-av { background: #1f1f24; color: #fff; }
.sh-chip[data-color="white"] .sh-av { background: #fff; color: #1f1f24; box-shadow: inset 0 0 0 1px var(--line); }
.sh-missing.sh-chip, .sh-missing > .sh-chip { border-color: #c8283d; color: #a3172a; }
.sh-me > .sh-chip::before { display: none; }
.sh-bench .sh-me > summary.sh-chip { max-width: 15rem; }
.sh-bench .sh-office { margin-left: var(--s1); }
@media (max-width: 820px) {
  .sh-bench .sh-row { gap: var(--s2); }
  .sh-chip .sh-nm { display: none; }
  .sh-chip { padding: 0 5px; }
  .sh-bench .sh-out { display: none; }
  .sh-bench .sh-office > summary { padding: 0 var(--s3); }
}
@media (max-width: 520px) {
  .sh-bench .sh-logo img { height: 30px; }
  .sh-bench .sh-nav a { padding: 0 var(--s3); }
  .sh-ic { width: 36px; height: 36px; }
  .sh-right { gap: 0; }
}
