/* iGaming story card (hero of /casino-backlinks/; markup: templates/site/partials/stories/ig.html). Same family as
   story-gp.css: a light browser window, desktop at 11px beside the octopus (CSS zoom, site-saucer.css),
   phones/tablets under the hero text at .rs-zenith__mcard's 15px. Accents: green felt, card and chip colours; your
   link stays Rankstar purple. One 11 s loop (--T), transform/opacity only, and only on HTML boxes (under the desktop
   card's CSS zoom Chrome animates SVG elements on the main thread, every frame): the two cards, the three chip stacks
   and the dice are each an HTML layer over the photo, the DR arc an HTML box over the ring. The timeline:
     0–0.9 s   skeleton + load bar               1–1.6 s  title, byline, felt photo, paragraph rise in
     1.2–2.2 s two cards fan in, chip stacks rise 2–2.9 s  caret writes the anchor, highlight + underline follow
     3.3 s     "In-content link"                 3.7 s    stats panel: DR ring swings in, number pops, bars rise
     5 s       "Gambling-friendly site"          5.5 s    Live (+ ping)        ~10–10.9 s back to the skeleton.
   Reduced motion: no animation, the finished card (base styles are the end state). Off screen (.rs-zenith.is-still,
   set by js/gsug.js) every loop pauses. */
@layer components {
  .rs-gl-card.rs-story--ig { --T: 11s; --pop: cubic-bezier(.2, 1.25, .4, 1); --rise: cubic-bezier(.2, .8, .2, 1); --felt: #0F5A42;
    position: relative; display: block; width: 100%; padding: 0; gap: 0; border-radius: 1.05em; background: #fff;
    font-size: 1em; line-height: 1.25; color: #1F2230; text-align: left; transition: none; }
  .rs-story--ig svg { display: block; }

  /* browser chrome */
  .rs-story--ig .rs-st-chrome { position: relative; display: flex; align-items: center; gap: .5em; height: 2.1em; padding: 0 .7em;
    border-radius: 1.05em 1.05em 0 0; background: linear-gradient(#FBFAFD, #F4F3F8); border-bottom: 1px solid #ECEAF2; }
  .rs-story--ig .rs-st-dots { flex: none; display: flex; gap: .3em; }
  .rs-story--ig .rs-st-dots i { width: .48em; height: .48em; border-radius: 50%; background: #FF6A61; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
  .rs-story--ig .rs-st-dots i:nth-child(2) { background: #FDBE41; } .rs-story--ig .rs-st-dots i:nth-child(3) { background: #34C84A; }
  .rs-story--ig .rs-st-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: .32em; height: 1.4em; padding: 0 .6em; border-radius: 99px;
    background: #fff; box-shadow: inset 0 0 0 1px #E6E4EE; color: #8A8D9C; }
  .rs-story--ig .rs-st-url svg { flex: none; width: .66em; height: .66em; fill: none; stroke: #2E9E6A; stroke-width: 2.6; stroke-linecap: round; }
  .rs-story--ig .rs-st-url > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .56em; }
  .rs-story--ig .rs-st-url b { font-weight: 500; color: #2A2D3A; }
  .rs-story--ig .rs-st-live { flex: none; display: inline-flex; align-items: center; gap: .45em; height: 2.6em; padding: 0 .85em 0 .7em; border-radius: 99px;
    background: #E6F7EE; color: #12804A; font-size: .54em; font-weight: 700; letter-spacing: .01em; }
  .rs-story--ig .rs-st-live i { position: relative; width: .8em; height: .8em; border-radius: 50%; background: #22C55E; }
  .rs-story--ig .rs-st-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22C55E; opacity: 0; }
  .rs-story--ig .rs-st-load { position: absolute; left: 0; right: 0; bottom: -1px; height: .16em; border-radius: 0 99px 99px 0;
    background: linear-gradient(90deg, #A78BFA, #7C3AED 60%, #4F7BF7); transform-origin: left; opacity: 0; }

  /* the article */
  .rs-story--ig .rs-st-body { display: block; padding: .78em .8em 1.2em; }
  .rs-story--ig .rs-st-in { display: block; }
  .rs-story--ig :is(.rs-st-title, .rs-st-by, .rs-st-media, .rs-st-text)::before { content: ""; position: absolute; opacity: 0; pointer-events: none; }
  .rs-story--ig .rs-st-title { position: relative; display: block; font-size: .98em; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; color: #17151F; white-space: nowrap; }
  .rs-story--ig .rs-st-title::before { left: 0; top: .22em; width: 70%; height: .74em; border-radius: .37em; background: #EFEDF4; }
  .rs-story--ig .rs-st-by { position: relative; display: flex; align-items: center; gap: .5em; margin-top: .5em; min-height: 1.6em; }
  .rs-story--ig .rs-st-by::before { left: 0; top: 50%; width: 9em; height: 1.5em; margin-top: -.75em;
    background: radial-gradient(circle at .75em .75em, #EFEDF4 .74em, transparent .76em),
                linear-gradient(#EFEDF4, #EFEDF4) 2em .3em / 4.8em .38em no-repeat, linear-gradient(#EFEDF4, #EFEDF4) 2em .88em / 3.4em .3em no-repeat; }
  .rs-story--ig .rs-st-byin { display: flex; align-items: center; gap: .42em; min-width: 0; }
  .rs-story--ig .rs-st-ava { flex: none; display: grid; place-items: center; width: 3em; height: 3em; border-radius: 50%; font-size: .5em; font-weight: 700; letter-spacing: .02em;
    color: #fff; background: linear-gradient(135deg, #F6C766, #D9822B); box-shadow: 0 0 0 .2em #fff, 0 .3em .6em -.2em rgb(217 130 43 / .55); }
  .rs-story--ig .rs-st-who { display: grid; line-height: 1.25; white-space: nowrap; }
  .rs-story--ig .rs-st-who b { font-size: .6em; font-weight: 650; color: #1F2230; }
  .rs-story--ig .rs-st-who small { font-size: .5em; color: #767988; }

  /* felt photo + stats panel, side by side */
  .rs-story--ig .rs-st-media { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 7.7em; gap: .45em; height: 5.5em; margin-top: .6em; }
  .rs-story--ig .rs-st-media::before { inset: 0; border-radius: .7em; background: #F1EFF6; }
  .rs-story--ig .rs-st-pic { position: relative; display: block; overflow: hidden; border-radius: .7em;
    background: radial-gradient(120% 150% at 34% 26%, #1F8B63, var(--felt) 58%, #0A4232); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08), inset 0 -.6em 1.2em -.6em rgb(0 0 0 / .35); }
  .rs-story--ig .rs-st-pic svg { width: 100%; height: 100%; }
  /* the moving parts: each layer covers the photo and holds its own copy of the photo's <svg> (same viewBox, same
     "slice"), so it lines up with the static art exactly. The photo is a size container, so --u, one viewBox unit in
     px (what "slice" uses: the larger of width / 150 and height / 56), is known to CSS: the moves and the turning
     points (each part's bottom centre, what transform-box: fill-box gave on the SVG group) are in viewBox units from
     the photo's centre (75, 28). The drop shadows stay on the SVG groups inside, in viewBox units, as before. */
  .rs-story--ig .rs-st-pic { container-type: size; }
  .rs-story--ig .rs-ig-l { --u: max(100cqw / 150, 100cqh / 56); position: absolute; inset: 0; display: block; }
  .rs-story--ig .rs-ig-l svg { position: absolute; inset: 0; overflow: visible; }
  .rs-story--ig .rs-ig-card--a { transform-origin: calc(50% - 45.419 * var(--u)) calc(50% + 12.359 * var(--u)); }  /* card A: x 18–41.16, y 11.95–40.36 */
  .rs-story--ig .rs-ig-card--k { transform-origin: calc(50% - 35.066 * var(--u)) calc(50% + 12.508 * var(--u)); }  /* card K: x 29.09–50.78, y 13–40.51 */
  .rs-story--ig .rs-ig-dice { transform-origin: calc(50% + 52.5 * var(--u)) calc(50% + 14.167 * var(--u)); }      /* dice: x 120.83–134.17, y 28.83–42.17 */
  .rs-story--ig .rs-ig-sh { filter: drop-shadow(0 1.2px 1.2px rgb(0 0 0 / .3)); }
  .rs-story--ig .rs-ig-sh--chip { filter: drop-shadow(0 1.4px 1px rgb(0 0 0 / .32)); }
  .rs-story--ig .rs-st-stats { position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: .4em .55em .36em; border-radius: .7em;
    background: #fff; box-shadow: inset 0 0 0 1px #ECEAF2, 0 .45em 1em -.55em rgb(36 14 80 / .3); }
  .rs-story--ig .rs-st-dr { display: flex; align-items: center; gap: .42em; padding-bottom: .28em; border-bottom: 1px solid #F0EEF4; }
  .rs-story--ig .rs-st-ring { position: relative; flex: none; display: grid; place-items: center; width: 1.9em; height: 1.9em; }
  .rs-story--ig .rs-st-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .rs-story--ig .rs-ig-arc { position: absolute; inset: 0; display: block; transform: rotate(-90deg); }  /* the arc starts at 12 o'clock */
  .rs-story--ig .rs-st-ring b { position: relative; font-size: .6em; font-weight: 750; letter-spacing: -.02em; color: #0E3D2E; font-variant-numeric: tabular-nums; }
  .rs-story--ig .rs-st-drt { display: grid; line-height: 1.15; white-space: nowrap; }
  .rs-story--ig .rs-st-drt strong { font-size: .74em; font-weight: 750; letter-spacing: -.01em; color: #17151F; }
  .rs-story--ig .rs-st-drt small { font-size: .46em; font-weight: 500; color: #7A7D8C; }
  .rs-story--ig .rs-st-tl { display: flex; align-items: baseline; justify-content: space-between; gap: .3em; padding-top: .26em; white-space: nowrap; }
  .rs-story--ig .rs-st-tl span { font-size: .46em; font-weight: 600; color: #6B6F7E; }
  .rs-story--ig .rs-st-tl b { font-size: .62em; font-weight: 750; letter-spacing: -.01em; color: #17151F; font-variant-numeric: tabular-nums; }
  .rs-story--ig .rs-st-bars { display: flex; align-items: flex-end; gap: .2em; padding-top: .2em; border-bottom: 1px solid #ECEAF2; }
  .rs-story--ig .rs-st-bars i { flex: 1; height: var(--h); border-radius: .14em .14em 0 0; background: #D7EDE3; transform-origin: bottom; }
  .rs-story--ig .rs-st-bars i:nth-last-child(-n+3) { background: linear-gradient(#3DBB86, #0F7D56); }

  /* the paragraph and your link */
  .rs-story--ig .rs-st-text { position: relative; display: block; margin-top: .62em; font-size: .62em; line-height: 1.62; color: #4A4E5C; }
  .rs-story--ig .rs-st-text::before { left: 0; top: .5em; width: 100%; height: 2.2em;
    background: linear-gradient(#EFEDF4, #EFEDF4) 0 0 / 94% .6em no-repeat, linear-gradient(#EFEDF4, #EFEDF4) 0 1.62em / 66% .6em no-repeat; }
  .rs-story--ig .rs-st-a { position: relative; display: inline-block; vertical-align: top; white-space: nowrap; isolation: isolate; color: #6D28D9; font-weight: 650; }
  .rs-story--ig .rs-st-a::before { content: ""; position: absolute; inset: .14em -.24em .06em; z-index: -1; border-radius: .32em; background: rgb(124 58 237 / .13); transform-origin: left; }
  .rs-story--ig .rs-st-a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .2em; height: max(1px, .1em); border-radius: 1px; background: #7C3AED; transform-origin: left; }
  .rs-story--ig .rs-st-aw { position: relative; display: inline-block; vertical-align: top; overflow: hidden; }
  .rs-story--ig .rs-st-cover { position: absolute; inset: 0 -.05em 0 0; background: #fff; transform: translateX(101%); }
  .rs-story--ig .rs-st-cover::before { content: ""; position: absolute; left: 0; top: .28em; bottom: .28em; width: max(1.5px, .1em); border-radius: 1px; background: #7C3AED; opacity: 0; }

  /* callouts */
  .rs-story--ig .rs-st-chip { z-index: 3; display: inline-flex; align-items: center; gap: .45em; padding: .3em .75em .3em .3em; border-radius: 99px;
    background: rgb(255 255 255 / .97); box-shadow: 0 0 0 1px rgb(124 58 237 / .16), 0 .6em 1.3em -.5em rgb(46 16 101 / .45);
    font-size: .56em; font-weight: 650; line-height: 1.2; letter-spacing: -.005em; color: #2B1A4F; white-space: nowrap; }
  .rs-story--ig .rs-st-chip > b { flex: none; display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; color: #fff;
    background: linear-gradient(135deg, #9F7AEA, #6D28D9); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35); }
  .rs-story--ig .rs-st-chip svg { width: 1.08em; height: 1.08em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .rs-story--ig .rs-st-chip--g { margin-left: auto; color: #0D3B2C; box-shadow: 0 0 0 1px rgb(15 125 86 / .2), 0 .6em 1.3em -.5em rgb(10 66 50 / .45); }
  .rs-story--ig .rs-st-chip--g > b { background: radial-gradient(circle at 35% 30%, #2AA275, var(--felt)); }
  .rs-story--ig .rs-st-chip--g svg { width: .95em; height: .95em; fill: currentColor; stroke: none; }
  .rs-story--ig .rs-st-chip--a { position: absolute; left: -.35em; top: calc(100% + .6em); font-size: .9032em; }  /* .56em of the card, inside the .62em paragraph */
  .rs-story--ig .rs-st-chip--a::before { content: ""; position: absolute; left: 1.55em; top: -.3em; width: .7em; height: .7em; rotate: 45deg; border-radius: .12em 0 0 0;
    background: #fff; box-shadow: -1px -1px 0 rgb(124 58 237 / .16); }

  @media (max-width: 1023.98px) {
    .rs-zenith__mcard .rs-gl-card.rs-story--ig { font-size: min(1em, calc((100vw - 3.5rem) / 22.4)); }
  }

  /* ---- the loop ---- */
  @media (prefers-reduced-motion: no-preference) {
    .rs-story--ig :is(.rs-st-title, .rs-st-by, .rs-st-media, .rs-st-text)::before { animation: rs-ig-skel var(--T) linear infinite both; }
    .rs-story--ig .rs-st-by::before { animation-delay: .15s; } .rs-story--ig .rs-st-media::before { animation-delay: .3s; } .rs-story--ig .rs-st-text::before { animation-delay: .45s; }
    .rs-story--ig .rs-st-load { animation: rs-ig-load var(--T) linear infinite both; }
    .rs-story--ig :is(.rs-st-title > .rs-st-in, .rs-st-byin, .rs-st-pic, .rs-st-text > .rs-st-in) { animation: rs-ig-a1 var(--T) var(--rise) infinite both; }
    .rs-story--ig .rs-st-byin { animation-delay: .15s; } .rs-story--ig .rs-st-pic { animation-delay: .3s; } .rs-story--ig .rs-st-text > .rs-st-in { animation-delay: .45s; }
    .rs-story--ig .rs-ig-card--a { animation: rs-ig-cardin var(--T) linear infinite both; }
    .rs-story--ig .rs-ig-card--k { animation: rs-ig-cardin var(--T) linear infinite both; animation-delay: .14s; }
    .rs-story--ig .rs-ig-stack { animation: rs-ig-stack var(--T) linear infinite both; animation-delay: calc(var(--k) * 110ms); }
    .rs-story--ig .rs-ig-dice { animation: rs-ig-dice var(--T) linear infinite both; }
    .rs-story--ig .rs-st-cover { animation: rs-ig-type var(--T) linear infinite both; }
    .rs-story--ig .rs-st-cover::before { animation: rs-ig-caret var(--T) linear infinite both; }
    .rs-story--ig .rs-st-a::before { animation: rs-ig-hl var(--T) linear infinite both; }
    .rs-story--ig .rs-st-a::after { animation: rs-ig-hl var(--T) linear infinite both; animation-delay: .25s; }
    .rs-story--ig .rs-st-chip--a { animation: rs-ig-a2 var(--T) linear infinite both; }
    .rs-story--ig .rs-st-stats { animation: rs-ig-a3 var(--T) linear infinite both; }
    .rs-story--ig .rs-ig-arc { animation: rs-ig-arc var(--T) linear infinite both; }
    .rs-story--ig .rs-st-ring b { animation: rs-ig-num var(--T) linear infinite both; }
    .rs-story--ig .rs-st-bars i { animation: rs-ig-bar var(--T) linear infinite both; animation-delay: calc(var(--k) * 65ms); }
    .rs-story--ig .rs-st-chip--g { animation: rs-ig-a5 var(--T) linear infinite both; }
    .rs-story--ig .rs-st-live { animation: rs-ig-a6 var(--T) linear infinite both; }
    .rs-story--ig .rs-st-live i::after { animation: rs-ig-ping var(--T) linear infinite both; }
  }
  @keyframes rs-ig-skel { 0%, 5.5% { opacity: 1; } 8.5%, 93% { opacity: 0; } 97%, 100% { opacity: 1; } }
  @keyframes rs-ig-load { 0% { opacity: 1; transform: scaleX(0); animation-timing-function: cubic-bezier(.4, 0, .2, 1); } 7% { opacity: 1; transform: scaleX(1); } 10%, 100% { opacity: 0; transform: scaleX(1); } }
  @keyframes rs-ig-a1 { 0%, 5.5% { opacity: 0; translate: 0 .45em; } 10%, 90.5% { opacity: 1; translate: 0 0; } 95%, 100% { opacity: 0; translate: 0 0; } }
  /* inside the photo, in viewBox units (--u): the cards slide in from the left, turning, the stacks rise, the dice rolls in */
  @keyframes rs-ig-cardin { 0%, 10% { opacity: 0; transform: translate(calc(-14 * var(--u)), calc(4 * var(--u))) rotate(-10deg); animation-timing-function: cubic-bezier(.2, .9, .25, 1.05); } 17%, 100% { opacity: 1; transform: translate(0, 0) rotate(0deg); } }
  @keyframes rs-ig-stack { 0%, 12.5% { opacity: 0; transform: translateY(calc(9 * var(--u))); animation-timing-function: cubic-bezier(.2, 1, .3, 1.1); } 18.5%, 100% { opacity: 1; transform: translateY(0); } }
  @keyframes rs-ig-dice { 0%, 16% { opacity: 0; transform: translate(calc(10 * var(--u)), calc(-2 * var(--u))) rotate(70deg); animation-timing-function: cubic-bezier(.2, .9, .3, 1); } 22%, 100% { opacity: 1; transform: translate(0, 0) rotate(0deg); } }
  @keyframes rs-ig-type { 0%, 18% { transform: translateX(0); animation-timing-function: cubic-bezier(.45, .1, .55, .95); } 26.5%, 100% { transform: translateX(101%); } }
  @keyframes rs-ig-caret { 0%, 12.8% { opacity: 0; } 13%, 15% { opacity: 1; } 15.2%, 16.6% { opacity: 0; } 16.8%, 26.5% { opacity: 1; } 27.5%, 100% { opacity: 0; } }
  @keyframes rs-ig-hl { 0%, 26.5% { transform: scaleX(0); animation-timing-function: cubic-bezier(.3, .7, .2, 1); } 31%, 100% { transform: scaleX(1); } }
  @keyframes rs-ig-a2 { 0%, 30% { opacity: 0; translate: 0 .55em; scale: .88; animation-timing-function: var(--pop); } 34.5%, 90.5% { opacity: 1; translate: 0 0; scale: 1; } 95%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
  @keyframes rs-ig-a3 { 0%, 33.5% { opacity: 0; translate: 0 .6em; scale: .96; animation-timing-function: var(--rise); } 38%, 90.5% { opacity: 1; translate: 0 0; scale: 1; } 95%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
  @keyframes rs-ig-arc { 0%, 35.5% { opacity: 0; transform: rotate(-250deg); animation-timing-function: cubic-bezier(.25, .9, .3, 1); } 37% { opacity: 1; } 44%, 100% { opacity: 1; transform: rotate(-90deg); } }
  @keyframes rs-ig-num { 0%, 40% { opacity: 0; scale: .6; animation-timing-function: var(--pop); } 44%, 100% { opacity: 1; scale: 1; } }
  @keyframes rs-ig-bar { 0%, 38% { transform: scaleY(0); animation-timing-function: cubic-bezier(.25, .9, .3, 1.15); } 44%, 100% { transform: scaleY(1); } }
  @keyframes rs-ig-a5 { 0%, 45% { opacity: 0; translate: 0 .55em; scale: .88; animation-timing-function: var(--pop); } 49.5%, 90.5% { opacity: 1; translate: 0 0; scale: 1; } 95%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
  @keyframes rs-ig-a6 { 0%, 50% { opacity: 0; scale: .7; animation-timing-function: var(--pop); } 54%, 90.5% { opacity: 1; scale: 1; } 95%, 100% { opacity: 0; scale: 1; } }
  @keyframes rs-ig-ping { 0%, 54% { opacity: 0; transform: scale(1); } 54.5% { opacity: .6; transform: scale(1); } 62.5%, 100% { opacity: 0; transform: scale(3.2); } }
  /* hero off screen: every loop pauses, pseudo-elements too (the * in site-saucer.css's rule does not reach them) */
  .rs-zenith.is-still .rs-story--ig *, .rs-zenith.is-still .rs-story--ig *::before, .rs-zenith.is-still .rs-story--ig *::after { animation-play-state: paused !important; }
}
