/* public/css/docs.css
 * Professional docs chrome with a warm "cake" aesthetic:
 * soft cream type, rose-lavender accents, plum night sky —
 * still Arcana, easier to read for longer.
 */

:root {
  /* Cleaner midnight palette */
  --docs-bg:        #09090d;
  --docs-bg-elev:   #111118;
  --docs-surface:   rgba(255, 255, 255, 0.025);
  --docs-surface-2: rgba(255, 255, 255, 0.045);
  --docs-surface-3: rgba(255, 255, 255, 0.07);

  --docs-border:        rgba(255, 255, 255, 0.06);
  --docs-border-strong: rgba(255, 255, 255, 0.10);
  --docs-border-accent: rgba(29, 78, 216, 0.35);

  --docs-text:       #e8e8ed;
  --docs-text-muted: #9090a0;
  --docs-text-faint: #5a5a6e;
  --docs-text-mute2: #3a3a4a;

  --docs-accent:        #3b82f6;
  --docs-accent-hover:  #60a5fa;
  --docs-accent-active: #1d4ed8;
  --docs-accent-subtle: rgba(29, 78, 216, 0.1);
  --docs-accent-glow:   rgba(29, 78, 216, 0.16);

  --docs-rose:          #c0392b;
  --docs-cream:         #fafaff;

  --docs-success: #22c55e;
  --docs-warning: #eab308;
  --docs-info:    #3b82f6;

  --docs-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --docs-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --docs-font-display: 'Inter', system-ui, sans-serif;

  --docs-header-h: 52px;
  --docs-sidebar-w: 240px;
  --docs-content-max: 740px;

  --docs-radius-sm: 6px;
  --docs-radius-md: 8px;
  --docs-radius-pill: 9999px;

  --docs-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --docs-dur-fast: 0.12s;
  --docs-dur-base: 0.2s;
  --docs-dur-slow: 0.3s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html {
  background: var(--docs-bg);
  color: var(--docs-text);
}
body {
  background: var(--docs-bg);
  color: var(--docs-text);
  transition: background-color 0.3s ease, color 0.3s ease;
  font-family: var(--docs-font-body);
  font-size: 16.5px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background-color: var(--docs-bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 15% -5%, rgba(29, 78, 216, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 100%, rgba(192, 57, 43, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 40%, rgba(255, 240, 224, 0.02), transparent 60%);
  background-attachment: fixed;
}

a {
  color: var(--docs-accent);
  text-decoration: none;
  transition: color var(--docs-dur-fast) var(--docs-ease-out);
}
a:hover { color: var(--docs-accent-hover); text-decoration: underline; text-underline-offset: 3px; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--docs-accent-glow); color: var(--docs-text); }

/* — Logo: display as-is on dark bg, probe handles invert via JS — */
.docs-brand .docs-brand-mark,
.docs-brand img {
  width: 26px;
  height: 26px;
  transition: filter var(--docs-dur-base) var(--docs-ease-out), transform var(--docs-dur-base) var(--docs-ease-out);
}
.docs-brand:hover .docs-brand-mark,
.docs-brand:hover img {
  filter: drop-shadow(0 0 8px rgba(29, 78, 216, 0.45));
  transform: scale(1.08);
}

/* — Content Entrance Animation — */
.docs-content {
  opacity: 0;
  transform: translateY(18px);
  animation: docsContentIn 0.6s var(--docs-ease-out) forwards;
}
@keyframes docsContentIn {
  to { opacity: 1; transform: translateY(0); }
}

/* — Header — */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--docs-header-h);
  border-bottom: 1px solid var(--docs-border);
  background: rgba(12, 10, 16, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(29, 78, 216, 0.06);
  transition: background 0.3s ease, border-bottom-color 0.3s ease, box-shadow 0.3s ease;
}

.docs-header-inner {
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 13px/1 var(--docs-font-mono);
  letter-spacing: 0.2em;
  color: var(--docs-text);
  text-decoration: none;
  transition: opacity var(--docs-dur-fast) var(--docs-ease-out), color var(--docs-dur-fast) var(--docs-ease-out);
}
.docs-brand:hover { opacity: 0.9; color: var(--docs-text); text-decoration: none; }

/* — Header Right Group — */
.docs-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* — Header Nav Links — */
.docs-header-links {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
}
.docs-header-links a {
  padding: 7px 12px;
  border-radius: var(--docs-radius-sm);
  color: var(--docs-text-muted);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  transition: color var(--docs-dur-fast) var(--docs-ease-out), background var(--docs-dur-fast) var(--docs-ease-out);
}
.docs-header-links a:hover {
  color: var(--docs-text);
  background: var(--docs-accent-subtle);
  text-decoration: none;
}
.docs-header-links a::after {
  content: "";
  position: absolute;
  bottom: 3px; left: 12px; right: 12px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--docs-accent), var(--docs-rose));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--docs-dur-base) var(--docs-ease-out);
}
.docs-header-links a:hover::after {
  transform: scaleX(1);
}

/* — Sign In button in header — */
.docs-header-signin {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 7px 16px !important;
  border-radius: var(--docs-radius-pill) !important;
  border: 1px solid rgba(29, 78, 216, 0.45) !important;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.22), rgba(192, 57, 43, 0.14)) !important;
  color: var(--docs-cream) !important;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all var(--docs-dur-fast) var(--docs-ease-out) !important;
}
.docs-header-signin:hover {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.35), rgba(192, 57, 43, 0.22)) !important;
  border-color: rgba(29, 78, 216, 0.7) !important;
  box-shadow: 0 0 24px rgba(29, 78, 216, 0.2);
  color: #fff !important;
}
.docs-header-signin::after { display: none !important; }

/* — Theme Toggle — */
.docs-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--docs-radius-sm);
  border: 1px solid var(--docs-border);
  background: var(--docs-surface);
  color: var(--docs-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--docs-dur-base) var(--docs-ease-out), border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.docs-theme-toggle:hover {
  border-color: var(--docs-border-strong);
  background: var(--docs-surface-2);
  color: var(--docs-text);
}
.docs-theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--docs-accent);
}
.docs-theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--docs-dur-base) var(--docs-ease-out);
}
.docs-theme-toggle:hover svg {
  transform: rotate(15deg);
}
.docs-theme-toggle .icon-sun { display: none; }
.docs-theme-toggle .icon-moon { display: block; }
.docs-light .docs-theme-toggle .icon-sun { display: block; }
.docs-light .docs-theme-toggle .icon-moon { display: none; }

/* — Search — */
.docs-search {
  position: relative;
  flex: 1;
  max-width: 420px;
  z-index: 30;
}
.docs-search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--docs-border-strong);
  border-radius: var(--docs-radius-pill);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: all var(--docs-dur-base) var(--docs-ease-out), border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.docs-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--docs-text-muted);
  pointer-events: none;
  transition: color var(--docs-dur-base) var(--docs-ease-out);
}
.docs-search-input {
  width: 100%;
  padding: 11px 44px 11px 34px;
  border: none;
  border-radius: var(--docs-radius-pill);
  background: transparent;
  color: var(--docs-text);
  font: 400 14px/1.4 var(--docs-font-body);
  outline: none;
  transition: color var(--docs-dur-base) var(--docs-ease-out);
}
.docs-search-input::placeholder {
  color: var(--docs-text-faint);
  transition: color var(--docs-dur-base) var(--docs-ease-out);
}
.docs-search-field:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.11);
}
.docs-search-field:focus-within {
  border-color: var(--docs-border-accent);
  background: var(--docs-bg-elev);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.10), 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.docs-search-field:focus-within .docs-search-icon { color: var(--docs-accent); }
.docs-search-input:focus::placeholder { color: transparent; }
.docs-search-field:focus-within .docs-search-kbd,
.docs-search-field:hover .docs-search-kbd { opacity: 0; transform: translateY(-50%) scale(0.85); }
.docs-search-kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font: 500 11px/1 var(--docs-font-mono);
  letter-spacing: 0.02em;
  color: var(--docs-text-faint);
  pointer-events: none;
  opacity: 0.7;
  transition: all var(--docs-dur-base) var(--docs-ease-out), color 0.3s ease;
}
.docs-search-mobile-btn {
  display: none;
}

.docs-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--docs-border-strong);
  border-radius: var(--docs-radius-md);
  background: var(--docs-bg-elev);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(29, 78, 216, 0.08);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--docs-border) transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.docs-search-results.is-open {
  display: block;
  animation: searchSlideIn var(--docs-dur-slow) var(--docs-ease-out);
}
@keyframes searchSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.docs-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--docs-border);
  text-decoration: none;
  color: var(--docs-text);
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--docs-dur-fast) var(--docs-ease-out), border-color 0.3s ease;
}
.docs-search-result:last-child { border-bottom: 0; }
.docs-search-result:first-child { border-radius: var(--docs-radius-md) var(--docs-radius-md) 0 0; }
.docs-search-result:last-child { border-radius: 0 0 var(--docs-radius-md) var(--docs-radius-md); }
.docs-search-result:hover,
.docs-search-result.is-active {
  background: var(--docs-surface-2);
  color: #fff;
}
.docs-search-result mark {
  background: rgba(29, 78, 216, 0.22);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.docs-search-result-title {
  font-weight: 600;
  font-size: 13.5px;
}
.docs-search-result-section {
  font: 600 10px/1 var(--docs-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--docs-text-faint);
}
.docs-search-result-desc {
  font-size: 12px;
  color: var(--docs-text-faint);
  line-height: 1.35;
  margin-top: 1px;
}
.docs-search-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--docs-text-faint);
  font-size: 13.5px;
}
.docs-search-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--docs-text-muted);
  font-weight: 600;
}
.docs-search-empty p {
  margin: 0;
  font-size: 12px;
  color: var(--docs-text-faint);
}
.docs-search-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--docs-border);
  font-size: 11px;
  color: var(--docs-text-faint);
}
.docs-search-footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid var(--docs-border);
  border-radius: 4px;
  font: 600 10px/1 var(--docs-font-mono);
  color: var(--docs-text-faint);
  background: var(--docs-surface-2);
}

.docs-search-result-section::before {
  content: "/";
  color: var(--docs-text-mute2);
}
.docs-search-result mark {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.4), rgba(192, 57, 43, 0.3));
  color: var(--docs-cream);
  border-radius: 3px;
  padding: 1px 3px;
  font-weight: 600;
}
.docs-search-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--docs-text-faint);
}
.docs-search-empty::before {
  content: "\1F50D";
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* — Sidebar — */
.docs-sidebar {
  position: sticky;
  top: calc(var(--docs-header-h) + 16px);
  max-height: calc(100vh - var(--docs-header-h) - 32px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--docs-border) transparent;
  /* Match home nav style */
  font-family: var(--docs-font-body);
  font-size: 13px;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--docs-border); border-radius: 2px; }

.docs-sidebar-toggle {
  display: none;
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  padding: 6px;
  background: none;
  border: 1px solid var(--docs-border);
  border-radius: 6px;
  cursor: pointer;
  z-index: 101;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.docs-sidebar-toggle span {
  display: block;
  width: 16px; height: 2px;
  background: var(--docs-text-muted);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.docs-sidebar.is-open .docs-sidebar-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.docs-sidebar.is-open .docs-sidebar-toggle span:nth-child(2) { opacity: 0; }
.docs-sidebar.is-open .docs-sidebar-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .docs-sidebar-toggle { display: flex; }
}

.docs-sidebar-section { margin-bottom: 22px; }
.docs-sidebar-section:last-child { margin-bottom: 0; }

.docs-sidebar-label {
  font: 600 10.5px/1 var(--docs-font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--docs-rose);
  opacity: 0.85;
  padding: 0 12px 10px;
}

.docs-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 2px 0;
  border-radius: var(--docs-radius-sm);
  font-size: 13.5px;
  color: var(--docs-text-muted);
  position: relative;
  text-decoration: none;
  transition: all var(--docs-dur-base) var(--docs-ease-out), color 0.3s ease;
}
.docs-sidebar-link::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--docs-accent), var(--docs-rose));
  opacity: 0;
  transition: all var(--docs-dur-base) var(--docs-ease-out);
}
.docs-sidebar-link:hover {
  color: var(--docs-text);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.06), rgba(192, 57, 43, 0.04));
  text-decoration: none;
}
.docs-sidebar-link:hover::before {
  opacity: 0.4;
  width: 2px;
}
.docs-sidebar-link:active {
  transform: scale(0.98);
}
.docs-sidebar-link.is-active {
  color: var(--docs-accent);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.1), rgba(192, 57, 43, 0.06));
  font-weight: 500;
}
.docs-sidebar-link.is-active::before {
  opacity: 1;
  width: 3px;
  box-shadow: 0 0 8px rgba(29, 78, 216, 0.4);
}
.docs-sidebar-link.is-active::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--docs-accent);
  opacity: 0.7;
  animation: activePulse 2s ease-in-out infinite;
}
@keyframes activePulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}
.docs-sidebar-link code {
  font-family: var(--docs-font-mono);
  font-size: 12px;
  color: var(--docs-text-faint);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 240, 224, 0.04);
  transition: all var(--docs-dur-base) var(--docs-ease-out), background 0.3s ease;
}
.docs-sidebar-link:hover code {
  background: rgba(255, 240, 224, 0.08);
  color: var(--docs-text-muted);
}
.docs-sidebar-link.is-active code { 
  color: var(--docs-accent); 
  background: rgba(29, 78, 216, 0.12);
}

.docs-sidebar-footer {
  margin-top: 28px;
  padding: 14px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: linear-gradient(160deg, var(--docs-surface-2), var(--docs-surface));
  transition: border-color 0.3s ease, background 0.3s ease;
}
.docs-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--docs-text-muted);
  text-decoration: none;
}
.docs-sidebar-footer a:hover { color: var(--docs-accent); }
.docs-sidebar-footer svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.7; }

/* — Content — */
.docs-content { max-width: var(--docs-content-max); }

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font: 500 12px/1 var(--docs-font-mono);
  letter-spacing: 0.04em;
  color: var(--docs-text-faint);
}
.docs-meta a { color: var(--docs-text-muted); text-decoration: none; }
.docs-meta a:hover { color: var(--docs-accent); }

/* Section rhythm */
.docs-section {
  padding-top: 8px;
  margin-top: 8px;
}

.docs-content h2 {
  font: 600 1.45rem/1.25 var(--docs-font-display);
  letter-spacing: -0.02em;
  color: var(--docs-cream);
  margin: 52px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--docs-border);
  scroll-margin-top: calc(var(--docs-header-h) + 20px);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.docs-content h2:first-of-type { margin-top: 28px; }
.docs-content h3 {
  font: 600 1.15rem/1.3 var(--docs-font-display);
  letter-spacing: -0.014em;
  color: var(--docs-text);
  margin: 36px 0 10px;
  scroll-margin-top: calc(var(--docs-header-h) + 20px);
  transition: color 0.3s ease;
}
.docs-content h4 {
  font: 600 0.95rem/1.4 var(--docs-font-display);
  color: var(--docs-text-muted);
  margin: 24px 0 8px;
  transition: color 0.3s ease;
}

.docs-content p {
  margin: 14px 0;
  color: var(--docs-text-muted);
  transition: color 0.3s ease;
}
.docs-content p strong,
.docs-content li strong {
  color: var(--docs-text);
  font-weight: 600;
  transition: color 0.3s ease;
}

.docs-content ul, .docs-content ol {
  margin: 14px 0 14px 1.35rem;
  color: var(--docs-text-muted);
  transition: color 0.3s ease;
}
.docs-content li { margin: 8px 0; line-height: 1.65; }
.docs-content li::marker { color: var(--docs-accent); opacity: 0.65; }

/* Inline code */
.docs-content code:not(pre code) {
  font-family: var(--docs-font-mono);
  font-size: 0.86em;
  background: rgba(255, 240, 224, 0.06);
  border: 1px solid var(--docs-border);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--docs-cream);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Code blocks */
.docs-content pre {
  position: relative;
  margin: 18px 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: var(--docs-bg-elev);
  box-shadow: inset 0 1px 0 rgba(255, 240, 224, 0.04);
  overflow-x: auto;
  font-family: var(--docs-font-mono);
  font-size: 13.25px;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: var(--docs-border) transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.docs-content pre code {
  display: block;
  font: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  color: #f5ebe3;
  white-space: pre;
  tab-size: 2;
}

.docs-content pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  left: 14px;
  font: 600 10px/1 var(--docs-font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--docs-rose);
  opacity: 0.75;
  pointer-events: none;
}
.docs-content pre[data-lang] { padding-top: 38px; }

.docs-code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--docs-radius-sm);
  border: 1px solid var(--docs-border);
  background: rgba(12, 10, 16, 0.75);
  backdrop-filter: blur(8px);
  color: var(--docs-text-muted);
  font: 600 10px/1 var(--docs-font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--docs-dur-fast) var(--docs-ease-out),
    background var(--docs-dur-fast) var(--docs-ease-out),
    color var(--docs-dur-fast) var(--docs-ease-out),
    border-color 0.3s ease;
}
.docs-content pre:hover .docs-code-copy,
.docs-content pre:focus-within .docs-code-copy { opacity: 1; }
@media (max-width: 600px) {
  .docs-code-copy { opacity: 1; }
}
.docs-code-copy:hover {
  color: var(--docs-text);
  background: var(--docs-surface-3);
  border-color: var(--docs-border-strong);
}
.docs-code-copy:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--docs-accent);
}
.docs-code-copy svg { width: 12px; height: 12px; }
.docs-code-copy.is-copied {
  color: var(--docs-success);
  border-color: rgba(126, 201, 168, 0.4);
  background: var(--docs-success-subtle);
  opacity: 1;
}

/* Callouts */
.docs-callout {
  margin: 22px 0;
  padding: 16px 18px 16px 18px;
  border: 1px solid;
  border-radius: var(--docs-radius-md);
  font-size: 14.5px;
  line-height: 1.65;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.docs-callout-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.docs-callout-body { flex: 1; min-width: 0; }
.docs-callout-body p { margin: 6px 0 0; color: var(--docs-text-muted); }
.docs-callout-body strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--docs-text);
}

.docs-callout-info {
  background: var(--docs-info-subtle);
  border-color: rgba(142, 182, 232, 0.28);
}
.docs-callout-info .docs-callout-icon { color: var(--docs-info); }
.docs-callout-info .docs-callout-body strong { color: var(--docs-info); }

.docs-callout-warn {
  background: var(--docs-warning-subtle);
  border-color: rgba(232, 184, 109, 0.28);
}
.docs-callout-warn .docs-callout-icon { color: var(--docs-warning); }
.docs-callout-warn .docs-callout-body strong { color: var(--docs-warning); }

/* Tables */
.docs-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: var(--docs-surface);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.docs-content table th, .docs-content table td,
.docs-table th, .docs-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--docs-border);
  vertical-align: top;
  transition: border-color 0.3s ease;
}
.docs-content table th, .docs-table th {
  font: 600 10.5px/1.2 var(--docs-font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--docs-text-muted);
  background: var(--docs-surface-2);
  transition: color 0.3s ease, background 0.3s ease;
}
.docs-content table td, .docs-table td { color: var(--docs-text-muted); transition: color 0.3s ease; }
.docs-content table tr:last-child td, .docs-table tr:last-child td { border-bottom: 0; }
.docs-content table tbody tr:hover td, .docs-table tbody tr:hover td { background: rgba(212, 168, 255, 0.04); }
.docs-content table code, .docs-table code { font-size: 0.88em; }

/* Anchors */
.docs-anchor {
  margin-left: 8px;
  font-weight: 400;
  color: var(--docs-text-faint);
  opacity: 0;
  text-decoration: none;
  transition: all var(--docs-dur-base) var(--docs-ease-out);
  transform: translateX(-4px);
}
.docs-content h2:hover .docs-anchor,
.docs-content h3:hover .docs-anchor { 
  opacity: 1; 
  transform: translateX(0);
}
.docs-anchor:hover { 
  color: var(--docs-accent); 
  text-decoration: none;
  transform: translateX(2px) scale(1.1);
}

/* Smooth scroll for anchor links */
.docs-content h2, .docs-content h3, .docs-content h4 {
  scroll-behavior: smooth;
}

/* Anchor link highlight animation */
:target {
  animation: anchorHighlight 1.5s ease-out;
}
@keyframes anchorHighlight {
  0% { background: rgba(29, 78, 216, 0.15); }
  100% { background: transparent; }
}

/* Next Steps Grid */
.docs-next-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 12px;
  margin: 24px 0;
}
.docs-next-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: var(--docs-surface);
  text-decoration: none;
  transition: all var(--docs-dur-fast) var(--docs-ease-out), border-color 0.3s ease, background 0.3s ease;
}
.docs-next-step:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.08);
  text-decoration: none;
}
.docs-next-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--docs-text);
}
.docs-next-step:hover .docs-next-label {
  color: var(--docs-accent);
}
.docs-next-desc {
  font-size: 13px;
  color: var(--docs-text-muted);
  line-height: 1.45;
}
.docs-light .docs-next-step {
  border-color: var(--docs-border);
  background: var(--docs-surface);
}
.docs-light .docs-next-step:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.08);
}

@media (max-width: 600px) {
  .docs-next-steps {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.docs-footer {
  border-top: 1px solid var(--docs-border);
  padding: 28px 24px 40px;
  font-size: 12.5px;
  color: var(--docs-text-mute2);
  background: rgba(0, 0, 0, 0.15);
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.docs-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.docs-footer a { color: var(--docs-text-muted); text-decoration: none; }
.docs-footer a:hover { color: var(--docs-accent); }
.docs-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.docs-footer-mono {
  font-family: var(--docs-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--docs-text-faint);
}

/* Right TOC */
.docs-toc {
  position: sticky;
  top: calc(var(--docs-header-h) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--docs-header-h) - 32px);
  overflow-y: auto;
  padding-left: 12px;
  border-left: 1px solid var(--docs-border);
  display: none;
  transition: border-color 0.3s ease;
}

@media (min-width: 960px) {
  .docs-layout {
    grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) 180px;
    gap: 32px;
  }
  .docs-sidebar  { display: block; grid-column: 1; grid-row: 1; }
  .docs-content  { grid-column: 2; grid-row: 1; }
  .docs-toc      { display: block; grid-column: 3; grid-row: 1; }
}

@media (min-width: 1280px) {
  .docs-layout {
    grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) 196px;
    gap: 40px;
  }
}

.docs-toc-label {
  font: 600 10.5px/1 var(--docs-font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--docs-text-mute2);
  margin-bottom: 12px;
}
.docs-toc a {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 12.5px;
  color: var(--docs-text-faint);
  border-left: 2px solid transparent;
  margin-left: -1px;
  text-decoration: none;
  line-height: 1.4;
}
.docs-toc a:hover { color: var(--docs-text); text-decoration: none; }
.docs-toc a.is-active {
  color: var(--docs-accent);
  border-left-color: var(--docs-accent);
}
.docs-toc a[data-depth="3"] { padding-left: 22px; font-size: 12px; }

/* ── Feedback Widget + Reading Time ── */
.docs-feedback{margin-top:48px;padding:28px 0;border-top:1px solid var(--docs-border);text-align:center}
.docs-feedback-prompt{font:600 14px/1.4 var(--docs-font-display);color:var(--docs-text);margin-bottom:12px}
.docs-feedback-buttons{display:flex;align-items:center;justify-content:center;gap:12px}
.docs-feedback-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:1px solid var(--docs-border);border-radius:var(--docs-radius-pill);background:var(--docs-surface);color:var(--docs-text-muted);font:500 13px/1 var(--docs-font-body);cursor:pointer;transition:all .15s var(--docs-ease-out)}
.docs-feedback-btn:hover{border-color:var(--docs-accent);color:var(--docs-text);background:var(--docs-accent-subtle)}
.docs-feedback-btn.is-active{border-color:var(--docs-accent);background:var(--docs-accent-subtle);color:var(--docs-accent)}
.docs-feedback-btn svg{width:16px;height:16px}
.docs-feedback-thanks{margin-top:12px;font-size:13px;color:var(--docs-text-faint);opacity:0;transition:opacity .3s}
.docs-feedback-thanks.is-visible{opacity:1}
.docs-feedback-comment{margin-top:12px;display:none}
.docs-feedback-comment.is-visible{display:block}
.docs-feedback-comment textarea{width:100%;max-width:400px;padding:10px 14px;border:1px solid var(--docs-border);border-radius:var(--docs-radius-md);background:var(--docs-surface);color:var(--docs-text);font:400 13px/1.5 var(--docs-font-body);outline:none;resize:vertical;min-height:60px;transition:border-color .15s}
.docs-feedback-comment textarea:focus{border-color:var(--docs-accent)}
.docs-feedback-comment textarea::placeholder{color:var(--docs-text-faint)}
.docs-reading-time{display:inline-flex;align-items:center;gap:5px;font:500 11px/1 var(--docs-font-mono);letter-spacing:.04em;color:var(--docs-text-faint);margin-left:12px}
.docs-reading-time svg{width:12px;height:12px;opacity:.6}
.docs-light .docs-feedback-btn{border-color:var(--docs-border);background:var(--docs-surface)}
.docs-light .docs-feedback-btn:hover{border-color:var(--docs-accent);background:var(--docs-accent-subtle)}
.docs-light .docs-feedback-comment textarea{background:var(--docs-surface);border-color:var(--docs-border);color:var(--docs-text)}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto !important; }
  body { transition: none !important; }
  .docs-content h2, .docs-content h3, .docs-content h4 { scroll-behavior: auto !important; }
}

/* Provider Grid */
.docs-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 12px;
  margin: 20px 0;
}
.docs-provider-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: var(--docs-surface);
  transition: all var(--docs-dur-fast) var(--docs-ease-out), border-color 0.3s ease, background 0.3s ease;
}
.docs-provider-card:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.08);
}
.docs-provider-card strong {
  font-size: 14px;
  color: var(--docs-text);
}
.docs-provider-card code {
  font-size: 12px;
  color: var(--docs-text-faint);
}
.docs-provider-card em {
  font-size: 12px;
  color: var(--docs-text-faint);
  font-style: normal;
}
.docs-light .docs-provider-card {
  border-color: var(--docs-border);
  background: var(--docs-surface);
}
.docs-light .docs-provider-card:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.08);
}

/* Theme Gallery */
.docs-theme-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 14px;
  margin: 20px 0;
}
.docs-theme-card {
  padding: 16px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: var(--docs-surface);
  transition: all var(--docs-dur-fast) var(--docs-ease-out), border-color 0.3s ease, background 0.3s ease;
}
.docs-theme-card:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.08);
}
.docs-theme-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--docs-text);
  margin-bottom: 4px;
}
.docs-theme-desc {
  font-size: 13px;
  color: var(--docs-text-muted);
  margin-bottom: 12px;
}
.docs-theme-colors {
  display: flex;
  gap: 6px;
}
.docs-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--docs-dur-fast) var(--docs-ease-out);
}
.docs-color-swatch:hover {
  transform: scale(1.2);
}
.docs-light .docs-theme-card {
  border-color: var(--docs-border);
  background: var(--docs-surface);
}
.docs-light .docs-theme-card:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
}
.docs-light .docs-color-swatch {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Layout */
.docs-layout {
  display: grid;
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr);
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 100px;
  align-items: start;
}
.docs-sidebar { grid-column: 1; grid-row: 1; }
.docs-content  { grid-column: 2; grid-row: 1; }
/* toc hidden by default; placed in col 3 at 960px+ */

@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding: 16px 16px 72px; }
  .docs-content  { grid-column: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
  .docs-sidebar { display: none; }
  .docs-toc { display: none; }
  .docs-content pre { font-size: 12px; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .docs-content img { max-width: 100%; height: auto; }
  .docs-table-wrap { -webkit-overflow-scrolling: touch; }
}

/* — Light Theme Overrides — */
.docs-light {
  --docs-bg:        #faf8f5;
  --docs-bg-elev:   #f4f1ed;
  --docs-surface:   rgba(30, 20, 10, 0.03);
  --docs-surface-2: rgba(30, 20, 10, 0.055);
  --docs-surface-3: rgba(30, 20, 10, 0.09);

  --docs-border:        rgba(140, 120, 100, 0.12);
  --docs-border-strong: rgba(140, 120, 100, 0.22);
  --docs-border-accent: rgba(140, 80, 200, 0.35);

  --docs-text:       #1a1612;
  --docs-text-muted: #5c5047;
  --docs-text-faint: #8a7e74;
  --docs-text-mute2: #b0a598;

  --docs-accent:        #1d4ed8;
  --docs-accent-hover:  #2563eb;
  --docs-accent-active: #3b82f6;
  --docs-accent-subtle: rgba(29, 78, 216, 0.08);
  --docs-accent-glow:   rgba(29, 78, 216, 0.15);
  --docs-rose:          #c0392b;
  --docs-cream:         #2a1f14;

  --docs-success: #15803d;
  --docs-success-subtle: rgba(21, 128, 61, 0.08);
  --docs-warning: #a16207;
  --docs-warning-subtle: rgba(161, 98, 7, 0.08);
  --docs-info:    #1d4ed8;
  --docs-info-subtle: rgba(29, 78, 216, 0.08);
}

.docs-light body,
.docs-light {
  background-color: var(--docs-bg);
  background-image: none;
}

.docs-light .docs-header {
  border-bottom-color: var(--docs-border);
  background: rgba(250, 248, 245, 0.88);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* Logo handled by JS probe — no hardcoded filter overrides */
.docs-light .docs-brand:hover .docs-brand-mark,
.docs-light .docs-brand:hover img {
  filter: drop-shadow(0 0 8px rgba(29, 78, 216, 0.35));
}

.docs-light .docs-search-field {
  border-color: var(--docs-border-strong);
  background: rgba(30, 20, 10, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.docs-light .docs-search-field:hover {
  border-color: rgba(30, 20, 10, 0.22);
  background: rgba(30, 20, 10, 0.10);
}
.docs-light .docs-search-field:focus-within {
  border-color: var(--docs-border-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08), 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.docs-light .docs-search-results {
  background: #fff;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.12);
}

/* Keep code blocks dark even in light mode for readability */
.docs-light .docs-content pre {
  background: #1e1a17;
}
.docs-light .docs-content pre code {
  color: #f5ebe3;
}
.docs-light .docs-content code:not(pre code) {
  background: rgba(29, 78, 216, 0.06);
  border-color: var(--docs-border);
  color: var(--docs-accent);
}

.docs-light .docs-content pre .docs-code-copy {
  background: rgba(30, 26, 23, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}
.docs-light .docs-content pre .docs-code-copy:hover {
  background: rgba(30, 26, 23, 0.95);
  color: rgba(255, 255, 255, 0.8);
}

.docs-light .docs-sidebar-footer {
  background: linear-gradient(160deg, var(--docs-surface-2), var(--docs-surface));
}

.docs-light .docs-table-wrap {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.docs-light .docs-footer {
  background: rgba(0, 0, 0, 0.02);
}

.docs-light .docs-theme-toggle {
  background: var(--docs-surface);
  border-color: var(--docs-border);
}
.docs-light .docs-theme-toggle:hover {
  border-color: var(--docs-border-strong);
  background: var(--docs-surface-2);
}

/* — Mobile hamburger — */
.docs-mobile-menu-btn {
  display: none;
  width: 44px; height: 44px;
  padding: 10px; background: none;
  border: 1px solid var(--docs-border);
  border-radius: 8px; cursor: pointer;
  flex-direction: column; gap: 4px;
  align-items: center; justify-content: center;
  margin-right: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.docs-mobile-menu-btn span {
  display: block;
  width: 18px; height: 2px;
  background: var(--docs-text-muted);
  border-radius: 1px;
}
@media (max-width: 960px) {
  .docs-mobile-menu-btn { display: flex; }
  .docs-header-links {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .docs-search { max-width: 320px; }
}

/* ═══════════════════════════════════════════
   PHONE — ≤720px — critical mobile fixes
   ═══════════════════════════════════════════ */
@media (max-width: 720px) {
  /* Base */
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 16px; -webkit-tap-highlight-color: transparent; }

  /* Header — compact, no wrapping */
  .docs-header { height: auto; min-height: 52px; }
  .docs-header-inner { padding: 0 10px; gap: 6px; }
  .docs-brand { font-size: 13px; gap: 5px; }
  .docs-brand img { width: 20px; height: 20px; }
  .docs-header-links { gap: 2px; }
  .docs-header-links a:not(.docs-header-signin) {
    padding: 6px 8px; font-size: 11.5px;
  }

  /* Search — hidden, icon button to open */
  .docs-search { max-width: none; flex: 0; position: static; }
  .docs-search-field { display: none; }
  .docs-search-input.is-open,
  .docs-search-field.is-open {
    display: block;
    position: absolute;
    top: calc(100% + 4px);
    left: 10px; right: 10px;
    width: calc(100vw - 20px);
    max-width: none;
    z-index: 50;
    border-radius: var(--docs-radius-md);
    background: var(--docs-bg-elev);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    font-size: 16px; /* prevent iOS zoom */
  }
  .docs-search-field.is-open .docs-search-input {
    padding: 14px 16px 14px 40px;
  }
  .docs-search-field.is-open .docs-search-icon {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
  }
  .docs-search-kbd { display: none; }
  .docs-search-results {
    top: calc(100% + 48px);
    left: 10px; right: 10px;
    width: calc(100vw - 20px);
    max-height: 55vh;
  }
  .docs-search-mobile-btn {
    display: flex;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: none;
    border: 1px solid var(--docs-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--docs-text-faint);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .docs-search-mobile-btn svg { width: 18px; height: 18px; }

  /* Layout — full-width content */
  .docs-layout { padding: 12px 14px 80px; gap: 0; }
  .docs-content { min-width: 0; overflow-wrap: break-word; word-break: break-word; padding: 0; }

  /* Sidebar — slide-in overlay */
  .docs-sidebar { display: none; }
  .docs-sidebar.is-open {
    display: flex;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 85vw;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 2px 0 24px rgba(0,0,0,.5);
    padding: 52px 16px 24px;
    background: var(--docs-bg-elev);
    border-right: 1px solid var(--docs-border);
  }
  .docs-sidebar .docs-sidebar-toggle { display: none !important; }
  .docs-sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99;
    -webkit-tap-highlight-color: transparent;
  }
  .docs-sidebar-overlay.is-open { display: block; }
  .docs-toc { display: none; }

  /* Code blocks — touch scroll, compact font */
  .docs-content pre {
    font-size: 11.5px; line-height: 1.55;
    padding: 14px 12px;
    margin: 16px -14px;
    border-radius: 0;
    border-left: 0; border-right: 0;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw;
  }
  .docs-content pre[data-lang] { padding-top: 32px; }
  .docs-content pre[data-lang]::before { top: 6px; left: 12px; font-size: 9px; }
  .docs-code-copy { top: 4px; right: 6px; }

  /* Inline code */
  .docs-content code:not(pre code) { font-size: 13px; padding: 1px 5px; }

  /* Tables — block scroll */
  .docs-table-wrap {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px -14px;
    padding: 0 14px;
  }
  .docs-table { font-size: 13px; }
  .docs-table th, .docs-table td { padding: 8px 10px; white-space: nowrap; }

  /* Images */
  .docs-content img { max-width: 100%; height: auto; }

  /* Footer */
  .docs-footer-inner { flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px 14px; }
  .docs-footer-links { flex-wrap: wrap; gap: 8px; font-size: 12px; }
  .docs-footer-mono { font-size: 11px; }

  /* Meta */
  .docs-meta { font-size: 12px; }

  /* Mobile nav strip — horizontal scrollable section tabs */
  .docs-mobile-nav {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--docs-border);
    background: var(--docs-bg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .docs-mobile-nav::-webkit-scrollbar { display: none; }
  .docs-mobile-nav-inner {
    display: inline-flex;
    gap: 6px;
    padding: 0 10px;
  }
  .docs-mobile-nav-section {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 56px;
    padding: 4px 8px;
    border-radius: var(--docs-radius-sm, 6px);
    text-decoration: none;
    color: var(--docs-text-faint);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .docs-mobile-nav-section.is-active {
    color: var(--docs-accent);
    background: var(--docs-accent-subtle);
  }

  /* Bottom nav bar — thumb-reachable phone navigation */
  .docs-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 56px;
    background: var(--docs-bg-elev);
    border-top: 1px solid var(--docs-border);
    z-index: 90;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -1px 8px rgba(0,0,0,.3);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  .docs-bottom-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px; min-height: 44px;
    padding: 4px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--docs-text-faint);
    font-size: 11px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .docs-bottom-nav-item.is-active {
    color: var(--docs-accent);
  }

  /* Push content + footer up to clear bottom nav */
  .docs-layout { padding-bottom: 80px; }
  .docs-footer { padding-bottom: 72px; }
  body { padding-bottom: 56px; padding-bottom: calc(56px + constant(safe-area-inset-bottom)); padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}
