/* =================================================================
   BabianTech — 15_typescript style
   Classic docs site: deep blue header + white body + blue accents
   Color: #0EA5E9 primary, white surface, neutral text
   ================================================================= */

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #1f2937;
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
svg,
video { max-width: 100%; display: block; }

a {
  color: #0369a1;
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: #0c4a6e; text-decoration: underline; }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

ul, ol { padding-left: 1.4em; }

code,
kbd,
pre,
samp {
  font-family: 'SF Mono', 'Cascadia Code', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, monospace;
  font-size: 0.92em;
}

/* ---------- Variables (light only, doc-site standard) ---------- */
:root {
  --bt-primary: #0EA5E9;
  --bt-primary-dark: #0284c7;
  --bt-primary-darker: #0369a1;
  --bt-primary-soft: #e0f2fe;
  --bt-link: #0369a1;
  --bt-link-hover: #0c4a6e;

  --bt-bg: #ffffff;
  --bt-surface: #f9fafb;
  --bt-surface-2: #f3f4f6;
  --bt-border: #e5e7eb;
  --bt-border-strong: #d1d5db;

  --bt-text: #1f2937;
  --bt-text-soft: #4b5563;
  --bt-text-muted: #6b7280;
  --bt-text-dim: #9ca3af;

  --bt-header-bg: #235a9e;
  --bt-header-bg-dark: #1d4f8c;
  --bt-header-text: #ffffff;
  --bt-header-text-dim: rgba(255,255,255,0.78);

  --bt-code-bg: #1e293b;
  --bt-code-text: #f1f5f9;
  --bt-inline-code-bg: #f1f5f9;
  --bt-inline-code-text: #be185d;

  --bt-warn: #f59e0b;
  --bt-warn-bg: #fffbeb;
  --bt-info: #0EA5E9;
  --bt-info-bg: #f0f9ff;
  --bt-success: #10b981;
  --bt-success-bg: #ecfdf5;

  --bt-radius: 4px;
  --bt-radius-md: 6px;
  --bt-radius-lg: 8px;

  --bt-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --bt-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);

  --bt-header-h: 48px;
  --bt-sidebar-w: 220px;
  --bt-onpage-w: 220px;
  --bt-content-max: 820px;
  --bt-page-max: 1280px;
}

/* ---------- Layout ---------- */
.bt-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.bt-shell {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--bt-page-max);
  margin: 0 auto;
}

.bt-shell--docs { gap: 0; }

.bt-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 28px 36px 64px;
}

.bt-main--full {
  width: 100%;
  max-width: var(--bt-page-max);
  margin: 0 auto;
  padding: 0;
}

/* ---------- Header (deep blue, TS-like) ---------- */
.bt-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bt-header-bg);
  color: var(--bt-header-text);
  border-bottom: 1px solid rgba(0,0,0,0.18);
  height: var(--bt-header-h);
}

.bt-header__bar { height: var(--bt-header-h); }

.bt-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--bt-page-max);
  margin: 0 auto;
  padding: 0 18px;
  gap: 18px;
}

.bt-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  border-radius: var(--bt-radius);
  padding: 0;
}

.bt-iconbtn:hover { background: rgba(255,255,255,0.10); }

.bt-mob { display: none; }

.bt-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bt-header-text);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.bt-brand:hover { color: var(--bt-header-text); text-decoration: none; }

.bt-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bt-brand__name { line-height: 1; }

/* primary nav */
.bt-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 6px;
}

.bt-nav__link {
  color: var(--bt-header-text-dim);
  font-size: 14px;
  font-weight: 400;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.bt-nav__link:hover {
  color: #fff;
  text-decoration: none;
  border-bottom-color: rgba(255,255,255,0.45);
}

.bt-nav__link.is-current {
  color: #fff;
  border-bottom-color: #ffffff;
}

/* search box in header */
.bt-search--header {
  margin-left: auto;
  position: relative;
  width: 220px;
  display: flex;
  align-items: center;
}

.bt-search__icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  pointer-events: none;
  display: inline-flex;
}

.bt-search__input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--bt-radius);
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: background .15s ease, border-color .15s ease;
}

.bt-search__input::placeholder { color: rgba(255,255,255,0.65); }

.bt-search__input:focus {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.4);
}

.bt-header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bt-lang { position: relative; }

.bt-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--bt-header-text);
  padding: 4px 8px;
  border-radius: var(--bt-radius);
  font-size: 13px;
}

.bt-lang__btn:hover { background: rgba(255,255,255,0.10); }

.bt-lang__menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 6px 0;
  min-width: 156px;
  background: #fff;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius-md);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  list-style: none;
  display: none;
  z-index: 60;
}

.bt-lang:hover .bt-lang__menu,
.bt-lang:focus-within .bt-lang__menu { display: block; }

.bt-lang__menu li { margin: 0; }

.bt-lang__menu a {
  display: block;
  padding: 6px 14px;
  color: var(--bt-text);
  font-size: 13px;
}

.bt-lang__menu a:hover {
  background: var(--bt-surface);
  color: var(--bt-link);
  text-decoration: none;
}

.bt-lang__menu a.is-current { color: var(--bt-primary); font-weight: 500; }

/* ---------- Sidebar (left doc tree) ---------- */
.bt-sidebar {
  width: var(--bt-sidebar-w);
  flex: 0 0 var(--bt-sidebar-w);
  border-right: 1px solid var(--bt-border);
  background: var(--bt-bg);
  position: sticky;
  top: var(--bt-header-h);
  align-self: flex-start;
  max-height: calc(100vh - var(--bt-header-h));
  overflow-y: auto;
  padding: 18px 12px 32px 22px;
}

.bt-sidebar::-webkit-scrollbar { width: 6px; }
.bt-sidebar::-webkit-scrollbar-thumb { background: var(--bt-border-strong); border-radius: 3px; }

.bt-sidebar__filter {
  margin-bottom: 12px;
  position: relative;
}

.bt-sidebar__filter-input {
  width: 100%;
  padding: 6px 10px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-size: 12.5px;
  color: var(--bt-text);
  outline: none;
}

.bt-sidebar__filter-input:focus {
  background: #fff;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px rgba(14,165,233,0.18);
}

.bt-sidebar__inner { padding-bottom: 16px; }

.bt-sidebar__group {
  margin: 10px 0 6px;
}

.bt-sidebar__head {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bt-text);
  text-transform: none;
  padding: 6px 0 6px 0;
  margin: 0;
  user-select: none;
}

.bt-sidebar__head--clickable { cursor: pointer; }

.bt-sidebar__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--bt-text-muted);
  transition: transform .18s ease;
}

.bt-sidebar__group.is-folded .bt-sidebar__caret { transform: rotate(-90deg); }
.bt-sidebar__group.is-folded .bt-sidebar__list { display: none; }

.bt-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0 0 4px 16px;
}

.bt-sidebar__list--nest { padding-left: 18px; }

.bt-sidebar__list li { margin: 0; }

.bt-sidebar__link {
  display: block;
  padding: 4px 8px 4px 0;
  color: var(--bt-link);
  font-size: 13px;
  line-height: 1.55;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  text-decoration: none;
  word-break: break-word;
}

.bt-sidebar__link:hover {
  color: var(--bt-link-hover);
  background: var(--bt-surface);
  text-decoration: none;
}

.bt-sidebar__link.is-here {
  color: var(--bt-primary-darker);
  font-weight: 600;
  border-left-color: var(--bt-primary);
  background: var(--bt-info-bg);
}

.bt-sidebar__link--root {
  color: var(--bt-text-muted);
  font-style: italic;
}

/* ---------- Home Hero ---------- */
.bt-home { width: 100%; }

.bt-hero {
  background: linear-gradient(180deg, #f5f8fb 0%, #ffffff 100%);
  border-bottom: 1px solid var(--bt-border);
  padding: 56px 24px 56px;
}

.bt-hero__inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}

.bt-hero__kicker {
  font-size: 13px;
  color: var(--bt-primary-darker);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.bt-hero__title {
  font-size: 36px;
  line-height: 1.18;
  font-weight: 700;
  color: var(--bt-text);
  margin: 0 0 12px 0;
  letter-spacing: -0.015em;
}

.bt-hero__lede {
  font-size: 16px;
  color: var(--bt-text-soft);
  line-height: 1.7;
  margin: 0 0 24px;
  max-width: 720px;
}

.bt-search--hero {
  position: relative;
  max-width: 560px;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
}

.bt-search--hero .bt-search__icon { color: var(--bt-text-muted); left: 14px; }

.bt-search__input--hero {
  background: #ffffff;
  border: 1px solid var(--bt-border-strong);
  color: var(--bt-text);
  padding: 12px 50px 12px 42px;
  font-size: 15px;
  border-radius: var(--bt-radius-md);
  box-shadow: var(--bt-shadow-sm);
}

.bt-search__input--hero::placeholder { color: var(--bt-text-muted); }

.bt-search__input--hero:focus {
  background: #fff;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.18);
}

.bt-search__hint {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 12px;
  color: var(--bt-text-muted);
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  padding: 1px 6px;
}

.bt-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.bt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--bt-radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  cursor: pointer;
}

.bt-btn--primary {
  background: var(--bt-primary);
  color: #ffffff;
  border-color: var(--bt-primary);
}
.bt-btn--primary:hover {
  background: var(--bt-primary-dark);
  border-color: var(--bt-primary-dark);
  color: #fff;
  text-decoration: none;
}

.bt-btn--ghost {
  background: #ffffff;
  color: var(--bt-text);
  border-color: var(--bt-border-strong);
}
.bt-btn--ghost:hover {
  background: var(--bt-surface);
  color: var(--bt-link);
  text-decoration: none;
  border-color: var(--bt-primary);
}

/* ---------- Section / Card grid (TS docs style) ---------- */
.bt-section {
  padding: 40px 24px;
  border-bottom: 1px solid var(--bt-border);
}

.bt-section--cards { background: #fafbfc; }
.bt-section--more { background: #fff; }
.bt-section--latest { background: #fafbfc; }
.bt-section--faq { background: #fff; }

.bt-section__inner {
  max-width: var(--bt-page-max);
  margin: 0 auto;
}

.bt-section__head { margin-bottom: 24px; }

.bt-section__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bt-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.bt-section__desc {
  font-size: 14.5px;
  color: var(--bt-text-soft);
  margin: 0;
  max-width: 720px;
  line-height: 1.7;
}

.bt-section__viewall {
  margin: 22px 0 0;
  font-size: 14px;
}

.bt-section__viewall a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* card grid: 3 columns on desktop, TS-style white cards */
.bt-cardgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.bt-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 18px 18px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
  min-height: 140px;
}

.bt-card:hover {
  border-color: var(--bt-primary);
  box-shadow: var(--bt-shadow);
  text-decoration: none;
}

.bt-card__head {
  margin-bottom: 8px;
}

.bt-card__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--bt-text);
  margin: 0;
  letter-spacing: -0.005em;
}
.bt-card__title:hover { color: var(--bt-link); text-decoration: none; }

.bt-card__desc {
  font-size: 13px;
  color: var(--bt-text-soft);
  margin: 0 0 10px;
  line-height: 1.6;
}

.bt-card__list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.bt-card__list li {
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 1px;
}

.bt-card__list a {
  color: var(--bt-link);
  text-decoration: none;
}

.bt-card__list a:hover {
  color: var(--bt-link-hover);
  text-decoration: underline;
}

.bt-card__list--empty { color: var(--bt-text-muted); font-style: italic; }
.bt-card__list--empty li { color: var(--bt-text-muted); }

.bt-card__count {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--bt-text-muted);
  padding: 2px 8px;
  background: var(--bt-surface);
  border-radius: 999px;
}

.bt-card--link .bt-card__title { color: var(--bt-link); }

/* reflist (more categories) */
.bt-reflist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.bt-reflist__item {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.55;
}

.bt-reflist__item:hover {
  border-color: var(--bt-primary);
  text-decoration: none;
}

.bt-reflist__item strong {
  display: block;
  color: var(--bt-link);
  margin-bottom: 3px;
  font-weight: 600;
  font-size: 14px;
}

.bt-reflist__item span {
  color: var(--bt-text-muted);
  font-size: 12.5px;
}

/* ---------- Post list ---------- */
.bt-postlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bt-postlist__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--bt-border);
}

.bt-postlist__item:last-child { border-bottom: none; }

.bt-postlist__title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--bt-text);
  margin-bottom: 4px;
  text-decoration: none;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.bt-postlist__title:hover { color: var(--bt-link); text-decoration: underline; }

.bt-postlist__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--bt-text-muted);
  margin-bottom: 6px;
}

.bt-postlist__date { font-variant-numeric: tabular-nums; }

.bt-postlist__tag {
  font-size: 11.5px;
  padding: 1px 8px;
  background: var(--bt-info-bg);
  color: var(--bt-primary-darker);
  border-radius: 999px;
  font-weight: 500;
}

.bt-postlist__desc {
  font-size: 13.5px;
  color: var(--bt-text-soft);
  margin: 0;
  line-height: 1.65;
}

/* ---------- Doc / Article ---------- */
.bt-doc {
  max-width: 100%;
}

.bt-doc--page,
.bt-doc--list,
.bt-doc--article {
  width: 100%;
}

.bt-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12.5px;
  color: var(--bt-text-muted);
  margin: 0 0 14px;
}

.bt-crumb a {
  color: var(--bt-text-muted);
  text-decoration: none;
}

.bt-crumb a:hover {
  color: var(--bt-link);
  text-decoration: underline;
}

.bt-crumb__sep {
  color: var(--bt-text-dim);
  margin: 0 2px;
}

.bt-crumb__current {
  color: var(--bt-text);
  font-weight: 500;
}

.bt-doc__head {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--bt-border);
}

.bt-doc__h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--bt-text);
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.bt-doc__lede {
  font-size: 15px;
  color: var(--bt-text-soft);
  margin: 4px 0 0;
  line-height: 1.7;
}

.bt-doc__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--bt-text-muted);
  margin-top: 12px;
}

.bt-doc__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bt-doc__meta-sep { color: var(--bt-text-dim); }

.bt-tagchip {
  display: inline-block;
  padding: 1px 8px;
  background: var(--bt-info-bg);
  color: var(--bt-primary-darker);
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
}
.bt-tagchip:hover { background: var(--bt-primary-soft); text-decoration: none; }

/* doc layout: main + on-page (right toc) */
.bt-doc__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--bt-onpage-w);
  gap: 36px;
  align-items: flex-start;
}

/* prose */
.bt-prose {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--bt-text);
  max-width: var(--bt-content-max);
}

.bt-prose h2,
.bt-prose h3,
.bt-prose h4 {
  font-weight: 700;
  color: var(--bt-text);
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}

.bt-prose h2 {
  font-size: 22px;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bt-border);
}

.bt-prose h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

.bt-prose h4 {
  font-size: 15px;
  margin: 18px 0 6px;
}

.bt-prose p {
  margin: 0 0 14px;
}

.bt-prose ul,
.bt-prose ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.bt-prose li {
  margin: 4px 0;
  line-height: 1.7;
}

.bt-prose strong {
  font-weight: 600;
  color: var(--bt-text);
}

.bt-prose a {
  color: var(--bt-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(3,105,161,0.35);
}

.bt-prose a:hover {
  color: var(--bt-link-hover);
  text-decoration-color: var(--bt-link-hover);
}

.bt-prose blockquote {
  margin: 18px 0;
  padding: 10px 16px;
  background: var(--bt-info-bg);
  border-left: 3px solid var(--bt-primary);
  color: var(--bt-text-soft);
  font-size: 14.5px;
  border-radius: 0 var(--bt-radius) var(--bt-radius) 0;
}

.bt-prose blockquote p:last-child { margin-bottom: 0; }

/* inline code */
.bt-prose code {
  background: var(--bt-inline-code-bg);
  color: var(--bt-inline-code-text);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.88em;
  border: 1px solid #e2e8f0;
}

/* code block */
.bt-prose pre,
.bt-prose .bt-codeblock {
  background: var(--bt-code-bg);
  color: var(--bt-code-text);
  padding: 14px 16px;
  border-radius: var(--bt-radius);
  margin: 16px 0;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}

.bt-prose pre code,
.bt-prose .bt-codeblock code {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.bt-prose pre::-webkit-scrollbar { height: 6px; }
.bt-prose pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }

/* table */
.bt-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
}

.bt-prose th,
.bt-prose td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--bt-border);
  vertical-align: top;
}

.bt-prose th {
  background: var(--bt-surface);
  font-weight: 600;
  color: var(--bt-text);
  font-size: 13.5px;
  border-bottom: 2px solid var(--bt-border-strong);
}

.bt-prose tr:last-child td { border-bottom: none; }

.bt-prose tbody tr:hover { background: var(--bt-surface); }

.bt-prose hr {
  border: none;
  border-top: 1px solid var(--bt-border);
  margin: 24px 0;
}

/* heading anchor link */
.bt-prose .header-anchor {
  color: var(--bt-text-dim);
  margin-left: 6px;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity .15s ease;
}

.bt-prose h2:hover .header-anchor,
.bt-prose h3:hover .header-anchor { opacity: 1; }

/* ---------- On-page TOC (right) ---------- */
.bt-onpage {
  width: var(--bt-onpage-w);
  font-size: 13px;
  color: var(--bt-text-soft);
  position: sticky;
  top: calc(var(--bt-header-h) + 18px);
  align-self: flex-start;
  max-height: calc(100vh - var(--bt-header-h) - 36px);
  overflow-y: auto;
}

.bt-onpage__inner {
  border-left: 1px solid var(--bt-border);
  padding: 4px 0 4px 14px;
}

.bt-onpage__head {
  font-size: 12px;
  font-weight: 700;
  color: var(--bt-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.bt-onpage__list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.bt-onpage__item {
  margin: 2px 0;
  line-height: 1.5;
}

.bt-onpage__item--lv2 { padding-left: 0; }
.bt-onpage__item--lv3 { padding-left: 12px; }

.bt-onpage__list--plain a { color: var(--bt-link); }

.bt-onpage a {
  display: block;
  color: var(--bt-text-muted);
  font-size: 12.5px;
  padding: 2px 0;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -16px;
  padding-left: 14px;
}

.bt-onpage a:hover {
  color: var(--bt-link);
}

.bt-onpage a.is-here {
  color: var(--bt-primary-darker);
  font-weight: 500;
  border-left-color: var(--bt-primary);
}

.bt-onpage__more {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--bt-border);
}

/* ---------- Prev / Next ---------- */
.bt-paddle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 36px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--bt-border);
}

.bt-paddle__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}

.bt-paddle__cell:hover {
  border-color: var(--bt-primary);
  text-decoration: none;
}

.bt-paddle__cell--next { text-align: right; align-items: flex-end; }
.bt-paddle__cell--prev { text-align: left; }

.bt-paddle__lab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--bt-text-muted);
  font-weight: 500;
}

.bt-paddle__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-link);
  line-height: 1.4;
  word-break: break-word;
}

/* ---------- Pager ---------- */
.bt-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 24px 0;
  padding-top: 18px;
  border-top: 1px solid var(--bt-border);
  justify-content: center;
}

.bt-pager__btn,
.bt-pager__num {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-size: 13px;
  color: var(--bt-link);
  background: #fff;
  text-decoration: none;
  min-width: 32px;
  justify-content: center;
}

.bt-pager__btn:hover,
.bt-pager__num:hover {
  border-color: var(--bt-primary);
  color: var(--bt-primary-darker);
  text-decoration: none;
}

.bt-pager__num.is-current {
  background: var(--bt-primary);
  color: #fff;
  border-color: var(--bt-primary);
}

.bt-pager__btn.is-off,
.bt-pager__num.is-off {
  color: var(--bt-text-dim);
  background: var(--bt-surface);
  cursor: default;
}

/* ---------- FAQ (details) ---------- */
.bt-faq {
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: #fff;
}

.bt-faq__item {
  border-bottom: 1px solid var(--bt-border);
}

.bt-faq__item:last-child { border-bottom: none; }

.bt-faq__q {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--bt-text);
  position: relative;
  padding-right: 38px;
}

.bt-faq__q::-webkit-details-marker { display: none; }

.bt-faq__q::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bt-text-muted);
  font-size: 18px;
  font-weight: 400;
  transition: transform .15s ease;
}

.bt-faq__item[open] .bt-faq__q::after {
  content: '−';
}

.bt-faq__a {
  padding: 0 18px 16px;
  color: var(--bt-text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.bt-faq__a p { margin: 0 0 8px; }
.bt-faq__a p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.bt-footer {
  margin-top: auto;
  background: var(--bt-header-bg);
  color: rgba(255,255,255,0.85);
}

.bt-footer__top {
  padding: 36px 24px 28px;
}

.bt-footer__inner {
  max-width: var(--bt-page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 3fr;
  gap: 36px;
}

.bt-footer__brand {
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
}

.bt-footer__brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.bt-footer__brand-tag {
  font-size: 13px;
}

.bt-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.bt-footer__col {}

.bt-footer__h {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.bt-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bt-footer__col li {
  margin: 4px 0;
}

.bt-footer__col a {
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  text-decoration: none;
}

.bt-footer__col a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.bt-footer__col a.is-current {
  color: #ffffff;
  font-weight: 600;
}

.bt-footer__lang { display: flex; flex-wrap: wrap; gap: 6px 12px; }

.bt-footer__bot {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 14px 24px;
  font-size: 12px;
}

.bt-footer__inner--bot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: rgba(255,255,255,0.62);
}

.bt-footer__rights { color: rgba(255,255,255,0.7); }

.bt-footer__risk {
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
}

/* ---------- 404 ---------- */
.bt-404 {
  max-width: 560px;
  margin: 80px auto;
  padding: 32px;
  text-align: center;
}

.bt-404__code {
  font-size: 76px;
  font-weight: 800;
  color: var(--bt-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1;
}

.bt-404__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bt-text);
  margin: 0 0 10px;
}

.bt-404__body {
  font-size: 14.5px;
  color: var(--bt-text-soft);
  margin: 0 0 22px;
  line-height: 1.7;
}

/* ---------- Callouts (used in markdown via blockquote with leading emoji) ---------- */
.bt-prose blockquote {
  position: relative;
}

/* steps */
.bt-prose ol > li::marker {
  color: var(--bt-primary-darker);
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .bt-cardgrid { grid-template-columns: repeat(2, 1fr); }
  .bt-reflist { grid-template-columns: repeat(3, 1fr); }
  .bt-doc__layout { grid-template-columns: 1fr; }
  .bt-onpage { display: none; }
  .bt-footer__inner { grid-template-columns: 1fr; }
  .bt-footer__cols { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  :root {
    --bt-sidebar-w: 240px;
    --bt-content-max: 100%;
  }
  .bt-mob { display: inline-flex; }
  .bt-nav { display: none; }
  .bt-search--header { display: none; }

  .bt-sidebar {
    position: fixed;
    top: var(--bt-header-h);
    left: 0;
    bottom: 0;
    z-index: 40;
    background: #fff;
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 280px;
    flex-basis: 280px;
    border-right: 1px solid var(--bt-border);
    max-height: none;
  }
  .bt-sidebar.is-open { transform: translateX(0); box-shadow: 4px 0 18px rgba(0,0,0,0.10); }

  .bt-main { padding: 22px 18px 48px; }
  .bt-hero { padding: 36px 18px 36px; }
  .bt-hero__title { font-size: 26px; }
  .bt-section { padding: 28px 18px; }
  .bt-section__title { font-size: 19px; }
  .bt-doc__h1 { font-size: 24px; }

  .bt-footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .bt-cardgrid { grid-template-columns: 1fr; }
  .bt-reflist { grid-template-columns: 1fr; }
  .bt-paddle { grid-template-columns: 1fr; }
  .bt-header__inner { gap: 10px; padding: 0 12px; }
  .bt-brand__name { font-size: 15px; }
  .bt-hero__title { font-size: 22px; }
  .bt-prose { font-size: 15px; }
  .bt-prose h2 { font-size: 19px; }
  .bt-footer__cols { grid-template-columns: 1fr 1fr; gap: 12px; }
  .bt-footer__top { padding: 24px 18px 18px; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--bt-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ---------- Selection ---------- */
::selection { background: rgba(14,165,233,0.22); color: var(--bt-text); }

/* ---------- Print ---------- */
@media print {
  .bt-header,
  .bt-sidebar,
  .bt-onpage,
  .bt-footer,
  .bt-paddle,
  .bt-pager { display: none !important; }
  .bt-main { padding: 0 !important; }
  .bt-prose { max-width: 100%; }
}

/* ---------- Body lock when mobile menu open ---------- */
.bt-menu-open { overflow: hidden; }

/* ---------- Misc utilities ---------- */
.bt-doc__layout > .bt-prose { min-width: 0; }

.bt-prose img { border-radius: var(--bt-radius); }

.bt-prose .callout {
  border-left: 3px solid var(--bt-warn);
  background: var(--bt-warn-bg);
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 0 var(--bt-radius) var(--bt-radius) 0;
  font-size: 14px;
}

.bt-prose .callout--info { border-left-color: var(--bt-info); background: var(--bt-info-bg); }
.bt-prose .callout--ok { border-left-color: var(--bt-success); background: var(--bt-success-bg); }

/* end */
