/* The Apinx wordmark in the header: APINX in capitals, NX in the brand
   orange, in both the light and the dark scheme. The site name stays in
   the page for search and screen readers; only its look is replaced. */
.md-header__topic:first-child .md-ellipsis {
  font-size: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.md-header__topic:first-child .md-ellipsis::before,
.md-header__topic:first-child .md-ellipsis::after {
  font-size: 0.9rem;
}
.md-header__topic:first-child .md-ellipsis::before {
  content: "API";
}
.md-header__topic:first-child .md-ellipsis::after {
  content: "NX";
  color: #ff6b35;
}

/* The brand's ink and orange instead of Material's defaults. */
:root,
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0a0a0a;
  --md-primary-fg-color--light: #1c1c1c;
  --md-primary-fg-color--dark: #000000;
  --md-accent-fg-color: #ff6b35;
}
[data-md-color-scheme="default"] {
  --md-typeset-a-color: #c2410c;
}
[data-md-color-scheme="slate"] {
  --md-typeset-a-color: #ff8457;
}

/* ── Page furniture added by website/hooks.py ──────────────────────────── */

/* Tokens for the diagrams, the badges and the landing page, per scheme. */
[data-md-color-scheme="default"] {
  --apx-d-ink: #16181d;
  --apx-d-muted: #5b616e;
  --apx-d-line: #c9ccd3;
  --apx-d-surface: #ffffff;
  --apx-d-soft: #f4f5f7;
  --apx-d-accent: #ff6b35;
  --apx-d-accent-soft: #fff1ea;
  --apx-tutorial: #0f766e;
  --apx-howto: #1d4ed8;
  --apx-concept: #7c3aed;
  --apx-reference: #52525b;
}
[data-md-color-scheme="slate"] {
  --apx-d-ink: #eceef2;
  --apx-d-muted: #a3a9b6;
  --apx-d-line: #4a4f5c;
  --apx-d-surface: #1f222a;
  --apx-d-soft: #272b35;
  --apx-d-accent: #ff6b35;
  --apx-d-accent-soft: #3a2418;
  --apx-tutorial: #5eead4;
  --apx-howto: #93c5fd;
  --apx-concept: #c4b5fd;
  --apx-reference: #d4d4d8;
}

/* The page-type badge under the title. */
.md-typeset .apx-kind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: -0.6rem 0 1.2rem;
  font-size: 0.7rem;
}
.apx-kind__label {
  padding: 0.1rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.apx-kind__hint { color: var(--md-default-fg-color--light); }
.apx-kind--tutorial .apx-kind__label { color: var(--apx-tutorial); }
.apx-kind--how-to .apx-kind__label { color: var(--apx-howto); }
.apx-kind--concept .apx-kind__label { color: var(--apx-concept); }
.apx-kind--reference .apx-kind__label { color: var(--apx-reference); }

/* The Related block at the foot of a page. */
.md-typeset .apx-related {
  margin-top: 2.5rem;
  padding: 0.2rem 1rem 0.6rem;
  border: 1px solid var(--apx-d-line);
  border-radius: 0.5rem;
  background: var(--apx-d-soft);
}
.md-typeset .apx-related h2 {
  margin: 0.8rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.md-typeset .apx-related ul { margin: 0; padding: 0; list-style: none; }
.md-typeset .apx-related ul li { margin: 0.25rem 0; }
.apx-related__kind {
  margin-left: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

/* Diagrams: inline SVG that takes the scheme's colours. */
.md-typeset figure.apx-diagram {
  display: block;
  width: 100%;
  margin: 1.4rem 0;
  padding: 0.8rem;
  border: 1px solid var(--apx-d-line);
  border-radius: 0.5rem;
  background: var(--md-default-bg-color);
  overflow-x: auto;
}
.apx-diagram svg { display: block; width: 100%; min-width: 620px; height: auto; }
.apxd text { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.apxd-box { fill: var(--apx-d-surface); stroke: var(--apx-d-line); stroke-width: 1.5; }
.apxd-soft { fill: var(--apx-d-soft); stroke: var(--apx-d-line); stroke-width: 1.5; }
.apxd-dashed { stroke-dasharray: 5 4; }
.apxd-core { fill: var(--apx-d-accent-soft); stroke: var(--apx-d-accent); stroke-width: 2; }
.apxd-t { fill: var(--apx-d-ink); font-size: 15px; font-weight: 600; }
.apxd-s { fill: var(--apx-d-muted); font-size: 12.5px; }
.apxd-l { fill: var(--apx-d-muted); font-size: 12px; font-weight: 500; }
.apxd-n { fill: #fff; font-size: 12px; font-weight: 700; }
.apxd-dot { fill: var(--apx-d-accent); }
.apxd-a { fill: none; stroke: var(--apx-d-ink); stroke-width: 1.6; }
.apxd-ad { fill: none; stroke: var(--apx-d-muted); stroke-width: 1.6; stroke-dasharray: 5 4; }
.apxd-head { fill: var(--apx-d-ink); }

/* Annotated screenshots: numbered pins over the picture, explained in the caption. */
.md-typeset figure.apx-shot { display: block; width: 100%; margin: 1.4rem 0; }
.md-typeset figure.apx-shot > p:first-child { position: relative; margin: 0; line-height: 0; }
.md-typeset figure.apx-shot img {
  width: 100%;
  border: 1px solid var(--apx-d-line);
  border-radius: 0.5rem;
}
.apx-pin {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff6b35;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: calc(1.1rem - 4px);
  text-align: center;
}
.md-typeset figure.apx-shot figcaption {
  max-width: none;
  margin-top: 0.6rem;
  font-style: normal;
  text-align: left;
}
.md-typeset figure.apx-shot figcaption ol { margin: 0; }

/* The landing page. */
.apx-hero { margin: 0.5rem 0 1.5rem; }
.md-typeset .apx-hero h1 { margin-bottom: 0.4rem; font-weight: 700; color: var(--md-default-fg-color); }
.md-typeset .apx-hero__lead { max-width: 38rem; font-size: 0.95rem; color: var(--md-default-fg-color--light); }
.md-typeset .apx-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 2rem;
}
.md-typeset .apx-path {
  padding: 0.2rem 1rem 0.8rem;
  border: 1px solid var(--apx-d-line);
  border-top: 3px solid var(--apx-d-accent);
  border-radius: 0.5rem;
  background: var(--apx-d-surface);
}
.md-typeset .apx-path h3 { margin: 0.8rem 0 0.1rem; }
.md-typeset .apx-path > p { margin: 0 0 0.4rem; font-size: 0.7rem; color: var(--md-default-fg-color--light); }
.md-typeset .apx-path ol { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
.md-typeset .apx-path ol li {
  position: relative;
  margin: 0.5rem 0;
  padding-left: 1.8rem;
  counter-increment: step;
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .apx-path ol li a { display: block; font-size: 0.8rem; font-weight: 600; }
.md-typeset .apx-path ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--apx-d-accent-soft);
  color: var(--apx-d-accent);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
}
.md-typeset .apx-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.md-typeset .apx-kinds > div { padding: 0.7rem 0.9rem; border: 1px solid var(--apx-d-line); border-radius: 0.5rem; }
.md-typeset .apx-kinds .apx-kind { margin: 0 0 0.3rem; }
.md-typeset .apx-kinds p { margin: 0.2rem 0; font-size: 0.72rem; }

/* The walkthrough video (getting-started pages, ADR-0090). Where the file is
   not served, assets/video.js swaps the player for its poster, linking out. */
.md-typeset figure.apx-video { display: block; width: 100%; margin: 1.2rem 0 1.6rem; }
.md-typeset figure.apx-video video,
.md-typeset figure.apx-video .apx-video__away img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--apx-d-line);
  border-radius: 0.5rem;
  background: #000;
}
.md-typeset figure.apx-video .apx-video__away { position: relative; display: block; }
.md-typeset figure.apx-video .apx-video__away span {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #ff6b35;
  color: #fff;
  font-weight: 700;
}
.md-typeset figure.apx-video figcaption {
  max-width: none;
  margin-top: 0.6rem;
  font-style: normal;
  text-align: left;
}
