/*
 * ff-kb.v2.css — Flowfinity Knowledge Base v2 overrides
 * Phases 2 + 3 + 4. Loaded by every Knowledge Base page (the v1 stack was
 * retired 2026-07).
 *
 * Namespaced under #ffkb-v2-root / .ffkb-v2 so nothing can leak onto any
 * other page.
 *   PHASE 2 — content width parity, deep-link scroll offsets,
 *             reserved-height slots (with a CSS-only skeleton so unloaded
 *             slots read as "content loading", not a blank wall).
 *   PHASE 3 — top clearance for the floating glass header + the sticky
 *             breadcrumb below it. The 16 brand pastels are KEPT as the
 *             section background (stakeholder preference — the all-white
 *             "demotion" read as too empty); the modern feel comes from the
 *             glass header + clean engine, not from stripping colour.
 *   PHASE 4 — desktop (≥1025px): sections become a flex row with ONE sticky
 *             left sidebar (~280px, internally scrollable, filterable) and a
 *             content column capped at a comfortable reading width. The right
 *             side stays clean margin — deliberately no second column.
 *             Tablet (770–1024px) and mobile (≤769px): the sidebar list and
 *             filter give way to the floating "Browse" button + bottom sheet
 *             (styled in ff-nav_mobile.css); the category header stays in the
 *             flow as a section divider.
 *   PHASE 6 — modernized landing: centered hero on a pastel-glow wash with
 *             the instant catalog search, pastel-chip topic cards, restyled
 *             Training Academy strip and the closing contact band (see the
 *             "Landing" block near the end of this file).
 *
 * Typography niceties (text-wrap) follow Chrome's Modern Web Guidance:
 * balance only on short headings, pretty on body copy; both are progressive
 * enhancements that older browsers simply ignore.
 */

#ffkb-v2-root { display: block; }

/* Reserve space for the fixed header + sticky breadcrumb.
   ≤1024px: full-width compact bar (56px) + breadcrumb row (~36px).
   ≥1025px: floating glass pill (top:20px, 64px tall) + breadcrumb pill. */
.ffkb-v2 {
  padding-top: 96px;
  /* Native scroll anchoring keeps the reading position stable while slots and
     lazy images above the viewport grow — including mid-touch-gesture on
     mobile, where a programmatic scrollBy would be dropped. The engine only
     falls back to manual scrollBy compensation in browsers without anchoring
     (see loadArticle). */
}
.ffkb-v2 mainscreen.homepage { margin-top: 0; } /* drop the old red-bar spacer */

/* Orphan pages (deliberately unlisted in the catalog): the engine leaves the
   server-rendered article static — no scaffold, so the .ffkb-v2 clearance
   above never applies. The engine adds this body class instead; without it
   the fixed header buries the article h1. */
body.ffkb-v2-orphan > section { padding-top: 96px; }
@media only screen and (min-width: 1025px) {
  body.ffkb-v2-orphan > section { padding-top: 112px; }
}

/* ------------------------------------------------------------------ *
 * Tablet (770–1024px): single column. The category header remains as a
 * divider in the flow; the article list + filter are replaced by the
 * Browse button / bottom sheet, so hide them and release the float.
 * ------------------------------------------------------------------ */
@media only screen and (min-width: 770px) and (max-width: 1024px) {
  .ffkb-v2 menu.natural,
  .ffkb-v2 menu {
    float: none;
    display: block;
    width: 100%;
    position: static;
  }
  .ffkb-v2 section > content {
    float: none;
    width: 100%;
  }
  .ffkb-v2 section > content article { max-width: 860px; }
}

/* The category header stays in the flow as a section divider on phones AND
   tablets — with the v2 treatment (compact icon + left-aligned title), not
   the legacy centered 170% heading with the oversized icon at a % margin
   (menu_mobile.css / menu.css). The tablet band is what iPad portrait and
   unfolded foldables in landscape see. (Hairline removed 2026-07-14 — read
   as a rendering glitch on phones/tablets.) */
@media (max-width: 1024px) {
  .ffkb-v2 menuheader {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 10px 4px 15px;     /* phone: matches the 15px article gutter */
    padding: 24px 0 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  }
  .ffkb-v2 menuheader h1 {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
  }
  .ffkb-v2 menuheader p { display: none; }
  .ffkb-v2 menu .section-icon {
    width: 30px;
    height: 30px;
    margin: 0;
    flex-shrink: 0;
    object-fit: contain;
  }
}
@media only screen and (min-width: 770px) and (max-width: 1024px) {
  .ffkb-v2 menuheader { margin: 0 20px 6px 50px; padding: 30px 0 12px; } /* 50px tablet gutter */
  .ffkb-v2 menuheader h1 { font-size: 20px; }
  .ffkb-v2 menu .section-icon { width: 34px; height: 34px; }
}

/* The sidebar list and its filter exist only on wide desktop; everywhere
   else the bottom sheet is the browsing surface. */
@media (max-width: 1024px) {
  .ffkb-v2 .ffkb-v2-list,
  .ffkb-v2 .ffkb-v2-filter,
  .ffkb-v2 .ffkb-v2-nomatch { display: none; }
}

/* ------------------------------------------------------------------ *
 * Desktop (≥1025px) — Phase 4 layout: flex row, ONE sticky sidebar +
 * reading-width content. (The old float + display:table-column-group
 * combination from the live menu.css is neutralised here; position:sticky
 * needs a real block in a flex row to work reliably.)
 * ------------------------------------------------------------------ */
@media only screen and (min-width: 1025px) {
  .ffkb-v2 { padding-top: 112px; }   /* pill only — no breadcrumb on desktop */

  .ffkb-v2 section {
    display: flex;
    align-items: flex-start;
    /* Center the rail+content pair under the centered nav pill: the pastel
       background still spans the full viewport, but the readable column sits
       in the same 1200px band as the navigation above it. */
    justify-content: center;
  }

  .ffkb-v2 menu.natural,
  .ffkb-v2 menu {
    position: sticky;
    top: 112px;                /* clears the floating pill */
    float: none;
    display: block;
    flex: 0 0 280px;
    width: 280px;
    box-sizing: border-box;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 24px 0 24px 14px;
    padding: 18px 14px 14px;
    background: rgb(255 255 255 / .65);
    border: 1px solid rgb(15 23 42 / .06);
  }

  .ffkb-v2 section > content {
    float: none;
    flex: 0 1 920px;   /* 280px rail + 920px content ≈ the nav's 1200px band */
    min-width: 0;
    width: auto;
  }
  /* ~760px of text once the article's own 50px inner gutters are counted.
     The space remaining on the right stays clean margin — no second rail. */
  .ffkb-v2 section > content article { max-width: 860px; }

  /* Sidebar internals — full ownership, zero inheritance from the legacy
   * menu.css treatment (centered 170% header, 80px icon with % margins,
   * PNG list bullets). One type scale, one spacing rhythm. */
  .ffkb-v2 menu,
  .ffkb-v2 menuitem,
  .ffkb-v2 menuitem a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  }

  /* Header row: 30px icon + category name on one line, hairline below */
  .ffkb-v2 menuheader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 12px;
    margin: 0 0 6px;
    border-bottom: 1px solid rgb(15 23 42 / .08);
  }
  .ffkb-v2 menuheader h1 {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: #0f172a;
  }
  .ffkb-v2 menuheader p { display: none; }  /* category descriptions are empty */
  .ffkb-v2 menu .section-icon {
    width: 30px;
    height: 30px;
    margin: 0;
    flex-shrink: 0;
    object-fit: contain;
  }

  /* Phase 4 filter (also the search-intent pilot input) */
  .ffkb-v2 .ffkb-v2-filter {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 12px 0 4px;
    padding: 8px 10px;
    /* 16px minimum: iPad Pro landscape hits this desktop band, and iPadOS
       Safari zooms the page when focusing any input below 16px. */
    font: 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: #1e293b;
    background: #fff;
    border: 1px solid rgb(15 23 42 / .12);
    border-radius: 8px;
  }
  .ffkb-v2 .ffkb-v2-filter::placeholder { color: #94a3b8; }
  .ffkb-v2 .ffkb-v2-filter:focus-visible {
    outline: 2px solid #cd0e00;
    outline-offset: 2px;
  }
  .ffkb-v2 .ffkb-v2-nomatch {
    margin: 10px 4px 0;
    font: italic 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: #64748b;
  }

  /* List: quiet, docs-grade rows — faint tint on hover, slightly stronger
     tint + brand color when active. No bullets, borders, or shadows. */
  .ffkb-v2 .ffkb-v2-list { margin: 6px 0 2px; }
  .ffkb-v2 menuitem {
    background-image: none;     /* retire the dated article/video PNG bullets */
    display: block;
    font-size: 14px;
    line-height: 1.45;
    padding: 6px 10px;
    margin: 1px 0;
    border-radius: 7px;
    transition: background-color 0.15s ease;
  }
  .ffkb-v2 menuitem a { display: block; color: #334155; }
  .ffkb-v2 menuitem:hover { background-color: rgb(15 23 42 / .05); }
  .ffkb-v2 menuitem:hover a { text-decoration: none; color: #0f172a; }
  .ffkb-v2 menuitem.selected { background-color: rgb(205 14 0 / .07); }
  .ffkb-v2 menuitem.selected a { color: #cd0e00; font-weight: 600; }
}

/* ------------------------------------------------------------------ *
 * Deep-link / scroll-into-view offset (replaces old getOffset() math)
 * ------------------------------------------------------------------ */
.ffkb-v2 section,
.ffkb-v2 article { scroll-margin-top: 100px; }
.ffkb-v2 article :where(h1, h2, h3, h4, h5, h6, [id], a[name]) { scroll-margin-top: 100px; }
@media only screen and (min-width: 1025px) {
  .ffkb-v2 section,
  .ffkb-v2 article { scroll-margin-top: 116px; }
  .ffkb-v2 article :where(h1, h2, h3, h4, h5, h6, [id], a[name]) { scroll-margin-top: 116px; }
}

/* NOTE: content-visibility:auto on off-screen articles (Phase 2) was removed
 * 2026-07-03: fast upward scrolling outran the browser's render-ahead and
 * flashed unpainted white at the top of the viewport. Loaded articles are
 * few (lazy one-ahead loading) and their images stay loading=lazy, so
 * keeping them always rendered is cheap. */

/* Not-yet-loaded articles reserve vertical space so the scrollbar is
   proportionate and content can stream in both directions. The CSS-only
   skeleton (title bar + text lines) tells the reader "an article loads
   here" instead of presenting a blank wall. Static by design — no shimmer
   to respect reduced-motion users without needing a media query. */
.ffkb-v2 article.ffkb-v2-slot {
  min-height: 70vh;
  background-image:
    linear-gradient(rgb(15 23 42 / .07), rgb(15 23 42 / .07)),
    repeating-linear-gradient(to bottom,
      rgb(15 23 42 / .045) 0px, rgb(15 23 42 / .045) 14px,
      transparent 14px, transparent 34px);
  background-repeat: no-repeat, no-repeat;
  background-position: 15px 48px, 15px 96px;
  background-size: min(46%, 320px) 26px, min(72%, 560px) 240px;
}
@media (min-width: 770px) {
  .ffkb-v2 article.ffkb-v2-slot {
    min-height: 80vh;
    background-position: 50px 64px, 50px 120px;
  }
}

/* ------------------------------------------------------------------ *
 * Horizontal-overflow containment. Legacy articles carry fixed-width
 * tables (580–900px via main.css / main_mobile.css) that used to widen
 * the whole document on phones — clipping the landing grid and pushing
 * the fixed header's hamburger and the Browse button off-screen. The
 * engine wraps each top-level table in .ffkb-v2-tablewrap; wide tables
 * now scroll inside their own container instead of breaking the page.
 * ------------------------------------------------------------------ */
.ffkb-v2 .ffkb-v2-tablewrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 20px 0 50px;       /* takes over the table's own gutter */
}
.ffkb-v2 .ffkb-v2-tablewrap > table {
  margin-left: 0;
  margin-right: 0;
}
@media (max-width: 769px) {
  .ffkb-v2 .ffkb-v2-tablewrap { margin: 0 10px; }
}
/* Backstop for any other fixed-width stragglers: `clip` avoids creating
   a scroll container, so overflow-y stays visible;
   browsers without clip support still get the table wrappers above.
   display:block matters — the legacy mobile CSS leaves the custom <content>
   element inline (its default), and overflow does not apply to inlines. */
.ffkb-v2 section > content { display: block; overflow-x: clip; }
.ffkb-v2 article iframe { max-width: 100%; }

/* ------------------------------------------------------------------ *
 * Full-width grey title band. Articles are capped at 860px for reading
 * width, which left the h1's #F0F0F0 band stopping short of the white
 * content column's right edge. Measure the column with a container query
 * and stretch ONLY the h1 to the column's full width. The legacy
 * overflow-x:hidden on article would clip the stretched band, so release
 * it — the column's own overflow-x:clip backstop above still contains
 * any real overflow. Older browsers drop the cqw declaration and simply
 * keep the current 860px band.
 * ------------------------------------------------------------------ */
.ffkb-v2 section > content { container-type: inline-size; }
.ffkb-v2 article { overflow-x: visible; }
.ffkb-v2 article h1 { margin-right: min(0px, calc(860px - 100cqw)); }

/* ------------------------------------------------------------------ *
 * Article body niceties (scoped to v2; article content itself untouched)
 * ------------------------------------------------------------------ */
.ffkb-v2 article img { max-width: 100%; height: auto; }
/* Articles receive programmatic focus after in-flow navigation (tabindex=-1);
   a page-width outline is noise, not a usable focus indicator. */
.ffkb-v2 article:focus { outline: none; }
/* Phones: a bare (non-list) image at max-width:100% runs flush against the
   right screen edge; keep a gutter matching the 15px left text gutter. */
@media (max-width: 769px) {
  /* main_mobile's img rule (margin: 25px 15px 0 0) leaves NO bottom margin,
     so text started flush under every image (desktop main.css gives 4em).
     25px mirrors the top margin for an even rhythm on phones. */
  .ffkb-v2 article img {
    max-width: calc(100% - 15px);
    margin-bottom: 25px;
  }
  /* Bare images sit in legacy INLINE div wrappers (.image-NNN, often with
     .left's 1em indent). Their max-width resolves against the full-width
     article, so the indent pushed the right edge off-screen (measured
     -1px gutter at 600px). Kill the indent and carry the 15px text gutter
     on the image itself, both sides. (!important out-guns .left's own.) */
  .ffkb-v2 article div[class*="image-"] { margin-left: 0 !important; }
  .ffkb-v2 article div[class*="image-"] img {
    margin-left: 15px;
    max-width: calc(100% - 30px);
  }
  /* …but list-nested wrappers already inherit the ul indent + right padding
     (the case the user pointed to as correct) — keep their geometry as-is. */
  .ffkb-v2 article li div[class*="image-"] img {
    margin-left: 0;
    max-width: calc(100% - 15px);
  }
}
.ffkb-v2 menuheader h1,
.ffkb-v2 article h1 { text-wrap: balance; }
.ffkb-v2 article p,
.ffkb-v2 article li { text-wrap: pretty; }

/* ------------------------------------------------------------------ *
 * Landing (home entry) — Phase 6. Replaces the dated kb/index.html
 * homepage. Built by mainscreen.v2.js from the catalog; hard-resets the
 * legacy h1/h2/p typography (grey banner, 50px gutters) inside its own
 * scope. Centered hero on a pastel-glow wash + instant catalog search,
 * "Browse by topic" pastel-chip cards, Training Academy strip, and a
 * closing contact band. All decoration is pure CSS — zero image requests.
 * ------------------------------------------------------------------ */
.ffkb-v2 .ffkb-v2-home {
  display: block;
  /* The legacy section{width:100%} rule + horizontal padding overflowed the
     page by 40px in content-box sizing — keep border-box + full width; the
     inner bands own their gutters now (the hero wash is full-bleed). */
  box-sizing: border-box;
  width: 100%;
  background: #fff;
  padding: 0 0 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Hero: centered over a light slate wash with faint radial glows drawn
   from the section pastels below (s1 purple, s6 blue, s11 green). */
.ffkb-v2 .ffkb-v2-home-hero {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 60px 20px 48px;
  text-align: center;
  background:
    radial-gradient(56rem 26rem at 12% -12%, rgb(239 228 253 / .8), transparent 68%),
    radial-gradient(52rem 24rem at 88% -10%, rgb(215 225 253 / .7), transparent 68%),
    radial-gradient(60rem 22rem at 50% 122%, rgb(228 249 238 / .55), transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.ffkb-v2 .ffkb-v2-home-title {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: #0f172a;
  text-wrap: balance;
}
.ffkb-v2 .ffkb-v2-home-sub {
  margin: 12px auto 0;
  padding: 0;
  font-size: 17px;
  line-height: 1.55;
  color: #475569;
  max-width: 56ch;
}

/* Hero search: pill echoes the glass header; the focus ring lives on the
   whole box (:focus-within). 16px input text keeps iOS from zooming. */
.ffkb-v2 .ffkb-v2-home-search { margin: 28px auto 0; max-width: 620px; }
.ffkb-v2 .ffkb-v2-home-searchbox {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 20px;
  background: #fff;
  border: 1px solid rgb(15 23 42 / .15);
  border-radius: 26px;
  box-shadow: 0 4px 18px rgb(15 23 42 / .06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ffkb-v2 .ffkb-v2-home-searchbox svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
}
.ffkb-v2 .ffkb-v2-home-searchbox:focus-within {
  border-color: #cd0e00;
  box-shadow: 0 0 0 3px rgb(205 14 0 / .12), 0 4px 18px rgb(15 23 42 / .06);
}
.ffkb-v2 .ffkb-v2-home-q {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: #0f172a;
  -webkit-appearance: none;
  appearance: none;
}
.ffkb-v2 .ffkb-v2-home-q:focus { outline: none; }  /* ring is on the box */
.ffkb-v2 .ffkb-v2-home-q::placeholder { color: #94a3b8; }

/* Search results (in-flow, above the grid). While a query has matches the
   browse sections step aside (.is-searching, toggled by the engine). */
.ffkb-v2 .ffkb-v2-home-results {
  box-sizing: border-box;
  max-width: 720px;
  margin: 26px auto 0;
  padding: 0 20px;
}
.ffkb-v2 .ffkb-v2-home-rcount {
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
  color: #64748b;
}
.ffkb-v2 .ffkb-v2-home-rlist {
  background: #fff;
  border: 1px solid rgb(15 23 42 / .1);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgb(0 0 0 / .04);
  overflow: hidden;
}
.ffkb-v2 .ffkb-v2-home-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.ffkb-v2 .ffkb-v2-home-result + .ffkb-v2-home-result {
  border-top: 1px solid rgb(15 23 42 / .06);
}
.ffkb-v2 .ffkb-v2-home-result:hover { background: rgb(15 23 42 / .03); text-decoration: none; }
.ffkb-v2 .ffkb-v2-home-result:focus-visible { outline: 2px solid #cd0e00; outline-offset: -2px; }
.ffkb-v2 .ffkb-v2-home-result-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: #1e293b;
}
.ffkb-v2 .ffkb-v2-home-result:hover .ffkb-v2-home-result-name { color: #cd0e00; }
.ffkb-v2 .ffkb-v2-home-result-cat .ffkb-v2-home-result-name { font-weight: 600; }
.ffkb-v2 .ffkb-v2-home-result-meta {
  flex-shrink: 0;
  font-size: 12.5px;
  color: #64748b;   /* AA contrast, see .ffkb-v2-home-card-n */
  white-space: nowrap;
}
.ffkb-v2 .ffkb-v2-home-noresult {
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
  text-wrap: pretty;
}
.ffkb-v2 .ffkb-v2-home-noresult a { color: #cd0e00; text-decoration: underline; }

.ffkb-v2 .ffkb-v2-home.is-searching .ffkb-v2-home-h2,
.ffkb-v2 .ffkb-v2-home.is-searching .ffkb-v2-home-grid,
.ffkb-v2 .ffkb-v2-home.is-searching .ffkb-v2-home-training,
.ffkb-v2 .ffkb-v2-home.is-searching .ffkb-v2-home-help { display: none; }

/* Section headings + the two card bands share the nav's 1200px band. */
.ffkb-v2 .ffkb-v2-home-h2 {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 44px auto 0;
  padding: 0 20px;
  clear: none;
  font-size: 19px;
  font-weight: 600;
  color: #0f172a;
}
.ffkb-v2 .ffkb-v2-home-grid,
.ffkb-v2 .ffkb-v2-home-training {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

/* Topic cards: pastel icon chip + name + count; hover lifts (the global
   reduced-motion rule at the end of this file stills the movement). */
.ffkb-v2 .ffkb-v2-home-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgb(15 23 42 / .08);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ffkb-v2 .ffkb-v2-home-card:hover,
.ffkb-v2 .ffkb-v2-home-tcard:hover {
  border-color: rgb(205 14 0 / .35);
  box-shadow: 0 8px 22px rgb(15 23 42 / .08);
  transform: translateY(-2px);
  text-decoration: none;
}
.ffkb-v2 .ffkb-v2-home-card:focus-visible,
.ffkb-v2 .ffkb-v2-home-tcard:focus-visible { outline: 2px solid #cd0e00; outline-offset: 2px; }
.ffkb-v2 .ffkb-v2-home-card-ico {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.ffkb-v2 .ffkb-v2-home-card-ico img {
  width: 26px;
  height: 26px;
  margin: 0;
  object-fit: contain;
}
.ffkb-v2 .ffkb-v2-home-card-name {
  grid-column: 2;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #1e293b;
}
.ffkb-v2 .ffkb-v2-home-card-n {
  grid-column: 2;
  margin-top: 2px;
  font-size: 12.5px;
  color: #64748b;   /* #94a3b8 measured ~2.8:1 — below WCAG AA for text */
}

/* Per-category chip pastels — the 16 section colours from main.css
   .s1–.s16 (duplicated here: main.css only loads at ≥770px). */
.ffkb-v2 .ffkb-v2-home-card[data-cat="s1"]  .ffkb-v2-home-card-ico { background: #efe4fd; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s2"]  .ffkb-v2-home-card-ico { background: #f8d6ca; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s3"]  .ffkb-v2-home-card-ico { background: #fef1dd; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s4"]  .ffkb-v2-home-card-ico { background: #ecfde7; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s5"]  .ffkb-v2-home-card-ico { background: #fffae8; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s6"]  .ffkb-v2-home-card-ico { background: #d7e1fd; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s7"]  .ffkb-v2-home-card-ico { background: #f7eaff; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s8"]  .ffkb-v2-home-card-ico { background: #e9f8f1; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s9"]  .ffkb-v2-home-card-ico { background: #d7eaff; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s10"] .ffkb-v2-home-card-ico { background: #cbd3e5; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s11"] .ffkb-v2-home-card-ico { background: #e4f9ee; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s12"] .ffkb-v2-home-card-ico { background: #f9d5ca; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s13"] .ffkb-v2-home-card-ico { background: #f9f8f8; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s14"] .ffkb-v2-home-card-ico { background: #e3def9; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s15"] .ffkb-v2-home-card-ico { background: #d3eaee; }
.ffkb-v2 .ffkb-v2-home-card[data-cat="s16"] .ffkb-v2-home-card-ico { background: #e4f9f6; }

/* Training Academy cards: same card language, title + chevron. */
.ffkb-v2 .ffkb-v2-home-tcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgb(15 23 42 / .08);
  border-radius: 14px;
  background: #fff;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #1e293b;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ffkb-v2 .ffkb-v2-home-tcard svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #94a3b8;
}
.ffkb-v2 .ffkb-v2-home-tcard:hover svg { color: #cd0e00; }

/* Closing escalation band: the only red-filled element on the landing. */
.ffkb-v2 .ffkb-v2-home-help {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 44px 20px 0;
  border-top: 1px solid rgb(15 23 42 / .07);
  text-align: center;
}
.ffkb-v2 .ffkb-v2-home-help-h {
  margin: 0 0 18px;
  padding: 0;
  clear: none;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  text-wrap: balance;
}
.ffkb-v2 .ffkb-v2-home-cta {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(155 10 0 / .95) 0%, rgb(205 14 0 / .95) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgb(205 14 0 / .3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ffkb-v2 .ffkb-v2-home-cta:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgb(205 14 0 / .42);
}
.ffkb-v2 .ffkb-v2-home-cta:focus-visible { outline: 2px solid #cd0e00; outline-offset: 3px; }

@media (max-width: 480px) {
  .ffkb-v2 .ffkb-v2-home-hero { padding: 44px 16px 36px; }
}

@media (forced-colors: active) {
  .ffkb-v2 .ffkb-v2-home-card,
  .ffkb-v2 .ffkb-v2-home-tcard,
  .ffkb-v2 .ffkb-v2-home-searchbox,
  .ffkb-v2 .ffkb-v2-home-rlist { background: Canvas; border: 1px solid CanvasText; }
  .ffkb-v2 .ffkb-v2-home-card-ico { background: Canvas; }
  .ffkb-v2 .ffkb-v2-home-cta { border: 1px solid ButtonText; }
}

/* ------------------------------------------------------------------ *
 * Loading / error affordances
 * ------------------------------------------------------------------ */
.ffkb-v2 .loader { margin: 60px auto; }
.ffkb-v2 .ffkb-v2-load-error {
  margin: 40px 50px;
  font-family: "Helvetica Neue", sans-serif;
}
.ffkb-v2 .ffkb-v2-load-error p {
  margin: 0 0 14px;
  color: #b3261e;
  font-size: 18px;
}
.ffkb-v2 .ffkb-v2-retry {
  padding: 9px 18px;
  min-height: 40px;
  font: 600 14.5px "Helvetica Neue", sans-serif;
  color: #1e293b;
  background: #fff;
  border: 1px solid rgb(15 23 42 / .2);
  border-radius: 10px;
  cursor: pointer;
}
.ffkb-v2 .ffkb-v2-retry:hover { border-color: #cd0e00; color: #cd0e00; }
.ffkb-v2 .ffkb-v2-retry:focus-visible { outline: 2px solid #cd0e00; outline-offset: 2px; }

/* ------------------------------------------------------------------ *
 * Respect reduced-motion (the engine also checks this in JS).
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .ffkb-v2,
  .ffkb-v2 * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------------ *
 * Print. KB articles are how-to instructions — people print them. Strip
 * the fixed chrome and the skeleton slots; when the engine has marked the
 * current article (beforeprint sets .ffkb-v2-printing + a target class),
 * print ONLY that article instead of every loaded one in the flow.
 * ------------------------------------------------------------------ */
@media print {
  .ffkb-nav,
  .ffkb-v2-crumb,
  .ffkb-v2-fab,
  .ffkb-v2-sheetwrap,
  .ffkb-v2-progress,
  .ffkb-v2-fb,
  .ffkb-v2 menu,
  .ffkb-v2 article.ffkb-v2-slot { display: none !important; }
  .ffkb-v2 { padding-top: 0; }
  .ffkb-v2 section { display: block; }
  .ffkb-v2 section > content { overflow-x: visible; }
  .ffkb-v2 .ffkb-v2-tablewrap { overflow-x: visible; }
  .ffkb-v2.ffkb-v2-printing article:not(.ffkb-v2-print-target),
  .ffkb-v2.ffkb-v2-printing .ffkb-v2-home { display: none !important; }
  /* Printing from the landing: the landing alone, not the lazily-loaded
     articles below it. */
  .ffkb-v2.ffkb-v2-print-home section:not(.ffkb-v2-home) { display: none !important; }
}
