:root {
  --bg: #0f0f0f; --fg: #f1f1f1; --muted: #aaa; --card: #272727; --hover: #3f3f3f; --line: rgba(255, 255, 255, .1);
  --ad: #fc0; --link: #3ea6ff; --side: 402px;
  --ab-fg: var(--fg); --ab-muted: var(--muted); --ab-accent: var(--link);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.43 Roboto, Arial, sans-serif; overflow-x: hidden; }
button { font: inherit; color: inherit; }
svg { display: block; fill: currentColor; }
body.sheet-open { overflow: hidden; }

/* ---------------- top bar */
.top { height: 56px; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.search { display: flex; width: min(640px, 100%); height: 40px; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 4px 0 16px; border: 1px solid #303030; border-right: 0; border-radius: 40px 0 0 40px; background: #121212; color: var(--fg); font: 16px Roboto, Arial, sans-serif; outline: none; }
.search input:focus { border-color: #1c62b9; }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.search button { width: 64px; height: 40px; border: 1px solid #303030; border-radius: 0 40px 40px 0; background: #222; cursor: pointer; display: grid; place-items: center; }
.search button svg { width: 24px; height: 24px; }

/* ---------------- layout */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 24px; max-width: 1754px; margin: 0 auto; padding: 24px 24px 64px; }
.primary, .secondary { min-width: 0; }

/* ---------------- the player */
.player { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; container-type: inline-size; overflow: hidden; }
.screen > * { position: absolute; }
.bar { position: relative; height: 4px; background: rgba(255, 255, 255, .2); }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ad); }
body[data-mode="poster"] .bar .fill { width: 0 !important; }
body[data-mode="about"] .bar, body[data-mode="end"] .bar { cursor: pointer; height: 5px; }
body[data-mode="about"] .bar .fill, body[data-mode="end"] .bar .fill { background: var(--fg); }

.poster, .stage, .about, .end, .buffer { inset: 0; }
.poster { display: grid; place-items: center; overflow: hidden; }
body:not([data-mode="poster"]) .poster { display: none; }
.mosaic { position: absolute; inset: -30% -20%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.2cqw; transform: rotate(-9deg); filter: brightness(.36) saturate(.9); pointer-events: none; }
.mosaic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .6cqw; display: block; }
.mosaic.drift { animation: drift 60s linear infinite alternate; }
@keyframes drift { from { translate: 0 0; } to { translate: -6cqw -4cqw; } }
.poster-name { position: absolute; left: 4.5cqw; bottom: 5cqw; font-weight: 700; font-size: 6.4cqw; line-height: 1; letter-spacing: -.02em; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.bigplay { position: relative; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.bigplay svg { width: 100%; height: 100%; }
.bigplay .bp-bg { fill: #000; fill-opacity: .6; stroke: rgba(255, 255, 255, .85); stroke-width: 2; transition: fill .1s, fill-opacity .1s; }
.bigplay:hover .bp-bg, .bigplay:focus-visible .bp-bg { fill: #f1f1f1; fill-opacity: .95; }
.bigplay:hover path[fill], .bigplay:focus-visible path[fill] { fill: #0f0f0f; }
.bigplay:focus-visible { outline: none; }

.stage { display: none; }
body[data-mode="ad"] .stage { display: block; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player[data-orient="portrait"] .stage iframe { left: 50%; right: auto; width: auto; aspect-ratio: 9 / 16; height: 100%; transform: translateX(-50%); }

/* display ads: the picture whole, on a blur of itself */
.display { position: absolute; inset: 0; }
.dframe { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.dframe.on { opacity: 1; }
.dframe .blur { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(28px) brightness(.38); }
.dframe .pics { position: absolute; inset: 0; }
.dframe .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.dframe.row .pics { display: flex; justify-content: center; align-items: center; gap: 1.6cqw; padding: 2.4cqw; }
.dframe.row .pic { position: static; width: auto; height: 100%; min-width: 0; flex: 0 1 auto; object-fit: contain; }

/* ad chrome over the picture */
.adchip, .visit-pill, .skip { display: none; }
body[data-mode="ad"] .adchip { display: flex; }
body[data-mode="ad"] .skip { display: flex; }
.adchip { left: 12px; bottom: 60px; align-items: center; gap: 6px; padding: 0 8px 0 0; height: 24px; border-radius: 4px; background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 500; pointer-events: none; z-index: 3; }
.ad { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 3px; background: var(--ad); color: #0f0f0f; font-size: 11px; font-weight: 700; line-height: 1; }
.adchip .ad { height: 24px; border-radius: 4px 0 0 4px; padding: 0 7px; font-size: 12px; }
.adtime:empty { display: none; }
.adchip:has(.adtime:empty) { padding-right: 0; }
.visit-pill { left: 12px; bottom: 92px; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 12px; border: 0; border-radius: 14px; background: rgba(0, 0, 0, .6); font-size: 13px; font-weight: 500; cursor: pointer; z-index: 3; }
.visit-pill svg { width: 16px; height: 16px; }
.visit-pill:hover { background: rgba(0, 0, 0, .85); }
@media (min-width: 640px) { body[data-mode="ad"] .visit-pill { display: flex; } }

.skip { right: 0; bottom: 60px; align-items: stretch; height: 52px; padding: 0; border: 1px solid rgba(255, 255, 255, .5); border-right: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 15px; cursor: default; z-index: 3; }
.skip > span:not(.sk-thumb) { display: flex; align-items: center; gap: 6px; padding: 0 14px; white-space: nowrap; }
.skip .sk-wait { font-size: 12px; color: #ddd; }
.skip .sk-wait b { font-weight: 500; color: #fff; margin-left: 2px; }
.skip .sk-go { display: none !important; font-weight: 500; }
.skip .sk-go svg { width: 22px; height: 22px; }
.skip.open { cursor: pointer; }
.skip.open .sk-wait { display: none; }
.skip.open .sk-go { display: flex !important; }
.skip.open:hover, .skip.open:focus-visible { background: rgba(0, 0, 0, .9); border-color: #fff; outline: none; }
.sk-thumb { width: 92px; position: relative; overflow: hidden; background: #111; }
.sk-thumb > span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 10px; font-weight: 700; line-height: 1.05; padding: 4px; background-size: cover; background-position: center; }

.buffer { display: none; place-items: center; pointer-events: none; z-index: 2; }
.buffer.on { display: grid; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the video you came for */
.about { display: none; overflow: hidden; background: #050505; cursor: pointer; }
body[data-mode="about"] .about { display: block; }
.a-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(0,0,0,.72), rgba(0,0,0,.25)); pointer-events: none; }
.a-card { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 0 8cqw; opacity: 0; pointer-events: none; }
.a-name { font-size: 7.4cqw; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.a-title { margin-top: 1.6cqw; font-size: max(11px, 2.3cqw); color: #ddd; }
.a-bio { margin: 0; font-size: max(13px, 3.1cqw); line-height: 1.3; font-weight: 500; max-width: max(260px, 62cqw); }
.a-roll { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; }
.a-roll-in { position: absolute; left: 0; right: 0; top: 0; text-align: center; padding: 0 max(16px, 12cqw); will-change: transform; }
.a-job { margin: 0 0 4.4cqw; }
.a-role { font-size: max(9px, 1.45cqw); letter-spacing: .14em; text-transform: uppercase; color: #bbb; }
.a-co { font-size: max(16px, 3.4cqw); font-weight: 700; line-height: 1.15; margin: .4cqw 0 .6cqw; }
.a-detail { font-size: max(11px, 1.7cqw); color: #ccc; line-height: 1.35; max-width: max(280px, 56cqw); margin: 0 auto; }
.a3 { gap: 1.2cqw; pointer-events: none; }
.a3 .a-line { font-size: max(13px, 2.6cqw); }
.a3 .a-line.big { font-size: 4.4cqw; font-weight: 700; }
.a3 a { color: #fff; pointer-events: auto; }

.vctl { display: none; left: 0; right: 0; bottom: 0; height: 48px; align-items: center; gap: 8px; padding: 0 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); z-index: 3; }
body[data-mode="about"] .vctl { display: flex; }
.vplay { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.vplay svg { width: 28px; height: 28px; }
.vplay .i-play, .vplay.paused .i-pause { display: none; }
.vplay.paused .i-play { display: block; }
.vtime { font-size: 13px; font-variant-numeric: tabular-nums; color: #eee; }

.end { display: none; overflow: auto; background: rgba(0, 0, 0, .92); padding: 16px; z-index: 4; }
body[data-mode="end"] .end { display: block; }
.replay { display: flex; align-items: center; gap: 8px; margin: 0 auto 14px; height: 36px; padding: 0 16px 0 12px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .14); font-weight: 500; cursor: pointer; }
.replay svg { width: 22px; height: 22px; }
.replay:hover { background: rgba(255, 255, 255, .24); }
.end-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.end-grid button { position: relative; padding: 0; border: 0; background: #111; border-radius: 6px; overflow: hidden; cursor: pointer; text-align: left; }
.end-grid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.end-grid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 500; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.end-grid button:hover img, .end-grid button:focus-visible img { filter: brightness(1.15); }

/* ---------------- the companion: the ad's card beside or under the player */
.companion { display: none; }
body[data-mode="ad"] .companion { display: grid; }
.companion { grid-template-columns: 120px minmax(0, 1fr); grid-template-areas: "th tx" "btn btn"; gap: 10px 12px; align-items: center; padding: 12px; margin: 0 0 16px; border-radius: 12px; background: var(--card); }
.cp-thumb { grid-area: th; width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; background: #111; }
.cp-text { grid-area: tx; min-width: 0; }
.cp-name { font-size: 16px; font-weight: 500; line-height: 1.3; }
.cp-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.cp-visit { grid-area: btn; height: 36px; border: 0; border-radius: 18px; background: var(--link); color: #0f0f0f; font-weight: 500; cursor: pointer; }
.cp-visit:hover { background: #65b8ff; }

/* ---------------- under the player */
.v-title { margin: 12px 0 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.channel { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #5d4037; font-size: 15px; font-weight: 500; }
.ch-text { min-width: 0; }
.ch-name { font-size: 16px; font-weight: 500; }
.ch-sub { font-size: 12px; color: var(--muted); }
.contact { margin-left: 12px; height: 36px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 18px; background: var(--fg); color: #0f0f0f; font-weight: 500; text-decoration: none; }
.contact:hover { background: #d9d9d9; }
.desc { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--card); white-space: normal; }
.d-bio { margin: 0; font-size: 14px; line-height: 20px; }
.d-more { display: none; margin-top: 16px; }
.desc.open .d-more { display: block; }
.d-job { margin: 0 0 12px; }
.d-job b { font-weight: 500; }
.d-job span { color: var(--muted); }
.d-more a { color: var(--link); text-decoration: none; }
.d-toggle { margin-top: 4px; padding: 0; border: 0; background: none; font-weight: 500; cursor: pointer; }
.comments-off { margin: 24px 0 0; color: var(--fg); font-size: 14px; }

/* ---------------- up next */
.un-head { margin: 0 0 12px; font-size: 16px; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 8px; width: 100%; padding: 0; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.item:hover .t, .item:focus-visible .t { color: #fff; }
.item:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.th { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #222; aspect-ratio: 16 / 9; }
.th img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.item:hover .th img { transform: scale(1.03); }
.th .ad { position: absolute; right: 4px; bottom: 4px; }
.tx { display: block; min-width: 0; padding-top: 2px; }
.t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--fg); }
.c { display: block; margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--muted); }
.now-tag { display: none; margin-top: 2px; font-size: 12px; color: var(--muted); }
li.now .item { background: var(--card); box-shadow: 0 0 0 4px var(--card); }
li.now .now-tag { display: block; }
.noresults { color: var(--muted); }

/* ---------------- the advertiser's page: the case study */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); }
.sheet[hidden] { display: none; }
.sh-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sh-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(15, 15, 15, .96); border-bottom: 1px solid var(--line); }
.sh-close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; }
.sh-close:hover { background: var(--hover); }
.sh-close svg { width: 24px; height: 24px; }
.sh-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: #222; }
.sh-head { min-width: 0; }
.sh-name { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-client { font-size: 12px; color: var(--muted); }
.sh-body { max-width: 1040px; margin: 0 auto; padding: 24px 24px 72px; }
.case.ab-media { --ab-chrome: 96px; --ab-gap: 16px; gap: 32px; }
.case .ab-lede { font-size: 18px; line-height: 1.5; max-width: 760px; }
.case .ab-heading { font-size: 18px; font-weight: 700; }
.case .ab-text { color: #ddd; max-width: 760px; line-height: 1.6; }
.case .ab-frame { border-radius: 12px; overflow: hidden; }
.case .ab-film figcaption { font-size: 14px; color: var(--fg); font-weight: 500; }
.case .ab-image img { border-radius: 8px; }
.case .ab-credits { color: var(--muted); }

/* ---------------- phones and narrow windows */
@media (max-width: 999px) {
  .watch { display: flex; flex-direction: column; gap: 0; padding: 0 0 48px; }
  .primary, .secondary { display: contents; }
  .player { order: 1; position: sticky; top: 0; z-index: 20; border-radius: 0; }
  .companion { order: 2; margin: 0; border-radius: 0; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "th tx btn"; padding: 10px 12px; }
  .cp-thumb { width: 96px; }
  .cp-name { font-size: 14px; }
  .cp-visit { padding: 0 14px; font-size: 13px; }
  .meta { order: 3; padding: 0 12px; }
  .upnext { order: 4; padding: 24px 12px 0; }
  .list { gap: 16px; }
  .item { grid-template-columns: minmax(0, 1fr); gap: 10px; border-radius: 12px; }
  .th { border-radius: 12px; }
  .tx { padding: 0 2px; }
  .t { font-size: 15px; }
  .player[data-orient="portrait"] .screen { aspect-ratio: auto; height: min(68svh, 177.8vw); }
  .sh-body { padding: 16px 12px 64px; }
}
@media (min-width: 640px) and (max-width: 999px) {
  .watch { padding: 0 0 48px; }
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}
@media (max-width: 639px) {
  .top { height: 52px; padding: 0 12px; }
  .search, .search input, .search button { height: 36px; }
  .search button { width: 52px; }
  .adchip { left: 8px; bottom: 46px; height: 22px; font-size: 11px; }
  .adchip .ad { height: 22px; font-size: 11px; }
  .skip { bottom: 46px; height: 38px; font-size: 13px; }
  .skip > span:not(.sk-thumb) { padding: 0 10px; }
  .skip .sk-wait { font-size: 11px; }
  .sk-thumb { display: none; }
  .v-title { font-size: 18px; line-height: 26px; }
  .companion { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tx btn"; }
  .cp-thumb { display: none; }
  .end { padding: 10px; }
  .end-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
  .replay { margin-bottom: 10px; }
  .vctl { height: 40px; }
}

/* ---------------- the loading screen: the site's own skeleton */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); transition: opacity .35s ease; overflow: hidden; }
.loader.done { opacity: 0; pointer-events: none; }
.ld-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2; }
.ld-fill { height: 100%; width: 0; background: var(--link); transition: width .25s ease; }
.ld-top { height: 56px; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.sk { background: #272727; border-radius: 8px; }
.sk-search { width: min(640px, 100%); height: 40px; border-radius: 20px; }
.ld-watch { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 24px; max-width: 1754px; margin: 0 auto; padding: 24px; }
.ld-player { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; display: grid; place-items: center; }
.sk-title { height: 24px; width: 46%; margin-top: 16px; }
.ld-row { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 50%; }
.sk-line { height: 16px; width: 160px; }
.sk-desc { height: 84px; margin-top: 14px; border-radius: 12px; }
.ld-secondary { display: grid; gap: 8px; align-content: start; }
.ld-item { display: grid; grid-template-columns: 168px 1fr; gap: 8px; }
.sk-th { aspect-ratio: 16 / 9; }
.ld-lines { display: grid; gap: 8px; align-content: start; padding-top: 4px; }
.sk-l1 { height: 14px; width: 92%; }
.sk-l2 { height: 12px; width: 50%; }
@media (max-width: 999px) {
  .ld-watch { display: block; padding: 0; }
  .ld-player { border-radius: 0; }
  .ld-primary > .sk, .ld-primary > .ld-row { margin-left: 12px; margin-right: 12px; }
  .ld-secondary { padding: 24px 12px; gap: 16px; }
  .ld-item { grid-template-columns: 1fr; }
  .ld-item .sk-th { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .mosaic.drift { animation: none; } }
