/* Documentation pages: the site's nav and type, on mist by day and black by night. */
:root { color-scheme: light dark; }
.docs-body { background: var(--mist); color: var(--ink); --muted: var(--ink-2); --rule: var(--line-light); --code-bg: rgba(27, 45, 63, .07); --link: #1f6fb2; --side: #e3eaf0; --note: #dbe6ef; }
@media (prefers-color-scheme: dark) {
  .docs-body { background: var(--black); color: #e8ecf0; --muted: var(--on-black-2); --rule: var(--line-dark); --code-bg: rgba(255, 255, 255, .08); --link: var(--rain); --side: #0d1117; --note: #0f1a26; }
}

.docs { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); max-width: 1180px; margin: 0 auto; padding: calc(var(--nav-h) + 40px) var(--gutter) 96px; }
.side { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; max-height: calc(100vh - var(--nav-h) - 48px); overflow: auto; font-size: .9375rem; padding-left: 12px; margin-left: -12px; }
.side h2 { font: 500 .8125rem/1.3 Inter, sans-serif; color: var(--muted); margin: 26px 0 8px; }
.side h2:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 5px 12px; margin-left: -12px; border-radius: 8px; text-decoration: none; color: inherit; }
.side a:hover { background: var(--code-bg); }
.side a[aria-current="page"] { background: var(--ink); color: var(--white); }
@media (prefers-color-scheme: dark) { .side a[aria-current="page"] { background: var(--white); color: var(--black); } }

.article { max-width: 44rem; min-width: 0; }
.article > header { margin-bottom: 40px; }
.article h1 { font: 200 clamp(2.5rem, 5.4vw, 4rem)/1 Outfit, sans-serif; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.article .intro { font-size: 1.25rem; line-height: 1.5; color: var(--muted); margin: 18px 0 0; text-wrap: pretty; }
.article h2 { font: 300 1.875rem/1.15 Outfit, sans-serif; letter-spacing: -.02em; margin: 56px 0 14px; padding-top: 8px; }
.article h3 { font: 500 1.1875rem/1.3 Outfit, sans-serif; margin: 32px 0 8px; }
.article p, .article li { line-height: 1.68; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 18px; }
.article li { margin: 4px 0; }
.article a { color: var(--link); text-underline-offset: 3px; }
.article strong { font-weight: 600; }
.article code { font: .875em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--code-bg); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.article pre { background: var(--side); border-radius: 14px; padding: 16px 18px; overflow-x: auto; margin: 0 0 20px; }
.article pre code { background: none; padding: 0; font-size: .875rem; }
.path { font-weight: 500; }
.note { background: var(--note); border-radius: 16px; padding: 16px 20px; margin: 24px 0; }
.note p:last-child { margin-bottom: 0; }

/* Steps that really are a sequence. */
.article ol.steps-list { counter-reset: s; list-style: none; padding: 0; }
.article ol.steps-list > li { counter-increment: s; position: relative; padding-left: 48px; margin: 18px 0; }
.article ol.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: -6px; font: 200 2rem/1 Outfit, sans-serif; color: var(--muted); }

/* Settings and other reference tables */
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
.article table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.article th, .article td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); }
.article th { font-weight: 600; font-size: .875rem; color: var(--muted); }
.article td:first-child { font-weight: 500; white-space: nowrap; }
.article td.wrap { white-space: normal; }

/* Index of pages on the overview */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 32px; }
.cards a { display: block; padding: 18px 20px; border-radius: 16px; background: var(--side); text-decoration: none; color: inherit; }
.cards a:hover { box-shadow: inset 0 0 0 1.5px var(--link); }
.cards b { display: block; font: 400 1.1875rem/1.25 Outfit, sans-serif; margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: .9375rem; line-height: 1.5; display: block; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rule); }
.pager a { text-decoration: none; color: var(--link); font-weight: 500; }
.pager span { display: block; font-size: .8125rem; color: var(--muted); font-weight: 400; }
.pager .next { text-align: right; margin-left: auto; }

.docs-body .foot { border-top: 0; }

@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--nav-h) + 16px); }
  .side { position: static; max-height: none; overflow: visible; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 12px; border-bottom: 1px solid var(--rule); }
  .side nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .side h2 { display: none; }
  .side ul { display: contents; }
  .side a { white-space: nowrap; margin: 0; padding: 7px 12px; background: var(--code-bg); border-radius: 999px; font-size: .875rem; }
  .cards { grid-template-columns: 1fr; }
}
