/* =============================================================================
   SmartMBX Academy — Storefront brand layer (store.css)
   Loaded AFTER assets/style.css to upgrade the customer-facing store + product
   pages into a premium extension of the WebGL marketing site: deep dark canvas,
   gold gradient accents, Fraunces/Anton display + Manrope UI + JetBrains Mono
   numerals, and tasteful CSS-only hover motion (lift + gold glow).

   CSP-SAFE: this is an external 'self' stylesheet (allowed). All styling is
   class-driven; the store templates use NO inline style="" attributes (which
   the commerce CSP blocks) and NO <style> blocks.

   Font stacks degrade gracefully: if the Google Fonts <link> is blocked by CSP,
   the system fallbacks keep the layout intact.
   ============================================================================= */

:root {
  /* ---- Quiet-luxury brand tokens (override style.css) --------------------
     Deep ink canvas, cream/parchment ink, GOLD used sparingly as the single
     accent. Muted and calm — no neon, no rainbow. Mirrors the Forge Bible. */
  --bg:        #0a0a12;          /* base ink */
  --bg-2:      #070b16;          /* deeper ink (panels sink toward this) */
  --panel:     #101521;          /* card top */
  --panel-2:   #0c111c;          /* card bottom */
  --ink:       #f1ecdf;          /* parchment — primary text */
  --ink-soft:  #ece9f5;          /* cool cream — alt headings */
  --muted:     #9a96a8;          /* style.css uses --muted; keep the name */
  --ink-muted: #9a96a8;          /* calm grey-violet for secondary text */
  --line:      #1e2230;          /* hairline divider */
  --line-2:    #2a2f40;          /* slightly brighter hairline (hover) */
  --gold:      #c9a227;          /* core gold */
  --gold2:     #e8b84b;          /* warm gold highlight */
  --gold-soft: #e8b84b;          /* style.css references --gold-soft */
  --gold-hair: rgba(201,162,39,.34); /* the one accent, as a thin line */
  --grad-gold: linear-gradient(95deg, #c9a227, #e8b84b);

  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;
  --store-maxw: 1180px;

  /* Motion: slow, calm easing — quiet luxury, never bouncy. */
  --ease-calm: cubic-bezier(.16, .68, .26, .99);
  --rev-dur:   .8s;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui:      "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Back-compat alias: a few rules below still reference --font-anton. */
  --font-anton:   "Fraunces", Georgia, "Times New Roman", serif;
}

/* ===========================================================================
   CROSS-DOCUMENT VIEW TRANSITIONS  (progressive enhancement, CSS-only)
   Opt every same-origin navigation into a native page-push cross-fade where the
   browser supports it (Chromium 126+). Pure CSS → CSP-clean (no script). A no-op
   everywhere else, and the platform automatically skips it under
   prefers-reduced-motion, so it never fights accessibility settings.
   =========================================================================== */
@view-transition { navigation: auto; }

/* ---- Canvas + ambient backdrop -------------------------------------------*/
/* The static background here is ALSO the WebGL fallback: if store-fx.js can't
   get a WebGL context (or the visitor prefers reduced motion) it removes the
   <canvas> and this calm, deep radial wash shows through unchanged. */
body.store-body {
  background:
    radial-gradient(1200px 760px at 80% -12%, rgba(201,162,39,.10), transparent 58%),
    radial-gradient(900px 620px at 6% 2%, rgba(201,162,39,.04), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* WebGL ambient canvas — fixed, full-viewport, BEHIND all content, very low
   opacity so it reads as atmosphere, not decoration. pointer-events:none keeps
   it click-through. store-fx.js renders slow gold-veined fbm into it. */
.fx-bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  opacity: .17;
  /* fade in once painted so first frame isn't an abrupt flash */
  animation: fx-fade 1.6s var(--ease-calm) both;
}
@keyframes fx-fade { from { opacity: 0; } to { opacity: .17; } }

/* Faint film-grain overlay (SVG fractal-noise data-URI) for analog texture.
   ~.04 opacity, fixed, click-through, sits just above the canvas. */
.fx-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.store-body > header,
.store-body > main,
.store-body > footer { position: relative; z-index: 1; }

.store-wrap { width: 100%; max-width: var(--store-maxw); margin: 0 auto; padding: 0 24px; }
.store-main { padding: 64px 24px 110px; }
@media (max-width: 640px) { .store-main { padding: 40px 20px 80px; } }

/* ---- Header (mirrors the marketing site nav) -----------------------------
   Sticky dark+gold bar: a gold rounded "M" logo tile + "SmartMBX" wordmark +
   "The MarjAI Edition" subtitle on the left, the primary nav centred, and a
   ghost "Our story" + gold "Enroll →" pill on the right. Same type scale,
   spacing, and blur as SmartMBX-Brand-Site.html's nav.main. Collapses cleanly
   on narrow viewports (nav wraps below, CTAs stay). CSP-safe: class-driven. */
.store-top {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7,11,20,.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.store-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; min-height: 72px; padding: 12px 0;
}

/* Brand lockup: gold "M" tile + wordmark + mono subtitle. */
.store-brand {
  display: inline-flex; align-items: center; gap: 13px;
  color: var(--ink); transition: opacity .2s ease;
}
.store-brand:hover { opacity: .85; text-decoration: none; }
.store-brand-mark {
  position: relative; overflow: hidden;
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 11px;
  background: radial-gradient(circle at 32% 30%, var(--gold2), var(--gold) 55%, #0a0805 100%);
  display: grid; place-items: center;
  font-family: var(--font-display); color: #0a0805; font-weight: 900; font-size: 22px;
  box-shadow: 0 8px 24px rgba(201,162,39,.4);
  animation: smbGlow 4.5s ease-in-out infinite;
}
/* WebGL "MB" emblem — molten gold + cyan energy tile behind the monogram. */
.store-mb-aura { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; border-radius: inherit; }
.store-bm-mb { position: relative; z-index: 1; font-size: 17px; letter-spacing: -.5px; line-height: 1; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
@keyframes smbGlow {
  0%,100% { box-shadow: 0 8px 24px rgba(201,162,39,.40), 0 0 14px 0 rgba(86,212,221,0); }
  50%     { box-shadow: 0 8px 30px rgba(232,199,90,.55), 0 0 22px 2px rgba(86,212,221,.38); }
}
.store-brand-text { display: flex; flex-direction: column; }
.store-brand-wm {
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  line-height: 1; letter-spacing: -.005em; color: var(--ink);
}
/* "Academy" = flowing gold→cyan sheen accent (matches the marketing logo). */
.store-acad {
  font-weight: 700;
  background: linear-gradient(100deg, var(--gold2) 0%, var(--gold) 24%, #56d4dd 52%, var(--gold2) 82%);
  background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: acadSheen 6.5s linear infinite;
}
@keyframes acadSheen { 0% { background-position: 0% 50%; } 100% { background-position: 240% 50%; } }
.store-brand-sub {
  font-family: var(--font-mono); font-size: 9px; color: var(--gold2);
  letter-spacing: 2.8px; text-transform: uppercase; margin-top: 3px;
}
@media (prefers-reduced-motion: reduce) { .store-brand-mark { animation: none; } .store-acad { animation: none; } }

/* Centre nav — same pill-on-hover treatment as the marketing nav-mid. */
.store-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.store-nav a {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600;
  color: var(--ink-muted); letter-spacing: .1px;
  padding: 10px 14px; border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.store-nav a:hover { color: var(--ink); background: rgba(243,236,218,.05); text-decoration: none; }
.store-nav a[aria-current="page"] { color: var(--gold2); }

/* Right-side CTAs — ghost "Our story" + gold "Enroll →" pill. Mirrors the
   marketing .btn-ghost / .btn-gold but scoped to the header (the .store-btn
   rules in the buttons section target .store-main; the header sits outside it,
   so these header-scoped overrides give the compact nav-pill look). */
.store-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.store-cta .store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 700; font-size: 13.5px; letter-spacing: .2px;
  padding: 11px 20px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.store-cta .store-btn.gold {
  background: var(--grad-gold); color: #0a0805; border: 0;
  box-shadow: 0 10px 28px rgba(201,162,39,.45);
}
.store-cta .store-btn.gold:hover {
  transform: translateY(-2px); box-shadow: 0 14px 38px rgba(241,204,94,.6);
  color: #0a0805; text-decoration: none;
}
.store-cta .store-btn.ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--gold-hair);
}
.store-cta .store-btn.ghost:hover {
  background: var(--gold); color: #0a0805; border-color: var(--gold); text-decoration: none;
}
/* The base .store-btn rule (buttons section) adds overflow:hidden + a white
   ::after shimmer. That sweep suits the GOLD pill (let it ride) but reads wrong
   on the transparent ghost — kill it there. */
.store-cta .store-btn.ghost::after { display: none; }

/* Responsive collapse. Below 980px the centre nav drops to a second row that
   spans the full width and scrolls horizontally if needed; the brand + CTAs
   stay on the top row. "Our story" hides on the smallest screens to protect
   the gold Enroll CTA. */
@media (max-width: 980px) {
  .store-top-inner { flex-wrap: wrap; }
  .store-nav {
    order: 3; width: 100%; gap: 2px;
    margin-top: 4px; padding-top: 10px;
    border-top: 1px solid var(--line);
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .store-nav a { padding: 9px 11px; white-space: nowrap; }
}
@media (max-width: 560px) {
  .store-brand-sub { display: none; }
  .store-cta .store-btn.ghost { display: none; }
  .store-cta .store-btn { padding: 10px 16px; font-size: 13px; }
}

/* ---- Footer (style.css markup, brand-tuned) ------------------------------*/
.smbx-foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 36px 0; }
.smbx-foot .wrap { max-width: var(--store-maxw); }
.smbx-foot .honest { color: var(--gold2); }

/* ---- Generic display type -------------------------------------------------*/
.store-main h1, .store-main h2 {
  font-family: var(--font-display); font-weight: 900; color: var(--ink);
  letter-spacing: -.015em;
}
/* Small uppercase mono label with a thin gold lead-in rule (calm, editorial). */
.eyebrow {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 3.4px; text-transform: uppercase; color: var(--gold2);
  margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); opacity: .8; }

.section-head { margin: 104px 0 14px; }
.section-head h2 { font-size: clamp(30px, 4vw, 50px); margin: 0; line-height: 1.04; }
.section-sub { color: var(--ink-muted); font-size: 16.5px; margin: 12px 0 0; max-width: 660px; line-height: 1.65; }

/* Thin hairline divider utility. */
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- Hero -----------------------------------------------------------------*/
/* Quiet, almost-frameless hero: a barely-there hairline + a faint gold wash in
   one corner, letting the live WebGL backdrop carry the atmosphere. */
.store-hero {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    radial-gradient(760px 360px at 92% -40%, rgba(201,162,39,.10), transparent 62%),
    linear-gradient(180deg, rgba(16,21,33,.72), rgba(7,11,22,.62));
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  padding: 84px 60px; overflow: hidden;
}
@media (max-width: 640px) { .store-hero { padding: 52px 26px; } }
.store-hero h1, .hero-head {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(40px, 6.4vw, 76px); line-height: 1.0; margin: 0 0 22px;
  letter-spacing: -.022em;
}
/* The accent line is Fraunces ITALIC in warm gold — editorial, not neon. */
.store-hero h1 .grad, .hero-head .grad {
  font-style: italic; font-weight: 400;
  color: var(--gold2);
  -webkit-text-fill-color: var(--gold2);
  background: none;
}
.store-hero p.lead {
  font-family: var(--font-ui); color: var(--ink-muted);
  font-size: clamp(16px, 1.55vw, 19px); max-width: 620px; margin: 0 0 32px;
  line-height: 1.68;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-points {
  display: flex; gap: 14px 30px; flex-wrap: wrap; margin: 40px 0 0;
  color: var(--ink-muted); font-size: 12px; font-family: var(--font-mono);
  font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase;
}
.hero-points span { display: inline-flex; align-items: center; gap: 9px; }
.hero-points span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.12);
}

/* ---- Buttons (quiet-luxury; overrides style.css .btn) --------------------
   Primary = solid warm gold with ink text + a slow shimmer sweep on hover.
   Secondary = a calm hairline ghost. Motion is slow + GPU (transform/opacity). */
.store-main .btn, .store-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 700; font-size: 14.5px; letter-spacing: .2px;
  padding: 14px 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--grad-gold); color: #0a0a12; text-align: center;
  transition: transform .45s var(--ease-calm), box-shadow .45s var(--ease-calm);
  box-shadow: 0 4px 18px rgba(201,162,39,.16);
}
/* Slow diagonal shimmer that sweeps across on hover. */
.store-main .btn::after, .store-btn::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent);
  transform: skewX(-18deg); transition: left .9s var(--ease-calm); pointer-events: none;
}
.store-main .btn:hover, .store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201,162,39,.28); color: #0a0a12; text-decoration: none;
}
.store-main .btn:hover::after, .store-btn:hover::after { left: 130%; }
.store-main .btn.secondary, .store-btn.secondary {
  background: transparent; color: var(--ink); font-weight: 600;
  border: 1px solid var(--line-2); box-shadow: none;
}
.store-main .btn.secondary::after, .store-btn.secondary::after { display: none; }
.store-main .btn.secondary:hover, .store-btn.secondary:hover {
  border-color: var(--gold); color: var(--gold2); background: rgba(201,162,39,.05);
  box-shadow: none;
}
.store-main .btn.full { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Bundle grid (the 6 plans) -------------------------------------------*/
.bundle-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-top: 40px;
}
.bundle-card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 30px;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .55s var(--ease-calm), box-shadow .55s var(--ease-calm), border-color .55s var(--ease-calm);
}
/* Soft gold edge-glow that fades in on hover. A radial wash in the top-right
   corner gives the card a quiet "lit from within" feel (mirrors .cert-card). */
.bundle-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(280px 150px at 100% 0, rgba(201,162,39,.10), transparent 60%);
  opacity: 0; transition: opacity .55s var(--ease-calm); pointer-events: none; z-index: 0;
}
.bundle-card > * { position: relative; z-index: 1; }
.bundle-card:hover {
  border-color: var(--gold-hair);
  box-shadow: 0 26px 56px rgba(0,0,0,.46), 0 0 0 1px var(--gold-hair), 0 0 32px rgba(201,162,39,.08);
}
.bundle-card:hover::after { opacity: 1; }
/* Gentle lift + slight scale only when NOT being actively tilted (data-tilt
   sets an inline 3D transform on pointermove and clears it on leave, so this is
   the resting affordance + the touch/no-tilt fallback). */
.bundle-card:not([style*="rotate"]):hover { transform: translateY(-6px) scale(1.012); }
.bundle-card.primary {
  border-color: var(--gold-hair);
  box-shadow: 0 0 0 1px var(--gold-hair), 0 18px 44px rgba(0,0,0,.4);
}
.bundle-card .badge {
  position: absolute; top: -11px; left: 30px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase;
  background: var(--bg-2); color: var(--gold2);
  border: 1px solid var(--gold-hair);
  padding: 5px 13px; border-radius: 999px;
}
.bundle-card h3 { font-family: var(--font-display); font-weight: 900; font-size: 24px; margin: 6px 0 14px; letter-spacing: -.01em; }
.bundle-card .price { font-family: var(--font-mono); font-size: 36px; font-weight: 500; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.bundle-card .price .per { font-size: 14px; color: var(--ink-muted); font-weight: 400; }
.bundle-card .save {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  color: #8fcaa6; margin-top: 10px; letter-spacing: .3px;
}
.bundle-card .desc { color: var(--ink-muted); font-size: 14.5px; margin: 16px 0 22px; flex: 1; line-height: 1.62; }
.bundle-card form { margin: 0; }

/* ---- Cert picker (CSP-safe: classes replace the old inline styles) -------*/
.cert-picker {
  border: 1px solid var(--line); border-radius: var(--r-md);
  margin: 0 0 16px; background: var(--bg-2);
}
.cert-picker > summary {
  cursor: pointer; padding: 13px 16px; list-style: none;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--gold2);
}
.cert-picker > summary::-webkit-details-marker { display: none; }
.cert-picker[open] > summary { border-bottom: 1px solid var(--line); }
.picker-body { padding: 12px 16px 16px; max-height: 320px; overflow-y: auto; }
.picker-tier {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--gold2); margin: 14px 0 6px;
}
.picker-tier:first-child { margin-top: 2px; }
.picker-opt {
  display: flex; gap: 10px; align-items: flex-start; margin: 0 0 6px;
  font-weight: 500; color: var(--ink); cursor: pointer; line-height: 1.4;
}
.picker-opt input { margin-top: 3px; accent-color: var(--gold); }
.picker-opt .pname { color: var(--ink-muted); font-weight: 400; }
.picker-help { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ---- GLOWING "Choose your certification" (Marjorie's fix) -----------------
   The choose-your-own plans (SINGLE/SPECIALTY/MASTERY) MUST signal that a pick
   is required. A tasteful pulsing gold glow + a clear "pick here" cue draw the
   eye without going garish (quiet-luxury: low-opacity gold, slow breathing). */

/* The little "Choose your N certifications below" required hint above the box. */
.pick-required {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 9px; font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: var(--gold2); letter-spacing: .01em;
}
.pick-required-dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px;
  background: var(--gold2); box-shadow: 0 0 0 0 rgba(232,184,75,.55);
  animation: smbx-pick-dot 2.4s var(--ease-calm) infinite;
}
@keyframes smbx-pick-dot {
  0%   { box-shadow: 0 0 0 0 rgba(232,184,75,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(232,184,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,184,75,0); }
}

/* The picker itself, when it carries .glow: a slow breathing gold halo + a
   warmer summary so the "open me" affordance reads at a glance. */
.cert-picker.glow {
  border-color: var(--gold-hair);
  animation: smbx-pick-glow 3.2s var(--ease-calm) infinite;
}
@keyframes smbx-pick-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(201,162,39,.18), 0 0 0 0 rgba(201,162,39,0);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(201,162,39,.4), 0 0 22px 2px rgba(201,162,39,.16);
  }
}
/* Stop the breathing once it's open (the buyer is engaged) — keep a calm ring. */
.cert-picker.glow[open] {
  animation: none;
  box-shadow: 0 0 0 1px rgba(201,162,39,.28);
}

/* Summary as a row: caret icon + label + a glowing "pick here" pill on the right. */
.cert-picker.glow > summary {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(201,162,39,.06), rgba(201,162,39,.02));
}
.cert-picker.glow > summary:hover { color: var(--gold2); }
.cp-sum-icon {
  flex: 0 0 auto; color: var(--gold2); font-size: 12px; line-height: 1;
  transition: transform .35s var(--ease-calm);
}
.cert-picker.glow[open] > summary .cp-sum-icon { transform: rotate(90deg); }
.cp-sum-text { flex: 1 1 auto; }
.cp-sum-cue {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #0a0805; background: var(--grad-gold, linear-gradient(100deg, var(--gold2), var(--gold)));
  padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(232,184,75,.5);
  animation: smbx-pick-cue 2.4s var(--ease-calm) infinite;
}
.cert-picker.glow[open] > summary .cp-sum-cue { animation: none; opacity: .7; }
@keyframes smbx-pick-cue {
  0%   { box-shadow: 0 0 0 0 rgba(232,184,75,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(232,184,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,184,75,0); }
}

/* ERROR pulse: the client-side count guard (cart.js) adds .is-error to flash the
   picker red-gold when the buyer tries to add without the right count. */
.cert-picker.is-error {
  animation: smbx-pick-error .9s var(--ease-calm) 1;
  border-color: var(--gold);
}
@keyframes smbx-pick-error {
  0%   { box-shadow: 0 0 0 0 rgba(224,106,106,.55); }
  40%  { box-shadow: 0 0 0 5px rgba(224,106,106,.18), 0 0 26px 3px rgba(201,162,39,.28); }
  100% { box-shadow: 0 0 0 1px rgba(201,162,39,.3); }
}

/* The picker plan cards get a subtly warmer resting border so the whole card
   reads as "interactive / action needed", without shouting over the primary. */
.bundle-card.needs-pick { border-color: var(--gold-hair); }

@media (prefers-reduced-motion: reduce) {
  .pick-required-dot, .cert-picker.glow, .cp-sum-cue, .cert-picker.is-error {
    animation: none;
  }
  .cert-picker.glow { box-shadow: 0 0 0 1px rgba(201,162,39,.3); }
  .cp-sum-cue { box-shadow: none; }
}

/* ---- Tier filter (the 33-card "wall" fatigue fix) ------------------------
   Calm pill chips. The active chip carries .is-active (set by store-fx.js, and
   pre-set on Flagship in markup). Quiet gold fill on the active pill only. */
.tier-filter {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 30px 0 8px;
}
.tier-chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-muted); cursor: pointer;
  background: rgba(255,255,255,.015);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px;
  transition: color .4s var(--ease-calm), border-color .4s var(--ease-calm), background .4s var(--ease-calm);
}
.tier-chip .chip-n {
  font-size: 10px; color: var(--ink-muted);
  border-left: 1px solid var(--line); padding-left: 9px; opacity: .8;
  transition: color .4s var(--ease-calm), border-color .4s var(--ease-calm);
}
.tier-chip:hover { color: var(--ink); border-color: var(--line-2); }
.tier-chip.is-active {
  color: var(--gold2); border-color: var(--gold-hair);
  background: rgba(201,162,39,.07);
}
.tier-chip.is-active .chip-n { color: var(--gold2); border-left-color: var(--gold-hair); opacity: 1; }

/* ---- 33-cert catalog ------------------------------------------------------*/
.tier-block {
  margin-top: 44px;
  transition: opacity .5s var(--ease-calm);
}
/* Hidden tiers are removed from flow (display:none) so the page collapses to a
   calm height — but the cards stay in the DOM, so deep links + buy forms work. */
.tier-block.is-hidden { display: none; }
.tier-title {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--font-display); font-weight: 900; font-size: 27px;
  letter-spacing: -.01em; margin: 0 0 6px;
}
.tier-count {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase;
}
.tier-note { color: var(--ink-muted); font-size: 14.5px; margin: 0 0 26px; line-height: 1.6; }

.cert-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}
.cert-card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 26px 24px; overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .5s var(--ease-calm), box-shadow .5s var(--ease-calm), border-color .5s var(--ease-calm);
}
.cert-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(240px 130px at 100% 0, rgba(201,162,39,.08), transparent 60%);
  opacity: 0; transition: opacity .5s var(--ease-calm); pointer-events: none;
}
.cert-card:hover {
  border-color: var(--gold-hair);
  box-shadow: 0 20px 48px rgba(0,0,0,.46), 0 0 0 1px var(--gold-hair), 0 0 28px rgba(201,162,39,.07);
}
.cert-card:not([style*="rotate"]):hover { transform: translateY(-6px) scale(1.014); }
.cert-card:hover::after { opacity: 1; }
.cert-card.flagship { border-color: var(--gold-hair); }
.cert-link { display: block; color: inherit; }
.cert-link:hover { text-decoration: none; color: inherit; }
.cert-code {
  font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: -.02em;
  color: var(--ink); line-height: 1; margin-bottom: 10px;
}
.cert-card:hover .cert-code { color: var(--gold2); }
.cert-name { color: var(--ink-muted); font-size: 14px; min-height: 40px; line-height: 1.5; }
/* Tier pills: muted neutral hairlines across the board, with gold reserved for
   flagship only — keeps the single-accent discipline (no rainbow tiers). */
.cert-tier-pill {
  display: inline-block; margin-top: 14px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-muted);
}
.cert-tier-pill.flagship { background: rgba(201,162,39,.08); border-color: var(--gold-hair); color: var(--gold2); }
.cert-tier-pill.core     { background: transparent; border-color: var(--line-2); color: var(--ink-muted); }
.cert-tier-pill.specialty{ background: transparent; border-color: var(--line); color: var(--ink-muted); }
.cert-card .cert-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; row-gap: 10px;
  gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
}
/* The "Stress-tested ✓" cue sits on its own row beneath the View/Add controls
   on narrow cards (wraps cleanly), and stays inline on roomy ones. */
.cert-card .cert-foot .blurb-cue { flex: 0 0 auto; }
.cert-card .cert-foot form { margin: 0; }
.cert-price { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.cert-price b { color: var(--gold2); font-size: 15px; }
/* Quiet ghost buy button — the catalog stays calm; the gold fill is reserved
   for the primary plan CTAs. Fills with gold only on hover. */
.mini-btn {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 9px 15px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); white-space: nowrap;
  transition: color .4s var(--ease-calm), background .4s var(--ease-calm), border-color .4s var(--ease-calm);
}
.mini-btn:hover { background: var(--grad-gold); border-color: transparent; color: #0a0a12; text-decoration: none; }

/* "Coming soon" disabled affordance — catalog mini button, product-page button,
   and the choose-your-own picker option. Looks intentionally inert (not a hover). */
.mini-btn.soon, .btn.full.soon, .btn.soon[disabled] {
  opacity: .5; cursor: not-allowed; filter: grayscale(.4);
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); color: var(--ink-muted);
}
.mini-btn.soon:hover, .btn.soon[disabled]:hover { background: rgba(255,255,255,.04); color: var(--ink-muted); transform: none; box-shadow: none; }
.picker-opt.soon { opacity: .55; }
.picker-opt.soon input { cursor: not-allowed; }
.view-link {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--gold2);
  white-space: nowrap; transition: color .3s var(--ease-calm);
}
.view-link:hover { color: var(--gold); text-decoration: none; }

/* ---- Product page ---------------------------------------------------------*/
.crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); margin: 0 0 22px; letter-spacing: .3px; }
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--gold2); text-decoration: none; }

.pd-hero {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    radial-gradient(680px 320px at 92% -38%, rgba(201,162,39,.10), transparent 62%),
    linear-gradient(180deg, rgba(16,21,33,.72), rgba(7,11,22,.62));
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  padding: 72px 56px;
}
@media (max-width: 640px) { .pd-hero { padding: 48px 26px; } }
.pd-code { font-family: var(--font-display); font-weight: 900; font-size: clamp(52px, 9vw, 104px); line-height: .9; letter-spacing: -.03em; margin: 14px 0 8px; }
.pd-code .grad { color: var(--gold2); -webkit-text-fill-color: var(--gold2); background: none; font-style: italic; font-weight: 400; }
.pd-fullname { font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 2.8vw, 32px); color: var(--ink); letter-spacing: -.01em; margin: 0 0 20px; }
.pd-lead { color: var(--ink-muted); font-size: 17px; max-width: 660px; margin: 0 0 30px; line-height: 1.68; }

.pd-layout { display: grid; gap: 34px; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); margin-top: 52px; align-items: start; }
@media (max-width: 860px) { .pd-layout { grid-template-columns: 1fr; } }

.pd-panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px;
  will-change: transform;
  transition: transform .55s var(--ease-calm), box-shadow .55s var(--ease-calm), border-color .55s var(--ease-calm);
}
/* Quiet hover on the big content panels: a soft gold edge + faint lift, no
   scale (these are large blocks — keep it restrained, not springy). */
.pd-panel:hover {
  border-color: var(--gold-hair); transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0,0,0,.42), 0 0 0 1px var(--gold-hair);
}
.pd-panel + .pd-panel { margin-top: 24px; }
.pd-panel h2 { font-size: 24px; margin: 0 0 6px; }
.pd-panel h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 22px 0 4px; color: var(--ink); }
.pd-panel h3.flush { margin-top: 0; }

.feature-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.feature-list li {
  position: relative; padding: 16px 18px 16px 50px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2);
  transition: border-color .25s ease, transform .25s ease;
}
.feature-list li:hover { border-color: rgba(201,162,39,.4); transform: translateX(3px); }
.feature-list li::before {
  content: "✦"; position: absolute; left: 18px; top: 16px;
  color: var(--gold2); font-size: 15px;
}
.feature-list li b { color: var(--ink); font-family: var(--font-ui); }
.feature-list li .ft-d { display: block; color: var(--ink-muted); font-size: 14px; margin-top: 3px; }
.feature-list li.headline { border-color: rgba(201,162,39,.5); background: rgba(201,162,39,.06); }

.pd-aside { position: sticky; top: 92px; display: grid; gap: 20px; }
.buy-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(201,162,39,.45); border-radius: var(--r-lg); padding: 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  transform-style: preserve-3d; will-change: transform;
  transition: transform .55s var(--ease-calm), box-shadow .55s var(--ease-calm), border-color .55s var(--ease-calm);
}
/* The conversion panel gets the full WebForge treatment: warmer gold edge +
   glow on hover; a subtle 3D tilt (data-tilt) owns the inline transform on
   pointermove, so the lift below is the resting / no-tilt affordance. */
.buy-card:hover {
  border-color: var(--gold); box-shadow: 0 24px 54px rgba(0,0,0,.5), 0 0 0 1px var(--gold-hair), 0 0 36px rgba(201,162,39,.12);
}
.buy-card:not([style*="rotate"]):hover { transform: translateY(-4px); }
.buy-card .price-big { font-family: var(--font-mono); font-size: 44px; font-weight: 500; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.buy-card .price-sub { color: var(--ink-muted); font-size: 13px; margin: 6px 0 18px; }
.buy-card form { margin: 0 0 12px; }
.buy-card .alt-buy { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.buy-card .alt-buy p { font-size: 13px; color: var(--ink-muted); margin: 0 0 10px; }
.trust-line { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.trust-line.spaced { margin-top: 40px; }

.price-table { list-style: none; padding: 0; margin: 16px 0 0; }
.price-table li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.price-table li:last-child { border-bottom: 0; }
.price-table .pt-name { color: var(--ink); }
.price-table .pt-name .pt-d { display: block; color: var(--ink-muted); font-size: 13px; }
.price-table .pt-price { font-family: var(--font-mono); color: var(--gold2); font-weight: 700; white-space: nowrap; }
.price-table li.best .pt-name b::after {
  content: "Best for this cert"; display: inline-block; margin-left: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; text-transform: uppercase;
  color: #0a0a12; background: var(--grad-gold); padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}

.related-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 18px; }
.related-card {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px;
  background: var(--bg-2); color: inherit; display: block;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .5s var(--ease-calm), border-color .5s var(--ease-calm), box-shadow .5s var(--ease-calm);
}
.related-card:hover { border-color: var(--gold-hair); box-shadow: 0 16px 34px rgba(0,0,0,.46), 0 0 0 1px var(--gold-hair); text-decoration: none; color: inherit; }
/* Lift + slight scale only when not actively tilted (data-tilt owns the inline
   3D transform on pointermove). */
.related-card:not([style*="rotate"]):hover { transform: translateY(-4px) scale(1.015); }
.related-card .rc-code { font-family: var(--font-display); font-weight: 900; font-size: 19px; letter-spacing: -.01em; color: var(--ink); }
.related-card:hover .rc-code { color: var(--gold2); }
.related-card .rc-name { color: var(--ink-muted); font-size: 12.5px; margin-top: 3px; }

/* ---- Notice (brand-tuned over style.css) ---------------------------------*/
.store-main .notice { border-radius: var(--r-md); font-family: var(--font-ui); }

/* ===========================================================================
   SCROLL REVEAL
   .reveal starts faded + nudged down; store-fx.js adds .in (via an
   IntersectionObserver) to play a slow, calm fade-up. A light nth-child stagger
   makes grids cascade. Under prefers-reduced-motion (or JS off + the no-JS
   safety net below) everything is shown instantly.
   =========================================================================== */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--rev-dur) var(--ease-calm), transform var(--rev-dur) var(--ease-calm);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Per-item stagger inside grids/lists (kept short so it never feels slow). */
.bundle-grid .reveal:nth-child(2)  { transition-delay: .06s; }
.bundle-grid .reveal:nth-child(3)  { transition-delay: .12s; }
.bundle-grid .reveal:nth-child(4)  { transition-delay: .18s; }
.bundle-grid .reveal:nth-child(5)  { transition-delay: .24s; }
.bundle-grid .reveal:nth-child(6)  { transition-delay: .30s; }
.cert-grid .reveal:nth-child(2)    { transition-delay: .05s; }
.cert-grid .reveal:nth-child(3)    { transition-delay: .10s; }
.cert-grid .reveal:nth-child(4)    { transition-delay: .15s; }

/* Hero headline: word-by-word fade-up (each .word is a .reveal). */
.hero-head .word {
  display: inline-block;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease-calm), transform .7s var(--ease-calm);
}
.hero-head .word.in { opacity: 1; transform: none; }
.hero-head .word:nth-child(1) { transition-delay: .02s; }
.hero-head .word:nth-child(2) { transition-delay: .09s; }
.hero-head .word:nth-child(3) { transition-delay: .16s; }
.hero-head .word:nth-child(4) { transition-delay: .23s; }
/* second line (after the <br>) continues the cascade */
.hero-head .word:nth-child(6) { transition-delay: .32s; }
.hero-head .word:nth-child(7) { transition-delay: .39s; }
.hero-head .word:nth-child(8) { transition-delay: .46s; }
.hero-head .word:nth-child(9) { transition-delay: .53s; }

/* No-JS / no-IntersectionObserver safety net: if .in is never added, still show
   content. (store-fx.js adds .in immediately under reduced motion too.) */
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-head .word { opacity: 1; transform: none; transition: none; }
}
/* If scripting is disabled, store-fx.js can't add .in — never hide content. */
@media (scripting: none) {
  .reveal, .hero-head .word { opacity: 1 !important; transform: none !important; }
}

/* ---- Reduced motion -------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  .bundle-card, .cert-card, .related-card, .pd-panel, .buy-card, .feature-list li,
  .tier-chip, .tier-block, .store-cta .store-btn,
  .store-main .btn, .store-btn, .mini-btn, .view-link, .fx-bg { transition: none; animation: none; }
  .bundle-card:hover, .cert-card:hover, .related-card:hover, .pd-panel:hover, .buy-card:hover,
  .feature-list li:hover, .store-cta .store-btn:hover,
  .store-main .btn:hover, .store-btn:hover, .mini-btn:hover {
    transform: none;
  }
  .store-main .btn::after, .store-btn::after { display: none; }
}

/* ===========================================================================
   AI-SKILLED MASTERY LOCKUP + POSITIONING STRIP
   The brand-defining pairing: every AAPC cert is shown WITH its glowing
   "✦ SMBX AI-Skilled <CODE> Mastery" rail. "SMBX" glows; "AI-Skilled" is a
   gold→cyan gradient. Rendered via smbx_ai_lockup() (lib/certs.php). CSP-safe:
   class-driven only — no inline styles (commerce CSP is style-src 'self').
   =========================================================================== */
.ai-lockup{display:inline-flex;align-items:baseline;gap:.32em;font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.7em;letter-spacing:.04em;white-space:nowrap;line-height:1.1;vertical-align:middle}
.ai-lockup .alx-smbx{font-weight:800;color:#ffe9a8;text-shadow:0 0 6px rgba(232,199,90,.6);animation:alxglow 2.6s ease-in-out infinite}
@keyframes alxglow{0%,100%{text-shadow:0 0 6px rgba(232,199,90,.5)}50%{text-shadow:0 0 14px rgba(232,199,90,.95),0 0 3px rgba(255,243,196,.8)}}
.ai-lockup .alx-ai{font-weight:700;background:linear-gradient(90deg,#e8c75a,#56d4dd);-webkit-background-clip:text;background-clip:text;color:transparent}
.ai-lockup .alx-m{color:#a8a4bd;font-weight:600}
@media(prefers-reduced-motion:reduce){.ai-lockup .alx-smbx{animation:none}}
.ai-strip{margin:14px 0;padding:13px 18px;border:1px solid rgba(86,212,221,.25);border-radius:12px;background:linear-gradient(90deg,rgba(201,162,39,.08),rgba(86,212,221,.06));font-size:14px}
.ai-strip b{color:#ffe9a8}

/* --- Helper classes layered on the lockup (store.css only, still class-only) --- */
/* The "rail" line under a cert name in a card: a thin gold/cyan hairline lead-in
   so the lockup reads as the paired companion to the credential above it. */
.ai-rail{display:flex;align-items:center;gap:9px;margin:9px 0 2px}
.ai-rail::before{content:"";flex:0 0 auto;width:14px;height:1px;background:linear-gradient(90deg,var(--gold2),#56d4dd)}
.ai-rail .ai-lockup{font-size:12.5px}
/* Catalog cards live inside <a class="cert-link"> (inherits muted link colour) —
   pin the lockup parts back to their brand colours so the gradient/glow survive. */
.cert-link .ai-rail .alx-smbx{color:#ffe9a8}
.cert-link .ai-rail .alx-m{color:#a8a4bd}
/* Bundle-card lockups: one rail per covered cert, or a single generic rail. */
.ai-rail-group{margin:2px 0 16px;display:grid;gap:5px}
.ai-rail-group .ai-rail{margin:0}
.ai-rail.generic .ai-lockup{font-style:normal}

/* Product hero lockup — a touch larger, centred under the full cert name. */
.pd-ai-rail{display:inline-flex;align-items:center;gap:11px;margin:0 0 26px}
.pd-ai-rail::before{content:"";width:22px;height:1px;background:linear-gradient(90deg,var(--gold2),#56d4dd)}
.pd-ai-rail .ai-lockup{font-size:17px}

/* The "What's inside" AI-Skilled rail — the industry-first differentiator, lifted
   out of the plain feature list into a glowing gold→cyan hero block. */
.ai-feature{
  position:relative;margin:0 0 16px;padding:22px 24px;
  border:1px solid rgba(86,212,221,.4);border-radius:var(--r-lg);
  background:linear-gradient(135deg,rgba(201,162,39,.10),rgba(86,212,221,.08));
  box-shadow:0 0 0 1px rgba(86,212,221,.12),0 14px 38px rgba(0,0,0,.4);
  overflow:hidden;
}
.ai-feature::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(280px 150px at 100% 0,rgba(86,212,221,.14),transparent 62%);
}
.ai-feature .aif-flag{
  display:inline-block;margin:0 0 10px;font-family:var(--font-mono);
  font-size:10px;font-weight:600;letter-spacing:1.6px;text-transform:uppercase;
  color:#0a0a12;background:linear-gradient(90deg,#e8c75a,#56d4dd);
  padding:3px 10px;border-radius:999px;
}
.ai-feature .aif-lockup{display:block;margin:0 0 8px}
.ai-feature .aif-lockup .ai-lockup{font-size:18px}
.ai-feature .aif-title{display:block;font-family:var(--font-ui);font-weight:800;font-size:17px;color:var(--ink);margin:0 0 6px}
.ai-feature .aif-d{display:block;color:var(--ink-soft);font-size:14.5px;line-height:1.62}
.ai-feature .aif-split{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 0}
.ai-feature .aif-chip{
  font-family:var(--font-mono);font-size:11.5px;letter-spacing:.3px;color:var(--ink);
  border:1px solid rgba(86,212,221,.35);border-radius:999px;padding:7px 13px;
  background:rgba(86,212,221,.06);
}
.ai-feature .aif-chip b{color:#56d4dd;font-weight:700}
@media (prefers-reduced-motion: reduce){
  .ai-feature{transition:none}
}

/* =============================================================================
   ADD-TO-CART TOAST  (driven by assets/cart.js — CSP-safe, class-only)
   -----------------------------------------------------------------------------
   A gold-glass toast that confirms a PRG add (?added) or reports a failure
   (?addfail). Anchored bottom-centre, ABOVE the mobile app-dock (var --dock-h is
   set by app-dock.css; the fallback keeps it correct on pages without the dock /
   on desktop). Entrance + exit are GPU transforms; prefers-reduced-motion drops
   the motion to a simple opacity fade. role/aria + dismiss wiring live in cart.js.
   ============================================================================= */
.app-toast-host{
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--dock-h, 64px) + env(safe-area-inset-bottom) + 12px);
  z-index: 60; width: min(440px, calc(100vw - 28px));
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; /* host is click-through; toasts re-enable it */
}
.app-toast{
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 13px;
  padding: 14px 14px 14px 16px; border-radius: 14px;
  font-family: var(--font-ui); color: var(--ink);
  background: linear-gradient(180deg, rgba(18,23,35,.96), rgba(10,14,24,.96));
  border: 1px solid var(--gold-hair);
  box-shadow: 0 18px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(201,162,39,.16), 0 0 30px rgba(201,162,39,.10);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  /* resting (hidden) state: nudged down + faded; cart.js adds .is-in / .is-out */
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .42s var(--ease-calm), transform .42s var(--ease-calm);
  will-change: opacity, transform;
}
.app-toast.is-in{ opacity: 1; transform: none; }
.app-toast.is-out{ opacity: 0; transform: translateY(10px) scale(.98); }

/* Status dot/glyph — gold for success, warm red for error. */
.app-toast-ico{
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  position: relative; display: inline-block;
  background: radial-gradient(circle at 38% 34%, var(--gold2), var(--gold) 60%, #5a4410 100%);
  box-shadow: 0 0 0 4px rgba(201,162,39,.14);
}
.app-toast-ico::after{
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #0a0805; line-height: 1;
}
.app-toast--error .app-toast-ico{
  background: radial-gradient(circle at 38% 34%, #f08a88, #d8504e 60%, #5c1715 100%);
  box-shadow: 0 0 0 4px rgba(216,80,78,.16);
}
.app-toast--error .app-toast-ico::after{ content: "!"; color: #1a0606; }

.app-toast-body{ flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding-top: 1px; }
.app-toast-msg{ font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.app-toast-action{
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: #0a0805; background: var(--grad-gold);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  transition: transform .25s var(--ease-calm), box-shadow .25s var(--ease-calm);
  box-shadow: 0 4px 14px rgba(201,162,39,.3);
}
.app-toast-action:hover{ transform: translateY(-1px); box-shadow: 0 8px 20px rgba(241,204,94,.4); color: #0a0805; text-decoration: none; }
.app-toast--error .app-toast-action{
  background: transparent; color: var(--gold2); border: 1px solid var(--gold-hair); box-shadow: none;
}
.app-toast--error .app-toast-action:hover{ background: var(--gold); color: #0a0805; border-color: var(--gold); }

.app-toast-close{
  flex: 0 0 auto; width: 26px; height: 26px; margin: -2px -2px 0 0;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--ink-muted); font-size: 19px; line-height: 1;
  transition: color .2s ease, background .2s ease;
}
.app-toast-close:hover{ color: var(--ink); background: rgba(243,236,218,.07); }

@media (prefers-reduced-motion: reduce){
  .app-toast{ transition: opacity .2s linear; transform: none; }
  .app-toast.is-in{ transform: none; }
  .app-toast.is-out{ transform: none; }
  .app-toast-action{ transition: none; }
}

/* Cart-badge pop — cart.js toggles .bump on .store-cart-count after an add. */
@keyframes smbx-badge-bump{
  0%{ transform: scale(1); }
  35%{ transform: scale(1.42); }
  60%{ transform: scale(.92); }
  100%{ transform: scale(1); }
}
.store-cart-count.bump{
  animation: smbx-badge-bump .5s var(--ease-calm) 1;
  box-shadow: 0 0 0 4px rgba(201,162,39,.16);
}
@media (prefers-reduced-motion: reduce){
  .store-cart-count.bump{ animation: none; }
}

/* =============================================================================
   TWO-VOLUME SPC™ / AI-SPC™ BOOK COVERS  (ported from store/evolution.html)
   -----------------------------------------------------------------------------
   These rules render the paired book set built by assets/books.js into every
   <div class="smbx-books"> host. Copied VERBATIM from the evolution store (rule
   names unchanged) so the commerce store matches it exactly. The book-specific
   CSS variables (obsidian/bone/foil + the evolution gold + book-local serif/
   sans/mono stacks) are SCOPED to the .smbx-books container so the books render
   identically WITHOUT overriding the store's global :root tokens. CSP-safe: this
   is an external 'self' sheet; no inline styles are added to the PHP templates.
   ============================================================================= */
.smbx-books{
  /* obsidian/bone/foil + the evolution accents the book rules below reference */
  --obsidian:#0d1017;--obsidian-2:#070a0f;--bone:#f7f2e8;
  --gold:#c2a04e;--gold-soft:#d8be7e;
  --foil:linear-gradient(135deg,#9c7327 0%,#e6c878 22%,#f6e7af 42%,#c69f4d 60%,#f3dd96 78%,#8f6a22 100%);
  /* book-local type stacks (match evolution.html's --serif/--sans/--mono) */
  --serif:'Fraunces',Georgia,serif;--sans:'Manrope','Jost',sans-serif;--mono:'JetBrains Mono',monospace;
  display:flex;justify-content:center;width:100%;
}

/* ── PAIR ── */
.smbx-books .pair-wrap{position:relative;perspective:2000px;display:flex;align-items:flex-end;gap:0}
.smbx-books .seal{position:absolute;top:-30px;left:50%;transform:translateX(-50%);z-index:8;font-family:var(--mono);font-size:9px;letter-spacing:.16em;text-transform:uppercase;background:#0d1017;border:1px solid rgba(214,190,126,.5);color:var(--gold-soft);padding:6px 15px;border-radius:2px;white-space:nowrap;box-shadow:0 10px 30px rgba(0,0,0,.5)}
.smbx-books .seal b{background:var(--foil);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:700}

.smbx-books .bk{position:relative;transform-style:preserve-3d;transition:transform .9s cubic-bezier(.2,.85,.25,1);will-change:transform}
.smbx-books .bk>div{position:absolute;border-radius:2px 5px 5px 2px}
.smbx-books .bk.spc{--cloth:#2a3450;z-index:4}
.smbx-books .bk.ai{z-index:3}
/* hero sizes */
.smbx-books .pair-wrap.hero .bk{--W:248px;--H:362px;--T:40px;width:var(--W);height:var(--H)}
.smbx-books .pair-wrap.hero .bk.spc{transform:rotateY(-22deg) translateX(34px)}
.smbx-books .pair-wrap.hero .bk.ai{transform:rotateY(-22deg) translateX(-34px);margin-left:-58px}
.smbx-books .pair-wrap.hero:hover .bk.spc{transform:rotateY(-10deg) translateX(0) translateY(-10px)}
.smbx-books .pair-wrap.hero:hover .bk.ai{transform:rotateY(-10deg) translateX(0) translateY(-10px);margin-left:22px}

.smbx-books .cf,.smbx-books .cb{width:var(--W);height:var(--H);top:0;left:0}
.smbx-books .cf{transform:translateZ(calc(var(--T)/2));overflow:hidden;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.06),-22px 30px 64px rgba(0,0,0,.5)}
.smbx-books .bk.spc .cf{background:linear-gradient(135deg,rgba(255,255,255,.07),transparent 42%),var(--cloth)}
.smbx-books .bk.spc .cb{background:var(--cloth);filter:brightness(.7)}
.smbx-books .bk.ai .cf{background:var(--obsidian)}
.smbx-books .bk.ai .cb{background:var(--obsidian-2)}
.smbx-books .cf canvas{position:absolute;inset:0;z-index:1;display:block}
.smbx-books .cf .neu{position:absolute;inset:0;z-index:1;opacity:.45}
.smbx-books .cf .neu svg{width:100%;height:100%}
.smbx-books .cf .veil{position:absolute;inset:0;z-index:2;pointer-events:none;background:radial-gradient(90% 70% at 50% 38%,transparent,rgba(8,10,15,.5)),linear-gradient(180deg,rgba(8,10,15,.3),transparent 30%,transparent 66%,rgba(8,10,15,.5))}
.smbx-books .bk.spc .cf .veil{background:radial-gradient(95% 75% at 50% 40%,transparent,rgba(0,0,0,.28))}
.smbx-books .sp{width:var(--T);height:var(--H);left:0;top:0;transform-origin:left center;transform:rotateY(-90deg) translateX(calc(var(--T)/-2));z-index:3;
  display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:22px 0}
.smbx-books .bk.spc .sp{background:linear-gradient(90deg,rgba(0,0,0,.42),rgba(0,0,0,.05) 30%,rgba(0,0,0,.36)),var(--cloth);box-shadow:inset 0 0 0 1px rgba(0,0,0,.32)}
.smbx-books .bk.ai .sp{background:linear-gradient(90deg,rgba(0,0,0,.55),rgba(120,95,40,.1) 32%,rgba(0,0,0,.45)),var(--obsidian);box-shadow:inset 0 0 0 1px rgba(0,0,0,.45),inset 1px 0 0 rgba(214,190,126,.12)}
.smbx-books .sp .smono{font-family:var(--mono);font-weight:700;font-size:9px;letter-spacing:.18em;background:var(--foil);-webkit-background-clip:text;background-clip:text;color:transparent}
.smbx-books .sp .scode{font-family:var(--mono);font-weight:700;font-size:12px;letter-spacing:.1em;writing-mode:vertical-rl;transform:rotate(180deg);background:var(--foil);-webkit-background-clip:text;background-clip:text;color:transparent}
.smbx-books .sp .sdot{width:5px;height:5px;border:1px solid var(--gold-soft);transform:rotate(45deg)}
.smbx-books .pg{width:calc(var(--T) - 6px);height:calc(var(--H) - 14px);top:7px;right:-1px;transform-origin:right center;transform:rotateY(90deg) translateX(calc(var(--T)/2 - 3px));background:repeating-linear-gradient(0deg,#e6c878 0 1px,#b8893b 1px 2.5px)}

.smbx-books .art{position:absolute;inset:0;z-index:4;padding:30px 26px 24px;display:flex;flex-direction:column;align-items:center;text-align:center;pointer-events:none}
.smbx-books .frame{position:absolute;inset:15px;border:1px solid rgba(214,190,126,.46);z-index:3}
.smbx-books .frame::before{content:"";position:absolute;inset:5px;border:.5px solid rgba(214,190,126,.22)}
.smbx-books .a-mono{font-family:var(--mono);font-weight:700;font-size:9.5px;letter-spacing:.36em;background:var(--foil);-webkit-background-clip:text;background-clip:text;color:transparent}
.smbx-books .a-tab{margin-top:13px;font-family:var(--sans);font-weight:600;font-size:8px;letter-spacing:.26em;text-transform:uppercase;color:var(--gold-soft);border:.5px solid rgba(214,190,126,.45);padding:4px 11px;border-radius:1px;background:rgba(214,190,126,.07)}
.smbx-books .a-vol{margin-top:18px;font-family:var(--mono);font-size:8px;letter-spacing:.2em;color:rgba(247,242,232,.55)}
.smbx-books .a-mark{margin-top:5px;font-family:var(--mono);font-weight:700;font-size:42px;line-height:1;letter-spacing:.01em;filter:drop-shadow(0 1px 0 rgba(0,0,0,.4))}
.smbx-books .a-mark.gold{background:var(--foil);-webkit-background-clip:text;background-clip:text;color:transparent}
.smbx-books .a-mark sup{font-size:13px;vertical-align:super;-webkit-text-fill-color:rgba(247,242,232,.7)}
.smbx-books .a-orn{margin:13px 0 11px;display:flex;align-items:center;gap:8px}
.smbx-books .a-orn i{width:28px;height:1px;background:rgba(214,190,126,.5)}.smbx-books .a-orn span{width:5px;height:5px;border:1px solid var(--gold-soft);transform:rotate(45deg)}
.smbx-books .a-title{font-family:var(--serif);font-weight:400;font-style:italic;font-size:18px;line-height:1.25;color:var(--bone);padding:0 4px}
.smbx-books .a-sub{margin-top:11px;font-family:var(--sans);font-weight:300;font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--gold-soft)}
.smbx-books .a-foot{margin-top:auto;display:flex;flex-direction:column;gap:4px;align-items:center}
.smbx-books .a-foot .std{font-family:var(--serif);font-style:italic;font-size:11.5px;color:rgba(247,242,232,.78)}
.smbx-books .a-foot .by{font-family:var(--sans);font-weight:500;font-size:7.5px;letter-spacing:.24em;text-transform:uppercase;color:rgba(247,242,232,.45)}

/* ── mini sizes (catalog cards) ── */
.smbx-books .pair-wrap.mini{height:230px;width:100%;justify-content:center;perspective:1600px}
.smbx-books .pair-wrap.mini .bk{--W:132px;--H:192px;--T:24px;width:var(--W);height:var(--H)}
.smbx-books .pair-wrap.mini .bk.spc{transform:rotateY(-23deg) translateX(18px)}
.smbx-books .pair-wrap.mini .bk.ai{transform:rotateY(-23deg) translateX(-18px);margin-left:-38px}
.smbx-books .pair-wrap.mini:hover .bk.spc{transform:rotateY(-9deg) translateX(0) translateY(-10px)}
.smbx-books .pair-wrap.mini:hover .bk.ai{transform:rotateY(-9deg) translateX(0) translateY(-10px);margin-left:12px}
.smbx-books .pair-wrap.mini .art{padding:16px 13px 12px}
.smbx-books .pair-wrap.mini .frame{inset:9px}
.smbx-books .pair-wrap.mini .a-mono{font-size:7px;letter-spacing:.28em}
.smbx-books .pair-wrap.mini .a-tab{margin-top:7px;font-size:6px;padding:2px 7px;letter-spacing:.2em}
.smbx-books .pair-wrap.mini .a-vol{margin-top:11px;font-size:6.5px}
.smbx-books .pair-wrap.mini .a-mark{font-size:23px}.smbx-books .pair-wrap.mini .a-mark sup{font-size:8px}
.smbx-books .pair-wrap.mini .a-orn{margin:7px 0 6px}.smbx-books .pair-wrap.mini .a-orn i{width:16px}
.smbx-books .pair-wrap.mini .a-title{font-size:9.5px}
.smbx-books .pair-wrap.mini .a-sub{font-size:6.5px;margin-top:6px;letter-spacing:.12em}
.smbx-books .pair-wrap.mini .a-foot .std{font-size:8px}.smbx-books .pair-wrap.mini .a-foot .by{font-size:5.5px}
.smbx-books .pair-wrap.mini .seal{top:-24px;font-size:7.5px;padding:4px 11px}

@media (prefers-reduced-motion: reduce){
  .smbx-books .bk{transition:none}
}

/* ── Host integration into the commerce store (NOT part of the verbatim book
      rules — these only position the .smbx-books host inside its container) ── */
/* Product page: the hero book pair sits above the big code, centred + roomy. */
.pd-books{margin:8px auto 30px;min-height:392px;align-items:flex-end}
/* Catalog card: the mini pair tops each card; the seal needs headroom so it
   doesn't clip the rounded card edge. */
.cert-books{margin:6px 0 18px;pointer-events:none}
.cert-books .pair-wrap.mini{height:212px}
@media (max-width:640px){
  .pd-books{min-height:332px}
  .pd-books .pair-wrap.hero .bk{--W:200px;--H:292px;--T:32px}
}

/* ===========================================================================
   BUNDLE-CARD BOOK FAN  (plan/bundle cards on index.php — #plans)
   ---------------------------------------------------------------------------
   A fanned STACK of Vol-I (SPC™) front covers, built by assets/books.js'
   renderBundle() into each <div class="smbx-books" data-bundle="1" …> host that
   tops a .bundle-card. Reuses the verbatim .bk/.cf/.art look (above) at a small
   "fan" size, but lays the covers out as overlapping 2D cards (a hand of cards /
   shelf fan) — no 3D rotateY, SVG art only (cheap, WebGL-free). A fixed-height
   stage keeps the bundle grid's cards aligned regardless of cover count.
   CSP-safe: class-driven; books.js sets only data-* + a .book-fan class. The
   tiny per-cover rotate/offset live HERE in the sheet, not as inline styles.
   =========================================================================== */
.bundle-books{margin:2px 0 18px;pointer-events:none}
/* The SINGLE plan shows the two-volume PAIR (not a fan). Give its seal headroom
   so it clears the card edge, and match the fan's vertical footprint. */
.bundle-books .pair-wrap.mini{height:208px}

/* The stage: relative, centred, fixed height so every plan card lines up. */
.smbx-books .book-fan{
  position:relative; width:100%; height:182px;
  display:flex; align-items:flex-end; justify-content:center;
}

/* Each fan cover — absolutely placed, overlapping, small rotate + offset.
   They share one centre; the per-index nudges below splay them into a fan.
   A soft drop shadow lifts the stack off the card. */
.smbx-books .book-fan .fan-card{
  position:absolute; bottom:0; left:50%;
  width:118px; height:166px;
  transform-origin:bottom center;
  filter:drop-shadow(-10px 16px 26px rgba(0,0,0,.5));
  transition:transform .8s var(--ease-calm);
}
/* The cover face fills the fan card (flat — no spine/pages, front only). */
.smbx-books .book-fan .fan-card .bk{--W:118px;--H:166px;--T:0px;width:var(--W);height:var(--H);position:relative}
.smbx-books .book-fan .fan-card .bk>div{position:absolute;border-radius:3px 6px 6px 3px}
.smbx-books .book-fan .fan-card .cf{transform:none}

/* Splay: each card rotated + translated a touch; later cards sit ON TOP
   (higher z-index = "newest on top"). Centre the deck via the base -50% shift. */
.smbx-books .book-fan .fan-card[data-i="0"]{transform:translateX(calc(-50% - 60px)) rotate(-13deg);z-index:1}
.smbx-books .book-fan .fan-card[data-i="1"]{transform:translateX(calc(-50% - 22px)) rotate(-4.5deg);z-index:2}
.smbx-books .book-fan .fan-card[data-i="2"]{transform:translateX(calc(-50% + 22px)) rotate(4.5deg);z-index:3}
.smbx-books .book-fan .fan-card[data-i="3"]{transform:translateX(calc(-50% + 60px)) rotate(13deg);z-index:4}

/* Two- and one-cover fans pull in tighter so they stay centred + balanced. */
.smbx-books .book-fan.n-1 .fan-card[data-i="0"]{transform:translateX(-50%) rotate(0deg)}
.smbx-books .book-fan.n-2 .fan-card[data-i="0"]{transform:translateX(calc(-50% - 26px)) rotate(-7deg)}
.smbx-books .book-fan.n-2 .fan-card[data-i="1"]{transform:translateX(calc(-50% + 26px)) rotate(7deg)}
.smbx-books .book-fan.n-3 .fan-card[data-i="0"]{transform:translateX(calc(-50% - 44px)) rotate(-10deg)}
.smbx-books .book-fan.n-3 .fan-card[data-i="1"]{transform:translateX(-50%) rotate(0deg)}
.smbx-books .book-fan.n-3 .fan-card[data-i="2"]{transform:translateX(calc(-50% + 44px)) rotate(10deg)}

/* Card-level hover: the deck gently spreads + lifts (quiet, calm motion). */
.bundle-card:hover .smbx-books .book-fan.n-4 .fan-card[data-i="0"]{transform:translateX(calc(-50% - 78px)) rotate(-15deg) translateY(-6px)}
.bundle-card:hover .smbx-books .book-fan.n-4 .fan-card[data-i="3"]{transform:translateX(calc(-50% + 78px)) rotate(15deg) translateY(-6px)}
.bundle-card:hover .smbx-books .book-fan.n-3 .fan-card[data-i="0"]{transform:translateX(calc(-50% - 56px)) rotate(-12deg) translateY(-5px)}
.bundle-card:hover .smbx-books .book-fan.n-3 .fan-card[data-i="2"]{transform:translateX(calc(-50% + 56px)) rotate(12deg) translateY(-5px)}

/* Shrink the cover art for the fan size (smaller than the .mini catalog pair).
   Mirrors the .pair-wrap.mini art scaling, tuned for the 118×166 fan cover. */
.smbx-books .book-fan .fan-card .art{padding:14px 12px 11px}
.smbx-books .book-fan .fan-card .frame{inset:8px}
.smbx-books .book-fan .fan-card .a-mono{font-size:6.5px;letter-spacing:.26em}
.smbx-books .book-fan .fan-card .a-tab{margin-top:6px;font-size:5.5px;padding:2px 6px;letter-spacing:.18em}
.smbx-books .book-fan .fan-card .a-vol{margin-top:9px;font-size:6px}
.smbx-books .book-fan .fan-card .a-mark{font-size:21px}
.smbx-books .book-fan .fan-card .a-mark sup{font-size:7px}
.smbx-books .book-fan .fan-card .a-orn{margin:6px 0 5px}
.smbx-books .book-fan .fan-card .a-orn i{width:14px}
.smbx-books .book-fan .fan-card .a-title{font-size:8.5px}
.smbx-books .book-fan .fan-card .a-sub{font-size:6px;margin-top:5px;letter-spacing:.1em}
.smbx-books .book-fan .fan-card .a-foot .std{font-size:7px}
.smbx-books .book-fan .fan-card .a-foot .by{font-size:5px}

/* "+N more" chip — a small foil pill overlaid on the top-right of the deck,
   for bundles whose true count exceeds the covers shown (Vault, Mastery). */
.smbx-books .book-fan .fan-more{
  position:absolute; z-index:9; top:6px; right:8px;
  display:flex; flex-direction:column; align-items:center; line-height:1;
  font-family:var(--mono); font-weight:700; font-size:15px; letter-spacing:.02em;
  padding:7px 10px; border-radius:999px;
  color:#0d1017; background:var(--foil);
  box-shadow:0 6px 18px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.25);
}
.smbx-books .book-fan .fan-more span{
  font-weight:600; font-size:6.5px; letter-spacing:.18em; text-transform:uppercase;
  margin-top:2px; opacity:.82;
}

/* Reduced motion: keep the resting fan splay, just don't animate it (and don't
   let the hover-spread rules fire — the deck holds its calm fanned pose). */
@media (prefers-reduced-motion: reduce){
  .smbx-books .book-fan .fan-card{transition:none}
  .bundle-card:hover .smbx-books .book-fan.n-4 .fan-card[data-i="0"]{transform:translateX(calc(-50% - 60px)) rotate(-13deg)}
  .bundle-card:hover .smbx-books .book-fan.n-4 .fan-card[data-i="3"]{transform:translateX(calc(-50% + 60px)) rotate(13deg)}
  .bundle-card:hover .smbx-books .book-fan.n-3 .fan-card[data-i="0"]{transform:translateX(calc(-50% - 44px)) rotate(-10deg)}
  .bundle-card:hover .smbx-books .book-fan.n-3 .fan-card[data-i="2"]{transform:translateX(calc(-50% + 44px)) rotate(10deg)}
}
@media (max-width:640px){
  .smbx-books .book-fan{height:166px}
  .smbx-books .book-fan .fan-card{width:104px;height:148px}
  .smbx-books .book-fan .fan-card .bk{--W:104px;--H:148px}
}

/* =============================================================================
   CART — nav badge, cart page, line items, summary (server-side session cart).
   All class-driven (CSP-safe: no inline styles). Reuses the brand tokens above
   so the cart reads as the same quiet-luxury surface as the rest of the store.
   ============================================================================= */

/* ---- Header cart count bubble (on the ghost "Cart" pill + nav link) -------*/
.store-cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 6px; margin-left: 2px;
  border-radius: 999px; background: var(--grad-gold); color: #0a0805;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; line-height: 1;
}
/* The nav "Cart (N)" link reuses .store-nav a styling; nothing extra needed. */

/* ---- Cart page header ----------------------------------------------------*/
.cart-head { margin: 8px 0 22px; }
.cart-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 5vw, 50px); line-height: 1.04; letter-spacing: -.01em;
  margin: 6px 0 10px; color: var(--ink);
}

/* ---- Two-column layout: line items + sticky summary ----------------------*/
.cart-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start;
  margin-top: 8px;
}
@media (max-width: 880px) { .cart-layout { grid-template-columns: 1fr; } }

/* ---- Line items ----------------------------------------------------------*/
.cart-lines {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 6px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.42);
}
.cart-line {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.cart-line:last-of-type { border-bottom: 0; }
.cl-main { min-width: 0; flex: 1 1 auto; }
.cl-name {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--ink); line-height: 1.25;
}
.cl-certs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0 6px; }
.cl-cert {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(243,236,218,.04); border: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-muted);
}
.cl-cert strong {
  font-family: var(--font-mono); font-weight: 700; font-size: 11.5px;
  letter-spacing: .04em; color: var(--gold2);
}
.cl-cert-name { color: var(--ink-muted); }
.cl-unit { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }

.cl-actions {
  display: flex; align-items: center; gap: 16px; flex: 0 0 auto; flex-wrap: wrap;
  justify-content: flex-end;
}
.cl-qty-form { display: inline-flex; align-items: center; gap: 7px; }
.cl-qty-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-muted);
}
.cl-qty {
  width: 58px; padding: 8px 8px; text-align: center;
  background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 14px;
}
.cl-qty:focus { outline: none; border-color: var(--gold-hair); }
.cl-update, .cl-remove {
  background: transparent; border: 1px solid var(--gold-hair);
  color: var(--ink); cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 12.5px;
  padding: 8px 13px; border-radius: 999px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cl-update:hover { background: var(--gold); color: #0a0805; border-color: var(--gold); }
.cl-remove { border-color: var(--line-2); color: var(--ink-muted); }
.cl-remove:hover { border-color: #7a2a2a; color: #e7c2c2; background: rgba(122,42,42,.16); }
.cl-line-total {
  font-family: var(--font-mono); font-weight: 700; font-size: 17px;
  color: var(--ink); min-width: 72px; text-align: right;
}

.cart-clear-form { padding: 16px 0 10px; text-align: right; }
.cart-clear {
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-muted); font-family: var(--font-ui); font-size: 12.5px;
  text-decoration: underline; padding: 4px 2px;
}
.cart-clear:hover { color: var(--ink); }

/* Inline data-pick validation message (cart.js). Stays calm + non-alarming. */
.cart-pick-msg {
  margin: 8px 0 0; font-size: 12.5px; color: var(--gold2);
  font-family: var(--font-ui);
}
/* BIG variant — Marjorie's fix: when a buyer adds without the right cert count,
   the inline message must be unmissable. Bold title line + calmer detail. */
.cart-pick-msg.big {
  display: block; margin: 12px 0 2px; padding: 14px 16px;
  border-radius: var(--r-md, 12px);
  background: rgba(224,106,106,.08); border: 1px solid var(--gold-hair);
}
.cart-pick-msg.big .cpm-title {
  display: block; font-family: var(--font-display, var(--font-ui));
  font-weight: 800; font-size: 17px; line-height: 1.25; color: #f7e6c8;
}
.cart-pick-msg.big .cpm-detail {
  display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.5;
  color: var(--ink-muted);
}

/* ---- BIG notice brand skin (storefront/cart) -----------------------------
   style.css carries the structural .notice-big; here we warm it to the
   quiet-luxury palette + display type so it matches the store chrome. */
.store-main .notice-big {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border-color: var(--gold-hair);
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
}
.store-main .notice-big.error { border-color: var(--gold-hair); }
.store-main .notice-big .nb-icon { background: var(--grad-gold, var(--gold)); }
.store-main .notice-big .nb-title {
  font-family: var(--font-display, var(--font-ui)); color: var(--ink);
}
.store-main .notice-big .nb-text { color: var(--ink-muted); }
.store-main .notice-big .nb-text strong { color: var(--gold2); }

/* ---- Order summary (aside) ----------------------------------------------*/
.cart-summary {
  position: sticky; top: 96px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--gold-hair); border-radius: var(--r-lg);
  padding: 22px 22px 20px; box-shadow: 0 20px 56px rgba(0,0,0,.5);
}
.cs-title {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  margin: 0 0 14px; color: var(--ink);
}
.cs-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink);
}
.cs-subtotal {
  font-family: var(--font-mono); font-weight: 700; font-size: 22px; color: var(--gold2);
}
.cs-note { font-size: 12px; color: var(--ink-muted); margin: 8px 0 16px; }
.cart-summary .btn.full { margin-bottom: 10px; }
.cart-summary .btn.secondary.full { margin-bottom: 14px; }
.cart-summary .trust-line { margin: 4px 0 0; font-size: 11.5px; }

/* ---- Empty state ---------------------------------------------------------*/
.cart-empty {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 40px 30px; text-align: center; max-width: 640px; margin: 10px auto;
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
}
.cart-empty-lead {
  font-family: var(--font-display); font-weight: 600; font-size: 24px;
  color: var(--ink); margin: 0 0 8px;
}
.cart-empty .hero-cta { justify-content: center; margin-top: 20px; }

/* Reduced motion: the summary still sticks; nothing here animates anyway. */
@media (prefers-reduced-motion: reduce) {
  .cl-update, .cl-remove, .cart-clear { transition: none; }
}

/* =============================================================================
   "STRESS-TESTED" TRUST BLURBS  (driven by assets/blurbs.js)
   A glassy, quiet-luxury modal that opens from any [data-blurb] trigger and
   tells one cert's honest case across 3 tabs (Story · Proof · Red-Team). All
   styling is class-driven here — blurbs.js builds the DOM and only toggles
   classes/attributes, so the strict commerce CSP (no inline style) stays clean.
   Tokens reuse the store palette above (--gold/--gold2/--ink/--panel/--line),
   the calm easing, and the same backdrop-blur glass used on the header/cards.
   ========================================================================== */

/* ---- The small "Stress-tested ✓" cue on each storefront card -------------
   A separate, real <button> that lives in .cert-foot NEXT TO the View/Add
   controls — never inside the .cert-link <a> — so clicking it opens the modal
   while the card's own link still navigates normally. */
.blurb-cue {
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: .6px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  color: var(--gold2);
  background: rgba(201,162,39,.07);
  border: 1px solid var(--gold-hair);
  transition: color .3s var(--ease-calm), background .3s var(--ease-calm),
              border-color .3s var(--ease-calm);
}
.blurb-cue:hover,
.blurb-cue:focus-visible {
  color: #0a0a12; background: var(--grad-gold); border-color: transparent;
  text-decoration: none;
}
.blurb-cue:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

/* Product-page trigger — a calmer, full-width "see the honest case" button that
   sits inside the buy card. Same family as the cue, sized like a soft link. */
.blurb-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 12px; cursor: pointer;
  font-family: var(--font-mono); font-weight: 500; font-size: 12px;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 11px 16px; border-radius: var(--r-sm);
  color: var(--gold2);
  background: rgba(201,162,39,.06);
  border: 1px solid var(--gold-hair);
  transition: color .3s var(--ease-calm), background .3s var(--ease-calm),
              border-color .3s var(--ease-calm);
}
.blurb-trigger:hover,
.blurb-trigger:focus-visible {
  color: #0a0a12; background: var(--grad-gold); border-color: transparent;
  text-decoration: none;
}
.blurb-trigger:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

/* ---- The modal overlay ----------------------------------------------------*/
.blurb-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  opacity: 0;
  transition: opacity .32s var(--ease-calm);
}
.blurb-modal[hidden] { display: none; }   /* fully out of the tab order */
.blurb-modal.is-open { opacity: 1; }

/* Frosted scrim behind the card. */
.blurb-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,8,16,.66);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

/* The glass card itself — deep ink, gold hairline, soft gold bloom up top. */
.blurb-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(620px 280px at 88% -30%, rgba(201,162,39,.12), transparent 64%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--gold-hair);
  padding: 30px 30px 28px;
  /* enter motion: rise + settle (opacity is owned by .blurb-modal) */
  transform: translateY(14px) scale(.985);
  transition: transform .34s var(--ease-calm);
}
.blurb-modal.is-open .blurb-card { transform: translateY(0) scale(1); }
.blurb-card:focus { outline: none; }
@media (max-width: 560px) { .blurb-card { padding: 24px 20px 22px; max-height: 90vh; } }

/* ---- Head: "Stress-tested" eyebrow + cert title + close -------------------*/
.blurb-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start; gap: 8px 14px;
  margin-bottom: 18px;
}
.blurb-eyebrow {
  grid-column: 1 / 2;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--gold2);
}
.blurb-titletext {
  grid-column: 1 / 2;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.12; letter-spacing: -.01em; color: var(--ink); margin: 4px 0 0;
}
.blurb-close {
  grid-column: 2 / 3; grid-row: 1 / 3;
  width: 38px; height: 38px; flex: 0 0 auto; cursor: pointer;
  display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: var(--ink-muted);
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-2);
  transition: color .25s var(--ease-calm), background .25s var(--ease-calm),
              border-color .25s var(--ease-calm);
}
.blurb-close:hover,
.blurb-close:focus-visible {
  color: var(--ink); background: rgba(201,162,39,.16); border-color: var(--gold-hair);
}
.blurb-close:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

/* ---- Tabs -----------------------------------------------------------------*/
.blurb-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.blurb-tab {
  font-family: var(--font-mono); font-weight: 500; font-size: 11.5px;
  letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
  padding: 8px 15px; border-radius: 999px; white-space: nowrap;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line-2);
  transition: color .3s var(--ease-calm), background .3s var(--ease-calm),
              border-color .3s var(--ease-calm);
}
.blurb-tab:hover { color: var(--ink); border-color: var(--gold-hair); }
.blurb-tab.is-active {
  color: #0a0a12; background: var(--grad-gold); border-color: transparent;
}
.blurb-tab:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

/* ---- Panels ---------------------------------------------------------------*/
.blurb-panels { min-height: 188px; }
.blurb-panel[hidden] { display: none; }
.blurb-panel {
  animation: blurb-panel-in .42s var(--ease-calm) both;
}
@keyframes blurb-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.blurb-copy {
  color: var(--ink); font-size: 15.5px; line-height: 1.7; margin: 0 0 4px;
}
.blurb-copy + .blurb-copy { margin-top: 14px; }

/* Proof checklist — gold check glyphs via ::before (no extra DOM). */
.blurb-proof {
  list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 11px;
}
.blurb-proof li {
  position: relative; padding: 12px 14px 12px 40px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-2); color: var(--ink); font-size: 14px; line-height: 1.55;
}
.blurb-proof li::before {
  content: "✓"; position: absolute; left: 14px; top: 12px;
  color: var(--gold2); font-weight: 700; font-family: var(--font-mono);
}

/* Red-Team badge — the "✓ Stress-tested" stamp above the honest-stance copy. */
.blurb-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold2);
  padding: 7px 13px; border-radius: 999px;
  background: rgba(201,162,39,.1);
  border: 1px solid var(--gold-hair);
}

/* ---- Reduced motion: keep it instant + calm ------------------------------*/
@media (prefers-reduced-motion: reduce) {
  .blurb-modal,
  .blurb-card { transition: none; }
  .blurb-card { transform: none; }
  .blurb-modal.is-open .blurb-card { transform: none; }
  .blurb-panel { animation: none; }
}

/* =============================================================================
   SIGN-IN GLASS POLISH  (login.php — CSS-only, no markup/logic change)
   A subtle frosted panel + clearer focus-visible rings on the unified sign-in
   form. Scoped to the .signin-glass class (added to login.php's existing
   .panel) so it ONLY touches the sign-in front door and never alters the base
   theme or the account pages' panels. The auth flow, CSRF, realms, and markup
   are untouched — this is purely visual.
   ========================================================================== */
.signin-glass {
  position: relative;
  max-width: 460px; margin: 22px 0 0;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(520px 220px at 90% -30%, rgba(201,162,39,.08), transparent 64%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 22px 60px rgba(0,0,0,.42), 0 0 0 1px var(--gold-hair);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  padding: 30px 28px;
}
/* Clearer focus rings on the email/password fields + submit (a11y + polish). */
.signin-glass input:focus-visible,
.signin-glass .btn:focus-visible {
  outline: 2px solid var(--gold2); outline-offset: 2px;
}
.signin-glass input:focus {
  border-color: var(--gold-hair);
}

/* =============================================================================
   THEME TOGGLE BUTTON  (.theme-toggle, in the store header .store-cta)
   -----------------------------------------------------------------------------
   A real <button data-theme-toggle> wired by assets/theme.js. The sun/moon glyph
   is drawn ENTIRELY in CSS (no inline SVG/style needed): a moon is shown while
   DARK is active; theme.js adds .is-light to the inner .theme-toggle-ico when
   LIGHT is active, which swaps the mask to a sun. Themeable via the brand vars,
   so it looks right in both modes. CSP-safe — class-driven only.
   ============================================================================= */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto; padding: 0; cursor: pointer;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--gold-hair);
  color: var(--ink);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.theme-toggle:hover {
  background: rgba(201,162,39,.10); border-color: var(--gold2);
  transform: translateY(-1px);
}
.theme-toggle:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
/* The icon: a 18px box whose background is the current accent gold, clipped to a
   crescent-moon shape via mask. When .is-light is present we swap to a sun. */
.theme-toggle-ico {
  display: block; width: 18px; height: 18px;
  background: var(--gold2);
  transition: background .2s ease;
  /* MOON (default = dark active → offer/while-dark shows the moon) */
  -webkit-mask: radial-gradient(circle at 67% 33%, transparent 52%, #000 53%) center / contain no-repeat;
          mask: radial-gradient(circle at 67% 33%, transparent 52%, #000 53%) center / contain no-repeat;
}
/* SUN (light active): a filled disc + radiating spokes built from gradients. */
.theme-toggle-ico.is-light {
  -webkit-mask:
    radial-gradient(circle at 50% 50%, #000 33%, transparent 34% 44%, #000 45% 50%, transparent 51%) center / contain no-repeat;
          mask:
    radial-gradient(circle at 50% 50%, #000 33%, transparent 34% 44%, #000 45% 50%, transparent 51%) center / contain no-repeat;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-toggle-ico { transition: none; }
  .theme-toggle:hover { transform: none; }
}

/* =============================================================================
   DOWNLOAD CENTER  (download.php) — .dl-* classes
   -----------------------------------------------------------------------------
   Glassy, quiet-luxury per-OS download cards. All colours flow from the brand
   vars so the page is premium in BOTH light + dark with no per-theme rules here
   (the global [data-theme="light"] block remaps the vars + soft shadows). The
   "Install the app" PWA button + per-OS highlight are driven by assets/
   download.js (a 'self' deferred script). CSP-safe — class-driven only.
   ============================================================================= */
.dl-hero {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    radial-gradient(760px 360px at 90% -40%, rgba(201,162,39,.12), transparent 62%),
    linear-gradient(180deg, rgba(16,21,33,.72), rgba(7,11,22,.62));
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  padding: 72px 56px 64px; overflow: hidden; margin-bottom: 16px;
}
@media (max-width: 640px) { .dl-hero { padding: 48px 26px; } }
.dl-hero h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 5.6vw, 62px); line-height: 1.02; margin: 0 0 18px;
  letter-spacing: -.02em;
}
.dl-hero h1 .grad { font-style: italic; font-weight: 400; color: var(--gold2); }
.dl-hero .lead {
  font-family: var(--font-ui); color: var(--ink-muted);
  font-size: clamp(16px, 1.5vw, 19px); max-width: 640px; margin: 0; line-height: 1.68;
}

/* Per-OS card grid. */
.dl-grid {
  display: grid; gap: 22px; margin-top: 38px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.dl-card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 26px; overflow: hidden;
  transition: transform .5s var(--ease-calm), box-shadow .5s var(--ease-calm), border-color .5s var(--ease-calm);
}
.dl-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px 130px at 100% 0, rgba(201,162,39,.08), transparent 60%);
  opacity: 0; transition: opacity .5s var(--ease-calm);
}
.dl-card:hover {
  border-color: var(--gold-hair); transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0,0,0,.40), 0 0 0 1px var(--gold-hair);
}
.dl-card:hover::after { opacity: 1; }
.dl-card > * { position: relative; z-index: 1; }
/* The visitor's own OS card (download.js adds .is-yours): a warm gold ring +
   a "Your device" flag so the right download is unmissable. */
.dl-card.is-yours { border-color: var(--gold-hair); box-shadow: 0 0 0 1px var(--gold-hair); }
.dl-card.is-yours::before {
  content: "Your device"; position: absolute; top: 14px; right: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #0a0805; background: var(--grad-gold);
  padding: 4px 9px; border-radius: 999px;
}
.dl-os-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--gold2);
}
.dl-os-ico svg { width: 24px; height: 24px; display: block; }
.dl-card h2 {
  font-family: var(--font-display); font-weight: 900; font-size: 22px;
  margin: 0 0 6px; letter-spacing: -.01em; color: var(--ink);
}
.dl-card .dl-sub {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-muted); margin: 0 0 12px;
}
.dl-card p { color: var(--ink-muted); font-size: 14.5px; line-height: 1.62; margin: 0 0 18px; flex: 1; }
.dl-card .dl-actions { margin-top: auto; }

/* The download / install action buttons (reuse .store-btn look). */
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; cursor: pointer;
  font-family: var(--font-ui); font-weight: 700; font-size: 14px; letter-spacing: .2px;
  padding: 13px 22px; border: 0; border-radius: 999px;
  background: var(--grad-gold); color: #0a0805; text-align: center;
  box-shadow: 0 4px 18px rgba(201,162,39,.18);
  transition: transform .45s var(--ease-calm), box-shadow .45s var(--ease-calm);
}
.dl-btn:hover {
  transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201,162,39,.30);
  color: #0a0805; text-decoration: none;
}
.dl-install {
  /* hidden until download.js confirms the app is installable (adds .is-ready) */
  border: 1px solid var(--gold-hair); background: transparent; color: var(--gold2);
  box-shadow: none;
}
.dl-install:hover { background: var(--grad-gold); color: #0a0805; border-color: transparent; }
.dl-install[hidden] { display: none; }

/* iOS "Add to Home Screen" numbered steps. */
.dl-steps { list-style: none; counter-reset: dls; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; }
.dl-steps li {
  position: relative; counter-increment: dls; padding: 10px 14px 10px 44px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2);
  color: var(--ink); font-size: 13.5px; line-height: 1.5;
}
.dl-steps li::before {
  content: counter(dls); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: #0a0805; background: var(--grad-gold);
}

/* Honest note strip beneath the grid. */
.dl-note {
  margin: 32px 0 0; padding: 18px 22px;
  border: 1px dashed var(--gold-hair); border-radius: var(--r-md);
  background: rgba(201,162,39,.05);
  color: var(--ink-muted); font-size: 13.5px; line-height: 1.62;
}
.dl-note b { color: var(--gold2); }

/* =============================================================================
   LIGHT THEME  ([data-theme="light"] on <html>) — storefront brand layer
   -----------------------------------------------------------------------------
   Ivory + warm gold daylight. Default stays DARK (the :root tokens above). Two
   parts: (1) remap the brand TOKENS, and (2) re-skin the major HARDCODED dark
   surfaces (page wash, glass header, panel gradients, heavy black box-shadows,
   WebGL fallback) so light mode is intentional + premium, never broken. Gold
   stays gold on its FILLS (the ink-on-gold #0a08xx text stays correct); gold
   used as TEXT/hairlines shifts to the deep, readable #9a7613 family.
   ============================================================================= */
[data-theme="light"] {
  --bg:        #f6f1e7;   /* base ivory */
  --bg-2:      #fbf8f1;   /* lighter parchment (panels rise toward this) */
  --panel:     #fffdf8;   /* card top — near-white warm */
  --panel-2:   #f3eede;   /* card bottom */
  --ink:       #211c16;   /* espresso — primary text */
  --ink-soft:  #2a241c;   /* slightly softer espresso — alt headings */
  --ink-muted: #6b6457;   /* warm taupe — secondary text (AA on ivory) */
  --muted:     #6b6457;   /* keep the alias in sync */
  --line:      #e6dfce;   /* warm hairline */
  --line-2:    #d8cfb8;   /* brighter warm hairline (hover) */
  --gold:      #9a7613;   /* DEEP gold — safe as TEXT */
  --gold2:     #c2a047;   /* brighter gold — fills / accents */
  --gold-soft: #c2a047;   /* fills / accents */
  --gold-hair: rgba(154,118,19,.30); /* the single accent hairline */
  --grad-gold: linear-gradient(95deg, #9a7613, #c2a047);
}

/* ---- Page wash + WebGL fallback (light radial parchment) ----------------- */
[data-theme="light"] body.store-body {
  background:
    radial-gradient(1200px 760px at 80% -12%, rgba(201,162,39,.16), transparent 58%),
    radial-gradient(900px 620px at 6% 2%, rgba(154,118,19,.06), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
/* The ambient WebGL canvas renders dark gold-veined fbm — at full opacity that
   would smear the ivory page. Dim it hard in light mode; the parchment wash
   above carries the atmosphere. (store-fx.js still removes it under reduced
   motion / no-WebGL, where the wash already shows through.) */
[data-theme="light"] .fx-bg { opacity: .05; }
@keyframes fx-fade-light { from { opacity: 0; } to { opacity: .05; } }
[data-theme="light"] .fx-bg { animation-name: fx-fade-light; }
[data-theme="light"] .fx-grain { opacity: .03; mix-blend-mode: multiply; }

/* ---- Glass header: ivory frost instead of near-black ---------------------- */
[data-theme="light"] .store-top { background: rgba(255,253,248,.78); border-bottom-color: var(--line); }
[data-theme="light"] .store-nav a:hover { background: rgba(154,118,19,.07); }

/* ---- Hero / product hero / buy-card glass panels (were dark navy glass) --- */
[data-theme="light"] .store-hero,
[data-theme="light"] .pd-hero {
  background:
    radial-gradient(760px 360px at 92% -40%, rgba(201,162,39,.16), transparent 62%),
    linear-gradient(180deg, rgba(255,253,248,.86), rgba(246,241,231,.78));
}
[data-theme="light"] .dl-hero {
  background:
    radial-gradient(760px 360px at 90% -40%, rgba(201,162,39,.18), transparent 62%),
    linear-gradient(180deg, rgba(255,253,248,.9), rgba(246,241,231,.8));
}

/* ---- Soften every heavy black drop-shadow to a warm whisper -------------- */
[data-theme="light"] .bundle-card:hover {
  box-shadow: 0 26px 56px rgba(60,50,30,.14), 0 0 0 1px var(--gold-hair), 0 0 32px rgba(201,162,39,.10);
}
[data-theme="light"] .bundle-card.primary {
  box-shadow: 0 0 0 1px var(--gold-hair), 0 18px 44px rgba(60,50,30,.12);
}
[data-theme="light"] .cert-card:hover {
  box-shadow: 0 20px 48px rgba(60,50,30,.12), 0 0 0 1px var(--gold-hair), 0 0 28px rgba(201,162,39,.10);
}
[data-theme="light"] .pd-panel:hover {
  box-shadow: 0 22px 48px rgba(60,50,30,.12), 0 0 0 1px var(--gold-hair);
}
[data-theme="light"] .buy-card { box-shadow: 0 16px 40px rgba(60,50,30,.12); }
[data-theme="light"] .buy-card:hover {
  box-shadow: 0 24px 54px rgba(60,50,30,.14), 0 0 0 1px var(--gold-hair), 0 0 36px rgba(201,162,39,.12);
}
[data-theme="light"] .related-card:hover {
  box-shadow: 0 16px 34px rgba(60,50,30,.12), 0 0 0 1px var(--gold-hair);
}
[data-theme="light"] .dl-card:hover {
  box-shadow: 0 20px 48px rgba(60,50,30,.12), 0 0 0 1px var(--gold-hair);
}
[data-theme="light"] .cart-lines,
[data-theme="light"] .cart-empty,
[data-theme="light"] .store-main .notice-big { box-shadow: 0 18px 50px rgba(60,50,30,.10); }
[data-theme="light"] .cart-summary { box-shadow: 0 20px 56px rgba(60,50,30,.12); }

/* ---- Modals / glass cards (blurbs, sign-in) — light scrim + soft shadow -- */
[data-theme="light"] .blurb-backdrop { background: rgba(60,50,30,.30); }
[data-theme="light"] .blurb-card {
  background:
    radial-gradient(620px 280px at 88% -30%, rgba(201,162,39,.14), transparent 64%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 30px 80px rgba(60,50,30,.20), 0 0 0 1px var(--gold-hair);
}
[data-theme="light"] .blurb-close { background: rgba(154,118,19,.06); }
[data-theme="light"] .signin-glass {
  background:
    radial-gradient(520px 220px at 90% -30%, rgba(201,162,39,.10), transparent 64%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 22px 60px rgba(60,50,30,.12), 0 0 0 1px var(--gold-hair);
}

/* ---- Small ink-on-gold spots that must flip with the lighter gold -------- */
/* Gold FILLS stay gold; the ink text on them shifts to a deep espresso so it
   stays legible on the brighter light-mode gold. */
[data-theme="light"] .store-cta .store-btn.gold,
[data-theme="light"] .store-main .btn,
[data-theme="light"] .store-btn,
[data-theme="light"] .mini-btn:hover,
[data-theme="light"] .cs-row .store-btn,
[data-theme="light"] .dl-btn,
[data-theme="light"] .blurb-tab.is-active,
[data-theme="light"] .blurb-cue:hover,
[data-theme="light"] .blurb-trigger:hover,
[data-theme="light"] .store-cart-count,
[data-theme="light"] .cl-update:hover,
[data-theme="light"] .dl-card.is-yours::before,
[data-theme="light"] .dl-steps li::before { color: #2a2009; }
/* The gold pill button shadow softens too. */
[data-theme="light"] .store-cta .store-btn.gold { box-shadow: 0 10px 28px rgba(154,118,19,.30); }
[data-theme="light"] .store-cta .store-btn.ghost:hover { color: #2a2009; }

/* ---- Book covers: the two-volume renders are deliberate dark "physical"
   objects (obsidian + navy cloth + gold foil) and read beautifully as real
   books sitting on the ivory page — so we intentionally LEAVE their internals
   dark. Only ensure the soft drop shadow under them warms slightly. -------- */
[data-theme="light"] .smbx-books .cf {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06), -22px 30px 64px rgba(60,50,30,.28);
}

/* ---- Notice brand skin (storefront) — warm light tints -------------------- */
[data-theme="light"] .store-main .notice-big {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}
[data-theme="light"] .store-main .notice-big .nb-title { color: #5a3f12; }
[data-theme="light"] .cart-pick-msg.big { background: rgba(192,80,78,.07); }
[data-theme="light"] .cart-pick-msg.big .cpm-title { color: #5a3f12; }

/* ---- Add-to-cart toast — warm ivory glass in light mode ------------------- */
[data-theme="light"] .app-toast{
  background: linear-gradient(180deg, rgba(255,253,248,.97), rgba(246,241,231,.97));
  border-color: var(--gold-hair);
  box-shadow: 0 18px 48px rgba(60,50,30,.18), 0 0 0 1px rgba(201,162,39,.16), 0 0 26px rgba(201,162,39,.10);
  color: var(--ink);
}
[data-theme="light"] .app-toast-msg{ color: #211c16; }
[data-theme="light"] .app-toast-action{ color: #241a05; }
[data-theme="light"] .app-toast--error .app-toast-action{ color: #5a3f12; }
[data-theme="light"] .app-toast-close:hover{ background: rgba(154,118,19,.08); }
