/* docs-rich.css — the lively layer on top of docs.css.
   Icons, animated hero/hub landing, callout variants, inline demos, scroll
   motion, reading progress, prev/next pager. All self-hosted: inline SVG +
   CSS animation + a little vanilla JS. No CDN, no icon font. Loads AFTER
   docs.css so it can refine the calmer base. */

:root {
  --docs-accent: var(--accent, #4f9cff);
  --docs-accent-2: #8a7bff;
  --docs-glow: rgba(79, 156, 255, 0.5);
}

/* ── Text selection ───────────────────────────────────────────────────────
   The site-wide reset (base.css) sets `user-select: none` on everything to
   keep the marketing/3D pages from selecting on drag. Docs are for reading, so
   re-enable selection across the article body. The animated demo stages and
   interactive playgrounds stay non-selectable so a click-drag plays with them
   instead of highlighting; their captions sit outside those stages and stay
   selectable. */
.docs-article,
.docs-article * {
  -webkit-user-select: text;
  user-select: text;
}
.docs-demo-stage,
.docs-demo-stage *,
.docs-playground,
.docs-playground * {
  -webkit-user-select: none;
  user-select: none;
}

/* ── Icons ────────────────────────────────────────────────────────────── */
.docs-ico {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.14em;
}

/* ── Reading progress bar ─────────────────────────────────────────────── */
.docs-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.docs-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--docs-accent), var(--docs-accent-2));
  box-shadow: 0 0 12px var(--docs-glow);
  transition: width 0.08s linear;
}

/* ── Sidebar nav with icons ───────────────────────────────────────────── */
.docs-nav-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.docs-nav-section-ico { font-size: 15px; color: var(--text-primary, #e6e6e9); }
.docs-nav a {
  display: flex !important;
  align-items: center;
  gap: 9px;
}
.docs-nav-ico {
  font-size: 15px;
  color: var(--text-secondary, #9aa0ab);
  transition: color 0.15s ease, transform 0.15s ease;
}
.docs-nav a:hover .docs-nav-ico { color: var(--text-primary, #e6e6e9); }
.docs-nav a.is-active .docs-nav-ico { color: var(--docs-accent); }
.docs-nav a span { min-width: 0; }

/* ── Eyebrow with icon ────────────────────────────────────────────────── */
.docs-article .docs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.docs-article .docs-eyebrow .docs-ico { font-size: 14px; }

/* ── Landing hero ─────────────────────────────────────────────────────── */
.docs-article--hub { max-width: 1080px; }
.docs-main:has(.docs-article--hub) { padding-top: 72px; }

.docs-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  background:
    radial-gradient(120% 140% at 12% -10%, rgba(79, 156, 255, 0.16), transparent 55%),
    radial-gradient(90% 120% at 100% 0%, rgba(138, 123, 255, 0.13), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  padding: 60px 48px 56px;
  margin: 8px 0 40px;
}
.docs-hero-content { position: relative; z-index: 2; max-width: 680px; }
.docs-hero .docs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--docs-accent);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.docs-article .docs-hero-title {
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: -0.026em;
  font-weight: 700;
  margin: 0 0 18px;
  border: 0;
  padding: 0;
  color: #f4f6fa; /* safe fallback so the title is never invisible */
}
/* Enhance with gradient text only where text-clipping is supported. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .docs-article .docs-hero-title {
    background: linear-gradient(180deg, #fff, #c8d2e6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.docs-article .docs-hero-lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text-secondary, #a6abb5);
  margin: 0 0 30px;
}
.docs-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.14));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #e6e6e9);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.docs-btn .docs-ico { font-size: 16px; }
.docs-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.22); }
.docs-btn--primary {
  background: linear-gradient(180deg, var(--docs-accent), #3f86ee);
  border-color: transparent;
  color: #06121f;
  box-shadow: 0 6px 24px -8px var(--docs-glow);
}
.docs-btn--primary:hover { box-shadow: 0 10px 30px -8px var(--docs-glow); background: linear-gradient(180deg, #62a7ff, var(--docs-accent)); }

/* Win over docs.css `.docs-article a` (accent color + hover underline) for
   component links — buttons, hub/feature cards, and the pager. */
.docs-article .docs-btn,
.docs-article .docs-btn:hover,
.docs-article .docs-hub-card,
.docs-article .docs-hub-card:hover,
.docs-article .docs-card,
.docs-article .docs-card:hover,
.docs-article .docs-pager-cell,
.docs-article .docs-pager-cell:hover { text-decoration: none; }
.docs-article .docs-btn,
.docs-article .docs-btn:hover { color: var(--text-primary, #e6e6e9); }
.docs-article .docs-btn--primary,
.docs-article .docs-btn--primary:hover { color: #06121f; }

/* animated hero decor: drifting orbit rings + dot-grid */
.docs-hero-decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.docs-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 100% at 80% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 100% at 80% 0%, #000 0%, transparent 70%);
  opacity: 0.7;
}
.docs-hero-orbit {
  position: absolute;
  top: -40%;
  right: -8%;
  border-radius: 50%;
  border: 1px solid rgba(79, 156, 255, 0.16);
  animation: docs-orbit-spin 24s linear infinite;
}
.docs-hero-orbit--1 { width: 360px; height: 360px; }
.docs-hero-orbit--2 { width: 540px; height: 540px; top: -55%; right: -16%; border-color: rgba(138, 123, 255, 0.13); animation-duration: 38s; animation-direction: reverse; }
.docs-hero-orbit--3 { width: 720px; height: 720px; top: -70%; right: -24%; border-color: rgba(79, 156, 255, 0.08); animation-duration: 52s; }
.docs-hero-orbit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--docs-accent);
  box-shadow: 0 0 14px 2px var(--docs-glow);
}
.docs-hero-orbit--2::before { background: var(--docs-accent-2); box-shadow: 0 0 14px 2px rgba(138, 123, 255, 0.55); }
@keyframes docs-orbit-spin { to { transform: rotate(360deg); } }

/* ── Hub category cards ───────────────────────────────────────────────── */
.docs-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin: 0 0 48px;
}
.docs-hub-card {
  position: relative;
  display: block;
  padding: 22px 22px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  background: rgba(255, 255, 255, 0.022);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.docs-hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 90% at 0% 0%, rgba(79, 156, 255, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.docs-hub-card:hover { transform: translateY(-3px); border-color: rgba(79, 156, 255, 0.4); background: rgba(255, 255, 255, 0.04); }
.docs-hub-card:hover::before { opacity: 1; }
.docs-hub-card-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 21px;
  color: var(--docs-accent);
  background: rgba(79, 156, 255, 0.12);
  border: 1px solid rgba(79, 156, 255, 0.22);
  margin-bottom: 15px;
}
.docs-hub-card-go {
  position: absolute;
  top: 24px;
  right: 22px;
  font-size: 17px;
  color: var(--text-muted, #6b6f78);
  transition: transform 0.2s ease, color 0.2s ease;
}
.docs-hub-card:hover .docs-hub-card-go { transform: translate(3px, -3px); color: var(--docs-accent); }
.docs-article .docs-hub-card-title { position: relative; display: block; font-size: 17px; font-weight: 650; color: var(--text-primary, #f3f3f5); margin: 0 0 6px; padding: 0; border: 0; scroll-margin: 0; }
.docs-article .docs-hub-card-blurb { position: relative; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary, #a6abb5); margin: 0 0 14px; }
.docs-hub-card-links { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.docs-hub-card-links span {
  font-size: 11.5px;
  color: var(--text-muted, #8a8f98);
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline, rgba(230, 230, 233, 0.07));
}
.docs-hub-prose { max-width: 752px; }
.docs-hub-prose h2:first-child { border-top: none; margin-top: 8px; padding-top: 0; }

/* ── In-content cards (::::cards / :::card) ───────────────────────────── */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.docs-card {
  display: block;
  padding: 16px;
  border-radius: 13px;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  background: rgba(255, 255, 255, 0.022);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.docs-card:hover { transform: translateY(-2px); border-color: rgba(79, 156, 255, 0.38); background: rgba(255, 255, 255, 0.04); }
.docs-card-icon { display: inline-flex; font-size: 19px; color: var(--docs-accent); margin-bottom: 10px; }
.docs-card-title { display: block; font-size: 14.5px; font-weight: 620; color: var(--text-primary, #ecedf0); margin-bottom: 5px; }
.docs-article .docs-card-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary, #a6abb5); }

/* ── Callout variants (icons + accent rails) ──────────────────────────── */
.docs-callout {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.025);
  border-left-width: 3px;
}
.docs-callout-icon { display: inline-flex; font-size: 16px; margin-top: 1px; }
.docs-callout-title { font-weight: 650; color: var(--text-primary, #e6e6e9) !important; margin: 0 0 4px !important; }
.docs-callout--tip { border-left-color: #32d49e; background: rgba(50, 212, 158, 0.06); }
.docs-callout--tip .docs-callout-icon { color: #32d49e; }
.docs-callout--note { border-left-color: #8a8f98; background: rgba(255, 255, 255, 0.03); }
.docs-callout--note .docs-callout-icon { color: #aab1bd; }
.docs-callout--info { border-left-color: var(--docs-accent); background: rgba(79, 156, 255, 0.06); }
.docs-callout--info .docs-callout-icon { color: var(--docs-accent); }
.docs-callout--success { border-left-color: #32d49e; background: rgba(50, 212, 158, 0.06); }
.docs-callout--success .docs-callout-icon { color: #32d49e; }
.docs-callout--warn { border-left-color: #fb923c; background: rgba(251, 146, 60, 0.07); }
.docs-callout--warn .docs-callout-icon { color: #fb923c; }
.docs-callout--danger { border-left-color: #f0556a; background: rgba(240, 85, 106, 0.07); }
.docs-callout--danger .docs-callout-icon { color: #f0556a; }

/* Filename header on code blocks */
.docs-code-lang { display: inline-flex; align-items: center; gap: 6px; }
.docs-code-fileico { font-size: 13px; color: var(--docs-accent); }

/* ── Keyboard keys ────────────────────────────────────────────────────── */
.docs-article kbd {
  font-family: var(--docs-mono);
  font-size: 0.8em;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  color: #dfe5f0;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1.5px 0 rgba(255, 255, 255, 0.08) inset, 0 1.5px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* ── Code head with copy icon ─────────────────────────────────────────── */
.docs-code-copy { display: inline-flex; align-items: center; gap: 6px; }
.docs-code-copy .docs-ico { font-size: 13px; }

/* ── Inline animated demos ────────────────────────────────────────────── */
.docs-demo { margin: 0 0 26px; }
.docs-demo-stage {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  background:
    radial-gradient(130% 130% at 0% 0%, rgba(255, 255, 255, 0.045), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(255, 255, 255, 0.022), transparent 50%),
    var(--docs-code-bg, #101113);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 24px 48px -32px #000;
  overflow: hidden;
  min-height: 190px;
}
.docs-demo-caption {
  max-width: 600px;
  margin: 9px auto 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted, #8a8f98);
  text-align: center;
}
.docs-demo-caption code { white-space: nowrap; }
/* One-shot border-light sweep, drawn from the chip around the panel when interaction is enabled. */
.pg-sweep-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 4; }
.pg-sweep-edge {
  fill: none;
  stroke: #4f9cff;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(79, 156, 255, 0.7));
}

/* Interactive toggle chip: top-right of a playground stage. Click to enable/disable the
   panel's controls; the label flips "Click to interact" <-> "Interaction enabled". */
.pg-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 9px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fc0ee;
  background: rgba(79, 156, 255, 0.12);
  border: 1px solid rgba(79, 156, 255, 0.3);
  border-radius: 999px;
  padding: 4px 9px 4px 7px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pg-badge:hover { background: rgba(79, 156, 255, 0.2); border-color: rgba(79, 156, 255, 0.5); }
.pg-badge.is-on {
  color: #8fe7c6;
  background: rgba(50, 212, 158, 0.14);
  border-color: rgba(50, 212, 158, 0.45);
}
.pg-badge .pg-cur { display: inline-flex; }
.pg-badge svg {
  width: 11px;
  height: 11px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* while interaction is OFF a click anywhere turns it on, so the whole panel invites a click */
.uv-stage.is-locked, .pm-stage.is-locked { cursor: pointer; }
.uv-stage.is-locked .pg-badge, .pm-stage.is-locked .pg-badge { cursor: pointer; }

/* Playground caption: small/muted like a demo caption, constrained to the panel width and
   pulled tight beneath it so the two read as one unit. Needs `.docs-article p` specificity
   to beat the default article-paragraph styling. */
.docs-article p.docs-pg-caption {
  max-width: 600px;
  margin: 9px auto 26px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted, #8a8f98);
  text-align: center;
}

/* ── Prev / next pager ────────────────────────────────────────────────── */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--border-hairline, rgba(230, 230, 233, 0.08));
}
.docs-pager-cell {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 18px;
  border-radius: 13px;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
a.docs-pager-cell:hover { border-color: rgba(79, 156, 255, 0.4); background: rgba(255, 255, 255, 0.03); transform: translateY(-2px); }
.docs-pager-cell--next { text-align: right; align-items: flex-end; }
.docs-pager-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted, #6b6f78); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.docs-pager-arrow { font-size: 14px; }
.docs-pager-arrow--prev { transform: rotate(180deg); }
.docs-pager-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text-primary, #ecedf0); }
.docs-pager-ico { font-size: 15px; color: var(--docs-accent); }
.docs-pager-cell:empty { border: 0; }

/* ── Scroll-reveal motion ─────────────────────────────────────────────── */
.docs-reveal-init { opacity: 0; transform: translateY(16px); }
.docs-reveal-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .docs-reveal-init { opacity: 1; transform: none; }
  .docs-hero-orbit { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .docs-hero { padding: 40px 26px 38px; border-radius: 18px; }
  .docs-hero-title { font-size: 38px; }
  .docs-hero-lead { font-size: 16.5px; }
  .docs-pager { grid-template-columns: 1fr; }
}

/* ── ⌘K search ────────────────────────────────────────────────────────── */
.docs-search-trigger {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 0 0 20px;
  padding: 8px 11px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  background: rgba(255, 255, 255, 0.025); color: var(--text-muted, #8a8f98);
  font: inherit; font-size: 13.5px; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.docs-search-trigger:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); color: var(--text-secondary, #c7ccd6); }
.docs-search-trigger-ico { width: 15px; height: 15px; flex: none; }
.docs-search-trigger-label { flex: 1; text-align: left; }
.docs-search-kbd {
  font: 600 10.5px/1 var(--docs-mono, ui-monospace, monospace); letter-spacing: 0.02em;
  color: var(--text-muted, #8a8f98); background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 5px; padding: 3px 6px;
}

.docs-search-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: center; align-items: flex-start;
  padding: 11vh 18px 18px; background: rgba(6, 7, 10, 0.62); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.16s ease, visibility 0.16s ease;
}
.docs-search-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.docs-search-panel {
  width: min(580px, 94vw); max-height: 72vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--docs-code-bg, #101113); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px; box-shadow: 0 24px 70px -20px #000, 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transform: translateY(-8px) scale(0.99); transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.docs-search-overlay.is-open .docs-search-panel { transform: none; }
.docs-search-inputrow { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.docs-search-ico { width: 18px; height: 18px; flex: none; color: var(--accent, #4f9cff); }
.docs-search-input { flex: 1; background: none; border: none; outline: none; color: var(--text-primary, #f3f3f5); font: 500 16px/1.3 Inter, system-ui, sans-serif; }
.docs-search-input::placeholder { color: var(--text-muted, #6b7180); }
.docs-search-esc { font: 600 10px/1 var(--docs-mono, ui-monospace, monospace); text-transform: uppercase; color: var(--text-muted, #8a8f98); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 5px; padding: 4px 6px; }
.docs-search-results { overflow-y: auto; padding: 8px; min-height: 60px; }
.docs-search-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted, #6b7180); padding: 8px 10px 6px; }
.docs-search-empty { padding: 26px 12px; text-align: center; color: var(--text-muted, #8a8f98); font-size: 14px; }
.docs-search-hit {
  display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 9px;
  text-decoration: none; color: var(--text-secondary, #c7ccd6); scroll-margin: 8px;
}
.docs-search-hit.is-active { background: rgba(79, 156, 255, 0.12); }
.docs-search-hit-ico { width: 16px; height: 16px; flex: none; color: var(--text-muted, #8a8f98); }
.docs-search-hit.is-active .docs-search-hit-ico { color: var(--accent, #4f9cff); }
.docs-search-hit-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.docs-search-hit-title { font-size: 14px; font-weight: 550; color: var(--text-primary, #eef1f6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-search-hit-crumb { font-size: 11.5px; color: var(--text-muted, #7a808c); }
.docs-search-hit-ex { font-size: 11.5px; color: var(--text-muted, #8a8f98); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.docs-search-hit-go { font-size: 13px; color: var(--text-muted, #6b7180); opacity: 0; flex: none; }
.docs-search-hit.is-active .docs-search-hit-go { opacity: 1; }
.docs-search-results mark { background: rgba(79, 156, 255, 0.26); color: inherit; border-radius: 2px; }
.docs-search-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 11.5px; color: var(--text-muted, #6b7180); }
.docs-search-foot kbd { font: 600 10px/1 var(--docs-mono, ui-monospace, monospace); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 4px; padding: 2px 5px; margin: 0 1px; }

/* ── Interactive playgrounds ──────────────────────────────────────────── */
.docs-playground.pg-editor {
  margin: 0 0 26px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-color, rgba(230, 230, 233, 0.1));
  background: var(--docs-code-bg, #101113); box-shadow: 0 16px 40px -28px #000;
}
.pg-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 12.5px; color: var(--text-secondary, #c7ccd6); }
.pg-head svg { width: 14px; height: 14px; flex: none; color: var(--text-muted, #8a8f98); }
.pg-name { font-weight: 600; }
.pg-hint { margin-left: auto; font-size: 11.5px; color: var(--text-muted, #6b7180); }
.pg-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 230px; }
.pg-src {
  border: none; outline: none; resize: none; padding: 16px; background: #0c0c0e; color: #c7ccd6;
  font: 400 13px/1.65 var(--docs-mono, ui-monospace, "JetBrains Mono", monospace);
  border-right: 1px solid rgba(255, 255, 255, 0.06); tab-size: 2;
}
.pg-src:focus { box-shadow: inset 2px 0 0 var(--accent, #4f9cff); }
.pg-preview { padding: 14px 18px; overflow-y: auto; color: var(--text-secondary, #c7ccd6); font-size: 14px; line-height: 1.6; }
.pg-preview > :first-child { margin-top: 0; }
.pg-h1 { font-size: 22px; font-weight: 700; color: #f3f3f5; margin: 6px 0 12px; letter-spacing: -0.01em; }
.pg-h2 { font-size: 18px; font-weight: 650; color: #eef1f6; margin: 18px 0 10px; }
.pg-h3 { font-size: 15px; font-weight: 650; color: #eef1f6; margin: 16px 0 8px; }
.pg-h4 { font-size: 13.5px; font-weight: 650; color: #dfe5f0; margin: 14px 0 6px; }
.pg-preview p { margin: 0 0 12px; }
.pg-preview strong { color: #eef1f6; font-weight: 650; }
.pg-code { font: 0.86em var(--docs-mono, ui-monospace, monospace); background: rgba(255, 255, 255, 0.07); border-radius: 4px; padding: 1px 5px; color: #e6c07a; }
.pg-pre { background: #0c0c0e; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 8px; padding: 11px 13px; overflow-x: auto; margin: 0 0 12px; }
.pg-pre code { font: 12.5px/1.6 var(--docs-mono, ui-monospace, monospace); color: #c7ccd6; }
.pg-list { margin: 0 0 12px; padding: 0; list-style: none; }
.pg-list li { margin: 0 0 6px; }
.pg-list > li:not(.pg-task) { padding-left: 18px; position: relative; }
.pg-list > li:not(.pg-task)::before { content: ""; position: absolute; left: 4px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted, #6b7180); }
.pg-task { display: flex; align-items: flex-start; gap: 9px; }
.pg-check { appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; margin: 2px 0 0; border-radius: 5px; border: 1.6px solid rgba(255, 255, 255, 0.28); background: transparent; cursor: pointer; position: relative; transition: background 0.12s ease, border-color 0.12s ease; }
.pg-check:checked { background: var(--accent, #4f9cff); border-color: var(--accent, #4f9cff); }
.pg-check:checked::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.pg-done { color: var(--text-muted, #7a808c); text-decoration: line-through; }
.pg-wikilink { color: var(--accent, #4f9cff); background: rgba(79, 156, 255, 0.13); border: 1px solid rgba(79, 156, 255, 0.28); border-radius: 6px; padding: 0 6px; font-size: 0.93em; }
.pg-link { color: var(--accent, #4f9cff); text-decoration: none; border-bottom: 1px solid rgba(79, 156, 255, 0.35); }
.pg-quote { margin: 0 0 12px; padding: 2px 0 2px 13px; border-left: 3px solid rgba(255, 255, 255, 0.14); color: var(--text-muted, #9aa0ab); }
.pg-callout { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 11px 13px; border-radius: 9px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-left: 3px solid var(--accent, #4f9cff); }
.pg-callout--tip { border-left-color: #4f9cff; } .pg-callout--warning { border-left-color: #f6b44a; } .pg-callout--danger { border-left-color: #f0556a; } .pg-callout--success { border-left-color: #32d49e; }
.pg-callout-head { font-weight: 650; color: #eef1f6; font-size: 13.5px; }
.pg-callout-body { font-size: 13px; color: var(--text-secondary, #b8bdc7); }

@media (max-width: 720px) {
  .pg-body { grid-template-columns: 1fr; }
  .pg-src { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.06); min-height: 150px; }
  .pg-hint { display: none; }
}
