/* Urmi Docs theme — calm, editorial, dense but readable. No framework. */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --petrol: #083241;
  --orange: #aa412a;
  --forest: #2c3827;
  --lavender: #c5bace;
  --warm-black: #100f0f;
  --line-orange: #c68277;
  --line-blue: #5c767e;

  --bg: #fdfcfb;
  --bg-elev: #ffffff;
  --bg-sidebar: #faf7f5;
  --bg-subtle: #f6f2f0;
  --bg-hover: #f1eae7;
  --bg-active: rgba(8, 50, 65, 0.075);
  --bg-topbar: rgba(253, 252, 251, 0.86);
  --border: #e8e2df;
  --border-strong: #d7d2d0;
  --text: #2a2725;
  --text-strong: #100f0f;
  --text-muted: #575452;
  --text-faint: #6b6765;
  --link: #083241;
  --link-line: rgba(8, 50, 65, 0.32);
  --accent: #aa412a;
  --primary: #083241;
  --primary-hover: #0c4357;
  --on-primary: #ffffff;
  --focus: #aa412a;
  --mark: rgba(198, 130, 119, 0.3);
  --scrim: rgba(16, 15, 15, 0.42);
  --shadow-sm: 0 1px 2px rgba(16, 15, 15, 0.05);
  --shadow-md: 0 1px 2px rgba(16, 15, 15, 0.05), 0 6px 18px -6px rgba(16, 15, 15, 0.12);
  --shadow-lg: 0 2px 6px rgba(16, 15, 15, 0.06), 0 24px 60px -12px rgba(16, 15, 15, 0.28);

  --note: #3f5f69;
  --note-bg: rgba(92, 118, 126, 0.08);
  --note-line: rgba(92, 118, 126, 0.45);
  --tip: #2c4a26;
  --tip-bg: rgba(44, 56, 39, 0.06);
  --tip-line: rgba(44, 74, 38, 0.4);
  --warn: #8f4a3d;
  --warn-bg: rgba(198, 130, 119, 0.13);
  --warn-line: rgba(198, 130, 119, 0.75);
  --danger: #9a3a26;
  --danger-bg: rgba(170, 65, 42, 0.07);
  --danger-line: rgba(170, 65, 42, 0.55);

  --tok-c: #767270;
  --tok-s: #2f5f3a;
  --tok-n: #7a4e8c;
  --tok-k: #a2402a;
  --tok-f: #0b4a61;
  --tok-p: #3f6571;
  --tok-t: #a2402a;
  --tok-a: #4d6b75;
  --tok-v: #7a4e8c;
  --tok-o: #6b6765;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  --font-serif: ui-serif, 'Iowan Old Style', 'Charter', 'Bitstream Charter', 'Sitka Heading', 'Sitka Text', 'Palatino Linotype', Palatino, Georgia, serif;

  --topbar-h: 60px;
  --sidebar-w: 280px;
  --toc-w: 220px;
  --content-w: 760px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121111;
    --bg-elev: #1a1918;
    --bg-sidebar: #151413;
    --bg-subtle: #1c1a19;
    --bg-hover: #252220;
    --bg-active: rgba(156, 195, 208, 0.1);
    --bg-topbar: rgba(18, 17, 17, 0.82);
    --border: #2b2826;
    --border-strong: #3b3735;
    --text: #d9d3d0;
    --text-strong: #f6f1ee;
    --text-muted: #b3aeac;
    --text-faint: #9c9795;
    --link: #a3c8d4;
    --link-line: rgba(163, 200, 212, 0.4);
    --accent: #df9280;
    --primary: #a3c8d4;
    --primary-hover: #bcd8e1;
    --on-primary: #0a1f27;
    --focus: #df9280;
    --mark: rgba(223, 146, 128, 0.32);
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 30px 80px -10px rgba(0, 0, 0, 0.75);
    --note: #9fc0ca;
    --note-bg: rgba(92, 118, 126, 0.14);
    --note-line: rgba(143, 176, 186, 0.45);
    --tip: #a9c49b;
    --tip-bg: rgba(110, 140, 95, 0.12);
    --tip-line: rgba(169, 196, 155, 0.4);
    --warn: #e7ae9f;
    --warn-bg: rgba(198, 130, 119, 0.13);
    --warn-line: rgba(198, 130, 119, 0.6);
    --danger: #f0907a;
    --danger-bg: rgba(170, 65, 42, 0.16);
    --danger-line: rgba(240, 144, 122, 0.5);
    --tok-c: #8f8a88;
    --tok-s: #a9c49b;
    --tok-n: #cdb6dd;
    --tok-k: #e59a86;
    --tok-f: #a3c8d4;
    --tok-p: #9fc0ca;
    --tok-t: #e59a86;
    --tok-a: #9fc0ca;
    --tok-v: #cdb6dd;
    --tok-o: #9c9795;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #121111;
  --bg-elev: #1a1918;
  --bg-sidebar: #151413;
  --bg-subtle: #1c1a19;
  --bg-hover: #252220;
  --bg-active: rgba(156, 195, 208, 0.1);
  --bg-topbar: rgba(18, 17, 17, 0.82);
  --border: #2b2826;
  --border-strong: #3b3735;
  --text: #d9d3d0;
  --text-strong: #f6f1ee;
  --text-muted: #b3aeac;
  --text-faint: #9c9795;
  --link: #a3c8d4;
  --link-line: rgba(163, 200, 212, 0.4);
  --accent: #df9280;
  --primary: #a3c8d4;
  --primary-hover: #bcd8e1;
  --on-primary: #0a1f27;
  --focus: #df9280;
  --mark: rgba(223, 146, 128, 0.32);
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 30px 80px -10px rgba(0, 0, 0, 0.75);
  --note: #9fc0ca;
  --note-bg: rgba(92, 118, 126, 0.14);
  --note-line: rgba(143, 176, 186, 0.45);
  --tip: #a9c49b;
  --tip-bg: rgba(110, 140, 95, 0.12);
  --tip-line: rgba(169, 196, 155, 0.4);
  --warn: #e7ae9f;
  --warn-bg: rgba(198, 130, 119, 0.13);
  --warn-line: rgba(198, 130, 119, 0.6);
  --danger: #f0907a;
  --danger-bg: rgba(170, 65, 42, 0.16);
  --danger-line: rgba(240, 144, 122, 0.5);
  --tok-c: #8f8a88;
  --tok-s: #a9c49b;
  --tok-n: #cdb6dd;
  --tok-k: #e59a86;
  --tok-f: #a3c8d4;
  --tok-p: #9fc0ca;
  --tok-t: #e59a86;
  --tok-a: #9fc0ca;
  --tok-v: #cdb6dd;
  --tok-o: #9c9795;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'ss01' 0, 'cv11' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img,
svg,
video {
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: var(--link);
}
button {
  font: inherit;
  color: inherit;
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: -0.2em;
  stroke-width: 1.75;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: var(--mark);
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  background: var(--bg-topbar);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1480px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  text-decoration: none;
  flex: none;
  margin-right: 8px;
  border-radius: var(--radius-sm);
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
:root:not([data-theme='light']) .brand-logo {
  color: var(--text-strong);
}
.brand-docs {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  width: 300px;
  margin-left: 24px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}
.search-trigger:hover {
  border-color: var(--border-strong);
  background: var(--bg-elev);
}
.search-trigger-label {
  flex: 1;
}
.search-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-faint);
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.topbar-link:hover {
  color: var(--text-strong);
  background: var(--bg-hover);
}
.topbar-cta {
  background: var(--primary);
  color: var(--on-primary);
  padding: 0 14px;
}
.topbar-cta:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: none;
  transition: color 0.15s, background-color 0.15s;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}
.icon-btn .icon {
  width: 18px;
  height: 18px;
}
.menu-btn {
  display: none;
  margin-left: -8px;
}
.theme-btn .icon {
  display: none;
}
.theme-btn[data-mode='light'] .i-light,
.theme-btn[data-mode='dark'] .i-dark,
.theme-btn:not([data-mode]) .i-system,
.theme-btn[data-mode='system'] .i-system {
  display: block;
}
.no-js [data-search-open],
.no-js [data-theme-toggle],
.no-js .menu-btn,
.no-js .code-copy {
  display: none !important;
}

/* ------------------------------------------------------------------ layout */

.layout {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  border-right: 1px solid var(--border);
}
.sidebar-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 16px 48px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
  gap: 56px;
  padding: 40px 40px 96px 56px;
  min-width: 0;
  outline: none;
}
.no-toc .main {
  grid-template-columns: minmax(0, 1fr);
}
.article {
  width: 100%;
  max-width: var(--content-w);
  min-width: 0;
}
.toc-col {
  min-width: 0;
}

/* ------------------------------------------------------------------ sidebar */

.sidebar-nav {
  font-size: 14px;
  line-height: 1.45;
}
.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-nav summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.sidebar-nav summary::-webkit-details-marker {
  display: none;
}
.nav-group + .nav-group {
  margin-top: 6px;
}
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-group-title:hover {
  color: var(--text-strong);
  background: var(--bg-hover);
}
.nav-group-title > span {
  flex: 1;
}
.nav-group-link {
  margin-top: 6px;
  text-decoration: none;
}
.nav-group-link[aria-current='page'] {
  background: var(--bg-active);
  color: var(--primary);
}
.nav-group-link[aria-current='page'] .nav-group-icon {
  color: var(--accent);
}
.nav-group-icon {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
}
.nav-caret {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
  transition: transform 0.18s ease;
}
details[open] > summary .nav-caret {
  transform: rotate(90deg);
}
.nav-group > .nav-list {
  padding: 2px 0 10px;
}
.nav-link {
  position: relative;
  display: block;
  padding: 6px 10px 6px 12px;
  margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}
.nav-link[aria-current='page'] {
  background: var(--bg-active);
  color: var(--primary);
  font-weight: 560;
}
.nav-link[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-sub-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
}
.nav-sub-title:hover {
  background: var(--bg-hover);
}
.nav-sub-title > span {
  flex: 1;
}
.nav-sub .nav-list {
  margin: 2px 0 6px 13px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

/* ------------------------------------------------------------------ article header */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.breadcrumbs li + li::before {
  content: '/';
  margin: 0 9px;
  color: var(--border-strong);
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--text-strong);
}
.breadcrumbs [aria-current] {
  color: var(--accent);
}
.page-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--text-strong);
  text-wrap: balance;
}
.lead {
  margin: 16px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: 44em;
}
.article-header {
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ------------------------------------------------------------------ prose */

.prose {
  font-size: 16px;
  line-height: 1.72;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose .table-wrap,
.prose .code-block,
.prose figure,
.prose .callout,
.prose .cards,
.prose .steps,
.prose .tabs,
.prose .settings-block,
.prose details {
  margin: 0 0 20px;
}
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  position: relative;
  color: var(--text-strong);
  font-weight: 620;
  text-wrap: balance;
}
.prose h2 {
  margin: 52px 0 14px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin: 36px 0 10px;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.012em;
}
.prose h4 {
  margin: 28px 0 8px;
  font-size: 16px;
  line-height: 1.4;
}
.prose h5,
.prose h6 {
  margin: 24px 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.heading-anchor {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  opacity: 0;
  text-decoration: none;
  transition: opacity 0.15s, background-color 0.15s;
}
.heading:hover .heading-anchor,
.heading-anchor:focus-visible,
.heading-anchor.is-copied {
  opacity: 1;
}
.heading-anchor:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}
.heading-anchor .icon {
  width: 15px;
  height: 15px;
}
.heading-anchor.is-copied::after {
  content: 'Link copied';
  position: absolute;
  margin-left: 64px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--text-strong);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.prose a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.prose a:hover {
  text-decoration-color: currentColor;
}
.prose a.broken {
  color: var(--danger);
  text-decoration-style: wavy;
}
.ext-icon {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  vertical-align: 0;
  opacity: 0.7;
}
.prose strong {
  color: var(--text-strong);
  font-weight: 620;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li {
  margin: 6px 0;
  padding-left: 2px;
}
.prose li > ul,
.prose li > ol {
  margin: 6px 0 0;
}
.prose li > p {
  margin: 0 0 10px;
}
.prose ul li::marker {
  color: var(--text-faint);
}
.prose ol li::marker {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.prose li.task {
  list-style: none;
  margin-left: -1.3em;
}
.prose li.task input {
  margin: 0 8px 0 0;
  accent-color: var(--primary);
  vertical-align: -1px;
}
.prose hr {
  margin: 44px 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.prose blockquote {
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-muted);
}
.prose blockquote > :last-child {
  margin-bottom: 0;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.14em 0.4em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-subtle);
  color: var(--text-strong);
  word-break: break-word;
}
.prose a code {
  color: inherit;
}
kbd,
.keys kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.08em 0.45em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-elev);
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 0.78em;
  line-height: 1.5;
  text-align: center;
  vertical-align: 0.08em;
}
.keys {
  white-space: nowrap;
}
.keys-plus {
  margin: 0 2px;
  color: var(--text-faint);
  font-size: 0.8em;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
}
.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.prose th {
  background: var(--bg-subtle);
  color: var(--text-strong);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.prose tbody tr:last-child td {
  border-bottom: 0;
}
.prose td > code {
  white-space: nowrap;
}

/* Settings table (widget settings) */
.settings-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}
.settings-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.settings-head .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.settings-block .table-wrap {
  border: 0;
  border-radius: 0;
  margin: 0;
}
.settings-block > p {
  margin: 12px 14px;
}
.settings-table th {
  display: none;
}
.settings-table td:first-child {
  width: 32%;
  min-width: 150px;
  color: var(--text-strong);
  font-weight: 560;
}
.settings-table td:first-child strong {
  font-weight: 600;
}

/* Callouts */
.callout {
  padding: 14px 18px 14px 16px;
  border: 1px solid var(--note-line);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--note-bg);
  font-size: 15px;
  line-height: 1.65;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 620;
  color: var(--note);
}
.callout-title .icon {
  width: 17px;
  height: 17px;
}
.callout-body > :last-child {
  margin-bottom: 0;
}
.callout-body p {
  margin-bottom: 10px;
}
.callout-tip {
  border-color: var(--tip-line);
  background: var(--tip-bg);
}
.callout-tip .callout-title {
  color: var(--tip);
}
.callout-warning {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}
.callout-warning .callout-title {
  color: var(--warn);
}
.callout-danger {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}
.callout-danger .callout-title {
  color: var(--danger);
}

/* Code blocks */
.code-block {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 88px 0 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.code-lang {
  text-transform: uppercase;
}
.code-title {
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}
.code-lang + .code-title::before {
  content: '·';
  margin-right: 10px;
  color: var(--border-strong);
}
.prose pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 2;
  scrollbar-width: thin;
}
.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  color: var(--text-strong);
  word-break: normal;
  white-space: pre;
}
.code-copy {
  position: absolute;
  top: 5px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.code-copy:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.code-copy.is-copied {
  color: var(--tip);
}
.code-bare .code-copy {
  opacity: 0;
}
.code-bare:hover .code-copy,
.code-bare .code-copy:focus-visible {
  opacity: 1;
}
.tok-c {
  color: var(--tok-c);
  font-style: italic;
}
.tok-s {
  color: var(--tok-s);
}
.tok-n {
  color: var(--tok-n);
}
.tok-k {
  color: var(--tok-k);
}
.tok-f {
  color: var(--tok-f);
}
.tok-p {
  color: var(--tok-p);
}
.tok-t {
  color: var(--tok-t);
}
.tok-a {
  color: var(--tok-a);
}
.tok-v {
  color: var(--tok-v);
}
.tok-o {
  color: var(--tok-o);
}

/* Figures / screenshots */
.shot {
  margin-left: 0;
  margin-right: 0;
}
.shot > a,
.shot > img,
.shot > picture {
  display: block;
}
.shot-zoom {
  position: relative;
  display: block;
  max-width: var(--shot-w, 100%);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  line-height: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.shot:not(:has(.shot-zoom)) img {
  max-width: var(--shot-w, 100%);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.shot-zoom:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.shot img {
  display: block;
  width: 100%;
}
.shot-zoom-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(16, 15, 15, 0.62);
  color: #fff;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.18s, transform 0.18s;
}
.shot-zoom:hover .shot-zoom-hint,
.shot-zoom:focus-visible .shot-zoom-hint {
  opacity: 1;
  transform: none;
}
.shot.plain .shot-zoom {
  border: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
:root[data-theme='dark'] .shot img {
  filter: brightness(0.93);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .shot img {
    filter: brightness(0.93);
  }
}
.shot figcaption {
  max-width: var(--shot-w, 100%);
  margin: 10px auto 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-faint);
  text-align: center;
}
.shot-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  border: 1px dashed var(--danger-line);
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 14px;
}
.inline-img {
  display: inline-block;
  vertical-align: middle;
  max-height: 1.6em;
  width: auto;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.prose a.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.prose a.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 9px;
  background: var(--bg-active);
  color: var(--primary);
}
.card-icon .icon {
  width: 18px;
  height: 18px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.35;
}
.card-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
  transition: transform 0.18s, color 0.18s;
}
.prose a.card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(2px);
}
.card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Steps */
.steps {
  list-style: none;
  padding: 0 !important;
  counter-reset: step;
}
.step {
  position: relative;
  margin: 0 !important;
  padding: 0 0 8px 46px !important;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.step::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 34px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.step:last-child::after {
  display: none;
}
.prose .step-title {
  margin: 1px 0 6px;
  font-size: 17px;
  line-height: 1.5;
}
.step-body > :last-child {
  margin-bottom: 20px;
}

/* Tabs */
.tabs {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}
.tab-list {
  display: flex;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-btn {
  position: relative;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.tab-btn:hover {
  color: var(--text-strong);
}
.tab-btn[aria-selected='true'] {
  color: var(--text-strong);
}
.tab-btn[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.tab-panel {
  padding: 18px 20px 2px;
}
.tab-panel + .tab-panel {
  border-top: 1px solid var(--border);
}
.js .tabs.is-ready .tab-panel + .tab-panel {
  border-top: 0;
}
.tab-label {
  margin: 0 0 10px !important;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.js .tabs.is-ready .tab-label {
  display: none;
}
.tab-panel[hidden] {
  display: none;
}
.tab-panel > .code-block:last-child,
.tab-panel > :last-child {
  margin-bottom: 18px;
}

/* Details */
.disclosure {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.disclosure summary {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
}
.disclosure-body {
  padding: 0 16px 4px;
}

/* ------------------------------------------------------------------ article footer */

.article-footer {
  margin-top: 56px;
}
.updated {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-faint);
}
.updated .icon {
  width: 14px;
  height: 14px;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.pager-link:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.pager-next {
  text-align: right;
  align-items: flex-end;
  grid-column: 2;
}
.pager-dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.pager-dir .icon {
  width: 13px;
  height: 13px;
}
.pager-title {
  font-weight: 600;
  color: var(--text-strong);
}

/* ------------------------------------------------------------------ TOC */

.toc {
  position: sticky;
  top: calc(var(--topbar-h) + 40px);
  max-height: calc(100vh - var(--topbar-h) - 64px);
  overflow-y: auto;
  padding-bottom: 24px;
  font-size: 13.5px;
  line-height: 1.45;
  scrollbar-width: none;
}
.toc-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}
.toc-list a {
  position: relative;
  display: block;
  padding: 4px 0 4px 14px;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.15s;
}
.toc-list a:hover {
  color: var(--text-strong);
}
.toc-h3 a {
  padding-left: 26px;
  font-size: 13px;
}
.toc-list a.is-active {
  color: var(--primary);
  font-weight: 550;
}
.toc-list a.is-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.toc-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: none;
}
.toc-top:hover {
  color: var(--text-strong);
}
.toc-top .icon {
  width: 13px;
  height: 13px;
}
.toc-mobile {
  display: none;
  margin: -12px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 14px;
}
.toc-mobile summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
}
.toc-mobile summary::-webkit-details-marker {
  display: none;
}
.toc-mobile summary span {
  flex: 1;
}
.toc-mobile-caret {
  transition: transform 0.18s;
}
.toc-mobile[open] .toc-mobile-caret {
  transform: rotate(180deg);
}
.toc-mobile .toc-list {
  margin: 0 14px 12px;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sidebar);
}
.site-footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  font-size: 13px;
  color: var(--text-faint);
}
.site-footer p {
  margin: 0;
  flex: 1;
}
.footer-brand {
  color: var(--text-muted);
  line-height: 0;
}
.footer-brand .brand-logo {
  height: 16px;
}
.site-footer nav {
  display: flex;
  gap: 18px;
}
.site-footer nav a {
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer nav a:hover {
  color: var(--text-strong);
}

/* ------------------------------------------------------------------ buttons, 404 */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--bg-hover);
}
.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.notfound {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 24px 120px;
}
.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 44px;
}
.notfound-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}
.notfound-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}
.notfound-links a:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}
.notfound-links .icon {
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ search */

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 11vh 16px 16px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.search-dialog[hidden] {
  display: none;
}
.search-panel {
  width: min(680px, 100%);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop 0.16s ease-out;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--border);
}
.search-field > .icon {
  width: 19px;
  height: 19px;
  color: var(--text-faint);
}
.search-input {
  flex: 1;
  min-width: 0;
  height: 58px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 17px;
  outline: none;
}
.search-input::placeholder {
  color: var(--text-faint);
}
.search-input::-webkit-search-cancel-button {
  display: none;
}
.search-esc {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-faint);
  cursor: pointer;
}
.search-results {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  scrollbar-width: thin;
}
.search-group + .search-group {
  margin-top: 6px;
}
.search-group-head {
  padding: 10px 10px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.search-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  scroll-margin: 8px;
}
.search-item-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-faint);
  background: var(--bg-elev);
}
.search-item-icon .icon {
  width: 15px;
  height: 15px;
}
.search-item-text {
  min-width: 0;
  flex: 1;
}
.search-item-title {
  display: block;
  font-size: 14.5px;
  font-weight: 560;
  color: var(--text-strong);
  line-height: 1.4;
}
.search-item-path {
  color: var(--text-faint);
  font-weight: 450;
}
.search-item-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.search-item mark {
  background: var(--mark);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.search-item.is-active {
  background: var(--bg-active);
}
.search-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.search-item.is-active .search-item-icon {
  color: var(--primary);
  border-color: var(--border-strong);
}
.search-empty {
  padding: 36px 16px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.search-empty strong {
  color: var(--text-strong);
}
.search-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.search-suggest button {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}
.search-suggest button:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.search-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 12px;
  color: var(--text-faint);
}
.search-foot kbd {
  margin-right: 4px;
  font-size: 10.5px;
}

/* ------------------------------------------------------------------ lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 24px 24px;
  background: rgba(16, 15, 15, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
  animation: fade 0.18s ease-out;
}
.lightbox[hidden] {
  display: none;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.lightbox img {
  max-width: min(100%, 1800px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  background: #fff;
}
.lightbox-caption {
  max-width: 70ch;
  margin: 0;
  color: #d7d2d0;
  font-size: 14px;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
}
.lightbox-close .icon {
  width: 18px;
  height: 18px;
}
body.is-locked {
  overflow: hidden;
}

/* ------------------------------------------------------------------ home */

.is-home .article-header {
  padding-bottom: 32px;
}
.is-home .page-title {
  font-size: clamp(38px, 5vw, 54px);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1279px) {
  .main {
    grid-template-columns: minmax(0, 1fr);
    padding: 36px 40px 88px;
  }
  .toc-col {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
  .article {
    margin: 0 auto;
  }
}

@media (max-width: 1023px) {
  :root {
    --topbar-h: 56px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-btn {
    display: inline-grid;
  }
  .js .sidebar {
    position: fixed;
    z-index: 60;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    height: auto;
    width: min(320px, 86vw);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s 0.22s;
  }
  .js.nav-open .sidebar {
    transform: none;
    visibility: visible;
    transition: transform 0.22s ease;
  }
  .scrim {
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 50;
    background: var(--scrim);
  }
  .scrim[hidden] {
    display: none;
  }
  .no-js .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-sidebar);
  }
  .no-js .sidebar-scroll {
    padding: 12px 16px;
  }
  .main {
    padding: 28px 24px 72px;
  }
  .search-trigger {
    width: auto;
    flex: 1;
    max-width: 360px;
    margin-left: 8px;
  }
  .topbar-inner {
    padding: 0 12px 0 16px;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .topbar-link:not(.topbar-cta) {
    display: none;
  }
  .topbar-cta span {
    display: none;
  }
  .topbar-cta {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .search-trigger {
    margin-left: auto;
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
  }
  .search-trigger-label,
  .search-kbd {
    display: none;
  }
  .topbar-links {
    margin-left: 0;
  }
  .brand-docs {
    font-size: 18px;
    padding-left: 10px;
  }
  .brand {
    gap: 10px;
  }
  .brand-logo {
    height: 19px;
  }
  .main {
    padding: 22px 16px 64px;
  }
  .page-title {
    font-size: 34px;
  }
  .lead {
    font-size: 17px;
  }
  .prose h2 {
    font-size: 22px;
    margin-top: 44px;
  }
  .cards-2,
  .cards-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .pager-next {
    grid-column: auto;
  }
  .settings-table td:first-child {
    width: 40%;
    min-width: 0;
  }
  .prose th,
  .prose td {
    padding: 9px 11px;
  }
  .search-dialog {
    padding: 8px;
  }
  .search-panel {
    max-height: calc(100dvh - 16px);
  }
  .search-foot {
    display: none;
  }
  .heading-anchor {
    display: none;
  }
  .site-footer-inner {
    padding: 22px 16px;
  }
}

@media (hover: none) {
  .heading-anchor {
    opacity: 0.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ print */

@media print {
  :root {
    --bg: #fff;
    --text: #111;
  }
  body {
    font-size: 11pt;
    display: block;
  }
  .topbar,
  .sidebar,
  .toc-col,
  .toc-mobile,
  .pager,
  .site-footer,
  .skip-link,
  .scrim,
  .code-copy,
  .heading-anchor,
  .shot-zoom-hint,
  .search-dialog,
  .lightbox {
    display: none !important;
  }
  .layout,
  .main {
    display: block;
    padding: 0;
    max-width: none;
  }
  .article {
    max-width: none;
  }
  .prose a.ext::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #555;
  }
  .prose pre code {
    white-space: pre-wrap;
  }
  .code-block,
  .shot,
  .callout,
  .table-wrap,
  .settings-block,
  .card {
    break-inside: avoid;
  }
  .js .tabs .tab-panel[hidden] {
    display: block !important;
  }
  .js .tabs .tab-label {
    display: block !important;
  }
  .tab-list {
    display: none;
  }
}
