/* ══ Docs: /docs/ index and single guides ═════════════════════════════════
   Uses the brand tokens from b2bm.css (--b-*). Loaded only on docs pages. */

.dx-eyebrow { margin: 0 0 .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--b-cobalt); }
.dx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: 1.25rem; font-size: .88rem; color: var(--b-muted); }
.dx-crumbs a { color: var(--b-cobalt); text-decoration: none; }
.dx-crumbs a:hover { text-decoration: underline; }
.dx-crumbs [aria-current] { color: var(--b-heading); font-weight: 600; }

/* ── Index hero ─────────────────────────────────────────────────────────── */
.dx-hero { position: relative; overflow: hidden; padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); background: var(--b-surface, #F5F8FD); border-bottom: 1px solid var(--b-line); }
.dx-hero__bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 85% 10%, rgba(124,196,250,.35), rgba(124,196,250,0) 40%),
    radial-gradient(rgba(36,84,230,.10) 1.2px, transparent 1.2px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 80%); mask-image: linear-gradient(90deg, transparent 25%, #000 80%); }
.dx-hero__inner { position: relative; }
.dx-hero__inner > * { max-width: 52rem; }
.dx-hero__title { margin: 0 0 .85rem; font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -.03em; color: var(--b-heading); }
.dx-hero__lead { margin: 0 0 1.75rem; max-width: 42rem; font-size: 1.1rem; line-height: 1.6; color: var(--b-text); }
.dx-search { display: flex; align-items: center; gap: .65rem; max-width: 34rem; padding: 0 1rem; border: 1.5px solid var(--b-line-strong); border-radius: 14px; background: #fff; box-shadow: var(--b-shadow-card); color: var(--b-muted); transition: border-color .15s, box-shadow .15s; }
.dx-search:focus-within { border-color: var(--b-cobalt); box-shadow: 0 0 0 4px rgba(36,84,230,.14); }
.dx-search input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--b-heading); }

/* ── Index groups and cards ─────────────────────────────────────────────── */
.dx-index { padding: clamp(2rem, 4vw, 3.25rem) 0 1rem; }
.dx-group + .dx-group { margin-top: 2.5rem; }
.dx-group__title { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; color: var(--b-heading); scroll-margin-top: 110px; }
.dx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; }
.dx-card { position: relative; display: flex; align-items: flex-start; gap: 1rem; padding: 1.15rem 1.15rem 1.15rem 1.1rem; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .2s var(--b-ease), transform .2s var(--b-ease); }
.dx-card:hover { border-color: var(--b-cobalt-300); box-shadow: var(--b-shadow-raise); transform: translateY(-2px); }
.dx-card:focus-visible { outline: none; box-shadow: var(--b-focus); }
.dx-card[hidden] { display: none; }
.dx-card__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--b-wash); color: var(--b-cobalt); }
.dx-card__icon svg { width: 22px; height: 22px; }
.dx-card__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; padding-right: 1.25rem; }
.dx-card__title { font-size: 1.02rem; color: var(--b-heading); }
.dx-card__text { font-size: .9rem; line-height: 1.5; color: var(--b-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dx-card__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.dx-card__meta span { padding: .15rem .5rem; border-radius: 999px; background: var(--b-surface-2); font: 600 .72rem/1.4 var(--b-mono); color: var(--b-muted); }
.dx-card__go { position: absolute; top: 1.15rem; right: 1rem; color: var(--b-cobalt); opacity: .55; transition: opacity .15s, transform .2s var(--b-ease); }
.dx-card:hover .dx-card__go { opacity: 1; transform: translateX(2px); }
.dx-cards--start { grid-template-columns: 1fr; }
.dx-card--suite { padding: 1.4rem; background: var(--b-ink); border-color: var(--b-ink); }
.dx-card--suite .dx-card__icon { width: 52px; height: 52px; background: rgba(255,255,255,.08); color: var(--b-volt); }
.dx-card--suite .dx-card__title { font-size: 1.15rem; color: #fff; }
.dx-card--suite .dx-card__text { color: var(--b-on-dark-muted); -webkit-line-clamp: 2; }
.dx-card--suite .dx-card__meta span { background: rgba(255,255,255,.08); color: var(--b-on-dark-muted); }
.dx-card--suite .dx-card__go { color: var(--b-volt); }
.dx-card--suite:hover { border-color: var(--b-ink); }
.dx-none, .dx-empty { margin: 1.5rem 0 0; color: var(--b-muted); }

.dx-help { padding: 2.5rem 0 4rem; }
.dx-help__panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: 1.75rem; border: 1px solid var(--b-line); border-radius: var(--b-r-xl); background: var(--b-surface, #F5F8FD); }
.dx-help__panel h2 { margin: 0 0 .35rem; font-size: 1.35rem; color: var(--b-heading); }
.dx-help__panel p { margin: 0; max-width: 40rem; color: var(--b-text); }
.dx-help__actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ── Single guide layout ────────────────────────────────────────────────── */
.dx-doc { padding: clamp(1.5rem, 3vw, 2.5rem) 0 4rem; }
.dx-doc__grid { display: grid; grid-template-columns: 236px minmax(0, 1fr) 220px; gap: 2.75rem; align-items: start; }
.dx-side, .dx-toc--side { position: sticky; top: 104px; max-height: calc(100vh - 124px); overflow-y: auto; scrollbar-width: thin; }
.dx-side--fold { display: none; }
.dx-side__nav { display: flex; flex-direction: column; font-size: .9rem; }
.dx-side__home { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; color: var(--b-cobalt); font-weight: 600; text-decoration: none; }
.dx-side__home svg { transform: scaleX(-1); }
.dx-side__group { margin: 1rem 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--b-muted); }
.dx-side__nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--b-line); }
.dx-side__nav li a { display: block; margin-left: -1px; padding: .38rem .8rem; border-left: 2px solid transparent; color: var(--b-text); text-decoration: none; line-height: 1.35; }
.dx-side__nav li a:hover { color: var(--b-cobalt); border-left-color: var(--b-cobalt-300); }
.dx-side__nav li a[aria-current="page"] { color: var(--b-cobalt); font-weight: 700; border-left-color: var(--b-cobalt); background: linear-gradient(90deg, rgba(36,84,230,.07), transparent); }

.dx-article { min-width: 0; }
.dx-head { display: flex; align-items: center; gap: 1rem; }
.dx-head__icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--b-wash); color: var(--b-cobalt); }
.dx-head__icon.is-suite { background: var(--b-ink); color: var(--b-volt); }
.dx-head__icon svg { width: 28px; height: 28px; }
.dx-head .dx-eyebrow { margin-bottom: .2rem; }
.dx-head__title { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.35rem); line-height: 1.12; letter-spacing: -.025em; color: var(--b-heading); }
.dx-lead { margin: 1rem 0 0; font-size: 1.1rem; line-height: 1.6; color: var(--b-text); }

.dx-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.5rem; margin: 1.5rem 0 0; padding: .9rem 1rem; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); background: var(--b-surface, #F5F8FD); }
.dx-facts__list { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 0; padding: 0; list-style: none; font-size: .88rem; color: var(--b-heading); }
.dx-facts__list li { display: flex; align-items: center; gap: .45rem; }
.dx-facts__list span { color: var(--b-muted); }
.dx-facts__list code { padding: .1rem .45rem; border-radius: 6px; background: #fff; border: 1px solid var(--b-line); font: 600 .8rem/1.4 var(--b-mono); color: var(--b-heading); }
.dx-facts__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* TOC (side on wide screens, folded above the article otherwise) */
.dx-toc__title { margin: 0 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--b-muted); }
.dx-toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--b-line); font-size: .86rem; }
.dx-toc__list a { display: block; margin-left: -1px; padding: .3rem .8rem; border-left: 2px solid transparent; color: var(--b-muted); text-decoration: none; line-height: 1.35; }
.dx-toc__list a:hover { color: var(--b-cobalt); }
.dx-toc__list a.is-active { color: var(--b-cobalt); font-weight: 600; border-left-color: var(--b-cobalt); }
.dx-toc--inline { display: none; margin: 1.25rem 0 0; border: 1px solid var(--b-line); border-radius: var(--b-r-md); background: #fff; }
.dx-toc--inline summary { padding: .8rem 1rem; font-weight: 700; color: var(--b-heading); cursor: pointer; }
.dx-toc--inline .dx-toc__list { margin: 0 1rem 1rem; }

/* ── Article content ────────────────────────────────────────────────────── */
.dx-body { margin-top: 2rem; font-size: 1.02rem; line-height: 1.75; }
.dx-body > h2 { margin: 2.75rem 0 1rem; padding-top: 1.75rem; border-top: 1px solid var(--b-line); font-size: 1.45rem; letter-spacing: -.015em; scroll-margin-top: 104px; }
.dx-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.dx-body h3 { font-size: 1.12rem; }
.dx-body a { color: var(--b-cobalt); }
.dx-body code { padding: .12rem .38rem; border-radius: 6px; background: var(--b-surface-2); border: 1px solid var(--b-line); font: 500 .86em/1.4 var(--b-mono); color: var(--b-heading); }
.dx-body .dx-note { padding: .85rem 1rem; border-left: 3px solid var(--b-cobalt); border-radius: 0 10px 10px 0; background: var(--b-wash); font-size: .95rem; }

/* Numbered steps */
.dx-body ol.dx-steps { counter-reset: dx; list-style: none; padding-left: 0; }
.dx-body ol.dx-steps > li { counter-increment: dx; position: relative; margin: 0 0 .85rem; padding-left: 2.6rem; }
.dx-body ol.dx-steps > li::before { content: counter(dx); position: absolute; left: 0; top: .1rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 8px; background: var(--b-ink); color: #fff; font: 700 .82rem/1 var(--b-mono); }
.dx-body ul.dx-checks { list-style: none; padding-left: 0; }
.dx-body ul.dx-checks > li { position: relative; padding-left: 1.85rem; }
.dx-body ul.dx-checks > li::before { content: ""; position: absolute; left: .1rem; top: .38rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #DCFCE7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 72% no-repeat; }

/* Screenshots */
.dx-body .dx-shot { margin: 1.75rem 0; }
.dx-body .dx-shot img { display: block; width: 100%; height: auto; margin: 0; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); box-shadow: var(--b-shadow-card); background: #fff; }
.dx-body .dx-shot figcaption { margin-top: .6rem; font-size: .88rem; line-height: 1.5; color: var(--b-muted); text-align: left; }

/* Tables */
.dx-body .dx-table { margin: 1.25rem 0 1.75rem; overflow-x: auto; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); }
.dx-body .dx-table table { width: 100%; margin: 0; border-collapse: collapse; font-size: .92rem; line-height: 1.55; }
.dx-body .dx-table th { padding: .7rem .9rem; background: var(--b-surface, #F5F8FD); border-bottom: 1px solid var(--b-line); text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--b-muted); white-space: nowrap; }
.dx-body .dx-table td { padding: .75rem .9rem; border: 0; border-top: 1px solid var(--b-line); vertical-align: top; color: var(--b-text); }
.dx-body .dx-table tr:first-child td { border-top: 0; }
.dx-body .dx-table td:first-child { font-weight: 600; color: var(--b-heading); min-width: 10rem; }
.dx-body .dx-table--hooks td:first-child { min-width: 0; font-weight: 400; }
.dx-body .dx-table--hooks td:first-child code { white-space: nowrap; }
.dx-body .dx-table--editions td:not(:first-child), .dx-body .dx-table--editions th:not(:first-child) { text-align: center; width: 22%; }
.dx-ed { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: var(--b-surface-2); color: var(--b-muted); }
.dx-ed--pro { background: var(--b-cobalt); color: #fff; }
.dx-ed--free { background: #E0F2FE; color: #0B4A7A; }
.dx-ed--both { background: var(--b-surface-2); color: var(--b-heading); }
.dx-yes, .dx-no { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 8px; font-size: 0; vertical-align: middle; }
.dx-yes { background: #DCFCE7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 62% no-repeat; }
.dx-no { background: var(--b-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center / 58% no-repeat; }

/* Code */
.dx-body pre.wp-block-code { margin: 1.25rem 0 1.75rem; padding: 1.1rem 1.2rem; overflow-x: auto; border-radius: var(--b-r-lg); background: var(--b-ink); color: #E2E8F0; font: 500 .86rem/1.65 var(--b-mono); }
.dx-body pre.wp-block-code code { padding: 0; border: 0; background: none; color: inherit; font: inherit; }

/* FAQ */
.dx-body .dx-faq { margin: 0 0 .6rem; border: 1px solid var(--b-line); border-radius: var(--b-r-md); background: #fff; }
.dx-body .dx-faq summary { position: relative; padding: .9rem 2.75rem .9rem 1rem; font-weight: 650; color: var(--b-heading); cursor: pointer; list-style: none; }
.dx-body .dx-faq summary::-webkit-details-marker { display: none; }
.dx-body .dx-faq summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid var(--b-muted); border-bottom: 2px solid var(--b-muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--b-ease); }
.dx-body .dx-faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.dx-body .dx-faq[open] { border-color: var(--b-cobalt-300); }
.dx-body .dx-faq p { margin: 0; padding: 0 1rem 1rem; }

/* End of guide */
.dx-stuck { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin: 3rem 0 0; padding: 1.4rem 1.5rem; border-radius: var(--b-r-xl); background: var(--b-ink); color: var(--b-on-dark); }
.dx-stuck h2 { margin: 0 0 .3rem; font-size: 1.2rem; color: #fff; }
.dx-stuck p { margin: 0; max-width: 34rem; font-size: .95rem; color: var(--b-on-dark-muted); }
.dx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.dx-pager__link { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; border: 1px solid var(--b-line); border-radius: var(--b-r-lg); color: inherit; text-decoration: none; transition: border-color .15s; }
.dx-pager__link:hover { border-color: var(--b-cobalt); }
.dx-pager__link span { font-size: .78rem; color: var(--b-muted); }
.dx-pager__link strong { color: var(--b-cobalt); }
.dx-pager__link--next { grid-column: 2; text-align: right; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1179px) {
  .dx-doc__grid { grid-template-columns: 220px minmax(0, 1fr); gap: 2.25rem; }
  .dx-toc--side { display: none; }
  .dx-toc--inline { display: block; }
}
@media (max-width: 899px) {
  .dx-doc__grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .dx-side--wide { display: none; }
  .dx-side--fold { display: block; position: static; max-height: none; overflow: visible; border: 1px solid var(--b-line); border-radius: var(--b-r-md); background: #fff; }
  .dx-side--fold > summary { padding: .8rem 1rem; font-weight: 700; color: var(--b-heading); cursor: pointer; }
  .dx-side--fold .dx-side__nav { padding: 0 1rem 1rem; }
  .dx-pager { grid-template-columns: 1fr; }
  .dx-pager__link--next { grid-column: auto; }
}
@media (max-width: 560px) {
  .dx-head { align-items: flex-start; }
  .dx-head__icon { width: 46px; height: 46px; border-radius: 13px; }
  .dx-facts { padding: .85rem; }
  .dx-body .dx-table td:first-child { min-width: 7.5rem; }
}
@media (prefers-reduced-motion: reduce) { .dx-card, .dx-card__go { transition: none; } }
