/* docs.css — Stripe-style docs layout for /docs.
   Inherits design tokens (colors, spacing, glass) from landing.css. */

/* New / Updated badges in sidebar nav */
.docs-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.5;
}
.docs-badge-new {
  background: rgba(46, 204, 113, 0.18);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.docs-badge-updated {
  background: rgba(204, 169, 0, 0.18);
  color: #CCA900;
  border: 1px solid rgba(204, 169, 0, 0.35);
}

.docs-body { background: var(--bg); color: var(--text); }

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 32px;
  /* Left-aligned: sidebar pinned to the left edge, content fills the
     remaining width as the window grows. Mirrors the org-admin layout
     so docs feel native to the product, not a marketing site. */
  padding: 36px 24px 96px;
  align-items: flex-start;
}

/* ─── Sidebar ─── */
.docs-sidebar {
  position: sticky;
  top: 36px;
  align-self: start;
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  padding-right: 12px;
}
.docs-sidebar-nav {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-strong) transparent;
}
.docs-sidebar-nav::-webkit-scrollbar { width: 6px; }
.docs-sidebar-nav::-webkit-scrollbar-thumb { background: var(--accent-strong); border-radius: 3px; }

/* Docs brand block — sits above the search box, replaces the
   marketing-site nav. Same pin glyph as the org-admin sidebar
   (gold location-tracker silhouette), the centre dot pulses;
   wordmark links to the marketing site, "Docs" rides on the
   right in italics. */
.docs-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  /* The pulse ring expands beyond the dot's bounding box. Without
     overflow:visible the sidebar's own overflow:auto clips it to a
     small square. z-index lifts it above any adjacent elements so
     the ring paints over the search input's border if it reaches. */
  overflow: visible;
  position: relative;
  z-index: 10;
}
.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
  /* Lift above everything so the pulse ring paints over the
     search box border or any sibling that sits below. */
  position: relative;
  z-index: 20;
}
/* Live-cursor pulse — direct copy of .marker-pulse from
   animations.css (the gold dot we use on the live tracking map
   for Tereza's current position). Solid gold core + outer ring
   that scales out and fades on a 2.4s loop. The dot reserves a
   wider square via padding-box clear so the expanding ring has
   room to paint without crowding the wordmark. */
.docs-brand-pulse {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #CCA900;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(204,169,0,0.7);
  margin-right: 12px;
  z-index: 30;
}
.docs-brand-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid #CCA900;
  animation: docs-brand-pulse 2.4s ease-out infinite;
  will-change: transform, opacity;
  pointer-events: none;
  z-index: 30;
}
@keyframes docs-brand-pulse {
  0%   { transform: scale(1);   opacity: 0.85; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .docs-brand-pulse::after { animation: none; opacity: 0.45; transform: scale(1.6); }
}
.docs-brand-wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.2;
}
.docs-brand-tag {
  font-style: italic;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--accent);
  opacity: 0.9;
}
.docs-brand:hover .docs-brand-wordmark { color: var(--accent); }

/* Mobile-only burger — sits beside the brand, hidden on desktop. */
.docs-burger {
  display: none;
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  flex-shrink: 0;
}
.docs-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  margin: 5px auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.docs-search { position: relative; margin-bottom: 24px; }
.docs-search input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.docs-search input:focus {
  border-color: var(--accent-strong);
  background: rgba(255,255,255,0.06);
}
.docs-search input::placeholder { color: var(--faint); }
.docs-search-results {
  list-style: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 16px 32px -8px rgba(0,0,0,0.5);
}
.docs-search-results li a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  transition: background 0.15s ease;
}
.docs-search-results li a:hover { background: rgba(255,255,255,0.05); }
.docs-search-results li a small { color: var(--dim); font-size: 11.5px; }
.docs-search-group {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 8px;
}
.docs-search-empty {
  padding: 12px; font-size: 13px; color: var(--dim); list-style: none;
}

.docs-sidebar-nav { display: flex; flex-direction: column; gap: 18px; }
.docs-group h4 {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
  padding-left: 10px;
}
.docs-group ul { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.docs-group li a {
  display: block;
  padding: 6px 10px;
  font-size: 13.5px;
  color: var(--dim);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.docs-group li a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.docs-group li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.docs-sidebar-empty { color: var(--dim); font-size: 13px; padding: 12px; }

/* Pinned footer at the bottom of the sidebar (sits outside the nav
   scroll container so it stays visible regardless of scroll). */
.docs-sidebar-foot {
  margin-top: 18px;
  padding: 12px 10px 0;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.docs-sidebar-foot-version {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ─── Article ─── */
.docs-main { min-width: 0; }
.docs-article {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  max-width: 760px;
}
.docs-article h1 {
  font-size: clamp(28px, 2.6vw + 12px, 42px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 18px;
  font-weight: 700;
}
.docs-article h2 {
  font-size: clamp(22px, 1.6vw + 12px, 28px);
  letter-spacing: -0.01em;
  margin: 48px 0 14px;
  padding-top: 8px;
  font-weight: 600;
}
.docs-article h3 {
  font-size: 18px;
  margin: 32px 0 10px;
  font-weight: 600;
}
.docs-article p { color: var(--dim); margin-bottom: 16px; }
.docs-article small { display: block; line-height: 1.4; }
.docs-article p strong, .docs-article li strong { color: var(--text); font-weight: 600; }
.docs-article a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(204,169,0,0.4); text-underline-offset: 2px; }
.docs-article a:hover { text-decoration-color: var(--accent); }

.docs-article ul, .docs-article ol {
  color: var(--dim);
  margin: 0 0 18px 22px;
  padding: 0;
}
.docs-article li { margin-bottom: 6px; }
.docs-article li::marker { color: var(--accent); }

.docs-article pre {
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.docs-article :not(pre) > code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.88em;
  color: var(--accent);
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace;
}
.docs-article pre code { background: transparent; border: 0; padding: 0; color: inherit; font-family: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace; }

.docs-article blockquote {
  border-left: 2px solid var(--accent-strong);
  background: var(--accent-soft);
  padding: 12px 18px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  color: var(--text);
}
.docs-article blockquote p:last-child { margin-bottom: 0; }

.docs-article .statement-box {
  border: 1.5px solid var(--accent);
  background: linear-gradient(135deg, rgba(204,169,0,0.10) 0%, rgba(204,169,0,0.04) 100%);
  border-radius: 12px;
  padding: 28px 28px 24px;
  margin: 28px 0;
  position: relative;
}
.docs-article .statement-box::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 26px;
  width: 24px;
  height: 24px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/></svg>") no-repeat center / contain;
}
.docs-article .statement-box .statement-headline {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.docs-article .statement-box .statement-sub {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.docs-article .statement-box p { margin: 10px 0; }
.docs-article .statement-box p:last-child { margin-bottom: 0; }

.docs-article .mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.docs-article .mode-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s;
}
.docs-article .mode-card:hover { border-color: var(--accent-strong); }
.docs-article .mode-card strong { color: var(--accent); display: block; margin-bottom: 6px; font-size: 14px; }
.docs-article .mode-card span { color: var(--dim); font-size: 13px; line-height: 1.5; }

.docs-article .mode-card::before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  background-color: var(--accent);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.docs-article .mode-card--snap::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='13' r='8'/><circle cx='11' cy='13' r='4.5'/><circle cx='11' cy='13' r='1' fill='black' stroke='none'/><path d='M21 3 L12 12'/><path d='M17 11 L12 12 L13 7'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='13' r='8'/><circle cx='11' cy='13' r='4.5'/><circle cx='11' cy='13' r='1' fill='black' stroke='none'/><path d='M21 3 L12 12'/><path d='M17 11 L12 12 L13 7'/></svg>");
}
.docs-article .mode-card--remove::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/></svg>");
}
.docs-article .mode-card--jitter::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='6' r='1.8'/><circle cx='12' cy='4' r='1.8'/><circle cx='19' cy='9' r='1.8'/><circle cx='8' cy='14' r='1.8'/><circle cx='16' cy='17' r='1.8'/><circle cx='6' cy='20' r='1.8'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='6' r='1.8'/><circle cx='12' cy='4' r='1.8'/><circle cx='19' cy='9' r='1.8'/><circle cx='8' cy='14' r='1.8'/><circle cx='16' cy='17' r='1.8'/><circle cx='6' cy='20' r='1.8'/></svg>");
}
.docs-article .mode-card--coarsen::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='3' width='5' height='5' rx='0.5'/><rect x='9.5' y='3' width='5' height='5' rx='0.5'/><rect x='16' y='3' width='5' height='5' rx='0.5'/><rect x='3' y='9.5' width='5' height='5' rx='0.5'/><rect x='9.5' y='9.5' width='5' height='5' rx='0.5'/><rect x='16' y='9.5' width='5' height='5' rx='0.5'/><rect x='3' y='16' width='5' height='5' rx='0.5'/><rect x='9.5' y='16' width='5' height='5' rx='0.5'/><rect x='16' y='16' width='5' height='5' rx='0.5'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='3' width='5' height='5' rx='0.5'/><rect x='9.5' y='3' width='5' height='5' rx='0.5'/><rect x='16' y='3' width='5' height='5' rx='0.5'/><rect x='3' y='9.5' width='5' height='5' rx='0.5'/><rect x='9.5' y='9.5' width='5' height='5' rx='0.5'/><rect x='16' y='9.5' width='5' height='5' rx='0.5'/><rect x='3' y='16' width='5' height='5' rx='0.5'/><rect x='9.5' y='16' width='5' height='5' rx='0.5'/><rect x='16' y='16' width='5' height='5' rx='0.5'/></svg>");
}
.docs-article .mode-card--delay::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='14' r='7'/><path d='M12 11v3l2 2'/><path d='M9 2h6'/><path d='M12 2v3'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='14' r='7'/><path d='M12 11v3l2 2'/><path d='M9 2h6'/><path d='M12 2v3'/></svg>");
}
.docs-article .mode-card--cloak::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='5' cy='19' r='2' fill='black'/><circle cx='19' cy='5' r='2' fill='black'/><path d='M7 17 L17 7' stroke-dasharray='2 2.5'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='5' cy='19' r='2' fill='black'/><circle cx='19' cy='5' r='2' fill='black'/><path d='M7 17 L17 7' stroke-dasharray='2 2.5'/></svg>");
}

.docs-article .mode-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.docs-article .mode-h2::before {
  content: "";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background-color: var(--accent);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}
.docs-article .mode-h2--snap::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='13' r='8'/><circle cx='11' cy='13' r='4.5'/><circle cx='11' cy='13' r='1' fill='black' stroke='none'/><path d='M21 3 L12 12'/><path d='M17 11 L12 12 L13 7'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='13' r='8'/><circle cx='11' cy='13' r='4.5'/><circle cx='11' cy='13' r='1' fill='black' stroke='none'/><path d='M21 3 L12 12'/><path d='M17 11 L12 12 L13 7'/></svg>");
}
.docs-article .mode-h2--remove::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/></svg>");
}
.docs-article .mode-h2--jitter::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='6' r='1.8'/><circle cx='12' cy='4' r='1.8'/><circle cx='19' cy='9' r='1.8'/><circle cx='8' cy='14' r='1.8'/><circle cx='16' cy='17' r='1.8'/><circle cx='6' cy='20' r='1.8'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='5' cy='6' r='1.8'/><circle cx='12' cy='4' r='1.8'/><circle cx='19' cy='9' r='1.8'/><circle cx='8' cy='14' r='1.8'/><circle cx='16' cy='17' r='1.8'/><circle cx='6' cy='20' r='1.8'/></svg>");
}
.docs-article .mode-h2--coarsen::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='3' width='5' height='5' rx='0.5'/><rect x='9.5' y='3' width='5' height='5' rx='0.5'/><rect x='16' y='3' width='5' height='5' rx='0.5'/><rect x='3' y='9.5' width='5' height='5' rx='0.5'/><rect x='9.5' y='9.5' width='5' height='5' rx='0.5'/><rect x='16' y='9.5' width='5' height='5' rx='0.5'/><rect x='3' y='16' width='5' height='5' rx='0.5'/><rect x='9.5' y='16' width='5' height='5' rx='0.5'/><rect x='16' y='16' width='5' height='5' rx='0.5'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='3' width='5' height='5' rx='0.5'/><rect x='9.5' y='3' width='5' height='5' rx='0.5'/><rect x='16' y='3' width='5' height='5' rx='0.5'/><rect x='3' y='9.5' width='5' height='5' rx='0.5'/><rect x='9.5' y='9.5' width='5' height='5' rx='0.5'/><rect x='16' y='9.5' width='5' height='5' rx='0.5'/><rect x='3' y='16' width='5' height='5' rx='0.5'/><rect x='9.5' y='16' width='5' height='5' rx='0.5'/><rect x='16' y='16' width='5' height='5' rx='0.5'/></svg>");
}
.docs-article .mode-h2--delay::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='14' r='7'/><path d='M12 11v3l2 2'/><path d='M9 2h6'/><path d='M12 2v3'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='14' r='7'/><path d='M12 11v3l2 2'/><path d='M9 2h6'/><path d='M12 2v3'/></svg>");
}
.docs-article .mode-h2--cloak::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='5' cy='19' r='2' fill='black'/><circle cx='19' cy='5' r='2' fill='black'/><path d='M7 17 L17 7' stroke-dasharray='2 2.5'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='5' cy='19' r='2' fill='black'/><circle cx='19' cy='5' r='2' fill='black'/><path d='M7 17 L17 7' stroke-dasharray='2 2.5'/></svg>");
}

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
.docs-article th, .docs-article td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.docs-article th { color: var(--text); font-weight: 600; background: rgba(255,255,255,0.03); }
.docs-article td { color: var(--dim); }

/* Pygments dark — palette tuned for the brand (gold accents,
   Dracula-esque rest). Applied to <div class="codehilite"><pre>...
   blocks emitted by python-markdown's codehilite extension. */
.docs-article .codehilite {
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 16px 0;
  overflow-x: auto;
}
.docs-article .codehilite pre {
  background: transparent;
  border: 0;
  margin: 0;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #e6e6ec;
}
.codehilite .hll { background-color: rgba(204,169,0,0.08); }
/* Comments */
.codehilite .c, .codehilite .c1, .codehilite .cm, .codehilite .cp, .codehilite .cs { color: #6272a4; font-style: italic; }
/* Keywords */
.codehilite .k, .codehilite .kd, .codehilite .kn, .codehilite .kp, .codehilite .kr, .codehilite .kt { color: #ff79c6; }
.codehilite .kc { color: #bd93f9; }
/* Operators / punctuation */
.codehilite .o, .codehilite .ow { color: #ff79c6; }
.codehilite .p { color: #e6e6ec; }
/* Strings — every flavour */
.codehilite .s, .codehilite .s1, .codehilite .s2, .codehilite .sb, .codehilite .sc,
.codehilite .sd, .codehilite .se, .codehilite .sh, .codehilite .si, .codehilite .sx,
.codehilite .sr, .codehilite .ss, .codehilite .dl { color: #f1fa8c; }
/* Numbers */
.codehilite .m, .codehilite .mi, .codehilite .mf, .codehilite .mh, .codehilite .mo, .codehilite .mb { color: #bd93f9; }
/* Names */
.codehilite .n  { color: #e6e6ec; }
.codehilite .na { color: #50fa7b; }                  /* attribute */
.codehilite .nb { color: #8be9fd; font-style: italic; } /* builtin */
.codehilite .nc { color: #50fa7b; font-weight: 600; }/* class */
.codehilite .nd { color: #ffb86c; }                  /* decorator */
.codehilite .ne { color: #ff5555; }                  /* exception */
.codehilite .nf { color: #50fa7b; }                  /* function */
.codehilite .ni { color: #e6e6ec; }
.codehilite .nl { color: #8be9fd; }                  /* label */
.codehilite .nn { color: #e6e6ec; }                  /* namespace */
.codehilite .nt { color: #ff79c6; }                  /* tag */
.codehilite .nv, .codehilite .vc, .codehilite .vg, .codehilite .vi { color: #f8f8f2; font-style: italic; }
.codehilite .nx { color: var(--accent); }
/* Generic */
.codehilite .gd { color: #ff5555; background: rgba(255,85,85,0.08); }
.codehilite .ge { font-style: italic; }
.codehilite .gh { color: var(--accent); font-weight: 600; }
.codehilite .gi { color: #50fa7b; background: rgba(80,250,123,0.07); }
.codehilite .gp { color: var(--accent-strong); }       /* prompt */
.codehilite .gs { font-weight: 600; }
.codehilite .gu { color: var(--accent); font-weight: 600; }
/* Errors */
.codehilite .err { color: #ff5555; }

/* Transport line-style grid (used in /docs/transport-modes). Two
   columns: SVG sample on the left, label + description on the
   right. Generous vertical spacing so each style sits on its own row. */
.ts-style-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 18px;
  align-items: center;
  margin: 18px 0 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ts-style-grid svg { display: block; }
.ts-style-grid span { font-size: 14px; color: var(--text); line-height: 1.5; }
.ts-style-grid span strong { color: var(--accent); font-weight: 600; }

.docs-edge { border: 0; border-top: 1px solid var(--border); margin: 48px 0 24px; }
.docs-foot { font-size: 13px; color: var(--faint); }
.docs-foot a { color: var(--dim); }

/* ─── Right TOC ─── */
.docs-toc {
  position: sticky;
  top: 36px;
  align-self: start;
  font-size: 12.5px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.docs-toc h4 {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.docs-toc ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.docs-toc li a {
  color: var(--dim);
  display: block;
  line-height: 1.4;
  transition: color 0.15s ease;
}
.docs-toc li a:hover { color: var(--accent); }
.docs-toc li.lvl-3 { padding-left: 12px; font-size: 12px; }

/* ─── Index page ─── */
.docs-index-list {
  list-style: none;
  margin: 0 0 32px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.docs-index-list li {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.2s ease;
}
.docs-index-list li:hover { border-color: var(--accent-strong); }
.docs-index-list a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.docs-index-list p { color: var(--dim); font-size: 13px; margin: 6px 0 0; }

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .docs-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 720px) {
  .docs-shell {
    grid-template-columns: 1fr;
    padding: 24px 16px 64px;
    gap: 0;
  }
  .docs-burger { display: block; }
  /* On mobile, the sidebar collapses into a drawer toggled by the
     burger; the brand stays visible at the top of the page header. */
  .docs-sidebar {
    position: static;
    max-height: none;
  }
  .docs-sidebar .docs-search,
  .docs-sidebar .docs-sidebar-nav {
    display: none;
  }
  .docs-sidebar.is-open .docs-search,
  .docs-sidebar.is-open .docs-sidebar-nav {
    display: block;
  }
  .docs-sidebar.is-open .docs-sidebar-nav {
    margin-top: 16px;
  }
}
