/* ════════════════════════════════════════════════════════════════
   RJ Kids Videos — gallery + single video
   Every colour reads a theme token first and only falls back to a
   literal, so a retheme carries through without touching this file.
   Motion reuses the Home 2026 system: shimmer / reveal / drift / pulse.
   ════════════════════════════════════════════════════════════════ */

.rjkv {
  --rjkv-bg:     var(--rj-bg,    var(--rjc-bg,    #04050c));
  --rjkv-bg2:    var(--rj-bg2,   var(--rjc-bg2,   #070918));
  --rjkv-ink:    var(--rj-ink,   var(--rjc-ink,   #eef0ff));
  --rjkv-muted:  var(--rj-muted, var(--rjc-muted, #9aa0b8));
  --rjkv-dim:    var(--rj-dim,   var(--rjc-dim,   #6b7190));
  --rjkv-line:   var(--rj-line,  var(--rjc-line,  rgba(255, 255, 255, .08)));
  --rjkv-glass:  var(--rj-glass, var(--rjc-glass, rgba(255, 255, 255, .04)));
  --rjkv-grad:   var(--rj-grad,  var(--rjc-grad,  linear-gradient(100deg, #6366f1, #a855f7 50%, #ec4899)));
  --rjkv-cyan:   var(--rj-cyan,  var(--cyan, #22d3ee));
  --rjkv-r:      var(--rj-r, 22px);
  --rjkv-font-b: var(--rj-font-b, var(--font-b, 'Inter', sans-serif));
  --rjkv-font-d: var(--rj-font-d, var(--font-d, 'Space Grotesk', sans-serif));

  position: relative;
  font-family: var(--rjkv-font-b);
  color: var(--rjkv-muted);
}

/* ── Container alignment ──────────────────────────────────────────
   The site's global nav and footer are both `max-width: 1180px` centred in
   the viewport. Two different problems had to be solved to match them:

   1. The single-video template renders at the theme's full content width,
      which sat ~10px outboard of the header. A plain container fixes it.
   2. The shortcode gallery sits inside Avada's page wrapper, which is
      narrower (~860px), leaving the grid inset ~160px per side against a
      1180px header. A max-width cannot fix that — the parent is already
      narrower — so the gallery breaks out and re-centres on the viewport,
      landing on exactly the same edges as the nav.

   `min()` keeps the breakout safe on small screens, and 100vw is only ever
   the smaller branch there, so a vertical scrollbar cannot cause overflow. */
.rjkv-single {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.rjkv-gallery {
  width: min(1180px, calc(100vw - 48px));
  margin-inline: auto;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.rjkv *,
.rjkv *::before,
.rjkv *::after { box-sizing: border-box; }

/* Ambient drift orbs were removed deliberately: sitting at negative offsets
   inside this section they overhung it by ~220px vertically and painted over
   the site footer, and clipping them left a visible hard edge across the
   footer columns. The homepage already provides ambient glow; the card hover
   glow and gradient shimmer carry the richness here. */

/* ── Scroll reveal (mirrors the theme's .reveal contract) ─────── */
html.js .rjkv .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .8s cubic-bezier(.2, .6, .2, 1) var(--d, 0ms),
    transform .8s cubic-bezier(.2, .6, .2, 1) var(--d, 0ms);
}
html.js .rjkv .reveal.in { opacity: 1; transform: none; }

/* ── Animated gradient text (Home 2026 shimmer) ──────────────── */
.rjkv-grad {
  background: var(--rjkv-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rjkv-shimmer 6s linear infinite;
}
@keyframes rjkv-shimmer { to { background-position: 200% center; } }

/* ── Header ───────────────────────────────────────────────────── */
/* padding-block only — a `padding` shorthand would reset the breakout gutter. */
.rjkv-gallery { z-index: 1; padding-block: 8px 64px; }
.rjkv-head { text-align: center; padding: 0 0 8px; position: relative; z-index: 1; }

.rjkv-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px var(--rjkv-font-d);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--rjkv-cyan);
  border: 1px solid var(--rjkv-line);
  background: var(--rjkv-glass);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 20px;
}
.rjkv-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rjkv-cyan);
  box-shadow: 0 0 0 0 currentColor;
  animation: rjkv-pulse 2.4s infinite;
}
@keyframes rjkv-pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 211, 238, 0); } }

.rjkv-title {
  font-family: var(--rjkv-font-d);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--rjkv-ink);
  margin: 0;
}
.rjkv-sub {
  max-width: 56ch; margin: 16px auto 0;
  font-size: 1.02rem; color: var(--rjkv-muted);
}

/* ── Filter chips ─────────────────────────────────────────────── */
.rjkv-chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  padding: 30px 0 4px; position: relative; z-index: 1;
}
.rjkv-chip {
  border: 1px solid var(--rjkv-line);
  background: var(--rjkv-glass);
  color: var(--rjkv-muted);
  padding: 9px 17px; border-radius: 999px;
  font: 500 13.5px var(--rjkv-font-b);
  cursor: pointer;
  transition: color .25s, background .25s, border-color .25s, transform .25s cubic-bezier(.2, .7, .2, 1);
}
.rjkv-chip:hover { color: var(--rjkv-ink); border-color: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.rjkv-chip:focus-visible { outline: 2px solid var(--rjkv-cyan); outline-offset: 2px; }
.rjkv-chip[aria-pressed='true'] {
  color: #fff; border-color: transparent;
  background: var(--rjkv-grad);
  background-size: 200% auto;
  animation: rjkv-shimmer 6s linear infinite;
  box-shadow: 0 6px 22px -8px rgba(168, 85, 247, .75);
}
.rjkv-n { opacity: .6; margin-left: 6px; font-size: 12px; }

/* ── Grid ─────────────────────────────────────────────────────── */
.rjkv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 22px;
  padding: 26px 0 0;
  position: relative; z-index: 1;
}
.rjkv-gallery[data-columns='2'] .rjkv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rjkv-gallery[data-columns='3'] .rjkv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rjkv-gallery[data-columns='4'] .rjkv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rjkv-gallery[data-columns='5'] .rjkv-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.rjkv-card[hidden] { display: none; }

.rjkv-card-media {
  position: relative; display: block;
  aspect-ratio: 9 / 16;
  border-radius: var(--rjkv-r);
  overflow: hidden;
  border: 1px solid var(--rjkv-line);
  background: var(--rjkv-bg2);
  text-decoration: none;
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s, border-color .45s;
}
/* Gradient hairline that fades in on hover. */
.rjkv-card-media::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; background: var(--rjkv-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0; transition: opacity .4s; z-index: 5;
}
.rjkv-card:hover .rjkv-card-media,
.rjkv-card:focus-within .rjkv-card-media {
  transform: translateY(-7px) scale(1.014);
  box-shadow: 0 26px 54px -20px rgba(99, 102, 241, .6), 0 0 0 1px rgba(255, 255, 255, .06);
}
.rjkv-card:hover .rjkv-card-media::after,
.rjkv-card:focus-within .rjkv-card-media::after { opacity: 1; }
.rjkv-card-media:focus-visible { outline: 2px solid var(--rjkv-cyan); outline-offset: 3px; }

/* Bottom scrim so the title area stays legible over any frame. */
.rjkv-card-media::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 54%; z-index: 2;
  background: linear-gradient(to top, rgba(4, 5, 12, .94), rgba(4, 5, 12, .3) 55%, transparent);
}

/* Frame cross-fade — static images, so hover costs no video bandwidth. */
.rjkv-frames { position: absolute; inset: 0; display: block; }
.rjkv-frames img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  margin: 0; border-radius: 0; max-width: none;
}
.rjkv-frames .rjkv-hoverframe { opacity: 0; transition: opacity .7s ease; }
.rjkv-card:hover .rjkv-frames .rjkv-hoverframe {
  animation: rjkv-cycle 6s linear infinite;
  animation-delay: calc(var(--n) * 1.2s);
}
@keyframes rjkv-cycle { 0%, 14% { opacity: 1; } 28%, 100% { opacity: 0; } }

/* Bottom-left, not top: these frames carry burned-in hook text at the top,
   and a pill there covers it. The bottom scrim also keeps the pill legible. */
.rjkv-pill {
  position: absolute; bottom: 11px; left: 11px; z-index: 3;
  max-width: calc(100% - 74px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 10.5px var(--rjkv-font-d);
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--rjkv-ink);
  background: rgba(4, 5, 12, .6);
  border: 1px solid var(--rjkv-line);
  backdrop-filter: blur(9px);
  padding: 5px 10px; border-radius: 999px;
}
.rjkv-dur {
  position: absolute; bottom: 11px; right: 11px; z-index: 3;
  font: 600 11.5px var(--rjkv-font-b);
  color: var(--rjkv-ink);
  background: rgba(4, 5, 12, .66);
  border: 1px solid var(--rjkv-line);
  backdrop-filter: blur(9px);
  padding: 3px 8px; border-radius: 7px;
}

.rjkv-play {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  color: #fff; opacity: 0; transition: opacity .35s;
}
.rjkv-play::before {
  content: ''; position: absolute;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--rjkv-grad);
  box-shadow: 0 10px 34px -8px rgba(168, 85, 247, .9);
  transform: scale(.7); transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.rjkv-play svg {
  position: relative;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6));
  transform: scale(.7); transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.rjkv-card:hover .rjkv-play,
.rjkv-card:focus-within .rjkv-play { opacity: 1; }
.rjkv-card:hover .rjkv-play::before,
.rjkv-card:hover .rjkv-play svg { transform: scale(1); }

.rjkv-sheen {
  position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .13) 50%, transparent 62%);
  transform: translateX(-110%);
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.rjkv-card:hover .rjkv-sheen { transform: translateX(110%); }

.rjkv-card-body { padding: 13px 3px 0; }
.rjkv-card-title { font: 600 15px/1.32 var(--rjkv-font-d); margin: 0; letter-spacing: -.01em; }
.rjkv-card-title a { color: var(--rjkv-ink); text-decoration: none; }
.rjkv-card-title a:hover { color: #fff; }
.rjkv-card-hook {
  margin: 6px 0 0; font-size: 12.8px; line-height: 1.45; color: var(--rjkv-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.rjkv-empty,
.rjkv-noresults { text-align: center; padding: 40px 0; color: var(--rjkv-dim); }

/* ── Single video ─────────────────────────────────────────────── */
/* padding-block only — the inline padding is the container gutter set above,
   and a `padding` shorthand here would silently reset it to 0. */
.rjkv-single { position: relative; z-index: 1; padding-block: 42px 80px; }

.rjkv-crumb { font-size: 12.5px; color: var(--rjkv-dim); margin-bottom: 18px; }
.rjkv-crumb a { color: var(--rjkv-muted); text-decoration: none; }
.rjkv-crumb a:hover { color: var(--rjkv-ink); }
.rjkv-crumb span { margin: 0 7px; opacity: .5; }

.rjkv-single-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 46px; align-items: start;
}

.rjkv-player {
  position: relative; aspect-ratio: 9 / 16;
  border-radius: var(--rjkv-r); overflow: hidden;
  border: 1px solid var(--rjkv-line);
  background: var(--rjkv-bg2);
  box-shadow: 0 34px 70px -28px rgba(99, 102, 241, .55);
}
.rjkv-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

/* Only appears when autoplay was forced to mute — gives sound back in one tap. */
.rjkv-unmute {
  position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%);
  z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(4, 5, 12, .78); backdrop-filter: blur(9px);
  color: #fff; font: 600 12.5px var(--rjkv-font-b);
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  animation: rjkv-fadein .45s ease backwards;
}
.rjkv-unmute:hover { background: rgba(4, 5, 12, .92); border-color: rgba(255, 255, 255, .45); }
.rjkv-unmute[hidden] { display: none; }

.rjkv-nodl {
  margin: 12px 0 0; display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--rjkv-dim); line-height: 1.4;
}
.rjkv-nodl svg { flex: none; }

.rjkv-h1 {
  font: 700 clamp(1.7rem, 3.4vw, 2.5rem)/1.12 var(--rjkv-font-d);
  letter-spacing: -.02em; color: var(--rjkv-ink); margin: 0;
}
.rjkv-lead { margin: 14px 0 0; font-size: 1.02rem; color: var(--rjkv-ink); opacity: .9; }

.rjkv-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 0; }
.rjkv-tag {
  font: 500 12.5px var(--rjkv-font-b);
  color: var(--rjkv-muted); text-decoration: none;
  border: 1px solid var(--rjkv-line); background: var(--rjkv-glass);
  padding: 6px 13px; border-radius: 999px; transition: .25s;
}
a.rjkv-tag:hover { color: var(--rjkv-ink); border-color: rgba(255, 255, 255, .22); }

/* ── Quiz ─────────────────────────────────────────────────────── */
.rjkv-quiz {
  margin: 28px 0 0; padding: 20px 22px;
  border: 1px solid var(--rjkv-line); border-radius: 16px;
  background: var(--rjkv-glass);
  position: relative; overflow: hidden;
}
.rjkv-quiz::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--rjkv-grad); background-size: auto 200%;
  animation: rjkv-shimmer 6s linear infinite;
}
.rjkv-quiz-kicker {
  margin: 0 0 8px; font: 600 11px var(--rjkv-font-d);
  letter-spacing: .14em; text-transform: uppercase; color: var(--rjkv-cyan);
}
.rjkv-quiz-set { border: 0; margin: 0; padding: 0; }
.rjkv-quiz-q {
  font: 600 1.05rem/1.4 var(--rjkv-font-d);
  color: var(--rjkv-ink); padding: 0; margin: 0 0 14px;
}

.rjkv-quiz-opt {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; margin: 0 0 8px;
  border: 1px solid var(--rjkv-line); border-radius: 11px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer; font-size: 14.4px; color: var(--rjkv-muted);
  transition: border-color .25s, background .25s, transform .25s cubic-bezier(.2, .7, .2, 1), color .25s;
}
.rjkv-quiz-opt:hover { border-color: rgba(255, 255, 255, .2); color: var(--rjkv-ink); transform: translateX(3px); }
.rjkv-quiz-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.rjkv-quiz-opt:focus-within { outline: 2px solid var(--rjkv-cyan); outline-offset: 2px; }

.rjkv-quiz-marker {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  position: relative; transition: border-color .25s;
}
.rjkv-quiz-marker::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--rjkv-grad); transform: scale(0);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.rjkv-quiz-opt input:checked ~ .rjkv-quiz-marker::after { transform: scale(1); }

/* Answered state */
.rjkv-quiz.is-answered .rjkv-quiz-opt { cursor: default; transform: none; }
.rjkv-quiz-opt.is-correct {
  border-color: #34d399; background: rgba(52, 211, 153, .1); color: var(--rjkv-ink);
  animation: rjkv-pop .45s cubic-bezier(.2, .7, .2, 1);
}
.rjkv-quiz-opt.is-correct .rjkv-quiz-marker { border-color: #34d399; }
.rjkv-quiz-opt.is-wrong {
  border-color: #fb7185; background: rgba(251, 113, 133, .09);
  animation: rjkv-shake .4s ease;
}
.rjkv-quiz-opt.is-wrong .rjkv-quiz-marker { border-color: #fb7185; }
@keyframes rjkv-pop { 40% { transform: scale(1.03); } }
@keyframes rjkv-shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.rjkv-quiz-feedback {
  margin: 14px 0 0; font-size: 14px; line-height: 1.6;
  animation: rjkv-fadein .5s ease backwards;
}
@keyframes rjkv-fadein { from { opacity: 0; transform: translateY(6px); } }
.rjkv-quiz-verdict { display: block; margin-bottom: 4px; font-family: var(--rjkv-font-d); }
.rjkv-quiz-feedback.is-correct .rjkv-quiz-verdict { color: #34d399; }
.rjkv-quiz-feedback.is-wrong .rjkv-quiz-verdict { color: #fb7185; }
.rjkv-quiz-why { color: var(--rjkv-muted); }

.rjkv-quiz-retry {
  margin: 12px 0 0; border: 1px solid var(--rjkv-line);
  background: transparent; color: var(--rjkv-muted);
  font: 500 13px var(--rjkv-font-b); padding: 7px 14px;
  border-radius: 999px; cursor: pointer; transition: .25s;
}
.rjkv-quiz-retry:hover { color: var(--rjkv-ink); border-color: rgba(255, 255, 255, .24); }

/* ── Share ────────────────────────────────────────────────────── */
.rjkv-share {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
  margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rjkv-line);
}
.rjkv-share-label {
  width: 100%; margin-bottom: 4px;
  font: 600 11px var(--rjkv-font-d);
  letter-spacing: .14em; text-transform: uppercase; color: var(--rjkv-dim);
}
.rjkv-sbtn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--rjkv-line); background: var(--rjkv-glass);
  color: var(--rjkv-ink); text-decoration: none;
  padding: 9px 15px; border-radius: 999px;
  font: 500 13.5px var(--rjkv-font-b); cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s cubic-bezier(.2, .7, .2, 1), color .25s;
}
.rjkv-sbtn:hover {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-1px);
}
.rjkv-sbtn.rjkv-wa:hover { border-color: #25d366; color: #25d366; }
.rjkv-sbtn.is-copied { border-color: #34d399; color: #34d399; }

.rjkv-elsewhere { margin: 18px 0 0; font-size: 13px; color: var(--rjkv-dim); }
.rjkv-elsewhere a { color: var(--rjkv-muted); margin-left: 8px; }

/* ── Transcript ───────────────────────────────────────────────── */
.rjkv-transcript {
  margin: 26px 0 0; border: 1px solid var(--rjkv-line);
  border-radius: 14px; background: var(--rjkv-glass); overflow: hidden;
}
.rjkv-transcript summary {
  cursor: pointer; padding: 15px 18px; list-style: none;
  font: 600 14px var(--rjkv-font-d); color: var(--rjkv-ink);
  display: flex; justify-content: space-between; align-items: center;
}
.rjkv-transcript summary::-webkit-details-marker { display: none; }
.rjkv-transcript summary::after {
  content: '+'; font-size: 18px; color: var(--rjkv-dim); transition: transform .3s;
}
.rjkv-transcript[open] summary::after { transform: rotate(45deg); }
.rjkv-summary-hint { font: 500 12px var(--rjkv-font-b); color: var(--rjkv-dim); margin-left: auto; margin-right: 12px; }
.rjkv-transcript-body { padding: 2px 18px 18px; font-size: 14.4px; line-height: 1.78; }

.rjkv-cta { margin: 22px 0 0; font-size: 14.5px; color: var(--rjkv-ink); opacity: .88; }
.rjkv-content { margin: 22px 0 0; }

/* ── Related ──────────────────────────────────────────────────── */
.rjkv-related { margin: 74px 0 0; position: relative; z-index: 1; }
.rjkv-related-title {
  font: 700 1.45rem var(--rjkv-font-d); color: var(--rjkv-ink);
  letter-spacing: -.02em; margin: 0 0 18px;
}
.rjkv-grid-related { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .rjkv-single-grid { grid-template-columns: 1fr; gap: 30px; }
  .rjkv-player { max-width: 330px; margin-inline: auto; }
  .rjkv-nodl { justify-content: center; text-align: center; }
}
@media (max-width: 560px) {
  .rjkv-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; }
  .rjkv-gallery[data-columns] .rjkv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rjkv-card-title { font-size: 14px; }
  .rjkv-card-hook { display: none; }
  /* At this width the pill only ever renders as "READING…", which tells the
     reader nothing — and the filter chips already establish topic context. */
  .rjkv-pill { display: none; }
  .rjkv-quiz { padding: 17px 16px; }
  .rjkv-chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
  .rjkv-chips::-webkit-scrollbar { display: none; }
  .rjkv-chip { flex: none; }
}

/* ── Motion and contrast preferences ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rjkv * { animation: none !important; transition: none !important; }
  html.js .rjkv .reveal { opacity: 1; transform: none; }
  .rjkv-frames .rjkv-hoverframe { opacity: 0; }
  .rjkv-grad { color: var(--rjkv-ink); background: none; -webkit-text-fill-color: currentColor; }
}
@media (prefers-contrast: more) {
  .rjkv { --rjkv-line: rgba(255, 255, 255, .3); --rjkv-muted: #c8cce0; }
}

/* ════════════════════════════════════════════════════════════════
   Theme override layer

   Avada styles content elements with selectors like `.post-content h2`
   (0,1,1) and the site's dark-skin.css colours links via
   `#main a:not([style]):not(.fusion-button)` — an ID selector no class
   can outrank. Everything below is scoped to `.rjkv` so it cannot leak
   into the rest of the site. `!important` appears ONLY where the theme
   stack itself wins on ID or `!important`; the rest relies on the extra
   `.rjkv` class raising specificity honestly.
   ════════════════════════════════════════════════════════════════ */

/* Headings.
   Avada's responsive-typography script stamps
   `.fusion-responsive-typography-calculated` onto headings plus an inline
   `--fontSize`, and sizes them with an `!important` calc() built from
   variables it does not always define. When those are missing the calc is
   invalid and the heading collapses to the inherited 16px. Because that rule
   carries `!important`, only a more specific `!important` can win it back —
   hence the annotations on font-size here. Everything stays scoped to
   `.rjkv`, so no other heading on the site is affected. */
.rjkv .rjkv-title {
  font-size: clamp(1.9rem, 5vw, 3.2rem) !important;
  font-weight: 700;
  line-height: 1.06 !important;
  margin: 0;
}
.rjkv .rjkv-h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem) !important;
  font-weight: 700;
  line-height: 1.12 !important;
  margin: 0;
}
.rjkv .rjkv-card-title { font-size: 15px !important; font-weight: 600; line-height: 1.32 !important; margin: 0; }
.rjkv .rjkv-related-title { font-size: 1.45rem !important; font-weight: 700; margin: 0 0 18px; }
.rjkv .rjkv-quiz-q { font-size: 1.05rem !important; font-weight: 600; line-height: 1.4 !important; }
/* Centring the header block. The theme sets paragraph margins from a
   higher-specificity selector, which killed the `margin-inline: auto` that
   centres the constrained-width intro line — leaving it flush left under a
   centred headline. */
.rjkv .rjkv-head { text-align: center !important; }
.rjkv .rjkv-sub {
  font-size: 1.02rem !important;
  line-height: 1.6 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}
.rjkv .rjkv-lead { font-size: 1.02rem !important; line-height: 1.6 !important; }
.rjkv .rjkv-card-hook { font-size: 12.8px !important; line-height: 1.45 !important; }
.rjkv .rjkv-transcript-body { font-size: 14.4px !important; line-height: 1.78 !important; }

/* Links — the theme colours these from an ID selector. */
.rjkv .rjkv-card-title a,
.rjkv .rjkv-crumb a,
.rjkv .rjkv-tag,
.rjkv .rjkv-sbtn,
.rjkv .rjkv-elsewhere a {
  color: var(--rjkv-ink) !important;
  text-decoration: none !important;
}
.rjkv .rjkv-crumb a,
.rjkv .rjkv-elsewhere a { color: var(--rjkv-muted) !important; }
.rjkv .rjkv-crumb a:hover,
.rjkv .rjkv-elsewhere a:hover,
.rjkv .rjkv-card-title a:hover { color: #fff !important; }
.rjkv .rjkv-sbtn.rjkv-wa:hover { color: #25d366 !important; }

/* Buttons — Avada normalises button typography and padding. */
.rjkv .rjkv-chip,
.rjkv .rjkv-sbtn,
.rjkv .rjkv-quiz-retry,
.rjkv .rjkv-unmute {
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.2;
  text-shadow: none;
  box-shadow: none;
}
.rjkv .rjkv-chip[aria-pressed='true'] { box-shadow: 0 6px 22px -8px rgba(168, 85, 247, .75); }

/* Media — themes commonly force `img { max-width: 100%; height: auto }`,
   which breaks the absolutely-positioned 9:16 frame stack. */
.rjkv .rjkv-frames img {
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.rjkv .rjkv-video { max-width: 100%; margin: 0; }

/* Structure — reset inherited paragraph/fieldset spacing. */
.rjkv fieldset { border: 0; margin: 0; padding: 0; }
.rjkv legend { width: auto; padding: 0; margin-bottom: 14px; border: 0; }
.rjkv .rjkv-quiz-opt { margin-bottom: 8px; }
.rjkv .rjkv-transcript summary { list-style: none; }
