/* The Ontomasticon documentation site. Colours follow Ontomasticon's default theme (css/default.css in the
   application), with a dark version for visitors whose system prefers it. */

:root {
  color-scheme: light dark;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #ffffff;
  --bg-subtle: #f6f8fa;
  --bg-hover: #eef2f5;
  --text: #1f2933;
  --text-strong: #0f1720;
  --text-muted: #5f6b7a;
  --border: #d9dee4;
  --border-subtle: #e8ecf0;
  --accent: #1a6a86;
  --accent-strong: #124c61;
  --accent-soft: #e8f2f6;
  --on-accent: #ffffff;
  --header-bg: rgb(255 255 255 / 0.86);
  --backdrop: rgb(15 23 32 / 0.35);
  --shadow-card: 0 1px 2px rgb(16 24 40 / 0.04), 0 14px 30px -16px rgb(16 24 40 / 0.25);

  --header-height: 3.75rem;
  --radius: 10px;
  --gutter: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1519;
    --bg-subtle: #151d22;
    --bg-hover: #1c262c;
    --text: #d5dde3;
    --text-strong: #f1f5f8;
    --text-muted: #97a4ae;
    --border: #2a353c;
    --border-subtle: #212b31;
    --accent: #5cb8d6;
    --accent-strong: #8ccfe5;
    --accent-soft: #14303a;
    --on-accent: #062530;
    --header-bg: rgb(15 21 25 / 0.86);
    --backdrop: rgb(0 0 0 / 0.55);
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 30px -16px rgb(0 0 0 / 0.7);
  }
}

/* Base */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--on-accent);
}

body > main,
body > .docs {
  flex: 1 0 auto;
  width: 100%;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  -webkit-backdrop-filter: saturate(1.8) blur(12px);
  backdrop-filter: saturate(1.8) blur(12px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  color: var(--text-strong);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text-strong);
}

.brand img {
  display: block;
  width: 2.75rem;
  height: auto;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.header-links a:hover {
  color: var(--text-strong);
  background: var(--bg-hover);
}

.header-links svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -0.5rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--text-strong);
  background: transparent;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--bg-hover);
}

.nav-toggle svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Documentation pages: the menu beside the page */

.docs {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sidebar {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2.25rem 0.25rem 2.5rem 0;
  scrollbar-width: thin;
}

.sidebar-title {
  margin: 0 0 0.5rem;
  padding: 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.sidebar li {
  margin: 1px 0;
}

.sidebar a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.sidebar a:hover {
  color: var(--text-strong);
  background: var(--bg-hover);
}

.sidebar a[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 600;
}

/* The current page's sections, added by site.js */
.sidebar .toc {
  margin: 0.35rem 0 0.75rem 0.9rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border);
}

.sidebar .toc a {
  position: relative;
  padding: 0.3rem 0.65rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.sidebar .toc a:hover {
  color: var(--text-strong);
}

.sidebar .toc a.is-active {
  color: var(--accent);
  font-weight: 500;
}

.sidebar .toc a.is-active::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  left: calc(-0.5rem - 1px);
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.content {
  min-width: 0;
  max-width: 48rem;
  padding: 2.75rem 0 4rem;
}

.content h1,
.content h2,
.content h3 {
  color: var(--text-strong);
  line-height: 1.25;
  text-wrap: balance;
}

.content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 1.55rem + 1.6vw, 2.625rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.content h1 + p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.content h2 {
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.content h3 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.1875rem;
  font-weight: 600;
}

.content p,
.content ul,
.content ol,
.content table,
.content pre,
.content .table-wrap,
.content .code-block {
  margin: 0 0 1.15rem;
}

.content ul,
.content ol {
  padding-left: 1.4rem;
}

.content li {
  margin: 0.4rem 0;
  padding-left: 0.2rem;
}

.content li > ul {
  margin: 0.4rem 0 0;
}

.content li::marker {
  color: var(--text-muted);
}

.content b,
.content strong {
  color: var(--text-strong);
  font-weight: 600;
}

/* Links to sections, added by site.js */
.heading-anchor {
  margin-left: 0.5rem;
  color: var(--text-muted);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.content h2:hover .heading-anchor,
.content h3:hover .heading-anchor {
  opacity: 1;
}

.heading-anchor:hover {
  color: var(--accent);
}

/* Code */

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

code {
  padding: 0.1em 0.38em;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: var(--text-strong);
  background: var(--bg-subtle);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

pre {
  overflow-x: auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font-size: 0.875rem;
  line-height: 1.6;
  tab-size: 2;
}

pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font-size: inherit;
  overflow-wrap: normal;
}

.code-block {
  position: relative;
}

.code-block pre {
  margin: 0;
  padding-right: 4.75rem;
}

.copy-button {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  background: var(--bg);
  font: 500 0.75rem/1.5 var(--font-sans);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.code-block:hover .copy-button,
.copy-button:focus-visible,
.copy-button.is-done {
  opacity: 1;
}

.copy-button:hover {
  color: var(--text-strong);
  border-color: var(--text-muted);
}

@media (hover: none) {
  .copy-button {
    opacity: 1;
  }
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.content .table-wrap table {
  margin: 0;
}

.content th,
.content td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
}

.content th {
  color: var(--text-strong);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.content td {
  border-top: 1px solid var(--border-subtle);
}

/* Previous and next pages, and the link to edit the page, added by site.js */

.page-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.page-nav a:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
}

.page-nav-label {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.page-nav-title {
  color: var(--accent);
  font-weight: 600;
}

.page-nav-prev .page-nav-label::before {
  content: "\2190\00a0";
}

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

.page-nav-next .page-nav-label::after {
  content: "\00a0\2192";
}

.edit-page {
  margin: 1.5rem 0 0;
  font-size: 0.875rem;
}

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

.edit-page a:hover {
  color: var(--accent);
}

/* Footer */

.site-footer {
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem var(--gutter);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 700;
}

.footer-brand img {
  display: block;
  width: 2rem;
  height: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-strong);
  text-decoration: underline;
}

/* The license, and who created Ontomasticon */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  flex-basis: 100%;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: inherit;
}

/* Home page */

.hero {
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(52rem 28rem at 90% -5%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(40rem 22rem at -5% 105%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 3rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter) clamp(3.5rem, 7vw, 5.5rem);
}

.hero h1 {
  margin: 0 0 1.25rem;
  color: var(--text-strong);
  font-size: clamp(2.75rem, 1.9rem + 3.6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero-lead {
  max-width: 34rem;
  margin: 0 0 2.25rem;
  color: var(--text-muted);
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  display: block;
  width: 100%;
  max-width: 23rem;
  height: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.875rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.button svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.button-primary {
  color: var(--on-accent);
  background: var(--accent);
}

.button-primary:hover {
  color: var(--on-accent);
  background: var(--accent-strong);
}

.button-secondary {
  color: var(--text-strong);
  background: var(--bg);
  border-color: var(--border);
}

.button-secondary:hover {
  color: var(--text-strong);
  background: var(--bg-subtle);
  border-color: color-mix(in srgb, var(--text-muted) 55%, var(--border));
}

.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border-subtle);
}

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section h2 {
  margin: 0 0 2rem;
  color: var(--text-strong);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.card:has(a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card a:focus-visible {
  outline: none;
}

.card-icon,
.info-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.1rem;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}

.card-icon svg,
.info-icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-icon svg.filled {
  fill: currentColor;
  stroke: none;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.card h3 a {
  color: var(--text-strong);
  text-decoration: none;
}

/* The whole card is the link */
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* The featured card keeps Ontomasticon's teal in the dark theme too */
.card-featured {
  border-color: transparent;
  background: linear-gradient(135deg, #1d7897, #124c61);
}

.card-featured:hover {
  border-color: transparent;
}

.card-featured h3 a,
.card-featured p,
.card-kicker {
  color: #ffffff;
}

.card-featured .card-icon {
  color: #ffffff;
  background: rgb(255 255 255 / 0.16);
}

.card .card-kicker {
  margin: auto 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quotes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.quote {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 2rem 2rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.quote-term {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.2;
}

.quote blockquote {
  flex: 1;
  margin: 0 0 1.5rem;
}

.quote blockquote p {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  line-height: 1.6;
}

.quote figcaption {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.quote figcaption::before {
  content: "\2014\00a0";
}

.quote cite {
  font-style: normal;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 3rem;
}

.section .info h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.info p,
.info ul {
  margin: 0;
  color: var(--text-muted);
}

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

.info li + li {
  margin-top: 0.35rem;
}

.not-found {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 8rem) var(--gutter);
  text-align: center;
}

.not-found .eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.not-found h1 {
  margin: 0 0 1rem;
  color: var(--text-strong);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.not-found p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.not-found .hero-actions {
  justify-content: center;
  margin-top: 2rem;
}

/* Wider screens */

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-featured {
    grid-column: span 2;
  }
}

@media (min-width: 52rem) {
  .quotes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 64rem) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Narrower screens: the menu opens from the button in the header */

@media (max-width: 56rem) {
  .docs {
    display: block;
  }

  /* Without JavaScript the menu is shown above the page */
  .sidebar {
    position: static;
    max-height: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 1rem var(--gutter);
    border-bottom: 1px solid var(--border-subtle);
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 40;
    align-self: stretch;
    width: min(20rem, 86vw);
    margin: 0;
    padding: 1.25rem 1rem 2rem;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    background: var(--bg);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .nav-open .sidebar {
    transform: none;
    visibility: visible;
    box-shadow: 0 0 40px rgb(0 0 0 / 0.15);
    transition: transform 0.25s ease;
  }

  .nav-backdrop {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 30;
    background: var(--backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0s linear 0.25s;
  }

  .nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s;
  }

  .nav-open body {
    overflow: hidden;
  }

  .content {
    padding-top: 2rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .hero-art {
    order: -1;
    justify-content: flex-start;
  }

  .hero-art img {
    max-width: 9rem;
  }
}

@media (min-width: 56.0625rem) {
  .nav-backdrop {
    display: none;
  }
}

@media (max-width: 40rem) {
  :root {
    --gutter: 1rem;
  }

  .header-link-docs {
    display: none !important;
  }

  .header-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .content h2 {
    font-size: 1.4rem;
  }

  /* Wide tables scroll sideways rather than squeezing their columns */
  .table-wrap table:has(th:nth-child(3)) {
    min-width: 38rem;
  }

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

  .page-nav-next {
    grid-column: auto;
  }

  .quote {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }

  .card:hover {
    transform: none;
  }
}

@media print {
  :root {
    --bg: #fff;
    --bg-subtle: #fff;
    --text: #000;
    --text-strong: #000;
    --text-muted: #333;
    --border: #bbb;
    --border-subtle: #ddd;
    --accent: #000;
    --accent-strong: #000;
  }

  .site-header,
  .sidebar,
  .site-footer,
  .page-nav,
  .edit-page,
  .copy-button,
  .heading-anchor,
  .skip-link,
  .nav-backdrop,
  .hero-actions {
    display: none !important;
  }

  .docs {
    display: block;
    max-width: none;
    padding: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .table-wrap {
    overflow: visible;
  }

  pre {
    white-space: pre-wrap;
  }
}
