/* ── BREADCRUMBS ── */
.breadcrumb-outer {
  max-width: 1440px; margin: 0 auto; padding: 20px 40px 0;
}
@media (max-width: 860px) { .breadcrumb-outer { padding: 16px 20px 0; } }
@media (max-width: 500px) { .breadcrumb-outer { padding: 16px 16px 0; } }
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--text3);
  margin-bottom: 32px; list-style: none;
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before {
  content: '/';
  color: var(--text2);
  font-size: 13px;
  line-height: 1;
  opacity: 0.5;
}
.breadcrumb a {
  color: var(--lavender);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
  font-weight: 500;
}
.breadcrumb a:hover { text-decoration-color: var(--text); }
.breadcrumb [aria-current="page"] {
  color: var(--text2);
  font-weight: 400;
  cursor: default;
}

[data-theme="light"] .breadcrumb a { color: var(--lavender); }
[data-theme="light"] .breadcrumb a:hover { text-decoration-color: var(--text); }
[data-theme="light"] .breadcrumb [aria-current="page"] { color: var(--text3); }
[data-theme="light"] .breadcrumb li + li::before { color: var(--text3); opacity: 0.7; }

/* ── LIGHT THEME OVERRIDES ── */
[data-theme="light"] {
  --bg:       #f7f8fc;
  --bg2:      #edf0f7;
  --bg3:      #e4e8f2;
  --violet:   #6b3a9a;
  --violet-m: #7a52b0;
  --lavender: #5a3498;
  --amber:    #a05800;
  --text:     #111827;
  --text2:    #374151;
  --text3:    #6b7280;
  --eggshell: #2a2520;
  --border:   rgba(107,58,154,0.2);
  --border2:  rgba(107,58,154,0.12);
}

[data-theme="light"] body::before { display: none; }
[data-theme="light"] .docs-nav { background: rgba(247,248,252,0.95); border-bottom-color: var(--border2); }
[data-theme="light"] .code-block { background: #e8ebf4; border-color: var(--border); }
[data-theme="light"] .code-block code { color: #5a3498; }
[data-theme="light"] .code-block code .c { color: var(--text3); }
[data-theme="light"] .code-block code .p { color: #a05800; }
[data-theme="light"] .code-block code .k { color: #0369a1; }
[data-theme="light"] .code-block code .v { color: #166534; }
[data-theme="light"] .example-card { background: #edf0f7; }
[data-theme="light"] .example-card code { background: #e4e8f2; color: #5a3498; }
[data-theme="light"] .callout.tip  { background: rgba(107,58,154,0.07); }
[data-theme="light"] .callout.warn { background: rgba(160,88,0,0.07); }
[data-theme="light"] .callout.info { background: rgba(22,101,52,0.07); }
[data-theme="light"] .callout-body code { background: rgba(0,0,0,0.06); }
[data-theme="light"] .site-footer { background: #edf0f7; border-top-color: var(--border2); }
[data-theme="light"] .nav-theme-btn,
[data-theme="light"] .nav-theme-btn:hover,

/* ── DOCS NAV ── */
.docs-nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(16,20,32,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
  display: flex; align-items: center;
  padding: 0 32px;
  transition: background 0.2s;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.docs-nav-inner {
  max-width: 1440px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; gap: 0;
}

.docs-nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  flex-shrink: 0; margin-right: 24px;
}

.docs-nav-wordmark {
  font-family: 'Gabarito', sans-serif;
  font-weight: 500; font-size: 15px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text);
}

.docs-nav-sep {
  width: 1px; height: 18px;
  background: var(--border);
  margin: 0 20px; flex-shrink: 0;
}

.docs-nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; flex: 1;
}

.docs-nav-links a {
  font-size: 13px; font-weight: 500;
  color: var(--text2); text-decoration: none;
  padding: 6px 12px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.docs-nav-links a:hover { color: var(--text); background: rgba(120,74,157,0.1); }
.docs-nav-links a.active { color: var(--lavender); background: rgba(120,74,157,0.12); }

.docs-nav-actions {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0; margin-left: 16px;
}


.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }


/* ── DOCS MOBILE DRAWER ── */
.docs-nav-hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: none;
  color: var(--text2); cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0; margin-left: 8px;
}
.docs-nav-hamburger:hover { background: rgba(120,74,157,0.1); color: var(--text); }

.docs-mobile-overlay {
  position: fixed; inset: 0; z-index: 7999;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.docs-mobile-overlay.open { opacity: 1; pointer-events: auto; }

.docs-mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 8000;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.docs-mobile-drawer.open { transform: translateX(0); }

.docs-mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}

.docs-mobile-drawer-close {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: none;
  color: var(--text2); cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.docs-mobile-drawer-close:hover { background: rgba(120,74,157,0.1); color: var(--text); }

.docs-mobile-drawer-nav { flex: 1; padding: 8px 0; }
.docs-mobile-drawer-nav a {
  display: flex; align-items: center;
  padding: 14px 24px; min-height: 52px;
  font-size: 16px; font-weight: 500;
  color: var(--text2); text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.docs-mobile-drawer-nav a:hover,
.docs-mobile-drawer-nav a:active { color: var(--text); background: rgba(120,74,157,0.08); border-left-color: var(--violet); }
.docs-mobile-drawer-nav a.active { color: var(--lavender); border-left-color: var(--violet); background: rgba(120,74,157,0.1); }

.docs-mobile-drawer-footer {
  padding: 16px 20px; border-top: 1px solid var(--border2);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.docs-mobile-drawer-action {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.docs-mobile-drawer-action:hover { background: rgba(120,74,157,0.1); color: var(--text); }

@media (max-width: 600px) {
  .docs-nav-links { display: none; }
  .docs-nav-hamburger { display: flex; }
  .docs-nav { padding: 0 16px; }
}

/* ── PAGE SHELL ── */
.page-shell {
  max-width: 1440px; margin: 0 auto; padding: 0 40px;
  display: flex; flex-direction: row-reverse;
  gap: 64px; align-items: start;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky;
  top: 40px;
  padding: 48px 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.sidebar-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text2);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border2);
}

.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: block; font-size: 15px; color: var(--lavender);
  text-decoration: none; padding: 5px 12px; border-radius: 5px;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s; line-height: 1.4;
}
.sidebar-nav a:hover { color: var(--text); background: rgba(120,74,157,0.08); }
.sidebar-nav a.active { color: var(--text); font-weight: 600; background: rgba(120,74,157,0.12); border-left-color: var(--violet); }
.sidebar-section-head {
  display: block; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text2); padding: 16px 12px 6px;
}

/* ── MAIN CONTENT ── */
.doc-content { flex: 1; min-width: 0; padding: 32px 0 96px; }


/* ── PAGE HEADER ── */
.page-header { margin-bottom: 64px; }
.page-eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--lavender);
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.page-eyebrow::before { content: ''; display: block; width: 20px; height: 1px; background: var(--violet); flex-shrink: 0; }
.page-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(30px, 4vw, 46px); font-weight: 600;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 18px;
}
.page-desc { font-size: 16px; color: var(--text2); max-width: none; line-height: 1.7; }

/* ── DOC SECTIONS ── */
.doc-section {
  margin-bottom: 80px; padding-bottom: 80px;
  border-bottom: 1px solid var(--border2);
  scroll-margin-top: 32px;
}
.doc-section:last-child { border-bottom: none; margin-bottom: 0; }
.section-number { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lavender); margin-bottom: 8px; display: block; }
.section-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(20px, 2.5vw, 28px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 16px; }
.section-lead { font-size: 16px; color: var(--text2); line-height: 1.75; max-width: none; margin-bottom: 32px; }

/* ── PROSE ── */
.prose { max-width: none; }
.prose p { color: var(--text2); line-height: 1.75; margin-bottom: 16px; font-size: 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; }

/* ── CODE BLOCKS ── */
.code-block { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 18px 22px; margin: 22px 0; overflow-x: auto; max-width: 100%; }
.code-block-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); margin-bottom: 12px; display: block; }

/* ── CALLOUTS ── */
.callout { /* legacy base class - use callout--note/warning/success/danger */ }

/* ── EXAMPLE CARDS ── */
.example-grid { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; max-width: none; }
.example-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; }
.example-card-label { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.example-card-label::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.example-card-label.pass  { color: #4ade80; }
.example-card-label.block { color: #f87171; }
.example-card code { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12.5px; color: var(--lavender); background: var(--bg2); padding: 1px 5px; border-radius: 3px; }
.example-card p { font-size: 13.5px; color: var(--text2); margin-top: 4px; line-height: 1.5; }

/* ── FIELD LIST ── */
.field-list { margin: 22px 0; max-width: none; }
.field-row { display: grid; grid-template-columns: minmax(140px, 180px) 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border2); align-items: start; }
.field-row:first-child { border-top: 1px solid var(--border2); }
.field-name { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12.5px; color: var(--amber); font-weight: 600; padding-top: 2px; }
.field-desc { font-size: 13.5px; color: var(--text2); line-height: 1.6; }
.field-desc strong { color: var(--text); }
.field-desc code { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12px; color: #f0f4ff; background: rgba(120,74,157,0.22); padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(153,138,194,0.35); }

/* ── SUB-HEADINGS ── */
.sub-heading { font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; font-weight: 600; margin: 36px 0 14px; color: var(--text); }

/* ── DOC FOOTER ── */
.site-footer { border-top: 1px solid var(--border2); transition: background 0.2s; }
.footer-container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }

/* ── DOC CONTENT PROSE - styles raw HTML elements from guide/doc pages ── */
.doc-content h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 18px;
}
.doc-content h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 600; line-height: 1.2;
  letter-spacing: -0.01em; color: var(--text);
  margin: 40px 0 14px;
}
.doc-content h3 {
  font-family: 'Gabarito', sans-serif;
  font-size: clamp(20px, 1.8vw, 22px);
  font-weight: 600; line-height: 1.3;
  color: var(--text);
  margin: 28px 0 10px;
}
.doc-content h4 {
  font-size: 18px; font-weight: 600;
  color: var(--text); margin: 20px 0 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.doc-content > h1:first-child { margin-top: 0; }
.doc-content p {
  font-size: 16px; color: var(--text2);
  line-height: 1.75; margin-bottom: 16px;
}
.doc-content p:last-child { margin-bottom: 0; }
.doc-content strong { color: var(--text); font-weight: 600; }
.doc-content em { font-style: italic; }
.doc-content a {
  color: var(--lavender); text-decoration: underline;
  text-underline-offset: 2px; transition: color 0.15s;
}
.doc-content a:hover { color: var(--text); }
.doc-content ul,
.doc-content ol {
  font-size: 16px; color: var(--text2);
  line-height: 1.75; margin: 0 0 16px 1.25em;
}
.doc-content li { margin-bottom: 6px; }
.doc-content li:last-child { margin-bottom: 0; }
.doc-content li > ul,
.doc-content li > ol { margin: 6px 0 6px 1.25em; }

/* Inline code - base rule is global in base.njk (:not(pre) > code) */

/* Code blocks - pre > code */
.doc-content pre {
  background: var(--pre-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 18px 22px; margin: 20px 0;
  overflow-x: auto; max-width: 100%;
  word-break: normal;
}
.doc-content pre code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px; color: #ffffff !important;
  background: none; padding: 0;
  display: block; line-height: 1.85;
}
[data-theme="light"] .doc-content pre code { color: #4c1d95 !important; }

/* Callout BEM classes - semantic color system */
/* Base shared styles */
.doc-content .callout--note,
.doc-content .callout--info,
.doc-content .callout--warning,
.doc-content .callout--success,
.doc-content .callout--danger {
  border-radius: 8px; padding: 16px 20px;
  margin: 20px 0; max-width: none;
  font-size: 16px; line-height: 1.65;
  color: #f0f4ff;
}
/* note/info: Purple - code references, technical details */
.doc-content .callout--note,
.doc-content .callout--info {
  background: rgba(120,74,157,0.22);
  border: 1px solid rgba(153,138,194,0.35);
}
/* warning: Amber - additional context, tips, gotchas */
.doc-content .callout--warning {
  background: rgba(243,158,30,0.15);
  border: 1px solid rgba(243,158,30,0.4);
}
/* success: Green - confirmations, positive outcomes */
.doc-content .callout--success {
  background: rgba(21,128,61,0.15);
  border: 1px solid rgba(74,222,128,0.35);
}
/* danger: Red - caution, destructive actions, critical warnings */
.doc-content .callout--danger {
  background: rgba(185,32,37,0.15);
  border: 1px solid rgba(185,32,37,0.4);
}
.doc-content .callout--note strong,
.doc-content .callout--info strong,
.doc-content .callout--warning strong,
.doc-content .callout--success strong,
.doc-content .callout--danger strong { color: #fff; font-weight: 700; }
[data-theme="light"] .doc-content .callout--note,
[data-theme="light"] .doc-content .callout--info { background: rgba(107,58,154,0.08); border-color: rgba(107,58,154,0.25); color: #1a0a2e; }
[data-theme="light"] .doc-content .callout--warning { background: rgba(160,88,0,0.07); border-color: rgba(160,88,0,0.25); color: #1a0a2e; }
[data-theme="light"] .doc-content .callout--success { background: rgba(22,101,52,0.07); border-color: rgba(22,101,52,0.25); color: #1a0a2e; }
[data-theme="light"] .doc-content .callout--danger { background: rgba(185,32,37,0.07); border-color: rgba(185,32,37,0.25); color: #1a0a2e; }
[data-theme="light"] .doc-content .callout--note strong,
[data-theme="light"] .doc-content .callout--info strong,
[data-theme="light"] .doc-content .callout--warning strong,
[data-theme="light"] .doc-content .callout--success strong,
[data-theme="light"] .doc-content .callout--danger strong { color: #1a0a2e; }
[data-theme="light"] .doc-content .callout--note p,
[data-theme="light"] .doc-content .callout--info p,
[data-theme="light"] .doc-content .callout--warning p,
[data-theme="light"] .doc-content .callout--success p,
[data-theme="light"] .doc-content .callout--danger p { color: #1a0a2e !important; }
[data-theme="light"] .doc-content .callout--note li,
[data-theme="light"] .doc-content .callout--info li,
[data-theme="light"] .doc-content .callout--warning li,
[data-theme="light"] .doc-content .callout--success li,
[data-theme="light"] .doc-content .callout--danger li { color: #1a0a2e !important; }
[data-theme="light"] .doc-content .callout--note a,
[data-theme="light"] .doc-content .callout--info a { color: #5b2d8a; }
[data-theme="light"] .doc-content .callout--warning a { color: #92400e; }
[data-theme="light"] .doc-content .callout--success a { color: #15803d; }
[data-theme="light"] .doc-content .callout--danger a { color: #b91c1c; }
.doc-content .callout--note p,
.doc-content .callout--info p,
.doc-content .callout--warning p,
.doc-content .callout--success p,
.doc-content .callout--danger p { color: #f0f4ff !important; font-size: 16px; max-width: none; }
.doc-content .callout--note li,
.doc-content .callout--info li,
.doc-content .callout--warning li,
.doc-content .callout--success li,
.doc-content .callout--danger li { color: #f0f4ff !important; font-size: 16px; }
.doc-content .callout--note ul,
.doc-content .callout--info ul,
.doc-content .callout--warning ul,
.doc-content .callout--success ul,
.doc-content .callout--danger ul { margin-top: 8px; margin-bottom: 0; }
.doc-content .callout--note pre,
.doc-content .callout--info pre,
.doc-content .callout--warning pre,
.doc-content .callout--success pre,
.doc-content .callout--danger pre {
  background: rgba(0,0,0,0.2); margin: 10px 0 4px; max-width: none;
}
[data-theme="light"] .doc-content .callout--note,
[data-theme="light"] .doc-content .callout--info {
  background: rgba(107,58,154,0.14);
  border-color: rgba(107,58,154,0.35);
  border-width: 1.5px;
  color: #1a0a2e;
}

/* Tables (tooltip reference, etc.) */
.doc-content table {
  width: 100%; max-width: 100%;
  border-collapse: collapse;
  margin: 20px 0; font-size: 16px;
}
.doc-content th {
  text-align: left; font-weight: 600;
  font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text2); padding: 10px 14px;
  border-bottom: 2px solid var(--border);
}
.doc-content td {
  padding: 10px 14px; color: var(--text2);
  font-size: 16px;
  border-bottom: 1px solid var(--border2);
  vertical-align: top; line-height: 1.6;
}
.doc-content tr:last-child td { border-bottom: none; }
.doc-content td code,
.doc-content th code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px; color: #ffffff !important;
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--code-border);
}
[data-theme="light"] .doc-content td code,
[data-theme="light"] .doc-content th code {
  color: #1a0a2e !important;
}

/* Light mode overrides for prose */
[data-theme="light"] .doc-content h1,
[data-theme="light"] .doc-content h2,
[data-theme="light"] .doc-content h3,
[data-theme="light"] .doc-content h4 { color: var(--text); }
[data-theme="light"] .doc-content p,
[data-theme="light"] .doc-content li,
[data-theme="light"] .doc-content td { color: var(--text2); }
[data-theme="light"] .doc-content a { color: var(--lavender); }
[data-theme="light"] .doc-content a:hover { color: var(--text); }


[data-theme="light"] .doc-content td { border-bottom-color: var(--border2); }
[data-theme="light"] .doc-content th { border-bottom-color: var(--border); }

/* ── FILE TREE ── */
.file-tree { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12.5px; line-height: 1; overflow-x: auto; margin: 20px 0; }
.ft-root { display: flex; align-items: center; gap: 7px; color: var(--text3); margin-bottom: 10px; font-size: 12px; }
.ft-item { display: flex; align-items: center; margin: 4px 0; }
.ft-branch { width: 16px; height: 12px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-right: 6px; align-self: flex-start; margin-top: 6px; flex-shrink: 0; }
.ft-icon { width: 13px; height: 13px; flex-shrink: 0; color: var(--text3); }
.ft-name { white-space: nowrap; margin-left: 5px; color: var(--text); }
.ft-name.folder { font-weight: 600; }
.ft-name.json { color: #60a5fa; }
.ft-name.pdf-f { color: #f87171; }
.ft-name.md-f { color: #4ade80; }
.ft-name.csv-f { color: #fdbb25; }
.ft-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px; margin-left: 8px; flex-shrink: 0; white-space: nowrap; }
.ft-badge.free { background: rgba(21,128,61,0.2); color: #4ade80; }
.ft-badge.pro { background: rgba(120,74,157,0.2); color: var(--lavender); }
[data-theme="light"] .ft-name.json { color: #1e40af; }
[data-theme="light"] .ft-name.pdf-f { color: #b91c1c; }
[data-theme="light"] .ft-name.md-f { color: #15803d; }
[data-theme="light"] .ft-name.csv-f { color: #92400e; }
[data-theme="light"] .ft-badge.free { background: rgba(21,128,61,0.1); color: #15803d; }
[data-theme="light"] .ft-badge.pro { background: rgba(120,74,157,0.1); color: #784a9d; }
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--lavender); font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 99px;
  text-decoration: none; letter-spacing: 0.04em;
  opacity: 0; pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: opacity 0.2s, background 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: rgba(120,74,157,0.12); color: var(--text); }

/* ── MOBILE ── */
@media (max-width: 860px) {
  .docs-nav { padding: 0 20px; }
  .docs-nav-sep { display: none; }
  .docs-nav-links a { padding: 6px 8px; font-size: 12px; }
  .page-shell { gap: 32px; padding: 0 20px; }
  .sidebar { width: 180px; padding: 48px 0; top: 24px; max-height: calc(100vh - 24px); }
  .doc-content { padding: 48px 0 80px; }
}
@media (max-width: 600px) { .docs-nav-links { display: none; } }
@media (max-width: 640px) {
  .page-shell { flex-direction: column; padding: 0 16px; gap: 0; }
  .sidebar { width: 100%; flex-shrink: 1; position: static; padding: 0 0 24px; max-height: none; border-bottom: 1px solid var(--border2); margin-bottom: 8px; order: 1; }
  .sidebar-label { text-align: center; }
  .sidebar-nav { display: block; text-align: center; }
  .sidebar-nav li { display: block; }
  .sidebar-nav a { display: inline-block; text-align: center; border-left: none; padding: 6px 16px; border-radius: 20px; }
  .sidebar-nav a.active { color: var(--text); font-weight: 600; background: rgba(120,74,157,0.18); border-radius: 0; width: 100%; display: block; border-left: none; }
  .sidebar-section-head { display: block; width: 100%; text-align: center; padding: 14px 0 4px; }
  .doc-content { width: 100%; padding: 40px 0 24px; order: 2; }
  .doc-content pre,
  .doc-content table,
  .doc-content .code-block,
  .doc-content .example-grid,
  .doc-content .field-list,
  .doc-content ul,
  .doc-content ol,
  .doc-content p,
  .section-lead,
  .prose { max-width: 100%; }
  .field-row { grid-template-columns: 1fr; gap: 4px; }
  .back-to-top { bottom: 16px; right: 16px; }
  .sidebar-section-summary {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text2);
    padding: 12px 0; cursor: pointer; list-style: none;
  }
  .sidebar-section-summary::-webkit-details-marker { display: none; }
  .sidebar-section-summary::after {
    content: '+'; font-size: 16px; font-weight: 300;
    color: var(--text3); line-height: 1;
  }
  details[open] .sidebar-section-summary::after { content: '−'; }
  .sidebar-section-links { list-style: none; padding-bottom: 8px; }
  .sidebar-section-group { border-bottom: 1px solid var(--border2); }
  .sidebar-section-group:last-child { border-bottom: none; }
}

/* Release notes version date label */
.release-date {
  font-family: 'Gabarito', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text3);
  margin-left: 10px;
}
