/* Shared navigation, v0.4.4. Progressive enhancement: links remain without JS. */
.cb-back-top {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #c5ceca;
  border-radius: 9px;
  background: #fff;
  color: #cb1426;
  box-shadow: 0 2px 10px #17251e18;
  cursor: pointer;
}
.cb-back-top[hidden] { display: none; }
.cb-back-top svg { width: 23px; height: 23px; }
.cb-back-top:hover { border-color: #cb1426; background: #fff5f6; }
.cb-back-top:focus-visible, .cb-menu-toggle:focus-visible {
  outline: 3px solid #007c76;
  outline-offset: 4px;
}
.cb-menu-toggle { display: none; }
html.cb-navigation-ready { scroll-padding-top: 24px; }
body:has(.cb-back-top) { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 1100px) {
  html.cb-navigation-ready {
    scroll-padding-top: calc(var(--cb-header-height, 0px) + var(--cb-admin-offset, 0px) + 16px);
  }
  .masthead[data-cb-navigation], .subpage-header[data-cb-navigation] {
    position: sticky;
    top: var(--cb-admin-offset, 0px);
    z-index: 90;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 16px;
    min-height: 68px;
    padding: 10px 18px;
    background: #fff;
    border-bottom: 1px solid #d9dfdc;
  }
  [data-cb-navigation] > .brand {
    width: 245px;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }
  [data-cb-navigation] > a { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
  [data-cb-navigation] > .cb-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c5ceca;
    border-radius: 6px;
    background: #fff;
    color: #171c19;
    font: 700 14px/1.4 Arial, sans-serif;
  }
  .cb-menu-toggle svg { width: 18px; height: 18px; }
  .masthead[data-cb-navigation] > nav, .subpage-header[data-cb-navigation] > nav {
    display: none;
    grid-column: 1 / -1;
    align-items: stretch;
    gap: 0;
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #d9dfdc;
    font-size: 0;
    overflow-y: auto;
    max-height: calc(100vh - 120px - var(--cb-admin-offset, 0px));
    max-height: calc(100dvh - 120px - var(--cb-admin-offset, 0px));
    overscroll-behavior: contain;
  }
  [data-cb-navigation].cb-menu-open > nav { display: flex; flex-direction: column; }
  .masthead[data-cb-navigation] > nav a, .subpage-header[data-cb-navigation] > nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    max-width: none;
    padding: 10px 8px;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-decoration: none;
  }
  [data-cb-navigation] > nav .nav-cta { margin-top: 6px; }
}
@media (max-width: 380px) {
  .masthead[data-cb-navigation], .subpage-header[data-cb-navigation] { gap: 0 10px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html.cb-navigation-ready { scroll-behavior: auto; }
}
