/* Tokens from qdrant.tech/css/core.min + documentation.min */
:root {
  --qd-red: #dc244c;
  --qd-red-hover: #b01d3d;
  --qd-ink: #28324d;
  --qd-navy: #161e33;
  --qd-muted: #8f98b2;
  --qd-muted-2: #717c99;
  --qd-line: #d4d9e6;
  --qd-line-2: #e1e5f0;
  --qd-soft: #f0f3fa;
  --qd-panel: #ffffff;
  --qd-code: #090e1a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--qd-ink);
  background: var(--qd-panel);
  font: 16px/1.65 Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}
a { color: var(--qd-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.qd-top {
  position: sticky; top: 0; z-index: 40;
  height: 72px;
  display: flex; align-items: center; gap: 20px;
  padding: 0 28px;
  background: var(--qd-panel);
  border-bottom: 1px solid var(--qd-line-2);
}
.qd-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--qd-navy); font-weight: 700; text-decoration: none;
}
.qd-brand img { height: 28px; width: auto; }
.qd-brand em { font-style: normal; font-weight: 500; color: var(--qd-muted-2); }
.qd-search {
  flex: 1; max-width: 420px; height: 40px;
  border: 1px solid var(--qd-line); border-radius: 10px;
  padding: 0 14px; background: var(--qd-soft); color: var(--qd-ink); font: inherit;
}
.qd-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.qd-ghost {
  border: 0; background: transparent; color: var(--qd-muted-2);
  font: inherit; cursor: pointer;
}
.qd-cloud {
  background: var(--qd-red); color: #fff; border-radius: 10px;
  padding: 8px 16px; font-weight: 600; text-decoration: none;
}
.qd-cloud:hover { background: var(--qd-red-hover); text-decoration: none; }
.qd-tabs {
  display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.qd-tabs::-webkit-scrollbar { display: none; }
.qd-tabs .tab {
  border: 0; background: transparent; color: var(--qd-navy);
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.qd-tabs .tab:hover { color: var(--qd-red); }
.qd-tabs .tab.active { color: var(--qd-red); }
.qd-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 220px;
  min-height: calc(100vh - 72px);
}
.qd-side, .qd-toc {
  position: sticky; top: 72px; height: calc(100vh - 72px);
  overflow: auto; padding: 20px 14px 48px;
}
.qd-side { border-right: 1px solid var(--qd-line-2); background: var(--qd-soft); }
.qd-toc { border-left: 1px solid var(--qd-line-2); }
.group-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--qd-muted); margin: 18px 8px 6px;
}
.nav-link {
  display: block; padding: 6px 10px; border-radius: 8px;
  color: var(--qd-ink); font-size: 14px;
}
.nav-link:hover { text-decoration: none; background: #fff; color: var(--qd-red); }
.nav-link.active { color: var(--qd-red); background: #fff; font-weight: 650; }
.qd-main { padding: 32px 48px 80px; max-width: 880px; }
.crumb { color: var(--qd-muted-2); font-size: 13px; margin-bottom: 10px; }
.page-title { font-size: 36px; line-height: 1.15; color: var(--qd-navy); margin: 0 0 10px; }
.page-desc { color: var(--qd-muted-2); margin: 0 0 20px; }
.qd-note {
  background: #ffdad6; border: 1px solid #f4c4cf; color: #410002;
  padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px;
}
.qd-note.warn { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.source-line { font-size: 13px; }
.content h2 { margin-top: 36px; color: var(--qd-navy); }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.content th, .content td { border: 1px solid var(--qd-line); padding: 8px 10px; }
.content th { background: var(--qd-soft); }
.content pre, .content .code-block {
  background: var(--qd-code); color: #e8edf5; padding: 14px 16px; border-radius: 10px; overflow: auto;
}
.content :not(pre) > code { background: var(--qd-soft); padding: 1px 5px; border-radius: 4px; }
.content img { max-width: 100%; width: auto; height: auto !important; object-fit: contain; display: block; }
.callout { border: 1px solid var(--qd-line); border-radius: 10px; padding: 10px 14px; margin: 14px 0; }
.callout.warning { background: #ffdad6; }
.tabs-box { border: 1px solid var(--qd-line); border-radius: 10px; overflow: hidden; margin: 16px 0; }
.tabs-bar { display: flex; flex-wrap: wrap; background: var(--qd-soft); border-bottom: 1px solid var(--qd-line); }
.tabs-bar button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font: inherit; color: var(--qd-muted-2); }
.tabs-bar button.active { background: #fff; color: var(--qd-red); font-weight: 650; }
.tab-panel { display: none; padding: 14px; }
.tab-panel.active { display: block; }
.qd-toc a { display: block; color: var(--qd-muted-2); font-size: 13px; padding: 4px 0; }
.search-hits {
  position: absolute; left: 280px; top: 72px; width: 420px; max-height: 60vh; overflow: auto;
  background: #fff; border: 1px solid var(--qd-line); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(22, 30, 51, 0.12); display: none; z-index: 50;
}
.search-hits a { display: block; padding: 8px 12px; color: var(--qd-ink); }
.search-hits a:hover { background: var(--qd-soft); text-decoration: none; }
@media (max-width: 1100px) {
  .qd-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .qd-toc { display: none; }
}
@media (max-width: 800px) {
  .qd-top { height: auto; flex-wrap: wrap; padding: 10px 16px; }
  .qd-tabs { flex: 1 1 100%; order: 3; padding-top: 4px; }
  .qd-layout { grid-template-columns: 1fr; }
  .qd-side { position: relative; height: auto; }
  .qd-main { padding: 20px 16px 60px; }
}
