/* ---------------------------------------------------------------------------
 * Docs page (body.docs-page). Shares the News page's deep-water shell and
 * type; the provider tabs are built by frontend/docs/app.ts. Without that
 * script the providers read as plain headed sections, one after another.
 * ------------------------------------------------------------------------- */

body.docs-page {
  isolation: isolate;
  background: #000617;
}

body.docs-page .water--backdrop {
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body.docs-page .docs-nav {
  padding: 0.75rem 1.5rem;
}

body.docs-page .docs-nav__wordmark {
  font-size: 1.75rem;
}

body.docs-page .docs-nav__wordmark:hover {
  text-decoration: none;
}

body.docs-page .docs__title {
  margin: 0 0 2rem 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

body.docs-page .docs__section {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(132, 189, 219, 0.16);
}

body.docs-page .docs__heading {
  margin: 0 0 0.75rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}

body.docs-page .docs__lede {
  margin: 0 0 1.75rem 0;
  color: var(--fg-muted);
}

body.docs-page .docs p {
  line-height: 1.6;
}

body.docs-page .docs a {
  color: #84bddb;
  text-decoration: underline;
  text-decoration-color: rgba(132, 189, 219, 0.45);
  text-underline-offset: 0.18em;
}

body.docs-page .docs a:hover {
  color: var(--accent-2);
  text-decoration-color: currentColor;
}

/* Provider sections (and, once enhanced, their tab panels). */
body.docs-page .docs-tabs__panel {
  margin: 0 0 2rem 0;
}

body.docs-page .docs-tabs__title {
  margin: 0 0 1rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #84bddb;
}

body.docs-page .docs-faq__q {
  margin: 1.5rem 0 0.4rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

body.docs-page .docs-faq__q:first-child {
  margin-top: 0;
}

body.docs-page .docs-faq p {
  margin: 0;
  color: var(--fg-muted);
}

body.docs-page .docs-faq p + p {
  margin-top: 0.75rem;
}

body.docs-page .docs-faq__note {
  margin: 1.75rem 0 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(132, 189, 219, 0.16);
  border-radius: var(--radius);
  background: rgba(132, 189, 219, 0.05);
  color: var(--fg-muted);
  font-size: 0.95rem;
}

body.docs-page .docs-tabs__placeholder {
  margin: 0;
  color: var(--fg-muted);
}

/* Enhanced tabs ---------------------------------------------------------- */

body.docs-page .docs-tabs__list {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 1.5rem 0;
  padding: 0.25rem;
  border: 1px solid rgba(132, 189, 219, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

body.docs-page .docs-tabs__tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.75rem; /* 44px tap target */
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

body.docs-page .docs-tabs__tab:hover {
  color: var(--fg);
}

body.docs-page .docs-tabs__tab[aria-selected="true"] {
  color: #000617;
  background: #84bddb;
}

body.docs-page .docs-tabs__tab:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

body.docs-page .docs-tabs__panel:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 0.5rem;
  border-radius: 2px;
}

/* The selected tab already names the panel; keep its heading for screen
   readers' heading navigation only. */
body.docs-page .docs-tabs--ready .docs-tabs__title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  body.docs-page .docs-tabs__tab {
    transition: none;
  }
}
