/* Cartoons.lk Stream — main stylesheet.
   Order: font, tokens, base, layout, buttons, chips, header, search, tab bar,
   ticker, ads, hero, rails + cards, category tiles, page heads + grids,
   detail page, episodes, prose, comments, 404, footer, utilities, motion.

   Hard rules:
   - the Cartoons.lk System plugin is styled only in plugin-skin.css;
   - no transform/filter/contain/backdrop-filter/overflow on html, body,
     header or page wrappers (the plugin's overlays are position:fixed and it
     locks scrolling through body.style.overflow);
   - header z-index 100, tab bar 90: always below the plugin (>= 10000). */

/* ---------- Font: self-hosted Noto Sans Sinhala (OFL), Sinhala range only.
   One face under the name the Cartoons.lk System plugin's popups also ask for (its Google Fonts link is
   off): two family names for the same file made browsers download it twice. */
@font-face {
	font-family: "Noto Sans Sinhala";
	src: url("../fonts/noto-sans-sinhala.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0964-0965, U+0D81-0DF4, U+200C-200D, U+25CC;
}

/* ---------- Tokens */
:root {
	color-scheme: dark;

	--cl-bg: #141414;
	--cl-bg-deep: #0b0b0b;
	--cl-surface: #1f1f1f;
	--cl-surface-2: #2a2a2a;
	--cl-surface-3: #383838;
	--cl-line: rgba(255, 255, 255, .1);
	--cl-line-strong: rgba(255, 255, 255, .2);
	--cl-text: #ffffff;
	--cl-text-2: #e5e5e5;
	--cl-muted: #a3a3a3;
	--cl-accent: #f48c08;
	--cl-accent-hover: #ff9e2c;
	--cl-accent-ink: #1a0e00;
	--cl-accent-soft: rgba(244, 140, 8, .14);
	--cl-focus: #ffb347;

	--cl-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Sinhala", "Iskoola Pota", sans-serif;

	--cl-fs-2xs: .75rem;
	--cl-fs-xs: .8125rem;
	--cl-fs-sm: .9375rem;
	--cl-fs-md: 1rem;
	--cl-fs-lg: 1.1875rem;
	--cl-fs-xl: clamp(1.375rem, 1.15rem + .9vw, 1.75rem);
	--cl-fs-2xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
	--cl-fs-hero: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);

	--cl-s1: 4px;
	--cl-s2: 8px;
	--cl-s3: 12px;
	--cl-s4: 16px;
	--cl-s5: 24px;
	--cl-s6: 32px;
	--cl-s7: 48px;
	--cl-s8: 64px;

	--cl-gutter: 16px;
	--cl-max: 1600px;
	--cl-read: 72ch;
	--cl-radius: 4px;
	--cl-radius-sm: 4px;
	--cl-header-h: 60px;
	--cl-tabbar-h: 0px;
	--cl-admin-bar: var(--wp-admin--admin-bar--height, 0px);
	--cl-ease: cubic-bezier(.2, .7, .2, 1);
	--cl-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
@media (max-width: 767px) { :root { --cl-tabbar-h: 60px; } }
@media (min-width: 768px) { :root { --cl-gutter: 32px; --cl-header-h: 68px; } }
@media (min-width: 1280px) { :root { --cl-gutter: 48px; } }
@media (min-width: 1800px) { :root { --cl-gutter: 64px; } }

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--cl-header-h) + var(--cl-admin-bar) + 12px); }
body {
	margin: 0;
	background: var(--cl-bg);
	color: var(--cl-text);
	font-family: var(--cl-font);
	font-size: var(--cl-fs-md);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding-bottom: calc(var(--cl-tabbar-h) + env(safe-area-inset-bottom, 0px));
}
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }
a { color: var(--cl-accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--cl-accent-hover); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--cl-s4); font-weight: 700; letter-spacing: -.012em; }
p { margin: 0 0 var(--cl-s4); }
:lang(si), [lang="si"] { line-height: 1.7; letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--cl-focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--cl-accent); color: var(--cl-accent-ink); }
button { font: inherit; }
[hidden] { display: none !important; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cl-skip {
	position: absolute; left: var(--cl-s2); top: -100px; z-index: 200;
	padding: var(--cl-s2) var(--cl-s4); background: var(--cl-accent); color: var(--cl-accent-ink);
	border-radius: var(--cl-radius-sm); font-weight: 700; text-decoration: none;
}
.cl-skip:focus { top: calc(var(--cl-admin-bar) + var(--cl-s2)); }

/* ---------- Layout */
.cl-container { width: 100%; max-width: var(--cl-max); margin-inline: auto; padding-inline: var(--cl-gutter); }
.cl-container--read { max-width: calc(var(--cl-read) + 2 * var(--cl-gutter)); }
.cl-main { display: block; min-height: 60vh; padding-bottom: var(--cl-s7); }
.cl-main:focus { outline: none; }
.cl-section-title { font-size: var(--cl-fs-xl); margin-bottom: var(--cl-s4); }

/* ---------- Buttons */
.cl-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--cl-s2);
	min-height: 44px; padding: 0 var(--cl-s5); border: 0; border-radius: var(--cl-radius-sm);
	font: 700 var(--cl-fs-sm)/1 var(--cl-font); letter-spacing: .01em; text-decoration: none; cursor: pointer;
	transition: background-color .15s var(--cl-ease), color .15s var(--cl-ease);
	white-space: nowrap;
}
.cl-btn--lg { min-height: 48px; padding: 0 28px 0 22px; font-size: 1.0625rem; }
.cl-btn--sm { min-height: 38px; padding: 0 var(--cl-s4); font-size: var(--cl-fs-xs); }
.cl-btn__icon { width: 22px; height: 22px; flex: 0 0 auto; }
.cl-btn--primary { background: var(--cl-accent); color: var(--cl-accent-ink); }
.cl-btn--primary:hover { background: var(--cl-accent-hover); color: var(--cl-accent-ink); }
.cl-btn--ghost { background: rgba(109, 109, 110, .7); color: var(--cl-text); }
.cl-btn--ghost:hover { background: rgba(109, 109, 110, .45); color: var(--cl-text); }
/* Hero "Play": white, as on streaming services; orange stays the brand accent elsewhere. */
.cl-hero__actions .cl-btn--primary { background: #fff; color: #000; }
.cl-hero__actions .cl-btn--primary:hover { background: rgba(255, 255, 255, .75); color: #000; }
.cl-hero__actions .cl-btn__icon { width: 26px; height: 26px; }
.cl-iconbtn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--cl-text); cursor: pointer;
}
.cl-iconbtn:hover { background: rgba(255, 255, 255, .1); }
.cl-icon { width: 22px; height: 22px; }

/* ---------- Chips */
.cl-chips {
	/* Each chip is "dot + text". The list is shifted left by one dot slot and
	   that slot is clipped, so a wrapped line never starts with an orphan dot. */
	--cl-dot-slot: 16px;
	list-style: none; margin: 0 0 0 calc(-1 * var(--cl-dot-slot)); padding: 0;
	display: flex; flex-wrap: wrap; row-gap: var(--cl-s2); align-items: center;
	clip-path: inset(-6px -6px -6px var(--cl-dot-slot));
	font-size: var(--cl-fs-sm); color: var(--cl-text-2);
}
.cl-chip { display: inline-flex; align-items: center; white-space: nowrap; }
.cl-chip::before { content: ""; flex: 0 0 auto; width: 4px; height: 4px; margin: 0 6px; border-radius: 50%; background: var(--cl-muted); opacity: .7; }
.cl-chip.is-kind .cl-chip__txt { color: var(--cl-text); font-weight: 700; }
.cl-chip.is-quality .cl-chip__txt { padding: 0 5px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 3px; font-size: .6875rem; font-weight: 500; line-height: 1.45; letter-spacing: .02em; }
.cl-chip a.cl-chip__txt { color: inherit; text-decoration: none; border-bottom: 1px solid var(--cl-line-strong); }
.cl-chip a.cl-chip__txt:hover { color: var(--cl-text); border-color: var(--cl-accent); }

/* ---------- Header */
.cl-top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
.cl-header {
	position: sticky; top: var(--cl-admin-bar); z-index: 100;
	background: var(--cl-bg);
	border-bottom: 1px solid transparent;
	transition: background-color .25s var(--cl-ease), border-color .25s var(--cl-ease), box-shadow .25s var(--cl-ease);
}
.cl-header[data-scrolled] { border-bottom-color: var(--cl-line); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.cl-has-hero .cl-header {
	position: fixed; left: 0; right: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .7) 10%, rgba(0, 0, 0, 0) 100%);
	/* Size the gradient to the border box so it does not repeat into the 1px border as a hairline. */
	background-origin: border-box; background-repeat: no-repeat;
}
.cl-has-hero .cl-header[data-scrolled],
.cl-has-hero .cl-header[data-search-open] { background: var(--cl-bg); }
.cl-header__inner { display: flex; align-items: center; gap: var(--cl-s3); min-height: var(--cl-header-h); }
.cl-logo { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--cl-text); text-decoration: none; }
.cl-logo img { display: block; height: 38px; width: auto; }
@media (min-width: 768px) { .cl-logo img { height: 44px; } }
.cl-logo__text { font-size: var(--cl-fs-lg); font-weight: 800; }
.cl-header__search { margin-left: auto; }

.cl-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--cl-s1); }
.cl-nav__list a {
	display: block; padding: var(--cl-s2) var(--cl-s3); border-radius: var(--cl-radius-sm);
	color: var(--cl-text-2); text-decoration: none; font-weight: 400; font-size: .875rem; white-space: nowrap;
	transition: color .15s var(--cl-ease);
}
.cl-nav__list a:hover { color: #b3b3b3; }
.cl-nav__list .current-menu-item > a, .cl-nav__list .current-menu-ancestor > a, .cl-nav__list .current-category-ancestor > a { color: var(--cl-text); font-weight: 700; }
.cl-nav__list .sub-menu { display: none; }
.cl-header__menu { display: none; }

@media (max-width: 1023px) {
	html:not(.cl-js) .cl-nav { overflow-x: auto; flex: 1 1 auto; }
	.cl-js .cl-header__menu { display: inline-grid; margin-left: calc(-1 * var(--cl-s2)); }
	.cl-js .cl-nav {
		position: fixed; inset: calc(var(--cl-header-h) + var(--cl-admin-bar)) 0 0 0; z-index: 99;
		padding: var(--cl-s4) var(--cl-gutter) calc(var(--cl-s7) + var(--cl-tabbar-h));
		background: var(--cl-bg); overflow-y: auto; overscroll-behavior: contain;
		visibility: hidden; opacity: 0;
		transition: opacity .18s var(--cl-ease), visibility 0s linear .18s;
	}
	.cl-js .cl-nav[data-open] { visibility: visible; opacity: 1; transition-delay: 0s; }
	.cl-js .cl-nav__list { flex-direction: column; gap: 0; }
	.cl-js .cl-nav__list a { padding: var(--cl-s4) var(--cl-s1); font-size: var(--cl-fs-lg); color: var(--cl-text); border-bottom: 1px solid var(--cl-line); border-radius: 0; }
	.cl-js .cl-nav__list .sub-menu { display: block; list-style: none; padding-left: var(--cl-s4); }
}
@media (min-width: 1024px) {
	.cl-nav { margin-left: var(--cl-s5); }
	.cl-nav__list .menu-item-has-children { position: relative; }
	.cl-nav__list .menu-item-has-children:hover > .sub-menu,
	.cl-nav__list .menu-item-has-children:focus-within > .sub-menu {
		display: block; position: absolute; top: 100%; left: 0; min-width: 200px; margin: 0; padding: var(--cl-s2);
		list-style: none; background: var(--cl-surface-2); border-radius: var(--cl-radius-sm); box-shadow: var(--cl-shadow);
	}
}
html.cl-lock { overflow: hidden; }

/* ---------- Search panel + live results
   Phones/tablets: a full-screen search view under the header.
   Desktop: a dropdown under the search icon. Results are 16:9 rows. */
.cl-search-panel { background: var(--cl-bg); }
.cl-js .cl-search-panel { display: none; }
.cl-js .cl-search-panel[data-open] { display: block; }
.cl-searchform { position: relative; display: flex; gap: var(--cl-s2); max-width: 760px; margin-inline: auto; }
.cl-searchform::before {
	content: ""; position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; pointer-events: none; opacity: .75;
	background: currentColor; color: var(--cl-text);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cl-searchform__input {
	flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 var(--cl-s4) 0 44px;
	border: 1px solid transparent; border-radius: var(--cl-radius-sm);
	background: #333; color: var(--cl-text); font: 400 1rem var(--cl-font);
	-webkit-appearance: none; appearance: none;
}
.cl-searchform__input::-webkit-search-cancel-button { filter: invert(1); }
.cl-searchform__input::placeholder { color: #8c8c8c; text-overflow: ellipsis; }
.cl-searchform__input:focus { border-color: rgba(255, 255, 255, .7); outline: none; box-shadow: none; }
.cl-searchform .cl-btn { min-height: 46px; }
/* Inside the header panel the field submits on Enter; the button stays for screen readers. */
.cl-search-panel .cl-searchform .cl-btn { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.cl-live { max-width: 760px; margin: var(--cl-s4) auto 0; }
.cl-live__status { margin: 0 0 var(--cl-s2); font-size: .8125rem; color: var(--cl-muted); }
.cl-live.is-top .cl-live__status { font-size: 1.125rem; font-weight: 700; color: var(--cl-text); }
.cl-live__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cl-live__item { display: flex; gap: var(--cl-s3); align-items: center; padding: 0; border-radius: 0; color: var(--cl-text); text-decoration: none; background: #232323; }
.cl-live__item::after {
	content: ""; flex: 0 0 auto; width: 30px; height: 30px; margin: 0 var(--cl-s3) 0 auto; border: 1.5px solid #fff; border-radius: 50%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.cl-live__item:hover, .cl-live__item:focus-visible { background: #333; color: var(--cl-text); }
.cl-live__thumb { flex: 0 0 132px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--cl-surface-2); }
.cl-live__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-live__body { display: grid; min-width: 0; padding-block: var(--cl-s2); }
.cl-live__title { font-weight: 500; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-live__meta { font-size: .75rem; color: var(--cl-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-live__all { display: block; padding: var(--cl-s3) 0; font-weight: 600; font-size: .875rem; color: var(--cl-text-2); text-decoration: none; }
.cl-live__all::after { content: " ›"; }
.cl-live__all:hover { color: var(--cl-accent); }
@media (max-width: 1023px) {
	.cl-js .cl-search-panel[data-open] {
		position: fixed; inset: calc(var(--cl-header-h) + var(--cl-admin-bar)) 0 0 0; z-index: 99;
		padding: var(--cl-s3) 0 calc(var(--cl-tabbar-h) + var(--cl-s5)); overflow-y: auto; overscroll-behavior: contain;
	}
}
@media (min-width: 1024px) {
	.cl-header__inner { position: relative; }
	.cl-js .cl-search-panel[data-open] {
		position: absolute; top: 100%; right: max(var(--cl-gutter), calc((100% - var(--cl-max)) / 2 + var(--cl-gutter)));
		width: 460px; padding: var(--cl-s3); border: 1px solid var(--cl-line); border-radius: var(--cl-radius);
		background: rgba(20, 20, 20, .98); box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
	}
	.cl-search-panel .cl-container { padding: 0; }
	.cl-search-panel .cl-live { margin-top: var(--cl-s3); }
	.cl-search-panel .cl-live__list { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
	.cl-search-panel .cl-live__thumb { flex-basis: 112px; }
}
.cl-toast {
	position: fixed; left: 50%; bottom: calc(24px + var(--cl-tabbar-h)); z-index: 9000; translate: -50% 0;
	background: var(--cl-surface-3); color: var(--cl-text); padding: 10px 18px; border-radius: var(--cl-radius-sm);
	font-size: var(--cl-fs-sm); box-shadow: var(--cl-shadow);
}

/* ---------- Mobile tab bar */
.cl-tabbar { display: none; }
@media (max-width: 767px) {
	.cl-tabbar {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
		background: rgba(0, 0, 0, .97); border-top: 1px solid var(--cl-line);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.cl-tabbar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
	.cl-tabbar :is(a, button) {
		display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
		width: 100%; min-height: var(--cl-tabbar-h); padding: 0; border: 0; background: none;
		color: var(--cl-muted); text-decoration: none; font-size: 11px; font-weight: 600; cursor: pointer;
	}
	.cl-tabbar :is(a, button):hover, .cl-tabbar [aria-current="page"] { color: var(--cl-text); }
	.cl-tabbar [aria-current="page"] svg { color: var(--cl-accent); }
}

/* ---------- News ticker (snippet 1041 markup; restyled, positioning neutralized) */
.cl-ticker-anchor { display: none; }
.sn-ticker { width: 100% !important; overflow: hidden !important; contain: paint; max-width: none !important; margin: 0 !important; border-radius: 0 !important; z-index: auto !important; box-shadow: none !important; background: var(--cl-bg) !important; border-block: 0; }
.sn-container { max-width: var(--cl-max) !important; margin-inline: auto !important; padding-inline: var(--cl-gutter); min-width: 0; }
.sn-content { min-width: 0; overflow: hidden !important; }
.sn-label { background: transparent !important; color: var(--cl-text-2) !important; padding: 0 var(--cl-s4) 0 0 !important; font-size: var(--cl-fs-2xs) !important; letter-spacing: .12em !important; border-right: 1px solid var(--cl-line-strong); margin-right: var(--cl-s2); }
.sn-label::before { content: "" !important; width: 8px; height: 8px; border-radius: 50%; background: var(--cl-accent); display: inline-block; margin-right: var(--cl-s2); animation: none !important; }
.sn-item, .sn-item a { color: var(--cl-muted) !important; font-family: var(--cl-font) !important; font-size: .875rem !important; }
.sn-item a:hover { color: var(--cl-text) !important; }
.sn-sep { color: var(--cl-muted) !important; }

/* ---------- Ads: reserve space to avoid layout shift */
.cl-ad { display: flex; justify-content: center; align-items: center; margin: var(--cl-s5) auto; max-width: 100%; overflow: hidden; }
.cl-ad--below_header, .cl-ad--top, .cl-ad--bottom { min-height: 60px; padding-inline: var(--cl-gutter); }
@media (min-width: 768px) { .cl-ad--below_header, .cl-ad--top, .cl-ad--bottom { min-height: 90px; } }
.cl-ad--above, .cl-ad--below { min-height: 60px; padding-inline: var(--cl-gutter); }
.cl-ad--sidebar { min-height: 250px; margin: 0; }
.cl-ad-group { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--cl-s4); margin: var(--cl-s6) auto; padding-inline: var(--cl-gutter); }
.cl-ad__label { margin: 0 0 var(--cl-s2); color: var(--cl-muted); font-size: var(--cl-fs-2xs); text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.cl-ad--placeholder { border: 1px dashed rgba(255, 255, 255, .22); border-radius: var(--cl-radius-sm); color: var(--cl-muted); font-size: var(--cl-fs-xs); }
.cl-ad--placeholder.cl-ad--sidebar { width: 300px; margin: var(--cl-s6) auto; }
.cl-ad--placeholder:not(.cl-ad--sidebar) { width: min(728px, calc(100% - 2 * var(--cl-gutter))); padding-inline: 0; }

/* ---------- Hero (home + detail) */
.cl-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; background: var(--cl-bg-deep); }
.cl-hero__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.cl-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.cl-hero__shade { position: absolute; inset: 0; pointer-events: none; z-index: 0;
	background:
		linear-gradient(0deg, var(--cl-bg) 0%, rgba(20, 20, 20, .82) 18%, rgba(20, 20, 20, 0) 52%),
		linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 22%);
}
.cl-hero__content { position: relative; z-index: 1; margin-top: calc(-1 * var(--cl-s8)); padding-bottom: var(--cl-s5); }
.cl-hero__eyebrow { margin: 0 0 var(--cl-s2); font-size: var(--cl-fs-xs); font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--cl-text-2); }
.cl-hero__title { font-size: var(--cl-fs-hero); line-height: 1.08; margin: 0 0 var(--cl-s3); max-width: 20ch; text-wrap: balance; text-shadow: 2px 2px 4px rgba(0, 0, 0, .45); }
.cl-t__primary { display: block; }
.cl-t__secondary { display: block; margin-top: .35em; font-size: .46em; font-weight: 600; line-height: 1.5; color: var(--cl-text-2); letter-spacing: 0; }
.cl-hero__chips { margin-bottom: var(--cl-s4); }
.cl-hero__summary { max-width: 60ch; color: var(--cl-text-2); font-size: var(--cl-fs-md); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cl-hero__actions { display: flex; flex-wrap: wrap; gap: var(--cl-s3); margin-top: var(--cl-s4); }
.cl-hero--noimg .cl-hero__media { aspect-ratio: auto; height: calc(var(--cl-header-h) + var(--cl-s4)); background: var(--cl-bg); }
.cl-hero--noimg .cl-hero__media::after { display: none; }
/* Short "Ep" as generated content: the label text stays "… Episode N" for scripts and tests. */
@media (max-width: 479px) { .cl-hide-narrow { display: none; } .cl-ep-short::before { content: "Ep"; } }
@media (max-width: 374px) { .cl-hide-xs { display: none; } }

/* Stacked hero (artwork, then content): phones, and tablets in portrait where
   cropping 16:9 artwork to a tall hero would put poster text behind the copy. */
@media (max-width: 767px), (max-width: 1023px) and (orientation: portrait) {
	/* Copy starts BELOW the artwork: many posters print their own title and
	   caption along the bottom edge, so text must not overlap the image. */
	.cl-hero__content { margin-top: 0; padding-top: var(--cl-s4); }
	.cl-hero__shade { background:
		linear-gradient(180deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, 0) 22%); }
	.cl-hero__media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 18%; background: linear-gradient(0deg, var(--cl-bg), rgba(20, 20, 20, 0)); }
	/* Play + More Info side by side, equal width (streaming-app layout). */
	.cl-hero__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--cl-s2); }
	.cl-hero__actions .cl-btn { min-height: 44px; padding: 0 var(--cl-s3); font-size: .9375rem; }
	.cl-hero__actions .cl-btn__icon { width: 22px; height: 22px; }
	/* Half-width buttons: a label that still does not fit ends in "…" instead of spilling past the edges. */
	.cl-hero__actions .cl-btn { min-width: 0; }
	.cl-hero__actions .cl-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
	.cl-hero__title { max-width: none; font-size: clamp(1.5rem, 1.05rem + 2.4vw, 2.125rem); line-height: 1.12; }
}
/* Overlay hero: desktops/laptops, and tablets in landscape. */
@media (min-width: 1024px), (min-width: 768px) and (orientation: landscape) {
	.cl-hero { min-height: clamp(520px, 78vh, 900px); }
	.cl-hero__media { position: absolute; inset: 0; aspect-ratio: auto; }
	.cl-hero__shade {
		background:
			linear-gradient(90deg, rgba(0, 0, 0, .94) 0%, rgba(0, 0, 0, .82) 32%, rgba(0, 0, 0, .3) 58%, rgba(0, 0, 0, 0) 78%),
			linear-gradient(0deg, var(--cl-bg) 0%, rgba(20, 20, 20, .55) 22%, rgba(20, 20, 20, 0) 44%),
			linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 20%);
	}
	.cl-hero__content { margin-top: 0; padding-top: calc(var(--cl-header-h) + var(--cl-s8)); padding-bottom: clamp(48px, 9vh, 120px); }
	.cl-hero--detail { min-height: clamp(480px, 70vh, 820px); }
	.cl-hero--detail .cl-hero__title { font-size: clamp(2rem, 1.3rem + 2.2vw, 3.125rem); max-width: 22ch; }
	.cl-hero--noimg { min-height: 0; }
	.cl-hero--noimg .cl-hero__media { position: absolute; height: auto; }
}
@media (min-width: 1440px) { .cl-hero__summary { font-size: var(--cl-fs-lg); } }
/* Non-overlay hero pages (ad set to "before hero"): header is solid and in flow. */
body:not(.cl-has-hero) .cl-hero__content { padding-top: var(--cl-s6); }

/* ---------- Homepage hero slider: slides share one grid cell and cross-fade. */
.cl-heroslider { position: relative; display: grid; background: var(--cl-bg); }
.cl-heroslider > .cl-hero__slide { grid-area: 1 / 1; min-width: 0; }
/* Stacked (phones/portrait): artwork at the top of every slide, whatever its text length. */
@media (max-width: 767px), (max-width: 1023px) and (orientation: portrait) {
	.cl-heroslider > .cl-hero__slide { justify-content: flex-start; }
	/* No synopsis on phones (as in streaming apps): keeps every slide about the same height. */
	.cl-heroslider .cl-hero__summary { display: none; }
}
html:not(.cl-js) .cl-hero__slide:not(.is-active) { display: none; }
.cl-js .cl-heroslider.is-multi > .cl-hero__slide {
	opacity: 0; visibility: hidden; z-index: 0;
	transition: opacity .9s var(--cl-ease), visibility 0s linear .9s;
}
.cl-js .cl-heroslider.is-multi > .cl-hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition-delay: 0s; }
.cl-heroslider__ctrl {
	position: absolute; z-index: 3; right: max(var(--cl-gutter), calc((100% - var(--cl-max)) / 2 + var(--cl-gutter)));
	display: flex; align-items: center; gap: 4px;
	/* Phones/portrait: on the lower edge of the artwork. */
	top: calc(100vw * 9 / 16 - 36px);
}
.cl-heroslider__dots { display: flex; gap: 6px; }
.cl-heroslider__dot { position: relative; width: 22px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; transition: width .3s var(--cl-ease); }
.cl-heroslider__dot::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .38); }
.cl-heroslider__dot[aria-current] { width: 40px; }
.cl-heroslider__dot[aria-current]::after {
	content: ""; position: absolute; left: 0; top: 12px; height: 4px; width: 100%; border-radius: 2px; background: #fff;
	transform-origin: left center; animation: cl-hero-progress var(--cl-hero-ms, 7000ms) linear both;
}
.cl-heroslider[data-paused] .cl-heroslider__dot[aria-current]::after { animation-play-state: paused; }
.cl-heroslider[data-static] .cl-heroslider__dot[aria-current]::after { animation: none; scale: 1 1; }
@keyframes cl-hero-progress { from { scale: 0 1; } to { scale: 1 1; } }
.cl-heroslider__arrow {
	display: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
	color: #fff; background: rgba(0, 0, 0, .45); cursor: pointer; transition: background-color .2s var(--cl-ease);
}
.cl-heroslider__arrow:hover { background: rgba(0, 0, 0, .75); }
@media (hover: hover) and (pointer: fine) { .cl-heroslider__arrow { display: grid; } }
@media (min-width: 1024px), (min-width: 768px) and (orientation: landscape) {
	.cl-heroslider__ctrl { top: auto; bottom: clamp(52px, 9.4vh, 124px); }
}

/* ---------- Breadcrumbs */
.cl-crumbs { font-size: var(--cl-fs-xs); color: var(--cl-muted); margin-bottom: var(--cl-s3); }
.cl-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--cl-s1) var(--cl-s2); }
.cl-crumbs li + li::before { content: "›"; margin-right: var(--cl-s2); color: var(--cl-muted); }
.cl-crumbs a { color: var(--cl-text-2); text-decoration: none; }
.cl-crumbs a:hover { color: var(--cl-text); text-decoration: underline; }
.cl-crumbs [aria-current] { color: var(--cl-muted); }
@media (max-width: 767px) { .cl-hero .cl-crumbs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; } }
.cl-crumbs--rm a { color: var(--cl-text-2); }

/* ---------- Rails + cards */
.cl-home { padding-top: var(--cl-s4); }
.cl-rail { margin: var(--cl-s4) 0 var(--cl-s5); }
@media (min-width: 1024px) { .cl-rail { margin: 1.5vw 0 2.5vw; } }
.cl-rail__head { display: flex; align-items: baseline; gap: var(--cl-s4); margin-bottom: 0; }
.cl-rail__title { font-size: clamp(1.0625rem, .9rem + .55vw, 1.5rem); font-weight: 700; color: var(--cl-text-2); margin: 0; letter-spacing: 0; }
.cl-rail__more { margin-left: auto; font-size: .875rem; font-weight: 600; color: var(--cl-muted); text-decoration: none; white-space: nowrap; }
.cl-rail__more:hover { color: var(--cl-accent); }
.cl-rail__more::after { content: " ›"; }
.cl-rail__viewport { position: relative; }
.cl-rail__track {
	/* Left edge aligns with the page container; the right edge bleeds to the
	   viewport so the next card "peeks" (streaming-style discovery cue). */
	--cl-rail-start: max(var(--cl-gutter), calc((100% - var(--cl-max)) / 2 + var(--cl-gutter)));
	list-style: none; margin: 0; padding: var(--cl-s2) var(--cl-gutter) var(--cl-s4) var(--cl-rail-start);
	display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: var(--cl-s2);
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--cl-rail-start) var(--cl-gutter); scrollbar-width: none;
}
.cl-rail__track::-webkit-scrollbar { display: none; }
/* Mouse drag-to-scroll (rails.js): no snapping or text selection mid-drag. */
.cl-rail__track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.cl-rail__track.is-dragging a { cursor: grabbing; }
.cl-heroslider { -webkit-user-select: none; user-select: none; }
.cl-rail__item { scroll-snap-align: start; min-width: 0; }
@media (min-width: 640px) { .cl-rail__track { grid-auto-columns: 31%; } }
@media (min-width: 1024px) { .cl-rail__track { grid-auto-columns: calc((100% - 2 * var(--cl-gutter) - 3 * var(--cl-s2)) / 4.3); padding-block: var(--cl-s3) var(--cl-s5); } }
@media (min-width: 1280px) { .cl-rail__track { grid-auto-columns: calc((100% - 2 * var(--cl-gutter) - 4 * var(--cl-s2)) / 5.3); } }
@media (min-width: 1600px) { .cl-rail__track { grid-auto-columns: calc((100% - 2 * var(--cl-gutter) - 5 * var(--cl-s2)) / 6.3); } }

.cl-rail__nav {
	position: absolute; top: var(--cl-s2); bottom: var(--cl-s4); z-index: 2; width: var(--cl-gutter); min-width: 44px;
	display: none; place-items: center; padding: 0; border: 0; cursor: pointer;
	color: var(--cl-text); background: rgba(0, 0, 0, .72); opacity: 0; transition: opacity .2s var(--cl-ease);
}
.cl-rail__nav--prev { left: 0; border-radius: 0 var(--cl-radius) var(--cl-radius) 0; }
.cl-rail__nav--next { right: 0; border-radius: var(--cl-radius) 0 0 var(--cl-radius); }
.cl-rail__nav[disabled] { visibility: hidden; }
@media (hover: hover) and (pointer: fine) {
	.cl-rail__nav:not([hidden]) { display: grid; }
	.cl-rail:hover .cl-rail__nav, .cl-rail__nav:focus-visible { opacity: 1; }
}

.cl-card { position: relative; height: 100%; }
.cl-card__link { display: block; height: 100%; color: var(--cl-text); text-decoration: none; border-radius: var(--cl-radius); }
.cl-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--cl-radius); background: var(--cl-surface); transition: scale .3s var(--cl-ease), box-shadow .3s var(--cl-ease); }
.cl-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Cards far from the screen (lower rails, cards off to the side in a rail) are not rendered until they come
   near, so their lazy posters are not fetched up front. The 16:9 box keeps its size: no layout shift. */
.cl-card__media { content-visibility: auto; }
.cl-card__fallback { display: grid; place-items: center; height: 100%; padding: var(--cl-s3); text-align: center; font-weight: 700; color: var(--cl-text-2); background: linear-gradient(135deg, var(--cl-surface-2), var(--cl-bg-deep)); }
.cl-badge {
	position: absolute; top: 6px; left: 6px;
	padding: 1px 5px; border-radius: 2px; background: rgba(0, 0, 0, .72); color: var(--cl-text);
	font-size: .6875rem; font-weight: 700; letter-spacing: .04em; line-height: 1.5;
}
.cl-badge--quality { left: auto; right: 6px; }
/* "Next Season" / "Next Part": a ribbon on the bottom edge of the artwork, above the hover overlay. */
.cl-card__link { position: relative; }
.cl-card__flagbox { position: absolute; left: 0; right: 0; top: 0; z-index: 3; aspect-ratio: 16 / 9; pointer-events: none; transition: scale .3s var(--cl-ease); }
@media (hover: hover) and (pointer: fine) { .cl-card__link:hover .cl-card__flagbox, .cl-card__link:focus-visible .cl-card__flagbox { scale: 1.05; } }
.cl-card__flag {
	position: absolute; left: 50%; bottom: 0; z-index: 1; translate: -50% 0;
	padding: 2px 10px; border-radius: 3px 3px 0 0; background: var(--cl-accent); color: var(--cl-accent-ink);
	font-size: .6875rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap;
}
.cl-card__body { display: block; padding: 6px 1px 0; }
.cl-card__title {
	margin: 0; font-size: .875rem; font-weight: 500; line-height: 1.35; color: var(--cl-text-2);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cl-card__meta { display: block; margin-top: 2px; font-size: var(--cl-fs-2xs); color: var(--cl-muted); }
/* Rows: one-line titles, no meta line (artwork carries the identity). */
.cl-rail .cl-card__title { -webkit-line-clamp: 1; }
.cl-rail .cl-card__meta { display: none; }
.cl-card__peek { display: none; }
@media (hover: hover) and (pointer: fine) {
	/* The tile itself lifts (not a zoom inside the frame). */
	.cl-card__link:hover .cl-card__media, .cl-card__link:focus-visible .cl-card__media { scale: 1.05; box-shadow: 0 8px 22px rgba(0, 0, 0, .75); z-index: 1; }
	.cl-card__link:hover .cl-card__title { color: var(--cl-text); }
	/* Hover overlay: the Cartoons.lk logo on a bottom fade over the artwork (moves with the lifted tile). */
	.cl-card__link { position: relative; }
	.cl-card__peek {
		display: block; position: absolute; left: 0; right: 0; top: 0; z-index: 2; aspect-ratio: 16 / 9;
		border-radius: var(--cl-radius); pointer-events: none;
		background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 32%, rgba(0, 0, 0, 0) 58%);
		opacity: 0; transition: opacity .2s var(--cl-ease), scale .3s var(--cl-ease);
	}
	.cl-card__peek::before {
		content: ""; position: absolute; left: 10px; bottom: 8px; width: 42%; max-width: 120px; aspect-ratio: 3 / 1;
		background: var(--cl-logo, none) left bottom / contain no-repeat;
		filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
	}
	.cl-card__link:hover .cl-card__peek, .cl-card__link:focus-visible .cl-card__peek { opacity: 1; scale: 1.05; }
}

/* Ranked rail ("Most watched"): large outline numerals beside the artwork. */
.cl-rail--ranked .cl-rail__track { grid-auto-columns: 74%; }
@media (min-width: 640px) { .cl-rail--ranked .cl-rail__track { grid-auto-columns: 46%; } }
@media (min-width: 1024px) { .cl-rail--ranked .cl-rail__track { grid-auto-columns: calc((100% - 2 * var(--cl-gutter) - 3 * var(--cl-s4)) / 3.6); } }
@media (min-width: 1440px) { .cl-rail--ranked .cl-rail__track { grid-auto-columns: calc((100% - 2 * var(--cl-gutter) - 4 * var(--cl-s4)) / 4.4); } }
.cl-card--ranked .cl-card__link { display: grid; grid-template-columns: auto 1fr; column-gap: var(--cl-s2); align-items: end; }
.cl-card--ranked .cl-card__rank {
	grid-row: 1 / span 2; align-self: center;
	font-size: clamp(3.5rem, 2rem + 4vw, 6rem); font-weight: 900; line-height: .8; letter-spacing: -.06em;
	color: var(--cl-bg); -webkit-text-stroke: 2px rgba(255, 255, 255, .55); paint-order: stroke;
	min-width: .9em; text-align: right;
}
.cl-card--ranked .cl-card__media, .cl-card--ranked .cl-card__body { grid-column: 2; }
.cl-card--ranked .cl-card__peek { display: none; }

/* ---------- Category tiles */
/* Category discovery: a full-width grid (4 categories), not a half-empty rail. */
.cl-rail--cats .cl-rail__track {
	grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr));
	overflow: visible; scroll-snap-type: none; max-width: var(--cl-max); margin-inline: auto; padding: var(--cl-s2) var(--cl-gutter) var(--cl-s4);
}
@media (min-width: 768px) { .cl-rail--cats .cl-rail__track { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cl-cat { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--cl-radius); color: var(--cl-text); text-decoration: none; background: var(--cl-surface-2); }
.cl-cat__media { position: absolute; inset: 0; }
.cl-cat__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.6); transition: scale .35s var(--cl-ease); }
.cl-cat__body { position: absolute; inset: auto 0 0 0; padding: var(--cl-s4); background: linear-gradient(0deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0)); }
.cl-cat__name { display: block; font-size: var(--cl-fs-lg); font-weight: 800; }
.cl-cat__count { font-size: var(--cl-fs-xs); color: var(--cl-text-2); }
.cl-cat:hover { color: var(--cl-text); }
.cl-cat:hover .cl-cat__media img { scale: 1.05; }

/* ---------- Page heads, filters, grids */
.cl-pagehead { padding: var(--cl-s6) 0 var(--cl-s4); margin-bottom: var(--cl-s3); }
.cl-pagehead__title { font-size: var(--cl-fs-2xl); margin-bottom: var(--cl-s2); }
.cl-pagehead__meta { color: var(--cl-muted); font-size: var(--cl-fs-sm); margin: 0 0 var(--cl-s3); }
.cl-pagehead__desc { color: var(--cl-text-2); max-width: var(--cl-read); }
.cl-pagehead__search { margin-top: var(--cl-s4); }
.cl-pagehead__search .cl-searchform { margin-inline: 0; }
.cl-filter ul { list-style: none; margin: var(--cl-s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--cl-s2); }
.cl-filter a {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 var(--cl-s4); border-radius: 999px;
	border: 1px solid var(--cl-line-strong); color: var(--cl-text-2); text-decoration: none; font-size: var(--cl-fs-sm); font-weight: 600;
}
.cl-filter a:hover { color: var(--cl-text); border-color: var(--cl-text-2); }
.cl-filter a[aria-current] { background: var(--cl-text); border-color: var(--cl-text); color: var(--cl-bg); }

.cl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--cl-s5) var(--cl-s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .cl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cl-s6) var(--cl-s4); } }
@media (min-width: 1440px) { .cl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1800px) { .cl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Archive grids: the page already names the category; only search results keep the meta line. */
body:not(.search) .cl-grid .cl-card__meta { display: none; }
.cl-texttile { display: grid; gap: var(--cl-s1); align-content: end; aspect-ratio: 16 / 9; padding: var(--cl-s4); border-radius: var(--cl-radius); background: var(--cl-surface); color: var(--cl-text); text-decoration: none; }
.cl-empty { color: var(--cl-text-2); }
.cl-empty-state { padding: var(--cl-s6) 0; max-width: 60ch; }

.pagination { margin-top: var(--cl-s7); }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--cl-s2); }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--cl-s3);
	border-radius: var(--cl-radius-sm); background: var(--cl-surface); color: var(--cl-text); text-decoration: none; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--cl-accent); color: var(--cl-accent-ink); }
.pagination a.page-numbers:hover { background: var(--cl-surface-2); color: var(--cl-text); }
.pagination .dots { background: none; }

/* ---------- Detail page */
.cl-detail__body { margin-top: var(--cl-s4); }
.cl-detail__grid { display: grid; gap: var(--cl-s5); }
@media (min-width: 768px) { .cl-detail__grid { grid-template-columns: minmax(220px, 340px) 1fr; gap: var(--cl-s6); align-items: start; } }
/* Title-page sidebar (report 62, CL-02): own column at >= 1200 px, its own centred row below that (desktop UAs only). */
.cl-detail__aside { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: var(--cl-s4); min-width: 0; }
.cl-detail__aside .cl-ad-group { flex-direction: column; margin: 0; padding-inline: 0; }
.cl-detail__aside .cl-ad--placeholder.cl-ad--sidebar { margin: 0; }
@media (min-width: 1200px) {
	.cl-detail__grid--aside { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) 300px; }
	.cl-detail__aside { grid-column: auto; position: sticky; top: calc(var(--cl-header-h, 64px) + var(--cl-s4)); }
}
.cl-detail__art { margin: 0; border-radius: var(--cl-radius); overflow: hidden; box-shadow: var(--cl-shadow); aspect-ratio: 16 / 9; background: var(--cl-surface); }
.cl-detail__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) { .cl-detail__art { display: none; } }
.cl-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--cl-s3) var(--cl-s5); margin: var(--cl-s5) 0; padding: var(--cl-s4) 0; border-block: 1px solid var(--cl-line); }
.cl-facts div { min-width: 0; }
.cl-facts dt { font-size: var(--cl-fs-2xs); text-transform: uppercase; letter-spacing: .1em; color: var(--cl-muted); }
.cl-facts dd { margin: 2px 0 0; font-weight: 600; font-size: var(--cl-fs-sm); }
.cl-facts dd a { color: var(--cl-text); }

.cl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cl-s2); margin-bottom: var(--cl-s4); }
.cl-tags__label { font-size: var(--cl-fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--cl-muted); margin-right: var(--cl-s2); }
.cl-tags ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--cl-s2); }
.cl-tags a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--cl-s3); border-radius: 4px; background: var(--cl-surface-2); color: var(--cl-text-2); font-size: var(--cl-fs-xs); text-decoration: none; }
.cl-tags a:hover { color: var(--cl-text); background: var(--cl-surface-3); }
.cl-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cl-s2); }
.cl-share__label { font-size: var(--cl-fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--cl-muted); margin-right: var(--cl-s2); }
.cl-share__btn {
	display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--cl-s3); border-radius: 999px;
	border: 1px solid var(--cl-line-strong); background: transparent; color: var(--cl-text-2);
	font-size: var(--cl-fs-xs); font-weight: 600; text-decoration: none; cursor: pointer;
}
.cl-share__btn:hover { color: var(--cl-text); border-color: var(--cl-text-2); }

.cl-actions { margin: var(--cl-s4) 0 var(--cl-s7); padding: var(--cl-s5); border-radius: var(--cl-radius); background: var(--cl-surface); border: 1px solid var(--cl-line); }
.cl-actions:focus { outline: none; }
@media (min-width: 768px) { .cl-actions { padding: var(--cl-s6); } }

/* ---------- Episodes (streaming-style rows) */
.cl-episodes { margin-top: var(--cl-s5); padding-top: var(--cl-s5); border-top: 1px solid var(--cl-line); }
.cl-episodes:focus { outline: none; }
.cl-episodes__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cl-s3) var(--cl-s4); margin-bottom: var(--cl-s4); }
.cl-episodes__heading { display: flex; align-items: center; gap: var(--cl-s4); }
.cl-episodes__title { margin: 0; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); }
.cl-episodes__count { margin: 0; color: var(--cl-muted); font-size: .875rem; }
.cl-episodes__tools { display: flex; flex-wrap: wrap; gap: var(--cl-s2); margin-left: auto; }
.cl-episodes__empty { margin: 0; padding: var(--cl-s5); border: 1px dashed var(--cl-line-strong); border-radius: var(--cl-radius); color: var(--cl-text-2); text-align: center; }

/* Season dropdown (seasons are separate posts: plain links, works without JS). */
.cl-season { position: relative; }
.cl-season__btn {
	display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; list-style: none; cursor: pointer;
	border: 1px solid #4d4d4d; border-radius: var(--cl-radius-sm); background: #242424; color: var(--cl-text); font-weight: 700; font-size: .9375rem;
}
.cl-season__btn::-webkit-details-marker { display: none; }
.cl-season__btn::after { content: ""; width: 0; height: 0; border: 5px solid transparent; border-top-color: currentColor; margin-top: 5px; }
.cl-season[open] .cl-season__btn { border-color: var(--cl-text-2); }
.cl-season__menu {
	position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 100%; margin: 0; padding: 6px 0; list-style: none;
	background: #242424; border: 1px solid #4d4d4d; border-radius: var(--cl-radius-sm); box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
}
.cl-season__menu a { display: block; padding: 9px 16px; color: var(--cl-text-2); text-decoration: none; white-space: nowrap; font-size: .9375rem; }
.cl-season__menu a:hover, .cl-season__menu a:focus-visible { background: #3a3a3a; color: var(--cl-text); }
.cl-season__menu a[aria-current] { color: var(--cl-text); font-weight: 700; }
.cl-season__menu a[aria-current]::after { content: " ✓"; color: var(--cl-accent); }

/* Continue watching */
.cl-continue {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--cl-s3) var(--cl-s4);
	margin-bottom: var(--cl-s4); padding: var(--cl-s3) var(--cl-s4); border-radius: var(--cl-radius);
	background: linear-gradient(90deg, rgba(244, 140, 8, .16), rgba(255, 255, 255, .04) 60%); border: 1px solid rgba(244, 140, 8, .35);
}
.cl-continue__text { display: grid; min-width: 0; }
.cl-continue__label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cl-accent); }
.cl-continue__ep { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-continue__actions { display: flex; flex-wrap: wrap; gap: var(--cl-s2); min-width: 0; max-width: 100%; }
/* Buttons are nowrap: let them shrink and cut a long (Sinhala) "Next: …" title with an ellipsis instead of widening the card. */
.cl-continue__actions .cl-btn { min-width: 0; max-width: 100%; }
.cl-continue [data-cl-continue-next] { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 38px; text-align: center; }
.cl-btn--light { background: #fff; color: #000; }
.cl-btn--light:hover { background: rgba(255, 255, 255, .8); color: #000; }

.cl-episodes__jump { display: flex; flex-wrap: wrap; gap: var(--cl-s2); margin-bottom: var(--cl-s4); }
.cl-episodes__jump a {
	display: inline-flex; align-items: center; min-height: 34px; padding: 0 var(--cl-s3); border-radius: 999px;
	background: var(--cl-surface-2); color: var(--cl-text-2); font-size: var(--cl-fs-xs); font-weight: 700; text-decoration: none;
}
.cl-episodes__jump a:hover { color: var(--cl-text); background: var(--cl-surface-3); }

.cl-episodes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--cl-line); }
@media (min-width: 1440px) { .cl-episodes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--cl-s5); border-top: 0; } }
/* Very long lists only: rows off screen skip rendering work (costs first paint on short lists). */
.cl-episodes__list.is-long .cl-ep { content-visibility: auto; contain-intrinsic-size: auto 104px; }
.cl-ep {
	display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--cl-s3) var(--cl-s4); align-items: center;
	padding: var(--cl-s3) var(--cl-s2); border-bottom: 1px solid var(--cl-line); border-radius: 0;
	scroll-margin-top: calc(var(--cl-header-h) + var(--cl-admin-bar) + 16px);
}
.cl-ep:hover { background: rgba(255, 255, 255, .035); }
.cl-ep.is-current { background: #2a2a2a; border-radius: var(--cl-radius); border-bottom-color: transparent; }

.cl-ep__thumb {
	position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden;
	border: 0; border-radius: var(--cl-radius); cursor: pointer; color: #fff;
	background: #222 var(--cl-ep-art, none) center / cover no-repeat;
}
.cl-ep__thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, .35)); }
.cl-ep__thumb.is-off { cursor: default; filter: grayscale(1) brightness(.6); }
.cl-ep__num {
	position: absolute; left: 8px; bottom: 4px; z-index: 1;
	font-size: 1.75rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
	text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}
.cl-ep__play {
	position: absolute; left: 50%; top: 50%; z-index: 1; translate: -50% -50%;
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: rgba(0, 0, 0, .55); border: 2px solid #fff; transition: scale .2s var(--cl-ease), background-color .2s var(--cl-ease);
}
.cl-ep__thumb:hover .cl-ep__play, .cl-ep__thumb:focus-visible .cl-ep__play { scale: 1.1; background: var(--cl-accent); border-color: var(--cl-accent); color: var(--cl-accent-ink); }
.cl-ep__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 4px; background: rgba(255, 255, 255, .25); opacity: 0; }
.cl-ep__bar.has-progress { opacity: 1; }
.cl-ep__bar > span { display: block; height: 100%; width: 0; background: var(--cl-accent); }

.cl-ep__body { min-width: 0; }
.cl-ep__title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.cl-ep__name { display: block; font-weight: 500; color: var(--cl-text-2); font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-ep__info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0 0; font-size: .8125rem; color: var(--cl-muted); }
.cl-ep__now { font-size: .6875rem; font-weight: 800; color: var(--cl-accent); text-transform: uppercase; letter-spacing: .08em; }
.cl-ep__seen { font-size: .75rem; color: var(--cl-muted); }
.cl-ep__seen::before { content: "✓ "; color: #46d369; }
.cl-ep__desc { margin: 4px 0 0; font-size: .875rem; color: var(--cl-text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-ep__dur { color: var(--cl-text-2); }
.cl-ep__q { padding: 0 5px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 3px; font-size: .6875rem; font-weight: 600; color: var(--cl-text-2); }
.cl-ep__off { margin: 4px 0 0; font-size: .8125rem; color: var(--cl-muted); }

/* Narrow rows (phones): actions on their own line under the artwork and title.
   Media queries, not container queries: the list is one column below 1440px,
   so the row width follows the viewport (and first paint stays cheap). */
.cl-ep__actions { grid-column: 1 / -1; display: flex; gap: var(--cl-s2); }
.cl-ep .cl-ep__actions > .episode-popup-btn { flex: 1 1 0; justify-content: center; }
@media (min-width: 700px) {
	.cl-ep { grid-template-columns: 168px minmax(0, 1fr) auto; }
	.cl-ep__actions { grid-column: 3; }
	.cl-ep .cl-ep__actions > .episode-popup-btn { flex: 0 0 auto; }
}
@media (max-width: 599px) {
	.cl-episodes__tools { flex: 1 1 100%; margin-left: 0; }
	.cl-episodes__tools > * { flex: 1 1 auto; justify-content: center; }
	.cl-continue__actions { flex: 1 1 100%; }
	.cl-continue__text { flex: 1 1 100%; }
	.cl-continue__actions .cl-btn { flex: 1 1 100%; }
}

/* ---------- Prose (post/page content, Fluent Forms) */
.cl-prose { font-size: 1.0625rem; color: var(--cl-text-2); overflow-wrap: break-word; }
.cl-prose > :last-child { margin-bottom: 0; }
.cl-prose :where(h2, h3, h4) { color: var(--cl-text); margin-top: var(--cl-s6); }
.cl-prose :where(img, figure) { border-radius: var(--cl-radius-sm); }
.cl-prose figure { margin: var(--cl-s5) 0; }
.cl-prose table { width: 100%; border-collapse: collapse; margin-bottom: var(--cl-s5); font-size: var(--cl-fs-sm); display: block; overflow-x: auto; }
.cl-prose :where(th, td) { padding: var(--cl-s2) var(--cl-s3); border: 1px solid var(--cl-line); text-align: left; }
.cl-prose th { background: var(--cl-surface); color: var(--cl-text); }
.cl-prose :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea, select),
.cl-comments :where(input[type="text"], input[type="email"], input[type="url"], textarea) {
	width: 100%; min-height: 46px; padding: var(--cl-s3); border: 1px solid var(--cl-line-strong); border-radius: var(--cl-radius-sm);
	background: var(--cl-surface); color: var(--cl-text); font: inherit;
}
.cl-prose :where(input, textarea, select):focus, .cl-comments :where(input, textarea):focus { border-color: var(--cl-accent); outline: none; box-shadow: 0 0 0 3px rgba(244, 140, 8, .3); }
.cl-prose :where(button[type="submit"], input[type="submit"], .ff-btn-submit),
.cl-comments .submit {
	min-height: 46px; padding: 0 var(--cl-s5); border: 0; border-radius: var(--cl-radius-sm);
	background: var(--cl-accent) !important; color: var(--cl-accent-ink) !important; font-weight: 700; cursor: pointer;
}
.cl-prose label { color: var(--cl-text); font-weight: 600; }
.cl-page .cl-prose { padding-bottom: var(--cl-s5); }

/* ---------- Comments */
.cl-detail__comments { max-width: calc(var(--cl-read) + 2 * var(--cl-gutter)); margin-inline: auto; }
.cl-comments { margin-top: var(--cl-s7); padding-top: var(--cl-s5); border-top: 1px solid var(--cl-line); }
.cl-comments__title { font-size: var(--cl-fs-lg); }
.cl-comments__list, .cl-comments__list .children { list-style: none; margin: 0; padding: 0; }
.cl-comments__list .children { padding-left: var(--cl-s5); }
.cl-comments .comment-body { padding: var(--cl-s4); margin-bottom: var(--cl-s3); background: var(--cl-surface); border-radius: var(--cl-radius-sm); }
.cl-comments .comment-meta { font-size: var(--cl-fs-xs); color: var(--cl-muted); margin-bottom: var(--cl-s2); }
.cl-comments .comment-meta a { color: inherit; }
.cl-comments .comment-author .fn { color: var(--cl-text); font-style: normal; font-weight: 700; }
.cl-comments .avatar { border-radius: 50%; vertical-align: middle; margin-right: var(--cl-s2); }
.cl-comments .reply a { font-size: var(--cl-fs-xs); font-weight: 700; text-decoration: none; }
.cl-comments .comment-form p { margin-bottom: var(--cl-s3); }

/* ---------- Continue Watching rail (report 58; markup: inc/continue.php + assets/js/continue.js) */
.cl-rail.cl-cw .cl-card__body { min-height: 48px; } /* placeholders and real cards: same height, nothing below moves */
.cl-cw__ph .cl-card__media { background: var(--cl-surface); }
.cl-cw__phline { display: block; width: 60%; height: 12px; margin-top: 10px; border-radius: 6px; background: var(--cl-surface); }
.cl-card--cw .cl-cw__play {
	position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .45) no-repeat center / 18px
	url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z' fill='%23fff'/%3E%3C/svg%3E");
	opacity: 0; transition: opacity .15s var(--cl-ease);
}
.cl-card--cw .cl-card__link:hover .cl-cw__play, .cl-card--cw .cl-card__link:focus-visible .cl-cw__play { opacity: 1; }
@media (hover: none) { .cl-card--cw .cl-cw__play { opacity: 1; width: 40px; height: 40px; margin: -20px 0 0 -20px; } }
.cl-cw__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .25); }
.cl-cw__bar > span { display: block; height: 100%; background: var(--cl-accent); }
.cl-rail .cl-card--cw .cl-card__meta { display: block; color: var(--cl-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-cw__remove {
	position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
}
.cl-cw__remove span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .7); font-size: 1.25rem; line-height: 1; }
.cl-cw__remove:hover span, .cl-cw__remove:focus-visible span { background: #fff; color: #000; }
@media (hover: hover) and (pointer: fine) {
	.cl-cw__remove { opacity: 0; transition: opacity .15s var(--cl-ease); }
	.cl-card--cw:hover .cl-cw__remove, .cl-cw__remove:focus-visible { opacity: 1; }
}
.cl-cw__error { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cl-s3); min-height: 120px; padding: var(--cl-s4); grid-column: 1 / -1; color: var(--cl-text-2); }
.cl-cw__error-text { margin: 0; }
.cl-rail.cl-cw .cl-rail__track:has(.cl-cw__error) { display: block; }

/* ---------- One state design for playback problems / not available (report 58) */
.cl-state { display: grid; justify-items: center; gap: var(--cl-s2); max-width: 46ch; margin-inline: auto; text-align: center; }
.cl-state__icon { width: 40px; height: 40px; color: var(--cl-accent); }
.cl-state__title { margin: 0; font-size: var(--cl-fs-lg); font-weight: 700; color: var(--cl-text); }
.cl-state__text { margin: 0; color: var(--cl-text-2); font-size: var(--cl-fs-sm); line-height: 1.5; }
.cl-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--cl-s2); margin-top: var(--cl-s2); }
.cl-state__actions .cl-btn { min-height: 44px; }
.cl-state--panel { max-width: none; margin: var(--cl-s4) 0; padding: var(--cl-s6) var(--cl-s4); border: 1px dashed var(--cl-line-strong); border-radius: var(--cl-radius); }
.cl-state--compact { justify-items: start; max-width: none; text-align: left; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--cl-s3); align-items: start; }
.cl-state--compact .cl-state__icon { grid-row: span 3; width: 28px; height: 28px; }
.cl-state--compact .cl-state__title { font-size: var(--cl-fs-md); }
.cl-state--compact .cl-state__actions { justify-content: flex-start; grid-column: 2; }
.cl-ep__body .cl-state { margin-top: var(--cl-s2); }

/* ---------- 404 */
.cl-404__inner { padding: var(--cl-s8) var(--cl-gutter) var(--cl-s6); max-width: 760px; }
/* Phones: full-width field so the hint isn't cut mid-word; button below (report 62, polish). */
@media (max-width: 479px) {
	.cl-404__search .cl-searchform { flex-wrap: wrap; }
	.cl-404__search .cl-searchform__input { flex-basis: 100%; }
	.cl-404__search .cl-searchform::before { top: 23px; }
	.cl-404__search .cl-searchform .cl-btn { flex: 1 1 100%; }
}
.cl-404__code { margin: 0; font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--cl-accent); }
.cl-404__text { color: var(--cl-text-2); }
.cl-404__search { margin: var(--cl-s5) 0; }
.cl-404__search .cl-searchform { margin-inline: 0; }

/* ---------- Footer */
.cl-footer { margin-top: var(--cl-s7); padding-block: var(--cl-s7) var(--cl-s6); background: var(--cl-bg-deep); border-top: 1px solid var(--cl-line); color: var(--cl-muted); font-size: var(--cl-fs-sm); }
.cl-footer__inner { display: grid; gap: var(--cl-s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cl-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cl-footer__brand, .cl-footer__legal { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .cl-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; align-items: start; } .cl-footer__brand { grid-column: auto; } }
.cl-footer__tagline { margin: var(--cl-s3) 0 var(--cl-s4); max-width: 42ch; }
.cl-footer__heading { margin: 0 0 var(--cl-s2); font-size: var(--cl-fs-2xs); text-transform: uppercase; letter-spacing: .12em; color: var(--cl-text); }
.cl-footer__list--stack { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.cl-footer .cl-footer__list--stack li { min-width: 0; max-width: 100%; }
.cl-footer .cl-footer__list--stack a { display: block; padding-block: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-footer__col { min-width: 0; }
.cl-footer .cl-logo img { height: 36px; }
.cl-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--cl-s1) var(--cl-s5); }
.cl-footer__list a { color: var(--cl-text-2); text-decoration: none; display: inline-block; padding-block: var(--cl-s2); }
.cl-footer__list a:hover { color: var(--cl-text); }
.cl-footer__legal { padding-top: var(--cl-s4); border-top: 1px solid var(--cl-line); font-size: var(--cl-fs-xs); }
.cl-footer__legal p { margin: 0 0 var(--cl-s1); }
.cl-footer__legal a { color: var(--cl-text-2); }

/* ---------- Telegram CTA (snippet 1134 markup; restyled to the system) */
.cl-theme .telegram-button-container { text-align: left; margin: 0 0 var(--cl-s5); animation: none; }
.cl-theme .telegram-join-btn {
	gap: var(--cl-s2); padding: 0 var(--cl-s5); min-height: 46px; border-radius: var(--cl-radius-sm);
	background: #1877ab; box-shadow: none; font-size: var(--cl-fs-sm); color: #fff; /* Telegram blue, darkened for WCAG AA (white 4.9:1) */
}
.cl-theme .telegram-join-btn:hover { transform: none; box-shadow: none; background: #156ea0; color: #fff; }
.cl-theme .telegram-join-btn::before { display: none; }
.cl-theme .telegram-join-btn svg { width: 20px; height: 20px; animation: none; }

/* ---------- Motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.sn-track { animation: none !important; }
	.cl-card__img, .cl-cat__media img { scale: 1 !important; }
}
