/* RNS Marketplace unified theme layer — V54 */
:root{
  --bg:#f4f7fb;--s:#ffffff;--s2:#f8faff;--t:#101828;--m:#667085;--l:#e1e7f0;
  --b:#1769e0;--soft:#eaf3ff;--good:#087443;--bad:#b42318;
  --card:var(--s);--card2:var(--s2);--text:var(--t);--muted:var(--m);--line:var(--l);--accent:var(--b);
  --ok:#087443;--warn:#9a6700;--danger:#b42318;
}
html[data-theme="dark"]{
  --bg:#07111f;--s:#0d1828;--s2:#102541;--t:#f6f8fc;--m:#a8b5c8;--l:#233550;
  --b:#65a7ff;--soft:#102541;--good:#42d69a;--bad:#ff8c83;
  --card:var(--s);--card2:var(--s2);--text:var(--t);--muted:var(--m);--line:var(--l);--accent:var(--b);
  --ok:#42d69a;--warn:#f2c45c;--danger:#ff8c83;
}
html,body{background:var(--bg);color:var(--t)}
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
body{min-height:100vh}
::selection{background:var(--b);color:#fff}
::-moz-selection{background:var(--b);color:#fff}
/* Common text/input surfaces */
.muted,.sub,.status,.empty,.hint,.description,.meta,.time,.note,.helper,.secondary-text{color:var(--m)!important}
input,textarea,select{color:var(--t);border-color:var(--l)}
input::placeholder,textarea::placeholder{color:var(--m);opacity:.85}
/* IMPORTANT: component CSS owns its button/card/background design. The shared theme must not
   globally repaint non-primary buttons, tabs, promo controls, or branded actions. */
.primary{background:var(--b)!important;color:#fff!important;border-color:var(--b)!important}
.rns-theme-toggle{display:inline-flex!important;align-items:center;justify-content:center;min-width:42px;height:42px;padding:9px 11px!important;border:1px solid var(--l)!important;background:var(--s)!important;color:var(--t)!important;border-radius:13px!important;font-weight:900!important;cursor:pointer;line-height:1}
.rns-theme-toggle:hover{border-color:var(--b)!important}
.rns-theme-control-wrap{display:inline-flex;align-items:center;gap:8px}
/* Normalize legacy custom dark-only marketplace screens */
html[data-rns-marketplace-theme="1"] .list,
html[data-rns-marketplace-theme="1"] .chat,
html[data-rns-marketplace-theme="1"] .card,
html[data-rns-marketplace-theme="1"] .person,
html[data-rns-marketplace-theme="1"] .item,
html[data-rns-marketplace-theme="1"] .mention-box,
html[data-rns-marketplace-theme="1"] .dialog,
html[data-rns-marketplace-theme="1"] .compose{background-color:var(--s)!important;color:var(--t)}
html[data-rns-marketplace-theme="1"] .item.unread{background:var(--soft)!important}
html[data-rns-marketplace-theme="1"] .bubble{background:var(--s2);color:var(--t)}
html[data-rns-marketplace-theme="1"] .bubble.mine,
html[data-rns-marketplace-theme="1"] .mine{background:var(--b)!important;color:#fff!important}
html[data-rns-marketplace-theme="1"] .messages{background:var(--s)!important}
html[data-rns-marketplace-theme="1"] .avatar{background:var(--soft)}
/* Preserve branded hero cards while making legacy dark screens readable in light mode */
html[data-rns-marketplace-theme="1"] .hero{color:#fff}
html[data-rns-marketplace-theme="1"] .hero p{color:rgba(255,255,255,.9)!important}
html[data-rns-marketplace-theme="1"] .pill{background:rgba(66,214,154,.14);color:var(--ok)}
html[data-rns-marketplace-theme="1"] .rns-live-prep,
html[data-rns-marketplace-theme="1"] .rns-live-prep .prep-status{color:var(--t)}
/* Prevent old purple/visited-link rendering from leaking into Marketplace UI */
html[data-rns-marketplace-theme="1"] a:visited{color:inherit!important}
/* Preserve explicit branded/semantic link colors after visited state. */
html[data-rns-marketplace-theme="1"] .primary:visited{color:#fff!important}
html[data-rns-marketplace-theme="1"] .payOpen:visited{color:#fff!important}
html[data-rns-marketplace-theme="1"] .heroBtns a:visited{color:#0b4da8!important}
html[data-rns-marketplace-theme="1"] .bannerSlide:visited{color:#fff!important}
html[data-rns-marketplace-theme="1"] .bannerSlide,
html[data-rns-marketplace-theme="1"] .bannerSlide:visited,
html[data-rns-marketplace-theme="1"] .bannerSlide *{color:#fff!important}
html:not([data-theme="dark"])[data-rns-marketplace-theme="1"] .cat,
html:not([data-theme="dark"])[data-rns-marketplace-theme="1"] .cat:visited,
html:not([data-theme="dark"])[data-rns-marketplace-theme="1"] .quick a,
html:not([data-theme="dark"])[data-rns-marketplace-theme="1"] .quick a:visited{color:var(--t)!important}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:visited,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .quick a,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .quick a:visited{color:var(--t)!important}
/* Keep status semantics readable in both themes */
html[data-rns-marketplace-theme="1"] .error{color:var(--bad)!important}
/* Dark-mode surfaces that were previously hard-coded white */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"]{background:var(--s)!important;color:var(--t)!important}
html[data-theme="dark"] [style*="color:#101828"],
html[data-theme="dark"] [style*="color: #101828"],
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color: #0f172a"]{color:var(--t)!important}


/* RNS Spectrum Visual Layer — V199
   Visual-only layer. It does not alter navigation, payment logic, forms, or theme switching. */
:root{
  --rns-spectrum-1:#1769e0;
  --rns-spectrum-2:#7c3aed;
  --rns-spectrum-3:#e11d48;
  --rns-spectrum-4:#ea8a00;
  --rns-spectrum-5:#0f9f68;
  --rns-spectrum-6:#0891b2;
}
html[data-theme="dark"]{
  --rns-spectrum-1:#65a7ff;
  --rns-spectrum-2:#a78bfa;
  --rns-spectrum-3:#fb7185;
  --rns-spectrum-4:#f6b84b;
  --rns-spectrum-5:#42d69a;
  --rns-spectrum-6:#67e8f9;
}
/* Keep the original RNS surfaces, adding only subtle spectrum accents. */
html[data-rns-marketplace-theme="1"] body{
  background:
    radial-gradient(circle at 0% 0%,color-mix(in srgb,var(--rns-spectrum-1) 7%,transparent),transparent 30%),
    radial-gradient(circle at 100% 8%,color-mix(in srgb,var(--rns-spectrum-2) 6%,transparent),transparent 28%),
    var(--bg);
}
html[data-rns-marketplace-theme="1"] .card,
html[data-rns-marketplace-theme="1"] .cat,
html[data-rns-marketplace-theme="1"] .quick a,
html[data-rns-marketplace-theme="1"] .provider,
html[data-rns-marketplace-theme="1"] .valid,
html[data-rns-marketplace-theme="1"] .section,
html[data-rns-marketplace-theme="1"] .notice,
html[data-rns-marketplace-theme="1"] .msg{
  border-color:color-mix(in srgb,var(--rns-spectrum-1) 16%,var(--l));
}
/* Category spectrum: visual only; links and click handlers remain untouched. */
html[data-rns-marketplace-theme="1"] .cat:nth-child(6n+1),
html[data-rns-marketplace-theme="1"] .quick a:nth-child(6n+1){border-color:color-mix(in srgb,var(--rns-spectrum-1) 42%,var(--l));}
html[data-rns-marketplace-theme="1"] .cat:nth-child(6n+2),
html[data-rns-marketplace-theme="1"] .quick a:nth-child(6n+2){border-color:color-mix(in srgb,var(--rns-spectrum-2) 42%,var(--l));}
html[data-rns-marketplace-theme="1"] .cat:nth-child(6n+3),
html[data-rns-marketplace-theme="1"] .quick a:nth-child(6n+3){border-color:color-mix(in srgb,var(--rns-spectrum-3) 42%,var(--l));}
html[data-rns-marketplace-theme="1"] .cat:nth-child(6n+4),
html[data-rns-marketplace-theme="1"] .quick a:nth-child(6n+4){border-color:color-mix(in srgb,var(--rns-spectrum-4) 42%,var(--l));}
html[data-rns-marketplace-theme="1"] .cat:nth-child(6n+5),
html[data-rns-marketplace-theme="1"] .quick a:nth-child(6n+5){border-color:color-mix(in srgb,var(--rns-spectrum-5) 42%,var(--l));}
html[data-rns-marketplace-theme="1"] .cat:nth-child(6n),
html[data-rns-marketplace-theme="1"] .quick a:nth-child(6n){border-color:color-mix(in srgb,var(--rns-spectrum-6) 42%,var(--l));}
/* Product/service cards receive a small colored top accent without repainting their surfaces. */
html[data-rns-marketplace-theme="1"] .products>.card:nth-child(6n+1),
html[data-rns-marketplace-theme="1"] .grid>.card:nth-child(6n+1){border-top:3px solid var(--rns-spectrum-1);}
html[data-rns-marketplace-theme="1"] .products>.card:nth-child(6n+2),
html[data-rns-marketplace-theme="1"] .grid>.card:nth-child(6n+2){border-top:3px solid var(--rns-spectrum-2);}
html[data-rns-marketplace-theme="1"] .products>.card:nth-child(6n+3),
html[data-rns-marketplace-theme="1"] .grid>.card:nth-child(6n+3){border-top:3px solid var(--rns-spectrum-3);}
html[data-rns-marketplace-theme="1"] .products>.card:nth-child(6n+4),
html[data-rns-marketplace-theme="1"] .grid>.card:nth-child(6n+4){border-top:3px solid var(--rns-spectrum-4);}
html[data-rns-marketplace-theme="1"] .products>.card:nth-child(6n+5),
html[data-rns-marketplace-theme="1"] .grid>.card:nth-child(6n+5){border-top:3px solid var(--rns-spectrum-5);}
html[data-rns-marketplace-theme="1"] .products>.card:nth-child(6n),
html[data-rns-marketplace-theme="1"] .grid>.card:nth-child(6n){border-top:3px solid var(--rns-spectrum-6);}
/* Branded banners keep their own gradients; spectrum layer only enhances separation. */
html[data-rns-marketplace-theme="1"] .bannerSlide,
html[data-rns-marketplace-theme="1"] .hero,
html[data-rns-marketplace-theme="1"] .store{
  box-shadow:0 14px 34px color-mix(in srgb,var(--rns-spectrum-1) 13%,transparent);
}
/* PPOB category identity on the existing digital page. */
html[data-rns-marketplace-theme="1"] .providerGrid .provider:nth-child(6n+1){border-color:color-mix(in srgb,var(--rns-spectrum-1) 40%,var(--l));}
html[data-rns-marketplace-theme="1"] .providerGrid .provider:nth-child(6n+2){border-color:color-mix(in srgb,var(--rns-spectrum-2) 40%,var(--l));}
html[data-rns-marketplace-theme="1"] .providerGrid .provider:nth-child(6n+3){border-color:color-mix(in srgb,var(--rns-spectrum-3) 40%,var(--l));}
html[data-rns-marketplace-theme="1"] .providerGrid .provider:nth-child(6n+4){border-color:color-mix(in srgb,var(--rns-spectrum-4) 40%,var(--l));}

/* ============================================================
   RNS Marketplace V219 — CATEGORY DARK-MODE HARDENING
   Fix category/PPOB/physical product cards that become washed-out,
   blurred-looking or white in dark mode. Visual-only layer.
   ============================================================ */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .msg,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .targetBox,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .service-info,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .service,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .platform-card {
  color:var(--t) !important;
  opacity:1 !important;
  filter:none !important;
  -webkit-filter:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  border-color:var(--l) !important;
  box-shadow:0 12px 30px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  border-color:var(--l) !important;
  color:var(--t) !important;
  box-shadow:0 8px 22px rgba(0,0,0,.18) !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider.active,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid.active {
  background:linear-gradient(135deg,var(--b),#7c3aed) !important;
  border-color:var(--b) !important;
  color:#fff !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid .thumb {
  background:linear-gradient(145deg,var(--s2),#152e4e) !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid .body,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products .card > * {
  opacity:1 !important;
  filter:none !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty strong,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .name,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .price,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .targetLabel {
  color:var(--t) !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .price {
  color:var(--b) !important;
}

html[data-theme="dark"][data-rns-marketplace-theme="1"] .meta,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .muted,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .targetHint {
  color:var(--m) !important;
}

/* Remove common legacy white/washed surfaces on PPOB category screens. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .provider,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .valid,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .msg,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty {
  mix-blend-mode:normal !important;
}

@media (max-width:560px){
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid {
    min-width:0 !important;
  }
}

/* ============================================================
   V220 — CATEGORY / PPOB DARK-MODE HARDENING
   Visual-only, additive layer.
   Scope is limited to category/PPOB surfaces so existing good
   Marketplace cards and business logic are not restructured.
   ============================================================ */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:visited,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .msg,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .targetBox,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .service-info,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .service,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .platform-card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .platform-more,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .category-select {
  opacity:1 !important;
  filter:none !important;
  -webkit-filter:none !important;
  mix-blend-mode:normal !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  color:var(--t) !important;
  background-color:var(--s) !important;
}

/* Physical category product cards: keep thumbnail and body visibly
   separated in dark mode without changing their markup or behavior. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  border-color:var(--l) !important;
  box-shadow:0 12px 30px rgba(0,0,0,.22) !important;
  overflow:hidden;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card .thumb {
  background:linear-gradient(145deg,var(--s2),#152e4e) !important;
  opacity:1 !important;
  filter:none !important;
  -webkit-filter:none !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card .body,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card .name {
  color:var(--t) !important;
  opacity:1 !important;
  filter:none !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card .price {
  color:var(--b) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card .meta {
  color:var(--m) !important;
}

/* Category navigation cards / tiles. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  border-color:var(--l) !important;
  box-shadow:0 9px 24px rgba(0,0,0,.18) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat * {
  opacity:1 !important;
  filter:none !important;
}

/* PPOB provider / validity / empty states. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  color:var(--t) !important;
  border-color:var(--l) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider.active,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid.active {
  background:linear-gradient(135deg,var(--b),#7c3aed) !important;
  color:#fff !important;
  border-color:var(--b) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  color:var(--t) !important;
  border-color:var(--l) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card.unavailable {
  opacity:1 !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .msg,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty {
  background:linear-gradient(145deg,var(--s),var(--s2)) !important;
  color:var(--m) !important;
  border-color:var(--l) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty strong,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .targetLabel {
  color:var(--t) !important;
}

/* Do not allow long category/card content to create mobile overflow. */
@media (max-width:700px){
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .products {
    width:100% !important;
    min-width:0 !important;
  }
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card {
    min-width:0 !important;
    max-width:100% !important;
  }
}
/* End V220 */

/* ============================================================
   V221 — COLOR-PRESERVING DARK-MODE HARDENING
   Only strengthens card surfaces that previously looked washed-out
   or blurred in dark mode. Existing colorful accents are preserved.
   No markup, data, navigation, payment, or business logic changes.
   ============================================================ */

html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .store,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .storecard,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .empty,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .msg,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .targetBox,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .service-info,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .service,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .platform-card,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .platform-more,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .category-select {
  opacity:1 !important;
  filter:none !important;
  -webkit-filter:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  mix-blend-mode:normal !important;
  isolation:isolate;
}

/* Keep category tiles colorful without repainting their icons. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:nth-child(6n+1),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card:nth-child(6n+1),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card:nth-child(6n+1) {
  background:linear-gradient(145deg,color-mix(in srgb,var(--s) 90%,var(--rns-spectrum-1) 10%),var(--s2)) !important;
  border-color:color-mix(in srgb,var(--rns-spectrum-1) 42%,var(--l)) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:nth-child(6n+2),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card:nth-child(6n+2),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card:nth-child(6n+2) {
  background:linear-gradient(145deg,color-mix(in srgb,var(--s) 90%,var(--rns-spectrum-2) 10%),var(--s2)) !important;
  border-color:color-mix(in srgb,var(--rns-spectrum-2) 42%,var(--l)) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:nth-child(6n+3),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card:nth-child(6n+3),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card:nth-child(6n+3) {
  background:linear-gradient(145deg,color-mix(in srgb,var(--s) 90%,var(--rns-spectrum-3) 10%),var(--s2)) !important;
  border-color:color-mix(in srgb,var(--rns-spectrum-3) 42%,var(--l)) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:nth-child(6n+4),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card:nth-child(6n+4),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card:nth-child(6n+4) {
  background:linear-gradient(145deg,color-mix(in srgb,var(--s) 90%,var(--rns-spectrum-4) 10%),var(--s2)) !important;
  border-color:color-mix(in srgb,var(--rns-spectrum-4) 42%,var(--l)) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:nth-child(6n+5),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card:nth-child(6n+5),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card:nth-child(6n+5) {
  background:linear-gradient(145deg,color-mix(in srgb,var(--s) 90%,var(--rns-spectrum-5) 10%),var(--s2)) !important;
  border-color:color-mix(in srgb,var(--rns-spectrum-5) 42%,var(--l)) !important;
}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat:nth-child(6n),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card:nth-child(6n),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card:nth-child(6n) {
  background:linear-gradient(145deg,color-mix(in srgb,var(--s) 90%,var(--rns-spectrum-6) 10%),var(--s2)) !important;
  border-color:color-mix(in srgb,var(--rns-spectrum-6) 42%,var(--l)) !important;
}

/* PPOB cards retain the active blue/purple identity and gain subtle
   spectrum borders when inactive. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider:nth-child(6n+1),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid:nth-child(6n+1){border-color:color-mix(in srgb,var(--rns-spectrum-1) 48%,var(--l)) !important}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider:nth-child(6n+2),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid:nth-child(6n+2){border-color:color-mix(in srgb,var(--rns-spectrum-2) 48%,var(--l)) !important}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider:nth-child(6n+3),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid:nth-child(6n+3){border-color:color-mix(in srgb,var(--rns-spectrum-3) 48%,var(--l)) !important}
html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider:nth-child(6n+4),
html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid:nth-child(6n+4){border-color:color-mix(in srgb,var(--rns-spectrum-4) 48%,var(--l)) !important}

/* Store cards: never inherit a translucent/blurred surface. The
   dedicated V217 official/verified/basic/unverified gradients remain intact. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .store,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .storecard {
  opacity:1 !important;
  filter:none !important;
  -webkit-filter:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Images/icons inside cards must remain crisp; this does not alter their colors. */
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat img,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .catIcon,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .store img,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .storelogo,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .store .logo,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card img,
html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card img {
  opacity:1 !important;
  filter:none !important;
  -webkit-filter:none !important;
}

@media (max-width:700px){
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .cat,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .cardgrid > .card,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .providerGrid > .provider,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .validRow > .valid,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .products > .card,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .store,
  html[data-theme="dark"][data-rns-marketplace-theme="1"] .storecard {
    min-width:0 !important;
    max-width:100% !important;
  }
}
/* End V221 */
