/* 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 {
  /* Surfaces — plum ink, not pure black */
  --docs-bg:        #0c0a10;
  --docs-bg-elev:   #12101a;
  --docs-surface:   rgba(255, 236, 245, 0.03);
  --docs-surface-2: rgba(255, 236, 245, 0.055);
  --docs-surface-3: rgba(255, 236, 245, 0.09);

  /* Borders */
  --docs-border:        rgba(255, 214, 232, 0.08);
  --docs-border-strong: rgba(255, 214, 232, 0.14);
  --docs-border-accent: rgba(214, 168, 255, 0.42);

  /* Text — cream primary (high contrast), warm gray secondary */
  --docs-text:       #faf4ef;   /* cream */
  --docs-text-muted: #c9bdb4;   /* warm taupe */
  --docs-text-faint: #8f847c;
  --docs-text-mute2: #5c554f;

  /* Cake accents: lavender, rose, soft gold */
  --docs-accent:        #d4a8ff;  /* lavender cream */
  --docs-accent-hover:  #e4c4ff;
  --docs-accent-active: #c48cf5;
  --docs-accent-subtle: rgba(212, 168, 255, 0.12);
  --docs-accent-glow:   rgba(212, 168, 255, 0.22);
  --docs-rose:          #f0a8c0;
  --docs-rose-subtle:   rgba(240, 168, 192, 0.12);
  --docs-cream:         #fff0e0;

  /* Status — soft, readable */
  --docs-success: #7ec9a8;
  --docs-success-subtle: rgba(126, 201, 168, 0.12);
  --docs-warning: #e8b86d;
  --docs-warning-subtle: rgba(232, 184, 109, 0.12);
  --docs-error:   #f08a8a;
  --docs-error-subtle: rgba(240, 138, 138, 0.12);
  --docs-info:    #8eb6e8;
  --docs-info-subtle: rgba(142, 182, 232, 0.12);

  /* Typography */
  --docs-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --docs-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --docs-font-display: 'Inter', system-ui, sans-serif;

  /* Layout */
  --docs-header-h: 64px;
  --docs-sidebar-w: 268px;
  --docs-content-max: 760px;

  /* Radii — slightly softer */
  --docs-radius-sm: 8px;
  --docs-radius-md: 12px;
  --docs-radius-lg: 16px;
  --docs-radius-pill: 9999px;

  /* Motion */
  --docs-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --docs-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --docs-dur-fast: 120ms;
  --docs-dur-base: 200ms;
  --docs-dur-slow: 320ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body { background: var(--docs-bg); color: var(--docs-text); }

body {
  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(212, 168, 255, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 100%, rgba(240, 168, 192, 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); }

/* — 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(212, 168, 255, 0.06);
}

.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);
}
.docs-brand:hover { opacity: 0.9; color: var(--docs-text); text-decoration: none; }
.docs-brand .docs-brand-mark {
  width: 26px;
  height: 26px;
  transition: filter var(--docs-dur-base) var(--docs-ease-out);
}
.docs-brand:hover .docs-brand-mark {
  filter: drop-shadow(0 0 8px rgba(212, 168, 255, 0.45));
}

/* — Search — */
.docs-search {
  position: relative;
  flex: 1;
  max-width: 320px;
  z-index: 30;
}
.docs-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--docs-text-faint);
  pointer-events: none;
  transition: color var(--docs-dur-base) var(--docs-ease-out), transform var(--docs-dur-base) var(--docs-ease-out);
}
.docs-search-input {
  width: 100%;
  padding: 10px 48px 10px 40px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-pill);
  background: var(--docs-surface);
  color: var(--docs-text);
  font: 400 14px/1.4 var(--docs-font-body);
  outline: none;
  transition: all 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-input:hover {
  border-color: var(--docs-border-strong);
  background: var(--docs-surface-2);
}
.docs-search-input:focus {
  border-color: var(--docs-border-accent);
  background: var(--docs-bg-elev);
  box-shadow: 0 0 0 4px rgba(212, 168, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.2);
}
.docs-search-input:focus::placeholder { color: transparent; }
.docs-search-input:focus + .docs-search-kbd { opacity: 0; transform: translateY(-50%) scale(0.8); }
.docs-search-input:focus ~ .docs-search-icon { color: var(--docs-accent); transform: translateY(-50%) scale(1.1); }
.docs-search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--docs-border);
  border-radius: 6px;
  background: var(--docs-surface-2);
  font: 600 10px/1 var(--docs-font-mono);
  color: var(--docs-text-faint);
  pointer-events: none;
  opacity: 1;
  transition: all var(--docs-dur-base) var(--docs-ease-out);
}
.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(212, 168, 255, 0.08);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--docs-border) transparent;
}
.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: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--docs-border);
  text-decoration: none;
  transition: all var(--docs-dur-fast) var(--docs-ease-out);
}
.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: linear-gradient(135deg, rgba(212, 168, 255, 0.08), rgba(240, 168, 192, 0.05));
  text-decoration: none;
}
.docs-search-result.is-active {
  box-shadow: inset 3px 0 0 var(--docs-accent);
}
.docs-search-result-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 14px/1.3 var(--docs-font-body);
  color: var(--docs-text);
}
.docs-search-result-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--docs-accent);
  opacity: 0.5;
  flex-shrink: 0;
}
.docs-search-result-section {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 11px/1.2 var(--docs-font-mono);
  letter-spacing: 0.04em;
  color: var(--docs-text-faint);
  padding-left: 14px;
}
.docs-search-result-section::before {
  content: "/";
  color: var(--docs-text-mute2);
}
.docs-search-result mark {
  background: linear-gradient(135deg, rgba(212, 168, 255, 0.4), rgba(240, 168, 192, 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: "🔍";
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.6;
}

.docs-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13.5px;
}
.docs-nav a {
  padding: 7px 12px;
  border-radius: var(--docs-radius-sm);
  position: relative;
  color: var(--docs-text-muted);
  text-decoration: none;
}
.docs-nav a:hover {
  color: var(--docs-text);
  background: var(--docs-accent-subtle);
  text-decoration: none;
}
.docs-nav a.is-active { color: var(--docs-text); }
.docs-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--docs-accent), var(--docs-rose));
}

.docs-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 7px 16px !important;
  border-radius: var(--docs-radius-pill) !important;
  border: 1px solid rgba(212, 168, 255, 0.45);
  background: linear-gradient(135deg, rgba(212, 168, 255, 0.22), rgba(240, 168, 192, 0.14));
  color: var(--docs-cream) !important;
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--docs-dur-fast) var(--docs-ease-out);
}
.docs-nav-cta:hover {
  background: linear-gradient(135deg, rgba(212, 168, 255, 0.35), rgba(240, 168, 192, 0.22));
  border-color: rgba(212, 168, 255, 0.7);
  box-shadow: 0 0 24px rgba(212, 168, 255, 0.2);
  color: #fff !important;
  text-decoration: none;
}

/* — 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;
}

@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding: 16px 16px 72px; }
  .docs-search { max-width: 100%; }
}

/* — 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;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--docs-border); border-radius: 2px; }

@media (max-width: 960px) {
  .docs-sidebar {
    position: static;
    max-height: none;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius-md);
    background: var(--docs-surface);
    padding: 0;
    margin-bottom: 28px;
    overflow: hidden;
  }
}

.docs-sidebar-toggle {
  display: none;
  width: 100%;
  padding: 14px 16px;
  font: 600 12px/1 var(--docs-font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--docs-text-muted);
  text-align: left;
  align-items: center;
  justify-content: space-between;
}
.docs-sidebar-toggle::after {
  content: "+";
  font-size: 16px;
  color: var(--docs-accent);
}
.docs-sidebar.is-open .docs-sidebar-toggle::after { content: "−"; }

@media (max-width: 960px) {
  .docs-sidebar-toggle { display: flex; }
  .docs-sidebar-nav { display: none; padding: 8px 12px 16px; }
  .docs-sidebar.is-open .docs-sidebar-nav { display: block; }
}

.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);
}
.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(212, 168, 255, 0.06), rgba(240, 168, 192, 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(212, 168, 255, 0.1), rgba(240, 168, 192, 0.06));
  font-weight: 500;
}
.docs-sidebar-link.is-active::before {
  opacity: 1;
  width: 3px;
  box-shadow: 0 0 8px rgba(212, 168, 255, 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);
}
.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(212, 168, 255, 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));
}
.docs-sidebar-footer-label {
  font: 600 10px/1 var(--docs-font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--docs-text-mute2);
  margin-bottom: 8px;
}
.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-content-header {
  padding: 8px 0 36px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--docs-border);
}

.docs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 11px/1 var(--docs-font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--docs-accent);
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: var(--docs-radius-pill);
  background: var(--docs-accent-subtle);
  border: 1px solid rgba(212, 168, 255, 0.2);
}

.docs-h1 {
  font: 650 clamp(1.85rem, 3.5vw, 2.5rem)/1.15 var(--docs-font-display);
  letter-spacing: -0.03em;
  color: var(--docs-cream);
  margin-bottom: 14px;
}

.docs-lead {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--docs-text-muted);
  max-width: 560px;
}

.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-sep { color: var(--docs-text-mute2); }
.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);
}
.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);
}
.docs-content h4 {
  font: 600 0.95rem/1.4 var(--docs-font-display);
  color: var(--docs-text-muted);
  margin: 24px 0 8px;
}

.docs-content p {
  margin: 14px 0;
  color: var(--docs-text-muted);
}
.docs-content p strong,
.docs-content li strong {
  color: var(--docs-text);
  font-weight: 600;
}

.docs-content ul, .docs-content ol {
  margin: 14px 0 14px 1.35rem;
  color: var(--docs-text-muted);
}
.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);
}

/* 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;
}
.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);
}
.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;
}
.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); }

.docs-callout-danger {
  background: var(--docs-error-subtle);
  border-color: rgba(240, 138, 138, 0.28);
}
.docs-callout-danger .docs-callout-icon { color: var(--docs-error); }
.docs-callout-danger .docs-callout-body strong { color: var(--docs-error); }

.docs-callout-success {
  background: var(--docs-success-subtle);
  border-color: rgba(126, 201, 168, 0.28);
}
.docs-callout-success .docs-callout-icon { color: var(--docs-success); }
.docs-callout-success .docs-callout-body strong { color: var(--docs-success); }

/* API endpoint cards */
.docs-endpoint {
  margin: 20px 0 28px;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  background: var(--docs-surface);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.docs-endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--docs-border);
  background: var(--docs-surface-2);
  font-family: var(--docs-font-mono);
  font-size: 13px;
}
.docs-endpoint-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 9px;
  border-radius: 6px;
  font: 700 10.5px/1 var(--docs-font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.docs-endpoint-method-get    { background: rgba(142, 182, 232, 0.18); color: var(--docs-info); }
.docs-endpoint-method-post   { background: rgba(126, 201, 168, 0.18); color: var(--docs-success); }
.docs-endpoint-method-delete { background: rgba(240, 138, 138, 0.18); color: var(--docs-error); }
.docs-endpoint-method-put    { background: rgba(232, 184, 109, 0.18); color: var(--docs-warning); }

.docs-endpoint-path {
  color: var(--docs-cream);
  font-weight: 500;
  word-break: break-all;
}
.docs-endpoint-auth {
  margin-left: auto;
  font: 600 10px/1 var(--docs-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--docs-text-faint);
  padding: 4px 8px;
  border-radius: var(--docs-radius-pill);
  background: rgba(255, 255, 255, 0.04);
}
.docs-endpoint-body {
  padding: 18px 18px 8px;
  font-size: 14.5px;
}
.docs-endpoint-body p { color: var(--docs-text-muted); }
.docs-endpoint-body h4 {
  margin: 14px 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--docs-rose);
  font-weight: 600;
}

/* 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);
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.docs-table th, .docs-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--docs-border);
  vertical-align: top;
}
.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);
}
.docs-table td { color: var(--docs-text-muted); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table tbody tr:hover td { background: rgba(212, 168, 255, 0.04); }
.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(212, 168, 255, 0.15); }
  100% { background: transparent; }
}

/* Pager */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--docs-border);
}
.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px;
  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);
  color: var(--docs-text);
  text-decoration: none;
}
.docs-pager a:hover {
  border-color: var(--docs-border-accent);
  background: var(--docs-accent-subtle);
  box-shadow: 0 8px 28px rgba(212, 168, 255, 0.08);
  text-decoration: none;
}
.docs-pager .docs-pager-dir {
  font: 600 10.5px/1 var(--docs-font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--docs-text-faint);
}
.docs-pager .docs-pager-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--docs-text);
}
.docs-pager a:hover .docs-pager-title { color: var(--docs-accent); }
.docs-pager .docs-pager-next { text-align: right; }

@media (max-width: 600px) {
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager .docs-pager-next { text-align: left; }
}

/* 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);
}
.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;
}

@media (min-width: 1280px) {
  .docs-layout {
    grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) 196px;
    gap: 40px;
  }
  .docs-toc { display: block; }
}

.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; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* CTA links — "Read the full reference →" style */
.docs-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid rgba(212, 168, 255, 0.35);
  border-radius: var(--docs-radius-sm);
  background: linear-gradient(135deg, rgba(212, 168, 255, 0.12), rgba(240, 168, 192, 0.08));
  font: 600 13.5px/1 var(--docs-font-body);
  color: var(--docs-cream);
  text-decoration: none;
  transition: all var(--docs-dur-fast) var(--docs-ease-out);
  margin-top: 12px;
}
.docs-cta-link:hover {
  background: linear-gradient(135deg, rgba(212, 168, 255, 0.22), rgba(240, 168, 192, 0.16));
  border-color: rgba(212, 168, 255, 0.55);
  box-shadow: 0 0 20px rgba(212, 168, 255, 0.15);
  color: #fff;
  text-decoration: none;
}
.docs-cta-link::after {
  content: "→";
  transition: transform var(--docs-dur-fast) var(--docs-ease-out);
}
.docs-cta-link:hover::after {
  transform: translateX(3px);
}
.docs-cta-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--docs-accent);
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .docs-h1 { font-size: 1.75rem; }
  .docs-lead { font-size: 16px; }
  .docs-header-inner { padding: 0 14px; }
  .docs-nav a:not(.docs-nav-cta) { padding: 6px 8px; font-size: 12.5px; }
}
