/* Measure the space inside the pill, including the visitor's chosen font size. */
.studio-header:has(.hn-access) {
  container: public-header / inline-size;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(8px, 1.8vw, 28px);
  padding: 5px clamp(8px, 1.2vw, 18px);
  border-radius: 48px;
}
.studio-header > .studio-brand { grid-area: 1 / 1; justify-self: start; }
.studio-header:has(.hn-access) > .studio-navigation {
  grid-area: 1 / 2; justify-self: start; width: auto; min-width: 0;
}
.studio-header .studio-main-links, .studio-header > .hn-access {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.studio-header > .hn-access {
  grid-area: 1 / 3; justify-self: end; margin: 0; gap: clamp(10px, 1.4vw, 22px);
}
.studio-header .studio-main-links a { padding-inline: clamp(8px, 1vw, 16px); }
.studio-header .studio-main-links a:not(.hn-nav-primary, .hn-nav-index) { display: none; }
.mobile-index-toggle, .mobile-index:not([open]) { display: none; }
.mobile-index-toggle, .mobile-index-close {
  align-items: center; justify-self: start; gap: 6px;
  min-height: 44px; padding: 0 8px; border: 0;
  background: transparent; color: inherit; font: inherit; font-size: .87rem; font-weight: 700;
  cursor: pointer;
}
.mobile-index svg, .mobile-index-toggle svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* The site map remains a working link when scripts are unavailable. */
@container public-header (max-width: 49em) {
  .studio-header .studio-main-links .hn-nav-primary { display: none; }
  .studio-header.has-mobile-index > .studio-navigation { display: none; }
  .mobile-index-toggle { display: inline-flex; grid-area: 1 / 2; }
}
@container public-header (max-width: 33em) {
  .studio-header:has(.hn-access) > .studio-navigation, .mobile-index-toggle { grid-area: 1 / 1; }
  .studio-header > .studio-brand { grid-area: 1 / 1 / 2 / -1; justify-self: center; }
  .studio-header.has-mobile-index > .hn-access { display: none; }
  .studio-header.has-mobile-index > .studio-brand img { width: clamp(83px, 25vw, 106px); height: auto; }
  .studio-header:not(.has-mobile-index) > .hn-access { grid-area: 2 / 1 / 3 / -1; justify-self: center; }
}
@media (max-width:550px) {
  .studio-header.has-mobile-index { min-height: 56px; }
}

.mobile-index[open] {
  display: flex; flex-direction: column; gap: 12px; inset: 0; margin: 0;
  width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none;
  padding: max(8px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right))
           max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
  box-sizing: border-box; border: 0; border-radius: 0; background: #FAF8F3; color: #18382B;
  overflow-y: auto;
}
.mobile-index::backdrop { background: rgba(6,46,33,.28); }
.show-mobile-index { overflow: hidden; }
.mobile-index-head { display: grid; align-items: center; grid-template-columns: 1fr auto 1fr; min-height: 48px; flex: none; }
.mobile-index-head .studio-brand { justify-self: center; }
.mobile-index-head .studio-brand img { width: clamp(83px,25vw,106px); height: auto; display: block; }
.mobile-index-close { display: inline-flex; }
.mobile-index nav { display: grid; margin: auto 0; flex: none; }
.mobile-index nav section + section { margin-top: 16px; }
.mobile-index nav h2 { margin: 0 0 4px; font-size: .86rem; letter-spacing: .02em; color: #315a47; }
.mobile-index nav div { overflow: hidden; border-bottom: 1px solid #b8cbbf; }
.mobile-index nav a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 2px;
  color: #18382B; text-decoration: none; font-size: clamp(19px,5.2vw,27px); font-weight: 600; line-height: 1.15;
}
.mobile-index nav a[aria-current=page] { color: #064632; text-decoration: underline; text-underline-offset: .19em; }
.mobile-index-demo { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; color: #064632; font-weight: 700; }
.mobile-index a:focus-visible, .mobile-index button:focus-visible, .mobile-index-toggle:focus-visible { outline: 3px solid #064632; outline-offset: -3px; }
