/*
 * API e webhooks (akrus.business/desenvolvedores), 21/11/2026, Lady.
 * Referência no molde de Stripe, Resend e Mercury: índice fixo à esquerda, texto no meio, código fixo à direita.
 * Material do site Business: obsidiana, lajes com aresta acesa e uma luz só (bento aprovado), azul do dial como acento.
 * Sem estilo embutido no HTML (CSP do site: style-src 'self').
 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dx {
  --dx-bg: var(--grafite-950);
  --dx-slab: #0b0b0d;
  --dx-line: rgb(255 255 255 / 0.08);
  --dx-line-2: rgb(255 255 255 / 0.14);
  --dx-fg: var(--grafite-50);
  --dx-fg-2: var(--grafite-200);
  --dx-fg-3: var(--grafite-400);
  --dx-accent: var(--blue-300);
  --dx-top: calc(var(--nav-h, 64px) + 20px);
  background: var(--dx-bg);
  color: var(--dx-fg-2);
}
.dx code {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.88em;
}
.dx :where(p, li, dd) code,
.dx :where(td, th) code,
.dx-chip code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--dx-line);
  border-radius: 5px;
  background: rgb(255 255 255 / 0.04);
  color: var(--dx-fg);
  overflow-wrap: anywhere;
}
.dx a {
  color: var(--dx-fg);
  text-decoration-color: color-mix(in srgb, var(--dx-accent) 60%, transparent);
  text-underline-offset: 3px;
}
.dx a:hover { text-decoration-color: var(--dx-accent); }
.dx a:focus-visible,
.dx button:focus-visible,
.dx summary:focus-visible,
.dx [tabindex="0"]:focus-visible {
  outline: 2px solid var(--dx-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Abertura ─────────────────────────────────────────────────── */
.dx-hero {
  position: relative;
  padding: calc(var(--nav-h, 64px) + clamp(48px, 7vw, 96px)) 0 clamp(56px, 7vw, 96px);
  border-bottom: 1px solid var(--dx-line);
  background:
    radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--blue-600) 18%, transparent) 0%, transparent 70%),
    var(--dx-bg);
  overflow: hidden;
}
.dx-hero__inner,
.dx-close__inner {
  width: min(1320px, 100% - clamp(40px, 8vw, 96px));
  margin-inline: auto;
}
.dx-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.dx-crumbs { margin-bottom: 28px; }
.dx-hero__title,
.dx-close__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(44px, 5.6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--dx-fg);
  text-wrap: balance;
}
.dx-hero__title span,
.dx-close__title span {
  display: block;
  color: var(--grafite-400);
}
.dx-hero__sub,
.dx-close__sub {
  max-width: 46ch;
  margin: 24px 0 0;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--dx-fg-2);
  text-wrap: pretty;
}
.dx-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.dx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.dx a.dx-btn--light { background: var(--white); color: var(--grafite-950); }
.dx a.dx-btn--light:hover { background: var(--grafite-100); }
.dx a.dx-btn--ghost {
  border: 1px solid rgb(255 255 255 / 0.22);
  color: var(--dx-fg);
}
.dx a.dx-btn--ghost:hover { border-color: rgb(255 255 255 / 0.5); }
.dx-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--dx-line);
}
.dx-hero__meta dt {
  font-size: 14px;
  color: var(--dx-fg-3);
}
.dx-hero__meta dd {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--dx-fg);
}
.dx-hero__meta dd code { padding: 0; border: 0; background: none; font-size: 15px; }
.dx-hero__inner { align-items: start; }
.dx-hero__code { padding-top: 40px; }
.dx-hero__code .dx-code { box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.04); }

/* ── Índice ───────────────────────────────────────────────────── */
.dx-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  width: min(1440px, 100% - clamp(40px, 6vw, 80px));
  margin-inline: auto;
  align-items: start;
}
.dx-toc {
  position: sticky;
  top: var(--dx-top);
  max-height: calc(100vh - var(--dx-top) - 16px);
  overflow-y: auto;
  padding: 48px 8px 32px 0;
  scrollbar-width: thin;
  transition: top 0.38s cubic-bezier(0.2, 0, 0, 1);
}
:root.is-chrome-hidden .dx-toc { top: 20px; max-height: calc(100vh - 36px); }
.dx-toc__title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dx-accent);
}
.dx-toc__list,
.dx-toc__list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dx-toc__list ul { margin: 2px 0 8px 12px; border-left: 1px solid var(--dx-line); }
.dx-toc__list ul ul { margin-left: 0; border-left: 0; }
.dx-toc__res > li > a { color: var(--dx-fg-2); font-weight: 500; }
.dx-toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--dx-fg-3);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.dx-toc__list > li > a { color: var(--dx-fg-2); font-weight: 500; }
.dx-toc a:hover { color: var(--dx-fg); background: rgb(255 255 255 / 0.04); }
.dx-toc a[aria-current] {
  color: var(--dx-fg);
  background: color-mix(in srgb, var(--blue-500) 18%, transparent);
}
.dx-toc__sep { margin-top: 8px; }
.dx-toc__alt {
  margin: 24px 0 0;
  padding: 16px 10px 0;
  border-top: 1px solid var(--dx-line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--dx-fg-3);
}

/* Celular: barra fixa "Nesta página". */
.dx-mtoc { display: none; }

/* ── Corpo ────────────────────────────────────────────────────── */
.dx-body { min-width: 0; padding-bottom: 96px; }
.dx-sec { padding-top: 56px; scroll-margin-top: var(--dx-top); }
.dx-sec + .dx-sec { border-top: 1px solid var(--dx-line); margin-top: 32px; }
.dx-h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--dx-fg);
}
.dx-h3,
.dx-log__title {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--dx-fg);
}
.dx-group > .dx-h3 {
  margin-top: 56px;
  padding-bottom: 12px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--dx-line-2);
}
.dx-ref__text .dx-h3:not(:first-child) { margin-top: 40px; }
.dx-h4 {
  margin: 28px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dx-fg);
}
.dx-h2, .dx-h3, .dx-h4, .dx-log__title { scroll-margin-top: var(--dx-top); }
.dx-hlink { color: inherit; text-decoration: none; }
.dx a.dx-hlink { color: inherit; text-decoration: none; }
.dx-hlink::after {
  content: '#';
  margin-left: 0.35em;
  color: var(--dx-accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.dx-hlink:hover::after,
.dx-hlink:focus-visible::after { opacity: 1; }

.dx-body p,
.dx-body li,
.dx-body dd {
  font-size: 16px;
  line-height: 1.7;
  color: var(--dx-fg-2);
}
.dx-body p { margin: 0 0 16px; max-width: 68ch; }
.dx-body b, .dx-body strong { color: var(--dx-fg); font-weight: 600; }
.dx-lead { font-size: 18px !important; color: var(--dx-fg) !important; }
.dx-lead--sec { margin-top: 8px !important; }
.dx-note {
  padding: 14px 16px;
  border-left: 2px solid var(--dx-accent);
  background: rgb(255 255 255 / 0.03);
  border-radius: 0 8px 8px 0;
}
.dx-aside { font-size: 15px !important; color: var(--dx-fg-3) !important; }
.dx-list, .dx-ol { margin: 0 0 16px; padding-left: 1.25em; max-width: 72ch; }
.dx-list li, .dx-ol li { margin-bottom: 8px; }
.dx-ol--wide { max-width: 80ch; margin-top: 16px; }
.dx-soon {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, var(--blue-300) 45%, transparent);
  border-radius: 999px;
  color: var(--blue-300);
  font-size: 0.92em;
  font-weight: 500;
  white-space: nowrap;
}

/* Fatos da visão geral */
.dx-facts { margin: 24px 0 8px; padding: 0; list-style: none; border-top: 1px solid var(--dx-line); }
.dx-facts li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--dx-line);
  margin: 0;
}
.dx-facts b { color: var(--dx-fg); font-weight: 600; }

/* ── Bloco de referência: texto e código lado a lado ─────────── */
.dx-ref {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: start;
  padding: 40px 0;
}
.dx-ref + .dx-ref,
.dx-group > .dx-ref + .dx-ref { border-top: 1px solid var(--dx-line); }
.dx-ref--intro { padding-top: 16px; }
.dx-ref__text { min-width: 0; }
.dx-ref__code { min-width: 0; display: grid; gap: 16px; }
.dx-ref__code.is-sticky { position: sticky; top: var(--dx-top); }
:root.is-chrome-hidden .dx-ref__code.is-sticky { top: 20px; }
.dx-steps { margin: 0; padding: 0; list-style: none; }
.dx-step + .dx-step .dx-ref { border-top: 1px solid var(--dx-line); }

.dx-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px !important;
}
.dx-route code {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-size: 16px;
  color: var(--dx-fg);
  overflow-wrap: anywhere;
}
.dx-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dx-m--get { background: color-mix(in srgb, var(--blue-500) 24%, transparent); color: #b7d4f5; }
.dx-m--post { background: rgb(238 228 218 / 0.12); color: var(--creme-100); }
.dx-m--delete { background: rgb(255 255 255 / 0.1); color: var(--grafite-50); }
.dx-m--sm { min-width: 40px; height: 20px; padding: 0 5px; font-size: 11px; border-radius: 4px; flex: none; }
.dx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px !important; }
.dx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--dx-line-2);
  border-radius: 999px;
  font-size: 14px;
  color: var(--dx-fg-3);
}
.dx-chip code { padding: 0; border: 0; background: none; font-size: 13px; }
.dx-chip--test { border-color: color-mix(in srgb, var(--blue-300) 45%, transparent); color: var(--blue-300); }

/* Parâmetros */
.dx-params { margin: 0 0 16px; border-top: 1px solid var(--dx-line); }
.dx-param { padding: 14px 0; border-bottom: 1px solid var(--dx-line); }
.dx-param dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.dx-param dt code {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--dx-fg);
}
.dx-type { font-size: 14px; color: var(--dx-fg-3); }
.dx-req { font-size: 13px; font-weight: 600; color: var(--creme-200); }
.dx-opt { font-size: 13px; color: var(--dx-fg-3); }
.dx-param dd { margin: 4px 0 0; font-size: 15px !important; line-height: 1.6 !important; }

/* Tabelas */
.dx-table {
  margin: 16px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--dx-line);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.015);
}
.dx-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dx-table th,
.dx-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--dx-line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  color: var(--dx-fg-2);
}
.dx-table thead th {
  font-size: 14px;
  font-weight: 600;
  color: var(--dx-fg);
  background: rgb(255 255 255 / 0.03);
  white-space: nowrap;
}
.dx-table tbody th { font-weight: 500; color: var(--dx-fg); }
.dx .dx-table td code, .dx .dx-table th code { white-space: nowrap; overflow-wrap: normal; font-size: 13px; }
.dx-table tr:last-child > * { border-bottom: 0; }
.dx-sec > .dx-table { margin-top: 0; }

/* ── Código ───────────────────────────────────────────────────── */
.dx-code {
  position: relative;
  min-width: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #121215 0%, var(--dx-slab) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.09),
    0 0 0 1px rgb(255 255 255 / 0.07),
    0 24px 48px -28px rgb(0 0 0 / 0.9);
  overflow: hidden;
}
.dx-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--dx-line);
}
.dx-code__label {
  margin: 0 !important;
  padding: 0 12px;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--dx-fg-2) !important;
}
.dx-code__tabs { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dx-code__tabs button {
  position: relative;
  flex: none;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--dx-fg-3);
  cursor: pointer;
}
.dx-code__tabs button:hover { color: var(--dx-fg); }
.dx-code__tabs button[aria-selected='true'] { color: var(--dx-fg); }
.dx-code__tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--dx-accent);
}
.dx-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  min-width: 44px;
  padding: 0 12px;
  border: 1px solid var(--dx-line-2);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.03);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--dx-fg-2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.dx-copy:hover { color: var(--dx-fg); border-color: rgb(255 255 255 / 0.3); }
.dx-copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dx-copy.is-done { color: #9ee6b8; border-color: rgb(158 230 184 / 0.4); }
.dx-code__pre {
  margin: 0;
  max-height: min(64vh, 620px);
  padding: 18px 20px 20px;
  overflow: auto;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--grafite-100);
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 0.18) transparent;
}
.dx .dx-code__pre code { font-size: 13.5px; white-space: pre; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; overflow-wrap: normal; }
.dx-hero__code .dx-code__pre { max-height: none; }
/* Realce: todos os tons ≥ 4,5:1 sobre a laje (#0b0b0d). */
.tk-c { color: #8f8d92; font-style: italic; }
.tk-s { color: var(--creme-200); }
.tk-k { color: var(--blue-300); }
.tk-p { color: #b7d4f5; }
.tk-n { color: var(--creme-300); }
.tk-f { color: var(--grafite-300); }
.tk-v { color: #e4c9b6; }
.tk-h { color: #b7d4f5; }

/* Changelog */
.dx-log { margin: 16px 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--dx-line); }
.dx-log__item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--dx-line);
}
.dx-log time { font-size: 15px; color: var(--dx-fg-3); padding-top: 3px; }
.dx-log__title { font-size: 18px; margin-bottom: 8px; }

/* Fechamento */
.dx-close {
  padding: clamp(80px, 10vw, 136px) 0;
  border-top: 1px solid var(--dx-line);
  background:
    var(--dx-bg);
}

/* ── Respostas ────────────────────────────────────────────────── */
@media (max-width: 1279px) {
  .dx-ref { grid-template-columns: minmax(0, 1fr); }
  .dx-ref__code.is-sticky { position: static; }
}
@media (max-width: 1099px) {
  .dx-hero__inner { grid-template-columns: minmax(0, 1fr); }
  .dx-layout { grid-template-columns: minmax(0, 1fr); width: min(100% - 40px, 820px); }
  .dx-toc { display: none; }
  .dx-mtoc {
    display: block;
    position: sticky;
    top: var(--nav-h, 64px);
    z-index: 40;
    border-bottom: 1px solid var(--dx-line);
    background: color-mix(in srgb, var(--grafite-950) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: top 0.38s cubic-bezier(0.2, 0, 0, 1);
  }
  :root.is-chrome-hidden .dx-mtoc { top: 0; }
  .dx-mtoc__box { width: min(100% - 40px, 820px); margin-inline: auto; }
  .dx-mtoc__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    list-style: none;
    cursor: pointer;
    font-size: 15px;
  }
  .dx-mtoc__summary::-webkit-details-marker { display: none; }
  .dx-mtoc__label { color: var(--dx-fg-3); }
  .dx-mtoc__current { flex: 1; min-width: 0; color: var(--dx-fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dx-mtoc__summary svg { width: 18px; height: 18px; fill: none; stroke: var(--dx-fg-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
  .dx-mtoc__box[open] .dx-mtoc__summary svg { transform: rotate(180deg); }
  .dx-mtoc__nav { max-height: min(64vh, 560px); overflow-y: auto; padding: 4px 0 16px; }
  .dx-mtoc__nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 15px;
    color: var(--dx-fg-2);
    text-decoration: none;
  }
  .dx-mtoc__nav a[aria-current] { color: var(--dx-fg); background: color-mix(in srgb, var(--blue-500) 18%, transparent); }
  .dx-mtoc__nav ul { margin: 0 0 4px 12px; padding: 0; list-style: none; border-left: 1px solid var(--dx-line); }
  .dx-mtoc__nav ol { margin: 0; padding: 0; list-style: none; }
  .dx-mtoc__nav ul ul { border-left: 0; margin-left: 0; }
  .dx { --dx-top: calc(var(--nav-h, 64px) + 68px); }
}
@media (max-width: 640px) {
  .dx-facts li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dx-log__item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dx-hero__ctas .dx-btn { flex: 1 1 100%; }
  .dx-code__pre, .dx-code__pre code { font-size: 13px; }
  .dx-code__pre { padding: 16px; }
  .dx-table table { font-size: 14px; }
  .dx-table th, .dx-table td { padding: 10px 12px; }
  .dx-hero__meta { gap: 16px 24px; }
  .dx-copy { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .dx *, .dx *::after { transition: none !important; }
}

/* Abertura: a mesma cobrança do pedido ao charge.paid, já resolvida na página parada (banca 21/11). */
.dx-trail { min-width: 0; position: relative; margin: 20px 0 0; padding: 0 0 0 28px; list-style: none; display: grid; gap: 12px; }
.dx-trail::before { content: ''; position: absolute; left: 9px; top: 10px; bottom: 18px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgb(255 255 255 / 0.18), color-mix(in srgb, var(--blue-300) 70%, transparent)); }
.dx-trail__step { min-width: 0; position: relative; padding: 12px 16px 14px; border-radius: 12px; background: linear-gradient(180deg, #131317, #0b0b0d); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 0 0 1px rgb(255 255 255 / 0.06); }
.dx-trail__step::before { content: ''; position: absolute; left: -24px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--dx-bg); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.3); }
.dx-trail__step:last-child::before { background: #9ee6b8; box-shadow: 0 0 0 4px rgb(158 230 184 / 0.18); }
.dx .dx-trail__head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 14px; color: var(--dx-fg-2); max-width: none; }
.dx .dx-trail__head code { padding: 0; border: 0; background: none; color: var(--dx-fg); font-size: 13.5px; }
.dx-trail__badge { padding: 1px 8px; border-radius: 6px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; font-weight: 600; background: rgb(158 230 184 / 0.14); color: #9ee6b8; }
.dx-trail__badge--blue { background: color-mix(in srgb, var(--blue-500) 24%, transparent); color: #b7d4f5; }
.dx-trail__badge--ok { background: rgb(158 230 184 / 0.14); color: #9ee6b8; }
.dx-trail__pre { margin: 0; overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--grafite-100); }
.dx .dx-trail__pre code { padding: 0; border: 0; background: none; white-space: pre; font-size: 13.5px; }

/* Início rápido: os quatro passos ligados por um trilho numerado. */
.dx-steps { position: relative; counter-reset: passo; }
@media (min-width: 1100px) {
  .dx-steps::before { content: ''; position: absolute; left: -28px; top: 48px; bottom: 48px; width: 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--blue-300) 60%, transparent), rgb(158 230 184 / 0.5)); border-radius: 2px; }
  .dx-step { position: relative; }
  .dx-step::before { content: ''; position: absolute; left: -33px; top: 48px; width: 12px; height: 12px; border-radius: 50%; background: var(--dx-bg); box-shadow: 0 0 0 2px var(--blue-300); }
  .dx-step:last-child::before { box-shadow: 0 0 0 2px #9ee6b8; background: #9ee6b8; }
}

/* Indício de rolagem lateral dentro do código. */
.dx-code__pre, .dx-trail__pre {
  background:
    linear-gradient(90deg, #0d0d10 30%, rgb(13 13 16 / 0)) left center / 28px 100% no-repeat local,
    linear-gradient(270deg, #0d0d10 30%, rgb(13 13 16 / 0)) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(255 255 255 / 0.16), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(255 255 255 / 0.16), transparent) right center / 12px 100% no-repeat scroll;
}

/* Tabela de eventos ocupa a largura inteira (fora da coluna de texto). */
.dx-ref--full { grid-template-columns: minmax(0, 1fr); }

/* Celular: cada linha da tabela vira um bloco (código, depois causa, depois ação). */
@media (max-width: 640px) {
  .dx-table.is-stack table, .dx-table.is-stack tbody, .dx-table.is-stack tr, .dx-table.is-stack th, .dx-table.is-stack td { display: block; width: 100%; }
  .dx-table.is-stack thead { display: none; }
  .dx-table.is-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--dx-line); }
  .dx-table.is-stack tr:last-child { border-bottom: 0; }
  .dx-table.is-stack th, .dx-table.is-stack td { padding: 2px 0; border: 0; }
  .dx-table.is-stack td[data-label]::before { content: attr(data-label) ': '; color: var(--dx-fg-3); font-size: 13px; }
  .dx .dx-table.is-stack code { white-space: normal; overflow-wrap: anywhere; }
}

/* Blocos com tabelas largas (disponibilidade, escopos, limites): texto e tabela em largura inteira, código embaixo. */
.dx-ref.dx-ref--wide { grid-template-columns: minmax(0, 1fr); }
.dx-ref--wide .dx-ref__code { max-width: 760px; }
.dx-ref--wide .dx-ref__code.is-sticky { position: static; }
.dx-facts code { white-space: nowrap; }
.dx-trail__head code { white-space: nowrap; }
@media (max-width: 640px) { .dx-trail__head { flex-wrap: wrap; } .dx .dx-trail__pre code { white-space: pre-wrap; overflow-wrap: anywhere; } }
/* Indício de rolagem vertical no pé dos blocos longos. */
.dx-code { position: relative; }
.dx-code__pre { background-color: transparent; }
.dx-code.is-tall::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; pointer-events: none; background: linear-gradient(180deg, rgb(11 11 13 / 0), #0b0b0d); border-radius: 0 0 12px 12px; transition: opacity 0.2s ease; }
.dx-code.is-tall.is-end::after { opacity: 0; }
