/* texspace Developer Documentation Stylesheet
 * Strictly uses CSS custom properties from styles.css (zero hardcoded hex colors)
 * so both Dark and Light themes render cleanly across every /docs page.
 */

.docs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--overlay-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.docs-header-inner {
  max-width: 1420px;
}

.docs-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 31px;
  padding: 0 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.docs-mobile-menu-btn:hover {
  border-color: var(--line-hi);
  background: var(--surface);
}

.docs-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.docs-search-btn:hover {
  border-color: var(--line-hi);
  color: var(--text);
}
.docs-search-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.docs-kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
}

.nav a.nav-active {
  color: var(--accent);
}

/* 3-Column Documentation Shell */
.docs-shell {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 224px;
  align-items: start;
  min-height: calc(100vh - 56px);
}

/* Left Sidebar */
.docs-sidebar {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 20px 16px 40px;
  background: var(--bg);
}

.docs-sidebar-search {
  width: 100%;
  margin-bottom: 18px;
}

.docs-nav-group {
  margin-bottom: 18px;
}

.docs-nav-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 10px 6px;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-2);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.docs-nav-link:hover {
  background: var(--surface);
  color: var(--text);
}
.docs-nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Main Content Column */
.docs-main {
  min-width: 0;
  padding: 36px 48px 72px;
}

.docs-article {
  max-width: 800px;
  margin: 0 auto;
}

.docs-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.docs-breadcrumbs a {
  color: var(--text-2);
}
.docs-breadcrumbs a:hover {
  color: var(--accent);
}

.docs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.docs-article h1 {
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 16px;
}

.docs-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 22px;
}

.docs-replaces {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 11px;
}
.docs-replaces strong {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-proto-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-btn-fg);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, transform 0.12s ease;
}
.docs-proto-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.docs-proto-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.docs-article > p:first-of-type {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}

.docs-article p {
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-2);
  margin: 0 0 16px;
}

.docs-article strong {
  color: var(--text);
  font-weight: 600;
}

.docs-article a:not(.uc-card-main):not(.uc-proto-pill):not(.docs-proto-btn):not(.docs-pager-card):not(.heading-anchor):not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-line);
}
.docs-article a:not(.uc-card-main):not(.uc-proto-pill):not(.docs-proto-btn):not(.docs-pager-card):not(.heading-anchor):not(.btn):hover {
  text-decoration-color: var(--accent);
}

.docs-article h2 {
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 40px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 76px;
  position: relative;
}

.docs-article h3 {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin: 28px 0 10px;
  scroll-margin-top: 76px;
  position: relative;
}

.docs-article h4 {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
  scroll-margin-top: 76px;
  position: relative;
}

.heading-anchor {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.82em;
  color: var(--muted);
  opacity: 0;
  text-decoration: none;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.docs-article h2:hover .heading-anchor,
.docs-article h3:hover .heading-anchor,
.docs-article h4:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
}
.heading-anchor:hover {
  color: var(--accent);
}

.docs-article ul,
.docs-article ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-2);
}
.docs-article li {
  font-size: 14.8px;
  line-height: 1.65;
  margin-bottom: 7px;
}
.docs-article li > ul,
.docs-article li > ol {
  margin-top: 6px;
  margin-bottom: 6px;
}

.docs-article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 30px 0;
}

/* Tables */
.docs-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 18px 0 22px;
  background: var(--bg-elev);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.docs-table th {
  background: var(--table-head-bg);
  color: var(--text);
  font-weight: 600;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.docs-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.5;
}
.docs-table tr:last-child td {
  border-bottom: none;
}

/* Code Blocks */
.docs-code-block {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--code-bg);
  margin: 16px 0 22px;
  overflow: hidden;
}

.docs-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.docs-code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docs-copy-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.docs-copy-btn:hover {
  color: var(--text);
  border-color: var(--line-hi);
}
.docs-copy-btn.copied {
  color: var(--accent);
  border-color: var(--accent-line);
}

.docs-code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--code-fg);
}

/* Tabbed Code Groups */
.docs-tabs {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-elev);
  margin: 18px 0 24px;
  overflow: hidden;
}

.docs-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

.docs-tab-btn {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 7px 12px 8px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.docs-tab-btn:hover {
  color: var(--text);
}
.docs-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.docs-tab-panel {
  padding: 0;
}
.docs-tab-panel .docs-code-block {
  margin: 0;
  border: none;
  border-radius: 0;
}
.docs-tab-panel > p,
.docs-tab-panel > ul,
.docs-tab-panel > ol {
  padding: 14px 16px 0;
}

/* Callouts & Blockquotes */
.docs-callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 6px;
  padding: 13px 16px;
  margin: 18px 0 22px;
}
.docs-callout-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 5px;
}
.docs-callout p:last-child {
  margin-bottom: 0;
}
.docs-callout-note {
  border-left-color: var(--accent-blue);
}
.docs-callout-note .docs-callout-title {
  color: var(--accent-blue);
}
.docs-callout-important {
  border-left-color: var(--accent-amber);
}
.docs-callout-important .docs-callout-title {
  color: var(--accent-amber);
}
.docs-callout-warning,
.docs-callout-caution {
  border-left-color: var(--accent-rose);
}
.docs-callout-warning .docs-callout-title,
.docs-callout-caution .docs-callout-title {
  color: var(--accent-rose);
}

.docs-article blockquote {
  border-left: 3px solid var(--line-hi);
  background: var(--bg-alt);
  padding: 12px 16px;
  margin: 18px 0 22px;
  border-radius: 0 6px 6px 0;
}
.docs-article blockquote p:last-child {
  margin-bottom: 0;
}

/* Product Use-Case Card Grid on /docs Landing */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 14px;
}

.uc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.uc-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
}

.uc-card-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 18px 14px;
  text-decoration: none;
  flex: 1;
}
.uc-card-main:hover {
  background: var(--surface);
}

.uc-card-wide {
  grid-column: 1 / -1;
}
.uc-card-wide .uc-card-foot {
  justify-content: space-between;
}

.uc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.uc-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.uc-arrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color 0.14s ease, transform 0.14s ease;
}
.uc-card-main:hover .uc-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.uc-title {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.25;
}

.uc-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.uc-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

.uc-replaces {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.uc-proto-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 3px 9px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
.uc-proto-pill:hover {
  background: var(--accent);
  color: var(--accent-btn-fg);
}

/* Live In-Browser Interactive Sandboxes */
.docs-sandbox {
  border: 1px solid var(--line-hi);
  border-radius: 8px;
  background: var(--bg-elev);
  padding: 18px;
  margin: 22px 0 28px;
}

.sb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.sb-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--text);
}

.sb-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 2px 9px;
}

.sb-desc {
  font-size: 13.2px;
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.5;
}

.sb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.sb-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.sb-chip:hover {
  border-color: var(--accent-line);
  color: var(--text);
  background: var(--surface);
}

.sb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sb-input,
.sb-select {
  flex: 1 1 180px;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.sb-select {
  flex: 0 0 auto;
}
.sb-input:focus,
.sb-select:focus {
  outline: none;
  border-color: var(--accent);
}

.sb-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
  min-height: 18px;
}

.sb-out {
  margin: 0;
  padding: 12px 14px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  max-height: 310px;
  overflow: auto;
  white-space: pre;
}

/* Checkout Live Form Sandbox */
.sb-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}

.sb-checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sb-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.sb-field input {
  height: 35px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
}
.sb-field input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Right "On This Page" TOC */
.docs-toc-col {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 28px 20px 40px 8px;
}

.docs-toc-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.docs-toc-list {
  list-style: none;
  border-left: 1px solid var(--line);
}

.docs-toc-link {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  transition: color 0.12s ease, border-color 0.12s ease;
}
.docs-toc-link:hover {
  color: var(--text);
}
.docs-toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}
.docs-toc-link.depth-3 {
  padding-left: 22px;
  font-size: 12px;
}

.docs-toc-meta {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-toc-meta a {
  font-size: 12px;
  color: var(--muted);
}
.docs-toc-meta a:hover {
  color: var(--accent);
}

/* Prev / Next Page Navigation */
.docs-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.docs-pager-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-alt);
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.docs-pager-card:hover {
  border-color: var(--accent-line);
  background: var(--surface);
}
.docs-pager-next {
  text-align: right;
  grid-column: 2;
}
.docs-pager-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.docs-pager-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Cross-Page Cmd+K Search Modal */
.docs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 24px;
}
.docs-modal-backdrop[hidden] {
  display: none;
}

.docs-modal {
  width: 100%;
  max-width: 620px;
  border-radius: 10px;
  border: 1px solid var(--line-hi);
  background: var(--bg-elev);
  overflow: hidden;
}

.docs-modal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.docs-modal-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
}
.docs-modal-input::placeholder {
  color: var(--muted);
}

.docs-modal-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.docs-modal-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.docs-modal-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.docs-modal-item:hover,
.docs-modal-item.selected {
  background: var(--surface);
  border-color: var(--accent-line);
}

.docs-modal-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.docs-modal-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.docs-modal-item-group {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

.docs-modal-item-page {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.docs-modal-item-snippet {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
}

.docs-modal-item mark {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

.docs-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Mobile Sidebar Backdrop */
.docs-drawer-backdrop {
  position: fixed;
  inset: 56px 0 0 0;
  z-index: 34;
  background: var(--overlay-bg);
}
.docs-drawer-backdrop[hidden] {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1220px) {
  .docs-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .docs-toc-col {
    display: none;
  }
  .docs-main {
    padding: 32px 36px 64px;
  }
}

@media (max-width: 920px) {
  .docs-mobile-menu-btn {
    display: inline-flex;
  }
  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 35;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    border-right: 1px solid var(--line-hi);
  }
  .docs-sidebar.open {
    transform: translateX(0);
  }
  .docs-main {
    padding: 24px 20px 56px;
  }
  .uc-grid,
  .sb-checkout-grid,
  .docs-pager {
    grid-template-columns: 1fr;
  }
  .uc-card-wide {
    flex-direction: column;
    align-items: flex-start;
  }
  .docs-pager-next {
    grid-column: 1;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .header-inner .nav {
    display: none;
  }
  .sb-field-row {
    grid-template-columns: 1fr;
  }
}
