:root {
  /* Colors — Prelude palette (light) */
  --docs-bg: #fafbfc;
  --docs-text: #0f172a;
  --docs-muted: #64748b;
  --docs-sidebar-bg: #eef2f7;
  --docs-border: #e2e8f0;
  --docs-link: #2196F3;
  --docs-link-hover: #1976d2;
  --docs-code-bg: #f1f5f9;
  --docs-card-bg: #ffffff;
  --docs-card-border: #e2e8f0;
  --docs-accent-a: rgba(33, 150, 243, 0.08);
  --docs-active-bg: rgba(33, 150, 243, 0.12);
  --docs-hover-bg: rgba(15, 23, 42, 0.04);
  --docs-topbar-bg: #172754;
  --docs-topbar-fg: #ffffff;
  --docs-topbar-muted: #cbd5e1;
  --docs-heading: #0f172a;

  /* Admonition colors — Prelude-aligned */
  --docs-admon-note-border: #2196F3;
  --docs-admon-note-bg: #e3f2fd;
  --docs-admon-tip-border: #22c55e;
  --docs-admon-tip-bg: #dcfce7;
  --docs-admon-info-border: #6f42c1;
  --docs-admon-info-bg: #f5f3ff;
  --docs-admon-warning-border: #fd7e14;
  --docs-admon-warning-bg: #fff3e0;
  --docs-admon-danger-border: #f43f5e;
  --docs-admon-danger-bg: #fff1f2;

  /* Badge colors (status dots + text badges) */
  --docs-badge-default-bg: #e0e7ff;
  --docs-badge-default-fg: #3730a3;
  --docs-badge-success-bg: #dcfce7;
  --docs-badge-success-fg: #166534;
  --docs-badge-warning-bg: #fff3e0;
  --docs-badge-warning-fg: #9a3412;
  --docs-badge-danger-bg: #fff1f2;
  --docs-badge-danger-fg: #9f1239;
  --docs-badge-info-bg: #f5f3ff;
  --docs-badge-info-fg: #5b21b6;

  /* Layout */
  --docs-max-content: none;
  --docs-sidebar-w: 280px;
  --docs-toc-w: 240px;

  /* Typography — Prelude brand fonts */
  --docs-font: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --docs-font-heading: 'Poppins', 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --docs-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --docs-font-size-base: 1rem;
  --docs-line-height-prose: 1.7;

  /* Chrome heights */
  --docs-topbar-height: 3.5rem;
}

[data-theme="dark"] {
  --docs-bg: #0b1220;
  --docs-text: #cbd5e1;
  --docs-heading: #f1f5f9;
  --docs-muted: #94a3b8;
  --docs-sidebar-bg: #0f1a2e;
  --docs-border: #1e293b;
  --docs-link: #3d8bfd;
  --docs-link-hover: #60a5fa;
  --docs-code-bg: #0f172a;
  --docs-card-bg: #0f1a2e;
  --docs-card-border: #1e293b;
  --docs-accent-a: rgba(61, 139, 253, 0.08);
  --docs-active-bg: rgba(61, 139, 253, 0.18);
  --docs-hover-bg: rgba(255, 255, 255, 0.04);
  --docs-topbar-bg: #172754;
  --docs-topbar-fg: #ffffff;
  --docs-topbar-muted: #94a3b8;

  --docs-admon-note-bg: rgba(33, 150, 243, 0.12);
  --docs-admon-tip-bg: rgba(34, 197, 94, 0.12);
  --docs-admon-info-bg: rgba(111, 66, 193, 0.15);
  --docs-admon-warning-bg: rgba(253, 126, 20, 0.12);
  --docs-admon-danger-bg: rgba(244, 63, 94, 0.12);

  --docs-badge-default-bg: rgba(99, 102, 241, 0.2);
  --docs-badge-default-fg: #c7d2fe;
  --docs-badge-success-bg: rgba(34, 197, 94, 0.2);
  --docs-badge-success-fg: #86efac;
  --docs-badge-warning-bg: rgba(253, 126, 20, 0.2);
  --docs-badge-warning-fg: #fed7aa;
  --docs-badge-danger-bg: rgba(244, 63, 94, 0.2);
  --docs-badge-danger-fg: #fda4af;
  --docs-badge-info-bg: rgba(111, 66, 193, 0.2);
  --docs-badge-info-fg: #c4b5fd;
}

body {
  margin: 0;
  font-family: var(--docs-font);
  font-size: var(--docs-font-size-base);
  color: var(--docs-text);
  background: var(--docs-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1024px) {
  body { font-size: 1.0625rem; }
}
a { color: var(--docs-link); }
a:hover { color: var(--docs-link-hover); }

.docs-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* Topbar — Luminar navy #172754, matching the public site navbar */
.docs-topbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: var(--docs-topbar-bg);
  color: var(--docs-topbar-fg);
  position: sticky; top: 0; z-index: 10;
  height: var(--docs-topbar-height);
  box-sizing: border-box;
}
.docs-topbar-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--docs-font-heading); font-weight: 600;
  text-decoration: none; color: var(--docs-topbar-fg);
  font-size: 1rem; letter-spacing: 0.01em;
}
.docs-topbar-logo { height: 1.65rem; width: auto; display: block; }
.docs-topbar-brand-sep {
  color: var(--docs-topbar-muted); font-weight: 400;
  opacity: 0.5; font-size: 0.9rem;
}
.docs-topbar-brand-text { color: var(--docs-topbar-muted); font-weight: 500; }
.docs-topbar-crumb {
  color: var(--docs-topbar-muted); font-size: 0.9rem;
  text-decoration: none; padding: 0.15rem 0.1rem; border-radius: 3px;
  transition: color 150ms, background 150ms;
}
.docs-topbar-crumb:hover {
  color: var(--docs-topbar-fg);
  background: rgba(255,255,255,0.06);
}
.docs-topbar-crumb-sep { color: var(--docs-topbar-muted); font-size: 0.9rem; opacity: 0.55; }

/* Version switcher */
.docs-version-switcher { position: relative; }
.docs-version-trigger {
  display: inline-flex; align-items: center; gap: 0.35rem;
  height: 1.65rem; padding: 0 0.6rem; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--docs-topbar-muted); cursor: pointer;
  font-size: 0.85rem; font-family: inherit;
  transition: background 150ms, color 150ms;
}
.docs-version-trigger:hover { color: #fff; background: rgba(255,255,255,0.12); }
.docs-version-caret { font-size: 0.7rem; }
.docs-version-dropdown {
  position: absolute; top: calc(100% + 0.4rem); left: 0;
  min-width: 12rem;
  background: var(--docs-card-bg); color: var(--docs-text);
  border: 1px solid var(--docs-card-border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 0.35rem; display: none; z-index: 20;
}
.docs-version-switcher.is-open > .docs-version-dropdown { display: block; }
.docs-version-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.7rem; border-radius: 4px;
  color: var(--docs-text); text-decoration: none;
  gap: 0.75rem;
}
.docs-version-item:hover { background: var(--docs-hover-bg); color: var(--docs-link); }
.docs-version-item.is-active { background: var(--docs-active-bg); color: var(--docs-link); font-weight: 600; }
.docs-version-item-label { flex: 1; }
.docs-version-item-state {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem; border-radius: 999px;
}
.docs-version-item--unmaintained .docs-version-item-state {
  background: var(--docs-badge-warning-bg); color: var(--docs-badge-warning-fg);
}
.docs-version-item--unreleased .docs-version-item-state {
  background: var(--docs-badge-info-bg); color: var(--docs-badge-info-fg);
}
.docs-topbar-spacer { flex: 1; }

.docs-main { flex: 1; }
.docs-layout {
  display: grid;
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) var(--docs-toc-w);
  gap: 2.5rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
@media (min-width: 1800px) {
  .docs-layout { max-width: 1760px; gap: 3rem; }
}
@media (max-width: 1024px) {
  .docs-layout { grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 720px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
}

.docs-sidebar {
  background: var(--docs-sidebar-bg); padding: 1rem; border-radius: 8px;
  align-self: start; position: sticky; top: calc(var(--docs-topbar-height) + 1rem);
  max-height: calc(100vh - var(--docs-topbar-height) - 2rem); overflow: auto;
}
.docs-nav-tree, .docs-nav-subtree { list-style: none; padding: 0; margin: 0; }
.docs-nav-subtree {
  padding-left: 0.75rem; border-left: 1px solid var(--docs-border);
  margin: 0.25rem 0 0.5rem 0.5rem;
}
.docs-nav-item { padding: 0.05rem 0; }
.docs-nav-item--top { padding: 0.1rem 0; }
.docs-nav-link {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.5rem; border-radius: 4px;
  text-decoration: none; color: var(--docs-text);
  font-size: 0.9rem;
}
.docs-nav-link:hover { background: var(--docs-hover-bg); }
.docs-nav-link.is-active {
  background: var(--docs-active-bg); color: var(--docs-link); font-weight: 600;
}
.docs-nav-link--top {
  font-weight: 600; color: var(--docs-text); font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
}
.docs-nav-item--top.is-expanded > .docs-nav-link--top { color: var(--docs-link); }
.docs-nav-group {
  font-weight: 600; color: var(--docs-muted);
  padding: 0.5rem 0.5rem 0.25rem;
  text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;
}

/* Status dot next to nav link */
.docs-status-dot {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--docs-badge-default-bg);
}
.docs-status-dot--new { background: var(--docs-badge-success-fg); }
.docs-status-dot--deprecated { background: var(--docs-badge-danger-fg); }
.docs-status-dot--experimental { background: var(--docs-badge-warning-fg); }

/* Inline text badge */
.docs-badge {
  font-size: 0.65rem; padding: 0.05rem 0.35rem; border-radius: 10px;
  margin-left: 0.5rem; vertical-align: middle;
  background: var(--docs-badge-default-bg); color: var(--docs-badge-default-fg);
}
.docs-badge--success { background: var(--docs-badge-success-bg); color: var(--docs-badge-success-fg); }
.docs-badge--warning { background: var(--docs-badge-warning-bg); color: var(--docs-badge-warning-fg); }
.docs-badge--danger { background: var(--docs-badge-danger-bg); color: var(--docs-badge-danger-fg); }
.docs-badge--info { background: var(--docs-badge-info-bg); color: var(--docs-badge-info-fg); }

.docs-content { max-width: var(--docs-max-content); min-width: 0; }
.docs-page-title {
  font-family: var(--docs-font-heading);
  font-size: 2.25rem; margin: 0 0 0.5rem;
  letter-spacing: -0.015em; font-weight: 600;
  color: var(--docs-heading);
}
.docs-page-lead { color: var(--docs-muted); font-size: 1.125rem; margin: 0 0 1rem; }

.docs-page-meta {
  display: flex; gap: 0.75rem; align-items: center;
  font-size: 0.85rem; color: var(--docs-muted); margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.docs-prose { line-height: var(--docs-line-height-prose); }
.docs-prose p { margin: 0 0 1em; }
.docs-prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
  border: 1px solid var(--docs-border);
  border-radius: 6px;
}
.docs-prose *:not(h1):not(h2):not(h3) + h2,
.docs-prose *:not(h1):not(h2):not(h3) + h3 { margin-top: 2.25em; }
.docs-prose h2, .docs-prose h3, .docs-prose h4 {
  font-family: var(--docs-font-heading);
  font-weight: 600; letter-spacing: -0.01em;
  color: var(--docs-heading);
  margin-bottom: 0.5em;
  line-height: 1.3;
}
.docs-prose h2 { font-size: 1.5rem; }
.docs-prose h3 { font-size: 1.2rem; }
.docs-prose ul, .docs-prose ol { padding-left: 1.4em; }
.docs-prose li + li { margin-top: 0.35em; }
.docs-prose code {
  background: var(--docs-code-bg); padding: 0.1em 0.35em;
  border-radius: 4px; font-size: 0.9em;
  font-family: var(--docs-font-mono);
}
.docs-prose pre {
  background: var(--docs-code-bg); padding: 1rem;
  border-radius: 6px; overflow-x: auto; position: relative;
  font-family: var(--docs-font-mono);
}
.docs-prose .highlight { position: relative; }

.docs-prose .admonition {
  border-left: 4px solid var(--docs-border);
  background: var(--docs-accent-a);
  padding: 0.75rem 1rem; margin: 1rem 0; border-radius: 4px;
}
.docs-prose .admonition-note { border-color: var(--docs-admon-note-border); background: var(--docs-admon-note-bg); }
.docs-prose .admonition-tip { border-color: var(--docs-admon-tip-border); background: var(--docs-admon-tip-bg); }
.docs-prose .admonition-info { border-color: var(--docs-admon-info-border); background: var(--docs-admon-info-bg); }
.docs-prose .admonition-warning { border-color: var(--docs-admon-warning-border); background: var(--docs-admon-warning-bg); }
.docs-prose .admonition-danger { border-color: var(--docs-admon-danger-border); background: var(--docs-admon-danger-bg); }

.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95em;
}
.docs-prose th,
.docs-prose td {
  border: 1px solid var(--docs-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.docs-prose thead th {
  background: var(--docs-accent-a);
  font-weight: 600;
}
.docs-prose tbody tr:nth-child(even) td {
  background: var(--docs-accent-a);
}

/* Copy-code button (injected by docs.js; positioned over .highlight) */
.docs-copy-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: var(--docs-card-bg); color: var(--docs-muted);
  border: 1px solid var(--docs-border); border-radius: 4px;
  padding: 0.2rem 0.5rem; font-size: 0.75rem;
  cursor: pointer; opacity: 0; transition: opacity 150ms;
}
.docs-prose .highlight:hover .docs-copy-btn,
.docs-prose pre:hover .docs-copy-btn { opacity: 1; }
.docs-copy-btn:hover { background: var(--docs-hover-bg); }
.docs-copy-btn[data-state="copied"] { color: var(--docs-badge-success-fg); border-color: var(--docs-badge-success-fg); }

/* Hover anchor link on headings */
.docs-anchor-link {
  margin-left: 0.35rem; color: var(--docs-muted);
  text-decoration: none; opacity: 0; transition: opacity 150ms;
  font-size: 0.8em;
}
.docs-prose h2:hover .docs-anchor-link,
.docs-prose h3:hover .docs-anchor-link,
.docs-prose h4:hover .docs-anchor-link { opacity: 1; }

/* TOC */
.docs-toc {
  font-size: 0.9rem; align-self: start;
  position: sticky; top: calc(var(--docs-topbar-height) + 1rem);
  max-height: calc(100vh - var(--docs-topbar-height) - 2rem); overflow: auto;
}
.docs-toc-heading {
  text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em;
  font-weight: 600; color: var(--docs-muted); margin-bottom: 0.5rem;
}
.docs-toc ul.toc-list {
  list-style: none; padding-left: 0.75rem; margin: 0;
  border-left: 1px solid var(--docs-border);
}
.docs-toc ul.toc-list li { padding: 0.15rem 0; }
.docs-toc a { color: var(--docs-muted); text-decoration: none; }
.docs-toc a:hover { color: var(--docs-link); }
.docs-toc a[aria-current="true"] {
  color: var(--docs-link); font-weight: 600;
  border-left: 2px solid var(--docs-link); margin-left: -2px; padding-left: 0.25rem;
}

/* Breadcrumbs */
.docs-breadcrumbs {
  font-size: 0.9rem; color: var(--docs-muted); margin-bottom: 1rem;
}
.docs-breadcrumbs a { color: var(--docs-muted); text-decoration: none; }
.docs-breadcrumbs a:hover { color: var(--docs-link); }
.docs-breadcrumbs-sep { padding: 0 0.35rem; }

/* Pagination cards at bottom of page */
.docs-pagination {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 1rem; margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--docs-border);
}
.docs-pagination-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem; border: 1px solid var(--docs-card-border);
  border-radius: 8px; background: var(--docs-card-bg);
  text-decoration: none; color: var(--docs-text);
}
.docs-pagination-card:hover { border-color: var(--docs-link); }
.docs-pagination-card--next { text-align: right; align-items: flex-end; }
.docs-pagination-label { color: var(--docs-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.docs-pagination-title { font-weight: 600; font-size: 1rem; }

/* Edit link + last updated */
.docs-edit-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--docs-muted); text-decoration: none;
  font-size: 0.85rem;
}
.docs-edit-link:hover { color: var(--docs-link); }

/* Skip link */
.docs-skip-link {
  position: absolute; left: 0; top: -100px;
  background: var(--docs-link); color: #ffffff;
  padding: 0.75rem 1rem; text-decoration: none;
  z-index: 100; border-radius: 0 0 6px 0;
}
.docs-skip-link:focus { top: 0; }

/* Theme toggle button (sits on dark topbar) */
.docs-theme-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  min-width: 2.25rem; height: 2.25rem;
  padding: 0 0.6rem;
  font-size: 1rem; line-height: 1;
  color: var(--docs-topbar-muted); cursor: pointer;
  display: inline-flex; align-items: center;
  transition: background 150ms, color 150ms;
}
.docs-theme-toggle:hover { color: #fff; background: rgba(255,255,255,0.14); }
.docs-theme-toggle { justify-content: center; }
.docs-theme-toggle [data-icon] { display: none; }
.docs-theme-toggle [data-icon]:not([hidden]) { display: inline-block; }

/* Sign-in button (anonymous) */
.docs-login-btn {
  display: inline-flex; align-items: center;
  padding: 0.35rem 0.9rem; border-radius: 999px;
  background: var(--docs-link);
  color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.875rem;
  transition: background 150ms;
}
.docs-login-btn:hover { background: var(--docs-link-hover); color: #fff; }

/* User menu (authenticated) */
.docs-user-menu { position: relative; }
.docs-user-trigger {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.6rem 0.25rem 0.25rem; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--docs-topbar-fg); cursor: pointer; font-size: 0.875rem;
  transition: background 150ms;
}
.docs-user-trigger:hover { background: rgba(255,255,255,0.14); }
.docs-user-avatar {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--docs-link); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.8rem;
}
.docs-user-name { color: var(--docs-topbar-fg); max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-user-caret { color: var(--docs-topbar-muted); font-size: 0.7rem; }
.docs-user-dropdown {
  position: absolute; top: calc(100% + 0.35rem); right: 0; min-width: 10rem;
  background: var(--docs-card-bg); color: var(--docs-text);
  border: 1px solid var(--docs-card-border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 0.35rem; display: none; z-index: 20;
}
.docs-user-menu.is-open > .docs-user-dropdown { display: block; }
.docs-user-dropdown > a,
.docs-user-dropdown > .docs-user-logout-form > button {
  display: block; width: 100%; text-align: left;
  padding: 0.45rem 0.7rem; border-radius: 4px;
  color: var(--docs-text); text-decoration: none;
  background: transparent; border: 0; font: inherit; cursor: pointer;
}
.docs-user-dropdown > a:hover,
.docs-user-dropdown > .docs-user-logout-form > button:hover {
  background: var(--docs-hover-bg); color: var(--docs-link);
}
.docs-user-logout-form { margin: 0; }

/* Search */
.docs-layout--search {
  grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr) var(--docs-toc-w);
}
.docs-search-form {
  display: flex; gap: 0.5rem; margin-bottom: 1.5rem;
}
.docs-search-form input[type="search"] {
  flex: 1; padding: 0.5rem 0.75rem; font-size: 1rem;
  border: 1px solid var(--docs-border); border-radius: 6px;
  background: var(--docs-bg); color: var(--docs-text);
}
.docs-search-form button {
  padding: 0.5rem 1rem; border-radius: 6px;
  border: 1px solid var(--docs-link); background: var(--docs-link); color: #fff;
  cursor: pointer;
}
.docs-search-results {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.docs-search-hit {
  border: 1px solid var(--docs-card-border); border-radius: 8px;
  background: var(--docs-card-bg); padding: 0.75rem 1rem;
}
.docs-search-hit-link { display: block; text-decoration: none; color: var(--docs-text); }
.docs-search-hit-crumb { color: var(--docs-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.docs-search-hit-title { font-weight: 600; font-size: 1.05rem; margin-top: 0.2rem; }
.docs-search-hit-snippet { color: var(--docs-muted); font-size: 0.9rem; margin-top: 0.3rem; }
.docs-search-hit-snippet mark { background: var(--docs-badge-warning-bg); color: var(--docs-badge-warning-fg); padding: 0 0.15em; border-radius: 2px; }
.docs-search-sub-results { list-style: none; padding: 0.5rem 0 0 1rem; margin: 0; display: flex; flex-direction: column; gap: 0.2rem; border-left: 1px solid var(--docs-border); }
.docs-search-sub-link { display: flex; gap: 0.5rem; align-items: center; color: var(--docs-muted); text-decoration: none; font-size: 0.85rem; }
.docs-search-sub-link:hover { color: var(--docs-link); }
.docs-search-sub-link mark { background: var(--docs-badge-warning-bg); color: var(--docs-badge-warning-fg); padding: 0 0.15em; border-radius: 2px; }
.docs-search-sub-level { color: var(--docs-muted); font-family: monospace; font-size: 0.7rem; min-width: 1.4rem; text-align: right; }
.docs-search-empty { color: var(--docs-muted); }
.docs-search-hit[data-active="true"] { outline: 2px solid var(--docs-link); }

.docs-facets { display: flex; flex-direction: column; gap: 1.25rem; }
.docs-facet-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--docs-muted); margin: 0 0 0.25rem;
}
.docs-facet-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.docs-facet-item label {
  display: flex; gap: 0.5rem; align-items: center; cursor: pointer;
  font-size: 0.85rem; color: var(--docs-text);
}
.docs-facet-count {
  margin-left: auto; color: var(--docs-muted); font-size: 0.75rem;
}

.docs-search-trigger {
  display: inline-flex; gap: 0.5rem; align-items: center;
  height: 2.25rem; padding: 0 0.85rem; border-radius: 999px;
  min-width: min(22rem, 34vw);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: var(--docs-topbar-muted); cursor: pointer; font-size: 0.875rem;
  transition: background 150ms, color 150ms;
}
.docs-search-trigger:hover { color: #fff; background: rgba(255,255,255,0.14); }
.docs-search-trigger-kbd {
  margin-left: auto;
  font-family: var(--docs-font);
  font-size: 0.7rem; padding: 0.05rem 0.35rem; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25); color: var(--docs-topbar-muted);
  background: rgba(255,255,255,0.06);
}

.docs-search-modal {
  padding: 0; border: none; border-radius: 10px;
  background: var(--docs-card-bg); color: var(--docs-text);
  width: min(720px, 90vw); max-height: 80vh;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
}
.docs-search-modal::backdrop { background: rgba(0,0,0,0.35); }
.docs-search-modal-form {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--docs-border);
}
.docs-search-modal-form input[type="search"] {
  flex: 1; font-size: 1rem; padding: 0.5rem 0.75rem;
  background: var(--docs-bg); color: var(--docs-text);
  border: 1px solid var(--docs-border); border-radius: 6px;
}
.docs-search-modal-close {
  align-self: center; font-size: 0.75rem;
  padding: 0.2rem 0.5rem; border-radius: 4px;
  border: 1px solid var(--docs-border); background: var(--docs-bg);
  color: var(--docs-muted); cursor: pointer;
}
.docs-search-modal-results {
  overflow: auto; padding: 0.75rem 1rem;
  max-height: calc(80vh - 4rem);
}

/* Active scope chips — appear when search is pre-filtered by the page's
   product / version. Click a chip to clear its filter and re-run. */
.docs-search-modal-scope {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--docs-border);
  background: var(--docs-sidebar-bg);
}
.docs-search-modal-scope-label {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--docs-muted);
}
.docs-search-modal-scope-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: var(--docs-accent-a); color: var(--docs-link);
  border: 1px solid var(--docs-active-bg);
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: background 120ms, color 120ms;
}
.docs-search-modal-scope-chip:hover {
  background: var(--docs-active-bg);
}
.docs-search-modal-scope-chip.is-cleared { display: none; }
.docs-search-modal-scope-chip-x {
  font-size: 1rem; line-height: 1; opacity: 0.7;
}
.docs-search-modal-scope-chip-sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
body[data-search-open] { overflow: hidden; }

/* Splash hero — Prelude marketing bg */
.docs-hero {
  text-align: center; padding: 4rem 1.5rem 3.5rem;
  margin: -2rem -1.25rem 2rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.85)),
    url('/static/imgs/docs/hero-bg-minimal.png') center/cover no-repeat;
  border-radius: 0 0 12px 12px;
}
[data-theme="dark"] .docs-hero {
  background:
    linear-gradient(180deg, rgba(3,22,51,0.65), rgba(3,22,51,0.92)),
    url('/static/imgs/docs/hero-bg-minimal.png') center/cover no-repeat;
}
.docs-hero-img { max-width: 10rem; height: auto; margin-bottom: 1.25rem; }
.docs-hero-title {
  font-family: var(--docs-font-heading);
  font-size: 2.75rem; margin: 0 0 0.5rem;
  font-weight: 700; letter-spacing: -0.02em;
}
.docs-hero-tagline {
  color: var(--docs-muted);
  font-size: 1.15rem; margin: 0 auto 1.75rem; max-width: 40rem;
  line-height: 1.5;
}
.docs-hero-actions { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.docs-hero-action {
  padding: 0.65rem 1.4rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; border: 1px solid var(--docs-link);
  transition: transform 150ms, box-shadow 150ms;
}
.docs-hero-action:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(33,150,243,0.2); }
.docs-hero-action--primary { background: var(--docs-link); color: #fff; }
.docs-hero-action--secondary { color: var(--docs-link); background: transparent; }

/* Tabs */
.docs-tabs { border: 1px solid var(--docs-border); border-radius: 6px; margin: 1rem 0; overflow: hidden; }
.docs-tab {
  padding: 0.4rem 0.85rem; border: 0; background: transparent;
  color: var(--docs-muted); cursor: pointer; font-size: 0.85rem;
  border-bottom: 2px solid transparent;
}
.docs-tab[aria-selected="true"] {
  color: var(--docs-link); border-bottom-color: var(--docs-link);
}
.docs-tabpanel { padding: 0.85rem 1rem; border-top: 1px solid var(--docs-border); }

/* Version banner */
.docs-version-banner {
  padding: 0.85rem 1rem; border-radius: 6px; margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.docs-version-banner--unmaintained {
  background: var(--docs-admon-warning-bg);
  border-left: 4px solid var(--docs-admon-warning-border);
}
.docs-version-banner--unreleased {
  background: var(--docs-admon-info-bg);
  border-left: 4px solid var(--docs-admon-info-border);
}
.docs-version-banner-text { margin: 0; font-size: 0.95rem; flex: 1 1 18rem; }
.docs-version-banner-link { white-space: nowrap; font-weight: 600; text-decoration: none; color: var(--docs-link); }

/* Page-level banner */
.docs-page-banner {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem;
  border-left: 4px solid var(--docs-border);
}
.docs-page-banner--info { background: var(--docs-admon-info-bg); border-left-color: var(--docs-admon-info-border); }
.docs-page-banner--warning { background: var(--docs-admon-warning-bg); border-left-color: var(--docs-admon-warning-border); }
.docs-page-banner--danger { background: var(--docs-admon-danger-bg); border-left-color: var(--docs-admon-danger-border); }
.docs-page-banner-content { flex: 1; }
.docs-page-banner-close {
  background: transparent; border: 0; font-size: 1.25rem; line-height: 1;
  color: var(--docs-muted); cursor: pointer;
}

/* Mermaid zoom — click any rendered diagram to open a pan/zoom overlay */
.mermaid[data-zoomable="1"] { cursor: zoom-in; }
.mermaid[data-zoomable="1"]:hover { outline: 1px dashed var(--docs-border); outline-offset: 4px; }

.docs-mermaid-overlay {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(3, 22, 51, 0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.docs-mermaid-overlay[hidden] { display: none; }
.docs-mermaid-stage {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
}
.docs-mermaid-stage.is-panning { cursor: grabbing; }
.docs-mermaid-stage > svg {
  max-width: none; max-height: none;
  transform-origin: 0 0;
  transition: none;
  user-select: none;
  -webkit-user-select: none;
}
.docs-mermaid-controls {
  position: absolute; top: 1rem; right: 1rem;
  display: flex; gap: 0.4rem;
}
.docs-mermaid-controls button {
  width: 2.25rem; height: 2.25rem;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff; font-size: 1rem; line-height: 1;
  border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.docs-mermaid-controls button:hover { background: rgba(255,255,255,0.18); }
.docs-mermaid-hint {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 0.85rem;
  pointer-events: none;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ============================================================
   Docs landing — Luminar (aligned with the public site)
   ============================================================ */

.docs-index {
  --lx-navy: #172754;
  --lx-navy-deep: #0F1B3D;
  --lx-blue: #3B82F6;
  --lx-blue-hover: #2563EB;
  --lx-blue-light: #60A5FA;
  --lx-blue-50: #EFF6FF;
  --lx-blue-100: #DBEAFE;
  --lx-blue-glow: rgba(59, 130, 246, 0.4);
  --lx-blue-glow-soft: rgba(59, 130, 246, 0.15);

  --lx-ink: #18181B;
  --lx-text: #52525B;
  --lx-muted: #71717A;
  --lx-border: #E4E4E7;
  --lx-surface: #ffffff;
  --lx-surface-alt: #FAFAFA;

  --lx-font: 'Poppins', system-ui, -apple-system, sans-serif;
  --lx-mono: var(--docs-font-mono);

  --lx-radius-lg: 16px;
  --lx-radius-xl: 24px;
  --lx-radius-2xl: 32px;
  --lx-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --lx-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --lx-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --lx-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  width: 100%;
  margin: 0;
  font-family: var(--lx-font);
  background: var(--lx-surface);
}
[data-theme='dark'] .docs-index {
  --lx-ink: #e7ecf6;
  --lx-text: #99a3b8;
  --lx-muted: #8591a8;
  --lx-border: #1e293b;
  --lx-surface: #0b1220;
  --lx-surface-alt: #0f1a2e;
  --lx-blue-50: #0f1a2e;
  --lx-blue-100: #1e293b;
}

/* The page extends edge-to-edge; remove the <main> default padding */
.docs-main:has(.docs-index) { padding: 0; }

/* ───────── Hero ───────── */
.docs-index__hero {
  position: relative;
  isolation: isolate;
  background: var(--lx-navy);
  color: #fff;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4rem) clamp(5rem, 8vw, 7rem);
  overflow: hidden;
}
.docs-index__hero-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(59, 130, 246, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 75% 80% at 25% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 25% 40%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: -2;
}
.docs-index__hero-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 900px; height: 900px;
  max-width: 70%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: lxPulseGlow 8s ease-in-out infinite alternate;
}
@keyframes lxPulseGlow {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .docs-index__hero-glow { animation: none; }
}

/* Diagonal cut into the section below */
.docs-index__cut {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%; height: clamp(28px, 4vw, 60px);
  z-index: 1;
}
.docs-index__cut path { fill: var(--lx-surface); }

.docs-index__hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  z-index: 2;
}

.docs-index__kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.docs-index__kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lx-blue-light);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18), 0 0 12px var(--lx-blue-glow);
}

.docs-index__headline {
  font-family: var(--lx-font);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
  color: #fff;
  max-width: 18ch;
  text-wrap: balance;
}
.docs-index__headline-accent {
  background: linear-gradient(135deg, var(--lx-blue-light) 0%, var(--lx-blue) 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.docs-index__lede {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
  max-width: 56ch;
  text-wrap: pretty;
}

.docs-index__hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.docs-index__search {
  appearance: none;
  display: flex; align-items: center; gap: 0.7rem;
  height: 3rem;
  width: 80%;
  padding: 0 0.65rem 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  border-radius: 100px;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, color 180ms, transform 180ms;
  backdrop-filter: blur(6px);
}
.docs-index__search:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(96, 165, 250, 0.5);
  color: #fff;
  transform: translateY(-1px);
}
.docs-index__search:focus-visible {
  outline: 2px solid var(--lx-blue-light);
  outline-offset: 3px;
}
.docs-index__search-icon { display: inline-flex; color: var(--lx-blue-light); }
.docs-index__search-label { flex: 1; text-align: left; font-size: 0.95rem; }
.docs-index__search-hint { display: inline-flex; gap: 0.2rem; margin-left: auto; }
.docs-index__search-hint kbd {
  display: inline-grid; place-items: center;
  min-width: 1.4rem; height: 1.4rem;
  padding: 0 0.35rem;
  font-family: var(--lx-mono);
  font-size: 0.7rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.docs-index__hero-meta {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  max-width: 640px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: clamp(1rem, 2vw, 1.5rem);
}
.docs-index__hero-meta li {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.25rem 1rem 0.25rem 0;
}
.docs-index__hero-meta strong {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--lx-blue-light);
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px var(--lx-blue-glow-soft);
}
.docs-index__hero-meta span {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ───────── Section heads ───────── */
.docs-index__section-head {
  max-width: 1100px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.docs-index__eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lx-blue);
}
.docs-index__section-title {
  font-family: var(--lx-font);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--lx-ink);
}
.docs-index__section-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 auto;
  color: var(--lx-text);
}

/* ───────── Library / product cards ───────── */
.docs-index__library {
  background: var(--lx-surface);
  padding: clamp(4rem, 7vw, 6.5rem) clamp(1.25rem, 5vw, 4rem);
}
.docs-index__catalog {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
@media (max-width: 720px) {
  .docs-index__catalog { grid-template-columns: 1fr; }
}

.docs-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, transparent 35%),
    var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-xl);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
/* Raise a card above its siblings while its version dropdown is open */
.docs-card:has(.is-open) { z-index: 5; }
.docs-card:focus-within { border-color: var(--lx-blue); }

.docs-card__title {
  position: relative; z-index: 1;
  font-family: var(--lx-font);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.7rem;
}
.docs-card__title-link { color: var(--lx-ink); text-decoration: none; outline: none; }
.docs-card__title-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.docs-card__title-link:hover { color: var(--lx-blue); }
.docs-card__title-link:focus-visible { text-decoration: underline; }

.docs-card__desc {
  position: relative; z-index: 1;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
  color: var(--lx-text);
}

.docs-card__foot {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--lx-border);
}
/* Latest version chip (left) */
.docs-card__latest {
  position: relative; z-index: 2;
  flex-shrink: 0;
  gap: 0.5rem;
  height: 2.1rem;
  padding: 0 0.85rem;
  box-sizing: border-box;
}
.docs-card__latest-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
  transition: background 180ms, box-shadow 180ms;
}
.docs-card__latest:hover .docs-card__latest-dot {
  background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.docs-card__latest-tag {
  font-family: var(--lx-font);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Version dropdown (right) — reuses the Dropdown Hyperscript behavior */
.docs-card__versions-dd { position: relative; margin-left: auto; z-index: 3; }
.docs-card__versions-trigger {
  display: inline-flex; align-items: center; gap: 0.45rem;
  height: 2.1rem;
  padding: 0 0.85rem;
  box-sizing: border-box;
  font-family: var(--lx-font);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-muted);
  background: transparent;
  border: 1px solid var(--lx-border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms var(--lx-ease), border-color 180ms, background 180ms;
}
.docs-card__versions-trigger:hover,
.docs-card__versions-dd.is-open .docs-card__versions-trigger {
  color: var(--lx-blue);
  border-color: var(--lx-blue-100);
  background: var(--lx-blue-50);
}
.docs-card__versions-trigger:focus-visible { outline: 2px solid var(--lx-blue); outline-offset: 2px; }
.docs-card__versions-count {
  display: inline-grid; place-items: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem;
  font-family: var(--lx-mono);
  font-size: 0.66rem;
  color: var(--lx-blue);
  background: var(--lx-blue-50);
  border: 1px solid var(--lx-blue-100);
  border-radius: 999px;
}
.docs-card__versions-caret { transition: transform 220ms var(--lx-ease); flex-shrink: 0; }
.docs-card__versions-dd.is-open .docs-card__versions-caret { transform: rotate(180deg); }

.docs-card__versions-menu {
  position: absolute;
  top: calc(100% + 0.5rem); right: 0;
  min-width: 13rem; max-height: 15rem; overflow-y: auto;
  display: none;
  padding: 0.35rem;
  background: #ffffff;
  background-clip: padding-box;
  border: 1px solid var(--lx-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
  z-index: 20;
}
[data-theme='dark'] .docs-card__versions-menu {
  background: #131f36;
  border-color: #243049;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.docs-card__versions-dd.is-open .docs-card__versions-menu {
  display: block;
  animation: docsVersionsIn 180ms var(--lx-ease);
}
@keyframes docsVersionsIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.docs-card__versions-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--lx-text);
  text-decoration: none;
}
.docs-card__versions-item:hover { background: var(--lx-blue-50); color: var(--lx-blue); }
.docs-card__versions-item:focus-visible { outline: 2px solid var(--lx-blue); outline-offset: -2px; }
.docs-card__versions-item.is-active {
  background: var(--lx-blue-50); color: var(--lx-blue); font-weight: 600;
}
.docs-card__versions-item-label { flex: 1; }
.docs-card__versions-item-state {
  font-family: var(--lx-font);
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.1rem 0.4rem; border-radius: 999px;
}
.docs-card__versions-item--unmaintained .docs-card__versions-item-state { background: rgba(251, 191, 36, 0.18); color: #b45309; }
.docs-card__versions-item--unreleased .docs-card__versions-item-state { background: rgba(129, 140, 248, 0.18); color: #4f46e5; }
[data-theme='dark'] .docs-card__versions-item--unmaintained .docs-card__versions-item-state { color: #fbbf24; }
[data-theme='dark'] .docs-card__versions-item--unreleased .docs-card__versions-item-state { color: #c4b5fd; }

.docs-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-family: var(--lx-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid var(--lx-blue-100);
  background: var(--lx-blue-50);
  color: var(--lx-blue);
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms, border-color 180ms, color 180ms, transform 180ms;
}
.docs-chip:hover {
  background: var(--lx-blue);
  border-color: var(--lx-blue);
  color: #fff;
  transform: translateY(-1px);
}
.docs-chip:focus-visible { outline: 2px solid var(--lx-blue); outline-offset: 2px; }

.docs-index__empty {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 0;
  text-align: center;
  color: var(--lx-muted);
}

/* ───────── Quick Start ───────── */
.docs-qs {
  position: relative;
  isolation: isolate;
  background: var(--lx-navy);
  color: #fff;
  padding: clamp(4rem, 7vw, 6.5rem) clamp(1.25rem, 5vw, 4rem);
  overflow: hidden;
}
.docs-qs__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(59, 130, 246, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}
.docs-qs__head {
  max-width: 1100px; margin: 0 auto clamp(2.5rem, 4vw, 3.5rem);
  text-align: center;
}
.docs-qs__eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--lx-blue-light);
}
.docs-qs__title {
  font-family: var(--lx-font); font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -0.03em;
  line-height: 1.1; margin: 0 0 1rem; color: #fff;
}
.docs-qs__lead {
  font-size: 1.05rem; line-height: 1.6;
  color: rgba(255, 255, 255, 0.7); max-width: 60ch; margin: 0 auto;
}

/* Pure-CSS product switcher */
.docs-qs__radio {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;       /* hidden but keyboard-focusable */
}
.docs-qs__switcher {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
  max-width: 1100px; margin: 0 auto clamp(2.5rem, 4vw, 3.5rem);
}
.docs-qs__tab {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.35rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: color 180ms, background 180ms, border-color 180ms, transform 180ms;
}
.docs-qs__tab:hover { color: #fff; border-color: rgba(59, 130, 246, 0.4); transform: translateY(-2px); }
.docs-qs__tab .bi { font-size: 1rem; color: var(--lx-blue-light); }
#docs-qs-collector:checked ~ .docs-qs__switcher label[for="docs-qs-collector"],
#docs-qs-te:checked ~ .docs-qs__switcher label[for="docs-qs-te"] {
  color: #fff; background: var(--lx-blue); border-color: var(--lx-blue);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}
#docs-qs-collector:checked ~ .docs-qs__switcher label[for="docs-qs-collector"] .bi,
#docs-qs-te:checked ~ .docs-qs__switcher label[for="docs-qs-te"] .bi { color: #fff; }
#docs-qs-collector:focus-visible ~ .docs-qs__switcher label[for="docs-qs-collector"],
#docs-qs-te:focus-visible ~ .docs-qs__switcher label[for="docs-qs-te"] {
  outline: 2px solid var(--lx-blue-light); outline-offset: 3px;
}

/* Panels */
.docs-qs__panels { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.docs-qs__panel { display: none; }
#docs-qs-collector:checked ~ .docs-qs__panels .docs-qs__panel[data-qs="collector"],
#docs-qs-te:checked ~ .docs-qs__panels .docs-qs__panel[data-qs="te"] {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  animation: docsQsFade 0.35s var(--lx-ease);
}
@keyframes docsQsFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 820px) {
  #docs-qs-collector:checked ~ .docs-qs__panels .docs-qs__panel[data-qs="collector"],
  #docs-qs-te:checked ~ .docs-qs__panels .docs-qs__panel[data-qs="te"] {
    grid-template-columns: 1fr;
  }
}

.docs-qs__panel-title {
  font-family: var(--lx-font); font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15;
  letter-spacing: -0.02em; margin: 0 0 1rem; color: #fff;
}
.docs-qs__panel-lead {
  font-size: 1rem; line-height: 1.65; color: rgba(255, 255, 255, 0.62);
  margin: 0 0 1.75rem; max-width: 34rem;
}
.docs-qs__access {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin: 0 0 1.25rem; padding: 1.25rem 1.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
}
.docs-qs__access div { display: flex; align-items: center; gap: 0.75rem; }
.docs-qs__access dt {
  flex: 0 0 4.5rem; margin: 0;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.42);
}
.docs-qs__access dd { margin: 0; }
.docs-qs__access code {
  font-family: var(--lx-mono); font-size: 0.8rem; color: #fff;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 6px; padding: 0.15rem 0.55rem;
}
.docs-qs__var { color: #fbbf24; font-style: italic; }
.docs-qs__hint {
  font-size: 0.75rem; color: rgba(255, 255, 255, 0.4);
  font-style: italic; margin: 0 0 1.5rem;
}
.docs-qs__doclink {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.9rem;
  color: var(--lx-blue-light); text-decoration: none;
  transition: color 180ms;
}
.docs-qs__doclink span { transition: transform 180ms; display: inline-block; }
.docs-qs__doclink:hover { color: #fff; }
.docs-qs__doclink:hover span { transform: translateX(4px); }

/* Terminal */
.docs-term {
  border-radius: 14px;
  background: #0b1429;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.7), 0 0 60px -20px rgba(59, 130, 246, 0.3);
  overflow: hidden;
}
.docs-term__bar {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.85rem 0.7rem 1.1rem;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.docs-term__dots { display: inline-flex; gap: 0.45rem; }
.docs-term__dots i { width: 11px; height: 11px; border-radius: 50%; }
.docs-term__dots i:nth-child(1) { background: #ff5f57; }
.docs-term__dots i:nth-child(2) { background: #febc2e; }
.docs-term__dots i:nth-child(3) { background: #28c840; }
.docs-term__name {
  font-family: var(--lx-mono); font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}
.docs-term__copy {
  margin-left: auto;
  font-family: var(--lx-font); font-size: 0.72rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: color 150ms, background 150ms, border-color 150ms;
}
.docs-term__copy:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.docs-term__code {
  margin: 0; padding: 1.4rem 1.5rem 1.6rem;
  font-family: var(--lx-mono); font-size: 0.8rem; line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  white-space: pre; overflow-x: auto; tab-size: 2;
}
.docs-term__code code { font: inherit; color: inherit; background: none; padding: 0; }
/* Syntax tokens — same palette as the public site */
.docs-term__code .tok-comment { color: rgba(255, 255, 255, 0.34); font-style: italic; }
.docs-term__code .tok-prompt  { color: var(--lx-blue-light); user-select: none; }
.docs-term__code .tok-cmd     { color: #fff; font-weight: 600; }
.docs-term__code .tok-flag    { color: #febc2e; }
.docs-term__code .tok-str     { color: #4ade80; }
.docs-term__code .tok-img     { color: var(--lx-blue-light); }
.docs-term__code .tok-key     { color: #93c5fd; }
.docs-term__code .tok-cont    { color: rgba(255, 255, 255, 0.3); }

/* ───────── Footer ───────── */
.docs-footer {
  position: relative;
  background: #18181B;
  color: #A1A1AA;
  padding: clamp(3rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem) 2rem;
}
.docs-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lx-blue), transparent);
}
.docs-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.docs-footer__logo { height: 42px; width: auto; margin-bottom: 1rem; display: block; }
.docs-footer__brand p {
  margin: 0;
  font-size: 0.8125rem;
  color: #71717A;
  line-height: 1.6;
  max-width: 36ch;
}
.docs-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}
.docs-footer__links a {
  font-size: 0.8125rem;
  color: #A1A1AA;
  text-decoration: none;
  transition: color 150ms var(--lx-ease);
}
.docs-footer__links a:hover { color: #fff; }
.docs-footer__bottom {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.docs-footer__bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: #71717A;
}
@media (max-width: 600px) {
  .docs-footer__inner { flex-direction: column; gap: 1.5rem; }
}

/* ───────── Reveal animation ───────── */
@media (prefers-reduced-motion: no-preference) {
  .docs-index__kicker,
  .docs-index__headline,
  .docs-index__lede,
  .docs-index__hero-actions,
  .docs-index__hero-meta {
    opacity: 0;
    transform: translateY(12px);
    animation: idxReveal 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  .docs-index__kicker       { animation-delay: 60ms; }
  .docs-index__headline     { animation-delay: 140ms; }
  .docs-index__lede         { animation-delay: 260ms; }
  .docs-index__hero-actions { animation-delay: 380ms; }
  .docs-index__hero-meta    { animation-delay: 500ms; }
}
@keyframes idxReveal {
  to { opacity: 1; transform: translateY(0); }
}
