:root {
  --canvas: var(--bf-bg-canvas);
  --rail: var(--bf-bg-surface);
  --surface: var(--bf-bg-raised);
  --hover: var(--bf-bg-hover);
  --line: var(--bf-border-decorative);
  --ink: var(--bf-text-primary);
  --muted: var(--bf-text-secondary);
  --focus: var(--bf-focus-ring);
  --sidebar-width: 276px;
  --sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.link-preview-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.link-preview-trigger:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--hover);
}
.link-preview-trigger svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
}
.link-preview-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  overflow: hidden;
}
.link-preview-dialog[open] {
  display: flex;
  flex-direction: column;
}
.link-preview-dialog::backdrop {
  background: color-mix(in srgb, var(--canvas) 65%, transparent);
}
.link-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.link-preview-header p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.link-preview-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
}
.link-preview-header button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}
.link-preview-dialog .link-preview-body {
  width: 100%;
  max-width: none;
  overflow-wrap: anywhere;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  padding: 8px 24px 24px;
}
.link-preview-body :not(pre) > code {
  overflow-wrap: anywhere;
}
.link-preview-body > :first-child:is(h2, h3, h4, h5, h6) {
  display: none;
}
.link-preview-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--rail);
  font-size: 12px;
}
.link-preview-footer > span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.link-preview-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.link-preview-footer a {
  color: var(--muted);
  text-decoration: none;
}
.link-preview-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.link-preview-footer .link-preview-open {
  margin-left: auto;
  color: var(--ink);
}
@media (max-width: 700px) {
  .link-preview-trigger,
  .link-preview-header button {
    width: 44px;
    height: 44px;
  }
  .link-preview-header,
  .link-preview-footer {
    padding: 16px;
  }
  .link-preview-dialog .link-preview-body {
    padding: 8px 16px 16px;
  }
}

.reader-source-button,
.section-source-button {
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.reader-source-button {
  padding: 0;
}
.section-source-button {
  display: inline-block;
  margin-left: 12px;
  padding: 4px 8px;
  vertical-align: middle;
  letter-spacing: normal;
  font-weight: 400;
}
.section-source-button:hover,
.reader-source-button:hover {
  color: var(--ink);
  background: var(--hover);
}
.source-inspector {
  width: min(960px, calc(100vw - 32px));
}
.source-inspector-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.source-inspector-controls label {
  flex: 0 0 auto;
  color: var(--muted);
}
.source-inspector-controls select {
  min-width: 0;
  flex: 1;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--rail);
  color: var(--ink);
  font: inherit;
}
.source-inspector-body {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 24px 24px;
}
.source-inspector-body > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.source-inspector-body .code-block {
  margin: 0;
}
.source-inspector-body .code-block pre {
  max-height: none;
}
.source-inspector-body .code-line::before {
  content: attr(data-source-line);
}
@media (max-width: 700px) {
  .reader-source-button,
  .section-source-button {
    min-height: 44px;
  }
  .source-inspector-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }
  .source-inspector-controls select {
    min-height: 44px;
  }
  .source-inspector-body {
    padding: 16px;
  }
}

/* Article tools share the reader's type and semantic colour roles. */
.schema-reference {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.reference-index {
  border-bottom: 1px solid var(--line);
}
.reference-index > summary {
  padding: 16px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
}
.reference-index nav {
  overflow-x: auto;
  padding: 0 16px 16px;
}
.reference-index table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.reference-index th,
.reference-index td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.reference-index th {
  color: var(--muted);
  font-weight: 500;
}
.reference-index td:first-child {
  overflow-wrap: anywhere;
}
.reference-fields > li {
  scroll-margin-top: 90px;
}
.reference-fields > li:target {
  box-shadow: inset 2px 0 var(--bf-border-control);
}
.reference-field-source {
  margin: 0 16px 12px;
  min-width: 0;
}
.reference-field-source > summary {
  width: fit-content;
  padding: 8px 0;
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.document-body .reference-pointer {
  display: block;
  margin: 4px 0 12px;
  overflow-wrap: anywhere;
  font-size: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.reference-field-source .code-block {
  margin: 0;
}
.reference-field-source pre {
  max-height: 320px;
  overflow: auto;
}
.doc-source-output {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.doc-source-output > figcaption {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.source-output-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.source-output-panels > section {
  min-width: 0;
}
.source-output-panels .code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.source-output-panels pre {
  max-height: 360px;
  overflow: auto;
}
.source-output-result {
  border-left: 1px solid var(--line);
  padding: 12px 16px 16px;
}
.document-body .source-output-result > h3 {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.source-output-result .media-figure {
  margin: 0;
}
@media (max-width: 700px) {
  .source-output-panels {
    grid-template-columns: minmax(0, 1fr);
  }
  .source-output-result {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.reference-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 16px;
  background: var(--rail);
  border-bottom: 1px solid var(--line);
}
.reference-toolbar label {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.reference-filter {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--bf-border-control);
  border-radius: 5px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.reference-controls {
  display: flex;
  gap: 4px;
}
.reference-controls button {
  min-height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.reference-controls button:hover {
  background: var(--hover);
  color: var(--ink);
}
.reference-controls button:disabled {
  opacity: 0.5;
  cursor: default;
  background: transparent;
  color: var(--muted);
}
.document-body .reference-fields {
  list-style: none;
  padding: 0;
  margin: 0;
}
.reference-fields > li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.reference-fields > li:last-child {
  border-bottom: 0;
}
.reference-field-heading,
.reference-branch > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 13px;
}
.reference-branch > summary {
  cursor: pointer;
  list-style: none;
}
.reference-branch > summary::before {
  content: "›";
  color: var(--muted);
  transform: rotate(0deg);
}
.reference-branch[open] > summary::before {
  transform: rotate(90deg);
}
.reference-branch > summary:hover {
  background: var(--hover);
}
.reference-field-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.reference-required {
  color: var(--ink);
}
.reference-field-body {
  margin: 0 16px 16px 26px;
  border-left: 1px solid var(--bf-border-control);
  background: var(--rail);
}
.reference-fields p {
  padding: 0 16px 12px;
  font-size: 13px;
}
.reference-footer {
  border-top: 1px solid var(--line);
  background: var(--rail);
  font-size: 12px;
}
.reference-footer > a {
  display: inline-block;
  margin: 14px 16px;
}
.reference-footer summary {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  color: var(--muted);
}
.reference-footer .code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.document-body .reference-empty {
  margin: 0;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 700px) {
  .reference-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .reference-controls button,
  .reference-filter {
    min-height: 44px;
  }
  .reference-filter {
    font-size: 16px;
  }
  .reference-field-heading,
  .reference-branch > summary {
    flex-wrap: wrap;
  }
  .reference-field-meta {
    gap: 8px;
  }
}
.doc-diagram {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--rail);
}
.doc-diagram > figcaption,
.doc-file-tree > figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.diagram-format {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.diagram-expand {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}
.diagram-expand:hover {
  background: var(--hover);
  color: var(--ink);
}
.diagram-expand:disabled {
  opacity: 0.4;
  cursor: default;
}
.diagram-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 48px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--canvas);
}
.diagram-dialog::backdrop {
  background: rgb(0 0 0 / 60%);
}
.diagram-dialog .diagram-canvas {
  max-height: 75vh;
  padding: 24px 0;
}
.diagram-dialog svg {
  width: var(--diagram-zoom, 100%);
  max-width: none !important;
}
.diagram-dialog {
  padding: 0;
}
.diagram-dialog-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--rail);
}
.diagram-dialog-header h2 {
  margin: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.diagram-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.diagram-dialog-header button {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.diagram-dialog-header button:hover {
  background: var(--hover);
}
.diagram-dialog-header button:disabled {
  opacity: 0.4;
  cursor: default;
}
.diagram-zoom-controls output {
  width: 40px;
  text-align: center;
  color: var(--muted);
  font:
    11px ui-monospace,
    monospace;
}
.diagram-close {
  font-size: 20px;
}
.diagram-dialog .diagram-canvas {
  display: block;
  padding: 24px;
}
.document-body a.diagram-download,
.diagram-workspace a.diagram-download {
  display: inline-block;
  margin: 0 16px 12px;
  font-size: 12px;
  color: var(--muted);
}
.diagram-workspace {
  display: grid;
  min-width: 0;
}
.diagram-workspace > * {
  min-width: 0;
}
.diagram-workspace .diagram-source {
  overflow: auto;
  max-height: 55vh;
}
.diagram-workspace .code-block pre {
  margin: 0;
  padding: 16px;
  line-height: 1.65;
  font-size: 12px;
  overflow: auto;
}
.diagram-workspace .code-block code {
  counter-reset: code-line;
  font-size: inherit;
}
.diagram-workspace .code-block .code-line {
  min-width: auto;
}
.diagram-keyboard-hint {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
@media (min-width: 900px) {
  .diagram-workspace:has(.diagram-source[open]) {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
  }
  .diagram-workspace .diagram-source[open] {
    border-top: 0;
    border-left: 1px solid var(--line);
    max-height: 75vh;
  }
}
@media (max-width: 700px) {
  .diagram-dialog-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .diagram-dialog-header button {
    min-height: 44px;
    min-width: 44px;
  }
  .diagram-dialog-header h2 {
    flex-basis: 100%;
  }
  .diagram-dialog .diagram-canvas {
    padding: 16px;
    min-height: 160px;
    max-height: 45dvh;
  }
  .diagram-workspace .diagram-source {
    max-height: none;
    overflow: visible;
  }
}
.diagram-canvas {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 32px 24px;
  overflow: auto;
  background: var(--canvas);
  background-image: radial-gradient(var(--line) 0.8px, transparent 0.8px);
  background-size: 20px 20px;
}
.diagram-canvas svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.diagram-canvas svg .node rect {
  filter: none !important;
}
.document-body .diagram-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.diagram-source {
  border-top: 1px solid var(--line);
}
.diagram-source summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
}
.diagram-source summary:hover {
  color: var(--ink);
  background: var(--hover);
}
.diagram-source .code-block {
  border: 0;
  border-radius: 0;
  margin: 0;
}
.doc-tabs .doc-diagram {
  border: 0;
  margin: 0;
  border-radius: 0;
}
.doc-tabs [role="tabpanel"]:has(.doc-diagram) {
  padding: 0;
}
.document-body .doc-steps {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.document-body .doc-steps > li {
  position: relative;
  padding: 0 0 24px 44px;
  margin: 0;
  border-left: 1px solid var(--line);
  margin-left: 14px;
}
.document-body .doc-steps > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.doc-step-marker {
  position: absolute;
  left: -14px;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--rail);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 12px var(--sans);
}
.document-body .doc-steps h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 28px;
}
.doc-steps .code-block {
  margin: 0;
}
.doc-properties {
  margin: 24px 0;
  border-top: 1px solid var(--line);
}
.doc-properties > div {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.doc-properties dt {
  color: var(--ink);
}
.doc-properties dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.doc-file-tree {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--rail);
}
.document-body .doc-file-tree ul {
  list-style: none;
  margin: 0;
  padding: 8px 0 8px 20px;
}
.document-body .doc-file-tree > ul {
  padding: 16px;
}
.document-body .doc-file-tree li {
  margin: 0;
}
.document-body .doc-file-tree ul ul {
  border-left: 1px solid var(--line);
  margin-left: 7px;
  padding-block: 0;
}
.file-tree-label {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 32px;
  overflow-wrap: anywhere;
}
.file-tree-label > span {
  color: var(--muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.document-body .file-tree-label code {
  background: none;
  padding: 0;
  border: 0;
  font-size: 12px;
}
.document-body .doc-checklist {
  list-style: none;
  margin: 24px 0;
  padding: 0;
}
.doc-checklist li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
}
.checklist-state {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  flex-shrink: 0;
}
.doc-related {
  margin: 24px 0;
  border-top: 1px solid var(--line);
}
.document-body .doc-related a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.doc-related a:hover {
  background: var(--hover);
}
.doc-related strong {
  font-size: 14px;
  font-weight: 500;
}
.doc-related small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.doc-related a > span:last-child {
  color: var(--muted);
}
.document-body kbd {
  padding: 2px 6px;
  font:
    12px ui-monospace,
    monospace;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}
@media (max-width: 700px) {
  .diagram-canvas {
    padding: 20px 12px;
  }
  .doc-properties > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .doc-steps > li {
    padding-left: 32px;
  }
  .diagram-source summary {
    min-height: 44px;
  }
}

* {
  box-sizing: border-box;
}
html {
  background: var(--canvas);
}
body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
button {
  font: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 6;
  top: 10px;
  left: 10px;
  padding: 8px 10px;
  background: var(--ink);
  color: var(--canvas);
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 62px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(12px);
}
.topbar-left {
  position: relative;
  display: flex;
  align-items: center;
  width: var(--sidebar-width);
  height: 100%;
  gap: 13px;
  padding: 0 20px;
}
.topbar-left::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  content: "";
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 24px;
  text-decoration: none;
}
.butterfly-mark {
  width: 19px;
  height: 19px;
  fill: var(--ink);
}
.divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}
.product-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 625;
  letter-spacing: -0.026em;
  text-decoration: none;
}
.specimen-label {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.specimen-sidebar a {
  font-weight: 400;
}
.specimen-sidebar a.active {
  background: var(--hover);
  color: var(--ink);
  box-shadow: inset 2px 0 var(--bf-border-control);
}
@media (max-width: 700px) {
  .specimen-sidebar {
    display: none;
  }
}
.search {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 36px;
  height: 36px;
  gap: 8px;
  margin-left: auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  transition: background 0.16s ease;
}
.search-icon {
  position: relative;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  border-top: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}
.search span:not(.search-icon),
.search kbd {
  display: none;
}
.theme-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-left: auto;
  margin-right: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface);
}
.theme-toggle span {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.theme-toggle span::after {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 17px;
  height: 17px;
  border: 1px solid var(--canvas);
  border-radius: 50%;
  background: var(--surface);
  content: "";
  transform: translate(-3px, -2px);
}
.theme-toggle[aria-pressed="true"] span::after {
  display: none;
}
.menu-button {
  display: none;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.menu-icon {
  position: relative;
  width: 13px;
  height: 9px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.menu-icon::after {
  position: absolute;
  top: 3px;
  left: 0;
  width: 13px;
  border-top: 1px solid currentColor;
  content: "";
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - 62px);
}
.sidebar {
  position: sticky;
  top: 62px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 62px);
  padding: 22px 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--canvas);
  overflow: hidden;
}
.sidebar nav {
  display: grid;
  gap: 3px;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.12s ease,
    background 0.12s ease;
}
.sidebar a:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
}
.sidebar a.active {
  color: var(--ink);
}
.sidebar > nav:first-child a {
  font-size: 13px;
  font-weight: 450;
}
.sidebar-pages {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-height: 0;
  margin-top: 0;
  align-content: start;
  overflow-y: auto;
}
.sidebar-group {
  display: grid;
  gap: 2px;
}
.sidebar-group-toggle {
  display: flex;
  width: 32px;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12.5px;
  font-weight: 510;
  line-height: 1.28;
  text-align: left;
  cursor: pointer;
}
.sidebar-group-row {
  display: flex;
  align-items: center;
  min-height: 36px;
}
.sidebar .sidebar-group-row > a {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1.4;
}
.sidebar .sidebar-group-row > a.active {
  font-weight: 600;
  background: var(--hover);
  box-shadow: inset 2px 0 var(--bf-border-control);
}
.topbar-breadcrumb {
  min-width: 0;
  padding: 0 24px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}
.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible {
  color: var(--ink);
  background: transparent;
}
.sidebar-group.expanded .sidebar-group-toggle {
  color: var(--ink);
  font-weight: 610;
}
.disclosure {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-right: 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.sidebar-group.expanded .disclosure {
  transform: rotate(45deg);
}
.sidebar-group-pages {
  display: grid;
  gap: 2px;
  margin: 4px 0 10px 18px;
  padding: 0 0 0 10px;
  border-left: 1px solid var(--line);
}
.sidebar-group-pages[hidden] {
  display: none;
}
.sidebar .sidebar-group-pages a {
  min-height: 31px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.28;
  font-weight: 400;
}
.sidebar .sidebar-group-pages a:hover,
.sidebar .sidebar-group-pages a.active {
  color: var(--ink);
  background: transparent;
}
.sidebar .sidebar-group-pages a.active {
  position: relative;
  font-weight: 550;
}
.sidebar .sidebar-group-pages a.active::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -11px;
  width: 2px;
  background: var(--bf-border-control);
  content: "";
}
.icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.icon-docs::before,
.icon-docs::after {
  position: absolute;
  left: 3px;
  width: 7px;
  border-top: 1px solid currentColor;
  content: "";
}
.icon-docs::before {
  top: 5px;
}
.icon-docs::after {
  top: 9px;
}
.icon-support {
  height: 15px;
  border-radius: 50%;
}
.icon-support::after {
  position: absolute;
  bottom: -3px;
  left: 1px;
  width: 5px;
  height: 5px;
  border-left: 1.5px solid currentColor;
  content: "";
  transform: rotate(35deg);
}

main {
  min-width: 0;
}
.document-frame {
  display: grid;
  grid-template-columns: minmax(0, 720px) 218px;
  justify-content: center;
  gap: clamp(32px, 4vw, 72px);
  min-height: calc(100vh - 62px);
  padding: 48px clamp(28px, 4vw, 64px) 120px;
}
.document {
  min-width: 0;
}
.content-header {
  padding-bottom: 0;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.breadcrumbs {
  display: none;
}
h1 {
  margin: 0;
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.035em;
}
.copy-link {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  line-height: 1;
  transition:
    color 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}
.copy-link:hover,
.copy-link.copied {
  border-color: var(--bf-border-control);
  color: var(--ink);
  background: var(--hover);
}
.document-index {
  display: grid;
  grid-template-columns: 1fr;
  padding-top: 32px;
}
.document-index[hidden] {
  display: none;
}
.document-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  font-weight: 540;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}
.document-index a span:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
.document-index a:hover {
  color: var(--muted);
}
.document-body {
  max-width: 68ch;
  padding-top: 28px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.72;
}
.document-body h2,
.document-body h3,
.document-body h4,
.document-body h5,
.document-body h6 {
  scroll-margin-top: 90px;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.document-body h2 {
  margin: 54px 0 16px;
  font-size: 23px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.document-body > :is(h2, h3):first-child {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}
.document-body h3 {
  margin: 36px 0 12px;
  font-size: 17px;
}
.document-body h4 {
  margin: 28px 0 12px;
  font-size: 15px;
}
.heading-anchor {
  margin-left: 8px;
  opacity: 0;
  font-size: 0.75em;
  font-weight: 400;
}
.document-body :is(h2, h3, h4):hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}
.document-body .heading-anchor {
  color: var(--muted);
  text-decoration: none;
}
.page-copy {
  margin-left: auto;
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}
.page-copy:hover {
  color: var(--ink);
}
.page-copy:not([hidden]) + .theme-toggle {
  margin-left: 12px;
}
.document-body p,
.document-body ul,
.document-body ol,
.document-body pre {
  margin: 0 0 19px;
}
.document-body ul,
.document-body ol {
  padding-left: 22px;
}
.document-body li + li {
  margin-top: 6px;
}
.document-body li > p {
  margin-bottom: 6px;
}
.document-body li > p:last-child {
  margin-bottom: 0;
}
.document-body li :is(ul, ol) {
  margin: 8px 0;
}
.document-body blockquote {
  margin: 24px 0;
  padding-left: 20px;
  border-left: 2px solid var(--bf-border-control);
  color: var(--muted);
}
.document-body hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.doc-table {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.doc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.doc-table th {
  background: var(--rail);
  font-weight: 550;
}
.doc-table :is(th, td) {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc-table tr:last-child td {
  border-bottom: 0;
}
.code-block {
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--rail);
}
.code-block figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 4px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.code-copy,
.code-wrap {
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.code-copy:hover,
.code-wrap:hover,
.code-wrap[aria-pressed="true"] {
  background: var(--hover);
  color: var(--ink);
}
.document-body .code-block pre {
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.65;
}
.document-body .code-block code {
  font-size: inherit;
  counter-reset: code-line;
}
.code-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.code-block.wrapped pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code-block.wrapped .code-line {
  width: 100%;
  min-width: 0;
}
.code-language {
  color: var(--muted);
  font:
    11px ui-monospace,
    monospace;
}
.code-line {
  counter-increment: code-line;
  display: inline-block;
  min-width: 100%;
  box-sizing: border-box;
  padding-left: 40px;
}
.code-line::before {
  content: counter(code-line);
  display: inline-block;
  width: 24px;
  padding-right: 16px;
  margin-left: -40px;
  text-align: right;
  color: var(--muted);
  user-select: none;
  font-size: 11px;
}
.code-line.highlighted {
  background: var(--hover);
  box-shadow: inset 2px 0 var(--bf-border-control);
}
.document-body .code-annotations {
  list-style: none;
  margin: 0;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
}
.code-annotations li {
  margin: 0;
}
.code-annotation {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  text-align: left;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.code-annotation:hover,
.code-annotation[aria-pressed="true"] {
  color: var(--ink);
  background: var(--hover);
}
.annotation-number {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  height: 22px;
  border: 1px solid var(--bf-border-control);
  border-radius: 50%;
  font:
    11px ui-monospace,
    monospace;
}
.annotation-lines {
  margin-left: auto;
  padding-left: 8px;
  white-space: nowrap;
  color: var(--muted);
  font:
    11px ui-monospace,
    monospace;
}
.doc-tabs [role="tab"]:hover {
  color: var(--ink);
}
.doc-tabs [role="tab"]:focus-visible {
  outline-offset: -4px;
}
.doc-callout > div {
  min-width: 0;
}
.doc-callout[data-kind="tip"] .callout-marker {
  border-radius: 4px;
}
.doc-details summary:hover {
  color: var(--muted);
}
.doc-tabs {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.doc-tabs [role="tablist"] {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--rail);
}
.doc-tabs [role="tab"] {
  padding: 12px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
  font-size: 13px;
  cursor: pointer;
}
.doc-tabs [role="tab"][aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.doc-tabs [role="tabpanel"] {
  padding: 0;
}
.doc-tabs [hidden] {
  display: none;
}
.doc-tabs .code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.doc-walkthrough {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  min-height: 180px;
}
.doc-walkthrough [role="tablist"] {
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  overflow-x: visible;
}
.doc-walkthrough [role="tab"] {
  min-height: 44px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-bottom: 0;
  border-radius: 4px;
  text-align: left;
  font: inherit;
  font-size: 13px;
}
.doc-walkthrough [role="tab"][aria-selected="true"] {
  border-left-color: var(--bf-border-control);
  background: var(--hover);
}
.doc-walkthrough [role="tabpanel"] {
  min-width: 0;
  align-self: start;
}
@media (max-width: 700px) {
  .doc-walkthrough {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-walkthrough [role="tablist"] {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
.doc-details {
  margin: 24px 0;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.doc-details summary {
  padding: 14px 0;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}
.doc-details[open] summary {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.doc-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--rail);
}
.doc-callout .callout-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.doc-callout p:last-child {
  margin-bottom: 0;
}
.callout-marker {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}
.doc-callout[data-kind="warning"],
.doc-callout[data-kind="caution"] {
  border-left: 3px solid var(--bf-text-primary);
}
.media-figure,
.embed-figure {
  margin: 28px 0;
}
.image-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--rail);
  cursor: zoom-in;
}
.image-zoom img {
  display: block;
  width: 100%;
  height: auto;
}
.zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--canvas);
  color: var(--muted);
  opacity: 0;
}
.image-zoom:hover .zoom-hint,
.image-zoom:focus-visible .zoom-hint {
  opacity: 1;
}
.media-figure figcaption,
.embed-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.media-links {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.embed-stage {
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--rail);
}
.embed-load {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 100px;
  min-height: 100px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}
.play-glyph {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--bf-border-control);
  border-radius: 50%;
  font-size: 24px;
}
.embed-load:hover .play-glyph {
  background: var(--surface);
}
.embed-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.embed-stage[data-embed-src="/preview/embed.html"] {
  min-height: 240px;
  aspect-ratio: auto;
  height: max(240px, calc((100vw - 40px) * 9 / 16));
  max-height: 360px;
}
.document-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.document-pagination[hidden] {
  display: none;
}
.document-pagination a {
  display: grid;
  gap: 6px;
  text-decoration: none;
}
.document-pagination span {
  color: var(--muted);
  font-size: 12px;
}
.document-pagination strong {
  font-size: 14px;
  font-weight: 500;
}
.document-pagination a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.document-pagination .next {
  text-align: right;
}
.image-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 44px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--canvas);
}
.image-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}
.image-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 112px);
  object-fit: contain;
}
.image-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}
.document-body a,
.document-body .reference {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
.document-body .reference {
  text-decoration: none;
}
.document-body code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font:
    0.88em ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.document-body pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.document-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
}
.support-anchor {
  height: 1px;
}
.outline {
  min-height: 1px;
  margin-top: 7px;
}
.outline nav {
  position: sticky;
  top: 89px;
  display: grid;
  gap: 0;
  max-height: calc(100vh - 110px);
  padding-left: 0;
  overflow: auto;
}
.outline-label {
  margin: 0 0 16px;
  padding-left: 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
}
.outline a {
  padding: 7px 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}
.outline a:hover {
  color: var(--ink);
}
.outline a.active {
  color: var(--ink);
  font-weight: 560;
  border-left-color: var(--bf-border-control);
  background: color-mix(in srgb, var(--hover) 40%, transparent);
}
.copy-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-link .check-icon,
.copy-link.copied .link-icon {
  display: none;
}
.copy-link.copied .check-icon {
  display: block;
}
.outline .outline-h3,
.reader-contents .outline-h3 {
  padding-left: 24px;
}
.outline :is(.outline-h4, .outline-h5, .outline-h6),
.reader-contents :is(.outline-h4, .outline-h5, .outline-h6) {
  padding-left: 32px;
}
.reader-tools {
  margin-top: 18px;
}
.reader-tools > nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.reader-tools > nav a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  text-underline-offset: 4px;
}
.reader-tools > nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.reader-contents {
  display: none;
  margin-top: 20px;
  border-block: 1px solid var(--line);
}
.reader-contents summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}
.reader-contents summary::-webkit-details-marker {
  display: none;
}
.reader-contents[open] .disclosure {
  transform: rotate(45deg);
}
.reader-contents nav {
  display: grid;
  max-height: 50vh;
  overflow-y: auto;
  padding-bottom: 12px;
}
.reader-contents a {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}
.reader-contents a:is(:hover, .active) {
  color: var(--ink);
  background: var(--hover);
}

.search-dialog {
  width: min(560px, calc(100vw - 32px));
  margin: 13vh auto 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--rail);
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}
.search-dialog::backdrop {
  background: rgb(0 0 0 / 55%);
}
.search-panel {
  padding: 10px;
}
.search-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px 10px;
}
.search-panel-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 580;
}
.search-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
  line-height: 1;
}
.search-close:hover {
  color: var(--ink);
  background: var(--hover);
}
.search-field {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}
.search-field .search-icon {
  margin-left: 14px;
}
.search-field input {
  width: 100%;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: 14px var(--sans);
}
.search-field input::placeholder {
  color: var(--muted);
}
.search-results {
  display: grid;
  gap: 3px;
  max-height: 320px;
  margin-top: 8px;
  overflow: auto;
}
.search-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  text-align: left;
}
.search-results button:hover,
.search-results button:focus-visible {
  background: var(--hover);
}
.search-results button > span:last-child {
  color: var(--muted);
}
.search-results button > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.search-results small {
  color: var(--muted);
  font-size: 11px;
}
.search-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .document-frame {
    grid-template-columns: minmax(0, 720px);
  }
  .outline {
    display: none;
  }
  .reader-contents {
    display: block;
  }
}

@media (max-width: 700px) {
  .topbar {
    height: 56px;
    padding-inline: 15px;
  }
  .topbar-left {
    width: auto;
    flex: 1;
    padding: 0;
  }
  .topbar-left::after {
    display: none;
  }
  .topbar-breadcrumb {
    display: none;
  }
  .page-copy {
    display: none;
  }
  .butterfly-mark {
    width: 18px;
    height: 18px;
  }
  .divider {
    height: 18px;
  }
  .search {
    display: inline-flex;
    margin-right: 8px;
  }
  .theme-toggle {
    margin-left: 0;
    margin-right: 8px;
  }
  .menu-button {
    display: inline-flex;
  }
  .menu-label {
    display: none;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 2;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    box-shadow: none;
  }
  body.navigation-open {
    overflow: hidden;
  }
  .sidebar.open {
    transform: none;
  }
  .document-frame {
    display: block;
    min-height: calc(100vh - 56px);
    padding: 46px 20px 80px;
  }
  .content-header {
    padding-bottom: 0;
  }
  .document-index {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .document-index a {
    min-height: 58px;
  }
  .document-body {
    padding-top: 32px;
    font-size: 15px;
  }
  .document-body h2 {
    margin-top: 42px;
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .search,
  .sidebar a,
  .document-index a {
    transition: none;
  }
}

@media print {
  html,
  body {
    background: white;
    color: black;
  }
  .topbar,
  .sidebar,
  .outline,
  .skip-link,
  .copy-link,
  .page-copy,
  .code-copy,
  .code-wrap,
  .link-preview-trigger,
  .link-preview-dialog,
  .reader-source-button,
  .section-source-button,
  .document-pagination,
  .heading-anchor,
  .zoom-hint {
    display: none !important;
  }
  .reader-tools {
    display: none;
  }
  .shell,
  .document-frame {
    display: block;
    min-height: 0;
  }
  .document-frame {
    padding: 0;
  }
  .document-body {
    max-width: none;
    color: black;
  }
  .document-body :is(h2, h3, h4),
  .document-body a {
    color: black;
  }
  .code-block,
  .doc-table,
  .media-figure {
    break-inside: avoid;
  }
  .doc-table {
    overflow: visible;
  }
  .code-block pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .image-zoom {
    border-color: #ccc;
  }
}
.specimen-mobile-nav {
  display: none;
}
@media (max-width: 700px) {
  .specimen-mobile-nav {
    display: block;
    margin-bottom: 32px;
    border-block: 1px solid var(--bf-border-decorative);
  }
  .specimen-mobile-nav summary {
    padding: 14px 0;
    cursor: pointer;
  }
  .specimen-mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 14px;
  }
  .specimen-mobile-nav a {
    padding: 10px 8px;
    font-size: 13px;
    color: var(--bf-text-secondary);
  }
}
.doc-table [data-align="center"] {
  text-align: center;
}
.doc-table [data-align="right"] {
  text-align: right;
}
.doc-table [data-align="left"] {
  text-align: left;
}
