/* Shell queries have their own container so page layouts cannot change navigation breakpoints. */
html { scrollbar-gutter: stable; }
.skip-link { z-index: 80; }
.site-shell { container: shell / inline-size; min-height: 100dvh; }
.site-header.page-width, .site-footer.page-width { width: 100%; max-width: var(--page-width); padding-inline: var(--space-7); }
.site-header { font-size: 16px; line-height: 1.5; }
.brand { min-width: 0; }
.brand img { max-width: none; }
.nav-tray, .account-button { flex-shrink: 0; }
.nav-tray a, .account-button { white-space: nowrap; }
.account-button .avatar .icon { width: 18px; height: 18px; }
.account-button[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-1); }
.site-footer { margin-top: var(--space-8); border-top: 1px solid var(--line); }
.footer-line { margin-top: var(--space-4); }
.footer-links a { min-width: var(--target); }
/* Keep the existing consent choice reachable above a running/finished task dock. */
.site-shell:has(.matcher-task-dock) .consent-banner { bottom: 148px; max-height: calc(100dvh - 172px); overflow-y: auto; }

/* Compact the tray before phone navigation takes over; retain the approved logo size. */
@container shell (min-width: 761px) and (max-width: 1080px) {
  .site-header { gap: 12px; }
  .nav-tray a { padding-inline: 10px; font-size: 14px; }
  .account-button { padding-right: 12px; font-size: 14px; }
}

@container shell (max-width: 760px) {
  .site-header.page-width, .site-footer.page-width { padding-inline: var(--space-4); }
  .site-header { min-height: 72px; }
  .brand img { width: 186px; margin: -16px 0 -16px -15px; }
  .nav-tray { display: none; }
  .account-button { min-width: var(--target); justify-content: center; padding: 0 6px; }
  .account-button .label { display: none; }
  /* Sticky stays in normal flow, leaving space for the last footer link. */
  .bottom-nav { display: flex; gap: 4px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .site-footer { padding-bottom: var(--space-8); }
  .site-shell :focus-visible { scroll-margin-block: 24px 100px; }
  /* First-visit privacy choices must leave the phone navigation reachable. */
  .consent-banner { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 116px - env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .site-shell:has(.matcher-task-dock) .consent-banner { bottom: calc(252px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 276px - env(safe-area-inset-bottom, 0px)); }
}
