/* clips — gallery, player and step list. Mobile-first; built on base tokens. */

.clip-summary { font-size: 1.05rem; }

.clip-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px;
}
.clip-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem;
  color: var(--muted); }
.clip-filters input, .clip-filters select { min-width: 8rem; }

.clip-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .clip-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

.clip-card { padding: 0; overflow: hidden; }
.clip-card-link { display: block; color: inherit; text-decoration: none; }
.clip-card-link:hover { text-decoration: none; }
.clip-poster { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.clip-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-poster-empty { display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--muted); font-size: 0.85rem; }
.clip-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; color: rgba(255,255,255,0.86); text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.clip-duration { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.72);
  color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 0.78rem; }
.clip-eyebrow { margin: 10px 12px 0; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.7rem; color: var(--muted); }
.clip-title { margin: 2px 12px 6px; font-size: 1.02rem; line-height: 1.3; }
.clip-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 12px 6px; }
.clip-foot { margin: 0 12px 12px; font-size: 0.78rem; }

.clip-chip { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 0.72rem;
  background: color-mix(in srgb, var(--chip) 22%, transparent);
  border: 1px solid var(--chip); color: var(--chip); white-space: nowrap; }
.clip-more { font-size: 0.72rem; color: var(--muted); }

.clip-badge, .clip-tier { display: inline-block; border-radius: 4px; padding: 1px 6px;
  font-size: 0.68rem; letter-spacing: 0.06em; font-weight: 700; }
.clip-badge-pass  { background: var(--success); color: #06180f; }
.clip-badge-fail  { background: var(--error);   color: #1a0606; }
.clip-badge-stale { background: var(--warn);    color: #1a1200; }
.clip-badge-none  { background: var(--surface-2); color: var(--muted); }
.clip-tier-gate  { background: var(--primary); color: var(--primary-text); }
.clip-tier-lib   { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.clip-tier-smoke { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* ---- player ---- */
.clip-player { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .clip-player { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.clip-video-box { aspect-ratio: 16 / 10; background: #000; border-radius: var(--radius);
  overflow: hidden; }
.clip-video-box video { width: 100%; height: 100%; display: block; }
/* PLAN 100: the speed control sits under the stage, not over it — nothing floats on
   these videos, which is half of the note that asked for this. */
.clip-speed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.clip-speed-label { color: var(--muted); font-size: 13px; }
.clip-speed label { min-height: 44px; display: inline-flex; align-items: center; }
.clip-intent { margin-top: 12px; color: var(--text); }
.clip-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.clip-source { font-size: 0.8rem; word-break: break-all; }

.clip-steps { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.clip-steps li { margin: 0 0 4px; }
.clip-step { display: flex; gap: 8px; align-items: center; width: 100%; min-height: 44px;
  text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); padding: 6px 10px; cursor: pointer; }
.clip-step:hover { background: var(--surface-2); }
.clip-step.is-active { border-color: var(--primary); background: var(--surface-2); }
.clip-step-n { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.6rem; }
.clip-step-label { flex: 1; font-size: 0.9rem; }
.clip-step-t { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.clip-step-cam { color: var(--muted); }
.clip-step-bad { color: var(--error); font-weight: 700; }
.clip-step-note { margin: 2px 0 6px 2.2rem; font-size: 0.8rem; }
.clip-runs { margin-top: 14px; }

#clip-preview { position: fixed; z-index: 60; width: 320px; max-width: 60vw;
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  pointer-events: none; }

.clip-embed video { background: #000; }
.clip-card.is-hidden { display: none; }
