/* Halloween decorations. The original light/dark theme palettes stay in styles.css. */
.hw-season .header {position: relative;}
.hw-season .header::before, .hw-season .header::after {
	content: ''; position: absolute; top: 0; width: 116px; height: 100px; pointer-events: none;
	background: url('../images/halloween/web.svg') left top / contain no-repeat; opacity: .58;
}
.hw-season .header::before {left: 0;}
.hw-season .header::after {right: 0; transform: scaleX(-1);}
.hw-season.dark .header::before, .hw-season.dark .header::after {opacity: .44; filter: brightness(1.6);}
.hw-season .header .logo:not(.nowrap) {position: relative;}
.hw-season .header .logo:not(.nowrap)::after {
	content: ''; position: absolute; width: 49px; height: 47px; right: -19px; bottom: -9px;
	background: url('../images/halloween/pumpkin.svg?v=20261028-4') center / contain no-repeat; pointer-events: none;
}
.hw-header-spider {
	position: absolute; right: 14px; top: 0; width: 30px; height: 101px; pointer-events: none;
	background: url('../images/halloween/spider.svg') top center / contain no-repeat; transform-origin: top center;
	animation: hw-spider-sway 7s ease-in-out infinite;
}
.hw-season .carou-title::after, .hw-season .sect-title::after {
	content: ''; display: inline-block; width: 43px; height: 23px; margin-left: 13px; vertical-align: middle;
	background: url('../images/halloween/bats.svg') center / contain no-repeat; pointer-events: none; opacity: .85;
}
.hw-season.dark .carou-title::after, .hw-season.dark .sect-title::after {filter: brightness(1.8);}
.hw-season .side-nav > .side-bt::after {
	content: ''; display: inline-block; width: 32px; height: 30px; margin-left: 12px; vertical-align: middle;
	background: url('../images/halloween/pumpkin.svg?v=20261028-4') center / contain no-repeat; pointer-events: none;
}

/* Large illustrations live entirely in the empty desktop gutters. */
.hw-gutter {display: none; position: fixed; z-index: 1; pointer-events: none; user-select: none;}
.hw-art {position: absolute; display: block; background-position: center; background-repeat: no-repeat; background-size: contain;}
.hw-art--pumpkin {background-image: url('../images/halloween/pumpkin.svg?v=20261028-4');}
.hw-art--ghost {background-image: url('../images/halloween/ghost.svg');}
.hw-art--bats {background-image: url('../images/halloween/bats.svg');}
.hw-art--candles {background-image: url('../images/halloween/candles.svg?v=20261028-4');}
.hw-art--graveyard {background-image: url('../images/halloween/graveyard.svg');}
.hw-gutter--left {top: 165px; left: 12px; width: calc((100vw - 1200px) / 2 - 28px); max-width: 188px; height: 440px;}
.hw-gutter--right {top: 205px; right: 12px; width: calc((100vw - 1200px) / 2 - 28px); max-width: 188px; height: 440px;}
.hw-gutter--left .hw-art--bats {top: 0; left: 2%; width: 98%; height: 92px; transform: rotate(-12deg);}
.hw-gutter--left .hw-art--ghost {top: 108px; left: 23%; width: 64%; height: 145px; animation: hw-float 6s ease-in-out infinite;}
.hw-gutter--left .hw-art--pumpkin {top: 280px; left: 0; width: 100%; height: 160px; transform: rotate(-8deg);}
.hw-gutter--right .hw-art--bats {top: 0; right: 0; width: 100%; height: 87px; transform: rotate(13deg);}
.hw-gutter--right .hw-art--ghost {top: 106px; left: 16%; width: 68%; height: 145px; animation: hw-float 7s ease-in-out -3s infinite; transform: scaleX(-1);}
.hw-gutter--right .hw-art--candles {top: 280px; left: 12%; width: 76%; height: 158px;}
@media screen and (min-width: 1480px) {
	.hw-gutter {display: block;}
}

/* A separate little scene above the footer keeps the artwork clear of content. */
.hw-footer-scene {position: relative; height: 115px; margin: 0 30px; pointer-events: none; user-select: none;}
.hw-footer-scene::after {
	content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 1px;
	background: linear-gradient(90deg, transparent, rgba(132,145,187,.3) 20%, rgba(132,145,187,.3) 80%, transparent);
}
.hw-footer-scene .hw-art--pumpkin {left: 12px; bottom: -1px; width: 117px; height: 101px; transform: rotate(-5deg);}
.hw-footer-scene .hw-art--bats {left: 155px; bottom: 39px; width: 95px; height: 49px; transform: rotate(-8deg); opacity: .75;}
.hw-footer-scene .hw-art--ghost {left: 47%; bottom: 12px; width: 56px; height: 73px; animation: hw-float 6s ease-in-out -2s infinite;}
.hw-footer-scene .hw-art--graveyard {right: 100px; bottom: 0; width: 214px; height: 114px;}
.hw-footer-scene .hw-art--candles {right: 16px; bottom: -1px; width: 89px; height: 108px;}
.hw-season.dark .hw-art--graveyard {filter: brightness(1.25);}
.hw-season.dark .hw-footer-scene .hw-art--bats {filter: brightness(1.8);}

@keyframes hw-float {
	0%, 100% {translate: 0 0; rotate: -3deg;}
	50% {translate: 0 -10px; rotate: 3deg;}
}
@keyframes hw-spider-sway {
	0%, 100% {transform: rotate(-6deg);}
	50% {transform: rotate(6deg);}
}
@media screen and (max-width: 1220px) {
	.hw-season .header::before, .hw-season .header::after {width: 85px; height: 75px; opacity: .4;}
	.hw-header-spider {right: 4px; width: 25px; height: 84px;}
	.hw-footer-scene {margin: 0 20px;}
}
@media screen and (max-width: 760px) {
	.hw-season .header .logo:not(.nowrap)::after {right: 0; bottom: -6px; width: 38px; height: 37px;}
	.hw-season .carou-title::after, .hw-season .sect-title::after {width: 30px; height: 19px; margin-left: 8px;}
	.hw-footer-scene {height: 94px;}
	.hw-footer-scene .hw-art--pumpkin {left: 0; width: 82px; height: 77px;}
	.hw-footer-scene .hw-art--bats {left: 94px; bottom: 44px; width: 54px; height: 28px;}
	.hw-footer-scene .hw-art--ghost {display: none;}
	.hw-footer-scene .hw-art--graveyard {right: 49px; width: 147px; height: 82px;}
	.hw-footer-scene .hw-art--candles {right: 0; width: 58px; height: 78px;}
}
@media screen and (max-width: 470px) {
	.hw-season .header::before, .hw-season .header::after {width: 57px; height: 52px;}
	.hw-season .header .logo:not(.nowrap)::after {right: -6px; bottom: 0; width: 33px; height: 33px;}
	.hw-header-spider {width: 21px; height: 65px; right: 2px;}
	.hw-footer-scene {margin: 0 15px;}
	.hw-footer-scene .hw-art--bats {display: none;}
}
@media (prefers-reduced-motion: reduce) {
	.hw-season .hw-art, .hw-season .hw-header-spider {animation: none;}
}
/* Publication cards and the full article have a separate strip below/above content. */
.hw-card-decor {position: relative; width: 100%; height: 45px; margin-top: 14px; pointer-events: none; user-select: none;}
.hw-card-decor::before {
	content: ''; position: absolute; left: 44px; right: 38px; top: 26px; height: 1px;
	background: linear-gradient(90deg, rgba(132,145,187,.15), rgba(132,145,187,.45), rgba(132,145,187,.15));
}
.hw-art--web {background-image: url('../images/halloween/web.svg');}
.hw-card-decor .hw-art--web {right: 0; top: 0; width: 65px; height: 43px; opacity: .32; transform: scaleX(-1);}
.hw-card-decor .hw-art--pumpkin {left: 0; bottom: 0; width: 49px; height: 45px; transform: rotate(-8deg);}
.hw-card-decor .hw-art--bats {left: calc(50% - 33px); top: 0; width: 66px; height: 34px;}
.hw-card-decor .hw-art--ghost {right: 3px; bottom: 0; width: 30px; height: 39px; transform: rotate(8deg);}
.hw-season .short-item:nth-child(2n) .hw-card-decor .hw-art--pumpkin {transform: rotate(7deg);}
.hw-season.dark .hw-card-decor .hw-art--bats {filter: brightness(1.8);}
.hw-season .short-img::after, .hw-season .fullstory .fimg::after,
.hw-season .side-popular-item-img::after, .hw-season .side-recommend-item-img::after {
	content: ''; position: absolute; right: 0; top: 0; width: 64px; height: 56px; z-index: 1;
	background: url('../images/halloween/web.svg') top left / contain no-repeat; transform: scaleX(-1); opacity: .65; pointer-events: none;
}
.hw-season .fullstory .fimg {position: relative;}
.hw-season .side-popular-item-img::after {width: 34px; height: 30px;}
.hw-season .side-recommend-item-img::after {width: 43px; height: 38px;}
.hw-season .fullstory > .hw-card-decor {height: 59px; margin: 0 0 22px;}
.hw-season .fullstory > .hw-card-decor .hw-art--pumpkin {width: 63px; height: 58px;}
.hw-season .fullstory > .hw-card-decor .hw-art--ghost {width: 41px; height: 54px;}
.hw-season .fullstory > .hw-card-decor .hw-art--bats {width: 88px; height: 45px; left: calc(50% - 44px); top: 5px;}
.hw-season .fullstory > .hw-card-decor::before {left: 61px; right: 49px; top: 33px;}
.hw-season .fullstory > .ftext.readmore::after {
	content: ''; display: block; height: 40px; margin-top: 16px; pointer-events: none;
	background: url('../images/halloween/bats.svg') calc(50% - 47px) center / 58px 29px no-repeat,
		url('../images/halloween/candles.svg?v=20261028-4') calc(50% + 23px) center / 30px 40px no-repeat;
}

/* Sidebar decorations use the original spacing without narrowing the content. */
.hw-season .sidebar .hw-sidebar-section {position: relative;}
.hw-season .sidebar .hw-sidebar-section::before {
	content: ''; position: absolute; left: 0; top: 0; width: 67px; height: 57px; opacity: .23; pointer-events: none;
	background: url('../images/halloween/web.svg') top left / contain no-repeat;
}
.hw-season .sidebar .hw-sidebar-section::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: -30px; height: 26px; pointer-events: none;
	background: url('../images/halloween/bats.svg') left center / 47px 24px no-repeat,
		url('../images/halloween/candles.svg?v=20261028-4') right center / 21px 26px no-repeat;
}
.hw-season .sidebar .hw-sidebar-section > .side-bt {position: relative;}
.hw-season .sidebar .hw-sidebar-section > .side-bt::after {
	content: ''; position: absolute; right: 0; top: -24px; width: 27px; height: 25px; margin: 0; pointer-events: none;
	background: url('../images/halloween/ghost.svg') center / contain no-repeat;
}
.hw-season .sidebar .side-nav > .side-bt::after {background-image: url('../images/halloween/pumpkin.svg?v=20261028-4'); width: 37px;}
.hw-season .sidebar .hw-sidebar-section:nth-of-type(2n) > .side-bt::after {background-image: url('../images/halloween/candles.svg?v=20261028-4');}
.hw-season .sidebar .hw-sidebar-section:nth-of-type(3n) > .side-bt::after {background-image: url('../images/halloween/bats.svg'); width: 38px;}
/* Keep one decoration strip per gap; following header icons must not overlap it. */
.hw-season .sidebar .hw-sidebar-section:not(.side-nav) > .side-bt::after {content: none;}
@media screen and (min-width: 590px) {
	.hw-season.grid-thumb .short-item .hw-card-decor {width: calc(100% - 10px); height: 30px; margin: 6px 5px 0;}
	.hw-season.grid-thumb .short-item .hw-card-decor::before {left: 30px; right: 24px; top: 18px;}
	.hw-season.grid-thumb .short-item .hw-card-decor .hw-art--pumpkin {width: 32px; height: 30px;}
	.hw-season.grid-thumb .short-item .hw-card-decor .hw-art--ghost {width: 22px; height: 28px;}
	.hw-season.grid-thumb .short-item .hw-card-decor .hw-art--bats {width: 42px; height: 22px; left: calc(50% - 21px);}
	.hw-season.grid-thumb .short-item .hw-card-decor .hw-art--web {width: 39px; height: 30px;}
}
@media screen and (max-width: 590px) {
	.hw-season .short-item .hw-card-decor {width: calc(100% - 10px); height: 31px; margin: 6px 5px 0;}
	.hw-season .short-item .hw-card-decor::before {left: 30px; right: 24px; top: 18px;}
	.hw-season .short-item .hw-card-decor .hw-art--pumpkin {width: 32px; height: 30px;}
	.hw-season .short-item .hw-card-decor .hw-art--ghost {width: 22px; height: 28px;}
	.hw-season .short-item .hw-card-decor .hw-art--bats {width: 42px; height: 22px; left: calc(50% - 21px);}
	.hw-season .short-item .hw-card-decor .hw-art--web {width: 39px; height: 30px;}
	.hw-season .short-img::after {width: 47px; height: 42px;}
}
@media print {
	.hw-card-decor, .hw-season .short-img::after, .hw-season .fullstory .fimg::after,
	.hw-season .side-popular-item-img::after, .hw-season .side-recommend-item-img::after,
	.hw-season .sidebar .hw-sidebar-section::before, .hw-season .sidebar .hw-sidebar-section::after,
	.hw-season .sidebar .hw-sidebar-section > .side-bt::after, .hw-season .fullstory > .ftext.readmore::after {display: none;}
	.hw-gutter, .hw-footer-scene, .hw-header-spider, .hw-season .header::before, .hw-season .header::after,
	.hw-season .header .logo:not(.nowrap)::after, .hw-season .carou-title::after, .hw-season .sect-title::after,
	.hw-season .side-nav > .side-bt::after {display: none;}
}

/* Accessories sit over the logo without changing its width or spacing. */
.hw-season .hw-logo-hat {
	position: absolute; left: -2px; top: -24px; width: 61px; height: 50px; transform: rotate(-13deg);
	background: url('../images/halloween/witch-hat.svg?v=20261028-4') center / contain no-repeat; pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
	.hw-season .header .logo:not(.nowrap):hover::after,
	.hw-season .short-item:hover .hw-art--pumpkin,
	.hw-season .fullstory:hover > .hw-card-decor .hw-art--pumpkin,
	.hw-season .sidebar .side-nav:hover > .side-bt::after {background-image: url('../images/halloween/pumpkin-lit.svg?v=20261028-4');}
}
@media screen and (max-width: 1220px) {
	.hw-season .hw-logo-hat {left: 1px; top: -15px; width: 54px; height: 44px;}
}
@media screen and (max-width: 470px) {
	.hw-season .hw-logo-hat {left: 0; top: -15px; width: 43px; height: 35px;}
}
@media print {
	.hw-season .hw-logo-hat {display: none;}
}

/* Tiny trinkets stay inside existing decorative strips and gaps. */
.hw-card-decor::after {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background: url('../images/halloween/sparkles.svg') 21% center / 86px 27px no-repeat,
		url('../images/halloween/bones.svg') 77% center / 30px 21px no-repeat; opacity: .72;
}
.hw-season .short-item:nth-child(2n) .hw-card-decor::after {
	background-image: url('../images/halloween/paw-trail.svg'), url('../images/halloween/sparkles.svg');
	background-size: 64px 22px, 86px 27px;
}
.hw-season .sidebar .hw-sidebar-section::after {
	background: url('../images/halloween/bats.svg') left center / 47px 24px no-repeat,
		url('../images/halloween/paw-trail.svg') center / 68px 23px no-repeat,
		url('../images/halloween/candles.svg?v=20261028-4') right center / 21px 26px no-repeat;
}
.hw-season .sidebar .hw-sidebar-section:nth-of-type(2n)::after {
	background-image: url('../images/halloween/bats.svg'), url('../images/halloween/bones.svg'), url('../images/halloween/candles.svg?v=20261028-4');
	background-size: 47px 24px, 28px 20px, 21px 26px;
}
.hw-art--cat {background-image: url('../images/halloween/cat.svg');}
.hw-footer-scene .hw-art--cat {left: calc(47% - 83px); bottom: 0; width: 53px; height: 63px;}
.hw-footer-scene::before {
	content: ''; position: absolute; width: 106px; height: 34px; left: 28%; bottom: 24px; pointer-events: none;
	background: url('../images/halloween/paw-trail.svg') left bottom / 70px 24px no-repeat,
		url('../images/halloween/sparkles.svg') right top / 70px 22px no-repeat;
}
.hw-season .navigation a, .hw-season .navigation span:not(.nav_ext) {
	background-image: url('../images/halloween/web.svg'); background-position: right top; background-repeat: no-repeat; background-size: 21px 18px;
}
@media screen and (min-width: 590px) {
	.hw-season.grid-thumb .short-item .hw-card-decor::after {background: url('../images/halloween/sparkles.svg') center / 77px 24px no-repeat; opacity: .5;}
}
@media screen and (max-width: 760px) {
	.hw-footer-scene .hw-art--cat, .hw-footer-scene::before {display: none;}
}
@media screen and (max-width: 590px) {
	.hw-season .short-item .hw-card-decor::after, .hw-season .short-item:nth-child(2n) .hw-card-decor::after {
		background: url('../images/halloween/sparkles.svg') center / 68px 21px no-repeat; opacity: .45;
	}
	.hw-season .fullstory > .hw-card-decor::after {background-size: 60px 24px, 24px 18px;}
}
@media print {
	.hw-card-decor::after, .hw-footer-scene::before {display: none;}
	.hw-season .navigation a, .hw-season .navigation span:not(.nav_ext) {background-image: none;}
}

/* A rare visitor crosses a clipped overlay, leaving layout and clicks untouched. */
.hw-season .hw-zombie {
	position: fixed; left: 0; right: 0; bottom: 0; height: 128px; overflow: hidden; z-index: 40;
	display: none; pointer-events: none; user-select: none;
}
.hw-season .hw-zombie.is-active {display: block;}
.hw-zombie__walker {position: absolute; left: 0; bottom: 1px; width: 86px; height: 121px; transform: translateX(-115%);}
.hw-zombie__sprite {
	display: block; width: 100%; height: 100%; pointer-events: none;
	background: url('../images/halloween/zombie.svg?v=20261028-7') center bottom / contain no-repeat;
	filter: drop-shadow(0 2px 2px rgba(12,16,22,.2));
}
.hw-zombie.is-active .hw-zombie__walker {animation: hw-zombie-cross var(--hw-zombie-duration, 28s) linear both;}
.hw-zombie.hw-zombie--reverse .hw-zombie__walker {animation-direction: reverse;}
.hw-zombie.hw-zombie--reverse .hw-zombie__sprite {transform: scaleX(-1);}
@keyframes hw-zombie-cross {
	from {transform: translateX(-115%);}
	to {transform: translateX(calc(100vw + 15px));}
}
@media screen and (max-width: 590px) {
	.hw-season .hw-zombie {height: 96px;}
	.hw-zombie__walker {width: 64px; height: 89px;}
}
@media (prefers-reduced-motion: reduce), print {
	.hw-season .hw-zombie, .hw-season .hw-zombie.is-active {display: none;}
	.hw-zombie.is-active .hw-zombie__walker {animation: none;}
}
