@import url("/css/public-tokens.css");
@import url("/css/components.css");
@import url("/css/code-syntax.css");
@import url("/css/public-shell.css");
@import url("/css/public-nav.css");

:root {
  --bg: var(--color-bg-canvas, #050505);
  --text: var(--color-text-primary, #f8fafc);
  --muted: var(--color-text-secondary, #9ca3af);
  --border: var(--glass-border, rgba(255, 255, 255, 0.1));
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html.docs-page,
body.docs-page {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
}

body.docs-page {
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  font-size: var(--text-base, 1rem);
}

html[data-theme="light"] body.docs-page {
  background: #eef2f7;
}

a:not(.btn) {
  color: #a5b4fc;
  text-decoration: none;
}

a:not(.btn):hover,
a:not(.btn):focus-visible {
  text-decoration: none;
}

html[data-theme="light"] body.docs-page a:not(.btn) {
  color: #5b21b6;
}

html[data-theme="light"] .docs-sidebar a,
html[data-theme="light"] .docs-sidebar__link {
  color: #475569;
}

html[data-theme="light"] .docs-sidebar a.active,
html[data-theme="light"] .docs-sidebar__link.active {
  color: #5b21b6;
  background: #ede9fe;
  box-shadow: inset 3px 0 0 #7c3aed;
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .docs-sidebar a:hover:not(.active),
  html[data-theme="light"] .docs-sidebar__link:hover:not(.active) {
    color: #5b21b6;
    background: #ede9fe;
  }
}

html[data-theme="light"] .docs-topbar__title {
  color: #64748b;
}

.docs-topbar,
.home-nav--docs.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  box-sizing: border-box;
  min-height: var(--nav-offset);
  height: auto;
  padding-top: var(--safe-top);
  overflow: visible;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 7, 11, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .docs-topbar,
html[data-theme="light"] .home-nav--docs.docs-topbar {
  background: rgba(255, 255, 255, 0.92);
}

.docs-topbar__inner,
.home-nav--docs .home-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: 0.5rem max(var(--space-5, 1.25rem), env(safe-area-inset-right, 0px)) 0.5rem
    max(var(--space-5, 1.25rem), env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  min-width: 0;
}

.docs-topbar__logo img {
  height: 28px;
  width: auto;
  display: block;
  max-width: 100%;
}

.docs-topbar__logo {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(168px, 52vw);
  overflow: visible;
}

.docs-topbar__title {
  font-weight: 600;
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted);
  flex: 1;
}

.docs-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
}

.docs-back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  line-height: 1;
  min-height: 40px;
  padding-inline: 0.75rem;
}

.docs-back-home__icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

.docs-back-home span {
  line-height: 1.2;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-xs, 10px);
  border: 1px solid var(--border);
  background: var(--glass-bg, rgba(255, 255, 255, 0.06));
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* theme-toggle hover: interactions.css */

.docs-sidebar__head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: var(--space-4, 1rem);
  padding-bottom: var(--space-3, 0.75rem);
  border-bottom: 1px solid var(--border);
}

.docs-sidebar__brand {
  font-weight: 700;
  font-size: var(--text-sm, 0.875rem);
  margin: 0;
  padding: 0;
  color: var(--text);
}

.docs-sidebar__close {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs, 10px);
  background: var(--glass-bg, rgba(255, 255, 255, 0.06));
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

html[data-theme="light"] body.docs-page a:not(.btn) {
  color: #5b21b6;
}

html[data-theme="light"] body.docs-page code {
  background: #eef2ff;
  color: #4338ca;
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

/* Light docs — example windows */
html[data-theme="light"] .docs-article {
  background: #ffffff;
  border: 1px solid rgba(123, 66, 246, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.92) inset,
    4px 4px 10px rgba(15, 23, 42, 0.05),
    10px 10px 26px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .docs-example__chrome {
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .docs-example .code-block {
  background: #f8fafc;
  border: none;
  box-shadow: none;
}

html[data-theme="light"] .docs-page .code-block pre,
html[data-theme="light"] .docs-example .code-block pre {
  background: transparent;
  color: #0f172a;
  border: none;
  padding: 1rem 1.1rem 1.1rem;
}

html[data-theme="light"] .docs-page .code-block .copy-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .docs-main .docs-example--response,
html[data-theme="light"] .docs-main .card,
html[data-theme="light"] .docs-main .docs-card {
  background: #f8fafc;
  border: 1px solid rgba(123, 66, 246, 0.12);
  box-shadow: none;
}

html[data-theme="light"] .docs-main .docs-response-card__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="light"] .docs-main .docs-snippet,
html[data-theme="light"] .docs-main .card pre {
  background: transparent;
  border: none;
  color: #0f172a;
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  box-shadow: none;
}

html[data-theme="light"] .docs-main .docs-response-card .docs-snippet {
  margin-top: 0.25rem;
  padding: 0;
}

html[data-theme="light"] .docs-main table code {
  background: #eef2ff;
  color: #4338ca;
}

.docs-layout {
  display: flex;
  width: 100%;
  max-width: min(1280px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-h));
  overflow-x: clip;
}

.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-offset, var(--nav-h));
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-offset, var(--nav-h)));
  overflow-y: auto;
  padding: var(--space-6, 1.5rem) var(--space-4, 1rem);
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 66, 246, 0.52) #1b0f37;
}

.docs-sidebar::-webkit-scrollbar {
  width: 7px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: #1b0f37;
  border-radius: 999px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(123, 66, 246, 0.48);
  border-radius: 999px;
  border: 2px solid #1b0f37;
}

@media (hover: hover) {
  .docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 66, 246, 0.72);
  }
}

html[data-theme="light"] .docs-sidebar {
  scrollbar-color: rgba(109, 40, 217, 0.38) rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .docs-sidebar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(109, 40, 217, 0.32);
  border-color: transparent;
}

@media (hover: hover) {
  html[data-theme="light"] .docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(109, 40, 217, 0.48);
  }
}

.docs-sidebar__group {
  margin-bottom: var(--space-5, 1.25rem);
}

.docs-sidebar__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 var(--space-2, 0.5rem);
  padding: 0 var(--space-2, 0.5rem);
}

.docs-sidebar a,
.docs-sidebar__link {
  display: block;
  padding: 0.4rem 0.65rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-xs, 8px);
  font-size: var(--text-sm, 0.875rem);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.docs-sidebar__link--sub {
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}

.docs-sidebar a.active,
.docs-sidebar__link.active {
  color: var(--color-text-primary, var(--text));
  background: rgba(123, 66, 246, 0.12);
  box-shadow: inset 3px 0 0 var(--color-accent-primary, #7b42f6);
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .docs-sidebar a:hover:not(.active),
  .docs-sidebar__link:hover:not(.active) {
    color: var(--text);
    background: var(--glass-bg);
  }
}

@media (hover: none), (pointer: coarse) {
  .docs-sidebar a:hover:not(.active),
  .docs-sidebar__link:hover:not(.active) {
    background: transparent;
    color: var(--muted);
  }

  .docs-sidebar a:active,
  .docs-sidebar__link:active {
    color: var(--text);
    background: var(--glass-bg);
  }
}

.docs-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 52rem;
  padding: var(--space-6, 1.5rem) var(--space-6, 1.5rem) var(--space-16, 4rem);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.docs-article {
  padding: clamp(1.35rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem) clamp(1.75rem, 4vw, 2.5rem);
  border-radius: clamp(16px, 2vw, 22px);
  background: rgba(8, 6, 16, 0.55);
  border: 1px solid rgba(123, 66, 246, 0.22);
  box-shadow:
    0 0 0 1px rgba(123, 66, 246, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docs-intro {
  margin-bottom: var(--space-8, 2rem);
  padding-bottom: var(--space-6, 1.5rem);
  border-bottom: 1px solid var(--border);
}

.docs-intro__meta {
  margin: 0;
}

.docs-article h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  scroll-margin-top: calc(var(--nav-offset, 72px) + 12px);
}

.docs-article h2::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--color-accent-primary, #7b42f6);
  transform: rotate(45deg);
  border-radius: 1px;
}

html[data-theme="light"] .docs-article h2::before {
  border-color: #6d28d9;
  box-shadow: none;
}

.docs-article h2 + p.muted,
.docs-article h2 + p {
  margin-top: -0.35rem;
}

.docs-article ol,
.docs-article ul {
  padding-left: 1.35rem;
}

.docs-article ol li::marker {
  color: var(--color-accent-primary, #a78bfa);
  font-weight: 600;
}

html[data-theme="light"] .docs-article ol li::marker {
  color: #7c3aed;
}

/* Example windows (curl, JSON, steps) */
.docs-example {
  margin: var(--space-4, 1rem) 0 var(--space-5, 1.25rem);
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.docs-example__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.docs-example__dots {
  display: inline-flex;
  gap: 0.28rem;
  flex-shrink: 0;
}

.docs-example__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
}

.docs-example__dots i:nth-child(1) {
  background: #f87171;
}

.docs-example__dots i:nth-child(2) {
  background: #fbbf24;
}

.docs-example__dots i:nth-child(3) {
  background: #34d399;
}

.docs-example__title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-example .code-block {
  margin: 0;
  border: none;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: none;
}

.docs-example .code-block pre {
  margin: 0;
  padding: 1rem 1.1rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.docs-example--response {
  position: relative;
  padding: 0;
}

.docs-example--response .docs-snippet {
  margin: 0;
  border-radius: 0;
}

.docs-main p,
.docs-main li,
.docs-main td,
.docs-main th {
  overflow-wrap: break-word;
}

.docs-main code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.docs-page .code-block:not(.docs-example .code-block) {
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
}

.docs-page .code-block {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.docs-page .code-block pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.docs-main .card,
.docs-main .docs-card,
.docs-main .docs-response-card {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-4, 1rem) 0;
  padding: var(--space-4, 1rem);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md, 16px);
}

.docs-main .card pre,
.docs-main .docs-snippet {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--mono);
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.docs-main h1 {
  font-size: var(--text-3xl, clamp(1.75rem, 4vw, 2.25rem));
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4, 1rem);
  line-height: 1.15;
}

.docs-main .docs-lead {
  margin: 0 0 var(--space-4, 1rem);
}

.docs-main h2,
.docs-article h2 {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: var(--space-10, 2.5rem) 0 var(--space-4, 1rem);
  padding-top: var(--space-6, 1.5rem);
  border-top: 1px solid var(--border);
}

.docs-article > h2:first-of-type,
.docs-main .docs-article > h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.docs-hero {
  margin-bottom: var(--space-10, 2.5rem);
  padding: var(--space-8, 2rem);
  border-radius: var(--radius-lg, 20px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.docs-hero p {
  margin: 0 0 var(--space-4, 1rem);
  max-width: 42rem;
  color: var(--muted);
}

.docs-hero .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3, 0.75rem);
}

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

.docs-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md, 16px);
  padding: var(--space-5, 1.25rem);
  margin: var(--space-4, 1rem) 0;
}

.docs-card pre {
  margin: var(--space-3, 0.75rem) 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm, 0.875rem);
  margin: var(--space-4, 1rem) 0;
}

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

th {
  font-weight: 600;
  color: var(--muted);
  font-size: var(--text-xs, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

.docs-main .public-footer {
  margin-top: var(--space-12, 3rem);
}

@media (max-width: 767px) {
  .home-nav--docs.docs-topbar {
    --nav-h: 56px;
    min-height: var(--nav-offset);
  }

  .home-nav--docs .home-nav__inner,
  .home-nav--docs .docs-topbar__inner {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    padding: 0.45rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.45rem
      max(0.75rem, env(safe-area-inset-left, 0px));
    gap: 0.35rem;
    min-height: var(--nav-h);
  }

  .home-nav--docs .docs-topbar__logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(148px, 46vw);
  }

  .home-nav--docs .docs-nav__burger {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
  }

  .home-nav--docs .home-nav__actions {
    order: 3;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-left: 0;
  }

  .home-nav--docs .home-nav__actions .lang-switch {
    flex-shrink: 0;
  }

  .home-nav--docs .home-nav__actions .lang-switch__btn {
    min-height: 36px;
    min-width: 2rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.68rem;
  }

  .home-nav--docs .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .docs-layout {
    flex-direction: column;
    width: 100%;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-sidebar__head {
    display: flex;
  }

  .docs-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .docs-sidebar.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--docs-nav-offset, var(--nav-offset, 72px));
    left: 0;
    bottom: 0;
    width: min(300px, 92vw);
    z-index: 185;
    max-height: none;
    overflow: hidden;
    background: rgba(6, 7, 11, 0.98);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  html[data-theme="light"] .docs-sidebar.is-open {
    background: rgba(255, 255, 255, 0.98);
  }

  .docs-sidebar.is-open .docs-sidebar__head {
    flex-shrink: 0;
    margin: 0;
    padding: var(--space-4, 1rem) var(--space-4, 1rem) var(--space-3, 0.75rem);
    position: sticky;
    top: 0;
    z-index: 1;
    background: inherit;
  }

  .docs-sidebar.is-open > a,
  .docs-sidebar.is-open .docs-sidebar__group {
    padding-left: var(--space-4, 1rem);
    padding-right: var(--space-4, 1rem);
  }

  .docs-sidebar.is-open {
    overflow-y: auto;
  }

  .docs-sidebar.is-open .docs-sidebar__group:first-of-type {
    margin-top: var(--space-2, 0.5rem);
  }

  .docs-article {
    padding: 1rem 1rem 1.35rem;
    border-radius: 14px;
  }

  .docs-layout.docs-layout--drawer::after {
    content: "";
    position: fixed;
    top: var(--docs-nav-offset, var(--nav-offset, 72px));
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.62);
    z-index: 184;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-fast, 150ms);
  }

  .docs-layout.docs-layout--drawer.docs-sidebar-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  body.docs-nav-open .docs-main {
    touch-action: none;
  }

  .docs-main {
    padding: var(--space-6, 1.5rem) max(1rem, env(safe-area-inset-right, 0px))
      var(--space-16, 4rem) max(1rem, env(safe-area-inset-left, 0px));
    max-width: 100%;
    width: 100%;
  }

  .docs-hero {
    padding: var(--space-5, 1.25rem);
  }

  .docs-main h1 {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  .docs-main h2 {
    font-size: 1.125rem;
  }

  .docs-main h1,
  .docs-main h2,
  .docs-main h3 {
    scroll-margin-top: 4.25rem;
  }

  .docs-main {
    font-size: 0.9375rem;
    line-height: 1.62;
  }

  .docs-main p,
  .docs-main .docs-lead {
    margin-bottom: 1rem;
    line-height: 1.62;
  }

  .docs-main table {
    display: block;
    width: 100%;
    overflow: visible;
    margin: 1rem 0 1.25rem;
    border: none;
  }

  .docs-main table thead {
    display: none;
  }

  .docs-main table tbody {
    display: block;
  }

  .docs-main table tbody tr {
    display: block;
    margin: 0 0 0.75rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 12px);
    background: rgba(255, 255, 255, 0.03);
  }

  html[data-theme="light"] .docs-main table tbody tr {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
  }

  .docs-main table td {
    display: block;
    padding: 0.15rem 0;
    border: none;
    text-align: left;
  }

  /* 3 columns: method · path · notes */
  .docs-main table tbody tr:has(td:nth-child(3)) td:first-child {
    display: inline-block;
    margin: 0 0.45rem 0.35rem 0;
    vertical-align: middle;
  }

  .docs-main table tbody tr:has(td:nth-child(3)) td:first-child code {
    display: inline-block;
    padding: 0.18rem 0.48rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(123, 66, 246, 0.18);
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .docs-main table tbody tr:has(td:nth-child(3)) td:nth-child(2) {
    margin-bottom: 0.55rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .docs-main table tbody tr:has(td:nth-child(3)) td:nth-child(2) code {
    display: inline-block;
    max-width: none;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 0.28rem 0.45rem;
  }

  .docs-main table tbody tr:has(td:nth-child(3)) td:nth-child(3) {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--muted);
  }

  .docs-main table tbody tr:has(td:nth-child(3)) td:nth-child(3) code {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.82em;
  }

  /* 2 columns: scope, etc. */
  .docs-main table tbody tr:has(td:nth-child(2):last-child) td:first-child {
    margin-bottom: 0.4rem;
  }

  .docs-main table tbody tr:has(td:nth-child(2):last-child) td:first-child code {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .docs-main table tbody tr:has(td:nth-child(2):last-child) td:last-child {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
  }

  pre,
  .docs-card pre,
  .docs-page .code-block pre,
  .docs-main .card pre,
  .docs-main .docs-snippet {
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .docs-page .code-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .docs-page .code-block .copy-btn {
    position: static;
    align-self: flex-end;
    order: -1;
    margin: 0.45rem 0.45rem 0;
    flex-shrink: 0;
  }

  .docs-page .code-block pre {
    padding: 0.75rem 0.85rem 1rem;
    padding-right: 0.85rem;
  }

  .docs-main ul,
  .docs-main ol {
    padding-left: 1.25rem;
    margin-inline: 0;
  }
}

@media (max-width: 420px) {
  .docs-main h1,
  .docs-main h2,
  .docs-main h3 {
    scroll-margin-top: 5.5rem;
  }
}

/* Copy buttons — desktop: corner overlay with reserved pre padding */
@media (min-width: 768px) {
  .docs-sidebar__head {
    display: block;
    margin-bottom: var(--space-4, 1rem);
    padding-bottom: 0;
    border-bottom: none;
  }

  .docs-sidebar__close {
    display: none !important;
  }

  .docs-page .code-block pre {
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    padding-right: max(1.25rem, 5.75rem);
  }

  .docs-main .card pre,
  .docs-main .docs-snippet {
    white-space: pre;
    word-break: normal;
  }
}

.docs-page .code-block .copy-btn {
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none), (pointer: coarse) {
  .docs-page .copy-btn:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: var(--glass-border);
    color: var(--color-text-secondary, var(--muted));
  }

  .docs-page .copy-btn:active {
    background: rgba(123, 66, 246, 0.2);
    border-color: rgba(123, 66, 246, 0.4);
    color: var(--color-text-primary, var(--text));
  }

  html[data-theme="light"] .docs-page .copy-btn:hover {
    background: #ffffff;
    border-color: var(--color-border-subtle);
    color: var(--color-text-secondary);
  }

  html[data-theme="light"] .docs-page .copy-btn:active {
    background: #ede9fe;
    border-color: rgba(109, 40, 217, 0.35);
    color: #5b21b6;
  }

  .docs-page .docs-back-home:hover,
  .docs-page .theme-toggle:hover,
  .docs-page .lang-switch__btn:hover:not([aria-pressed="true"]) {
    transform: none;
  }

  .docs-page .docs-back-home:active,
  .docs-page .theme-toggle:active {
    background: rgba(123, 66, 246, 0.12);
    border-color: rgba(123, 66, 246, 0.35);
  }
}

@media (max-width: 380px) {
  .docs-back-home span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .docs-back-home {
    padding-inline: 0.5rem;
    min-width: 36px;
  }
}
