/* Documentación pública de la API (/docs/api). Usa los tokens de app.css. */
html { scroll-padding-top: 84px; }
body { background: var(--mp-surface); }

.dx-top { position: sticky; top: 0; z-index: 40; background: var(--mp-navy); color: #fff; box-shadow: 0 2px 10px rgba(11, 22, 48, .18); }
.dx-top-row { display: flex; align-items: center; gap: .9rem; height: 60px; padding: 0 1.25rem; }
.dx-brand { font-size: 1.45rem; }
.dx-brand .mp-brand-a { color: #fff; }
.dx-top-tag { font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .2); }
.dx-top-links { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; }
.dx-top-link { color: rgba(255, 255, 255, .85); font-weight: 700; text-decoration: none; font-size: .92rem; }
.dx-top-link:hover { color: var(--mp-accent); }
.dx-menu-btn { display: none; background: transparent; border: 0; color: #fff; padding: .35rem; margin-left: -.35rem; border-radius: .4rem; }

.dx-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); max-width: 1320px; margin: 0 auto; }

.dx-nav { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 1.75rem 1rem 2rem 1.25rem; border-right: 1px solid var(--mp-line); font-size: .9rem; }
.dx-nav-group { font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mp-muted); margin: 1.2rem 0 .35rem .6rem; }
.dx-nav-group:first-child { margin-top: 0; }
.dx-nav ul { list-style: none; margin: 0; padding: 0; }
.dx-nav a { display: block; padding: .32rem .6rem; border-radius: .4rem; color: var(--mp-ink); text-decoration: none; font-weight: 600; border-left: 3px solid transparent; }
.dx-nav a:hover { background: var(--mp-bg); color: var(--mp-primary); }
.dx-nav a.is-active { background: var(--mp-primary-soft); color: var(--mp-primary-dark); border-left-color: var(--mp-accent); }

.dx-main { min-width: 0; padding: 0 3rem 4rem; }
.dx-sec, .dx-foot { max-width: 920px; }

.dx-hero { margin: 0 -3rem 0; padding: 3.25rem 3rem 2.75rem; background: radial-gradient(700px 320px at 85% 0%, rgba(245, 179, 1, .18), transparent 70%), linear-gradient(135deg, var(--mp-navy) 0%, var(--mp-navy-2) 60%, #173d7a 100%); color: #fff; }
.dx-kicker { display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mp-navy); background: var(--mp-accent); border-radius: 999px; padding: .3rem .8rem; }
.dx-hero h1 { font-weight: 900; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.02em; line-height: 1.12; margin: 1rem 0 .8rem; max-width: 22ch; }
.dx-lead { font-size: 1.08rem; color: rgba(255, 255, 255, .85); max-width: 62ch; margin-bottom: 1.5rem; }
.dx-base { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: .75rem; padding: .7rem .9rem; max-width: 640px; }
.dx-base-label { font-weight: 800; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.dx-main .dx-base code { color: #fff; font-size: .98rem; font-weight: 700; word-break: break-all; flex: 1 1 auto; }
.dx-base .dx-copy { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .25); }
.dx-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1.75rem; }
.dx-hero-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; color: rgba(255, 255, 255, .8); font-size: .94rem; }
.dx-hero-points li::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--mp-accent); margin-right: .6rem; vertical-align: .1rem; }
.dx-hero-points strong { color: #fff; }

.dx-sec { padding-top: 2.75rem; }
.dx-h2 { font-weight: 900; font-size: 1.65rem; letter-spacing: -.015em; margin-bottom: 1rem; padding-bottom: .55rem; border-bottom: 1px solid var(--mp-line); }
.dx-h3 { font-weight: 800; font-size: 1.15rem; margin: 2rem 0 .75rem; }
.dx-main p, .dx-list li { line-height: 1.65; }
.dx-main code { font-size: .86em; color: var(--mp-primary-dark); background: var(--mp-primary-soft); padding: .08em .35em; border-radius: .3rem; }
.dx-main pre code, .dx-main .dx-hero code, .dx-main .dx-ep-path { background: none; padding: 0; color: inherit; }
.dx-small { font-size: .88rem; color: var(--mp-muted); }
.dx-list { padding-left: 1.25rem; }
.dx-list li { margin-bottom: .35rem; }
.dx-list ul { margin-top: .35rem; }

.dx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.dx-card { border: 1px solid var(--mp-line); border-radius: .9rem; padding: 1.1rem 1.2rem; background: var(--mp-surface); position: relative; }
.dx-card h3 { font-weight: 800; font-size: 1.02rem; margin: .55rem 0 .35rem; }
.dx-card p { color: var(--mp-muted); font-size: .92rem; margin: 0; }
.dx-card-n { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--mp-accent); color: var(--mp-navy); font-weight: 900; }

.dx-note { border-left: 4px solid var(--mp-primary); background: var(--mp-primary-soft); padding: .9rem 1.1rem; border-radius: 0 .6rem .6rem 0; font-size: .93rem; margin: 1rem 0; }
.dx-note-warn { border-left-color: var(--mp-accent); background: #fff7e0; }

.dx-steps { list-style: none; counter-reset: dx; padding: 0; margin: 0; }
.dx-steps > li { counter-increment: dx; position: relative; padding: 0 0 1.5rem 3.1rem; border-left: 2px solid var(--mp-line); margin-left: 1rem; }
.dx-steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.dx-steps > li::before { content: counter(dx); position: absolute; left: -1.05rem; top: -.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--mp-navy); color: var(--mp-accent); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.dx-steps h3 { font-weight: 800; font-size: 1.08rem; margin: .1rem 0 .5rem; }

.dx-flow { display: flex; align-items: stretch; gap: .5rem; margin: 1rem 0 1.25rem; }
.dx-flow-step { flex: 1 1 0; border: 1px solid var(--mp-line); border-radius: .8rem; padding: .85rem .9rem; background: var(--mp-bg); display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.dx-flow-step strong { font-size: 1rem; }
.dx-flow-step span:last-child { color: var(--mp-muted); }
.dx-flow-who { align-self: flex-start; font-weight: 800; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .15rem .55rem; }
.dx-flow-who.is-erp { background: #dbeafe; color: #1e40af; }
.dx-flow-who.is-mp { background: #fef3c7; color: #92400e; }
.dx-flow-who.is-both { background: #dcfce7; color: #166534; }
.dx-flow-arrow { display: flex; align-items: center; color: var(--mp-muted); font-weight: 900; font-size: 1.2rem; }

.dx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.dx-panel { border: 1px solid var(--mp-line); border-radius: .8rem; padding: 1rem 1.15rem; font-size: .93rem; }
.dx-panel h3 { font-weight: 800; font-size: 1rem; margin-bottom: .5rem; }

.dx-table-wrap { overflow-x: auto; margin: .75rem 0 1.25rem; border: 1px solid var(--mp-line); border-radius: .7rem; }
.dx-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dx-table th, .dx-table td { padding: .6rem .85rem; border-bottom: 1px solid var(--mp-line); vertical-align: top; text-align: left; }
.dx-table tr:last-child > * { border-bottom: 0; }
.dx-table thead th { background: var(--mp-bg); font-weight: 800; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; color: var(--mp-muted); }
.dx-table tbody th { width: 9.5rem; font-weight: 800; background: var(--mp-bg); }
.dx-fields td:first-child { white-space: nowrap; }
.dx-req { display: inline-block; font-size: .68rem; font-weight: 800; color: var(--mp-red); text-transform: uppercase; letter-spacing: .04em; margin-left: .3rem; }

.dx-ep { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 2rem 0 .7rem; padding: .7rem .9rem; border: 1px solid var(--mp-line); border-radius: .7rem; background: var(--mp-bg); scroll-margin-top: 84px; }
.dx-ep-anchor { position: absolute; left: -1.4rem; color: var(--mp-muted); text-decoration: none; opacity: 0; font-weight: 800; }
.dx-ep:hover .dx-ep-anchor { opacity: 1; }
.dx-ep-path { font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .95rem; font-weight: 700; color: var(--mp-ink); word-break: break-all; }
.dx-ep-meta { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.dx-m { display: inline-block; min-width: 3.6rem; text-align: center; font-weight: 900; font-size: .72rem; letter-spacing: .04em; border-radius: .35rem; padding: .22rem .4rem; color: #fff; font-family: SFMono-Regular, Menlo, Consolas, monospace; }
.dx-m-get { background: #15803d; }
.dx-m-post { background: var(--mp-primary); }
.dx-m-put { background: #a16207; }
.dx-m-patch { background: #7c3aed; }
.dx-m-delete { background: var(--mp-red); }
.dx-scope, .dx-idem { font-size: .74rem; font-weight: 800; border-radius: 999px; padding: .18rem .6rem; white-space: nowrap; font-family: SFMono-Regular, Menlo, Consolas, monospace; }
.dx-scope { background: #fff; border: 1px solid var(--mp-line); color: var(--mp-ink); }
.dx-scope-any { font-family: inherit; color: var(--mp-muted); }
.dx-idem { background: #fff7e0; border: 1px solid #f3d27a; color: #7a5600; }

.dx-code { border-radius: .7rem; overflow: hidden; margin: .75rem 0 1rem; background: #0f1a33; border: 1px solid #0b1430; }
.dx-code-head { display: flex; align-items: center; justify-content: space-between; padding: .4rem .5rem .4rem .9rem; background: #16244a; color: rgba(255, 255, 255, .7); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dx-code pre { margin: 0; padding: .95rem 1rem; overflow-x: auto; color: #e6ebf5; font-size: .84rem; line-height: 1.6; font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.dx-code .tk-k { color: #8fc1ff; }
.dx-code .tk-s { color: #ffd479; }
.dx-code .tk-n { color: #9be9a8; }
.dx-code .tk-l { color: #f2a7e0; }
.dx-copy { border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: rgba(255, 255, 255, .85); font-size: .74rem; font-weight: 800; border-radius: .4rem; padding: .2rem .6rem; text-transform: none; letter-spacing: 0; }
.dx-copy:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.dx-copy.is-done { background: var(--mp-ok); border-color: var(--mp-ok); color: #fff; }

.dx-tabs { margin: .75rem 0 1rem; }
.dx-tabs .dx-code { margin-top: 0; border-top-left-radius: 0; }
.dx-tabs-bar { display: flex; gap: .25rem; flex-wrap: wrap; }
.dx-tab { border: 1px solid var(--mp-line); border-bottom: 0; background: var(--mp-bg); color: var(--mp-muted); font-weight: 800; font-size: .82rem; padding: .4rem .9rem; border-radius: .5rem .5rem 0 0; }
.dx-tab.is-on { background: #16244a; border-color: #16244a; color: #fff; }

.dx-states { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .5rem 0 1rem; }
.dx-states span { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; font-weight: 700; background: var(--mp-primary-soft); color: var(--mp-primary-dark); border-radius: .4rem; padding: .3rem .6rem; }
.dx-states span.is-final { background: #dcfce7; color: #166534; }
.dx-states i { font-style: normal; color: var(--mp-muted); font-weight: 900; }

.dx-legend { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; color: var(--mp-muted); }
.dx-legend li { margin-bottom: .35rem; }
.dx-reqs { list-style: none; padding: 0; margin: 0; border: 1px solid var(--mp-line); border-radius: .7rem; overflow: hidden; }
.dx-reqs li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .5rem; padding: .6rem .9rem; border-bottom: 1px solid var(--mp-line); font-size: .92rem; }
.dx-reqs li:last-child { border-bottom: 0; }
.dx-reqs-txt { flex: 1 1 22rem; min-width: 0; }
.dx-tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .02em; border-radius: 999px; padding: .12rem .55rem; white-space: nowrap; }
.dx-tag-ver { background: #dcfce7; color: #166534; }
.dx-tag-api { background: #dbeafe; color: #1e40af; }
.dx-tag-dec { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.dx-tag-opt { background: #fff7e0; color: #7a5600; }
.dx-support { display: flex; flex-wrap: wrap; gap: .6rem; }

.dx-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--mp-line); color: var(--mp-muted); font-size: .88rem; }
.dx-foot .mp-brand { font-size: 1.25rem; }
.dx-foot .mp-brand-a { color: var(--mp-navy); }

@media (max-width: 991.98px) {
    .dx-shell { grid-template-columns: minmax(0, 1fr); }
    .dx-menu-btn { display: inline-flex; }
    .dx-nav { position: fixed; top: 64px; left: 0; bottom: 0; width: 280px; max-height: none; background: var(--mp-surface); z-index: 35; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
    .dx-nav.is-open { transform: none; visibility: visible; box-shadow: 8px 0 24px rgba(11, 22, 48, .15); }
    .dx-main { padding: 0 1.25rem 3rem; }
    .dx-hero { margin: 0 -1.25rem; padding: 2.25rem 1.25rem 2rem; }
    .dx-flow { flex-direction: column; }
    .dx-flow-arrow { justify-content: center; transform: rotate(90deg); }
    .dx-ep-anchor { display: none; }
}
@media (max-width: 767.98px) {
    .dx-top-tag { display: none; }
    .dx-cards, .dx-grid-2, .dx-hero-points { grid-template-columns: minmax(0, 1fr); }
    .dx-table tbody th { width: auto; }
    .dx-ep-meta { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .dx-nav { transition: none; } }
