/*
Theme Name: Meridian
Theme URI: https://example.com/meridian
Author: [AUTHOR NAME]
Author URI: https://example.com
Description: A modern, reading-first magazine theme for digital newspapers. Photo-mosaic hero, section blocks driven by categories, and well-distributed ad slots managed through widget areas.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meridian
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, sticky-post, theme-options, threaded-comments, translation-ready, wide-blocks
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--mer-accent: #2563eb;
	--mer-ink: #0f172a;
	--mer-ink-2: #1e293b;
	--mer-slate: #475569;
	--mer-muted: #64748b;
	--mer-line: #e2e8f0;
	--mer-bg: #f8fafc;
	--mer-surface: #ffffff;
	--mer-placeholder: #cbd5e1;
	--mer-tile: #334155;
	--mer-on-dark: #e2e8f0;
	--mer-on-dark-muted: #cbd5e1;

	--mer-font-head: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--mer-font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

	--mer-radius-sm: 6px;
	--mer-radius: 10px;
	--mer-radius-lg: 14px;
	--mer-container: 1280px;
	--mer-gutter: 24px;
	--mer-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

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

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

a {
	color: var(--mer-ink);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--mer-accent);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--mer-font-head);
	line-height: 1.2;
	margin: 0;
}

button {
	font: inherit;
}

.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 !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
	background: var(--mer-surface);
	clip: auto !important;
	clip-path: none;
	color: var(--mer-ink);
	display: block;
	font-weight: 600;
	height: auto;
	left: 8px;
	padding: 12px 18px;
	top: 8px;
	width: auto;
	z-index: 100000;
	border-radius: var(--mer-radius-sm);
	box-shadow: var(--mer-shadow);
}

.container {
	max-width: var(--mer-container);
	margin: 0 auto;
	padding-left: var(--mer-gutter);
	padding-right: var(--mer-gutter);
}

/* ==========================================================================
   3. Shared atoms
   ========================================================================== */
.pill {
	display: inline-block;
	background: var(--mer-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	padding: 6px 9px;
	border-radius: 4px;
}

a.pill:hover {
	color: #fff;
	text-decoration: none;
	filter: brightness(1.1);
}

.kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mer-accent);
}

.meta {
	font-size: 12px;
	color: var(--mer-muted);
}

.meta a {
	color: inherit;
	font-weight: 600;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--mer-radius);
	background: var(--mer-ink);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
}

.btn:hover {
	color: #fff;
	text-decoration: none;
	background: var(--mer-ink-2);
}

.btn--accent { background: var(--mer-accent); }
.btn--accent:hover { background: var(--mer-accent); filter: brightness(1.08); }

.btn--outline {
	background: transparent;
	color: var(--mer-ink);
	border: 1px solid var(--mer-ink);
}

.btn--outline:hover {
	background: var(--mer-ink);
	color: #fff;
}

.icon-btn {
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--mer-line);
	border-radius: var(--mer-radius);
	background: var(--mer-surface);
	color: var(--mer-ink);
	cursor: pointer;
	flex: none;
	text-decoration: none;
}

.icon-btn:hover {
	border-color: var(--mer-ink);
	text-decoration: none;
}

/* Media: featured image or neutral placeholder */
.media {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--mer-placeholder);
	border-radius: var(--mer-radius-sm);
}

.media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

a:hover > .media img,
.media:hover img {
	transform: scale(1.03);
}

.media--16x10 { aspect-ratio: 16 / 10; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--21x9 { aspect-ratio: 21 / 9; }

/* ==========================================================================
   4. Top bar, header, navigation
   ========================================================================== */
.topbar {
	background: var(--mer-ink);
	color: var(--mer-on-dark-muted);
	font-size: 13px;
}

.topbar__inner {
	min-height: 40px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.topbar__links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.topbar__menu,
.topbar__menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.topbar a {
	color: var(--mer-on-dark);
	display: inline-block;
	padding: 10px;
}

.topbar__account {
	color: #fff !important;
	font-weight: 600;
}

.site-header {
	background: var(--mer-surface);
}

.site-header__inner {
	padding-top: 24px;
	padding-bottom: 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.brand {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.brand a:hover {
	text-decoration: none;
}

.brand__name {
	font-family: var(--mer-font-head);
	font-size: 40px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--mer-ink);
	margin: 0;
}

.brand__dot {
	color: var(--mer-accent);
}

.brand__tagline {
	font-size: 12px;
	color: var(--mer-muted);
	margin: 0;
}

.custom-logo {
	max-height: 64px;
	width: auto;
}

.main-nav {
	background: var(--mer-ink);
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar .main-nav { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .main-nav { top: 0; }
}

.main-nav__inner {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Compact brand shown inside the nav on phones only. */
.main-nav__brand {
	display: none;
}

.main-nav__brand a:hover {
	text-decoration: none;
}

.main-nav__menu {
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.main-nav__menu::-webkit-scrollbar { display: none; }

.main-nav__menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
}

.main-nav__menu li ul { display: none; } /* Dropdowns live in the mobile panel */

.main-nav__menu a {
	display: block;
	padding: 17px 16px;
	color: var(--mer-on-dark);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

.main-nav__menu a:hover {
	color: #fff;
	background: var(--mer-ink-2);
	text-decoration: none;
}

.main-nav__menu .current-menu-item > a,
.main-nav__menu .current-menu-ancestor > a,
.main-nav__menu .current-cat > a {
	background: var(--mer-accent);
	color: #fff;
	font-weight: 600;
}

.nav-btn {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: var(--mer-ink-2);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: none;
}

.nav-btn--menu { display: none; }

.search-panel {
	background: var(--mer-ink-2);
	padding: 16px 0;
}

.search-panel[hidden] { display: none; }

.mobile-panel {
	background: var(--mer-ink);
	border-top: 1px solid var(--mer-ink-2);
	padding: 8px 0 20px;
}

.mobile-panel[hidden] { display: none; }

.mobile-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-panel a {
	display: block;
	padding: 12px 0;
	color: var(--mer-on-dark);
	font-weight: 500;
	border-bottom: 1px solid var(--mer-ink-2);
}

.mobile-panel .sub-menu a { padding-left: 16px; font-weight: 400; }

/* Reading progress (single posts) */
.reading-progress {
	height: 4px;
	background: var(--mer-ink-2);
}

.reading-progress__bar {
	height: 4px;
	width: 0;
	background: var(--mer-accent);
}

/* Breaking ticker */
.breaking {
	background: var(--mer-surface);
	border-bottom: 1px solid var(--mer-line);
}

.breaking__inner {
	padding-top: 10px;
	padding-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.breaking__label {
	background: var(--mer-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 7px 10px;
	border-radius: 4px;
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.breaking__label::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mer-accent);
}

.breaking__items {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
	min-width: 0;
}

.breaking__items li {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.breaking__items li[hidden] { display: none; }

.breaking__items a {
	font-size: 14px;
	font-weight: 500;
}

.breaking__controls {
	display: flex;
	gap: 6px;
	flex: none;
}

.breaking__controls button {
	width: 32px;
	height: 32px;
	border: 1px solid var(--mer-line);
	border-radius: var(--mer-radius-sm);
	background: var(--mer-surface);
	color: var(--mer-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */
.site-main {
	padding-top: 24px;
	padding-bottom: 64px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.layout {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: flex-start;
}

.layout__content {
	flex: 999 1 640px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.layout__sidebar {
	flex: 1 1 300px;
	max-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

@media (max-width: 1023px) {
	.layout__sidebar { max-width: none; }
}

.grid {
	display: grid;
	gap: 20px;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.grid--cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.grid--list { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }

.split {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.split > * {
	flex: 1 1 300px;
	min-width: 0;
}

/* ==========================================================================
   6. Section header bar
   ========================================================================== */
.section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.section-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	background: var(--mer-ink);
	border-radius: 8px;
	overflow: hidden;
	padding-right: 8px;
}

.section-bar__title {
	background: var(--mer-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 15px 20px;
}

.section-bar__title a,
.section-bar__title a:hover {
	color: #fff;
}

.section-bar__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.section-bar__tabs a,
.section-bar__more {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 12px;
	border-radius: var(--mer-radius-sm);
	color: var(--mer-on-dark-muted);
	font-size: 13px;
	font-weight: 600;
}

.section-bar__tabs a:hover,
.section-bar__more:hover,
.section-bar__tabs a[aria-current="page"] {
	background: var(--mer-ink-2);
	color: #fff;
	text-decoration: none;
}

.side-title {
	background: var(--mer-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 13px 16px;
	border-radius: 8px;
	margin: 0;
}

.col-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 2px solid var(--mer-ink);
}

.col-title h2 {
	background: var(--mer-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 10px 14px;
	border-radius: var(--mer-radius-sm) var(--mer-radius-sm) 0 0;
}

.col-title a {
	font-size: 13px;
	font-weight: 600;
	padding: 10px 0;
	color: var(--mer-slate);
}

/* ==========================================================================
   7. Cards
   ========================================================================== */

/* Tile: image with overlaid headline */
.tile {
	position: relative;
	overflow: hidden;
	border-radius: var(--mer-radius);
	background: var(--mer-tile);
	min-height: 200px;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.tile .media {
	position: absolute;
	inset: 0;
	border-radius: 0;
	background: var(--mer-tile);
	z-index: -2;
}

.tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(15, 23, 42, 0) 72%);
	pointer-events: none;
}

/* Static on purpose: the stretched headline link below must resolve to .tile. */
.tile__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	color: #fff;
}

.tile__title {
	font-weight: 700;
	font-size: 18px;
	line-height: 1.25;
}

.tile__title a,
.tile__title a:hover {
	color: #fff;
}

/* Stretch the headline link across the whole tile */
.tile__title a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
}

.tile .pill {
	position: relative;
	z-index: 1;
}

.tile .meta {
	color: var(--mer-on-dark-muted);
}

.tile--xl { height: 520px; }
.tile--xl .tile__body { padding: 32px; gap: 14px; }
.tile--xl .tile__title { font-size: 38px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; max-width: 620px; }

.tile--lg { height: 256px; }
.tile--lg .tile__body { padding: 24px; }
.tile--lg .tile__title { font-size: 24px; line-height: 1.2; }

.tile--md { height: 300px; }
.tile--md .tile__title { font-size: 22px; }

.tile--sm { height: 256px; }

.tile--col { height: 220px; }
.tile--col .tile__title { font-size: 19px; }

.tile--video {
	aspect-ratio: 16 / 9;
	height: auto;
}

.tile--video .tile__title { font-size: 24px; }

.play-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--mer-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

/* Hero mosaic */
.hero {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hero__lead {
	flex: 1 1 560px;
	min-width: 0;
}

.hero__side {
	flex: 1 1 520px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hero__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hero__row > * {
	flex: 1 1 200px;
	min-width: 0;
}

/* Trending strip */
.trending {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: trending;
}

.trending__item {
	counter-increment: trending;
	background: var(--mer-surface);
	border-radius: 12px;
	padding: 12px;
	display: flex;
	gap: 14px;
	align-items: center;
}

.trending__num {
	width: 72px;
	height: 72px;
	flex: none;
	border-radius: var(--mer-radius-sm);
	background: var(--mer-placeholder);
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.trending__num img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.6);
}

.trending__num::after {
	content: counter(trending);
	position: relative;
	font-family: var(--mer-font-head);
	font-size: 26px;
	font-weight: 800;
	color: #fff;
}

.trending__title {
	font-family: var(--mer-font-head);
	font-size: 15px;
	line-height: 1.3;
	font-weight: 700;
}

/* Feature card (image above text) */
.feature {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.feature .media { border-radius: var(--mer-radius); }

.feature__title {
	font-size: 24px;
	line-height: 1.22;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.feature__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--mer-slate);
}

/* List card (thumbnail + text) */
.list-card {
	display: flex;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--mer-line);
	align-items: flex-start;
}

.list-card .media {
	width: 104px;
	height: 76px;
	flex: none;
}

.list-card--sm .media {
	width: 80px;
	height: 60px;
}

.list-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.list-card__title {
	font-size: 15px;
	line-height: 1.3;
	font-weight: 700;
}

.list-card--sm .list-card__title { font-size: 14px; }

/* Overlap card (white box over image) */
.overlap {
	display: flex;
	flex-direction: column;
}

.overlap__media {
	position: relative;
}

.overlap__media .media {
	border-radius: var(--mer-radius);
}

.overlap__media .pill {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
}

.overlap__box {
	position: relative;
	margin: -44px 14px 0;
	background: var(--mer-surface);
	border-radius: 12px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: var(--mer-shadow);
}

.overlap__title {
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
}

.overlap__excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--mer-slate);
}

/* Ranked list (most popular) */
.ranked {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: rank;
}

.ranked li {
	counter-increment: rank;
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid var(--mer-line);
}

.ranked .media {
	width: 64px;
	height: 64px;
	flex: none;
	overflow: visible;
}

.ranked .media img { border-radius: var(--mer-radius-sm); }

.ranked .media::before {
	content: counter(rank);
	position: absolute;
	top: -6px;
	left: -6px;
	z-index: 1;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--mer-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--mer-bg);
}

.ranked a {
	font-family: var(--mer-font-head);
	font-size: 14px;
	line-height: 1.3;
	font-weight: 700;
}

/* ==========================================================================
   8. Sidebar widgets
   ========================================================================== */
.social-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.social-grid a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	background: var(--mer-surface);
	border: 1px solid var(--mer-line);
	border-radius: 12px;
	font-size: 13px;
	font-weight: 600;
}

.social-grid a:hover {
	border-color: var(--mer-ink);
	text-decoration: none;
}

.social-mark {
	width: 32px;
	height: 32px;
	border-radius: var(--mer-radius-sm);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	flex: none;
}

.social-mark--facebook { background: #1877f2; }
.social-mark--x { background: #0f172a; }
.social-mark--instagram { background: #c13584; }
.social-mark--youtube { background: #dc2626; }

.newsletter {
	background: var(--mer-accent);
	color: #fff;
	border-radius: 12px;
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.newsletter h2 {
	font-size: 20px;
	font-weight: 800;
	color: #fff;
}

.newsletter p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.newsletter form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.newsletter label {
	font-size: 12px;
	font-weight: 600;
}

.newsletter input[type="email"] {
	height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	font: 14px var(--mer-font-body);
}

.widget {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	padding: 8px 0;
	border-bottom: 1px solid var(--mer-line);
}

.sticky-slot {
	position: sticky;
	top: 72px;
}

.admin-bar .sticky-slot { top: 104px; }

/* ==========================================================================
   9. Ads
   ========================================================================== */
.ad-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	max-width: 100%;
}

.ad-slot__label {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--mer-muted);
}

.ad-slot__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	overflow: hidden;
}

/* Reserve the space so the page does not jump when the creative loads (CLS). */
.ad-slot--728x90 .ad-slot__frame { width: 728px; min-height: 90px; }
.ad-slot--970x250 .ad-slot__frame { width: 970px; min-height: 250px; }
.ad-slot--970x90 .ad-slot__frame { width: 970px; min-height: 90px; }
.ad-slot--300x250 .ad-slot__frame { width: 300px; min-height: 250px; }
.ad-slot--300x600 .ad-slot__frame { width: 300px; min-height: 600px; }
.ad-slot--native .ad-slot__frame { width: 100%; display: block; }

.ad-slot--header { align-items: flex-end; }

.ad-slot__placeholder {
	width: 100%;
	height: 100%;
	min-height: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px;
	text-align: center;
	background: #eef2f6;
	border: 1px dashed #94a3b8;
	border-radius: 8px;
	color: var(--mer-slate);
	font-size: 12px;
}

.ad-slot__placeholder strong {
	font-size: 14px;
	color: var(--mer-ink);
}

.ad-slot--in-article {
	margin: 8px 0 36px;
	padding: 20px;
	background: var(--mer-bg);
	border-radius: 12px;
}

/* Below 1000px wide banners scale down; on phones header/billboard slots hide
   in favour of mobile units. */
@media (max-width: 1023px) {
	.ad-slot--970x250 .ad-slot__frame,
	.ad-slot--970x90 .ad-slot__frame { width: 728px; min-height: 90px; }
}

@media (max-width: 767px) {
	.ad-slot--header,
	.ad-slot--desktop-only { display: none; }
	.ad-slot--970x250 .ad-slot__frame,
	.ad-slot--970x90 .ad-slot__frame,
	.ad-slot--728x90 .ad-slot__frame { width: 320px; min-height: 100px; }
}

.anchor-ad {
	display: none;
}

@media (max-width: 767px) {
	.anchor-ad {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
		padding: 6px 0 10px;
		background: var(--mer-surface);
		border-top: 1px solid var(--mer-line);
		box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
	}

	.anchor-ad[hidden] { display: none; }

	.anchor-ad__bar {
		width: 320px;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.anchor-ad__close {
		width: 32px;
		height: 32px;
		border: 0;
		background: transparent;
		color: var(--mer-slate);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}

	.anchor-ad .ad-slot__frame { width: 320px; min-height: 50px; }

	body.has-anchor-ad { padding-bottom: 90px; }
}

/* ==========================================================================
   10. Video band
   ========================================================================== */
.video-band {
	background: var(--mer-ink);
	border-radius: 16px;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.video-band__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.video-band__head h2 {
	color: #fff;
	font-size: 24px;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 10px;
}

.video-band__head h2::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--mer-accent);
}

.video-band__head a { color: var(--mer-on-dark); font-size: 13px; font-weight: 600; }

.video-band__body {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.video-band__body > .tile { flex: 2 1 520px; }

.video-band__list {
	flex: 1 1 280px;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.video-band__list li {
	display: flex;
	gap: 14px;
	align-items: center;
}

.video-band__list .media {
	width: 128px;
	height: 76px;
	flex: none;
	background: var(--mer-tile);
}

.video-band__list .media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: center / 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.video-band__list a {
	font-family: var(--mer-font-head);
	color: #fff;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 700;
}

.video-duration {
	position: absolute;
	right: 6px;
	bottom: 6px;
	z-index: 1;
	font-size: 11px;
	font-weight: 600;
	color: #fff;
	background: rgba(15, 23, 42, 0.8);
	padding: 2px 5px;
	border-radius: 3px;
}

/* ==========================================================================
   11. Single article
   ========================================================================== */
.article-hero {
	padding-top: 32px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.breadcrumbs {
	font-size: 13px;
	color: var(--mer-muted);
}

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

.breadcrumbs li + li::before {
	content: "›";
	margin-right: 8px;
}

.breadcrumbs a { color: var(--mer-slate); }

.article-hero__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 900px;
}

.entry-title {
	font-size: clamp(32px, 4.2vw, 50px);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.025em;
}

.entry-dek {
	margin: 0;
	font-size: clamp(18px, 1.8vw, 21px);
	line-height: 1.5;
	color: var(--mer-slate);
}

.byline-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	border-top: 1px solid var(--mer-line);
	border-bottom: 1px solid var(--mer-line);
}

.byline {
	display: flex;
	gap: 12px;
	align-items: center;
}

.byline img {
	border-radius: 50%;
}

.byline__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 15px;
}

.byline__text a { font-weight: 700; }

.byline-bar__actions {
	display: flex;
	gap: 8px;
}

.entry-figure {
	margin: 8px 0 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.entry-figure .media { border-radius: var(--mer-radius-lg); }

.entry-figure figcaption {
	font-size: 13px;
	line-height: 1.5;
	color: var(--mer-slate);
}

.article-layout {
	padding-top: 40px;
	padding-bottom: 64px;
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	align-items: flex-start;
}

.share-rail {
	flex: 0 0 44px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: sticky;
	top: 100px;
}

.share-rail__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mer-muted);
	text-align: center;
}

.article-body {
	flex: 999 1 560px;
	min-width: 0;
	max-width: 700px;
}

/* Long-form reading: ~65–75 characters per line, generous leading. */
.entry-content {
	font-size: 19px;
	line-height: 1.75;
	color: var(--mer-ink-2);
}

body.is-large-text .entry-content { font-size: 22px; }

.entry-content > * {
	margin-top: 0;
	margin-bottom: 1.4em;
}

.entry-content > p:first-child {
	font-size: 1.1em;
	font-weight: 500;
	color: var(--mer-ink);
}

.entry-content h2 {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin-top: 1.6em;
	margin-bottom: 0.6em;
}

.entry-content h3 {
	font-size: 22px;
	font-weight: 700;
	margin-top: 1.4em;
	margin-bottom: 0.5em;
}

.entry-content a {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content blockquote,
.entry-content .wp-block-quote,
.entry-content .wp-block-pullquote {
	margin: 8px 0 36px;
	padding: 0 0 0 58px;
	border: 0;
	position: relative;
	font-family: var(--mer-font-head);
	font-size: 26px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--mer-ink);
	text-align: left;
}

.entry-content blockquote::before,
.entry-content .wp-block-pullquote::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	width: 40px;
	height: 40px;
	background: var(--mer-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 18v-5.5C4 8.4 6.2 6 9.5 5.5l.5 1.8C8 8 7 9.3 7 11h3v7zm10 0v-5.5C14 8.4 16.2 6 19.5 5.5l.5 1.8C18 8 17 9.3 17 11h3v7z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 18v-5.5C4 8.4 6.2 6 9.5 5.5l.5 1.8C8 8 7 9.3 7 11h3v7zm10 0v-5.5C14 8.4 16.2 6 19.5 5.5l.5 1.8C18 8 17 9.3 17 11h3v7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.entry-content blockquote p { margin: 0 0 12px; }

.entry-content blockquote cite,
.entry-content .wp-block-quote cite {
	font-family: var(--mer-font-body);
	font-size: 14px;
	font-weight: 400;
	font-style: normal;
	color: var(--mer-slate);
}

.entry-content figure { margin-left: 0; margin-right: 0; }

.entry-content figcaption,
.entry-content .wp-element-caption {
	font-size: 13px;
	color: var(--mer-slate);
	margin-top: 8px;
}

.entry-content img { border-radius: var(--mer-radius); }

.entry-content .alignwide { max-width: 960px; }

.entry-content ul,
.entry-content ol { padding-left: 1.2em; }

.entry-content .key-facts,
.entry-content .wp-block-group.is-style-key-facts {
	padding: 24px;
	background: var(--mer-ink);
	color: var(--mer-on-dark);
	border-radius: var(--mer-radius-lg);
}

.page-links {
	margin: 24px 0;
	font-weight: 600;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px 0 28px;
}

.entry-tags a {
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	background: #f1f5f9;
	border-radius: 8px;
}

.author-box {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	padding: 24px;
	background: var(--mer-bg);
	border-radius: var(--mer-radius-lg);
	align-items: center;
}

.author-box img { border-radius: 50%; }

.author-box__body {
	flex: 1 1 260px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.author-box__name {
	font-family: var(--mer-font-head);
	font-size: 17px;
	font-weight: 800;
}

.author-box p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--mer-slate);
}

.related {
	background: var(--mer-bg);
	border-top: 1px solid var(--mer-line);
}

.related__inner {
	padding-top: 48px;
	padding-bottom: 56px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.single .site-content,
.page .site-content {
	background: var(--mer-surface);
}

/* ==========================================================================
   12. Archives, search, pagination, 404
   ========================================================================== */
.archive-header {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.archive-header__desc {
	color: var(--mer-slate);
	max-width: 720px;
}

.archive-header__desc p { margin: 0; }

.search-form {
	display: flex;
	gap: 8px;
	max-width: 640px;
	width: 100%;
}

.search-form label {
	flex: 1 1 auto;
}

.search-form input[type="search"] {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid #94a3b8;
	border-radius: var(--mer-radius);
	font: 15px var(--mer-font-body);
	background: #fff;
}

.search-panel .search-form { margin: 0 auto; }

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}

.pagination .page-numbers {
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--mer-radius-sm);
	background: var(--mer-surface);
	border: 1px solid var(--mer-line);
	font-weight: 600;
	font-size: 14px;
}

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

.empty-state {
	background: var(--mer-surface);
	border-radius: var(--mer-radius-lg);
	padding: 48px 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 16px;
}

.empty-state__code {
	font-family: var(--mer-font-head);
	font-size: 96px;
	font-weight: 800;
	line-height: 1;
	color: var(--mer-accent);
}

/* ==========================================================================
   13. Comments
   ========================================================================== */
.comments-area {
	margin-top: 40px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children { padding-left: 24px; }

.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--mer-line);
}

.comment-meta {
	display: flex;
	gap: 10px;
	align-items: center;
	font-size: 14px;
}

.comment-meta img { border-radius: 50%; }

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.comment-form label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #94a3b8;
	border-radius: var(--mer-radius);
	font: 15px var(--mer-font-body);
}

.comment-form .submit {
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: var(--mer-radius);
	background: var(--mer-ink);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
.site-footer {
	background: var(--mer-ink);
	color: var(--mer-on-dark-muted);
}

.site-footer a { color: var(--mer-on-dark); }

.site-footer__inner {
	padding-top: 56px;
	padding-bottom: 24px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.footer-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 40px;
}

.footer-col {
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: 14px;
}

.footer-col h2 {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.footer-col p {
	margin: 0;
	line-height: 1.65;
}

.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.site-footer .brand__name { color: #fff; font-size: 32px; }

.footer-social {
	display: flex;
	gap: 8px;
}

.footer-social a {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--mer-ink-2);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
}

.footer-recent {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-recent li {
	display: flex;
	gap: 12px;
	align-items: center;
}

.footer-recent .media {
	width: 64px;
	height: 48px;
	flex: none;
	background: var(--mer-tile);
}

.footer-recent a { font-weight: 600; line-height: 1.35; }

.tag-cloud {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 8px !important;
}

.tag-cloud a {
	display: inline-block;
	font-size: 13px !important;
	background: var(--mer-ink-2);
	padding: 9px 12px;
	border-radius: var(--mer-radius-sm);
}

.site-footer__bottom {
	border-top: 1px solid var(--mer-ink-2);
	padding-top: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: #94a3b8;
}

.site-footer__bottom ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/* ==========================================================================
   15. Responsive
   ========================================================================== */
@media (max-width: 1023px) {
	.tile--xl { height: 440px; }
	.tile--xl .tile__title { font-size: 30px; }
}

@media (max-width: 767px) {
	:root { --mer-gutter: 16px; }

	.topbar { display: none; }

	/* The brand moves into the nav bar; keep the header's h1 for screen readers. */
	.site-header {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.main-nav { position: sticky; }

	.main-nav__inner {
		flex-wrap: wrap;
		gap: 4px;
		padding-top: 8px;
	}

	.main-nav__brand {
		display: flex !important;
		flex: 1 1 auto;
		align-items: center;
		min-height: 44px;
	}

	.main-nav__brand .brand__name {
		font-size: 26px;
		color: #fff;
	}

	.main-nav__brand .custom-logo { max-height: 36px; }

	.nav-btn { background: transparent; }

	.nav-btn--menu { display: inline-flex; }

	/* Section chips row */
	.main-nav__menu {
		order: 10;
		flex: 1 1 100%;
		padding: 4px 0 12px;
	}

	.main-nav__menu ul { gap: 8px; }

	.main-nav__menu a {
		padding: 10px 14px;
		border-radius: 999px;
		background: var(--mer-ink-2);
		font-size: 13px;
	}

	.hero__lead .tile--xl { height: 420px; }
	.tile--xl .tile__body { padding: 20px; gap: 10px; }
	.tile--xl .tile__title { font-size: 27px; line-height: 1.15; }

	/* Secondary hero tiles become a swipeable carousel */
	.hero__side {
		flex-direction: row;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin: 0 calc(var(--mer-gutter) * -1);
		padding: 0 var(--mer-gutter);
	}

	.hero__side > .tile,
	.hero__row > .tile {
		flex: 0 0 240px;
		height: 200px;
		scroll-snap-align: start;
	}

	.hero__side > .hero__row {
		flex: none;
		flex-wrap: nowrap;
	}

	.hero__side .tile__title,
	.hero__row .tile__title { font-size: 16px; }

	.hero__side .tile__body { padding: 14px; }

	.video-band { padding: 16px; border-radius: 14px; }
	.video-band__body > .tile { flex-basis: 100%; }

	.share-rail {
		position: static;
		flex: 1 1 100%;
		flex-direction: row;
		align-items: center;
	}

	.article-layout { gap: 24px; padding-top: 24px; }

	.entry-content { font-size: 18px; }

	.entry-content blockquote { font-size: 22px; padding-left: 50px; }
}

/* Print: clean article only. */
@media print {
	.topbar, .site-header, .main-nav, .breaking, .ad-slot, .anchor-ad,
	.share-rail, .layout__sidebar, .related, .site-footer, .comments-area,
	.byline-bar__actions, .reading-progress { display: none !important; }
	body { background: #fff; }
	.entry-content { font-size: 12pt; }
}
