/* CRB sur YouTube — loaded on /youtube only. CRB night palette, coral accents, a YouTube red kept for
   the play button alone so the page stays recognisably CRB Corp. */
body[data-page="/youtube"] { --yt-red: #ff4e4e; --yt-coral: #f39a88; --yt-soft: #ffc1ad; --yt-card: #1d2030; --yt-line: #383b4c; --yt-muted: #b3b6c6; }

.yt-hero { position: relative; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; margin: 8px 0 28px; }
.yt-hero::before { content: ""; position: absolute; z-index: -1; inset: -60px auto auto 0; width: min(420px, 100%); height: 260px; border-radius: 50%; background: radial-gradient(closest-side, #ff4e4e26, transparent); filter: blur(10px); pointer-events: none; }
.yt-hero h1 { margin: 6px 0 8px; font: 800 clamp(2rem, 5vw, 3.2rem)/1.05 Sora, sans-serif; letter-spacing: -.02em; color: #faf8f3; }
.yt-hero p { margin: 0; color: var(--yt-muted); max-width: 46ch; }
.yt-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Latest video: a large player card. */
.yt-featured { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 18px; border-radius: 28px; background: linear-gradient(160deg, #23273b, #181b28 75%); border: 1px solid var(--yt-line); box-shadow: 0 24px 60px #0008, inset 0 1px 0 #ffffff0f; animation: yt-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.yt-player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 20px; background: #0d0f18; box-shadow: 0 0 0 1px #ffffff14; }
.yt-player img, .yt-player iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.yt-player img { transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s; }
.yt-player:hover img { transform: scale(1.03); filter: brightness(.85); }
.yt-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 84px; height: 84px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: var(--yt-red); box-shadow: 0 0 0 10px #ff4e4e33, 0 14px 40px #0009; transition: transform .25s, box-shadow .25s; }
.yt-play svg { width: 36px; height: 36px; margin-left: 5px; fill: currentColor; }
.yt-play:hover, .yt-play:focus-visible { transform: scale(1.08); box-shadow: 0 0 0 14px #ff4e4e40, 0 14px 40px #0009; }
.yt-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.yt-featured-body { display: grid; gap: 12px; align-content: center; min-width: 0; padding: 6px 10px 6px 0; }
.yt-badge { justify-self: start; padding: 5px 12px; border-radius: 999px; font: 700 .78rem system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #2a1712; background: linear-gradient(135deg, var(--yt-soft), var(--yt-coral)); }
.yt-featured h2 { margin: 0; color: #faf8f3; font: 800 clamp(1.3rem, 2.4vw, 1.85rem)/1.2 Sora, sans-serif; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.yt-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; color: var(--yt-muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.yt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Five previous videos. */
.yt-more { margin-top: 40px; }
.yt-more h2 { margin: 0 0 16px; color: #faf8f3; font: 800 1.35rem Sora, sans-serif; }
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.yt-card { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 10px 10px 14px; border-radius: 20px; color: inherit; text-decoration: none; background: var(--yt-card); border: 1px solid transparent; transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, background .3s; animation: yt-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.yt-card:nth-child(2) { animation-delay: .06s; } .yt-card:nth-child(3) { animation-delay: .12s; } .yt-card:nth-child(4) { animation-delay: .18s; } .yt-card:nth-child(5) { animation-delay: .24s; }
.yt-card:hover, .yt-card:focus-visible { transform: translateY(-4px); border-color: #f39a8866; background: #22263a; text-decoration: none; }
.yt-card:focus-visible { outline: 3px solid var(--yt-coral); outline-offset: 3px; }
.yt-thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 14px; background: #0d0f18; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.yt-card:hover .yt-thumb img { transform: scale(1.05); }
.yt-thumb-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #0009; color: #fff; opacity: 0; transition: opacity .25s, background .25s; }
.yt-thumb-play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.yt-card:hover .yt-thumb-play, .yt-card:focus-visible .yt-thumb-play { opacity: 1; background: var(--yt-red); }
.yt-card-body { display: grid; gap: 6px; padding: 0 4px; min-width: 0; }
.yt-card-body strong { color: #faf8f3; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-card .yt-meta { font-size: .84rem; }

.yt-empty { display: grid; gap: 10px; justify-items: start; padding: 32px; }

@keyframes yt-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .yt-featured, .yt-card { animation: none; } .yt-card, .yt-player img, .yt-thumb img, .yt-play { transition: none; } .yt-card:hover { transform: none; } }
@media (max-width: 860px) {
    .yt-featured { grid-template-columns: 1fr; gap: 18px; padding: 12px; border-radius: 22px; }
    .yt-featured-body { padding: 0 6px 6px; }
    .yt-play { width: 66px; height: 66px; } .yt-play svg { width: 28px; height: 28px; }
}
@media (max-width: 480px) { .yt-grid { grid-template-columns: 1fr; } .yt-hero-actions { width: 100%; } .yt-hero-actions .btn { flex: 1; text-align: center; } }
