/* The docs pages, on top of style.css. */
.docs-page { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 56px; align-items: start; padding-top: 32px; padding-bottom: 120px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.docs-jump { display: none; }

/* The sidebar: every page, grouped. */
.docs-nav { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 24px 2px; font-size: 15px; }
.docs-search { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 0 8px 0 12px; height: 40px; border: 1px solid var(--rule); border-radius: 10px; background: var(--win); color: var(--soft); cursor: text; }
.docs-search[hidden] { display: none; }
.docs-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.docs-search .icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.docs-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; }
.docs-search input::-webkit-search-cancel-button { display: none; }
.docs-search kbd { padding: 1px 6px; border: 1px solid var(--rule); border-radius: 6px; font: 500 12px/1.5 var(--mono); color: var(--soft); }
.docs-empty { margin: 0 0 16px 12px; color: var(--soft); }
.docs-group { margin: 0 0 18px; }
.docs-group[hidden] { display: none; }
.docs-group-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; padding: 0 8px 0 12px; font: 800 13px/1.6 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
summary.docs-group-title { cursor: pointer; list-style: none; }
summary.docs-group-title::-webkit-details-marker { display: none; }
summary.docs-group-title:hover { color: var(--ink); }
.docs-group-title .icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
details.docs-group:not([open]) .icon { transform: rotate(-90deg); }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li[hidden] { display: none; }
.docs-nav li a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.docs-nav li a:hover { background: var(--winbar); }
.docs-nav li a[aria-current="page"] { background: var(--winbar); font-weight: 700; box-shadow: inset 3px 0 0 var(--blue); }
.docs-nav li a.is-first { outline: 2px solid var(--blue); outline-offset: -2px; }

/* On this page. */
.docs-toc { position: sticky; top: 24px; font-size: 14px; }
.docs-toc p { margin: 0 0 10px; font-weight: 700; }
.docs-toc ul { list-style: none; margin: 0 0 22px; padding: 0; border-left: 2px solid var(--rule); }
.docs-toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--soft); text-decoration: none; line-height: 1.35; }
.docs-toc li a:hover { color: var(--ink); border-left-color: var(--blue); }
.docs-toc .docs-raw { font-weight: 400; color: var(--soft); }
.docs-toc .docs-raw a { color: var(--ink); text-decoration-color: var(--blue); text-underline-offset: .2em; }

.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; }
.docs .docs-pager a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; font-weight: 700; line-height: 1.35; }
.docs .docs-pager a:hover { border-color: var(--blue); }
.docs-pager span { font-size: 13px; font-weight: 400; color: var(--soft); }
.docs-pager-next { text-align: right; grid-column: 2; }

.docs { max-width: 780px; min-width: 0; font-size: 17px; line-height: 1.65; }
.docs h1 { font-size: clamp(52px, 6vw, 80px); margin-bottom: 26px; }
.docs h2 { font-size: clamp(30px, 3.2vw, 40px); margin: 64px 0 16px; scroll-margin-top: 24px; }
.docs h3 { font: 800 23px/1.2 var(--display); letter-spacing: -.02em; margin: 40px 0 12px; scroll-margin-top: 24px; }
.docs h1 + p { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--soft); }
.docs .anchor { margin-left: .3em; color: var(--rule); text-decoration: none; font-weight: 600; opacity: 0; transition: opacity .2s; }
.docs h2:hover .anchor, .docs h3:hover .anchor { opacity: 1; }
.docs p { margin: 0 0 16px; }
.docs ul, .docs ol { margin: 0 0 18px; padding-left: 22px; }
.docs li { padding: 3px 0; }
.docs li::marker { color: var(--blue); }
.docs li > pre { margin: 10px 0; }
.docs a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.docs strong { font-weight: 700; }
.docs :not(pre) > code { padding: .08em .35em; border-radius: 6px; background: var(--winbar); overflow-wrap: anywhere; }

.docs pre { margin: 0 0 22px; padding: 16px 18px; border-radius: 12px; background: var(--term); color: var(--term-text); border: 1px solid var(--term-line); overflow-x: auto; font: 400 13.5px/1.7 var(--mono); }
.docs pre code { font: inherit; }
/* JetBrains Mono draws => and </ as ligatures; in docs they should read as typed. */
.docs code, .docs pre code { font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }
.docs h2 code, .docs h3 code { font-size: .8em; font-weight: 700; padding: 0; background: none; letter-spacing: -.02em; }

.docs .table { margin: 0 0 24px; overflow-x: auto; }
.docs table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.docs th, .docs td { text-align: left; vertical-align: top; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--rule); }
.docs th { font-weight: 700; border-bottom-width: 2px; }
.docs td:first-child { white-space: nowrap; }
.docs td:first-child code { white-space: nowrap; }
.docs td code { overflow-wrap: normal; }

@media (max-width: 1180px) {
  .docs-page { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
  .docs-toc { display: none; }
}
@media (max-width: 860px) {
  .docs-page { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 16px; }
  .docs-jump { display: inline-block; justify-self: start; color: var(--soft); font-size: 15px; text-decoration-color: var(--blue); text-underline-offset: .2em; }
  .docs-nav { position: static; max-height: none; overflow: visible; order: 2; padding-top: 24px; border-top: 1px solid var(--rule); }
  .docs-search kbd { display: none; }
  .docs-pager { grid-template-columns: minmax(0, 1fr); }
  .docs-pager-next { grid-column: 1; }
}
