/* Desktop keeps its existing header layout. */
.tlc-mobile-header-group { display: contents; }

html.tlc-mobile-header-active body .tlc-mobile-header-group {
  display: block;
  position: sticky;
  top: 0;
  z-index: 1202;
  transition: transform 260ms cubic-bezier(.22,1,.36,1);
}
html.tlc-mobile-header-active body .tlc-mobile-header-group.tlc-mobile-header-at-top {
  transform: none;
  transition: none;
}
html.tlc-mobile-header-active body .tlc-mobile-header-group > .tlc-info-bar,
html.tlc-mobile-header-active body .tlc-mobile-header-group > header.tlc-site-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  transition: none !important;
  will-change: auto;
}
html.tlc-mobile-header-active body .tlc-mobile-header-group.tlc-mobile-header-hidden {
  transform: translateY(calc(-100% - 3px));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html.tlc-mobile-header-active body .tlc-mobile-header-group { transition: none; }
}

/* Prevent mobile rubber-band space above the navy bar and below the footer. */
html.tlc-mobile-header-active,
html.tlc-mobile-header-active body {
  overscroll-behavior-y: none;
}

/* Match the canvas beneath fractional footer edges and iPhone safe areas. */
html.tlc-mobile-header-active { background-color: var(--tlc-footer-edge, #23303d); }
html.tlc-mobile-header-active body > footer {
  margin-bottom: 0 !important;
  box-shadow: 0 3px 0 var(--tlc-footer-edge, #23303d);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}
.tlc-pull-indicator {
  position: fixed;
  z-index: 20000;
  top: env(safe-area-inset-top, 0px);
  left: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f3fafb;
  box-shadow: 0 4px 18px rgba(13,42,74,.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -56px);
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}
html.tlc-mobile-header-active .tlc-pull-indicator.tlc-pull-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, var(--pull-offset, 54px));
  transition: opacity 100ms ease;
}
.tlc-pull-indicator svg {
  width: 100%;
  height: 100%;
  transform: rotate(var(--pull-rotation, 0deg));
}
.tlc-pull-indicator.tlc-pull-loading svg { animation: tlc-refresh-turn 800ms linear infinite; }
@keyframes tlc-refresh-turn { to { transform: rotate(calc(var(--pull-rotation, 0deg) + 360deg)); } }
@media (prefers-reduced-motion: reduce) {
  .tlc-pull-indicator, .tlc-pull-indicator svg { transition: none !important; animation: none !important; }
}

.tlc-menu-header-space { display:none; }
/* Menu scroll locking must not push the sticky header out of the viewport. */
html.tlc-mobile-header-active body.menu-open > .tlc-menu-header-space { display:block; }
html.tlc-mobile-header-active body.menu-open > .tlc-mobile-header-group {
  position:fixed !important;
  top:0 !important;
  left:0;
  right:0;
  width:100%;
  transform:none !important;
  transition:none !important;
  z-index:12003 !important;
  pointer-events:auto !important;
}

/* Keep body from becoming a separate scroll container on iPhone. */
html.tlc-mobile-header-active body {
  overflow-x:clip !important;
  overflow-y:visible !important;
}
html.tlc-mobile-header-active:has(.menu-toggle[aria-expanded="true"]) {
  overflow-y:hidden !important;
}
