/* ========================================
   ARTICLE PAGE RIGHT SIDEBAR
   ======================================== */

/* Hide sidebar boxes below two-column threshold — inline versions shown instead */
@media (max-width: 1199px) {
  .lt-article-container__sidebar {
    display: none;
  }
  .lt-article-sidebar-toc,
  .lt-article-sidebar-related {
    display: none;
  }
}

@media (min-width: 1200px) {
  .lt-article-container__sidebar {
    align-self: start;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0;
    border-top: none;
  }

  /* TOC box — blue tinted background */
  .lt-article-sidebar-toc {
    background: rgba(115, 169, 255, 0.15);
    border-radius: 12px;
    padding: 20px 20px 24px;
  }

  /* Related articles box — transparent with border */
  .lt-article-sidebar-related {
    background: transparent;
    border: 1px solid #000000;
    border-radius: 12px;
    padding: 20px 20px 24px;
  }

  /* TOC title */
  .lt-article-sidebar-toc__title {
    font-size: 1rem;
    font-weight: 500;
    color: #191a1f;
    margin: 0 0 0.625rem 0;
  }

  /* TOC link list */
  .lt-article-sidebar-toc ol {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .lt-article-sidebar-toc ol li {
    font-size: 0.875rem;
    line-height: 1.375;
    color: #191a1f;
  }

  .lt-article-sidebar-toc a {
    color: #191a1f !important;
    font-weight: 400;
    text-decoration: none !important;
    display: block;
    padding: 3px 4px;
    border-radius: 4px;
  }

  .lt-article-sidebar-toc a:hover {
    color: #191a1f !important;
    text-decoration: underline !important;
    background: rgba(115, 169, 255, 0.2);
  }

  /* Reset margin from global .related-articles rule */
  .lt-article-sidebar-related .related-articles {
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Related articles box heading */
  .lt-article-sidebar-related .related-articles h2,
  .lt-article-sidebar-related .related-articles h3 {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #191a1f !important;
    margin: 0 0 0.625rem 0 !important;
    letter-spacing: normal !important;
  }

  /* Related articles link list */
  .lt-article-sidebar-related .related-articles ul {
    padding-left: 0;
    margin: 0 !important;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .lt-article-sidebar-related .related-articles ul > li {
    margin-bottom: 0 !important;
  }

  .lt-article-sidebar-related .related-articles ul > li a {
    color: #191a1f !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    line-height: 1.375;
    display: block;
    padding: 3px 4px;
  }

  .lt-article-sidebar-related .related-articles ul > li a:hover {
    color: var(--color-brand-primary) !important;
    text-decoration: underline !important;
  }
}

/* ========================================
   MOBILE INLINE TOC
   ======================================== */

/* Hide mobile versions at two-column threshold */
@media (min-width: 1200px) {
  .lt-article-toc-mobile,
  .lt-article-related-mobile {
    display: none;
  }
}

@media (max-width: 1199px) {
  .lt-article-toc-mobile {
    background: rgba(115, 169, 255, 0.15);
    border-radius: 12px;
    padding: 20px 20px 24px;
    margin-bottom: 2rem;
  }

  .lt-article-toc-mobile__title {
    font-size: 1rem;
    font-weight: 500;
    color: #191a1f;
    margin: 0 0 0.625rem 0;
  }

  .lt-article-toc-mobile ol {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .lt-article-toc-mobile ol li {
    font-size: 0.875rem;
    line-height: 1.375;
    color: #191a1f;
  }

  .lt-article-toc-mobile a {
    color: #191a1f !important;
    font-weight: 400;
    text-decoration: none !important;
    display: block;
    padding: 3px 4px;
    border-radius: 4px;
  }

  .lt-article-toc-mobile a:hover {
    color: #191a1f !important;
    text-decoration: underline !important;
    background: rgba(115, 169, 255, 0.2);
  }

  /* Mobile related articles — boxed to match desktop sidebar */
  .lt-article-related-mobile {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #000000;
    border-radius: 12px;
    padding: 20px 20px 24px;
  }

  .lt-article-related-mobile .related-articles {
    margin-top: 0;
    margin-bottom: 0;
  }

  .lt-article-related-mobile .related-articles h2,
  .lt-article-related-mobile .related-articles h3 {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #191a1f !important;
    margin: 0 0 0.625rem 0 !important;
    letter-spacing: normal !important;
  }

  .lt-article-related-mobile .related-articles ul > li a {
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: #191a1f !important;
    text-decoration: none !important;
  }
}
