/* Páginas de documentação e transparência (visitante ou logado, sem menu lateral). Só tokens --fx-*; nenhum valor solto. */
.fx-docs, .fx-docs *, .fx-docs *::before, .fx-docs *::after { box-sizing: border-box; }
.dx-article a:not(.fx-btn):not(.dx-card), .dx-head a:not(.fx-btn) { color: var(--fx-link); text-decoration: none; }
.dx-article a:not(.fx-btn):not(.dx-card):hover, .dx-head a:not(.fx-btn):hover { text-decoration: underline; text-underline-offset: 3px; }

/* topo */
.dx-top { position: sticky; top: 0; z-index: 40; background: var(--fx-bg); border-bottom: 1px solid var(--fx-border); }
.dx-top__in { max-width: 1120px; margin: 0 auto; padding: 0 var(--fx-6); height: var(--fx-top-h); display: flex; align-items: center; gap: var(--fx-6); }
.dx-brand { display: inline-flex; align-items: center; gap: var(--fx-2); color: var(--fx-text-strong); font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); font-weight: 600; text-decoration: none; flex: none; }
.dx-brand img { border-radius: var(--fx-r-ctl); }
.dx-nav { display: flex; align-items: center; gap: var(--fx-1); flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dx-nav::-webkit-scrollbar { display: none; }
.dx-nav a { display: inline-flex; align-items: center; height: var(--fx-ctl-h); padding: 0 var(--fx-3); border-radius: var(--fx-r-ctl); color: var(--fx-text); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 500; text-decoration: none; white-space: nowrap; }
.dx-nav a:hover { background: var(--fx-surface-2); color: var(--fx-text-strong); }
.dx-nav a[aria-current="page"] { background: var(--fx-surface-3); color: var(--fx-text-strong); }
.dx-top__act { display: flex; align-items: center; gap: var(--fx-2); flex: none; }

/* cabeçalho da página */
.dx-main { max-width: 1120px; margin: 0 auto; padding: var(--fx-10) var(--fx-6) var(--fx-12); }
.dx-head { margin-bottom: var(--fx-8); padding-bottom: var(--fx-6); border-bottom: 1px solid var(--fx-border); }
.dx-kicker { margin: 0 0 var(--fx-2); color: var(--fx-link); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dx-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--fx-6); flex-wrap: wrap; }
.dx-head h1 { margin: 0; }
.dx-lead { margin: var(--fx-2) 0 0; max-width: 68ch; color: var(--fx-text-muted); font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); }
.dx-head__act { display: flex; gap: var(--fx-2); flex-wrap: wrap; }

/* corpo: índice lateral + texto em largura de leitura */
.dx-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--fx-10); align-items: start; }
.dx-body--wide { grid-template-columns: minmax(0, 1fr); }
.dx-toc { position: sticky; top: calc(var(--fx-top-h) + var(--fx-6)); }
.dx-toc[hidden] { display: none; }
.dx-toc__t { margin: 0 0 var(--fx-2); color: var(--fx-text-muted); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dx-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--fx-border); }
.dx-toc a { display: block; padding: var(--fx-1) var(--fx-3); margin-left: -1px; border-left: 2px solid transparent; color: var(--fx-text-muted) !important; font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); text-decoration: none !important; }
.dx-toc a:hover { color: var(--fx-text-strong) !important; }
.dx-toc a[aria-current="true"] { color: var(--fx-text-strong) !important; border-left-color: var(--fx-brand); }
.dx-article { max-width: 760px; min-width: 0; }
.dx-article--wide { max-width: none; }

/* texto corrido: tags cruas viram texto do sistema */
.dx-article > h2, .dx-article > h3 { color: var(--fx-text-strong); scroll-margin-top: calc(var(--fx-top-h) + var(--fx-6)); }
.dx-article > h2 { margin: var(--fx-10) 0 var(--fx-3); font-size: var(--fx-fs-20); line-height: var(--fx-lh-20); font-weight: 600; }
.dx-article > h2:first-child { margin-top: 0; }
.dx-article > h3 { margin: var(--fx-6) 0 var(--fx-2); font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); font-weight: 600; }
.dx-article > p, .dx-article > ul > li, .dx-article > ol > li { font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); color: var(--fx-text); }
.dx-article > p { margin: 0 0 var(--fx-3); }
.dx-article > ul, .dx-article > ol { margin: 0 0 var(--fx-4); padding-left: var(--fx-6); display: grid; gap: var(--fx-2); }
.dx-article strong { color: var(--fx-text-strong); font-weight: 600; }
.dx-article code { font-family: var(--fx-mono); font-size: var(--fx-fs-13); padding: 1px 5px; border-radius: 4px; background: var(--fx-surface-2); color: var(--fx-text-strong); overflow-wrap: anywhere; }
.dx-article > pre { margin: 0 0 var(--fx-4); padding: var(--fx-3) var(--fx-4); border-radius: var(--fx-r-ctl); background: var(--fx-surface); border: 1px solid var(--fx-border); overflow-x: auto; }
.dx-article pre code { padding: 0; background: none; font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text); overflow-wrap: normal; white-space: pre; }
.dx-article > .fx-table-wrap { margin: 0 0 var(--fx-4); }
.dx-article .fx-table td, .dx-article .fx-table th { font-size: var(--fx-fs-14); }
.dx-num { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: var(--fx-2); border-radius: 50%; background: var(--fx-surface-3); color: var(--fx-text-strong); font-size: var(--fx-fs-13); line-height: 1; font-weight: 600; vertical-align: 2px; }
.dx-section { margin: 0 0 var(--fx-8); }
.dx-section > .fx-h2 { margin: 0 0 var(--fx-3); }
.dx-grid { display: grid; gap: var(--fx-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin: 0 0 var(--fx-8); }
.dx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dx-note { margin: var(--fx-3) 0 0; color: var(--fx-text-muted); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }

/* cartão de entrada (Academy, integrações) */
.dx-card { display: grid; gap: var(--fx-2); align-content: start; padding: var(--fx-5); background: var(--fx-surface); border: 1px solid var(--fx-border); border-radius: var(--fx-r-card); color: var(--fx-text); text-decoration: none; }
a.dx-card:hover { border-color: var(--fx-border-strong); background: var(--fx-surface-2); }
.dx-card h2, .dx-card h3 { margin: 0; color: var(--fx-text-strong); font-size: var(--fx-fs-16); line-height: var(--fx-lh-16); font-weight: 600; }
.dx-card p { margin: 0; color: var(--fx-text-muted); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); }
.dx-card ul { margin: var(--fx-2) 0 0; padding: 0; list-style: none; display: grid; gap: var(--fx-1); color: var(--fx-text-muted); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.dx-card__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--fx-r-ctl); background: var(--fx-surface-3); color: var(--fx-link); }
.dx-card__mark svg, .dx-card__mark i { width: 18px; height: 18px; }
.dx-card--head { grid-template-columns: auto 1fr; column-gap: var(--fx-3); align-items: center; }
.dx-card--head > p, .dx-card--head > ul, .dx-card--head > pre, .dx-card--head > ol, .dx-card--head > div:not(.dx-card__mark) { grid-column: 1 / -1; }
.dx-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-4); flex-wrap: wrap; padding: var(--fx-5); background: var(--fx-surface); border: 1px solid var(--fx-border); border-radius: var(--fx-r-card); margin-top: var(--fx-8); }
.dx-cta h2, .dx-cta h3 { margin: 0; font-size: var(--fx-fs-16) !important; line-height: var(--fx-lh-16) !important; }
.dx-cta p { margin: var(--fx-1) 0 0; font-size: var(--fx-fs-14) !important; line-height: var(--fx-lh-14) !important; color: var(--fx-text-muted); }
.dx-cta__act { display: flex; gap: var(--fx-2); flex-wrap: wrap; }

/* rodapé */
.dx-foot { border-top: 1px solid var(--fx-border); }
.dx-foot__in { max-width: 1120px; margin: 0 auto; padding: var(--fx-5) var(--fx-6); display: flex; justify-content: space-between; gap: var(--fx-4); flex-wrap: wrap; color: var(--fx-text-muted); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.dx-foot p { margin: 0; }
.dx-foot nav { display: flex; gap: var(--fx-4); flex-wrap: wrap; }
.dx-foot a { color: var(--fx-text-muted); text-decoration: none; }
.dx-foot a:hover { color: var(--fx-text-strong); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .dx-top__in { gap: var(--fx-3); padding: 0 var(--fx-4); }
  .dx-main { padding: var(--fx-6) var(--fx-4) var(--fx-10); }
  .dx-body { grid-template-columns: minmax(0, 1fr); gap: var(--fx-6); }
  .dx-toc { position: static; }
  .dx-toc ol { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--fx-border); }
  .dx-toc a { border-left: 0; border-bottom: 2px solid transparent; margin: 0; min-height: 44px; display: inline-flex; align-items: center; }
  .dx-toc a[aria-current="true"] { border-bottom-color: var(--fx-brand); }
  .dx-nav a { min-height: 44px; }
  .dx-brand span { display: none; }
  .dx-grid--2, .dx-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .dx-foot__in { padding: var(--fx-5) var(--fx-4); }
  .dx-foot a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .fx-docs * { transition: none !important; } }

/* receitas e listas curtas dentro de cartão */
.dx-steps { margin: 0; padding-left: var(--fx-5); display: grid; gap: var(--fx-2); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text); }
.dx-p { margin: 0; font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text); }
.dx-stack { display: grid; gap: var(--fx-4); }
.dx-stack .dx-p { margin-bottom: var(--fx-1); }
.dx-events { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fx-2) var(--fx-6); }
.dx-events li { display: flex; align-items: baseline; gap: var(--fx-3); padding: var(--fx-2) 0; border-bottom: 1px solid var(--fx-border); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text-muted); }
.dx-events code { flex: none; }
@media (max-width: 900px) { .dx-events { grid-template-columns: minmax(0, 1fr); } }
.dx-article .fx-kpis { margin-bottom: var(--fx-8); }
.dx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .dx-kpis { grid-template-columns: minmax(0, 1fr); } }

/* changelog */
.dx-path { overflow-wrap: anywhere; }
.dx-meta { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fx-3); }
.dx-meta dt { color: var(--fx-text-muted); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; }
.dx-meta dd { margin: 0; display: flex; align-items: center; gap: var(--fx-2); flex-wrap: wrap; color: var(--fx-text-strong); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.dx-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--fx-border); }
.dx-timeline li { position: relative; padding: 0 0 var(--fx-6) var(--fx-6); display: grid; gap: var(--fx-2); }
.dx-timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--fx-surface-3); border: 2px solid var(--fx-border-strong); }
.dx-timeline__head { display: flex; align-items: center; gap: var(--fx-3); flex-wrap: wrap; }
.dx-timeline .fx-h3, .dx-timeline .dx-p { margin: 0; }
.dx-timeline .dx-p { max-width: 68ch; color: var(--fx-text); }
.dx-links { margin: 0; display: flex; gap: var(--fx-4); flex-wrap: wrap; font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.dx-links a { color: var(--fx-link); text-decoration: none; }
.dx-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* status */
.dx-updates { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--fx-2); font-size: var(--fx-fs-14); line-height: var(--fx-lh-14); color: var(--fx-text); }
.dx-days { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 28px; }
.dx-day { border-radius: 2px; background: var(--fx-border-strong); }
.dx-day--ok { background: var(--fx-ok); }
.dx-day--warn { background: var(--fx-warn); }
.dx-day--bad { background: var(--fx-danger); }
.dx-day--sem { background: var(--fx-border-strong); opacity: .6; }
.dx-days__legend { display: flex; justify-content: space-between; gap: var(--fx-3); margin-top: var(--fx-2); color: var(--fx-text-muted); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); flex-wrap: wrap; }
@media (max-width: 900px) { .dx-days { grid-template-columns: repeat(45, minmax(0, 1fr)); height: auto; } .dx-day { height: 20px; } }
.dx-steps code, .dx-p code, .dx-note code { overflow-wrap: anywhere; white-space: normal; }
.dx-card pre, .fx-docs pre.fx-code { overflow-x: auto; max-width: 100%; }
.dx-steps > li, .dx-stack > *, .dx-card > * { min-width: 0; }
.dx-article :not(pre) > code.fx-code-inline { white-space: normal; overflow-wrap: anywhere; }

/* referência da API: menu próprio, operações em <details>, método em selo */
.dx-body--side { grid-template-columns: 260px minmax(0, 1fr); }
.dx-side { position: sticky; top: calc(var(--fx-top-h) + var(--fx-6)); max-height: calc(100vh - var(--fx-top-h) - var(--fx-10)); overflow-y: auto; display: grid; gap: var(--fx-3); align-content: start; padding-right: var(--fx-2); }
.dx-side__nav { display: grid; gap: 2px; }
.dx-side__nav h4 { margin: var(--fx-4) 0 var(--fx-1); color: var(--fx-text-muted); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dx-side__nav a { display: block; padding: var(--fx-1) var(--fx-2); border-radius: var(--fx-r-ctl); color: var(--fx-text); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-side__nav a:hover { background: var(--fx-surface-2); color: var(--fx-text-strong); }
.dx-side [hidden], .dx-article [hidden] { display: none !important; }
.dx-sec { display: grid; gap: var(--fx-5); margin-bottom: var(--fx-4); }
.dx-steps3 { margin: 0; }
.dx-tabs { display: flex; gap: var(--fx-1); margin-bottom: calc(-1 * var(--fx-3)); }
.dx-tabs button { height: var(--fx-ctl-h-sm); padding: 0 var(--fx-3); border: 1px solid var(--fx-border); border-bottom: 0; border-radius: var(--fx-r-ctl) var(--fx-r-ctl) 0 0; background: var(--fx-surface-2); color: var(--fx-text-muted); font: inherit; font-size: var(--fx-fs-13); font-weight: 500; cursor: pointer; }
.dx-tabs button[aria-selected="true"] { background: var(--fx-surface); color: var(--fx-text-strong); }
.dx-pre { margin: 0; padding: var(--fx-3) var(--fx-4); border: 1px solid var(--fx-border); border-radius: 0 var(--fx-r-ctl) var(--fx-r-ctl) var(--fx-r-ctl); background: var(--fx-surface); overflow-x: auto; }
.dx-pre code { padding: 0; background: none; font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); color: var(--fx-text); white-space: pre; overflow-wrap: normal; }
.dx-op .dx-pre { border-radius: var(--fx-r-ctl); }
.dx-op { border: 1px solid var(--fx-border); border-radius: var(--fx-r-card); background: var(--fx-surface); margin: 0 0 var(--fx-3); overflow: hidden; }
.dx-op summary { list-style: none; display: flex; align-items: center; gap: var(--fx-3); padding: var(--fx-3) var(--fx-4); cursor: pointer; min-height: 44px; }
.dx-op summary::-webkit-details-marker { display: none; }
.dx-op summary:hover { background: var(--fx-surface-2); }
.dx-m { flex: none; min-width: 56px; padding: 2px var(--fx-2); border-radius: var(--fx-r-ctl); text-align: center; font-family: var(--fx-mono); font-size: var(--fx-fs-12); line-height: var(--fx-lh-12); font-weight: 600; background: color-mix(in srgb, var(--fx-neutral) var(--fx-tint), transparent); color: var(--fx-neutral); }
.dx-m--get { background: color-mix(in srgb, var(--fx-ok) var(--fx-tint), transparent); color: var(--fx-ok); }
.dx-m--post { background: color-mix(in srgb, var(--fx-info) var(--fx-tint), transparent); color: var(--fx-info); }
.dx-m--delete { background: color-mix(in srgb, var(--fx-danger) var(--fx-tint), transparent); color: var(--fx-danger); }
.dx-m--put, .dx-m--patch { background: color-mix(in srgb, var(--fx-warn) var(--fx-tint), transparent); color: var(--fx-warn); }
.dx-path { font-family: var(--fx-mono); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); font-weight: 600; color: var(--fx-text-strong); overflow-wrap: anywhere; min-width: 0; }
.dx-sum { margin-left: auto; text-align: right; color: var(--fx-text-muted); font-size: var(--fx-fs-13); line-height: var(--fx-lh-13); }
.dx-op__body { padding: var(--fx-4); border-top: 1px solid var(--fx-border); display: grid; gap: var(--fx-3); }
.dx-op__body .dx-p, .dx-op__body .fx-table-wrap { margin: 0; }
@media (max-width: 900px) {
  .dx-body--side { grid-template-columns: minmax(0, 1fr); }
  .dx-side { position: static; max-height: 280px; }
  .dx-sum { display: none; }
}
