.docs { --top: 60px; --accent: var(--lit); }
[data-theme="light"] .docs { --accent: #8a5600; }
.has-offer .docs { --top: 96px; }
html { scroll-padding-top: 110px; }

.docs-top { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.has-offer .docs-top { margin-top: 36px; top: 36px; }
.docs-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.docs-search { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); margin-left: 24px; padding: 7px 8px 7px 12px; border: 0; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--soft); font-size: 14px; text-align: left; }
.docs-search span { flex: 1; }
.docs-search kbd { padding: 1px 6px; border-radius: 5px; background: var(--bg-2); font: 500 12px Geist, sans-serif; }
.docs-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.docs-site { color: var(--soft); font-size: 14px; } .docs-site:hover { color: var(--text); }
.docs-menu { display: none; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }

.docs-shell { display: grid; grid-template-columns: 250px minmax(0, 720px) 200px; justify-content: center; gap: 48px; max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.docs-side, .docs-toc { position: sticky; top: var(--top); align-self: start; max-height: calc(100vh - var(--top)); overflow-y: auto; padding: 32px 0; scrollbar-width: none; }
.docs-side { display: grid; gap: 24px; }
.docs-side h2 { margin-bottom: 6px; padding: 0 10px; color: var(--text); font-size: 13px; font-weight: 600; }
.docs-side a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--soft); font-size: 14px; line-height: 1.35; }
.docs-side a:hover { color: var(--text); }
.docs-side a[aria-current] { background: color-mix(in srgb, var(--lit) 16%, transparent); color: var(--accent); font-weight: 500; }
.docs-toc h2 { margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.docs-toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--line); color: var(--soft); font-size: 13.5px; line-height: 1.35; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.here { border-left-color: var(--accent); color: var(--accent); }

.docs-main { min-width: 0; padding: 40px 0 64px; }
.docs-main .docs-section { color: var(--accent); font-size: 14px; font-weight: 500; }
.docs-main h1 { display: block; margin-top: 8px; font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; text-align: left; }
.docs-main .docs-lede { margin-top: 12px; color: var(--soft); font-size: 1.125rem; line-height: 1.5; }
.docs-main h2 { margin-top: 44px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; text-align: left; }
.docs-main h3 { margin-top: 28px; font-size: 1.0625rem; font-weight: 600; }
.docs-main p, .docs-main ul, .docs-main ol { margin-top: 12px; line-height: 1.6; }
.docs-main ul, .docs-main ol { display: grid; gap: 8px; padding-left: 22px; }
.docs-main ul { list-style: disc; } .docs-main ol { list-style: decimal; }
.docs-main li::marker { color: var(--soft); }
.docs-main p a, .docs-main li a, .docs-main td a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.docs-main code { padding: 1px 6px; border-radius: 6px; background: var(--bg-2); font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.docs-main figure { margin-top: 24px; } .docs-main figure img { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line), 0 12px 40px rgba(0, 0, 0, .3); }

.caps { display: inline-flex; gap: 3px; vertical-align: baseline; white-space: nowrap; }
.caps kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line); font: 500 .82em Geist, sans-serif; }

.how-switch { display: inline-flex; align-items: center; gap: 4px; margin-top: 20px; padding: 4px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.how-switch span { padding: 0 8px; color: var(--soft); }
.how-switch button { padding: 5px 12px; border: 0; border-radius: 9px; background: none; color: var(--soft); }
.how-switch button[aria-pressed="true"] { background: var(--lit); color: #000; font-weight: 500; }
.how { margin-top: 16px; }
.how-label { display: none; }
.js[data-how="mouse"] .how-keyboard, .js:not([data-how="mouse"]) .how-mouse { display: none; }
html:not(.js) .how-label { display: block; margin-top: 16px; color: var(--soft); font-size: 13px; font-weight: 600; }

.callout { margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.callout-title { margin-top: 0 !important; font-size: 14px; font-weight: 600; }
.callout-try { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lit) 50%, transparent); }
.callout-try .callout-title { color: var(--accent); }
.callout-worked .callout-title::before { content: "✓ "; color: #30a14e; }
.callout > :last-child { margin-bottom: 0; }

.docs-table { margin-top: 20px; overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.docs-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.docs-table th, .docs-table td { padding: 10px 14px; text-align: left; line-height: 1.4; border-top: 1px solid var(--line); }
.docs-table th, .docs-table td, .docs-table td:nth-child(2), .docs-table th:nth-child(2) { background: none; }
.docs-table th { border-top: 0; color: var(--soft); font-size: 13px; font-weight: 600; }

.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.docs-pager a { padding: 14px 16px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; transition: box-shadow .15s; }
.docs-pager a:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.docs-pager span { display: block; color: var(--soft); font-size: 13px; font-weight: 400; }
.docs-pager .next { grid-column: 2; text-align: right; }

.docs-find { position: fixed; z-index: 40; inset: 0; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); }
.docs-find[hidden] { display: none; }
.docs-find-box { width: min(600px, 100%); overflow: hidden; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.docs-find input { width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); outline: 0; background: none; font-size: 17px; }
.docs-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.docs-results a { display: block; padding: 9px 12px; border-radius: 10px; }
.docs-results a[aria-selected="true"], .docs-results a:hover { background: color-mix(in srgb, var(--lit) 16%, transparent); }
.docs-results b { display: block; font-size: 15px; font-weight: 500; }
.docs-results span { display: block; overflow: hidden; color: var(--soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.docs-results p { padding: 14px 12px; color: var(--soft); font-size: 15px; }

@media (max-width: 1180px) { .docs-shell { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; } .docs-toc { display: none; } }
@media (max-width: 820px) {
  .docs-shell { display: block; padding: 0 16px; }
  .docs-side { display: none; position: static; max-height: none; padding: 16px 0 0; }
  .docs-side.open { display: grid; }
  .docs-menu { display: block; }
  .docs-site, .docs-brand span, .docs-search kbd { display: none; }
  .docs-top { gap: 8px; padding: 0 16px; }
  .docs-search { margin-left: 0; flex: 1; min-width: 0; }
  .docs-actions .nav-cta { display: none; }
  .docs-main { padding-top: 24px; }
}
