/* CartThrob documentation */
:root {
  --ct-blue-950: #0f3447;
  --ct-blue-900: #143c51;
  --ct-blue-800: #1e526c;
  --ct-blue-700: #2d6a87;
  --ct-blue-100: #dbeafe;
  --ct-yellow-500: #f4d64d;
  --ct-yellow-600: #e9c72f;
  --ct-yellow-100: #fff6c7;
  --ct-bg: #eef5f8;
  --ct-surface: #ffffff;
  --ct-surface-soft: #f7fbfd;
  --ct-surface-inset: #edf4f7;
  --ct-text: #122333;
  --ct-text-secondary: #3b5364;
  --ct-text-tertiary: #668092;
  --ct-text-muted: #8aa0ae;
  --ct-border-subtle: rgba(15, 52, 71, 0.08);
  --ct-border: rgba(15, 52, 71, 0.14);
  --ct-border-strong: rgba(15, 52, 71, 0.26);
  --ct-focus: #f4d64d;
  --ct-link: #1f6784;
  --ct-radius-sm: 4px;
  --ct-radius: 8px;
  --ct-shadow: 0 18px 55px rgba(15, 52, 71, 0.13);
  --ct-shadow-soft: 0 8px 22px rgba(15, 52, 71, 0.1);
  --ct-article-max: 76rem;
  --ct-font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ct-font-display: Lexend, Inter, "Segoe UI", system-ui, sans-serif;
  --ct-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--ct-font);
  color: var(--ct-text);
  background: linear-gradient(180deg, #143c51 0, #143c51 12rem, var(--ct-bg) 12rem);
  line-height: 1.65;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--ct-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-200%);
  padding: 0.65rem 0.85rem;
  border-radius: var(--ct-radius-sm);
  background: var(--ct-yellow-500);
  color: #14212b;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--ct-shadow-soft);
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.ct-header-bar {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(20, 60, 81, 0.98), rgba(31, 82, 108, 0.96)),
    var(--ct-blue-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ct-sale-strip {
  min-height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  color: #14212b;
  background: var(--ct-yellow-500);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.ct-sale-strip-return {
  display: none;
}

.ct-header-inner {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.ct-header-start,
.ct-header-end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ct-header-end {
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.ct-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  text-decoration: none;
}

.ct-logo-mark {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 214, 77, 0.55);
  border-radius: var(--ct-radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ct-yellow-500);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
}

.ct-logo-title,
.ct-logo-subtitle {
  display: block;
  line-height: 1.05;
}

.ct-logo-title {
  font-family: var(--ct-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.ct-logo-subtitle {
  margin-top: 0.18rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.ct-docs-switcher {
  position: relative;
}

.ct-docs-switcher > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.45rem;
  padding: 0.58rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ct-radius);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}

.ct-docs-switcher > summary::-webkit-details-marker {
  display: none;
}

.ct-docs-switcher > summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  opacity: 0.75;
}

.ct-docs-switcher > summary:hover,
.ct-docs-switcher[open] > summary {
  border-color: rgba(244, 214, 77, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ct-docs-switcher-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  z-index: 45;
  width: min(92vw, 14rem);
  padding: 0.55rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  color: var(--ct-text);
  box-shadow: var(--ct-shadow);
}

.ct-docs-switcher-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-docs-switcher-links li {
  margin: 0.12rem 0;
}

.ct-docs-switcher-links a {
  display: block;
  padding: 0.42rem 0.5rem;
  border-radius: var(--ct-radius-sm);
  color: var(--ct-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.32;
}

.ct-docs-switcher-links a:hover,
.ct-docs-switcher-links a[aria-current="page"] {
  color: var(--ct-blue-950);
  background: var(--ct-yellow-100);
}

.ct-site-return {
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  flex: 0 0 auto;
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ct-radius);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.ct-site-return:hover {
  border-color: rgba(244, 214, 77, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.ct-site-return-mark {
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ct-yellow-500);
  box-shadow: 0 0 0 3px rgba(244, 214, 77, 0.13);
}

.ct-site-return-icon {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.ct-search-form {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: min(100%, 28rem);
}

.ct-search-input {
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  padding: 0.62rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ct-radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ct-text);
  font-size: 0.95rem;
  line-height: 1.2;
}

.ct-search-input::placeholder {
  color: #64798a;
}

.ct-search-submit {
  min-height: 2.55rem;
  padding: 0.62rem 0.95rem;
  border: 1px solid #e2bf20;
  border-radius: var(--ct-radius);
  background: var(--ct-yellow-500);
  color: #14212b;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.ct-search-submit:hover {
  background: var(--ct-yellow-600);
}

.ct-nav-toggle {
  display: none;
  width: 2.55rem;
  height: 2.55rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ct-radius);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.ct-nav-toggle-bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.top-nav-wrap {
  background: var(--ct-blue-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 10px 30px rgba(15, 52, 71, 0.17);
}

.top-nav-list {
  width: min(100%, 1600px);
  min-height: 3.35rem;
  margin: 0 auto;
  padding: 0.45rem 1.5rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-nav-item {
  margin: 0;
  position: relative;
}

.top-nav-item > a,
.top-nav-item > details > summary {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.54rem 0.72rem;
  border: 1px solid transparent;
  border-radius: var(--ct-radius);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}

.top-nav-item > details > summary {
  list-style: none;
}

.top-nav-item > details > summary::-webkit-details-marker {
  display: none;
}

.top-nav-item > details > summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  opacity: 0.75;
}

.top-nav-item > a:hover,
.top-nav-item > details > summary:hover,
.top-nav-item > details[open] > summary,
.top-nav-item > a[aria-current="page"],
.top-nav-item details.has-current > summary {
  color: #fff;
  border-color: rgba(244, 214, 77, 0.38);
  background: rgba(244, 214, 77, 0.12);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  z-index: 40;
  width: min(92vw, 58rem);
  max-height: min(72vh, 42rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  color: var(--ct-text);
  box-shadow: var(--ct-shadow);
}

.dropdown-panel--compact {
  width: min(92vw, 22rem);
}

.dropdown-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(13rem, 1fr));
  gap: 1rem;
}

.dropdown-columns--three {
  grid-template-columns: repeat(3, minmax(12rem, 1fr));
}

.dropdown-group {
  padding: 0 0 0.25rem;
}

.dropdown-group h3 {
  margin: 0 0 0.55rem;
  color: var(--ct-blue-900);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
}

.dropdown-links,
.dropdown-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dropdown-links li {
  margin: 0.12rem 0;
}

.dropdown-links a {
  display: block;
  padding: 0.42rem 0.5rem;
  border-radius: var(--ct-radius-sm);
  color: var(--ct-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.32;
}

.dropdown-links a:hover,
.dropdown-links a[aria-current="page"] {
  color: var(--ct-blue-950);
  background: var(--ct-yellow-100);
}

.main {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 18.5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.main--no-sidebar {
  grid-template-columns: 1fr;
}

.sidebar-nav {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ct-radius);
  background:
    linear-gradient(180deg, rgba(20, 60, 81, 0.98), rgba(15, 52, 71, 0.98)),
    var(--ct-blue-950);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--ct-shadow-soft);
}

.sidebar-heading {
  padding: 0.25rem 0.25rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-kicker,
.sidebar-title {
  display: block;
  line-height: 1.15;
}

.sidebar-kicker {
  color: var(--ct-yellow-500);
  font-size: 0.78rem;
  font-weight: 900;
}

.sidebar-title {
  margin-top: 0.2rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.sidebar-section {
  padding: 0.9rem 0 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-section:last-child {
  border-bottom: 0;
}

.sidebar-section h2 {
  margin: 0 0 0.45rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
}

.sidebar-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-nav li {
  margin: 0.08rem 0;
}

.sidebar-nav .sidebar-subnav {
  margin: 0.15rem 0 0.35rem 0.65rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-nav .sidebar-subnav a {
  padding-block: 0.32rem;
  font-size: 0.82rem;
  font-weight: 550;
}

.sidebar-nav a {
  display: block;
  padding: 0.42rem 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--ct-radius-sm);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.28;
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a[aria-current="page"] {
  color: #14212b;
  border-color: rgba(244, 214, 77, 0.7);
  background: var(--ct-yellow-500);
}

.content-shell {
  min-width: 0;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  box-shadow: var(--ct-shadow);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--ct-article-max)) 16rem;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem;
}

.content-shell.has-no-toc .content-grid,
.main--no-sidebar .content-grid {
  grid-template-columns: minmax(0, var(--ct-article-max));
}

.content-primary {
  min-width: 0;
}

.content-toc {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding-left: 1rem;
  border-left: 1px solid var(--ct-border-subtle);
}

.content-shell.has-no-toc .content-toc,
.main--no-sidebar .content-toc {
  display: none;
}

.content-toc h2 {
  margin: 0 0 0.7rem;
  color: var(--ct-blue-900);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1.25;
}

.content-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-toc li {
  margin: 0;
}

.content-toc a {
  display: block;
  padding: 0.32rem 0;
  color: var(--ct-text-tertiary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.28;
}

.content-toc a:hover,
.content-toc a[aria-current="true"] {
  color: var(--ct-blue-900);
}

.content-toc .toc-depth-3 a {
  padding-left: 0.8rem;
  font-weight: 550;
}

.crumb-nav {
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ct-border-subtle);
  border-radius: var(--ct-radius);
  background: var(--ct-surface-soft);
}

.crumb-nav.is-empty {
  display: none;
}

.breadcrumbs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.25;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ct-text-tertiary);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--ct-text-muted);
}

.breadcrumb-item a {
  color: var(--ct-link);
  text-decoration: none;
  font-weight: 700;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb-item.last {
  color: var(--ct-text-secondary);
  font-weight: 800;
}

.doc-content {
  max-width: var(--ct-article-max);
  color: var(--ct-text);
  font-size: 1rem;
  line-height: 1.72;
}

.doc-title,
.doc-content h1 {
  margin: 0 0 1.1rem;
  color: var(--ct-blue-950);
  font-size: 2.35rem;
  font-weight: 950;
  line-height: 1.08;
}

.doc-content > h1:first-child {
  margin-top: 0;
}

.doc-content h1:not(:first-child) {
  margin-top: 2rem;
}

.doc-content h2 {
  margin: 2.15rem 0 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--ct-border-subtle);
  color: var(--ct-blue-900);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
  scroll-margin-top: 2rem;
}

.doc-content h3 {
  margin: 1.55rem 0 0.55rem;
  color: var(--ct-blue-900);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.25;
  scroll-margin-top: 2rem;
}

.doc-content h4 {
  margin: 1.25rem 0 0.45rem;
  color: var(--ct-text);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.28;
  scroll-margin-top: 2rem;
}

.doc-content h2:hover .heading-anchor,
.doc-content h3:hover .heading-anchor,
.doc-content h4:hover .heading-anchor {
  opacity: 1;
}

.heading-anchor {
  margin-left: 0.38rem;
  color: var(--ct-yellow-600);
  text-decoration: none;
  font-size: 0.8em;
  opacity: 0;
}

.heading-anchor:hover {
  color: var(--ct-blue-900);
}

.doc-content p,
.doc-content li {
  margin: 0.75rem 0;
}

.doc-content ul,
.doc-content ol {
  margin: 0.8rem 0;
  padding-left: 1.45rem;
}

.doc-content a {
  color: var(--ct-link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(31, 103, 132, 0.32);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.doc-content a:hover {
  color: var(--ct-blue-950);
  text-decoration-color: var(--ct-yellow-600);
}

.doc-content blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 5px solid var(--ct-yellow-500);
  border-radius: 0 var(--ct-radius) var(--ct-radius) 0;
  background: var(--ct-surface-soft);
  color: var(--ct-text-secondary);
}

.doc-lede {
  max-width: 52rem;
  margin: 0.4rem 0 1.35rem;
  color: var(--ct-text-secondary);
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.55;
}

.doc-home-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.2rem 0 1.4rem;
}

.doc-home-actions a {
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface-soft);
  color: var(--ct-text);
  text-decoration: none;
}

.doc-home-actions a:hover {
  border-color: rgba(244, 214, 77, 0.85);
  background: var(--ct-yellow-100);
}

.doc-home-actions strong {
  color: var(--ct-blue-950);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}

.doc-home-actions span {
  color: var(--ct-text-secondary);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.38;
}

.doc-home-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.doc-home-lanes section {
  padding: 1rem;
  border: 1px solid var(--ct-border-subtle);
  border-radius: var(--ct-radius);
  background: #fff;
}

.doc-home-lanes h2 {
  margin: 0 0 0.65rem;
  padding: 0;
  border: 0;
  color: var(--ct-blue-900);
  font-size: 1rem;
  line-height: 1.25;
}

.doc-home-lanes ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-home-lanes li {
  margin: 0;
}

.doc-home-lanes li + li {
  border-top: 1px solid var(--ct-border-subtle);
}

.doc-home-lanes a {
  display: block;
  padding: 0.5rem 0;
  color: var(--ct-link);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
}

.doc-home-lanes a:hover {
  color: var(--ct-blue-950);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-content pre {
  margin: 1.25rem 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid rgba(15, 52, 71, 0.18);
  border-radius: var(--ct-radius);
  background: #102f41;
  color: #e7f4f8;
  font-family: var(--ct-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  tab-size: 4;
}

.doc-content pre code {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  white-space: pre;
  word-break: normal;
}

.doc-content code {
  font-family: var(--ct-mono);
  font-size: 0.9em;
}

.doc-content :not(pre) > code {
  padding: 0.16em 0.38em;
  border: 1px solid rgba(15, 52, 71, 0.13);
  border-radius: var(--ct-radius-sm);
  background: var(--ct-yellow-100);
  color: #18374a;
  font-weight: 700;
  white-space: nowrap;
}

.doc-content h2 code,
.doc-content h3 code,
.doc-content h4 code {
  font-size: 0.92em;
}

.doc-content p > code,
.doc-content li > code {
  white-space: normal;
  word-break: break-word;
}

.doc-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.15rem 0;
  border-collapse: collapse;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  overflow-x: auto;
  font-size: 0.92rem;
}

.doc-content th,
.doc-content td {
  padding: 0.62rem 0.78rem;
  border: 1px solid var(--ct-border-subtle);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.doc-content th {
  background: var(--ct-blue-950);
  color: #fff;
  font-weight: 900;
}

.doc-content tr:nth-child(even) td {
  background: var(--ct-surface-soft);
}

.doc-image-trigger {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1.2rem auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: center;
}

.doc-image {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  box-shadow: var(--ct-shadow-soft);
}

.ct-image-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ct-image-modal[hidden] {
  display: none;
}

.ct-image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 48, 0.82);
}

.ct-image-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
}

.ct-image-modal__img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--ct-radius);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.ct-image-modal__close {
  position: absolute;
  top: -2.65rem;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: var(--ct-yellow-500);
  color: #14212b;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.ct-image-modal__close:hover {
  background: var(--ct-yellow-600);
}

.ct-search-results h1 {
  margin-top: 0;
}

.ct-search-results-form {
  margin: 1.1rem 0 1.6rem;
  padding: 1rem;
  border: 1px solid var(--ct-border-subtle);
  border-radius: var(--ct-radius);
  background: var(--ct-surface-soft);
}

.ct-search-form--page {
  max-width: 38rem;
}

.ct-search-form--page .ct-search-input {
  border-color: var(--ct-border);
  background: #fff;
}

.ct-search-summary {
  color: var(--ct-text-secondary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.ct-search-hit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-search-hit {
  padding: 1rem 0;
  border-bottom: 1px solid var(--ct-border-subtle);
}

.ct-search-hit__title {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  line-height: 1.3;
}

.ct-search-hit__title a {
  color: var(--ct-blue-900);
  text-decoration: none;
}

.ct-search-hit__title a:hover {
  color: var(--ct-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ct-search-hit__excerpt {
  margin: 0.35rem 0;
  color: var(--ct-text-secondary);
}

.ct-search-hit__excerpt mark {
  padding: 0 0.16em;
  border-radius: 2px;
  background: var(--ct-yellow-100);
  color: inherit;
}

.ct-search-hit__meta {
  margin: 0;
  color: var(--ct-text-tertiary);
  font-family: var(--ct-mono);
  font-size: 0.82rem;
}

.ct-search-empty,
.ct-search-error {
  color: var(--ct-text-secondary);
}

.ct-search-pagination {
  margin-top: 1.5rem;
}

.site-footer {
  padding: 1rem 1.5rem 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  background: var(--ct-blue-950);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.88rem;
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-toc {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    background: var(--ct-bg);
  }

  .ct-header-inner {
    flex-wrap: wrap;
  }

  .ct-header-end {
    width: 100%;
  }

  .ct-search-form {
    min-width: 0;
    flex: 1;
  }

  .ct-nav-toggle {
    display: inline-flex;
  }

  .top-nav-wrap {
    display: none;
  }

  .top-nav-wrap.is-open {
    display: block;
    max-height: calc(100dvh - 8rem);
    overflow: auto;
  }

  .top-nav-list {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .top-nav-item,
  .top-nav-item > details {
    width: 100%;
  }

  .top-nav-item > a,
  .top-nav-item > details > summary {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 0.35rem;
    box-shadow: none;
  }

  .dropdown-columns,
  .dropdown-columns--three {
    grid-template-columns: 1fr;
  }

  .dropdown-links a {
    padding: 0.7rem 0.65rem;
  }

  .main {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .content-shell {
    order: 1;
  }

  .sidebar-nav {
    order: 2;
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .ct-sale-strip {
    min-height: 2.45rem;
  }

  .ct-sale-strip-copy {
    display: none;
  }

  .ct-sale-strip-return {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #14212b;
    text-decoration: none;
  }

  .ct-sale-strip-return:hover {
    text-decoration: underline;
    text-underline-offset: 0.16em;
  }

  .ct-header-inner {
    padding: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .ct-header-start {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ct-docs-switcher {
    justify-self: end;
  }

  .ct-docs-switcher > summary {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
    font-size: 0.85rem;
  }

  .ct-header-end {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .ct-site-return {
    display: none;
  }

  .ct-search-form {
    width: 100%;
  }

  .ct-search-input {
    width: auto;
    flex: 1 1 0;
  }

  .ct-search-submit {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .content-grid {
    padding: 1rem;
  }

  .doc-title,
  .doc-content h1 {
    font-size: 1.85rem;
  }

  .doc-content h2 {
    font-size: 1.28rem;
  }

  .doc-home-actions,
  .doc-home-lanes {
    grid-template-columns: 1fr;
  }
}
