/*
 * NewsDIO theme — components and dark mode.
 *
 * This is the only stylesheet the theme enqueues; everything else comes from
 * theme.json (global styles) and the plugin's own small block stylesheet.
 *
 * Colour model: every colour is a CSS custom property defined here. theme.json
 * presets point at these properties (e.g. `var(--nd-color-base)`), so Global
 * Styles, the editor and the runtime dark mode all agree on one source.
 *
 * Three colour states are supported:
 *   1. Light   — :root defaults, or html[data-theme="light"]
 *   2. Dark    — html[data-theme="dark"]
 *   3. System  — no data-theme attribute + prefers-color-scheme
 *
 * Contents
 *   01 Tokens
 *   02 Base and accessibility
 *   03 Layout helpers
 *   04 Header
 *   05 Footer
 *   06 Editorial primitives (kickers, meta, cards)
 *   07 Block styles registered by the theme
 *   08 NewsDIO plugin blocks
 *   09 Theme blocks
 *   10 Comments, pagination, forms
 *   11 Utilities and motion
 */

/* ------------------------------------------------------------------ *
 * 01 Tokens
 * ------------------------------------------------------------------ */

:root {
	--nd-color-base: #ffffff;
	--nd-color-surface: #f5f3ef;
	--nd-color-surface-alt: #ece7de;
	--nd-color-contrast: #10151c;
	--nd-color-muted: #5a6472;
	--nd-color-border: #e0dad0;
	--nd-color-accent: #c8102e;
	--nd-color-accent-contrast: #ffffff;
	--nd-color-signal: #0f4c81;

	--nd-shadow-soft: 0 1px 2px rgba(16, 21, 28, 0.06), 0 10px 28px rgba(16, 21, 28, 0.06);
	--nd-shadow-header: 0 1px 0 var(--nd-color-border), 0 6px 20px rgba(16, 21, 28, 0.05);
	--nd-overlay: rgba(16, 21, 28, 0.55);
	--nd-rule: 1px solid var(--nd-color-border);
	--nd-rule-strong: 2px solid var(--nd-color-contrast);
	--nd-radius: 3px;
	--nd-focus: var(--nd-color-signal);
	--nd-header-height: 4.25rem;

	color-scheme: light;
}

:root[data-theme="dark"] {
	--nd-color-base: #0b0f16;
	--nd-color-surface: #131a25;
	--nd-color-surface-alt: #1b2431;
	--nd-color-contrast: #eef1f6;
	--nd-color-muted: #a3b0c2;
	--nd-color-border: #253141;
	--nd-color-accent: #ff5d6c;
	--nd-color-accent-contrast: #0b0f16;
	--nd-color-signal: #7cb8ff;

	--nd-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.45);
	--nd-shadow-header: 0 1px 0 var(--nd-color-border), 0 6px 20px rgba(0, 0, 0, 0.4);
	--nd-overlay: rgba(4, 7, 12, 0.72);

	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--nd-color-base: #0b0f16;
		--nd-color-surface: #131a25;
		--nd-color-surface-alt: #1b2431;
		--nd-color-contrast: #eef1f6;
		--nd-color-muted: #a3b0c2;
		--nd-color-border: #253141;
		--nd-color-accent: #ff5d6c;
		--nd-color-accent-contrast: #0b0f16;
		--nd-color-signal: #7cb8ff;

		--nd-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.45);
		--nd-shadow-header: 0 1px 0 var(--nd-color-border), 0 6px 20px rgba(0, 0, 0, 0.4);
		--nd-overlay: rgba(4, 7, 12, 0.72);

		color-scheme: dark;
	}
}

/* ------------------------------------------------------------------ *
 * 02 Base and accessibility
 * ------------------------------------------------------------------ */

html {
	scroll-behavior: smooth;
	/* Anchor targets clear the sticky header. */
	scroll-padding-top: calc(var(--nd-header-height) + 1rem);
}

body {
	background-color: var(--nd-color-base);
	color: var(--nd-color-contrast);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	/*
	 * `clip`, not `hidden`: both contain a stray wide element, but `hidden`
	 * turns the body into a scroll container and silently breaks
	 * `position: sticky` on the header.
	 */
	overflow-x: clip;
}

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

img {
	height: auto;
}

:where(a, button, input, select, textarea, summary, details, [tabindex]):focus-visible {
	outline: 2px solid var(--nd-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

.skip-link,
.nd-skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: var(--nd-color-contrast);
	color: var(--nd-color-base);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.nd-skip-link:focus {
	inset-inline-start: 0.5rem;
	top: 0.5rem;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	padding: 0.75rem 1.25rem;
	background: var(--nd-color-contrast);
	color: var(--nd-color-base);
	z-index: 1000;
}

/* ------------------------------------------------------------------ *
 * 03 Layout helpers
 * ------------------------------------------------------------------ */

.nd-section {
	padding-block: var(--wp--preset--spacing--60);
}

.nd-section + .nd-section {
	padding-block-start: 0;
}

/* Tag archives show the raw term slug-cased name; present it as a proper noun. */
.nd-tag .wp-block-query-title {
	text-transform: capitalize;
}

/* Category section head: kicker heading, rule, and the "all of it" link. */
.nd-category-section__head {
	align-items: baseline;
	gap: 1rem;
	flex-wrap: nowrap;
	margin-block-end: var(--wp--preset--spacing--40);
}

.nd-category-section__head .nd-section-title {
	flex: 1 1 auto;
	margin-block-end: 0;
}

.nd-category-section__head .nd-section-more {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}

.nd-section-title a,
.nd-section-more a {
	color: inherit;
	text-decoration: none;
}

.nd-section-title a:hover,
.nd-section-more a:hover {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

.nd-section-more {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
}

/* Homepage masthead sits close to the lead story. */
.nd-masthead {
	padding-block-end: var(--wp--preset--spacing--30) !important;
}

/* The site title and tagline carry `has-text-align-center`, but that class
   only exists once the core block stylesheet loads, and with per-block styles
   it may not on the front page. Centre them here so the masthead is never
   left-aligned under a centred rule. */
.nd-masthead__title,
.nd-masthead__tagline {
	text-align: center;
}

.nd-hero.nd-section {
	padding-block-start: var(--wp--preset--spacing--30);
}

/* Archive intros: full-width heading, readable description. */
.nd-archive__head .wp-block-term-description,
.nd-archive__head > p,
.nd-archive__head .nd-lead {
	max-width: 62ch;
}

/* Section heading with a rule running to the edge. */
.nd-section-title,
h2.nd-section-title {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-block-end: var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nd-color-contrast);
}

.nd-section-title::after {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	background: var(--nd-color-contrast);
	opacity: 0.9;
}

.nd-section-title--accent::after {
	background: var(--nd-color-accent);
}

/* Main + aside. Stacks below 1024px so the sidebar follows the content. */
.nd-layout-sidebar {
	gap: var(--wp--preset--spacing--60);
}

.nd-layout-sidebar > .wp-block-column {
	min-width: 0;
}

@media (max-width: 1023px) {
	.nd-layout-sidebar {
		flex-wrap: wrap !important;
	}

	.nd-layout-sidebar > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/*
 * A two-column *content* split (a category section's lead story beside its
 * headline list). It deliberately does not share a class with the page
 * shell above: the "no sidebar" rules hide the shell's second column, and
 * a section that borrowed that class lost half its content and stretched
 * its lead image across the full page.
 */
.nd-layout-split {
	gap: var(--wp--preset--spacing--50);
}

.nd-layout-split > .wp-block-column {
	min-width: 0;
}

@media (max-width: 781px) {
	.nd-layout-split {
		flex-wrap: wrap !important;
	}

	.nd-layout-split > .wp-block-column {
		flex-basis: 100% !important;
	}
}

.nd-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 1024px) {
	.nd-sidebar--sticky {
		position: sticky;
		top: calc(var(--nd-header-height) + 1.5rem);
	}
}

.nd-sidebar > * {
	margin-block: 0;
}

/* Widget shell used by the sidebar and footer rails. */
.nd-widget > .wp-block-categories,
.nd-widget > .wp-block-query {
	margin-top: 0;
}

.nd-widget .wp-block-categories {
	list-style: none;
	padding-inline-start: 0;
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.9375rem;
}

.nd-widget .wp-block-categories li {
	padding-block: 0.45rem;
	border-bottom: var(--nd-rule);
}

.nd-widget .wp-block-categories a {
	text-decoration: none;
	font-weight: 600;
}

.nd-follow {
	font-family: var(--wp--preset--font-family--sans);
}

.nd-follow p {
	color: var(--nd-color-muted);
}

/* ------------------------------------------------------------------ *
 * 04 Header
 * ------------------------------------------------------------------ */

/*
 * The sticky element is the template-part wrapper, not the header group: a
 * sticky box can only travel inside its own parent, and the header group's
 * parent is only as tall as the header itself.
 */
.nd-header-slot {
	position: sticky;
	top: 0;
	z-index: 60;
}

.nd-header {
	background: var(--nd-color-base);
	box-shadow: var(--nd-shadow-header);
}

.nd-header__bar {
	min-height: var(--nd-header-height);
}

.nd-header .wp-block-site-title {
	margin: 0;
}

.nd-header .wp-block-navigation {
	--wp--style--block-gap: 1.5rem;
}

.nd-header .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	border-bottom: 2px solid transparent;
}

.nd-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.nd-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--nd-color-accent);
	color: var(--nd-color-contrast);
}

.nd-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--nd-color-base);
	color: var(--nd-color-contrast);
	padding-top: 4rem;
}

.nd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	border-bottom: none;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.5rem;
}

.nd-header__tools {
	gap: 0.35rem !important;
}

.nd-header .wp-block-search__button {
	background: transparent;
	border: none;
	color: var(--nd-color-contrast);
	padding: 0.4rem;
}

.nd-header .wp-block-search__input {
	background: var(--nd-color-surface);
	border: var(--nd-rule);
	color: var(--nd-color-contrast);
	border-radius: 2px;
	padding: 0.5rem 0.75rem;
}

.nd-header .wp-block-search__button:hover {
	color: var(--nd-color-accent);
}

/* Utility bar above the masthead: date, latest, social, colour scheme. */
.nd-header__top {
	gap: 0.75rem 1rem;
	padding-block: 0.45rem;
	border-bottom: var(--nd-rule);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--nd-color-muted);
	min-height: 2.4rem;
}

.nd-header__top p {
	margin: 0;
}

.nd-today {
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
}

.nd-header__latest a {
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--nd-color-accent);
}

.nd-header__latest a:hover,
.nd-header__latest a:focus-visible {
	text-decoration: underline;
}

.nd-header__top-right {
	gap: 0.75rem;
}

@media (max-width: 600px) {
	.nd-header__latest {
		display: none;
	}

	.nd-header__top {
		padding-block: 0.3rem;
	}
}

/* Publisher social links. */
.nd-social__list {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nd-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.85rem;
	height: 1.85rem;
	border-radius: 50%;
	color: var(--nd-color-muted);
	text-decoration: none;
}

.nd-social__link svg {
	width: 1rem;
	height: 1rem;
	display: block;
}

.nd-social__link:hover,
.nd-social__link:focus-visible {
	background: var(--nd-color-surface);
	color: var(--nd-color-accent);
}

.nd-social--large .nd-social__link {
	width: 2.25rem;
	height: 2.25rem;
	border: var(--nd-rule);
}

.nd-social--large .nd-social__link svg {
	width: 1.15rem;
	height: 1.15rem;
}

/* Masthead row. */
.nd-header__bar {
	gap: 1.25rem;
	min-height: var(--nd-header-height);
	padding-block: 0.7rem;
}

.nd-header__brand {
	flex: 0 1 auto;
	min-width: 0;
}

.nd-header__tools {
	flex: 0 0 auto;
}

/* Zero-height probe inserted by theme.js to detect the pinned state. */
.nd-header-sentinel {
	height: 0;
	margin: 0;
	padding: 0;
}

/* A firmer shadow once the header is pinned over content. */
.nd-header[data-nd-stuck="true"] {
	box-shadow: 0 1px 0 var(--nd-color-border), 0 10px 28px rgba(16, 21, 28, 0.10);
}

:root[data-theme="dark"] .nd-header[data-nd-stuck="true"] {
	box-shadow: 0 1px 0 var(--nd-color-border), 0 10px 28px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .nd-header[data-nd-stuck="true"] {
		box-shadow: 0 1px 0 var(--nd-color-border), 0 10px 28px rgba(0, 0, 0, 0.55);
	}
}

/* The nav must be able to shrink so the tools never push past the viewport. */
.nd-header .nd-menu-primary {
	min-width: 0;
	flex: 0 1 auto;
}

.nd-header .nd-menu-primary > .wp-block-navigation__container {
	flex-wrap: wrap;
	justify-content: center;
}

@media (max-width: 1200px) {
	.nd-header .wp-block-navigation {
		--wp--style--block-gap: 1rem;
	}
}

/* Primary navigation submenus. */
.nd-header .wp-block-navigation__submenu-icon {
	margin-inline-start: 0.25em;
}

.nd-header .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
}

.nd-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background-color: var(--nd-color-base);
	border: var(--nd-rule);
	border-radius: var(--nd-radius);
	box-shadow: var(--nd-shadow-soft);
	min-width: 13rem;
	padding: 0.35rem 0;
	inset-inline-start: -0.9rem;
}

.nd-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 0.95rem;
	border-bottom: none;
	width: 100%;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--nd-color-contrast);
}

.nd-header .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.nd-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background: var(--nd-color-surface);
	color: var(--nd-color-accent);
}

/* Keep the last dropdown inside the viewport instead of spilling past it. */
.nd-header .wp-block-navigation__container > .wp-block-navigation-item:last-child > .wp-block-navigation__submenu-container {
	inset-inline-start: auto;
	inset-inline-end: -0.9rem;
}

/* The open dropdown keeps its parent underlined. */
.nd-header .wp-block-navigation-submenu:hover > .wp-block-navigation-item__content,
.nd-header .wp-block-navigation-submenu:focus-within > .wp-block-navigation-item__content {
	border-bottom-color: var(--nd-color-accent);
}

/* Mobile overlay: submenus become an indented block, never a dropdown. */
.nd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	inset-inline-start: 0;
	min-width: 0;
}

.nd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1rem;
	font-weight: 500;
	padding-block: 0.35rem;
	padding-inline: 0;
	color: inherit;
	opacity: 1;
	justify-content: center;
}

.nd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	margin-block-start: 0.35rem;
	padding-block-end: 0.75rem;
	align-items: center;
	text-align: center;
}

.nd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	justify-content: center;
	width: 100%;
}

.nd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	color: var(--nd-color-contrast);
}

/* Footer menu slots. */
.nd-footer__nav .wp-block-navigation__container,
.nd-footer .nd-footer__nav {
	gap: 0.5rem;
	align-items: flex-start;
}

.nd-footer__nav .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-footer__nav .wp-block-navigation-item__content:hover,
.nd-footer__nav .wp-block-navigation-item__content:focus-visible {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

/* Slim date / tagline strip above the masthead. */
.nd-header__meta {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
}

/* ------------------------------------------------------------------ *
 * 05 Footer
 * ------------------------------------------------------------------ */

.nd-footer {
	background: var(--nd-color-surface);
	border-top: var(--nd-rule);
	margin-top: var(--wp--preset--spacing--70);
}

.nd-footer h2,
.nd-footer .nd-footer__heading {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
	margin-block-end: 0.9rem;
}

.nd-footer .wp-block-navigation,
.nd-footer .wp-block-page-list,
.nd-footer .nd-trust-links__list {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.nd-footer__bottom {
	border-top: var(--nd-rule);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--nd-color-muted);
}

.nd-footer__bottom a {
	color: var(--nd-color-muted);
}

/* ------------------------------------------------------------------ *
 * 06 Editorial primitives
 * ------------------------------------------------------------------ */

/* Category kicker. */
.nd-kicker,
.nd-kicker.wp-block-post-terms {
	display: block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nd-color-accent);
	margin-block-end: 0.5rem;
}

.nd-kicker a {
	color: inherit;
	text-decoration: none;
}

.nd-kicker a:hover {
	text-decoration: underline;
}

/* Byline row. */
.nd-byline {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--nd-color-muted);
	letter-spacing: 0.02em;
}

.nd-byline .wp-block-post-author-name a,
.nd-byline a {
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-byline .wp-block-post-author-name a:hover {
	text-decoration: underline;
}

.nd-byline__sep {
	color: var(--nd-color-border);
}

/* Pull quotes sit on the reading edge, and follow text direction. */
.wp-block-quote {
	border-inline-start: 3px solid var(--nd-color-accent);
	padding-inline-start: var(--wp--preset--spacing--40);
	margin-inline: 0;
}

.wp-block-quote cite {
	display: block;
	margin-top: 0.6rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
}

/* Article body rhythm. */
.nd-article__body > * + * {
	margin-block-start: 1.4em;
}

.nd-article__body h2,
.nd-article__body h3 {
	margin-block-start: 2em;
}

.nd-article__body figure {
	margin-block: 2em;
}

.nd-lead {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.3125rem;
	line-height: 1.5;
	color: var(--nd-color-muted);
}

/* Featured images keep a reserved box so nothing shifts. */
.wp-block-post-featured-image img {
	display: block;
	width: 100%;
	object-fit: cover;
	background-color: var(--nd-color-surface);
	border-radius: var(--nd-radius);
}

/* ------------------------------------------------------------------ *
 * 07 Block styles registered by the theme
 * ------------------------------------------------------------------ */

/* core/post-template — card grid. */
.wp-block-post-template.is-style-nd-cards {
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.wp-block-post-template.is-style-nd-cards > li {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.wp-block-post-template.is-style-nd-cards .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
	margin: 0;
}

/* core/post-template — headline list with thumbnail. */
.wp-block-post-template.is-style-nd-list {
	gap: 0;
}

.wp-block-post-template.is-style-nd-list > li {
	display: grid;
	grid-template-columns: 148px 1fr;
	gap: 1.15rem;
	align-items: start;
	padding-block: 1.35rem;
	border-bottom: var(--nd-rule);
}

.wp-block-post-template.is-style-nd-list > li:first-child {
	padding-block-start: 0;
}

.wp-block-post-template.is-style-nd-list .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.28;
	margin: 0;
}

.wp-block-post-template.is-style-nd-list .wp-block-post-featured-image {
	margin: 0;
}

@media (max-width: 600px) {
	.wp-block-post-template.is-style-nd-list > li {
		grid-template-columns: 104px 1fr;
		gap: 0.9rem;
	}
}

/* core/post-template — compact text-only rail. */
.wp-block-post-template.is-style-nd-compact {
	gap: 0;
}

.wp-block-post-template.is-style-nd-compact > li {
	padding-block: 0.7rem;
	border-bottom: var(--nd-rule);
}

.wp-block-post-template.is-style-nd-compact > li:last-child {
	border-bottom: none;
}

.wp-block-post-template.is-style-nd-compact .wp-block-post-title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
}

/* core/group — card and surface. */
.wp-block-group.is-style-nd-card {
	background: var(--nd-color-base);
	border: var(--nd-rule);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--40);
	box-shadow: var(--nd-shadow-soft);
}

.wp-block-group.is-style-nd-surface {
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--50);
}

/* core/post-title — display headline. */
.wp-block-post-title.is-style-nd-headline {
	font-size: var(--wp--preset--font-size--display);
	line-height: 1.05;
	letter-spacing: -0.028em;
	text-wrap: balance;
}

/* core/separator — thick editorial rule. */
.wp-block-separator.is-style-nd-thick:not(.is-style-dots) {
	border: none;
	height: 3px;
	width: 100%;
	max-width: none;
	background-color: var(--nd-color-contrast);
	opacity: 1;
	margin-block: var(--wp--preset--spacing--40);
}

/* The masthead rule is a deliberate short centred flourish. */
.nd-masthead .wp-block-separator.is-style-nd-thick:not(.is-style-dots) {
	width: 120px;
	margin-inline: auto;
}

/* core/button — pill. */
.wp-block-button.is-style-nd-pill .wp-block-button__link {
	border-radius: 999px;
	padding-inline: 1.75em;
}

/* ------------------------------------------------------------------ *
 * 08 NewsDIO plugin blocks
 * ------------------------------------------------------------------ */

/* Breaking ticker. */
.nd-breaking-ticker {
	position: relative;
	border: none;
	border-radius: 0;
	background: var(--nd-color-accent);
	color: var(--nd-color-accent-contrast);
	padding: 0.6rem var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.nd-breaking-ticker__label {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	background: var(--nd-color-accent-contrast);
	color: var(--nd-color-accent);
	padding: 0.2em 0.6em;
	border-radius: 2px;
	letter-spacing: 0.12em;
}

.nd-breaking-ticker__label::before {
	content: "";
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: currentColor;
	animation: nd-pulse 1.8s ease-in-out infinite;
}

@keyframes nd-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

.nd-breaking-ticker__link {
	color: inherit;
	text-decoration: none;
	font-weight: 600;
}

.nd-breaking-ticker__link:hover {
	text-decoration: underline;
}

.nd-breaking-ticker[data-nd-paused="true"] .nd-breaking-ticker__track {
	animation-play-state: paused;
}

.nd-ticker-pause {
	flex: 0 0 auto;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 2px;
	color: inherit;
	cursor: pointer;
	line-height: 1;
	padding: 0.3em 0.45em;
	display: inline-flex;
}

/* Trending / most-read rails. */
.nd-trending,
.nd-most-read {
	font-family: var(--wp--preset--font-family--sans);
}

.nd-widget__title,
.nd-trending__title,
.nd-most-read__title,
.nd-related-stories__title,
.nd-key-takeaways__title,
.nd-sources__title,
.nd-faq__title,
.nd-story-cluster__title,
.nd-author-box__title,
.nd-newsletter-form__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 0.9rem;
	padding-top: 0.85rem;
	border-top: var(--nd-rule-strong);
}

.nd-trending__list,
.nd-most-read__list {
	counter-reset: nd-rank;
	list-style: none;
	padding-inline-start: 0;
	margin: 0;
}

.nd-trending__item,
.nd-most-read__item {
	counter-increment: nd-rank;
	display: grid;
	grid-template-columns: 1.9rem 1fr;
	gap: 0.75rem;
	align-items: start;
	padding-block: 0.7rem;
	border-bottom: var(--nd-rule);
	margin: 0;
}

.nd-trending__item:last-child,
.nd-most-read__item:last-child {
	border-bottom: none;
}

.nd-trending__item::before,
.nd-most-read__item::before {
	content: counter(nd-rank);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
	color: var(--nd-color-accent);
}

.nd-trending__link,
.nd-most-read__link {
	color: var(--nd-color-contrast);
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
}

.nd-trending__link:hover,
.nd-most-read__link:hover {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

/* Related stories. */
.nd-related-stories__grid {
	gap: var(--wp--preset--spacing--40);
}

.nd-related-stories__card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.nd-related-stories__image {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--nd-radius);
	background: var(--nd-color-surface);
}

.nd-related-stories__link {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-related-stories__link:hover {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

/* Story cluster timeline. */
.nd-story-cluster {
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--40);
}

.nd-story-cluster__title {
	border-top: none;
	padding-top: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.01em;
	text-transform: none;
}

.nd-story-cluster__description {
	color: var(--nd-color-muted);
	font-size: var(--wp--preset--font-size--small);
	margin-top: -0.4rem;
}

.nd-story-cluster__list {
	border-inline-start: 2px solid var(--nd-color-border);
	margin-block: 1rem 0;
}

.nd-story-cluster__item {
	position: relative;
	padding-inline-start: 1.25rem;
	padding-block: 0.45rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.9375rem;
}

.nd-story-cluster__item::before {
	content: "";
	position: absolute;
	inset-inline-start: -5px;
	top: 1.05rem;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nd-color-border);
}

.nd-story-cluster__item--primary::before,
.nd-story-cluster__item--latest::before {
	background: var(--nd-color-accent);
}

.nd-story-cluster__time {
	display: block;
	color: var(--nd-color-muted);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.nd-story-cluster__link {
	color: var(--nd-color-contrast);
	text-decoration: none;
	font-weight: 600;
}

.nd-story-cluster__link:hover {
	text-decoration: underline;
}

/* Article meta. */
.nd-article-meta {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.nd-article-meta__subtitle {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.3125rem;
	line-height: 1.45;
	color: var(--nd-color-muted);
	margin: 0;
	opacity: 1;
}

.nd-article-meta__summary {
	background: var(--nd-color-surface);
	border-inline-start: 3px solid var(--nd-color-accent);
	padding: 1rem 1.25rem;
	border-start-end-radius: var(--nd-radius);
	border-end-end-radius: var(--nd-radius);
}

.nd-article-meta__summary-title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	margin: 0 0 0.4rem;
	color: var(--nd-color-accent);
}

.nd-article-meta__summary p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
}

.nd-article-meta__updated {
	font-size: var(--wp--preset--font-size--small);
	color: var(--nd-color-muted);
	margin: 0;
}

.nd-article-meta__reading-time {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--nd-color-muted);
	margin: 0;
	opacity: 1;
}

/* Key takeaways. */
.nd-key-takeaways {
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--40);
}

.nd-key-takeaways__title {
	border-top: none;
	padding-top: 0;
	color: var(--nd-color-accent);
}

.nd-key-takeaways__list {
	margin: 0;
	padding-inline-start: 1.15rem;
}

.nd-key-takeaways__item {
	margin-block: 0.5rem;
	line-height: 1.55;
}

.nd-key-takeaways__item::marker {
	color: var(--nd-color-accent);
}

/* Sources. */
.nd-sources__list {
	margin: 0;
	padding-inline-start: 1.25rem;
	font-size: var(--wp--preset--font-size--small);
}

.nd-sources__item {
	margin-block: 0.4rem;
}

.nd-sources__link {
	color: var(--nd-color-signal);
}

.nd-source-attribution {
	margin-top: 0.75rem;
	color: var(--nd-color-muted);
	opacity: 1;
}

/* FAQ. */
.nd-faq__item {
	border-bottom: var(--nd-rule);
	padding: 0.85rem 0;
}

.nd-faq__question {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1rem;
	font-weight: 600;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.nd-faq__question::-webkit-details-marker {
	display: none;
}

.nd-faq__question::after {
	content: "+";
	font-size: 1.35rem;
	line-height: 1;
	color: var(--nd-color-accent);
	flex: 0 0 auto;
}

.nd-faq__item[open] .nd-faq__question::after {
	content: "\2212";
}

.nd-faq__answer {
	color: var(--nd-color-muted);
	font-size: var(--wp--preset--font-size--small);
}

.nd-faq__answer p:last-child {
	margin-bottom: 0;
}

/* Breadcrumbs. */
.nd-breadcrumbs {
	font-family: var(--wp--preset--font-family--sans);
	color: var(--nd-color-muted);
}

.nd-breadcrumbs__list {
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nd-breadcrumbs__link {
	color: var(--nd-color-muted);
	text-decoration: none;
}

.nd-breadcrumbs__link:hover {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

.nd-breadcrumbs__current {
	color: var(--nd-color-contrast);
}

/* Ads — spacing and a labelled, reserved box; never overlays content. */
.nd-ad-slot {
	position: static !important;
	margin-block: var(--wp--preset--spacing--50);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	clear: both;
}

.nd-ad-slot::before {
	content: attr(data-nd-label);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
}

/* CTA / newsletter. */
.nd-cta,
.nd-newsletter-form {
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--50);
	font-family: var(--wp--preset--font-family--sans);
}

.nd-cta__title,
.nd-newsletter-form__heading {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--x-large);
	margin: 0 0 0.5rem;
	letter-spacing: -0.015em;
}

.nd-newsletter-form__field,
.nd-newsletter-form input[type="email"],
.nd-newsletter-form input[type="text"] {
	background: var(--nd-color-base);
	border: var(--nd-rule);
	border-radius: 2px;
	color: var(--nd-color-contrast);
	padding: 0.65rem 0.8rem;
	font: inherit;
	width: 100%;
	max-width: 22rem;
}

.nd-newsletter-form button,
.nd-cta__button {
	background: var(--nd-color-accent);
	color: var(--nd-color-accent-contrast);
	border: none;
	border-radius: 2px;
	padding: 0.7rem 1.4rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.nd-newsletter-form button:hover,
.nd-cta__button:hover {
	background: var(--nd-color-contrast);
	color: var(--nd-color-base);
}

/* Author box. */
.nd-author-box {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	align-items: flex-start;
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.nd-author-box__avatar img,
.nd-author-box img.avatar {
	border-radius: 50%;
	width: 72px;
	height: 72px;
	object-fit: cover;
}

.nd-author-box__name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	margin: 0 0 0.15rem;
}

.nd-author-box__role {
	color: var(--nd-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: var(--wp--preset--font-size--x-small);
	margin: 0 0 0.6rem;
}

.nd-author-box__expertise {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0;
}

.nd-author-box__expertise li {
	border: var(--nd-rule);
	border-radius: 999px;
	padding: 0.2rem 0.7rem;
	font-size: var(--wp--preset--font-size--x-small);
}

/* ------------------------------------------------------------------ *
 * 09 Theme blocks
 * ------------------------------------------------------------------ */

/* Badges. */
.nd-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.2em 0.55em;
	border-radius: 2px;
	line-height: 1.5;
}

.nd-badge--breaking {
	background: var(--nd-color-accent);
	color: var(--nd-color-accent-contrast);
}

.nd-badge--updated {
	background: transparent;
	color: var(--nd-color-signal);
	border: 1px solid currentColor;
}

.nd-badge__dot {
	width: 0.45em;
	height: 0.45em;
	border-radius: 50%;
	background: currentColor;
}

/* Reading time. */
.nd-reading-time {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--nd-color-muted);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Dark-mode toggle. */
.nd-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	background: transparent;
	border: var(--nd-rule);
	border-radius: 999px;
	color: var(--nd-color-contrast);
	cursor: pointer;
}

.nd-theme-toggle:hover {
	border-color: var(--nd-color-contrast);
	color: var(--nd-color-accent);
}

.nd-theme-toggle svg {
	width: 1.05rem;
	height: 1.05rem;
	display: block;
}

.nd-theme-toggle__moon { display: none; }
:root[data-theme="dark"] .nd-theme-toggle__sun { display: none; }
:root[data-theme="dark"] .nd-theme-toggle__moon { display: block; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .nd-theme-toggle__sun { display: none; }
	:root:not([data-theme="light"]) .nd-theme-toggle__moon { display: block; }
}

/* Term pills. */
.nd-terms {
	font-family: var(--wp--preset--font-family--sans);
}

.nd-terms__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nd-terms__link {
	display: inline-block;
	border: var(--nd-rule);
	border-radius: 999px;
	padding: 0.3rem 0.85rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-terms__link:hover {
	background: var(--nd-color-contrast);
	border-color: var(--nd-color-contrast);
	color: var(--nd-color-base);
}

/* Trust links. */
.nd-trust-links__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.nd-trust-links__link {
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-trust-links__link:hover {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

/* More from this topic. */
.nd-more-from__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--wp--preset--spacing--40);
	list-style: none;
	margin: 0;
	padding: 0;
}

.nd-more-from__card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.nd-more-from__image {
	aspect-ratio: 16 / 9;
	width: 100%;
	object-fit: cover;
	border-radius: var(--nd-radius);
	background: var(--nd-color-surface);
}

.nd-more-from__kicker {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nd-color-accent);
}

.nd-more-from__link {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-more-from__link:hover {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

.nd-more-from__date {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--nd-color-muted);
}

/* Term FAQ shares the plugin FAQ presentation. */
.nd-term-faq__item {
	border-bottom: var(--nd-rule);
	padding: 0.85rem 0;
}

.nd-term-faq__question {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	cursor: pointer;
}

.nd-term-faq__answer {
	color: var(--nd-color-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* ------------------------------------------------------------------ *
 * 10 Comments, pagination, forms, search
 * ------------------------------------------------------------------ */

.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	gap: 0.75rem;
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	border-top: var(--nd-rule);
}

.wp-block-query-pagination a {
	text-decoration: none;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-block;
	min-width: 2.1rem;
	text-align: center;
	padding: 0.35rem 0.5rem;
	border: var(--nd-rule);
	border-radius: 2px;
	margin-inline-end: 0.35rem;
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background: var(--nd-color-contrast);
	border-color: var(--nd-color-contrast);
	color: var(--nd-color-base);
}

.wp-block-post-navigation-link {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-post-navigation-link a {
	text-decoration: none;
	font-weight: 600;
}

.wp-block-comments {
	font-family: var(--wp--preset--font-family--sans);
}

.wp-block-comment-author-name {
	font-weight: 600;
}

.wp-block-comment-date {
	color: var(--nd-color-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.wp-block-comment-template li {
	border-bottom: var(--nd-rule);
	padding-block: 1.25rem;
}

.comment-form input:not([type="submit"]),
.comment-form textarea,
.wp-block-search__input,
.nd-search-filters select,
.nd-search-filters input[type="search"] {
	background: var(--nd-color-base);
	border: var(--nd-rule);
	border-radius: 2px;
	color: var(--nd-color-contrast);
	font: inherit;
	padding: 0.6rem 0.75rem;
	max-width: 100%;
}

.nd-search-filters {
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.nd-search-filters__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}

.nd-search-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	flex: 1 1 10rem;
	min-width: 0;
}

.nd-search-filters__label {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nd-color-muted);
}

.nd-search-filters__submit {
	background: var(--nd-color-accent);
	color: var(--nd-color-accent-contrast);
	border: none;
	border-radius: 2px;
	font: inherit;
	font-weight: 600;
	padding: 0.68rem 1.4rem;
	cursor: pointer;
}

.nd-search-filters__submit:hover {
	background: var(--nd-color-contrast);
	color: var(--nd-color-base);
}

/* ------------------------------------------------------------------ *
 * 11 Utilities and motion
 * ------------------------------------------------------------------ */

.nd-back-to-top {
	position: fixed;
	inset-inline-end: 1rem;
	bottom: 1rem;
	z-index: 50;
	width: 2.75rem;
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: var(--nd-rule);
	border-radius: 50%;
	background: var(--nd-color-base);
	color: var(--nd-color-contrast);
	box-shadow: var(--nd-shadow-soft);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.5rem);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nd-back-to-top[data-visible="true"] {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.nd-back-to-top svg {
	width: 1.1rem;
	height: 1.1rem;
}

.nd-empty {
	background: var(--nd-color-surface);
	border-radius: var(--nd-radius);
	padding: var(--wp--preset--spacing--50);
	color: var(--nd-color-muted);
}

.nd-hairline {
	border: none;
	border-top: var(--nd-rule);
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------------ *
 * 12 Intelligence hubs (entity, topic, event, market, tool pages)
 *
 * The plugin ships the structural styles for its blocks; this layer is the
 * theme's editorial treatment of the pages those blocks sit on.
 * ------------------------------------------------------------------ */

.nd-hub__title {
	margin-bottom: 0.25em;
}

.nd-hub__dek {
	max-width: 60ch;
	color: var(--nd-color-muted);
	font-size: 1.125rem;
	line-height: 1.55;
}

.nd-hub__head {
	padding-bottom: var(--wp--preset--spacing--30, 1rem);
	border-bottom: var(--nd-rule-strong);
}

.nd-hub__body > * + * {
	margin-top: var(--wp--preset--spacing--40, 1.5rem);
}

.nd-hub .nd-entity-profile__facts dt,
.nd-hub .nd-event-timeline__facts dt {
	color: var(--nd-color-muted);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.nd-hub .nd-entity-list__item,
.nd-hub .nd-topic-list__item,
.nd-hub .nd-topic-hub__entity-item {
	border-color: var(--nd-color-border);
	background: var(--nd-color-surface);
}

.nd-topic-archive {
	margin-top: var(--wp--preset--spacing--50, 2.5rem);
}

.nd-topic-archive .nd-section-title {
	margin-bottom: var(--wp--preset--spacing--30, 1rem);
}

/* Article-page intelligence: the developing-story box, claims, corrections. */
.nd-article__header .nd-event-box {
	margin: var(--wp--preset--spacing--40, 1.5rem) 0 0;
	background: var(--nd-color-surface);
	border-left-color: var(--nd-color-accent, currentColor);
}

.nd-single .nd-claims,
.nd-single .nd-corrections,
.nd-single .nd-event-timeline,
.nd-single .nd-source-list {
	margin-top: var(--wp--preset--spacing--50, 2.5rem);
}

.nd-single .nd-corrections {
	background: var(--nd-color-surface);
	border-color: var(--nd-color-border);
}

/* Homepage modules. */
.nd-home .nd-homepage__module + .nd-homepage__module {
	margin-top: var(--wp--preset--spacing--60, 3rem);
}

.nd-home .nd-homepage__title {
	border-bottom-color: var(--nd-color-contrast);
	font-family: var(--wp--preset--font-family--sans, system-ui, sans-serif);
}

.nd-home .nd-homepage__lead-title {
	font-family: var(--wp--preset--font-family--serif, Georgia, serif);
	letter-spacing: -0.02em;
}

.nd-home .nd-homepage__developing-item{
	border-bottom-color: var(--nd-color-border);
}

.nd-home .nd-homepage__meta,
.nd-home .nd-homepage__lead-dek {
	color: var(--nd-color-muted);
}

@media (max-width: 781px) {
	.nd-hub__dek {
		font-size: 1rem;
	}

	.nd-home .nd-homepage__latest {
		grid-template-columns: 1fr;
	}
}

/*
 * A band whose block rendered nothing must not leave a padded box behind:
 * this is what produced the long blank stretches down the front page when
 * a module had no data. The template still emits the wrapper (WordPress
 * writes it from the template markup, before the block returns ''), so it
 * is hidden here whenever it has no element children. `:empty` alone is
 * not enough — the wrapper always holds a newline.
 */
.nd-section:not(:has(*)),
.nd-breaking:not(:has(*)),
.nd-home-sidebar:not(:has(*)),
.nd-trust:not(:has(*)) {
	display: none;
}

.nd-section:empty,
.nd-breaking:empty{
	display: none;
}

/* ------------------------------------------------------------------ *
 * 13 Layout options (NewsDIO → Homepage & Layout → Page layouts)
 *
 * The plugin adds `nd-has-sidebar` / `nd-no-sidebar` (and optionally
 * `nd-content-wide` / `nd-content-narrow`) to <body>. Templates keep their
 * two-column markup; this collapses it when a sidebar is switched off, so
 * the choice needs no template edit and reverses cleanly.
 * ------------------------------------------------------------------ */

.nd-home-sidebar {
	display: none;
}

body.nd-home.nd-has-sidebar .nd-home-sidebar {
	display: block;
	margin-top: var(--wp--preset--spacing--60, 3rem);
	padding-top: var(--wp--preset--spacing--40, 1.5rem);
	border-top: var(--nd-rule);
}

/* On wide screens an enabled homepage sidebar sits beside the modules. */
@media (min-width: 1024px) {
	body.nd-home.nd-has-sidebar .nd-main {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(280px, 22rem);
		gap: var(--wp--preset--spacing--50, 2.5rem);
		align-items: start;
	}

	body.nd-home.nd-has-sidebar .nd-main > *:not(.nd-home-sidebar) {
		grid-column: 1;
	}

	body.nd-home.nd-has-sidebar .nd-home-sidebar {
		grid-column: 2;
		grid-row: 2 / span 20;
		margin-top: 0;
		padding-top: 0;
		border-top: none;
	}
}

/* Any template whose sidebar is switched off: hide it and let the content
   column take the full measure. */
body.nd-no-sidebar .nd-layout-sidebar > .wp-block-column:last-child,
body.nd-no-sidebar .nd-sidebar {
	display: none;
}

body.nd-no-sidebar .nd-layout-sidebar > .wp-block-column:first-child {
	flex-basis: 100% !important;
	max-width: 100%;
}

body.nd-no-sidebar .nd-layout-sidebar {
	display: block;
}

/* Content width when there is no sidebar to fill the space. */
body.nd-no-sidebar.nd-content-narrow .nd-layout-sidebar > .wp-block-column:first-child,
body.nd-no-sidebar.nd-content-narrow .nd-home-modules > .wp-block-group__inner-container,
body.nd-no-sidebar.nd-content-narrow .nd-home-modules {
	max-width: 48rem;
	margin-inline: auto;
}

body.nd-no-sidebar.nd-content-wide .nd-layout-sidebar > .wp-block-column:first-child,
body.nd-no-sidebar.nd-content-wide .nd-home-modules {
	max-width: none;
}

/* Homepage module variants (set in NewsDIO → Homepage & Layout). */
.nd-homepage__lead--stacked {
	grid-template-columns: 1fr;
}

.nd-homepage__lead--text .nd-homepage__lead-thumb {
	display: none;
}

.nd-homepage__latest--list {
	display: block;
}

.nd-homepage__latest--list .nd-homepage__latest-item {
	flex-direction: row;
	gap: 1em;
	align-items: baseline;
	padding: 0.75em 0;
	border-bottom: 1px solid var(--nd-color-border);
}

.nd-homepage__latest--list .nd-homepage__latest-item:last-child {
	border-bottom: 0;
}

.nd-homepage__latest--list .nd-homepage__latest-thumb {
	display: none;
}

/* The homepage runs edge-to-edge by default, so its modules get a little
   more room than the article measure. */
body.nd-home .nd-homepage__latest {
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* =====================================================================
 * Homepage news rows (row1–row6)
 *
 * The plugin ships a neutral baseline for these; what follows is the
 * editorial treatment — rules instead of boxes, tabular meta, and a
 * spotlight lead that reads as the anchor of its band.
 * ================================================================== */

.nd-homepage__row {
	gap: var(--wp--preset--spacing--40);
}

.nd-homepage__row-link {
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--nd-color-contrast);
	text-decoration: none;
	text-wrap: balance;
}

.nd-homepage__row-link:hover,
.nd-homepage__row-link:focus-visible {
	color: var(--nd-color-accent);
	text-decoration: underline;
	text-underline-offset: 0.16em;
}

.nd-homepage__row--list .nd-homepage__row-item,
.nd-homepage__row--compact .nd-homepage__row-item {
	border-bottom: 1px solid var(--nd-color-border);
}

.nd-homepage__row-thumb img,
.nd-homepage__row-image {
	border-radius: var(--nd-radius);
}

.nd-homepage__row-item--lead {
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: 2px solid var(--nd-color-contrast);
}

.nd-homepage__row-dek {
	color: var(--nd-color-muted);
	max-width: 60ch;
}

.nd-homepage__row .nd-homepage__meta {
	color: var(--nd-color-muted);
	font-variant-numeric: tabular-nums;
}

/* =====================================================================
 * Reviews — the verdict box and the star rating on listings
 * ================================================================== */

.nd-review-box {
	background: var(--nd-color-surface-alt);
	border: 1px solid var(--nd-color-border);
	border-radius: var(--nd-radius);
	box-shadow: var(--nd-shadow-soft);
}

.nd-review-box__label {
	color: var(--nd-color-accent);
}

.nd-review-box__subject {
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--nd-color-contrast);
	text-wrap: balance;
}

.nd-stars {
	color: var(--nd-color-accent);
}

.nd-review-box__scale,
.nd-review-box__spoilers,
.nd-review-box__fact dt {
	color: var(--nd-color-muted);
}

.nd-review-box__verdict-title,
.nd-review-box__column-title {
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--nd-color-muted);
}

.nd-review-box__column--pros li::marker {
	color: var(--nd-color-signal, var(--nd-color-accent));
}

.nd-review-box__facts {
	padding-top: 1em;
	border-top: 1px solid var(--nd-color-border);
}

.nd-homepage__review-link {
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--nd-color-contrast);
	text-decoration: none;
}

.nd-homepage__review-link:hover,
.nd-homepage__review-link:focus-visible {
	color: var(--nd-color-accent);
	text-decoration: underline;
}

.nd-homepage__review-value {
	color: var(--nd-color-muted);
	font-variant-numeric: tabular-nums;
}
