/* documentation and legal pages: one readable column, a contents rail on wide screens, same system as home */
.doc { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 46rem); column-gap: clamp(32px, 6vw, 96px); row-gap: var(--sp-head); padding: calc(var(--top) + var(--sp-head)) var(--gutter) var(--sp-section); }
.doc-head { grid-column: 1 / -1; max-width: 52rem; }
.doc-head h1 { margin: 0; font-size: var(--s-title); }
.doc-head .lead { margin: var(--sp-block) 0 0; font-size: var(--s-lead); color: var(--ink-2); line-height: 1.5; max-width: 40rem; }
.doc-head .meta { margin-top: 14px; font-size: var(--cap-size); color: var(--cap-color); }
.doc-toc { position: sticky; top: calc(var(--top) + 24px); align-self: start; font-size: var(--s-small); }
.doc-toc p { margin: 0 0 10px; font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; font-weight: var(--label-weight); color: var(--label-color); }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; border-left: 1px solid var(--grey-2); }
.doc-toc a { display: block; padding-left: 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.doc-toc a:hover, .doc-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--blue); }
.doc-body { min-width: 0; font-size: 1.06rem; line-height: 1.65; color: var(--ink); }
.doc-body h2 { margin: 2.6em 0 .6em; font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; scroll-margin-top: calc(var(--top) + 20px); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin: 1.8em 0 .4em; font-size: 1.12rem; font-weight: 600; }
.doc-body p, .doc-body ul, .doc-body ol { margin: 0 0 1em; }
.doc-body ul, .doc-body ol { padding-left: 1.3em; }
.doc-body li { margin: .3em 0; }
.doc-body li::marker { color: var(--blue); }
.doc-body a { color: var(--ink); text-decoration-color: var(--blue); text-underline-offset: .2em; }
.doc-body a:hover { color: var(--blue); }
.doc-body strong { font-weight: 600; }
.doc-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--grey-1); padding: .1em .35em; }
/* tables never cut their text: cells wrap, long codes break where they must, and the widest column is the one
   that explains (Meaning, What it is for). On a phone the three-column tables stack, one block per row. */
.doc-body .tbl { margin: 1em 0 1.6em; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .95rem; }
.doc-body .tbl table { margin: 0; }
.doc-body td, .doc-body td code { overflow-wrap: anywhere; }
.doc-body table.stack { table-layout: fixed; }
.doc-body table.row3 th:nth-child(1) { width: 24%; }
.doc-body table.row3 th:nth-child(2) { width: 21%; }
.doc-body table.row2 th:nth-child(1) { width: 24%; }
.doc-body table.counts .lab { color: var(--ink-3); margin-left: .45em; }
.doc-body pre { overflow-x: auto; background: var(--grey-1); padding: 14px 16px; font-size: .86rem; line-height: 1.5; margin: 0 0 1.2em; }
.doc-body pre code { background: none; padding: 0; }
.doc-body th { text-align: left; font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; font-weight: var(--label-weight); color: var(--label-color); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink); }
.doc-body td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--grey-2); vertical-align: top; }
.doc-body td.num, .doc-body th.num { text-align: right; font-feature-settings: "kern" 1, "tnum" 1; }
.doc-body dl.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 1.4em; }
.doc-body dl.facts-list dt { color: var(--ink-3); }
.doc-body dl.facts-list dd { margin: 0; }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .doc-toc { position: static; }
  .doc-body { font-size: 1rem; }
}
@media (max-width: 720px) {
  .doc-body table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc-body table.stack, .doc-body table.stack tbody, .doc-body table.stack tr, .doc-body table.stack td { display: block; width: auto; }
  .doc-body table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--grey-2); }
  .doc-body table.stack tbody tr:first-child { border-top: 1px solid var(--ink); }
  .doc-body table.stack td { padding: 0; border: 0; }
  .doc-body table.stack td + td { margin-top: 8px; }
  .doc-body table.stack td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 2px; font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; font-weight: var(--label-weight); color: var(--label-color); }
}
@media print {
  .top, .foot, .doc-toc, .skip, dialog, .btn { display: none !important; }
  .doc { display: block; padding: 0; }
  .doc-body { font-size: 11pt; }
  .doc-body a { color: inherit; text-decoration: underline; }
  .doc-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  body { color: #000; }
}

/* the method note: compact tables, a total row, and the reading table's columns */
.doc-body table.compact { max-width: 34rem; }
.doc-body tr.total td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 0; }
.doc-body table.reading { table-layout: fixed; }
.doc-body table.reading th:nth-child(1) { width: 26%; }
.doc-body table.reading th:nth-child(3) { width: 18%; }
@media (max-width: 720px) {
  .doc-body table.reading td.num { text-align: left; }
}
