/* Detion docs: same material as the home page, laid out like a book. */

:root {
  --void: #080a19;
  --white: #fff;
  --ink: #0a0707;
  --text: rgba(255, 255, 255, 0.84);
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --glass: rgba(17, 16, 15, 0.42);
  --glass-hover: rgba(26, 24, 22, 0.58);
  --coral: #ff6a55;
  --coral-soft: rgba(255, 106, 85, 0.13);
  --buy: #3ee6a0;
  --sell: #ff6a74;
  --amber: #f5b95b;
  --blue: #8fa4ff;

  --font-display: "STIX Two Text", "Times New Roman", serif;
  --font-ui: "Switzer", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-label: "General Sans", "Switzer", "Inter", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --top-h: 64px;
  --side-w: 288px;
  --toc-w: 248px;
  --pad: clamp(20px, 3.6vw, 56px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--void);
  color: var(--white);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-h) + 24px);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100svh;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

img {
  display: block;
}

button,
input,
a {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(255, 80, 60, 0.45);
  color: var(--white);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  translate: 0 -200%;
  transition: translate 0.2s ease;
}

.skip:focus {
  translate: 0 0;
}

/* Backdrop ------------------------------------------------------------------ */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--void);
  pointer-events: none;
}

.backdrop__img {
  position: absolute;
  left: 50%;
  top: 0;
  width: max(108.699%, 172.95svh);
  height: auto;
  max-width: none;
  transform: translate(-50%, -36.716%);
  filter: blur(48px) saturate(1.15) brightness(0.55);
  opacity: 0.9;
}

.backdrop__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 50% at 50% 112%, rgba(255, 80, 60, 0.2), transparent 70%),
    radial-gradient(50% 36% at 8% -4%, rgba(120, 110, 255, 0.14), transparent 70%);
}

.backdrop__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 25, 0.62) 0%, rgba(8, 10, 25, 0.84) 45%, rgba(8, 10, 25, 0.92) 100%);
}

/* Top bar -------------------------------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--top-h);
  padding: 0 clamp(16px, 2.2vw, 32px);
  background: rgba(8, 10, 25, 0.6);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.topbar__menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4.5px;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  border-radius: 10px;
}

.topbar__menu span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: translate 0.18s ease, rotate 0.18s ease, opacity 0.18s ease;
}

.is-nav-open .topbar__menu span:nth-child(1) {
  translate: 0 6px;
  rotate: 45deg;
}

.is-nav-open .topbar__menu span:nth-child(2) {
  opacity: 0;
}

.is-nav-open .topbar__menu span:nth-child(3) {
  translate: 0 -6px;
  rotate: -45deg;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.brand__mark {
  height: 30px;
  width: auto;
  aspect-ratio: 1856 / 2304;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.topbar__tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--coral-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 106, 85, 0.28);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #ffb4a8;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  max-width: 420px;
  min-width: 0;
  height: 40px;
  margin-inline: auto;
  padding: 0 8px 0 14px;
  border-radius: 11px;
  background: rgba(10, 7, 7, 0.4);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.search-btn:hover {
  background: rgba(26, 24, 22, 0.6);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--white);
}

.search-btn .ico {
  width: 18px;
  height: 18px;
}

.search-btn__text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__link {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.topbar__link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 11px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.button--solid {
  background: #e9e9e9;
  color: var(--ink);
}

.button--solid:hover {
  background: var(--white);
}

.button--ghost {
  background: rgba(10, 7, 7, 0.35);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--white);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Layout --------------------------------------------------------------------- */

.docs {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1560px;
  margin: 0 auto;
  padding-top: var(--top-h);
}

.sidebar {
  position: sticky;
  top: var(--top-h);
  align-self: start;
  height: calc(100svh - var(--top-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 18px 48px var(--pad);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.nav-group + .nav-group {
  margin-top: 26px;
}

.nav-group__label {
  padding: 0 12px 8px;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav-group ul {
  list-style: none;
}

.nav-link {
  position: relative;
  display: block;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link[aria-current="page"] {
  color: var(--white);
  font-weight: 500;
  background: var(--coral-soft);
}

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--coral);
}

.article {
  min-width: 0;
  padding: 44px var(--pad) 72px;
}

.article > * {
  max-width: 760px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--font-label);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--faint);
}

.crumbs a:hover {
  color: var(--white);
}

.page-head {
  margin-bottom: 32px;
}

.page-head__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 13px;
  background: var(--coral-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 106, 85, 0.28);
  color: #ffb4a8;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1;
  letter-spacing: -0.055em;
  color: var(--white);
  text-wrap: balance;
}

.page-lead {
  margin-top: 18px;
  font-size: clamp(17px, 1.5vw, 19.5px);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--muted);
  text-wrap: pretty;
}

.ico {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Prose ---------------------------------------------------------------------- */

.prose {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 16.5px;
  line-height: 1.7;
  letter-spacing: -0.003em;
}

.prose > * + * {
  margin-top: 18px;
}

.prose p {
  text-wrap: pretty;
}

.prose strong {
  font-weight: 600;
  color: var(--white);
}

.prose a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: rgba(255, 106, 85, 0.65);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.prose a:hover {
  text-decoration-color: var(--coral);
  color: #ffd0c8;
}

.prose h2,
.prose h3 {
  position: relative;
  color: var(--white);
}

.prose h2 {
  margin-top: 56px;
  padding-top: 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.prose h3 {
  margin-top: 36px;
  font-weight: 600;
  font-size: 18.5px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 14px;
}

.prose .anchor {
  position: absolute;
  left: -26px;
  top: 50%;
  translate: 0 -50%;
  padding: 4px 6px;
  font-family: var(--font-label);
  font-size: 0.7em;
  text-decoration: none;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose .anchor:focus-visible {
  opacity: 1;
}

.prose .anchor:hover {
  color: var(--coral);
}

.prose ul,
.prose ol {
  display: grid;
  gap: 8px;
  list-style: none;
  counter-reset: item;
}

.prose li {
  position: relative;
  padding-left: 26px;
}

.prose li > ul,
.prose li > ol,
.prose li > p,
.prose li > .callout {
  margin-top: 8px;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.8em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.prose ol > li {
  counter-increment: item;
  padding-left: 40px;
}

.prose ol > li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.18em;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1;
  color: var(--white);
}

.prose code {
  padding: 0.14em 0.42em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: #fff;
  word-break: break-word;
}

.prose hr {
  height: 1px;
  margin-block: 40px;
  border: 0;
  background: var(--line);
}

.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
}

.prose kbd {
  vertical-align: 0.05em;
}

.code {
  position: relative;
  margin: 0;
  border-radius: 14px;
  background: rgba(8, 9, 20, 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
}

.code figcaption {
  padding: 10px 16px 0;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.code pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  tab-size: 2;
}

.prose .code code {
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  word-break: normal;
}

.code__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.code:hover .code__copy,
.code__copy:focus-visible {
  opacity: 1;
}

.code__copy:hover {
  color: var(--white);
}

/* Callouts ------------------------------------------------------------------- */

.callout {
  --tone: var(--blue);
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 9%, rgba(17, 16, 15, 0.5));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent);
  font-size: 15.5px;
  line-height: 1.6;
}

.callout--tip {
  --tone: var(--buy);
}

.callout--warning {
  --tone: var(--amber);
}

.callout--danger {
  --tone: var(--sell);
}

.callout__ico {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--tone);
}

.callout__body {
  min-width: 0;
}

.callout__body > * + * {
  margin-top: 8px;
}

.callout__title {
  font-weight: 600;
  color: var(--white);
}

/* Tables --------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
  scrollbar-width: thin;
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.prose th {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.prose td {
  padding: 12px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td:first-child {
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
}

/* Cards ---------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 18px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  text-decoration: none !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, translate 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover {
  translate: 0 -3px;
  background: var(--glass-hover);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.card__title {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--white);
}

.card__text {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

.card__go {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  color: var(--faint);
  opacity: 0;
  translate: -4px 4px;
  transition: opacity 0.2s ease, translate 0.2s ease, color 0.2s ease;
}

.card:hover .card__go {
  opacity: 1;
  translate: 0 0;
  color: var(--white);
}

/* Figures -------------------------------------------------------------------- */

.figure {
  margin: 0;
  padding: 20px;
  border-radius: 18px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
}

.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--faint);
}

.figure text {
  font-family: var(--font-ui);
}

/* Pagination + footer --------------------------------------------------------- */

.pn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
}

.pn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, translate 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pn:hover {
  translate: 0 -3px;
  background: var(--glass-hover);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.pn--next {
  justify-content: space-between;
  text-align: right;
  grid-column: 2;
}

.pn--prev {
  grid-column: 1;
}

.pn__label {
  display: block;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.pn__title {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 16px;
  color: var(--white);
}

.pn .ico {
  color: var(--muted);
}

.doc-foot {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--faint);
}

/* On this page ----------------------------------------------------------------- */

.toc {
  position: sticky;
  top: var(--top-h);
  align-self: start;
  max-height: calc(100svh - var(--top-h));
  overflow-y: auto;
  padding: 48px var(--pad) 40px 8px;
  scrollbar-width: thin;
}

.toc__label {
  margin-bottom: 12px;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.toc ul,
.toc-inline ul {
  list-style: none;
}

.toc ul {
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 1px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  color: var(--white);
}

.toc a.is-active {
  color: var(--white);
  border-left-color: var(--coral);
}

.toc__item--3 a {
  padding-left: 28px;
  font-size: 13px;
}

.toc-inline {
  display: none;
  margin-bottom: 24px;
  border-radius: 14px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
}

.toc-inline summary {
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
  list-style: none;
}

.toc-inline summary::-webkit-details-marker {
  display: none;
}

.toc-inline summary::after {
  content: "+";
  float: right;
  color: var(--faint);
}

.toc-inline[open] summary::after {
  content: "–";
}

.toc-inline ul {
  padding: 0 16px 14px;
}

.toc-inline a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--muted);
}

.toc-inline .toc__item--3 a {
  padding-left: 14px;
}

/* Search ----------------------------------------------------------------------- */

.search {
  width: min(660px, calc(100vw - 24px));
  max-height: min(560px, calc(100svh - 24px));
  margin: 12vh auto auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: rgba(15, 15, 24, 0.9);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  color: var(--text);
  overflow: hidden;
}

.search[open] {
  display: flex;
  flex-direction: column;
  animation: search-in 0.18s ease both;
}

.search::backdrop {
  background: rgba(4, 5, 14, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

@keyframes search-in {
  from {
    opacity: 0;
    translate: 0 -8px;
    scale: 0.985;
  }
}

.search__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  height: 62px;
  border-bottom: 1px solid var(--line);
}

.search__ico {
  color: var(--faint);
}

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  font-size: 17px;
  color: var(--white);
}

.search__input::placeholder {
  color: var(--faint);
}

.search__input::-webkit-search-cancel-button {
  display: none;
}

.search__results {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
}

.search__label {
  padding: 10px 12px 6px;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.search__empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}

.result {
  display: block;
  padding: 11px 12px;
  border-radius: 11px;
  text-decoration: none;
}

.result[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
}

.result__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result__title {
  font-weight: 500;
  font-size: 15px;
  color: var(--white);
}

.result__group {
  margin-left: auto;
  font-family: var(--font-label);
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

.result__snippet {
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result mark {
  background: rgba(255, 106, 85, 0.28);
  color: var(--white);
  border-radius: 3px;
  padding: 0 1px;
}

.search__foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
}

.search__foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.search__close {
  display: inline-flex;
}

/* Scrim for the mobile drawer ------------------------------------------------------ */

.scrim {
  position: fixed;
  inset: var(--top-h) 0 0 0;
  z-index: 29;
  background: rgba(4, 5, 14, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Responsive -------------------------------------------------------------------- */

@media (max-width: 1180px) {
  :root {
    --side-w: 264px;
  }

  .docs {
    grid-template-columns: var(--side-w) minmax(0, 1fr);
  }

  .toc {
    display: none;
  }

  .toc-inline {
    display: block;
  }

  .prose .anchor {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --top-h: 58px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar__menu {
    display: flex;
  }

  .topbar__link,
  .topbar__tag {
    display: none;
  }

  .brand__name {
    font-size: 24px;
  }

  .search-btn {
    max-width: none;
  }

  .docs {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: var(--top-h);
    left: 0;
    bottom: auto;
    z-index: 30;
    align-self: auto;
    width: min(320px, 86vw);
    height: calc(100svh - var(--top-h));
    padding: 20px 16px 40px;
    background: rgba(10, 11, 24, 0.94);
    border-right: 1px solid var(--line-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    translate: -102% 0;
    transition: translate 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .is-nav-open .sidebar {
    translate: 0 0;
  }

  .is-nav-open .scrim {
    opacity: 1;
    visibility: visible;
  }

  .is-nav-open {
    overflow: hidden;
  }

  .article {
    padding-top: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 18px;
  }

  .topbar .button {
    display: none;
  }

  .search-btn kbd {
    display: none;
  }

  .search {
    margin-top: 8vh;
  }

  .prose {
    font-size: 16px;
  }

  .pn-row {
    grid-template-columns: 1fr;
  }

  .pn--next,
  .pn--prev {
    grid-column: 1;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .figure {
    overflow-x: auto;
    padding: 16px;
    scrollbar-width: thin;
  }

  .figure svg {
    min-width: 520px;
  }

  .search__foot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
