/* Docs page. Tokens from system.css. Class prefix: docs- */
.docs-band { padding: 64px 0 112px; border-top: 0; }
.docs-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }

/* ---- contents ---- */
.docs-toc { position: sticky; top: calc(var(--head) + 24px); max-height: calc(100vh - var(--head) - 48px); overflow-y: auto; padding-right: 8px; }
.docs-toc h2, .docs-toc-m summary { font: 400 13px/1.4 var(--sans); color: var(--ink-3); margin-bottom: 8px; }
.docs-toc ol { display: grid; gap: 0; border-left: 1px solid var(--rule); }
.docs-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.docs-toc a[aria-current="true"] { color: var(--ink); font-weight: 500; border-left-color: var(--teal); }
.docs-toc-m { display: none; }

/* ---- article ---- */
.docs-main { min-width: 0; max-width: 760px; color: var(--ink); font-size: 17px; line-height: 1.6; }
.docs-title { font: 500 44px/1.08 var(--sans); letter-spacing: -0.03em; text-wrap: balance; }
.docs-updated { margin-top: 16px; font: 400 13px/1.4 var(--sans); color: var(--ink-3); }
.docs-note { margin-top: 24px; padding: 16px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.docs-note strong { color: var(--ink); font-weight: 600; }

.docs-sec { padding-top: 56px; margin-top: 56px; border-top: 1px solid var(--rule); }
.docs-sec:first-of-type { margin-top: 48px; }
.docs-main h2 { font: 500 32px/1.15 var(--sans); letter-spacing: -0.02em; margin-bottom: 20px; position: relative; }
.docs-main h2 .anchor { position: absolute; left: -28px; top: 0; width: 24px; text-decoration: none; color: var(--ink-3); font: 400 20px/1.5 var(--sans); opacity: 0; transition: opacity 0.15s var(--ease); }
.docs-main h2 .anchor:focus-visible { opacity: 1; }
.docs-main h3 { font: 500 20px/1.3 var(--sans); letter-spacing: -0.01em; margin: 36px 0 12px; }
.docs-main p { margin-top: 16px; max-width: 70ch; }
.docs-main h2 + p, .docs-main h3 + p { margin-top: 0; }
.docs-main a { color: var(--teal); }
.docs-main ul, .docs-main ol.docs-steps { margin-top: 16px; padding-left: 22px; max-width: 70ch; list-style: disc; display: grid; gap: 8px; }
.docs-main ol.docs-steps { list-style: decimal; }
.docs-main li::marker { color: var(--ink-3); }
.docs-main code { font: 400 0.88em/1 var(--mono); background: rgba(24, 24, 27, 0.05); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.docs-main .mono { font-family: var(--mono); }
.docs-formula { margin-top: 16px; padding: 16px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); font: 400 15px/1.7 var(--mono); overflow-x: auto; }

/* ---- code ---- */
.docs-code { margin-top: 16px; }
.docs-code-cap { font: 400 13px/1.4 var(--sans); color: var(--ink-3); margin-bottom: 6px; }
.docs-main pre { margin: 0; padding: 16px 20px; background: var(--ground); color: var(--text); border-radius: var(--r-lg); font: 400 13px/1.65 var(--mono); overflow-x: auto; tab-size: 2; }
.docs-main pre code { font: inherit; background: none; border: 0; padding: 0; color: inherit; overflow-wrap: normal; }

/* ---- tables ---- */
.docs-tw { margin-top: 20px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); overflow-x: auto; }
.docs-tw:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.docs-table caption { text-align: left; padding: 12px 16px; font: 400 13px/1.4 var(--sans); color: var(--ink-3); border-bottom: 1px solid var(--rule); }
.docs-table th { text-align: left; font: 400 13px/1.4 var(--sans); color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.docs-table td, .docs-table tbody th { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.docs-table tbody th { font: 500 13px/1.45 var(--mono); color: var(--ink); white-space: nowrap; letter-spacing: 0; }
.docs-table tr:last-child td, .docs-table tr:last-child th { border-bottom: 0; }
.docs-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 860px) { .docs-table .num { font-size: 13px; padding-left: 4px; padding-right: 4px; } }
.docs-table td.fig { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- definition lists ---- */
.docs-dl { margin-top: 20px; border-top: 1px solid var(--rule); }
.docs-dl > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.docs-dl dt { font-weight: 500; font-size: 15px; }
.docs-dl dd { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.docs-dl dd .mono, .docs-dl dt.mono { font-size: 14px; }

.docs-two { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.docs-two > div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 16px 20px; }
.docs-two h3 { margin: 0 0 8px; font-size: 17px; }
.docs-two ul { margin-top: 0; font-size: 15px; line-height: 1.5; max-width: none; }

.docs-main .qa { margin-top: 20px; }
.docs-main .qa details p { margin-top: 0; }

.site-foot .foot-grid .brand { display: inline-flex; padding: 0; }

@media (hover: hover) {
  .docs-toc a:hover { color: var(--ink); }
  .docs-main h2:hover .anchor { opacity: 1; }
  .docs-main a:hover { color: #0f4350; }
}

@media (max-width: 1100px) {
  .docs-grid { gap: 40px; grid-template-columns: 200px minmax(0, 1fr); }
  .docs-main h2 .anchor { display: none; }
}

@media (max-width: 860px) {
  .docs-band { padding: 24px 0 72px; }
  .docs-grid { display: block; }
  .docs-toc { display: none; }
  .docs-toc-m { display: block; position: sticky; top: var(--head); z-index: 5; margin: 0 calc(-1 * var(--gutter)) 24px; padding: 0 var(--gutter); background: var(--paper); border-bottom: 1px solid var(--rule); }
  .docs-toc-m summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin: 0; font: 500 15px/1 var(--sans); letter-spacing: 0; color: var(--ink); }
  .docs-toc-m summary::-webkit-details-marker { display: none; }
  .docs-toc-m summary::after { content: "+"; font: 400 20px/1 var(--sans); color: var(--ink-3); }
  .docs-toc-m[open] summary::after { content: "\2212"; }
  .docs-toc-m ol { padding-bottom: 12px; max-height: 60vh; overflow-y: auto; }
  .docs-toc-m a { display: block; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink-2); }
  .docs-main { font-size: 17px; }
  .docs-table th { white-space: normal; padding: 10px 8px; }
  .docs-table td { padding: 12px 8px; }
  .docs-table { font-size: 14px; }
  .docs-table th:first-child, .docs-table td:first-child { padding-left: 12px; }
  .docs-table th:last-child, .docs-table td:last-child { padding-right: 12px; }
  .docs-table td.fig { white-space: normal; }
  .docs-title { font-size: 32px; }
  .docs-sec { padding-top: 40px; margin-top: 40px; }
  .docs-main h2 { font-size: 26px; }
  .docs-two { grid-template-columns: 1fr; }
  .docs-dl > div { grid-template-columns: 1fr; gap: 4px; }

  /* the contract table becomes stacked cards */
  .docs-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .docs-stack, .docs-stack tbody, .docs-stack tr, .docs-stack th, .docs-stack td { display: block; }
  .docs-stack tr { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
  .docs-stack tr:last-child { border-bottom: 0; }
  .docs-stack tbody th, .docs-stack td { padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .docs-stack tbody th { margin-bottom: 6px; }
  .docs-stack td { margin-top: 4px; font-size: 15px; }
  .docs-stack td::before { content: attr(data-label) ": "; font: 400 13px/1.4 var(--sans); color: var(--ink-3); }
}
