.docs-heading { padding-bottom: 28px; }
.docs-heading p { max-width: 72ch; }
.docs-section.site-section { padding-top: 32px; }
.docs-main, .doc-article { min-width: 0; }
.doc-article { --doc-accent: #2EF2F0; max-width: 900px; }
.doc-article.doc-nba { --doc-accent: #FFB020; }
.doc-article h2:first-of-type { margin-top: 0; }
.doc-article h2 { padding-bottom: 14px; border-bottom: 1px solid #3A3A6A; }
.doc-article h3 { margin-top: 54px; padding: 13px 0 0 18px; border-top: 1px solid #3A3A6A; border-left: 3px solid var(--doc-accent); font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.doc-article h4 { color: var(--doc-accent); margin-top: 32px; font-size: 1.1rem; }
.doc-article :is(h3,h4) { scroll-margin-top: 24px; }
.doc-article > p { max-width: 76ch; }
.doc-toc { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; padding: 20px 24px; margin: 0 0 34px; background: #141428; border: 1px solid #3A3A6A; border-top: 2px solid var(--doc-accent); }
.doc-toc strong { grid-column: 1 / -1; font: 700 12px 'JetBrains Mono',monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--doc-accent); margin-bottom: 10px; }
.doc-toc a { display: block; padding: 8px 0; border-top: 1px solid #26264A; color: #EEF0FF; text-decoration: none; font-size: 14px; line-height: 1.4; }
.doc-toc a:hover { color: var(--doc-accent); }
.doc-toc-sub { padding-left: 15px !important; color: #A3A8C8 !important; }
.doc-setting-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 20px 0 30px; }
.doc-setting { position: relative; background: #141428; border: 1px solid #26264A; border-left: 3px solid var(--doc-accent); padding: 18px 20px; margin: 20px 0; min-width: 0; overflow-wrap: anywhere; }
.doc-setting-grid .doc-setting { margin: 0; }
.doc-setting::after { content: ''; position: absolute; right: -1px; top: -1px; width: 13px; height: 13px; border-top: 2px solid var(--doc-accent); border-right: 2px solid var(--doc-accent); }
.doc-setting :is(h4,h5) { font: 700 14px/1.45 'JetBrains Mono',monospace; letter-spacing: .02em; color: var(--doc-accent); margin: 0 0 12px; }
.doc-setting h5 { font-size: 13px; }
.doc-setting p { color: #A3A8C8; line-height: 1.6; margin: 10px 0 0; }
.doc-setting p:first-of-type { margin-top: 12px; }
.doc-setting ul { display: grid; gap: 8px; padding: 0; margin: 14px 0 0; list-style: none; }
.doc-setting li { margin: 0; padding: 0 0 0 13px; border-left: 1px solid #3A3A6A; color: #A3A8C8; line-height: 1.55; }
.doc-setting li.doc-subsetting { padding: 10px 12px; background: #1B1B36; border-left: 2px solid var(--doc-accent); }
.doc-setting li.doc-subsetting strong:first-child { color: #EEF0FF; font-family: 'JetBrains Mono',monospace; font-size: 12px; }
.doc-chip { display: inline-block; max-width: 100%; padding: 5px 8px; margin: 0 7px 6px 0; background: #1B1B36; border: 1px solid #3A3A6A; color: #EEF0FF; font: 600 11px/1.4 'JetBrains Mono',monospace; vertical-align: top; }
.doc-definition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.doc-definition { background: #141428; border: 1px solid #26264A; border-top: 2px solid var(--doc-accent); padding: 15px 18px; min-width: 0; }
.doc-definition h4 { margin: 0 0 9px; color: #EEF0FF; font: 700 15px/1.4 'Chakra Petch',sans-serif; }
.doc-definition dl { margin: 0; }
.doc-definition dt { color: var(--doc-accent); font: 700 10px/1.5 'JetBrains Mono',monospace; text-transform: uppercase; letter-spacing: .08em; margin-top: 9px; }
.doc-definition dd { color: #A3A8C8; margin: 3px 0 0; line-height: 1.55; font-size: 14px; }
.doc-article > ol { list-style: none; counter-reset: doc-step; padding: 0; display: grid; gap: 10px; }
.doc-article > ol > li { counter-increment: doc-step; position: relative; min-height: 48px; margin: 0; padding: 13px 16px 13px 56px; background: #141428; border: 1px solid #26264A; }
.doc-article > ol > li::before { content: counter(doc-step,decimal-leading-zero); position: absolute; left: 13px; top: 14px; color: var(--doc-accent); font: 700 13px 'JetBrains Mono',monospace; }
.doc-article > ol > li p { margin: 0; }
.doc-article > ol > li ul { margin-top: 10px; }
.doc-article > blockquote { margin: 22px 0; padding: 14px 18px; background: #141428; border-left: 3px solid var(--doc-accent); }
.doc-article > blockquote p { margin: 0; }
.doc-article > ul { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.doc-article > ul > li { padding: 10px 13px; margin: 0; background: #141428; border-left: 2px solid #3A3A6A; }
.doc-article > ul ul { margin-top: 10px; }
.doc-data-table { width: 100%; table-layout: fixed; font-size: 14px; }
.doc-data-table td, .doc-data-table th { min-width: 0; overflow-wrap: anywhere; }
.doc-data-table th { color: var(--doc-accent); font: 700 12px 'JetBrains Mono',monospace; }
.doc-figure { margin: 30px 0; padding: 18px; border: 1px solid #3A3A6A; background: #141428; }
.doc-figure svg { display: block; width: 100%; height: auto; max-height: 260px; overflow: visible; }
.doc-figure .doc-svg-mobile { display: none; }
.doc-figure svg text { fill: #EEF0FF; font: 600 14px 'JetBrains Mono',monospace; }
.doc-figure svg .doc-svg-small { fill: #A3A8C8; font-size: 10px; }
.doc-svg-box { fill: #0D0D1C; stroke: var(--doc-accent); stroke-width: 2; }
.doc-svg-box.violet { stroke: #C08CFF; }
.doc-svg-box.amber { stroke: #FFB020; }
.doc-svg-line { fill: none; stroke: var(--doc-accent); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.doc-svg-axis { fill: none; stroke: #8088AD; stroke-width: 2; }
.doc-svg-dash { fill: none; stroke: #EEF0FF; stroke-width: 2; stroke-dasharray: 6 5; }
.doc-svg-dot, .doc-svg-green { fill: #3CF08A; }
.doc-svg-amber { fill: #FFB020; opacity: .6; }
.doc-svg-soft { fill: #1B1B36; stroke: #3A3A6A; }
.doc-figure figcaption { margin-top: 14px; color: #A3A8C8; font-size: 12px; line-height: 1.5; }
.doc-widget-controls { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 13px; border-top: 1px solid #26264A; }
.doc-widget-controls label { flex: 1 1 160px; color: #EEF0FF; font: 600 11px/1.5 'JetBrains Mono',monospace; }
.doc-widget-controls input { display: block; width: 100%; margin-top: 8px; accent-color: var(--doc-accent); }
.doc-widget-controls button { padding: 10px 12px; color: #EEF0FF; background: #1B1B36; border: 1px solid #3A3A6A; font: 600 12px 'JetBrains Mono',monospace; }
.doc-widget-controls button:hover, .doc-widget-controls button[aria-pressed="true"] { border-color: var(--doc-accent); color: var(--doc-accent); }
.doc-widget-controls output { display: block; width: 100%; color: var(--doc-accent); font: 600 13px 'JetBrains Mono',monospace; }
.doc-widget-controls :focus-visible { outline: 2px solid #2EF2F0; outline-offset: 3px; }
@media (max-width: 700px) {
  .docs-side { max-height: 154px; overflow-y: auto; border: 1px solid #26264A; background: #141428; }
  .docs-side a { width: 50%; font-size: 12px; line-height: 1.3; }
  .doc-toc, .doc-setting-grid, .doc-definition-grid { grid-template-columns: 1fr; }
  .doc-article h3 { margin-top: 44px; }
  .doc-setting { padding: 15px; }
  .doc-data-table { display: block; overflow-x: auto; }
  .doc-data-table th, .doc-data-table td { min-width: 130px; }
  .doc-figure { padding: 10px; }
  .doc-figure .doc-svg-desktop:has(+ .doc-svg-mobile) { display: none; }
  .doc-figure .doc-svg-mobile { display: block; max-height: none; }
  .doc-figure svg text { font-size: 12px; }
  .doc-figure svg .doc-svg-small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .doc-article *, .doc-article *::before, .doc-article *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* interactive docs figures */
.doc-svg-ghost { fill: none; stroke: #8088AD; stroke-width: 1.5; stroke-dasharray: 5 4; }
.doc-svg-figure { fill: none; stroke: #A3A8C8; stroke-width: 3; stroke-linecap: round; }
.doc-svg-zone { fill: rgba(46,242,240,.12); stroke: var(--doc-accent); stroke-width: 2; }
.doc-svg-axis.faint, .doc-svg-dash.faint { opacity: .45; }
.doc-svg-target { fill: none; stroke: #FF4D6D; stroke-width: 2; }
.doc-svg-target-core, .doc-svg-trail { fill: #FF4D6D; }
.doc-svg-trail { fill: var(--doc-accent); opacity: .55; }
.doc-svg-enemy { fill: rgba(255,77,109,.18); stroke: #FF4D6D; stroke-width: 2; }
.doc-figure svg .doc-svg-big { font-size: 26px; fill: var(--doc-accent); }
.doc-widget-controls label output { float: right; color: var(--doc-accent); }
.doc-widget-note { flex: 1 1 260px; align-self: center; color: #A3A8C8; font-size: 12px; }
.doc-widget-controls .doc-fix { border-color: #3CF08A; color: #3CF08A; }
.doc-widget-controls .doc-fix[aria-pressed="true"] { background: rgba(60,240,138,.12); color: #3CF08A; border-color: #3CF08A; }
.doc-figure svg .doc-svg-good { fill: #3CF08A; }
.doc-figure svg .doc-svg-bad { fill: #FFB020; }
.doc-faq { max-width: none; margin: 18px 0; }
.doc-faq details p { margin: 0 0 20px; color: #C9CCE6; }
