/* Docs (docs.html and docs/**). Loaded after site.css, whose tokens, reset, .btn, .brand, .logo, .soon-tag and
   .skip it reuses. Everything here is prefixed dx- (or is a docs content block: code, callout, endpoint, params),
   so marketing-page rules can change without moving the docs. Light ground, surfaces separated by tone; the only
   shadows are on the search palette and the open drawer. Gold stays for focus and for "Planned" tags. */

:root {
  --dx-top: 60px;
  --dx-side: 284px;
  --dx-text: 720px;
  --dx-toc: 220px;
  --dx-gap: clamp(2rem, 4vw, 4rem);
  --dx-pad: clamp(1rem, 3.2vw, 3rem);
  --dx-hover: #ece7dd;
  --dx-hover-top: #f3efe7;
  --dx-code-ink: #f3e7cc;
  --dx-blue: #2a5bb0;
  --dx-blue-bg: #e9effa;
  --dx-green-bg: #e4f1e6;
  --dx-red: #a0301a;
  --dx-red-bg: #fbe8e3;
  --dx-warn-bg: #fbf1d9;
}

html { scroll-padding-top: calc(var(--dx-top) + 24px); }
.dx-page { font-size: 1rem; }
.dx-page :target, .dx-page [id] { scroll-margin-top: calc(var(--dx-top) + 24px); }
.dx-page main:focus { outline: none; }

/* ---------------------------------------------------------------- top bar */
.dx-top {
  position: sticky; top: 0; z-index: 40; height: var(--dx-top);
  background: var(--surface);   /* a tone step from the page, no rule */
}
.dx-top-in {
  height: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--dx-pad) 0 clamp(1rem, 2vw, 1.5rem);
  display: flex; align-items: center; gap: 0.75rem;
}
.dx-top .brand { font-size: 1rem; }
.dx-label {
  padding: 0.3rem 0.55rem; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  color: var(--ink-2); transition: background-color var(--t-hover);
}
.dx-label:hover, .dx-top .dx-menu:hover { background: var(--dx-hover-top); }
.dx-search {
  display: inline-flex; align-items: center; gap: 0.6rem; height: 38px; min-width: 240px; margin-left: 1.25rem;
  padding: 0 0.5rem 0 0.8rem; border-radius: 10px; background: var(--bg); color: var(--muted);
  font-size: 0.9375rem; transition: background-color var(--t-hover);
}
.dx-search:hover { background: var(--bg-2); color: var(--ink-2); }
.dx-search svg { width: 17px; height: 17px; flex: none; }
.dx-search-text { flex: 1; text-align: left; }
.dx-kbd, .dx-pal kbd {
  display: inline-flex; align-items: center; height: 22px; padding: 0 0.4rem; border-radius: 6px;
  background: var(--bg-2); color: var(--muted); font-family: var(--font); font-size: 0.75rem; font-weight: 500;
}
.dx-links { display: flex; gap: 1.25rem; margin-left: auto; font-size: 0.9375rem; }
.dx-links a {
  color: var(--ink-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px;
  transition: text-decoration-color var(--t-hover), color var(--t-hover);
}
.dx-links a:hover { color: var(--ink); text-decoration-color: currentColor; }
.dx-cta { min-height: 38px; padding: 0 1rem; font-size: 0.9375rem; }
.dx-menu { display: none; width: 40px; height: 40px; place-items: center; border-radius: 10px; color: var(--ink); }
.dx-menu svg { width: 20px; height: 20px; }
.dx-menu:hover { background: var(--dx-hover); }

/* ---------------------------------------------------------------- frame */
.dx {
  display: grid; grid-template-columns: var(--dx-side) minmax(0, 1fr);
  max-width: 1480px; margin: 0 auto;
}
.dx-side {
  position: sticky; top: var(--dx-top); height: calc(100vh - var(--dx-top)); height: calc(100dvh - var(--dx-top));
  display: flex; flex-direction: column; min-width: 0;
}
.dx-side-head { display: none; }
.dx-side-scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem 1rem 3rem clamp(1rem, 2vw, 1.5rem);
  scrollbar-width: thin; scrollbar-color: rgba(26, 20, 11, 0.18) transparent;
}
.dx-group + .dx-group { margin-top: 1.1rem; }
.dx-group summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.3rem 0.6rem; border-radius: 8px; cursor: pointer; list-style: none;
  font-size: 0.875rem; font-weight: 600; color: var(--ink);
}
.dx-group summary::-webkit-details-marker { display: none; }
.dx-group summary:hover { background: var(--dx-hover); }
.dx-group summary svg { width: 12px; height: 12px; color: var(--muted); transition: transform var(--t-ui) var(--ease-ui); }
.dx-group[open] summary svg { transform: rotate(90deg); }
.dx-group ul { margin: 0.2rem 0 0; padding: 0; list-style: none; }
.dx-group li a {
  display: block; padding: 0.36rem 0.6rem 0.36rem 0.9rem; border-radius: 8px; text-decoration: none;
  font-size: 0.9063rem; line-height: 1.4; color: var(--ink-2); transition: background-color var(--t-hover), color var(--t-hover);
}
.dx-group li a:hover { background: var(--dx-hover); color: var(--ink); }
.dx-group li a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 500; }

.dx-main {
  display: grid; grid-template-columns: minmax(0, var(--dx-text)) var(--dx-toc); gap: var(--dx-gap);
  justify-content: start; min-width: 0; padding: 2.25rem var(--dx-pad) 5rem;
}
.dx-article { min-width: 0; }

/* ---------------------------------------------------------------- page head */
.dx-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted); }
.dx-crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: rgba(26, 20, 11, 0.3); }
.dx-crumbs a { color: var(--muted); text-decoration: none; }
.dx-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.dx-head { margin-top: 0.9rem; }
.dx-head h1 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.625rem); line-height: 1.1; letter-spacing: -0.035em; }
.dx-desc { margin-top: 0.8rem; font-size: var(--step-lead); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink-2); max-width: 60ch; }
.dx-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.dx-tool {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 34px; padding: 0 0.75rem; border-radius: 9px;
  background: var(--surface); color: var(--ink-2); font-size: 0.875rem; font-weight: 500; text-decoration: none;
  transition: background-color var(--t-hover), color var(--t-hover);
}
.dx-tool:hover { background: #fffdf9; color: var(--ink); }
.dx-tool svg { width: 15px; height: 15px; flex: none; }
html:not(.js) [data-copy-md] { display: none; }

/* ---------------------------------------------------------------- prose */
.dx-prose { margin-top: 2.25rem; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.dx-prose > :first-child, .dx-prose .api-text > :first-child { margin-top: 0; }
.dx-prose p, .dx-prose ul, .dx-prose ol, .dx-prose dl { margin-top: 1rem; max-width: 68ch; }
.dx-prose ul, .dx-prose ol { padding-left: 1.35rem; }
.dx-prose li { margin-top: 0.35rem; }
.dx-prose li > p { margin-top: 0.35rem; }
.dx-prose li::marker { color: var(--muted); }
.dx-prose h2 {
  margin-top: 3rem; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.025em; color: var(--ink);
}
.dx-prose h3 { margin-top: 2.2rem; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); }
.dx-prose h4 { margin-top: 1.75rem; font-size: 1.0625rem; color: var(--ink); }
.dx-prose h2 + *, .dx-prose h3 + *, .dx-prose h4 + * { margin-top: 0.75rem; }
.dx-prose strong { color: var(--ink); }
.dx-prose a:not([class]) {
  color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.2em; text-decoration-color: rgba(26, 20, 11, 0.32); transition: text-decoration-color var(--t-hover);
}
.dx-prose a:not([class]):hover { text-decoration-color: currentColor; }
.dx-prose :not(pre) > code { font-size: 0.86em; color: var(--ink); }
.dx-prose em { font-style: italic; }
.dx-prose hr { margin: 2.5rem 0; border: 0; height: 1px; background: var(--hair); } /* taste-skill-ignore: an author's explicit <hr> */
.dx-prose dt { margin-top: 1rem; font-weight: 600; color: var(--ink); }
.dx-prose dd { margin: 0.25rem 0 0 0; }

.anchor {
  margin-left: 0.4em; padding: 0 0.2em; border-radius: 4px; color: var(--muted); font-weight: 400;
  text-decoration: none; opacity: 0; transition: opacity var(--t-hover);
}
h2:hover > .anchor, h3:hover > .anchor, .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .anchor { display: none; } }

/* tables */
.table-scroll { margin-top: 1.25rem; overflow-x: auto; border-radius: 14px; background: var(--surface); }
.table-scroll:focus-visible { outline-offset: 2px; }
.dx-prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; }
.dx-prose th {
  padding: 0.65rem 1rem; text-align: left; vertical-align: bottom; background: var(--surface-2);
  font-size: 0.8125rem; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.dx-prose td { padding: 0.7rem 1rem; vertical-align: top; border-top: 1px solid var(--hair); color: var(--ink-2); min-width: 8rem; }
.dx-prose td:first-child { color: var(--ink); }
.dx-prose td code { white-space: nowrap; }
.dx-prose td code:only-child, .dx-prose td:not(:first-child) code { white-space: normal; }

/* parameter tables */
.params td:first-child { white-space: nowrap; }
.p-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.p-name code { font-weight: 600; background: none !important; padding: 0 !important; font-size: 0.9em; }
.p-type { font-family: var(--mono); /* taste-skill-ignore: type names are literal code */ font-size: 0.8125rem; color: var(--muted); }
.p-type code { background: none !important; padding: 0 !important; color: var(--muted) !important; }
.p-req, .p-opt { display: inline-flex; align-items: center; height: 1.4rem; padding: 0 0.45rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.p-req { background: var(--dx-red-bg); color: var(--dx-red); }
.p-opt { color: var(--muted); padding: 0; }

/* figures */
.shot { margin-top: 1.5rem; }
.shot img { width: 100%; border-radius: 14px; background: var(--surface); }
.shot figcaption { margin-top: 0.6rem; font-size: 0.875rem; line-height: 1.5; color: var(--muted); max-width: 68ch; }

/* callouts */
.callout {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 0.8rem; margin-top: 1.4rem; padding: 0.95rem 1.1rem;
  border-radius: 14px; background: var(--surface); font-size: 1rem; line-height: 1.6;
}
.callout-icon { padding-top: 0.15rem; }
.callout-icon svg { width: 20px; height: 20px; }
.callout-body > :first-child { margin-top: 0; }
.callout-body p { margin-top: 0.6rem; }
.callout-body .code { margin-top: 0.8rem; }
.callout-note { background: var(--dx-blue-bg); }
.callout-note .callout-icon { color: var(--dx-blue); }
.callout-tip { background: var(--dx-green-bg); }
.callout-tip .callout-icon { color: var(--green); }
.callout-warning { background: var(--dx-warn-bg); }
.callout-warning .callout-icon { color: var(--gold-text); }
.callout-danger { background: var(--dx-red-bg); }
.callout-danger .callout-icon { color: var(--dx-red); }

/* ---------------------------------------------------------------- code */
.code { margin-top: 1.25rem; min-width: 0; border-radius: 14px; background: var(--night); overflow: hidden; }
.code-bar {
  display: flex; align-items: center; gap: 0.75rem; min-height: 40px; padding: 0 0.4rem 0 1rem;
  background: var(--night-2); color: var(--night-muted); font-size: 0.8125rem;
}
.code-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--night-ink); font-weight: 500; }
.code-lang { color: var(--night-muted); }
.code-copy, .ep-copy {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 30px; padding: 0 0.6rem; border-radius: 8px;
  color: var(--night-muted); font-size: 0.8125rem; font-weight: 500; transition: background-color var(--t-hover), color var(--t-hover);
}
.code-copy svg, .ep-copy svg { width: 14px; height: 14px; }
.code-copy:hover { background: rgba(255, 255, 255, 0.08); color: var(--night-ink); }
.code-copy:focus-visible, .code-tabs [role="tab"]:focus-visible { outline-color: var(--gold-2); outline-offset: -2px; }
html:not(.js) .code-copy, html:not(.js) .ep-copy { display: none; }
.code pre {
  margin: 0; padding: 1rem 1.1rem 1.1rem; overflow-x: auto; color: var(--dx-code-ink);
  font-size: 0.84rem; line-height: 1.7; tab-size: 2;
  scrollbar-width: thin; scrollbar-color: rgba(255, 244, 225, 0.25) transparent;
}
.code pre:focus-visible { outline: 2px solid var(--gold-2); outline-offset: -2px; border-radius: 0 0 14px 14px; }
.code code { font-size: inherit; background: none; padding: 0; }
/* Pygments tokens (classprefix t-) */
.code [class^="t-c"] { color: #a69b88; font-style: normal; }
.code [class^="t-k"], .code .t-ow { color: #ff9f83; }
.code [class^="t-s"] { color: #bfe3a5; }
.code [class^="t-m"] { color: #f6c28b; }
.code .t-nf, .code .t-fm, .code .t-nc, .code .t-nn { color: #9fc5ff; }
.code .t-na, .code .t-nt, .code .t-nl { color: #f3d58a; }
.code .t-nv, .code .t-vi, .code .t-vg, .code .t-nb, .code .t-bp { color: #e4c6ff; }
.code .t-gp { color: var(--night-muted); }
.code .t-err { color: inherit; background: none; }

/* code groups */
.code-tabs { margin-top: 1.25rem; border-radius: 14px; background: var(--night); overflow: hidden; }
.code-tabs-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0 0.4rem 0 0.4rem; background: var(--night-2); }
.code-tabs [role="tablist"] { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.code-tabs [role="tab"] {
  position: relative; min-height: 40px; padding: 0 0.75rem; color: var(--night-muted); font-size: 0.8125rem; font-weight: 500; white-space: nowrap;
  transition: color var(--t-hover);
}
.code-tabs [role="tab"]:hover { color: var(--night-ink); }
.code-tabs [role="tab"][aria-selected="true"] { color: var(--night-ink); }
.code-tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--night-ink); }
.code-in-tabs { margin: 0; border-radius: 0; }
.code-in-tabs .code-bar { display: none; }
html:not(.js) .code-tabs [role="tablist"], html:not(.js) .tabs-copy { display: none; }
html:not(.js) .code-tabs [role="tabpanel"][hidden] { display: block; }
html:not(.js) .code-in-tabs .code-bar { display: flex; }

/* endpoint header */
.endpoint {
  display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; padding: 0.55rem 0.5rem 0.55rem 0.6rem;
  border-radius: 12px; background: var(--surface); min-width: 0;
}
.method {
  flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 0.55rem; border-radius: 7px;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; /* taste-skill-ignore: the HTTP method is literal code */
}
.m-get { background: var(--dx-green-bg); color: var(--green); }
.m-post { background: var(--dx-blue-bg); color: var(--dx-blue); }
.m-put, .m-patch { background: var(--dx-warn-bg); color: var(--gold-text); }
.m-delete { background: var(--dx-red-bg); color: var(--dx-red); }
.m-head, .m-options { background: var(--bg-2); color: var(--ink-2); }
.ep-path { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 0.875rem; color: var(--ink); background: none !important; padding: 0 !important; }
.ep-var { color: var(--muted); }
.ep-copy { color: var(--muted); }
.ep-copy:hover { background: var(--bg-2); color: var(--ink); }
.ep-copy span, .code-copy span { min-width: 3.2em; text-align: left; }

/* two-column API layout */
.api-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.api-row { margin-top: 3rem; }
.api-row h2 { margin-top: 0; }
.api-ex > :first-child { margin-top: 1.25rem; }

/* ---------------------------------------------------------------- page foot */
.dx-foot { margin-top: 4rem; }
.dx-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.dx-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.dx-fb-q { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.dx-fb-btns { display: flex; gap: 0.4rem; }
.dx-fb-btns button {
  min-height: 34px; padding: 0 0.9rem; border-radius: 9px; background: var(--surface); color: var(--ink-2);
  font-size: 0.875rem; font-weight: 500; transition: background-color var(--t-hover);
}
.dx-fb-btns button:hover { background: #fffdf9; color: var(--ink); }
.dx-fb-btns button[aria-pressed="true"] { background: var(--ink); color: var(--night-ink); }
.dx-fb-thanks { font-size: 0.875rem; color: var(--muted); }
.dx-fb-thanks a { color: var(--ink); }
html:not(.js) .dx-feedback { display: none; }
.dx-updated { font-size: 0.875rem; color: var(--muted); }
.dx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.75rem; }
.dx-pager a {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.15rem; border-radius: 14px;
  background: var(--surface); text-decoration: none; transition: background-color var(--t-hover);
}
.dx-pager a:hover { background: #fffaf0; }
.dx-next { text-align: right; align-items: flex-end; }
.dx-pager-k { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8125rem; color: var(--muted); }
.dx-pager-k svg { width: 12px; height: 12px; }
.dx-pager-t { font-weight: 600; color: var(--ink); line-height: 1.35; }

/* ---------------------------------------------------------------- on this page */
.dx-toc { position: sticky; top: calc(var(--dx-top) + 2.25rem); align-self: start; max-height: calc(100vh - var(--dx-top) - 4rem); overflow-y: auto; font-size: 0.8125rem; scrollbar-width: none; }
.dx-toc-h { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.dx-toc ul { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.dx-toc ul ul { margin: 0; }
.dx-toc a {
  display: block; padding: 0.28rem 0 0.28rem 0.8rem; border-left: 2px solid var(--hair); line-height: 1.4;
  color: var(--muted); text-decoration: none; transition: color var(--t-hover), border-color var(--t-hover);
}
.dx-toc a[data-depth="3"] { padding-left: 1.6rem; }
.dx-toc a:hover { color: var(--ink); }
.dx-toc a[aria-current] { color: var(--ink); font-weight: 500; border-left-color: var(--ink); }

/* ---------------------------------------------------------------- site foot */
.dx-sitefoot {
  max-width: 1480px; margin: 0 auto; padding: 1.75rem var(--dx-pad) 2.5rem calc(var(--dx-side) + var(--dx-pad));
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between;
  font-size: 0.8125rem; color: var(--muted);
}
.dx-sitefoot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.dx-sitefoot a { color: var(--muted); }
.dx-sitefoot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- search palette */
.dx-pal { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 1rem 1rem; }
.dx-pal[hidden] { display: none; }
.dx-pal-scrim { position: absolute; inset: 0; background: rgba(18, 13, 6, 0.36); }
.dx-pal-box {
  position: relative; width: 100%; max-width: 640px; max-height: 76vh; display: flex; flex-direction: column;
  border-radius: 18px; background: var(--surface); overflow: hidden;
  box-shadow: 0 30px 80px -24px rgba(18, 13, 6, 0.55); /* taste-skill-ignore: the modal sits above the page */
}
.dx-pal-field { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.75rem 0 1.1rem; height: 58px; border-bottom: 1px solid var(--hair); } /* taste-skill-ignore: the search field's own edge */
.dx-pal-field svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.dx-pal-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 1.0625rem; color: var(--ink); }
.dx-pal-field input::placeholder { color: var(--muted); }
.dx-pal-field input:focus { outline: none; }
.dx-pal-esc { height: 26px; padding: 0 0.5rem; border-radius: 6px; background: var(--bg-2); color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.dx-res { flex: 1; margin: 0; padding: 0.4rem; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.dx-res:empty { display: none; }
.dx-res-group { padding: 0.65rem 0.75rem 0.3rem; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.dx-res [role="option"] { display: block; padding: 0.6rem 0.75rem; border-radius: 10px; text-decoration: none; cursor: pointer; }
.dx-res [role="option"][aria-selected="true"] { background: var(--bg); }
.dx-res-t { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--ink); line-height: 1.35; }
.dx-res-t .dx-res-in { color: var(--muted); font-weight: 400; }
.dx-res-s { display: block; margin-top: 0.2rem; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dx-res mark { background: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(26, 20, 11, 0.35); text-underline-offset: 2px; }
.dx-pal-empty { padding: 1.5rem 1.1rem; font-size: 0.9375rem; color: var(--muted); }
.dx-pal-foot { display: flex; gap: 1.25rem; padding: 0.65rem 1.1rem; background: var(--surface-2); font-size: 0.75rem; color: var(--muted); }
.dx-pal-foot kbd { height: 20px; margin-right: 0.15rem; }
.dx-noscroll { overflow: hidden; }

/* ---------------------------------------------------------------- docs home */
.dx-home .dx-main { display: block; }
.dx-home-in { max-width: 980px; }
.dx-hero h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); line-height: 1.05; letter-spacing: -0.04em; }
.dx-hero .dx-desc { max-width: 52ch; }
.dx-bigsearch {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; max-width: 560px; height: 54px; margin-top: 1.75rem;
  padding: 0 0.75rem 0 1.1rem; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 1.0625rem;
  transition: background-color var(--t-hover);
}
.dx-bigsearch:hover { background: #fffdf9; color: var(--ink-2); }
.dx-bigsearch svg { width: 19px; height: 19px; flex: none; }
.dx-bigsearch span { flex: 1; text-align: left; }
.dx-hero .actions { margin-top: 1.5rem; }
.dx-home-sec { margin-top: 3.75rem; }
.dx-home-sec h2 { font-size: 1.375rem; letter-spacing: -0.02em; }
.dx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.6rem; margin-top: 1.1rem; }
.dx-cards a {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.15rem 1.25rem 1.25rem; border-radius: 16px;
  background: var(--surface); text-decoration: none; transition: background-color var(--t-hover);
}
.dx-cards a:hover { background: #fffaf0; }
.dx-cards b { font-size: 1.0625rem; color: var(--ink); }
.dx-cards span { font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
.dx-popular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 2rem; margin-top: 1rem; }
.dx-popular li { padding: 0.6rem 0; }
.dx-popular a { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(26, 20, 11, 0.25); text-underline-offset: 0.2em; }
.dx-popular a:hover { text-decoration-color: currentColor; }
.dx-popular span { display: block; margin-top: 0.15rem; font-size: 0.9375rem; color: var(--muted); }
.dx-moved p, .dx-help p { margin-top: 0.6rem; color: var(--ink-2); max-width: 64ch; }
.dx-moved-list { columns: 3 13rem; column-gap: 2rem; margin-top: 1rem; font-size: 0.9375rem; }
.dx-moved-list > li { break-inside: avoid; padding-bottom: 0.8rem; }
.dx-moved-list ul { margin-top: 0.2rem; padding-left: 0.85rem; }
.dx-moved-list li li { padding: 0.12rem 0; font-size: 0.875rem; }
.dx-moved-list a { color: var(--ink-2); text-decoration: underline; text-decoration-color: rgba(26, 20, 11, 0.22); text-underline-offset: 0.2em; }
.dx-moved-list > li > a { font-weight: 500; color: var(--ink); }
.dx-moved-list a:hover { text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- wide screens: API two columns */
@media (min-width: 1240px) {
  .dx-wide .dx-main { grid-template-columns: minmax(0, 1fr); }
  .dx-wide .dx-article { max-width: 1120px; }
  .dx-wide .dx-toc { display: none; }
  .dx-wide .api-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 2.5rem; align-items: start; }
  .dx-wide .api-ex { position: sticky; top: calc(var(--dx-top) + 1.5rem); }
  .dx-wide .api-row + .api-row { margin-top: 1rem; }
}

/* ---------------------------------------------------------------- medium: no on-this-page column */
@media (max-width: 1239px) {
  .dx-main { grid-template-columns: minmax(0, var(--dx-text)); }
  .dx-toc { display: none; }
}

/* ---------------------------------------------------------------- small: the sidebar becomes a drawer */
@media (max-width: 900px) {
  :root { --dx-top: 56px; }
  .dx { grid-template-columns: minmax(0, 1fr); }
  .dx-links, .dx-cta { display: none; }
  .dx-menu { display: inline-grid; margin-left: -0.4rem; }
  .dx-top-in { gap: 0.4rem; padding-inline: 1rem; }
  .dx-search { margin-left: auto; min-width: 0; }
  .dx-main { padding: 1.75rem 1rem 4rem; }
  .dx-sitefoot { padding: 1.5rem 1rem 2rem; }
  .dx-side { display: none; }
  .js .dx-side {
    display: flex; position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: auto; width: min(86vw, 330px);
    background: var(--bg); transform: translateX(-102%); visibility: hidden;
    transition: transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
  }
  .js .dx-side.is-open {
    transform: none; visibility: visible; transition: transform var(--t-ui) var(--ease-out), visibility 0s;
    box-shadow: 20px 0 60px -30px rgba(18, 13, 6, 0.5); /* taste-skill-ignore: the open drawer sits above the page */
  }
  .dx-side-head { display: flex; align-items: center; justify-content: space-between; height: var(--dx-top); padding: 0 0.6rem 0 1.25rem; background: var(--surface); }
  .dx-side-title { font-weight: 600; font-size: 0.9375rem; }
  .dx-side-close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; }
  .dx-side-close:hover { background: var(--dx-hover); }
  .dx-side-close svg { width: 20px; height: 20px; }
  .dx-side-scroll { padding: 1rem 0.75rem 3rem; }
  .dx-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(18, 13, 6, 0.32); }
  .dx-scrim[hidden] { display: none; }
  html:not(.js) .dx-side { display: block; position: static; height: auto; }
  .dx-pager { grid-template-columns: minmax(0, 1fr); }
  .dx-popular { grid-template-columns: minmax(0, 1fr); }
  .dx-pal { padding-top: 0.75rem; padding-inline: 0.75rem; }
  .dx-pal-box { max-height: calc(100dvh - 1.5rem); }
  .dx-pal-foot { display: none; }
}
@media (max-width: 600px) {
  .dx-search { width: 40px; height: 40px; padding: 0; justify-content: center; background: none; }
  .dx-search-text, .dx-search .dx-kbd, .dx-bigsearch .dx-kbd { display: none; }
  .dx-head h1 { font-size: 1.875rem; }
  .dx-prose { font-size: 1rem; }
  .dx-prose h2 { font-size: 1.3125rem; margin-top: 2.5rem; }
  .code pre { font-size: 0.8rem; }
  .dx-foot-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .dx-page *, .dx-page *::before, .dx-page *::after { transition-duration: 0s !important; animation: none !important; scroll-behavior: auto !important; }
}
