/*
 * The docs site's one stylesheet (developer docs decision, D11; docs/brand/docs-site.md). The
 * website's neutrals, ink on white and warm white, hairlines instead of shadows; gate blue in the
 * product's role: links, the current navigation entry and the focus ring, nothing else. Light and
 * dark, the first one from the system; the script stores a choice as `data-theme` on the root.
 * The build gives each font its hashed address (src/site.ts). Contrast pairs: src/contrast.test.ts.
 */

/* ---------- Fonts: Geist and Geist Mono, self-hosted, latin and latin-ext ---------- */

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist-latin-ext-wght-normal-gk9IW10m.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist-latin-wght-normal-GfnJJUaq.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geist-mono-latin-ext-wght-normal-GhieuZfD.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geist-mono-latin-wght-normal-aErVtTH4.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens: light first, dark from the system or the stored choice ---------- */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f9f9f7;
  --hover: #f1f1ee;
  --hairline: #dededa;
  --rule-strong: #8a8a8f;
  --fg: #0e0e10;
  --soft: #46464c;
  --muted: #6b6b70;
  --link: #2a47d9;
  --selected: #eaeefe;
  --selected-fg: #2a47d9;
  --ring: #2e4de6;
  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --topbar: 3.5rem;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e0e10;
    --surface: #141416;
    --hover: #1c1c20;
    --hairline: #2a2a2e;
    --rule-strong: #6a6a72;
    --fg: #ececee;
    --soft: #b4b4ba;
    --muted: #8e8e95;
    --link: #8aa0ff;
    --selected: #141b38;
    --selected-fg: #8aa0ff;
    --ring: #6f8bff;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #141416;
  --hover: #1c1c20;
  --hairline: #2a2a2e;
  --rule-strong: #6a6a72;
  --fg: #ececee;
  --soft: #b4b4ba;
  --muted: #8e8e95;
  --link: #8aa0ff;
  --selected: #141b38;
  --selected-fg: #8aa0ff;
  --ring: #6f8bff;
}

/* ---------- Base ---------- */

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

html {
  scroll-padding-top: calc(var(--topbar) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--soft);
  font: 400 1rem/1.65 var(--font-sans);
  font-feature-settings: 'tnum' 0;
}

h1,
h2,
h3,
h4 {
  color: var(--fg);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  letter-spacing: -0.025em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
}

h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.125rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 2px;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--surface);
  color: var(--fg);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.lead {
  color: var(--soft);
  font-size: 1.125rem;
}

.none {
  color: var(--muted);
}

.skip {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}

.skip:focus {
  top: 0.75rem;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--topbar);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 90rem;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
}

.logo {
  display: block;
  width: auto;
  height: 1.25rem;
}

.brand-docs {
  padding-left: 0.6rem;
  border-left: 1px solid var(--hairline);
  color: var(--soft);
  font-size: 0.9375rem;
  font-weight: 500;
}

.search-open {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: 14rem;
  min-height: 2.25rem;
  padding: 0 0.5rem 0 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.search-open:hover {
  background: var(--hover);
}

.kbd {
  padding: 0.05rem 0.35rem;
  white-space: nowrap;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
}

.topbar-links {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.topbar-links a {
  color: var(--soft);
  text-decoration: none;
}

.topbar-links a:hover,
.topbar-links a[aria-current] {
  color: var(--fg);
  text-decoration: underline;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.lang {
  display: flex;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.lang a {
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--soft);
  text-decoration: none;
}

.lang a:hover {
  background: var(--hover);
}

.lang a[aria-current] {
  background: var(--selected);
  color: var(--selected-fg);
}

.theme {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}

.theme:hover {
  background: var(--hover);
}

/* The theme's mark: a ring for light, a disc for dark, half of each for the system. */
.theme-icon {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

[data-theme='light'] .theme-icon {
  background: transparent;
}

[data-theme='dark'] .theme-icon {
  background: currentColor;
}

/* ---------- The frame: navigation, content, the side column ---------- */

.frame {
  display: grid;
  grid-template-columns: 16.5rem minmax(0, 1fr) 14rem;
  gap: 0 3rem;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.layout-api .frame {
  grid-template-columns: 16.5rem minmax(0, 1fr) minmax(0, 27rem);
}

.column {
  min-width: 0;
  padding: 2.5rem 0 4rem;
}

main:focus {
  outline: none;
}

.layout-guide main {
  max-width: 46rem;
}

.side {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  max-height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 2.5rem 0 2rem;
}

/* The menu's checkbox exists for narrow screens only; there it is hidden but takes focus. */
.nav-toggle {
  display: none;
}

.nav-open {
  display: none;
}

.sidebar {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  max-height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 2rem 0.25rem 2rem 0;
  font-size: 0.875rem;
}

.nav-group,
.nav-module {
  margin-bottom: 1.25rem;
}

.nav-title,
.nav-module > summary {
  margin: 0 0 0.35rem;
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 600;
}

.nav-module > summary {
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.nav-module > summary:hover {
  background: var(--hover);
}

.nav-title {
  padding: 0 0.5rem;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar li a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  color: var(--soft);
  text-decoration: none;
  line-height: 1.4;
}

.sidebar li a:hover {
  background: var(--hover);
  color: var(--fg);
}

.sidebar li a[aria-current='page'] {
  background: var(--selected);
  color: var(--selected-fg);
  font-weight: 500;
}

.nav-label {
  min-width: 0;
}

.nav-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.toc-title {
  margin: 0 0 0.5rem;
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 600;
}

.toc ul {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--hairline);
  list-style: none;
  font-size: 0.8125rem;
}

.toc a {
  display: block;
  padding: 0.2rem 0 0.2rem 0.75rem;
  color: var(--soft);
  text-decoration: none;
}

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

.toc-3 a {
  padding-left: 1.5rem;
}

/* ---------- The end of a page ---------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--rule-strong);
}

.pager span {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.pager-next {
  grid-column: 2;
  text-align: right;
}

.page-foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.8125rem;
}

.page-foot a {
  color: var(--muted);
}

/* ---------- Components of the Markdown (src/markdown.ts) ---------- */

.callout {
  margin: 1.5rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout-warning,
.callout-limit {
  border-left-color: var(--fg);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-label {
  margin-bottom: 0.25rem;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
}

.steps {
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 0 0 1.25rem 2.75rem;
  border-left: 1px solid var(--hairline);
  margin-left: 0.85rem;
  counter-increment: step;
}

.step:last-child {
  border-left-color: transparent;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: -0.85rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 600;
}

.step > h2:first-child,
.step > h3:first-child {
  margin-top: 0;
  font-size: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--soft);
  text-decoration: none;
}

.card:hover {
  border-color: var(--rule-strong);
}

.card-title {
  color: var(--fg);
  font-weight: 600;
}

.card-text {
  font-size: 0.9375rem;
}

.table-wrap {
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

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

th {
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  white-space: nowrap;
}

td:first-child code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.align-center {
  text-align: center;
}

.align-right {
  text-align: right;
}

/* ---------- Code: blocks, groups with tabs that work without script, colours ---------- */

.code {
  position: relative;
  margin: 1rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.code pre {
  margin: 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  color: var(--fg);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.code-head,
.tab-row {
  display: flex;
  gap: 0.25rem;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.8125rem;
}

.code-head span {
  padding: 0.45rem 0.5rem;
  color: var(--soft);
}

.copy {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.copy:hover {
  background: var(--hover);
}

.tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tab-label {
  padding: 0.45rem 0.5rem;
  border-bottom: 2px solid transparent;
  color: var(--soft);
  cursor: pointer;
}

.tab-label:hover {
  color: var(--fg);
}

/* The panels follow the inputs and the tab row, so the nth input shows the (n + 1)th div. */
.tab-panel {
  display: none;
}

.tab-input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(2),
.tab-input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(3),
.tab-input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(4),
.tab-input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(5) {
  display: block;
}

.tab-input:nth-of-type(1):checked ~ .tab-row .tab-label:nth-of-type(1),
.tab-input:nth-of-type(2):checked ~ .tab-row .tab-label:nth-of-type(2),
.tab-input:nth-of-type(3):checked ~ .tab-row .tab-label:nth-of-type(3),
.tab-input:nth-of-type(4):checked ~ .tab-row .tab-label:nth-of-type(4) {
  border-bottom-color: var(--fg);
  color: var(--fg);
  font-weight: 500;
}

.tab-input:nth-of-type(1):focus-visible ~ .tab-row .tab-label:nth-of-type(1),
.tab-input:nth-of-type(2):focus-visible ~ .tab-row .tab-label:nth-of-type(2),
.tab-input:nth-of-type(3):focus-visible ~ .tab-row .tab-label:nth-of-type(3),
.tab-input:nth-of-type(4):focus-visible ~ .tab-row .tab-label:nth-of-type(4) {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

/* highlight.js's classes, in neutrals: weight and grey carry the tokens, no hue. */
.hljs-comment,
.hljs-quote,
.hljs-meta {
  color: var(--muted);
}

.hljs-comment,
.hljs-quote {
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-name,
.hljs-section,
.hljs-title {
  font-weight: 600;
}

.hljs-string,
.hljs-regexp,
.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
  color: var(--soft);
}

.hljs-deletion {
  color: var(--muted);
  text-decoration: line-through;
}

/* ---------- The API pages (src/api.ts) ---------- */

.crumbs {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

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

.op-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
}

.op-path {
  color: var(--fg);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.path-param {
  color: var(--soft);
}

.op-route {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.method {
  display: inline-block;
  min-width: 3.4rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--fg);
  font: 600 0.75rem/1.4 var(--font-mono);
  text-align: center;
}

.method-sm {
  min-width: 2.9rem;
  padding: 0 0.25rem;
  font-size: 0.625rem;
}

.facts {
  display: grid;
  gap: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.facts div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--fg);
  font-weight: 600;
}

.facts dd {
  margin: 0;
}

.status {
  padding: 0 0.35rem;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--soft);
  font: 500 0.8125rem var(--font-mono);
}

.examples-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
}

.examples .code + .examples-title {
  margin-top: 1.5rem;
}

.shaped {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

/* ---------- Search (src/layout.ts, assets/site.js) ---------- */

.search {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 6rem));
  margin: 4rem auto auto;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg);
  color: var(--soft);
}

.search::backdrop {
  background: rgb(0 0 0 / 50%);
}

.search-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--hairline);
}

.search-input {
  flex: 1;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.btn {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn:hover {
  background: var(--hover);
}

.search-results {
  max-height: 26rem;
  margin: 0;
  padding: 0.5rem;
  overflow-y: auto;
  list-style: none;
}

.search-results a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 4px;
  color: var(--fg);
  text-decoration: none;
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--selected);
  color: var(--selected-fg);
}

.result-heading {
  color: var(--soft);
}

.result-text {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results a:hover .result-heading,
.search-results a:hover .result-text,
.search-results a:focus-visible .result-heading,
.search-results a:focus-visible .result-text {
  color: var(--selected-fg);
}

.search-empty {
  margin: 0;
  padding: 1rem 1.25rem;
  color: var(--muted);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 80rem) {
  .layout-guide .frame {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .layout-guide .side {
    display: none;
  }

  .layout-api .frame {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .layout-api .side {
    position: static;
    grid-column: 2;
    max-height: none;
    padding-top: 0;
  }
}

@media (max-width: 56rem) {
  .frame,
  .layout-guide .frame,
  .layout-api .frame {
    display: block;
  }

  .topbar-inner {
    gap: 0.75rem;
  }

  .topbar-links,
  .brand-docs,
  .kbd {
    display: none;
  }

  .search-open {
    min-width: 0;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nav-open {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    margin-top: 0.75rem;
    padding: 0 0.75rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.875rem;
    cursor: pointer;
  }

  .nav-toggle:focus-visible + .nav-open {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
  }

  .sidebar {
    display: none;
    position: static;
    max-height: none;
    padding-top: 1rem;
  }

  .nav-toggle:checked ~ .sidebar {
    display: block;
  }

  .column {
    padding-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sidebar li a,
  .card,
  .pager a,
  .copy,
  .btn {
    transition:
      background-color 150ms ease,
      border-color 150ms ease,
      color 150ms ease;
  }
}

@media (pointer: coarse) {
  .sidebar li a,
  .lang a,
  .tab-label,
  .search-open,
  .search-input,
  .btn,
  .copy {
    min-height: 2.75rem;
  }

  .theme {
    width: 2.75rem;
    height: 2.75rem;
  }
}
