/* ============================================================
   Bitmessa API Reference — three-column layout (Phase B)
   Nav | Documentation | Sticky code panel
   ============================================================ */

.ref-layout {
  display: grid;
  grid-template-columns: var(--bm-sidebar-w) minmax(0, 1fr) minmax(480px, 34vw);
  margin-top: 0;
  min-height: calc(100vh - var(--bm-header-h));
}

/* Left nav */
.ref-sidebar {
  position: sticky;
  top: var(--bm-header-h);
  height: calc(100vh - var(--bm-header-h));
  overflow-y: auto;
  background: var(--bm-navy);
  border-right: 1px solid var(--bm-separator);
  padding: 1rem 0 2rem;
}

.ref-sidebar-search {
  padding: 0 1rem 1rem;
  border-bottom: 1px solid var(--bm-separator);
  margin-bottom: 0.5rem;
}

.ref-sidebar-search input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: var(--bm-font);
  font-size: 0.8125rem;
  outline: none;
}

.ref-sidebar-search input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ref-nav-group {
  margin-bottom: 0.25rem;
}

.ref-nav-group-title {
  padding: 0.65rem 1.25rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bm-text-dim);
}

.ref-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  text-decoration: none;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  border-left: 2px solid transparent;
  transition: color 0.15s ease;
}

.ref-nav-link:hover,
.ref-nav-link.active {
  color: var(--bm-cyan);
}

.ref-nav-link.active {
  border-left-color: var(--bm-cyan);
}

.ref-nav-method {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 2.5rem;
  font-family: var(--bm-mono);
}

.ref-nav-method.get { color: var(--bm-success); }
.ref-nav-method.post { color: var(--bm-cyan); }
.ref-nav-method.put { color: var(--bm-warning); }
.ref-nav-method.delete { color: var(--bm-error); }

/* Center content */
.ref-main {
  padding: 2rem 2.5rem 4rem;
  max-width: 780px;
}

.ref-overview-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.ref-overview-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 2rem;
  white-space: pre-wrap;
}

.ref-endpoint-header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--bm-separator);
}

.ref-endpoint-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0.75rem 0 0.5rem;
}

.ref-endpoint-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.ref-path-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ref-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bm-separator);
}

.ref-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1rem;
}

.ref-param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ref-param-table th {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--bm-separator);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-text-dim);
}

.ref-param-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--bm-separator);
  color: rgba(255, 255, 255, 0.75);
  vertical-align: top;
}

.ref-param-name {
  font-family: var(--bm-mono);
  color: var(--bm-cyan);
  font-size: 0.8125rem;
}

.ref-param-type {
  font-family: var(--bm-mono);
  color: var(--bm-warning);
  font-size: 0.75rem;
}

.ref-param-required {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--bm-error);
  text-transform: uppercase;
}

.ref-response-code {
  font-family: var(--bm-mono);
  font-weight: 700;
  color: var(--bm-success);
  font-size: 0.8125rem;
}

.ref-auth-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.ref-auth-note i { color: var(--bm-cyan); }

.ref-scope-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.ref-scope-notice i {
  color: var(--bm-cyan);
  margin-top: 0.15rem;
}

.ref-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bm-separator);
}

.ref-pager a {
  text-decoration: none;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ref-pager a:hover { color: var(--bm-cyan); }
.ref-pager-label { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bm-text-dim); }

/* Right code panel */
.ref-code-panel {
  position: sticky;
  top: var(--bm-header-h);
  height: calc(100vh - var(--bm-header-h));
  overflow-y: auto;
  border-left: 1px solid var(--bm-separator);
  background: rgba(0, 0, 0, 0.12);
}

.ref-code-panel-inner {
  padding: 1.25rem;
}

.ref-code-panel-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bm-text-dim);
  margin-bottom: 0.75rem;
}

.ref-code-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bm-separator);
  margin-bottom: 0;
}

.ref-code-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--bm-font);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  margin-bottom: -1px;
}

.ref-code-tab:hover { color: rgba(255, 255, 255, 0.75); }
.ref-code-tab.active { color: var(--bm-cyan); border-bottom-color: var(--bm-cyan); }

.ref-code-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.ref-code-block pre {
  margin: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--bm-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.ref-copy-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--bm-font);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.ref-copy-btn:hover {
  background: var(--bm-cyan);
  color: var(--bm-navy);
  border-color: var(--bm-cyan);
}

.ref-empty {
  padding: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
}

/* Mobile */
@media (max-width: 1100px) {
  .ref-layout {
    grid-template-columns: var(--bm-sidebar-w) minmax(0, 1fr);
  }
  .ref-code-panel {
    display: none;
  }
  .ref-main .ref-mobile-code {
    display: block;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .ref-layout {
    grid-template-columns: 1fr;
  }
  .ref-sidebar {
    position: fixed;
    left: 0;
    top: var(--bm-header-h);
    z-index: 200;
    width: var(--bm-sidebar-w);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .ref-sidebar.open {
    transform: translateX(0);
  }
  .ref-main {
    padding: 1.5rem 1rem 3rem;
  }
}

/* Method badges (shared) */
.method-badge.get { background: var(--bm-success) !important; color: #000 !important; }
.method-badge.post { background: var(--bm-cyan) !important; color: var(--bm-navy) !important; }
.method-badge.put { background: var(--bm-warning) !important; color: #000 !important; }
.method-badge.delete { background: var(--bm-error) !important; color: #fff !important; }

.method-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--bm-mono);
}

.ref-path-code {
  font-family: var(--bm-mono);
  font-size: 0.875rem;
  color: var(--bm-cyan);
  word-break: break-all;
}

/* ---- API Console (Try it) ---- */
.ref-tryit-wrap { margin-top: 0; }

.ref-console-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.ref-console-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bm-text-dim);
}

.ref-console-label small {
  text-transform: lowercase;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}

.ref-console-field input,
.ref-console-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: var(--bm-mono);
  font-size: 0.75rem;
  outline: none;
  box-sizing: border-box;
}

.ref-console-field textarea { resize: vertical; min-height: 100px; }

.ref-console-response-wrap {
  margin-top: 1rem;
  border-top: 1px solid var(--bm-separator);
  padding-top: 1rem;
}

.ref-console-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--bm-mono);
}

.ref-console-ok { color: var(--bm-success); }
.ref-console-err { color: var(--bm-error); }
.ref-console-loading { color: var(--bm-cyan); }

.ref-console-response {
  margin: 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--bm-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  overflow-x: auto;
  max-height: 280px;
}

.ref-console-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

/* Guides subnav — base styles live in bitmessa-docs.css */

.bm-guides-page .bm-page {
  padding-top: 0;
}

body[data-guides-nav] .bm-header,
body[data-guides-nav] .header {
  position: fixed;
}

.bm-error-card {
  border-top: 1px solid var(--bm-separator);
  padding: 1.5rem 0;
}

.bm-error-code {
  font-family: var(--bm-mono);
  font-size: 0.875rem;
  color: var(--bm-cyan);
  font-weight: 600;
}

.bm-error-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  color: var(--bm-error);
  margin-left: 0.5rem;
}

.bm-changelog-entry {
  border-top: 1px solid var(--bm-separator);
  padding: 1.75rem 0;
}

.bm-changelog-version {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.bm-changelog-date {
  font-size: 0.75rem;
  color: var(--bm-text-dim);
  margin-bottom: 0.75rem;
}

.bm-changelog-list {
  margin: 0;
  padding-left: 1.25rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  line-height: 1.7;
}

.bm-changelog-list li { margin-bottom: 0.35rem; }

.bm-changelog-tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}

.bm-changelog-tag.added { background: rgba(0, 200, 5, 0.15); color: var(--bm-success); }
.bm-changelog-tag.changed { background: rgba(0, 212, 255, 0.15); color: var(--bm-cyan); }
.bm-changelog-tag.fixed { background: rgba(255, 176, 32, 0.15); color: var(--bm-warning); }
.bm-changelog-tag.breaking { background: rgba(239, 68, 68, 0.15); color: var(--bm-error); }
.bm-changelog-tag.removed { background: rgba(148, 163, 184, 0.15); color: rgba(255, 255, 255, 0.55); }

/* ============================================================
   API Reference — viewport shell (header + guides + 3-col + footer)
   Single-screen layout; columns scroll internally.
   ============================================================ */

:root {
  --bm-guides-nav-h: 2.375rem;
  --bm-ref-footer-h: 2.75rem;
}

body[data-guides-nav="reference"] {
  display: grid;
  grid-template-rows: var(--bm-header-h) var(--bm-guides-nav-h) minmax(0, 1fr) var(--bm-ref-footer-h);
  grid-template-areas:
    "ref-header"
    "ref-guides"
    "ref-main-area"
    "ref-footer";
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body[data-guides-nav="reference"] .header,
body[data-guides-nav="reference"] .bm-header {
  grid-area: ref-header;
  position: relative !important;
}

body[data-guides-nav="reference"] .bm-guides-nav {
  grid-area: ref-guides;
  margin-top: 0 !important;
  position: relative !important;
  top: auto !important;
  padding: 0 1.25rem;
  min-height: var(--bm-guides-nav-h);
  align-items: center;
  border-bottom: 1px solid var(--bm-separator);
  background: rgba(0, 0, 0, 0.18);
}

body[data-guides-nav="reference"] .ref-layout {
  grid-area: ref-main-area;
  margin-top: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

body[data-guides-nav="reference"] .ref-sidebar,
body[data-guides-nav="reference"] .ref-code-panel {
  position: relative;
  top: auto;
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

body[data-guides-nav="reference"] .ref-sidebar {
  padding: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-guides-nav="reference"] .ref-sidebar-search {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bm-navy);
  padding: 0 1rem 0.75rem;
  margin-bottom: 0.35rem;
}

body[data-guides-nav="reference"] #refSidebarNav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

body[data-guides-nav="reference"] .ref-main {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 1.75rem 2rem 2rem;
  max-width: none;
}

body[data-guides-nav="reference"] .ref-code-panel-inner {
  min-height: 100%;
}

body[data-guides-nav="reference"] .footer {
  grid-area: ref-footer;
  margin-top: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--bm-separator);
}

body[data-guides-nav="reference"] .footer-container {
  max-width: none;
  height: 100%;
  padding: 0 1.25rem;
}

body[data-guides-nav="reference"] .footer-content {
  max-width: none;
  height: var(--bm-ref-footer-h);
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body[data-guides-nav="reference"] .footer-copyright {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  flex-shrink: 0;
}

body[data-guides-nav="reference"] .footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem 1.15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-guides-nav="reference"] .footer-links::-webkit-scrollbar {
  display: none;
}

body[data-guides-nav="reference"] .footer-links a,
body[data-guides-nav="reference"] .footer-link {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}

body[data-guides-nav="reference"] .footer-links a:hover,
body[data-guides-nav="reference"] .footer-link:hover {
  color: var(--bm-cyan);
}

/* ============================================================
   API Reference — mobile / tablet fixes (viewport shell)
   Replaces broken @media block at end of reference.css
   ============================================================ */

/* Patch: mobile scroll + modern menu button — append/replace in reference.css mobile block */

@media (max-width: 768px) {
  :root {
    --bm-ref-footer-h: auto;
    --bm-guides-nav-h: auto;
  }

  body[data-guides-nav="reference"] {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body[data-guides-nav="reference"].menu-open {
    overflow: hidden !important;
  }

  body[data-guides-nav="reference"] .header,
  body[data-guides-nav="reference"] .bm-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  body[data-guides-nav="reference"] .header-container,
  body[data-guides-nav="reference"] .bm-header-inner {
    max-width: none;
    padding: 0 0.75rem;
  }

  body[data-guides-nav="reference"] .header .btn-outline,
  body[data-guides-nav="reference"] .bm-btn-outline {
    display: none !important;
  }

  body[data-guides-nav="reference"] .header .btn-primary,
  body[data-guides-nav="reference"] .bm-btn-primary {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.75rem !important;
  }

  body[data-guides-nav="reference"] .bm-logo-badge {
    display: none;
  }

  /* Modern mobile menu control */
  body[data-guides-nav="reference"] .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  }

  body[data-guides-nav="reference"] .menu-toggle span {
    display: block;
    width: 1.125rem;
    height: 2px;
    background: currentColor !important;
    border-radius: 999px;
    transition: transform 0.22s ease, opacity 0.18s ease;
  }

  body[data-guides-nav="reference"] .menu-toggle:hover,
  body[data-guides-nav="reference"] .menu-toggle:focus-visible {
    background: rgba(0, 212, 255, 0.12) !important;
    border-color: rgba(0, 212, 255, 0.38) !important;
    color: #fff !important;
    outline: none;
  }

  body[data-guides-nav="reference"].menu-open .menu-toggle {
    background: rgba(0, 212, 255, 0.14) !important;
    border-color: rgba(0, 212, 255, 0.45) !important;
  }

  body[data-guides-nav="reference"].menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body[data-guides-nav="reference"].menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body[data-guides-nav="reference"].menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  body[data-guides-nav="reference"] .bm-guides-nav {
    position: sticky;
    top: var(--bm-header-h);
    z-index: 90;
    margin-top: var(--bm-header-h) !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  body[data-guides-nav="reference"] .bm-guides-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body[data-guides-nav="reference"] .bm-guides-nav::-webkit-scrollbar {
    display: none;
  }

  body[data-guides-nav="reference"] .ref-layout {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 0;
  }

  body[data-guides-nav="reference"] .ref-sidebar {
    position: fixed !important;
    top: calc(var(--bm-header-h) + 2.25rem);
    left: 0;
    bottom: 0;
    width: min(88vw, 300px);
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    transform: translateX(-105%);
    z-index: 200;
    transition: transform 0.25s ease;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.45);
    border-right: 1px solid var(--bm-separator);
  }

  body[data-guides-nav="reference"] .ref-sidebar.open,
  body[data-guides-nav="reference"].menu-open .ref-sidebar {
    transform: translateX(0);
  }

  body[data-guides-nav="reference"].menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 8, 30, 0.62);
    z-index: 150;
  }

  body[data-guides-nav="reference"] .ref-code-panel {
    display: none !important;
  }

  body[data-guides-nav="reference"] .ref-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 1rem 1rem 1.5rem;
    box-sizing: border-box;
  }

  body[data-guides-nav="reference"] .ref-endpoint-title {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  body[data-guides-nav="reference"] .ref-path-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  body[data-guides-nav="reference"] .ref-path-code {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    word-break: normal;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }

  body[data-guides-nav="reference"] .ref-auth-note {
    flex-wrap: wrap;
  }

  body[data-guides-nav="reference"] .ref-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body[data-guides-nav="reference"] .ref-param-table {
    min-width: 280px;
  }

  body[data-guides-nav="reference"] .ref-mobile-code {
    display: block;
    margin-top: 1.5rem;
  }

  body[data-guides-nav="reference"] .footer {
    position: relative;
    z-index: 1;
  }

  body[data-guides-nav="reference"] .footer-container {
    padding: 0 1rem;
  }

  body[data-guides-nav="reference"] .footer-content {
    height: auto;
    min-height: 2.75rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.75rem 0;
    gap: 0.5rem;
  }

  body[data-guides-nav="reference"] .footer-links {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: flex-start;
  }
}
/* API Reference — product section headings (Partner vs Explorer) */
.ref-nav-product-heading {
  margin: 1rem 0 0.35rem;
  padding: 0.35rem 1rem 0;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.72);
}

.ref-nav-product-heading:first-of-type {
  margin-top: 0.5rem;
}

.ref-product-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.95);
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.28);
}

.ref-product-badge--partner {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.ref-scope-notice--explorer {
  border-color: rgba(0, 212, 255, 0.22);
  background: rgba(0, 212, 255, 0.06);
}

.ref-scope-notice--explorer i {
  color: var(--bm-cyan);
}
