:root {
  --help-article-nav-text: #646973;
  --help-article-nav-child: #70747e;
  --help-article-nav-title: #70747e;
  --help-article-nav-line: #e3e4e8;
  --help-article-nav-hover: var(--help-sidebar-hover, #f4f4f5);
  --help-article-nav-active: #e0f2fe;
  --help-article-nav-active-text: #026aa2;
}

/* Articles end with their content, without previous/next article links. */
.g-root .dc-doc-page__toc-nav-panel {
  display: none;
}

/* Keep the outer navigation at the same fixed inset as the home panel. */
.g-root .dc-doc-layout.dc-doc-page {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

/* Use the full viewport in reading mode, with the usual fixed page gutters. */
.g-root .dc-doc-page.dc-doc-page_full-screen .dc-doc-page__main {
  padding-inline: var(--help-page-gutter) !important;
}

.g-root .dc-doc-page.dc-doc-page_full-screen .dc-doc-page__body.yfm > :is(p, ul, ol, blockquote) {
  max-width: none;
}

/* Keep actions above the article instead of over the expanded content. */
.g-root .dc-doc-page.dc-doc-page_full-screen .dc-doc-page__controls {
  display: flex;
  position: static;
  justify-content: flex-end;
  width: auto;
  height: auto;
  margin: 20px var(--help-page-gutter) 0;
  padding: 0;
}

.g-root .dc-doc-page.dc-doc-page_full-screen .dc-doc-page__controls > .dc-controls {
  position: static;
  flex-direction: row;
  justify-content: flex-end;
}

.g-root .dc-doc-page.dc-doc-page_full-screen .dc-controls__control {
  margin: 0;
}

@media (min-width: 769px) {
  .g-root .dc-doc-layout__right:not(.dc-doc-layout__right_full-screen) {
    padding-inline-end: var(--help-page-gutter);
  }
}

@media (max-width: 768px) {
  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__main {
    padding-inline: var(--help-page-gutter);
  }
}

.g-root_theme_dark {
  --help-article-nav-text: #cfd1d4;
  --help-article-nav-child: #b7babf;
  --help-article-nav-title: #b7babf;
  --help-article-nav-line: #404653;
  --help-article-nav-hover: var(--help-sidebar-hover, #404653);
  --help-article-nav-active: rgb(11 165 236 / 20%);
  --help-article-nav-active-text: #7cd4fd;
}

.g-root .dc-mini-toc {
  padding: 0;
  font-family: var(--help-font-family);
}

.g-root .dc-mini-toc .dc-mini-toc__title {
  margin: 0 0 12px;
  color: var(--help-article-nav-title);
  font: 600 var(--help-caption-size)/var(--help-caption-line) var(--help-font-family);
  letter-spacing: normal;
  text-transform: none;
}

.g-root .dc-mini-toc .dc-mini-toc__sections {
  margin: 0;
  padding: 0;
  border: 0;
  /* Draw the rail inside the list so the active link can cover it exactly. */
  box-shadow: inset 2px 0 0 var(--help-article-nav-line);
  min-height: 0;
}

.g-root .dc-mini-toc .dc-mini-toc__section {
  margin: 0 0 2px;
  padding: 0;
}

.g-root .dc-mini-toc .dc-mini-toc__section > .dc-mini-toc__section-link {
  display: block;
  box-sizing: border-box;
  min-height: 28px;
  margin-inline-start: 0;
  padding: 4px 12px 4px 16px;
  border: 0;
  border-inline-start: 2px solid transparent;
  /* Keep hover and active backgrounds clear of the 2px navigation rail. */
  background-clip: padding-box;
  border-radius: 0 6px 6px 0;
  color: var(--help-article-nav-text);
  font: 400 var(--help-nav-size)/var(--help-nav-line) var(--help-font-family);
  text-decoration: none;
  overflow-wrap: break-word;
}

.g-root .dc-mini-toc .dc-mini-toc__section_child > .dc-mini-toc__section-link {
  padding-inline-start: 28px;
  color: var(--help-article-nav-child);
  font-weight: 400;
}

.g-root .dc-mini-toc .dc-mini-toc__section > .dc-mini-toc__section-link:hover {
  background-color: var(--help-article-nav-hover);
}

.g-root .dc-mini-toc .dc-mini-toc__section_active > .dc-mini-toc__section-link {
  border-inline-start-color: var(--docs-primary);
  background-color: var(--help-article-nav-active);
  color: var(--help-article-nav-active-text);
  font-weight: 600;
}

.g-root .dc-mini-toc .dc-mini-toc__section > .dc-mini-toc__section-link:focus-visible {
  outline: 2px solid var(--docs-primary);
  outline-offset: -2px;
}

.g-root .dc-mini-toc .dc-mini-toc__bottom {
  display: none;
}

/* The font button opens only Diplodoc's native text-size selector. */
.g-root .dc-settings-control__list .g-list__item:not(:has(.dc-settings-control__text-size-control)) {
  display: none;
}

.g-root .dc-settings-control__list .g-list__items,
.g-root .dc-settings-control__list .g-list__items > div > div,
.g-root .dc-settings-control__list [role="list"] {
  height: calc(var(--help-button-height) + 16px) !important;
  overflow: hidden !important;
}

.g-root .dc-settings-control__list .g-list__item:has(.dc-settings-control__text-size-control) {
  top: 0 !important;
}

.help-switching-theme .g-popup:has(.dc-settings-control__popup) {
  visibility: hidden;
  pointer-events: none;
}

.g-root .dc-doc-page__controls > .dc-controls {
  gap: 4px;
  flex-wrap: wrap;
}

.g-root .dc-doc-page__controls .dc-controls > :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  flex: none;
}

.g-root .dc-doc-page__controls .g-button__icon,
.g-root .dc-doc-page__controls .g-button__icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.help-reading-control {
  --help-control-icon: url("/brand/reading-mode.svg?v=5196-74889");
}

.help-reading-control[aria-pressed="true"] {
  --help-control-icon: url("/brand/reading-mode-exit.svg?v=5196-74904");
}

.help-font-control {
  --help-control-icon: url("/brand/font-size.svg?v=5196-74301");
}

.help-copy-control {
  --help-control-icon: url("/brand/link.svg?v=895-82336");
}

.help-markdown-control {
  --help-control-icon: url("/brand/markdown-file.svg");
  text-decoration: none;
}

.help-suggestion-control {
  --help-control-icon: url("/brand/suggestion.svg");
}

.g-root .help-suggestion-control:disabled {
  color: var(--g-color-text-hint);
  cursor: not-allowed;
}

.help-print-control {
  --help-control-icon: url("/brand/printer.svg");
}

.help-theme-control {
  --help-control-icon: url("/brand/theme-moon.svg");
}

.g-root_theme_dark .help-theme-control {
  --help-control-icon: url("/brand/theme-sun.svg");
}

.help-reading-control .g-button__icon svg,
.help-font-control .g-button__icon svg {
  display: none;
}

.help-reading-control .g-button__icon-inner::before,
.help-font-control .g-button__icon-inner::before,
.dc-doc-page__controls .help-control-icon {
  content: "";
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: var(--help-control-icon) center / contain no-repeat;
}

.g-root .dc-doc-page__controls :is(button, a):focus-visible {
  outline: 2px solid var(--docs-primary);
  outline-offset: 1px;
}

.g-root .dc-back-to-top {
  --g-button-border-radius: 50%;
  --g-button-background-color: var(--help-article-nav-active);
  --g-button-background-color-hover: var(--help-article-nav-active);
  --g-button-text-color: var(--help-article-nav-active-text);
  --g-button-text-color-hover: var(--help-article-nav-active-text);
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--help-article-nav-active-text);
  align-items: center;
  justify-content: center;
}

.g-root .dc-back-to-top .g-button__icon svg {
  display: none;
}

.g-root .dc-back-to-top .g-button__icon-inner::before {
  content: "";
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: url("/brand/chevron-up.svg") center / 20px 20px no-repeat;
}

/* The custom header has no secondary navigation row above the article. */
@media (min-width: 769px) {
  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__aside {
    top: var(--dc-header-height, var(--header-height));
    padding-top: calc(20px + var(--help-actions-height, 32px) + 12px);
    max-height: calc(100vh - var(--dc-header-height, var(--header-height)));
  }

  /* Anchor the fixed controls to the page's right gutter, rather than the
     zero-width placeholder at the edge of the article's center column. */
  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__controls > .dc-controls {
    top: calc(var(--dc-header-height, var(--header-height)) + 20px);
    left: var(--help-actions-left, auto);
    right: var(--help-page-gutter);
    width: var(--help-actions-width, 260px);
    justify-content: flex-start;
  }

  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-mini-toc__title {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 0;
    padding-inline-end: 0;
  }

  .g-root .dc-back-to-top {
    top: auto;
    left: var(--help-back-to-top-left, calc(100% - 172px));
    right: auto;
    bottom: 24px;
  }

  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__aside .dc-mini-toc {
    max-height: calc(100vh - var(--dc-header-height, var(--header-height)) - var(--help-actions-height, 32px) - 52px);
  }
}

@media (min-width: 1280px) {
  .g-root .dc-doc-layout__right:not(.dc-doc-layout__right_full-screen):not(.dc-doc-layout__right_hidden-right),
  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__aside {
    width: 260px;
  }
}

.help-action-status,
.help-clipboard-field {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.g-root .help-copy-control_copied { color: var(--docs-primary); }

/* Keep the same actions available when the right outline becomes a mobile panel. */
@media screen and (max-width: 768px) {
  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__controls {
    display: flex;
    width: auto;
    height: auto;
    padding: 16px var(--help-page-gutter) 0;
  }

  .g-root .dc-doc-page:not(.dc-doc-page_full-screen) .dc-doc-page__controls > .dc-controls {
    position: static;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
  }
}

/* One accessible tooltip for all article actions, above popovers and outside clipping. */
.g-root .dc-control__tooltip { display: none !important; }

.help-action-tooltip {
  position: fixed;
  z-index: 10000;
  box-sizing: border-box;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  border-radius: 6px;
  background: #1f2737;
  color: #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 16%);
  font: 400 13px/18px var(--help-font-family);
  text-align: center;
  overflow-wrap: break-word;
}

.help-action-tooltip[hidden] { display: none; }

.g-root_theme_dark .help-action-tooltip {
  background: #ecedee;
  color: #1f2737;
}


/* Release navigation is provided by the sidebar, without bottom page switches. */
.g-root[data-wiki-section="release-notes"] .dc-nav-toc-panel {
  display: none;
}

/* Keep the columns aligned across the dated report tables. */
@media screen and (min-width: 769px) {
  .g-root .dc-doc-page__body.yfm table.system-reports-table {
    display: table;
    inline-size: 100%;
    table-layout: fixed;
  }

  .g-root .yfm .system-reports-table :is(th, td) {
    padding-inline: 12px;
    overflow-wrap: anywhere;
  }

  .g-root .yfm .system-reports-table th:nth-child(1) {
    inline-size: 25%;
  }

  .g-root .yfm .system-reports-table th:nth-child(2) {
    inline-size: 27%;
  }
}
