/* Multilingual (international link building) story card (hero, owner Nov 13 2026): partials/stories/ml.html.
   A segmented language switch (FR · ES · IT · PT) whose white thumb slides every 2.5 s; below it a browser window whose
   site, headline, local writer and in-text anchor cross-fade to the matching native article (4 stacked layers, each
   on the same 10 s keyframes, delayed 0 / 2.5 / 5 / 7.5 s). The anchor's underline draws on each article. A small
   globe turns beside "+ more languages soon" (each meridian an HTML box: under the desktop card's CSS zoom Chrome
   animates SVG elements on the main thread, every frame); the "Native writer" callout's icon taps once per switch.
   Sizes in em: 11px inside the desktop saucer card (zoomed), 15px in the phone/tablet copy (.rs-zenith__mcard).
   Base values = the French article, finished, so reduced motion only switches the animations off. Off screen
   (.rs-zenith.is-still, set by js/gsug.js) every loop pauses. */
@layer components {
  .rs-story--ml { --ml-t: 10s; --ml-ink: #202124; --ml-mute: #5F6368; --ml-bar: #E3E5E8; --ml-vio: #7C3AED; --ml-vio-d: #6D28D9;
    position: relative; display: block; height: 16.6em; padding: .45em; gap: 0; font-size: inherit; line-height: 1.25; color: var(--ml-ink); border-radius: 1.05em; text-align: left; }
  .rs-story--ml svg { display: block; flex: none; }

  /* top row: the language switch + the "more soon" hint */
  .rs-story--ml .rs-ml-top { display: flex; align-items: center; gap: .6em; height: 1.9em; padding: 0 .1em 0 0; }
  .rs-story--ml .rs-ml-seg { position: relative; flex: none; display: grid; grid-template-columns: repeat(4, 4.55em); height: 3em; padding: .2em; border-radius: 99px;
    font-size: .62em; font-weight: 700; letter-spacing: .02em; color: var(--ml-ink);
    background: rgb(76 29 149 / .08); box-shadow: inset 0 1px 2px rgb(46 16 101 / .12), inset 0 0 0 1px rgb(124 58 237 / .1); }
  .rs-story--ml .rs-ml-thumb { position: absolute; left: .2em; top: .2em; bottom: .2em; width: 4.55em; border-radius: 99px; background: #fff;
    box-shadow: 0 .15em .5em -.1em rgb(46 16 101 / .3), 0 0 0 1px rgb(124 58 237 / .14); }
  .rs-story--ml .rs-ml-opt { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: .4em; opacity: .5; }
  .rs-story--ml .rs-ml-opt.rs-ml-k0 { opacity: 1; }
  .rs-story--ml .rs-ml-flag { display: block; flex: none; width: 1.5em; height: 1em; overflow: hidden; border-radius: .2em; box-shadow: 0 0 0 1px rgb(32 33 36 / .14); }
  .rs-story--ml .rs-ml-flag svg { width: 100%; height: 100%; }
  .rs-story--ml .rs-ml-soon { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: .45em; font-size: .6em; font-weight: 600; line-height: 1.15; text-align: right; color: #5B3E96; }
  .rs-story--ml .rs-ml-soon > span { min-width: 0; }
  .rs-story--ml .rs-ml-globe { position: relative; flex: none; display: block; width: 1.7em; height: 1.7em; color: var(--ml-vio); }
  .rs-story--ml .rs-ml-globe svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .rs-story--ml .rs-ml-globe circle { fill: rgb(124 58 237 / .1); }
  .rs-story--ml .rs-ml-mer { position: absolute; inset: 0; display: block; transform: scaleX(.35); }  /* turns about its centre = the globe centre (viewBox −8 −8 16 16) */

  /* the browser window */
  .rs-story--ml .rs-ml-win { position: relative; display: block; height: calc(100% - 1.9em - .45em); margin-top: .45em; 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--ml .rs-ml-bar { display: flex; align-items: center; gap: .3em; height: 1.95em; padding: 0 .6em; background: #F1F3F4; border-bottom: 1px solid #E6E8EB; }
  .rs-story--ml .rs-ml-bar > i { flex: none; width: .44em; height: .44em; border-radius: 50%; background: #D7DADE; }
  .rs-story--ml .rs-ml-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(--ml-mute); }
  .rs-story--ml .rs-ml-url > svg { width: .95em; height: .95em; color: #80868B; }
  .rs-story--ml .rs-ml-urls { position: relative; flex: 1; min-width: 0; height: 1.3em; overflow: hidden; }
  .rs-story--ml .rs-ml-u { position: absolute; inset: 0; line-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; }
  .rs-story--ml .rs-ml-u.rs-ml-k0 { opacity: 1; }

  /* the stacked native articles */
  .rs-story--ml .rs-ml-page { position: relative; display: block; height: calc(100% - 1.95em);
    -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 99%); mask-image: linear-gradient(180deg, #000 76%, transparent 99%); }
  .rs-story--ml .rs-ml-art { position: absolute; inset: 0; display: block; padding: .7em .78em 0; opacity: 0; }
  .rs-story--ml .rs-ml-art.rs-ml-k0 { opacity: 1; }
  .rs-story--ml .rs-ml-h { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; height: 2.44em; font-size: .92em; font-weight: 700; line-height: 1.22; letter-spacing: -.012em; color: var(--ml-ink); }
  .rs-story--ml .rs-ml-by { display: flex; align-items: center; gap: .45em; margin-top: .75em; font-size: .62em; color: var(--ml-mute); white-space: nowrap; }
  .rs-story--ml .rs-ml-by b { display: grid; place-items: center; flex: none; width: 2.2em; height: 2.2em; border-radius: 50%; background: #E8EAED; color: #3C4043; font-size: .9em; font-weight: 700; letter-spacing: .02em; }
  .rs-story--ml .rs-ml-by > span:first-of-type { font-weight: 650; color: var(--ml-ink); }
  .rs-story--ml .rs-ml-by i { width: .3em; height: .3em; border-radius: 50%; background: #BDC1C6; }
  .rs-story--ml .rs-ml-by .rs-ml-flag { width: 1.4em; height: .95em; }
  .rs-story--ml .rs-ml-ln { position: relative; display: block; height: 1.25em; }
  .rs-story--ml .rs-ml-ln--a { margin-top: .5em; }
  .rs-story--ml .rs-ml-ln::before { content: ""; position: absolute; left: 0; top: 50%; width: var(--w, 100%); height: .36em; margin-top: -.18em; border-radius: 99px; background: var(--ml-bar); }
  .rs-story--ml .rs-ml-ln--a { --w: 96%; } .rs-story--ml .rs-ml-ln--b { --w: 100%; } .rs-story--ml .rs-ml-ln--c { --w: 91%; } .rs-story--ml .rs-ml-ln--d { --w: 64%; }
  .rs-story--ml .rs-ml-tx { display: block; height: 1.603em; font-size: .78em; line-height: 1.603; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ml-ink); }
  .rs-story--ml .rs-ml-link { position: relative; z-index: 0; padding: .05em .16em; margin: 0 -.04em; border-radius: .3em; color: var(--ml-vio-d); font-weight: 650; }
  .rs-story--ml .rs-ml-link::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgb(124 58 237 / .12); }
  .rs-story--ml .rs-ml-link::after { content: ""; position: absolute; left: .16em; right: .16em; bottom: .02em; height: .1em; border-radius: 99px; background: var(--ml-vio); transform-origin: left center; }

  /* glass callout straddling the bottom edge (inside the card's own box) */
  .rs-story--ml .rs-ml-call { position: absolute; left: 1.3em; 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--ml .rs-ml-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--ml .rs-ml-call svg { width: 1em; height: 1em; }
  .rs-zenith__mcard .rs-story--ml .rs-ml-call { left: .9em; bottom: -.95em; }

  /* ------------------------------------------------------------------ the loop (4 steps of 2.5 s) */
  .rs-story--ml .rs-ml-thumb { animation: rs-ml-thumb var(--ml-t) cubic-bezier(.55, 0, .2, 1) infinite; }
  .rs-story--ml .rs-ml-opt { animation: rs-ml-opt var(--ml-t) ease infinite backwards; }
  .rs-story--ml .rs-ml-art { animation: rs-ml-art var(--ml-t) cubic-bezier(.25, .7, .25, 1) infinite backwards; }
  .rs-story--ml .rs-ml-u { animation: rs-ml-url var(--ml-t) cubic-bezier(.25, .7, .25, 1) infinite backwards; }
  .rs-story--ml .rs-ml-link::before { animation: rs-ml-tint var(--ml-t) ease-out infinite backwards; }
  .rs-story--ml .rs-ml-link::after { animation: rs-ml-ul var(--ml-t) cubic-bezier(.6, 0, .2, 1) infinite backwards; }
  .rs-story--ml .rs-ml-k1, .rs-story--ml .rs-ml-k1 .rs-ml-link::before, .rs-story--ml .rs-ml-k1 .rs-ml-link::after { animation-delay: 2.5s; }
  .rs-story--ml .rs-ml-k2, .rs-story--ml .rs-ml-k2 .rs-ml-link::before, .rs-story--ml .rs-ml-k2 .rs-ml-link::after { animation-delay: 5s; }
  .rs-story--ml .rs-ml-k3, .rs-story--ml .rs-ml-k3 .rs-ml-link::before, .rs-story--ml .rs-ml-k3 .rs-ml-link::after { animation-delay: 7.5s; }
  .rs-story--ml .rs-ml-mer { animation: rs-ml-spin 7.5s linear infinite; }
  .rs-story--ml .rs-ml-mer--2 { animation-delay: -2.5s; } .rs-story--ml .rs-ml-mer--3 { animation-delay: -5s; }
  .rs-story--ml .rs-ml-call i { animation: rs-ml-tap 2.5s ease-out infinite; }

  @keyframes rs-ml-thumb { 0%, 22.5% { transform: translateX(0); } 26.5%, 47.5% { transform: translateX(100%); } 51.5%, 72.5% { transform: translateX(200%); } 76.5%, 97% { transform: translateX(300%); } 100% { transform: translateX(0); } }
  @keyframes rs-ml-opt { 0% { opacity: .5; } 3%, 23% { opacity: 1; } 27%, 100% { opacity: .5; } }
  /* a quick swap: the outgoing article leaves in 0.15 s (24–25.5 %) just as the next one starts rising (its 0.3–2.8 %),
     so the window is empty for ~0.1 s at most and the two texts barely overlap (before: ~0.4 s of blank page per switch) */
  @keyframes rs-ml-art { 0%, .3% { opacity: 0; transform: translateY(.5em); } 2.8%, 24% { opacity: 1; transform: none; } 25.5%, 100% { opacity: 0; transform: translateY(-.35em); } }
  @keyframes rs-ml-url { 0%, .3% { opacity: 0; transform: translateY(.7em); } 2.8%, 24% { opacity: 1; transform: none; } 25.5%, 100% { opacity: 0; transform: translateY(-.7em); } }
  @keyframes rs-ml-tint { 0%, 7% { opacity: 0; } 11%, 100% { opacity: 1; } }
  @keyframes rs-ml-ul { 0%, 6.5% { transform: scaleX(0); } 12%, 100% { transform: scaleX(1); } }
  @keyframes rs-ml-spin { from { transform: scaleX(1); } to { transform: scaleX(-1); } }
  @keyframes rs-ml-tap { 0%, 100% { transform: none; } 6% { transform: scale(1.14) rotate(-8deg); } 14% { transform: none; } }

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