/* /docs: sticky section nav (desktop), collapsible nav (phone), short sections, number tables. Tokens from reserve.css. */
.docs { min-width: 0; padding-bottom: 72px; }
.docs-h { padding-bottom: 24px; }
.docs-layout { display: grid; grid-template-columns: 184px minmax(0, 760px); gap: clamp(32px, 5vw, 80px); align-items: start; }
.docs-nav { position: sticky; top: 90px; }
.docs-nav nav, .docs-toc nav { display: grid; gap: 2px; }
.docs-nav a, .docs-toc a { display: block; padding: 7px 12px; border-left: 2px solid var(--hair); color: var(--mut); font-size: 14px; font-weight: 520; }
.docs-nav a:hover, .docs-toc a:hover { color: var(--fg); border-left-color: var(--line-strong); }
.docs-nav a:active, .docs-toc a:active { color: var(--fg2); }
.docs-nav a:focus-visible, .docs-toc a:focus-visible, .docs-toc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs-nav a[aria-current], .docs-toc a[aria-current] { color: var(--accent); border-left-color: var(--accent); }
.docs-toc { display: none; }

.docs-body { min-width: 0; color: var(--fg2); }
.docs-section { padding-block: 40px; border-top: 1px solid var(--hair); scroll-margin-top: 8px; }
.docs-section:first-child { padding-top: 8px; border-top: 0; }
.docs-section h2 { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; color: var(--ink); font: 535 clamp(1.6rem, 2.4vw, 2.2rem)/1.12 var(--display); letter-spacing: -.036em; }
.docs-num { color: var(--accent); font-size: 13px; letter-spacing: 0; }
.docs-section h3 { margin: 28px 0 8px; color: var(--ink); font-size: 16px; font-weight: 620; }
.docs-section p { max-width: 66ch; line-height: 1.65; }
.docs-section p + p { margin-top: 12px; }
.docs-section b { color: var(--ink); font-weight: 620; }
.docs-section .link { margin-top: 4px; color: var(--accent); }
.docs-section .link:hover { color: var(--accent-hover); }
.docs-lead { margin-bottom: 16px; color: var(--ink); font: 520 clamp(1.4rem, 2vw, 1.8rem)/1.2 var(--display); letter-spacing: -.03em; }
.docs-points, .docs-list { display: grid; gap: 10px; max-width: 66ch; padding-left: 1.2rem; list-style: disc; line-height: 1.6; }
.docs-points li::marker, .docs-list li::marker { color: var(--accent); }
.docs-list { margin-top: 12px; }
.docs-formula { margin: 14px 0; padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 var(--r6) var(--r6) 0; background: var(--panel); color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }

.docs-table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--hair); border-radius: var(--r10); }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.docs-table th, .docs-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--hair); }
.docs-table thead th { border-top: 0; background: var(--panel); color: var(--mut); font-size: 12px; font-weight: 560; letter-spacing: .02em; }
.docs-table tbody th { color: var(--ink); font-weight: 600; }
.docs-table td { font-variant-numeric: tabular-nums; }
.docs-table small { color: var(--mut); font-size: 12px; white-space: nowrap; }
.docs-kv thead { display: none; }
.docs-kv tbody tr:first-child > * { border-top: 0; }
.docs-kv tbody th { width: 34%; }
.docs-addr { color: var(--fg); font-size: 13px; overflow-wrap: anywhere; word-break: break-all; }
.docs-addr:hover { color: var(--accent); }
.docs-pending { color: var(--mut); }

.docs-faq { display: grid; gap: 0; }
.docs-faq > div { padding: 14px 0; border-top: 1px solid var(--hair); }
.docs-faq > div:first-child { border-top: 0; padding-top: 0; }
.docs-faq dt { color: var(--ink); font-weight: 620; }
.docs-faq dd { max-width: 66ch; margin-top: 4px; line-height: 1.6; }

@media (max-width: 1023px) {
  .docs-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 799px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { display: none; }
  .docs-toc { display: block; position: sticky; top: 58px; z-index: 20; margin: 0 -16px 8px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--hair); }
  .docs-toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--ink); font-weight: 600; list-style: none; }
  .docs-toc summary::-webkit-details-marker { display: none; }
  .docs-toc summary::after { content: '+'; color: var(--accent); font: 500 20px/1 var(--mono); }
  .docs-toc[open] summary::after { content: '−'; }
  .docs-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 12px; }
  .docs-section { padding-block: 32px; scroll-margin-top: 28px; }
  .docs-table th, .docs-table td { padding: 9px 10px; }
  .docs-kv tbody th { width: 38%; }
  .docs-table small { white-space: normal; }
}
