:root {
	--paper: #f6f1e8;
	--paper-2: #fffdf8;
	--ink: #1c1814;
	--muted: #6a6158;
	--rule: #e2d8c8;
	--accent: #2b574a;
	--accent-2: #c45c26;
	--focus: #1d4ed8;
	--shadow: 0 18px 40px rgba(28, 24, 20, 0.08);
	--serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
	--sans: "Figtree", "Segoe UI", system-ui, sans-serif;
	--max: 1360px;
	--article: 720px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--ink);
}

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

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -40px;
	background: var(--ink);
	color: #fff;
	padding: 8px 12px;
	z-index: 100;
}

.skip-link:focus {
	top: 12px;
}

.wrap {
	width: min(var(--max), calc(100% - 40px));
	margin-inline: auto;
}

.site-header {
	border-bottom: 1px solid var(--rule);
	background: rgba(246, 241, 232, 0.92);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 20;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 68px;
}

.site-logo {
	display: inline-flex;
	flex: 0 0 auto;
	width: 156px;
	text-decoration: none;
}

.site-logo img {
	display: block;
	width: 100%;
	height: auto;
}

.site-brand {
	font-family: var(--serif);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.02em;
}

.site-brand span {
	color: var(--accent-2);
}

.site-nav {
	flex: 1;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	color: var(--ink);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 500;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item a {
	color: var(--accent);
}

/* Dropdown submenus (e.g. Apps → Windows/Android/iOS) */
.site-nav__list .menu-item-has-children {
	position: relative;
}

.site-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 160px;
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 40;
}

.site-nav__list .menu-item-has-children:hover > .sub-menu,
.site-nav__list .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.site-nav__list .sub-menu li {
	margin: 0;
}

.site-nav__list .sub-menu a {
	display: block;
	padding: 6px 16px;
	white-space: nowrap;
}

.header-search {
	display: flex;
	align-items: center;
	gap: 8px;
}

.header-search input[type="search"] {
	border: 1px solid var(--rule);
	background: var(--paper-2);
	border-radius: 999px;
	padding: 8px 14px;
	min-width: 160px;
	font: inherit;
}

.header-search button,
.menu-toggle {
	border: 0;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	padding: 8px 14px;
	font: inherit;
	cursor: pointer;
}

.menu-toggle {
	display: none;
}

.site-main {
	padding: 36px 0 72px;
}

.home-intro {
	max-width: 820px;
	margin: 8px 0 52px;
	padding-bottom: 34px;
	border-bottom: 1px solid var(--rule);
}

.home-intro h1 {
	margin: 0 0 16px;
	font-family: var(--serif);
	font-size: clamp(3rem, 7vw, 5.5rem);
	font-weight: 600;
	letter-spacing: -0.055em;
	line-height: 0.98;
}

.home-intro > p:last-child {
	max-width: 660px;
	margin: 0;
	color: var(--muted);
	font-family: var(--serif);
	font-size: 1.32rem;
	line-height: 1.45;
}

.kicker {
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	font-weight: 600;
	margin: 0 0 8px;
}

.featured {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 40px;
	align-items: center;
	margin-bottom: 48px;
}

.featured img {
	border-radius: 18px;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	box-shadow: var(--shadow);
}

.editorial-placeholder {
	display: grid;
	place-items: center;
	width: 140px;
	height: 100px;
	border-radius: 12px;
	background:
		linear-gradient(135deg, rgba(196, 92, 38, 0.92), rgba(43, 87, 74, 0.88)),
		var(--accent);
	color: #fff;
	font-family: var(--serif);
	font-size: 2.5rem;
	font-weight: 600;
	text-decoration: none;
}

.editorial-placeholder--featured {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	border-radius: 18px;
	font-size: clamp(4rem, 10vw, 8rem);
	box-shadow: var(--shadow);
}

.featured h2,
.page-title,
.article-title {
	font-family: var(--serif);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.12;
	margin: 0 0 12px;
}

.featured h2 {
	font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.meta {
	color: var(--muted);
	font-size: 0.92rem;
}

.article-deck {
	margin: -2px 0 14px;
	color: var(--muted);
	font-family: var(--serif);
	font-size: 1.25rem;
	line-height: 1.45;
}

.meta a {
	color: inherit;
}

.home-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
	gap: 44px;
	align-items: start;
	margin-top: 12px;
}

.home-main-column {
	min-width: 0;
}

.home-app-sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/*
 * Keep each sidebar block at its natural height. When the sidebar is sticky
 * with a max-height, the flex column would otherwise shrink its children to
 * fit, and the App of the Day panel (overflow:hidden) would clip its "Open app"
 * button. With no shrinking, the sidebar scrolls internally instead if needed.
 */
.home-app-sidebar > * {
	flex-shrink: 0;
}

@media (min-width: 901px) {
	.home-app-sidebar.is-sticky {
		position: sticky;
		top: var(--sidebar-sticky-top, 92px);
	}
}

.brief-list,
.feed-list,
.related-list,
.app-grid {
	list-style: none;
	margin: 0;
	padding: 0;
}

.app-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 24px 0 32px;
}

.app-filters input,
.app-filters select {
	min-height: 44px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--paper-2);
	color: var(--ink);
	padding: 8px 14px;
	font: inherit;
}

.brief-item,
.feed-item {
	padding: 18px 0;
	border-top: 1px solid var(--rule);
}

.brief-item h3,
.feed-item h2 {
	font-family: var(--serif);
	font-size: 1.25rem;
	margin: 0 0 6px;
	line-height: 1.25;
}

.brief-item h3 a,
.feed-item h2 a,
.related-list a,
.app-card h2 a {
	color: var(--ink);
	text-decoration: none;
}

.panel {
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 18px;
	padding: 22px;
	box-shadow: var(--shadow);
}

.panel--app-day {
	position: relative;
	overflow: hidden;
	padding: 18px;
	transform: translateY(-6px);
	border-color: rgba(43, 87, 74, 0.28);
	box-shadow: 0 24px 58px rgba(28, 24, 20, 0.18), 0 5px 14px rgba(28, 24, 20, 0.08);
}

.panel--app-day::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.app-of-day {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.app-of-day h2 {
	margin: 0 0 6px;
	font-family: var(--serif);
	font-size: 1.35rem;
	line-height: 1.15;
}

.app-of-day h2 a {
	color: var(--ink);
	text-decoration: none;
}

.app-of-day p {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.platform-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 14px;
	border-radius: 999px;
	background: #e8f2ff;
	color: #075da7;
	padding: 5px 10px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.app-of-day__store {
	width: 100%;
	margin-top: 12px;
}

.home-app-section {
	border-top: 1px solid var(--rule);
	padding-top: 18px;
}

.home-app-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.home-app-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.home-app-list .app-icon {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	font-size: 1rem;
}

.home-app-more {
	margin: 0;
	font-weight: 700;
}

.home-app-more a {
	text-decoration: none;
}

.button.button--store {
	gap: 8px;
	background: #075da7;
}

.button.button--store:hover {
	background: #064c87;
	color: #fff;
}

.store-coming,
.store-only-note {
	color: var(--muted);
	font-size: 0.9rem;
}

.app-rating {
	margin: 10px 0 0;
	color: var(--ink);
	font-size: 0.92rem;
}

.store-coming {
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--rule);
}

.app-of-day img,
.app-icon {
	width: 72px;
	height: 72px;
	border-radius: 16px;
	object-fit: cover;
	background: #efe7d8;
}

.app-icon--fallback {
	display: grid;
	place-items: center;
	flex: 0 0 72px;
	background: linear-gradient(135deg, var(--accent), #18342c);
	color: #fff;
	font-family: var(--serif);
	font-size: 2rem;
	font-weight: 600;
}

.feed-item {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 20px;
}

.feed-item img {
	width: 140px;
	height: 100px;
	object-fit: cover;
	border-radius: 12px;
}

.article {
	width: min(var(--article), calc(100% - 40px));
	margin-inline: auto;
}

.article-layout {
	width: min(1040px, calc(100% - 40px));
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 48px;
}

.no-article-rail .article-layout {
	grid-template-columns: minmax(0, 1fr);
}

.article-title {
	font-size: clamp(2rem, 4vw, 3rem);
}

.article-content {
	font-family: var(--serif);
	font-size: 1.22rem;
	line-height: 1.75;
}

.article-content p {
	margin: 0 0 1.25em;
}

.article-content h2,
.article-content h3 {
	font-family: var(--serif);
	letter-spacing: -0.02em;
}

.article-sources,
.related {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--rule);
}

.app-hero {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	margin-bottom: 32px;
}

.app-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.app-card,
.search-result {
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 16px;
	padding: 18px;
}

.store-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px 0;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ink);
	color: #fff;
	text-decoration: none;
	border: 0;
	border-radius: 999px;
	padding: 10px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Keep solid buttons readable on hover (the global a:hover colour would
   otherwise turn the white label dark on the dark background). */
.button:hover,
.button:focus-visible {
	color: #fff;
	background: var(--accent);
}

.button--ghost {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--rule);
}

.download-status {
	margin-top: 10px;
	color: var(--muted);
	font-size: 0.92rem;
}

.feed-more {
	display: grid;
	justify-items: center;
	margin-top: 28px;
	text-align: center;
}

.feed-more [aria-disabled="true"] {
	opacity: 0.55;
	pointer-events: none;
}

.ad-slot {
	margin: 28px 0;
	padding: 12px;
	border: 1px dashed var(--rule);
	border-radius: 12px;
	background: rgba(255, 253, 248, 0.6);
}

.ad-slot__label,
.saraspar-widget__title {
	margin: 0 0 8px;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.ad-unit--placeholder {
	min-height: 90px;
	display: grid;
	place-items: center;
	color: var(--muted);
}

.site-footer {
	margin-top: 64px;
}

/* Section A: dark navigation/information area. */
.site-footer__nav {
	position: relative;
	background: #1f1b16;
	color: rgba(246, 241, 232, 0.72);
	padding: 48px 0 40px;
}

/* Designer accent bar across the top of the footer — a vibrant multi-colour
 * gradient that stands out against the dark footer. */
.site-footer__nav::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 5px;
	background: linear-gradient(90deg, #ffb020 0%, #ff5f6d 34%, #a05cff 67%, #22c1c3 100%);
}

/* Section B: distinct lower copyright/legal bar. */
.site-footer__legal {
	background: #12100d;
	color: rgba(246, 241, 232, 0.6);
	padding: 18px 0;
}

.site-company {
	margin: 0 0 8px;
	color: #fff;
	font-family: var(--serif);
	font-size: 1.25rem;
	font-weight: 600;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 24px;
	margin-bottom: 28px;
}

.site-footer nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comments {
	width: min(var(--article), calc(100% - 40px));
	margin: 40px auto 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.saraspar-trap {
	display: none !important;
}

@media (max-width: 1080px) and (min-width: 901px) {
	.home-layout {
		grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
		gap: 32px;
	}
}

@media (max-width: 900px) {
	.site-header__inner {
		gap: 10px;
	}

	.site-logo {
		width: 112px;
	}

	.featured,
	.home-layout,
	.article-layout,
	.feed-item,
	.footer-grid,
	.app-hero {
		grid-template-columns: 1fr;
		display: block;
	}

	.home-app-sidebar {
		margin-bottom: 40px;
	}

	.feed-item img {
		width: 100%;
		height: 180px;
		margin-bottom: 12px;
	}

	.feed-item .editorial-placeholder {
		width: 100%;
		height: 180px;
		margin-bottom: 12px;
	}

	.menu-toggle {
		display: inline-flex;
		margin-left: auto;
	}

	.site-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 68px;
		background: var(--paper-2);
		border-bottom: 1px solid var(--rule);
		padding: 16px 20px 24px;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav__list {
		flex-direction: column;
	}

	/* On mobile the nav is an open panel, so show submenus inline/indented */
	.site-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding: 4px 0 4px 16px;
		min-width: 0;
		background: transparent;
	}

	.site-nav__list .sub-menu a {
		padding: 6px 0;
	}

	.header-search input[type="search"] {
		min-width: 0;
		width: 76px;
		padding-inline: 12px;
	}

	.header-search button {
		padding-inline: 10px;
	}
}

/* ---------------------------------------------------------------------------
 * Footer, article extras, app details — added for the site polish pass.
 * ------------------------------------------------------------------------- */

.footer-grid {
	grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
	align-items: start;
}

.footer-col__title {
	margin: 0 0 10px;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(246, 241, 232, 0.5);
}

.site-footer__nav .footer-brand p {
	margin: 0 0 8px;
}

.site-footer nav ul li {
	margin: 0 0 6px;
}

.site-footer__nav nav a {
	color: rgba(246, 241, 232, 0.82);
	text-decoration: none;
	font-size: 0.92rem;
}

.site-footer__nav nav a:hover,
.site-footer__legal a:hover {
	color: #fff;
}

.site-footer .sub-menu {
	list-style: none;
	margin: 4px 0 6px 12px;
	padding: 0;
}

.footer-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	font-size: 0.85rem;
}

.footer-legal__copyright {
	margin: 0;
}

.footer-legal__links ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 0;
	padding: 0;
}

.site-footer__legal a {
	color: rgba(246, 241, 232, 0.72);
	text-decoration: none;
}

/* Clean source attribution */
.article-sources {
	margin: 28px 0;
	padding: 16px 18px;
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 10px;
}

.article-sources h2 {
	margin: 0 0 10px;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.source-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.source-list a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 12px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
}

.source-list a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* Previous / next article navigation */
.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 36px 0;
}

.post-nav__link {
	display: block;
	padding: 14px 16px;
	border: 1px solid var(--rule);
	border-radius: 10px;
	text-decoration: none;
	color: var(--ink);
	background: var(--paper-2);
}

.post-nav__link:hover {
	border-color: var(--accent);
}

.post-nav__link--next {
	text-align: right;
	grid-column: 2;
}

.post-nav__label {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 4px;
}

.post-nav__title {
	display: block;
	font-family: var(--serif);
	font-weight: 600;
}

/* Taxonomy chips (single app) */
.app-taxonomy {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 0;
}

.chip {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 500;
	text-decoration: none;
	border: 1px solid var(--rule);
	color: var(--ink);
	background: var(--paper-2);
}

.chip:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.chip--os {
	border-color: var(--accent);
	color: var(--accent);
}

/* App details table */
.app-details {
	margin: 32px 0;
}

.app-details h2,
.related-apps h2 {
	font-family: var(--serif);
	font-size: 1.3rem;
	margin: 0 0 14px;
}

.app-details__list {
	margin: 0;
	border-top: 1px solid var(--rule);
}

.app-details__row {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--rule);
}

.app-details__row dt {
	margin: 0;
	color: var(--muted);
	font-weight: 600;
}

.app-details__row dd {
	margin: 0;
}

/* Related apps + grouped directory cards */
.related-apps {
	margin: 32px 0;
}

.app-card__name {
	display: block;
	margin-top: 8px;
	font-weight: 600;
}

.app-card h3 {
	margin: 8px 0 4px;
	font-family: var(--serif);
	font-size: 1.05rem;
}

.app-card h3 a {
	color: var(--ink);
	text-decoration: none;
}

.app-card h3 a:hover {
	color: var(--accent);
}

.app-os-group {
	margin-bottom: 44px;
}

.app-os-group__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 2px solid var(--ink);
	padding-bottom: 8px;
	margin-bottom: 20px;
}

.app-os-group__head h2 {
	margin: 0;
	font-family: var(--serif);
	font-size: 1.5rem;
}

.app-os-group__all {
	white-space: nowrap;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--accent);
}

.app-filters .button--ghost {
	margin-left: 4px;
}

/* Shared empty state + search meta */
.empty-state {
	margin: 32px 0;
	padding: 28px;
	border: 1px dashed var(--rule);
	border-radius: 12px;
	color: var(--muted);
	text-align: center;
}

.empty-state .button {
	margin-top: 8px;
}

.search-count {
	color: var(--muted);
	font-size: 0.9rem;
	margin: 0 0 12px;
}

.search-form-wrap {
	margin: 0 0 24px;
	max-width: 480px;
}

/* Default WordPress search form (Search + 404 pages) — matched to the
 * header search and .button styles. Markup comes from get_search_form();
 * its built-in screen-reader label and input/submit semantics are kept. */
.search-form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-form label {
	flex: 1 1 auto;
	display: flex;
	min-width: 0;
	margin: 0;
}

.search-form .search-field {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	border: 1px solid var(--rule);
	background: var(--paper-2);
	border-radius: 999px;
	padding: 10px 16px;
	font: inherit;
	color: var(--ink);
}

.search-form .search-field::placeholder {
	color: var(--muted);
}

.search-form .search-submit {
	flex: 0 0 auto;
	border: 0;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	padding: 10px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.search-form .search-submit:hover {
	background: var(--accent);
}

.error-latest {
	margin-top: 40px;
}

/* Numbered pagination — the_posts_pagination() on the homepage, archives,
 * category and search pages. Matched to the theme's pill buttons. */
.pagination {
	margin: 36px 0 8px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	padding: 8px 14px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--paper-2);
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
	line-height: 1;
}

.pagination a.page-numbers:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.pagination .page-numbers.current {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	padding-inline: 4px;
	min-width: 0;
}

@media (max-width: 480px) {
	.pagination .page-numbers {
		min-width: 40px;
		padding: 8px 12px;
	}
}

@media (max-width: 900px) {
	.footer-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}

	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav__link--next {
		grid-column: 1;
		text-align: left;
	}

	.app-details__row {
		grid-template-columns: 1fr;
		gap: 2px;
	}
}

/* ---------------------------------------------------------------------------
 * Homepage v1.9 — right Apps sidebar (compact cards), editorial feed cards,
 * Latest News autoloading. Added for the UI/IA redesign pass.
 * ------------------------------------------------------------------------- */

/* Compact app cards in the right sidebar (exactly three). */
.app-mini-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.app-mini {
	border: 1px solid var(--rule);
	border-radius: 14px;
	background: var(--paper-2);
	overflow: hidden;
}

.app-mini__link {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 10px;
	color: var(--ink);
	text-decoration: none;
}

.app-mini__link:hover {
	background: var(--paper);
}

.app-mini__icon {
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
	border-radius: 11px;
	object-fit: cover;
}

span.app-mini__icon {
	display: grid;
	place-items: center;
	font-size: 1.4rem;
}

.app-mini__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.app-mini__title {
	font-weight: 600;
	font-size: 0.98rem;
	line-height: 1.2;
}

.app-mini__desc {
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
}

.app-mini__platform {
	margin-top: 2px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--accent);
}

.app-mini-empty {
	color: var(--muted);
	margin: 0 0 20px;
}

.button.button--ghost {
	background: transparent;
	color: var(--accent);
	border: 1px solid var(--accent);
}

.button.button--ghost:hover {
	background: var(--accent);
	color: #fff;
}

/* Editorial feed cards (Gizmodo-inspired structure, original styling). */
.feed-item__media {
	display: block;
}

.feed-item__excerpt {
	margin: 8px 0 0;
	color: var(--muted);
	font-family: var(--serif);
	font-size: 1.02rem;
	line-height: 1.5;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.feed-empty {
	display: block;
	border: 0;
	padding: 18px 0;
}

/* Latest News autoload status + sentinel. */
.feed-sentinel {
	height: 1px;
}

.feed-autoload {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 0;
	margin: 16px 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.feed-autoload:empty {
	margin: 0;
}

.feed-autoload.is-error {
	color: var(--accent-2);
}

.feed-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--rule);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: saraspar-spin 0.7s linear infinite;
}

.feed-retry {
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: var(--paper-2);
	color: var(--ink);
	padding: 4px 12px;
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

.feed-retry:hover {
	border-color: var(--accent);
	color: var(--accent);
}

@keyframes saraspar-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.feed-spinner {
		animation-duration: 2s;
	}
}

/* Sidebar stacks below the news on small screens. */
@media (max-width: 900px) {
	.home-app-sidebar {
		margin-top: 40px;
		margin-bottom: 0;
	}

	.footer-legal {
		justify-content: flex-start;
	}
}

/* ---------------------------------------------------------------------------
 * Apps directory (unified list), App Detail (slider + related). v1.10.
 * ------------------------------------------------------------------------- */

/* Unified Apps directory — one flat, paginated list. */
.app-directory {
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.app-directory__item {
	position: relative;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 20px;
	align-items: center;
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 16px;
	padding: 18px 20px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-directory__item:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow);
}

.app-directory__logo img,
.app-directory__logo .app-icon {
	width: 72px;
	height: 72px;
	flex: 0 0 72px;
	border-radius: 14px;
	object-fit: cover;
}

.app-directory__body {
	min-width: 0;
}

.app-directory__title {
	font-family: var(--serif);
	font-size: 1.3rem;
	line-height: 1.2;
	margin: 0 0 6px;
}

.app-directory__title a {
	color: var(--ink);
	text-decoration: none;
}

/* Stretched link makes the whole row open the app, chips stay clickable. */
.app-directory__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
}

.app-directory__desc {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: 0.95rem;
	line-height: 1.45;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.app-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.app-chip {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--rule);
	border-radius: 999px;
	padding: 3px 11px;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--accent);
	background: var(--paper);
	text-decoration: none;
}

.app-chip:hover {
	border-color: var(--accent);
	color: #fff;
	background: var(--accent);
}

.app-directory__shot img {
	width: 160px;
	height: 100px;
	object-fit: cover;
	border-radius: 10px;
}

/* App Detail — content left, media right. */
.app-detail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
	gap: 44px;
	align-items: start;
	margin-top: 16px;
}

.app-detail__main {
	min-width: 0;
}

.app-detail__identity {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-bottom: 20px;
}

.app-detail__identity .app-icon {
	width: 88px;
	height: 88px;
	flex: 0 0 88px;
	border-radius: 18px;
}

.app-detail__summary {
	font-family: var(--serif);
	font-size: 1.2rem;
	line-height: 1.45;
	color: var(--muted);
	margin: 6px 0 10px;
}

.app-detail__content {
	font-size: 1.08rem;
}

.app-verdict,
.app-detail__disclosure {
	margin-top: 24px;
}

.app-detail__disclosure {
	font-style: italic;
}

/* Media column: slider, single image, or placeholder. */
.app-detail__media {
	position: sticky;
	top: 92px;
}

.app-slider {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: transparent;
	border: 1px solid var(--rule);
}

.app-slider__track {
	list-style: none;
	margin: 0;
	padding: 0;
}

.app-slider__slide img,
.app-slider__slide video,
.app-detail__single img,
.app-detail__single video {
	width: 100%;
	/* Show the whole screenshot/video (portrait or landscape) without cropping;
	   the frame letterboxes with the panel background. */
	height: clamp(360px, 55vh, 540px);
	object-fit: contain;
	display: block;
}

/* A video slide letterboxes against black so the player reads cleanly. */
.app-slider__slide video,
.app-detail__single video {
	background: #000;
}

.app-detail__single {
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--rule);
	background: transparent;
}

/* Slider is only interactive once JS enhances it. */
.app-slider__nav,
.app-slider__dots {
	display: none;
}

.app-slider.is-enhanced .app-slider__nav {
	display: grid;
	place-items: center;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(28, 24, 20, 0.6);
	color: #fff;
	font-size: 1.6rem;
	cursor: pointer;
}

.app-slider.is-enhanced .app-slider__nav--prev {
	left: 10px;
}

.app-slider.is-enhanced .app-slider__nav--next {
	right: 10px;
}

.app-slider__nav:hover {
	background: var(--ink);
}

.app-slider.is-enhanced .app-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
}

.app-slider__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	cursor: pointer;
}

.app-slider__dot[aria-current="true"] {
	background: #fff;
}

.app-detail__placeholder {
	display: grid;
	place-items: center;
	gap: 8px;
	aspect-ratio: 16 / 10;
	border-radius: 16px;
	border: 1px dashed var(--rule);
	background: var(--paper-2);
	color: var(--muted);
	text-align: center;
}

.app-detail__placeholder span {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--accent), #18342c);
	color: #fff;
	font-family: var(--serif);
	font-size: 1.8rem;
}

.app-detail__placeholder p {
	margin: 0;
	font-size: 0.9rem;
}

/* Related apps — compact cards, stack on mobile. */
.related-apps {
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--rule);
}

.related-apps__grid {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.related-app {
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 14px;
}

.related-app__link {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 14px;
	color: var(--ink);
	text-decoration: none;
}

.related-app__link:hover {
	background: var(--paper);
}

.related-app .app-icon {
	width: 56px;
	height: 56px;
	flex: 0 0 56px;
	border-radius: 12px;
}

.related-app__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.related-app__name {
	font-weight: 600;
	line-height: 1.2;
}

.related-app__desc {
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.related-app__platform {
	margin-top: 2px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--accent);
}

@media (max-width: 900px) {
	.app-detail {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.app-detail__media {
		position: static;
		order: 2;
	}

	.app-directory__item {
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 14px;
		align-items: start;
	}

	.app-directory__logo img,
	.app-directory__logo .app-icon {
		width: 56px;
		height: 56px;
		flex-basis: 56px;
	}

	/* Supporting screenshot drops on narrow screens to avoid overflow. */
	.app-directory__shot {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * App Detail "Details" accordion (accessible disclosure rows). v1.11.
 * ------------------------------------------------------------------------- */
.app-accordion {
	border-top: 1px solid var(--rule);
	margin-top: 10px;
}

.app-accordion__item {
	border-bottom: 1px solid var(--rule);
}

.app-accordion__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 2px;
	background: transparent;
	border: 0;
	margin: 0;
	font: inherit;
	font-weight: 600;
	color: var(--ink);
	text-align: left;
	cursor: pointer;
}

.app-accordion__trigger:hover {
	color: var(--accent);
}

.app-accordion__label {
	min-width: 0;
}

/* Chevron: points down when collapsed, up when expanded. */
.app-accordion__icon {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-right: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.2s ease;
}

.app-accordion__trigger[aria-expanded="true"] .app-accordion__icon {
	transform: translateY(2px) rotate(225deg);
}

.app-accordion__panel {
	padding: 0 2px 16px;
}

.app-accordion__value {
	margin: 0;
	color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
	.app-accordion__icon {
		transition: none;
	}
}
