:root {
  --md-text-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --md-code-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --md-primary-fg-color: #026cb6;
  --md-primary-fg-color--light: #e6f2fa;
  --md-primary-fg-color--dark: #005a99;
  --md-accent-fg-color: #005a99;
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: #343a40;
  --md-default-fg-color--light: #5d6872;
  --md-typeset-a-color: #005a99;
}

.md-header {
  background: #ffffff;
  color: #343a40;
  border-bottom: 3px solid #d5d10e;
  box-shadow: 0 1px 4px rgb(35 31 32 / 8%);
}

.md-header__button,
.md-search__icon {
  color: #005a99;
}

.md-header__topic:first-child {
  font-weight: 400;
}

.md-search__form {
  background: #f1f5f7;
  color: #343a40;
}

/* Use the search control as the boundary between the header's left-aligned
   branding and right-aligned actions. */
@media screen and (min-width: 60em) {
  .md-header__inner > .md-search {
    margin-left: auto;
  }
}

.sona-header-print-link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  margin-left: 0.4rem;
  padding: 0 0.55rem;
  color: #005a99;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.25rem;
}

.sona-header-print-link:hover,
.sona-header-print-link:focus-visible {
  color: #004675;
  background: #e6f2fa;
}

.sona-header-print-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

@media screen and (max-width: 59.984375em) {
  .sona-header-print-link {
    padding: 0 0.4rem;
  }

  .sona-header-print-link span {
    display: none;
  }
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: 150px;
  min-width: 150px;
  max-height: 34px;
  object-fit: contain;
}

/* Zensical positions the sidebar wrappers as responsive layout containers.
   Their surfaces must remain theme-controlled so they do not become floating
   blocks over the navigation or page content. */
.md-sidebar--secondary:not(:has(.md-nav--secondary .md-nav__link)) {
  display: none;
}

.md-sidebar--secondary:not(:has(.md-nav--secondary .md-nav__link))
  ~ .md-content
  > .md-content__inner {
  margin-right: 0;
}

.md-typeset {
  color: #343a40;
  font-size: 16px;
  line-height: 1.65;
}

.md-typeset h1 {
  color: #231f20;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.md-typeset h2 {
  color: #231f20;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.md-typeset h3 {
  color: #231f20;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  font-size: 14.4px;
  line-height: 1.5;
}

.md-typeset table:not([class]) th {
  background: #e6f2fa;
  color: #231f20;
}

/* Keep API table keys intact on regular and printable pages. The template
   marks column meanings so this does not depend on section placement. */
.md-typeset table:has(th[data-sona-column='parameter']) :is(th, td):first-child,
.md-typeset table:has(th[data-sona-column='parameter']) :is(th, td):first-child code,
.md-typeset table:has(th[data-sona-column='error-type']) :is(th, td):nth-child(-n + 2),
.md-typeset table:has(th[data-sona-column='error-type']) :is(th, td):nth-child(-n + 2) code {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.revision-history-table table th:first-child,
.revision-history-table table td:first-child {
  width: 10.5rem;
  min-width: 10.5rem;
  white-space: nowrap;
}

.md-footer {
  background: #f6f9fb;
  color: #343a40;
  border-top: 3px solid #d5d10e;
}

.md-footer-meta {
  background: #eef4f7;
}

.md-footer a,
.md-footer-meta a {
  color: #005a99;
}

.md-nav__link--active {
  background: #e6f2fa;
  border-left: 3px solid #d5d10e;
  color: #005a99;
  font-weight: 600;
  padding-left: 0.5rem;
}

.md-typeset a:hover,
.md-nav__link:hover {
  color: #004675;
}

:focus-visible {
  outline: 3px solid #026cb6;
  outline-offset: 3px;
}

[data-sona-url-block='true'] {
  margin: 0.75rem 0 0.5rem;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: #f6f9fb;
  border: 1px solid #cbd5dc;
  border-left: 4px solid #d5d10e;
  border-radius: 0.45rem;
}

[data-sona-url='true'] {
  padding: 0;
  color: #343a40;
  font-size: 0.875rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: transparent;
  border: 0;
}

[data-url-part='scheme'] { color: #006b6b; font-weight: 700; }
[data-url-part='host'] { color: #005a99; font-weight: 700; }
[data-url-part='path'] { color: #4b5563; }
[data-url-part='function'] { color: #5b3685; font-weight: 700; }
[data-url-part='parameter'] { color: #276738; font-weight: 700; }
[data-url-part='value'] { color: #8a4300; }
[data-url-part='punctuation'] { color: #66717a; }

body.sona-print-page .md-header,
body.sona-print-page .md-sidebar,
body.sona-print-page .md-footer,
body.sona-print-page .md-top {
  display: none !important;
}

body.sona-print-page .md-main {
  padding-top: 0;
}

body.sona-print-page .md-main__inner {
  max-width: 92rem;
  margin-top: 0;
}

body.sona-print-page .md-content {
  margin: 0;
}

body.sona-print-page .md-content__inner {
  max-width: none;
  margin: 0 auto;
}

.sona-print-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 1rem 0 0;
}

.sona-print-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  color: #005a99;
  background: #ffffff;
  font: inherit;
  font-weight: 600;
  border: 1px solid #005a99;
  border-radius: 0.25rem;
  cursor: pointer;
}

.sona-print-action:hover,
.sona-print-action:focus-visible {
  color: #004675;
  background: #e6f2fa;
}

.sona-print-action svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.sona-print-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 16rem;
  padding: 2.5rem 0 3rem;
  border-bottom: 4px solid #d5d10e;
}

.sona-print-cover img {
  width: min(22rem, 75%);
  margin-bottom: 2.5rem;
}

.sona-print-cover h1 {
  margin-bottom: 0.5rem;
}

.sona-print-copyright {
  margin: 2.5rem 0 0;
  color: #5d6872;
  font-size: 0.85rem;
}

.sona-print-toc {
  padding: 2.5rem 0;
  border-bottom: 1px solid #cbd5dc;
}

.sona-print-toc ol {
  margin: 0.4rem 0 0.75rem 1.2rem;
  padding: 0;
}

.sona-print-toc__root {
  columns: 1;
}

.sona-print-toc__group {
  margin-bottom: 0.75rem;
}

.sona-print-toc__label {
  color: #231f20;
  font-weight: 700;
}

.sona-print-section {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid #dce4e9;
  scroll-margin-top: 5rem;
}

.sona-print-section > h2:first-child {
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #d5d10e;
}

.sona-print-back {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: inherit;
}

@media print {
  @page {
    size: letter;
    margin: 0.65in 0.55in 0.7in;
  }

  body.sona-print-page {
    background: #ffffff;
  }

  body.sona-print-page .headerlink {
    display: none !important;
  }

  .sona-print-actions,
  .sona-print-back {
    display: none !important;
  }

  body.sona-print-page .md-main,
  body.sona-print-page .md-main__inner,
  body.sona-print-page .md-content,
  body.sona-print-page .md-content__inner {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.sona-print-page .md-typeset {
    color: #231f20;
    font-size: 0.633rem;
    line-height: 1.45;
  }

  .sona-print-cover {
    min-height: 8.5in;
    padding: 0;
    break-after: page;
  }

  .sona-print-copyright {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 0;
    font-size: 0.633rem;
  }

  .sona-print-toc {
    padding: 0;
    border: 0;
    break-after: page;
  }

  .sona-print-toc__root {
    columns: 1;
  }

  .sona-print-section {
    padding: 0;
    border: 0;
    break-before: page;
  }

  .sona-print-section > h2:first-child {
    margin-top: 0;
  }

  .sona-print-section h2,
  .sona-print-section h3,
  .sona-print-section h4 {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  /* Keep standalone content labels with the block that follows them. */
  .sona-print-label-block {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .sona-print-section p:has(> strong:only-child) {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .sona-print-section h3[id$='--sample-input'] + p,
  .sona-print-section h3[id$='--error-codes'] + p {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .sona-print-section h3[id$='--error-codes'] + p + table {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sona-print-section h2,
  .sona-print-section h3,
  .sona-print-section h4,
  .sona-print-section tr,
  .sona-print-section [data-sona-url-block='true'] {
    break-inside: avoid;
  }

  .sona-print-section pre,
  .sona-print-section code,
  .sona-print-section [data-sona-url='true'] {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* Interactive code blocks scroll on screen. In print they should expand,
     wrap to the printable width, and paginate without scrollbars. */
  .sona-print-section .highlight,
  .sona-print-section pre,
  .sona-print-section pre > code,
  .sona-print-section [data-sona-url-block='true'] {
    width: auto;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    scrollbar-width: none;
  }

  .sona-print-section pre > code {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .sona-print-section pre > code::-webkit-scrollbar,
  .sona-print-section [data-sona-url-block='true']::-webkit-scrollbar {
    display: none;
  }

  /* Avoid leaving only one or two lines of a block on either page. */
  .sona-print-section pre,
  .sona-print-section blockquote {
    orphans: 3;
    widows: 3;
  }

  .sona-print-section table:not([class]) {
    font-size: 8.5pt;
  }
}
