/* ==========================================================
   Bongo Performance Studio — documentation page
   Loaded after style.css: reuses its tokens (--bp-*), .btn,
   .chip, .table, .icon-circle and .brand-word. No Tailwind
   here, so this file carries its own small reset.
   ========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: 'Roboto', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, pre, figure, table {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
code,
pre,
kbd {
  font-family: var(--bp-mono);
}
:focus-visible {
  outline: 2px solid var(--bp-brand);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: #a9e1bf;
  color: #1f2733;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--bp-navy);
  color: #fff;
  font-size: 13px;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- Shell ---------- */
:root {
  --docs-sidebar-w: 284px;
  --docs-toc-w: 220px;
}
.docs-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--docs-sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--bp-canvas);
  border-right: 1px solid var(--bp-line);
  z-index: 40;
  transition: transform 0.2s ease;
}
.docs-sidebar-head {
  padding: 26px 22px 16px;
}
.docs-brand {
  display: inline-block;
}
.docs-brand .brand-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}
.docs-search {
  position: relative;
  margin-top: 20px;
}
.docs-search > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--bp-faint);
  pointer-events: none;
}
.docs-search input {
  width: 100%;
  height: 40px;
  padding: 0 44px 0 36px;
  border-radius: 6px;
  border: 1px solid var(--bp-line);
  background: #fff;
  font-size: 13.5px;
  color: var(--bp-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.docs-search input::placeholder {
  color: var(--bp-faint);
}
.docs-search input:focus {
  border-color: var(--bp-brand);
  box-shadow: 0 0 0 3px rgba(34, 179, 94, 0.15);
}
.docs-search kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--bp-line);
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
  z-index: 60;
}
.search-result {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  text-align: left;
}
.search-result:hover,
.search-result.is-active {
  background: var(--bp-brand-50);
}
.search-result-title {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bp-ink);
}
.search-result-path {
  display: block;
  font-size: 11.5px;
  color: var(--bp-brand-700);
}
.search-result-snippet {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--bp-muted);
}
.search-result mark {
  background: #fdf0c4;
  color: inherit;
  border-radius: 2px;
}
.search-empty {
  padding: 14px 10px;
  font-size: 13px;
  color: var(--bp-muted);
}

.docs-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 28px;
}
.docs-nav-group + .docs-nav-group {
  margin-top: 18px;
}
.docs-nav-label {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-faint);
}
.docs-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bp-ink-2);
  transition: background-color 0.15s, color 0.15s;
}
.docs-nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--bp-faint);
}
.docs-nav a:hover {
  background: var(--bp-hover);
  color: var(--bp-ink);
}
.docs-nav a.active {
  background: #fff;
  color: var(--bp-brand-700);
  box-shadow: inset 3px 0 0 var(--bp-brand), 0 1px 2px rgba(16, 24, 40, 0.06);
}
.docs-nav a.active svg {
  color: var(--bp-brand);
}
.docs-sidebar-foot {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--bp-line);
  font-size: 12px;
  color: var(--bp-muted);
}

.docs-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 35;
}

.docs-main {
  margin-left: var(--docs-sidebar-w);
  min-height: 100vh;
}
.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bp-line);
}
.docs-menu-btn {
  display: none;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13.5px;
  color: var(--bp-muted);
}
.crumbs svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.crumbs strong {
  font-weight: 500;
  color: var(--bp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.reading-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--bp-brand);
  transition: width 0.1s linear;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}
@media (min-width: 1280px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr) var(--docs-toc-w);
  }
}
.docs-content {
  min-width: 0;
  max-width: 820px;
}

/* Right-hand "On this page" */
.docs-toc {
  display: none;
}
@media (min-width: 1280px) {
  .docs-toc {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}
.docs-toc-title {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-faint);
}
.docs-toc ul {
  list-style: none;
  padding: 0;
  border-left: 1px solid var(--bp-line);
}
.docs-toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.45;
  color: var(--bp-muted);
  transition: color 0.15s, border-color 0.15s;
}
.docs-toc a:hover {
  color: var(--bp-ink);
}
.docs-toc a.active {
  color: var(--bp-brand-700);
  border-left-color: var(--bp-brand);
  font-weight: 500;
}
.docs-toc-empty {
  font-size: 13px;
  color: var(--bp-faint);
}

@media (max-width: 1023px) {
  .docs-sidebar {
    transform: translateX(-100%);
  }
  body.nav-open .docs-sidebar {
    transform: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  }
  body.nav-open .docs-scrim {
    display: block;
  }
  .docs-main {
    margin-left: 0;
  }
  .docs-menu-btn {
    display: inline-flex;
  }
}
@media (max-width: 639px) {
  .docs-topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .docs-layout {
    padding: 24px 16px 64px;
  }
  .hide-sm {
    display: none !important;
  }
}

/* ---------- Hero ---------- */
.doc-hero {
  position: relative;
  overflow: hidden;
  padding: 36px 34px;
  border-radius: 10px;
  border: 1px solid #d3f0de;
  background:
    radial-gradient(circle at 92% 8%, rgba(34, 195, 230, 0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(34, 179, 94, 0.14), transparent 46%),
    #f6fbf8;
}
.doc-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bp-brand-700);
}
.doc-hero-eyebrow svg {
  width: 15px;
  height: 15px;
}
.doc-hero h1 {
  margin-top: 10px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.4px;
  color: #1f2733;
}
.doc-hero p {
  margin-top: 12px;
  max-width: 600px;
  font-size: 16.5px;
  color: var(--bp-ink-2);
}
.doc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
@media (max-width: 639px) {
  .doc-hero {
    padding: 26px 20px;
  }
  .doc-hero h1 {
    font-size: 27px;
  }
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
@media (min-width: 1100px) {
  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 519px) {
  .quick-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.quick-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--bp-line);
  background: #fff;
  box-shadow: var(--bp-shadow);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.quick-card:hover {
  border-color: #a9e1bf;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(16, 24, 40, 0.05), 0 10px 24px rgba(16, 24, 40, 0.08);
}
.quick-card strong {
  font-size: 15px;
  font-weight: 500;
  color: var(--bp-ink);
}
.quick-card span:last-child {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bp-muted);
}

/* ---------- Sections & typography ---------- */
.doc-part {
  margin-top: 64px;
}
.doc-part-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bp-brand-700);
}
.doc-part-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bp-line);
}

.doc-section {
  padding-top: 40px;
}
.doc-section + .doc-section {
  margin-top: 16px;
  border-top: 1px solid var(--bp-line);
}
.doc-section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.doc-section-head .icon-circle {
  margin-top: 2px;
}
.doc-section h2 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.2px;
  color: #1f2733;
}
.doc-lead {
  margin-top: 6px;
  font-size: 16px;
  color: var(--bp-muted);
}
.doc-section h3 {
  margin-top: 32px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--bp-ink);
}
.doc-section h4 {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--bp-ink);
}
.anchor {
  margin-left: 8px;
  font-weight: 400;
  color: var(--bp-faint);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}
.anchor:hover {
  color: var(--bp-brand);
}

.doc-section p,
.doc-section ul,
.doc-section ol {
  margin-top: 12px;
  color: var(--bp-ink-2);
}
.doc-section ul,
.doc-section ol {
  padding-left: 22px;
}
.doc-section li + li {
  margin-top: 6px;
}
.doc-section li::marker {
  color: var(--bp-faint);
}
.doc-section strong {
  font-weight: 500;
  color: var(--bp-ink);
}
.doc-section a:not(.btn):not(.quick-card):not(.anchor) {
  color: var(--bp-brand-700);
  text-decoration: underline;
  text-decoration-color: #a9e1bf;
  text-underline-offset: 3px;
}
.doc-section a:not(.btn):not(.quick-card):not(.anchor):hover {
  text-decoration-color: currentColor;
}
:not(pre) > code {
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f3f6;
  border: 1px solid #e7eaee;
  font-size: 0.86em;
  color: #1f2733;
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--bp-line-strong);
  border-bottom-width: 2px;
  background: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  color: var(--bp-ink-2);
}

/* Feature meta strip: where it is, what it touches */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.meta-strip .btn {
  margin-left: auto;
}
@media (max-width: 639px) {
  .meta-strip .btn {
    margin-left: 0;
  }
}
.chip svg {
  width: 13px;
  height: 13px;
}

/* ---------- Callouts ---------- */
.callout {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 14px;
  line-height: 1.6;
}
.callout > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.callout p {
  margin: 0 !important;
  color: inherit !important;
}
.callout p + p {
  margin-top: 6px !important;
}
.callout strong {
  color: inherit !important;
  font-weight: 700 !important;
}
.callout-info { background: #eef7fd; border-color: #cfe6f6; color: #1f4f73; }
.callout-tip { background: #eef9f2; border-color: #c9ead6; color: #1b5e37; }
.callout-warn { background: #fff8eb; border-color: #f8e0b0; color: #7a4a06; }
.callout-danger { background: #fff1f3; border-color: #f9cdd5; color: #9b1834; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0 !important;
  margin-top: 18px !important;
  counter-reset: step;
}
.steps > li {
  position: relative;
  padding: 0 0 18px 46px;
  counter-increment: step;
}
.steps > li + li {
  margin-top: 0 !important;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bp-brand-50);
  border: 1px solid #a9e1bf;
  font-size: 13px;
  font-weight: 700;
  color: var(--bp-brand-700);
}
.steps > li::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 4px;
  width: 1px;
  background: var(--bp-line);
}
.steps > li:last-child {
  padding-bottom: 0;
}
.steps > li:last-child::after {
  display: none;
}
.steps > li > strong:first-child {
  display: block;
  padding-top: 3px;
}
.steps p {
  margin-top: 4px !important;
}

/* ---------- Tables ---------- */
.doc-section .table-wrap {
  margin-top: 16px;
}
.doc-section .table {
  font-size: 13.5px;
}
.doc-section .table thead th {
  background: var(--bp-canvas);
}
.doc-section .table tbody td {
  vertical-align: top;
  line-height: 1.55;
}
.doc-section .table tbody tr:nth-child(even) td {
  background: #fbfbfc;
}
.doc-section .table tbody tr:hover td {
  background: #f4f6f8;
}
.table td:first-child {
  color: var(--bp-ink);
  font-weight: 500;
}
.table td.nowrap,
.table th.nowrap {
  white-space: nowrap;
}

/* HTTP method badges */
.m {
  display: inline-block;
  min-width: 50px;
  padding: 0 6px;
  border-radius: 4px;
  font-family: var(--bp-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}
.m-get { background: #e6f6ec; color: var(--bp-brand-700); }
.m-post { background: #e3f1fb; color: #1f5f8b; }
.m-del { background: #fdecee; color: #c8203f; }

/* ---------- Code blocks ---------- */
.code-block {
  position: relative;
  margin-top: 16px;
  border-radius: 8px;
  border: 1px solid #2a3442;
  background: #1f2733;
  overflow: hidden;
}
.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid #2f3a49;
  font-size: 12px;
  color: #9aa7b8;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #c9d3df;
  transition: background-color 0.15s, color 0.15s;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.copy-btn svg {
  width: 13px;
  height: 13px;
}
.copy-btn.copied {
  color: #74cd98;
}
.code-block pre {
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: #e3e8ef;
}
.code-block .c { color: #7f8ea3; }
.code-block .k { color: #74cd98; }
.code-block .s { color: #fbd38d; }

/* File tree */
.tree {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--bp-line);
  background: var(--bp-canvas);
  overflow-x: auto;
  font-family: var(--bp-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--bp-ink);
  white-space: pre;
}
.tree .note {
  color: var(--bp-muted);
}

/* ---------- Cards inside content ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.mini-card {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--bp-line);
  background: #fff;
}
.mini-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini-card-head strong {
  font-size: 14.5px;
}
.mini-card p {
  margin-top: 8px !important;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--bp-muted) !important;
}

/* Good / watch / bad scale */
.scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.scale > div {
  padding: 12px 14px;
  border-radius: 8px;
  border-top: 3px solid;
  background: var(--bp-canvas);
  font-size: 13px;
  line-height: 1.5;
}
.scale strong {
  display: block;
  font-size: 14px;
}
.scale .good { border-color: var(--bp-brand); }
.scale .watch { border-color: var(--bp-amber); }
.scale .bad { border-color: var(--bp-red); }
@media (max-width: 639px) {
  .scale {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Architecture diagram ---------- */
.arch {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.3fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--bp-line);
  background:
    radial-gradient(circle, #dfe3e8 1px, transparent 1px) 0 0 / 18px 18px,
    #fbfcfd;
}
.arch-box {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--bp-line-strong);
  background: #fff;
  box-shadow: var(--bp-shadow);
  font-size: 12.5px;
  line-height: 1.5;
}
.arch-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bp-ink);
}
.arch-box-title svg {
  width: 16px;
  height: 16px;
  color: var(--bp-brand);
}
.arch-box small {
  display: block;
  margin-top: 2px;
  color: var(--bp-muted);
}
.arch-box ul {
  list-style: none;
  padding: 0 !important;
  margin-top: 10px !important;
}
.arch-box li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px !important;
  color: var(--bp-ink-2);
}
.arch-box li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--bp-brand);
  flex-shrink: 0;
  transform: translateY(-1px);
}
.arch-server {
  border-color: #a9e1bf;
  background: #f6fbf8;
}
.arch-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--bp-muted);
  text-align: center;
}
.arch-arrow svg {
  width: 22px;
  height: 22px;
  color: var(--bp-brand);
}
@media (max-width: 899px) {
  .arch {
    grid-template-columns: minmax(0, 1fr);
  }
  .arch-arrow svg {
    transform: rotate(90deg);
  }
}

/* ---------- FAQ ---------- */
.faq {
  margin-top: 16px;
  border: 1px solid var(--bp-line);
  border-radius: 8px;
  background: #fff;
}
.faq details + details {
  border-top: 1px solid var(--bp-line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--bp-ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--bp-faint);
  transition: transform 0.15s;
}
.faq details[open] summary svg {
  transform: rotate(180deg);
}
.faq summary:hover {
  background: var(--bp-canvas);
}
.faq-body {
  padding: 0 16px 16px;
}
.faq-body p:first-child {
  margin-top: 0 !important;
}

/* ---------- Footer & helpers ---------- */
.docs-footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--bp-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--bp-muted);
}
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 25;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bp-line);
  background: #fff;
  color: var(--bp-ink);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background-color 0.15s;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.to-top:hover {
  background: var(--bp-brand-50);
  color: var(--bp-brand-700);
}
.to-top svg {
  width: 18px;
  height: 18px;
}
.flash {
  animation: flash 1.6s ease;
}
@keyframes flash {
  0%, 30% { background: #fdf0c4; }
  100% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .docs-sidebar,
  .docs-topbar,
  .docs-toc,
  .to-top,
  .meta-strip .btn,
  .copy-btn {
    display: none !important;
  }
  .docs-main {
    margin-left: 0;
  }
  .docs-layout {
    display: block;
    padding: 0;
  }
}
