/* Indigo brand palette */
:root {
  --md-primary-fg-color:        #4F00B7;   /* darkPurple — links, nav */
  --md-primary-fg-color--light: #9542FF;   /* mediumPurple */
  --md-primary-fg-color--dark:  #3a0088;
  --md-accent-fg-color:         #5C8E37;   /* mediumGreen — hover / active */
  --md-primary-bg-color:        #FFFFFF;
  --md-local-code-bg-color:     #F1F0F9;
  font-size: 1.25rem;
}

/* Wordmark sizing in header + tint to light purple for visibility on dark header */
.md-header__button.md-logo img {
  height: 36px;
  width: auto;
}

/* Bottom-align logo and site title within the header */
.md-header__button.md-logo,
.md-header__title {
  align-self: flex-end;
}

/* Shift title down so cap-height (not descender) aligns with logo bottom */
.md-header__title {
  font-size: 1.1rem;
  margin-bottom: -3px;
}

/* Site title text in header */
.md-header__title {
  color: #FFFFFF;
}

/* Back-to-site announcement bar */
.md-announce {
  background-color: #F1F0F9;  /* faintPurple */
  color: #4F00B7;
  text-align: center;
  font-size: 0.75rem;
}
.md-announce a {
  color: #4F00B7;
  text-decoration: none;
  font-weight: 500;
}
.md-announce a:hover {
  color: #5C8E37;
}

/* UI element paths (menu items, dialog names, button labels) */
.ui {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  background-color: var(--md-local-code-bg-color);
  padding: 0.05em 0.3em;
  border-radius: 3px;
  font-size: 0.875em;
}

/**/
.ref-head {
  background: rgba(0, 159, 255, 0.5);
  font-family: monospace;
  padding-left: 8px;
  width: 100%;
}

.ref-head-no-code {
  background: rgba(0, 159, 255, 0.75);
  padding-left: 8px;
  width: 100%;
}

/* Primary use is to keep long table entries from line breaking */
.nw {
  white-space: nowrap;
}

/* To simulate code block formatting */
.cb {
  font-family: monospace;
}

/* Command attribute headings*/
.ca {
  background: rgba(0, 159, 255, 0.15);
  padding: 4px 17px 4px 17px;
  font-size: .75rem;
}

/* Content links — classic blue for light mode, lighter blue for dark mode */
.md-content a:not(.md-button):not(.md-tag) {
  color: #0969da;
}
.md-content a:not(.md-button):not(.md-tag):hover {
  color: #0550ae;
}

[data-md-color-scheme="slate"] .md-content a:not(.md-button):not(.md-tag) {
  color: #58a6ff;
}
[data-md-color-scheme="slate"] .md-content a:not(.md-button):not(.md-tag):hover {
  color: #79b8ff;
}

/* DokuWiki <color> fallback spans (non-admonition inline color uses) */
.dw-color-red    { color: #CD5033; }
.dw-color-blue   { color: #4F00B7; }
.dw-color-green  { color: #3B6C35; }
.dw-color-purple { color: #9542FF; }
.dw-color-orange { color: #e07b00; }

/* Expand content into the right-sidebar space (toc.integrate leaves it empty) */
@media screen and (min-width: 76.25em) {
  .md-content {
    max-width: none;
  }
}

/* TOC-only headings — visible in TOC, hidden in page body */
.hidden-toc { display: none; }

/* Active nav and TOC indicators — light mode */
.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  color: #0969da !important;
}
.md-nav__link--active::before,
.md-nav__item--active > .md-nav__link::before {
  background-color: #0969da !important;
}

/* Active nav and TOC indicators — dark mode */
[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__item--active > .md-nav__link {
  color: #0550ae !important;
}
[data-md-color-scheme="slate"] .md-nav__link--active::before,
[data-md-color-scheme="slate"] .md-nav__item--active > .md-nav__link::before {
  background-color: #0550ae !important;
}

/* ---------------------------------------------------------------------------
 * API version badge
 *
 * Marks the API version a symbol arrived in. Sits inline at the start of the
 * first line of body text under the symbol's heading, rather than in the heading
 * itself: putting it in the heading pollutes the auto-generated anchor slug and
 * the TOC label, each of which then needs an explicit override on every heading.
 *
 * Colors are drawn from the two classes already used on these reference pages,
 * so the badge reads as part of the same system: the fill is `.ca`'s background,
 * and the border and text are `.ref-head-no-code`'s background.
 * ------------------------------------------------------------------------- */
.api-badge,
.release-badge {
  display: inline-block;
  background: rgba(0, 159, 255, 0.15);
  border: 1px solid rgba(0, 159, 255, 0.75);
  border-radius: 1em;
  padding: 0 0.5em;
  margin-right: 0.4em;
  /* Measured, not guessed: at 16px/25.6px body text this renders 15.5px tall,
   * so the pill sits inside the line box instead of overflowing it. Raising the
   * font size or line-height pushes it past 25.6px, and the rounded bottom edge
   * is then clipped by the line box. */
  font-size: 0.58rem;
  line-height: 1.25;
  vertical-align: middle;
  white-space: nowrap;
}

.api-badge {
  /* Darker than the border deliberately: the border can be the brand blue at
   * 0.75, but text at that value is only ~2.6:1 against the page and this text
   * is 11.6px. This blue is the same hue at ~4.6:1. */
  color: #0069ad;
}

[data-md-color-scheme="slate"] .api-badge {
  color: #58a6ff;
}

/* ---------------------------------------------------------------------------
 * .release-badge — "new in this Indigo release". Shares .api-badge's geometry
 * (the rule above covers both) and differs in hue, because the two make
 * different claims: one is "you need API vX to call this", the other is "this
 * feature arrived in this release". They were conflated once already, when the
 * API pill was used as a new-in-release marker on six user-facing passages that
 * are not API at all — see planning/done/new-in-release-indicator.md.
 *
 * The hue is `.dw-color-green`'s #5C8E37 for the border and text, so it is a
 * green already in the palette. The fill is a brighter, lighter green of the
 * same hue: #5C8E37 at 0.15 composites to #E7EEE1 on white, which next to the
 * API pill's #D9F1FF reads grey rather than green. rgb(116, 204, 51) at the
 * same 0.15 gives #EAF7E0, which carries the hue at the same weight the blue
 * pill carries its own.
 *
 * Text contrast is measured against the API pill's register (5.79:1 light,
 * 6.25:1 slate) rather than the 4.5:1 floor, so neither pill looks weaker than
 * the other: #456E29 is 5.97:1 on white, #6fbf73 is 7.05:1 on slate.
 *
 * Unlinked, unlike .api-badge: the API pill points at the API release notes,
 * and the docs carry no equivalent link for an Indigo release. If one is ever
 * added, the inner-anchor rule below covers .api-badge only, so a link here
 * would need adding to it.
 * ------------------------------------------------------------------------- */
.release-badge {
  background: rgba(116, 204, 51, 0.15);
  border: 1px solid rgba(92, 142, 55, 0.75);
  color: #456E29;
}

[data-md-color-scheme="slate"] .release-badge {
  color: #6fbf73;
}

/* Nav entries for pages new in this release — the nav-side companion to
 * .release-badge, same greens. hooks/new_in_release.py emits the selectors from
 * `new_in:` front matter and references this variable, so the page list lives
 * with the pages and the design lives here. */
:root {
  --new-page-fg: #456E29;
}

[data-md-color-scheme="slate"] {
  --new-page-fg: #6fbf73;
}

.api-badge a,
.md-content .api-badge a:not(.md-button):not(.md-tag) {
  color: inherit;
  border-bottom: none;
}
