/* GeologyScience Floating Contents 1.2.0 — only GSFC's own styles. */
.gs-floating-toc, .gs-floating-toc * { box-sizing: border-box; }
.gs-floating-toc[hidden] { display: none !important; }
.gs-floating-toc {
  --gsfc-accent: #0872c6;
  --gsfc-top: 104px;
  --gsfc-left: 12px;
  --gsfc-width: 238px;
  position: fixed !important;
  inset: auto auto auto auto;
  top: var(--gs-top, var(--gsfc-top));
  left: var(--gs-left, var(--gsfc-left));
  width: var(--gs-width, var(--gsfc-width));
  z-index: 999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #263444;
  text-align: left;
  isolation: isolate;
}
.gs-floating-toc .gs-toc-panel {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(5, 18, 36, .14);
  overflow: hidden;
}
.gs-floating-toc .gs-toc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 12px 11px;
  border-bottom: 1px solid #edf1f4;
}
.gs-floating-toc .gs-toc-head-label {
  color: #18212d;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.3px;
}
.gs-floating-toc .gs-toc-count {
  margin-left: auto;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf4fd;
  color: #477497;
  font-size: 10px;
}
.gs-floating-toc .gs-toc-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: max(70px, calc(100vh - var(--gs-top, var(--gsfc-top)) - 107px));
  max-height: max(70px, calc(100dvh - var(--gs-top, var(--gsfc-top)) - 107px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.gs-floating-toc .gs-toc-scroll::-webkit-scrollbar { width: 5px; }
.gs-floating-toc .gs-toc-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.gs-floating-toc .gs-toc-list, .gs-floating-toc .gs-toc-sublist {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.gs-floating-toc .gs-toc-list { padding: 7px 0 8px !important; }
.gs-floating-toc .gs-toc-item { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.gs-floating-toc .gs-toc-item::before, .gs-floating-toc .gs-toc-item::marker { content: none !important; }
.gs-floating-toc .gs-toc-row { display: flex; align-items: flex-start; }
.gs-floating-toc .gs-toc-link {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 5px 8px 12px;
  border-left: 3px solid transparent;
  color: #3f4e60 !important;
  background: transparent;
  font-size: 12.5px;
  font-weight: 540;
  line-height: 1.44;
  text-decoration: none !important;
  overflow-wrap: anywhere;
  transition: color .12s ease, background-color .12s ease, border-color .12s ease;
}
.gs-floating-toc .gs-toc-link:hover, .gs-floating-toc .gs-toc-link:focus-visible {
  color: var(--gsfc-accent) !important;
  background: #f4f9fd !important;
  outline-offset: -2px;
}
.gs-floating-toc .gs-toc-item.is-active > .gs-toc-row > .gs-toc-link {
  background: #edf6ff !important;
  color: var(--gsfc-accent) !important;
  border-left-color: var(--gsfc-accent) !important;
  font-weight: 700;
}
.gs-floating-toc .gs-toc-expand {
  flex: 0 0 27px;
  min-height: 32px;
  padding: 9px 3px !important;
  margin: 0 4px 0 0 !important;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  color: #65758a;
  cursor: pointer;
  line-height: 1;
}
.gs-floating-toc .gs-toc-expand:hover, .gs-floating-toc .gs-toc-expand:focus-visible { color: var(--gsfc-accent); background: #edf6ff !important; }
.gs-floating-toc .gs-toc-expand svg { display: block; margin: auto; transform: rotate(-90deg); transition: transform .15s ease; }
.gs-floating-toc .gs-toc-expand[aria-expanded="true"] svg { transform: rotate(0); }
.gs-floating-toc .gs-toc-sublist[hidden] { display: none !important; }
.gs-floating-toc .gs-toc-sublist { padding: 3px 0 6px !important; background: #fafcfe; }
.gs-floating-toc .gs-toc-sublist .gs-toc-link { padding: 6px 7px 6px 23px; color: #576b7c !important; font-size: 12px; font-weight: 400; }
.gs-floating-toc .gs-toc-foot {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 9px 12px 12px;
  color: #8997a6;
  font-size: 10px;
  border-top: 1px solid #edf1f4;
}
.gs-floating-toc #gs-toc-position { color: #53687c; font-weight: 700; }
.gs-floating-toc .gs-toc-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #e8f0f6; }
.gs-floating-toc .gs-toc-progress span { display: block; height: 100%; width: 0; background: var(--gsfc-accent); transition: width .18s linear; }
.gs-floating-toc .gs-toc-close, .gs-floating-toc .gs-toc-mobile-button { display: none; }

/* Hide LuckyWP's *in-article* duplicate only when the floating TOC actually initialized.
   The sidebar/widget and LuckyWP settings are not changed. */
body.gsfc-ready.single-post .td-post-content .lwptoc,
body.gsfc-ready.single-post .tdb-post-content .lwptoc,
body.gsfc-ready.single-post .tdb_single_content .tdb-block-inner .lwptoc,
body.gsfc-ready.single-post article .entry-content .lwptoc { display: none !important; }

/* Reduce on-page conflict with sticky navigation when linking to a heading. */
.gsfc-target { scroll-margin-top: 110px; }

/* Narrow viewport: small floating action button + contained menu drawer. */
.gs-floating-toc.gs-toc-compact {
  top: auto !important;
  left: auto !important;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: auto !important;
  z-index: 10000;
}
.gs-floating-toc.gs-toc-compact .gs-toc-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(360px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 100px));
  max-height: min(640px, calc(100dvh - 100px - env(safe-area-inset-bottom)));
  overflow: hidden;
  box-shadow: 0 14px 45px rgba(0, 15, 35, .23);
}
.gs-floating-toc.gs-toc-compact.gs-toc-open .gs-toc-panel { display: flex; }
.gs-floating-toc.gs-toc-compact .gs-toc-scroll { flex: 1 1 auto; max-height: none; min-height: 0; }
.gs-floating-toc.gs-toc-compact .gs-toc-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  background: transparent !important;
  color: #64758a;
  padding: 5px !important;
  border-radius: 4px;
  cursor: pointer;
}
.gs-floating-toc.gs-toc-compact .gs-toc-mobile-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 15px !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  border-radius: 999px;
  background: #152c40 !important;
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .23);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.gs-floating-toc.gs-toc-compact .gs-toc-mobile-button:focus-visible { outline: 3px solid #57b7fa; outline-offset: 3px; }
.gs-floating-toc.gs-toc-compact.gs-toc-open .gs-toc-mobile-button { background: #0872c6 !important; }
@media (max-height: 450px) {
  .gs-floating-toc:not(.gs-toc-compact) .gs-toc-scroll { max-height: 38vh; }
}
@media (prefers-reduced-motion: reduce) { .gs-floating-toc * { transition-duration: 0s !important; } }
