/* =============================================================================
   Lead Prosper — Help Center (Help Scout Docs) custom theme  ·  AUTO LIGHT/DARK
   ClickUp: TP-35630  —  matches "Lead Prosper KB Style Guide"
   -----------------------------------------------------------------------------
   This theme ships a Light / Dark / System control in the header (built by
   setupThemeToggle() in the JS). The visitor's choice is stored and re-applied
   on every page as a data-theme attribute on <html>:
     · no attribute / data-theme="light"  → the :root light palette below
     · data-theme="dark"                   → the dark palette block further down
   "System" is resolved in JS (it reads prefers-color-scheme and flips the
   attribute live), so the dark palette lives in ONE place. Without JS the page
   renders in the light palette.
   -----------------------------------------------------------------------------
   HOW TO USE
   1. Help Scout → Docs → your site → Settings → Styles → Custom CSS.
   2. Paste this whole file in. (The @import at the very top loads the fonts —
      keep it as the first line; Help Scout strips @import that isn't first.)
   3. Paste helpscout-leadprosper.js into Settings → Styles → Custom JavaScript
      (or Custom HTML/Footer) — it builds the "On this page" panel + callout
      labels + scroll-spy that pure CSS can't.
   4. Branding tab: upload a logo that reads on a LIGHT background (dark/colored
      logo). In dark mode the header goes dark; the `.brand img` rule in the
      `.brand img` note below shows how to invert a monochrome logo so it stays
      legible on the dark header (leave it as-is for multi-color logos).

   Built against Help Scout's DEFAULT Docs theme markup (#mainNav, #docsSearch,
   #fullArticle h1.title, .callout-*, aside#sidebar.span3, .articleFoot …).
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── DESIGN TOKENS ────────────────────────────────────────────────────────────
   Theme switching is driven by data-theme on <html> (set by the header toggle):
     · :root below = LIGHT theme (also the default when no attribute is set)
     · the :root[data-theme="dark"] block further down flips every token to the
       original style-guide DARK palette.
   Every color the rest of the file uses is a token, so this is the only place
   you edit to retune either palette. ──────────────────────────────────────── */
:root {
  --bg-page:        #ffffff;
  --bg-header:      #ffffff;
  --bg-nav:         #f7f5fc;
  --bg-content:     #ffffff;
  --bg-toc:         #ffffff;

  --border-header:  #e7e3f1;
  --border-subtle:  #e7e3f1;
  --section-rule:   #ece8f4;

  --text-primary:   #1b1233;
  --text-secondary: #4a4459;
  --text-muted:     #8a82a0;
  --text-logo:      #1b1233;

  --accent:         #7c3aed;
  --accent-hover:   #6d28d9;
  --link-color:     #7c3aed;
  --on-accent:      #ffffff;        /* text/icon color sitting on an --accent fill */

  --nav-text:        #5b5470;
  --nav-cat-text:    #9a93ab;
  --nav-active-text: #6d28d9;
  --nav-active-bg:   rgba(124,58,237,0.08);
  --nav-active-border: #7c3aed;
  --nav-hover-bg:    rgba(0,0,0,0.035);

  --toc-text:   #8a82a0;
  --toc-active: #6d28d9;
  --toc-border: #ece8f4;

  --code-bg:        #f3f0fb;
  --code-text:      #6d28d9;
  --code-block-bg:  #f7f5fc;
  --code-block-text:#3a2f5c;

  --table-head-bg:  #f7f5fc;
  --table-row-alt:  rgba(0,0,0,0.018);
  --table-border:   #ece8f4;

  --img-border: #e7e3f1;
  --img-shadow: rgba(27,18,51,0.10);

  --search-bg:     #f7f5fc;
  --search-text:   #9a93ab;
  --search-border: #e0dcec;
  --breadcrumb:    #9a93ab;

  --spec-bg:     #f7f5fc;
  --spec-border: #ece8f4;
  --spec-label:  #8a82a0;

  /* effects */
  --selection-bg: rgba(124,58,237,0.20);
  --selection-fg: #1b1233;
  --hero-glow:    rgba(124,58,237,0.12);
  --hero-dot:     rgba(27,18,51,0.045);   /* homepage hero dot-grid texture */
  --focus-ring:   rgba(124,58,237,0.18);
  --card-shadow:  rgba(27,18,51,0.12);

  /* document glyph used for article-list links (tinted via mask + currentColor) */
  --doc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3Cpath d='M9 13h6'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E");
  /* homepage glyphs (tinted via mask + currentColor / accent) */
  --book-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");

  /* badges */
  --badge-basic-bg:#f3f0fb; --badge-basic-text:#7c3aed;
  --badge-rec-bg:  #dcfce7; --badge-rec-text:  #15803d;
  --badge-val-bg:  #dbeafe; --badge-val-text:  #1d4ed8;
  --badge-loc-bg:  #fef3c7; --badge-loc-text:  #b45309;
  --badge-adv-bg:  #ede9fe; --badge-adv-text:  #6d28d9;
  --badge-sec-bg:  #fee2e2; --badge-sec-text:  #b91c1c;

  /* callout accents (note / important / warning / success) */
  --cq-note-bg:#eff6ff; --cq-note-bd:#3b82f6; --cq-note-fg:#1d4ed8;
  --cq-imp-bg: #fffbeb; --cq-imp-bd: #f59e0b; --cq-imp-fg: #b45309;
  --cq-warn-bg:#fef2f2; --cq-warn-bd:#ef4444; --cq-warn-fg:#b91c1c;
  --cq-ok-bg:  #f0fdf4; --cq-ok-bd:  #22c55e; --cq-ok-fg:  #15803d;
}

/* ── DARK THEME (Lead Prosper design-system palette) ────────────────────────
   Applied when JS sets data-theme="dark" on <html> — either the visitor chose
   Dark in the header toggle, or they're on "System" and their OS prefers dark
   (setupThemeToggle() resolves that and keeps it in sync live). This is the
   ONLY place the dark palette is declared.

   Sourced from the LP design system (claude.design): a cool, slate-tinted
   neutral surface stack (neutral-950 #0b0b10 → #14141b → #1c1c25 → #25252e)
   with translucent-white hairlines, and the purple accent shifted up to the
   lighter end of the brand scale (purple-300 #c4b5fd / purple-400 #a78bfa) so
   it reads cleanly on dark. Semantic + badge/callout hues derive from the
   system's success / warning / danger / info scales. ───────────────────────── */
:root[data-theme="dark"] {
    --bg-page:        #0b0b10;   /* neutral-950 (bg-app)   */
    --bg-header:      #0b0b10;
    --bg-nav:         #14141b;   /* bg-surface             */
    --bg-content:     #0b0b10;
    --bg-toc:         #0b0b10;

    --border-header:  rgba(255,255,255,0.10);   /* border        */
    --border-subtle:  rgba(255,255,255,0.08);
    --section-rule:   rgba(255,255,255,0.06);   /* border-subtle */

    --text-primary:   #f5f5f7;   /* fg-primary   */
    --text-secondary: #b5b5c2;   /* fg-secondary */
    --text-muted:     #8a8a98;   /* fg-tertiary  */
    --text-logo:      #f5f5f7;

    --accent:         #a78bfa;   /* purple-400 (border-brand) */
    --accent-hover:   #6250a9;   /* purple-300                */
    --link-color:     #c4b5fd;   /* purple-300 (fg-link)      */
    --on-accent:      #16161d;   /* neutral-900 — dark text on light-purple fill */

    --nav-text:        #b5b5c2;
    --nav-cat-text:    #8a8a98;
    --nav-active-text: #c4b5fd;
    --nav-active-bg:   rgba(124,58,237,0.18);   /* bg-brand-soft analog */
    --nav-active-border: #a78bfa;
    --nav-hover-bg:    rgba(255,255,255,0.05);

    --toc-text:   #8a8a98;
    --toc-active: #c4b5fd;
    --toc-border: rgba(255,255,255,0.10);

    --code-bg:        #1c1c25;   /* bg-elevated */
    --code-text:      #c4b5fd;
    --code-block-bg:  #14141b;   /* bg-surface  */
    --code-block-text:#e2e2e8;   /* neutral-200 */

    --table-head-bg:  #1c1c25;
    --table-row-alt:  rgba(255,255,255,0.025);
    --table-border:   rgba(255,255,255,0.10);

    --img-border: rgba(255,255,255,0.10);
    --img-shadow: rgba(0,0,0,0.50);

    --search-bg:     #1c1c25;
    --search-text:   #8a8a98;
    --search-border: rgba(255,255,255,0.10);
    --breadcrumb:    #8a8a98;

    --spec-bg:     #14141b;
    --spec-border: rgba(255,255,255,0.10);
    --spec-label:  #8a8a98;

    /* effects */
    --selection-bg: rgba(139,92,246,0.30);   /* purple-500 */
    --selection-fg: #f5f5f7;
    --hero-glow:    rgba(139,92,246,0.22);
    --hero-dot:     rgba(255,255,255,0.04);
    --focus-ring:   rgba(167,139,250,0.35);   /* DS --ring */
    --card-shadow:  rgba(0,0,0,0.50);

    /* badges — neutral base for brand, semantic tints elsewhere */
    --badge-basic-bg:#1c1c25; --badge-basic-text:#c4b5fd;
    --badge-rec-bg:  #06281c; --badge-rec-text:  #34d399;   /* success */
    --badge-val-bg:  #0d2440; --badge-val-text:  #60a5fa;   /* info    */
    --badge-loc-bg:  #2a1d05; --badge-loc-text:  #fbbf24;   /* warning */
    --badge-adv-bg:  #1c1c25; --badge-adv-text:  #c4b5fd;   /* brand   */
    --badge-sec-bg:  #2a0f0f; --badge-sec-text:  #f87171;   /* danger  */

    /* callout accents — bd = semantic-500, fg = lightened for dark contrast */
    --cq-note-bg:#0d1a2e; --cq-note-bd:#3b82f6; --cq-note-fg:#93c5fd;   /* info    */
    --cq-imp-bg: #241a05; --cq-imp-bd: #f59e0b; --cq-imp-fg: #fcd34d;   /* warning */
    --cq-warn-bg:#2a0f0f; --cq-warn-bd:#ef4444; --cq-warn-fg:#fca5a5;   /* danger  */
    --cq-ok-bg:  #06281c; --cq-ok-bd:  #22c55e; --cq-ok-fg:  #6ee7b7;   /* success */
}

* {
  box-sizing: border-box;
}

/* ── BASE ─────────────────────────────────────────────────────────────────── */
html, body {
  background: var(--bg-page) !important;
  color: var(--text-primary);
  color-scheme: light dark;   /* native controls (selects, scrollbars) follow the theme */
}
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
body:after { display: none !important; } /* kill default theme bg image layer */

::selection { background: var(--selection-bg); color: var(--selection-fg); }

a, a:hover, a:focus { color: var(--link-color); }

/* Kill the harsh default focus outline on links/buttons/etc. that shows on
   click. Keep an accessible, on-brand ring for keyboard users via
   :focus-visible only. */
a, button, [role="button"], input, select, textarea, summary,
.hs-onthispage a, .nav-list a {
  outline: none;
}
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
summary:focus-visible, .hs-onthispage a:focus-visible, .nav-list a:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

h1, h2, h3, h4, h5, p, span {
  color: var(--text-primary);
}

/* Full-bleed bars, centered content. The default Help Scout theme caps
   .container-fluid at ~1250px; we drop that cap here, then re-apply our own
   centered --content-max box on the header inner + the article row below so the
   page reads like a major docs site (full-width header bar, centered content)
   instead of content pinned to the left edge on wide monitors. */
.container-fluid, .row-fluid { max-width: none !important; margin-left: 0; margin-right: 0; }

/* ── PAGE GUTTER + CONTENT WIDTH ───────────────────────────────────────────────
   --gutter drives horizontal alignment (header logo, sidebar text, article all
   line up to --gutter from the centered box edge). --content-max caps the whole
   three-column layout and the header content, centered on wide screens so the
   columns don't stretch into dead space.
   ──────────────────────────────────────────────────────────────────────────── */
:root { --gutter: 32px; --content-max: 1560px; }

/* ── HEADER / TOP NAV (#mainNav.navbar) ───────────────────────────────────── */
#mainNav.navbar,
#mainNav .navbar-inner {
  background: var(--bg-header) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--border-header) !important;
}
/* keep the header pinned while the page scrolls under it */
#mainNav.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}
/* full-width header BAR (background + bottom border span the viewport), but its
   inner content is centered in the same --content-max box as the article row, so
   the logo lines up over the left category rail. */
/* zero the default navbar-inner side padding so the centered .container-fluid
   below sits flush to the bar edge — then its own --gutter padding is the ONLY
   horizontal offset, lining the logo up exactly with the left rail (Categories)
   and the toggles up with the right TOC rail. */
#mainNav .navbar-inner { max-width: none; padding-left: 0 !important; padding-right: 0 !important; }
#mainNav .container-fluid {
  max-width: var(--content-max) !important;   /* beats the global .container-fluid max-width:none */
  margin: 0 auto;
  /* padding: 0 var(--gutter); */
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}
#mainNav .nav-collapse { display: flex; align-items: center; gap: 22px; flex: 0 1 auto; }
#mainNav .brand,
#mainNav .brand span {
  color: var(--text-logo) !important;
  font-weight: 700;
  letter-spacing: -.01em;
  text-shadow: none !important;
  padding: 0;
}
#mainNav .brand { display: inline-flex; align-items: center; }
#mainNav .brand img { height: 42px; width: auto; }
/* "Knowledge Base" label injected next to the logo by setupBrand(); a thin
   divider separates it from the logo mark (matches the nav divider above). */
#mainNav .lp-brand-text {
  position: relative;
  margin-left: 13px;
  padding-left: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-logo) !important;
  white-space: nowrap;
}
#mainNav .lp-brand-text::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 20px;
  background: var(--border-header);
}
/* vertical divider between the logo and the nav links (matches style guide) */
#mainNav .nav { position: relative; }
#mainNav .nav::before {
  content: "";
  position: absolute;
  left: -11px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 22px;
  background: var(--border-header);
}
/* Logo: a dark/colored wordmark is uploaded (reads on the light header). In
   dark mode the header goes dark, so flatten the logo to pure white so it stays
   crisp. brightness(0) crushes every pixel to black, then invert(1) flips it to
   flat white — ignoring the original tones (no gray "PROSPER" half). */
:root[data-theme="dark"] #mainNav .brand img,
:root[data-theme="dark"] .lp-drawer-brand img { filter: brightness(0) invert(1); }

#mainNav .nav li a {
  color: var(--text-primary) !important;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 4px;
  background: transparent !important;
  text-shadow: none !important;
}
#mainNav .nav li a:hover { color: var(--accent) !important; background: transparent !important; }
#mainNav .nav li.active a { color: var(--text-primary) !important; background: transparent !important; }
.btn-navbar { background: var(--search-bg) !important; border-color: var(--search-border) !important; box-shadow: none !important; }
.btn-navbar .icon-bar { background: var(--text-muted) !important; box-shadow: none !important; }

/* Hide the auto-generated collection links in the header (Getting Started,
   Core Concepts, …). Help Scout lists every collection here as <ul class="nav">
   inside .nav-collapse; we don't want a horizontal collection bar. The JS reads
   these same links and rebuilds them as the left-sidebar category tree, so the
   data is preserved even though they're hidden here. The relocated header search
   (form#searchBar.in-header) is a SIBLING of .nav-collapse, so it is unaffected.
   .btn-navbar is the mobile hamburger that only toggled this nav — hide it too. */
#mainNav .nav-collapse { display: none !important; }
#mainNav .btn-navbar   { display: none !important; }

/* Hide the search while it still lives in the left sidebar so it doesn't flash
   there for a frame before the JS lifts it into the header. The relocated copy
   (#mainNav … .in-header, below) is no longer inside #sidebar, so it stays
   visible. NOTE: requires the theme JS — without it there is no header search. */
#sidebar #searchBar { display: none !important; }

/* Search relocated into the header bar by the JS (form#searchBar.in-header).
   Pushed to the right; button is pinned inside the input (fixes the default
   theme's overlapping search button). */
#mainNav #searchBar.in-header {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;                   /* sit on the LEFT, just after the logo/divider; the toggle's margin-left:auto handles the gap */
  flex: 0 1 240px;
  max-width: 240px;
  width: 100%;
}
#mainNav #searchBar.in-header .search-query {
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 14px 0 38px;       /* room for the pinned icon on the LEFT */
  line-height: 40px;
  background: var(--search-bg) !important;
  border: 1px solid var(--search-border) !important;
  border-radius: 9px !important;
  font-size: 14px;
}
/* the search button becomes a transparent magnifier pinned on the LEFT (no
   purple fill — matches the style-guide search pill) */
#mainNav #searchBar.in-header button {
  position: absolute;
  left: 4px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex; align-items: center; justify-content: center;
}
#mainNav #searchBar.in-header button .icon-search,
#mainNav #searchBar.in-header button i { color: var(--search-text) !important; }
#mainNav #searchBar.in-header #serp-dd {
  top: calc(100% + 6px);         /* the rest of the popover styling is shared (below) */
}

/* ── THEME TOGGLE (segmented Light / Dark / System pill) ──────────────────────
   Injected into the header bar by setupThemeToggle(). margin-left:auto pins it
   to the far right on every page (the home page has no header search to push it
   there). Colors are tokens, so it recolors itself with whichever palette is
   active. */
#mainNav .lp-theme {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: auto;          /* always pin to the far right, regardless of whether the header search is present (it isn't on the home page) */
  padding: 3px;
  background: var(--bg-nav);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}
#mainNav .lp-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  color: var(--nav-text) !important;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
#mainNav .lp-theme-btn svg { width: 17px; height: 17px; display: block; }
#mainNav .lp-theme-btn:hover {
  color: var(--text-primary) !important;
  background: var(--nav-hover-bg) !important;
}
#mainNav .lp-theme-btn.is-active {
  background: var(--nav-active-bg) !important;
  color: var(--accent) !important;
}
#mainNav .lp-theme-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── SEARCH HERO (homepage #docsSearch + #searchBar) ──────────────────────────
   A textured hero band: a soft dot-grid + ONE radial accent glow on the page
   colour (deliberately not a flat purple gradient), with a vignette that fades
   the grid out toward the edges so it reads as atmosphere, not wallpaper. The
   JS injects the eyebrow kicker (.hs-hero-kicker) and quick-link category chips
   (.hs-hero-chips). ─────────────────────────────────────────────────────────── */
#docsSearch {
  position: relative;
  background-color: var(--bg-page) !important;
  background-image:
    radial-gradient(circle at 1px 1px, var(--hero-dot) 1px, transparent 0),
    radial-gradient(820px 440px at 50% -180px, var(--hero-glow), transparent 70%) !important;
  background-size: 22px 22px, 100% 100% !important;
  border-top: 1px solid var(--border-header) !important;
  border-bottom: 1px solid var(--border-header) !important;
  padding: clamp(56px, 9vw, 104px) 24px clamp(60px, 9vw, 100px) !important;
  text-align: center;
}
#docsSearch::before {            /* vignette: dissolve the grid into the page */
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 92% at 50% 4%, transparent 32%, var(--bg-page) 80%);
}
#docsSearch > * { position: relative; z-index: 1; }

#docsSearch h1 {
  color: var(--text-primary) !important;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.07;
  font-size: clamp(30px, 4.6vw, 52px);
  max-width: 17ch;
  margin: 0 auto 14px;
  animation: lp-rise .5s cubic-bezier(.2,.7,.2,1) .04s both;
}
#docsSearch h1 + p {            /* optional theme subtitle under the headline */
  color: var(--text-muted) !important;
  font-size: 16.5px; line-height: 1.6;
  max-width: 54ch; margin: 0 auto;
}

/* hero search — one unified rounded bar: [magnifier][input grows][button].
   Built with flex (not absolute positioning) so the button always sits flush
   inside the bar on the right, regardless of how Help Scout wraps the input. */
#docsSearch #searchBar {
  position: relative;            /* positioning context for the #serp-dd popover */
  display: flex;
  align-items: center;
  max-width: 620px;
  margin: 30px auto 0;
  padding: 7px;
  background: var(--bg-content);
  border: 1px solid var(--search-border);
  border-radius: 14px;
  box-shadow: 0 14px 34px -16px var(--card-shadow), 0 1px 2px rgba(27,18,51,.04);
  transition: border-color .15s, box-shadow .15s;
  animation: lp-rise .5s cubic-bezier(.2,.7,.2,1) .09s both;
}
#docsSearch #searchBar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring), 0 14px 34px -16px var(--card-shadow);
}
#docsSearch #searchBar::before {           /* leading magnifier (a flex item) */
  content: ""; flex: 0 0 auto;
  width: 19px; height: 19px; margin: 0 4px 0 13px; pointer-events: none;
  background: var(--text-muted);
  -webkit-mask: var(--search-icon) center / contain no-repeat;
          mask: var(--search-icon) center / contain no-repeat;
}
/* the input (or any wrapper Help Scout puts around it) grows to fill the bar */
#docsSearch #searchBar > *:not(button) { flex: 1 1 auto; min-width: 0; }
#docsSearch #searchBar .search-query {
  width: 100% !important;
  height: 46px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 10px !important;
  font-size: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#docsSearch #searchBar .search-query:focus {
  border: 0 !important; box-shadow: none !important;   /* the bar shows focus */
}
#docsSearch #searchBar button {
  flex: 0 0 auto;
  position: static !important;
  height: 46px;
  margin: 0 !important;
  padding: 0 22px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}
/* search input — used in hero and in the article sidebar (#searchBar.sm) */
#searchBar .search-query {
  font-family: 'DM Sans', sans-serif !important;
  background: var(--search-bg) !important;
  border: 1px solid var(--search-border) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
#searchBar .search-query::placeholder { color: var(--search-text) !important; }
#searchBar .search-query:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}
#searchBar button {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border: 0 !important;
  border-radius: 8px !important;
  text-shadow: none !important;
  font-weight: 600;
}
#searchBar button:hover { background: var(--accent-hover) !important; }
/* the icon and the "Search" label must follow the button's --on-accent fill,
   not the global `span { color: --text-primary }` base rule (which otherwise
   leaves the label dark-on-purple in light mode / light-on-purple in dark). */
#searchBar .icon-search,
#searchBar button span { color: inherit !important; }
/* Help Scout's default theme collapses this "Search" label on narrow viewports
   (font-size:0 / display:none), leaving the hero button a bare magnifier. Force
   the label back so the button always reads as a labelled Search button. */
#docsSearch #searchBar button span {
  display: inline-block !important;
  width: auto !important;
  font-size: 14px !important;
  text-indent: 0 !important;
}
/* the input already carries a leading magnifier — the button is text-only */
#docsSearch #searchBar button .icon-search { display: none !important; }

/* ── LIVE SEARCH RESULTS DROPDOWN (#serp-dd) ──────────────────────────────────
   Help Scout's instant-results popover — markup is #serp-dd > ul.result > li > a,
   with an inline lock glyph after the title on restricted articles. It is a
   child of the search <form>, so it follows the search box wherever the JS puts
   it (hero on the homepage, header bar elsewhere — both forms are position:
   relative so this anchors under the input). We dress it like the cards/hero:
   rounded, soft drop shadow, hairline row dividers, an accent-tinted active row
   (Help Scout flags the hovered/keyboard row with .selected — its default flat
   grey is neutralised below) and a muted, downsized lock glyph. ──────────────── */
#serp-dd {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  z-index: 1100;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  background: var(--bg-content) !important;
  border: 1px solid var(--search-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px -18px var(--card-shadow), 0 2px 8px rgba(27,18,51,.05) !important;
  font-family: 'DM Sans', sans-serif;
  scrollbar-width: thin;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}
/* list reset — a little inner padding so the rounded rows inset from the edge */
#serp-dd .result,
#serp-dd ul.result {
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--bg-content) !important;
  border: 0 !important;
  max-height: none;
  overflow: unset;
}
#serp-dd .result li {
  list-style: none;
  margin: 0;
  background: transparent !important;   /* kill Help Scout's flat-grey .selected fill */
  border: 0 !important;
}
/* hairline divider between rows (not after the last) */
#serp-dd .result li + li { border-top: 1px solid var(--section-rule) !important; }
/* each result row */
#serp-dd .result li a,
#serp-dd a {
  display: block;
  margin: 0;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--text-primary) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none !important;
  background: transparent !important;
  transition: background .12s, color .12s;
}
/* hover / keyboard-selected row → accent tint on the inset row (the divider
   above is hidden so the tinted block reads as one clean pill) */
#serp-dd .result li:hover,
#serp-dd .result li.selected,
#serp-dd .result li:hover + li,
#serp-dd .result li.selected + li { border-top-color: transparent !important; }
#serp-dd .result li:hover > a,
#serp-dd .result li.selected > a,
#serp-dd .result li:hover a,
#serp-dd .result li.selected a,
#serp-dd .selected {
  background: var(--nav-active-bg) !important;
  color: var(--accent) !important;
}
/* matched query terms Help Scout wraps in <em>/<strong> */
#serp-dd em, #serp-dd strong { font-style: normal; font-weight: 700; color: var(--accent); }
/* restricted-article lock glyph (icon font / svg / img) — muted + downsized,
   sitting inline just after the title */
#serp-dd a i,
#serp-dd a svg,
#serp-dd .result i,
#serp-dd .result svg {
  width: 13px; height: 13px;
  margin-left: 5px;
  vertical-align: -1px;
  color: var(--text-muted) !important;
  fill: var(--text-muted) !important;
  opacity: .7;
}
#serp-dd a img { width: 13px; height: auto; margin-left: 5px; filter: grayscale(1) opacity(.6); }

/* ── NATIVE SELECTS (e.g. category page "Sort by …") ──────────────────────── */
select,
#main-content select,
.sortBy select,
.sort-by select,
.sort select,
#categoryHead .sort select {
  background: var(--bg-content) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 8px !important;
  padding: 7px 30px 7px 12px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  box-shadow: none !important;
  outline: none;
  height: auto;
  width: auto;
}
select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--focus-ring) !important; }

/* ── HOMEPAGE BODY (popular articles + category grid) ──────────────────────── */
#contentArea { background: var(--bg-page) !important; color: var(--text-secondary); }
/* hero is full-bleed; the rest of the homepage centres itself per-section */
body:has(#docsSearch) #contentArea { padding-left: 0 !important; padding-right: 0 !important; }
/* Help Scout's own stylesheet draws faint dividers between the homepage
   sections (a dotted line that shows up in dark mode, left over once the
   popular-articles block is removed); neutralise them on the homepage. */
body:has(#docsSearch) hr { display: none !important; }
body:has(#docsSearch) #contentArea > .row-fluid,
body:has(#docsSearch) .container,
body:has(#docsSearch) .category-list {
  border: 0 !important;
}

/* section headings (Most Popular Articles, collection titles) — centred with a
   short accent rule. */
body:has(#docsSearch) h2,
.collection-category h2,
.collection-category h2 a {
  color: var(--text-primary) !important;
  font-weight: 700;
  letter-spacing: -.02em;
}
body:has(#docsSearch) h2 {
  text-align: center;
  border: 0 !important;
  padding: 0 24px !important;
  margin: clamp(48px, 7vw, 78px) 0 4px;
  font-size: clamp(20px, 2.4vw, 26px);
}
body:has(#docsSearch) h2::after {
  content: ""; display: block;
  width: 38px; height: 3px; border-radius: 3px;
  background: var(--accent);
  margin: 16px auto 0;
}

/* Most Popular Articles — centred column of card-like rows (reuses the
   .articleList doc-icon styling, dressed up as cards on the homepage) */
body:has(#docsSearch) .articleList {
  max-width: 660px;
  margin: 24px auto 0 !important;
  display: grid; gap: 9px;
  padding: 0 24px;
}
body:has(#docsSearch) .articleList a {
  padding: 15px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-content);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(27,18,51,.04);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
body:has(#docsSearch) .articleList a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -16px var(--card-shadow);
  background: var(--bg-content) !important;
}
body:has(#docsSearch) .articleList a::after {   /* trailing arrow on hover */
  content: ""; margin-left: auto; flex-shrink: 0;
  width: 16px; height: 16px;
  background: var(--text-muted);
  -webkit-mask: var(--arrow-icon) center / contain no-repeat;
          mask: var(--arrow-icon) center / contain no-repeat;
  opacity: 0; transform: translateX(-5px);
  transition: opacity .15s, transform .15s, background .15s;
}
body:has(#docsSearch) .articleList a:hover::after {
  opacity: 1; transform: translateX(0); background: var(--accent);
}

/* ── CATEGORY GRID — the centrepiece cards ────────────────────────────────── */
.category-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  max-width: 1180px !important;   /* beats the global .row-fluid max-width:none */
  margin: clamp(40px, 6vw, 60px) auto 0 !important;
  padding: 0 24px;
  float: none !important;
}
.category-list .category {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  width: auto !important;
  min-height: 162px;
  margin: 0 !important;
  float: none !important;
  padding: 24px !important;
  text-align: left;
  text-decoration: none !important;
  background: var(--bg-content) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(27,18,51,.04);
  transition: border-color .18s, transform .18s, box-shadow .18s;
  /* staggered entrance */
  opacity: 0;
  animation: lp-rise .55s cubic-bezier(.2,.7,.2,1) both;
}
/* icon badge (tinted square) + book glyph layered on top */
.category-list .category::before {
  content: ""; position: absolute; top: 24px; left: 24px;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--nav-active-bg);
  transition: background .18s;
}
.category-list .category::after {
  content: ""; position: absolute; top: 36px; left: 36px;
  width: 22px; height: 22px;
  background: var(--accent);
  -webkit-mask: var(--book-icon) center / contain no-repeat;
          mask: var(--book-icon) center / contain no-repeat;
  transition: background .18s;
}
.category-list .category:hover {
  border-color: var(--accent) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 44px -20px var(--card-shadow), 0 0 0 1px var(--accent);
  text-decoration: none;
}
.category-list .category:hover::before { background: var(--accent); }
.category-list .category:hover::after  { background: var(--on-accent); }

.category-list .category h3 {
  margin: 60px 0 6px !important;     /* clear the 46px badge above */
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
  line-height: 1.3;
  text-decoration: none !important;
}
.category-list .category:hover h3 { text-decoration: none !important; }
.category-list .category p {
  color: var(--text-muted) !important;
  font-size: 14px; line-height: 1.55;
  margin: 0 0 4px !important;
}
.category-list .category .article-count {
  margin-top: auto;                  /* pin the count to the card's bottom */
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--badge-basic-bg);
  color: var(--badge-basic-text) !important;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none !important;
}
/* the count number is wrapped in its own <span class="notranslate"> (Help Scout
   guards it from Google Translate); it must sit as plain inline text INSIDE the
   count badge, not get a second nested pill of its own — so reset any badge
   chrome on it. The `gap` above keeps "38" and "articles" apart since flexbox
   collapses the text node's leading space. */
.category-list .category .article-count .notranslate {
  margin: 0; padding: 0;
  background: none; border-radius: 0;
}

/* page-load reveal */
@keyframes lp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.category-list .category:nth-child(1) { animation-delay: .02s; }
.category-list .category:nth-child(2) { animation-delay: .08s; }
.category-list .category:nth-child(3) { animation-delay: .14s; }
.category-list .category:nth-child(4) { animation-delay: .20s; }
.category-list .category:nth-child(5) { animation-delay: .26s; }
.category-list .category:nth-child(6) { animation-delay: .32s; }
.category-list .category:nth-child(n+7) { animation-delay: .38s; }

@media (prefers-reduced-motion: reduce) {
  #docsSearch h1, #docsSearch #searchBar,
  .category-list .category,
  .threeCol .collection { animation: none !important; opacity: 1 !important; }
}

/* ── HOMEPAGE COLLECTIONS-WITH-ARTICLES (#contentArea .threeCol) ───────────────
   Help Scout's "show articles on the home page" layout: every collection is a
   <section class="collection"> with a .collection-head (h2 + optional <p> desc)
   and a .collection-body (<ul class="popArticles">) plus an optional
   <a class="browse">. The default theme floats these as bare columns; we lay
   them out as the same card as the category grid and dress the article list like
   the nav/TOC links. The JS (trimCollections) caps each list at 5 and injects a
   "Browse all articles" link wherever it truncated one. ───────────────────────── */
.threeCol {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  max-width: 1180px !important;   /* beats the global .row-fluid max-width:none */
  margin: clamp(40px, 6vw, 60px) auto 0 !important;
  padding: 0 24px;
  float: none !important;
}
.threeCol .collection {
  display: flex !important;
  flex-direction: column;
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  padding: 26px 24px !important;
  background: var(--bg-content) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(27,18,51,.04);
  transition: border-color .18s, transform .18s, box-shadow .18s;
  opacity: 0;                                   /* staggered entrance (below) */
  animation: lp-rise .55s cubic-bezier(.2,.7,.2,1) both;
}
.threeCol .collection:hover {
  border-color: var(--accent) !important;
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -20px var(--card-shadow), 0 0 0 1px var(--accent);
}

/* header — left-aligned with an accent collection glyph; overrides the centred
   home-h2 treatment (text-align + accent underline) for these cards only */
/* kill Help Scout's default .collection-head.no-desc treatment (vertical padding
   + dashed bottom border under the title) — we draw our own divider on .collection-body */
.threeCol .collection-head,
.threeCol .collection .collection-head.no-desc,
.twoCol .collection .collection-head.no-desc {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body:has(#docsSearch) .threeCol .collection-head h2 {
  text-align: left;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 18px;
  line-height: 1.3;
}
body:has(#docsSearch) .threeCol .collection-head h2::after { display: none !important; }
.threeCol .collection-head h2 a {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--text-primary) !important;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none !important;
  padding: 0 !important;                 /* HS adds bottom padding for the underline */
  border-bottom: 0 !important;           /* kill HS's dashed underline (recolours on hover) */
}
.threeCol .collection-head h2 a:hover {
  color: var(--accent) !important;
  border-bottom: 0 !important;           /* HS :hover sets border-bottom-color: #C4C4C4 */
}
.threeCol .collection-head h2 a > i { display: none !important; }  /* hide HS lock glyph */
.threeCol .collection-head h2 a::before {
  content: ""; flex: 0 0 auto;
  width: 22px; height: 22px; margin-top: 1px;
  background: var(--accent);
  -webkit-mask: var(--book-icon) center / contain no-repeat;
          mask: var(--book-icon) center / contain no-repeat;
}
.threeCol .collection-head p {
  margin-left: 34px;
  width: max-content;
  color: var(--text-muted) !important;
  font-size: 13.5px; line-height: 1.5;
}
.threeCol .collection-head p:empty { display: none; }

/* body fills the card so the Browse link can pin to the bottom edge */
.threeCol .collection-body {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* article rows — same visual language as the nav / "On this page" links */
.threeCol .popArticles { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.threeCol .popArticles li { list-style: none; margin: 0; }
.threeCol .popArticles a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-primary) !important;
  font-size: 14.5px; font-weight: 500; line-height: 1.45;
  text-decoration: none !important;
  background-image: none !important;          /* kill a default bg-image file icon */
  transition: background .12s, color .12s;
}
.threeCol .popArticles a > i { display: none !important; }  /* hide HS doc glyph */
.threeCol .popArticles a::before {
  content: ""; flex: 0 0 auto;
  width: 16px; height: 16px; margin-top: 2px;
  background: var(--text-muted);
  -webkit-mask: var(--doc-icon) center / contain no-repeat;
          mask: var(--doc-icon) center / contain no-repeat;
  transition: background .12s;
}
.threeCol .popArticles a:hover {
  color: var(--accent) !important;
  background: var(--nav-active-bg) !important;
}
.threeCol .popArticles a:hover span {
  text-decoration: none;
}
.threeCol .popArticles a:hover::before { background: var(--accent); }

/* Belt-and-suspenders: never render more than 5 article rows per collection,
   even where the JS cap (trimCollections) doesn't run — e.g. when Help Scout
   nests .threeCol outside #contentArea on the live site. Pure CSS so the home
   page is correct on first paint regardless of the script. */
.threeCol .popArticles > li:nth-child(n+6) { display: none !important; }

/* .threeCol also carries Help Scout's Bootstrap class .row-fluid, whose clearfix
   `::before`/`::after { content:"" }` become GRID ITEMS once the container is
   display:grid — ::before claims column 1 (the blank top-left), shoving every
   card one cell right, and ::after eats a trailing cell. Killing the generated
   content removes both phantom items so only the real .collection cards lay out
   3-up. (This is the actual "empty node" — a pseudo-element, not a DOM node.) */
.threeCol::before,
.threeCol::after { content: none !important; display: none !important; }

/* Defensive: also drop any stray, non-.collection DOM child Help Scout might
   emit into the grid. #noResults is excluded so the search empty-state works. */
.threeCol > :not(.collection):not(#noResults) { display: none !important; }

/* "Browse all articles" — accent link pinned to the card's bottom edge */
.threeCol .collection-body .browse {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding-top: 16px;
  color: var(--accent) !important;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none !important;
}
.threeCol .collection-body .browse::after {
  content: ""; width: 15px; height: 15px;
  background: var(--accent);
  -webkit-mask: var(--arrow-icon) center / contain no-repeat;
          mask: var(--arrow-icon) center / contain no-repeat;
  transform: translateX(-3px);
  transition: transform .15s;
}
.threeCol .collection-body .browse:hover::after { transform: translateX(1px); }

/* staggered entrance */
.threeCol .collection:nth-child(1) { animation-delay: .02s; }
.threeCol .collection:nth-child(2) { animation-delay: .07s; }
.threeCol .collection:nth-child(3) { animation-delay: .12s; }
.threeCol .collection:nth-child(4) { animation-delay: .17s; }
.threeCol .collection:nth-child(5) { animation-delay: .22s; }
.threeCol .collection:nth-child(6) { animation-delay: .27s; }
.threeCol .collection:nth-child(n+7) { animation-delay: .32s; }

/* ── ARTICLE LIST (category page — list of articles in a category) ──────────────
   Default theme renders these as plain blue links with a gray file glyph. We
   restyle them like the nav/TOC links: accent colour, a tinted document icon,
   and a soft hover row with a left accent bar. ─────────────────────────────── */
.articleList, ul.articleList { list-style: none; margin: 8px 0 0; padding: 0; }
.articleList li { list-style: none; margin: 0 0 2px; }
/* hide the default file glyph (could be an <i>, <svg>, <img> or a background) */
.articleList a > i,
.articleList a > svg,
.articleList a > img,
.articleList li > i,
.articleList li > svg { display: none !important; }
.articleList a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-primary) !important;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none !important;
  background-image: none !important;   /* kill a default bg-image file icon */
  transition: background .12s, color .12s;
}
/* accent-tinted document icon (mask + accent fill) */
.articleList a::before {
  content: "";
  flex-shrink: 0;
  width: 17px; height: 17px;
  background: var(--accent);
  -webkit-mask: var(--doc-icon) center / contain no-repeat;
          mask: var(--doc-icon) center / contain no-repeat;
}
.articleList a:hover {
  color: var(--accent) !important;
  background: var(--nav-active-bg) !important;
}
.articleList a:hover span {
  text-decoration: none;
}

/* ── ARTICLE PAGE LAYOUT ──────────────────────────────────────────────────── */
#main-content, .contentWrapper { background: var(--bg-page) !important; }
.contentWrapper { padding: 40px 56px 72px; }

/* ── 3-COLUMN ARTICLE LAYOUT (style-guide layout) ─────────────────────────────
   Default Help Scout article markup is 2 columns (content + right sidebar).
   This flips the article row into a FULL-BLEED three-column app layout:
   Categories (left, flush to the edge with a right divider) · article (center) ·
   "On this page" TOC (right, with a left divider — injected by the JS as
   aside.hs-toc-rail). It spans the whole viewport (no centered 1180 box) so it
   matches the Lead Prosper KB style guide.
   Scoped with :has(> #main-content) so it ONLY touches article pages — the
   homepage category grid is untouched. Browsers without :has() (~5%) fall back
   to the default 2-column float layout, so nothing breaks. ─────────────────── */
/* Whole-page scroll: the article page scrolls normally (scrollbar belongs to
   the viewport), and the header + both side rails are made sticky so they
   follow the scroll instead of the center column owning the scroll. Scoped to
   pages that have the #main-content layout, so the homepage is untouched. */
body:has(.row-fluid > #main-content) { margin: 0; }
/* Sticky footer: #contentArea is the wrapper Help Scout puts around the row +
   footer. Make it a flex column tall enough to fill the viewport below the
   sticky header, and let the row grow to take up the slack — so a short article
   still pushes the footer to the very bottom of the screen, with no magic
   footer-height number. padding:0 strips the .container-fluid side padding so
   the columns sit flush to the viewport edge (their own --gutter handles
   alignment). */
#contentArea:has(> .row-fluid > #main-content) {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 67px);   /* fill below the ~67px sticky header */
  padding: 0 !important;
}
.row-fluid:has(> #main-content) {
  display: flex;
  align-items: flex-start;   /* rails can be shorter than the article */
  gap: 0;
  max-width: var(--content-max) !important;  /* cap + center the whole 3-col layout (beats global .row-fluid max-width:none) */
  width: 100%;
  margin: 0 auto;
  flex: 1 0 auto;            /* grow to push the footer to the bottom */
}
/* center: the article column. The two column dividers live on THIS element
   (not on the side rails) because it is always the tallest item in the row, so
   the rules run the full article height — matching the style guide — even when
   the Categories list or the TOC is short. align-items:stretch on the row makes
   it span the full height. */
.row-fluid:has(> #main-content) > #main-content.span9 {
  order: 2;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin: 0;
  float: none;
  background: var(--bg-page) !important;
  /* the two section dividers (only — NO card around the article) */
  border-left: 1px solid var(--border-subtle) !important;
  border-right: 1px solid var(--border-subtle) !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  /* stretch to the full row height so the dividers run top-to-bottom even when
     the article is short; the whole page scrolls when it's long */
  align-self: stretch;
}
.row-fluid:has(> #main-content) .contentWrapper {
  padding: 28px 64px 80px 56px;
  max-width: 940px;            /* keep line length readable on wide monitors */
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* left rail: Categories nav — flush to the viewport edge. Left padding ==
   --gutter so its items line up under the header logo. Sticky so it follows. */
.row-fluid:has(> #main-content) > aside#sidebar.span3 {
  order: 1;
  flex: 0 0 284px;
  width: 284px;
  margin: 0;
  float: none;
  padding: 28px 20px 40px var(--gutter);
  position: sticky;
  top: 67px;                    /* sit just below the sticky header */
  align-self: flex-start;
  max-height: calc(100vh - 67px);
  overflow-y: auto;
  scrollbar-width: thin;
}
/* right rail: "On this page" TOC — right padding == --gutter so it lines up
   under the header search box. */
.row-fluid:has(> #main-content) > .hs-toc-rail {
  order: 3;
  flex: 0 0 272px;
  width: 272px;
  padding: 28px var(--gutter) 40px 40px;
  position: sticky;
  top: 67px;                    /* sit just below the sticky header */
  align-self: flex-start;
  max-height: calc(100vh - 67px);
  overflow-y: auto;
  scrollbar-width: thin;
}
/* inside its own rail, the TOC panel no longer needs to be self-sticky */
.hs-toc-rail .hs-onthispage {
  position: static;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* the default theme can render the article inside a bordered/rounded white
   card — strip it so only the column dividers remain. */
#main-content article,
#fullArticle {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* article body wrapper */
#fullArticle {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}
a.printArticle { display: none !important; }

/* breadcrumb (default theme renders a small crumb above the title in some setups) */
#crumbs, .crumbs, .breadcrumb { color: var(--breadcrumb) !important; font-size: 13px; }
#crumbs a, .breadcrumb a { color: var(--breadcrumb) !important; }

/* ── TYPOGRAPHY (article body) ────────────────────────────────────────────── */
#fullArticle h1.title,
#fullArticle h1 {
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0 0 14px;
}
#fullArticle h2 {
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.015em;
  line-height: 1.3;
  margin: 34px 0 6px;
  padding-top: 22px;
}
#fullArticle h2:first-of-type { border-top: 0; padding-top: 0; }
#fullArticle h2 a, #fullArticle h2 a:hover { color: var(--text-primary) !important; text-decoration: none; }
#fullArticle h3 {
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -.01em;
  text-transform: none;            /* default theme uppercases h3 — we don't */
  margin: 22px 0 4px;
}
#fullArticle h4 {
  color: var(--text-muted) !important;
  font-weight: 600;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 18px 0 4px;
}
/* h5 / h6 — without these, Help Scout's default `color:#222` applies and the
   heading vanishes on the dark background (e.g. an <h5> term heading). */
#fullArticle h5 {
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -.005em;
  margin: 16px 0 4px;
}
#fullArticle h6 {
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 13px;
  margin: 14px 0 4px;
}
#fullArticle p,
#fullArticle li,
#fullArticle dd {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}
#fullArticle p { margin: 0 0 16px; text-wrap: pretty; }
#fullArticle strong, #fullArticle b { color: var(--text-primary); font-weight: 600; }
#fullArticle em, #fullArticle i { font-style: italic; }
#fullArticle u { text-decoration: underline; text-underline-offset: 2px; }
#fullArticle s, #fullArticle del { text-decoration: line-through; opacity: .6; }
#fullArticle a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  word-wrap: break-word;
}
#fullArticle a:hover { opacity: .8; }
#fullArticle hr { border: 0; border-top: 1px solid var(--section-rule); margin: 22px 0; }

/* lists */
#fullArticle ul, #fullArticle ol { padding-left: 22px; margin: 8px 0 16px; }
#fullArticle ul { list-style: disc; }
#fullArticle ol { list-style: decimal; }
#fullArticle ul ul { list-style: circle; margin: 6px 0; }
#fullArticle li { margin-bottom: 6px; }

/* definition lists — Help Scout uses <dl> for parameter/term docs (a config key
   + its description, e.g. FIELDS → "Required. Comma separated…"). The launch
   theme renders each <dt> as a stray grey chip and leaves <dd> with the
   browser's 40px indent, so reset both and lay them out as a clean
   term-over-description list: bold term, description tucked under a hairline
   rule. (dd font/size/colour already come from the shared p/li/dd rule.) */
#fullArticle dl { margin: 0 0 16px; }
#fullArticle dt {
  margin: 4px 14px;
  background: var(--badge-basic-bg);
  color: var(--badge-basic-text);
  font-weight: 600;
  font-size: 15px;
}
#fullArticle dd {
  margin: 4px 0;
  padding-left: 14px;
  padding-top: 4px;
  border-left: 2px solid var(--border-subtle);
}

/* ── INLINE CODE + CODE BLOCKS ────────────────────────────────────────────── */
#fullArticle code,
#fullArticle p code,
#fullArticle li code {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 6px;
  border: 0 !important;        /* kill the default theme's light code border */
  border-radius: 5px;
}
#fullArticle pre {
  background: var(--code-block-bg) !important;
  color: var(--code-block-text);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px 22px;
  overflow-x: auto;
  margin: 8px 0 18px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13.5px;
  line-height: 1.7;
}
#fullArticle pre code {
  background: none !important;
  color: var(--code-block-text) !important;
  padding: 0;
  font-size: 13.5px;
  border-radius: 0;
  white-space: pre;
}

/* ── IMAGES / VIDEO EMBEDS ────────────────────────────────────────────────── */
#fullArticle img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--img-border);
  box-shadow: 0 2px 16px var(--img-shadow);
  display: block;
  margin: 8px 0;
}
#fullArticle iframe,
#fullArticle .video, #fullArticle .embed-responsive {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--img-border);
  display: block;
  margin: 8px 0;
}
/* Help Scout's editor saves an author-chosen image size as an inline
   `width:NNNpx` on its OWN wrapper <figure> — a bare class="" figure that also
   holds the <figcaption>, distinct from the .hs-img figure our JS injects
   inside it. When NNN exceeds the article column that figure overflows and
   drags the image (and the injected zoom pill) out of the container. Capping
   max-width here clamps the oversized inline width — used width = min(width,
   max-width), so the stylesheet wins over the inline `width` with no
   !important — while any author width smaller than the column is preserved. */
#fullArticle figure {
  max-width: 100%;
  box-sizing: border-box;
}

/* ── IMAGE ZOOM: "Click to enlarge" pill + lightbox ──────────────────────────
   JS (enhanceImages) wraps each sizeable article image in <figure.hs-img> and
   appends the pill; clicking opens the shared #hs-lightbox with zoom + pan. */
.hs-img {
  position: relative;
  display: block;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0;
  cursor: zoom-in;
}
/* the inner image keeps its own border/shadow/radius rule above; drop the
   doubled margin now that the figure owns the vertical rhythm */
.hs-img > img { margin: 0; }

.hs-zoom-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font: 500 11.5px/1 'DM Sans', system-ui, sans-serif;
  letter-spacing: .01em;
  color: var(--text-primary);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.28);
  cursor: zoom-in;
  opacity: .8;
  transition: opacity .15s ease, background-color .15s ease;
}
.hs-img:hover .hs-zoom-pill,
.hs-img:focus-within .hs-zoom-pill { opacity: 1; }
.hs-zoom-pill:hover { background: var(--accent-hover); }
.hs-zoom-pill:focus-visible {
  outline: 2px solid var(--on-accent);
  outline-offset: 1px;
}
.hs-zoom-pill svg { display: block; }

/* ── Lightbox overlay ──────────────────────────────────────────────────────── */
#hs-lightbox[hidden] { display: none; }
#hs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;            /* above the mobile drawer (which sits ~1000) */
  display: flex;
  align-items: center;
  justify-content: center;
}
.hs-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,2,24,0.82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.hs-lb-stage {
  position: relative;
  width: 92vw;
  height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;       /* we handle pinch/pan ourselves */
}
.hs-lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
  transform-origin: center center;
  will-change: transform;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hs-lb-img:active { cursor: grabbing; }

/* close button (top-right) */
.hs-lb-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.hs-lb-close:hover { background: rgba(255,255,255,0.24); }
.hs-lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hs-lb-close svg { display: block; }

/* zoom control bar (bottom-centre): − [slider] + [zoom %] */
.hs-lb-zoom {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(20,8,48,0.72);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.hs-lb-zoom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.hs-lb-zoom button:hover { background: rgba(255,255,255,0.16); }
.hs-lb-zoom button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.hs-lb-zoom svg { display: block; }
.hs-lb-pct {
  min-width: 42px;
  padding-right: 4px;
  text-align: center;
  font: 500 12.5px/1 'DM Mono', ui-monospace, monospace;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* range slider — styled track + thumb across engines */
.hs-lb-range {
  -webkit-appearance: none;
  appearance: none;
  width: 130px;
  height: 4px;
  margin: 0 2px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  cursor: pointer;
}
.hs-lb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.hs-lb-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.hs-lb-range:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

body.hs-lb-open { overflow: hidden; }

@media (max-width: 768px) {
  .hs-lb-range { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-zoom-pill { transition: none; }
}
@media (max-width: 768px) {
  .hs-zoom-pill { right: 8px; bottom: 8px; padding: 4px 9px; font-size: 11px; }
  .hs-lb-stage { width: 96vw; height: 84vh; }
}

/* ── TABLES ───────────────────────────────────────────────────────────────── */
/* Every selector is mirrored with a `table[class]` variant so Help Scout's
   editor-classed tables (`.table-bordered`, etc.) get the SAME unified design.
   The launch theme styles `#fullArticle table.table-bordered` (and its cells)
   with a blue header / heavy borders / its own row fills, which outranks a bare
   `#fullArticle table` on specificity. The doubled `table[class][class]` matches
   ANY editor class (not just .table-bordered) and deliberately scores ABOVE the
   launch class selectors — two attribute selectors beat one class — so we win
   outright regardless of stylesheet load order, with !important on the contested
   paint props (backgrounds, borders, collapse, radius) as belt-and-suspenders.
   Every table then looks identical no matter which class the editor applied. */
#fullArticle table,
#fullArticle table[class][class] {
  width: 100%;
  border-collapse: collapse !important;
  font-size: 14px;
  border: 1px solid var(--table-border) !important;
  border-radius: 8px !important;
  margin: 8px 0 18px;
}
#fullArticle thead, #fullArticle th,
#fullArticle table[class][class] thead, #fullArticle table[class][class] th {
  background: var(--table-head-bg) !important;
}
#fullArticle th,
#fullArticle table[class][class] th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--table-border) !important;
}
#fullArticle td,
#fullArticle table[class][class] td {
  padding: 10px 14px;
  color: var(--text-secondary) !important;
  background: none !important;          /* drop the launch theme's cell fills */
  border: 0 !important;
  border-bottom: 1px solid var(--table-border) !important;
  line-height: 1.55;
  vertical-align: top;
}
#fullArticle tbody tr:last-child td,
#fullArticle table[class][class] tbody tr:last-child td { border-bottom: none !important; }
#fullArticle tbody tr:nth-child(even) td,
#fullArticle table[class][class] tbody tr:nth-child(even) td { background: var(--table-row-alt) !important; }

/* ── CALLOUTS (Help Scout editor classes: .callout-blue/-yellow/-red/-green) ─
   The JS adds a labelled header (dot + NOTE/IMPORTANT/WARNING/TIP). This CSS
   styles both the box and that injected header. */
#fullArticle .callout,
#fullArticle .callout-blue,
#fullArticle .callout-yellow,
#fullArticle .callout-red,
#fullArticle .callout-green,
#fullArticle .private-note {
  margin: 8px 0 18px;
  padding: 14px 16px;
  border-radius: 7px;
  border: 0;
  border-left: 3px solid;
  font-size: 14px;
  line-height: 1rem;
}
#fullArticle .callout-blue,
#fullArticle .callout   { background: var(--cq-note-bg) !important; border-left-color: var(--cq-note-bd) !important; }
#fullArticle .callout-yellow { background: var(--cq-imp-bg)  !important; border-left-color: var(--cq-imp-bd)  !important; }
#fullArticle .callout-red    { background: var(--cq-warn-bg) !important; border-left-color: var(--cq-warn-bd) !important; }
#fullArticle .callout-green  { background: var(--cq-ok-bg)   !important; border-left-color: var(--cq-ok-bd)   !important; }
#fullArticle .private-note   { background: var(--spec-bg) !important; border-left-color: var(--accent) !important; }

#fullArticle .callout p,
#fullArticle [class^="callout"] p,
#fullArticle .private-note p { color: var(--text-secondary); font-size: 14px; margin-bottom: 0; }
#fullArticle [class^="callout"] p:last-child,
#fullArticle .private-note p:last-child { margin-bottom: 0; }

/* injected label header */
.cq-header { display: flex; align-items: center; gap: 7px; margin-bottom: 6px !important; }
.cq-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cq-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.callout-blue   .cq-dot, .callout .cq-dot { background: var(--cq-note-fg); }
.callout-blue   .cq-lbl, .callout .cq-lbl { color: var(--cq-note-fg); }
.callout-yellow .cq-dot { background: var(--cq-imp-fg); }
.callout-yellow .cq-lbl { color: var(--cq-imp-fg); }
.callout-red    .cq-dot { background: var(--cq-warn-fg); }
.callout-red    .cq-lbl { color: var(--cq-warn-fg); }
.callout-green  .cq-dot { background: var(--cq-ok-fg); }
.callout-green  .cq-lbl { color: var(--cq-ok-fg); }
.private-note   .cq-dot { background: var(--accent); }
.private-note   .cq-lbl { color: var(--accent); }

/* ── STEP-BY-STEP (author wraps an <ol> in .steps-list, or just a normal ol) ─ */
#fullArticle ol.steps-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 18px;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#fullArticle ol.steps-list > li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}
#fullArticle ol.steps-list > li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px; font-weight: 700;
  margin-top: 2px;
}

/* ── BADGES (inline spans authors add via editor source) ──────────────────── */
#fullArticle .badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
#fullArticle .badge-basic { background: var(--badge-basic-bg); color: var(--badge-basic-text); }
#fullArticle .badge-rec   { background: var(--badge-rec-bg);   color: var(--badge-rec-text); }
#fullArticle .badge-val   { background: var(--badge-val-bg);   color: var(--badge-val-text); }
#fullArticle .badge-loc   { background: var(--badge-loc-bg);   color: var(--badge-loc-text); }
#fullArticle .badge-adv   { background: var(--badge-adv-bg);   color: var(--badge-adv-text); }
#fullArticle .badge-sec   { background: var(--badge-sec-bg);   color: var(--badge-sec-text); }

/* ── FAQ (author wraps Q/A in .faq-item > .faq-q + .faq-a) ────────────────── */
#fullArticle .faq-item { margin-bottom: 20px; }
#fullArticle .faq-q { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
#fullArticle .faq-a { font-size: 15px; line-height: 1.75; color: var(--text-secondary); }

/* ── HELP SCOUT BUILT-IN IN-ARTICLE TOC (section.index-list) ──────────────── */
#fullArticle .index-list {
  background: var(--spec-bg);
  border: 1px solid var(--spec-border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 8px 0 22px;
}
#fullArticle .index-list a { color: var(--toc-active); }

/* ── SIDEBAR (aside#sidebar.span3) — Categories nav (left rail) ────────────── */
aside#sidebar { background: var(--bg-page) !important; }
aside#sidebar h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted) !important;
  margin-bottom: 10px;
}
#mainNav .nav,
aside#sidebar .nav-list,
.lp-drawer .nav-list { list-style: none; margin: 0; padding: 0; }
aside#sidebar .nav-list li,
.lp-drawer .nav-list li { list-style: none; margin: 0 0 2px; }
aside#sidebar .nav-list a,
.lp-drawer .nav-list a {
  display: block;
  position: relative;            /* containing block for the active .icon-arrow */
  color: var(--nav-text) !important;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none !important;
  padding: 7px 12px;
  border-radius: 8px;
  text-shadow: none;
}
/* Help Scout marks the current category's link with a trailing arrow glyph
   <i class="icon-arrow"> (helpscout-docs3 icon font) positioned with INLINE
   styles (position:absolute; right:8px; height:16px; line-height:.75) — but no
   `top`, so on a label that wraps to two lines the glyph orphans onto its own
   line. Own those styles (!important to beat the inline ones) and anchor the
   glyph to the vertical centre so it stays put regardless of label length,
   tinted to the active text colour; the active link reserves right padding so a
   long label never runs under it. */
aside#sidebar .nav-list .icon-arrow,
.lp-drawer .nav-list .icon-arrow {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  bottom: auto !important;
  transform: translateY(-50%);
  height: 16px !important;
  line-height: 0.75 !important;
  margin: 0 !important;
  color: var(--nav-active-text);
}
aside#sidebar .nav-list .active > a,
aside#sidebar .nav-list li.active a,
.lp-drawer .nav-list .active > a,
.lp-drawer .nav-list li.active a { padding-right: 22px; }
aside#sidebar .nav-list a:hover,
.lp-drawer .nav-list a:hover {
  color: var(--nav-active-text) !important;
  background: var(--nav-hover-bg) !important;
  font-weight: 400;
}
aside#sidebar .nav-list .active > a,
aside#sidebar .nav-list li.active a,
.lp-drawer .nav-list .active > a,
.lp-drawer .nav-list li.active a {
  color: var(--nav-active-text) !important;
  background: var(--nav-active-bg) !important;
  font-weight: 500;
}

aside#sidebar .nav-list .active > a:hover,
aside#sidebar .nav-list li.active a:hover,
.lp-drawer .nav-list .active > a:hover,
.lp-drawer .nav-list li.active a:hover {
  font-weight: 500;
}

/* "On this page" panel injected by the JS */
.hs-onthispage {
  position: sticky; top: 78px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--toc-border);
}
.hs-onthispage .toc-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 10px;
}
.hs-onthispage a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--toc-border);
  color: var(--toc-text) !important;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .12s, border-color .12s;
}
.hs-onthispage a.lvl-3 { padding-left: 22px; font-size: 12.5px; }
.hs-onthispage a:hover,
.hs-onthispage a.active {
  color: var(--toc-active) !important;
  border-left-color: var(--toc-active);
}
.hs-onthispage a.active { font-weight: 500; }

/* ── ARTICLE FOOTER / RATINGS ─────────────────────────────────────────────── */
/* Help Scout ships this "Did this answer your question?" block with a light
   card background + border; strip it so it's just a divider rule + buttons
   (otherwise it renders as a white slab in dark mode). */
.articleRatings {
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--section-rule) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-top: 36px;
  padding-top: 24px;
}
.articleRatings-question { color: var(--text-primary) !important; font-weight: 600; }
.articleRatings .button, .articleRatings button {
  background: var(--spec-bg) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.articleRatings .button:hover, .articleRatings button:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.articleFoot, .articleFoot time, .articleFoot p {
  color: var(--text-muted) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-style: normal;
  font-size: 12px;
}

/* ── RELATED ARTICLES (section.related at the foot of an article) ─────────────
   Help Scout emits this block unstyled — a white card with faint text that is
   unreadable in dark mode. Theme it as a soft panel that reads in both palettes
   and reuses the homepage article-row visual language (doc glyph + hover). */
.related {
  margin-top: 44px;
  padding: 22px 24px;
  background: var(--bg-nav) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 14px !important;
}
.related h3 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
}
.related ul { list-style: none; margin: 0 0 0 0.875rem !important; padding: 0 !important; display: grid; gap: 2px; }
.related li { list-style: none; margin: 0 !important; padding: 0 !important; }
.related a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-primary) !important;
  font-size: 14.5px; font-weight: 500; line-height: 1.45;
  text-decoration: none !important;
  background-image: none !important;          /* kill HS's default file-icon bg */
  transition: background .12s, color .12s;
}
.related a > i { display: none !important; }  /* hide HS's doc glyph */
.related a::before {
  content: ""; flex: 0 0 auto;
  width: 16px; height: 16px; margin-top: 2px;
  background: var(--text-muted);
  -webkit-mask: var(--doc-icon) center / contain no-repeat;
          mask: var(--doc-icon) center / contain no-repeat;
  transition: background .12s;
}
.related a:hover {
  color: var(--accent) !important;
  background: var(--nav-active-bg) !important;
}
.related a:hover::before { background: var(--accent); }

.related ul>li a:hover span {
  text-decoration: none;
}

/* ── PAGINATION (Bootstrap .pagination on category / collection pages) ────────
   Help Scout ships the default Bootstrap pager: a white active box with a faint
   border that looks broken on the dark header. Re-skin the page links as themed
   pills with an accent-filled current page that reads in both palettes. */
.pagination { margin: 30px 0 8px; text-align: center; }
.pagination ul {
  display: inline-flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
  background: none !important; border: 0 !important;
  border-radius: 0 !important; box-shadow: none !important;
}
.pagination li { margin: 0; float: none; }
.pagination li a,
.pagination li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 11px;
  background: var(--bg-content) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 9px !important;
  color: var(--text-secondary) !important;
  font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none !important;
  transition: background .12s, color .12s, border-color .12s;
}
.pagination li a:hover {
  background: var(--nav-active-bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.pagination li.active a,
.pagination li.active span {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--on-accent) !important;
}
.pagination li.disabled a,
.pagination li.disabled span {
  opacity: .45;
  pointer-events: none;
}

/* page footer — border-top closes off the column dividers above it so they
   don't look like they dangle into nothing at the bottom of the page */
footer { border-top: 1px solid var(--border-subtle) !important; margin-top: 56px; }
footer, footer p, footer span, footer a { color: var(--text-muted) !important; }
footer a:hover { color: var(--accent) !important; }

/* ── MOBILE CHROME (injected by the JS) — desktop defaults ────────────────────
   The mobile search close (X), the header hamburger, and the off-canvas nav
   drawer + backdrop are injected on every page but only ever shown inside the
   sub-desktop media query below (≤980px). Hide them on desktop so they never
   flash into the full 3-column layout. */
#mainNav #searchBar.in-header .lp-search-close { display: none; }
.lp-burger { display: none; }
.lp-drawer,
.lp-drawer-backdrop { display: none; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .contentWrapper { padding: 28px 20px 56px; }
  .hs-onthispage { position: static; }

  /* Stacked layout: relax the sticky-footer fill so the short-page minimum
     doesn't add awkward empty space on narrow screens. */
  #contentArea:has(> .row-fluid > #main-content) { display: block; min-height: 0; }
  .row-fluid:has(> #main-content) { flex: 0 1 auto; }

  /* Collapse the 3-column layout: single column with Categories stacked above
     the article (flex-column keeps the order: rules so the sidebar — which is
     after the content in source order — still lands on top). The right-hand
     TOC rail is hidden; the headings still live in the article, so nothing is
     lost. */
  .row-fluid:has(> #main-content) {
    display: flex;
    flex-direction: column;
    max-width: none;
    height: auto;
  }
  .row-fluid:has(> #main-content) > #main-content.span9 {
    width: auto;
    height: auto;
    overflow: visible;
    border-left: 0;
    border-right: 0;
  }
  .row-fluid:has(> #main-content) > aside#sidebar.span3 {
    flex: 0 0 auto;        /* else the 284px flex-basis becomes a fixed height in a column */
    width: auto;
    height: auto;
    /* CRITICAL: drop the desktop sticky + max-height, or the taller article
       slides up UNDERNEATH the pinned rail (the overlap bug). When stacked the
       rail must sit in normal flow. */
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 8px;
    /* divider moves from the side to the bottom when stacked */
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px;
  }
  .row-fluid:has(> #main-content) .contentWrapper { max-width: none; }
  .row-fluid:has(> #main-content) > .hs-toc-rail { display: none; }
  /* the header (hamburger + collapsed search + drawer) is handled by the mobile
     block below, which now shares this 980px breakpoint — so the whole sub-desktop
     range gets one consistent mobile chrome instead of an awkward tablet in-between */
}
@media (max-width: 980px) {
  /* hero size is fluid via clamp(); just shrink the search bar a touch */
  #docsSearch #searchBar .search-query { height: 42px !important; padding: 0 8px !important; }
  #docsSearch #searchBar button { height: 42px; padding: 0 16px !important; }
  #fullArticle h1.title, #fullArticle h1 { font-size: 25px; }

  /* ── HEADER: hamburger + brand on the left, search icon on the right ──────── */
  #mainNav .container-fluid {
    flex-wrap: nowrap;          /* hamburger + logo + search icon stay on one tidy row */
    min-height: 50px;
    gap: 10px;
    padding: 0 12px;            /* trim the desktop --gutter — phones want a tight header */
    position: relative;         /* anchor for the expanded search overlay */
  }
  #mainNav .brand span { font-size: 17px; }
  #mainNav .brand img { height: 28px; }   /* shrink the logo for the tight phone header */
  /* keep the phone header tight: logo only, drop the "Knowledge Base" label
     (the off-canvas drawer's cloned brand still shows the full lockup) */
  #mainNav .lp-brand-text { display: none; }

  /* hamburger that opens the off-canvas nav drawer */
  .lp-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: -6px;          /* pull flush so the logo keeps its place */
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  /* collapsed state: the relocated search is just a 40px magnifier button,
     pinned to the right edge; the text input is hidden until expanded */
  #mainNav #searchBar.in-header {
    position: static;
    flex: 0 0 auto;
    width: 40px;
    max-width: 40px;
    margin: 0 0 0 auto;         /* push to the right */
  }
  #mainNav #searchBar.in-header .search-query { display: none; }
  #mainNav #searchBar.in-header button {
    position: static;
    transform: none;
    width: 40px;
    height: 40px;
    background: var(--search-bg) !important;
    border: 1px solid var(--search-border) !important;
    border-radius: 9px !important;
  }
  #mainNav #searchBar.in-header button .icon-search,
  #mainNav #searchBar.in-header button i { color: var(--search-text) !important; }

  /* theme pill + search icon ride together at the right: [☀ ☾ 🖥][🔍].
     The pill claims the free space (margin-left:auto) and `order` puts it just
     before the search icon, overriding the search's own margin-left:auto. */
  #mainNav #searchBar.in-header { order: 1; margin: 0; }
  #mainNav .lp-theme { margin-left: auto; }
  #mainNav .lp-theme-btn { width: 28px; height: 28px; }
  #mainNav .lp-theme-btn svg { width: 16px; height: 16px; }

  /* expanded state: a full-width search bar laid over the whole header bar */
  #mainNav.search-open #searchBar.in-header {
    position: absolute;
    inset: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-header) !important;
    z-index: 1200;
  }
  /* layout inside the overlay: [input………] [✕] — the magnifier button is hidden;
     the form still submits on Enter */
  #mainNav.search-open #searchBar.in-header button { display: none; }
  #mainNav.search-open #searchBar.in-header .search-query {
    order: 1;
    display: block;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: 0 14px;
    line-height: 40px;
    background: var(--search-bg) !important;
    border: 1px solid var(--search-border) !important;
    border-radius: 9px !important;
    font-size: 15px;
  }
  #mainNav.search-open #searchBar.in-header .lp-search-close {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 40px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
  }
  #mainNav.search-open #searchBar.in-header .lp-search-close:hover { color: var(--text-primary) !important; }
  /* results dropdown spans the full overlay width */
  #mainNav.search-open #searchBar.in-header #serp-dd { left: 12px; right: 12px; }

  /* ── ARTICLE: drop the inset padding and the column dividers ──────────────── */
  .row-fluid:has(> #main-content) .contentWrapper { padding: 14px 16px 40px; }
  .row-fluid:has(> #main-content) > #main-content.span9 {
    border: 0 !important;
    background: transparent !important;
  }

  /* ── SIDEBAR: the inline left rail is replaced by the off-canvas drawer ────── */
  .row-fluid:has(> #main-content) > aside#sidebar.span3 { display: none; }

  /* hamburger-triggered drawer: slides in from the left, logo at the top */
  .lp-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(82vw, 320px);
    background: var(--bg-page);
    border-right: 1px solid var(--border-subtle);
    z-index: 1401;
    transform: translateX(-100%);
    transition: transform .24s ease;
    -webkit-overflow-scrolling: touch;
  }
  /* shadow only while open — otherwise it bleeds past the off-screen panel onto
     the page's left edge */
  body.lp-drawer-open .lp-drawer {
    transform: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, .18);
  }

  .lp-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 56px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .lp-drawer-brand,
  .lp-drawer-brand span {
    display: inline-flex;
    align-items: center;
    color: var(--text-logo) !important;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.01em;
    text-decoration: none !important;
  }
  .lp-drawer-brand img { height: 42px; width: auto; }
  .lp-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px; height: 38px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
  }
  .lp-drawer-close:hover { color: var(--text-primary) !important; }
  .lp-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 12px 24px; }
  .lp-drawer-title {
    font-size: 11px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-muted);
    padding: 0; margin-bottom: 10px;
  }

  /* dim backdrop behind the open drawer */
  .lp-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 30, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease;
    z-index: 1400;
  }
  body.lp-drawer-open .lp-drawer-backdrop { opacity: 1; visibility: visible; }
  body.lp-drawer-open { overflow: hidden; }      /* lock page scroll while open */
}
