:root {
  --docs-bg: #fbfbfd;
  --docs-surface: #ffffff;
  --docs-ink: #1d1d1f;
  --docs-muted: #6e6e73;
  --docs-subtle: #86868b;
  --docs-line: #d2d2d7;
  --docs-soft-line: rgba(0, 0, 0, 0.08);
  --docs-blue: #0071e3;
  --docs-blue-soft: #e8f2ff;
  --docs-code: #0b0b0d;
  --docs-radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.docs-page { background: var(--docs-bg); }
.docs-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 104px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
.docs-sidebar { position: sticky; top: 76px; min-width: 0; }
.docs-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; color: var(--docs-blue); font-size: 13px; font-weight: 600; }
.docs-back:hover { text-decoration: underline; }
.docs-sidebar-title { margin: 0 0 14px; color: var(--docs-subtle); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.docs-toc { display: grid; gap: 2px; margin: 0 0 28px; padding: 0; list-style: none; }
.docs-toc a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--docs-muted); font-size: 12px; line-height: 1.45; transition: background 160ms ease, color 160ms ease; }
.docs-toc a:hover { color: var(--docs-ink); background: #f0f0f3; }
.docs-toc a.active { color: var(--docs-blue); background: var(--docs-blue-soft); font-weight: 650; }
.docs-downloads { display: grid; gap: 8px; padding-top: 22px; border-top: 1px solid var(--docs-line); }
.docs-downloads a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--docs-line); border-radius: 980px; color: var(--docs-ink); background: #fff; font-size: 12px; font-weight: 600; }
.docs-downloads a:hover { border-color: #b9b9be; background: #f5f5f7; }
.docs-downloads a.primary { color: #fff; border-color: var(--docs-blue); background: var(--docs-blue); }
.docs-downloads a.primary:hover { background: #0077ed; }

.docs-content { min-width: 0; max-width: 820px; }
.docs-article-header { margin-bottom: 42px; padding-bottom: 30px; border-bottom: 1px solid var(--docs-line); }
.docs-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--docs-blue); font-size: 12px; font-weight: 700; }
.docs-article-header h1 { margin: 0 0 12px; color: var(--docs-ink); font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.045em; }
.docs-article-header p { max-width: 680px; margin: 0; color: var(--docs-muted); font-size: 16px; line-height: 1.65; }
.docs-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--docs-subtle); font-size: 11px; }

.docs-content h1 { margin: 44px 0 18px; color: var(--docs-ink); font-size: 32px; line-height: 1.18; letter-spacing: -0.035em; }
.docs-content h1:first-child { margin-top: 0; }
.docs-content h2 { margin: 34px 0 14px; color: var(--docs-blue); font-size: 23px; line-height: 1.25; letter-spacing: -0.025em; }
.docs-content h3 { margin: 26px 0 10px; color: var(--docs-ink); font-size: 18px; }
.docs-content p { margin: 0 0 16px; color: var(--docs-ink); font-size: 15px; line-height: 1.8; }
.docs-content ul, .docs-content ol { margin: 0 0 20px; padding-left: 24px; color: var(--docs-ink); font-size: 15px; line-height: 1.75; }
.docs-content li { margin: 0 0 8px; padding-left: 3px; }
.docs-content li::marker { color: var(--docs-blue); }
.docs-content strong { font-weight: 700; }
.docs-content a { color: var(--docs-blue); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.docs-content img { display: block; width: 100%; height: auto; margin: 24px auto 10px; border: 1px solid var(--docs-line); border-radius: 16px; background: #fff; }
.docs-content .shot-block { margin: 26px 0; }

.docs-content table { width: 100%; margin: 22px 0 28px; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.docs-content thead { display: table-header-group; }
.docs-content tr { break-inside: avoid; }
.docs-content th { padding: 12px 14px; color: #fff; background: var(--docs-blue); text-align: left; font-weight: 650; }
.docs-content td { padding: 12px 14px; border-bottom: 1px solid #e5e5ea; vertical-align: top; }
.docs-content tbody tr:nth-child(odd) { background: #f5f5f7; }
.docs-content table p { margin: 0; font-size: inherit; line-height: inherit; }

.docs-content .callout { margin: 24px 0 28px; border-left: 4px solid var(--docs-blue); border-radius: 0 14px 14px 0; background: var(--docs-blue-soft); }
.docs-content .callout td { padding: 18px 20px; border: 0; background: var(--docs-blue-soft) !important; }
.docs-content .callout p:first-child { margin-bottom: 6px; color: var(--docs-blue); font-weight: 700; }
.docs-content .callout p:last-child { margin-bottom: 0; }

.docs-content .code-block { position: relative; margin: 22px 0 28px; border-radius: 14px; background: var(--docs-code); }
.docs-content .code-block td { padding: 18px 20px; border: 0; background: var(--docs-code) !important; }
.docs-content .code-block p { margin: 0; color: #d2d2d7; font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.docs-copy-code { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 5px 9px; border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; color: rgba(255,255,255,0.72); background: rgba(255,255,255,0.06); font-size: 10px; }
.docs-copy-code:hover { color: #fff; background: rgba(255,255,255,0.12); }

.docs-landing { width: min(980px, calc(100% - 48px)); margin: 0 auto; padding: 88px 0 112px; }
.docs-landing-header { max-width: 760px; margin-bottom: 52px; }
.docs-landing-header h1 { margin: 16px 0 18px; font-size: clamp(42px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.05em; }
.docs-landing-header p { margin: 0; color: var(--docs-muted); font-size: 18px; line-height: 1.65; }
.docs-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.docs-card { display: flex; flex-direction: column; min-height: 360px; padding: 34px; border: 1px solid var(--docs-soft-line); border-radius: 28px; background: #fff; transition: transform 200ms ease, box-shadow 200ms ease; }
.docs-card:hover { transform: translateY(-3px); box-shadow: 0 20px 50px rgba(0,0,0,0.07); }
.docs-card-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--docs-blue); background: var(--docs-blue-soft); font-size: 20px; font-weight: 800; }
.docs-card h2 { margin: 28px 0 12px; font-size: 26px; letter-spacing: -0.035em; }
.docs-card p { margin: 0 0 24px; color: var(--docs-muted); font-size: 14px; line-height: 1.7; }
.docs-card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; }
.docs-card-tags span { padding: 5px 9px; border-radius: 999px; color: var(--docs-muted); background: #f0f0f3; font-size: 10px; }
.docs-card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.docs-card-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 15px; border: 1px solid var(--docs-line); border-radius: 980px; color: var(--docs-ink); font-size: 12px; font-weight: 600; }
.docs-card-actions a.primary { color: #fff; border-color: var(--docs-blue); background: var(--docs-blue); }
.docs-card-actions a:hover { border-color: #b9b9be; background: #f5f5f7; }
.docs-card-actions a.primary:hover { background: #0077ed; }
.docs-github-card { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 22px; padding: 34px; border: 1px solid var(--docs-line); border-radius: 28px; background: var(--docs-bg); transition: background 180ms ease, border-color 180ms ease; }
.docs-github-card:hover { background: #fff; border-color: #b9b9be; }
.docs-github-card h2 { margin: 0 0 10px; font-size: 28px; }
.docs-github-card p { max-width: 580px; margin: 0; font-size: 14px; }
.docs-github-card .button { flex: 0 0 auto; }

@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .docs-sidebar { position: static; padding: 18px; border: 1px solid var(--docs-line); border-radius: 16px; background: #fff; }
  .docs-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .docs-shell, .docs-landing { width: calc(100% - 32px); }
  .docs-shell { padding: 28px 0 72px; }
  .docs-landing { padding: 64px 0 80px; }
  .docs-article-header h1 { font-size: 38px; }
  .docs-content h1 { font-size: 28px; }
  .docs-content h2 { font-size: 21px; }
  .docs-content p, .docs-content ul, .docs-content ol { font-size: 14px; }
  .docs-content table { display: block; overflow-x: auto; }
  .docs-toc { grid-template-columns: 1fr; }
  .docs-card-grid { grid-template-columns: 1fr; }
  .docs-card { min-height: 0; padding: 28px; }
  .docs-github-card { align-items: flex-start; flex-direction: column; padding: 28px; gap: 22px; }
  .docs-github-card h2 { font-size: 24px; }
}
