/* The design system of the xtr documentation site, on top of the theme variables. */

/* ==========================================================================
   1. Tokens — light scheme
   The theme reads every colour from a variable, so one block of values
   restyles the whole site. "custom" in zensical.toml stops the theme from
   setting the primary and accent colours itself.
   Each neutral is one near-black at a fixed alpha: the greys stay in tune
   with each other, and a colour cannot drift out of the scale.
   ========================================================================== */
:root,
[data-md-color-scheme="default"] {
  /* One accent, from indigo to violet. The cyan end appears only in the
     gradient of the home page headline. */
  --md-primary-fg-color: #4f39f6;
  --md-primary-fg-color--light: #6d5bf8;
  --md-primary-fg-color--dark: #3d2ad4;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #ffffffb3;
  --md-accent-fg-color: #7c3aed;
  --md-accent-fg-color--transparent: #7c3aed14;
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: #ffffffb3;

  /* Neutrals. Body text reaches 16.8:1 and secondary text 5.7:1 on white. */
  --md-default-bg-color: #ffffff;
  --md-default-bg-color--light: #ffffffb3;
  --md-default-bg-color--lighter: #ffffff4d;
  --md-default-bg-color--lightest: #ffffff1f;
  --md-default-fg-color: #09090beb;
  --md-default-fg-color--light: #09090b9e;
  --md-default-fg-color--lighter: #09090b73;
  --md-default-fg-color--lightest: #09090b17;

  --md-code-bg-color: #f7f7f8;
  --md-code-fg-color: #27272a;
  --md-code-bg-color--light: #f7f7f8b3;
  --md-code-bg-color--lighter: #f7f7f84d;

  --md-typeset-color: var(--md-default-fg-color);
  --md-typeset-a-color: var(--md-primary-fg-color);
  --md-typeset-table-color: #09090b1f;
  --md-typeset-table-color--light: #09090b08;
  --md-typeset-mark-color: #4f39f626;

  --md-footer-bg-color: #fafafa;
  --md-footer-bg-color--dark: #f4f4f5;

  /* The search dialog lives in a shadow root and reads only these four
     variables, so they are the single way to theme it. */
  --color-foreground: 9 9 11;
  --color-background: 255 255 255;
  --color-background-subtle: 244 244 245;
  --color-backdrop: 255 255 255;

  /* Own tokens. A hairline is one pixel of the neutral scale; a surface is
     the one step between the page and a panel. */
  --xtr-hairline: #09090b1f;
  --xtr-hairline-strong: #09090b2e;
  --xtr-surface: #fafafa;
  --xtr-surface-raised: #ffffff;
  --xtr-gradient: linear-gradient(100deg, #4f39f6 0%, #7c3aed 42%, #0891b2 100%);
  --xtr-glow: #4f39f61f;
  --xtr-shadow-card: 0 1px 2px #09090b0a;
  --xtr-shadow-raised: 0 4px 16px -4px #09090b1a, 0 1px 2px #09090b0d;

  /* The one solid button of the site. Stated here rather than taken from the
     text colour, which carries an alpha and would wash the fill out. */
  --xtr-cta-bg: #09090b;
  --xtr-cta-bg-hover: #27272a;
  --xtr-cta-fg: #ffffff;

  /* Radii. 8px for a control, 10px for a panel, 12px for a card. */
  --xtr-radius-sm: 0.3rem;
  --xtr-radius-md: 0.4rem;
  --xtr-radius-lg: 0.5rem;
  --xtr-radius-xl: 0.6rem;

  /* Symbol colours of the API reference. Each one clears 4.5:1 on its own
     12% tint, so the pills are readable and not only decorative. */
  --doc-symbol-class-fg-color: #0550ae;
  --doc-symbol-type_alias-fg-color: #0550ae;
  --doc-symbol-function-fg-color: #7129c9;
  --doc-symbol-method-fg-color: #7129c9;
  --doc-symbol-attribute-fg-color: #953800;
  --doc-symbol-module-fg-color: #2f6616;
  --doc-symbol-parameter-fg-color: #4d5e80;
  --doc-symbol-type_parameter-fg-color: #4d5e80;

  /* Callout accents, one per GitHub callout keyword. */
  --xtr-callout-note: #0969da;
  --xtr-callout-tip: #1a7f37;
  --xtr-callout-important: #8250df;
  --xtr-callout-warning: #9a6700;
  --xtr-callout-caution: #cf222e;
}

/* ==========================================================================
   2. Tokens — dark scheme
   Near-black, not blue-grey: the page stays quiet and the accent carries the
   colour. Every value is stated, because the theme builds the dark scheme
   from one hue and that hue would tint the greys.
   ========================================================================== */
[data-md-color-scheme="slate"] {
  --md-hue: 240deg;

  --md-primary-fg-color: #a78bfa;
  --md-primary-fg-color--light: #c4b5fd;
  --md-primary-fg-color--dark: #8b5cf6;
  --md-primary-bg-color: #09090b;
  --md-primary-bg-color--light: #09090bb3;
  --md-accent-fg-color: #c4b5fd;
  --md-accent-fg-color--transparent: #a78bfa24;
  --md-accent-bg-color: #09090b;
  --md-accent-bg-color--light: #09090bb3;

  --md-default-bg-color: #09090b;
  --md-default-bg-color--light: #09090bb3;
  --md-default-bg-color--lighter: #09090b4d;
  --md-default-bg-color--lightest: #09090b1f;
  --md-default-fg-color: #fafafaeb;
  --md-default-fg-color--light: #fafafa9e;
  --md-default-fg-color--lighter: #fafafa6b;
  --md-default-fg-color--lightest: #fafafa1c;

  --md-code-bg-color: #121215;
  --md-code-fg-color: #e4e4e7;
  --md-code-bg-color--light: #121215b3;
  --md-code-bg-color--lighter: #1212154d;

  --md-typeset-color: var(--md-default-fg-color);
  --md-typeset-a-color: var(--md-primary-fg-color);
  --md-typeset-table-color: #fafafa1f;
  --md-typeset-table-color--light: #fafafa0a;
  --md-typeset-mark-color: #a78bfa33;
  --md-typeset-kbd-color: #fafafa14;
  --md-typeset-kbd-accent-color: #fafafa26;
  --md-typeset-kbd-border-color: #26262b;

  --md-footer-bg-color: #0e0e11;
  --md-footer-bg-color--dark: #121215;

  --color-foreground: 250 250 250;
  --color-background: 15 15 18;
  --color-background-subtle: 28 28 32;
  --color-backdrop: 4 4 6;

  --xtr-hairline: #fafafa1f;
  --xtr-hairline-strong: #fafafa2e;
  --xtr-surface: #101013;
  --xtr-surface-raised: #16161a;
  --xtr-gradient: linear-gradient(100deg, #a78bfa 0%, #c4b5fd 42%, #22d3ee 100%);
  --xtr-glow: #a78bfa26;
  --xtr-shadow-card: 0 1px 2px #00000040;
  --xtr-shadow-raised: 0 4px 16px -4px #00000080, 0 1px 2px #00000059;

  --xtr-cta-bg: #fafafa;
  --xtr-cta-bg-hover: #e4e4e7;
  --xtr-cta-fg: #09090b;

  --doc-symbol-class-fg-color: #79c0ff;
  --doc-symbol-type_alias-fg-color: #79c0ff;
  --doc-symbol-function-fg-color: #d2a8ff;
  --doc-symbol-method-fg-color: #d2a8ff;
  --doc-symbol-attribute-fg-color: #ffa657;
  --doc-symbol-module-fg-color: #baff79;
  --doc-symbol-parameter-fg-color: #9cb0d1;
  --doc-symbol-type_parameter-fg-color: #9cb0d1;

  --xtr-callout-note: #4493f8;
  --xtr-callout-tip: #3fb950;
  --xtr-callout-important: #ab7df8;
  --xtr-callout-warning: #d29922;
  --xtr-callout-caution: #f85149;
}

/* The theme fades every colour when the scheme toggle runs. Shadows and
   backdrop filters make that fade flicker, so they are held still. */
[data-md-color-switching] .md-header,
[data-md-color-switching] .xtr-hero {
  transition: none !important;
}

/* ==========================================================================
   3. Measure and typographic scale
   Body text is 15px with a 1.65 line height. The shell is wider than the
   theme default so that a long package name of the API reference fits in the
   sidebar without the reading column growing past about 90 characters.
   ========================================================================== */
/* The theme grows the root size on wide screens, and with it every size of
   the page. A documentation page reads best at one size, so the root stays
   at 20px at every width. */
@media screen and (min-width: 100em) {
  html {
    font-size: 125%;
  }
}

.md-grid {
  max-width: 66rem;
}

.md-typeset {
  font-size: 0.75rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--md-default-fg-color);
  font-feature-settings: "kern", "liga", "ss01";
}

/* Tight tracking keeps a large heading from looking loose next to body text. */
.md-typeset h1 {
  margin: 0 0 0.9em;
  font-size: 1.9em;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.032em;
}

/* A hairline under a section heading gives the page a rhythm that a reader
   can scan. The API reference opts out below: its own blocks separate. */
.md-typeset h2:not(.doc-heading) {
  margin: 2.2em 0 0.9em;
  padding-bottom: 0.4em;
  font-size: 1.35em;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -0.024em;
  border-bottom: 1px solid var(--xtr-hairline);
}

.md-typeset h3 {
  margin: 1.9em 0 0.7em;
  font-size: 1.1em;
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: -0.016em;
}

.md-typeset h4 {
  margin: 1.5em 0 0.6em;
  font-size: 0.95em;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.md-typeset h5,
.md-typeset h6 {
  font-size: 0.78em;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color--light);
}

.md-typeset p,
.md-typeset li {
  text-wrap: pretty;
}

.md-typeset hr {
  border-bottom-color: var(--xtr-hairline);
}

/* The permalink beside a heading. The theme fades it in on hover, so it is
   only ever read at full opacity, and it is set in the colour that clears
   the contrast floor for text at that size. */
.md-typeset .headerlink {
  color: var(--md-default-fg-color--light);
}

/* ==========================================================================
   4. Links
   A thin underline set away from the baseline reads as a link without
   cutting the descenders of the text.
   ========================================================================== */
.md-typeset a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentcolor 32%, transparent);
  transition: color 0.15s, text-decoration-color 0.15s;
}

.md-typeset a:hover,
.md-typeset a:focus-visible {
  color: var(--md-accent-fg-color);
  text-decoration-color: currentcolor;
}

/* A link that holds only code, or only a heading, carries no underline: the
   code frame and the heading weight already mark it. */
.md-typeset a:has(> code:only-child),
.md-typeset h1 a,
.md-typeset h2 a,
.md-typeset h3 a,
.md-typeset h4 a {
  text-decoration: none;
}

/* ==========================================================================
   5. Header and tabs
   The header is already translucent in this theme. A wider blur with a
   little saturation keeps the text over it readable while the page scrolls
   under it, and a hairline replaces the shadow.
   ========================================================================== */
.md-header {
  background-color: color-mix(in srgb, var(--md-default-bg-color) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
}

.md-header--shadow {
  box-shadow: 0 1px 0 var(--xtr-hairline);
}

.md-header__inner {
  height: 2.6rem;
  padding: 0 0.6rem;
}

.md-header__title {
  font-weight: 550;
  letter-spacing: -0.012em;
}

/* The site name sits beside the logo, so it needs no extra indent. */
.md-header__title .md-header__topic > .md-ellipsis {
  font-size: 0.78rem;
}

.md-header__button {
  border-radius: var(--xtr-radius-md);
  transition: background-color 0.15s, opacity 0.15s;
}

.md-header__button:hover {
  opacity: 1;
  background-color: var(--md-default-fg-color--lightest);
}

/* The repository link. The theme stacks the name over a row of counts, which
   is two lines tall and taller than the header bar it sits in. One line of
   text in a control the size of the search field beside it reads as part of
   the header instead of a card dropped on top of it. */
.md-header__source {
  width: auto;
  max-width: 9rem;
}

/* Scoped to the header: the drawer puts the same link in a frame of its own,
   and a second frame inside it would be a box in a box. */
.md-header .md-source {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  height: 1.7rem;
  padding: 0 0.5rem;
  font-size: 0.64rem;
  font-weight: 500;
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-md);
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

.md-header .md-source:hover {
  opacity: 1;
  background-color: var(--md-default-fg-color--lightest);
  border-color: var(--xtr-hairline-strong);
}

.md-header .md-source__icon {
  width: auto;
  height: auto;
}

.md-header .md-source__icon svg {
  width: 0.8rem;
  height: 0.8rem;
  margin: 0;
}

.md-header .md-source .md-source__icon + .md-source__repository {
  padding-left: 0;
  margin-left: 0;
}

.md-header .md-source__repository {
  max-width: 100%;
}

/* The release, star and fork counts belong on the repository page, not in
   the header of every page of the documentation. */
.md-source__facts {
  display: none;
}

/* Tabs: one hairline under the whole bar, and the active tab marked by a
   short bar in the accent instead of a full-width underline. */
.md-tabs {
  box-shadow: none;
  border-bottom: 1px solid var(--xtr-hairline);
}

.md-header--lifted .md-tabs {
  margin-bottom: -1px;
  border-bottom: 1px solid var(--xtr-hairline);
}

.md-tabs__list {
  gap: 0.1rem;
}

.md-tabs__item {
  height: 2.1rem;
  padding-left: 0;
  padding-right: 0;
}

.md-tabs__link {
  margin-top: 0;
  padding: 0.42rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: -0.008em;
  color: var(--md-default-fg-color--light);
  border-radius: var(--xtr-radius-sm);
  opacity: 1;
  transition: color 0.15s, background-color 0.15s;
}

.md-tabs__link:hover {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-fg-color--lightest);
}

.md-tabs__item--active {
  border-bottom: none;
}

.md-tabs__item--active .md-tabs__link {
  color: var(--md-default-fg-color);
  font-weight: 600;
}

/* The marker is drawn on the item, so it lines up with the bar hairline
   rather than with the padding of the link. */
.md-tabs__item--active::after {
  position: absolute;
  inset-inline: 0.5rem;
  bottom: 0;
  height: 2px;
  content: "";
  background: var(--md-primary-fg-color);
  border-radius: 2px 2px 0 0;
}

/* ==========================================================================
   6. Breadcrumbs
   ========================================================================== */
.md-path {
  padding-top: 1rem;
  font-size: 0.64rem;
}

.md-path__link {
  padding: 0.1rem 0.2rem;
  margin-inline: -0.2rem;
  font-weight: 500;
  border-radius: var(--xtr-radius-sm);
  transition: color 0.15s, background-color 0.15s;
}

.md-path__link:hover {
  background-color: var(--md-default-fg-color--lightest);
}

/* ==========================================================================
   7. Sidebar navigation and table of contents
   The theme already rounds a nav link. The work here is the resting weight:
   a quiet grey for every item, and one pill in the accent for the page the
   reader is on.
   ========================================================================== */
.md-sidebar {
  padding-top: 0.6rem;
}

/* Only the docked sidebars are widened. Below this width the primary one is
   the drawer, whose width the theme pairs with the distance it slides. */
@media screen and (min-width: 76.25em) {
  /* Wide enough for the longest package name of the API reference. A name
     has no place to break, so a column too narrow for it would cut it in
     the middle of a word. */
  .md-sidebar--primary {
    width: 15rem;
  }

  .md-sidebar--secondary {
    width: 12.4rem;
  }
}

.md-nav {
  font-size: 0.68rem;
}

.md-nav__link {
  padding: 0.3rem 0.5rem;
  margin-inline: 0;
  line-height: 1.45;
  color: var(--md-default-fg-color--light);
  border-radius: var(--xtr-radius-md);
  transition: color 0.15s, background-color 0.15s;
}

.md-nav__link:hover {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-fg-color--lightest);
}

/* A section label is not a link, so it reads as a label: smaller, spaced and
   in the strong foreground. */
.md-nav__item--section > .md-nav__link:not([href]) {
  margin-top: 0.7rem;
  margin-bottom: 0.1rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--md-default-fg-color);
}

/* A section of the API reference is named after a package, and a package name
   is written the way it is imported. Shouting it would make it a different
   name, so only the hand-written section labels are set in capitals. */
.md-nav__item--section > .md-nav__link:not([href]):has(code) {
  font-size: 0.66rem;
  /* The few names too long for the column wrap onto a second line, which
     sits tight under the first so the two read as one name. */
  line-height: 1.25;
  letter-spacing: -0.004em;
  text-transform: none;
}

.md-nav__item--section > .md-nav__link:not([href]):hover {
  background-color: initial;
}

/* The active pill. The left bar gives the pill a direction, so a scanning
   eye finds the current page before it reads the label. */
.md-nav--primary .md-nav__item .md-nav__link--active,
.md-nav--primary .md-nav__item .md-nav__link--active code {
  position: relative;
  color: var(--md-primary-fg-color);
  font-weight: 600;
  background: color-mix(in srgb, var(--md-primary-fg-color) 10%, transparent);
}

.md-nav--primary .md-nav__item .md-nav__link--active code {
  background: initial;
}

.md-nav--primary .md-nav__link--active::before {
  position: absolute;
  inset-block: 0.2rem;
  inset-inline-start: 0;
  width: 2px;
  content: "";
  background: var(--md-primary-fg-color);
  border-radius: 0 2px 2px 0;
}

/* The nested list of the sidebar gets a guide rail, so depth is visible
   without indenting the labels off the column. */
.md-nav--primary .md-nav__list .md-nav__list {
  margin-left: 0.5rem;
  padding-left: 0.3rem;
  border-left: 1px solid var(--xtr-hairline);
}

/* The table of contents is a quiet column: no pill, only a colour change,
   because it changes while the reader scrolls. */
.md-nav--secondary .md-nav__title {
  padding: 0 0.5rem 0.3rem;
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  background: initial;
  box-shadow: none;
}

.md-nav--secondary .md-nav__link {
  border-radius: 0;
  border-left: 1px solid var(--xtr-hairline);
  padding-left: 0.5rem;
  margin-left: 0.2rem;
}

.md-nav--secondary .md-nav__link:hover {
  background-color: initial;
  color: var(--md-default-fg-color);
  border-left-color: var(--xtr-hairline-strong);
}

.md-nav--secondary .md-nav__link--active {
  color: var(--md-primary-fg-color);
  font-weight: 600;
  border-left-color: var(--md-primary-fg-color);
}

/* The drawer of a small screen. The theme slides a floating panel in and
   hides the nav title everywhere but there, so only the surface is restated:
   the same blur as the header, and hairlines from this file's scale. The
   geometry is left alone, because the open position is a fixed distance that
   a different width would not line up with. */
@media screen and (max-width: 76.234375em) {
  .md-sidebar--primary {
    background-color: color-mix(in srgb, var(--md-default-bg-color) 86%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid var(--xtr-hairline);
  }

  .md-nav .md-nav__title[for="__drawer"] {
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: -0.012em;
    border-bottom: 1px solid var(--xtr-hairline);
  }

  .md-nav__source {
    border-color: var(--xtr-hairline);
  }

  .md-overlay {
    background-color: #09090b59;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
}

/* ==========================================================================
   8. Inline code and code panels
   The frame goes on the .highlight wrapper, not on the code element, so the
   border holds still while the code inside scrolls sideways.
   ========================================================================== */
.md-typeset code {
  padding: 0.12em 0.34em;
  font-size: 0.86em;
  background-color: var(--md-code-bg-color);
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-sm);
}

/* Code inside a heading inherits the heading weight, so it needs no frame. */
.md-typeset h1 code,
.md-typeset h2 code,
.md-typeset h3 code,
.md-typeset h4 code {
  padding: 0.08em 0.26em;
  font-size: 0.88em;
  background-color: var(--md-code-bg-color);
}

.md-typeset a > code {
  color: inherit;
  border-color: color-mix(in srgb, currentcolor 26%, transparent);
}

.md-typeset .highlight,
.md-typeset .doc-signature {
  position: relative;
  margin: 1.1em 0;
  overflow: hidden;
  background-color: var(--md-code-bg-color);
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-lg);
  /* An inset top highlight gives the panel an edge, the way a raised surface
     catches light. It is what reads as "a panel" and not "a grey box". */
  box-shadow: inset 0 1px 0 var(--md-default-bg-color--lightest),
    var(--xtr-shadow-card);
}

.md-typeset .highlight > pre,
.md-typeset .doc-signature > pre {
  margin: 0;
}

.md-typeset .highlight pre > code,
.md-typeset .doc-signature pre > code {
  padding: 0.75rem 0.85rem;
  font-size: 0.72rem;
  line-height: 1.62;
  background-color: initial;
  border: none;
  border-radius: 0;
}

/* A bare pre, with no highlight wrapper, gets the same frame. */
.md-typeset pre > code {
  border-radius: var(--xtr-radius-lg);
}

.md-typeset .md-clipboard {
  width: 1.7em;
  height: 1.7em;
  color: var(--md-default-fg-color--lighter);
  border-radius: var(--xtr-radius-sm);
  transition: color 0.15s, background-color 0.15s;
}

.md-typeset .md-clipboard:hover {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-fg-color--lightest);
}

/* ==========================================================================
   9. Tables
   The theme wraps a wide table in a scroll container at run time, so both
   the plain table and the wrapped one are styled.
   ========================================================================== */
.md-typeset table:not([class]) {
  width: 100%;
  /* The theme lays a table out as an inline block, which stretches the frame
     to the full width while the cells inside keep shrinking to their text.
     A real table box makes the columns share the width the frame takes. */
  display: table;
  font-size: 0.72rem;
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-lg);
  box-shadow: var(--xtr-shadow-card);
}

/* The wrapper the theme adds at run time shrinks to fit as well, and a width
   of 100% cannot resolve against it. A block wrapper lets the table take the
   measure of the text around it. */
.md-typeset__table {
  display: block;
}

.md-typeset__table table:not([class]) {
  box-shadow: none;
}

.md-typeset table:not([class]) th {
  padding: 0.5rem 0.7rem;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color);
  background-color: var(--xtr-surface);
  border-bottom: 1px solid var(--xtr-hairline);
}

.md-typeset table:not([class]) td {
  padding: 0.5rem 0.7rem;
  vertical-align: top;
  border-top: 1px solid var(--md-typeset-table-color--light);
}

/* Zebra rows, at the lightest step of the scale: enough to follow a row
   across the table, not enough to read as a colour. */
.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background-color: var(--md-typeset-table-color--light);
}

.md-typeset table:not([class]) tbody tr:hover {
  background-color: var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) tbody tr:first-child td {
  border-top: none;
}

/* ==========================================================================
   10. Callouts
   The pages use the GitHub keywords, which this build renders as an
   admonition. The theme styles note, tip and warning but not caution or
   important, so all five are set here and read as one family: a tinted
   panel, a hairline in the same colour, and a coloured title.
   ========================================================================== */
.md-typeset .admonition,
.md-typeset details {
  padding: 0 0.8rem;
  margin: 1.4em 0;
  font-size: 0.75rem;
  line-height: 1.65;
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-xl);
  box-shadow: none;
}

.md-typeset .admonition-title,
.md-typeset summary {
  margin-top: 0.65rem;
  margin-bottom: 0.5em;
  padding-left: 1.5rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: -0.004em;
}

.md-typeset .admonition-title::before,
.md-typeset summary::before {
  top: 0.08em;
  width: 0.9rem;
  height: 0.9rem;
}

html .md-typeset .admonition > :last-child,
html .md-typeset details > :last-child {
  margin-bottom: 0.65rem;
}

/* One rule per keyword. --xtr-c is the accent of the callout; everything
   else is derived from it, so a new keyword needs one line. */
.md-typeset .admonition.note,
.md-typeset details.note {
  --xtr-c: var(--xtr-callout-note);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  --xtr-c: var(--xtr-callout-tip);
}

.md-typeset .admonition.important,
.md-typeset details.important {
  --xtr-c: var(--xtr-callout-important);
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  --xtr-c: var(--xtr-callout-warning);
}

.md-typeset .admonition.caution,
.md-typeset details.caution {
  --xtr-c: var(--xtr-callout-caution);
}

.md-typeset .admonition[class*=" "],
.md-typeset details[class*=" "] {
  background-color: color-mix(in srgb, var(--xtr-c, var(--xtr-callout-note)) 6%, var(--md-default-bg-color));
  border-color: color-mix(in srgb, var(--xtr-c, var(--xtr-callout-note)) 24%, transparent);
}

.md-typeset .admonition[class*=" "] > .admonition-title,
.md-typeset details[class*=" "] > summary {
  color: var(--xtr-c, var(--xtr-callout-note));
}

.md-typeset .admonition[class*=" "] > .admonition-title::before,
.md-typeset details[class*=" "] > summary::before {
  background-color: var(--xtr-c, var(--xtr-callout-note));
}

/* The theme has no icon for caution or important, so each borrows the one
   that matches its meaning. */
.md-typeset .caution > .admonition-title::before,
.md-typeset details.caution > summary::before {
  -webkit-mask-image: var(--md-admonition-icon--danger);
  mask-image: var(--md-admonition-icon--danger);
}

.md-typeset .important > .admonition-title::before,
.md-typeset details.important > summary::before {
  -webkit-mask-image: var(--md-admonition-icon--info);
  mask-image: var(--md-admonition-icon--info);
}

/* A plain block quote, with no keyword, stays a quote. */
.md-typeset blockquote {
  padding-left: 0.8rem;
  color: var(--md-default-fg-color--light);
  border-left: 2px solid var(--xtr-hairline-strong);
}

/* ==========================================================================
   11. Lists and task lists
   ========================================================================== */
.md-typeset ul li,
.md-typeset ol li {
  margin-bottom: 0.4em;
}

.md-typeset ul > li::marker {
  color: var(--md-default-fg-color--lighter);
}

.md-typeset ol > li::marker {
  color: var(--md-default-fg-color--light);
  font-variant-numeric: tabular-nums;
}

.md-typeset .task-list-control .task-list-indicator::before {
  background-color: var(--md-default-fg-color--lighter);
}

.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator::before {
  background-color: var(--xtr-callout-tip);
}

/* ==========================================================================
   12. Search
   The dialog is rendered into a shadow root, so it cannot be reached by a
   selector. It reads the --color-* tokens of section 1 and 2, which is where
   its surface, text and backdrop come from. Only the button is styled here.
   ========================================================================== */
.md-search__button {
  font-size: 0.66rem;
  color: var(--md-default-fg-color--light);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

@media screen and (min-width: 45em) {
  .md-search__button {
    width: 9.2rem;
    height: 1.7rem;
    background-color: var(--md-code-bg-color);
    border: 1px solid var(--xtr-hairline);
    border-radius: var(--xtr-radius-md);
  }

  .md-search__button:hover,
  .md-search__button:focus-visible {
    color: var(--md-default-fg-color);
    background-color: var(--md-default-fg-color--lightest);
    border-color: var(--xtr-hairline-strong);
  }
}

/* ==========================================================================
   13. Content frame, footer and "back to top"
   ========================================================================== */
.md-main__inner {
  margin-top: 0.8rem;
}

.md-content__inner {
  padding-top: 0.4rem;
  padding-bottom: 2rem;
}

.md-content__button {
  color: var(--md-default-fg-color--light);
  background-color: initial;
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-md);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.md-content__button:hover {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-fg-color--lightest);
  border-color: var(--xtr-hairline-strong);
}

/* The previous and next links become two cards. A card states where the
   reader goes next better than a line of text does. */
.md-footer {
  background-color: initial;
  border-top: 1px solid var(--xtr-hairline);
}

.md-footer__inner {
  display: flex;
  gap: 0.6rem;
  padding: 1.6rem 0.8rem;
  margin-top: 0;
}

.md-footer__link {
  /* Half the row each. A page with only a next link keeps the card at that
     width and pushes it to the end, instead of stretching it across. */
  flex: 0 1 calc(50% - 0.3rem);
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  max-width: none;
  padding: 0.7rem 0.8rem;
  margin: 0;
  background-color: var(--md-default-bg-color);
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-xl);
  opacity: 1;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.md-footer__link:hover,
.md-footer__link:focus-visible {
  opacity: 1;
  background-color: var(--xtr-surface);
  border-color: var(--xtr-hairline-strong);
  box-shadow: var(--xtr-shadow-card);
}

.md-footer__link--next {
  justify-content: flex-end;
}

.md-footer__title {
  max-width: 100%;
  padding: 0 0.4rem;
  margin-bottom: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.md-footer__direction {
  margin-bottom: 0.1rem;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  opacity: 1;
}

.md-footer__button {
  padding: 0.2rem;
  margin: 0;
  color: var(--md-default-fg-color--lighter);
}

.md-footer-meta {
  background-color: var(--xtr-surface);
  border-top: 1px solid var(--xtr-hairline);
}

.md-copyright {
  font-size: 0.62rem;
}

.md-top {
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--md-default-fg-color);
  background-color: color-mix(in srgb, var(--md-default-bg-color) 80%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--xtr-hairline);
  box-shadow: var(--xtr-shadow-raised);
}

/* The progress bar of an instant page change. */
.md-progress {
  background-color: var(--md-primary-fg-color);
}

/* ==========================================================================
   14. API reference
   The pages are built from the docstrings. A module page holds many members,
   so the work is hierarchy: each member is a block with a top hairline, the
   signature sits in the code panel of section 8, and the symbol kind is a
   pill the reader can recognise by colour.
   ========================================================================== */

/* A top-level member of a module. The hairline, not a heading rule, is what
   separates one member from the next. */
.md-typeset .doc-children > .doc-object {
  padding-top: 1.6rem;
  margin-top: 1.6rem;
  border-top: 1px solid var(--xtr-hairline);
}

.md-typeset .doc-children > .doc-object:first-child {
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}

.md-typeset .doc-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
  margin: 0 0 0.6rem;
  padding-bottom: 0;
  border-bottom: none;
}

/* The name of an object is its code identity, so it is set in the code face
   and in the code colour. */
.md-typeset .doc-object-name {
  font-family: var(--md-code-font-family);
  font-size: 0.92em;
  font-weight: 650;
  letter-spacing: -0.014em;
  color: var(--md-default-fg-color);
}

.md-typeset h2.doc-heading .doc-object-name {
  font-size: 0.86em;
}

.md-typeset .doc-class-bases {
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}

/* The signature panel. It reuses the frame of section 8 and adds a bar in
   the accent, so a signature is not read as an ordinary example. */
.md-typeset .doc-signature {
  margin: 0.5em 0 1em;
  background-color: var(--xtr-surface);
}

.md-typeset .doc-signature::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 2px;
  content: "";
  background: var(--md-primary-fg-color);
  opacity: 0.55;
}

.md-typeset .doc-signature pre > code {
  padding-inline-start: 0.95rem;
}

.md-typeset .doc-signature .autorefs {
  text-decoration: none;
  border-bottom: 1px dotted var(--md-default-fg-color--lighter);
}

.md-typeset .doc-signature .autorefs:hover {
  color: var(--md-accent-fg-color);
  border-bottom-color: currentcolor;
}

/* The kind of a symbol, as a filled pill. Each colour clears 4.5:1 on its
   own tint, so the pill carries the word as well as the colour. */
.md-typeset code.doc-symbol,
.md-sidebar code.doc-symbol {
  padding: 0.05em 0.36em;
  font-size: 0.82em;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--xtr-radius-sm);
}

.md-typeset code.doc-symbol-class,
.md-sidebar code.doc-symbol-class,
.md-typeset code.doc-symbol-type_alias,
.md-sidebar code.doc-symbol-type_alias {
  background-color: color-mix(in srgb, var(--doc-symbol-class-fg-color) 13%, transparent);
}

.md-typeset code.doc-symbol-function,
.md-sidebar code.doc-symbol-function,
.md-typeset code.doc-symbol-method,
.md-sidebar code.doc-symbol-method {
  background-color: color-mix(in srgb, var(--doc-symbol-function-fg-color) 13%, transparent);
}

.md-typeset code.doc-symbol-attribute,
.md-sidebar code.doc-symbol-attribute {
  background-color: color-mix(in srgb, var(--doc-symbol-attribute-fg-color) 13%, transparent);
}

.md-typeset code.doc-symbol-module,
.md-sidebar code.doc-symbol-module {
  background-color: color-mix(in srgb, var(--doc-symbol-module-fg-color) 13%, transparent);
}

.md-typeset code.doc-symbol-parameter,
.md-sidebar code.doc-symbol-parameter,
.md-typeset code.doc-symbol-type_parameter,
.md-sidebar code.doc-symbol-type_parameter {
  background-color: color-mix(in srgb, var(--doc-symbol-parameter-fg-color) 13%, transparent);
}

/* The module pill in the sidebar reads as a bullet, not as a label, so it
   keeps no background and sits closer to the name. */
.md-sidebar code.doc-symbol-nav {
  padding: 0;
  margin-right: 0.45ch;
  font-weight: 500;
  background-color: initial;
}

/* A modifier of a member: async, property, dataclass and the rest. Outlined,
   so it never competes with the symbol pill beside it. */
.md-typeset .doc-labels {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-left: 0.1rem;
}

.md-typeset .doc-label code {
  padding: 0.08em 0.4em;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color--light);
  background-color: var(--md-code-bg-color);
  border: 1px solid var(--xtr-hairline);
  border-radius: 0.5rem;
  vertical-align: middle;
}

/* async says the call is awaited, which changes how the member is used, so
   it is the one modifier that carries the accent. */
.md-typeset .doc-label-async code {
  color: var(--md-primary-fg-color);
  background-color: color-mix(in srgb, var(--md-primary-fg-color) 9%, transparent);
  border-color: color-mix(in srgb, var(--md-primary-fg-color) 24%, transparent);
}

/* "Parameters:", "Returns:", "Raises:" become small labels above their list
   instead of bold running text. */
.md-typeset .doc-section-title {
  display: block;
  margin-top: 1.1em;
  margin-bottom: 0.3em;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

.md-typeset .doc-section-title + ul,
.md-typeset p:has(> .doc-section-title) + ul {
  padding: 0.5rem 0.75rem;
  margin: 0 0 1.2em;
  list-style: none;
  background-color: var(--xtr-surface);
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-lg);
}

.md-typeset .doc-section-item {
  padding: 0.35rem 0;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.6;
  border-top: 1px solid var(--xtr-hairline);
}

.md-typeset .doc-section-item:first-child {
  border-top: none;
}

/* The name of a parameter leads the row, so it is the only part in the
   strong foreground. */
.md-typeset .doc-section-item > b > code {
  font-weight: 650;
  color: var(--md-default-fg-color);
  background-color: initial;
  border: none;
  padding-inline: 0;
}

.md-typeset .doc-section-item code {
  font-size: 0.82em;
}

.md-typeset .doc-md-description {
  color: var(--md-default-fg-color--light);
}

.md-typeset .doc-md-description p {
  margin-block: 0.2em;
}

/* The members of a class are indented behind a rail, so the eye can tell a
   member of a class from a member of the module. */
.md-typeset div.doc-contents:not(.first) {
  padding-left: 0.9rem;
  margin-left: 0;
  border-left: 1px solid var(--xtr-hairline);
}

.md-typeset .doc-backlink-crumb {
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}

/* A package name has no break of its own, so it wraps rather than being cut
   off when the column is too narrow for it even at this width. */
.md-sidebar .md-nav__link .md-ellipsis {
  overflow-wrap: anywhere;
}

.md-sidebar .md-ellipsis:has(.doc-symbol) {
  font-size: 0.92em;
}

/* ==========================================================================
   15. Mermaid
   The diagrams are drawn by the theme script, which reads these variables.
   The node text is the accent on a tint of the accent, which clears 5.5:1 in
   both schemes, and the edges use the neutral scale so they stay quiet.
   ========================================================================== */
:root,
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-mermaid-font-family: var(--md-text-font-family), sans-serif;
  --md-mermaid-node-bg-color: color-mix(in srgb, var(--md-primary-fg-color) 10%, var(--md-default-bg-color));
  --md-mermaid-node-fg-color: var(--md-primary-fg-color);
  --md-mermaid-edge-color: var(--md-default-fg-color--light);
  --md-mermaid-label-bg-color: var(--md-default-bg-color);
  --md-mermaid-label-fg-color: var(--md-default-fg-color);
}

.md-typeset .mermaid {
  padding: 1rem 0.6rem;
  margin: 1.2em 0;
  overflow-x: auto;
  /* The drawing keeps the size the renderer gives it, so without this it
     sits against the left edge of a panel the width of the text. */
  text-align: center;
  background-color: var(--xtr-surface);
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-lg);
}

.md-typeset .mermaid > svg {
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================================================
   16. Home page hero
   Rendered by overrides/main.html, only on the home page. The grid and the
   glow are drawn behind the text and are marked aria-hidden in the template.
   ========================================================================== */
.xtr-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--xtr-hairline);
}

/* A faint ruled grid, faded out before it reaches the first words of the
   page. It gives the band a surface without putting anything on it. */
.xtr-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, var(--xtr-hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--xtr-hairline) 1px, transparent 1px);
  background-size: 2.4rem 2.4rem;
  background-position: center top;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(80% 70% at 50% 0%, #000 0%, transparent 78%);
}

/* One soft light behind the headline, on the side the headline starts from. */
.xtr-hero__glow {
  position: absolute;
  inset-inline-start: -10rem;
  top: -12rem;
  z-index: -1;
  width: 44rem;
  height: 30rem;
  background: radial-gradient(45% 45% at 50% 50%, var(--xtr-glow) 0%, transparent 72%);
}

.xtr-hero__inner {
  padding: 3.2rem 0.8rem 2.8rem;
}

.xtr-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  margin-bottom: 1.1rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: -0.004em;
  color: var(--md-default-fg-color--light);
  background-color: var(--md-default-bg-color);
  border: 1px solid var(--xtr-hairline);
  border-radius: 1rem;
  box-shadow: var(--xtr-shadow-card);
}

.xtr-hero__eyebrow-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--xtr-gradient);
}

.xtr-hero__title {
  max-width: 24ch;
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 5.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.038em;
  color: var(--md-default-fg-color);
  text-wrap: balance;
}

/* The second line of the headline carries the gradient. It is the only
   gradient text on the site, and at this size it clears 3:1 at both ends.
   The box is fitted to the words, or the gradient would run its last third
   over the empty space after them and only its first colour would show. */
.xtr-hero__title-accent {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-style: normal;
  background: var(--xtr-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* A sliver of descender is clipped by background-clip on some engines. */
  padding-bottom: 0.06em;
}

.xtr-hero__text {
  max-width: 46ch;
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  line-height: 1.6;
  letter-spacing: -0.008em;
  color: var(--md-default-fg-color--light);
  text-wrap: pretty;
}

.xtr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.xtr-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.9rem;
  padding: 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: -0.008em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--xtr-radius-md);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s,
    color 0.15s;
}

/* The icon sets differ: a lucide icon is drawn with a stroke, a brand icon
   with a fill. Both are sized the same and take the colour of the text. */
.xtr-hero__cta svg,
.xtr-hero__copy svg {
  display: block;
  width: 0.78rem;
  height: 0.78rem;
  fill: currentcolor;
}

.xtr-hero__cta svg.lucide,
.xtr-hero__copy svg.lucide {
  fill: none;
  stroke: currentcolor;
}

.xtr-hero__cta--primary {
  color: var(--xtr-cta-fg);
  background-color: var(--xtr-cta-bg);
  border: 1px solid transparent;
  box-shadow: var(--xtr-shadow-card);
}

.xtr-hero__cta--primary:hover,
.xtr-hero__cta--primary:focus-visible {
  color: var(--xtr-cta-fg);
  background-color: var(--xtr-cta-bg-hover);
  box-shadow: var(--xtr-shadow-raised);
}

.xtr-hero__cta--secondary {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-bg-color);
  border: 1px solid var(--xtr-hairline-strong);
}

.xtr-hero__cta--secondary:hover,
.xtr-hero__cta--secondary:focus-visible {
  color: var(--md-default-fg-color);
  background-color: var(--xtr-surface);
}

/* The command a reader runs first. It is a control, not an example, so it
   has the shape of the buttons beside it. */
.xtr-hero__command {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.9rem;
  padding: 0 0.3rem 0 0.7rem;
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  color: var(--md-code-fg-color);
  background-color: var(--md-code-bg-color);
  border: 1px solid var(--xtr-hairline);
  border-radius: var(--xtr-radius-md);
}

.xtr-hero__command-prompt {
  color: var(--md-default-fg-color--lighter);
  user-select: none;
}

.xtr-hero__command-text {
  white-space: nowrap;
}

.xtr-hero__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  padding: 0;
  color: var(--md-default-fg-color--light);
  cursor: pointer;
  background-color: initial;
  border: none;
  border-radius: var(--xtr-radius-sm);
  transition: color 0.15s, background-color 0.15s;
}

.xtr-hero__copy:hover {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-fg-color--lightest);
}

.xtr-hero__copy svg {
  width: 0.7rem;
  height: 0.7rem;
}

/* Both icons ship in the markup and one is hidden, so the script only
   toggles a class and never builds an element. */
.xtr-hero__copy-done {
  display: none;
}

/* The script swaps this class in for about two seconds after a copy. */
.xtr-hero__copy--done,
.xtr-hero__copy--done:hover {
  color: var(--xtr-callout-tip);
}

.xtr-hero__copy--done .xtr-hero__copy-idle {
  display: none;
}

.xtr-hero__copy--done .xtr-hero__copy-done {
  display: block;
}

/* The home page is a landing page: the two sidebars hold nothing useful
   there — the section it belongs to has no other page — and the hero already
   says the title the markdown repeats. :has() keeps all of this to the one
   page that renders a hero, so no other page has to opt out.
   The content keeps the left edge and the measure of the hero above it, so
   the two read as one column rather than two blocks of different widths. */
.md-container:has(> .xtr-hero) .md-sidebar {
  display: none;
}

.md-container:has(> .xtr-hero) .md-content__inner > h1 {
  display: none;
}

.md-container:has(> .xtr-hero) .md-main__inner {
  margin-top: 0;
}

/* A hidden sidebar is not a removed one, so the theme still adds the gutter
   it reserves beside a sidebar, and the text would start eight pixels right
   of the hero above it. The selector carries the weight of the rule it has
   to beat, not more. */
[dir="ltr"] .md-container:has(> .xtr-hero) .md-content > .md-content__inner,
[dir="rtl"] .md-container:has(> .xtr-hero) .md-content > .md-content__inner {
  max-width: 50rem;
  margin-inline: 0.8rem;
  padding-top: 1.6rem;
  padding-bottom: 3rem;
}

/* The first heading after the hero needs no rule above it. */
.md-container:has(> .xtr-hero) .md-content__inner .md-typeset h2:first-of-type {
  margin-top: 0.6rem;
}

@media screen and (max-width: 44.984375em) {
  .xtr-hero__inner {
    padding: 2.2rem 0.8rem 2rem;
  }

  .xtr-hero__title {
    max-width: none;
    letter-spacing: -0.03em;
  }

  .xtr-hero__text {
    font-size: 0.82rem;
  }

  .xtr-hero__actions {
    gap: 0.4rem;
  }

  /* On a narrow screen the command takes the full width, so the text inside
     can scroll rather than push the buttons off the page. */
  .xtr-hero__command {
    width: 100%;
    overflow-x: auto;
  }

  .xtr-hero__copy {
    margin-left: auto;
  }
}

/* ==========================================================================
   17. Focus and motion
   The theme ships a focus-visible polyfill and adds a class. Both the class
   and the native selector are handled, so a keyboard ring shows in every
   browser.
   ========================================================================== */
.md-typeset a:focus-visible,
.md-nav__link:focus-visible,
.md-tabs__link:focus-visible,
.md-path__link:focus-visible,
.md-header__button:focus-visible,
.md-search__button:focus-visible,
.md-source:focus-visible,
.md-footer__link:focus-visible,
.md-content__button:focus-visible,
.md-clipboard:focus-visible,
.xtr-hero__cta:focus-visible,
.xtr-hero__copy:focus-visible,
.md-skip:focus {
  outline: 2px solid var(--md-primary-fg-color);
  outline-offset: 2px;
  border-radius: var(--xtr-radius-sm);
}

.md-nav__link.focus-visible,
.md-tabs__link.focus-visible,
.md-clipboard.focus-visible {
  outline: 2px solid var(--md-primary-fg-color);
  outline-offset: 2px;
}

.md-typeset :target {
  scroll-margin-top: 4.6rem;
}

/* A reader who asks for less motion gets none of it. The theme already
   drops its transitions; these are the surfaces this file adds. */
@media (prefers-reduced-motion: reduce) {
  .md-header,
  .md-footer__link,
  .xtr-hero__cta,
  .xtr-hero__copy,
  .md-nav__link,
  .md-tabs__link {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
