/* The docs layout: the Read register on the site's own inks (style.css). */

.docs {
  max-width: 1320px; margin: 0 auto; padding: 48px var(--gutter) 96px;
  display: grid; grid-template-columns: 210px minmax(0, 1fr) 200px; gap: 56px; align-items: start;
}
.docnav { grid-column: 1; grid-row: 1; }
.docs-main { grid-column: 2; grid-row: 1; max-width: 820px; min-width: 0; }
.toc { grid-column: 3; grid-row: 1; }
.docnav, .toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; font-size: 15px; }
.docnav h2, .toc h2 { font: 600 12.5px/1.4 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin: 22px 0 6px; }
.docnav h2:first-child, .toc h2 { margin-top: 0; }
.docnav ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.docnav a, .toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--rule); color: var(--ink-muted); text-decoration: none; }
.docnav a:hover, .toc a:hover { color: var(--ink); border-left-color: var(--rule-strong); }
.docnav a[aria-current="page"] { color: var(--ink); border-left: 2px solid var(--ink); padding-left: 11px; }
.toc a { font-size: 14px; }
.docnav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.docnav-label { display: none; }

.docs-main h1 { font: 400 clamp(34px, 3.6vw, 46px)/1.1 var(--display); letter-spacing: -0.005em; }
.docs-main h2 { font: 400 26px/1.25 var(--display); margin: 56px 0 14px; padding-top: 18px; border-top: 1px solid var(--rule); }
.docs-main h3 { margin: 28px 0 8px; }
.docs-main h4 { font: 600 15px/1.4 var(--text); margin: 18px 0 4px; }
.docs-main p, .docs-main ul, .docs-main ol { margin: 0 0 14px; }
.docs-main .lede { margin: 16px 0 0; }
.docs-main li + li { margin-top: 4px; }
.docs-main code { overflow-wrap: anywhere; }
.docs-main pre {
  margin: 0 0 16px; padding: 16px 18px; overflow-x: auto;
  background: var(--paper-sunken); border: 1px solid var(--rule); border-radius: 2px;
  font: 13.5px/1.55 var(--mono);
}
.docs-main pre code { font-size: inherit; overflow-wrap: normal; }
.docs-main :target { scroll-margin-top: 24px; }

.op { margin-top: 56px; }
.op h2 { margin-top: 0; }
.endpoint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 16px; }
.method { display: inline-block; min-width: 3.6em; padding: 1px 6px; border: 1px solid var(--rule-strong); border-radius: 2px; font: 600 12px/1.5 var(--mono); letter-spacing: 0.04em; text-align: center; }
.schema { font: 600 15px/1.4 var(--text); margin-top: 8px; }
.ctype { font-size: 14px; color: var(--ink-muted); }

.props { margin: 6px 0 18px; font-size: 14.5px; }
.props th, .props td { padding: 8px 14px 8px 0; }
.props td:first-child { white-space: nowrap; }
.props td:first-child code { font-weight: 600; }
.req, .opt { display: block; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-faint); }
.req { color: var(--seal); }
.props details { margin-top: 6px; }
.props summary { cursor: pointer; color: var(--ink-muted); font-size: 13.5px; }
.props .props { margin-bottom: 4px; }

.oplist { list-style: none; padding: 0; }
.oplist a { text-decoration: none; display: inline-flex; gap: 10px; align-items: baseline; }
.oplist a:hover code { text-decoration: underline; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.tiles section { border-top: 1px solid var(--ink); padding-top: 16px; }
.tiles h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: 22px; }
.tiles p { color: var(--ink-muted); font-size: 16px; }
.tiles ul { list-style: none; padding: 0; }

.docs-foot { border-top: 1px solid var(--rule); padding: 20px var(--gutter) 32px; color: var(--ink-muted); font-size: 14px; text-align: center; }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .docs { display: block; padding-top: 16px; }
  .docnav-label {
    display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--rule-strong); border-radius: 2px; font-size: 15px; cursor: pointer;
  }
  .docnav-label::after { content: "+"; font-family: var(--mono); }
  .docnav-toggle:checked + .docnav-label::after { content: "\2212"; }
  .docnav-toggle:focus-visible + .docnav-label { outline: 2px solid var(--seal); outline-offset: 2px; }
  .docnav { display: none; position: static; max-height: none; padding: 8px 0 16px; border-bottom: 1px solid var(--rule); }
  .docnav-toggle:checked ~ .docnav { display: block; }
  .docnav a { padding-top: 8px; padding-bottom: 8px; }
  .docs-main { margin-top: 28px; }
  .tiles { grid-template-columns: 1fr; }
  .props thead { display: none; }
  .props, .props tbody, .props tr, .props td { display: block; }
  .props tr { padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .props td { padding: 2px 0; border: 0; }
  .props td:first-child { white-space: normal; }
  .req, .opt { display: inline; margin-left: 6px; }
  .props .props { padding-left: 12px; border-left: 1px solid var(--rule); }
}
