/* =====================================================================
   QA Madness - Knowledge Base landing (/knowledge-base/), redesign
   ---------------------------------------------------------------------
   SELF-CONTAINED: this file loads no other page's stylesheet and no other
   stylesheet depends on it. Every selector starts with `.kba` (the page's
   <main>) or `body.qm-kb-archive`, so nothing here can reach another page.

   The hero matches the Case Studies archive hero (services-hub.css +
   case-studies-archive.css) visually; the values are copied, not shared, so
   either page can change without affecting the other.

   Loaded by inc/knowledge-base-archive.php, after the shared header sheet.
   ===================================================================== */

/* ---------- Fonts (same files as the other redesigned pages; the browser
   downloads each URL once whichever sheet declares it) ---------- */
@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 ---------- */
.kba {
  --kba-bg: #110d1a;
  --kba-white: #f9f7ff;
  --kba-purple: #7d51f1;
  --kba-purple-light: #cbb9f9;
  --kba-green: #00cca6;
  --kba-green-light: #68dcc7;
  --kba-glass: rgba(21, 17, 30, 0.5);

  --kba-container: 1200px;
  --kba-gutter: 20px;
  --kba-gap: 16px;
  --kba-header-h: 74px;   /* the shared fixed header (.home-header), desktop and mobile */

  --kba-font: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --kba-serif: "GT Sectra Display", Georgia, "Times New Roman", serif;
  --kba-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --kba-dur: 200ms;
}

/* ---------- Page base ---------- */
body.qm-kb-archive {
  background: var(--kba-bg);
}
.kba {
  font-family: var(--kba-font);
  color: var(--kba-white);
  background: var(--kba-bg);
  font-size: 14px;
  line-height: 1.6;
  /* The site's old `main { overflow: hidden }` (wp-content/build/scss_library)
     made <main> a scroll box, so the sticky filters scrolled away with the
     page. Clip sideways only; vertical must stay visible for position: sticky
     (same fix as on the article page). */
  overflow-x: clip;
  overflow-y: visible;
}
.kba *,
.kba *::before,
.kba *::after { box-sizing: border-box; }
.kba h1,
.kba h2,
.kba h3 {
  margin: 0;
  color: var(--kba-white);
  font-family: var(--kba-font);
  font-weight: 700;
}
.kba p { margin: 0; }
.kba ul { margin: 0; padding: 0; list-style: none; }
.kba img { max-width: 100%; height: auto; }

.kba-container {
  width: 100%;
  max-width: calc(var(--kba-container) + var(--kba-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--kba-gutter);
}

.kba a:focus-visible,
.kba button:focus-visible {
  outline: 2px solid var(--kba-green-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.kba-arrow { flex: none; display: block; }

/* ---------- Button (same look as the Case Studies hero button) ---------- */
.kba .kba-btn {
  --kba-btn-sheen: 255, 255, 255;
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 32px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--kba-font);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s ease, gap 0.4s var(--kba-ease);
}
.kba .kba-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(to right,
              rgba(var(--kba-btn-sheen), 0) 35%,
              rgba(var(--kba-btn-sheen), 0.95) 100%);
  opacity: 0;
  transition: opacity 0.5s ease 0.18s;
  pointer-events: none;
}
.kba .kba-btn:hover::after { opacity: 1; }
.kba .kba-btn:hover { gap: 24px; }
.kba .kba-btn svg:last-child { transition: transform 0.4s var(--kba-ease); }
.kba .kba-btn:hover svg:last-child { transform: translateX(2px); }
.kba .kba-btn:focus-visible {
  outline: 2px solid var(--kba-green-light);
  outline-offset: 3px;
  border-radius: 999px;
}
.kba .kba-btn--green {
  --kba-btn-sheen: 69, 230, 186;
  background: var(--kba-green);
  color: #05221c;
}

/* =====================================================================
   Hero
   ===================================================================== */
.kba-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Centred in the screen-high hero, as on the Services hub and Case Studies.
     The paddings below stay as the minimum distances (design: 56px under the
     header on desktop, 26px on mobile) for screens the content does not fit. */
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  /* The fixed header is out of flow, so the top padding is its height plus the gap. */
  padding: calc(var(--kba-header-h) + 56px) 0 128px;
  background: var(--kba-bg);
  text-align: center;
  overflow: hidden;
}
.kba-hero--art::before {
  content: "";
  position: absolute;
  inset: -2% -1%;
  background-image: var(--kba-hero-art);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.kba-hero > .kba-container { position: relative; }

.kba .kba-hero__title {
  font-family: var(--kba-serif);
  font-weight: 900;
  font-size: 60px;
  line-height: 56px;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.kba-hero__title-lead,
.kba-hero__title-accent { display: block; }
.kba-hero__title-lead { color: var(--kba-white); }
.kba-hero__title-accent {
  background-image: linear-gradient(90deg, var(--kba-purple) 0%, var(--kba-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* The gradient is painted only inside the line box, and the line-height is
     tighter than the font size, so descenders (g, j, y) fell outside it and
     were invisible. Extend the box downward and take the space back, so the
     layout does not move. */
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}

.kba .kba-hero__desc {
  max-width: 800px;
  margin: 32px auto 0;
  font-size: 20px;
  line-height: 28px;
  color: var(--kba-white);
}

.kba-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--kba-gap);
  margin-top: 32px;
}
.kba .kba-hero__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--kba-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: color var(--kba-dur) var(--kba-ease);
}
.kba .kba-hero__link:hover,
.kba .kba-hero__link:focus-visible { color: var(--kba-green-light); }
.kba-hero__link .kba-arrow { transition: transform var(--kba-dur) var(--kba-ease); }
.kba-hero__link:hover .kba-arrow { transform: translateX(3px); }

/* ---------- Figures: glass cards, up to four per row, centred ---------- */
.kba .kba-figures {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--kba-gap);
  margin-top: 64px;
}
.kba-figure {
  flex: 0 1 calc((100% - 3 * var(--kba-gap)) / 4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: var(--kba-glass);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(8, 6, 13, 0.75);
}
.kba .kba-figure__value {
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  color: var(--kba-purple-light);
}
.kba-figure__label {
  font-size: 14px;
  line-height: 22px;
  color: var(--kba-white);
}

/* ---------- Trust badges ---------- */
.kba .kba-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 32px;
  margin-top: 64px;
}
.kba-trust__item {
  display: flex;
  align-items: center;
  height: 62px;
  padding: 12px 16px;
}
.kba .kba-trust__item img {
  display: block;
  width: auto;
  max-height: 100%;
}

/* =====================================================================
   Responsive
   ===================================================================== */

/* Short laptop screens: tighten only the vertical rhythm so the figures and
   badges stay above the fold. */
@media (min-width: 1025px) and (max-height: 900px) {
  .kba-hero { padding-bottom: 64px; }
  .kba .kba-hero__desc { margin-top: 24px; }
  .kba-hero__actions { margin-top: 24px; }
  .kba .kba-figures { margin-top: 40px; }
  .kba .kba-trust { margin-top: 32px; }
}
@media (min-width: 1025px) and (max-height: 760px) {
  .kba-hero { padding-bottom: 48px; }
  .kba .kba-hero__desc { margin-top: 16px; }
  .kba-hero__actions { margin-top: 16px; }
  .kba .kba-figures { margin-top: 24px; }
  .kba .kba-trust { margin-top: 24px; }
}

@media (max-width: 1280px) {
  .kba-hero { padding-bottom: 96px; }
  .kba .kba-hero__title { font-size: 52px; line-height: 50px; }
}

@media (max-width: 1024px) {
  .kba-hero { padding-bottom: 80px; }
  .kba .kba-hero__title { font-size: 44px; line-height: 44px; }
  .kba .kba-hero__desc { font-size: 18px; line-height: 26px; }
  .kba .kba-figures { margin-top: 48px; }
}

@media (max-width: 768px) {
  /* Mobile design: every component sits 24px from the screen edge. */
  .kba { --kba-gutter: 24px; }
  .kba-hero { padding-top: calc(var(--kba-header-h) + 26px); padding-bottom: 64px; }
  /* Mobile design (2026-11-08): title GT Sectra 900 48 / 48, lining tabular
     figures; description Noto Sans 400 20 / 28 (was 34 / 34 and 16 / 24). */
  .kba .kba-hero__title { font-size: 48px; line-height: 48px; font-variant-numeric: lining-nums tabular-nums; }
  .kba .kba-hero__desc { margin-top: 24px; font-size: 20px; line-height: 28px; }
  /* Mobile design (2026-11-08): the button's label Noto Sans Bold 18 / 100%,
     #0D1A18; 56px tall, as in the mobile mock-up (line-height 100% alone
     would make it 50). */
  .kba .kba-btn { min-height: 56px; font-size: 18px; line-height: 1; letter-spacing: 0; }
  .kba .kba-btn--green { color: #0d1a18; }
  .kba-hero__actions { margin-top: 24px; }

  /* Mobile design: 48px to the button above and the badges below, 16px between cards. */
  .kba .kba-figures { margin-top: 48px; gap: 16px; }
  .kba-figure { flex-basis: calc((100% - var(--kba-gap)) / 2); padding: 20px 16px; }
  /* Mobile design: two cards per row at every phone width; 24px / 100% figure,
     14px / 22px caption (the caption keeps its base size). */
  .kba .kba-figure__value { font-size: 24px; line-height: 1; }

  .kba .kba-trust { margin-top: 48px; column-gap: 8px; }
  .kba-trust__item { height: 52px; padding: 8px 10px; }
}

@media (max-width: 560px) {
  .kba-hero__actions { flex-direction: column; align-items: stretch; }
  .kba .kba-btn { width: 100%; justify-content: center; }
  .kba .kba-hero__link { justify-content: center; }
}

/* =====================================================================
   Guides catalogue (template-parts/knowledge-base-archive/guides.php)
   ---------------------------------------------------------------------
   Values from the design file (all-software-testing-guides.html). The font,
   the main purple, the container width and the side gutters are the hero's
   (--kba-font, --kba-purple, .kba-container) until the design's own values
   come in.
   ===================================================================== */

/* Cards, the pager and the empty note are shown and hidden by the script. */
.kba [hidden] { display: none !important; }

/* Design: the whole catalogue section on #110D1A, 64px inside at the top and
   the bottom (all widths). */
.kba-guides {
  padding: 64px 0;
  background: #110d1a;
  line-height: 1.5;
}
/* The fixed header covers the top of the page: scrolling to the catalogue
   (#guides, a page change) stops below it. */
.kba-guides,
.kba-guides__content { scroll-margin-top: calc(var(--kba-header-h) + 22px); }
/* With the enquiry form on the page, service-v2.css also sets
   `html { scroll-padding-top: 96px }` (74 header + 22), and the two offsets
   added up: the page stopped 192px above the target. One offset for the whole
   page instead, set here so it does not depend on that sheet being loaded:
   the cards column stops 22px under the header (a page change), the catalogue
   section right under it (the hero button, #guides). */
@supports selector(html:has(body)) {
  html:has(body.qm-kb-archive) { scroll-padding-top: 96px; }
  .kba-guides__content { scroll-margin-top: 0; }
  .kba-guides { scroll-margin-top: -22px; }
}

.kba .kba-guides__head {
  margin-left: 228px;   /* sidebar 196 + gap 32 */
  padding: 0 0 40px;   /* top: the section's 64px; design: 40px from the subtitle to the cards, all widths */
  text-align: center;
}
/* font-family on the class: the site-wide `h2:not(.noto-font)` (GT Sectra)
   weighs the same as `.kba h2` and loads later. */
.kba .kba-guides__title,
.kba .kba-guides__contents { font-family: var(--kba-font); }
/* Design: Noto Sans Bold 48 / 68, #F9F7FF; accent words #7D51F1. */
.kba .kba-guides__title {
  /* On the class: a site-wide h2 rule adds margin-bottom 36px and beats `.kba h2`. */
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 68px;
  color: var(--kba-white);   /* #f9f7ff */
}
.kba .kba-guides__title span { color: var(--kba-purple); }   /* #7d51f1 */
.kba .kba-guides__desc {
  margin: 16px 0 0;       /* design: 16px under the title, all widths */
  /* Design (2026-11-08): Noto Sans 400 18 / 100%, #F9F7FF, centred, every
     width (was 16 / 1.45 #D5CFDF, 13 on phones). Where it wraps (<= 900px) the
     lines are 25px apart, as in the mobile mock-up - see the media query. */
  color: var(--kba-white);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

/* Design: 32px from the filters to the cards. The section head above is
   offset by the same sidebar + gap so it centres over the cards. */
.kba-guides__layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.kba-guides__sidebar {
  position: sticky;
  /* The design's 22px, measured from under the fixed header. */
  top: calc(var(--kba-header-h) + 22px);
  color: #cac3d4;
  font-size: 12px;
}
/* Design: Noto Sans Bold 18px, line-height 100%, uppercase, #F9F7FF. */
.kba .kba-guides__contents {
  margin: 1px 0 17px;
  color: #f9f7ff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}
.kba-cats,
.kba-cats__group { display: flex; flex-direction: column; }

/* Two kinds of rows (design):
   - LINKS select a filter: "All guides" and the subcategories.
     Colours: #CCCBD2, hover #F9F7FF, selected #CBB9F9 + a 2x16 gradient mark
     on the left.
   - TITLES (the groups) only open/close their list: Noto Sans Bold 12px,
     #CCCBD2, #CBB9F9 while open - the chevron follows the text colour.
   "All guides" is a link styled like a title (Bold). Titles and "All guides":
   padding 16 top/bottom, 8 left/right (from the design screenshots: titles sit
   8px in, links 14px). Backgrounds are still the mock-up's (to be updated).
   The tags section title ("All tags" / "Available tags") is a title too. */
.kba .kba-cats__link {
  position: relative;
  width: 100%;
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #cccbd2;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--kba-font);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  padding: 16px 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, padding 0.2s;
}
.kba .kba-cats__link:hover { color: #f9f7ff; background: #181225; }
.kba .kba-cats__group.is-open > .kba-cats__link { color: #cbb9f9; }
/* "All guides" selected: as in the design the text moves in to 14px (where
   the links' text starts) to make room for the mark at 8px. */
/* Same 1px top border as the groups and the tags section (design). */
.kba .kba-cats__link[data-kba-all] { border-top: 1px solid #15111e; }
.kba .kba-cats__link.is-active {
  padding-left: 14px;
  color: #cbb9f9;
  background: #151021;
}
.kba-cats__link svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}
.kba-cats__group.is-open > .kba-cats__link svg { transform: rotate(180deg); }

/* Group backgrounds (design): closed - no background, only a 1px top border
   #15111E; open - the whole group (title + list) on #15111E80, border kept.
   The title gets no hover background of its own (only its colour changes). */
.kba-cats__group {
  border-top: 1px solid #15111e;
  transition: background 0.2s;
}
.kba-cats__group.is-open { background: #15111e80; }
.kba .kba-cats__group > .kba-cats__link:hover { background: transparent; }

.kba-cats__sub {
  display: none;
  padding: 0 0 6px;
  background: transparent;
}
.kba-cats__group.is-open .kba-cats__sub { display: block; }
/* Subcategory links. Design: Noto Sans Regular 12px, line-height 100%,
   padding 8 top/bottom, 14 left/right. */
.kba .kba-cats__sub button {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 8px 14px;
  background: transparent;
  color: #cccbd2;
  font-family: var(--kba-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.kba .kba-cats__sub button:hover { color: #f9f7ff; }
.kba .kba-cats__sub button.is-active { color: #cbb9f9; }

/* Selected-link mark. Design: 2px wide, radius 2px, gradient #7D51F1 ->
   #CBB9F9, 8px from the row's left edge, 4px before the text (text at 14px);
   same place for "All guides" and subcategories. Height = the text's height
   (user, 2026-11-06; was a fixed 16px): it spans the row's content box, i.e.
   top/bottom = the row's vertical padding - one line or several. */
.kba .kba-cats__link.is-active::before,
.kba .kba-cats__sub button.is-active::before {
  content: "";
  position: absolute;
  top: 16px;      /* .kba-cats__link padding */
  bottom: 16px;
  left: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7d51f1 0%, #cbb9f9 100%);
}
.kba .kba-cats__sub button.is-active::before {
  top: 8px;       /* subcategory padding */
  bottom: 8px;
}

/* Same 1px top border as the groups (design). */
.kba-tagfilter {
  margin-top: 1px;
  border-top: 1px solid #15111e;
}
/* Tags section title ("All tags" / "Available tags") - a title, like the
   groups (design screenshot): Bold 12px, #CCCBD2, #CBB9F9 while open (the
   chevron follows), 16/8 padding. */
.kba .kba-tagfilter__toggle {
  width: 100%;
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #cccbd2;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--kba-font);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  padding: 16px 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.kba .kba-tagfilter__toggle:hover { color: #f9f7ff; background: #181225; }
.kba .kba-tagfilter.is-open .kba-tagfilter__toggle { color: #cbb9f9; }
.kba-tagfilter__toggle svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}
.kba-tagfilter__toggle svg { transform: rotate(180deg); }
.kba-tagfilter:not(.is-open) .kba-tagfilter__toggle svg { transform: rotate(0); }
.kba-tagfilter__options {
  max-height: 260px;
  overflow-y: auto;
  padding: 0;
}
.kba-tagfilter:not(.is-open) .kba-tagfilter__options { display: none; }

/* Scrollbar (design): 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. */
.kba-tagfilter__options::-webkit-scrollbar { width: 4px; }
.kba-tagfilter__options::-webkit-scrollbar-track { background: #211f25; border-radius: 4px; }
.kba-tagfilter__options::-webkit-scrollbar-thumb { background: #cbb9f980; border-radius: 2px; }
.kba-tagfilter__options::-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) {
  .kba-tagfilter__options {
    scrollbar-width: thin;
    scrollbar-color: #cbb9f980 #211f25;
  }
}
/* Tag rows are links in the design ("category check" = the same "Link"
   component): Regular 12px, line-height 100%, 8/14 padding, #CCCBD2 /
   hover #F9F7FF. The checkbox states are still the mock-up's. */
.kba-tagfilter__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 0;
  padding: 8px 14px;
  cursor: pointer;
  color: #cccbd2;
  font-family: var(--kba-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  transition: color 0.2s;
}
.kba-tagfilter__option:hover { color: #f9f7ff; }
.kba-tagfilter__option span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Checkbox (design): 18x18 box, radius 4px, 1px border, 2px above and below
   it (the 18x22 frame).
     default  border #CBB9F980, background #15111E80
     hover    border #CBB9F9,   background #15111E80 (hovering the row or box)
     checked  border #7D51F1,   background #0D1A1880, tick #7D51F1 (shape as on
              the design screenshot). */
.kba .kba-tagfilter__option input {
  appearance: none;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 3px 2px 0;
  border: 1px solid #cbb9f980;
  border-radius: 4px;
  background: #15111e80;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.kba .kba-tagfilter__option:hover input,
.kba .kba-tagfilter__option input:hover { border-color: #cbb9f9; }
.kba .kba-tagfilter__option input:checked,
.kba .kba-tagfilter__option:hover input:checked {
  border-color: var(--kba-purple);
  background: #0d1a1880 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 7.4l3.5 3.5 5.3-5.5' fill='none' stroke='%237d51f1' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.kba-tagfilter__option[hidden] { display: none; }

/* The site's Bootstrap `button:focus` ring shows after a MOUSE click too; keep
   only the keyboard ring (`.kba button:focus-visible`, green 2px). */
.kba button:focus:not(:focus-visible),
.kba input:focus:not(:focus-visible) { outline: none; }

/* ---------- Filter states (PROVISIONAL - styled to match the sidebar until
   the design for these is approved) ---------- */

/* Subcategory: name + counter, selected, disabled (0 matching guides). */
.kba .kba-cats__sub button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kba-cats__name { min-width: 0; }
/* The counter is part of the link: it takes the link's colour (default /
   hover / selected - see above). */
.kba-cats__count { flex: none; color: inherit; font-variant-numeric: tabular-nums; }
/* Disabled (0 matching guides) - still provisional, no design yet. */
.kba .kba-cats__sub button.is-disabled,
.kba .kba-cats__sub button:disabled { color: #5a5068; cursor: default; }
.kba .kba-cats__sub button:disabled:hover { color: #5a5068; }

/* Selected tags: "Clear all" + removable chips, above the checkbox list. */
.kba-tagchips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 5px 4px 10px;
}
.kba-tagchips[hidden],
.kba-tagfilter:not(.is-open) .kba-tagchips { display: none; }
.kba-tagchips__list { display: contents; }
.kba .kba-tagchips__clear {
  appearance: none;
  margin: 0;
  border: 0;
  padding: 4px 2px;
  background: transparent;
  color: #a98bf0;
  font-family: var(--kba-font);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.kba .kba-tagchips__clear:hover { color: #d5baff; }
.kba .kba-tagchip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0;
  padding: 5px 8px 5px 10px;
  border: 1px solid #5336a1;
  border-radius: 9999px;
  background: #15111e80;
  color: #cbb9f9;
  font-family: var(--kba-font);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.kba-tagchip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kba-tagchip svg { flex: none; width: 10px; height: 10px; }
.kba .kba-tagchip:hover { border-color: var(--kba-purple); color: #f9f7ff; }

/* ---------- Cards ---------- */
.kba-guides__content { min-width: 0; }
.kba .kba-guides__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
/* Design card: 368px tall (min-height, so a long title can still grow it),
   24px padding, 24px between its parts, 16px radius, 1px border. Width comes
   from the grid. The parts below carry no vertical margins of their own - the
   24px gap is the only spacing between them. */
.kba-guide {
  min-width: 0;
  min-height: 368px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border: 1px solid;
  border-radius: 16px;
  overflow: hidden;
  /* The whole card is clickable (the title's link covers it, see
     .kba-guide__card-link) and lifts on hover, as on the Case Studies cards
     (case-studies-archive.css .csa-card: 2px, 200ms). */
  position: relative;
  transition: border-color var(--kba-dur) var(--kba-ease),
              transform var(--kba-dur) var(--kba-ease),
              box-shadow var(--kba-dur) var(--kba-ease);
}
/* Same as .csa-card: on hover and keyboard focus the border takes the card's
   main colour and a shadow appears; hover also lifts the card. */
.kba-guide--violet:hover,
.kba-guide--violet:focus-within { border-color: var(--kba-purple); }   /* #7d51f1 */
.kba-guide--teal:hover,
.kba-guide--teal:focus-within { border-color: var(--kba-green); }      /* #00cca6 */
.kba-guide:hover,
.kba-guide:focus-within { box-shadow: 0 16px 40px rgba(8, 6, 13, 0.6); }
.kba-guide:hover { transform: translateY(-2px); }

/* The title's link, stretched over the whole card. */
.kba .kba-guide__card-link,
.kba .kba-guide__card-link:hover,
.kba .kba-guide__card-link:focus { color: inherit; text-decoration: none; }
.kba-guide__card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
/* Keyboard focus rings the card, not the title text. */
.kba .kba-guide__card-link:focus-visible { outline: none; }
.kba .kba-guide__card-link:focus-visible::after {
  outline: 2px solid var(--kba-green-light);
  outline-offset: -2px;
}
.kba-guide--violet {
  background: linear-gradient(138.55deg, #342460 40.01%, #15111e 99.95%);
  border-color: #5336a1;
}
.kba-guide--teal {
  background: linear-gradient(135deg, #0d1a18 0%, #00886f 60.1%);
  border-color: #00886f;
}

/* Category label. Design: 8/16 padding, pill, 34px tall, 1px stroke all round;
   Noto Sans Bold 12px, line-height 100%. */
.kba-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;
  letter-spacing: 0;
  white-space: nowrap;
}
.kba-guide--violet .kba-guide__category { background: #15111e80; border-color: #5336a1; color: #7d51f1; }
.kba-guide--teal .kba-guide__category { background: #0d1a1880; border-color: #00886f; color: #00cca6; }

/* Design group: label, dates and title, 16px apart. The card's 24px gap then
   separates this group from the description. */
.kba-guide__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

/* Last updated. Design: Noto Sans 400 12px, line-height 100%;
   12px icons; icon + text #CBB9F9 (violet) / #68DCC7 (teal). Design spacing:
   4px icon to text. (The reading time and the dot before it were removed from
   the card - user, 2026-11-04.) */
.kba-guide__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}
.kba-guide--violet .kba-guide__meta { color: #cbb9f9; }
.kba-guide--teal .kba-guide__meta { color: #68dcc7; }
.kba-guide__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.kba-guide__meta svg { flex: none; width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }
/* Design: Noto Sans Bold 18px, line-height 100%, #F9F7FF. Font and margin on
   the class - site-wide heading rules otherwise win over `.kba h3`. */
.kba .kba-guide__title {
  margin: 0;
  font-family: var(--kba-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;   /* the user's card (2026-11-08): lines 25px apart; was 1 */
  letter-spacing: 0;
  color: #f9f7ff;
}
/* Design: Noto Sans 400 14 / 22, #F9F7FF on both colours; 24px under the
   group above (the card's gap). */
.kba .kba-guide__desc {
  margin: 0;
  color: #f9f7ff;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0;
}

.kba-guide__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
/* Tags. Design: 8px apart, 8/16 padding, Noto Sans 400 12px, line-height
   100%, centred, #CCCBD2; background #15111E80 (violet) / #0D1A1880 (teal).
   The radius is not in the design values - kept at 7px. */
.kba-guide__tag {
  padding: 8px 16px;
  border-radius: 7px;
  color: #cccbd2;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}
.kba-guide--violet .kba-guide__tag { background: #15111e80; }
.kba-guide--teal .kba-guide__tag { background: #0d1a1880; }

/* "To guide". Design: Noto Sans Bold 12px, line-height 100%, 14px icon, 8px
   text to icon, #F9F7FF. On CARD hover (as on the Case Studies cards) the text
   and arrow change colour - #CBB9F9 on violet cards, #68DCC7 on teal - and the
   arrow moves 3px away from the text. A label now, not a link: the card is. */
.kba-guide__footer { margin-top: auto; align-self: flex-end; }
.kba .kba-guide__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: #f9f7ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  transition: color 0.2s ease;
}
.kba-guide__link svg {
  flex: none;
  width: 14px;
  height: 14px;
  transition: transform var(--kba-dur) var(--kba-ease);
}
.kba .kba-guide--violet:hover .kba-guide__link,
.kba .kba-guide--violet:focus-within .kba-guide__link { color: #cbb9f9; }
.kba .kba-guide--teal:hover .kba-guide__link,
.kba .kba-guide--teal:focus-within .kba-guide__link { color: #68dcc7; }
.kba-guide:hover .kba-guide__link svg { transform: translateX(3px); }

/* ---------- Pagination ---------- */
.kba-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 25px 0 0;
}
.kba .kba-pager__arrow,
.kba .kba-pager__dot {
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: #c4bacd;
  padding: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.kba-pager__arrow svg { width: 17px; height: 17px; }
.kba .kba-pager__arrow:disabled { opacity: 0.45; cursor: not-allowed; }
.kba-pager__dots { display: flex; align-items: center; gap: 7px; }
.kba .kba-pager__dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; background: #5a5265; }
.kba .kba-pager__dot.is-current { width: 22px; background: var(--kba-purple); border-radius: 10px; }
.kba .kba-pager__dot:hover { background: #af8cf6; }

/* ---------- No results ---------- */
.kba-guides__empty {
  padding: 55px 20px;
  border-radius: 16px;
  border: 1px solid #4f3870;
  background: #21182e;
  text-align: center;
  color: #c8bfd3;
}
.kba .kba-guides__empty h3 { margin-bottom: 1em; font-size: 20px; }
.kba .kba-guides__empty p { margin-bottom: 1em; }
.kba .kba-guides__clear {
  padding: 9px 17px;
  border: 0;
  border-radius: 8px;
  background: var(--kba-purple);
  color: #fff;
  font-family: var(--kba-font);
  cursor: pointer;
}

/* ---------- Guides: responsive (the design's breakpoints) ---------- */
@media (max-width: 1100px) {
  .kba .kba-guides__head { margin-left: 222px; }   /* sidebar 190 + gap 32 */
  .kba-guides__layout { grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
}
/* The guides subtitle wraps from ~865px down: 100% line-height would set
   its lines touching (user, 2026-11-08: 25px, as in the mobile mock-up). */
@media (max-width: 900px) {
  .kba .kba-guides__desc { line-height: 25px; }
}
@media (max-width: 850px) {
  .kba .kba-guides__grid { grid-template-columns: 1fr; }
  .kba-guide { min-height: 290px; }
  /* Mobile sizes are still the HTML mock-up's; line-height kept at its previous
     1.22 here until the mobile design values arrive. */
  /* Mobile design (2026-11-08): 38 / 44 - from 850px, where the cards go to one column
     (was 36 / 1.22 here and clamp(27px, 7vw, 36px) at 700). */
  .kba .kba-guides__title { font-size: 38px; line-height: 44px; }
}
@media (max-width: 700px) {
  .kba-guides > .kba-container { max-width: calc(560px + var(--kba-gutter) * 2); }
  .kba .kba-guides__head { margin-left: 0; padding: 0 0 40px; }
  .kba-guides__layout { display: block; }
  .kba-guides__sidebar { position: static; margin-bottom: 24px; }
  .kba .kba-guides__contents { margin: 0 0 12px; }
  /* Categories in ONE column, full width, like the tags (user 2026-11-04) -
     the desktop rows as they are, no mobile overrides of their own. */
  .kba-tagfilter__options { max-height: 150px; }
  .kba-guide { min-height: 300px; }
}

/* ---------- Enquiry form (template-parts/knowledge-base-archive/form.php) ----------
   The Service pages' form, styled by service-v2.css through .sv-scope on
   .kba-form. This page's own: 64px above and below the form, all widths (the
   component's is clamp(56px, 7vw, 96px)), and the design's #131119 ground
   (the component paints #110D1A, which here is the guides section's colour
   only). (0,3,0) outranks the component's `:is(body.service-v2, .sv-scope)
   .sv-section` / `.sv-formsection` (0,2,1). */
.kba .kba-form .sv-formsection {
  padding: 64px 0;
  background: #131119;
}
/* The green glow is the component's (design 2026-11: a translucent radial,
   right on any ground) - the copy that faded to #131119 here is gone. */

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .kba *,
  .kba *::before,
  .kba *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
  .kba .kba-btn:hover { gap: 8px; }
  /* As on Case Studies: no lift, no arrow travel; the colour change stays. */
  .kba-guide:hover,
  .kba-guide:hover .kba-guide__link svg { transform: none; }
}
