/* ==========================================================================
   Quadified TEO Docs — design system
   Direction "C · Markalı ürün": navy chrome, teal accent, Inter.
   Rename the file (new date) on every change — see DEPLOYMENT.md.
   Sections: 1 Tokens · 2 Chrome · 3 Sidebar & TOC · 4 Typography ·
             5 Admonitions & tables · 6 Content components (ported) ·
             7 API & cURL (ported) · 8 About diagram (ported) · 9 Home · 10 Small screens
   ========================================================================== */

/* 1. Tokens ================================================================ */
[data-md-color-scheme="default"] {
  --qd-navy: #0b1b33;
  --qd-navy-2: #13294a;
  --qd-navy-line: #1f3a63;
  --qd-on-navy: #ffffff;
  --qd-on-navy-muted: #9fb3cf;
  --qd-teal: #0f9f8f;
  --qd-teal-text: #0b7d71;
  --qd-teal-soft: rgba(15, 159, 143, 0.12);
  --qd-blue: #1f6feb;
  --qd-danger: #c2413b;
  --qd-warning: #b7791f;
  --qd-bg: #f7f9fc;
  --qd-surface: #ffffff;
  --qd-surface-muted: #f1f5fa;
  --qd-surface-elevated: #ffffff;
  --qd-text: #12203a;
  --qd-text-muted: #55657f;
  --qd-border: #e3e9f2;
  --qd-border-strong: #cfd9e6;
  --qd-shadow: 0 1px 2px rgba(11, 27, 51, 0.04), 0 8px 24px rgba(11, 27, 51, 0.06);
  --qd-nav-active-bg: var(--qd-navy);
  --qd-nav-active-fg: #ffffff;
}

[data-md-color-scheme="slate"] {
  --md-hue: 215;
  --qd-navy: #0b1628;
  --qd-navy-2: #12213a;
  --qd-navy-line: #1e3354;
  --qd-on-navy: #ffffff;
  --qd-on-navy-muted: #9fb3cf;
  --qd-teal: #2fd3b5;
  --qd-teal-text: #2fd3b5;
  --qd-teal-soft: rgba(47, 211, 181, 0.14);
  --qd-blue: #3aa0ff;
  --qd-danger: #f0736b;
  --qd-warning: #e7b24c;
  --qd-bg: #0f1621;
  --qd-surface: #141d2b;
  --qd-surface-muted: #1a2536;
  --qd-surface-elevated: #18222f;
  --qd-text: #e6edf6;
  --qd-text-muted: #9fb0c7;
  --qd-border: #23324a;
  --qd-border-strong: #2f4262;
  --qd-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --qd-nav-active-bg: var(--qd-teal-soft);
  --qd-nav-active-fg: var(--qd-teal-text);
}

/* Declared on both scheme selectors so var() resolves against that scheme's tokens. */
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --qd-radius: 10px;
  --qd-radius-sm: 6px;
  --qd-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --qd-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --md-primary-fg-color: var(--qd-navy);
  --md-primary-fg-color--light: var(--qd-navy-2);
  --md-primary-fg-color--dark: var(--qd-navy);
  --md-primary-bg-color: var(--qd-on-navy);
  --md-primary-bg-color--light: var(--qd-on-navy-muted);
  --md-accent-fg-color: var(--qd-teal);
  --md-accent-fg-color--transparent: var(--qd-teal-soft);
  --md-default-bg-color: var(--qd-bg);
  --md-default-fg-color: var(--qd-text);
  --md-default-fg-color--light: var(--qd-text-muted);
  --md-default-fg-color--lighter: var(--qd-border-strong);
  --md-default-fg-color--lightest: var(--qd-border);
  --md-typeset-color: var(--qd-text);
  --md-typeset-a-color: var(--qd-teal-text);
  --md-code-bg-color: var(--qd-surface-muted);
  --md-code-fg-color: var(--qd-text);
  --md-footer-bg-color: var(--qd-navy);
  --md-footer-bg-color--dark: var(--qd-navy);
}

body {
  background: var(--qd-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

/* 2. Chrome: header, tabs, search, footer ================================== */
.md-header {
  background: var(--qd-navy);
  color: var(--qd-on-navy);
  box-shadow: none;
}

.md-header__title {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.md-header__button.md-logo img {
  height: 1.3rem;
}

.md-tabs {
  background: var(--qd-navy);
  color: var(--qd-on-navy-muted);
  border-bottom: 1px solid var(--qd-navy-line);
}

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

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

.md-tabs__link {
  display: flex;
  height: 100%;
  align-items: center;
  margin-top: 0;
  border-bottom: 2px solid transparent;
  color: var(--qd-on-navy-muted);
  font-size: 0.7rem;
  font-weight: 550;
  opacity: 1;
  transition: color 150ms ease, border-color 150ms ease;
}

.md-tabs__link:hover,
.md-tabs__item--active .md-tabs__link {
  color: var(--qd-on-navy);
}

.md-tabs__item--active .md-tabs__link {
  border-bottom-color: var(--qd-teal);
}

.md-search__form {
  border-radius: 8px;
}

@media screen and (min-width: 60em) {
  .md-search__form {
    border: 1px solid var(--qd-navy-line);
    background: var(--qd-navy-2);
  }

  .md-search__form:hover {
    background: var(--qd-navy-line);
  }

  [data-md-toggle="search"]:checked ~ .md-header .md-search__form {
    border-color: var(--qd-border);
    background: var(--qd-surface);
  }
}

.md-footer {
  background: var(--qd-surface);
  color: var(--qd-text);
  border-top: 1px solid var(--qd-border);
}

.md-footer__inner {
  padding: 0.6rem 0;
}

.md-footer__link {
  border-radius: var(--qd-radius);
  transition: background 150ms ease;
}

.md-footer__link:hover {
  background: var(--qd-surface-muted);
  opacity: 1;
}

.md-footer__title,
.md-footer__button {
  color: var(--qd-text);
}

.md-footer__direction {
  color: var(--qd-text-muted);
  opacity: 1;
}

.md-footer-meta {
  background: var(--qd-navy);
  color: var(--qd-on-navy-muted);
}

/* 3. Sidebar & table of contents ========================================== */
.md-main__inner {
  margin-top: 1.2rem;
}

/* Material sets the sidebar height from JS on every scroll frame. During a fast scroll or the macOS
   overscroll bounce the height lags, and on a short page the navigation paints over the footer.
   Clip keeps it inside the main area; unlike hidden it is not a scroll container, so sticky still works. */
.md-main {
  overflow-y: clip;
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary .md-nav__link {
    margin-top: 0.1rem;
    padding: 0.28rem 0.6rem;
    border-radius: var(--qd-radius-sm);
    color: var(--qd-text-muted);
    font-size: 0.68rem;
    transition: background 150ms ease, color 150ms ease;
  }

  .md-sidebar--primary .md-nav__link[href]:hover,
  .md-sidebar--primary .md-nav__link[for]:hover {
    background: var(--qd-surface-muted);
    color: var(--qd-text);
  }

  .md-sidebar--primary .md-nav__link--active,
  .md-sidebar--primary .md-nav__link--active:hover {
    background: var(--qd-nav-active-bg);
    color: var(--qd-nav-active-fg);
    font-weight: 600;
  }

  /* navigation.sections group headings */
  .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link,
  .md-nav__item--section > .md-nav__link {
    margin-top: 1rem;
    color: var(--qd-text-muted);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .md-nav__item--section > .md-nav__link:hover {
    background: transparent;
  }
}

.md-nav--secondary .md-nav__title {
  color: var(--qd-text-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: transparent;
  box-shadow: none;
}

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

.md-nav--secondary .md-nav__link {
  margin-top: 0.35rem;
  padding-left: 0.6rem;
  color: var(--qd-text-muted);
  font-size: 0.64rem;
}

.md-nav--secondary .md-nav__link--active,
.md-nav--secondary .md-nav__link:hover {
  color: var(--qd-teal-text);
}

/* 4. Typography ============================================================ */
.md-typeset {
  color: var(--qd-text);
  font-size: 0.75rem;
  line-height: 1.73;
}

@media screen and (min-width: 76.25em) {
  .md-content__inner {
    max-width: 40rem;
  }
}

.md-path {
  margin: 0 0 0.3rem;
  font-size: 0.62rem;
}

.md-path__link {
  color: var(--qd-text-muted);
}

.md-path__link:hover {
  color: var(--qd-teal-text);
}

.md-typeset h1 {
  margin: 0 0 1rem;
  color: var(--qd-text);
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.md-typeset h2 {
  margin: 2.2rem 0 0.8rem;
  color: var(--qd-text);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.36;
}

.md-typeset h3 {
  margin: 1.6rem 0 0.6rem;
  color: var(--qd-text);
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.53;
}

.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  color: var(--qd-text);
  font-size: 0.75rem;
  font-weight: 650;
}

.md-typeset strong {
  color: var(--qd-text);
  font-weight: 650;
}

.md-typeset a {
  color: var(--qd-teal-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 150ms ease;
}

.md-typeset a:hover,
.md-typeset a:focus {
  color: var(--qd-teal-text);
  text-decoration-color: currentColor;
}

.md-typeset .headerlink {
  color: var(--qd-border-strong);
  text-decoration: none;
}

.md-typeset code,
.md-typeset kbd {
  padding: 0.1em 0.4em;
  border: 1px solid var(--qd-border);
  border-radius: 5px;
  background: var(--qd-surface-muted);
  color: var(--qd-text);
  font-size: 0.85em;
}

.md-typeset pre {
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  overflow: hidden;
}

.md-typeset pre > code {
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 0;
}

.md-typeset blockquote {
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--qd-teal);
  border-radius: 0 var(--qd-radius-sm) var(--qd-radius-sm) 0;
  background: var(--qd-surface-muted);
  color: var(--qd-text-muted);
}

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

/* 5. Admonitions & tables ================================================== */
.md-typeset .admonition,
.md-typeset details {
  border: 1px solid var(--qd-border);
  border-left: 4px solid var(--qd-blue);
  border-radius: var(--qd-radius-sm);
  background: var(--qd-surface);
  box-shadow: none;
  font-size: 0.7rem;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background: transparent !important;
  font-weight: 650;
}

.md-typeset .admonition-title::before,
.md-typeset summary::before {
  background-color: var(--qd-blue) !important;
}

.md-typeset :is(.tip, .success, .check, .done, .hint) {
  border-left-color: var(--qd-teal);
}

.md-typeset :is(.tip, .success, .check, .done, .hint) > :is(.admonition-title, summary)::before {
  background-color: var(--qd-teal) !important;
}

.md-typeset :is(.warning, .caution, .attention, .important) {
  border-left-color: var(--qd-warning);
}

.md-typeset :is(.warning, .caution, .attention, .important) > :is(.admonition-title, summary)::before {
  background-color: var(--qd-warning) !important;
}

.md-typeset :is(.danger, .error, .failure, .fail, .missing, .bug) {
  border-left-color: var(--qd-danger);
}

.md-typeset :is(.danger, .error, .failure, .fail, .missing, .bug) > :is(.admonition-title, summary)::before {
  background-color: var(--qd-danger) !important;
}

.md-typeset table:not([class]) {
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  background: var(--qd-surface);
  box-shadow: none;
  font-size: 0.68rem;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: var(--qd-surface-muted);
  border-bottom: 1px solid var(--qd-border);
  color: var(--qd-text);
  font-size: 0.64rem;
  font-weight: 650;
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--qd-border);
  color: var(--qd-text-muted);
  vertical-align: top;
}

.md-typeset table:not([class]) td:first-child {
  color: var(--qd-text);
  font-weight: 550;
}

.md-typeset table:not([class]) tbody tr:hover {
  background: var(--qd-surface-muted);
  box-shadow: none;
}

/* 6. Content components (ported verbatim from extra.v20260511.css) ========= */
.md-typeset p > img:only-child,
.md-typeset .test img,
.md-typeset .test2 img {
  display: block;
  /* fill the column, but never upscale past the screenshot's own resolution —
     small captures (toasts, badges) would otherwise stretch and blur */
  width: auto;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  box-shadow: var(--qd-shadow);
}

.md-typeset td img {
  max-width: 100%;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

.wide-image {
  width: 100%;
}

.middle-block,
.xml-block {
  width: 100%;
  margin: 1rem 0;
  padding: 0.95rem;
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  background: var(--qd-surface-muted);
  color: var(--qd-text);
  font-family: var(--qd-mono);
  font-size: 0.68rem;
  line-height: 1.55;
  overflow: auto;
}

.xml-block {
  max-height: 760px;
}

.test,
.test2 {
  display: flex;
  width: min(100%, 980px);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.test2 {
  width: min(100%, 720px);
}

.md-typeset .device-note {
  padding: 0.85rem 1rem;
  border: 1px solid var(--qd-border);
  border-left: 4px solid var(--md-accent-fg-color);
  border-radius: var(--qd-radius);
  background: var(--qd-surface);
}

/* p > img.device-screenshot: the generic `p > img:only-child` rule above is more specific and
   would otherwise let phone screenshots grow to the full column width. */
.md-typeset .device-screenshot,
.md-typeset p > img.device-screenshot {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
}

/* constrained UI screenshots (panels, buttons, toolbars) */
.md-typeset .ui-screenshot {
  display: block;
  width: auto;
  max-width: min(100%, 640px);
  height: auto;
  border-radius: 6px;
}

/* Small UI captures — toasts, badges, a single list row. Captured on a 2x
   display, so capping the rendered width keeps them near their true on-screen
   size instead of stretching them across the column. */
.md-typeset p > img.ui-detail:only-child {
  width: auto;
  max-width: min(100%, 26rem);
}

/* Wider details: a list row or an execution strip. */
.md-typeset p > img.ui-strip:only-child {
  width: auto;
  max-width: min(100%, 34rem);
}

.md-typeset .device-screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-width: 760px;
  gap: 0.75rem;
  align-items: start;
  margin: 1rem 0;
}

.md-typeset .device-screenshot-grid img {
  width: 100%;
  max-width: 220px;
  height: auto;
}

/* 8. About diagram (ported verbatim from extra.v20260511.css) ================ */
.md-typeset .teo-engines {
  position: relative;
  /* break out of the narrow content column to use full reading width */
  width: min(96vw, 1400px);
  margin-left: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(120% 120% at 50% 38%, #2a2ab0 0%, #16166f 55%, #0d0d4f 100%);
  border: 1px solid rgba(120,140,255,.18);
  border-radius: 20px;
  padding: 3.5rem 3rem;
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(8,8,60,.8);
}
/* subtle dotted texture */
.md-typeset .teo-engines::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(120,150,255,.12) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
  pointer-events: none;
}

.md-typeset .teo-engines__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px) 1fr;
  grid-template-rows: auto auto;
  gap: 2.5rem 3rem;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.md-typeset .teo-engine--dae { grid-column: 1; grid-row: 1; text-align: right; }
.md-typeset .teo-engine--ave { grid-column: 3; grid-row: 1; text-align: left;  }
.md-typeset .teo-engine--ape { grid-column: 1; grid-row: 2; text-align: right; }
.md-typeset .teo-engine--gas { grid-column: 3; grid-row: 2; text-align: left;  }
.md-typeset .teo-engines__center { grid-column: 2; grid-row: 1 / span 2; }

.md-typeset .teo-engine h3 {
  color: #2ee6a6;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin: 0 0 .55rem;
  text-shadow: 0 0 18px rgba(46,230,166,.35);
}
.md-typeset .teo-engine p {
  color: #d9ddff;
  font-size: .92rem;
  line-height: 1.6;
  margin: 0;
}
.md-typeset .teo-engine strong { color: #ffffff; font-weight: 700; }

/* ---- central cluster ---- */
.md-typeset .teo-engines__center {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* connecting lines behind gears */
.md-typeset .teo-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.md-typeset .teo-links line {
  stroke: rgba(120,160,255,.35);
  stroke-width: .6;
  stroke-dasharray: 2 2;
}

/* gear silhouette via SVG mask (24 teeth) */
.md-typeset .teo-gear {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  -webkit-mask: var(--gear-mask) center / contain no-repeat;
          mask: var(--gear-mask) center / contain no-repeat;
  background:
    conic-gradient(from 0deg, #3b74ff, #2452d6, #1b3fb0, #2452d6, #3b74ff);
  filter: drop-shadow(0 0 16px rgba(59,116,255,.55));
  animation: teo-spin 26s linear infinite;
}
.md-typeset .teo-gear--ave,
.md-typeset .teo-gear--gas { animation-direction: reverse; }
.md-typeset .teo-gear--core { animation-duration: 40s; }

/* inner disc (counter-rotates so label stays upright) */
.md-typeset .teo-gear__face {
  display: grid;
  place-items: center;
  width: 64%;
  height: 64%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #3358d8 0%, #122064 78%);
  box-shadow:
    inset 0 2px 10px rgba(255,255,255,.18),
    inset 0 -6px 16px rgba(0,0,0,.5),
    0 0 0 2px rgba(90,130,255,.25);
  animation: teo-spin 26s linear infinite reverse;
}
.md-typeset .teo-gear--ave .teo-gear__face,
.md-typeset .teo-gear--gas .teo-gear__face { animation-direction: normal; }
.md-typeset .teo-gear--core .teo-gear__face {
  animation-duration: 40s;
  background: radial-gradient(circle at 50% 38%, #2447c4 0%, #0b1450 80%);
  width: 70%; height: 70%;
}
.md-typeset .teo-gear__label {
  color: #2ee6a6;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(46,230,166,.55);
}

/* gear mask shape — 24-tooth gear */
.md-typeset .teo-gear {
  --gear-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23000' d='M50 2c2 0 3.6 1.5 3.9 3.5l.9 6.3a38 38 0 0 1 8 3.3l5.1-3.8c1.6-1.2 3.9-1 5.3.4l3.3 3.3c1.4 1.4 1.6 3.7.4 5.3l-3.8 5.1a38 38 0 0 1 3.3 8l6.3.9c2 .3 3.5 1.9 3.5 3.9v4.6c0 2-1.5 3.6-3.5 3.9l-6.3.9a38 38 0 0 1-3.3 8l3.8 5.1c1.2 1.6 1 3.9-.4 5.3l-3.3 3.3c-1.4 1.4-3.7 1.6-5.3.4l-5.1-3.8a38 38 0 0 1-8 3.3l-.9 6.3c-.3 2-1.9 3.5-3.9 3.5h-4.6c-2 0-3.6-1.5-3.9-3.5l-.9-6.3a38 38 0 0 1-8-3.3l-5.1 3.8c-1.6 1.2-3.9 1-5.3-.4l-3.3-3.3c-1.4-1.4-1.6-3.7-.4-5.3l3.8-5.1a38 38 0 0 1-3.3-8l-6.3-.9C3.5 53.6 2 52 2 50v-4.6c0-2 1.5-3.6 3.5-3.9l6.3-.9a38 38 0 0 1 3.3-8l-3.8-5.1c-1.2-1.6-1-3.9.4-5.3l3.3-3.3c1.4-1.4 3.7-1.6 5.3-.4l5.1 3.8a38 38 0 0 1 8-3.3l.9-6.3C41.4 3.5 43 2 45 2z'/%3E%3C/svg%3E");
}

/* positions — diagonal cross like the reference */
.md-typeset .teo-gear--core { width: 42%; height: 42%; top: 29%; left: 29%; z-index: 2; }
.md-typeset .teo-gear--core .teo-gear__label { font-size: 1.6rem; }
.md-typeset .teo-gear--dae  { width: 30%; height: 30%; top: 2%;   left: 4%;   }
.md-typeset .teo-gear--ave  { width: 27%; height: 27%; top: 6%;   left: 69%;  }
.md-typeset .teo-gear--ape  { width: 28%; height: 28%; top: 70%;  left: 6%;   }
.md-typeset .teo-gear--gas  { width: 25%; height: 25%; top: 73%;  left: 71%;  }
.md-typeset .teo-gear__label { font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  .md-typeset .teo-gear,
  .md-typeset .teo-gear__face { animation: none; }
}

@keyframes teo-spin { to { transform: rotate(360deg); } }

/* stack on small screens */
@media screen and (max-width: 768px) {
  .md-typeset .teo-engines { padding: 2.2rem 1.2rem; }
  .md-typeset .teo-engines__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .md-typeset .teo-engine--dae,
  .md-typeset .teo-engine--ave,
  .md-typeset .teo-engine--ape,
  .md-typeset .teo-engine--gas {
    grid-column: 1; grid-row: auto; text-align: center;
  }
  .md-typeset .teo-engines__center {
    grid-column: 1; grid-row: auto; order: -1; max-width: 300px;
  }
}

/* 9. Home ================================================================== */
@media screen and (min-width: 60em) {
  .md-content__inner:has(> .docs-hero) {
    max-width: 64rem;
    margin-right: auto;
    margin-left: auto;
  }
}

.md-content__inner:has(> .docs-hero) > h1:first-child {
  display: none;
}

.md-typeset .docs-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin: 0 0 2.4rem;
  padding: 2.4rem;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(47, 211, 181, 0.22), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(58, 160, 255, 0.18), transparent 50%),
    var(--qd-navy);
  color: var(--qd-on-navy);
  overflow: hidden;
}

.md-typeset .docs-kicker {
  margin: 0 0 0.6rem;
  color: var(--qd-teal-text);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.md-typeset .docs-hero .docs-kicker {
  color: #2fd3b5;
}

.md-typeset .docs-hero h1 {
  margin: 0 0 0.9rem;
  color: #ffffff;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.md-typeset .docs-hero__lead {
  margin: 0 0 1.4rem;
  color: #c9d6e8;
  font-size: 0.8rem;
  line-height: 1.65;
}

.md-typeset .docs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.md-typeset .docs-hero__shortcuts {
  display: grid;
  gap: 0.6rem;
}

.md-typeset .docs-shortcut {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--qd-radius);
  background: rgba(255, 255, 255, 0.05);
  color: #c9d6e8;
  font-size: 0.64rem;
  line-height: 1.5;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.md-typeset .docs-shortcut strong {
  color: #ffffff;
  font-size: 0.74rem;
}

.md-typeset .docs-shortcut .docs-card__eyebrow {
  color: #2fd3b5;
}

.md-typeset .docs-shortcut:hover,
.md-typeset .docs-shortcut:focus {
  border-color: rgba(47, 211, 181, 0.55);
  background: rgba(255, 255, 255, 0.09);
  color: #c9d6e8;
  text-decoration: none;
  transform: translateY(-1px);
}

.md-typeset .docs-card__eyebrow {
  color: var(--qd-teal-text);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.md-typeset .docs-section {
  margin: 0 0 2.4rem;
}

.md-typeset .docs-section__heading h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.md-typeset .docs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.md-typeset .docs-card {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  background: var(--qd-surface);
  color: var(--qd-text-muted);
  font-size: 0.66rem;
  line-height: 1.55;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.md-typeset .docs-card strong {
  color: var(--qd-text);
  font-size: 0.78rem;
}

.md-typeset .docs-card:hover,
.md-typeset .docs-card:focus {
  border-color: var(--qd-teal);
  box-shadow: var(--qd-shadow);
  color: var(--qd-text-muted);
  text-decoration: none;
  transform: translateY(-2px);
}

.md-typeset .docs-section--split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.md-typeset .docs-workflow {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: qd-step;
}

.md-typeset .docs-workflow li {
  position: relative;
  margin: 0 0 0.8rem;
  padding-left: 2.2rem;
  color: var(--qd-text-muted);
  counter-increment: qd-step;
}

.md-typeset .docs-workflow li::before {
  content: counter(qd-step);
  position: absolute;
  top: 0.05rem;
  left: 0;
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--qd-navy);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
}

[data-md-color-scheme="slate"] .md-typeset .docs-workflow li::before {
  background: var(--qd-teal);
  color: #0b1b33;
}

.md-typeset .docs-workflow strong {
  display: block;
}

.md-typeset .docs-callout {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--qd-border);
  border-top: 3px solid var(--qd-teal);
  border-radius: var(--qd-radius);
  background: var(--qd-surface);
  font-size: 0.68rem;
}

.md-typeset .docs-callout p {
  margin: 0;
  color: var(--qd-text-muted);
}

.md-typeset .docs-home-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--qd-border);
  color: var(--qd-text-muted);
  font-size: 0.62rem;
}

/* 10. Small screens ========================================================= */
@media screen and (max-width: 59.9375em) {
  .md-typeset .docs-hero,
  .md-typeset .docs-section--split {
    grid-template-columns: 1fr;
  }

  .md-typeset .docs-hero {
    padding: 1.5rem 1.2rem;
  }

  .md-typeset .docs-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 38em) {
  .md-typeset .docs-card-grid {
    grid-template-columns: 1fr;
  }

  .md-typeset .docs-home-footer {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* Defensive guard against horizontal scroll (ported from the old A-01 fix). */
@media screen and (max-width: 48em) {
  .md-main__inner,
  .md-content,
  .md-content__inner,
  .md-typeset {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .md-typeset h1,
  .md-typeset p {
    overflow-wrap: anywhere;
  }
}

/* A kicker label sits directly on top of its heading. */
.md-typeset .docs-kicker + h2 {
  margin-top: 0;
}

/* Visible keyboard focus on header controls. The palette toggle focuses a hidden radio, so the ring goes on its label; search rings the whole form. */
.md-header__button:focus-visible,
.md-header .md-option:focus-visible + .md-header__button,
.md-search__form:has(.md-search__input:focus-visible) {
  outline: 2px solid var(--qd-teal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Mobile drawer: section titles (the "back" rows) in brand navy, so they read as navigation. */
@media screen and (max-width: 76.1875em) {
  .md-nav--primary .md-nav[data-md-level] > .md-nav__title {
    background: var(--qd-navy);
    color: var(--qd-on-navy);
  }

  .md-nav--primary .md-nav[data-md-level] > .md-nav__title .md-nav__icon {
    color: var(--qd-on-navy);
  }
}

/* Function badge (tools/normalize_functions.py writes `{: .qd-function }`). */
.md-typeset p.qd-function {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--qd-border);
  border-radius: 999px;
  background: var(--qd-teal-soft);
  font-size: 0.64rem;
}

.md-typeset p.qd-function strong {
  color: var(--qd-text-muted);
  font-weight: 600;
}

.md-typeset p.qd-function code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--qd-teal-text);
  font-size: 0.95em;
  font-weight: 700;
}

/* Parameter tables (the page script marks their wrapper .qd-params): monospace names.
   A sticky header is not possible here: Material wraps tables in an overflow-x scroller. */
.md-typeset .qd-params td:first-child {
  font-family: var(--qd-mono);
  font-size: 0.64rem;
}

/* Column widths of the function parameter tables (Parameter Name | Description | Example Values |
   Required | Default Value): the description gets the room, Required and Default Value stay as
   narrow as their content, long example URLs wrap. */
.md-typeset .qd-params table {
  width: 100%;
}

.md-typeset .qd-params :is(th, td):first-child {
  white-space: nowrap;
}

.md-typeset .qd-params :is(th, td):nth-child(2) {
  min-width: 12rem;
  width: 50%;
}

.md-typeset .qd-params :is(th, td):nth-child(3) {
  min-width: 7.5rem;
  max-width: 11rem;
  overflow-wrap: anywhere;
}

.md-typeset .qd-params :is(th, td):nth-child(n+4) {
  width: 1%;
  min-width: 0; /* Material gives every th min-width: 5rem */
  padding-left: 0.6em;
  padding-right: 0.6em;
}

.md-typeset .qd-params td:nth-child(n+4) {
  white-space: nowrap;
}

/* "Required" column values (labelRequiredColumns in the page script). */
.md-typeset .qd-req {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.md-typeset .qd-req--yes {
  background: rgba(194, 65, 59, 0.12);
  color: var(--qd-danger);
}

.md-typeset .qd-req--no {
  background: var(--qd-surface-muted);
  color: var(--qd-text-muted);
}

/* Numbered steps: top-level ordered lists in a page body get round step numbers.
   counter(list-item) honours <ol start="…">, so split lists keep their numbering. */
[dir] .md-typeset > ol {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}

/* [dir] matches Material's own `[dir=ltr] .md-typeset ol li` indent, which would otherwise win. */
[dir] .md-typeset > ol > li {
  position: relative;
  margin-left: 0;
  padding-left: 2.1rem;
}

.md-typeset > ol > li::before {
  content: counter(list-item);
  position: absolute;
  top: 0.1rem;
  left: 0;
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--qd-teal-soft);
  color: var(--qd-teal-text);
  font-size: 0.62rem;
  font-weight: 700;
}


/* 7. API reference ========================================================= */
/* Method colours: white text on each is >= 4.5:1, so they work in both schemes. */
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --qd-get: #1f6feb;
  --qd-post: #16803c;
  --qd-put: #975a16;
  --qd-delete: #c2413b;
}

[data-md-color-scheme="default"] {
  --qd-status-ok: #15803d;
  --qd-status-error: #b91c1c;
  --qd-blue-text: #1a5fd0; /* --qd-blue is 4.4:1 on the page background; text needs darker */
}

[data-md-color-scheme="slate"] {
  --qd-status-ok: #4ade80;
  --qd-status-error: #f87171;
  --qd-blue-text: #3aa0ff;
}

/* Endpoint card: a clickable header (method, path, copy) over a collapsible body. */
.md-typeset .container {
  margin: 0.6rem 0 1.6rem;
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  background: var(--qd-surface);
  overflow: hidden;
}

.md-typeset .container > .header {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: var(--qd-surface) !important; /* the markup carries inline pastel backgrounds */
  cursor: pointer;
  transition: background 150ms ease;
}

.md-typeset .container > .header:hover,
.md-typeset .container > .header:focus-visible {
  background: var(--qd-surface-muted) !important;
  outline: 0;
}

.md-typeset .container > .header:focus-visible {
  box-shadow: inset 0 0 0 2px var(--qd-teal);
}

.md-typeset .container.is-open > .header {
  border-bottom: 1px solid var(--qd-border);
}

.md-typeset .btn {
  flex: 0 0 auto;
  min-width: 3.6rem;
  margin: 0;
  padding: 0.28rem 0.5rem;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font: 700 0.58rem/1 var(--qd-mono);
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.md-typeset .get-button { background: var(--qd-get); }
.md-typeset .post-button { background: var(--qd-post); }
.md-typeset .put-button { background: var(--qd-put); }
.md-typeset .delete-button { background: var(--qd-delete); }

.md-typeset .endpoint {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: var(--qd-text);
  font: 600 0.7rem/1.4 var(--qd-mono);
  overflow-wrap: anywhere;
}

.copy-icon-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.copy-icon {
  display: inline-grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--qd-text-muted);
  cursor: pointer;
  font-size: 0.66rem;
  opacity: 0.55;
  transition: opacity 150ms ease, border-color 150ms ease;
}

.md-typeset .container > .header:hover .copy-icon,
.copy-icon:focus-visible {
  border-color: var(--qd-border);
  opacity: 1;
  outline: 0;
}

.copied-message {
  position: absolute;
  left: calc(100% + 0.4rem);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: var(--qd-navy);
  color: #ffffff;
  font: 600 0.56rem/1.4 var(--qd-sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  white-space: nowrap;
}

.copied-message.show {
  opacity: 1;
}

.md-typeset .toggle-icon {
  display: grid;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: auto;
  place-items: center;
  border-radius: 6px;
  color: var(--qd-text-muted);
  font-size: 0.6rem;
}

.md-typeset .content {
  display: none;
  padding: 0.4rem 1rem 1rem;
}

.md-typeset .parameters,
.md-typeset .responses,
.md-typeset .request-body {
  overflow-x: auto;
}

.md-typeset .container .content h3,
.md-typeset .container .content h4 {
  margin: 1rem 0 0.5rem;
  color: var(--qd-text-muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Material wraps tables in an inline-block .md-typeset__table; inside a card they fill it. */
.md-typeset .container .md-typeset__table {
  display: block;
}

.md-typeset .container .content table {
  display: table;
  width: 100%;
}

/* Status codes carry inline green/red; give them readable shades in both schemes. */
.md-typeset .responses td > span[style*="green"] {
  color: var(--qd-status-ok) !important;
  font-family: var(--qd-mono);
  font-weight: 700;
}

.md-typeset .responses td > span[style*="red"] {
  color: var(--qd-status-error) !important;
  font-family: var(--qd-mono);
  font-weight: 700;
}

.md-typeset .code-block {
  max-height: 420px;
  overflow: auto;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--qd-navy-line);
  border-radius: var(--qd-radius-sm);
  background: var(--qd-navy);
  color: #f8fafc;
  font: 0.64rem/1.55 var(--qd-mono);
  word-break: break-word;
}

/* Inline colours written into the content (status codes, role names, "required" marks) are
   mapped onto the palette so they stay readable in both schemes; code blocks override below. */
.md-typeset span[style*="red"] {
  color: var(--qd-status-error) !important;
}

.md-typeset span[style*="green"] {
  color: var(--qd-status-ok) !important;
}

.md-typeset span[style*="lightblue"] {
  color: var(--qd-teal-text) !important;
}

.md-typeset span[style*="color:blue"],
.md-typeset span[style*="color: blue"] {
  color: var(--qd-blue-text) !important;
}

/* Example JSON carries inline red (numbers) and green (strings): readable shades on navy (>= 6:1). */
.md-typeset .code-block span[style*="color: red"] {
  color: #f87171 !important;
}

.md-typeset .code-block span[style*="color: green"] {
  color: #4ade80 !important;
}

/* The example JSON is a <pre> inside .code-block: only the outer box is drawn. */
.md-typeset .code-block pre {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: pre-wrap;
}

.parameter-input {
  box-sizing: border-box;
  width: 100%;
  margin: 0.35rem 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--qd-border);
  border-radius: 6px;
  background: var(--qd-surface);
  color: var(--qd-text);
}

/* Section links (API overview and cURL page). */
.md-typeset .api-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}

.md-typeset .api-section-grid a {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius-sm);
  background: var(--qd-surface);
  color: var(--qd-text);
  font-size: 0.66rem;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease;
}

.md-typeset .api-section-grid a:hover,
.md-typeset .api-section-grid a:focus-visible {
  border-color: var(--qd-teal);
  color: var(--qd-teal-text);
}

/* cURL page: list items rebuilt into cards by styleCurlBadges(). */
.md-typeset ul:has(> li.curl-command-item) {
  margin-left: 0;
  padding-left: 0;
}

.md-typeset li.curl-command-item {
  margin: 0.6rem 0 0.9rem;
  list-style: none;
}

[dir] .md-typeset li.curl-command-item {
  margin-left: 0;
}

.md-typeset .curl-example {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--qd-border);
  border-radius: var(--qd-radius);
  background: var(--qd-surface);
  min-width: 0;
}

.md-typeset .curl-endpoint-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
}

.md-typeset .curl-endpoint-row .endpoint {
  flex: 1 1 auto;
}

.curl-copy-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.curl-copy-button {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--qd-border);
  border-radius: 6px;
  background: var(--qd-surface);
  color: var(--qd-text);
  cursor: pointer;
  font: 650 0.58rem/1.4 var(--qd-sans);
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease;
}

.curl-copy-button:hover,
.curl-copy-button:focus-visible {
  border-color: var(--qd-teal);
  color: var(--qd-teal-text);
  outline: 0;
}

.curl-copy-container .copied-message {
  right: calc(100% + 0.4rem);
  left: auto;
}

.md-typeset .curl-code-block {
  margin: 0 !important;
  min-width: 0;
}

.md-typeset .curl-code-block code {
  font-size: 0.62rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.md-typeset .curl-code-block .md-clipboard,
.md-typeset .curl-code-block .md-code__nav {
  display: none; /* the card has its own "Copy cURL" button */
}

@media screen and (max-width: 38em) {
  .md-typeset .container > .header {
    flex-wrap: wrap;
  }
}

/* Home hero buttons — restored verbatim: the phase-3 prune pattern '-button' removed them. */

.md-typeset .docs-button {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.md-typeset .docs-button:hover,
.md-typeset .docs-button:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.md-typeset .docs-button--primary,
.md-typeset .docs-button--primary:hover,
.md-typeset .docs-button--primary:focus {
  border-color: #2fd3b5;
  background: #2fd3b5;
  color: #0b1b33;
}

.md-typeset .docs-button--primary:hover {
  background: #5fe0c8;
}

.md-typeset .docs-search-button kbd {
  margin-left: 0.4rem;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #c9d6e8;
  font-size: 0.6rem;
}
