/* Ekalix Research films (films.js): the featured film block (site.css .ekv, the player vplayer.css) and the card grid
   (the Academy's video cards' look, ext-videos.css). The site's tokens, so every theme follows; the research template's
   own light (deep space and bio-lab teal / violet) only inside the pictures. Sizes answer to the section's own width
   (container queries). Motion: transform / opacity only, none under reduced motion. */
.rf-sec { padding: 8px 0 34px; }
.rf-sec [hidden] { display: none !important; }
.rf { container: rf / inline-size; display: grid; gap: 18px; }

/* the featured block: the Academy stage's size rule - the whole player on screen under the header, never wider than 1280 */
.rf-film { box-sizing: border-box; width: min(100%, 1280px, max(min(100%, 440px), calc((100svh - 258px) * 16 / 9 + 40px))); margin: 0 auto; scroll-margin-top: 88px; }
.rf-kickrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.rf-film .ekv-head h3 { margin: 12px 0 6px; font: 800 clamp(22px, 2.8vw, 32px)/1.15 var(--display); letter-spacing: -.01em; color: var(--text); outline: none; }
.rf-film .ekv-head h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.rf-film .ekv-head p { margin: 0 0 18px; }
.rf-stage { aspect-ratio: 16 / 9; }
.rf-stage.rf-yt { aspect-ratio: auto; }
.rf-stagewait { display: block; width: 100%; height: 100%; border-radius: 18px; background: #05070f; }
.rf-msg { margin: 0; display: grid; place-items: center; height: 100%; border-radius: 18px; background: #05070f; color: var(--text2); font-size: 14px; text-align: center; padding: 16px; }
.rf-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.rf-foot .ekv-note { margin: 0; flex: 1 1 320px; max-width: 760px; }
.rf-foot .ekv-note b { color: var(--text2); font-weight: 700; }
.rf-next { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 0 16px 0 12px; border-radius: 999px; cursor: pointer; font: 600 13.5px/1.2 var(--body);
  border: 1px solid var(--gline2); background: var(--glass2); color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.rf-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rf-next b { font-weight: 700; }
.rf-next svg { flex: none; width: 16px; height: 16px; color: var(--accent); }
.rf-next:hover { border-color: var(--accent); transform: translateX(2px); }
.rf-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the status: real today / in trials / future */
.rf-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid; font: 700 10.5px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; font-variant-ligatures: none; }
.rf-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rf-badge.rf-real { color: var(--ok-t); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .38); }
.rf-badge.rf-trials { color: var(--warn-t); background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); }
.rf-badge.rf-future { color: var(--vio-t); background: rgba(167, 139, 250, .12); border-color: rgba(167, 139, 250, .42); }

/* the grid */
.rf-gh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-top: 10px; }
.rf-gh h3 { margin: 0; font: 800 clamp(19px, 2.2vw, 24px)/1.2 var(--display); letter-spacing: -.01em; }
.rf-gh p { margin: 0; font: 600 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text3); font-variant-ligatures: none; }
.rf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.rf-card { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); transition: transform .18s ease, border-color .18s ease; }
.rf-card:hover, .rf-card:focus-within { transform: translateY(-2px); border-color: var(--gline2); }
.rf-card.now { border-color: var(--accent); box-shadow: 0 0 26px -10px rgba(var(--glow1), .9); }
.rf-play { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 7px; border-radius: 12px; }
.rf-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rf-th { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; color: rgba(167, 243, 255, .78); background: #050913; }
.rf-th::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 22px 22px; }
.rf-g0 { background: radial-gradient(90% 90% at 25% 15%, rgba(45, 212, 191, .34), transparent 60%), radial-gradient(80% 80% at 85% 95%, rgba(139, 92, 246, .32), transparent 62%), #050913; }
.rf-g1 { background: radial-gradient(90% 90% at 80% 15%, rgba(56, 189, 248, .32), transparent 60%), radial-gradient(80% 80% at 15% 95%, rgba(45, 212, 191, .28), transparent 62%), #050913; }
.rf-g2 { background: radial-gradient(90% 90% at 30% 85%, rgba(192, 132, 252, .34), transparent 60%), radial-gradient(80% 80% at 85% 15%, rgba(34, 211, 238, .26), transparent 62%), #050913; }
.rf-g3 { background: radial-gradient(90% 90% at 75% 80%, rgba(52, 211, 153, .3), transparent 60%), radial-gradient(80% 80% at 20% 20%, rgba(99, 102, 241, .32), transparent 62%), #050913; }
.rf-art { position: absolute; left: 50%; top: 50%; width: 46%; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 0 10px rgba(45, 212, 191, .45)); }
.rf-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rf-dur { position: absolute; right: 6px; bottom: 8px; padding: 3px 6px; border-radius: 6px; background: rgba(0, 0, 0, .8); color: #fff; font: 700 11px/1 var(--mono); font-style: normal; font-variant-ligatures: none; }
.rf-soon { position: absolute; left: 6px; top: 6px; padding: 5px 9px; border-radius: 999px; background: rgba(2, 6, 16, .78); border: 1px solid rgba(255, 255, 255, .22); color: #e8f1ff; font: 800 11px/1 var(--body); font-style: normal; letter-spacing: .02em; }
.rf-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.rf-prog i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; }
.rf-card:not(.part):not(.done) .rf-prog { display: none; }
.rf-card.done .rf-prog i { background: var(--ok); }
.rf-pl { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: rgba(2, 6, 16, .62); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 0 26px rgba(var(--glow1), .5); opacity: 0; transform: scale(.86); transition: opacity .18s ease, transform .18s ease; }
.rf-pl svg { width: 22px; height: 22px; margin-left: 2px; }
.rf-card:not(.soon) .rf-play:hover .rf-pl, .rf-card:not(.soon) .rf-play:focus-visible .rf-pl, .rf-card.now:not(.soon) .rf-pl { opacity: 1; transform: scale(1); }
.rf-card.soon .rf-art { opacity: .7; }
.rf-n { font: 700 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-variant-ligatures: none; }
.rf-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: 700 15px/1.35 var(--body); color: var(--text); }
.rf-idea { margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13px; line-height: 1.45; color: var(--text2); }
.rf-tags { margin: auto 0 0; padding-top: 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rf-state { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font: 600 12px/1.2 var(--body); }
.rf-state:empty { display: none; }
.rf-card.done .rf-state { color: var(--ok-t); }
.rf-state svg { width: 14px; height: 14px; }

/* a narrow section (a phone): the picture beside the title, so more films fit a screen */
@container rf (max-width: 560px) {
  .rf-grid { grid-template-columns: 1fr; gap: 10px; }
  .rf-card { padding: 9px; }
  .rf-play { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 10px; row-gap: 4px; align-items: start; }
  .rf-th { grid-row: 1 / span 2; }
  .rf-t { -webkit-line-clamp: 3; font-size: 14px; }
  .rf-soon { font-size: 10px; padding: 4px 7px; }
  .rf-pl { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .rf-next { width: 100%; justify-content: center; }
}
@media (max-width: 640px) { .rf-film { width: 100%; } .rf-film .ekv-head p { margin-bottom: 14px; } }
@media (prefers-reduced-motion: reduce) { .rf *, .rf { transition: none !important; } .rf-card:hover, .rf-card:focus-within, .rf-next:hover { transform: none; } }
@media (forced-colors: active) { .rf-card.now { outline: 2px solid Highlight; } .rf-badge { forced-color-adjust: none; } }
@media print { .rf-sec { display: none; } }
