/* Production hotfix: navbar collision and mobile polish. */

/* Stage 30: brand-preserving navbar guard.
   Keep the full public title visible and reduce navbar pressure by removing non-essential primary links. */
.lbfl-nav {
  flex-wrap: nowrap !important;
  overflow: visible !important;
}

.lbfl-brand {
  flex: 0 1 min(22rem, 30vw) !important;
  max-width: min(22rem, 30vw) !important;
  min-width: 12.5rem !important;
  overflow: hidden !important;
}

.lbfl-brand__title,
.lbfl-brand__full {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.lbfl-brand__full {
  display: inline !important;
}

.lbfl-brand__short {
  display: none !important;
}

.lbfl-desktop-links {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  gap: clamp(0.06rem, 0.45vw, 0.38rem) !important;
}

.lbfl-desktop-links__item {
  flex: 0 1 auto !important;
  min-width: 0 !important;
}

.lbfl-desktop-links a {
  max-width: 10.5rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding-inline: clamp(0.24rem, 0.48vw, 0.42rem) !important;
  font-size: clamp(0.68rem, 0.78vw, 0.88rem) !important;
}

.lbfl-nav-actions {
  flex: 0 0 auto !important;
  margin-left: 0.25rem !important;
}

@media (max-width: 1320px) {
  .lbfl-brand {
    flex: 1 1 auto !important;
    max-width: none !important;
    min-width: 12rem !important;
  }

  .lbfl-brand__full {
    display: inline !important;
  }

  .lbfl-brand__short {
    display: none !important;
  }

  .lbfl-desktop-links {
    display: none !important;
  }

  .lbfl-mobile-menu {
    display: inline-flex !important;
  }
}

@media (max-width: 520px) {
  .lbfl-brand {
    min-width: 0 !important;
  }

  .lbfl-brand__title,
  .lbfl-brand__full {
    font-size: 0.92rem !important;
  }

  .lbfl-brand__logo {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
  }

  .lbfl-search-toggle,
  .lbfl-mobile-toggle {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
}

/* Keep only one homepage author section and stop footer from reintroducing a second copy. */
.footer-author-bridge,
.mycorrhizal-footer .home-author-profile {
  display: none !important;
}

/* Refine homepage author card after duplicate cleanup. */
#synaptic-home-root .home-author-profile {
  padding-top: clamp(2rem, 5vw, 4rem) !important;
  padding-bottom: clamp(2rem, 5vw, 4rem) !important;
}

/* Cookie consent: compact, non-destructive, mobile-safe. */
#gdpr-banner {
  left: 50% !important;
  right: auto !important;
  bottom: calc(0.7rem + env(safe-area-inset-bottom)) !important;
  width: min(94vw, 760px) !important;
  transform: translateX(-50%) !important;
  display: none !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 0.75rem !important;
  padding: 0.72rem 0.85rem !important;
  border: 1px solid rgba(0, 212, 178, 0.28) !important;
  border-radius: 18px !important;
  background: rgba(2, 6, 23, 0.94) !important;
  backdrop-filter: blur(16px) saturate(1.15) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.50), 0 0 22px rgba(0, 212, 178, 0.12) !important;
}

#gdpr-banner.is-visible {
  display: grid !important;
}

#gdpr-banner .gdpr-text {
  flex: initial !important;
  max-width: none !important;
  margin: 0 !important;
  color: #e2e8f0 !important;
  font-size: clamp(0.76rem, 2.7vw, 0.9rem) !important;
  line-height: 1.42 !important;
  text-align: left !important;
}

#gdpr-banner .gdpr-buttons {
  width: auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  gap: 0.45rem !important;
}

#gdpr-banner button {
  flex: 0 0 auto !important;
  min-width: 78px !important;
  min-height: 40px !important;
  padding: 0.46rem 0.72rem !important;
  border-radius: 11px !important;
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

#gdpr-banner .gdpr-accept {
  box-shadow: 0 0 18px rgba(0, 212, 178, 0.24) !important;
}

@media (max-width: 640px) {
  #gdpr-banner {
    width: min(94vw, 430px) !important;
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
    padding: 0.65rem 0.7rem !important;
    border-radius: 16px !important;
  }

  #gdpr-banner .gdpr-text {
    font-size: 0.78rem !important;
    line-height: 1.38 !important;
  }

  #gdpr-banner .gdpr-buttons {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  #gdpr-banner button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0.45rem 0.6rem !important;
    font-size: 0.88rem !important;
  }

  body:has(#gdpr-banner.is-visible) #synaptic-floating-ai-root.synaptic-floating-ai-shell {
    bottom: calc(9.75rem + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 380px) {
  #gdpr-banner .gdpr-text {
    font-size: 0.72rem !important;
  }

  #gdpr-banner button {
    min-height: 38px !important;
    font-size: 0.82rem !important;
  }
}

@media (max-width: 640px) {
  #synaptic-home-root .home-author-profile__shell {
    padding: 1.25rem !important;
    border-radius: 22px !important;
  }

  #synaptic-home-root .home-author-profile h2 {
    font-size: clamp(2.05rem, 10vw, 3rem) !important;
  }

  #synaptic-home-root .home-author-profile__credential {
    font-size: 1rem !important;
  }

  #synaptic-floating-ai-root.synaptic-floating-ai-shell {
    bottom: calc(5.85rem + env(safe-area-inset-bottom)) !important;
    right: 0.85rem !important;
  }

  #synaptic-floating-ai-root .synaptic-core-bubble-btn {
    width: 46px !important;
    height: 46px !important;
  }
}

/* Botany lecture forensic mobile fix: keep the fixed lecture pattern readable on every HSC Botany lecture. */
.layout--single.wide .page__content {
  color: #dbeafe !important;
}

.layout--single.wide .page__content > div:first-of-type {
  overflow: visible !important;
  min-height: 0 !important;
  height: auto !important;
}

.layout--single.wide .page__content > div:first-of-type h1,
.layout--single.wide .page__content > div:first-of-type h2 {
  color: #ffffff !important;
  font-size: clamp(1.55rem, 8.4vw, 2.35rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.025em !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  max-width: 100% !important;
}

.layout--single.wide .page__content > div:first-of-type p {
  color: #14f1d9 !important;
  font-size: clamp(0.98rem, 4.2vw, 1.16rem) !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere !important;
}

.layout--single.wide .page__content .guideline-quote-block,
.layout--single.wide .page__content .panel,
.layout--single.wide .page__content .panel-content-inner,
.layout--single.wide .page__content blockquote {
  color: #dbeafe !important;
}

.layout--single.wide .page__content .guideline-quote-block strong,
.layout--single.wide .page__content .panel strong,
.layout--single.wide .page__content .panel-content-inner strong {
  color: #ffffff !important;
}

.layout--single.wide .page__content .accordion {
  width: 100% !important;
  min-height: 4.25rem !important;
  margin: 1.05rem 0 0.6rem !important;
  padding: clamp(1rem, 4vw, 1.35rem) clamp(1rem, 4vw, 1.55rem) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.9rem !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-left: 4px solid rgba(148, 163, 184, 0.72) !important;
  border-radius: 0 14px 14px 0 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22) !important;
  color: #f8fafc !important;
  font-weight: 900 !important;
  font-size: clamp(1rem, 4.6vw, 1.22rem) !important;
  line-height: 1.35 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  cursor: pointer !important;
}

.layout--single.wide .page__content .accordion span {
  flex: 0 0 auto !important;
  color: #2dd4bf !important;
  font-size: 1.55rem !important;
  line-height: 1 !important;
}

.layout--single.wide .page__content .accordion:hover,
.layout--single.wide .page__content .accordion:focus-visible,
.layout--single.wide .page__content .accordion.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.86)) !important;
  border-color: rgba(45, 212, 191, 0.34) !important;
  border-left-color: #2dd4bf !important;
  outline: none !important;
}

.layout--single.wide .page__content .panel {
  background: rgba(2, 6, 23, 0.74) !important;
  border-left: 4px solid rgba(100, 116, 139, 0.9) !important;
  border-radius: 0 14px 14px 0 !important;
  overflow: hidden !important;
}

.layout--single.wide .page__content .panel.show,
.layout--single.wide .page__content .accordion.active + .panel {
  display: block !important;
  max-height: none !important;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0 !important;
  border-top: none !important;
}

.layout--single.wide .page__content .panel-content-inner {
  padding: clamp(1rem, 4.4vw, 1.55rem) !important;
  color: #dbeafe !important;
  font-size: clamp(1rem, 4.2vw, 1.14rem) !important;
  line-height: 1.78 !important;
}

.layout--single.wide .page__content .panel-content-inner p,
.layout--single.wide .page__content .panel-content-inner li,
.layout--single.wide .page__content .panel-content-inner td,
.layout--single.wide .page__content .panel-content-inner th {
  color: #dbeafe !important;
}

.layout--single.wide .page__content .panel-content-inner h2,
.layout--single.wide .page__content .panel-content-inner h3,
.layout--single.wide .page__content .panel-content-inner h4 {
  color: #f8fafc !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
}

.layout--single.wide .page__content .panel-content-inner a {
  color: #67e8f9 !important;
}

.layout--single.wide .page__content img,
.layout--single.wide .page__content svg,
.layout--single.wide .page__content video,
.layout--single.wide .page__content canvas {
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 640px) {
  .layout--single.wide .page__content > div:first-of-type {
    padding: 1.2rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 20px !important;
    text-align: left !important;
  }

  .layout--single.wide .page__content > div:first-of-type h1,
  .layout--single.wide .page__content > div:first-of-type h2 {
    margin-bottom: 0.75rem !important;
    font-size: clamp(1.42rem, 9.4vw, 2rem) !important;
    line-height: 1.16 !important;
  }

  .layout--single.wide .page__content .accordion {
    min-height: 4.55rem !important;
    padding: 1rem 0.95rem !important;
    font-size: clamp(1rem, 5.2vw, 1.16rem) !important;
  }

  .layout--single.wide .page__content .panel-content-inner {
    font-size: 1rem !important;
    line-height: 1.75 !important;
  }
}
