/* Niche edits story card (hero, owner Nov 13 2026): partials/stories/ne.html.
   An aged article (published 2023, indexed, already ranking, visits/mo). A drop line marks a spot mid-paragraph, the
   text below slides down to open two lines, a new sentence types itself in (clip-path steps + a caret riding the clip
   edge), your link gets its underline and tint, "+1 sentence added" pops, then the "Natural insertion" callout. Soft
   reset: the new lines fade, the paragraph closes again. One 11 s loop, transform/opacity (+ clip-path) only, on HTML
   boxes only (under the desktop card's CSS zoom Chrome animates SVG elements on the main thread, every frame: the
   visits ping is an HTML dot). Off screen (.rs-zenith.is-still, set by js/gsug.js) every loop pauses.
   Sizes in em: 11px inside the desktop saucer card (zoomed), 15px in the phone/tablet copy (.rs-zenith__mcard).
   Base values = the finished state, so reduced motion only has to switch the animations off. */
@layer components {
  .rs-story--ne { --ne-t: 11s; --ne-ink: #202124; --ne-mute: #5F6368; --ne-bar: #E3E5E8; --ne-vio: #7C3AED; --ne-vio-d: #6D28D9;
    position: relative; display: block; height: 16.4em; padding: .4em; gap: 0; font-size: inherit; container: rs-ne / inline-size; line-height: 1.25; color: var(--ne-ink); border-radius: 1.05em; text-align: left; }
  .rs-story--ne svg { display: block; flex: none; }

  /* the browser window */
  .rs-story--ne .rs-ne-win { position: relative; display: block; height: 100%; overflow: hidden; border-radius: .78em; background: #fff;
    box-shadow: 0 0 0 1px rgb(32 33 36 / .07), 0 .15em .4em rgb(32 33 36 / .06); }
  .rs-story--ne .rs-ne-bar { display: flex; align-items: center; gap: .3em; height: 1.95em; padding: 0 .6em; background: #F1F3F4; border-bottom: 1px solid #E6E8EB; }
  .rs-story--ne .rs-ne-bar > i { flex: none; width: .44em; height: .44em; border-radius: 50%; background: #D7DADE; }
  .rs-story--ne .rs-ne-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: .45em; height: 1.95em; margin-left: .45em; padding: 0 .85em; border-radius: 99px;
    background: #fff; box-shadow: 0 0 0 1px rgb(32 33 36 / .06); font-size: .6em; color: var(--ne-mute); }
  .rs-story--ne .rs-ne-url svg { width: .95em; height: .95em; color: #80868B; }
  .rs-story--ne .rs-ne-url span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

  /* the article: bottom fades out like a page that goes on */
  .rs-story--ne .rs-ne-page { position: relative; display: block; height: calc(100% - 1.95em); padding: .66em .78em 0;
    -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 99%); mask-image: linear-gradient(180deg, #000 74%, transparent 99%); }
  .rs-story--ne .rs-ne-kick { display: flex; align-items: center; gap: .55em; font-size: .6em; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #80868B; white-space: nowrap; }
  .rs-story--ne .rs-ne-kick i { width: .3em; height: .3em; border-radius: 50%; background: #BDC1C6; }
  .rs-story--ne .rs-ne-h { display: block; margin-top: .26em; font-size: .98em; font-weight: 700; line-height: 1.2; letter-spacing: -.012em; color: var(--ne-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rs-story--ne .rs-ne-stats { display: flex; align-items: center; gap: .4em; margin-top: .62em; font-size: .6em; white-space: nowrap; }
  .rs-story--ne .rs-ne-badge { display: inline-flex; align-items: center; gap: .3em; padding: .26em .62em .26em .45em; border-radius: 99px; font-weight: 650; }
  .rs-story--ne .rs-ne-badge svg { width: 1.05em; height: 1.05em; }
  .rs-story--ne .rs-ne-badge--ok { background: #E6F4EA; color: #137333; }
  .rs-story--ne .rs-ne-badge--rank { background: #E8F0FE; color: #1967D2; }
  .rs-story--ne .rs-ne-visits { display: inline-flex; align-items: center; gap: .35em; margin-left: auto; color: var(--ne-mute); }
  .rs-story--ne .rs-ne-spark { position: relative; flex: none; display: block; width: 2.9em; height: 1.02em; color: #34A853; }
  .rs-story--ne .rs-ne-spark svg { position: relative; width: 100%; height: 100%; overflow: visible; }
  .rs-story--ne .rs-ne-visits b { font-weight: 700; color: var(--ne-ink); }
  /* the ping: a dot under the sparkline's end point (39, 2 of the 40×14 viewBox, r 1.9; the box is 2.9em wide, so one
     unit = .0725em and the drawing sits .0025em below the top). It grows and fades from its own centre. */
  .rs-story--ne .rs-ne-ping { position: absolute; left: 2.68975em; top: .00975em; width: .2755em; height: .2755em; border-radius: 50%; background: #34A853; }

  /* paragraph: grey lines on a 1.25em pitch; the new sentence takes two of them */
  .rs-story--ne .rs-ne-text { position: relative; display: block; margin-top: .62em; }
  .rs-story--ne .rs-ne-ln { position: relative; display: block; height: 1.25em; }
  .rs-story--ne .rs-ne-ln::before { content: ""; position: absolute; left: 0; top: 50%; width: var(--w, 100%); height: .36em; margin-top: -.18em; border-radius: 99px; background: var(--ne-bar); }
  .rs-story--ne .rs-ne-ln--a { --w: 100%; } .rs-story--ne .rs-ne-ln--b { --w: 93%; } .rs-story--ne .rs-ne-ln--c { --w: 97%; }
  .rs-story--ne .rs-ne-ln--d { --w: 88%; } .rs-story--ne .rs-ne-ln--e { --w: 54%; } .rs-story--ne .rs-ne-ln--gap { height: .55em; } .rs-story--ne .rs-ne-ln--gap::before { content: none; }
  .rs-story--ne .rs-ne-rest { position: relative; display: block; }
  .rs-story--ne .rs-ne-new { position: relative; display: block; height: 2.5em; }
  /* once typed, the two new lines wear a soft "added" wash with a violet gutter mark, like tracked changes */
  .rs-story--ne .rs-ne-new::before { content: ""; position: absolute; inset: .02em -.4em .02em -.78em; border-radius: 0 .5em .5em 0; background: linear-gradient(90deg, rgb(124 58 237 / .09), rgb(124 58 237 / .035) 70%, transparent);
    box-shadow: inset .16em 0 0 var(--ne-vio); transform-origin: left center; }
  /* the editor's drop line between two lines of text, before they part */
  .rs-story--ne .rs-ne-drop { position: absolute; left: -.2em; right: 6%; top: -.07em; z-index: 2; height: .14em; border-radius: 99px; background: var(--ne-vio); opacity: 0; transform-origin: left center;
    box-shadow: 0 0 .5em rgb(124 58 237 / .45); }
  .rs-story--ne .rs-ne-drop::before { content: ""; position: absolute; left: -.12em; top: 50%; width: .42em; height: .42em; margin-top: -.21em; border-radius: 50%; background: var(--ne-vio); }
  .rs-story--ne .rs-ne-tl { position: relative; display: block; width: max-content; max-width: 100%; height: 1.603em; font-size: .78em; line-height: 1.603; white-space: nowrap; color: var(--ne-ink); font-weight: 500; }
  .rs-story--ne .rs-ne-tx { display: block; clip-path: inset(-.5em 0 -.5em -.4em); }
  .rs-story--ne .rs-ne-link { position: relative; z-index: 0; padding: .05em .16em; margin: 0 -.04em; border-radius: .3em; color: var(--ne-vio-d); font-weight: 650; }
  .rs-story--ne .rs-ne-link::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgb(124 58 237 / .12); }
  .rs-story--ne .rs-ne-link::after { content: ""; position: absolute; left: .16em; right: .16em; bottom: .02em; height: .1em; border-radius: 99px; background: var(--ne-vio); transform-origin: left center; }
  /* the caret rides the clip edge: its box is the line's own width, so translateX(100%) = the end of the line */
  .rs-story--ne .rs-ne-car { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
  .rs-story--ne .rs-ne-car::before { content: ""; position: absolute; left: .02em; top: .24em; bottom: .24em; width: .11em; border-radius: .1em; background: var(--ne-vio); }
  .rs-story--ne .rs-ne-added { position: absolute; right: 0; top: 75%; translate: 0 -50%; display: inline-flex; align-items: center; padding: .22em .62em; border-radius: 99px; font-size: .6em; font-weight: 700; white-space: nowrap;
    color: var(--ne-vio-d); background: rgb(124 58 237 / .1); box-shadow: inset 0 0 0 1px rgb(124 58 237 / .22); }

  /* glass callouts straddling the bottom edge (left/bottom stay inside the card's own box) */
  .rs-story--ne .rs-ne-call { position: absolute; bottom: -1.05em; z-index: 3; display: inline-flex; align-items: center; gap: .45em; padding: .32em .78em .32em .32em; border-radius: 99px;
    font-size: .66em; font-weight: 650; line-height: 1.2; white-space: nowrap; color: #2E1065;
    background: linear-gradient(160deg, rgb(255 255 255 / .98), rgb(246 241 255 / .95));
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgb(124 58 237 / .16), 0 .8em 1.6em -.7em rgb(46 16 101 / .55); }
  .rs-story--ne .rs-ne-call i { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; color: #fff;
    background: linear-gradient(140deg, #9F67FF, #6D28D9); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 .2em .45em -.15em rgb(109 40 217 / .6); }
  .rs-story--ne .rs-ne-call svg { width: 1em; height: 1em; }
  .rs-story--ne .rs-ne-call--aged { left: 1.3em; }
  .rs-story--ne .rs-ne-call--nat { right: 1.3em; }

  /* ------------------------------------------------------------------ the loop */
  .rs-story--ne .rs-ne-call--aged { animation: rs-ne-aged var(--ne-t) cubic-bezier(.2, .8, .25, 1) infinite; }
  .rs-story--ne .rs-ne-drop { animation: rs-ne-drop var(--ne-t) cubic-bezier(.3, .7, .2, 1) infinite; }
  .rs-story--ne .rs-ne-rest { animation: rs-ne-rest var(--ne-t) cubic-bezier(.45, 0, .2, 1) infinite; }
  .rs-story--ne .rs-ne-new { animation: rs-ne-new var(--ne-t) linear infinite; }
  .rs-story--ne .rs-ne-tl--1 .rs-ne-tx { animation: rs-ne-t1 var(--ne-t) linear infinite; }
  .rs-story--ne .rs-ne-tl--1 .rs-ne-car { animation: rs-ne-c1 var(--ne-t) linear infinite, rs-ne-c1v var(--ne-t) linear infinite; }
  .rs-story--ne .rs-ne-tl--2 .rs-ne-tx { animation: rs-ne-t2 var(--ne-t) linear infinite; }
  .rs-story--ne .rs-ne-tl--2 .rs-ne-car { animation: rs-ne-c2 var(--ne-t) linear infinite, rs-ne-c2v var(--ne-t) linear infinite; }
  .rs-story--ne .rs-ne-link::before { animation: rs-ne-tint var(--ne-t) ease-out infinite; }
  .rs-story--ne .rs-ne-link::after { animation: rs-ne-ul var(--ne-t) cubic-bezier(.6, 0, .2, 1) infinite; }
  .rs-story--ne .rs-ne-new::before { animation: rs-ne-wash var(--ne-t) cubic-bezier(.3, .7, .2, 1) infinite; }
  .rs-story--ne .rs-ne-added { animation: rs-ne-chip var(--ne-t) cubic-bezier(.2, .9, .3, 1.2) infinite; }
  .rs-story--ne .rs-ne-call--nat { animation: rs-ne-nat var(--ne-t) cubic-bezier(.2, .8, .25, 1) infinite; }
  .rs-story--ne .rs-ne-ping { animation: rs-ne-ping 2.2s ease-out infinite; }

  @keyframes rs-ne-aged { 0%, 4% { opacity: 0; transform: translateY(.6em) scale(.9); } 8.5%, 91% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; transform: translateY(.3em) scale(.96); } }
  @keyframes rs-ne-drop { 0%, 9.5% { opacity: 0; transform: scaleX(0); } 13.5%, 16% { opacity: 1; transform: scaleX(1); } 19%, 100% { opacity: 0; transform: scaleX(1); } }
  @keyframes rs-ne-rest { 0%, 15% { transform: translateY(-2.5em); } 20.5%, 95% { transform: none; } 99.5%, 100% { transform: translateY(-2.5em); } }
  @keyframes rs-ne-new { 0%, 90% { opacity: 1; } 94%, 98% { opacity: 0; } 100% { opacity: 1; } }
  @keyframes rs-ne-t1 { 0%, 21% { clip-path: inset(-.5em 100% -.5em -.4em); animation-timing-function: steps(23, end); } 37%, 95% { clip-path: inset(-.5em 0 -.5em -.4em); } 96%, 100% { clip-path: inset(-.5em 100% -.5em -.4em); } }
  @keyframes rs-ne-c1 { 0%, 21% { transform: translateX(0); animation-timing-function: steps(23, end); } 37%, 100% { transform: translateX(100%); } }
  @keyframes rs-ne-c1v { 0%, 18.9% { opacity: 0; } 19%, 37.4% { opacity: 1; } 37.5%, 100% { opacity: 0; } }
  @keyframes rs-ne-t2 { 0%, 38% { clip-path: inset(-.5em 100% -.5em -.4em); animation-timing-function: steps(11, end); } 46%, 95% { clip-path: inset(-.5em 0 -.5em -.4em); } 96%, 100% { clip-path: inset(-.5em 100% -.5em -.4em); } }
  @keyframes rs-ne-c2 { 0%, 38% { transform: translateX(0); animation-timing-function: steps(11, end); } 46%, 100% { transform: translateX(100%); } }
  @keyframes rs-ne-c2v { 0%, 37.4% { opacity: 0; } 37.5%, 47.4% { opacity: 1; } 47.5%, 49.4% { opacity: 0; } 49.5%, 51.4% { opacity: 1; } 51.5%, 100% { opacity: 0; } }
  @keyframes rs-ne-tint { 0%, 46% { opacity: 0; } 50%, 91% { opacity: 1; } 95%, 100% { opacity: 0; } }
  @keyframes rs-ne-ul { 0%, 46.5% { transform: scaleX(0); } 51.5%, 95% { transform: scaleX(1); } 96%, 100% { transform: scaleX(0); } }
  @keyframes rs-ne-wash { 0%, 46.5% { opacity: 0; transform: scaleX(.6); } 51%, 100% { opacity: 1; transform: none; } }
  @keyframes rs-ne-chip { 0%, 50% { opacity: 0; transform: translateY(.35em) scale(.85); } 54%, 90% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: scale(.94); } }
  @keyframes rs-ne-nat { 0%, 56% { opacity: 0; transform: translateY(.6em) scale(.9); } 60.5%, 91% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; transform: translateY(.3em) scale(.96); } }
  @keyframes rs-ne-ping { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.6); } }

  /* narrow phones (card under ~21em, e.g. 360px wide): the one-line headline steps down instead of being cut */
  @container rs-ne (max-width: 21em) { .rs-story--ne .rs-ne-h { font-size: .9em; } }
  /* phones and tablets: the copy under the hero text (15px base); keep the callouts tucked in */
  .rs-zenith__mcard .rs-story--ne .rs-ne-call { bottom: -.95em; }
  .rs-zenith__mcard .rs-story--ne .rs-ne-call--aged { left: .9em; }
  .rs-zenith__mcard .rs-story--ne .rs-ne-call--nat { right: .9em; }

  @media (prefers-reduced-motion: reduce) {
    .rs-story--ne *, .rs-story--ne *::before, .rs-story--ne *::after { animation: none !important; }
    .rs-story--ne .rs-ne-ping { opacity: 0; }
  }
  /* 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--ne *, .rs-zenith.is-still .rs-story--ne *::before, .rs-zenith.is-still .rs-story--ne *::after { animation-play-state: paused !important; }
}
