/* Cricinfo-style single story page */

.story-page {
	padding-bottom: 48px;
}

.story-page__breadcrumb {
	margin: 16px 0 20px;
	font-size: 13px;
	color: var(--text-muted, #64748b);
}

.story-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) 280px;
	gap: 24px;
	align-items: start;
}

.story-headlines {
	list-style: none;
	margin: 0;
	padding: 0;
	position: sticky;
	top: 88px;
	max-height: calc(100vh - 100px);
	overflow-y: auto;
}

.story-headlines li {
	border-bottom: 1px solid var(--border, #e2e8f0);
}

.story-headlines a {
	display: block;
	padding: 12px 0;
	text-decoration: none;
	color: inherit;
}

.story-headlines li.is-current a {
	color: var(--accent, #1d4ed8);
	font-weight: 600;
}

.story-headlines__title {
	display: block;
	font-size: 13px;
	line-height: 1.35;
	margin-bottom: 4px;
}

.story-headlines__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 11px;
	color: var(--text-muted, #64748b);
}

.story-article {
	padding: 28px 32px 32px;
}

.story-article__category {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--accent, #1d4ed8);
	margin: 0 0 8px;
}

.story-article__title {
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 12px;
}

.story-article__dek {
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--text-muted, #475569);
	margin: 0 0 16px;
}

.story-article__byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	font-size: 14px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border, #e2e8f0);
	margin-bottom: 20px;
}

.story-article__byline time {
	color: var(--text-muted, #64748b);
	font-weight: 400;
}

.story-article__hero {
	margin: 0 0 24px;
}

.story-article__hero img,
.story-article__inline-figure img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.story-article__hero figcaption,
.story-article__inline-figure figcaption {
	font-size: 13px;
	color: var(--text-muted, #64748b);
	margin-top: 8px;
	line-height: 1.45;
}

.story-article__hero cite,
.story-article__inline-figure cite {
	font-style: normal;
}

.story-article__video-embed {
	margin: 0 0 24px;
	padding: 0;
	overflow: hidden;
}

.story-article__video-embed iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	display: block;
}

.story-article__video-meta {
	font-size: 13px;
	color: var(--text-muted, #64748b);
	margin: 8px 0 0;
	padding: 0 4px;
}

.story-article__body {
	font-size: 17px;
	line-height: 1.75;
	color: var(--text, #0f172a);
	max-width: none;
}

.story-article__body.entry-content > * {
	max-width: none;
}

.story-article__body.entry-content img,
.story-article__body.entry-content figure {
	max-width: 100%;
}

/* CPT single news — no left headlines rail */
.story-layout--single {
	grid-template-columns: minmax(0, 1fr) 280px;
}

.story-layout--single .story-article {
	grid-column: 1;
	min-width: 0;
}

.story-layout--single .story-layout__rail--right {
	grid-column: 2;
	min-width: 0;
}

.story-layout--single:not(:has(.story-layout__rail--right)) {
	grid-template-columns: minmax(0, 1fr);
	max-width: 900px;
	margin-inline: auto;
	width: 100%;
}

.story-page .container {
	width: 100%;
	max-width: var(--container, 1200px);
}

/* WordPress block editor — full width inside article */
.single-cricket-news-active .story-article__body.entry-content,
.story-article__body.entry-content {
	--wp--style--global--content-size: 100%;
	--wp--style--global--wide-size: 100%;
}

.single-cricket-news-active .story-article__body.entry-content :is(.is-layout-constrained, .is-layout-flow, .wp-block-group) > *,
.single-cricket-news-active .story-article__body.entry-content > * {
	max-width: 100% !important;
	margin-left: 0;
	margin-right: 0;
}

.single-cricket-news-active .story-article__body.entry-content .wp-block-image,
.single-cricket-news-active .story-article__body.entry-content .wp-block-image img,
.single-cricket-news-active .story-article__body.entry-content figure {
	width: 100%;
	max-width: 100%;
}

.single-cricket-news-active .story-layout--single {
	width: 100%;
}

.single-cricket-news-active .story-layout--single .story-article {
	width: 100%;
}

.story-article__body p {
	margin: 0 0 1.25em;
}

.story-article__quote {
	margin: 24px 0;
	padding: 16px 20px;
	border-left: 4px solid var(--accent, #1d4ed8);
	background: var(--surface-muted, #f8fafc);
	border-radius: 0 8px 8px 0;
}

.story-article__quote p {
	margin: 0;
	font-style: italic;
}

.story-article__inline-figure {
	margin: 28px 0;
}

.story-related-box {
	margin: 28px 0;
	padding: 16px;
	background: var(--surface-muted, #f8fafc);
	border: 1px solid var(--border, #e2e8f0);
	border-radius: 8px;
}

.story-related-box h3 {
	margin: 0 0 12px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.story-related-box ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.story-related-box li + li {
	margin-top: 10px;
}

.story-related-box a {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 12px;
	align-items: center;
	text-decoration: none;
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.story-related-box img {
	width: 72px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
}

.story-article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--border, #e2e8f0);
}

.story-article__tags a {
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--surface-muted, #f1f5f9);
	text-decoration: none;
	color: var(--accent, #1d4ed8);
}

.story-article__author-box {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--border, #e2e8f0);
	font-size: 14px;
	color: var(--text-muted, #64748b);
}

.story-sidebar {
	padding: 16px;
	position: sticky;
	top: 88px;
}

.story-sidebar__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.story-sidebar__list li + li {
	margin-top: 12px;
}

.story-sidebar__list a {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.story-sidebar__list a span {
	min-width: 0;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.story-sidebar__list img {
	width: 100%;
	height: auto;
	max-height: 72px;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 4px;
}

.story-sidebar__list--text a {
	display: block;
}

@media (max-width: 1100px) {
	.story-layout {
		grid-template-columns: minmax(0, 1fr) 260px;
	}

	.story-layout--single {
		grid-template-columns: minmax(0, 1fr) 260px;
	}

	.story-layout__rail--left {
		display: none;
	}
}

@media (max-width: 820px) {
	.story-layout,
	.story-layout--single {
		grid-template-columns: 1fr;
	}

	.story-layout--single .story-article,
	.story-layout--single .story-layout__rail--right {
		grid-column: 1;
	}

	.story-layout__rail--right {
		order: 3;
	}

	.story-article {
		padding: 20px 16px 24px;
	}

	.story-sidebar {
		position: static;
	}
}

/* Dark mode — story / news article pages */
[data-theme="dark"] .story-page__breadcrumb,
[data-theme="dark"] .story-page__breadcrumb a { color: #8b949e; }
[data-theme="dark"] .story-page__breadcrumb a:hover { color: #58a6ff; }
[data-theme="dark"] .story-article__title { color: #e6edf3; }
[data-theme="dark"] .story-article__dek { color: #8b949e; }
[data-theme="dark"] .story-article__byline { color: #c9d1d9; border-bottom-color: #30363d; }
[data-theme="dark"] .story-article__byline time { color: #8b949e; }
[data-theme="dark"] .story-article__body,
[data-theme="dark"] .story-article__body p,
[data-theme="dark"] .story-article__body li,
[data-theme="dark"] .story-article__body.entry-content { color: #e6edf3; }
[data-theme="dark"] .story-article__body a { color: #58a6ff; }
[data-theme="dark"] .story-article__body h2,
[data-theme="dark"] .story-article__body h3,
[data-theme="dark"] .story-article__body h4 { color: #e6edf3; }
[data-theme="dark"] .story-article__quote { background: #21262d; border-left-color: #58a6ff; }
[data-theme="dark"] .story-article__quote p { color: #c9d1d9; }
[data-theme="dark"] .story-related-box { background: #21262d; border-color: #30363d; }
[data-theme="dark"] .story-related-box h3 { color: #e6edf3; }
[data-theme="dark"] .story-related-box a { color: #e6edf3; }
[data-theme="dark"] .story-sidebar__list a { color: #e6edf3; }
[data-theme="dark"] .story-sidebar__list a:hover { color: #58a6ff; }
[data-theme="dark"] .story-headlines a { color: #c9d1d9; }
[data-theme="dark"] .story-headlines li { border-bottom-color: #30363d; }
[data-theme="dark"] .story-article__video-meta { color: #8b949e; }
