/**
 * Story Theme — polished UI, WCAG-friendly palette, CWV-optimized.
 *
 * Color system (contrast-tested on #111318):
 * - Text #f0f2f5  (~16:1)
 * - Muted #a3aab4 (~7:1 on surface)
 * - Accent #e8b84a (~9:1 on bg for large text/buttons)
 * - Links  #8ecae6 (~8:1 on bg)
 */

:root {
	--story-bg: #111318;
	--story-bg-soft: #0c0e12;
	--story-surface: #1c1f26;
	--story-surface-2: #252932;
	--story-surface-3: #2e333d;
	--story-text: #f0f2f5;
	--story-muted: #a3aab4;
	--story-link: #8ecae6;
	--story-link-hover: #b5dff5;
	--story-accent: #e8b84a;
	--story-accent-hover: #f5cc6a;
	--story-accent-deep: #c99a2e;
	--story-accent-text: #1a1408;
	--story-border: rgba(255, 255, 255, 0.07);
	--story-border-strong: rgba(255, 255, 255, 0.12);
	--story-radius: 14px;
	--story-radius-sm: 10px;
	--story-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
	--story-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.38);
	--story-container: 1180px;
	--story-sidebar: 300px;
	--story-content-max: 720px;
	--story-font: system-ui, -apple-system, "Segoe UI", "Noto Sans Devanagari", Roboto, sans-serif;
	--story-ratio: 16 / 9;
	--story-header-h: 64px;
	--story-transition: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--story-font);
	background: var(--story-bg);
	color: var(--story-text);
	line-height: 1.65;
	font-size: 1rem;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }

a {
	color: var(--story-link);
	text-decoration: none;
	transition: color var(--story-transition);
}
a:hover { color: var(--story-link-hover); }

.story-container {
	width: min(100% - 2rem, var(--story-container));
	margin-inline: auto;
}

.story-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 99999;
	padding: 0.75rem 1rem;
	background: var(--story-accent);
	color: var(--story-accent-text);
	font-weight: 700;
	border-radius: var(--story-radius-sm);
}
.story-skip-link:focus { left: 1rem; top: 1rem; }

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	white-space: nowrap;
}

/* ── Header ── */
.story-header {
	background: var(--story-surface);
	border-bottom: 1px solid var(--story-border);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.story-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 0.75rem 0;
	min-height: var(--story-header-h);
}

.story-header__start {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.story-header__brand { min-width: 0; }

.story-site-title {
	display: block;
	font-size: clamp(1.125rem, 2.2vw, 1.5rem);
	font-weight: 700;
	color: var(--story-text);
	letter-spacing: -0.02em;
	line-height: 1.2;
	white-space: nowrap;
}
.story-site-title:hover { color: var(--story-accent); }

.custom-logo-link { display: block; line-height: 0; }
.custom-logo {
	max-height: 48px;
	width: auto;
}

.story-header__panel {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.75rem;
	flex: 1;
	min-width: 0;
}

.story-nav { flex: 1; min-width: 0; }

.story-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.35rem;
	align-items: center;
	justify-content: flex-end;
}
.story-nav__list > li { position: relative; }
.story-nav__list a {
	display: inline-block;
	color: var(--story-text);
	font-weight: 500;
	font-size: 0.9375rem;
	padding: 0.45rem 0;
	position: relative;
	white-space: nowrap;
}
.story-nav__list a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0.15rem;
	width: 0;
	height: 2px;
	background: var(--story-accent);
	transition: width var(--story-transition);
}
.story-nav__list a:hover,
.story-nav__list .current-menu-item > a,
.story-nav__list .current_page_item > a {
	color: var(--story-accent);
}
.story-nav__list a:hover::after,
.story-nav__list .current-menu-item > a::after,
.story-nav__list .current_page_item > a::after {
	width: 100%;
}

/* Submenu (desktop) */
.story-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: var(--story-surface-2);
	border: 1px solid var(--story-border);
	border-radius: var(--story-radius-sm);
	box-shadow: var(--story-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--story-transition), transform var(--story-transition), visibility var(--story-transition);
	z-index: 20;
}
.story-nav__list li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.story-nav__list .sub-menu a {
	display: block;
	padding: 0.45rem 1rem;
	font-size: 0.875rem;
}
.story-nav__list .sub-menu a::after { display: none; }

.story-nav-toggle {
	display: none;
	align-items: center;
	gap: 0.45rem;
	background: var(--story-surface-2);
	border: 1px solid var(--story-border-strong);
	border-radius: var(--story-radius-sm);
	cursor: pointer;
	padding: 0.5rem 0.75rem;
	min-height: 44px;
	color: var(--story-text);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
}
.story-nav-toggle__bar {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform var(--story-transition), opacity var(--story-transition);
}
.story-nav-toggle[aria-expanded="true"] .story-nav-toggle__bar:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}
.story-nav-toggle[aria-expanded="true"] .story-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}
.story-nav-toggle[aria-expanded="true"] .story-nav-toggle__bar:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.story-search { flex-shrink: 0; }

.story-search__wrap {
	display: flex;
	align-items: center;
	gap: 0;
	background: var(--story-bg);
	border: 1px solid var(--story-border-strong);
	border-radius: 999px;
	padding: 0.25rem 0.25rem 0.25rem 0.85rem;
	min-width: 240px;
	max-width: 320px;
	transition: border-color var(--story-transition), box-shadow var(--story-transition);
}
.story-search__wrap:focus-within {
	border-color: var(--story-accent);
	box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.15);
}

.story-search__icon {
	flex-shrink: 0;
	color: var(--story-muted);
}

.story-search__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--story-text);
	font: inherit;
	font-size: 0.875rem;
	padding: 0.45rem 0.5rem;
	min-height: 36px;
}
.story-search__input:focus { outline: none; }
.story-search__input::placeholder { color: var(--story-muted); opacity: 0.85; }

.story-search__btn {
	padding: 0.45rem 1rem;
	border-radius: 999px;
	border: 0;
	background: var(--story-accent);
	color: var(--story-accent-text);
	cursor: pointer;
	font-weight: 700;
	font-size: 0.8125rem;
	min-height: 36px;
	white-space: nowrap;
	transition: background var(--story-transition);
}
.story-search__btn:hover { background: var(--story-accent-hover); }

body.story-nav-open { overflow: hidden; }

/* ── Layout ── */
.story-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--story-sidebar);
	gap: 2rem;
	padding: 1.75rem 0 3.5rem;
	align-items: start;
}

.story-main { min-width: 0; }

/* ── Breadcrumbs ── */
.story-breadcrumbs {
	margin-bottom: 1.25rem;
	font-size: 0.8125rem;
	color: var(--story-muted);
}
.story-breadcrumbs__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	align-items: center;
}
.story-breadcrumbs__item:not(:last-child)::after {
	content: "/";
	margin-left: 0.5rem;
	color: var(--story-surface-3);
}
.story-breadcrumbs a { color: var(--story-muted); }
.story-breadcrumbs a:hover { color: var(--story-accent); }

/* ── 16:9 Thumbnails (CLS-safe) ── */
.story-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: var(--story-ratio);
	overflow: hidden;
	border-radius: var(--story-radius-sm) var(--story-radius-sm) 0 0;
	background: linear-gradient(145deg, var(--story-surface-2), var(--story-surface-3));
	contain: layout style paint;
}
.story-thumb__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.story-thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	text-align: center;
	border-radius: var(--story-radius-sm);
}
.story-thumb__placeholder-text {
	font-size: 0.875rem;
	color: var(--story-muted);
	line-height: 1.45;
}

.story-card__badge {
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	z-index: 2;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: rgba(17, 19, 24, 0.82);
	color: var(--story-accent);
	border: 1px solid rgba(232, 184, 74, 0.35);
	backdrop-filter: blur(4px);
}

/* ── Post grid ── */
.story-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}
.story-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-grid__offer { grid-column: 1 / -1; }

.story-card {
	background: var(--story-surface);
	border-radius: var(--story-radius);
	overflow: hidden;
	border: 1px solid var(--story-border);
	box-shadow: var(--story-shadow);
	transition: transform var(--story-transition), box-shadow var(--story-transition), border-color var(--story-transition);
	contain: layout style;
}
.story-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--story-shadow-hover);
	border-color: rgba(232, 184, 74, 0.22);
}
.story-card__link {
	display: block;
	color: inherit;
}
.story-card__link:hover { color: inherit; }
.story-card__body { padding: 1.1rem 1.2rem 1.25rem; }
.story-card__title {
	margin: 0 0 0.55rem;
	font-size: 1.0625rem;
	line-height: 1.45;
	font-weight: 600;
	color: var(--story-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color var(--story-transition);
}
.story-card:hover .story-card__title { color: var(--story-accent); }
.story-card__excerpt {
	margin: 0.6rem 0 0;
	font-size: 0.875rem;
	color: var(--story-muted);
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.story-card__readmore {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.85rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--story-accent);
	letter-spacing: 0.01em;
}

.story-meta {
	font-size: 0.75rem;
	color: var(--story-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}
.story-meta a { color: var(--story-muted); }
.story-meta a:hover { color: var(--story-link); }
.story-meta__sep { opacity: 0.45; }

/* ── Hero / Archive ── */
.story-hero,
.story-archive-header,
.story-home-intro {
	margin-bottom: 1.75rem;
	padding: 1.75rem 1.5rem;
	background: linear-gradient(135deg, var(--story-surface) 0%, color-mix(in srgb, var(--story-surface) 80%, #1a1520) 100%);
	border-radius: var(--story-radius);
	border: 1px solid var(--story-border);
	position: relative;
	overflow: hidden;
}
.story-hero::before,
.story-home-intro::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--story-accent-deep), var(--story-accent), var(--story-accent-deep));
}
.story-hero__title,
.story-archive-header__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
}
.story-hero__desc,
.story-archive-header__desc,
.story-hero__intro {
	margin: 0;
	color: var(--story-muted);
	font-size: 0.9375rem;
	line-height: 1.7;
}
.story-hero__intro { margin-top: 0.85rem; }

/* ── Single post ── */
.story-single__header {
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--story-border);
}
.story-single__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.375rem, 3.5vw, 2.125rem);
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.02em;
	max-width: var(--story-content-max);
}
.story-single__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.85rem;
}
.story-single__cats a {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--story-surface-2);
	color: var(--story-accent);
	border: 1px solid rgba(232, 184, 74, 0.25);
}
.story-single__cats a:hover {
	background: rgba(232, 184, 74, 0.12);
	color: var(--story-accent-hover);
}
.story-single__featured { margin-bottom: 1.75rem; }
.story-single__featured .story-thumb {
	border-radius: var(--story-radius);
	box-shadow: var(--story-shadow);
}

.story-content {
	font-size: 1.0625rem;
	line-height: 1.85;
	max-width: var(--story-content-max);
}
.story-content p { margin: 0 0 1.2rem; }
.story-content h2,
.story-content h3,
.story-content h4 {
	margin: 2.25rem 0 0.85rem;
	line-height: 1.35;
	font-weight: 700;
	color: var(--story-text);
	scroll-margin-top: calc(var(--story-header-h) + 1rem);
}
.story-content h2 {
	font-size: 1.375rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid var(--story-border);
}
.story-content h3 { font-size: 1.125rem; }
.story-content ul,
.story-content ol { margin: 0 0 1.2rem 1.35rem; }
.story-content li { margin-bottom: 0.35rem; }
.story-content blockquote {
	margin: 1.75rem 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--story-accent);
	background: var(--story-surface);
	border-radius: 0 var(--story-radius-sm) var(--story-radius-sm) 0;
	color: var(--story-muted);
}
.story-content a { text-decoration: underline; text-underline-offset: 2px; }

/* ── TOC ── */
.story-toc {
	margin-bottom: 1.75rem;
	padding: 1.15rem 1.25rem;
	background: var(--story-surface);
	border: 1px solid var(--story-border);
	border-radius: var(--story-radius);
	max-width: var(--story-content-max);
}
.story-toc__title {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--story-accent);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.story-toc__list {
	margin: 0;
	padding-left: 1.25rem;
	font-size: 0.9375rem;
}
.story-toc__list a { color: var(--story-muted); }
.story-toc__list a:hover { color: var(--story-link); }
.story-toc__item--sub { list-style-type: circle; }

/* ── Affiliate offers ── */
.story-offer {
	margin: 1.25rem 0;
	padding: 1.1rem;
	background: var(--story-surface);
	border: 1px solid rgba(232, 184, 74, 0.28);
	border-left: 4px solid var(--story-accent);
	border-radius: var(--story-radius-sm);
	text-align: center;
	contain: layout style;
	min-height: 80px;
}
.story-offer--banner {
	border-radius: 0;
	margin: 0;
	border-left: 0;
	border-top: 2px solid var(--story-accent);
}
.story-offer--inline { margin: 2rem 0; }
.story-offer--sidebar-sticky {
	position: sticky;
	top: calc(var(--story-header-h) + 1rem);
}
.story-offer__image-link { display: block; margin-bottom: 0.75rem; }
.story-offer__image {
	width: 100%;
	aspect-ratio: var(--story-ratio);
	object-fit: cover;
	border-radius: var(--story-radius-sm);
}
.story-offer__label {
	margin: 0 0 0.35rem;
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--story-muted);
	font-weight: 600;
}
.story-offer__title {
	margin: 0 0 0.45rem;
	font-size: 1rem;
	font-weight: 700;
}
.story-offer__desc {
	margin: 0 0 0.85rem;
	font-size: 0.875rem;
	color: var(--story-muted);
	line-height: 1.55;
}
.story-offer__btn {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	background: var(--story-accent);
	color: var(--story-accent-text) !important;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.9375rem;
	min-height: 44px;
	line-height: 1.2;
	transition: background var(--story-transition), transform var(--story-transition);
}
.story-offer__btn:hover {
	background: var(--story-accent-hover);
	color: var(--story-accent-text) !important;
	transform: translateY(-1px);
}

.story-offer--mobile_sticky,
.story-offer--sticky {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 200;
	margin: 0;
	border-radius: 0;
	padding: 0.7rem 1rem;
	display: none;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
	border-left: 0;
	border-top: 2px solid var(--story-accent);
	min-height: 60px;
}
.story-offer--sticky .story-offer__body,
.story-offer--mobile_sticky .story-offer__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem;
	text-align: left;
}
.story-offer--sticky .story-offer__desc,
.story-offer--mobile_sticky .story-offer__desc,
.story-offer--sticky .story-offer__image-link,
.story-offer--mobile_sticky .story-offer__image-link { display: none; }
.story-offer--sticky .story-offer__label,
.story-offer--mobile_sticky .story-offer__label { display: none; }
.story-offer--sticky .story-offer__title,
.story-offer--mobile_sticky .story-offer__title {
	margin: 0;
	font-size: 0.875rem;
	flex: 1;
}

/* ── Sidebar ── */
.story-sidebar {
	min-width: 0;
	position: relative;
}
.story-sidebar__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
@media (min-width: 1024px) {
	.story-sidebar--sticky .story-sidebar__inner {
		position: sticky;
		top: calc(var(--story-header-h) + 1.25rem);
		max-height: calc(100vh - var(--story-header-h) - 2.5rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: var(--story-surface-3) transparent;
	}
	.story-sidebar--sticky .story-sidebar__inner::-webkit-scrollbar {
		width: 5px;
	}
	.story-sidebar--sticky .story-sidebar__inner::-webkit-scrollbar-thumb {
		background: var(--story-surface-3);
		border-radius: 999px;
	}
}
.story-widget {
	margin-bottom: 0;
	padding: 1.15rem 1.2rem;
	background: linear-gradient(165deg, var(--story-surface) 0%, rgba(28, 31, 38, 0.92) 100%);
	border-radius: var(--story-radius);
	border: 1px solid var(--story-border);
	box-shadow: var(--story-shadow);
}
.story-widget__title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.95rem;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	padding-bottom: 0.65rem;
	border-bottom: 2px solid rgba(232, 184, 74, 0.28);
}
.story-widget__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 8px;
	background: rgba(232, 184, 74, 0.12);
	color: var(--story-accent);
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
}
.story-widget--search .story-widget__icon::before { content: "⌕"; }
.story-widget--related .story-widget__icon::before { content: "↗"; }
.story-widget--popular .story-widget__icon::before { content: "★"; }
.story-widget--categories .story-widget__icon::before { content: "☰"; }
.story-widget--tags .story-widget__icon::before { content: "#"; }
.story-widget--latest .story-widget__icon::before { content: "◷"; }

/* Sidebar search */
.story-sidebar-search__wrap {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--story-border-strong);
	border-radius: 999px;
	overflow: hidden;
	background: var(--story-surface-2);
	transition: border-color var(--story-transition), box-shadow var(--story-transition);
}
.story-sidebar-search__wrap:focus-within {
	border-color: rgba(232, 184, 74, 0.45);
	box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.12);
}
.story-sidebar-search__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--story-text);
	padding: 0.65rem 0.85rem 0.65rem 1rem;
	font: inherit;
	font-size: 0.875rem;
}
.story-sidebar-search__input::placeholder { color: var(--story-muted); }
.story-sidebar-search__input:focus { outline: none; }
.story-sidebar-search__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: var(--story-accent);
	color: var(--story-accent-text);
	padding: 0 0.95rem;
	cursor: pointer;
	transition: background var(--story-transition);
}
.story-sidebar-search__btn:hover { background: var(--story-accent-hover); }

/* Sidebar post lists */
.story-sidebar-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}
.story-sidebar-posts__item + .story-sidebar-posts__item {
	margin-top: 0.7rem;
	padding-top: 0.7rem;
	border-top: 1px solid var(--story-border);
}
.story-sidebar-posts a {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	color: var(--story-text);
	text-decoration: none;
}
.story-sidebar-posts a:hover .story-sidebar-posts__title { color: var(--story-accent); }
.story-sidebar-posts__rank {
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	background: rgba(232, 184, 74, 0.14);
	color: var(--story-accent);
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
	margin-top: 0.15rem;
}
.story-sidebar-posts__thumb {
	flex-shrink: 0;
	width: 88px;
	aspect-ratio: var(--story-ratio);
	overflow: hidden;
	border-radius: 8px;
	background: var(--story-surface-2);
}
.story-sidebar-posts__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.story-sidebar-posts__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.story-sidebar-posts__title {
	font-size: 0.8125rem;
	line-height: 1.45;
	font-weight: 500;
	transition: color var(--story-transition);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.story-sidebar-posts__meta {
	font-size: 0.6875rem;
	color: var(--story-muted);
	line-height: 1.35;
}
.story-sidebar-posts--numbered .story-sidebar-posts__item:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* Categories (internal links — SEO) */
.story-sidebar-cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.story-sidebar-cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0.7rem;
	border-radius: var(--story-radius-sm);
	background: var(--story-surface-2);
	border: 1px solid transparent;
	color: var(--story-text);
	font-size: 0.8125rem;
	transition: background var(--story-transition), border-color var(--story-transition), color var(--story-transition);
}
.story-sidebar-cats a:hover {
	background: var(--story-surface-3);
	border-color: rgba(232, 184, 74, 0.25);
	color: var(--story-accent);
}
.story-sidebar-cats__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.story-sidebar-cats__count {
	flex-shrink: 0;
	font-size: 0.6875rem;
	font-weight: 700;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--story-muted);
}

/* Tags cloud (internal links — SEO) */
.story-sidebar-tags {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}
.story-sidebar-tags a {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: var(--story-surface-2);
	border: 1px solid var(--story-border);
	color: var(--story-muted);
	font-size: 0.75rem;
	line-height: 1.2;
	transition: background var(--story-transition), border-color var(--story-transition), color var(--story-transition);
}
.story-sidebar-tags a:hover {
	background: rgba(232, 184, 74, 0.1);
	border-color: rgba(232, 184, 74, 0.35);
	color: var(--story-accent);
}

/* Submit CTA */
.story-sidebar-cta {
	padding: 1.25rem 1.2rem;
	border-radius: var(--story-radius);
	background: linear-gradient(145deg, rgba(232, 184, 74, 0.14) 0%, rgba(28, 31, 38, 0.95) 55%);
	border: 1px solid rgba(232, 184, 74, 0.28);
	box-shadow: var(--story-shadow);
	text-align: center;
}
.story-sidebar-cta__text {
	margin: 0 0 0.85rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--story-text);
}
.story-sidebar-cta__btn {
	width: 100%;
	justify-content: center;
}

/* ── Share ── */
.story-share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	align-items: center;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--story-border);
	max-width: var(--story-content-max);
}
.story-share__label { font-weight: 600; font-size: 0.875rem; }
.story-share__link {
	font-size: 0.8125rem;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	background: var(--story-surface-2);
	color: var(--story-text);
	border: 1px solid var(--story-border);
	min-height: 36px;
	display: inline-flex;
	align-items: center;
}
.story-share__link:hover {
	background: var(--story-surface-3);
	color: var(--story-accent);
}

/* ── Related ── */
.story-related {
	margin-top: 2.75rem;
	padding-top: 2rem;
	border-top: 1px solid var(--story-border);
	content-visibility: auto;
	contain-intrinsic-size: auto 400px;
}
.story-related__title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 700;
}

/* ── Pagination ── */
.navigation.pagination { margin-top: 2.25rem; }
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	justify-content: center;
}
.page-numbers {
	padding: 0.5rem 0.9rem;
	border-radius: var(--story-radius-sm);
	background: var(--story-surface);
	color: var(--story-text);
	border: 1px solid var(--story-border);
	font-size: 0.875rem;
	font-weight: 500;
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.page-numbers.current {
	background: var(--story-accent);
	border-color: var(--story-accent);
	color: var(--story-accent-text);
	font-weight: 700;
}

/* ── Footer ── */
.story-footer {
	background: linear-gradient(180deg, var(--story-bg-soft) 0%, #08090c 100%);
	border-top: 3px solid var(--story-accent-deep);
	margin-top: 2rem;
	content-visibility: auto;
	contain-intrinsic-size: auto 900px;
}

.story-footer__top {
	background: var(--story-surface);
	border-bottom: 1px solid var(--story-border);
	padding: 2rem 0;
}

.story-footer__top-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}

.story-footer__brand { max-width: 520px; }

.story-footer__site-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--story-text);
	display: inline-block;
	margin-bottom: 0.5rem;
}
.story-footer__site-name:hover { color: var(--story-accent); }

.story-footer__logo .custom-logo { max-height: 56px; width: auto; }

.story-footer__tagline {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--story-muted);
	line-height: 1.65;
}

.story-footer__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.story-footer__stats {
	display: flex;
	gap: 1.25rem;
	flex-wrap: wrap;
}

.story-footer__stat {
	text-align: center;
	padding: 1rem 1.35rem;
	background: var(--story-bg);
	border: 1px solid var(--story-border);
	border-radius: var(--story-radius-sm);
	min-width: 100px;
}
.story-footer__stat strong {
	display: block;
	font-size: 1.25rem;
	color: var(--story-accent);
	line-height: 1.2;
}
.story-footer__stat span {
	font-size: 0.75rem;
	color: var(--story-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.story-header__announcement {
	background: var(--story-accent-deep);
	color: var(--story-accent-text);
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.5rem 1rem;
}
.story-header__announcement a {
	color: inherit;
	text-decoration: underline;
}
.story-header__announcement a:hover { opacity: 0.9; }

.story-footer__main {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 2rem 1.5rem;
	padding: 2.75rem 0 2rem;
	border-bottom: 1px solid var(--story-border);
}
.story-footer__main--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.story-footer__main--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.story-footer__main--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-footer__main--cols-1 { grid-template-columns: 1fr; }

.story-footer__col--wide {
	grid-column: span 1;
}

.story-footer__heading {
	margin: 0 0 1.1rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--story-accent);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding-bottom: 0.55rem;
	border-bottom: 2px solid rgba(232, 184, 74, 0.25);
}

.story-footer__subheading {
	margin: 1.35rem 0 0.75rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--story-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.story-footer-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}
.story-footer-posts li {
	margin-bottom: 0.65rem;
	font-size: 0.8125rem;
	line-height: 1.5;
}
.story-footer-posts time {
	display: block;
	font-size: 0.6875rem;
	color: var(--story-muted);
	opacity: 0.8;
	margin-bottom: 0.15rem;
}
.story-footer-posts a {
	color: var(--story-text);
	transition: color var(--story-transition);
}
.story-footer-posts a:hover { color: var(--story-accent); }

.story-footer__empty {
	font-size: 0.8125rem;
	color: var(--story-muted);
	margin: 0;
}

.story-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}
.story-footer-links li + li { margin-top: 0.4rem; }
.story-footer-links--cats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.15rem;
}
.story-footer-links a {
	color: var(--story-muted);
	font-size: 0.8125rem;
	transition: color var(--story-transition);
	line-height: 1.45;
}
.story-footer-links a:hover { color: var(--story-accent); }
.story-footer-links a span { opacity: 0.55; font-size: 0.75rem; }

.story-footer-tags {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}
.story-footer-tags a {
	font-size: 0.6875rem;
	padding: 0.28rem 0.6rem;
	border-radius: 999px;
	background: var(--story-surface);
	color: var(--story-muted);
	border: 1px solid var(--story-border);
	transition: color var(--story-transition), border-color var(--story-transition);
}
.story-footer-tags a:hover {
	color: var(--story-accent);
	border-color: rgba(232, 184, 74, 0.35);
}

.story-footer__about-block {
	padding: 2rem 0;
	border-bottom: 1px solid var(--story-border);
}

.story-footer__about-title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--story-text);
}

.story-footer__about-text p {
	margin: 0 0 0.85rem;
	font-size: 0.9375rem;
	color: var(--story-muted);
	line-height: 1.8;
}

.story-footer__seo-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	padding: 2rem 0;
	border-bottom: 1px solid var(--story-border);
}

.story-footer__seo-block {
	padding: 1.5rem 1.35rem;
	background: var(--story-surface);
	border-radius: var(--story-radius);
	border: 1px solid var(--story-border);
}

.story-footer__seo-title {
	margin: 0 0 0.85rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--story-text);
	line-height: 1.35;
}

.story-footer__seo-block p {
	margin: 0 0 0.85rem;
	font-size: 0.875rem;
	color: var(--story-muted);
	line-height: 1.85;
}
.story-footer__seo-block p:last-child { margin-bottom: 0; }

.story-footer__links-row {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--story-border);
}

.story-footer__nav { margin: 0; }

.story-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: center;
}
.story-footer__menu a {
	color: var(--story-muted);
	font-size: 0.875rem;
	font-weight: 500;
	padding: 0.35rem 0;
	transition: color var(--story-transition);
}
.story-footer__menu a:hover { color: var(--story-accent); }

.story-footer__legal {
	padding: 1.25rem 0 0;
	text-align: center;
}

.story-footer__18 {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--story-accent);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.story-footer__bottom {
	padding: 1.25rem 0 2rem;
	text-align: center;
}

.story-footer__copy,
.story-footer__credit {
	margin: 0.25rem 0;
	font-size: 0.8125rem;
	color: var(--story-muted);
}
.story-footer__bottom a { color: var(--story-muted); }
.story-footer__bottom a:hover { color: var(--story-accent); }

/* ── Buttons ── */
.story-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.25rem;
	border-radius: var(--story-radius-sm);
	font-weight: 700;
	cursor: pointer;
	border: 0;
	text-align: center;
	font: inherit;
	min-height: 44px;
	transition: background var(--story-transition);
}
.story-btn--primary {
	background: var(--story-accent);
	color: var(--story-accent-text);
}
.story-btn--primary:hover { background: var(--story-accent-hover); }
.story-btn--ghost {
	background: transparent;
	color: var(--story-text);
	border: 1px solid var(--story-border-strong);
}
.story-btn--ghost:hover { border-color: var(--story-accent); color: var(--story-accent); }

/* ── Age gate ── */
.story-age-gate {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(17, 19, 24, 0.96);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.story-age-gate[hidden] { display: none !important; }
.story-age-gate__box {
	max-width: 420px;
	padding: 2rem;
	background: var(--story-surface);
	border-radius: var(--story-radius);
	text-align: center;
	border: 1px solid var(--story-border);
	box-shadow: var(--story-shadow-hover);
}
.story-age-gate__box h2 { margin: 0 0 0.75rem; font-size: 1.35rem; }
.story-age-gate__actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 1.25rem;
}

.story-404, .story-none { text-align: center; padding: 3rem 1rem; }
.story-page__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin-bottom: 1rem;
}

/* ── Submit Story page ── */
.story-submit-page .story-page__header {
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--story-border);
}

.story-submit-intro {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: var(--story-surface);
	border-radius: var(--story-radius);
	border: 1px solid var(--story-border);
	max-width: none;
}

.story-submit-rules {
	margin-top: 1.25rem;
	padding: 1.25rem;
	background: var(--story-bg-soft);
	border-radius: var(--story-radius-sm);
	border-left: 4px solid var(--story-accent);
}

.story-submit-rules h3 {
	margin: 1.25rem 0 0.65rem;
	font-size: 1rem;
	color: var(--story-accent);
}
.story-submit-rules h3:first-child { margin-top: 0; }
.story-submit-rules ol {
	margin: 0 0 1rem 1.25rem;
	padding: 0;
}
.story-submit-rules li {
	margin-bottom: 0.5rem;
	font-size: 0.9375rem;
	color: var(--story-muted);
	line-height: 1.65;
}

.story-submit-notice {
	padding: 1rem 1.15rem;
	border-radius: var(--story-radius-sm);
	margin-bottom: 1.5rem;
	font-weight: 500;
	font-size: 0.9375rem;
}
.story-submit-notice--success {
	background: rgba(46, 160, 67, 0.15);
	border: 1px solid rgba(46, 160, 67, 0.4);
	color: #7ee787;
}
.story-submit-notice--error {
	background: rgba(248, 81, 73, 0.12);
	border: 1px solid rgba(248, 81, 73, 0.35);
	color: #ffaba8;
}

.story-submit-form {
	padding: 1.75rem;
	background: var(--story-surface);
	border-radius: var(--story-radius);
	border: 1px solid var(--story-border);
	box-shadow: var(--story-shadow);
}

.story-submit-form__honeypot {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.story-submit-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.story-submit-field--full { grid-column: 1 / -1; }

.story-submit-field label {
	display: block;
	margin-bottom: 0.45rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--story-text);
}

.story-submit-field .required {
	color: var(--story-accent);
}

.story-submit-field input[type="text"],
.story-submit-field input[type="email"],
.story-submit-field select,
.story-submit-field textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border-radius: var(--story-radius-sm);
	border: 1px solid var(--story-border-strong);
	background: var(--story-bg);
	color: var(--story-text);
	font: inherit;
	font-size: 0.9375rem;
	line-height: 1.5;
	transition: border-color var(--story-transition), box-shadow var(--story-transition);
}

.story-submit-field input:focus,
.story-submit-field select:focus,
.story-submit-field textarea:focus {
	outline: none;
	border-color: var(--story-accent);
	box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.18);
}

.story-submit-field textarea {
	resize: vertical;
	min-height: 120px;
}

.story-submit-field__hint {
	margin: 0.45rem 0 0;
	font-size: 0.8125rem;
	color: var(--story-muted);
}

.story-submit-field__hint strong {
	color: var(--story-accent);
}

.story-submit-field__hint.is-low strong { color: #ffaba8; }
.story-submit-field__hint.is-ok strong { color: #7ee787; }

.story-submit-form__actions {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--story-border);
	text-align: center;
}

.story-submit-form__submit {
	min-width: 200px;
	font-size: 1rem;
	padding: 0.85rem 2rem;
}

.story-advertise-page .story-advertise-intro {
	margin-bottom: 2rem;
}

.story-advertise-list {
	margin: 0 0 1.25rem 1.25rem;
	padding: 0;
}
.story-advertise-list li {
	margin-bottom: 0.65rem;
	font-size: 0.9375rem;
	color: var(--story-muted);
	line-height: 1.65;
}

.story-advertise-footer-note {
	margin-top: 1.75rem;
	padding: 1.25rem;
	text-align: center;
	font-size: 0.9375rem;
	color: var(--story-muted);
	background: var(--story-surface);
	border-radius: var(--story-radius-sm);
	border: 1px solid var(--story-border);
}

.story-advertise-form { margin-top: 0; }

.story-search--large .story-search__wrap {
	max-width: 480px;
	margin: 1rem auto 0;
}

@media (max-width: 640px) {
	.story-submit-form__grid { grid-template-columns: 1fr; }
	.story-submit-form { padding: 1.25rem; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
	.story-layout { grid-template-columns: 1fr; gap: 1.5rem; }
	.story-sidebar { order: 2; }
	.story-footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.story-footer__seo-grid { grid-template-columns: 1fr; }
	.story-footer__top-inner { flex-direction: column; align-items: flex-start; }
	.story-footer__stats { width: 100%; justify-content: space-between; }
	.story-offer--mobile_sticky,
	.story-offer--sticky { display: block; }
	body.story-has-mobile-offer { padding-bottom: 72px; }

	.story-header__bar {
		flex-wrap: wrap;
		align-items: center;
		padding: 0.65rem 0;
	}

	.story-header__start {
		width: 100%;
		justify-content: space-between;
	}

	.story-nav-toggle { display: inline-flex; }

	.story-header__panel {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		width: 100%;
		padding: 0.85rem 0 0.25rem;
		border-top: 1px solid var(--story-border);
		margin-top: 0.25rem;
	}
	.story-header__panel.is-open { display: flex; }

	.story-nav { width: 100%; }

	.story-nav__list {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0;
	}
	.story-nav__list > li { border-bottom: 1px solid var(--story-border); }
	.story-nav__list a {
		display: block;
		padding: 0.75rem 0;
	}
	.story-nav__list a::after { display: none; }

	.story-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		background: transparent;
		padding: 0 0 0.5rem 1rem;
	}
	.story-nav__list .sub-menu a {
		padding: 0.45rem 0;
		font-size: 0.875rem;
		color: var(--story-muted);
	}

	.story-search { width: 100%; }
	.story-search__wrap {
		max-width: none;
		min-width: 0;
		width: 100%;
	}
}

@media (max-width: 640px) {
	.story-grid,
	.story-grid--related { grid-template-columns: 1fr; }
	.story-footer__main { grid-template-columns: 1fr; }
	.story-footer__stat { flex: 1; min-width: 0; padding: 0.85rem 0.75rem; }
	.story-hero,
	.story-home-intro,
	.story-archive-header { padding: 1.25rem 1rem; }
	.story-site-title { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
	.story-card:hover { transform: none; }
}

@media (prefers-contrast: more) {
	:root {
		--story-border: rgba(255, 255, 255, 0.18);
		--story-muted: #c5cad2;
	}
}
