/* CC YouTube videa. Colours from the theme tokens when present (--ink, --magenta, …), otherwise the fallbacks. */
.ccytv { --ccytv-ink: var(--ink, #2d313c); --ccytv-muted: var(--ink-70, #6c6e76); --ccytv-line: var(--ink-20, #d5d5d6); --ccytv-accent: var(--magenta, #e6007e); --ccytv-bg: var(--pure, #fff); --ccytv-radius: var(--radius, 4px); }
.ccytv__sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* top row: heading left, compact search right; bottom row: pager left, link right */
.ccytv__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }
.ccytv__top > :first-child:not(.ccytv__find) { margin: 0; }
.ccytv__heading { margin: 0; font-size: 28px; line-height: 1.2; }
.ccytv__find { position: relative; flex: 0 1 300px; margin-left: auto; }
.ccytv__search { position: relative; margin: 0; }
.ccytv__search-icon { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ccytv-muted); pointer-events: none; }
.ccytv__input { width: 100%; height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--ccytv-line); border-radius: var(--ccytv-radius); background: var(--ccytv-bg); color: var(--ccytv-ink); font: inherit; font-size: 15px; transition: border-color 180ms ease; }
.ccytv__input:hover { border-color: var(--ink-40, #abacaf); }
.ccytv__input:focus { outline: 2px solid var(--ccytv-ink); outline-offset: 0; border-color: var(--ccytv-ink); }
.ccytv__input::-webkit-search-cancel-button { cursor: pointer; }
.ccytv__status { position: absolute; right: 0; top: 100%; margin: 6px 0 0; color: var(--ccytv-muted); font-size: 13px; line-height: 18px; white-space: nowrap; }
@media (max-width: 639px) { .ccytv__find { flex-basis: 100%; } .ccytv__top { margin-bottom: 44px; } }

.ccytv__grid { display: grid; gap: 36px 24px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .ccytv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ccytv__grid { grid-template-columns: repeat(var(--ccytv-cols, 3), minmax(0, 1fr)); } }
.ccytv__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.ccytv__link { display: flex; flex-direction: column; gap: 14px; color: var(--ccytv-ink); text-decoration: none; }
.ccytv__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--ccytv-radius); background: var(--ccytv-ink); }
.ccytv__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.ccytv__link:hover .ccytv__media img { transform: scale(1.03); }
.ccytv__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(45, 49, 60, .82); color: #fff; transition: background-color 180ms ease, transform 180ms ease; }
.ccytv__play svg { width: 34px; height: 34px; margin-left: 3px; }
.ccytv__link:hover .ccytv__play, .ccytv__link:focus-visible .ccytv__play { background: var(--ccytv-accent); transform: scale(1.06); }
.ccytv__dur, .ccytv__lang { position: absolute; padding: 2px 6px; border-radius: 3px; background: rgba(45, 49, 60, .88); color: #fff; font-size: 12px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ccytv__dur { right: 8px; bottom: 8px; }
.ccytv__lang { left: 8px; top: 8px; letter-spacing: .06em; } /* top: the bottom left often carries the thumbnail's own title */
.ccytv__title { font-weight: 600; font-size: 17px; line-height: 25px; overflow-wrap: anywhere; }
.ccytv__link:hover .ccytv__title { text-decoration: underline; text-decoration-color: var(--ink-40, #abacaf); text-underline-offset: 4px; }
.ccytv__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; color: var(--ccytv-muted); font-size: 14px; line-height: 22px; }
.ccytv__note { font-style: italic; }
@media (min-width: 1024px) { .ccytv__title { font-size: 18px; line-height: 27px; } }

.ccytv__none { margin: 0; padding: 24px 0; font-size: 18px; line-height: 30px; }
.ccytv__none[hidden], .ccytv__pager[hidden] { display: none; }
.ccytv__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.ccytv__pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ccytv__foot { margin-left: auto; }
.ccytv__more { color: var(--ccytv-ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--ccytv-line); text-underline-offset: 4px; }
.ccytv__num, .ccytv__step { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--ccytv-line); border-radius: var(--ccytv-radius); background: var(--ccytv-bg); color: var(--ccytv-ink); font: inherit; font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; transition: border-color 180ms ease; }
.ccytv__num:hover, .ccytv__step:hover { border-color: var(--ccytv-ink); }
.ccytv__num.is-current { background: var(--ccytv-ink); border-color: var(--ccytv-ink); color: var(--white, #fff); cursor: default; }
.ccytv__step { padding: 0 16px; }
.ccytv__gap { min-width: 24px; text-align: center; color: var(--ccytv-muted); }
@media (prefers-reduced-motion: reduce) { .ccytv__media img, .ccytv__play { transition: none; } }
