/* =====================================================================
   QA Madness - Knowledge Base ARTICLE (single knowledge_base), redesign. TRIAL.
   ---------------------------------------------------------------------
   SELF-CONTAINED: every selector starts with `.kbs` (the page's <main>) or
   `body.qm-kb-article`. Values follow the Knowledge Base landing sheet
   (knowledge-base-archive.css) - copied, not shared.

   The call band, FAQ and form are the Service components (service-v2.css via
   .sv-scope on their wrappers); this sheet fits them into the article.

   The article TEXT is the editor's own markup. Its classes - ul.arrow,
   ul.circle-checkmark, ol.simple-num, .color-purple, blockquote ... - are
   restyled here, so the existing articles take the new look as they are.
   Loaded by inc/knowledge-base-article.php.
   ===================================================================== */

/* ---------- Fonts (same files as the other redesigned pages) ---------- */
@font-face {
  font-family: "GT Sectra Display";
  src: url("../../fonts/GTSectraDisplaySuper.woff2") format("woff2"),
       url("../../fonts/GTSectraDisplaySuper.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-Regular.woff2") format("woff2"),
       url("../fonts/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-Bold.woff2") format("woff2"),
       url("../fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
.kbs {
  --kbs-bg: #0b0a10;
  --kbs-bg-2: #131119;
  --kbs-card: #100e16;
  --kbs-line: #2b2734;
  --kbs-white: #f9f7ff;
  --kbs-grey: #cccbd2;
  --kbs-purple: #7d51f1;
  --kbs-purple-2: #5336a1;
  --kbs-purple-light: #cbb9f9;
  --kbs-purple-ink: #a98bf5;
  --kbs-green: #00cca6;
  --kbs-green-2: #00886f;
  --kbs-green-light: #68dcc7;

  --kbs-container: 1200px;
  --kbs-gutter: 20px;
  --kbs-header-h: 74px;
  --kbs-toc-w: 240px;

  --kbs-font: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --kbs-serif: "GT Sectra Display", Georgia, "Times New Roman", serif;
  --kbs-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --kbs-dur: 200ms;
}

/* ---------- Page base ---------- */
body.qm-kb-article { background: var(--kbs-bg); }
.kbs {
  font-family: var(--kbs-font);
  color: var(--kbs-white);
  background: var(--kbs-bg);
  font-size: 14px;
  line-height: 22px;
  /* The site's old `main { overflow: hidden }` (wp-content/build/scss_library)
     made <main> a scroll box, so the sticky "On this page" scrolled away.
     Clip sideways only; vertical must stay visible for position: sticky. */
  overflow-x: clip;
  overflow-y: visible;
}
.kbs *,
.kbs *::before,
.kbs *::after { box-sizing: border-box; }

.kbs-container {
  width: 100%;
  max-width: calc(var(--kbs-container) + var(--kbs-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--kbs-gutter);
}
.kbs a:focus-visible,
.kbs button:focus-visible {
  outline: 2px solid var(--kbs-green-light);
  outline-offset: 3px;
  border-radius: 4px;
}
/* No focus ring after a mouse click (the site's Bootstrap `button:focus` draws
   one - the white square on the slider arrows and the FAQ questions); the
   keyboard one above stays. Same as the landing (.kba). */
.kbs button:focus:not(:focus-visible),
.kbs a:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* =====================================================================
   Hero
   ===================================================================== */
.kbs-hero {
  position: relative;
  padding: calc(var(--kbs-header-h) + 90px) 0 128px;
  background: #19181d;
  text-align: center;
  overflow: hidden;
}
.kbs-hero--art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--kbs-hero-art);
  /* Design (Figma, frame 1600x470, scale mode Crop): the square artwork is
     as wide as the hero and shifted up by 840px, i.e. 840 / (1600 - 470). */
  background-size: cover;
  background-position: center 74.3%;
  pointer-events: none;
}
/* Design: the title + tags container (1200 wide, no fill) has the shadow
   0 20px 60px #15111E80. Figma casts a no-fill frame's shadow from its
   content, so it is a drop-shadow of the text and chips, not a box-shadow. */
.kbs-hero > .kbs-container {
  position: relative;
  filter: drop-shadow(0 20px 60px rgba(21, 17, 30, 0.5));
}
.kbs .kbs-hero__title {
  margin: 0;
  font-family: var(--kbs-serif);
  font-weight: 900;
  font-size: 60px;
  line-height: 56px;
  letter-spacing: 0;
  font-variant-numeric: lining-nums proportional-nums;
  color: var(--kbs-white);
  overflow-wrap: break-word;
}
.kbs .kbs-hero__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.kbs .kbs-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 16px;
  border: 1px solid #211f25;
  border-radius: 8px;
  background: rgba(21, 17, 30, 0.5);
  color: var(--kbs-grey);
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  transition: border-color var(--kbs-dur) var(--kbs-ease), color var(--kbs-dur) var(--kbs-ease);
}
.kbs .kbs-chip:hover { border-color: var(--kbs-purple); color: var(--kbs-white); }

/* =====================================================================
   Article: meta row, section cards, "On this page"
   ===================================================================== */
.kbs-article { padding: 88px 0 96px; }

.kbs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "meta" "main";
  row-gap: 24px;
}
.kbs-layout--toc {
  /* Design: the "On this page" block (240 wide, padding 24) sits right next
     to the article, so its links start 24px from it: 960 + 240 = 1200. On
     narrower screens the article column gives way, the block keeps 240. */
  grid-template-columns: minmax(0, 1fr) var(--kbs-toc-w);
  grid-template-areas: "meta ." "main toc";
  column-gap: 0;
}
.kbs-meta { grid-area: meta; }
.kbs-main { grid-area: main; min-width: 0; }
.kbs-toc  { grid-area: toc; }

/* ---------- Author + dates ---------- */
.kbs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.kbs-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
/* Author contacts: icon links, after the name block and centred on it like
   the photo. 34px buttons - the height of the date chips on the same row - with
   an 18px icon; 8px apart; 24px from the name block (16 + 8), so they read as a
   group of their own. The border and fill are the hero tag chips'. */
.kbs .kbs-author__contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 8px;
  padding: 0;
  list-style: none;
}
.kbs .kbs-author__contacts li { margin: 0; padding: 0; }
.kbs .kbs-author__contacts li::before { content: none; }
.kbs .kbs-author__contact {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #2d2a35;
  border-radius: 8px;
  background: rgba(21, 17, 30, 0.5);
  transition: border-color var(--kbs-dur) var(--kbs-ease), background var(--kbs-dur) var(--kbs-ease);
}
.kbs .kbs-author__contact:hover,
.kbs .kbs-author__contact:focus-visible {
  border-color: var(--kbs-purple);
  background: rgba(125, 81, 241, 0.12);
}
.kbs .kbs-author__contact img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}
/* On a phone the icons wrap to a row of their own, under the photo: flush with
   its left edge there, not 8px in. */
@media (max-width: 767px) {
  .kbs .kbs-author__contacts { margin-left: 0; }
}
.kbs .kbs-author__photo {
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}
.kbs-author__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kbs .kbs-author__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;       /* design: name -> arrow 8px */
  color: var(--kbs-white);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.kbs a.kbs-author__name:hover { color: var(--kbs-purple-light); }
.kbs-author__name .kbs-arrow { transition: transform var(--kbs-dur) var(--kbs-ease); }
.kbs a.kbs-author__name:hover .kbs-arrow { transform: translateX(3px); }
/* Design: Noto Sans Bold 10px, line-height 100%, uppercase, #CBB9F9. */
.kbs .kbs-author__role {
  color: var(--kbs-purple-light);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}
.kbs .kbs-meta__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
/* "Last updated" / "N min read". Design: height 34, padding 8 16, radius
   9999, 1px #CBB9F9; text Noto Sans 400 12px / 100% #CBB9F9; icon 12x12
   #CBB9F9 (currentColor); 16 between the chips. */
.kbs .kbs-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 16px;
  border: 1px solid var(--kbs-purple-light);
  border-radius: 9999px;
  color: var(--kbs-purple-light);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.kbs-pill svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- Section cards ---------- */
.kbs-card {
  border: 1px solid var(--kbs-line);
  border-radius: 16px;
  background: var(--kbs-card);
}
.kbs-main > * + * { margin-top: 24px; }

.kbs-section {
  position: relative;
  padding: 32px 48px;
  scroll-margin-top: calc(var(--kbs-header-h) + 24px);
}
.kbs-section + .kbs-section { border-top: 1px solid var(--kbs-line); }
.kbs-card > .kbs-section:first-child { padding-top: 32px; }
/* The closing summary: green outline over the card's own edge, open at the top. */
.kbs-section--summary {
  margin: 0 -1px -1px;
  border: 1px solid var(--kbs-green-2);
  border-radius: 0 0 16px 16px;
  background: #0b1012;
}
.kbs-section + .kbs-section--summary { border-top-color: var(--kbs-green-2); }
.kbs-card > .kbs-section--summary:only-child { border-radius: 16px; margin: -1px; }

.kbs .kbs-section__title {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--kbs-white);
  font-family: var(--kbs-font);
  font-size: 32px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: 0;
  text-transform: none;
}
/* Heading alignment (the section's "Heading alignment" setting). The heading
   keeps its 720px measure, so centred / right means the block moves too. */
.kbs .kbs-section__title--center { margin-left: auto; margin-right: auto; text-align: center; }
.kbs .kbs-section__title--right { margin-left: auto; text-align: right; }
/* Words coloured in the Heading editor: the design's heading accents - purple
   as "Guides" in "Related Guides", green as "Testing Today" in the call band. */
.kbs .kbs-section__title .color-purple { color: var(--kbs-purple); }
.kbs .kbs-section__title .color-green { color: var(--kbs-green); }
.kbs .kbs-section__title :is(u, [style*="underline"]) { text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* =====================================================================
   The article text (the editor's markup)
   ===================================================================== */
.kbs-content { color: var(--kbs-white); font-size: 14px; line-height: 22px; overflow-wrap: break-word; }
.kbs-content > :first-child { margin-top: 0 !important; }
.kbs-content > :last-child { margin-bottom: 0 !important; }
.kbs .kbs-content p { margin: 0 0 22px; color: inherit; font-size: inherit; line-height: inherit; }
.kbs .kbs-content a,
.kbs .kbs-faq .sv-faq__a a {
  color: var(--kbs-purple-light);
  text-decoration: underline;
  text-decoration-color: currentColor;   /* purple link, purple underline */
  text-underline-offset: 3px;
}
/* Bold (or underlined) words inside a link stay the link's purple - the text
   rule for <b>/<strong> below would otherwise paint them white. */
.kbs :is(.kbs-content, .sv-faq__a) a :is(b, strong, em, i, u, span:not(.color-purple):not(.color-green)) { color: inherit; }
.kbs .kbs-content a:hover { color: var(--kbs-white); }
.kbs .kbs-content :is(b, strong) { font-weight: 700; color: var(--kbs-white); }
.kbs .kbs-content em { font-style: italic; }

/* Sub-headings inside a section. */
.kbs .kbs-content :is(h3, h4, h5, h6) {
  margin: 32px 0 16px;
  color: var(--kbs-white);
  font-family: var(--kbs-font);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  font-style: normal;
}
.kbs .kbs-content h3 { font-size: 22px; line-height: 30px; }
.kbs .kbs-content h4 { font-size: 18px; line-height: 26px; }
.kbs .kbs-content :is(h5, h6) { font-size: 16px; line-height: 24px; }

/* Coloured words in the text (the editors' Purple / Green buttons; .color-purple
   is also what the existing articles use). In running text purple is the light
   shade, as "Watch Deferred most closely." in the design - the heading purple
   is too dark for small text on this background. Same in cards, callouts,
   tables and FAQ answers. */
.kbs :is(.kbs-content, .sv-faq__a) .color-purple,
.kbs :is(.kbs-content, .sv-faq__a) .color-purple * { color: var(--kbs-purple-light) !important; }
.kbs :is(.kbs-content, .sv-faq__a) .color-green,
.kbs :is(.kbs-content, .sv-faq__a) .color-green * { color: var(--kbs-green) !important; }

/* Underline (the editors' Underline button): the text's own colour - white in
   running text - so it never reads as a link; links are purple, below. */
.kbs :is(.kbs-content, .sv-faq__a) :is(u, [style*="underline"]) {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

/* ---------- Plain lists ---------- */
/* Font size and line height on the lists too: the old sheets set both on lists
   globally (`ol { line-height: 2 }` and the like). */
.kbs .kbs-content :is(ul, ol) { margin: 0 0 22px; padding: 0; list-style: none; font-size: 14px; line-height: 22px; }
/* A site-wide sheet (wp-content/build/scss_library) styles a bare `.arrow` as a
   25x15 icon and hides it from 991px up - which hid every ul.arrow. */
.kbs .kbs-content ul.arrow { display: block; width: auto; height: auto; background: none; }
.kbs .kbs-content :is(ul, ol) :is(ul, ol) { margin: 8px 0 0; }
.kbs .kbs-content li { position: relative; margin: 0 0 8px; padding-left: 22px; list-style: none; font-size: inherit; line-height: inherit; }
.kbs .kbs-content li:last-child { margin-bottom: 0; }
/* Builder items are rich text, so their text comes wrapped in <p>. */
.kbs .kbs-content li > p { margin: 0 0 8px; }
.kbs .kbs-content li > p:last-child { margin-bottom: 0; }
/* The old list classes drew their markers with ::before/::after (a ring, a
   tick, a rotated border); every marker here is this sheet's own. */
.kbs .kbs-content li::before,
.kbs .kbs-content li::after { border: 0; transform: none; box-shadow: none; }
.kbs .kbs-content li::after { content: none; }
.kbs .kbs-content ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kbs-purple);
}
.kbs .kbs-content ol { counter-reset: kbs-ol; }
.kbs .kbs-content ol > li { counter-increment: kbs-ol; padding-left: 26px; }
.kbs .kbs-content ol > li::before {
  content: counter(kbs-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--kbs-purple-light);
  font-weight: 700;
}

/* ---------- Arrow rows: ul.arrow / .circle-checkmark / .checkmark ----------
   A purple tile with an arrow, then the item in an outlined box. The tile is
   the item's ::before, so it always matches the box's height.
   Design values (2026-11-08): tile 76 wide, radius 16, #5336A1; arrow 28x28
   #CBB9F9 (the user's icon); number Noto Sans Bold 24 / 100% #CBB9F9; box
   16 from the tile, padding 16/24, radius 16, 1px #5336A1, fill #15111E80,
   text 14 #F9F7FF. */
.kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li,
.kbs .kbs-content ol.simple-num > li {
  min-height: 76px;
  margin: 0 0 16px 92px;
  padding: 16px 24px;
  border: 1px solid var(--kbs-purple-2);
  border-radius: 16px;
  background: #15111e80;
  color: var(--kbs-white);
  font-size: 14px;
  /* The content (one div.kbs-row__text - qm_kbs_clean_dom() step 6b) in the
     middle of the row's height: a one-line item sits centred, as in the design. */
  display: flex;
  align-items: center;
}
.kbs .kbs-content .kbs-row__text { flex: 1 1 auto; min-width: 0; }
.kbs .kbs-content .kbs-row__text > :first-child { margin-top: 0; }
.kbs .kbs-content .kbs-row__text > :last-child { margin-bottom: 0; }
.kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li:last-child,
.kbs .kbs-content ol.simple-num > li:last-child { margin-bottom: 0; }
.kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li > *,
.kbs .kbs-content ol.simple-num > li > * { margin-top: 0; }
.kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li::before,
.kbs .kbs-content ol.simple-num > li::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -93px;
  width: 76px;
  height: auto;
  border-radius: 16px;
  background: var(--kbs-purple-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none'%3E%3Cpath d='M5.83398 14H22.1673' stroke='%23CBB9F9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14 5.83337L22.1667 14L14 22.1667' stroke='%23CBB9F9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
  display: grid;
  place-items: center;
}
/* Legacy decorations those classes used to draw (checkmarks, arrows). */
.kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li::after,
.kbs .kbs-content ol.simple-num > li::after { content: none; }
/* Numbered steps: the tile carries the number. */
.kbs .kbs-content ol.simple-num { counter-reset: kbs-step; }
.kbs .kbs-content ol.simple-num > li { counter-increment: kbs-step; }
.kbs .kbs-content ol.simple-num > li::before {
  content: counter(kbs-step, decimal-leading-zero);
  background-image: none;
  color: var(--kbs-purple-light);
  font-family: var(--kbs-font);
  font-size: 24px;
  /* !important: the site's old `ol.simple-num li::before { font-weight: 600 !important }`. */
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}
/* A list nested inside a row keeps the plain look. */
.kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark, ol.simple-num) > li :is(ul, ol) > li {
  min-height: 0; margin: 0 0 6px; padding: 0 0 0 22px; border: 0; display: list-item;
}

/* ---------- Cards (2 columns): ul.kb-cards (the Cards block) ---------- */
.kbs .kbs-content ul.kb-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.kbs .kbs-content ul.kb-cards > li {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--kbs-purple-2);
  border-radius: 12px;
}
.kbs .kbs-content ul.kb-cards > li::before { content: none; }
.kbs .kbs-content ul.kb-cards .kbs-card-title {
  display: block;
  margin-bottom: 24px;
  color: var(--kbs-purple-light);
  font-size: 18px;
  line-height: 24px;
}

/* Card text from the builder is rich text: paragraphs inside the card. */
.kbs .kbs-content ul.kb-cards > li p { margin: 0 0 12px; }
.kbs .kbs-content ul.kb-cards > li p:last-child { margin-bottom: 0; }

/* ---------- Callouts: the builder's Callout (div.kb-callout), p.kb-callout,
   blockquote (.ludwig) ---------- */
.kbs .kbs-content div.kb-callout p { margin: 0 0 8px; }
.kbs .kbs-content div.kb-callout p:last-child { margin-bottom: 0; }
.kbs .kbs-content :is(.kb-callout, blockquote) {
  margin: 0 0 8px;
  padding: 16px 24px;
  border: 1px solid var(--kbs-purple-2);
  border-radius: 12px;
  background: transparent;
  color: var(--kbs-white);
  font-size: 14px;
  line-height: 22px;
  font-style: normal;
  box-shadow: none;
}
.kbs .kbs-content :is(.kb-callout, blockquote) + :not(.kb-callout, blockquote) { margin-top: 22px; }
.kbs .kbs-content blockquote p { margin: 0 0 8px; }
.kbs .kbs-content blockquote p:last-child { margin-bottom: 0; }
.kbs .kbs-content blockquote::before,
.kbs .kbs-content blockquote::after { content: none; }

/* ---------- "Related: ..." links (p.link-icon.icon-article) ---------- */
.kbs .kbs-content p.link-icon {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}
.kbs .kbs-content p.icon-article::before {
  content: "Related: ";
  color: var(--kbs-white);
}
.kbs .kbs-content p.icon-knowledge::before { content: none; }

/* ---------- Tables ----------
   Every table of the article (Table blocks and the tables in the text) is
   printed by the table module (inc/table-editor/) and styled by its sheet,
   assets/styles/table.css - phones included. Here only what this page adds. */
.kbs .qm-table { margin: 0 0 22px; }
.kbs .qm-table:last-child { margin-bottom: 0; }
/* The text rule below paints <b>/<strong> white and outweighs table.css -
   in a heading, bold text keeps the heading's colour. */
.kbs .kbs-content .qm-table thead :is(b, strong) { color: inherit; }

/* ---------- Media ---------- */
.kbs .kbs-content img { max-width: 100%; height: auto; border-radius: 12px; }
.kbs .kbs-content .wp-caption { max-width: 100% !important; margin: 0 0 22px; }
/* The builder's Image block (the image module, assets/styles/image.css): only
   the top and bottom margins - left and right are its alignment's. */
.kbs .kbs-content .kbs-figure { margin-top: 0; margin-bottom: 22px; }
.kbs .kbs-content .kbs-figure:not(.qm-image):not(.qm-media) { margin-left: 0; margin-right: 0; }
/* Videos: the shared component (assets/styles/shared/video-blocks.css) in a
   figure - the Video block and the players in the old text. Corners as the
   images'. Beside a text the figure is a grid cell: no margins of its own. */
.kbs .kbs-content .kbs-video .qm-video { --qm-video-radius: 12px; }
.kbs .kbs-content .qm-image-text > .kbs-figure { margin: 0; }
/* The builder's Image + text block. */
.kbs .kbs-content .qm-image-text { margin: 0 0 22px; }
.kbs .kbs-content .qm-image-text__text > :first-child { margin-top: 0; }
.kbs .kbs-content .qm-image-text__text > :last-child { margin-bottom: 0; }
.kbs .kbs-content .kbs-figure img { display: block; }
.kbs .kbs-content .kbs-figure figcaption { margin: 8px 0 0; color: var(--kbs-grey); font-size: 12px; line-height: 18px; }
.kbs .kbs-content .kbs-figure figcaption p { margin: 0; }
.kbs .kbs-content .wp-caption-text { margin: 8px 0 0; color: var(--kbs-grey); font-size: 12px; }
.kbs .kbs-content iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin: 0 0 22px; }
.kbs .kbs-content :is(code, pre) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.kbs .kbs-content code { padding: 2px 6px; border-radius: 4px; background: #1a1622; color: var(--kbs-purple-light); }
.kbs .kbs-content pre { margin: 0 0 22px; padding: 16px 20px; border-radius: 12px; background: #1a1622; overflow-x: auto; }
.kbs .kbs-content pre code { padding: 0; background: none; }
.kbs .kbs-content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--kbs-line); }

/* ---------- "On this page" ---------- */
.kbs-toc { position: relative; min-width: 0; }
/* Design: the block is sticky, padding 24, 16 between the title and the
   links, top corners rounded 16. */
.kbs-toc__inner {
  position: sticky;
  top: calc(var(--kbs-header-h) + 24px);
  max-height: calc(100vh - var(--kbs-header-h) - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 16px 16px 0 0;
}
/* Scrollbar: the same as the tag filter's on the Knowledge base archive
   (.kba-tagfilter__options in knowledge-base-archive.css) - 4px wide, no
   arrows; track #211F25 radius 4px, thumb #CBB9F980 radius 2px.
   Chrome / Edge / Safari: the ::-webkit-scrollbar parts. The standard
   scrollbar-width / scrollbar-color must NOT be set for them - since Chrome
   121 those switch the webkit parts off and bring back the native bar, with
   arrows on Windows. */
.kbs-toc__inner::-webkit-scrollbar { width: 4px; }
.kbs-toc__inner::-webkit-scrollbar-track { background: #211f25; border-radius: 4px; }
.kbs-toc__inner::-webkit-scrollbar-thumb { background: #cbb9f980; border-radius: 2px; }
.kbs-toc__inner::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* Firefox (no ::-webkit-scrollbar): the standard properties - thin, no arrows;
   it does not support the radii. */
@supports not selector(::-webkit-scrollbar) {
  .kbs-toc__inner {
    scrollbar-width: thin;
    scrollbar-color: #cbb9f980 #211f25;
  }
}
/* Design: Noto Sans Bold 18px, line-height 100%, uppercase, #F9F7FF. */
.kbs .kbs-toc__title {
  margin: 0;
  color: var(--kbs-white);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}
.kbs .kbs-toc__list { margin: 0; padding: 0; list-style: none; }
.kbs .kbs-toc__list li { margin: 0; padding: 0; }
.kbs .kbs-toc__list li::before { content: none; }
/* Links - built like "All guides" in the landing filters (padding 16 8, text
   at 14px + the gradient mark at 8px when current), with the design's own
   states (user, 2026-11-06):
   - default: Noto Sans Bold 12px / 100%, #F9F7FF, 1px top border #15111E;
   - hover:   background #15111E80, instant (Figma "While hovering", 0ms);
   - current: background #15111E80, text #CBB9F9 (Figma "Smart animate",
     ease-out 300ms, both ways).
   Background has no transition (hover is instant); colour, padding and the
   mark animate 300ms ease-out. The mark is as tall as the text. */
.kbs .kbs-toc__link {
  position: relative;
  display: block;
  padding: 16px 8px;
  border-top: 1px solid #15111e;
  color: #f9f7ff;
  font-size: 12px;
  font-weight: 700;
  /* 16px, not the exported 100%: measured on the design (lines 16px apart,
     a 2-line link is 16 + 2x16 + 16 = the design's 64px row). */
  line-height: 16px;
  letter-spacing: 0;
  text-decoration: none;
  transition: color 0.3s ease-out, padding 0.3s ease-out;
}
.kbs .kbs-toc__link:hover { color: #f9f7ff; background: rgba(21, 17, 30, 0.5); }
.kbs .kbs-toc__link.is-active {
  padding-left: 14px;
  color: #cbb9f9;
  background: rgba(21, 17, 30, 0.5);
}
.kbs .kbs-toc__link::before {
  content: "";
  position: absolute;
  top: 16px;      /* = vertical padding: the mark spans the text */
  bottom: 16px;
  left: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7d51f1 0%, #cbb9f9 100%);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.kbs .kbs-toc__link.is-active::before { opacity: 1; }

/* =====================================================================
   Call band (template-parts/service-v2/section-cta.php) inside the column
   ===================================================================== */
/* (0,4,0): the component's container rule is `:is(body.service-v2
   .service-page--v2, .sv-scope) .sv-container` - (0,3,1). */
.kbs .kbs-cta.sv-scope .sv-section { padding: 24px 0; background: transparent; }
.kbs .kbs-cta.sv-scope .sv-container { max-width: none; padding-inline: 0; }
/* The design breaks the heading before the coloured words. */
.kbs .kbs-cta.sv-scope .sv-ctacard__title .sv-accent { display: block; }

/* =====================================================================
   FAQ (template-parts/service-v2/section-faq.php markup; its look is
   service-v2.css's `body.service-v2` FAQ, re-scoped here as a card)
   ===================================================================== */
.kbs-faq { scroll-margin-top: calc(var(--kbs-header-h) + 24px); }
.kbs .kbs-faq .sv-section {
  padding: 32px 48px;
  border: 1px solid var(--kbs-line);
  border-radius: 16px;
  background: var(--kbs-card);
}
.kbs .kbs-faq.sv-scope .sv-container { max-width: none; padding-inline: 0; }
.kbs .kbs-faq .sv-section__title {
  margin: 0 0 24px;
  color: var(--kbs-white);
  font-family: var(--kbs-font);
  font-size: 32px;
  font-weight: 700;
  line-height: 44px;
  text-align: left;
}
.kbs .kbs-faq .sv-section__lead { margin: 0 0 24px; }
.kbs .kbs-faq .sv-faq__list { border-top: 1px solid var(--kbs-line); }
.kbs .kbs-faq .sv-faq__item { border-bottom: 1px solid var(--kbs-line); transition: background var(--kbs-dur) var(--kbs-ease); }
.kbs .kbs-faq .sv-faq__item.is-open { background: #15121d; }
.kbs .kbs-faq .sv-faq__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 32px 24px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.kbs .kbs-faq .sv-faq__q {
  color: var(--kbs-white);
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  transition: color var(--kbs-dur) var(--kbs-ease);
}
.kbs .kbs-faq .sv-faq__item.is-open .sv-faq__q { color: var(--kbs-purple-ink); }
.kbs .kbs-faq .sv-faq__item:not(.is-open) .sv-faq__head:hover .sv-faq__q { color: var(--kbs-purple-light); }
.kbs .kbs-faq .sv-faq__icon { flex: 0 0 18px; width: 18px; height: 18px; display: grid; place-items: center; color: var(--kbs-white); }
.kbs .kbs-faq .sv-faq__icon svg { grid-area: 1 / 1; transition: opacity var(--kbs-dur) var(--kbs-ease); }
.kbs .kbs-faq .sv-faq__icon-close { opacity: 0; }
.kbs .kbs-faq .sv-faq__item.is-open .sv-faq__icon-arrow { opacity: 0; }
.kbs .kbs-faq .sv-faq__item.is-open .sv-faq__icon-close { opacity: 1; }
.kbs .kbs-faq .sv-faq__body {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.42s var(--kbs-ease), visibility 0s linear 0.42s;
}
.kbs .kbs-faq .sv-faq__item.is-open .sv-faq__body {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.42s var(--kbs-ease), visibility 0s linear 0s;
}
.kbs .kbs-faq .sv-faq__a {
  overflow: hidden;
  min-height: 0;
  padding: 0 24px;
  color: var(--kbs-white);
  font-size: 14px;
  line-height: 22px;
}
.kbs .kbs-faq .sv-faq__a::after { content: ""; display: block; height: 32px; }
.kbs .kbs-faq .sv-faq__a p { margin: 0 0 12px; }
.kbs .kbs-faq .sv-faq__a p:last-child { margin-bottom: 0; }


/* =====================================================================
   Related Guides (cards as on the Knowledge Base landing)
   ===================================================================== */
.kbs-related { padding: 80px 0 64px; background: var(--kbs-bg-2); }
.kbs-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
}
.kbs .kbs-related__title {
  margin: 0;
  color: var(--kbs-white);
  font-family: var(--kbs-font);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
}
.kbs .kbs-related__title span { color: var(--kbs-purple); }
.kbs-related__nav { display: flex; align-items: center; gap: 16px; }
.kbs-related__nav[hidden] { display: none; }
.kbs .kbs-related__btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--kbs-white);
  cursor: pointer;
}
.kbs .kbs-related__btn:disabled { opacity: 0.35; cursor: default; }
.kbs-related__btn--next svg { transform: scaleX(-1); }
.kbs-related__dots { display: flex; align-items: center; gap: 8px; }
.kbs .kbs-related__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #6d6a78;
  cursor: pointer;
  transition: width var(--kbs-dur) var(--kbs-ease), background var(--kbs-dur) var(--kbs-ease);
}
.kbs .kbs-related__dot.is-active { width: 24px; background: var(--kbs-green); }
.kbs .kbs-related__dot[hidden] { display: none; }
/* Sliding dots (many pages): the window's outer dots are smaller where more
   pages lie beyond. */
.kbs .kbs-related__dot.is-near { width: 5px; height: 5px; }
.kbs .kbs-related__dot.is-far { width: 3px; height: 3px; }

.kbs .kbs-related__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px;
  margin: 0;
  padding: 4px 0 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.kbs .kbs-related__track::-webkit-scrollbar { display: none; }
/* With the script: snap only at the page starts (a page = the cards that fit)
   and at the row's end, so a swipe turns a page, not a card. */
.kbs .kbs-related__track.is-paged > .kbs-guide { scroll-snap-align: none; }
.kbs .kbs-related__track.is-paged > .kbs-guide.is-page-start { scroll-snap-align: start; scroll-snap-stop: always; }
.kbs .kbs-related__track.is-paged > .kbs-guide.is-page-end:not(.is-page-start) { scroll-snap-align: end; }

.kbs-guide {
  scroll-snap-align: start;
  min-width: 0;
  min-height: 357px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border: 1px solid;
  border-radius: 16px;
  position: relative;
  transition: border-color var(--kbs-dur) var(--kbs-ease), transform var(--kbs-dur) var(--kbs-ease), box-shadow var(--kbs-dur) var(--kbs-ease);
}
.kbs-guide--violet { background: linear-gradient(138.55deg, #342460 40.01%, #15111e 99.95%); border-color: #5336a1; }
.kbs-guide--teal   { background: linear-gradient(135deg, #0d1a18 0%, #00886f 60.1%); border-color: #00886f; }
.kbs-guide--violet:hover, .kbs-guide--violet:focus-within { border-color: var(--kbs-purple); }
.kbs-guide--teal:hover, .kbs-guide--teal:focus-within { border-color: var(--kbs-green); }
.kbs-guide:hover, .kbs-guide:focus-within { box-shadow: 0 16px 40px rgba(8, 6, 13, 0.6); }
/* Hover lifts the card, as on the Knowledge Base page (.kba-guide: 2px,
   200ms). The row's 4px top padding leaves it room. */
.kbs-guide:hover { transform: translateY(-2px); }
.kbs .kbs-guide__card-link, .kbs .kbs-guide__card-link:hover { color: inherit; text-decoration: none; }
.kbs-guide__card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.kbs .kbs-guide__card-link:focus-visible { outline: none; }
.kbs .kbs-guide__card-link:focus-visible::after { outline: 2px solid var(--kbs-green-light); outline-offset: -2px; }
/* Label and title 16 apart, as on the Knowledge Base page's cards (the user,
   2026-11-08; was 24); the card's own gap keeps 24 to the description and tags. */
.kbs-guide__head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; }
.kbs-guide__category {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 16px;
  border: 1px solid;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.kbs-guide--violet .kbs-guide__category { background: #15111e80; border-color: #5336a1; color: #7d51f1; }
.kbs-guide--teal .kbs-guide__category { background: #0d1a1880; border-color: #00886f; color: #00cca6; }
.kbs .kbs-guide__title { margin: 0; color: var(--kbs-white); font-family: var(--kbs-font); font-size: 18px; font-weight: 700; line-height: 1.4; }
.kbs .kbs-guide__desc { margin: 0; color: var(--kbs-white); font-size: 14px; line-height: 22px; }
.kbs-guide__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.kbs-guide__tag { padding: 8px 16px; border-radius: 7px; color: var(--kbs-grey); font-size: 12px; line-height: 1; }
.kbs-guide--violet .kbs-guide__tag { background: #15111e80; }
.kbs-guide--teal .kbs-guide__tag { background: #0d1a1880; }
.kbs-guide__footer { margin-top: auto; align-self: flex-end; }
.kbs .kbs-guide__link { display: inline-flex; align-items: center; gap: 8px; color: var(--kbs-white); font-size: 12px; font-weight: 700; line-height: 1; transition: color var(--kbs-dur) var(--kbs-ease); }
.kbs-guide__link svg { flex: none; width: 14px; height: 14px; transition: transform var(--kbs-dur) var(--kbs-ease); }
.kbs .kbs-guide--violet:hover .kbs-guide__link { color: #cbb9f9; }
.kbs .kbs-guide--teal:hover .kbs-guide__link { color: #68dcc7; }
.kbs-guide:hover .kbs-guide__link svg { transform: translateX(3px); }

/* =====================================================================
   Enquiry form (template-parts/knowledge-base-archive/form.php) - same
   ground as on the Knowledge Base landing.
   ===================================================================== */
.kbs .kba-form .sv-formsection { padding: 64px 0; background: #131119; }
/* The green glow: the component's (design 2026-11, translucent - right on
   this ground too). */

/* =====================================================================
   Responsive (no mobile design yet - a straightforward single column)
   ===================================================================== */
@media (max-width: 1100px) {
  .kbs-layout--toc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "main"; }
  .kbs-toc { display: none; }
  .kbs .kbs-related__track { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 767px) {
  .kbs-hero { padding: calc(var(--kbs-header-h) + 40px) 0 64px; }
  /* Mobile design (Figma, 390 wide): the artwork is 3.45x the screen width,
     shifted left by 1.66 and up by 1.2 screen widths - set in vw so the
     crop does not depend on the hero's height. */
  .kbs-hero--art::before {
    background-size: 345vw auto;
    background-position: -166vw -120vw;
  }
  /* Mobile design: 48/48, tabular figures (desktop: proportional).
     The tags are the same as on desktop (gap 16, 32 below the title). */
  .kbs .kbs-hero__title {
    font-size: 48px;
    line-height: 48px;
    font-variant-numeric: lining-nums tabular-nums;
  }
  .kbs-article { padding: 48px 0 64px; }
  /* Mobile design: author + chips in one centred column - photo, name with
     the arrow, position, then each chip on a line of its own (16 apart).
     The contact icons (not in the mobile design) follow the position. */
  .kbs-meta { flex-direction: column; align-items: center; gap: 16px; }
  .kbs-author { flex-direction: column; gap: 16px; text-align: center; }
  /* Measured on the mobile design: name -> position 12, chips -> article 40. */
  .kbs-author__text { align-items: center; gap: 12px; }
  .kbs-layout { row-gap: 40px; }
  .kbs .kbs-author__contacts { justify-content: center; }
  .kbs .kbs-meta__chips {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
  }
  .kbs-section,
  .kbs .kbs-faq .sv-section { padding: 24px 20px; }
  .kbs .kbs-section__title,
  .kbs .kbs-faq .sv-section__title { font-size: 24px; line-height: 32px; }
  /* Mobile design (2026-11-08): the tile 44 wide (padding 0 8, radius 16),
     arrow 28x28, number 24 - the rest (box padding 16/24, 16 from the tile,
     radius, colours) as on desktop. */
  .kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li,
  .kbs .kbs-content ol.simple-num > li { margin-left: 60px; }
  .kbs .kbs-content :is(ul.arrow, ul.circle-checkmark, ul.checkmark) > li::before,
  .kbs .kbs-content ol.simple-num > li::before { left: -61px; width: 44px; padding: 0 8px; box-sizing: border-box; }
  .kbs .kbs-content ul.kb-cards { grid-template-columns: minmax(0, 1fr); }
  .kbs .kbs-faq .sv-faq__head { padding: 22px 16px; }
  .kbs .kbs-faq .sv-faq__q { font-size: 17px; line-height: 24px; }
  .kbs .kbs-faq .sv-faq__a { padding: 0 16px; }
  .kbs-related { padding: 56px 0 48px; }
  /* Mobile design: the heading centred, the cards in a COLUMN, 3 per page
     (the script shows one page at a time - --kbs-rel-per), the arrows and
     dots under them. The head is unwrapped so the nav can go last. */
  .kbs-related > .kbs-container { display: flex; flex-direction: column; }
  .kbs-related__head { display: contents; }
  /* Mobile design: Noto Sans Bold 38 / 44, centred. */
  .kbs .kbs-related__title { order: 1; margin-bottom: 32px; font-size: 38px; line-height: 44px; letter-spacing: 0; text-align: center; }
  .kbs .kbs-related__track {
    --kbs-rel-per: 3;
    order: 2;
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
  }
  .kbs .kbs-related__track > .kbs-guide.is-off { display: none; }
  .kbs-related__nav { order: 3; justify-content: center; margin-top: 32px; }
  /* Mobile design: 16 between the parts of a card (label, title,
     description, tags), 24 from them to "Read guide" (16 + 8); padding
     stays 24 all round. */
  .kbs-guide { min-height: 0; gap: 16px; }
  .kbs-guide__head { gap: 16px; }
  .kbs-guide__footer { margin-top: 8px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .kbs *,
  .kbs *::before,
  .kbs *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .kbs-guide:hover,
  .kbs-guide:hover .kbs-guide__link svg,
  .kbs a.kbs-author__name:hover .kbs-arrow { transform: none; }
}
