/* WikiDoc overrides on top of official Lagom2 theme.css + ServLayer vars */

/* ─── Site chrome: servlayer.net condensed nav (utility + menu) ─── */
.theme-lagom2 .doc-site-chrome {
  position: sticky;
  top: 0;
  z-index: var(--zindex-navbar-fixed, 1030);
  flex-shrink: 0;
  width: 100%;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.theme-lagom2 .doc-site-chrome .container,
.theme-lagom2 .doc-site-chrome__utility .app-nav-header .container,
.theme-lagom2 .doc-site-chrome__menu .container,
.theme-lagom2 .doc-site-chrome__menu-inner {
  box-sizing: border-box;
  width: 100% !important;
  max-width: var(--doc-chrome-container-max, 1360px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--doc-chrome-container-gutter, 40px) !important;
  padding-right: var(--doc-chrome-container-gutter, 40px) !important;
}

.theme-lagom2 .doc-site-chrome__skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100%;
  z-index: calc(var(--zindex-navbar-fixed, 1030) + 1);
  padding: .5rem .875rem;
  border-radius: .375rem;
  background: var(--brand-primary, #d50c0c);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: top .15s ease;
}

.theme-lagom2 .doc-site-chrome__skip:focus,
.theme-lagom2 .doc-site-chrome__skip:focus-visible {
  top: .75rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.theme-lagom2 .doc-site-chrome__action {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: .375rem .5rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.theme-lagom2 .doc-site-chrome__action:focus-visible {
  outline: 2px solid var(--brand-primary, #d50c0c);
  outline-offset: 2px;
  border-radius: .25rem;
}

.theme-lagom2 .doc-site-chrome .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#main-content:focus {
  outline: none;
}

.theme-lagom2 .doc-site-chrome__nav {
  width: 100%;
  background: var(--app-nav-top-bg, var(--body-bg));
  border: 0;
  box-shadow: none;
}

.theme-lagom2 .doc-site-chrome__nav.sticky-navigation {
  position: sticky !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  padding-right: 0 !important;
  animation: none !important;
  box-shadow: none !important;
}

.theme-lagom2 .doc-site-chrome__nav.sticky-navigation::after {
  display: none !important;
}

.theme-lagom2 .doc-site-chrome__utility {
  background: var(--app-nav-top-bg, var(--body-bg)) !important;
  border-block-end: 1px solid var(--doc-chrome-divider-color, var(--ui-block-divider-color, var(--gray-lighter-4))) !important;
}

.theme-lagom2 .doc-site-chrome__utility.app-nav-header,
.theme-lagom2 .doc-site-chrome .app-nav-header.doc-site-chrome__utility {
  position: static !important;
  top: auto !important;
  inset-inline: auto !important;
  z-index: auto !important;
  height: auto !important;
  min-height: var(--doc-utility-bar-height, 2.25rem) !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-right: 0 !important;
  border: 0 !important;
  border-block-end: 1px solid var(--doc-chrome-divider-color, var(--ui-block-divider-color, var(--gray-lighter-4))) !important;
  box-shadow: none !important;
  background: var(--app-nav-top-bg, var(--body-bg)) !important;
  display: block !important;
  width: 100% !important;
}

.theme-lagom2 .doc-site-chrome__utility .app-nav-header::after,
.theme-lagom2 .doc-site-chrome .app-nav-header::after {
  display: none !important;
}

.theme-lagom2 .doc-site-chrome__utility .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: var(--doc-utility-bar-height, 2.25rem);
  padding-block: 0 !important;
}

.theme-lagom2 .doc-site-chrome__utility-nav {
  flex: 1 1 auto;
  min-width: 0;
  margin-inline-start: 0;
}

.theme-lagom2 .doc-site-chrome__utility-nav .top-nav {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0;
}

.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li {
  display: flex;
  align-items: center;
  margin: 0;
}

.theme-lagom2 .doc-site-chrome__top-status {
  order: -1;
  margin-inline-end: auto !important;
}

.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > a,
.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .doc-site-chrome__action,
.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.25rem;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--gray-base, #4b4f58);
  font: inherit;
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > a:hover,
.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .doc-site-chrome__action:hover,
.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .dropdown-toggle:hover {
  color: var(--text-heading-color, #17191c);
}

.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > a > i,
.theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .doc-site-chrome__action > i {
  color: var(--gray-lighter, #595e69);
  font-size: .95rem;
}

.theme-lagom2 .doc-site-chrome__top-live {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-inline-start: .35rem;
  color: var(--brand-success, #28a745);
  font-size: .8125rem;
  font-weight: 600;
}

.theme-lagom2 .doc-site-chrome__top-live-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: .5rem;
  height: .5rem;
  min-width: .5rem;
  min-height: .5rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(40, 167, 69, .45);
  animation: doc-live-pulse 1.8s ease-out infinite;
}

@keyframes doc-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, .45); }
  70% { box-shadow: 0 0 0 .35rem rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.theme-lagom2 .doc-site-chrome__top-divider {
  padding-inline: .15rem;
  color: var(--gray-lighter-3, #dee0e3);
  font-size: .875rem;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.theme-lagom2 .doc-site-chrome__utility-nav .dark-mode-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: .35rem;
}

.theme-lagom2 .doc-site-chrome__utility-nav .dark-mode-switcher .switch {
  margin: 0;
}

.theme-lagom2 .doc-site-chrome__brand {
  display: inline-flex;
  align-items: center;
  gap: .875rem;
  min-width: 0;
}

.theme-lagom2 .doc-site-chrome__menu {
  background: var(--app-nav-navbar-bg, var(--app-nav-top-bg, var(--body-bg)));
  border: 0;
  border-block-end: 1px solid var(--doc-chrome-divider-color, var(--ui-block-divider-color, var(--gray-lighter-4)));
}

.theme-lagom2 .doc-site-chrome__menu .container,
.theme-lagom2 .doc-site-chrome__menu-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 1rem;
  min-height: var(--doc-brand-bar-height, 4.25rem);
  padding-block: .5rem !important;
}

.theme-lagom2 .doc-site-chrome__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  text-decoration: none;
  line-height: 0;
}

.theme-lagom2 .doc-site-chrome__logo.logo {
  display: inline-flex !important;
}

.theme-lagom2 .doc-site-chrome__logo .logo-img {
  display: block;
  width: auto;
  height: var(--app-nav-logo-height, 42px);
  max-width: min(100%, 15rem);
  object-fit: contain;
  object-position: left center;
}

[dir="rtl"] .theme-lagom2 .doc-site-chrome__logo .logo-img {
  object-position: right center;
}

.theme-lagom2 .doc-site-chrome__logo-text {
  color: var(--text-heading-color);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

html.lagom-dark-mode .theme-lagom2 {
  --doc-chrome-divider-color: rgba(255, 255, 255, .08);
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__menu {
  background: var(--app-nav-navbar-bg, #242424);
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility.app-nav-header,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__nav {
  background: var(--app-nav-top-bg, #242424) !important;
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > a,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .doc-site-chrome__action,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .dropdown-toggle {
  color: var(--text-body-color, #d9d9d9);
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > a:hover,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .doc-site-chrome__action:hover,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .dropdown-toggle:hover {
  color: var(--text-heading-color, #fff);
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > a > i,
html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__utility-nav .top-nav > li > .doc-site-chrome__action > i {
  color: var(--text-faded-color, #a3a3a3);
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__top-divider {
  color: rgba(255, 255, 255, .2);
}

html.lagom-dark-mode .theme-lagom2 .doc-site-chrome__top-live {
  color: var(--dark-mode-brand-success-lighter, #49ca52);
}

/* ─── Scroll: trapped layout — header fixed, columns scroll independently ─── */
body.theme-lagom2.lagom {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden !important;
}

.theme-lagom2.lagom .app-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden !important;
  padding-top: 0 !important;
  background: var(--body-bg);
  position: relative;
  z-index: 1;
}

.theme-lagom2 .doc-shell {
  flex: 1 1 auto;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: var(--body-bg);
  position: relative;
  z-index: 1;
}

.theme-lagom2 .doc-shell__content {
  height: 100% !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  background: var(--body-bg);
  color: var(--text-body-color, var(--text));
  position: relative;
  z-index: 1;
}

.theme-lagom2 .left-nav,
.theme-lagom2 .toc-rail {
  position: static;
  align-self: stretch;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Lagom mobile-nav overlay is WHMCS-only; never block WikiDoc clicks */
body.theme-lagom2.lagom .app-main::before,
body.theme-lagom2.lagom .app-main::after {
  display: none !important;
  content: none !important;
  pointer-events: none !important;
}

.theme-lagom2 [data-search-open] {
  cursor: pointer;
}

/* ─── Dark mode base ─── */
html.lagom-dark-mode .theme-lagom2 {
  color-scheme: dark;
}

html.lagom-dark-mode .theme-lagom2,
html.lagom-dark-mode .theme-lagom2 .app-main,
html.lagom-dark-mode .theme-lagom2 .doc-shell,
html.lagom-dark-mode .theme-lagom2 .doc-shell__content,
html.lagom-dark-mode .theme-lagom2.has-product-content-shell,
html.lagom-dark-mode .theme-lagom2.has-product-content-shell .doc-shell,
html.lagom-dark-mode .theme-lagom2.has-product-content-shell .doc-shell__content {
  background: var(--body-bg) !important;
  color: var(--text-body-color);
}

/* ─── Left navigation ─── */
html.lagom-dark-mode .theme-lagom2 .left-nav,
html.lagom-dark-mode .theme-lagom2 .left-nav-panel {
  background: var(--gray-faded) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-4));
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 .left-nav__label,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-group-label {
  color: var(--text-lighter-color, var(--gray-lighter));
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-trigger {
  background: var(--gray-lighter-4) !important;
  border: 1px solid var(--gray-lighter-2) !important;
  color: var(--text-heading-color);
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-trigger:hover,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-trigger[aria-expanded="true"] {
  background: var(--gray-lighter-3) !important;
  border-color: var(--brand-primary-lighter-2) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-panel {
  background: var(--gray-lighter-4) !important;
  border: 1px solid var(--gray-lighter-2) !important;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-name,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option-name {
  color: var(--text-heading-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-placeholder {
  color: var(--text-lighter-color, var(--gray-lighter)) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-version,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option-version {
  color: var(--brand-primary-lighter) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__flat-link,
html.lagom-dark-mode .theme-lagom2 .left-nav__link,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-hub {
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 .left-nav__flat-link:hover,
html.lagom-dark-mode .theme-lagom2 .left-nav__link:hover,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option:hover,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-hub:hover {
  color: var(--brand-primary-lighter);
  background: var(--brand-primary-lighter-4);
}

html.lagom-dark-mode .theme-lagom2 .left-nav__flat-link.is-active,
html.lagom-dark-mode .theme-lagom2 .left-nav__link.is-active,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option.is-active {
  color: var(--on-brand, #fff);
  background: var(--brand-primary);
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option.is-active .left-nav__switcher-option-name,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option.is-active .left-nav__switcher-option-version {
  color: var(--on-brand, #fff) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option.is-active .left-nav__switcher-option-version {
  background: rgba(255, 255, 255, .16) !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__section {
  border-color: var(--ui-block-divider-color, var(--gray-lighter-4));
}

/* ─── TOC rail ─── */
html.lagom-dark-mode .theme-lagom2 .toc-rail {
  background: var(--body-bg) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-4));
}

html.lagom-dark-mode .theme-lagom2 .toc-rail__label {
  color: var(--text-lighter-color, var(--gray-lighter));
}

html.lagom-dark-mode .theme-lagom2 .toc-rail__link {
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 .toc-rail__link:hover,
html.lagom-dark-mode .theme-lagom2 .toc-rail__link.is-active {
  color: var(--brand-primary-lighter);
}

/* ─── Breadcrumbs & page headers ─── */
html.lagom-dark-mode .theme-lagom2 .doc-breadcrumb,
html.lagom-dark-mode .theme-lagom2 .breadcrumb,
html.lagom-dark-mode .theme-lagom2 .product-content-page__lead,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-page__header p {
  color: var(--text-lighter-color, var(--gray-lighter)) !important;
}

html.lagom-dark-mode .theme-lagom2 .doc-breadcrumb a,
html.lagom-dark-mode .theme-lagom2 .breadcrumb a,
html.lagom-dark-mode .theme-lagom2 .product-content-page a,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference a {
  color: var(--brand-primary-lighter);
}

html.lagom-dark-mode .theme-lagom2 .product-content-page__header h1,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-page__header h1,
html.lagom-dark-mode .theme-lagom2 .changelog-section-title,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-previous__title {
  color: var(--text-heading-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-content-page__header,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-page__header {
  border-bottom-color: var(--ui-block-divider-color, var(--gray-lighter-4)) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-content-page,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference {
  color: var(--text-body-color) !important;
}

/* ─── Doc / hero cards ─── */
html.lagom-dark-mode .theme-lagom2 .console-hero,
html.lagom-dark-mode .theme-lagom2 .product-hero,
html.lagom-dark-mode .theme-lagom2 .changelog-page__header,
html.lagom-dark-mode .theme-lagom2 .search-page,
html.lagom-dark-mode .theme-lagom2 .doc-hub__card,
html.lagom-dark-mode .theme-lagom2 .product-card,
html.lagom-dark-mode .theme-lagom2 .product-content-page__card {
  background: var(--gray-faded) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-4)) !important;
  box-shadow: var(--box-shadow-xs, none);
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 .prose-docs,
html.lagom-dark-mode .theme-lagom2 .prose-docs--page,
html.lagom-dark-mode .theme-lagom2 .product-content-page__card.prose-docs {
  background: var(--gray-faded) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-4)) !important;
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 .prose-docs h1,
html.lagom-dark-mode .theme-lagom2 .prose-docs h2,
html.lagom-dark-mode .theme-lagom2 .prose-docs h3,
html.lagom-dark-mode .theme-lagom2 .prose-docs h4,
html.lagom-dark-mode .theme-lagom2 .doc-title {
  color: var(--text-heading-color);
}

html.lagom-dark-mode .theme-lagom2 .console-hero__eyebrow,
html.lagom-dark-mode .theme-lagom2 .product-hero__eyebrow,
html.lagom-dark-mode .theme-lagom2 .changelog-page__eyebrow,
html.lagom-dark-mode .theme-lagom2 .product-content-page__eyebrow {
  color: var(--brand-primary-lighter);
}

/* ─── Product hero / compatibility / pager (light boxes inside dark shell) ─── */
html.lagom-dark-mode .theme-lagom2 .product-hero__title,
html.lagom-dark-mode .theme-lagom2 .product-hero__value {
  color: var(--text-heading-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-hero__module,
html.lagom-dark-mode .theme-lagom2 .compatibility-matrix__item,
html.lagom-dark-mode .theme-lagom2 .changelog-page__signal,
html.lagom-dark-mode .theme-lagom2 .changelog-page__whmcs-link {
  background: var(--gray-lighter-4) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3)) !important;
  color: var(--text-body-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--stable {
  background: var(--dark-mode-brand-success-lighter-3, #2a412e) !important;
  border-color: color-mix(in srgb, var(--dark-mode-brand-success-lighter, #49ca52) 35%, transparent) !important;
  color: var(--dark-mode-brand-success-lighter, #49ca52) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--preview {
  background: rgba(180, 83, 9, .18) !important;
  border-color: rgba(251, 191, 36, .35) !important;
  color: #fbbf24 !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--deprecated {
  background: rgba(159, 18, 57, .18) !important;
  border-color: rgba(254, 205, 211, .25) !important;
  color: #fda4af !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--whmcs {
  background: rgba(37, 99, 235, .16) !important;
  border-color: rgba(147, 197, 253, .28) !important;
  color: #93c5fd !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--latest {
  background: rgba(109, 40, 217, .18) !important;
  border-color: rgba(196, 181, 253, .28) !important;
  color: #c4b5fd !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--updated {
  background: var(--gray-lighter-4) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3)) !important;
  color: var(--text-body-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-status__item--docs {
  background: rgba(213, 12, 12, .14) !important;
  border-color: var(--brand-primary-lighter-2) !important;
  color: var(--brand-primary-lighter) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-card__version {
  background: var(--dark-mode-brand-success-lighter-3, #2a412e) !important;
  color: var(--dark-mode-brand-success-lighter, #49ca52) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-card__tag--whmcs {
  background: rgba(37, 99, 235, .16) !important;
  color: #93c5fd !important;
}

html.lagom-dark-mode .theme-lagom2 .product-card__tag--php {
  background: rgba(109, 40, 217, .18) !important;
  color: #c4b5fd !important;
}

html.lagom-dark-mode .theme-lagom2 .left-nav::after {
  background: linear-gradient(
    to bottom,
    var(--brand-primary-lighter) 0%,
    color-mix(in srgb, var(--brand-primary-lighter) 24%, var(--gray-lighter-2)) 10%,
    var(--gray-lighter-2) 22%,
    var(--gray-lighter-2) 100%
  );
}

html.lagom-dark-mode .theme-lagom2 .prose-docs .heading-version-badge,
html.lagom-dark-mode .theme-lagom2 .prose .heading-version-badge {
  background: rgba(37, 99, 235, .18);
  color: #93c5fd;
}

html.lagom-dark-mode .theme-lagom2 .compatibility-matrix dt,
html.lagom-dark-mode .theme-lagom2 .changelog-page__signal strong {
  color: var(--text-lighter-color, var(--gray-lighter)) !important;
}

html.lagom-dark-mode .theme-lagom2 .compatibility-matrix dd,
html.lagom-dark-mode .theme-lagom2 .changelog-page__signal {
  color: var(--text-heading-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-hero__btn--secondary,
html.lagom-dark-mode .theme-lagom2 .doc-pager__link {
  background: var(--gray-lighter-4) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3)) !important;
  color: var(--text-body-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-hero__btn--secondary:hover,
html.lagom-dark-mode .theme-lagom2 .doc-pager__link:hover {
  border-color: var(--brand-primary-lighter-2) !important;
  background: var(--gray-lighter-3) !important;
}

html.lagom-dark-mode .theme-lagom2 .doc-pager__label {
  color: var(--text-lighter-color, var(--gray-lighter)) !important;
}

html.lagom-dark-mode .theme-lagom2 .doc-pager__title {
  color: var(--brand-primary-lighter) !important;
}

html.lagom-dark-mode .theme-lagom2 .doc-pager {
  border-top-color: var(--ui-block-divider-color, var(--gray-lighter-4)) !important;
}

/* ─── Changelog ─── */
html.lagom-dark-mode .theme-lagom2 .changelog-stat,
html.lagom-dark-mode .theme-lagom2 .changelog-page__signal,
html.lagom-dark-mode .theme-lagom2 .changelog-page__whmcs-link,
html.lagom-dark-mode .theme-lagom2 .product-content-page__rss {
  background: var(--gray-lighter-4) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3)) !important;
  color: var(--text-body-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-stat--live {
  background: var(--brand-primary-lighter-4) !important;
  border-color: var(--brand-primary-lighter-3) !important;
  color: var(--brand-primary-lighter) !important;
}

html.lagom-dark-mode .theme-lagom2 .product-content-page .changelog-latest,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-latest,
html.lagom-dark-mode .theme-lagom2 .changelog-accordion {
  background: var(--gray-faded) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-4)) !important;
  box-shadow: var(--box-shadow-xs, none);
}

html.lagom-dark-mode .theme-lagom2 .changelog-latest__version,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-latest__version,
html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes-header h2,
html.lagom-dark-mode .theme-lagom2 .changelog-accordion__version,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-accordion__version {
  color: var(--text-heading-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-latest__date,
html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes-header span,
html.lagom-dark-mode .theme-lagom2 .changelog-release-meta__label,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .release-readiness__notes {
  color: var(--text-lighter-color, var(--gray-lighter)) !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-release-meta__value,
html.lagom-dark-mode .theme-lagom2 .changelog-release-meta strong,
html.lagom-dark-mode .theme-lagom2 .changelog-accordion__meta strong,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-item__text,
html.lagom-dark-mode .theme-lagom2 .changelog-item__text {
  color: var(--text-body-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes,
html.lagom-dark-mode .theme-lagom2 .changelog-accordion__body,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-accordion__body {
  background: var(--gray-lighter-4) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3)) !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-item,
html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes .changelog-item {
  background: transparent !important;
  border-color: transparent !important;
}

html.lagom-dark-mode .theme-lagom2 .release-readiness__flag {
  background: var(--gray-faded) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3)) !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-item:hover,
html.lagom-dark-mode .theme-lagom2 .changelog-item:focus,
html.lagom-dark-mode .theme-lagom2 .changelog-item:focus-within,
html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes .changelog-item:hover,
html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes .changelog-item:focus,
html.lagom-dark-mode .theme-lagom2 .changelog-latest__notes .changelog-item:focus-within {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-accordion__summary {
  background: var(--gray-faded);
}

html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-accordion[open] .changelog-accordion__summary,
html.lagom-dark-mode .theme-lagom2 .changelog-page--reference .changelog-accordion[open] {
  border-color: var(--brand-primary-lighter-2) !important;
}

/* ─── Code, tables, misc ─── */
html.lagom-dark-mode .theme-lagom2 .prose-docs pre,
html.lagom-dark-mode .theme-lagom2 .prose-docs code,
html.lagom-dark-mode .theme-lagom2 pre,
html.lagom-dark-mode .theme-lagom2 code {
  background: var(--gray-lighter-4) !important;
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3));
  color: var(--text-heading-color);
}

html.lagom-dark-mode .theme-lagom2 table th {
  background: var(--gray-lighter-4);
  color: var(--text-heading-color);
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3));
}

html.lagom-dark-mode .theme-lagom2 table td {
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3));
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

html.lagom-dark-mode .theme-lagom2 blockquote {
  border-inline-start-color: var(--brand-primary);
  background: var(--brand-primary-lighter-4);
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 hr {
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3));
}

/* ─── Search modal ─── */
html.lagom-dark-mode .theme-lagom2 .search-modal__backdrop {
  background: rgba(0, 0, 0, 0.65);
}

html.lagom-dark-mode .theme-lagom2 .search-modal__panel {
  background: var(--gray-faded);
  border: 1px solid var(--ui-block-divider-color, var(--gray-lighter-4));
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 .search-modal__title,
html.lagom-dark-mode .theme-lagom2 .search-modal__label {
  color: var(--text-heading-color);
}

html.lagom-dark-mode .theme-lagom2 .search-modal__input {
  background: var(--gray-lighter-4);
  border-color: var(--ui-block-divider-color, var(--gray-lighter-3));
  color: var(--text-heading-color);
}

html.lagom-dark-mode .theme-lagom2 .search-modal__input::placeholder {
  color: var(--text-lighter-color, var(--gray-lighter));
}

html.lagom-dark-mode .theme-lagom2 .search-modal__close {
  color: var(--text-body-color);
}

html.lagom-dark-mode .theme-lagom2 ::selection {
  background: var(--brand-primary-lighter-3);
  color: var(--text-heading-color);
}

html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
  transition: none !important;
}

/* ─── Focus / interaction polish ─── */
.theme-lagom2 .left-nav__flat-link:focus-visible,
.theme-lagom2 .left-nav__switcher-trigger:focus-visible,
.theme-lagom2 .left-nav__switcher-option:focus-visible,
.theme-lagom2 .left-nav__switcher-hub:focus-visible,
.theme-lagom2 .toc-rail__link:focus-visible,
.theme-lagom2 .product-hero__btn:focus-visible,
.theme-lagom2 .doc-pager__link:focus-visible,
.theme-lagom2 .changelog-accordion__summary:focus-visible {
  outline: 2px solid var(--focus-ring, var(--brand-primary-lighter-2));
  outline-offset: 2px;
}

.theme-lagom2 .left-nav__switcher-option.is-active {
  box-shadow: inset 0 0 0 1px var(--brand-primary-lighter-2);
  font-weight: 700;
}

html.lagom-dark-mode .theme-lagom2 .left-nav__flat-link.is-active,
html.lagom-dark-mode .theme-lagom2 .left-nav__switcher-option.is-active {
  box-shadow: inset 0 0 0 1px var(--brand-primary-lighter);
}

html.lagom-dark-mode .theme-lagom2 .left-nav__label,
html.lagom-dark-mode .theme-lagom2 .doc-meta,
html.lagom-dark-mode .theme-lagom2 .doc-meta__item:not(.doc-meta__item--type),
html.lagom-dark-mode .theme-lagom2 .product-content-page__lead,
html.lagom-dark-mode .theme-lagom2 .compatibility-matrix dt {
  color: var(--text-lighter-color, var(--gray-lighter)) !important;
}

html.lagom-dark-mode .theme-lagom2 .doc-breadcrumb,
html.lagom-dark-mode .theme-lagom2 .breadcrumb,
html.lagom-dark-mode .theme-lagom2 .product-content-page,
html.lagom-dark-mode .theme-lagom2 .product-content-page--doc .product-content-page__header h1 {
  color: var(--text-heading-color) !important;
}

html.lagom-dark-mode .theme-lagom2 .toc-rail__link.is-active {
  color: var(--brand-primary-lighter);
  background: var(--brand-primary-lighter-4);
  border-radius: var(--ui-radius);
}

.theme-lagom2 .toc-rail__link.is-active {
  background: var(--brand-tint);
  border-radius: var(--ui-radius);
}

.theme-lagom2 .changelog-accordion__summary:hover {
  background: var(--surface-muted);
}

html.lagom-dark-mode .theme-lagom2 .changelog-accordion__summary:hover {
  background: var(--gray-lighter-4);
}

.theme-lagom2 .product-hero,
.theme-lagom2 .doc-pager__link {
  box-shadow: var(--shadow-sm);
}

.theme-lagom2 .doc-pager__link:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ─── Mobile doc navigation drawer ─── */
.doc-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, .55);
  cursor: pointer;
}

.doc-nav-backdrop[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  :root {
    --doc-chrome-container-gutter: 1rem;
  }

  .theme-lagom2 .doc-site-chrome__logo .logo-img {
    height: calc(var(--app-nav-logo-height, 42px) * .82);
    max-width: 11rem;
  }

  .theme-lagom2 .doc-site-chrome__menu-inner {
    gap: .5rem;
    min-height: calc(var(--doc-brand-bar-height, 4.25rem) * .82);
  }
}

@media (max-width: 768px) {
  .theme-lagom2 .doc-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .theme-lagom2 .left-nav {
    position: fixed;
    inset-block: var(--wikidoc-chrome-height, calc(var(--doc-utility-bar-height, 3rem) + var(--doc-brand-bar-height, 2.75rem))) 0;
    inset-inline-start: 0;
    z-index: 1050;
    width: min(86vw, var(--sidebar-width));
    max-width: var(--sidebar-width);
    transform: translateX(-108%);
    transition: transform 220ms ease;
    box-shadow: var(--shadow-panel);
    background: var(--card);
  }

  [dir="rtl"] .theme-lagom2 .left-nav {
    inset-inline-start: auto;
    inset-inline-end: 0;
    transform: translateX(108%);
  }

  body.theme-lagom2.doc-nav-open .left-nav {
    transform: translateX(0);
    overflow-y: auto;
    height: auto !important;
  }

  .theme-lagom2 .toc-rail {
    display: none;
  }

  .theme-lagom2 .doc-shell__content {
    padding-inline: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .theme-lagom2.lagom .app-main {
    overflow: visible !important;
    padding-top: 0 !important;
  }

  .theme-lagom2 .doc-shell {
    height: auto !important;
    overflow: visible !important;
  }

  .theme-lagom2 .doc-shell__content {
    height: auto !important;
    overflow: visible !important;
  }

  body.theme-lagom2.lagom {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}
