/* Guest posts story card (hero of /guest-posting-services/; markup: templates/site/partials/stories/gp.html).
   A light browser window beside the octopus. Desktop: HTML card at 11px, scaled by CSS zoom (site-saucer.css).
   Phones/tablets: under the hero text, inheriting .rs-zenith__mcard's 15px. Everything is in em.
   One 11 s loop (--T), transform/opacity only, and only on HTML boxes: Chrome cannot run an animation on an SVG
   element (the <svg> itself included) on the compositor while it sits under CSS zoom, so the photo's slow zoom moves
   .rs-st-zoom, the HTML box around the picture. The timeline:
     0–0.9 s   skeleton + purple load bar        1–1.6 s  title, byline, photo, paragraph rise in
     1.4–2 s   caret blinks in the gap            2–2.9 s  caret writes the anchor, highlight + underline follow
     3.3 s     "In-content link"                  3.7 s    "Organic traffic" panel, bars rise one by one
     4.6 s     "Real site, real readers"          5.1 s    "Written for their audience"   5.6 s  Live (+ ping)
     ~10–10.9 s everything fades back to the skeleton.
   Reduced motion: no animation, the finished card (base styles are the end state; keyframes hold the hidden ones).
   Off screen (.rs-zenith.is-still, set by js/gsug.js) every loop pauses. */
@layer components {
  .rs-gl-card.rs-story--gp { --T: 11s; --pop: cubic-bezier(.2, 1.25, .4, 1); --rise: cubic-bezier(.2, .8, .2, 1);
    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--gp svg { display: block; }

  /* browser chrome: traffic lights, URL pill, Live status, load bar */
  .rs-story--gp .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--gp .rs-st-dots { flex: none; display: flex; gap: .3em; }
  .rs-story--gp .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--gp .rs-st-dots i:nth-child(2) { background: #FDBE41; } .rs-story--gp .rs-st-dots i:nth-child(3) { background: #34C84A; }
  .rs-story--gp .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--gp .rs-st-url svg { flex: none; width: .66em; height: .66em; fill: none; stroke: #2E9E6A; stroke-width: 2.6; stroke-linecap: round; }
  .rs-story--gp .rs-st-url > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .56em; }
  .rs-story--gp .rs-st-url b { font-weight: 500; color: #2A2D3A; }
  .rs-story--gp .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--gp .rs-st-live i { position: relative; width: .8em; height: .8em; border-radius: 50%; background: #22C55E; }
  .rs-story--gp .rs-st-live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22C55E; opacity: 0; }
  .rs-story--gp .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--gp .rs-st-body { display: block; padding: .78em .8em 1.2em; }
  .rs-story--gp .rs-st-in { display: block; }
  .rs-story--gp :is(.rs-st-title, .rs-st-by, .rs-st-media, .rs-st-text)::before { content: ""; position: absolute; opacity: 0; pointer-events: none; }
  .rs-story--gp .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--gp .rs-st-title::before { left: 0; top: .22em; width: 74%; height: .74em; border-radius: .37em; background: #EFEDF4; }
  .rs-story--gp .rs-st-by { position: relative; display: flex; align-items: center; gap: .5em; margin-top: .5em; min-height: 1.6em; }
  .rs-story--gp .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--gp .rs-st-byin { display: flex; align-items: center; gap: .42em; min-width: 0; }
  .rs-story--gp .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, #FDBA74, #F472B6); box-shadow: 0 0 0 .2em #fff, 0 .3em .6em -.2em rgb(244 114 182 / .55); }
  .rs-story--gp .rs-st-who { display: grid; line-height: 1.25; white-space: nowrap; }
  .rs-story--gp .rs-st-who b { font-size: .6em; font-weight: 650; color: #1F2230; }
  .rs-story--gp .rs-st-who small { font-size: .5em; color: #767988; }

  /* photo + organic traffic panel */
  .rs-story--gp .rs-st-media { position: relative; display: block; height: 5.5em; margin-top: .6em; }
  .rs-story--gp .rs-st-media::before { inset: 0; border-radius: .7em; background: #F1EFF6; }
  .rs-story--gp .rs-st-pic { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: .7em; background: linear-gradient(#FBE3D3, #F8D3CC 55%, #E7D6F3); }
  .rs-story--gp .rs-st-zoom { display: block; width: 100%; height: 100%; transform-origin: 32% 60%; }
  .rs-story--gp .rs-st-pic svg { width: 100%; height: 100%; }
  .rs-story--gp .rs-st-traffic { position: absolute; top: .42em; right: .42em; bottom: .42em; width: 8.4em; display: grid; grid-template-rows: auto auto minmax(0, 1fr);
    padding: .45em .58em .4em; border-radius: .6em; background: rgb(255 255 255 / .95); box-shadow: 0 0 0 1px rgb(255 255 255 / .8), 0 .55em 1.2em -.5em rgb(36 14 80 / .4); }
  .rs-story--gp .rs-st-tlabel { display: flex; align-items: center; justify-content: space-between; font-size: .5em; font-weight: 600; color: #6B6F7E; white-space: nowrap; }
  .rs-story--gp .rs-st-tlabel b { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: #E3F6EC; color: #15965A; }
  .rs-story--gp .rs-st-tlabel svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
  .rs-story--gp .rs-st-tval { display: block; margin-top: .05em; font-size: .92em; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; color: #17151F; font-variant-numeric: tabular-nums; }
  .rs-story--gp .rs-st-tval small { margin-left: .15em; font-size: .54em; font-weight: 500; letter-spacing: 0; color: #8A8D9C; }
  .rs-story--gp .rs-st-bars { display: flex; align-items: flex-end; gap: .2em; padding-top: .35em; border-bottom: 1px solid #ECEAF2; }
  .rs-story--gp .rs-st-bars i { flex: 1; height: var(--h); border-radius: .14em .14em 0 0; background: #E2DBF6; transform-origin: bottom; }
  .rs-story--gp .rs-st-bars i:nth-last-child(-n+3) { background: linear-gradient(#A78BFA, #7C3AED); }

  /* the paragraph and your link */
  .rs-story--gp .rs-st-text { position: relative; display: block; margin-top: .62em; font-size: .62em; line-height: 1.62; color: #4A4E5C; }
  .rs-story--gp .rs-st-text::before { left: 0; top: .5em; width: 100%; height: 2.2em;
    background: linear-gradient(#EFEDF4, #EFEDF4) 0 0 / 92% .6em no-repeat, linear-gradient(#EFEDF4, #EFEDF4) 0 1.62em / 64% .6em no-repeat; }
  .rs-story--gp .rs-st-a { position: relative; display: inline-block; vertical-align: top; white-space: nowrap; isolation: isolate; color: #6D28D9; font-weight: 650; }
  .rs-story--gp .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--gp .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--gp .rs-st-aw { position: relative; display: inline-block; vertical-align: top; overflow: hidden; }
  .rs-story--gp .rs-st-cover { position: absolute; inset: 0 -.05em 0 0; background: #fff; transform: translateX(101%); }
  .rs-story--gp .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: glass pills with a purple icon */
  .rs-story--gp .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--gp .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--gp .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--gp .rs-st-chip--c { margin-left: auto; }
  .rs-story--gp .rs-st-chip--b { position: absolute; left: .5em; bottom: .5em; }
  .rs-story--gp .rs-st-chip--a { position: absolute; left: -.35em; top: calc(100% + .6em); font-size: .9032em; font-weight: 650; color: #2B1A4F; }  /* .56em of the card, inside the .62em paragraph */
  .rs-story--gp .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) {
    /* phones: never narrower than ~22.4em, so the layout holds on a 360 px screen too */
    .rs-zenith__mcard .rs-gl-card.rs-story--gp { font-size: min(1em, calc((100vw - 3.5rem) / 22.4)); }
  }

  /* ---- the loop ---- */
  @media (prefers-reduced-motion: no-preference) {
    .rs-story--gp :is(.rs-st-title, .rs-st-by, .rs-st-media, .rs-st-text)::before { animation: rs-gp-skel var(--T) linear infinite both; }
    .rs-story--gp .rs-st-by::before { animation-delay: .15s; } .rs-story--gp .rs-st-media::before { animation-delay: .3s; } .rs-story--gp .rs-st-text::before { animation-delay: .45s; }
    .rs-story--gp .rs-st-load { animation: rs-gp-load var(--T) linear infinite both; }
    .rs-story--gp :is(.rs-st-title > .rs-st-in, .rs-st-byin, .rs-st-pic, .rs-st-text > .rs-st-in) { animation: rs-gp-a1 var(--T) var(--rise) infinite both; }
    .rs-story--gp .rs-st-byin { animation-delay: .15s; } .rs-story--gp .rs-st-pic { animation-delay: .3s; } .rs-story--gp .rs-st-text > .rs-st-in { animation-delay: .45s; }
    .rs-story--gp .rs-st-zoom { animation: rs-gp-zoom var(--T) cubic-bezier(.25, .6, .3, 1) infinite both; }
    .rs-story--gp .rs-st-cover { animation: rs-gp-type var(--T) linear infinite both; }
    .rs-story--gp .rs-st-cover::before { animation: rs-gp-caret var(--T) linear infinite both; }
    .rs-story--gp .rs-st-a::before { animation: rs-gp-hl var(--T) linear infinite both; }
    .rs-story--gp .rs-st-a::after { animation: rs-gp-hl var(--T) linear infinite both; animation-delay: .25s; }
    .rs-story--gp .rs-st-chip--a { animation: rs-gp-a2 var(--T) linear infinite both; }
    .rs-story--gp .rs-st-traffic { animation: rs-gp-a3 var(--T) linear infinite both; }
    .rs-story--gp .rs-st-bars i { animation: rs-gp-bar var(--T) linear infinite both; animation-delay: calc(var(--k) * 60ms); }
    .rs-story--gp .rs-st-chip--b { animation: rs-gp-a4 var(--T) linear infinite both; }
    .rs-story--gp .rs-st-chip--c { animation: rs-gp-a5 var(--T) linear infinite both; }
    .rs-story--gp .rs-st-live { animation: rs-gp-a6 var(--T) linear infinite both; }
    .rs-story--gp .rs-st-live i::after { animation: rs-gp-ping var(--T) linear infinite both; }
  }
  @keyframes rs-gp-skel { 0%, 5.5% { opacity: 1; } 8.5%, 93% { opacity: 0; } 97%, 100% { opacity: 1; } }
  @keyframes rs-gp-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-gp-a1 { 0%, 5.5% { opacity: 0; translate: 0 .45em; } 10%, 90.5% { opacity: 1; translate: 0 0; } 95%, 100% { opacity: 0; translate: 0 0; } }
  @keyframes rs-gp-zoom { 0%, 8% { transform: scale(1.1); } 45%, 100% { transform: scale(1); } }
  @keyframes rs-gp-type { 0%, 18% { transform: translateX(0); animation-timing-function: cubic-bezier(.45, .1, .55, .95); } 26.5%, 100% { transform: translateX(101%); } }
  @keyframes rs-gp-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-gp-hl { 0%, 26.5% { transform: scaleX(0); animation-timing-function: cubic-bezier(.3, .7, .2, 1); } 31%, 100% { transform: scaleX(1); } }
  @keyframes rs-gp-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-gp-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-gp-bar { 0%, 36% { transform: scaleY(0); animation-timing-function: cubic-bezier(.25, .9, .3, 1.15); } 42%, 100% { transform: scaleY(1); } }
  @keyframes rs-gp-a4 { 0%, 41.5% { opacity: 0; translate: 0 .55em; scale: .88; animation-timing-function: var(--pop); } 46%, 90.5% { opacity: 1; translate: 0 0; scale: 1; } 95%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
  @keyframes rs-gp-a5 { 0%, 46% { opacity: 0; translate: 0 .55em; scale: .88; animation-timing-function: var(--pop); } 50.5%, 90.5% { opacity: 1; translate: 0 0; scale: 1; } 95%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
  @keyframes rs-gp-a6 { 0%, 50.5% { opacity: 0; scale: .7; animation-timing-function: var(--pop); } 54.5%, 90.5% { opacity: 1; scale: 1; } 95%, 100% { opacity: 0; scale: 1; } }
  @keyframes rs-gp-ping { 0%, 54.5% { opacity: 0; transform: scale(1); } 55% { opacity: .6; transform: scale(1); } 63%, 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--gp *, .rs-zenith.is-still .rs-story--gp *::before, .rs-zenith.is-still .rs-story--gp *::after { animation-play-state: paused !important; }
}
