body {
  padding-top: var(--header-height);
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-base);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  padding: 0 24px;
  background: var(--surface-page);
  border-bottom: var(--stroke) solid var(--border-layout);
  color: var(--text-body);
  font: var(--navigate-1);
  z-index: 21;
}

.navbar-logo {
  display: flex;
  flex: none;
}

.navbar-logo img,
.footer-brand img {
  display: block;
}

.navbar-logo img.logo-dark,
.footer-brand img.logo-dark,
:root[data-theme="dark"] .navbar-logo img.logo-light,
:root[data-theme="dark"] .footer-brand img.logo-light {
  display: none;
}

:root[data-theme="dark"] .navbar-logo img.logo-dark,
:root[data-theme="dark"] .footer-brand img.logo-dark {
  display: block;
}

.navbar-links {
  display: flex;
  gap: 20px;
  margin-left: 8px;
  margin-right: auto;
  white-space: nowrap;
}

.navbar-links a {
  color: var(--nav-link);
}

.navbar-links a:hover {
  color: var(--nav-link-hover);
  text-decoration: underline;
}

.navbar-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
}

.navbar-search {
  flex: none;
}

.theme-toggle {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  padding: 0;
  background: var(--surface-header-control);
  border: var(--stroke) solid var(--border-subtle);
  border-radius: var(--radius-block);
  color: var(--text-secondary);
  cursor: pointer;
}

.theme-toggle::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url(../img/icon-sun.svg) center / 14.93px 14.93px no-repeat;
  mask: url(../img/icon-sun.svg) center / 14.93px 14.93px no-repeat;
}

:root[data-theme="dark"] .theme-toggle::before {
  -webkit-mask: url(../img/icon-moon.svg) center / 13.6px 13.6px no-repeat;
  mask: url(../img/icon-moon.svg) center / 13.6px 13.6px no-repeat;
}

.theme-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 4px 8px;
  background: var(--overlay-80);
  border-radius: var(--radius-inline);
  color: var(--text-inverse);
  font: var(--weight-regular) 12px/1.5 var(--font-base);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  color: var(--link-hover);
}

.theme-toggle:hover::after {
  opacity: 1;
}

.theme-toggle:focus-visible {
  border: 2px solid var(--focus-ring);
  outline: none;
}

.back-to-top {
  display: none;
}

@media screen and (min-width: 1024px) {
  .back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--surface-header-control);
    border: var(--stroke) solid var(--border-subtle);
    border-radius: var(--radius-block);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease-out, visibility .25s;
  }

  .back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .back-to-top::before {
    content: "";
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url(../img/icon-arrow-up.svg) center / 13px 14px no-repeat;
    mask: url(../img/icon-arrow-up.svg) center / 13px 14px no-repeat;
  }

  .back-to-top::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: calc(100% + 8px);
    padding: 4px 8px;
    background: var(--overlay-80);
    border-radius: var(--radius-inline);
    color: var(--text-inverse);
    font: var(--weight-regular) 12px/1.5 var(--font-base);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
  }

  .back-to-top:hover {
    background: var(--orange-25);
    border-color: var(--border-hover);
    color: var(--link-hover);
  }

  :root[data-theme="dark"] .back-to-top:hover {
    background: var(--surface-header-control);
  }

  .back-to-top:hover::after {
    opacity: 1;
  }

  .back-to-top:focus-visible {
    border: 2px solid var(--focus-ring);
    outline: none;
  }
}

:root[data-theme="dark"],
:root[data-theme="dark"] body * {
  scrollbar-color: var(--grey-700) transparent;
}

:root[data-theme="dark"]::-webkit-scrollbar {
  background-color: var(--grey-900);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background-color: var(--grey-700);
}

#search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 200px;
  padding: 4px 8px;
  background: var(--surface-header-control);
  border: var(--stroke) solid var(--border-subtle);
  border-radius: var(--radius-block);
  color: var(--text-secondary);
}

#search-field::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url(../img/icon-search.svg) center / 16px 16px no-repeat;
  mask: url(../img/icon-search.svg) center / 16px 16px no-repeat;
}

#search-field:hover {
  border-color: var(--border-hover);
  color: var(--text-heading);
}

#search-field:focus-within {
  border-color: var(--border-accent);
  color: var(--text-heading);
}

#search-field > #search-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-heading);
  font: var(--control);
}

#search-input::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

#search-field:hover #search-input::placeholder,
#search-field:focus-within #search-input::placeholder {
  color: var(--text-heading);
}

.nav-container {
  top: var(--header-height);
  border-right: var(--stroke) solid var(--border-layout);
  font: var(--navigate-1);
  line-height: var(--nav-row-height);
}

.nav {
  top: var(--toolbar-height);
  height: calc(100vh - var(--header-height) - var(--toolbar-height));
  background: var(--surface-page);
  color: var(--nav-link);
}

.nav-panel-explore {
  position: static;
  flex: none;
  padding: calc(var(--nav-reference-gap) * 1.25 - var(--nav-text-space-top)) 24px calc(var(--nav-reference-gap) * 1.25 - var(--nav-text-space-bottom));
  background: transparent;
}

.nav-panel-explore .context {
  justify-content: flex-start;
  align-items: flex-start;
  height: auto;
  padding: 0;
  box-shadow: none;
  color: var(--nav-link-active);
  font: inherit;
  cursor: pointer;
}

.nav-panel-explore .context .version {
  display: none;
}

.nav-panel-explore .context::before,
.nav-item-toggle {
  flex: none;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url(../img/icon-select.svg) center / 4.64px 7.52px no-repeat;
  mask: url(../img/icon-select.svg) center / 4.64px 7.52px no-repeat;
  transform: rotate(90deg);
}

.nav-panel-explore .context::before {
  content: "";
  width: 10px;
  margin-right: 6px;
}

.nav-panel-explore.is-active .context::before {
  transform: rotate(-90deg);
}

.nav-panel-explore .context:hover,
.nav-panel-explore .context:hover::before {
  color: var(--nav-link-hover);
}

.nav-panel-explore .context:hover .title {
  text-decoration: underline;
}

.nav-panel-explore .components {
  flex: none;
  max-height: none;
  margin: 10px 0 0;
  padding: 0 0 0 16px;
  background: transparent;
  box-shadow: none;
  line-height: inherit;
  overflow: visible;
}

.nav-panel-explore .component + .component {
  margin-top: 10px;
}

.nav-panel-explore .context .title {
  font-size: var(--nav-font-size);
  font-weight: var(--weight-regular);
}

.nav-container[data-component] .nav-panel-explore .context .title {
  position: relative;
  margin-right: -8px;
  padding-left: 26px;
}

.nav-container[data-component] .nav-panel-explore .context .title::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--product-icon) center / 20px 20px no-repeat;
  mask: var(--product-icon) center / 20px 20px no-repeat;
}

.nav-container[data-component="adc"] .nav-panel-explore .context .title::before,
.nav-container[data-component="spc"] .nav-panel-explore .context .title::before {
  top: 4px;
}

.nav-container[data-component="adc"] .nav-panel-explore .context::before,
.nav-container[data-component="spc"] .nav-panel-explore .context::before {
  margin-top: 3px;
}

.nav-container[data-component="application_protection"] {
  --product-icon: url(../img/icon-product-application-protection.svg);
}

.nav-container[data-component="network_protection"] {
  --product-icon: url(../img/icon-product-network-protection.svg);
}

.nav-container[data-component="dns_hosting"] {
  --product-icon: url(../img/icon-product-dns-hosting.svg);
}

.nav-container[data-component="digital_fraud_protection"] {
  --product-icon: url(../img/icon-product-fraud-protection.svg);
}

.nav-container[data-component="general_info"] {
  --product-icon: url(../img/icon-product-workspace.svg);
}

.nav-container[data-component="adc"] {
  --product-icon: url(../img/icon-product-adc.svg);
}

.nav-container[data-component="spc"] {
  --product-icon: url(../img/icon-product-captcha.svg);
}

.nav-container[data-component="po"] {
  --product-icon: url(../img/icon-product-software.svg);
}

.nav-panel-explore .component:last-child {
  margin-bottom: 0;
}

.nav-panel-explore .component .title {
  font-size: calc(var(--nav-font-size) - var(--nav-font-step));
  font-weight: var(--weight-regular);
  text-indent: 0;
}

.nav-panel-explore .component a:hover {
  color: var(--nav-link-hover);
  text-decoration: underline;
}

.nav-panel-explore .component.is-current a {
  color: var(--nav-link-active);
}

.nav-panel-menu {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow-y: auto;
}

.nav-panel-menu:not(.is-active)::after {
  display: none;
}

.nav-panel-menu:not(.is-active) .nav-menu {
  opacity: 1;
}

.aside-divider {
  flex: none;
  height: var(--stroke);
  margin: 0 24px;
  background: var(--border-layout);
}

.nav-menu {
  padding: calc(var(--nav-reference-gap) * 1.5 - var(--nav-text-space-top)) 24px 24px;
  line-height: inherit;
}

.nav-list {
  margin: 0;
}

.nav-list .nav-list {
  margin: var(--nav-item-gap) 0 0 12px;
}

.nav-menu > .nav-list + .nav-list {
  margin-top: var(--nav-item-gap);
}

.nav-item-toggle ~ .nav-list {
  padding-bottom: 0;
}

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

.nav-item + .nav-item {
  margin-top: var(--nav-item-gap);
}

.nav-link,
.nav-text {
  display: block;
  margin-left: 22px;
}

.nav-item-toggle {
  position: absolute;
  margin: 0;
  color: var(--text-secondary);
}

.nav-item.is-active > .nav-item-toggle {
  transform: rotate(-90deg);
}

.nav-item.is-current-path > .nav-item-toggle,
.nav-item.is-current-path > .nav-link,
.nav-item.is-current-path > .nav-text,
.nav-item.is-current-page > .nav-link {
  color: var(--nav-link-active);
}

.nav-item.is-current-page > .nav-link,
.nav-item.is-current-page > .nav-text {
  font-weight: var(--weight-regular);
}

.nav-item > .nav-item-toggle:hover,
.nav-item > .nav-link:hover,
.nav-item > .nav-item-toggle + .nav-text:hover {
  color: var(--nav-link-hover);
}

.nav-item > .nav-link:hover,
.nav-item > .nav-item-toggle + .nav-text:hover {
  text-decoration: underline;
}

.toolbar {
  top: var(--header-height);
  height: var(--toolbar-height);
  padding: 0 40px;
  background: var(--surface-page);
  box-shadow: none;
  color: var(--text-body);
  font: var(--navigate-1);
  z-index: 20;
}

.toolbar a {
  color: var(--text-secondary);
}

.breadcrumbs {
  padding: 0;
  line-height: inherit;
}

.breadcrumbs ul {
  align-items: center;
  gap: 4px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-annotation);
}

.breadcrumbs li::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  padding: 0;
  background: var(--icon-muted);
  -webkit-mask: url(../img/icon-arrow.svg) center / 4.71px 9px no-repeat;
  mask: url(../img/icon-arrow.svg) center / 4.71px 9px no-repeat;
}

.breadcrumbs li:last-of-type::after {
  content: none;
}

.breadcrumbs li:last-of-type a {
  color: var(--nav-link-active);
}

.breadcrumbs a:hover,
.breadcrumbs li:last-of-type a:hover {
  color: var(--nav-link-hover);
  text-decoration: underline;
}

main > .content {
  justify-content: center;
}

.toc.sidebar .toc-menu {
  display: flex;
  flex-direction: column;
  top: calc(var(--header-height) + var(--toolbar-occupied-height));
  margin-right: 0;
  padding-top: 40px;
  max-height: var(--toc-available-height, calc(100vh - var(--header-height) - var(--toolbar-occupied-height)));
}

.toc.sidebar .toc-page-title {
  flex: none;
  /* Reserve the title's space while the article heading is still visible. */
  visibility: hidden;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font: 400 var(--nav-font-size)/1.5 var(--font-base);
  overflow-wrap: anywhere;
}

.toc.sidebar .toc-page-title.is-visible {
  visibility: visible;
}

.toc.embedded .toc-page-title {
  display: none;
}

.toc.sidebar .toc-menu h3 {
  display: none;
}

.toc .toc-menu ul {
  font: var(--navigate-2);
}

.toc.sidebar .toc-menu ul {
  /* Keep the active-link scroll offsets local to the list below the title. */
  position: relative;
  min-height: 0;
  max-height: none;
  /* The final row and its rail stop above the edge only at the end of the list. */
  padding-bottom: 24px;
}

.toc .toc-menu a {
  padding: 6px 0 6px 20px;
  border-left: var(--stroke) solid var(--border-subtle);
  color: var(--text-secondary);
}

.toc .toc-menu li[data-level="2"] a {
  padding-left: 36px;
}

.toc .toc-menu li[data-level="3"] a {
  padding-left: 52px;
}

.toc .toc-menu a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.toc .toc-menu a.is-active {
  border-left-color: var(--nav-link-active);
  color: var(--text-secondary);
}

.sidebar.toc .toc-menu a:focus {
  background: transparent;
}

nav.pagination {
  justify-content: space-between;
  gap: 24px;
  margin: 40px 0 0;
  padding: 40px 0 0;
  border-top: var(--stroke) solid var(--border-strong);
  line-height: 1.4;
}

nav.pagination .pagination-link {
  display: block;
  flex: 0 1 calc(50% - 12px);
  min-width: 0;
  padding: 16px;
  background: var(--tint-teal-5);
  border-radius: var(--radius-block);
  color: var(--link);
  font-weight: var(--weight-regular);
  text-decoration: none;
}

nav.pagination .pagination-link:only-child:has(.next) {
  margin-left: auto;
}

nav.pagination .pagination-link:hover {
  background: var(--tint-orange-5);
  color: var(--link-hover);
  text-decoration: none;
}

nav.pagination .pagination-buttons {
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  font: var(--link-card);
}

nav.pagination .next {
  align-items: flex-end;
}

nav.pagination .pagination-buttons::before {
  padding: 0;
  color: var(--text-annotation);
  font: var(--caption);
}

nav.pagination .pagination-buttons-inner {
  display: block;
  text-decoration: underline;
  text-underline-position: from-font;
}

nav.pagination .prev .pagination-buttons-inner::before,
nav.pagination .next .pagination-buttons-inner::after {
  display: inline-block;
  padding: 0;
  color: inherit;
  font: inherit;
  white-space: pre;
}

nav.pagination .prev .pagination-buttons-inner::before {
  content: "← ";
}

nav.pagination .next .pagination-buttons-inner::after {
  content: " →";
}

footer.footer {
  position: relative;
  z-index: 2;
  padding: 80px 24px;
  background: var(--surface-footer);
  color: var(--text-body);
  font: var(--footer-text);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  max-width: 896px;
  margin: 0 auto;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-title {
  color: var(--footer-title-color);
  font: var(--footer-title);
}

.footer-list {
  color: var(--footer-text-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 8px;
  list-style: none;
}

.footer a {
  color: inherit;
}

.footer a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand img {
  display: block;
}

.footer-copyright {
  font: var(--body);
}

@media screen and (min-width: 1024px) {
  .toolbar {
    position: static;
    height: auto;
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 0;
  }

  .nav-container {
    width: var(--nav-width);
    margin-bottom: calc(-1 * var(--footer-height, 272px));
    opacity: var(--reading-opacity, 1);
    transition: opacity .25s ease-out;
  }

  .breadcrumbs {
    /* Match the article's auto margins, including its reserved TOC column. */
    margin-left: max(0px, calc((100% - var(--article-width) - var(--toc-width)) / 2));
    max-width: min(var(--article-width), calc(100% - var(--toc-width)));
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .toc.sidebar .toc-menu {
    padding-top: calc(var(--page-lead-gap) * 1.75);
  }

  .nav {
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
  }

  .nav-menu {
    padding-left: 32px;
    padding-bottom: calc(24px + var(--footer-height, 272px));
  }

  .nav-panel-explore {
    padding-left: 32px;
  }

  .aside-divider {
    margin-left: 32px;
  }

  .nav-panel-explore .context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0;
  }

  .nav-panel-explore .context::before {
    order: 1;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    width: 22px;
    margin-right: var(--nav-toggle-margin, 0px);
    margin-left: 0;
  }

  .nav-container[data-component] .nav-panel-explore .context .title {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin-right: 0;
    /* The trailing caret uses the panel's outer padding, not the title's width. */
    padding-right: 0;
  }

  .nav-container[data-component="application_protection"] .nav-panel-explore .context .title {
    /* Keep this product name intact instead of relying on available line width. */
    width: max-content;
    white-space: nowrap;
  }

  .nav-panel-explore .components {
    padding-left: 0;
  }

  .nav-menu .nav-link,
  .nav-menu .nav-text {
    /* Match the 16px shift from moving the product's leading caret. */
    margin-left: 6px;
    padding-right: 24px;
  }

  .nav-item[data-depth="2"] {
    font-size: calc(var(--nav-font-size) - var(--nav-font-step));
  }

  .nav-item[data-depth="3"] {
    font-size: calc(var(--nav-font-size) - var(--nav-font-step) * 2);
  }

  .nav-item[data-depth="4"] {
    font-size: calc(var(--nav-font-size) - var(--nav-font-step) * 3);
  }

  .nav-menu .nav-item:has(> .nav-item-toggle) {
    /* Keep the DOM order used by the toggle handler; place the arrow visually last. */
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0;
  }

  .nav-menu .nav-item > .nav-item-toggle {
    position: static;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    margin-right: var(--nav-toggle-margin, 0px);
  }

  .nav-menu .nav-item-toggle + .nav-link,
  .nav-menu .nav-item-toggle + .nav-text {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .nav-menu .nav-item-toggle ~ .nav-list {
    grid-column: 1 / -1;
  }

  .nav-item.is-current-page > .nav-link,
  .nav-item.is-current-page > .nav-text {
    position: relative;
    isolation: isolate;
  }

  .nav-item.is-current-page > .nav-link::before,
  .nav-item.is-current-page > .nav-text::before {
    content: "";
    position: absolute;
    /* Align right edges across levels; nested text keeps at least 14px of space. */
    inset: -5px var(--nav-active-right-inset, 0px) -5px -14px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--nav-link-active) 10%, var(--surface-page));
    z-index: -1;
    pointer-events: none;
  }

  .nav-container.is-reading-muted {
    border-right-color: transparent;
  }

  .nav-container.is-reading-muted .nav-item.is-current-page > .nav-link::before,
  .nav-container.is-reading-muted .nav-item.is-current-page > .nav-text::before {
    /* Hide the active article's highlight at minimum reading opacity. */
    background: transparent;
  }

  .doc {
    max-width: calc(var(--article-width) + 80px);
    margin: 0 auto;
    padding-right: 40px;
    padding-left: 40px;
  }

  .doc:only-child {
    max-width: calc(var(--article-width) + 80px + var(--toc-width));
    padding-right: calc(40px + var(--toc-width));
  }

  aside.toc.sidebar {
    flex: 0 0 var(--toc-width);
    padding-right: 24px;
    opacity: var(--reading-opacity, 1);
    transition: opacity .25s ease-out;
  }
}

@media screen and (max-width: 1023.5px) {
  :root {
    --toolbar-height: 40px;
    --toolbar-occupied-height: var(--toolbar-height);
  }

  .toolbar {
    padding: 0;
  }

  .nav-container {
    z-index: 19;
  }
}

@media screen and (max-width: 768px) {
  .navbar {
    gap: 16px;
    padding: 0 16px;
  }

  .navbar-links {
    display: none;
  }

  #search-field {
    width: 160px;
  }

  nav.pagination {
    flex-direction: column;
  }

  nav.pagination .pagination-link {
    flex: none;
  }

  footer.footer {
    padding: 40px 16px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
