/* Docs: text first, like product docs. A top bar with search, the pages on the left,
   one reading column, and "On this page" on the right. Inter for reading, Fraunces for titles. */
body.docs-page {
  font-family: var(--sans);
  font-variation-settings: normal;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.7;
  --ink-2: color-mix(in srgb, var(--ink) 74%, var(--bg));
  --bar-h: 60px;
}
.docs-page h1, .docs-page h2, .docs-page .brand { font-family: var(--serif); font-variation-settings: "SOFT" 100, "WONK" 1; }
.docs-page h2, .docs-page h3 { scroll-margin-top: calc(var(--bar-h) + 24px); }

/* ---------- top bar ---------- */
.dbar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.dbar-in { height: var(--bar-h); display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter-r) 0 var(--gutter); max-width: 1480px; margin: 0 auto; }
.dbar .brand { font-size: 1.15rem; font-weight: 480; gap: 9px; }
.dbar .brand .sub { font-family: var(--sans); font-size: .76rem; font-weight: 500; color: var(--muted); padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; margin-left: 2px; }
.search-btn {
  flex: 0 1 20rem; margin-left: auto; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  font: 400 .86rem/1 var(--sans); color: var(--muted); cursor: pointer; transition: border-color .2s ease;
}
.search-btn:hover { border-color: var(--muted); }
.search-btn svg { width: 15px; height: 15px; flex: none; }
.search-btn span { flex: 1; text-align: left; }
.dnav { display: flex; align-items: center; gap: 18px; margin-left: auto; font-size: .88rem; }
.dnav a:not(.btn) { color: var(--ink-2); background: none; }
.dnav a:not(.btn):hover { color: var(--ink); }
.dnav .btn.sm { font-size: .84rem; padding: .45em 1em; }
.menu-btn { display: none; width: 36px; height: 36px; margin-left: -8px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 8px; }
.menu-btn svg { width: 18px; height: 18px; }
kbd { font: 500 .72rem/1 var(--sans); color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; }

/* ---------- three columns ---------- */
.dwrap {
  display: grid; grid-template-columns: 15.5rem minmax(0, 1fr) 13rem; gap: 56px;
  max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter);
}

/* pages */
.side {
  position: sticky; top: var(--bar-h); align-self: start; max-height: calc(100vh - var(--bar-h)); overflow-y: auto;
  padding: 32px 4px 48px 0; font-size: .9rem; scrollbar-width: thin;
}
.side-group { font-weight: 600; font-size: .8rem; color: var(--ink); margin: 26px 0 6px; }
.side-group:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.side a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 7px; color: var(--ink-2); background: none; line-height: 1.45; }
.side a:hover { color: var(--ink); background: color-mix(in srgb, var(--mark) 50%, transparent); }
.side a[aria-current] { color: var(--ink); background: var(--mark); font-weight: 500; }

/* on this page */
.toc { position: sticky; top: var(--bar-h); align-self: start; padding: 40px 0; font-size: .82rem; }
.toc p { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); background: none; line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--ink); }

/* ---------- the page ---------- */
.doc { min-width: 0; width: 100%; max-width: 47rem; justify-self: center; padding: 40px 0 0; color: var(--ink); }
.doc .eyebrow { font-size: .84rem; font-weight: 500; color: var(--warn); }
.doc h1 { font-size: clamp(1.9rem, 3vw, 2.35rem); font-weight: 460; line-height: 1.15; letter-spacing: -.015em; margin-top: 6px; }
.doc .lead { font-size: 1.1rem; line-height: 1.6; color: var(--ink-2); max-width: none; margin-top: 12px; }
.doc h2 { font-size: 1.5rem; font-weight: 480; line-height: 1.25; letter-spacing: -.01em; margin: 2.6rem 0 0; }
.doc h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.4; margin: 1.9rem 0 0; }
.doc h2 + h3 { margin-top: 1.1rem; }
.doc .anchor { background: none; color: inherit; }
.doc p, .doc ul, .doc ol, .doc .code, .doc .callout, .doc .table-wrap, .doc dl { margin-top: 1rem; }
.doc h2 + p, .doc h3 + p { margin-top: .6rem; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: .35rem; }
.doc li::marker { color: var(--muted); }
.doc strong, .doc b { font-weight: 600; }
.doc a:not(.anchor):not(.btn) {
  background: none; text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 500;
}
.doc a:not(.anchor):not(.btn):hover { text-decoration-color: var(--ink); }
.doc :not(pre) > code {
  font: 400 .86em/1 var(--mono); background: var(--bar); border: 1px solid var(--line); border-radius: 5px; padding: .14em .38em;
  overflow-wrap: anywhere;
}

/* code blocks with a label and a copy button */
.code { border: 1px solid var(--line); border-radius: 11px; background: var(--card); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 8px 5px 14px; border-bottom: 1px solid var(--line); background: var(--bar); font-size: .76rem; color: var(--muted); }
.copy { border: 0; background: none; font: 500 .74rem/1 var(--sans); color: var(--muted); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.copy:hover { color: var(--ink); background: var(--card); }
.code pre { margin: 0; padding: 13px 16px; overflow-x: auto; font: 400 .82rem/1.7 var(--mono); }
.code pre .c { color: var(--muted); }

/* callouts */
.callout { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 12px 16px; border-radius: 11px; border: 1px solid var(--line); background: color-mix(in srgb, var(--mark) 55%, var(--bg)); font-size: .94rem; }
.callout > svg { width: 18px; height: 18px; margin-top: 3px; color: var(--ink-2); }
.callout p { margin: 0 !important; }
.callout p + p { margin-top: .5rem !important; }
.callout.warning { background: color-mix(in srgb, var(--warn) 9%, var(--bg)); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.callout.warning > svg { color: var(--warn); }

/* tables */
.table-wrap { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.55; }
.doc th { text-align: left; font-weight: 600; padding: 0 16px 8px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.doc td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc td:first-child code { white-space: nowrap; }

/* steps */
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps > li { position: relative; counter-increment: step; padding: 0 0 1.6rem 2.6rem; margin: 0 !important; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.65rem; height: 1.65rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: .78rem; font-weight: 600;
}
.steps > li::after { content: ""; position: absolute; left: calc(.825rem - .5px); top: 2rem; bottom: .3rem; width: 1px; background: var(--line); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps .step-title { display: block; font-weight: 600; }
.steps .step-title + p { margin-top: .2rem; }
.steps .code { margin-top: .7rem; }

/* short label/value pairs */
.doc dl.defs { display: grid; grid-template-columns: 9rem minmax(0, 1fr); }
.doc dl.defs dt, .doc dl.defs dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.doc dl.defs dt { font-weight: 600; }

/* previous / next */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 3.5rem; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: none; transition: border-color .2s ease; }
.pager a:hover { border-color: var(--muted); background-image: none; }
.pager a span { font-size: .78rem; color: var(--muted); }
.pager a b { font-weight: 500; }
.pager .next { grid-column: 2; text-align: right; }
.dfoot { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 40px; padding: 20px 0 40px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.dfoot a, .dfoot .share { background: none; color: inherit; font-size: inherit; }
.dfoot a:hover, .dfoot .share:hover { color: var(--ink); }

/* ---------- search ---------- */
.search-dlg { width: min(38rem, calc(100vw - 32px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); font-family: var(--sans); }
.search-dlg::backdrop { background: rgba(20, 18, 15, .35); }
.search-dlg form { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-dlg form svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search-dlg input { flex: 1; min-width: 0; height: 54px; border: 0; background: none; font: 400 1rem/1 var(--sans); color: var(--ink); outline: none; }
.search-dlg ul { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 26rem); overflow-y: auto; }
.search-dlg li a { display: grid; gap: 2px; padding: 9px 12px; border-radius: 8px; background: none; }
.search-dlg li a[aria-selected="true"] { background: var(--mark); }
.search-dlg li small { font-size: .74rem; color: var(--muted); }
.search-dlg li b { font-weight: 500; font-size: .94rem; }
.search-dlg li span { font-size: .82rem; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.search-dlg .empty { padding: 18px 12px; color: var(--muted); font-size: .9rem; }

/* ---------- smaller screens ---------- */
@media (max-width: 1240px) {
  .dwrap { grid-template-columns: 15rem minmax(0, 1fr); gap: 48px; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .dwrap { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: grid; place-items: center; }
  .side {
    position: fixed; z-index: 25; top: var(--bar-h); left: 0; bottom: 0; width: min(18rem, 85vw); max-height: none;
    padding: 24px 20px 40px var(--gutter); background: var(--bg); border-right: 1px solid var(--line);
    transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
  }
  body.side-open .side { transform: none; visibility: visible; box-shadow: var(--shadow); }
  .search-btn { flex: 0 0 auto; width: 36px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .dnav { margin-left: 0; }
  .doc { padding-top: 28px; }
}
@media (max-width: 560px) {
  .dnav a:not(.btn) { display: none; }
  .doc dl.defs { grid-template-columns: minmax(0, 1fr); }
  .doc dl.defs dt { border-bottom: 0; padding-bottom: 0; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; }
}
