/* WUWT Climate TV 2.0. Everything is scoped to .wuwt-ctv* so the theme is not affected. */
.wuwt-ctv, .wuwt-ctv-modal, .wuwt-ctv-infobox, .wuwt-ctv-lite {
	--ctv-red: #89000d;
	--ctv-red-dark: #6a000a;
	--ctv-ink: #1f2328;
	--ctv-muted: #5b636b;
	--ctv-line: #dfe2e6;
	--ctv-soft: #f5f6f8;
	--ctv-radius: 8px;
}
.wuwt-ctv-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; }

/* ---------- header ---------- */
.wuwt-ctv .entry-title { margin-bottom: .6em; }
.wuwt-ctv-banner { margin: 0 0 1em; }
.wuwt-ctv-banner img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--ctv-radius); }
.wuwt-ctv-intro { color: var(--ctv-ink); font-size: 1rem; line-height: 1.55; margin: 0 0 1.2em; }

/* ---------- controls ---------- */
.wuwt-ctv-controls { background: var(--ctv-soft); border: 1px solid var(--ctv-line); border-radius: var(--ctv-radius); padding: 14px; margin: 0 0 14px; }
.wuwt-ctv-search { display: flex; gap: 8px; }
.wuwt-ctv-search input[type="search"] { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 12px; font-size: 16px; border: 1px solid #b9bfc6; border-radius: 6px; background: #fff; color: var(--ctv-ink); margin: 0; box-shadow: none; }
.wuwt-ctv-search input[type="search"]:focus { outline: 2px solid var(--ctv-red); outline-offset: 1px; border-color: var(--ctv-red); }
.wuwt-ctv-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; font-size: 14px; font-weight: 600; line-height: 1; border: 1px solid #b9bfc6; border-radius: 6px; background: #fff; color: var(--ctv-ink); cursor: pointer; text-decoration: none; white-space: nowrap; margin: 0; }
.wuwt-ctv-btn:hover, .wuwt-ctv-btn:focus { border-color: var(--ctv-red); color: var(--ctv-red); text-decoration: none; }
.wuwt-ctv-btn:focus-visible { outline: 2px solid var(--ctv-red); outline-offset: 2px; }
.wuwt-ctv-btn-primary, .wuwt-ctv-search .wuwt-ctv-btn { height: 42px; background: var(--ctv-red); border-color: var(--ctv-red); color: #fff; }
.wuwt-ctv-btn-primary:hover, .wuwt-ctv-btn-primary:focus, .wuwt-ctv-search .wuwt-ctv-btn:hover { background: var(--ctv-red-dark); border-color: var(--ctv-red-dark); color: #fff; }

.wuwt-ctv-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.wuwt-ctv-field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ctv-muted); margin: 0 0 3px; }
.wuwt-ctv-field select { display: block; width: 100%; max-width: none; height: 38px; padding: 0 8px; font-size: 14px; border: 1px solid #b9bfc6; border-radius: 6px; background-color: #fff; color: var(--ctv-ink); margin: 0; }

.wuwt-ctv-sortbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-top: 12px; }
.wuwt-ctv-seg { display: inline-flex; flex-wrap: wrap; align-items: center; border: 0; padding: 0; margin: 0; min-width: 0; }
.wuwt-ctv-seg legend { float: left; width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ctv-muted); margin: 0 0 3px; padding: 0; border: 0; }
.wuwt-ctv-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wuwt-ctv-seg label { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; margin: 0; font-size: 14px; font-weight: 600; border: 1px solid #b9bfc6; background: #fff; color: var(--ctv-ink); cursor: pointer; white-space: nowrap; }
.wuwt-ctv-seg label span { font-size: 10px; }
.wuwt-ctv-seg label:first-of-type { border-radius: 6px 0 0 6px; }
.wuwt-ctv-seg label:last-of-type { border-radius: 0 6px 6px 0; border-left: 0; }
.wuwt-ctv-seg input:checked + label { background: var(--ctv-red); border-color: var(--ctv-red); color: #fff; }
.wuwt-ctv-seg input:focus-visible + label { outline: 2px solid var(--ctv-red); outline-offset: 2px; }
.wuwt-ctv-controls.wuwt-ctv-js .wuwt-ctv-apply { display: none; }
.wuwt-ctv-sortbar .wuwt-ctv-copywrap { margin-left: auto; }

/* ---------- copy link ---------- */
.wuwt-ctv-copywrap { position: relative; display: inline-flex; }
.wuwt-ctv-toast { position: absolute; z-index: 5; right: 0; bottom: calc(100% + 6px); padding: 6px 10px; font-size: 13px; line-height: 1.3; white-space: nowrap; color: #fff; background: #1d6b2f; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.2); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; pointer-events: none; }
.wuwt-ctv-toast.wuwt-ctv-toast-bad { background: #a1260d; }
.wuwt-ctv-toast.wuwt-ctv-toast-show { opacity: 1; visibility: visible; }
.wuwt-ctv-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--ctv-muted); cursor: pointer; margin: 0; }
.wuwt-ctv-iconbtn:hover, .wuwt-ctv-iconbtn:focus { color: var(--ctv-red); border-color: var(--ctv-line); background: #fff; }

/* ---------- status line ---------- */
.wuwt-ctv-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.wuwt-ctv-count { margin: 0; font-size: 14px; color: var(--ctv-muted); }
.wuwt-ctv-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.wuwt-ctv-chips li { margin: 0; padding: 0; }
.wuwt-ctv-chips li::before { content: none; }
.wuwt-ctv-chips a { display: inline-block; padding: 3px 10px; font-size: 13px; border-radius: 999px; background: #f3e6e7; color: var(--ctv-red); text-decoration: none; }
.wuwt-ctv-chips a:hover { background: var(--ctv-red); color: #fff; }
.wuwt-ctv-chips .wuwt-ctv-clear a { background: transparent; text-decoration: underline; color: var(--ctv-muted); }

/* ---------- grid ---------- */
.wuwt-ctv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; list-style: none; margin: 0 0 20px; padding: 0; }
.wuwt-ctv-grid > li { margin: 0; padding: 0; min-width: 0; }
.wuwt-ctv-grid > li::before { content: none; }
.wuwt-ctv-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--ctv-line); border-radius: var(--ctv-radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.wuwt-ctv-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); }
.wuwt-ctv-thumb { position: relative; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.wuwt-ctv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.wuwt-ctv-ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px 12px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2b2f36 0%, #4b1015 100%); }
.wuwt-ctv-thumb--rumble .wuwt-ctv-ph { background: linear-gradient(135deg, #1f3a1f 0%, #5a8f29 100%); }
.wuwt-ctv-thumb--vimeo .wuwt-ctv-ph { background: linear-gradient(135deg, #0b3954 0%, #1ab7ea 100%); }
.wuwt-ctv-thumb--x .wuwt-ctv-ph, .wuwt-ctv-thumb--facebook .wuwt-ctv-ph { background: linear-gradient(135deg, #15202b 0%, #3b5998 100%); }
.wuwt-ctv-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; color: inherit; text-decoration: none; }
.wuwt-ctv-play-bg { fill: #212121; fill-opacity: .8; transition: fill .15s, fill-opacity .15s; }
.wuwt-ctv-play:hover .wuwt-ctv-play-bg, .wuwt-ctv-play:focus .wuwt-ctv-play-bg { fill: var(--ctv-red); fill-opacity: 1; }
.wuwt-ctv-play:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.wuwt-ctv-play-icon { display: block; line-height: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.wuwt-ctv-length { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: #fff; background: rgba(0,0,0,.8); border-radius: 4px; pointer-events: none; }
.wuwt-ctv-card-body { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; padding: 10px 12px 12px; }
.wuwt-ctv .wuwt-ctv-card-title { margin: 0 28px 6px 0; padding: 0; font-size: 15px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wuwt-ctv .wuwt-ctv-card-title a { color: var(--ctv-ink); text-decoration: none; }
.wuwt-ctv .wuwt-ctv-card-title a:hover, .wuwt-ctv .wuwt-ctv-card-title a:focus { color: var(--ctv-red); text-decoration: underline; }
.wuwt-ctv-speaker, .wuwt-ctv-org, .wuwt-ctv-meta { margin: 0 0 4px; font-size: 13px; line-height: 1.4; color: var(--ctv-muted); }
.wuwt-ctv-speaker { color: var(--ctv-ink); font-weight: 600; }
.wuwt-ctv-card a, .wuwt-ctv-infobox a { text-decoration: none; }
.wuwt-ctv-speaker a, .wuwt-ctv-org a, .wuwt-ctv-meta a { color: inherit; }
.wuwt-ctv-speaker a:hover, .wuwt-ctv-org a:hover, .wuwt-ctv-meta a:hover { color: var(--ctv-red); text-decoration: underline; }
.wuwt-ctv-meta { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.wuwt-ctv-topic a { display: inline-block; padding: 1px 8px; font-size: 12px; border-radius: 999px; background: #f3e6e7; color: var(--ctv-red); }
.wuwt-ctv-topic a:hover { background: var(--ctv-red); color: #fff; text-decoration: none; }
.wuwt-ctv-more { font-size: 12px; color: var(--ctv-muted); font-weight: 400; }
.wuwt-ctv-card-copy { position: absolute; top: 6px; right: 4px; }
.wuwt-ctv-empty { padding: 30px 16px; text-align: center; border: 1px dashed var(--ctv-line); border-radius: var(--ctv-radius); color: var(--ctv-muted); }

/* ---------- pagination ---------- */
.wuwt-ctv-pages { margin: 10px 0 24px; text-align: center; }
.wuwt-ctv-pages ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.wuwt-ctv-pages li { margin: 0; padding: 0; }
.wuwt-ctv-pages li::before { content: none; }
.wuwt-ctv-pages a, .wuwt-ctv-pages .wuwt-ctv-current { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; font-size: 14px; font-weight: 600; border: 1px solid var(--ctv-line); border-radius: 6px; background: #fff; color: var(--ctv-ink); text-decoration: none; }
.wuwt-ctv-pages a:hover, .wuwt-ctv-pages a:focus { border-color: var(--ctv-red); color: var(--ctv-red); }
.wuwt-ctv-pages .wuwt-ctv-current { background: var(--ctv-red); border-color: var(--ctv-red); color: #fff; }
.wuwt-ctv-gap { display: inline-flex; align-items: center; height: 38px; color: var(--ctv-muted); }
.wuwt-ctv-pageof { margin: 8px 0 0; font-size: 13px; color: var(--ctv-muted); }

/* ---------- video window ---------- */
.wuwt-ctv-modal[hidden] { display: none !important; }
.wuwt-ctv-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wuwt-ctv-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 15, .85); }
.wuwt-ctv-modal-box { position: relative; width: min(1100px, 100%); background: #000; border-radius: var(--ctv-radius); overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.wuwt-ctv-modal-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: #16181c; color: #fff; }
.wuwt-ctv-modal .wuwt-ctv-modal-title { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; font-size: 15px; line-height: 1.3; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wuwt-ctv-modal-page { flex: 0 0 auto; font-size: 13px; color: #fff; text-decoration: underline; }
.wuwt-ctv-modal-page:hover, .wuwt-ctv-modal-page:focus { color: #ffd2d6; }
.wuwt-ctv-modal-close { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; margin: 0; font-size: 28px; line-height: 1; border: 0; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; }
.wuwt-ctv-modal-close:hover, .wuwt-ctv-modal-close:focus-visible { background: var(--ctv-red); }
.wuwt-ctv-modal-frame { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 100px); }
.wuwt-ctv-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
html.wuwt-ctv-noscroll, html.wuwt-ctv-noscroll body { overflow: hidden; }

/* ---------- single video page ---------- */
.wuwt-ctv-infobox { margin: 0 0 16px; padding: 12px 14px; background: var(--ctv-soft); border: 1px solid var(--ctv-line); border-left: 4px solid var(--ctv-red); border-radius: var(--ctv-radius); font-size: 15px; }
.wuwt-ctv-infobox dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.wuwt-ctv-infobox dl > div { display: contents; }
.wuwt-ctv-infobox dt { margin: 0; font-weight: 700; color: var(--ctv-muted); }
.wuwt-ctv-infobox dd { margin: 0; color: var(--ctv-ink); }
.wuwt-ctv-infobox dd a { color: var(--ctv-red); }
.wuwt-ctv-infobox dd a:hover { text-decoration: underline; }
.wuwt-ctv-infobox-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.wuwt-ctv-infobox .wuwt-ctv-toast { right: auto; left: 0; }
.wuwt-ctv-back { font-size: 14px; font-weight: 600; color: var(--ctv-red); }
.wuwt-ctv-lite { margin: 0 0 1em; }
.wuwt-ctv-lite-box { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--ctv-radius); overflow: hidden; }
.wuwt-ctv-lite-box img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.wuwt-ctv-lite-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- small screens ---------- */
@media (max-width: 767px) {
	.wuwt-ctv-filters { grid-template-columns: 1fr; gap: 8px; }
	.wuwt-ctv-sortbar .wuwt-ctv-copywrap { margin-left: 0; }
	.wuwt-ctv-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}
@media (max-width: 479px) {
	.wuwt-ctv-controls { padding: 10px; }
	.wuwt-ctv-grid { grid-template-columns: 1fr; }
	.wuwt-ctv-sortbar { gap: 8px; }
	.wuwt-ctv-seg label { padding: 0 10px; font-size: 13px; }
	.wuwt-ctv-modal { padding: 0; }
	.wuwt-ctv-modal-box { border-radius: 0; }
	.wuwt-ctv-infobox dl { grid-template-columns: 1fr; gap: 0; }
	.wuwt-ctv-infobox dd { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.wuwt-ctv-card, .wuwt-ctv-toast, .wuwt-ctv-play-bg { transition: none; }
}
.wuwt-ctv-lite .wuwt-ctv-play-icon svg { width: 84px; height: 59px; }
@media (max-width: 479px) {
	.wuwt-ctv-search .wuwt-ctv-btn { padding: 0 12px; }
}
.wuwt-ctv-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
