/* ============================================
   BOSSY DOCS — Design System
   Matches the Bossy plugin admin UI exactly.
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
  /* Brand colors matching Bossy plugin UI */
  --teal-900:   #134e4a;
  --teal-700:   #0f766e;
  --teal-600:   #0d9488;
  --teal-500:   #14b8a6;
  --teal-100:   #ccfbf1;
  --teal-50:    #f0fdfa;

  --orange-500: #f97316;
  --orange-100: #ffedd5;
  --orange-50:  #fff7ed;

  --yellow-500: #eab308;
  --yellow-100: #fef9c3;
  --yellow-50:  #fefce8;

  --pink-500:   #ec4899;
  --pink-100:   #fce7f3;
  --pink-50:    #fdf2f8;

  --green-500:  #22c55e;
  --green-100:  #dcfce7;
  --green-50:   #f0fdf4;

  --blue-500:   #3b82f6;
  --blue-100:   #dbeafe;
  --blue-50:    #eff6ff;

  --purple-500: #8b5cf6;
  --purple-100: #ede9fe;
  --purple-50:  #f5f3ff;

  --red-500:    #ef4444;
  --red-100:    #fee2e2;
  --red-50:     #fef2f2;

  /* Neutrals */
  --gray-950:   #030712;
  --gray-900:   #111827;
  --gray-800:   #1f2937;
  --gray-700:   #374151;
  --gray-600:   #4b5563;
  --gray-500:   #6b7280;
  --gray-400:   #9ca3af;
  --gray-300:   #d1d5db;
  --gray-200:   #e5e7eb;
  --gray-100:   #f3f4f6;
  --gray-50:    #f9fafb;
  --white:      #ffffff;

  /* Semantic */
  --bg-page:    var(--gray-50);
  --bg-card:    var(--white);
  --bg-sidebar: var(--white);
  --text-primary:   var(--gray-800);
  --text-secondary: var(--gray-500);
  --text-muted:     var(--gray-400);
  --border:         var(--gray-200);
  --border-strong:  var(--gray-300);

  /* Accent — primary brand */
  --accent:     var(--teal-600);
  --accent-bg:  var(--teal-50);

  /* Layout */
  --sidebar-w:  272px;
  --content-max: 860px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow:     0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);

  /* Typography */
  --font-body:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'Fira Code', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* --- Layout Shell --- */
.docs-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.docs-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.docs-topbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.docs-topbar__logo-mark {
  width: 28px;
  height: 28px;
  background: var(--teal-600);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.docs-topbar__divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.docs-topbar__label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.docs-topbar__spacer { flex: 1; }

.docs-topbar__version {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
}

.docs-topbar__cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  background: var(--teal-600);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.docs-topbar__cta:hover { background: var(--teal-700); }

/* --- Sidebar --- */
.docs-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-200) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }

.docs-nav__section {
  padding: 0 12px;
  margin-bottom: 4px;
}

.docs-nav__section-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 8px 4px;
}

.docs-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13.5px;
  color: var(--gray-700);
  line-height: 1.4;
  transition: all 0.1s;
  cursor: pointer;
}

.docs-nav__item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.docs-nav__item.active {
  background: var(--teal-50);
  color: var(--teal-700);
  font-weight: 500;
}

.docs-nav__item-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
}

.docs-nav__badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-700);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.docs-nav__badge.pro {
  background: var(--purple-100);
  color: var(--purple-500);
}

.docs-nav__sub {
  padding-left: 26px;
}
.docs-nav__sub .docs-nav__item {
  font-size: 12.5px;
  color: var(--gray-500);
  padding: 4px 8px;
}
.docs-nav__sub .docs-nav__item:hover,
.docs-nav__sub .docs-nav__item.active {
  color: var(--teal-700);
}

.docs-nav__divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

/* --- Main Content --- */
.docs-content {
  padding: 40px 48px 80px;
  min-width: 0;
}

.docs-article {
  max-width: var(--content-max);
}

/* --- Breadcrumb --- */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.docs-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.docs-breadcrumb a:hover { color: var(--accent); }
.docs-breadcrumb__sep { color: var(--gray-300); }
.docs-breadcrumb__current { color: var(--text-secondary); }

/* --- Chapter Header --- */
.docs-chapter-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.docs-chapter-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.docs-chapter-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--teal-100);
  color: var(--teal-700);
}
.docs-chapter-badge.pro {
  background: var(--purple-100);
  color: var(--purple-500);
}

.docs-inline-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--teal-100);
  color: var(--teal-700);
}

.docs-chapter-number {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

h1.docs-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.docs-chapter-intro {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.65;
  max-width: 680px;
}

/* --- Section Headings --- */
.docs-article h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin: 40px 0 14px;
  padding-top: 8px;
  scroll-margin-top: 72px;
}

.docs-article h2:first-of-type { margin-top: 0; }

.docs-article h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 28px 0 10px;
  scroll-margin-top: 72px;
}

.docs-article h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Body Text --- */
.docs-article p {
  margin-bottom: 14px;
  color: var(--gray-700);
}

.docs-article strong { color: var(--gray-900); font-weight: 600; }

.docs-article a {
  color: var(--teal-600);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-200, #99f6e4);
  transition: border-color 0.15s;
}
.docs-article a:hover { border-color: var(--teal-600); }

/* --- Code --- */
.docs-article code,
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--gray-100);
  color: var(--teal-700);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
}

.docs-article pre {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.6;
}
.docs-article pre code {
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

/* --- Lists --- */
.docs-article ul,
.docs-article ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.docs-article li {
  margin-bottom: 6px;
  color: var(--gray-700);
}
.docs-article li::marker { color: var(--teal-500); }

.docs-article ol { list-style: none; counter-reset: step-counter; padding-left: 0; }
.docs-article ol li {
  counter-increment: step-counter;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.docs-article ol li:last-child { border-bottom: none; }
.docs-article ol li::before {
  content: counter(step-counter);
  min-width: 24px;
  height: 24px;
  background: var(--teal-600);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Callout Cards --- */
.callout {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 18px 0;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.6;
}

.callout__icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout__body { flex: 1; }
.callout__body p { margin-bottom: 6px; color: inherit; }
.callout__body p:last-child { margin-bottom: 0; }
.callout__body strong { color: inherit; }

.callout.tip {
  background: var(--teal-50);
  border-color: var(--teal-100);
  color: var(--teal-900);
}
.callout.note {
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: #1e3a5f;
}
.callout.warning {
  background: var(--orange-50);
  border-color: var(--orange-100);
  color: #7c2d12;
}
.callout.pro-only {
  background: var(--purple-50);
  border-color: var(--purple-100);
  color: #3b0764;
}
.callout.danger {
  background: var(--red-50);
  border-color: var(--red-100);
  color: #7f1d1d;
}

/* --- Action Cards (matching the plugin's bulk action panels) --- */
.action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.action-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.action-card__accent {
  width: 4px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}

.action-card__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-700);
  flex: 1;
}

.action-card__body {
  padding: 16px;
}

/* Color variants matching plugin */
.action-card.teal   .action-card__accent { background: var(--teal-500); }
.action-card.orange .action-card__accent { background: var(--orange-500); }
.action-card.yellow .action-card__accent { background: var(--yellow-500); }
.action-card.pink   .action-card__accent { background: var(--pink-500); }
.action-card.green  .action-card__accent { background: var(--green-500); }
.action-card.blue   .action-card__accent { background: var(--blue-500); }
.action-card.purple .action-card__accent { background: var(--purple-500); }

/* --- Reference Tables --- */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.ref-table thead tr {
  background: var(--gray-800);
  color: var(--white);
}
.ref-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ref-table tbody tr:nth-child(even) { background: var(--gray-50); }
.ref-table tbody tr:hover { background: var(--teal-50); }
.ref-table tbody td {
  padding: 10px 14px;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: top;
}
.ref-table tbody td:first-child {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--teal-700);
  white-space: nowrap;
}

/* --- Tab Selector (replicates the plugin's tab pill nav) --- */
.tab-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  width: fit-content;
  margin: 20px 0;
}

.tab-nav__item {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.15s;
}
.tab-nav__item:hover { color: var(--gray-900); }
.tab-nav__item.active {
  background: var(--teal-600);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

/* --- Screenshot Placeholder --- */
.screenshot {
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 16px 0;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.screenshot img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.screenshot img:hover { opacity: 0.9; }

/* --- Lightbox --- */
.bossy-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 7, 18, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: zoom-out;
}
.bossy-lightbox.active { opacity: 1; }

.bossy-lightbox__img {
  max-width: min(100%, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  cursor: default;
  display: block;
}

.bossy-lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10000;
}
.bossy-lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }

.bossy-lightbox__caption {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  white-space: nowrap;
  pointer-events: none;
}
.screenshot figcaption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* --- On This Page (TOC) --- */
.docs-toc {
  position: sticky;
  top: 72px;
  align-self: start;
  padding: 0 0 0 32px;
  min-width: 200px;
}

.docs-toc__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.docs-toc__item {
  display: block;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0 4px 10px;
  border-left: 2px solid var(--border);
  line-height: 1.4;
  transition: all 0.15s;
}
.docs-toc__item:hover { color: var(--accent); border-left-color: var(--teal-300, #5eead4); }
.docs-toc__item.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.docs-toc__item.sub { padding-left: 20px; font-size: 12px; }

/* --- Content + TOC layout when TOC is present --- */
.docs-content-with-toc {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  align-items: start;
}

/* --- Cross-links (related docs) --- */
.crosslinks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.crosslink {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.crosslink:hover {
  border-color: var(--teal-300, #5eead4);
  background: var(--teal-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.crosslink__icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.crosslink__text { flex: 1; min-width: 0; }
.crosslink__chapter {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.crosslink__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1.3;
}
.crosslink__arrow {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Page Nav (prev/next) --- */
.docs-page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.docs-page-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
}
.docs-page-nav__item:hover {
  border-color: var(--teal-300, #5eead4);
  background: var(--teal-50);
}
.docs-page-nav__item.next { text-align: right; }

.docs-page-nav__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.docs-page-nav__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
}

/* --- Workflow steps (numbered, styled) --- */
.workflow-steps {
  counter-reset: workflow;
  margin: 16px 0;
}

.workflow-step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  counter-increment: workflow;
}
.workflow-step:last-child { border-bottom: none; }

.workflow-step__num {
  width: 26px;
  height: 26px;
  background: var(--teal-600);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.workflow-step__body { flex: 1; padding-top: 3px; font-size: 14px; color: var(--gray-700); }

/* --- Definition list (for field references) --- */
.field-list { margin: 16px 0; }
.field-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.field-item:last-child { border-bottom: none; }
.field-item__name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal-700);
  font-weight: 500;
  margin-bottom: 4px;
}
.field-item__desc { font-size: 14px; color: var(--gray-600); }

/* --- Benchmark stats --- */
.bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.bench-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.bench-stat__num {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-600);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.bench-stat__label {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* --- Scroll indicator --- */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: var(--teal-600);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: var(--shadow-md);
  z-index: 50;
}
.scroll-to-top.visible { opacity: 1; }
.scroll-to-top:hover { background: var(--teal-700); }

/* --- Mobile --- */
@media (max-width: 900px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    display: none;
  }
  .docs-content {
    padding: 24px 20px 60px;
  }
  .docs-content-with-toc {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    display: none;
  }
  h1.docs-title { font-size: 24px; }
  .docs-article h2 { font-size: 18px; }
}

/* --- Utility --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.mt-0 { margin-top: 0 !important; }
.text-muted { color: var(--text-muted); font-size: 13px; }
