/* Documentation: quiet reading columns and task-focused native dialogs. */
.docs-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 150px;
  align-items: start;
  gap: 48px;
  width: min(1280px, calc(100% - 96px));
  margin-inline: auto;
}
.docs-sidebar,
.docs-toc {
  position: sticky;
  top: calc(var(--cb-header-height) + 32px);
  max-height: calc(100dvh - var(--cb-header-height) - 64px);
  margin-top: 42px;
  padding: 4px 5px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.docs-sidebar-title {
  display: block;
  margin-bottom: 20px;
  color: var(--cb-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.docs-search-open {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-bottom: 28px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--cb-surface);
  color: var(--cb-text-muted);
  font-size: 13px;
  text-align: left;
}
.docs-search-open > span:first-child {
  font-size: 24px;
  line-height: 1;
}
.docs-search-open:hover {
  background: var(--cb-surface-muted);
  color: var(--cb-text);
}
.docs-nav-home,
.docs-nav-group a {
  display: block;
  padding: 10px 12px;
  border-radius: 5px;
  color: var(--cb-text-soft);
  font-size: 13px;
  line-height: 1.55;
  text-decoration: none;
}
.docs-nav-group {
  margin-top: 26px;
}
.docs-nav-group > p {
  margin: 0 12px 10px;
  color: var(--cb-text-muted);
  font-size: 11px;
}
.docs-nav-home:hover,
.docs-nav-group a:hover {
  background: var(--cb-surface-muted);
  color: var(--cb-text);
}
.docs-nav-home[aria-current],
.docs-nav-group a[aria-current] {
  background: var(--cb-accent-soft);
  color: var(--cb-accent);
  font-weight: 600;
}
.docs-mobile-nav {
  display: none;
}
.docs-content {
  min-width: 0;
  padding: 48px 0;
}
.docs-article-header {
  margin-bottom: 36px;
}
.docs-version-note {
  color: var(--cb-text-muted);
  font-size: 12px;
  line-height: 1.8;
}
.docs-article-header h1 {
  margin: 0 0 22px;
  font-size: clamp(32px, 3.1vw, 44px);
  line-height: 1.25;
  letter-spacing: -.035em;
  font-weight: 550;
}
.docs-description {
  margin: 0;
  color: var(--cb-text-soft);
  font-size: 16px;
  line-height: 1.9;
}
.docs-version-note {
  margin: 18px 0 0;
}
.docs-section {
  margin-top: 42px;
  scroll-margin-top: calc(var(--cb-header-height) + 30px);
}
.docs-section h2 {
  margin: 0 0 22px;
  font-size: 23px;
  line-height: 1.4;
  letter-spacing: -.025em;
  font-weight: 550;
}
.docs-section h2 a {
  color: inherit;
  text-decoration: none;
}
.docs-section h2 a:hover::after {
  content: ' #';
  color: var(--cb-text-muted);
  font-weight: 400;
}
.docs-section p,
.docs-section li {
  color: var(--cb-text-soft);
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.docs-section p {
  margin: 0 0 18px;
}
.docs-steps {
  margin: 24px 0 28px;
  padding-left: 1.65em;
}
.docs-steps li {
  margin-bottom: 14px;
  padding-left: .4em;
}
.docs-steps li::marker {
  color: var(--cb-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.docs-key-list {
  padding-left: 1.5em;
}
.docs-note {
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: 8px;
  background: var(--cb-surface-muted);
}
.docs-quick-start {
  margin: 24px 0 32px;
}
.docs-note strong {
  color: var(--cb-text);
  font-size: 13px;
}
.docs-note p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.85;
}
.docs-figure {
  margin: 30px 0;
}
.docs-figure--narrow {
  max-width: 320px;
}
.docs-image-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: var(--cb-surface);
  box-shadow: var(--cb-shadow);
}
.docs-image-link img {
  width: 100%;
  height: auto;
}
.docs-image-content { display: block; position: relative; }
.docs-image-content img { display: block; }
.docs-control-entry-mark { position: absolute; left: 62.5%; top: 37.5%; width: 4.6%; height: 11.5%; border: 2px solid #252523; border-radius: 5px; pointer-events: none; }
.docs-control-entry-label { position: absolute; right: 38.5%; top: 43.25%; transform: translateY(-50%); color: #252523; font-size: clamp(10px,1vw,13px); font-weight: 550; white-space: nowrap; pointer-events: none; }
.docs-image-hint {
  display: block;
  padding: 10px 14px;
  background: var(--cb-surface);
  color: var(--cb-text-soft);
  font-size: 12px;
  text-align: right;
}
.docs-image-link:hover .docs-image-hint {
  color: var(--cb-accent);
}
.docs-figure figcaption {
  margin-top: 12px;
  color: var(--cb-text-muted);
  font-size: 12px;
  line-height: 1.8;
}
.docs-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}
.docs-downloads a,
.docs-search-retry {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--cb-surface-muted);
  color: var(--cb-text);
  font-size: 13px;
  text-decoration: none;
}
.docs-downloads a:hover,
.docs-search-retry:hover {
  background: var(--cb-accent-soft);
  color: var(--cb-accent);
}
.docs-related {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.docs-related li {
  margin: 12px 0;
}
.docs-related a,
.docs-inline-link {
  font-size: 14px;
}
.docs-table-scroll {
  max-width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  border-radius: 6px;
  scrollbar-width: thin;
}
.docs-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.75;
  text-align: left;
}
.docs-table-scroll th,
.docs-table-scroll td {
  padding: 14px;
  vertical-align: top;
  color: var(--cb-text-soft);
}
.docs-table-scroll thead th {
  background: var(--cb-surface-muted);
  color: var(--cb-text);
  font-weight: 600;
  white-space: nowrap;
}
.docs-table-scroll tbody tr:nth-child(even) {
  background: var(--cb-surface);
}
.docs-table-scroll tbody th {
  min-width: 90px;
  color: var(--cb-text);
  font-weight: 500;
}
.docs-table-scroll:has(thead th:nth-child(4)) {
  max-height: min(680px, 70dvh);
  overflow: auto;
}
.docs-table-scroll table:has(thead th:nth-child(4)) {
  min-width: 700px;
}
.docs-table-scroll:has(thead th:nth-child(4)) thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.docs-section .docs-source-note {
  font-size: 12px;
  line-height: 1.85;
}
.docs-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 72px;
  padding-top: 12px;
}
.docs-pagination a {
  color: var(--cb-text);
  text-decoration: none;
}
.docs-pagination a:last-child {
  text-align: right;
}
.docs-pagination a:hover strong {
  color: var(--cb-accent);
}
.docs-pagination span {
  display: block;
  margin-bottom: 10px;
  color: var(--cb-text-muted);
  font-size: 12px;
}
.docs-pagination strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}
.docs-toc > strong {
  display: block;
  margin-bottom: 18px;
  color: var(--cb-text-muted);
  font-size: 11px;
  font-weight: 500;
}
.docs-toc nav {
  display: grid;
  gap: 14px;
}
.docs-toc a {
  color: var(--cb-text-muted);
  font-size: 12px;
  line-height: 1.7;
  text-decoration: none;
}
.docs-toc a:hover,
.docs-toc a[aria-current] {
  color: var(--cb-accent);
}
.docs-quick-start > strong {
  font-size: 14px;
  font-weight: 600;
}
.docs-quick-start ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.docs-quick-start a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  color: var(--cb-text-soft);
  font-size: 14px;
  text-decoration: none;
}
.docs-quick-start a:hover {
  color: var(--cb-accent);
}
.docs-quick-start a > span:first-child,
.docs-directory-number {
  color: var(--cb-text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.docs-quick-start a > span:last-child {
  margin-left: auto;
}
.docs-directory a {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 15px;
  gap: 18px;
  padding: 18px 0;
  color: var(--cb-text);
  text-decoration: none;
}
.docs-directory a strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}
.docs-directory a > span:nth-child(2) > span {
  display: block;
  margin-top: 9px;
  color: var(--cb-text-soft);
  font-size: 13px;
  line-height: 1.85;
}
.docs-directory a:hover strong,
.docs-directory a:hover > span:last-child {
  color: var(--cb-accent);
}
.docs-qa {
  margin: 0;
}
.docs-qa > div {
  padding: 18px 0;
}
.docs-qa dt {
  font-size: 15px;
  font-weight: 500;
}
.docs-qa dd {
  margin: 9px 0 0;
  color: var(--cb-text-soft);
  font-size: 14px;
  line-height: 1.9;
}
.docs-search-dialog,
.docs-image-dialog {
  position: fixed;
  width: min(680px, calc(100% - 48px));
  max-height: calc(100dvh - 64px);
  margin: 32px auto;
  padding: 26px;
  border: 0;
  border-radius: 12px;
  background: var(--cb-surface);
  color: var(--cb-text);
  box-shadow: var(--cb-shadow-lg);
  overscroll-behavior: contain;
}
.docs-search-dialog[open],
.docs-image-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.docs-search-dialog::backdrop,
.docs-image-dialog::backdrop {
  background: #1A1A1Aa6;
  backdrop-filter: blur(6px);
}
.docs-search-dialog > :not(#docs-search-results),
.docs-image-dialog .docs-dialog-heading,
.docs-image-dialog .docs-image-footer {
  flex-shrink: 0;
}
.docs-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.docs-dialog-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 550;
}
.docs-dialog-heading > span {
  flex: 1;
  font-size: 13px;
}
.docs-dialog-heading button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 5px;
  background: var(--cb-surface-muted);
  color: var(--cb-text);
  font-size: 22px;
  line-height: 1;
}
.docs-dialog-heading button:hover {
  background: var(--cb-accent-soft);
  color: var(--cb-accent);
}
#docs-search-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--cb-surface-muted);
  color: var(--cb-text);
  font-size: 16px;
}
#docs-search-input::placeholder {
  color: var(--cb-text-muted);
}
#docs-search-status {
  min-height: 22px;
  margin: 18px 0;
  color: var(--cb-text-muted);
  font-size: 13px;
}
#docs-search-results {
  min-height: 0;
  max-height: calc(100dvh - 295px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  list-style: none;
}
#docs-search-results a {
  display: block;
  padding: 16px 12px;
  border-radius: 5px;
  color: var(--cb-text);
  text-decoration: none;
}
#docs-search-results a:hover,
#docs-search-results a:focus-visible {
  background: var(--cb-accent-soft);
}
#docs-search-results strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}
#docs-search-results span {
  display: block;
  margin-top: 8px;
  color: var(--cb-text-soft);
  font-size: 13px;
  line-height: 1.8;
}
.docs-image-dialog {
  width: min(1440px, calc(100% - 48px));
}
.docs-image-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}
.docs-dialog-heading [data-doc-zoom-mode] {
  width: auto;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
}
.docs-dialog-heading [data-doc-zoom-mode][data-zoomed="true"] {
  background: var(--cb-accent-soft);
  color: var(--cb-accent);
}
.docs-image-stage {
  min-height: 0;
  max-height: calc(100dvh - 230px);
  overflow: auto;
  border-radius: 5px;
  background: var(--cb-surface-muted);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.docs-image-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 240px);
  object-fit: contain;
}
.docs-image-dialog.is-zoomed .docs-image-stage img {
  width: var(--doc-image-width, 100%);
  max-width: none;
  max-height: none;
  object-fit: fill;
}
.docs-image-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}
.docs-image-footer p {
  margin: 0;
  color: var(--cb-text-soft);
  font-size: 12px;
  line-height: 1.8;
}
.docs-image-footer a {
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 1199px) {
  .docs-layout {
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 36px;
    width: calc(100% - 64px);
  }
  .docs-toc {
    display: none;
  }
}
@media (max-width: 900px) {
  .docs-layout {
    display: block;
    width: calc(100% - 40px);
  }
  .docs-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    max-height: none;
    margin: 24px 0 0;
    padding: 0;
    overflow: visible;
  }
  .docs-sidebar-title {
    margin: 0;
  }
  .docs-search-open {
    width: auto;
    margin: 0;
  }
  .docs-desktop-nav {
    display: none;
  }
  .docs-mobile-nav {
    display: block;
    grid-column: 1 / -1;
    margin-top: 20px;
  }
  .docs-mobile-nav > summary {
    padding: 12px 0;
    color: var(--cb-text-soft);
    font-size: 13px;
    cursor: pointer;
  }
  .docs-mobile-nav[open] nav {
    max-height: 60dvh;
    padding: 10px 0 20px;
    overflow: auto;
  }
  .docs-content {
    padding-top: 36px;
  }
  .docs-article-header {
    margin-bottom: 40px;
  }
  .docs-section {
    margin-top: 44px;
  }
  .docs-table-scroll table:not(:has(thead th:nth-child(3))) {
    table-layout: fixed;
    overflow-wrap: anywhere;
  }
  .docs-table-scroll table:not(:has(thead th:nth-child(3))) th:first-child {
    width: 40%;
    min-width: 0;
    white-space: normal;
  }
  .docs-table-scroll th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--cb-surface);
  }
  .docs-table-scroll thead th:first-child {
    background: var(--cb-surface-muted);
  }
  .docs-table-scroll:has(thead th:nth-child(4)) thead th:first-child {
    z-index: 3;
  }
  .docs-image-footer {
    display: block;
  }
  .docs-image-footer a {
    display: inline-block;
    margin-top: 12px;
  }
}
@media (max-width: 479px) {
  .docs-article-header h1 {
    font-size: 30px;
  }
  .docs-section h2 {
    font-size: 21px;
  }
  .docs-note {
    padding: 20px;
  }
  .docs-search-dialog,
  .docs-image-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    margin: 10px auto;
    padding: 16px;
  }
  .docs-dialog-heading {
    gap: 8px;
  }
  .docs-dialog-heading > span {
    font-size: 12px;
  }
  .docs-dialog-heading [data-doc-zoom-mode] {
    padding-inline: 10px;
    font-size: 12px;
  }
  .docs-image-stage {
    max-height: calc(100dvh - 220px);
  }
  .docs-image-stage img {
    max-height: calc(100dvh - 240px);
  }
  .docs-downloads a {
    flex: 1 1 auto;
  }
  .docs-directory a {
    grid-template-columns: 20px minmax(0, 1fr) 15px;
    gap: 10px;
  }
}
