/* Latest videos row (scripts/lib/components/video-row.mjs): a strip head (title, the "All
   videos" link, Subscribe, previous and next) over one native horizontal scroller of video
   cards. Scroll snap, swipe and the thin scrollbar do the moving; nothing moves by itself.
   Cards are flat addon frames (1px black edge, stone inner line, square corners) whose whole
   face is one link; hover and focus light the inner line in the accent, no lift.

   Shapes by width:
   - under 60rem, stacked cards (thumbnail over text), the row running to the screen edges
     so the next card peeks: one card and a peek under 40rem, two and a peek up to 60rem.
   - from 60rem, a ledger: thumbnail left, text right, about 123px tall, so the strip fits
     between the home hero and the talent wall on a 1440x900 screen. Two across from 60rem,
     three and a peek from 72rem.
   Touch screens (hover: none) get no previous and next buttons: swipe and the peeking card
   are the affordance there. */

.wfg-vrow {
  --vrow-gap: .75rem;
  --vrow-w: min(18.5rem, 78vw);
  --vrow-ctl: 2.25rem;
  /* The home page's softer yellow for hovered text when it is there, else the accent. */
  --vrow-hover: var(--hp-gold-soft, var(--accent));
  min-width: 0;
}

.wfg-vrow-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  min-height: var(--vrow-ctl);
  margin-bottom: .75rem;
}
.wfg-vrow .wfg-vrow-title {
  margin: 0;
  font: var(--heading-weight) 1.4rem/1.25 var(--font-heading);
  letter-spacing: 0;
  color: var(--ink);
}
.wfg-vrow-tools { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.wfg-vrow .wfg-vrow-all {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 1.75rem;
  border-bottom: 1px solid var(--edge-inner);
  font: 400 .9rem/1.2 var(--font-ui);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t), border-color var(--t);
}
.wfg-vrow svg { width: 1em; height: 1em; flex: none; }
.wfg-vrow .wfg-vrow-sub { min-height: var(--vrow-ctl); padding: .3rem .85rem; font-size: .9rem; }
.wfg-vrow-nav { display: flex; gap: .35rem; }
.wfg-vrow-nav[hidden] { display: none; }
.wfg-vrow-btn {
  display: grid;
  place-items: center;
  width: var(--vrow-ctl);
  height: var(--vrow-ctl);
  padding: 0;
  border: 0;
  border-radius: var(--r-ctl);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  box-shadow: inset 0 0 0 1px var(--edge-inner), 0 0 0 1px var(--edge);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: color var(--t), box-shadow var(--t);
}
.wfg-vrow-btn[aria-disabled="true"] { color: var(--ink-3); opacity: .45; cursor: default; }

/* The scroller. Its padding keeps each card's focus ring inside the clip. */
.wfg-vrow-track {
  display: flex;
  gap: var(--vrow-gap);
  margin: -4px -4px 0;
  padding: 4px 4px .75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--edge-inner) transparent;
  list-style: none;
}
.wfg-vrow-item { flex: 0 0 var(--vrow-w); min-width: 0; scroll-snap-align: start; }

.wfg-vrow-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .6rem;
  height: 100%;
  padding: .5rem;
  border: 1px solid var(--edge);
  background: var(--bg-2);
  box-shadow: var(--panel-frame);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow var(--t);
}
.wfg-vrow-card:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.wfg-vrow-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--bg-3);
}
.wfg-vrow-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wfg-vrow-time {
  position: absolute;
  right: .35rem;
  bottom: .35rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 1px 5px;
  border-radius: var(--r-ctl);
  background: rgba(0, 0, 0, .85);
  font: 400 .72rem/1.35 var(--font-ui);
  letter-spacing: .02em;
  color: var(--ink);
}
.wfg-vrow-time svg { width: .55rem; height: .55rem; }
.wfg-vrow-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; padding: 0 .15rem .15rem; }
.wfg-vrow .wfg-vrow-name {
  display: -webkit-box;
  min-height: calc(2 * 1.25em);
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font: var(--heading-weight) 1.15rem/1.25 var(--font-heading);
  letter-spacing: 0;
  color: var(--ink);
  transition: color var(--t);
}
.wfg-vrow-meta { margin: 0; font: 400 .78rem/1.3 var(--font-body); color: var(--ink-3); }
/* Quiet on every card, so the accent stays with the head link; it lights with its card. */
.wfg-vrow-go {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: auto 0 0;
  padding-top: .1rem;
  font: 400 .8rem/1.2 var(--font-ui);
  color: var(--ink-3);
  transition: color var(--t);
}
.wfg-vrow-card:focus-visible .wfg-vrow-go { color: var(--accent); }

@media (hover: hover) and (pointer: fine) {
  .wfg-vrow-card:hover { box-shadow: inset 0 0 0 1px var(--accent); }
  .wfg-vrow-card:hover .wfg-vrow-name { color: var(--vrow-hover); }
  .wfg-vrow-card:hover .wfg-vrow-go { color: var(--accent); }
  .wfg-vrow .wfg-vrow-all:hover { color: var(--vrow-hover); border-color: var(--accent); }
  .wfg-vrow-btn:not([aria-disabled="true"]):hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 1px var(--edge); }
}
@media (pointer: coarse) {
  .wfg-vrow { --vrow-ctl: 2.75rem; }
}
@media (hover: none) {
  .wfg-vrow .wfg-vrow-nav { display: none; }
}

/* Under 60rem the row runs to the screen edges, so the next card peeks past the gutter. */
@media (max-width: 59.99rem) {
  .wfg-vrow-track {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
}
@media (min-width: 40rem) {
  .wfg-vrow { --vrow-gap: 1rem; --vrow-w: 20rem; }
}

/* The ledger: thumbnail left, text right, kept short for the 1440x900 first screen. */
@media (min-width: 60rem) {
  .wfg-vrow { --vrow-w: calc((100% - var(--vrow-gap)) / 2.15); }
  .wfg-vrow-head { margin-bottom: .5rem; }
  .wfg-vrow-track { padding-bottom: .25rem; }
  .wfg-vrow-card { grid-template-columns: 11rem minmax(0, 1fr); grid-template-rows: none; align-items: start; gap: .75rem; }
  .wfg-vrow-body { height: 100%; padding: .05rem 0 0; }
  .wfg-vrow .wfg-vrow-name { -webkit-line-clamp: 3; line-clamp: 3; min-height: 0; }
}
@media (min-width: 72rem) {
  .wfg-vrow { --vrow-w: calc((100% - 2 * var(--vrow-gap)) / 3.15); }
}

/* Cards (layout "cards", the home carousel since 2026-10-03): stacked cards at every width,
   bigger than the ledger: one and a peek on phones, two and a peek to 60rem, three and a
   peek to 72rem, then four and a peek. A creator line in the accent sits over the title or
   caption, and "Covered in <page>" is its own quiet link under the card. */
.wfg-vrow-item { display: flex; flex-direction: column; gap: .35rem; }
.wfg-vrow-item > .wfg-vrow-card { flex: 1 1 auto; }
.wfg-vrow-by { margin: 0; font: 400 .74rem/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.wfg-vrow-cap {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font: 400 .9rem/1.4 var(--font-body);
  color: var(--ink-2);
  transition: color var(--t);
}
.wfg-vrow-covered { margin: 0; padding: 0 .15rem; overflow: hidden; font: 400 .8rem/1.3 var(--font-ui); color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
.wfg-vrow-covered a { display: inline-block; padding-block: .3rem; color: var(--accent); }
.wfg-vrow--cards { --vrow-w: min(20rem, 80vw); }
/* Titles in the card variant use the shared heading face, at a compact size. */
.wfg-vrow--cards .wfg-vrow-name { min-height: 0; -webkit-line-clamp: 3; line-clamp: 3; font: var(--heading-weight) .92rem/1.3 var(--font-heading); letter-spacing: 0; }
@media (min-width: 40rem) { .wfg-vrow--cards { --vrow-w: calc((100% - var(--vrow-gap)) / 2.2); } }
@media (min-width: 60rem) {
  .wfg-vrow--cards { --vrow-w: calc((100% - 2 * var(--vrow-gap)) / 3.2); }
  .wfg-vrow--cards .wfg-vrow-card { grid-template-columns: none; grid-template-rows: auto 1fr; align-items: stretch; gap: .6rem; }
  .wfg-vrow--cards .wfg-vrow-body { height: auto; padding: 0 .15rem .15rem; }
}
@media (min-width: 72rem) { .wfg-vrow--cards { --vrow-w: calc((100% - 3 * var(--vrow-gap)) / 4.2); } }
@media (hover: hover) and (pointer: fine) {
  .wfg-vrow-card:hover .wfg-vrow-cap { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .wfg-vrow-track { scroll-behavior: auto; }
  .wfg-vrow *, .wfg-vrow *::before, .wfg-vrow *::after { transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .wfg-vrow-card, .wfg-vrow-btn { border: 1px solid CanvasText; }
  .wfg-vrow-btn[aria-disabled="true"] { color: GrayText; }
}
