/* Luminous Headlines front end. Type inherits the theme; tokens cover secondary colors. */
.lmhl {
	--lmhl-muted: #5b636d;
	--lmhl-rule: rgba(0, 0, 0, 0.12);
	--lmhl-tile: #eceef1;
	--lmhl-tile-text: #39414a;
	--lmhl-card: #ffffff;
	--lmhl-card-edge: #d9dde2;
	--lmhl-icon-bg: #ffffff;
	--lmhl-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
	--lmhl-shadow-hover: 0 4px 10px rgba(16, 24, 40, 0.07), 0 10px 24px rgba(16, 24, 40, 0.06);
	--lmhl-mark: 56px;
	margin: 0 0 1.75em;
}
@media (prefers-color-scheme: dark) {
	.lmhl {
		--lmhl-muted: #a7afb8;
		--lmhl-rule: rgba(255, 255, 255, 0.16);
		--lmhl-tile: #2b3037;
		--lmhl-tile-text: #d6dbe0;
		--lmhl-card: rgba(255, 255, 255, 0.04);
		--lmhl-card-edge: #4a5059;
		--lmhl-icon-bg: #f4f5f7;
		--lmhl-shadow: none;
		--lmhl-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.35);
	}
}
.fanrev-is-dark .lmhl {
	--lmhl-muted: #a7afb8;
	--lmhl-rule: rgba(255, 255, 255, 0.16);
	--lmhl-tile: #2b3037;
	--lmhl-tile-text: #d6dbe0;
	--lmhl-card: rgba(255, 255, 255, 0.04);
	--lmhl-card-edge: #4a5059;
	--lmhl-icon-bg: #f4f5f7;
	--lmhl-shadow: none;
	--lmhl-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Cards */
.lmhl .lmhl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lmhl .lmhl-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 18px;
	margin: 0;
	padding: 18px 20px 18px 18px;
	background: var(--lmhl-card);
	border: 1px solid var(--lmhl-card-edge);
	border-left: 5px solid var(--lmhl-c, var(--lmhl-rule));
	border-radius: 12px;
	box-shadow: var(--lmhl-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lmhl .lmhl-item:hover {
	box-shadow: var(--lmhl-shadow-hover);
	transform: translateY(-2px);
}
.lmhl .lmhl-item:focus-within {
	outline: 2px solid var(--lmhl-c, currentColor);
	outline-offset: 3px;
}

/* Logo, favicon, or letter tile */
.lmhl .lmhl-mark {
	flex: 0 0 var(--lmhl-mark);
	width: var(--lmhl-mark);
	display: flex;
	justify-content: center;
	padding-top: 2px;
}
.lmhl .lmhl-mark img {
	display: block;
	max-width: 100%;
	max-height: 44px;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0;
	border: 0;
	box-shadow: none;
}
.lmhl .lmhl-mark .lmhl-icon {
	box-sizing: content-box;
	width: 28px;
	height: 28px;
	padding: 8px;
	background: var(--lmhl-icon-bg);
	border: 1px solid var(--lmhl-card-edge);
	border-radius: 12px;
}
.lmhl .lmhl-tile {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--lmhl-c, var(--lmhl-tile));
	color: var(--lmhl-on, var(--lmhl-tile-text));
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 19px;
	line-height: 1;
}

/* Text */
.lmhl .lmhl-body { flex: 1 1 auto; min-width: 0; }
.lmhl .lmhl-meta {
	margin: 0 0 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	font-size: 0.8em;
	line-height: 1.4;
	color: var(--lmhl-muted);
}
.lmhl .lmhl-pill {
	display: inline-block;
	padding: 3px 11px;
	border-radius: 999px;
	background: var(--lmhl-c, var(--lmhl-tile));
	color: var(--lmhl-on, var(--lmhl-tile-text));
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.45;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lmhl .lmhl-newtab { display: inline-flex; align-items: center; gap: 4px; }
.lmhl .lmhl-newtab svg { width: 12px; height: 12px; flex: none; }

.lmhl .lmhl-title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 1.15em;
	line-height: 1.3;
	font-weight: 700;
	text-wrap: balance;
}
.lmhl .lmhl-title a { color: inherit; text-decoration: none; outline: none; }
/* Whole card is clickable through the headline link. */
.lmhl .lmhl-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.lmhl .lmhl-item:hover .lmhl-title a {
	text-decoration: underline;
	text-decoration-color: var(--lmhl-c, currentColor);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.lmhl .lmhl-excerpt {
	margin: 0;
	line-height: 1.6;
	max-width: 70ch;
	opacity: 0.85;
}

.lmhl .lmhl-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Pagination */
.lmhl .lmhl-pages {
	margin: 24px 0 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	align-items: center;
}
.lmhl .lmhl-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	padding: 6px 14px;
	border: 1px solid var(--lmhl-card-edge);
	border-radius: 999px;
	background: var(--lmhl-card);
	text-decoration: none;
	line-height: 1.4;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.lmhl .lmhl-pages a.page-numbers:hover { border-color: currentColor; }
.lmhl .lmhl-pages a.page-numbers:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.lmhl .lmhl-pages .current {
	font-weight: 700;
	border-color: currentColor;
	box-shadow: inset 0 0 0 1px currentColor;
}
.lmhl .lmhl-pages .dots { border-color: transparent; background: none; padding: 6px 4px; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
	.lmhl .lmhl-item, .lmhl .lmhl-pages .page-numbers { transition: none; }
	.lmhl .lmhl-item:hover { transform: none; }
}

@media (max-width: 480px) {
	.lmhl { --lmhl-mark: 40px; }
	.lmhl .lmhl-item { gap: 12px; padding: 14px 14px 14px 12px; }
	.lmhl .lmhl-mark img { max-height: 34px; }
	.lmhl .lmhl-mark .lmhl-icon { width: 22px; height: 22px; padding: 6px; border-radius: 10px; }
	.lmhl .lmhl-tile { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
	.lmhl .lmhl-title { font-size: 1.05em; }
}

/* News Sources widget */
.lmhl.lmhl-sources {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.lmhl.lmhl-sources .lmhl-source {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	list-style: none;
}
.lmhl.lmhl-sources .lmhl-source::before { content: none; }
.lmhl.lmhl-sources a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px 8px 10px;
	background: var(--lmhl-card);
	border: 1px solid var(--lmhl-card-edge);
	border-left: 4px solid var(--lmhl-c, var(--lmhl-rule));
	border-radius: 10px;
	box-shadow: var(--lmhl-shadow);
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lmhl.lmhl-sources a:hover {
	box-shadow: var(--lmhl-shadow-hover);
	transform: translateY(-1px);
}
.lmhl.lmhl-sources a:hover .lmhl-src-name {
	text-decoration: underline;
	text-decoration-color: var(--lmhl-c, currentColor);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.lmhl.lmhl-sources a:focus-visible { outline: 2px solid var(--lmhl-c, currentColor); outline-offset: 2px; }
.lmhl-sources .lmhl-src-icon {
	flex: none;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--lmhl-icon-bg);
	border: 1px solid var(--lmhl-card-edge);
	border-radius: 8px;
	overflow: hidden;
}
.lmhl-sources .lmhl-src-icon img {
	display: block;
	width: 20px;
	height: 20px;
	max-width: none;
	object-fit: contain;
	margin: 0;
	border: 0;
	box-shadow: none;
}
.lmhl-sources .lmhl-src-letter {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--lmhl-c, var(--lmhl-tile));
	color: var(--lmhl-on, var(--lmhl-tile-text));
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
}
.lmhl-sources .lmhl-src-name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.lmhl-sources .lmhl-src-ext { flex: none; display: inline-flex; color: var(--lmhl-muted); }
.lmhl-sources .lmhl-src-ext svg,
.lmhl.lmhl-src-note svg { width: 12px; height: 12px; flex: none; }
.lmhl.lmhl-src-note {
	margin: 10px 0 0;
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 0.8em;
	color: var(--lmhl-muted);
}
@media (prefers-reduced-motion: reduce) {
	.lmhl.lmhl-sources a { transition: none; }
	.lmhl.lmhl-sources a:hover { transform: none; }
}
