.docs-page { background: var(--navy); }
.docs-page .mast { position: relative; z-index: 2; }
.docs-shell { display: grid; grid-template-columns: minmax(180px, 232px) minmax(0,1fr); gap: clamp(28px,5vw,76px); padding-block: 42px 80px; }
.docs-side { align-self: start; position: sticky; top: 22px; min-width: 0; }
.docs-root { color: var(--ink); font-weight: 650; text-decoration: none; }
.docs-search { display: flex; margin: 12px 0 18px; border: 1px solid var(--rule); border-radius: 7px; background: light-dark(white,#192337); }
.docs-search:focus-within { outline: 2px solid var(--purple); outline-offset: 1px; }
.docs-search input { flex: 1; min-width: 0; color: var(--ink); background: transparent; border: 0; padding: 8px 2px 8px 9px; font-size: .86rem; outline: none; }
.docs-search button { display: grid; place-items: center; flex: none; width: 38px; min-height: 38px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; }
.docs-search button span { position: relative; display: block; width: 13px; height: 13px; border: 1.7px solid currentColor; border-radius: 50%; }
.docs-search button span::after { content: ''; position: absolute; top: 9px; left: 9px; width: 6px; height: 1.7px; background: currentColor; transform: rotate(45deg); }
.docs-topics { display: grid; gap: 3px; }
.docs-topics a { padding: 7px 11px; border-radius: 5px; color: var(--muted); font-size: .92rem; text-decoration: none; }
.docs-topics a:hover, .docs-topics a[aria-current] { color: var(--purple); background: var(--tint); }
.docs-topics a[aria-current] { font-weight: 650; }
.docs-main { min-width: 0; max-width: 72ch; overflow-wrap: break-word; }
.docs-main h1 { font-size: clamp(1.95rem,4vw,3rem); letter-spacing: -.02em; line-height: 1.13; }
.docs-main header { margin-bottom: 24px; }
.docs-lead { margin-top: 10px; color: var(--muted); font-size: 1.1rem; }
.docs-main h2 { margin: 0 0 10px; scroll-margin-top: 16px; font-size: clamp(1.22rem,2vw,1.55rem); line-height: 1.25; }
.docs-catalog, .docs-results, .docs-toc ul { list-style: none; padding: 0; }
.docs-catalog li, .docs-results li { border-top: 1px solid var(--rule); }
.docs-catalog a, .docs-results a { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 20px; padding-block: 15px; text-decoration: none; }
.docs-catalog strong { color: var(--ink); font-size: 1.12rem; }
.docs-catalog span { grid-column: 1; color: var(--muted); }
.docs-catalog a::after { content: '›'; grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 1.4rem; }
.docs-catalog a:hover strong, .docs-results a:hover { color: var(--purple); text-decoration: underline; }
.docs-results a { display: block; font-weight: 580; }
.docs-results small { display: block; color: var(--muted); font-weight: 450; }
.docs-all { display: inline-block; margin-top: 20px; }
.docs-toc { padding: 12px 16px; background: var(--tint); border-radius: 8px; }
.docs-toc > span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.docs-toc ul { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-top: 5px; font-size: .9rem; }
.docs-section { margin-top: 30px; }
.docs-section :is(p, ol, dl, table, figure) + :is(p, ol, dl, table, figure, a) { margin-block-start: 13px; }
.docs-section > a { display: inline-block; }
.docs-section ol { padding-inline-start: 1.5em; margin-block: 8px 0; }
.docs-section li { padding-inline-start: 4px; margin-block: 8px; }
.docs-section li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.docs-defs > div, .docs-coins tr { border-bottom: 1px solid var(--rule); }
.docs-defs > div { padding: 9px 0; }
.docs-defs dt { font-weight: 650; }
.docs-defs dd { margin-top: 3px; color: var(--muted); }
.docs-coins { border-collapse: collapse; width: 100%; font-size: .92rem; }
.docs-coins :is(th, td) { text-align: start; padding: 8px 6px; }
.docs-coins thead { color: var(--muted); }
.docs-coins th span { display: flex; align-items: center; gap: 8px; }
.docs-code { min-width: 0; margin: 0; border: 1px solid var(--rule); border-radius: 8px; background: light-dark(#f6f7fb,#182136); }
.docs-code figcaption { border-bottom: 1px solid var(--rule); padding: 6px 12px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.docs-code pre { margin: 0; padding: 12px; max-width: 100%; overflow-x: auto; font-size: .85rem; line-height: 1.55; }
.docs-code code, .docs-defs code { font-family: var(--mono); }
.docs-related { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--rule); }
.docs-related a + a { margin-inline-start: 16px; }
.docs-skip { position: absolute; z-index: 4; top: -6em; left: 12px; padding: 8px; background: var(--navy); }
.docs-skip:focus { top: 8px; }
@media (max-width: 760px) {
  .docs-shell { display: block; padding-block: 18px 44px; }
  .docs-side { position: static; margin-bottom: 24px; }
  .docs-side .docs-root { display: none; }
  .docs-search { margin: 0 0 8px; }
  .docs-topics { display: flex; flex-wrap: wrap; gap: 2px 6px; }
  .docs-topics a { padding: 5px 7px; }
}
