/* ── PlayTelly docs theme ──
   Material's palette mapped to the tellyboard-theme design tokens (docs/ui/color-theme.md),
   so the docs look like the consoles. Design notes: proposals/docs-design.md. */

[data-md-color-scheme="default"] {
  --pt-primary: #0961aa;          /* primary-default */
  --pt-primary-hover: #074d88;    /* primary-dark */
  --pt-bg: #ffffff;               /* bg-surface */
  --pt-bg-subtle: #f3f5f6;        /* bg-subtle */
  --pt-border: #dfe3e7;           /* border-default */
  --pt-text: #29333d;             /* text-default */
  --pt-text-secondary: #47596b;   /* text-secondary */
  --pt-text-muted: #737f8c;       /* text-muted */
}

[data-md-color-scheme="slate"] {
  --pt-primary: #0da2e7;          /* border-focus (dark) */
  --pt-primary-hover: #38b6f0;
  --pt-bg: #101418;               /* bg-base (dark) */
  --pt-bg-subtle: #14191f;        /* bg-surface (dark) */
  --pt-border: #29333d;           /* border-default (dark) */
  --pt-text: #f0f2f5;             /* text-default (dark) */
  --pt-text-secondary: #b3bfcc;   /* text-secondary (dark) */
  --pt-text-muted: #8b99a7;       /* text-muted (dark) */
}

[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--pt-primary);
  --md-primary-fg-color--light: var(--pt-primary-hover);
  --md-primary-fg-color--dark: var(--pt-primary-hover);
  --md-accent-fg-color: var(--pt-primary-hover);
  --md-typeset-a-color: var(--pt-primary);
  --md-default-bg-color: var(--pt-bg);
  --md-typeset-color: var(--pt-text);
  --md-code-bg-color: var(--pt-bg-subtle);
  --md-footer-bg-color: var(--pt-bg-subtle);
  --md-footer-bg-color--dark: var(--pt-bg-subtle);
  --md-footer-fg-color: var(--pt-text);
  --md-footer-fg-color--light: var(--pt-text-secondary);
  --md-footer-fg-color--lighter: var(--pt-text-muted);
}

/* ── Header and tabs: light bar with a border, not a solid colour block ── */

.md-header,
.md-tabs {
  background-color: var(--pt-bg);
  color: var(--pt-text);
}

.md-header {
  border-bottom: 1px solid var(--pt-border);
  box-shadow: none;
}

.md-header--shadow {
  box-shadow: none;
}

.md-tabs {
  border-bottom: 1px solid var(--pt-border);
}

.md-tabs__link {
  color: var(--pt-text-secondary);
  opacity: 1;
  font-weight: 500;
}

.md-tabs__link:hover,
.md-tabs__item--active .md-tabs__link {
  color: var(--pt-primary);
}

.md-search__input {
  background-color: var(--pt-bg-subtle);
  color: var(--pt-text);
}

.md-search__input::placeholder,
.md-search__input + .md-search__icon {
  color: var(--pt-text-muted);
}

.md-search__input:hover {
  background-color: var(--pt-border);
}

/* ── Sidebar ── */

.md-nav__item--section > .md-nav__link,
.md-sidebar .md-nav__item--section > label.md-nav__link {
  /* Section labels are also links to the area's overview page (navigation.indexes),
     so they use the secondary text colour (7:1, the muted one was 4:1) and react on hover. */
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-12);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.md-nav__link--active {
  font-weight: 600;
}

/* ── Type ── */

.md-typeset h1 {
  color: var(--pt-text);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.6em;
}

.md-typeset h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-typeset h3 {
  font-weight: 600;
}

/* The first paragraph under the title is ordinary body text: no lede style, and nothing in JS decides its size */
.md-typeset h1 + p {
  color: var(--pt-text);
  font-size: var(--pt-fs-16);
  line-height: 1.6;
}

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

/* ── Tables: bordered and compact, like the console pt-table ── */

.md-typeset table:not([class]) {
  border: 1px solid var(--pt-border);
  border-radius: 6px;
  box-shadow: none;
  font-size: var(--pt-fs-15);
}

.md-typeset table:not([class]) th {
  background-color: var(--pt-bg-subtle);
  color: var(--pt-text-secondary);
  font-weight: 600;
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--pt-border);
}

.md-typeset table:not([class]) tbody tr:hover {
  background-color: var(--pt-bg-subtle);
  box-shadow: none;
}

/* ── Admonitions: tinted box with a left rule instead of a full outline ── */

.md-typeset .admonition,
.md-typeset details {
  background-color: var(--pt-bg-subtle);
  border-width: 0 0 0 0.2rem;
  border-radius: 4px;
  box-shadow: none;
  font-size: var(--pt-fs-14);
}

.md-typeset .admonition > .admonition-title,
.md-typeset details > summary {
  background-color: transparent;
}

/* ── Landing-page cards ── */

.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--pt-border);
  border-radius: 8px;
  background-color: var(--pt-bg);
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  border-color: var(--pt-primary);
  box-shadow: none;
}

/* ── Page status in the nav (front matter `status:`) ── */

:root {
  --md-status--draft: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75z"/></svg>');
}



/* ── Swagger UI: the server/authorize bar stayed white in dark mode ── */

.swagger-ui .scheme-container {
  background: var(--pt-bg) !important;
  border: 1px solid var(--pt-border);
  border-radius: 6px;
  box-shadow: none !important;
}

.swagger-ui .scheme-container .servers-title,
.swagger-ui .scheme-container .servers > label {
  background: transparent !important;
  color: var(--pt-text-secondary) !important;
}

/* ── Polish: small, fast, ease-out; no motion for people who ask for none ──
   Rules from the emil-design-eng skill: transition only the properties that change,
   keep UI motion under ~200ms, never ease-in, no animation on high-frequency actions. */

:root {
  --pt-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.md-typeset a,
.md-nav__link,
.md-tabs__link,
.md-header__button,
.md-search__input {
  transition: color 120ms var(--pt-ease-out), background-color 120ms var(--pt-ease-out);
}

.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  transition: border-color 150ms var(--pt-ease-out), transform 150ms var(--pt-ease-out);
}

/* Cards are links in disguise: confirm the press */
.md-typeset .grid.cards > ul > li:active {
  transform: scale(0.985);
}

/* Visible keyboard focus in the brand colour */
.md-typeset a:focus-visible,
.md-nav__link:focus-visible,
.md-tabs__link:focus-visible {
  outline: 2px solid var(--pt-primary);
  outline-offset: 2px;
  border-radius: 3px;
}


/* Balanced headings avoid a one-word last line */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  text-wrap: balance;
}

/* No grey tap flash on phones; hover-only effects stay off touch screens */
a,
button,
.md-nav__link {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none) {
  .md-typeset .grid.cards > ul > li:hover,
  .md-typeset .grid > .card:hover {
    border-color: var(--pt-border);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Fixes from the polish pass ── */

/* Section labels that link to an overview react like links */
.md-nav__item--section > .md-nav__container > a.md-nav__link:hover {
  color: var(--pt-primary);
}



/* ── Placeholder pages ("To be updated") ── */

.md-typeset .pt-todo {
  margin: 1.2em 0;
  padding: 0.7rem 0.9rem;
  border: 1px dashed var(--pt-border);
  border-left: 0.2rem solid var(--pt-text-muted);
  border-radius: 4px;
  background-color: var(--pt-bg-subtle);
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-14);
}

.md-typeset .pt-todo p {
  margin: 0;
}

/* Tables fill the text column, so stacked tables line up instead of each taking its own width */
.md-typeset__table {
  display: block;
}

.md-typeset table:not([class]) {
  display: table;
  width: 100%;
}

/* ── Reviewer round 1 ── */

/* The whole home/guides card is the click target, not only its arrow link */
.md-typeset .grid.cards > ul > li {
  position: relative;
}

.md-typeset .grid.cards > ul > li > p:last-child > a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Quiet secondary line (team link on the home page) */
.md-typeset .pt-quiet {
  margin-top: 2em;
  color: var(--pt-text-muted);
  font-size: var(--pt-fs-14);
}

/* The logo mark is small inside its square image; give it more room in the header */
.md-header__button.md-logo img {
  width: 1.7rem;
  height: 1.7rem;
}

/* "Last updated 13 Nov 2026" instead of a bare date next to a clock */
.md-source-file__fact .git-revision-date-localized-plugin-date::before {
  content: "Last updated ";
}

/* ══ Round 2: layout offsets, focus, code, cards, chips, type scale ══
   One set of tokens is used by the header, the sidebars and the scroll offset. */

:root {
  --pt-header-h: 49px;   /* 48px bar + 1px border */
  --pt-tabs-h: 41px;     /* 40px row + 1px border */
  --pt-offset: var(--pt-header-h);      /* below 76.25em the tab row is hidden */
  --pt-radius: 8px;

  /* type scale: 12 / 14 / 16 / 18 / 22 / 28 / 36 */
  --pt-fs-12: 0.6rem;
  --pt-fs-14: 0.7rem;
  --pt-fs-16: 0.8rem;
  --pt-fs-18: 0.9rem;
  --pt-fs-22: 1.1rem;
  --pt-fs-28: 1.4rem;
  --pt-fs-36: 1.8rem;
}

@media screen and (min-width: 76.25em) {
  :root { --pt-offset: calc(var(--pt-header-h) + var(--pt-tabs-h)); }
}

[data-md-color-scheme="default"] {
  --pt-border-strong: #b6bfc9;   /* ~1.9:1 on white: defines cards, tables and code blocks */
  --pt-chip-text: #5b6876;       /* 5.6:1 */
}

[data-md-color-scheme="slate"] {
  --pt-border-strong: #3b4856;
  --pt-chip-text: #98a6b4;
}

/* C1/C2/C3: slimmer header; every offset comes from the same variables */

/* Anchor jumps. The offset is on the headings themselves, not on :target: a link or hash load makes the
   heading :target, but Material scrolls to a "On this page" click itself and sets the hash afterwards with
   pushState, so :target never matches there and the heading ended up under the header. Material's own
   :target rule (6rem, in rem, so it matches the header at one font size only) loses to this one.
   Do not also set scroll-padding on html: the two would add up. */
.md-typeset :is(h1, h2, h3, h4, h5, h6)[id],
.md-typeset :target {
  scroll-margin-top: calc(var(--pt-offset) + 12px);
}


.md-header__inner {
  height: calc(var(--pt-header-h) - 1px);
  padding-block: 0;
}

.md-tabs__list {
  height: calc(var(--pt-tabs-h) - 1px);
}

.md-tabs__item {
  height: calc(var(--pt-tabs-h) - 1px);
}

.md-tabs__link {
  display: flex;
  align-items: center;
  height: 100%;
  margin-top: 0;
}

.md-main .md-sidebar,
.md-header--lifted ~ .md-container .md-main .md-sidebar {
  top: var(--pt-offset);
}

.md-main .md-sidebar .md-sidebar__scrollwrap {
  max-height: calc(100vh - var(--pt-offset));
}

.md-header__button.md-logo img {
  width: 28px;
  height: 28px;
}

/* C4: one visible keyboard focus ring everywhere */

:is(a, button, input, summary, label, [tabindex]):focus-visible {
  outline: 2px solid var(--pt-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.md-search__form:focus-within {
  outline: 2px solid var(--pt-primary);
  outline-offset: 2px;
}

.md-typeset .grid.cards > ul > li:has(a:focus-visible) {
  outline: 2px solid var(--pt-primary);
  outline-offset: 2px;
}

.md-typeset .grid.cards > ul > li a:focus-visible {
  outline: none;
}

/* C5: a cell that holds only a URL or a route never breaks inside it */

.md-typeset table:not([class]) td > code:only-child {
  white-space: nowrap;
}

@media screen and (max-width: 44.9375em) {
  .md-typeset table:not([class]):has(td > code:only-child) td:not(:has(> code:only-child)),
  .md-typeset table:not([class]):has(td > code:only-child) th:not(:first-child) {
    min-width: 13rem;
  }
}

/* C6: inline code relative to the surrounding text, and visible code blocks */

.md-typeset code {
  font-size: var(--pt-fs-14);
  background-color: var(--pt-bg-subtle);
  box-shadow: inset 0 0 0 1px var(--pt-border);
  border-radius: 4px;
}

.md-typeset pre > code,
.md-typeset .highlight code {
  box-shadow: none;
  border-radius: 0;
}

.md-typeset .highlight,
.md-typeset pre {
  border: 1px solid var(--pt-border-strong);
  border-radius: var(--pt-radius);
}

.md-typeset .highlight pre {
  border: 0;
}

.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--pt-radius);
}

.md-typeset table:not([class]) {
  border-color: var(--pt-border-strong);
  border-radius: var(--pt-radius);
}

.md-typeset table:not([class]) td {
  border-top-color: var(--pt-border);
}

/* C7: cards: no divider, real padding, one column or three (no orphan), link at the bottom */

/* the grid is on the .grid div (its ul is display: contents) */
.md-typeset .grid.cards {
  grid-template-columns: 1fr;
  gap: 16px;
}

@media screen and (min-width: 44em) {
  .md-typeset .grid.cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.md-typeset .grid.cards > ul > li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--pt-border-strong);
  border-radius: var(--pt-radius);
}

.md-typeset .grid.cards > ul > li > hr {
  display: none;
}

.md-typeset .grid.cards > ul > li > p {
  margin: 0;
}

.md-typeset .grid.cards > ul > li > p:first-child {
  color: var(--pt-text);
  font-size: var(--pt-fs-16);
  font-weight: 600;
}

.md-typeset .grid.cards > ul > li > p:nth-child(2):not(:last-child),
.md-typeset .grid.cards > ul > li > p:nth-of-type(2):not(:last-of-type) {
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-14);
}

.md-typeset .grid.cards > ul > li > p:last-child {
  margin-top: auto;
  padding-top: 4px;
  font-size: var(--pt-fs-14);
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--pt-primary);
  transform: translateY(-1px);
}

.md-typeset .grid.cards > ul > li:active {
  transform: scale(0.99);
}

@media (hover: none) {
  .md-typeset .grid.cards > ul > li:hover {
    border-color: var(--pt-border-strong);
    transform: none;
  }
}

/* C8: one "Planned" chip for the sidebar, the cards and lists */
/* The sidebar status comes from Material as an icon (a ::after with a mask). Turn it into the text
   chip: set the text, remove the icon mask, and keep the hover state from filling it. */
.md-status--draft::after {
  content: "Planned";
  -webkit-mask-image: none;
  mask-image: none;
}

.md-status--draft:hover::after {
  background-color: transparent;
}


.pt-chip,
.md-status--draft::after {
  display: inline-block;
  width: auto;
  height: auto;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--pt-border-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--pt-chip-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  vertical-align: middle;
}

/* C9: only the expand animation is timed here; hover colour stays at 120ms */

.md-nav {
  transition-duration: 200ms;
}

/* C10: type scale and one vertical rhythm on a 4px grid */

.md-typeset h1 {
  font-size: clamp(var(--pt-fs-28), 2vw + 16px, var(--pt-fs-36));
  line-height: 1.2;
}

.md-typeset h2 {
  font-size: clamp(var(--pt-fs-22), 1.2vw + 14px, var(--pt-fs-28));
  line-height: 1.25;
}

.md-typeset h3 {
  font-size: var(--pt-fs-22);
}

.md-typeset h4 {
  font-size: var(--pt-fs-18);
}

.md-typeset table:not([class]) {
  font-size: var(--pt-fs-14);
}

.md-nav__link,
.md-nav--secondary .md-nav__link {
  font-size: var(--pt-fs-14);
}

.md-copyright,
.md-footer-meta {
  font-size: var(--pt-fs-12);
}

.md-content__inner.md-typeset > :is(p, ul, ol, dl) {
  margin-block: 16px;
}

.md-typeset li {
  margin-bottom: 8px;
}

.md-content__inner.md-typeset > :is(.md-typeset__scrollwrap, .highlight, .admonition, details, .pt-todo, .mermaid) {
  margin-block: 24px;
}

/* Footer: Support link with its Planned chip */
.md-copyright .pt-footer-link {
  font-weight: 500;
}

.md-copyright .pt-chip {
  margin-left: 4px;
}

.md-copyright .pt-footer-sep {
  margin-inline: 6px;
}

/* Wide tables scroll sideways: fade the edge that has more content, and let the keyboard reach them */

.md-typeset__scrollwrap {
  --pt-fade-l: 0px;
  --pt-fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--pt-fade-l), #000 calc(100% - var(--pt-fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--pt-fade-l), #000 calc(100% - var(--pt-fade-r)), transparent 100%);
}

.md-typeset__scrollwrap.pt-scroll-left { --pt-fade-l: 32px; }
.md-typeset__scrollwrap.pt-scroll-right { --pt-fade-r: 32px; }

/* the ring sits inside the box: a mask would clip an outer outline */
.md-typeset__scrollwrap:focus-visible {
  outline: 2px solid var(--pt-primary);
  outline-offset: -2px;
  border-radius: var(--pt-radius);
}

/* Light header: the tile logo is white with a pale border, so on a white header it
   disappears. Show the bare mark there (dark "p" + blue/teal bars); dark keeps the tile. */
[data-md-color-scheme="default"] .md-header__button.md-logo img {
  content: url("../assets/logo-mark.png");
  width: 30px;
  height: 30px;
}

/* ══ Round 4: panels, no dividers, short TOC, sidebar pill, endpoint chips, top bar, font trial ══ */

[data-md-color-scheme="default"] {
  --pt-page-bg: #f5f6f8;                 /* page behind the article card; sidebars sit on it */
  --pt-card-bg: #ffffff;
  --pt-tint: rgba(9, 97, 170, 0.09);     /* active sidebar pill */
  --pt-tint-hover: rgba(9, 97, 170, 0.05);
  --pt-bg-subtle: #f3f5f6;
}

[data-md-color-scheme="slate"] {
  --pt-page-bg: #0e1216;                 /* one step darker than the card */
  --pt-card-bg: #14191f;
  --pt-tint: rgba(13, 162, 231, 0.16);
  --pt-tint-hover: rgba(13, 162, 231, 0.08);
  --pt-bg-subtle: #1a2129;               /* lighter than the card, so code blocks and table heads still read */
}

/* 3: panels. Page on grey, article as a white card. Offsets from round 2 are untouched. */

html body,
.md-container,
.md-main {
  background-color: var(--pt-page-bg);
}

.md-footer {
  background-color: transparent;
}

.md-content__inner {
  margin: 24px 16px;
  padding: 32px;
  background-color: var(--pt-card-bg);
  border: 1px solid var(--pt-border-strong);
  border-radius: var(--pt-radius);
}

.md-content__inner::before,
.md-content__inner::after {
  display: none;
}

@media screen and (max-width: 44.9375em) {
  /* phones: the card goes edge to edge, no side gutters */
  .md-content__inner {
    margin: 0 0 16px;
    padding: 20px 16px;
    border-width: 1px 0;
    border-radius: 0;
  }

  .md-main__inner {
    margin-top: 0;
  }
}

/* 1: no section dividers; spacing does the work. One rule stays, before the changelog. */

.md-typeset hr {
  display: none;
}

.md-typeset hr:has(+ h2[id^="changelog"]) {
  display: block;
  margin: 40px 0 0;
  border-bottom: 1px solid var(--pt-border);
}

.md-typeset h2 {
  margin: 40px 0 12px;
}

.md-typeset h3 {
  margin: 32px 0 8px;
}

/* 2: "On this page": a short list of ## headings with a left guide and an active bar */

.md-nav--secondary .md-nav__title {
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-12);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.md-nav--secondary .md-nav__list {
  border-left: 1px solid var(--pt-border);
}

.md-nav--secondary .md-nav__link {
  margin-left: -1px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid transparent;
}

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

/* 4: sidebar rows (desktop). One row model for plain pages and groups: 32px tall (7px + 18px line + 7px),
   2px gap, 14px type. A plain page is one link; a group is a container holding the label link and the
   chevron toggle. The row (link or container) is the pill: tint and radius live there, its children paint
   nothing, so the pill is one shape and padding is never applied twice. */

@media screen and (min-width: 76.25em) {
  .md-nav--primary .md-nav__link {
    margin-top: 2px;
    margin-inline: -8px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: var(--pt-fs-14);
    line-height: 18px;
  }

  .md-nav--primary .md-nav__link:hover {
    background-color: var(--pt-tint-hover);
  }

  .md-nav--primary .md-nav__link--active {
    background-color: var(--pt-tint);
    color: var(--pt-primary);
    font-weight: 500;
  }

  /* group row: the container is the pill, the two children sit inside it */
  .md-nav--primary .md-nav__container.md-nav__link {
    display: flex;
    align-items: center;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }

  .md-nav--primary .md-nav__container > .md-nav__link {
    margin: 0;
    padding: 7px 0 7px 8px;
    background-color: transparent;
    border-radius: 0;
    align-self: stretch;
  }

  .md-nav--primary .md-nav__container > a.md-nav__link {
    flex: 1 1 auto;
  }

  .md-nav--primary .md-nav__container > label.md-nav__link {
    flex: 0 0 auto;
    padding: 7px 8px;
  }

  /* the tint belongs to the container, not to the children inside it */
  .md-nav--primary .md-nav__container:hover,
  .md-nav--primary .md-nav__container:has(> .md-nav__link:hover) {
    background-color: var(--pt-tint-hover);
  }

  .md-nav--primary .md-nav__container > .md-nav__link:hover,
  .md-nav--primary .md-nav__container > .md-nav__link--active {
    background-color: transparent;
  }

  .md-nav--primary .md-nav__container:has(> .md-nav__link--active) {
    background-color: var(--pt-tint);
  }

  /* the ring hugs the pill, not the link text or a box through the chevron */
  .md-nav--primary .md-nav__link:focus-visible {
    border-radius: 6px;
    outline-offset: -2px;
  }

  .md-nav--primary .md-nav__container > .md-nav__link:focus-visible {
    outline: none;
  }

  .md-nav--primary .md-nav__container:has(> .md-nav__link:focus-visible) {
    outline: 2px solid var(--pt-primary);
    outline-offset: -2px;
  }

  /* the sticky section title keeps the page colour and its fade; it is not a pill */
  .md-nav--primary .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link,
  .md-nav--primary .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link:hover {
    background-color: var(--pt-page-bg);
  }

  /* the guide line belongs to groups, not to the flat list under a section label */
  .md-nav--primary .md-nav__item--nested:not(.md-nav__item--section) > .md-nav > .md-nav__list {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--pt-border);
  }
}

/* 5: endpoint headings: a coloured method chip, then the path (markup added at build time by hooks/endpoint_chips.py) */

.md-typeset .pt-endpoint code {
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: inherit;
}

.pt-method {
  display: inline-block;
  min-width: 3.6em;
  margin-right: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--md-code-font-family);
  font-size: var(--pt-fs-12);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  text-align: center;
  vertical-align: 0.1em;
}

.pt-path {
  font-family: var(--md-code-font-family);
  font-weight: 500;
}

.md-nav--secondary .pt-method {
  min-width: 0;
  padding: 0 4px;
  font-size: var(--pt-fs-12);
}

[data-md-color-scheme="default"] {
  --pt-get-bg: #e2f4e8;    --pt-get-fg: #0b6a37;
  --pt-post-bg: #e1edfb;   --pt-post-fg: #0a58a6;
  --pt-put-bg: #fdeccb;    --pt-put-fg: #7a4300;
  --pt-patch-bg: #efe6fa;  --pt-patch-fg: #5b2e9b;
  --pt-delete-bg: #fde4e2; --pt-delete-fg: #b0221b;
}

[data-md-color-scheme="slate"] {
  --pt-get-bg: #12301f;    --pt-get-fg: #6fdc9a;
  --pt-post-bg: #112a44;   --pt-post-fg: #7cc0ff;
  --pt-put-bg: #3a2a0e;    --pt-put-fg: #f2b45a;
  --pt-patch-bg: #2a1f44;  --pt-patch-fg: #c4a2f5;
  --pt-delete-bg: #3d1a19; --pt-delete-fg: #ff8f88;
}

.pt-method--get { background-color: var(--pt-get-bg); color: var(--pt-get-fg); }
.pt-method--post { background-color: var(--pt-post-bg); color: var(--pt-post-fg); }
.pt-method--put { background-color: var(--pt-put-bg); color: var(--pt-put-fg); }
.pt-method--patch { background-color: var(--pt-patch-bg); color: var(--pt-patch-fg); }
.pt-method--delete { background-color: var(--pt-delete-bg); color: var(--pt-delete-fg); }

/* Company links: top bar (wide screens), footer, phone drawer. URLs live in mkdocs.yml extra.external_links. */

.pt-topbar {
  background-color: var(--pt-bg);
  border-bottom: 1px solid var(--pt-border);
  font-size: var(--pt-fs-14);
}

.pt-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 36px;
}

.pt-topbar__links {
  display: flex;
  gap: 20px;
}

.pt-ext {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pt-text-secondary);
  transition: color 120ms var(--pt-ease-out);
}

.pt-ext:hover {
  color: var(--pt-primary);
}

.pt-ext__icon {
  flex: none;
}

.md-copyright .pt-ext--footer {
  margin-inline: 2px;
}

@media screen and (max-width: 76.2344em) {
  .pt-topbar {
    display: none;
  }
}

.pt-drawer-links {
  position: absolute;
  /* the drawer starts under the header but is 100% tall, so it overhangs the screen by the header height */
  inset: auto 0 var(--pt-header-h) 0;
  z-index: 2;
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background-color: var(--pt-bg);
  border-top: 1px solid var(--pt-border);
  font-size: var(--pt-fs-14);
}

/* keep the last navigation rows clear of the pinned bar */
@media screen and (max-width: 76.2344em) {
  .md-sidebar--primary .md-nav__list {
    padding-bottom: 56px;
  }

  /* pages that hide the sidebar on desktop (Home) still need the phone drawer */
  .md-sidebar--primary[hidden] {
    display: block;
  }
}

@media screen and (min-width: 76.25em) {
  .pt-drawer-links {
    display: none;
  }
}


/* Sidebars sit on the page, not on white patches. The sticky title keeps a page-coloured fade so
   items scrolling under it stay hidden. (The phone drawer keeps its own solid background.) */
@media screen and (min-width: 76.25em) {
  .md-sidebar .md-nav,
  .md-sidebar .md-sidebar__scrollwrap {
    background-color: transparent;
  }

  /* No halo: an 8px page-coloured blur around the sticky title painted over the top edge of the
     first row, so the active pill looked faded there. The opaque background alone hides rows
     that scroll underneath. */
  .md-sidebar .md-nav__title,
  .md-sidebar .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link {
    background-color: var(--pt-page-bg);
    box-shadow: none;
  }
}

/* ══ Round 5 ══ */

/* Home: no outer card. Intro, cards and What's new sit directly on the page; the three section cards stay white. */
.md-content__inner:has(.pt-home-marker) {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.md-content__inner:has(.pt-home-marker) .grid.cards > ul > li {
  background-color: var(--pt-card-bg);
}

@media screen and (max-width: 44.9375em) {
  .md-content__inner:has(.pt-home-marker) {
    margin: 0;
    padding: 20px 16px;
    border: 0;
  }

  /* Phones: the breadcrumb joins the card, so the card starts right under the header */
  .md-path {
    margin: 0;
    padding: 12px 16px 0;
    background-color: var(--pt-card-bg);
    border-top: 1px solid var(--pt-border-strong);
  }

  .md-content__inner:not(:has(.pt-home-marker)) {
    padding-top: 8px;
    border-top: 0;
  }
}

/* ══ Round 7 ══ */

/* Tabular numbers: status codes, IDs and table figures line up */
.md-typeset table:not([class]),
.md-typeset code {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Sidebar chevrons: smaller, secondary colour, a 150ms quarter turn on open (desktop) */
@media screen and (min-width: 76.25em) {
  .md-nav--primary .md-nav__icon {
    width: 16px;
    height: 16px;
    transition: transform 150ms var(--pt-ease-out);
  }

  .md-nav--primary .md-nav__link:not(.md-nav__link--active) .md-nav__icon {
    color: var(--pt-text-secondary);
  }
}

/* Touch: the copy button is always visible (there is no hover to reveal it) */
@media (hover: none) {
  .md-typeset .md-code__nav,
  .md-typeset .md-clipboard {
    opacity: 1;
  }
}

/* ── Layout (default): the wide "comfortable" look chosen in round 9 ──
   A 1400px grid so tables, JSON and diagrams have room; prose capped at 72ch; 15px table text and 14.5px code
   blocks; darker inactive sidebar links. ?size=current (html.pt-size-current, javascripts/size-trial.js) goes
   back to the earlier 1220px look so the two can be compared. Not a shipped control. */

.md-content__inner > :is(p, ul, ol, dl) {
  max-width: 72ch;
}

.md-typeset table:not([class]) {
  font-size: 15px;
}

.md-typeset pre > code,
.md-typeset .highlight code {
  font-size: 14.5px;
}

.md-nav__link,
.md-nav--secondary .md-nav__link {
  line-height: 1.4;
}

.md-nav--primary .md-nav__link:not(.md-nav__link--active),
.md-nav--secondary .md-nav__link:not(.md-nav__link--active) {
  color: var(--pt-text);
}

html.pt-size-current .md-content__inner > :is(p, ul, ol, dl) {
  max-width: none;
}

html.pt-size-current .md-typeset table:not([class]) {
  font-size: var(--pt-fs-14);
}

html.pt-size-current .md-typeset pre > code,
html.pt-size-current .md-typeset .highlight code {
  font-size: 14px;
}

/* ── Endpoints at a glance (built at build time by hooks/endpoint_chips.py from the endpoint headings) ── */

.md-typeset details.pt-endpoint-summary {
  margin: 24px 0;
  padding: 0;
  border: 1px solid var(--pt-border-strong);
  border-radius: var(--pt-radius);
  background: none;
}

/* Material styles every <details> as an admonition (icon, tinted head); this one is a plain table box */
.md-typeset details.pt-endpoint-summary > summary {
  padding: 10px 14px;
  background: none;
}

.md-typeset details.pt-endpoint-summary > summary::before {
  display: none;
}

.md-typeset details.pt-endpoint-summary > summary {
  font-size: var(--pt-fs-14);
  font-weight: 600;
  color: var(--pt-text-secondary);
  cursor: pointer;
}

.pt-endpoint-summary table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--pt-fs-14);
}

.pt-endpoint-summary td {
  padding: 6px 14px;
  border-top: 1px solid var(--pt-border);
  vertical-align: baseline;
}

.pt-endpoint-summary td:first-child {
  width: 1%;
  white-space: nowrap;
}

.pt-endpoint-summary .pt-path {
  white-space: nowrap;
}

.pt-endpoint-summary td:last-child {
  /* one line: the cell takes the remaining width and cuts the text with an ellipsis (full text in the tooltip) */
  width: 100%;
  max-width: 0;
  overflow: hidden;
  color: var(--pt-text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Never taller than its rows up to 12 of them, but a wide table scrolls sideways inside the box (phones). */
.pt-endpoint-summary .pt-summary-scroll {
  overflow-x: auto;
}

/* Longer lists start collapsed and scroll vertically inside once opened. */
.pt-endpoint-summary--long .pt-summary-scroll {
  max-height: 22rem;
  overflow: auto;
}

/* ── Release timeline (docs/releases/index.md) ── */

.pt-timeline {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--pt-border);
}

.pt-timeline > li {
  position: relative;
  margin: 0;
  padding: 0 0 24px 24px;
}

.pt-timeline > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--pt-primary);
  border-radius: 50%;
  background: var(--pt-card-bg);
}

.pt-timeline time {
  display: block;
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-14);
  font-weight: 500;
}

.pt-timeline a {
  font-weight: 600;
}

/* tag chips for future release entries: <span class="pt-tag pt-tag--added">Added</span> */
.pt-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: 0.1em;
}

.pt-tag--added { background-color: var(--pt-get-bg); color: var(--pt-get-fg); }
.pt-tag--changed { background-color: var(--pt-put-bg); color: var(--pt-put-fg); }
.pt-tag--fixed { background-color: var(--pt-post-bg); color: var(--pt-post-fg); }

/* ══ Round 9: symmetric gutters ══ */

:root {
  /* the default faces (@font-face rules at the end of this file; files in docs/assets/fonts) */
  --md-code-font: "IBM Plex Mono";

  /* side gutter: 48px from 1440 up, about 22px at 1280, 16px below. Steeper than a straight line on purpose:
     at 1280 the article card must stay above 720px (it is vw - 2 gutters - the two sidebars - about 48px of margins). */
  --pt-gutter: clamp(16px, 16.25vw - 186px, 48px);
  --pt-side-w: 232px;   /* left navigation */
  --pt-toc-w: 220px;    /* "On this page" */
}

/* One horizontal rhythm for everything built on .md-grid: top bar, header, tabs, page, footer */
.md-grid {
  max-width: calc(1600px + 2 * var(--pt-gutter));
  padding-inline: var(--pt-gutter);
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    width: var(--pt-side-w);
  }
}

@media screen and (min-width: 60em) {
  .md-sidebar--secondary {
    width: var(--pt-toc-w);
  }
}

/* ?size=current: the earlier 1220px look, for comparison */
html.pt-size-current .md-grid {
  max-width: 61rem;
  padding-inline: 0;
}

html.pt-size-current .md-sidebar--primary,
html.pt-size-current .md-sidebar--secondary {
  width: 12.1rem;
}

/* Left edge: Material pads the logo button, the first tab, the sidebar and the footer text a little each, so the
   left side started 8-16px further in than the right. Remove it so everything starts exactly at the gutter. */
.md-header__button.md-logo {
  margin-inline-start: 0;
  padding-inline-start: 0;
}

/* Material's own rule for the list is more specific, hence the longer selector */
html .md-tabs .md-tabs__list {
  margin-left: 0;
}

.md-tabs__item:first-child {
  padding-left: 0;
}

.md-copyright {
  margin-left: 0;
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary .md-sidebar__scrollwrap {
    margin-left: -4px;
  }
}

/* Phones: the page area has no side gutter, so the card runs edge to edge (the header keeps its gutter) */
@media screen and (max-width: 44.9375em) {
  .md-main__inner.md-grid {
    padding-inline: 0;
  }
}

/* ══ Round 10: one type scale ══
   12 chips and meta, 14 UI and code, 15 tables, 16 body and lists, 18 lede, 20 h3, 24 h2, 32 h1.
   Material sizes many things in em/rem, so the same element came out at 12.6, 13.1, 13.6, 14.4, 15.8, 19.2 and 19.3
   depending on where it sat. Everything below is a fixed px from the scale. */

:root {
  --pt-fs-15: 0.75rem;
  --pt-fs-20: 1rem;
  --pt-fs-24: 1.2rem;
  --pt-fs-32: 1.6rem;
}

/* Headings: calmer next to 16px body text. Margins from round 2 stay (h2 40/12, h3 32/8). */
.md-typeset h1 {
  font-size: clamp(var(--pt-fs-24), 1.2vw + 14px, var(--pt-fs-32));
}

.md-typeset h2 {
  font-size: clamp(20px, 0.9vw + 12px, var(--pt-fs-24));
}

.md-typeset h3 {
  font-size: var(--pt-fs-20);
}

.md-typeset h4 {
  font-size: var(--pt-fs-16);
  font-weight: 600;
}

.md-typeset h5,
.md-typeset h6 {
  font-size: var(--pt-fs-14);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Inline code is one size in body text, lists, tables and admonitions; headings scale it with their own size.
   Code blocks use the same 14px. */
.md-typeset code {
  font-size: var(--pt-fs-14);
}

.md-typeset :is(h1, h2, h3, h4, h5, h6) code {
  font-size: 0.9em;
}

.md-typeset pre > code,
.md-typeset .highlight code {
  font-size: var(--pt-fs-14);
}

/* One UI size, 14px: breadcrumb, sidebar, "On this page", admonitions, the "Last updated" line, summary box */
.md-path,
.md-nav,
.md-source-file,
.md-typeset .admonition,
.md-typeset details,
.md-typeset .admonition-title,
.md-typeset summary {
  font-size: var(--pt-fs-14);
}

/* Tables: 15px, the one in-between size */
.md-typeset table:not([class]),
.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  font-size: var(--pt-fs-15);
}

/* "Handles:" and similar: a paragraph that is only a bold label ending in a colon (marked at build time by hooks/endpoint_chips.py)
   becomes a small section label, like the sidebar's, instead of a bold 16px line that looks like a heading. */
.md-typeset p.pt-label {
  margin: 24px 0 8px;
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-14);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.md-typeset p.pt-label strong {
  font-weight: inherit;
}

/* Endpoints: method chip 12px bold; the path next to it 16px mono in headings and 14px in the summary table */
.pt-method {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.md-typeset .pt-endpoint {
  font-size: var(--pt-fs-16);
  font-weight: 600;
}

.md-typeset .pt-endpoint code,
.md-typeset .pt-endpoint .pt-path {
  font-size: var(--pt-fs-16);
  font-weight: 600;
}

.md-nav--secondary .pt-method {
  font-size: 12px;
}

.pt-endpoint-summary,
.pt-endpoint-summary table,
.pt-endpoint-summary td,
.pt-endpoint-summary .pt-path {
  font-size: var(--pt-fs-14);
}

/* Headings land exactly on the scale: stepped, not interpolated (a clamp gave a fractional 31.3px h1) */
.md-typeset h1 { font-size: 24px; }
.md-typeset h2 { font-size: 20px; }
.md-typeset h3 { font-size: 18px; }

@media screen and (min-width: 48em) {
  .md-typeset h1 { font-size: var(--pt-fs-32); }
  .md-typeset h2 { font-size: var(--pt-fs-24); }
  .md-typeset h3 { font-size: var(--pt-fs-20); }
}

/* Small Material text that was 12.8 / 13.6: meta is 12, the date line is 14 */
.md-source-file__fact,
.md-source-file__fact .git-revision-date-localized-plugin-date {
  font-size: var(--pt-fs-14);
}

.md-search-result__meta,
.md-footer__direction,
.md-footer-meta,
.md-skip {
  font-size: 12px;
}

/* ── Swagger UI ("Try it out") on the API pages: same fonts, sizes and tokens as the rest of the page ──
   The widget ships its own sans-serif/monospace stack, a 36px title that repeats the page heading, and blue
   method boxes. Its own rules are specific, hence !important on font properties. */

.swagger-ui,
.swagger-ui * {
  font-family: var(--md-text-font-family) !important;
}

.swagger-ui .opblock-summary-path,
.swagger-ui .opblock-summary-path *,
.swagger-ui .microlight,
.swagger-ui code,
.swagger-ui pre,
.swagger-ui pre *,
.swagger-ui .parameter__name,
.swagger-ui .parameter__type,
.swagger-ui .opblock-summary-method {
  font-family: var(--md-code-font-family) !important;
}

.swagger-ui .wrapper,
.swagger-ui .information-container {
  padding: 0;
}

.swagger-ui .info {
  margin: 0 0 16px !important;
}

.swagger-ui .info hgroup.main {
  margin: 0 0 8px !important;
}

/* the page already has a heading; keep the link to the OpenAPI file that sits under it */
.swagger-ui .info .title {
  display: none;
}

.swagger-ui .info .link {
  font-size: var(--pt-fs-14);
}

.swagger-ui .info .description,
.swagger-ui .info p,
.swagger-ui .info li {
  font-size: var(--pt-fs-14) !important;
}

.swagger-ui .scheme-container {
  margin: 0 0 16px !important;
  padding: 12px 16px;
  border: 1px solid var(--pt-border-strong);
  border-radius: var(--pt-radius);
  box-shadow: none !important;
}

.swagger-ui .scheme-container *,
.swagger-ui .models *,
.swagger-ui .opblock-body *,
.swagger-ui .responses-inner *,
.swagger-ui .opblock-description-wrapper *,
.swagger-ui table *,
.swagger-ui .btn,
.swagger-ui select,
.swagger-ui input,
.swagger-ui textarea {
  font-size: var(--pt-fs-14) !important;
}

/* tag headings are the h3 level of the page */
.swagger-ui .opblock-tag,
.swagger-ui .opblock-tag span,
.swagger-ui .opblock-tag small {
  font-size: var(--pt-fs-20) !important;
  font-weight: 600 !important;
}

.swagger-ui .opblock-tag small {
  font-size: var(--pt-fs-14) !important;
  font-weight: 400 !important;
}

.swagger-ui .opblock {
  margin: 0 0 8px;
  background: transparent !important;
  border: 1px solid var(--pt-border-strong) !important;
  border-radius: var(--pt-radius);
  box-shadow: none !important;
}

.swagger-ui .opblock .opblock-summary {
  padding: 6px 10px;
  border-bottom: 0 !important;
}

.swagger-ui .opblock-summary-path,
.swagger-ui .opblock-summary-path * {
  font-size: var(--pt-fs-14) !important;
  font-weight: 600 !important;
}

.swagger-ui .opblock-summary-description {
  color: var(--pt-text-secondary) !important;
  font-size: var(--pt-fs-14) !important;
}

.swagger-ui .opblock .opblock-summary-method {
  min-width: 64px;
  padding: 4px 0;
  border-radius: 4px;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-shadow: none;
}

.swagger-ui .opblock.opblock-get .opblock-summary-method { background: var(--pt-get-bg) !important; color: var(--pt-get-fg); }
.swagger-ui .opblock.opblock-post .opblock-summary-method { background: var(--pt-post-bg) !important; color: var(--pt-post-fg); }
.swagger-ui .opblock.opblock-put .opblock-summary-method { background: var(--pt-put-bg) !important; color: var(--pt-put-fg); }
.swagger-ui .opblock.opblock-patch .opblock-summary-method { background: var(--pt-patch-bg) !important; color: var(--pt-patch-fg); }
.swagger-ui .opblock.opblock-delete .opblock-summary-method { background: var(--pt-delete-bg) !important; color: var(--pt-delete-fg); }

/* long paths wrap instead of widening the card (phones) */
.swagger-ui .opblock-summary {
  flex-wrap: wrap;
}

.swagger-ui .opblock-summary-path,
.swagger-ui .opblock-summary-path-description-wrapper {
  min-width: 0;
  word-break: break-all;
}

/* Inline code in headings: a size from the scale, not a percentage that lands between steps */
.md-typeset h1 code { font-size: 20px; }
.md-typeset h2 code { font-size: 16px; }
.md-typeset h3 code { font-size: 16px; }
.md-typeset h4 code,
.md-typeset h5 code,
.md-typeset h6 code { font-size: var(--pt-fs-14); }

@media screen and (min-width: 48em) {
  .md-typeset h1 code { font-size: var(--pt-fs-24); }
  .md-typeset h2 code { font-size: var(--pt-fs-20); }
  .md-typeset h3 code { font-size: 18px; }
}

/* endpoint headings keep their own 16px path (defined above, later in the cascade would be overridden by h3 code) */
.md-typeset h3.pt-endpoint code,
.md-typeset h4.pt-endpoint code,
.md-typeset .pt-endpoint .pt-path {
  font-size: var(--pt-fs-16);
}

/* Round 10, last stragglers from the sweep: placeholder box, tab labels and the inline test widget sit on 14 */
.md-typeset .pt-todo,
.md-typeset .pt-todo p,
.md-typeset .tabbed-labels > label,
.md-typeset .tabbed-labels > label > a,
.md-typeset .it-card :is(button, select, input, option, label),
.md-typeset .it-field :is(select, input, option, label),
.md-typeset .it-card .it-toggle,
.md-typeset .it-card .it-submit {
  font-size: var(--pt-fs-14);
}

/* ══ Fonts: the system font for text, IBM Plex Mono (served from this site) for code ══
   The Mono fallback below is metric-matched to Plex Mono so the font swap does not move any line (width ratio vs
   Courier New 0.9998; Plex vertical metrics ascent 1.025, descent 0.275 em). */
@font-face {
  font-family: "Plex Mono Fallback";
  src: local("Courier New"), local("Liberation Mono");
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
}

body {
  --md-text-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --md-code-font-family: "IBM Plex Mono", "Plex Mono Fallback", SFMono-Regular, Consolas, Menlo, monospace;
}

/* The Swagger widget renders after its script arrives from the CDN: keep a placeholder of about the first screen
   so the footer and anything below it do not jump when it appears. Swagger fills the container and the rule stops matching. */
div[id^="swagger-ui"]:empty {
  min-height: 480px;
  contain: layout;
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  background: var(--pt-bg-subtle);
}

/* ══ IBM Plex Mono served from this site (docs/assets/fonts), latin subset only: no page uses latin-ext ══ */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plex-mono-v23-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-mono-v23-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Round 13: the summary table is now in the HTML, so Material wraps it in its table wrapper at load like any table.
   The box already scrolls (.pt-summary-scroll): make the wrapper invisible so nothing moves when it is added. */
.md-typeset details.pt-endpoint-summary .md-typeset__scrollwrap {
  margin: 0;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.md-typeset details.pt-endpoint-summary .md-typeset__table {
  display: block;
  margin: 0;
  padding: 0;
}

/* The test widget on the integrations page styles its labels with an id selector, so it needs one here: uppercase labels are 12 */
.md-typeset #it-connection label {
  font-size: var(--pt-fs-12);
}

/* Room for a diagram before it is drawn (hooks/mermaid_space.py sets --pt-mmd-h from the diagram text).
   An aspect ratio, so the reserved height shrinks with the column on a phone like the drawn diagram does. */
.md-typeset pre.mermaid[style*="--pt-mmd-h"] {
  aspect-ratio: 670 / var(--pt-mmd-h);
}

/* A diagram that is waiting to be drawn shows a quiet box, not its source text (only when scripts run, so without
   JS the source stays readable). If drawing fails the source comes back with a note. */
html.pt-js .md-typeset pre.mermaid[style*="--pt-mmd-h"]:not(.pt-mmd-failed) {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  background-color: var(--pt-bg-subtle);
}

html.pt-js .md-typeset pre.mermaid[style*="--pt-mmd-h"]:not(.pt-mmd-failed) > code {
  visibility: hidden;
}

html.pt-js .md-typeset pre.mermaid[style*="--pt-mmd-h"]:not(.pt-mmd-failed)::after {
  content: "Loading diagram\2026";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-text-secondary);
  font-family: var(--md-text-font-family);
  font-size: var(--pt-fs-14);
}

html.pt-js .md-typeset pre.mermaid.pt-mmd-failed {
  aspect-ratio: auto;
}

html.pt-js .md-typeset pre.mermaid.pt-mmd-failed::after {
  content: "Could not draw this diagram. The source is shown instead.";
  display: block;
  margin-top: 8px;
  color: var(--pt-text-secondary);
  font-family: var(--md-text-font-family);
  font-size: var(--pt-fs-12);
}

/* ══ Round 16: one type scale at every window width ══
   Material grows the root font size with the window (20px, 22px from 1600px, 24px from 2000px) and sizes lists, tabs,
   the header title and the search box in rem, so those grew while the px tokens did not. The root is now pinned to
   125% at every width (a percentage, so the browser's own text-size setting still scales everything) and the scale
   tokens are rem values of that root: 12 = .6rem, 14 = .7rem, 15 = .75rem, 16 = .8rem, 18 = .9rem, 20 = 1rem,
   24 = 1.2rem, 32 = 1.6rem. */
html {
  font-size: 125%;
}

.md-typeset {
  font-size: var(--pt-fs-16);
  line-height: 1.6;
}

.md-typeset :is(ul, ol, dl, li, dd, dt, p, blockquote) {
  font-size: inherit;
}

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

.md-tabs__link,
.md-nav__link,
.md-path__link,
.md-source-file,
.md-typeset summary {
  font-size: var(--pt-fs-14);
}

.md-header__title,
.md-footer__title {
  font-size: var(--pt-fs-18);
}

.md-search__input,
.md-search-result__article {
  font-size: var(--pt-fs-16);
}

/* Tracking by size: tighter on large type, a little open on small UI text; body stays at 0.
   h1 32 -0.015em, h2 24 -0.01em, h3 20 -0.005em, h4 and body 0, 12-14px UI text +0.005em. */
.md-typeset h1 { letter-spacing: -0.015em; font-weight: 650; }
.md-typeset h2 { letter-spacing: -0.01em; }
.md-typeset h3 { letter-spacing: -0.005em; }
.md-typeset h4, .md-typeset p, .md-typeset li { letter-spacing: 0; }

.md-tabs__link,
.md-nav__link,
.md-path__link,
.md-source-file,
.md-typeset table:not([class]) th,
.md-typeset summary {
  letter-spacing: 0.005em;
}

/* Leading by size: headings 1.2-1.25 (set above), body and lists 1.6, tables and UI text 1.45 */
.md-typeset table:not([class]) :is(th, td),
.md-nav__link,
.md-tabs__link,
.md-path__link {
  line-height: 1.45;
}

/* Task lists ("Handles:") carry no state, so their check marks match the text: 1em, softer green.
   The mark sits on the left edge of the paragraph above it, centred on the first line, and the text starts
   1.5em in (mark plus half an em), so the gap is the same at every size. */
.md-typeset ul.task-list {
  margin-left: 0;
  padding-left: 0;
}

.md-typeset ul.task-list > .task-list-item {
  position: relative;
  margin-left: 0;
  padding-left: 1.5em;
}

.md-typeset ul.task-list > .task-list-item > .task-list-control {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.6em;
}

.md-typeset ul.task-list .task-list-indicator::before {
  /* Material places the mark with absolute left/top of its own; put it at the control's origin, centred on line one */
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 1em;
  height: 1em;
  margin: 0;
}

.md-typeset [type="checkbox"]:checked + .task-list-indicator::before {
  background-color: var(--pt-get-fg);
  opacity: 0.8;
}

/* ══ Round 17: finishing pass ══ */

/* 1 + 6. "Endpoints at a glance": Material gives every summary a -0.6rem side margin, which pulled the title over the border.
   The title, the chevron and the first cell share one 14px inset; on phones each row stacks (chip and path, then purpose). */
.md-typeset details.pt-endpoint-summary > summary {
  margin: 0;
  padding: 10px 14px;
}

.md-typeset details.pt-endpoint-summary > summary::after {
  right: 14px;
}

.md-typeset .pt-endpoint-summary td:first-child {
  padding-left: 14px;
}

@media screen and (max-width: 37.5em) {
  .md-typeset .pt-endpoint-summary :is(table, tbody, tr) {
    display: block;
  }

  .md-typeset .pt-endpoint-summary table tr {
    padding: 8px 14px;
    border-top: 1px solid var(--pt-border);
  }

  .md-typeset .pt-endpoint-summary table td {
    display: inline;
    padding: 0;
    border: 0;
  }

  .md-typeset .pt-endpoint-summary table td:first-child {
    margin-right: 6px;
    padding-left: 0;
  }

  .md-typeset .pt-endpoint-summary table td:last-child {
    display: block;
    width: auto;
    max-width: none;
    margin-top: 2px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: var(--pt-fs-14);
    color: var(--pt-text-secondary);
  }

  .md-typeset .pt-endpoint-summary .pt-path {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* 2. Search results sit on the scale too: title 16, snippets 14, meta 12. Inline code is one step below the text it sits in
   (12 in snippets, 14 in the 16px title), the same chip style as body code. */
.md-search-result .md-search-result__article.md-typeset,
.md-search-result .md-search-result__article.md-typeset :is(h2, p, li, div, summary, details, mark, del, a, .md-search-result__terms, .md-search-result__teaser) {
  font-size: var(--pt-fs-14);
}

.md-search-result .md-search-result__article.md-typeset code {
  font-size: var(--pt-fs-12);
}

.md-search-result .md-search-result__article.md-typeset :is(h1, .md-search-result__title) code {
  font-size: var(--pt-fs-14);
}

/* 3. Heading permalink: a small link icon on hover and keyboard focus only (no stray pilcrow, nothing on :target) */
.md-typeset .headerlink {
  font-size: 0;
  opacity: 0;
  color: var(--pt-text-secondary);
  transform: none;
  transition: opacity 150ms var(--pt-ease-out);
}

.md-typeset .headerlink::before {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.4em;
  font-size: 1rem;
  background-color: currentColor;
  vertical-align: baseline;
  -webkit-mask: url("../assets/icons/link-variant.svg") center / contain no-repeat;
  mask: url("../assets/icons/link-variant.svg") center / contain no-repeat;
}

.md-typeset :is(h1, h2, h3, h4, h5, h6):hover > .headerlink,
.md-typeset .headerlink:focus-visible {
  color: var(--pt-text-secondary);
  opacity: 1;
}

.md-typeset :is(h1, h2, h3, h4, h5, h6):hover > .headerlink:hover {
  color: var(--pt-primary);
}

.md-typeset :target > .headerlink:not(:focus-visible):not(:hover) {
  opacity: 0;
}

/* 4. Admonitions: a soft tint of the type's colour, a 1px border in the same hue, the card radius, no thick stripe */
.md-typeset :is(.admonition, details:not(.pt-endpoint-summary)) {
  --pt-adm: 68, 138, 255;
  border: 1px solid rgba(var(--pt-adm), 0.4);
  border-radius: var(--pt-radius);
  background-color: rgba(var(--pt-adm), 0.07);
}

.md-typeset :is(.admonition, details):is(.note) { --pt-adm: 68, 138, 255; }
.md-typeset :is(.admonition, details):is(.abstract, .summary, .tldr) { --pt-adm: 0, 150, 220; }
.md-typeset :is(.admonition, details):is(.info, .todo) { --pt-adm: 0, 150, 175; }
.md-typeset :is(.admonition, details):is(.tip, .hint, .important) { --pt-adm: 0, 160, 140; }
.md-typeset :is(.admonition, details):is(.success, .check, .done) { --pt-adm: 0, 170, 70; }
.md-typeset :is(.admonition, details):is(.question, .help, .faq) { --pt-adm: 80, 180, 20; }
.md-typeset :is(.admonition, details):is(.warning, .caution, .attention) { --pt-adm: 240, 140, 0; }
.md-typeset :is(.admonition, details):is(.failure, .fail, .missing) { --pt-adm: 240, 70, 70; }
.md-typeset :is(.admonition, details):is(.danger, .error) { --pt-adm: 240, 30, 70; }
.md-typeset :is(.admonition, details):is(.bug) { --pt-adm: 240, 0, 90; }
.md-typeset :is(.admonition, details):is(.example) { --pt-adm: 124, 77, 255; }
.md-typeset :is(.admonition, details):is(.quote, .cite) { --pt-adm: 130, 130, 130; }

.md-typeset :is(.admonition > .admonition-title, details:not(.pt-endpoint-summary) > summary) {
  color: color-mix(in srgb, rgb(var(--pt-adm)) 45%, var(--pt-text));
  font-size: var(--pt-fs-14);
  font-weight: 600;
}

/* 5. Home cards: one icon family in the secondary colour, the title is the link, an arrow nudges on hover */
.md-typeset .pt-nav-cards > ul > li > p:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.md-typeset .pt-nav-cards > ul > li > p:first-child .twemoji {
  color: var(--pt-text-secondary);
}

.md-typeset .pt-nav-cards > ul > li > p:first-child .twemoji svg {
  width: 20px;
  height: 20px;
}

.md-typeset .pt-nav-cards > ul > li > p:first-child a {
  color: inherit;
}

.md-typeset .pt-nav-cards > ul > li > p:first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.md-typeset .pt-nav-cards > ul > li > p:first-child::after {
  content: "";
  width: 16px;
  height: 16px;
  background-color: var(--pt-text-secondary);
  -webkit-mask: url("../assets/icons/arrow-right.svg") center / contain no-repeat;
  mask: url("../assets/icons/arrow-right.svg") center / contain no-repeat;
  transition: transform 150ms var(--pt-ease-out);
}

.md-typeset .pt-nav-cards > ul > li:hover > p:first-child::after {
  transform: translateX(2px);
}

/* the generic card rule pushes the last paragraph to the bottom (margin-top: auto); here every description sits right under its title */
.md-typeset .grid.cards.pt-nav-cards > ul > li > p:last-child {
  margin-top: 0;
  padding-top: 0;
  color: var(--pt-text-secondary);
  font-size: var(--pt-fs-14);
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .pt-nav-cards > ul > li:hover > p:first-child::after {
    transform: none;
  }
}

.md-search-result__more > summary,
.md-search-result__more > summary div {
  font-size: var(--pt-fs-12);
}

/* ══ Endpoints at a glance: full purposes, columns that fit, no inner scroll ══
   The method and path columns take exactly their content (a path over 40 characters may wrap at "/"); the purpose takes
   the rest and wraps. A purpose gets a tooltip only when the hook had to shorten it. */
.md-typeset .pt-endpoint-summary table td:nth-child(2) {
  width: 1%;
  max-width: none;
}

.md-typeset .pt-endpoint-summary table td:last-child {
  width: auto;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.pt-endpoint-summary .pt-path {
  white-space: nowrap;
}

.pt-endpoint-summary .pt-path--long {
  white-space: normal;
}

.pt-endpoint-summary--long .pt-summary-scroll,
.pt-endpoint-summary .pt-summary-scroll {
  max-height: none;
  overflow: visible;
}

/* The method chip column hugs its chip (Material's cell padding made a wide gap before the path) */
@media screen and (min-width: 37.5em) {
  .md-typeset .pt-endpoint-summary table td:first-child {
    padding-right: 8px;
  }

  .md-typeset .pt-endpoint-summary table td:nth-child(2) {
    padding-left: 8px;
  }
}
