/* ==========================================================================
   NewsPress — main stylesheet
   1. Tokens & color schemes
   2. Base & typography
   3. Layout
   4. Header (topbar, masthead, nav, search, ticker)
   5. Hero
   6. Post cards & lists
   7. Single post
   8. Sidebar & widgets
   9. Comments
   10. Footer
   11. Components (buttons, badges, share, pagination, progress, back-to-top)
   12. Block editor content styles
   13. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
	--np-accent: #e11d48;
	--np-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--np-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

	--np-bg: #ffffff;
	--np-bg-alt: #f6f7f9;
	--np-bg-elev: #ffffff;
	--np-text: #111318;
	--np-text-muted: #5b6270;
	--np-text-faint: #8a919e;
	--np-border: #e6e8ec;
	--np-border-strong: #d0d4db;
	--np-topbar-bg: #111318;
	--np-topbar-text: #c9ced8;
	--np-shadow: 0 1px 2px rgba(16, 20, 28, 0.06), 0 8px 24px -12px rgba(16, 20, 28, 0.18);
	--np-shadow-lg: 0 24px 48px -24px rgba(16, 20, 28, 0.35);
	--np-radius: 10px;
	--np-radius-sm: 6px;
	--np-container: 1240px;
	--np-gutter: 24px;
	--np-sidebar: 340px;
	--np-header-h: 72px;
}

html[data-scheme="dark"] {
	--np-bg: #0e1015;
	--np-bg-alt: #161920;
	--np-bg-elev: #1a1e27;
	--np-text: #eef0f4;
	--np-text-muted: #a2a9b6;
	--np-text-faint: #6f7684;
	--np-border: #262b36;
	--np-border-strong: #343a47;
	--np-topbar-bg: #07080b;
	--np-topbar-text: #a2a9b6;
	--np-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
	--np-shadow-lg: 0 24px 48px -24px rgba(0, 0, 0, 0.8);
	color-scheme: dark;
}

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

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

body {
	margin: 0;
	font-family: var(--np-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--np-text);
	background: var(--np-bg);
	-webkit-font-smoothing: antialiased;
	transition: background-color 0.2s ease, color 0.2s ease;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--np-accent);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--np-font-heading);
	line-height: 1.2;
	margin: 0 0 0.5em;
	font-weight: 700;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 1.25em;
}

button {
	font: inherit;
	cursor: pointer;
}

button svg,
a svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.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;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 10000;
	background: var(--np-accent);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--np-radius-sm);
}

.skip-link:focus {
	left: 8px;
	color: #fff;
}

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

/* 3. Layout ------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--np-container);
	margin-inline: auto;
	padding-inline: var(--np-gutter);
}

.content-area {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--np-sidebar);
	gap: 48px;
	padding-block: 40px 64px;
}

.no-sidebar .content-area {
	grid-template-columns: minmax(0, 1fr);
}

.no-sidebar .site-main {
	max-width: 860px;
	margin-inline: auto;
	width: 100%;
}

.section-title {
	font-family: var(--np-font-body);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 24px;
}

.section-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--np-border);
}

.section-title span {
	position: relative;
	padding-bottom: 6px;
}

.section-title span::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 3px;
	background: var(--np-accent);
	border-radius: 2px;
}

.page-header {
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--np-border);
}

.page-title {
	font-size: clamp(28px, 4vw, 40px);
	margin: 0;
}

.page-title span {
	color: var(--np-accent);
}

.archive-header {
	display: flex;
	gap: 20px;
	align-items: center;
	border-left: 5px solid var(--cat-color, var(--np-accent));
	padding-left: 20px;
}

.archive-header .avatar {
	border-radius: 50%;
}

.archive-kind {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cat-color, var(--np-accent));
	margin-bottom: 4px;
}

.archive-description {
	color: var(--np-text-muted);
	margin-top: 8px;
}

.archive-description p:last-child {
	margin-bottom: 0;
}

/* 4. Header ------------------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 100;
	background: var(--np-bg);
}

.topbar {
	background: var(--np-topbar-bg);
	color: var(--np-topbar-text);
	font-size: 13px;
}

.topbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 38px;
	gap: 16px;
}

.topbar-left,
.topbar-right {
	display: flex;
	align-items: center;
	gap: 16px;
}

.topbar-date {
	font-weight: 500;
	white-space: nowrap;
}

.topbar-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 16px;
}

.topbar a:hover {
	color: #fff;
}

.social-links {
	display: flex;
	gap: 4px;
}

.social-link {
	display: inline-flex;
	padding: 6px;
	border-radius: 50%;
	opacity: 0.85;
}

.social-link:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.08);
}

.social-link svg {
	width: 16px;
	height: 16px;
}

.scheme-toggle {
	background: rgba(255, 255, 255, 0.08);
	border: 0;
	color: inherit;
	border-radius: 999px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.scheme-toggle:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.scheme-toggle svg {
	width: 16px;
	height: 16px;
}

.scheme-toggle .icon-moon,
html[data-scheme="dark"] .scheme-toggle .icon-sun {
	display: none;
}

html[data-scheme="dark"] .scheme-toggle .icon-moon {
	display: block;
}

.masthead-main {
	border-bottom: 1px solid var(--np-border);
}

.masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 96px;
	gap: 24px;
}

.site-branding {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

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

.site-title {
	font-family: var(--np-font-heading);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}

.site-title:hover {
	color: var(--np-text);
}

.site-title::after {
	content: '.';
	color: var(--np-accent);
}

.site-description {
	margin: 0;
	font-size: 13px;
	color: var(--np-text-muted);
	letter-spacing: 0.02em;
}

.masthead-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-toggle,
.menu-toggle {
	background: transparent;
	border: 1px solid var(--np-border);
	color: var(--np-text);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, border-color 0.15s;
}

.search-toggle:hover,
.menu-toggle:hover {
	background: var(--np-bg-alt);
	border-color: var(--np-border-strong);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
}

.menu-toggle-bar {
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.header-cta {
	margin-left: 4px;
}

/* Primary navigation */
.main-navigation {
	position: sticky;
	top: 0;
	z-index: 90;
	background: var(--np-bg);
	border-bottom: 1px solid var(--np-border);
	transition: box-shadow 0.2s;
}

.is-scrolled .main-navigation {
	box-shadow: var(--np-shadow);
}

.primary-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
	gap: 0;
}

.primary-menu > li {
	position: relative;
}

.primary-menu > li > a {
	display: flex;
	align-items: center;
	height: 52px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	position: relative;
}

.primary-menu > li > a::after {
	content: '';
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 0;
	height: 3px;
	background: var(--np-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s;
}

.primary-menu > li:hover > a::after,
.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current-menu-ancestor > a::after,
.primary-menu > li.current-cat > a::after {
	transform: scaleX(1);
}

.primary-menu > li:first-child > a {
	padding-left: 0;
}

.primary-menu > li:first-child > a::after {
	left: 0;
}

.primary-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--np-bg-elev);
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-sm);
	box-shadow: var(--np-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	z-index: 5;
}

.primary-menu .sub-menu .sub-menu {
	top: -8px;
	left: 100%;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu,
.primary-menu li.submenu-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.primary-menu .sub-menu li {
	position: relative;
}

.primary-menu .sub-menu a {
	display: block;
	padding: 8px 16px;
	font-size: 14px;
}

.primary-menu .sub-menu a:hover {
	background: var(--np-bg-alt);
}

.submenu-toggle {
	display: none;
	background: transparent;
	border: 0;
	color: inherit;
	padding: 8px;
	position: absolute;
	right: 0;
	top: 6px;
}

/* Header search */
.header-search {
	border-bottom: 1px solid var(--np-border);
	background: var(--np-bg-alt);
	padding: 20px 0;
}

.search-form {
	display: flex;
	gap: 0;
	max-width: 640px;
	position: relative;
}

.search-field {
	flex: 1;
	min-width: 0;
	font: inherit;
	padding: 12px 16px;
	border: 1px solid var(--np-border-strong);
	border-right: 0;
	border-radius: var(--np-radius-sm) 0 0 var(--np-radius-sm);
	background: var(--np-bg);
	color: var(--np-text);
}

.search-field:focus {
	outline: none;
	border-color: var(--np-accent);
}

.search-submit {
	background: var(--np-accent);
	color: #fff;
	border: 0;
	padding: 0 18px;
	border-radius: 0 var(--np-radius-sm) var(--np-radius-sm) 0;
	display: inline-flex;
	align-items: center;
}

.search-submit:hover {
	filter: brightness(0.92);
}

/* Ticker */
.ticker {
	background: var(--np-bg-alt);
	border-bottom: 1px solid var(--np-border);
	font-size: 14px;
}

.ticker-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 42px;
}

.ticker-label {
	flex: none;
	background: var(--np-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 4px;
	position: relative;
}

.ticker-label::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	margin-right: 8px;
	animation: np-blink 1.2s infinite;
}

@keyframes np-blink {
	50% { opacity: 0.2; }
}

.ticker-track {
	flex: 1;
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.ticker-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0;
	width: max-content;
	animation: np-ticker 60s linear infinite;
}

.ticker-list.is-paused,
.ticker-track:hover .ticker-list {
	animation-play-state: paused;
}

.ticker-list li {
	padding-right: 40px;
	white-space: nowrap;
	font-weight: 500;
	position: relative;
}

.ticker-list li::after {
	content: '';
	position: absolute;
	right: 17px;
	top: 50%;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--np-text-faint);
	transform: translateY(-50%);
}

@keyframes np-ticker {
	to { transform: translateX(-50%); }
}

.ticker-pause {
	flex: none;
	background: transparent;
	border: 1px solid var(--np-border);
	color: var(--np-text-muted);
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ticker-pause svg {
	width: 12px;
	height: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.ticker-list { animation: none; }
	.ticker-label::before { animation: none; }
	html { scroll-behavior: auto; }
}

/* 5. Hero --------------------------------------------------------------- */
.hero {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: auto auto;
	gap: 20px;
	padding-top: 32px;
}

.hero-card {
	position: relative;
	border-radius: var(--np-radius);
	overflow: hidden;
	background: var(--np-bg-alt);
	isolation: isolate;
}

.hero-lead {
	grid-column: 1 / 3;
	grid-row: 1 / 3;
	min-height: 520px;
}

.hero-small {
	min-height: 250px;
}

.hero-media {
	position: absolute;
	inset: 0;
	display: block;
}

.hero-media img,
.media-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.media-placeholder {
	display: block;
	background: linear-gradient(135deg, var(--np-bg-alt), var(--np-border));
}

.hero-card:hover .hero-media img {
	transform: scale(1.04);
}

.hero-media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.85) 100%);
}

.hero-body {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	padding: 24px;
	color: #fff;
}

.hero-lead .hero-body {
	padding: 40px;
}

.hero-title {
	font-size: 20px;
	margin: 10px 0 0;
	color: #fff;
	text-wrap: balance;
}

.hero-lead .hero-title {
	font-size: clamp(28px, 3.2vw, 42px);
}

.hero-title a:hover {
	color: #fff;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.hero-excerpt {
	color: rgba(255, 255, 255, 0.85);
	margin: 12px 0 0;
	max-width: 60ch;
	font-size: 15px;
}

.hero-body .post-meta {
	color: rgba(255, 255, 255, 0.75);
	margin-top: 12px;
}

.hero-body .post-meta a:hover {
	color: #fff;
}

/* 6. Post cards --------------------------------------------------------- */
.post-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.post-card {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 24px;
	padding: 24px 0;
	border-bottom: 1px solid var(--np-border);
}

.post-card:first-child {
	padding-top: 0;
}

.post-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: var(--np-radius-sm);
	overflow: hidden;
	background: var(--np-bg-alt);
}

.post-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.post-card:hover .post-card-media img {
	transform: scale(1.04);
}

.format-icon {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
}

.format-icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.post-card-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.post-card-title {
	font-size: 24px;
	margin: 10px 0 8px;
	text-wrap: balance;
}

.post-card-excerpt {
	color: var(--np-text-muted);
	font-size: 15px;
	margin: 0 0 12px;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	font-size: 13px;
	color: var(--np-text-faint);
}

.post-meta a {
	color: var(--np-text-muted);
	font-weight: 600;
}

.post-meta .meta-reading::before,
.post-meta .meta-date::before {
	content: '·';
	margin-right: 14px;
}

.post-meta > :first-child::before {
	content: none;
}

/* Mini cards (related) */
.related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.mini-card-media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--np-radius-sm);
	overflow: hidden;
	background: var(--np-bg-alt);
	margin-bottom: 12px;
}

.mini-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}

.mini-card:hover .mini-card-media img {
	transform: scale(1.04);
}

.mini-card-title {
	font-size: 18px;
	margin: 8px 0 6px;
}

/* 7. Single post -------------------------------------------------------- */
.single-post .entry-header,
.single-page .entry-header {
	margin-bottom: 28px;
}

.entry-title {
	font-size: clamp(30px, 4.5vw, 48px);
	margin: 12px 0 12px;
	text-wrap: balance;
	letter-spacing: -0.02em;
}

.entry-subtitle {
	font-size: 19px;
	line-height: 1.5;
	color: var(--np-text-muted);
	margin: 0 0 20px;
}

.entry-byline {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 0;
	border-top: 1px solid var(--np-border);
	border-bottom: 1px solid var(--np-border);
	margin-bottom: 16px;
}

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

.byline-text {
	display: flex;
	flex-direction: column;
	line-height: 1.4;
}

.byline-author {
	font-weight: 700;
	font-size: 15px;
}

.byline-meta {
	font-size: 13px;
	color: var(--np-text-faint);
}

.entry-thumbnail {
	margin: 0 0 32px;
}

.entry-thumbnail img {
	width: 100%;
	border-radius: var(--np-radius);
}

.entry-thumbnail figcaption {
	font-size: 13px;
	color: var(--np-text-faint);
	margin-top: 8px;
}

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

.entry-content > p:first-of-type::first-letter {
	font-family: var(--np-font-heading);
	font-size: 4.2em;
	line-height: 0.8;
	float: left;
	margin: 0.08em 0.12em 0 0;
	color: var(--np-accent);
	font-weight: 800;
}

.entry-content h2 { font-size: 30px; margin-top: 1.6em; }
.entry-content h3 { font-size: 24px; margin-top: 1.4em; }
.entry-content h4 { font-size: 20px; margin-top: 1.2em; }

.entry-content a {
	color: var(--np-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	text-decoration-thickness: 2px;
}

.entry-content blockquote {
	margin: 2em 0;
	padding: 8px 0 8px 28px;
	border-left: 4px solid var(--np-accent);
	font-family: var(--np-font-heading);
	font-size: 1.25em;
	line-height: 1.45;
	color: var(--np-text);
}

.entry-content blockquote cite {
	display: block;
	font-family: var(--np-font-body);
	font-size: 14px;
	font-style: normal;
	color: var(--np-text-faint);
	margin-top: 8px;
}

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

.entry-content figure {
	margin: 2em 0;
}

.entry-content figcaption {
	font-size: 13px;
	color: var(--np-text-faint);
	text-align: center;
	margin-top: 8px;
}

.entry-content pre {
	background: var(--np-bg-alt);
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-sm);
	padding: 16px 20px;
	overflow-x: auto;
	font-size: 14px;
}

.entry-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
	background: var(--np-bg-alt);
	padding: 2px 6px;
	border-radius: 4px;
}

.entry-content pre code {
	background: none;
	padding: 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	margin: 2em 0;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--np-border);
	padding: 10px 12px;
	text-align: left;
}

.entry-content th {
	background: var(--np-bg-alt);
}

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

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--np-border);
	margin: 2.5em 0;
}

.page-links {
	margin: 2em 0;
	font-weight: 600;
}

.page-links a,
.page-links > span:not(:first-child) {
	display: inline-block;
	padding: 4px 12px;
	margin-left: 6px;
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius-sm);
}

.entry-footer {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--np-border);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

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

.entry-tags a {
	font-size: 13px;
	font-weight: 600;
	background: var(--np-bg-alt);
	border: 1px solid var(--np-border);
	padding: 5px 12px;
	border-radius: 999px;
}

.entry-tags a:hover {
	border-color: var(--np-accent);
}

.entry-tags a::before {
	content: '#';
	color: var(--np-text-faint);
	margin-right: 2px;
}

/* Author box */
.author-box {
	display: flex;
	gap: 24px;
	padding: 28px;
	margin: 40px 0;
	background: var(--np-bg-alt);
	border-radius: var(--np-radius);
	border: 1px solid var(--np-border);
}

.author-box .avatar {
	border-radius: 50%;
	flex: none;
}

.author-box-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--np-accent);
}

.author-box-name {
	font-size: 22px;
	margin: 4px 0 8px;
}

.author-box-bio {
	color: var(--np-text-muted);
	font-size: 15px;
	margin-bottom: 8px;
}

.author-box-link {
	font-weight: 600;
	font-size: 14px;
	color: var(--np-accent);
}

.related-posts {
	margin: 40px 0;
}

/* Post navigation */
.post-navigation {
	margin: 40px 0;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.post-navigation a {
	display: block;
	padding: 20px;
	border: 1px solid var(--np-border);
	border-radius: var(--np-radius);
	transition: border-color 0.15s, transform 0.15s;
}

.post-navigation a:hover {
	border-color: var(--np-accent);
	color: inherit;
	transform: translateY(-2px);
}

.post-navigation .nav-next {
	text-align: right;
}

.nav-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--np-text-faint);
	margin-bottom: 4px;
}

.nav-title {
	font-family: var(--np-font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

/* 8. Sidebar & widgets -------------------------------------------------- */
.sidebar-sticky {
	position: sticky;
	top: 72px;
}

.widget {
	margin-bottom: 40px;
	font-size: 15px;
}

.widget-title {
	font-family: var(--np-font-body);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 20px;
}

.widget-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--np-border);
}

.widget-title span {
	position: relative;
	padding-bottom: 6px;
}

.widget-title span::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 3px;
	background: var(--np-accent);
	border-radius: 2px;
}

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

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

.widget ul li:last-child {
	border-bottom: 0;
}

.widget select {
	width: 100%;
	padding: 10px;
	font: inherit;
	border: 1px solid var(--np-border-strong);
	border-radius: var(--np-radius-sm);
	background: var(--np-bg);
	color: var(--np-text);
}

/* Trending widget */
.trending-list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: trending;
}

.trending-item {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--np-border);
	align-items: flex-start;
}

.trending-item:first-child {
	padding-top: 0;
}

.trending-item:last-child {
	border-bottom: 0;
}

.trending-rank {
	font-family: var(--np-font-heading);
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
	color: var(--np-border-strong);
	min-width: 32px;
	flex: none;
	transition: color 0.15s;
}

.trending-item:hover .trending-rank {
	color: var(--np-accent);
}

.trending-thumb {
	flex: none;
	width: 72px;
	aspect-ratio: 1;
	border-radius: var(--np-radius-sm);
	overflow: hidden;
}

.trending-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.trending-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.trending-body .cat-badge {
	align-self: flex-start;
}

.trending-title {
	font-family: var(--np-font-heading);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
}

.trending-meta {
	font-size: 12px;
	color: var(--np-text-faint);
}

/* Recent posts widget */
.recent-list li {
	display: flex;
	gap: 14px;
	padding: 12px 0;
}

.recent-thumb {
	flex: none;
	width: 90px;
	aspect-ratio: 4 / 3;
	border-radius: var(--np-radius-sm);
	overflow: hidden;
	background: var(--np-bg-alt);
}

.recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

.recent-title {
	font-family: var(--np-font-heading);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
}

.recent-meta {
	font-size: 12px;
	color: var(--np-text-faint);
}

/* 9. Comments ----------------------------------------------------------- */
.comments-area {
	margin-top: 48px;
}

.comments-title,
.comment-reply-title {
	font-size: 24px;
	margin-bottom: 24px;
}

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

.comment-list .children {
	margin-left: 48px;
}

.comment-body {
	display: flex;
	gap: 14px;
	padding: 20px 0;
	border-bottom: 1px solid var(--np-border);
}

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

.comment-content {
	flex: 1;
	font-size: 15px;
}

.comment-header {
	display: flex;
	gap: 10px;
	align-items: baseline;
	margin-bottom: 6px;
}

.comment-author {
	font-weight: 700;
}

.comment-time {
	font-size: 12px;
	color: var(--np-text-faint);
}

.comment-content p:last-of-type {
	margin-bottom: 8px;
}

.comment-actions {
	font-size: 13px;
	font-weight: 600;
	display: flex;
	gap: 12px;
}

.comment-actions a {
	color: var(--np-accent);
}

.comment-awaiting {
	font-style: italic;
	color: var(--np-text-faint);
	font-size: 13px;
}

.bypostauthor > .comment-body .comment-author::after {
	content: 'Author';
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: var(--np-accent);
	color: #fff;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 8px;
	vertical-align: middle;
}

.comment-form {
	display: grid;
	gap: 16px;
}

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	font: inherit;
	padding: 12px 14px;
	border: 1px solid var(--np-border-strong);
	border-radius: var(--np-radius-sm);
	background: var(--np-bg);
	color: var(--np-text);
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--np-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--np-accent) 20%, transparent);
}

.comment-form p {
	margin: 0;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	gap: 8px;
	align-items: center;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

/* 10. Footer ------------------------------------------------------------ */
.site-footer {
	background: var(--np-topbar-bg);
	color: var(--np-topbar-text);
	margin-top: auto;
}

.footer-widgets {
	padding: 56px 0 32px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-widgets-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px;
}

.site-footer .widget-title {
	color: #fff;
}

.site-footer .widget-title::after {
	background: rgba(255, 255, 255, 0.1);
}

.site-footer .widget ul li {
	border-color: rgba(255, 255, 255, 0.08);
}

.site-footer .widget a:hover,
.site-footer .trending-title:hover,
.site-footer .recent-title:hover {
	color: #fff;
}

.site-footer .trending-rank {
	color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
	padding: 28px 0;
}

.footer-bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	font-size: 13px;
}

.footer-title {
	font-family: var(--np-font-heading);
	font-size: 24px;
	font-weight: 800;
	color: #fff;
	display: block;
	margin-bottom: 4px;
}

.footer-title::after {
	content: '.';
	color: var(--np-accent);
}

.footer-copy {
	margin: 0;
	opacity: 0.8;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.footer-menu a:hover {
	color: #fff;
}

/* 11. Components -------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	padding: 10px 20px;
	border-radius: 999px;
	border: 1px solid transparent;
	transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
	line-height: 1.2;
}

.btn-primary {
	background: var(--np-accent);
	color: #fff;
}

.btn-primary:hover {
	color: #fff;
	filter: brightness(0.92);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px -10px var(--np-accent);
}

.cat-badge {
	display: inline-block;
	align-self: flex-start;
	width: fit-content;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cat-color, var(--np-accent));
	line-height: 1;
	padding: 0 0 2px;
	border-bottom: 2px solid var(--cat-color, var(--np-accent));
}

.hero-body .cat-badge {
	background: var(--cat-color, var(--np-accent));
	color: #fff;
	padding: 5px 9px;
	border-radius: 4px;
	border: 0;
}

.cat-badge:hover {
	color: var(--cat-color, var(--np-accent));
	opacity: 0.85;
}

/* Share buttons */
.share-buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.share-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--np-text-faint);
	margin-right: 4px;
}

.share-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--np-border);
	background: var(--np-bg);
	color: var(--np-text-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	position: relative;
}

.share-btn svg {
	width: 17px;
	height: 17px;
}

.share-btn:hover {
	color: #fff;
	border-color: transparent;
	transform: translateY(-2px);
}

.share-x:hover { background: #000; }
.share-facebook:hover { background: #1877f2; }
.share-linkedin:hover { background: #0a66c2; }
.share-whatsapp:hover { background: #25d366; }
.share-email:hover { background: var(--np-text-muted); }
.share-copy:hover { background: var(--np-accent); }

.share-copy.is-copied::after {
	content: 'Copied!';
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: var(--np-text);
	color: var(--np-bg);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 4px;
	white-space: nowrap;
}

/* Pagination */
.pagination {
	margin-top: 40px;
}

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

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border: 1px solid var(--np-border);
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
}

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

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

.pagination .dots {
	border: 0;
}

/* Reading progress */
.reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	z-index: 1000;
	background: transparent;
	pointer-events: none;
}

.reading-progress-bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--np-accent);
	transition: width 0.1s linear;
}

/* Back to top */
.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	background: var(--np-text);
	color: var(--np-bg);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--np-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	z-index: 900;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover {
	background: var(--np-accent);
	color: #fff;
}

/* 404 */
.error-404 {
	text-align: center;
	padding: 40px 0;
}

.error-code {
	font-family: var(--np-font-heading);
	font-size: clamp(90px, 18vw, 180px);
	font-weight: 800;
	line-height: 1;
	color: var(--np-accent);
	display: block;
	letter-spacing: -0.05em;
}

.error-404 .search-form {
	margin: 24px auto;
}

.no-results .search-form {
	margin-top: 16px;
}

/* 12. Block editor content --------------------------------------------- */
.alignwide {
	margin-left: calc(-1 * min(80px, 8vw));
	margin-right: calc(-1 * min(80px, 8vw));
	max-width: none;
}

.no-sidebar .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.alignleft {
	float: left;
	margin: 0.5em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.5em 0 1em 1.5em;
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.wp-block-quote.is-style-large,
.wp-block-pullquote {
	border: 0;
	border-top: 3px solid var(--np-accent);
	border-bottom: 3px solid var(--np-accent);
	padding: 24px 0;
	font-family: var(--np-font-heading);
	font-size: 1.4em;
	text-align: center;
}

.wp-block-button__link {
	border-radius: 999px;
	font-weight: 700;
}

.wp-block-image figcaption {
	font-size: 13px;
	color: var(--np-text-faint);
}

.wp-block-embed iframe {
	max-width: 100%;
}

.wp-block-separator {
	border-color: var(--np-border);
}

/* 13. Responsive -------------------------------------------------------- */
@media (max-width: 1080px) {
	:root {
		--np-sidebar: 300px;
	}

	.hero-lead {
		min-height: 440px;
	}
}

@media (max-width: 960px) {
	.content-area {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.sidebar-sticky {
		position: static;
	}

	.widget-area {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0 40px;
	}

	.hero {
		grid-template-columns: 1fr 1fr;
	}

	.hero-lead {
		grid-column: 1 / -1;
		grid-row: auto;
		min-height: 400px;
	}

	.footer-widgets-grid {
		grid-template-columns: 1fr 1fr;
	}

	.related-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	:root {
		--np-gutter: 18px;
	}

	.topbar-menu,
	.topbar .social-links {
		display: none;
	}

	.masthead-inner {
		min-height: 72px;
	}

	.site-title {
		font-size: 28px;
	}

	.site-description {
		display: none;
	}

	.header-cta {
		display: none;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.main-navigation {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(320px, 85vw);
		border: 0;
		border-left: 1px solid var(--np-border);
		box-shadow: var(--np-shadow-lg);
		transform: translateX(100%);
		transition: transform 0.25s ease;
		overflow-y: auto;
		padding: 80px 0 24px;
		z-index: 1000;
	}

	.main-navigation.is-open {
		transform: translateX(0);
	}

	.main-navigation .container {
		padding-inline: 0;
	}

	body.menu-open::before {
		content: '';
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
	}

	.menu-open .menu-toggle {
		position: fixed;
		top: 16px;
		right: 18px;
		z-index: 1001;
		background: var(--np-bg);
	}

	.primary-menu {
		flex-direction: column;
	}

	.primary-menu > li > a,
	.primary-menu > li:first-child > a {
		height: auto;
		padding: 14px 24px;
		font-size: 16px;
		border-bottom: 1px solid var(--np-border);
	}

	.primary-menu > li > a::after {
		display: none;
	}

	.submenu-toggle {
		display: inline-flex;
		right: 12px;
	}

	.primary-menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		border-radius: 0;
		background: var(--np-bg-alt);
		display: none;
		padding: 0;
	}

	.primary-menu li.submenu-open > .sub-menu {
		display: block;
	}

	.primary-menu .sub-menu a {
		padding: 12px 24px 12px 40px;
		border-bottom: 1px solid var(--np-border);
	}

	.ticker-pause {
		display: none;
	}

	.hero {
		grid-template-columns: 1fr;
		gap: 14px;
		padding-top: 20px;
	}

	.hero-lead {
		min-height: 360px;
	}

	.hero-lead .hero-body {
		padding: 24px;
	}

	.hero-small {
		min-height: 200px;
	}

	.hero-excerpt {
		display: none;
	}

	.post-card {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.post-card-title {
		font-size: 21px;
	}

	.widget-area {
		grid-template-columns: 1fr;
	}

	.related-grid {
		grid-template-columns: 1fr;
	}

	.author-box {
		flex-direction: column;
		padding: 20px;
	}

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

	.post-navigation .nav-next {
		text-align: left;
	}

	.comment-list .children {
		margin-left: 20px;
	}

	.footer-widgets-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.footer-bottom-inner {
		flex-direction: column;
		align-items: flex-start;
	}

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

	.alignwide {
		margin-left: 0;
		margin-right: 0;
	}

	.back-to-top {
		right: 16px;
		bottom: 16px;
	}
}

@media print {
	.topbar, .main-navigation, .ticker, .header-search, .share-buttons,
	.reading-progress, .back-to-top, .widget-area, .site-footer,
	.post-navigation, .related-posts, .comments-area {
		display: none !important;
	}

	.content-area {
		grid-template-columns: 1fr;
	}
}
