/*
 * Life in Perpetual Beta additions (2026).
 * Loaded after style.css and 960.css. Replaces the theme's jQuery and Masonry,
 * and adds a small-screen layout.
 */

/* Nested menu marker. WordPress adds .menu-item-has-children itself, so no script is needed. */
li.menu-item-has-children > a,
li.menu-item-has-children > a:hover,
.sub-menu .menu-item-has-children > a,
.sub-menu .menu-item-has-children > a:hover {
	padding-right: 25px;
	background-image: url("images/icn-expand.png");
	background-position: right -1px;
	background-repeat: no-repeat;
}
li.menu-item-has-children > a:hover,
li.menu-item-has-children:hover > a {
	background-position: right -37px;
}
.sub-menu .menu-item-has-children > a,
.sub-menu .menu-item-has-children > a:hover {
	background-position: right -5px;
}
.sub-menu .menu-item-has-children > a:hover,
.sub-menu .menu-item-has-children:hover > a {
	background-position: right -41px;
}

/* Right-hand column of the homepage grid (was added by script). */
.front-page .secondary-post:nth-child(2n+1) {
	margin-left: 20px;
}

/* Bottom widgets in columns (replaces jQuery Masonry). */
#bottom .grid-12 {
	column-count: 3;
	column-gap: 20px;
}
#bottom .grid-12 > .widget {
	float: none;
	width: auto;
	margin-right: 0;
	break-inside: avoid;
}
#bottom .widget .widget {
	float: none;
	width: auto;
	margin: 0;
	padding-top: 0;
}

/* Media never wider than its column. */
#main img,
#main iframe,
#main video,
#main embed,
#main object {
	max-width: 100%;
}
#main img {
	height: auto;
}
.single-entry iframe[src*="youtube"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Note left where a 2008 video no longer exists. */
.lipb-video-gone {
	color: #777;
	font-style: italic;
	border-left: 3px solid #ccc;
	padding-left: 10px;
}

/* Search input placeholder and accessible label. */
.search-input::placeholder {
	color: #999;
}
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

/* Small screens: the 960 px grid becomes a single column. */
@media (max-width: 820px) {
	body {
		min-width: 0;
	}
	.container-12 {
		width: auto;
		margin-left: 12px;
		margin-right: 12px;
	}
	.container-12 [class*="grid-"],
	.container-12 .grid-12,
	#bottom .grid-12 {
		float: none;
		display: block;
		width: auto;
		margin-left: 0;
		margin-right: 0;
	}
	#main .container-12 {
		padding-left: 12px;
		padding-right: 12px;
	}
	.masthead .logo {
		text-align: center;
		padding-bottom: 12px;
	}
	ul.menu {
		float: none;
		display: inline-block;
	}
	.main-nav {
		text-align: center;
	}
	.primary-post,
	.secondary-post {
		width: auto;
	}
	.secondary-post.right-edge,
	.front-page .secondary-post:nth-child(2n+1),
	.back-page .secondary-post:nth-child(2n),
	.search-page .secondary-post:nth-child(2n) {
		margin-left: 0;
	}
	#bottom .grid-12 {
		column-count: 2;
	}
	.footer-left,
	.footer-right {
		text-align: left;
	}
}

@media (max-width: 600px) {
	#bottom .grid-12 {
		column-count: 1;
	}
	.primary-post,
	.primary-post a {
		height: 200px;
	}
}
