/* Consult bar: stays near the bottom while reading and stops above the footer. */
.consult-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  margin: 0;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: #102330;
  color: white;
  box-shadow: 0 10px 30px #08141e40;
  font-size: 15px;
}
.consult-bar span {
  margin-right: 8px;
  color: #a9bccb;
  font-weight: 650;
}
.consult-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-weight: 650;
}
.consult-bar a:hover {
  background: #ffffff1a;
}
.consult-bar .consult-online {
  background: #1d5fc4;
}
.consult-bar .consult-online:hover {
  background: #2a6fd8;
}

/* Section bar: sticks under the header and follows the section being read. */
.section-nav {
  position: sticky;
  top: var(--bar, 72px);
  z-index: 20;
  display: flex;
  gap: 4px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 10px max(clamp(16px, 4vw, 80px), calc((100vw - 1440px) / 2));
  overflow-x: auto;
  scrollbar-width: none;
  background: #ffffffeb;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #dde4ea;
}
.section-nav button {
  flex: none;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #3f5163;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}
.section-nav button:hover {
  color: #101e30;
}
.section-nav button[aria-current] {
  background: #e6eef8;
  color: #164fa0;
}

@media (max-width: 720px) {
  .consult-bar {
    padding-left: 14px;
    font-size: 14px;
  }
  .consult-bar span {
    display: none;
  }
  .consult-bar a {
    padding: 0 12px;
  }
  .section-nav button {
    padding: 0 12px;
    font-size: 14px;
  }
}

html:has(.consult-bar) { scroll-padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
