/* /videos alone loads this sheet (as / loads index-ill.css): the list of videos and its player.
   A row is the guides index's row with a thumbnail in front: thumbnail, title and chapters,
   then the guides' own meta column (.guide-row-meta), so the two lists share their right edge. */
.vid-list { margin-top: 8px; }
.vid-row { display: grid; grid-template-columns: 320px minmax(0, 1fr) 236px; gap: 16px 32px;
  align-items: start; padding: 24px 0; border-bottom: 1px solid var(--surface-border); scroll-margin-top: 16px; }
.vid-row:last-child { border-bottom: 0; }

/* The thumbnail is the play button. 16:9 from the first byte, so nothing shifts when the
   image or the player arrives. */
.vid-frame, .vid-player { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-card);
  border: 1px solid var(--surface-border); background: var(--panel-inset); }
.vid-frame { position: relative; overflow: hidden; color: #fff; }
.vid-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The mark sits on the picture, so it carries its own ground: the same in both palettes.
   Top left, the one corner every thumbnail leaves empty: its headline fills the left half
   from the middle down and the face fills the right. */
.vid-play { position: absolute; left: 12px; top: 12px; width: 40px; height: 40px; border-radius: var(--radius-pill);
  display: grid; place-items: center; background: rgba(10, 10, 10, .78); border: 1px solid rgba(255, 255, 255, .5);
  transition: background .16s, transform .16s var(--ease-move); }
.vid-play svg { transform: translateX(1px); }
@media (hover: hover) { .vid-frame:hover .vid-play { background: #0a0a0a; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .vid-frame:hover .vid-play { transform: none; } }
.vid-frame:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* Playing: the player takes the row's full width and the text moves under it. */
.vid-row.is-playing .vid-frame { display: none; }
.vid-row.is-playing .vid-player { grid-column: 1 / -1; }
.vid-row.is-playing { grid-template-columns: minmax(0, 1fr) 236px; }

.vid-main { min-width: 0; }
.vid-main h3 { font-family: var(--display); font-size: var(--t-card); font-weight: 600; letter-spacing: -0.01em;
  color: var(--fg); line-height: 1.2; padding-block: .175em; text-wrap: pretty; max-width: 24em; }
.vid-main p { font-size: var(--t-prose); line-height: 1.6; color: var(--ink); margin-top: 6px; max-width: 560px; text-wrap: pretty; }

/* Chapters: the time is a value (mono), the label is prose. Each one starts the video there. */
.vid-ch { list-style: none; margin: 8px 0 0 -8px; padding: 0; }
.vid-ch a { display: flex; align-items: baseline; gap: 12px; padding: 4px 8px;
  background: none; border-radius: var(--radius-sm); font-size: var(--t-prose); line-height: 1.5;
  color: var(--ink); text-decoration: none; }
.vid-t { flex: none; width: 2.6em; font-family: var(--mono); font-size: var(--t-value); color: var(--muted); }
@media (hover: hover) { .vid-ch a:hover { background: var(--surface); color: var(--fg); }
  .vid-ch a:hover .vid-t { color: var(--fg); } }
.vid-ch a:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }

.vid-facts { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.vid-link { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--sans); font-size: var(--t-prose);
  font-weight: 500; color: var(--fg); text-decoration: none; align-self: flex-start; }
@media (hover: hover) { .vid-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .vid-link:hover .guide-go { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .vid-link:hover .guide-go { transform: none; } }
.vid-more { margin-top: 20px; }
.vid-more .ext-link-icon { align-self: center; }

/* Between the phone and the full row the meta drops under the text, beside the thumbnail. */
@media (max-width: 1040px) {
  .vid-row, .vid-row.is-playing { grid-template-columns: 280px minmax(0, 1fr); }
  .vid-row .guide-row-meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; padding-top: 0; }
  .vid-row.is-playing .guide-row-meta { grid-column: 1 / -1; }
  .vid-row.is-playing .vid-main { grid-column: 1 / -1; }
}
/* Phones: one column, and every control is a 38px target. */
@media (max-width: 720px) {
  .vid-row, .vid-row.is-playing { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px 0; }
  .vid-row .guide-row-meta { grid-column: 1; }
  .vid-ch { margin-left: 0; }
  .vid-ch a { min-height: 38px; padding: 8px 0; align-items: center; }
  .vid-link { min-height: 38px; align-items: center; }
}

/* A row's title opens that video's own page. */
.vid-main h3 a { color: inherit; text-decoration: none; }
@media (hover: hover) { .vid-main h3 a:hover { color: var(--fg-strong); text-decoration: underline; text-underline-offset: 3px; } }

/* One video on its own: its page under /videos/, and the top of a guide. The reading
   column is the row, so the player is as wide as the text under it. */
.vid-row.vid-solo, .vid-row.vid-solo.is-playing { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0; border: 0; margin: 28px 0 0; }
.vid-solo .vid-ch { margin-top: 0; }
.vid-links { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 10px; }
.vid-links .ext-link-icon { align-self: center; }
.guide .vid-links { font-size: var(--t-prose); line-height: 1.5; }
.vid-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: var(--t-prose); line-height: 1.5; color: var(--secondary); }
.vid-cap a { color: var(--fg); text-decoration: none; }
@media (hover: hover) { .vid-cap a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.vid-cap .guide-time { flex: none; font-family: var(--mono); font-size: var(--t-value); line-height: 1.55; color: var(--muted); }
