/*
 * BlackSpigot Brushed-Slate Redesign, Zero-FOUC & High-Speed Performance Layer (v8 — SSR browseTools, zero blank gap)
 * Loaded BEFORE mobile.css so `@layer bsu-polish` registers FIRST in CSS Cascade Level 5 order.
 * `!important` declarations inside `bsu-polish` cleanly win over `blackspigot-mobile`,
 * `blackspigot-ultra-prefix`, and all unlayered legacy `!important` stylesheets.
 *
 * Brand Direction ("Forged Obsidian"):
 * - Base: deep obsidian (#050609 -> #090b10) with rich ember-crimson & amber radial atmosphere
 *   and a subtle static 52px architectural grid (inspired by NulledVault's deep dark-on-dark clarity,
 *   100% faithful to BlackSpigot's crimson-terracotta + gold Ultra identity).
 * - Panels: slightly translucent obsidian (rgba(10, 12, 17, 0.84)) so our live constellation &
 *   floating bokeh particles visibly glow around the header, gutters, and section seams.
 * - Geometry: sharp 6px 45-degree chamfered primary CTAs & crisp consistent container radii.
 * - SEO Safety: presentation-only; zero copy, headings, links, or structured data modified.
 */
@layer bsu-polish, blackspigot-ultra-prefix, blackspigot-mobile;
@font-face {
  font-family: 'Outfit Fallback';
  src: local('Segoe UI'), local('Arial'), local('Helvetica Neue');
  size-adjust: 103%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@layer bsu-polish {

  /* =========================================================================
   * 1. DESIGN TOKENS, BASE ATMOSPHERE & ZERO PAGE-SWITCH FLICKER
   * ========================================================================= */
  html.bs-exact-theme {
    --bs-obsidian-0: #13161e;
    --bs-obsidian-1: #1c2029;
    --bs-obsidian-2: #242935;
    --bs-obsidian-3: #2e3442;
    --bs-well: #151922;
    --bs-panel: rgba(31, 36, 46, 0.94);
    --bs-panel-solid: #1f242e;
    --bs-card-top: #282d39;
    --bs-card-bot: #20252f;
    --bs-row: #222732;
    --bs-row-hover: #2b3140;
    --bs-border: rgba(196, 206, 224, 0.17);
    --bs-border-soft: rgba(196, 206, 224, 0.11);
    --bs-border-warm: rgba(226, 108, 86, 0.34);
    --bs-border-hot: rgba(238, 114, 90, 0.68);
    --bs-crimson: #e05240;
    --bs-crimson-deep: #ab3123;
    --bs-copper: #e89678;
    --bs-gold: #f5c451;
    --bs-ink: #f5f2ee;
    --bs-ink-muted: #bcc3cf;
    --bs-ink-dim: #939cab;
    --bs-chamfer: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    color-scheme: dark;
    accent-color: #e05240;
    background-color: #13161e !important;
    scrollbar-color: #cf5544 #181c25;
    scrollbar-width: thin;
  }

  /* Custom slim crimson-on-slate scrollbar (Chromium/WebKit) */
  html.bs-exact-theme::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  html.bs-exact-theme::-webkit-scrollbar-track {
    background: #171b24;
  }
  html.bs-exact-theme::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e05543, #a83224);
    border-radius: 999px;
    border: 1px solid #171b24;
  }
  html.bs-exact-theme::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f06957, #c23c2d);
  }

  html.bs-exact-theme body,
  html.bs-exact-theme body.nf-bs-exact {
    background-color: #13161e !important;
    background-image: none !important;
    color: var(--bs-ink) !important;
  }

  /* Remove full-viewport CRT scanlines + moving blurred bar */
  html.bs-exact-theme::before,
  html.bs-exact-theme::after {
    content: none !important;
    display: none !important;
    animation: none !important;
    filter: none !important;
  }

  /* Lock horizontal gutter on desktop so short & tall pages NEVER jump horizontally */
  @media (min-width: 901px) {
    html.bs-exact-theme {
      scrollbar-gutter: stable !important;
    }
  }

  /* Zero background-attachment: fixed (no scroll repaints!) — plain slate base */
  html.bs-exact-theme .p-pageWrapper {
    background-color: #13161e !important;
    background-image: none !important;
    background-attachment: scroll !important;
  }

  /* Single GPU-cached static fixed backdrop: balanced charcoal-slate glows + faint 52px grid (NO mask-image pass!) */
  html.bs-exact-theme .p-pageWrapper::before {
    content: '' !important;
    position: fixed !important;
    inset: 0 !important;
    height: 100vh !important;
    z-index: 0 !important;
    pointer-events: none !important;
    contain: strict;
    transform: translateZ(0);
    background-color: #13161e !important;
    background-image:
      linear-gradient(rgba(218, 224, 238, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(218, 224, 238, 0.04) 1px, transparent 1px),
      radial-gradient(1080px 600px at 14% 8%, rgba(226, 84, 64, 0.16), transparent 60%),
      radial-gradient(860px 540px at 86% 16%, rgba(242, 166, 78, 0.11), transparent 58%),
      radial-gradient(960px 620px at 50% 92%, rgba(110, 128, 164, 0.10), transparent 64%),
      linear-gradient(180deg, #171b24 0%, #141821 52%, #11141c 100%) !important;
    background-size: 52px 52px, 52px 52px, 100% 100%, 100% 100%, 100% 100%, 100% 100% !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    animation: none !important;
    opacity: 1 !important;
  }

  /* Disable GPU-expensive backdrop-filter blurs across scrolling elements over live canvas */
  html.bs-exact-theme .p-header,
  html.bs-exact-theme .p-nav,
  html.bs-exact-theme .p-nav-inner,
  html.bs-exact-theme .bsm-header,
  html.bs-exact-theme .bsx-bottomNav,
  html.bs-exact-theme .bsm-bottomNav,
  html.bs-exact-theme .block-container,
  html.bs-exact-theme .bsf-panel,
  html.bs-exact-theme .bsShop-bossCard,
  html.bs-exact-theme .bsMosaic-tile,
  html.bs-exact-theme .structItem,
  html.bs-exact-theme .menu-content,
  html.bs-exact-theme .overlay-content,
  html.bs-exact-theme .p-body-header,
  html.bs-exact-theme .nfModelPreview-badge,
  html.bs-exact-theme .nfModelPreview-controls,
  html.bs-exact-theme .nfModelPreview-status,
  html.bs-exact-theme :is(.bsx-resourcePreview, .bsx-shortlist, .bsx-jump)::backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Sleek GPU-composited top progress hairline (only revealed if a cold navigation takes >140ms) */
  #bs-nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 99999;
    pointer-events: none;
    background: linear-gradient(90deg, #e04f3e 0%, #f5c451 65%, #ffe6a0 100%);
    transform-origin: 0 50%;
    transform: scaleX(0);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease;
    will-change: transform, opacity;
  }
  #bs-nav-progress.is-loading {
    opacity: 0.96;
    transform: scaleX(0.72);
  }
  #bs-nav-progress.is-slow {
    transition: transform 2.4s cubic-bezier(0.08, 0.82, 0.17, 1), opacity 0.16s ease;
    transform: scaleX(0.92);
  }

  /* Crisp, bright, visible constellation + bokeh canvas behind translucent panels */
  html.bs-exact-theme #bs-particle-network {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    mix-blend-mode: normal !important;
    background: transparent !important;
    opacity: 0.96 !important;
    pointer-events: none !important;
    contain: strict;
  }

  /* Kill wasteful non-composited infinite CSS loops */
  html.bs-exact-theme .p-header::before,
  html.bs-exact-theme .categoryList-item::before,
  html.bs-exact-theme .categoryList-item::after,
  html.bs-exact-theme a[data-nav-id="xfrm"],
  html.bs-exact-theme a[data-nav-id="xfrm"]::before,
  html.bs-exact-theme a[data-nav-id="xfrm"]::after,
  html.bs-exact-theme a[data-nav-id="xfrm"] .ffNavLabel::after,
  html.bs-exact-theme .label.resourceAutoPrefix--ultra::before,
  html.bs-exact-theme .label.resourceAutoPrefix--ultra::after,
  html.bs-exact-theme .bsShop-evil,
  html.bs-exact-theme .bsShop-evil::before,
  html.bs-exact-theme .bsShop-evil::after,
  html.bs-exact-theme .bsCompatibility-spark,
  html.bs-exact-theme .bsCompatibility-signal,
  html.bs-exact-theme .bsBuildUltra::before,
  html.bs-exact-theme .bsBuildUltra::after,
  html.bs-exact-theme .bsu-plans .bsu-fx i,
  html.bs-exact-theme .bsu-card--ultra::before {
    animation: none !important;
    filter: none !important;
  }

  html.bs-exact-theme .categoryList-item::before,
  html.bs-exact-theme .label.resourceAutoPrefix--ultra::before,
  html.bs-exact-theme .bsu-plans .bsu-fx,
  html.bs-exact-theme a[data-nav-id="xfrm"] .ffNavLabel::after,
  html.bs-exact-theme .offCanvasMenu a[data-nav-id="xfrm"]::before,
  html.bs-exact-theme .offCanvasMenu a[data-nav-id="xfrm"]::after {
    display: none !important;
    content: none !important;
    background: none !important;
  }

  /* Strip backdrop-filter blur over live WebGL 3D previews */
  html.bs-exact-theme .nfModelPreview-toolbar,
  html.bs-exact-theme .nfModelPreview-timeline,
  html.bs-exact-theme .nfModelPreview-status,
  html.bs-exact-theme .nfModelOverview,
  html.bs-exact-theme .bsBuildUltra {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html.bs-exact-theme .nfModelPreview-timeline,
  html.bs-exact-theme .nfModelPreview-status {
    background: rgba(8, 10, 15, 0.94) !important;
  }

  /* Layout containment on repeating cards */
  html.bs-exact-theme .structItem--resource,
  html.bs-exact-theme .bsShop-bossCard,
  html.bs-exact-theme .bsMosaic-tile,
  html.bs-exact-theme .bsf-resource {
    contain: layout style;
  }

  @media (prefers-reduced-motion: reduce) {
    html.bs-exact-theme *,
    html.bs-exact-theme *::before,
    html.bs-exact-theme *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
      scroll-behavior: auto !important;
    }
  }

  /* =========================================================================
   * 2. WEB FLOOR — Selection, Contrast, Focus Rings, Tabular Numerals
   * ========================================================================= */
  html.bs-exact-theme ::selection {
    background: rgba(224, 79, 62, 0.38);
    color: #ffffff;
  }

  html.bs-exact-theme input::placeholder,
  html.bs-exact-theme textarea::placeholder {
    color: rgba(214, 218, 226, 0.56) !important;
    opacity: 1 !important;
  }

  html.bs-exact-theme :is(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #f0956c !important;
    outline-offset: 2px !important;
  }

  html.bs-exact-theme :is(
    .structItem-metaItem dd,
    .pairs dd,
    .bsu-price,
    .categoryList-label + span,
    .bsf-categoryHeading h3 span,
    .pageNav-page,
    .pageNavSimple-el
  ) {
    font-variant-numeric: tabular-nums;
  }

  html.bs-exact-theme .fr-toolbar .fr-command.fr-btn svg,
  html.bs-exact-theme .fr-popup .fr-command.fr-btn svg {
    fill: #ede6e1 !important;
    color: #ede6e1 !important;
  }

  /* Clean architectural gold Ultra badge */
  html.bs-exact-theme .label.resourceAutoPrefix--ultra {
    background: linear-gradient(135deg, #4b3511, #22190a 58%, #473210) !important;
    border: 1px solid rgba(245, 196, 81, 0.72) !important;
    color: #ffe9a8 !important;
    border-radius: 3px !important;
    text-shadow: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 172, 0.25) !important;
  }
  html.bs-exact-theme .label.resourceAutoPrefix--ultra::after {
    text-shadow: none !important;
    color: #f5c451 !important;
    opacity: 0.95 !important;
  }

  /* =========================================================================
   * 3. HEADER, SEARCH ICON FIX, CHAMFERED AUTH BUTTONS & NAVIGATION BAR
   * ========================================================================= */

  /* Balanced gunmetal-slate header band — lighter grey, crisp edge, particles visible softly behind */
  html.bs-exact-theme .p-header {
    position: relative !important;
    z-index: 1200 !important;
    background: linear-gradient(180deg, rgba(38, 43, 54, 0.90), rgba(27, 31, 40, 0.78)) !important;
    border-bottom: 1px solid rgba(214, 222, 238, 0.16) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(224, 92, 74, 0.28) !important;
  }
  @media (min-width: 901px) {
    html.bs-exact-theme .p-header {
      min-height: 68px !important;
    }
    html.bs-exact-theme .p-nav {
      position: relative !important;
      z-index: 1100 !important;
      min-height: 54px !important;
    }
  }
  html.bs-exact-theme .p-body {
    position: relative !important;
    z-index: 2 !important;
  }
  html.bs-exact-theme .p-header::before {
    display: none !important;
  }

  /* Crisp recessed header search field + GUARANTEED VISIBLE inline SVG magnifying glass */
  html.bs-exact-theme .p-header .xb-searchWrapper {
    position: relative !important;
  }
  /* Paint bright inline SVG magnifying glass directly on input background so it can NEVER be buried behind the input fill */
  html.bs-exact-theme .p-header .xb-search input,
  html.bs-exact-theme .p-header .xb-search .input {
    background-color: #161a23 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2e8e2' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7.2'/%3E%3Cpath d='m20 20-3.8-3.8'/%3E%3C/svg%3E") !important;
    background-position: right 14px center !important;
    background-size: 16px 16px !important;
    background-repeat: no-repeat !important;
    border: 1px solid rgba(206, 216, 234, 0.24) !important;
    border-radius: 6px !important;
    color: #f6f3ef !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.36) !important;
    padding-right: 118px !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease !important;
  }
  html.bs-exact-theme .p-header .xb-search input:focus,
  html.bs-exact-theme .p-header .xb-search .input:focus {
    border-color: rgba(224, 79, 62, 0.72) !important;
    box-shadow: 0 0 0 2px rgba(224, 79, 62, 0.18) !important;
  }
  html.bs-exact-theme .p-header .xb-searchWrapper::before,
  html.bs-exact-theme .p-header .xb-searchWrapper::after {
    content: none !important;
    display: none !important;
  }
  html.bs-exact-theme .p-header .xb-searchQuickPanel,
  html.bs-exact-theme .p-header .xfrm-quickSearchResults {
    max-width: min(680px, calc(100vw - 28px)) !important;
    background: #212631 !important;
    border: 1px solid rgba(224, 102, 84, 0.42) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45) !important;
  }

  /* Clear chamfered auth button hierarchy: LOG IN (obsidian outline) vs REGISTER (molten crimson CTA) */
  /* Restores font-size/line-height cleared by legacy PNG sprite rules, with :empty::before fallback */
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--logIn,
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--register {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    height: 34px !important;
    min-height: 34px !important;
    width: auto !important;
    padding: 0 18px !important;
    font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    white-space: nowrap !important;
    border-radius: 3px !important;
    clip-path: var(--bs-chamfer) !important;
    overflow: hidden !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--logIn {
    min-width: 96px !important;
    background: linear-gradient(180deg, #3c4251, #2b303c) !important;
    border: 1px solid rgba(214, 224, 240, 0.34) !important;
    color: #f6f3ef !important;
    font-weight: 700 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
    transition: background-color 0.14s ease, border-color 0.14s ease !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--logIn:hover {
    background: linear-gradient(180deg, #484f60, #343a48) !important;
    border-color: rgba(235, 114, 92, 0.72) !important;
    color: #ffffff !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--register {
    min-width: 114px !important;
    background: linear-gradient(180deg, #e55340, #b83224) !important;
    border: 1px solid #f07b6a !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255, 232, 224, 0.32) !important;
    transition: filter 0.15s ease !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--register:hover {
    filter: brightness(1.1) !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--logIn .p-navgroup-linkText,
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--register .p-navgroup-linkText {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
    color: inherit !important;
    text-indent: 0 !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--logIn:empty::before,
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--logIn .p-navgroup-linkText:empty::before {
    content: 'Log in' !important;
    display: inline !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    color: #f4f0ec !important;
  }
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--register:empty::before,
  html.bs-exact-theme .p-header .p-account .p-navgroup-link--register .p-navgroup-linkText:empty::before {
    content: 'Register' !important;
    display: inline !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    color: #ffffff !important;
  }

  /* Distinct brushed gunmetal-steel navigation bar — stands out crisply above the charcoal canvas */
  @media (min-width: 901px) {
    html.bs-exact-theme .p-nav-inner {
      background: linear-gradient(180deg, #3e4554 0%, #303644 50%, #252a35 100%) !important;
      clip-path: none !important;
      border: 1px solid rgba(214, 224, 240, 0.28) !important;
      border-top: 1px solid rgba(255, 255, 255, 0.34) !important;
      border-bottom: 2px solid #df5644 !important;
      border-radius: 9px !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(0, 0, 0, 0.36) !important;
      padding: 4px 16px !important;
      overflow-y: hidden !important;
      scrollbar-width: none !important;
    }
    html.bs-exact-theme .p-nav-list {
      gap: 4px !important;
    }
    html.bs-exact-theme .p-nav-list .p-navEl > .p-navEl-link {
      color: #eef1f6 !important;
      border-radius: 6px !important;
      transition: background-color 0.13s ease, color 0.13s ease !important;
    }
    html.bs-exact-theme .p-nav-list .p-navEl:not(.is-selected) > .p-navEl-link:hover {
      background: rgba(255, 255, 255, 0.10) !important;
      color: #ffffff !important;
    }
    html.bs-exact-theme .p-nav-list .p-navEl.is-selected {
      background: transparent !important;
      box-shadow: none !important;
      border: 0 !important;
    }
    html.bs-exact-theme .p-nav-list .p-navEl.is-selected > .p-navEl-link {
      background: linear-gradient(180deg, #df5643 0%, #ad3224 100%) !important;
      color: #ffffff !important;
      border: 1px solid rgba(255, 198, 186, 0.42) !important;
      box-shadow: inset 0 1px 0 rgba(255, 232, 224, 0.30) !important;
      border-radius: 6px !important;
      text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28) !important;
    }
    html.bs-exact-theme .p-nav .p-nav-list .p-navEl a[data-nav-id="xfrm"] {
      background: linear-gradient(180deg, #69501e 0%, #443312 100%) !important;
      border: 1px solid rgba(245, 196, 81, 0.72) !important;
      box-shadow: inset 0 1px 0 rgba(255, 236, 176, 0.26) !important;
      border-radius: 6px !important;
      color: #ffefc2 !important;
      text-shadow: 0 1px 1px rgba(0, 0, 0, 0.30) !important;
    }
    html.bs-exact-theme .p-nav .p-nav-list .p-navEl a[data-nav-id="xfrm"]:hover {
      background: linear-gradient(180deg, #7c5e24 0%, #523e16 100%) !important;
      border-color: #ffd773 !important;
    }
    html.bs-exact-theme .p-nav-scroller {
      overflow-y: hidden !important;
      scrollbar-width: none !important;
    }
    html.bs-exact-theme .p-nav-inner::-webkit-scrollbar,
    html.bs-exact-theme .p-nav-scroller::-webkit-scrollbar {
      display: none !important;
    }
  }

  @media (min-width: 901px) and (max-width: 1280px) {
    html.bs-exact-theme .p-nav-inner {
      overflow: hidden !important;
      padding-left: 20px !important;
      padding-right: 26px !important;
    }
    html.bs-exact-theme .p-nav-scroller {
      overflow: visible !important;
    }
    html.bs-exact-theme .p-nav-list {
      flex-wrap: nowrap !important;
      justify-content: center !important;
      gap: 2px !important;
    }
    html.bs-exact-theme .p-nav-list .p-navEl-link {
      padding-left: 8px !important;
      padding-right: 8px !important;
      font-size: 10.5px !important;
      white-space: nowrap !important;
    }
    html.bs-exact-theme a[data-nav-id="xfrm"] .ffNavLabel::before,
    html.bs-exact-theme a[data-nav-id="nfBsBuildsSchematics"] .ffNavLabel::before {
      font-size: 8.5px !important;
    }
  }

  /* =========================================================================
   * 4. HOMEPAGE STOREFRONT — Forged Obsidian Grid, Unified Editorial Tiles
   * ========================================================================= */

  /* Unified balanced charcoal-slate discovery toolbar shell */
  html.bs-shop-page body .bsMosaic .bsShop-discovery {
    background: rgba(34, 39, 50, 0.95) !important;
    border: 1px solid rgba(196, 206, 224, 0.20) !important;
    border-top: 2px solid rgba(224, 92, 74, 0.52) !important;
    border-radius: 7px !important;
    padding: 6px 8px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-search input {
    background: #171b24 !important;
    border: 1px solid rgba(196, 206, 224, 0.18) !important;
    border-radius: 5px !important;
    color: #f6f3ef !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-search input:focus {
    border-color: rgba(224, 79, 62, 0.7) !important;
  }

  /* Single crisp CSS chevron (eliminates double chevron collision!) */
  html.bs-shop-page body .bsMosaic .bsShop-discovery summary::-webkit-details-marker,
  html.bs-shop-page body .bsMosaic .bsShop-discovery summary::marker {
    display: none !important;
    content: '' !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-discovery :is(.bsShop-categories, .bsShop-collection, .bsShop-latest, .bsx-liveResources) > summary {
    color: #e4deda !important;
    border-radius: 4px !important;
    transition: background-color 0.14s ease, color 0.14s ease !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-discovery :is(.bsShop-categories, .bsShop-collection, .bsShop-latest, .bsx-liveResources) > summary:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-discovery :is(.bsShop-categories, .bsShop-collection, .bsShop-latest, .bsx-liveResources) > summary::after {
    content: '' !important;
    display: inline-block !important;
    position: static !important;
    flex: none !important;
    width: 6px !important;
    height: 6px !important;
    margin-left: 7px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border-style: solid !important;
    border-color: #e58e70 !important;
    border-width: 0 1.5px 1.5px 0 !important;
    background: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    transform: translateY(-2px) rotate(45deg) !important;
    transition: transform 0.15s ease !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-discovery details[open] > summary::after {
    transform: translateY(1px) rotate(-135deg) !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-collection > summary {
    width: auto !important;
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  html.bs-shop-page body .bsMosaic .bsShop-discovery .bsShop-menu {
    background: #222733 !important;
    border: 1px solid rgba(214, 222, 238, 0.22) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42) !important;
  }

  /* Elevated brushed-slate showcase cards — lighter grey, crisp bevel, lean GPU shadow */
  html.bs-shop-page .bsShop-bossCard {
    background: linear-gradient(180deg, rgba(41, 46, 58, 0.96), rgba(31, 36, 46, 0.97)) !important;
    border: 1px solid rgba(196, 206, 224, 0.18) !important;
    border-top: 2px solid rgba(224, 92, 74, 0.62) !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    contain: layout style;
    transition: border-color 0.14s ease !important;
  }
  html.bs-shop-page .bsShop-bossCard--spotlight {
    border-top: 2px solid #f5c451 !important;
    border-color: rgba(245, 196, 81, 0.46) !important;
  }
  html.bs-shop-page .bsShop-bossCard:hover {
    transform: none !important;
    border-color: rgba(235, 114, 92, 0.72) !important;
    border-top-color: #e8604e !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30) !important;
  }
  html.bs-shop-page .bsShop-bossCard--spotlight:hover {
    border-color: rgba(245, 196, 81, 0.72) !important;
    border-top-color: #ffd46b !important;
  }
  html.bs-shop-page .bsShop-media {
    background-color: #161a22 !important;
    border-bottom: 1px solid rgba(196, 206, 224, 0.12) !important;
  }
  html.bs-shop-page .bsShop-media > video,
  html.bs-shop-page .bsShop-media > img {
    background-color: #161a22;
    transition: none !important;
  }
  html.bs-shop-page .bsShop-bossCard:hover .bsShop-media > img,
  html.bs-shop-page .bsShop-bossCard:hover .bsShop-media > video,
  html.bs-shop-page .bsMosaic-image:hover > img {
    transform: none !important;
  }

  /* High-contrast crisp warm-white titles instead of muddy peach-on-grey */
  html.bs-shop-page .bsShop-bossBody h3 a {
    color: #f7f4f1 !important;
    letter-spacing: -0.015em !important;
  }
  html.bs-shop-page .bsShop-bossCard:hover .bsShop-bossBody h3 a {
    color: #ffffff !important;
  }
  html.bs-shop-page .bsShop-bossMeta {
    color: #e07b64 !important;
  }
  html.bs-shop-page .bsShop-bossCaption {
    color: #c3cad6 !important;
  }
  html.bs-shop-page .bsShop-cardLink {
    color: #f08a70 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
    padding-top: 10px !important;
    font-weight: 700 !important;
  }
  html.bs-shop-page .bsShop-bossCard:hover .bsShop-cardLink {
    color: #ffb8a3 !important;
  }
  html.bs-shop-page .bsShop-spotlightFlag {
    clip-path: var(--bs-chamfer) !important;
    border-radius: 2px !important;
    background: #f5c451 !important;
    color: #161004 !important;
    font-weight: 800 !important;
  }

  /* Unified brushed-slate editorial tiles (lighter charcoal greys + crisp 2px semantic top rim) */
  html.bs-shop-page .bsMosaic-tile:not(#bs-tile-intro) {
    background:
      radial-gradient(260px 120px at 50% 0%, rgba(224, 86, 68, 0.13), transparent 72%),
      linear-gradient(180deg, rgba(42, 47, 60, 0.96), rgba(31, 36, 46, 0.97)) !important;
    border: 1px solid rgba(196, 206, 224, 0.18) !important;
    border-top: 2px solid var(--tile-accent, #e05240) !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    contain: layout style;
    transition: border-color 0.14s ease !important;
  }
  html.bs-shop-page .bsMosaic-tile.bsMosaic--mint:not(#bs-tile-intro) {
    --tile-accent: #56cf9f !important;
    --tile-wash: #1f3c34 !important;
    background:
      radial-gradient(240px 115px at 50% 0%, rgba(86, 207, 159, 0.13), transparent 72%),
      linear-gradient(180deg, rgba(39, 48, 56, 0.96), rgba(30, 36, 45, 0.97)) !important;
  }
  html.bs-shop-page .bsMosaic-tile.bsMosaic--violet:not(#bs-tile-intro),
  html.bs-shop-page .bsMosaic-tile.bsMosaic--purple:not(#bs-tile-intro) {
    --tile-accent: #eba16c !important;
    --tile-wash: #412b20 !important;
    background:
      radial-gradient(240px 115px at 50% 0%, rgba(235, 161, 108, 0.14), transparent 72%),
      linear-gradient(180deg, rgba(44, 46, 56, 0.96), rgba(32, 35, 45, 0.97)) !important;
  }
  html.bs-shop-page .bsMosaic-tile.bsMosaic--blue:not(#bs-tile-intro) {
    --tile-accent: #74b0f0 !important;
    --tile-wash: #23364d !important;
    background:
      radial-gradient(240px 115px at 50% 0%, rgba(116, 176, 240, 0.13), transparent 72%),
      linear-gradient(180deg, rgba(39, 47, 60, 0.96), rgba(30, 36, 47, 0.97)) !important;
  }
  html.bs-shop-page .bsMosaic-tile.bsMosaic--amber:not(#bs-tile-intro) {
    --tile-accent: #f5c451 !important;
    --tile-wash: #423618 !important;
    background:
      radial-gradient(240px 115px at 50% 0%, rgba(245, 196, 81, 0.13), transparent 72%),
      linear-gradient(180deg, rgba(44, 46, 55, 0.96), rgba(32, 35, 44, 0.97)) !important;
  }
  html.bs-shop-page .bsMosaic-tile#bs-tile-intro {
    border: 1px solid rgba(224, 96, 78, 0.42) !important;
    border-top: 2px solid #e05240 !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28) !important;
  }
  html.bs-shop-page .bsMosaic-tile:hover {
    transform: none !important;
    border-color: rgba(235, 118, 92, 0.52) !important;
  }

  /* Recessed clean tag chips with zero OS horizontal scrollbar */
  html.bs-shop-page #bsShop-grid .bsShop-chips,
  html.bs-shop-page .bsShop-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    overflow-x: visible !important;
    max-height: none !important;
    gap: 5px !important;
    padding-bottom: 0 !important;
    scrollbar-width: none !important;
  }
  html.bs-shop-page #bsShop-grid .bsShop-chips::-webkit-scrollbar,
  html.bs-shop-page .bsShop-chips::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
  }
  html.bs-shop-page #bsShop-grid .bsShop-chips li {
    flex: 0 1 auto !important;
    white-space: normal !important;
    background: #181c25 !important;
    border: 1px solid rgba(196, 206, 224, 0.18) !important;
    border-radius: 4px !important;
    color: #d2d8e3 !important;
  }

  /* Footer SEO about strip on homepage */
  html.bs-shop-page .bsShop-about {
    background: var(--bs-panel) !important;
    border: 1px solid var(--bs-border) !important;
    border-left: 3px solid #e05240 !important;
    border-radius: 7px !important;
    padding: 20px 24px !important;
  }

  /* Mobile homepage H1 pill & Latest uploads alignment */
  @media (max-width: 900px) {
    html.bs-shop-page body.nf-bs-exact .p-body-header {
      display: block !important;
      height: auto !important;
      min-height: 0 !important;
      padding: 10px 14px !important;
      margin: 4px 0 10px !important;
      border-radius: 6px !important;
      background: #222733 !important;
      border: 1px solid rgba(196, 206, 224, 0.18) !important;
      border-left: 3px solid #e04f3e !important;
      box-sizing: border-box !important;
      overflow: hidden !important;
    }
    html.bs-shop-page body.nf-bs-exact .p-body-header .p-title {
      margin: 0 !important;
      padding: 0 !important;
      display: block !important;
    }
    html.bs-shop-page body.nf-bs-exact .p-body-header .p-title-value,
    html.bs-shop-page body.nf-bs-exact .p-body-header h1 {
      font-size: clamp(16px, 4.6vw, 20px) !important;
      line-height: 1.3 !important;
      white-space: normal !important;
      overflow-wrap: break-word !important;
      color: #f6f2ee !important;
      margin: 0 !important;
      padding: 0 !important;
    }
    html.bs-shop-page body .bsMosaic .bsShop-discovery .bsShop-latest > summary {
      justify-content: flex-start !important;
      width: auto !important;
      gap: 6px !important;
      padding: 6px 4px !important;
    }
    html.bs-shop-page body .bsMosaic .bsShop-discovery .bsShop-latest > summary::after {
      margin-left: 6px !important;
    }
  }

  /* =========================================================================
   * 5. MOBILE HAMBURGER DRAWER — Crisp SVG × Close, Centered Auth Buttons
   * ========================================================================= */
  html.bs-exact-theme .offCanvasMenu-content {
    background: #1e222c !important;
    border-right: 1px solid rgba(196, 206, 224, 0.20) !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(224, 79, 62, 0.45) transparent !important;
  }
  html.bs-exact-theme .offCanvasMenu-content::-webkit-scrollbar {
    width: 4px !important;
    height: 0 !important;
  }

  /* Crisp 2px-stroke inline SVG × close button (guaranteed high contrast) */
  html.bs-exact-theme .offCanvasMenu--nav .offCanvasMenu-closer {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .offCanvasMenu-closer::before {
    display: none !important;
    content: none !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .offCanvasMenu-closer::after {
    content: '' !important;
    display: block !important;
    position: static !important;
    width: 16px !important;
    height: 16px !important;
    border: 0 !important;
    transform: none !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6eae4' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat !important;
  }

  /* Centered Log in / Register button labels inside mobile drawer (covers both XF markup & bsm wrapper) */
  html.bs-exact-theme .offCanvasMenu--nav .p-offCanvasRegisterLink {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 4px 12px 6px !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .p-offCanvasRegisterLink .offCanvasMenu-separator {
    display: none !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .p-offCanvasRegisterLink .offCanvasMenu-linkHolder {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .p-offCanvasRegisterLink .offCanvasMenu-link,
  html.bs-exact-theme .offCanvasMenu--nav .bsm-menuAccount > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
    clip-path: none !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    background: linear-gradient(180deg, #383e4d, #292e3a) !important;
    border: 1px solid rgba(214, 224, 240, 0.28) !important;
    color: #f6f3ef !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .p-offCanvasRegisterLink .offCanvasMenu-link[href*="/register"],
  html.bs-exact-theme .offCanvasMenu--nav .bsm-menuAccount > a:last-child {
    background: linear-gradient(180deg, #e04f3e, #b12f22) !important;
    border: 1px solid #f07a68 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255, 230, 220, 0.28) !important;
  }

  html.bs-exact-theme .offCanvasMenu--nav .offCanvasMenu-link,
  html.bs-exact-theme .offCanvasMenu--nav a.p-navEl-link.offCanvasMenu-link[data-nav-id="xfrm"],
  html.bs-exact-theme .offCanvasMenu--nav a.p-navEl-link.offCanvasMenu-link[data-nav-id="nfBsBuildsSchematics"] {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    min-height: 48px !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav a.p-navEl-link.offCanvasMenu-link[data-nav-id="xfrm"] {
    background: rgba(88, 64, 18, 0.28) !important;
    box-shadow: inset 0 0 0 1px rgba(245, 196, 81, 0.44) !important;
    border-radius: 5px !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav a[data-nav-id="xfrm"] .ffNavLabel,
  html.bs-exact-theme .offCanvasMenu--nav a[data-nav-id="nfBsBuildsSchematics"] .ffNavLabel {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    text-align: left !important;
    min-width: 0 !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav a[data-nav-id="xfrm"] .ffNavLabel::before,
  html.bs-exact-theme .offCanvasMenu--nav a[data-nav-id="nfBsBuildsSchematics"] .ffNavLabel::before {
    position: static !important;
    display: block !important;
    order: 2 !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    white-space: normal !important;
    opacity: 0.78 !important;
  }
  html.bs-exact-theme .offCanvasMenu--nav .bsx-drawerSearch > input {
    background: #151922 !important;
    border-color: rgba(196, 206, 224, 0.22) !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }

  /* =========================================================================
   * 6. GLOBAL OBSIDIAN PANELS & SHARP SECTION HEADERS (Replaces Salmon Gradients!)
   * ========================================================================= */
  html.bs-exact-theme .block-container {
    background: var(--bs-panel) !important;
    border: 1px solid var(--bs-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  }

  /* Crisp brushed gunmetal section header bars with 3px crimson left accent stripe */
  html.bs-exact-theme .block-header,
  html.bs-exact-theme .block-minorHeader,
  html.bs-exact-theme .bsf-heading {
    background: linear-gradient(90deg, rgba(224, 86, 68, 0.24), #313745 36%, #282d39 100%) !important;
    border: 0 !important;
    border-left: 3px solid #e05240 !important;
    border-bottom: 1px solid rgba(206, 216, 234, 0.15) !important;
    color: #f6f3ef !important;
    text-shadow: none !important;
    -webkit-text-stroke: 0 !important;
    letter-spacing: 0.03em !important;
  }
  html.bs-exact-theme .block-header a,
  html.bs-exact-theme .block-minorHeader a {
    color: #f6f2ee !important;
    -webkit-text-stroke: 0 !important;
  }
  html.bs-exact-theme .block-header::before,
  html.bs-exact-theme .block-minorHeader::before {
    display: none !important;
    content: none !important;
  }
  html.bs-exact-theme .block[data-widget-key] .block-minorHeader {
    padding-left: 16px !important;
  }

  /* Balanced charcoal-slate footer bar */
  html.bs-exact-theme .p-footer {
    background: rgba(29, 34, 44, 0.95) !important;
    border-top: 1px solid rgba(214, 222, 238, 0.16) !important;
    box-shadow: inset 0 1px 0 rgba(224, 92, 74, 0.26) !important;
  }

  /* =========================================================================
   * 7. RESOURCE CATALOG & CATEGORIES — Scannable Obsidian Table Feel
   * ========================================================================= */

  html.bsx-catalogPage body.nf-bs-exact .block-filterBar {
    background: #272c38 !important;
    border-bottom: 1px solid rgba(196, 206, 224, 0.14) !important;
    min-height: 44px !important;
  }
  html.bsx-catalogPage body.nf-bs-exact .bsx-browseTools {
    background: #1b2029 !important;
    border-bottom: 1px solid rgba(196, 206, 224, 0.13) !important;
  }

  /* Crisp quick-category wrapping with zero horizontal scrollbar */
  html.bsx-catalogPage body.nf-bs-exact [aria-label="Quick resource type search"],
  html.bsx-catalogPage body.nf-bs-exact .bsResourceSearchAssist {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: visible !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
  }
  html.bsx-catalogPage body.nf-bs-exact [aria-label="Quick resource type search"]::-webkit-scrollbar,
  html.bsx-catalogPage body.nf-bs-exact .bsResourceSearchAssist::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
  }
  html.bsx-catalogPage body.nf-bs-exact [aria-label="Quick resource type search"] a {
    background: #1a1f28 !important;
    border: 1px solid rgba(196, 206, 224, 0.18) !important;
    border-radius: 4px !important;
    color: #dce2ec !important;
  }
  html.bsx-catalogPage body.nf-bs-exact [aria-label="Quick resource type search"] a:hover {
    border-color: rgba(224, 79, 62, 0.6) !important;
    color: #ffffff !important;
  }

  /* Active sort / pagination pill in crisp crimson */
  html.bsx-catalogPage body.nf-bs-exact .bsx-sortLinks [aria-current],
  html.bsx-catalogPage body.nf-bs-exact .bsx-viewSwitch [aria-pressed="true"] {
    background: linear-gradient(180deg, #dc4c3b, #a12b1f) !important;
    border-color: #ef7866 !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 224, 214, 0.28) !important;
  }
  html.bsx-catalogPage body.nf-bs-exact .bsx-sortLinks a:not([aria-current]),
  html.bsx-catalogPage body.nf-bs-exact .bsx-viewSwitch button:not([aria-pressed="true"]),
  html.bsx-catalogPage body.nf-bs-exact .bsx-jumpTrigger,
  html.bsx-catalogPage body.nf-bs-exact .bsx-savedTrigger {
    background: #282e3b !important;
    border: 1px solid rgba(196, 206, 224, 0.18) !important;
    color: #dde3ed !important;
  }

  @media (min-width: 1220px) {
    html.bsx-catalogPage body.nf-bs-exact .bsx-browseTools {
      flex-wrap: nowrap !important;
      justify-content: space-between !important;
      gap: 6px !important;
      padding: 8px 10px !important;
    }
    html.bsx-catalogPage body.nf-bs-exact .bsx-sortLinks {
      gap: 4px !important;
      flex-wrap: nowrap !important;
      min-width: 0 !important;
    }
    html.bsx-catalogPage body.nf-bs-exact .bsx-viewSwitch {
      gap: 3px !important;
      flex-shrink: 0 !important;
      margin-left: auto !important;
    }
    html.bsx-catalogPage body.nf-bs-exact :is(.bsx-browseTools a, .bsx-browseTools button) {
      padding: 5px 8px !important;
      min-height: 31px !important;
      font-size: 11.5px !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
    }
  }

  /* Zero-FOUC Byte-1 locks: eliminate post-paint gaps, scale snaps & disappearing blocks
   * (100% SEO-safe: all DOM copy stays intact for crawlers & html.has-no-js users!) */
  html.bs-exact-theme #cyber-particles {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  html[data-template^="xfrm_"].bs-exact-theme .p-sectionLinks--wrapper,
  html[data-template="forum_list"].bs-exact-theme .p-sectionLinks--wrapper,
  html[data-template^="xfrm_"].bs-exact-theme :is(.block[data-widget-key*="share_page"], .block[data-widget-definition*="SharePage"]) {
    display: none !important;
  }
  /* Defensive hide in case a cached/bfcache view holds an older .bsx-recent drawer */
  html.bs-exact-theme .bsx-recent {
    display: none !important;
  }
  /* Mobile pre-mount hide: on <=900px SSR .bsx-browseTools & filters collapse inside Refine */
  @media (max-width: 900px) {
    html.has-js.bsx-compactCatalog:not(.bsx-toolsReady) body.nf-bs-exact .block-filterBar :is(.bsResourceSearchAssist, .xfrm-filterBarLead, .filterBar-menuTrigger),
    html.has-js.bsx-compactCatalog:not(.bsx-toolsReady) body.nf-bs-exact .bsx-browseTools[data-bsx-ssr] {
      display: none !important;
    }
    html.has-js.bsx-compactCatalog:not(.bsx-toolsReady) body.nf-bs-exact .block-filterBar {
      padding-bottom: 58px !important;
    }
  }
  /* Prevent sidebar widgets (12, 14, 15) from flashing in the sidebar before moving to .bsx-resourceExtras */
  @media (min-width: 901px) {
    html.has-js.bsx-stickyCategories:not(.bsx-extrasReady) body.nf-bs-exact .p-body-sideNavContent > .block[data-widget-id] {
      display: none !important;
    }
  }
  /* Prevent native bottom pagination from flashing then disappearing when infinite catalog mounts */
  html.has-js.bsx-infiniteCatalog:not(.bsx-scrollFallback) body.nf-bs-exact .block[data-type="resource"] > .block-outer--after {
    display: none !important;
  }
  /* Lock catalog heading typography & spacing identically from Frame 0 (zero line-gap snap!) */
  @media (min-width: 901px) {
    html.bs-exact-theme.bsx-catalogPage body.nf-bs-exact .p-body-inner {
      padding-top: 12px !important;
      margin-top: 0 !important;
    }
    html.bs-exact-theme.bsx-catalogPage body.nf-bs-exact .p-body-header {
      margin: 0 0 12px !important;
      padding: 4px 12px !important;
      border-left: 3px solid #e05240 !important;
      background: transparent !important;
      box-shadow: none !important;
    }
    html.bs-exact-theme.bsx-catalogPage body.nf-bs-exact .p-title-value {
      font-family: 'Outfit', 'Outfit Fallback', system-ui, -apple-system, sans-serif !important;
      font-size: 22px !important;
      line-height: 1.22 !important;
      letter-spacing: -0.025em !important;
      margin: 0 !important;
    }
  }
  /* Forums hub: hide inactive 7 tabpanels immediately on html.has-js (zero ~2000px vanish shuffle!) */
  html.has-js.bs-exact-theme .bsf-browser .bsf-category:not(:first-of-type):not([aria-hidden="false"]),
  html.has-js.bs-exact-theme .bsf-browser .bsf-category[hidden] {
    display: none !important;
  }
  html[data-template="forum_list"].bs-exact-theme :is(.block--category18, [data-widget-definition="xfrm_new_resources"]) {
    display: none !important;
  }

  /* Crisp brushed-slate resource & thread rows with crimson hover edge + layout containment */
  html.bs-exact-theme .structItem--resource,
  html.bs-exact-theme .structItem--thread,
  html.bs-exact-theme .node-body {
    background: var(--bs-row) !important;
    border-color: rgba(196, 206, 224, 0.12) !important;
    border-left: 2px solid transparent !important;
    contain: layout style;
    transition: background-color 0.12s ease, border-left-color 0.12s ease !important;
  }
  html.bs-exact-theme .structItem--resource:hover,
  html.bs-exact-theme .structItem--thread:hover,
  html.bs-exact-theme .node-body:hover {
    transform: none !important;
    background: var(--bs-row-hover) !important;
    border-left-color: #e05240 !important;
  }
  html.bs-exact-theme .structItem--resource .structItem-title a[data-tp-primary] {
    color: #f6f4f0 !important;
    font-weight: 650 !important;
  }
  html.bs-exact-theme .structItem--resource .structItem-iconContainer {
    background: #161a23 !important;
    border: 1px solid rgba(196, 206, 224, 0.16) !important;
    border-radius: 6px !important;
  }
  html.bs-exact-theme .bsx-saveResource {
    background: #2c3240 !important;
    border: 1px solid rgba(196, 206, 224, 0.22) !important;
    color: #e4e8f0 !important;
    border-radius: 4px !important;
  }
  html.bs-exact-theme .bsx-saveResource[aria-pressed="true"] {
    background: rgba(245, 196, 81, 0.16) !important;
    border-color: rgba(245, 196, 81, 0.65) !important;
    color: #ffe8a3 !important;
  }

  /* Crisp rating stars contrast */
  html.bs-exact-theme body .ratingStars .ratingStars-star::before {
    color: #6b7280 !important;
  }
  html.bs-exact-theme body .ratingStars .ratingStars-star--full::before,
  html.bs-exact-theme body .ratingStars .ratingStars-star--half::after {
    color: #f5c451 !important;
  }

  /* Sidebar category rows + clickable Rust .16/ subtree toggler */
  html.bs-exact-theme .categoryList-itemRow {
    border-radius: 5px !important;
    transition: background-color 0.14s ease !important;
  }
  html.bs-exact-theme .categoryList-itemRow:hover {
    background: rgba(224, 79, 62, 0.1) !important;
  }
  html.bs-exact-theme .categoryList-toggler {
    position: relative !important;
    z-index: 6 !important;
  }

  /* Balanced 7-card SEO category hub in matching obsidian framing (100% verbatim copy) */
  html.bs-exact-theme .nfSeo-discovery {
    background: var(--bs-panel) !important;
    border: 1px solid var(--bs-border) !important;
    border-top: 2px solid rgba(224, 92, 74, 0.55) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24) !important;
  }
  html.bs-exact-theme .nfSeo-discoveryGrid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  html.bs-exact-theme .nfSeo-discoveryGrid > a {
    background: #252b37 !important;
    border: 1px solid rgba(196, 206, 224, 0.16) !important;
    border-radius: 6px !important;
    transition: border-color 0.13s ease, background-color 0.13s ease !important;
  }
  html.bs-exact-theme .nfSeo-discoveryGrid > a:hover {
    border-color: rgba(224, 92, 74, 0.65) !important;
    background: #2e3544 !important;
  }
  @media (min-width: 901px) {
    html.bs-exact-theme .nfSeo-discoveryGrid > a:last-child:nth-child(3n + 1) {
      grid-column: 1 / -1 !important;
    }
    html.bs-exact-theme .nfSeo-discoveryGrid > a:last-child:nth-child(3n + 2) {
      grid-column: span 2 !important;
    }
  }
  @media (max-width: 900px) {
    html.bs-exact-theme .nfSeo-discoveryGrid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    html.bs-exact-theme .nfSeo-discoveryGrid > a:last-child:nth-child(odd) {
      grid-column: 1 / -1 !important;
    }
  }
  @media (max-width: 540px) {
    html.bs-exact-theme .nfSeo-discoveryGrid {
      grid-template-columns: 1fr !important;
    }
  }

  /* =========================================================================
   * 8. SINGLE RESOURCE PAGE — Chamfered Gold CTA, Clean Tabs, Sticky Sidebar
   * ========================================================================= */
  html.bs-exact-theme a.bsUpgradeDownloadPrompt {
    background: linear-gradient(180deg, #523b13, #2b1f0b) !important;
    border: 1px solid rgba(245, 196, 81, 0.72) !important;
    clip-path: var(--bs-chamfer) !important;
    border-radius: 3px !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 172, 0.25) !important;
  }
  html.bs-exact-theme a.bsUpgradeDownloadPrompt:hover {
    background: linear-gradient(180deg, #654918, #35260e) !important;
    border-color: #ffd875 !important;
  }
  html[data-template="xfrm_resource_view"].bs-exact-theme .bsResource-index a[aria-current="location"] {
    border-left: 0 !important;
    padding-left: 0 !important;
    color: #ffe2a6 !important;
    box-shadow: inset 0 -2px 0 #f5c451 !important;
  }
  @media (max-width: 900px) {
    html[data-template="xfrm_resource_view"].bs-exact-theme .tabs--standalone,
    html[data-template="xfrm_resource_view"].bs-exact-theme .tabs--standalone .hScroller-scroll {
      scrollbar-width: none !important;
      -ms-overflow-style: none !important;
    }
    html[data-template="xfrm_resource_view"].bs-exact-theme .tabs--standalone::-webkit-scrollbar,
    html[data-template="xfrm_resource_view"].bs-exact-theme .tabs--standalone .hScroller-scroll::-webkit-scrollbar {
      display: none !important;
      height: 0 !important;
    }
  }
  @media (min-width: 901px) {
    html[data-template="xfrm_resource_view"].bs-exact-theme .p-body-sidebar {
      position: sticky !important;
      top: 18px !important;
      align-self: start !important;
    }
  }

  /* =========================================================================
   * 9. FORUMS — Forged Obsidian Hub, Crisp Tabs, Copper Sticky Accent
   * ========================================================================= */
  html.bs-exact-theme .bsf-panel {
    background: var(--bs-panel) !important;
    border: 1px solid var(--bs-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24) !important;
  }
  /* Forum hub live resource search (homepage parity in brushed slate-grey palette) */
  html.bs-exact-theme .bsf-searchWrap {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html.bs-exact-theme .bsf-search input[type="search"] {
    background-color: #161a23 !important;
    border: 1px solid rgba(206, 216, 234, 0.24) !important;
    border-radius: 6px !important;
    color: #f6f3ef !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.34) !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease !important;
  }
  html.bs-exact-theme .bsf-search input[type="search"]:focus {
    border-color: rgba(224, 79, 62, 0.72) !important;
    box-shadow: 0 0 0 2px rgba(224, 79, 62, 0.18) !important;
    outline: none !important;
  }
  html.bs-exact-theme .bsf-search button[type="submit"] {
    border: 1px solid rgba(235, 118, 96, 0.72) !important;
    border-radius: 6px !important;
    background: linear-gradient(180deg, #cf4c3c, #993227) !important;
    box-shadow: inset 0 1px 0 rgba(255, 224, 210, 0.28) !important;
    color: #fff6f0 !important;
    font-weight: 700 !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
  }
  html.bs-exact-theme .bsf-search button[type="submit"]:hover {
    background: linear-gradient(180deg, #df5847, #aa392d) !important;
    border-color: rgba(248, 148, 124, 0.85) !important;
  }
  html.bs-exact-theme .bsf-searchWrap .bsx-searchScopeRow {
    padding: 8px 12px 0 !important;
    gap: 8px !important;
    color: #c8d0de !important;
  }
  html.bs-exact-theme .bsf-searchWrap .bsx-searchScopeRow select {
    background: #161a23 !important;
    border: 1px solid rgba(206, 216, 234, 0.24) !important;
    border-radius: 5px !important;
    color: #f4f1ed !important;
  }
  html.bs-exact-theme .bsf-quickResults {
    margin: 10px 0 0 !important;
    padding: 10px 12px 12px !important;
    border-top: 1px solid rgba(196, 206, 224, 0.16) !important;
    border-bottom: 1px solid rgba(196, 206, 224, 0.16) !important;
    background: #1a1f29 !important;
    box-sizing: border-box !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchResults-scroll {
    max-height: min(520px, 60vh) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  html.bs-exact-theme .bsf-quickResults .bsx-homeQuickHeading {
    padding: 2px 2px 10px !important;
    color: #f4ebe2 !important;
    font-size: 13px !important;
  }
  html.bs-exact-theme .bsf-quickResults .bsx-homeQuickHeading button {
    border: 1px solid rgba(206, 216, 234, 0.28) !important;
    border-radius: 5px !important;
    background: #2b3240 !important;
    color: #f6f2ee !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
  }
  html.bs-exact-theme .bsf-quickResults .bsx-homeQuickHeading button:hover {
    background: #3d292d !important;
    border-color: rgba(235, 108, 88, 0.68) !important;
    color: #ffffff !important;
  }
  html.bs-exact-theme .bsf-quickResults tbody {
    gap: 8px !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchRow {
    background: #252b37 !important;
    border: 1px solid rgba(196, 206, 224, 0.16) !important;
    border-radius: 6px !important;
    padding: 9px 10px !important;
    contain: layout style;
    transition: background 0.15s ease, border-color 0.15s ease !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchRow:hover {
    background: #2e3544 !important;
    border-color: rgba(235, 108, 88, 0.62) !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchTitle {
    color: #f6f2ee !important;
    min-height: 0 !important;
  }
  html.bs-exact-theme .bsf-quickResults td,
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchSubtitle {
    color: #c2c8d4 !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchCategory {
    color: #f1c78e !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchThumb {
    background: #181c26 !important;
    border: 1px solid rgba(196, 206, 224, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchThumbFallback {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    height: 52px !important;
    color: #d7deeb !important;
    font-weight: 700 !important;
    font-size: 18px !important;
  }
  html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchEmpty {
    background: transparent !important;
    border: 0 !important;
    color: #c8d0de !important;
    padding: 14px 4px !important;
  }
  html.bs-exact-theme .bsf-quickResults .bsx-quickActions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 6px 0 3px !important;
  }
  html.bs-exact-theme .bsf-quickResults .bsx-quickActions > :is(.bsx-quickLook, .bsx-saveResource) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 29px !important;
    margin: 0 !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    border-radius: 5px !important;
  }
  html.bs-exact-theme .bsf-quickResults .bsx-quickActions > .bsx-quickLook::before {
    content: none !important;
    display: none !important;
  }
  @media (max-width: 900px) {
    html.bs-exact-theme .bsf-searchWrap .bsx-searchScopeRow {
      padding: 7px 8px 0 !important;
    }
    html.bs-exact-theme .bsf-quickResults {
      padding: 8px 8px 10px !important;
    }
    html.bs-exact-theme .bsf-quickResults tbody {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchRow {
      grid-template-columns: 48px minmax(0, 1fr) !important;
      padding: 9px !important;
    }
    html.bs-exact-theme .bsf-quickResults .xfrm-quickSearchThumb,
    html.bs-exact-theme .bsf-quickResults img {
      width: 48px !important;
      height: 48px !important;
    }
  }
  html.bs-exact-theme .bsf-categories > a {
    background: #272d39 !important;
    border: 1px solid rgba(196, 206, 224, 0.17) !important;
    border-radius: 5px !important;
    color: #dfe4ee !important;
  }
  html.bs-exact-theme .bsf-categories > a[aria-selected="true"],
  html.has-js.bs-exact-theme .bsf-categories > a:first-child:not([aria-selected="false"]) {
    background: linear-gradient(180deg, rgba(224, 86, 68, 0.34), #382629) !important;
    border-color: rgba(235, 108, 88, 0.72) !important;
    box-shadow: inset 0 -2px 0 #e85d4a !important;
    color: #ffffff !important;
  }
  html.bs-exact-theme .bsf-resource {
    background: #252b37 !important;
    border: 1px solid rgba(196, 206, 224, 0.15) !important;
    border-radius: 6px !important;
    contain: layout style;
  }
  html.bs-exact-theme .bsf-resource:hover {
    border-color: rgba(235, 108, 88, 0.65) !important;
    background: #2e3544 !important;
  }
  html.bs-exact-theme .bsf-resourceImage {
    background: linear-gradient(180deg, #1b202b, #151922) !important;
    border-bottom: 1px solid rgba(196, 206, 224, 0.11) !important;
  }
  html.bs-exact-theme .bsf-resourceCopy > strong {
    color: #f6f2ee !important;
  }
  html.bs-exact-theme .bsf-resourceCopy > span > span[aria-hidden="true"] {
    opacity: 0.42 !important;
    transition: opacity 0.15s ease;
  }
  html.bs-exact-theme .bsf-resource:hover .bsf-resourceCopy > span > span[aria-hidden="true"] {
    opacity: 0.95 !important;
  }
  html.bs-exact-theme .structItem--thread.is-sticky {
    border-left: 2px solid #e04f3e !important;
  }
  html.bs-exact-theme .block--category .block-header .collapseTrigger,
  html.bs-exact-theme .block--category .block-header .collapseTrigger::before {
    color: #f6eae4 !important;
    opacity: 0.9 !important;
  }

  /* =========================================================================
   * 10. REGISTER / PLANS & MOBILE BOTTOM BAR CLEARANCE
   * ========================================================================= */
  html.bs-exact-theme .bsu-plans .bsu-card {
    background: linear-gradient(180deg, rgba(40, 46, 58, 0.96), rgba(30, 35, 45, 0.97)) !important;
    border: 1px solid rgba(196, 206, 224, 0.20) !important;
    border-radius: 9px !important;
  }
  html.bs-exact-theme .bsu-plans .bsu-card--ultra {
    border-color: rgba(245, 196, 81, 0.62) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 232, 168, 0.22) !important;
  }
  html.bs-exact-theme .bsu-plans .bsu-card--ultra .bsu-button {
    clip-path: var(--bs-chamfer) !important;
    border-radius: 3px !important;
  }
  html.bs-exact-theme .bsu-promoToggle > summary {
    background: #252b37 !important;
    border-color: rgba(224, 96, 78, 0.44) !important;
  }
  /* Distinct lighter charcoal mobile top header & bottom navigation bar */
  @media (max-width: 900px) {
    html.bs-exact-theme .bsm-header {
      background: linear-gradient(180deg, #323846, #242934) !important;
      border-bottom: 1px solid rgba(214, 224, 240, 0.20) !important;
    }
    html.bs-exact-theme .bsx-bottomNav {
      background: linear-gradient(180deg, #303644, #222732) !important;
      border: 1px solid rgba(214, 224, 240, 0.24) !important;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38) !important;
    }
  }
  html.bs-exact-theme .bsu-promoToggle-icon {
    width: 14px !important;
    height: 14px !important;
    object-fit: contain !important;
    image-rendering: auto !important;
  }

  @media (max-width: 900px) {
    html.bs-exact-theme .p-pageWrapper {
      background-attachment: scroll !important;
    }
    /* Full-width centered mobile /resources/ Refine button + crisp SVG chevron */
    html.bs-exact-theme .bsx-refine > summary {
      display: flex !important;
      width: 100% !important;
      box-sizing: border-box !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 6px !important;
      line-height: 1.2 !important;
    }
    html.bs-exact-theme .bsx-refine > summary::after {
      content: '' !important;
      display: inline-block !important;
      width: 11px !important;
      height: 11px !important;
      flex-shrink: 0 !important;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23dfb57c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.25 6 7.75l3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat !important;
      transition: transform 0.15s ease !important;
    }
    html.bs-exact-theme .bsx-refine[open] > summary::after {
      transform: rotate(180deg) !important;
    }
    /* Give Ultra "THE FULL EXPERIENCE" badge breathing room under sticky mobile header */
    html.bs-exact-theme .bsu-plans {
      padding-top: 22px !important;
      overflow: visible !important;
    }
    html.bs-exact-theme .bsu-plans .bsu-card--ultra {
      margin-top: 10px !important;
    }
    html.bs-exact-theme .p-footer {
      padding-bottom: 92px !important;
    }
    html[data-template="af_paidregistrations_accounttype"].bs-exact-theme .bsx-actionbar,
    html[data-template="account_upgrades"].bs-exact-theme .bsx-actionbar {
      display: none !important;
    }
  }
}

/* Disable sluggish full-page @view-transition GPU snapshot & double-exposed fade.
 * Fast instant swaps are powered by lightweight HTML-only speculationrules prefetch,
 * matched #13161e byte-1 backdrop, scrollbar-gutter: stable, and sessionStorage particle continuity. */
@view-transition {
  navigation: none;
}
