.qbc-docs-card {
  margin: 0 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.qbc-docs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid #eef2f7;
}

.qbc-docs-title { min-width: 0; }

.qbc-docs-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.qbc-docs-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.qbc-docs-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11px;
  line-height: 1.6;
}

.qbc-docs-title p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
  max-width: 760px;
}

.qbc-docs-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qbc-docs-status {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.qbc-docs-btn {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qbc-docs-btn:hover { border-color: #94a3b8; background: #f8fafc; }
.qbc-docs-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.qbc-docs-btn.is-primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.qbc-docs-btn.is-primary:hover { border-color: #1d4ed8; background: #1d4ed8; }

.qbc-docs-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qbc-docs-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.qbc-docs-tab {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  padding: 5px 14px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qbc-docs-tab:hover { border-color: #cbd5e1; color: #0f172a; }

.qbc-docs-tab.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.qbc-docs-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qbc-docs-meta {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.qbc-docs-spacer { flex: 1 1 auto; }

.qbc-docs-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.qbc-docs-layout.no-toc { grid-template-columns: minmax(0, 1fr); }

.qbc-docs-toc {
  position: sticky;
  top: 8px;
  max-height: min(64vh, 620px);
  overflow: auto;
  padding: 8px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
}

.qbc-docs-toc-title {
  padding: 2px 6px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
  text-transform: uppercase;
}

.qbc-docs-toc-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qbc-docs-toc-link:hover { background: #e2e8f0; color: #0f172a; }
.qbc-docs-toc-l3 { padding-left: 16px; color: #64748b; font-size: 11.5px; }

.qbc-docs-content {
  max-height: min(68vh, 680px);
  overflow: auto;
  padding: 2px 14px 8px 2px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fff;
  scroll-behavior: smooth;
}

.qbc-docs-content::-webkit-scrollbar { width: 8px; height: 8px; }
.qbc-docs-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.qbc-docs-content::-webkit-scrollbar-track { background: transparent; }

.qbc-docs-h {
  margin: 18px 0 8px;
  line-height: 1.4;
  color: #0f172a;
  scroll-margin-top: 8px;
}

.qbc-docs-h1 { font-size: 19px; font-weight: 700; margin-top: 6px; }
.qbc-docs-h2 { font-size: 15px; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid #eef2f7; }
.qbc-docs-h3 { font-size: 13.5px; font-weight: 600; color: #1e293b; }
.qbc-docs-h4, .qbc-docs-h5, .qbc-docs-h6 { font-size: 13px; font-weight: 600; color: #334155; }

.qbc-docs-h.is-flash { background: #fef9c3; border-radius: 4px; }

.qbc-docs-p {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.75;
  color: #334155;
}

.qbc-docs-list {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.75;
  color: #334155;
}

.qbc-docs-list li { margin: 2px 0; }
.qbc-docs-list .qbc-docs-list { margin: 2px 0; }

.qbc-docs-quote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid #93c5fd;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #475569;
}

.qbc-docs-hr {
  margin: 16px 0;
  border: 0;
  border-top: 1px solid #eef2f7;
}

.qbc-docs-code {
  position: relative;
  margin: 10px 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.qbc-docs-code-lang {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-transform: uppercase;
}

.qbc-docs-code pre {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: #1e293b;
  tab-size: 2;
}

.qbc-docs-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #b91c1c;
}

.qbc-docs-code code { padding: 0; background: transparent; color: inherit; }

.qbc-docs-table-wrap {
  margin: 10px 0;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.qbc-docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.6;
}

.qbc-docs-table th,
.qbc-docs-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.qbc-docs-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

.qbc-docs-table tr:last-child td { border-bottom: 0; }

.qbc-docs-empty,
.qbc-docs-error {
  margin: 12px 0;
  font-size: 13px;
  color: #64748b;
}

.qbc-docs-error { color: #b91c1c; }

html[data-theme="dark"] .qbc-docs-card { background: #0f172a; border-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-head { background: linear-gradient(180deg, #131f36, #0f172a); border-bottom-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-title h3 { color: #e2e8f0; }
html[data-theme="dark"] .qbc-docs-title p { color: #94a3b8; }
html[data-theme="dark"] .qbc-docs-tag { background: #1e293b; border-color: #334155; color: #93c5fd; }
html[data-theme="dark"] .qbc-docs-btn { background: #111c31; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .qbc-docs-btn:hover { background: #16233c; border-color: #475569; }
html[data-theme="dark"] .qbc-docs-btn.is-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
html[data-theme="dark"] .qbc-docs-tab { background: #111c31; border-color: #1e293b; color: #94a3b8; }
html[data-theme="dark"] .qbc-docs-tab.is-active { background: #172554; border-color: #1d4ed8; color: #93c5fd; }
html[data-theme="dark"] .qbc-docs-toc { background: #111c31; border-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-toc-link { color: #94a3b8; }
html[data-theme="dark"] .qbc-docs-toc-link:hover { background: #1e293b; color: #e2e8f0; }
html[data-theme="dark"] .qbc-docs-content { background: #0f172a; border-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-h { color: #e2e8f0; }
html[data-theme="dark"] .qbc-docs-h2 { border-bottom-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-p,
html[data-theme="dark"] .qbc-docs-list { color: #cbd5e1; }
html[data-theme="dark"] .qbc-docs-quote { background: #111c31; border-left-color: #1d4ed8; color: #94a3b8; }
html[data-theme="dark"] .qbc-docs-code { background: #111c31; border-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-code pre { color: #e2e8f0; }
html[data-theme="dark"] .qbc-docs-content code { background: #1e293b; color: #fca5a5; }
html[data-theme="dark"] .qbc-docs-table-wrap { border-color: #1e293b; }
html[data-theme="dark"] .qbc-docs-table th { background: #111c31; color: #e2e8f0; }
html[data-theme="dark"] .qbc-docs-table td { border-bottom-color: #1e293b; color: #cbd5e1; }
html[data-theme="dark"] .qbc-docs-hr { border-top-color: #1e293b; }

@media (max-width: 860px) {
  .qbc-docs-layout { grid-template-columns: minmax(0, 1fr); }
  .qbc-docs-toc { display: none; }
  [data-qbc-docs-toc-toggle] { display: none; }
  .qbc-docs-content { max-height: 62vh; }
}

@media (max-width: 560px) {
  .qbc-docs-head { flex-direction: column; align-items: stretch; }
  .qbc-docs-head-actions { justify-content: flex-end; }
  .qbc-docs-body { padding: 10px 12px 12px; }
  .qbc-docs-content { max-height: 56vh; padding-right: 8px; }
  .qbc-docs-toolbar { gap: 6px; }
  .qbc-docs-meta { font-size: 11px; }
}