/* Tokens from langfuse.com/docs: Fumadocs + surface-1 / line-structure / Inter+Geist */
:root {
  --lf-bg: #ffffff;
  --lf-surface: #fafafa;
  --lf-ink: #111113;
  --lf-muted: #6b6b66;
  --lf-line: #e7e7e4;
  --lf-soft: #f4f4f1;
  --lf-link: #171717;
  --lf-code: #fafaf8;
  --lf-code-ink: #2d2a2e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--lf-ink);
  background: var(--lf-bg);
  font: 15px/1.7 Inter, Geist, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}
a { color: var(--lf-link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: #000; }

.lf-top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--lf-bg) 86%, transparent);
  backdrop-filter: blur(12px);
  color: var(--lf-ink);
  border-bottom: 1px solid var(--lf-line);
}
.lf-row {
  height: 56px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 18px;
}
.lf-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--lf-ink); font-weight: 700; letter-spacing: -0.03em; text-decoration: none;
}
.lf-mark {
  width: 18px; height: 18px; border-radius: 3px;
  background: var(--lf-ink);
}
.lf-search {
  flex: 1; max-width: 360px; height: 34px;
  border: 1px solid var(--lf-line); border-radius: 6px;
  padding: 0 12px; background: var(--lf-surface); color: var(--lf-ink); font: inherit;
}
.lf-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lf-ghost { border: 0; background: transparent; color: var(--lf-muted); cursor: pointer; font: inherit; }
.lf-cta {
  background: var(--lf-ink); color: #fff; border-radius: 4px;
  padding: 6px 12px; font-weight: 650; text-decoration: none;
}
.lf-cta:hover { text-decoration: none; opacity: 0.92; }
.lf-tabs {
  display: flex; gap: 2px; overflow-x: auto;
  padding: 0 12px;
  background: var(--lf-surface);
  border-top: 1px solid var(--lf-line);
}
.tab {
  border: 0; background: transparent; color: var(--lf-muted);
  padding: 10px 12px; cursor: pointer; font: 13px/1 inherit; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--lf-ink); border-bottom-color: var(--lf-ink); }
.lf-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; min-height: calc(100vh - 96px); }
.lf-side, .lf-toc {
  position: sticky; top: 96px; height: calc(100vh - 96px);
  overflow: auto; padding: 16px 12px 40px;
}
.lf-side { border-right: 1px solid var(--lf-line); background: var(--lf-bg); }
.lf-toc { border-left: 1px solid var(--lf-line); }
.group-title { font-size: 12px; font-weight: 700; color: var(--lf-muted); margin: 16px 8px 6px; text-transform: capitalize; }
.nav-link { display: block; padding: 5px 10px; border-radius: 4px; color: var(--lf-ink); font-size: 13.5px; text-decoration: none; }
.nav-link:hover { background: var(--lf-soft); text-decoration: none; }
.nav-link.active { background: var(--lf-ink); color: #fff; font-weight: 650; }
.lf-main {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 28px 40px 80px;
}
.crumb { color: var(--lf-muted); font-size: 13px; margin-bottom: 8px; }
.page-title { font-size: 32px; letter-spacing: -0.03em; margin: 0 0 8px; }
.page-desc { color: var(--lf-muted); margin: 0 0 20px; }
.lf-note {
  background: var(--lf-soft); border: 1px solid var(--lf-line); color: var(--lf-ink);
  padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-bottom: 16px;
}
.lf-note.warn { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.content h2 { margin-top: 32px; }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.content th, .content td { border: 1px solid var(--lf-line); padding: 8px 10px; }
.content th { background: var(--lf-soft); }
.content pre, .content .code-block {
  background: var(--lf-code); color: var(--lf-code-ink); padding: 14px 16px; border-radius: 6px; overflow: auto; border: 1px solid var(--lf-line);
}
.content :not(pre) > code { background: var(--lf-soft); padding: 1px 5px; border-radius: 4px; }
.changelog-list ul { margin: 12px 0 20px; padding-left: 22px; }
.changelog-list li { margin: 8px 0; }
.changelog-list .muted { color: var(--lf-muted); }
.content img { max-width: 100%; width: auto; height: auto !important; object-fit: contain; display: block; }
.callout { border: 1px solid var(--lf-line); border-radius: 4px; padding: 10px 14px; margin: 14px 0; background: var(--lf-surface); }
.callout.warning { background: #fff7ed; }
.tabs-box { border: 1px solid var(--lf-line); border-radius: 4px; overflow: hidden; margin: 16px 0; }
.tabs-bar { display: flex; flex-wrap: wrap; background: var(--lf-surface); border-bottom: 1px solid var(--lf-line); }
.tabs-bar button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font: inherit; color: var(--lf-muted); }
.tabs-bar button.active { background: #fff; font-weight: 650; color: var(--lf-ink); }
.tab-panel { display: none; padding: 14px; }
.tab-panel.active { display: block; }
.lf-toc a { display: block; color: var(--lf-muted); font-size: 13px; padding: 3px 0; text-decoration: none; }
.search-hits {
  position: absolute; left: 200px; top: 56px; width: 360px; max-height: 60vh; overflow: auto;
  background: #fff; border: 1px solid var(--lf-line); border-radius: 6px;
  box-shadow: 0 12px 32px rgba(17, 17, 19, 0.1); display: none; z-index: 50;
}
.search-hits a { display: block; padding: 8px 12px; color: var(--lf-ink); text-decoration: none; }
.search-hits a:hover { background: var(--lf-soft); }
@media (max-width: 1100px) {
  .lf-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .lf-toc { display: none; }
}
@media (max-width: 800px) {
  .lf-layout { grid-template-columns: 1fr; }
  .lf-side { position: relative; height: auto; }
  .lf-tabs { display: none; }
}
