/* Automatic inner-page navigation. This file is intentionally isolated from page layout CSS. */
.tlc-auto-page-navigation,
.elementor-widget-tlc_page_navigation {
  --tlc-page-toc-width: 286px;
  min-width: 0;
}

.tlc-page-toc {
  width: 100%;
  padding: 22px 22px 18px;
  color: var(--tlc-navy, #003057);
  background: #fff;
  border: 1px solid rgba(0,48,87,.13);
  border-top: 5px solid var(--tlc-blue, #008fc5);
  border-radius: var(--tlc-master-card-radius, 20px);
  box-shadow: 0 12px 34px rgba(0,48,87,.09);
}
.tlc-page-toc__heading {
  margin: 0 0 12px;
  color: var(--tlc-navy, #003057);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}
.tlc-page-toc__list {
  display: grid;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.tlc-page-toc__list li { min-width: 0; }
.tlc-page-toc a {
  position: relative;
  display: block;
  padding: 8px 8px 8px 14px;
  color: #38596d;
  border-radius: 9px;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.32;
  overflow-wrap: anywhere;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.tlc-page-toc a::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  background: transparent;
  border-radius: 99px;
}
.tlc-page-toc a:hover,
.tlc-page-toc a:focus-visible,
.tlc-page-toc a.is-active {
  color: #006f9f;
  background: #edf7fb;
}
.tlc-page-toc a:hover,
.tlc-page-toc a:focus-visible { transform: translateX(2px); }
.tlc-page-toc a.is-active::before { background: var(--tlc-blue, #008fc5); }
.tlc-page-toc .is-subheading a { padding-left: 24px; font-size: .8rem; font-weight: 650; }

/* Very wide screens have enough space outside the 1280px site shell. */
@media (min-width: 1920px) {
  .tlc-auto-page-navigation.is-floating {
    position: fixed;
    z-index: 35;
    top: calc(var(--tlc-sticky-stack-offset, 150px) + 20px);
    right: max(24px, calc((100vw - 1872px) / 2));
    width: var(--tlc-page-toc-width);
    max-height: calc(100dvh - var(--tlc-sticky-stack-offset, 150px) - 44px);
    overflow: auto;
    scrollbar-width: thin;
  }
}

/* Normal desktops use a slim sticky horizontal rail so page layouts are never squeezed. */
@media (min-width: 961px) and (max-width: 1919px) {
  .tlc-auto-page-navigation.is-inline {
    position: sticky;
    z-index: 30;
    top: var(--tlc-sticky-stack-offset, 150px);
    width: min(calc(100% - 40px), var(--tlc-shell, 1280px));
    margin: 18px auto 0;
  }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 12px 16px;
    border-top-width: 4px;
    border-radius: 16px;
  }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc__heading { margin: 0; white-space: nowrap; }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc__list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc__list li { flex: 0 0 auto; }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc a { padding: 8px 12px; white-space: nowrap; }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc a::before { inset: auto 10px 3px; width: auto; height: 3px; }
}

@media (max-width: 960px) {
  .tlc-auto-page-navigation.is-inline {
    position: static;
    width: min(calc(100% - 28px), var(--tlc-shell, 1280px));
    margin: 18px auto 0;
  }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc { padding: 18px; }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc__list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc__list li { flex: 0 0 auto; }
  .tlc-auto-page-navigation.is-inline .tlc-page-toc a { white-space: nowrap; }
}

/* Elementor manual widget always follows the position chosen by the editor. */
.elementor-widget-tlc_page_navigation .tlc-page-toc { max-width: 100%; }

/* The wide floating card stays out of the hero at the top of the page and
   reveals itself only after the visitor begins scrolling. */
@media (min-width: 1920px) {
  .tlc-auto-page-navigation.is-floating {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity .28s ease,
      transform .28s ease,
      visibility 0s linear .28s;
  }

  .tlc-auto-page-navigation.is-floating.is-scroll-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tlc-auto-page-navigation.is-floating {
    transition: none;
    transform: none;
  }
}
