/* Smind — docs index and per-app help centre (prefix dx-).
   Loaded only on the docs pages, see smind_docs_assets() in functions.php.
   Colours follow the 10/2026 design: Sections #3F51FF, B2B #1C6650, ink #10132E, ground #F7F8FC. */

.dx-wrap {
  --dx-ink: #10132E;
  --dx-muted: #4F5470;
  --dx-line: #E3E6F0;
  --dx-ground: #F7F8FC;
  --dx-accent: #3F51FF;
  --dx-tint: #ECEEFF;
  --dx-deep: #2E3BC4;
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 24px 72px;
  color: var(--dx-ink);
}

/* Each app sets its own accent; the page keeps the Sections one as the default. */
.dx-prod--b2b, .dx-banner--b2b, .dx-topics--b2b { --dx-accent: #1C6650; --dx-tint: #E4F1EC; --dx-deep: #165240; }

.dx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dx-accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity .15s;
}
.dx-btn:hover { opacity: .9; color: #fff; }
.dx-btn--light { background: #fff; color: var(--dx-deep); font-weight: 700; }
.dx-btn--light:hover { color: var(--dx-deep); }
.dx-btn--outline { background: transparent; border: 1px solid rgba(255, 255, 255, .55); color: #fff; }
.dx-btn--outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---- Index head ---- */
.dx-head { padding: 64px 0 40px; }
.dx-eyebrow { font-size: 14px; font-weight: 600; color: #5A5F7A; margin: 0; }
.dx-head h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 12px 0 0;
}
.dx-lead { font-size: 18px; line-height: 1.55; color: var(--dx-muted); max-width: 620px; margin: 16px 0 0; }

/* ---- Index: one panel per app ---- */
.dx-prod {
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.dx-prod-side {
  flex: 1 1 320px;
  max-width: 400px;
  background: var(--dx-tint);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dx-prod-icon { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: block; }
.dx-prod-icon img { display: block; width: 100%; height: 100%; }
.dx-prod-side h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin: 0; }
.dx-prod-count { font-size: 14px; font-weight: 600; color: var(--dx-deep); margin: 6px 0 0; }
.dx-prod-desc { margin: 0; font-size: 16px; line-height: 1.55; color: #3A3F5C; }
.dx-prod-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 14px; font-weight: 600; }
.dx-prod-links a { color: var(--dx-deep); text-decoration: underline; text-underline-offset: 3px; }
.dx-prod-side .dx-btn { align-self: flex-start; margin-top: auto; }

.dx-prod-main {
  flex: 999 1 480px;
  min-width: 0;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
}
.dx-chip {
  /* Strictly two per row, as the design lays them out. */
  flex: 1 1 calc(50% - 6px);
  max-width: calc(50% - 6px);
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.dx-chip:hover { border-color: var(--dx-ink); transform: translateY(-2px); color: inherit; }
.dx-chip-name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.dx-chip-n {
  font-size: 13px;
  font-weight: 700;
  color: var(--dx-deep);
  background: var(--dx-tint);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---- App page ---- */
.dx-crumb { padding: 28px 0 0; font-size: 14px; color: #5A5F7A; display: flex; flex-wrap: wrap; gap: 8px; }
.dx-crumb a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dx-crumb-now { color: var(--dx-ink); font-weight: 600; }

.dx-banner {
  margin-top: 20px;
  background: var(--dx-accent);
  color: #fff;
  border-radius: 28px;
  padding: 52px 48px;
  position: relative;
  overflow: hidden;
}
/* The faded logo mark sitting in the corner, as in the design. */
.dx-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -120px;
  width: 360px;
  height: 415px;
  background: url(v2/logo-mark.svg) no-repeat center/contain;
  /* Force the mark white so it reads as a tint of the banner colour. */
  filter: brightness(0) invert(1);
  opacity: .13;
  pointer-events: none;
}
.dx-banner-copy { position: relative; max-width: 640px; }
.dx-banner-tag { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.dx-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.dx-banner-icon .smind-mark { display: block; fill: var(--dx-accent); }
.dx-banner h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -.03em; font-weight: 800; margin: 20px 0 0; color: #fff; }
.dx-banner-lead { font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, .9); margin: 14px 0 0; }
.dx-banner-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

.dx-cols { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.dx-side {
  flex: 1 1 240px;
  max-width: 280px;
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dx-side-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5A5F7A;
  padding: 8px 12px;
  margin: 0;
}
.dx-side a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}
.dx-side a:hover { background: var(--dx-tint); color: inherit; }
.dx-side-rule { height: 1px; background: var(--dx-line); border: 0; margin: 10px 4px; }
.dx-side-app { display: flex; align-items: center; gap: 10px; }
.dx-side-mark { width: 22px; height: 22px; flex: none; border-radius: 6px; overflow: hidden; display: block; }
.dx-side-mark img { display: block; width: 100%; height: 100%; }

.dx-main { flex: 999 1 560px; min-width: 0; }
.dx-main-head { font-size: 26px; letter-spacing: -.02em; font-weight: 800; margin: 0 0 20px; }
.dx-main-head + .dx-topics { margin-top: 0; }

.dx-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .dx-topics { grid-template-columns: 1fr; } }
.dx-topic {
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.dx-topic:hover { border-color: var(--dx-accent); transform: translateY(-2px); color: inherit; }
/* Number, title and count share one row; the title takes the slack and may wrap. */
.dx-topic-row { display: flex; align-items: center; gap: 12px; }
.dx-topic-no {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--dx-tint);
  color: var(--dx-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.dx-topic-name { flex: 1; min-width: 0; font-size: 19px; line-height: 1.25; font-weight: 700; }
.dx-topic-n { flex: none; font-size: 13px; font-weight: 600; color: #5A5F7A; white-space: nowrap; }
.dx-topic-desc { font-size: 15px; line-height: 1.5; color: var(--dx-muted); }

.dx-articles { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dx-articles a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--dx-line);
  color: inherit;
  text-decoration: none;
}
.dx-articles a:hover { border-color: var(--dx-ink); color: inherit; }
.dx-empty { padding: 24px 0 48px; color: var(--dx-muted); }

@media (max-width: 860px) {
  .dx-wrap { padding: 0 16px 56px; }
  .dx-prod-side, .dx-prod-main { padding: 24px; max-width: none; }
  .dx-banner { padding: 36px 24px; border-radius: 22px; }
  .dx-side { max-width: none; }
}

/* ---- One topic page (/docs/topic/{slug}/) ---- */
.dx-topicpage--b2b { --dx-accent: #1C6650; --dx-tint: #E4F1EC; --dx-deep: #165240; }

.dx-tophead {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 24px;
  padding: 36px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
/* The faded mark in the corner, as on the app banner. */
.dx-tophead::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 220px;
  height: 254px;
  background: url(v2/logo-mark.svg) no-repeat center/contain;
  opacity: .05;
  pointer-events: none;
}
.dx-tophead-main { display: flex; align-items: center; gap: 20px; position: relative; flex: 1 1 420px; min-width: 0; }
.dx-tophead-icon { width: 64px; height: 64px; flex: none; border-radius: 18px; overflow: hidden; display: block; }
.dx-tophead-icon img { display: block; width: 100%; height: 100%; }
.dx-tophead-eyebrow { font-size: 13px; font-weight: 600; color: var(--dx-deep); margin: 0; }
.dx-tophead h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; margin: 4px 0 0; }
.dx-tophead-desc { margin: 8px 0 0; font-size: 17px; color: var(--dx-muted); }
.dx-tophead-count {
  position: relative;
  flex: none;
  background: var(--dx-tint);
  color: var(--dx-deep);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Sidebar rows carry a count, and the current topic is marked. */
.dx-side-topic { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dx-side-topic.is-on { background: var(--dx-tint); color: var(--dx-deep); font-weight: 700; }
.dx-side-topic.is-on:hover { background: var(--dx-tint); }
.dx-side-n { font-size: 12px; font-weight: 600; color: #5A5F7A; }
.dx-side-topic.is-on .dx-side-n { color: var(--dx-deep); }

.dx-main > * + * { margin-top: 32px; }
.dx-arthead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.dx-arthead h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.dx-arthead-note { font-size: 13px; color: #5A5F7A; }
.dx-arthead + .dx-arts { margin-top: 14px; }

.dx-arts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .dx-arts { grid-template-columns: 1fr; } }
.dx-art {
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.dx-art:hover { border-color: var(--dx-accent); transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(63, 81, 255, .45); color: inherit; }
.dx-art-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: var(--dx-tint);
  color: var(--dx-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dx-art-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.dx-art-chev { flex: none; color: #A3A8C3; transition: transform .15s, color .15s; }
.dx-art:hover .dx-art-chev { color: var(--dx-accent); transform: translateX(2px); }

/* Pagination, from the_posts_pagination(). */
.dx-pages .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.dx-pages .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--dx-line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
.dx-pages .page-numbers:hover { border-color: var(--dx-accent); }
.dx-pages .page-numbers.current { background: var(--dx-accent); border-color: var(--dx-accent); color: #fff; }
.dx-pages .page-numbers.dots { border-color: transparent; background: none; }

.dx-steps { display: flex; flex-wrap: wrap; gap: 12px; }
.dx-step {
  flex: 1 1 240px;
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s;
}
.dx-step:hover { border-color: var(--dx-accent); color: inherit; }
.dx-step--next { text-align: right; }
.dx-step-lab { display: block; font-size: 12px; color: #5A5F7A; }
.dx-step-name { display: block; font-weight: 700; margin-top: 4px; }

.dx-help {
  background: var(--dx-ink);
  color: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.dx-help h3 { font-size: 19px; font-weight: 700; margin: 0; }
.dx-help p { margin: 6px 0 0; font-size: 15px; color: #C4C8DC; }
.dx-help .dx-btn--light { background: #fff; color: var(--dx-ink); }

/* ---- One article (/docs/{app}/{slug}/) — left list, content, right rail ---- */
.dx-article--b2b { --dx-accent: #1C6650; --dx-tint: #E4F1EC; --dx-deep: #165240; }

.dx-art3 {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 230px;
  gap: 32px;
  align-items: start;
}
.dx-art3.is-notoc { grid-template-columns: 250px minmax(0, 1fr) 230px; }
@media (max-width: 1100px) { .dx-art3 { grid-template-columns: 240px minmax(0, 1fr); } .dx-artaside { grid-column: 1 / -1; } }
@media (max-width: 820px) { .dx-art3 { grid-template-columns: 1fr; } }

/* Left: the topic's articles */
.dx-artnav {
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 18px;
  padding: 12px;
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}
.dx-artnav-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; border-bottom: 1px solid var(--dx-line); }
.dx-artnav-icon { width: 30px; height: 30px; flex: none; border-radius: 9px; overflow: hidden; display: block; }
.dx-artnav-icon img { display: block; width: 100%; height: 100%; }
.dx-artnav-text { min-width: 0; line-height: 1.3; }
.dx-artnav-text b { display: block; font-size: 14px; font-weight: 700; }
.dx-artnav-text > span { display: block; font-size: 12px; color: #5A5F7A; margin-top: 2px; }
.dx-artnav-text a { color: var(--dx-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dx-artnav-list { list-style: none; margin: 8px 0 0; padding: 0 2px 0 0; overflow-y: auto; }
.dx-artnav-list a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--dx-muted);
  text-decoration: none;
}
.dx-artnav-list a:hover { background: var(--dx-tint); color: var(--dx-ink); }
.dx-artnav-list a.is-on { background: var(--dx-tint); color: var(--dx-deep); font-weight: 600; }

/* Centre */
.dx-artmain h1 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; margin: 0; }
.dx-artdate { margin: 10px 0 0; font-size: 13px; color: #5A5F7A; }
.dx-prose { margin-top: 20px; }
.dx-helpful {
  margin-top: 36px;
  background: #fff;
  border: 1px solid var(--dx-line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}
.dx-helpful b { font-weight: 700; }
.dx-helpful span { color: var(--dx-muted); }
.dx-helpful a { color: var(--dx-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Right rail */
.dx-artaside { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 16px; }
.dx-toc-head { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5A5F7A; margin: 0 0 10px; }
.dx-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--dx-line); }
.dx-toc li { margin: 0; }
.dx-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--dx-muted);
  text-decoration: none;
}
.dx-toc a:hover { color: var(--dx-ink); border-left-color: var(--dx-accent); }
.dx-toc .dx-toc-d3 a { padding-left: 26px; font-size: 13px; }
.dx-needhelp {
  background: var(--dx-tint);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
}
.dx-needhelp b { font-size: 14px; font-weight: 700; }
.dx-needhelp span { color: var(--dx-muted); }
.dx-needhelp .dx-btn { margin-top: 10px; align-self: flex-start; background: var(--dx-ink); font-size: 14px; padding: 10px 16px; }
.dx-needhelp .dx-btn:hover { background: var(--dx-ink); opacity: .9; }
