/*
Theme Name: Nghe Duoc
Template: broadsheet
Description: Site child theme: brand palette and site-specific templates on top of the Broadsheet parent theme.
Version: 0.14.0
Requires at least: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ngheduoc
*/

/*
 * Article layout (templates/single.html, FB-17). The grid holds four parts in reading order: the head
 * (title, meta line with share icons, featured image; no category label or standfirst since FB-31 and
 * FB-34), the right rail (table of contents), the body (text, then sources, disclaimer, expert box,
 * then share buttons and the CTA, FB-32), the left rail (topics, then audiences). The
 * breadcrumb sits above the grid; related articles follow it.
 *
 *   below 1200px  one column in that order. The table of contents is collapsed above the body by
 *                 the block's own script, with its floating pill and drawer; the topics and audiences
 *                 boxes come after the body and before related articles.
 *   from 1200px   three columns: topics with the audiences under them on the left (owner,
 *                 2026-10-21), the head and then the 760px reading column in the centre, the table
 *                 of contents alone on the right. Both
 *                 rails start level with the title and stay in view while reading; a long list
 *                 scrolls inside its own box. The left rail keeps to the left edge, under the
 *                 breadcrumb's start; the right rail keeps to the right edge.
 */

.ngheduoc-article__rail--end > .ngheduoc-article__toc {
	margin-block-end: var(--wp--preset--spacing--40, 1.5rem);
	max-width: 100%;
}

/*
 * The head (title, meta line, featured image) is the first part of the grid, so
 * from 1200px both rails start level with the title instead of below the image (owner, 2026-10-21).
 * The breadcrumb sits above the grid in its own wide row, so from 1200px it starts at the left rail's
 * left edge. Below 1200px there are no rails: the breadcrumb and every part of the article keep the
 * reading width.
 */
@media (max-width: 1199px) {
	/* Three classes outrank core's `.is-layout-constrained > .alignwide` width. */
	.wp-block-group.ngheduoc-article-crumbs.alignwide,
	.ngheduoc-article > * {
		margin-inline: auto;
		max-width: var(--wp--style--global--content-size, 760px);
	}
}

.ngheduoc-article__head > * + * {
	margin-block-start: var(--wp--preset--spacing--30, 1rem);
}

.ngheduoc-article__head {
	margin-block-end: var(--wp--preset--spacing--50, 2rem);
}

/*
 * Where sticky boxes stop below the sticky header (the article rails, category layout B's column): the
 * header's height, plus the admin bar when someone is signed in (the header itself sits under it), plus
 * a gap. Fixed 6rem until 2026-10-24, when the 156px header covered the top of both rails.
 */
:root {
	--ngheduoc-sticky-top: calc(var(--broadsheet-header-h) + 1rem);
}

.admin-bar {
	--ngheduoc-sticky-top: calc(var(--broadsheet-header-h) + var(--wp-admin--admin-bar--height, 32px) + 1rem);
}

@media (min-width: 1200px) {
	.ngheduoc-article {
		align-items: start;
		column-gap: 2rem;
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
	}

	/* Grid gaps replace the flow layout's sibling margins (two classes outrank core's selector). */
	.ngheduoc-article > .ngheduoc-article__head,
	.ngheduoc-article > .ngheduoc-article__body,
	.ngheduoc-article > .ngheduoc-article__rail,
	.ngheduoc-article > .ngheduoc-article__rail > * {
		margin-block: 0;
	}

	.ngheduoc-article > .ngheduoc-article__head {
		grid-column: 2;
		grid-row: 1;
		padding-block-end: var(--wp--preset--spacing--50, 2rem);
	}

	.ngheduoc-article > .ngheduoc-article__body {
		grid-column: 2;
		grid-row: 2;
	}

	/* Each rail spans the head and the body, and is one sticky box no taller than the viewport. */
	.ngheduoc-article > .ngheduoc-article__rail {
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		gap: var(--wp--preset--spacing--30, 1rem);
		grid-row: 1 / span 2;
		max-height: calc(100vh - var(--ngheduoc-sticky-top) - 1rem);
		max-width: 16rem;
		overflow-y: auto;
		position: sticky;
		top: var(--ngheduoc-sticky-top);
		width: 100%;
	}

	.ngheduoc-article > .ngheduoc-article__rail--start {
		grid-column: 1;
		justify-self: start;
	}

	.ngheduoc-article > .ngheduoc-article__rail--end {
		grid-column: 3;
		justify-self: end;
	}

	/* A long table of contents scrolls inside its own box, no taller than the rail. */
	.ngheduoc-article__rail--end > .ngheduoc-article__toc {
		flex: 0 1 auto;
		margin-block-end: 0;
		min-height: 0;
		overflow-y: auto;
	}

	.ngheduoc-article__rail > .ngheduoc-terms-box {
		flex: none;
	}

	/* Wide and full-width blocks in the text stay inside the reading column, clear of the rails. */
	.ngheduoc-article__body .wp-block-post-content > :is(.alignwide, .alignfull) {
		margin-left: auto;
		margin-right: auto;
		max-width: 100%;
	}
}

/*
 * Article head (FB-17, after the reference layouts): the standfirst set apart in a tinted box; the
 * featured image as wide as the reading column (the template gives it no wide alignment), its
 * caption, like those of images in the text, small and italic under the image.
 */
.ngheduoc-standfirst {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--card, 10px);
	box-sizing: border-box;
	padding: 1rem 1.25rem;
}

.ngheduoc-standfirst .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.ngheduoc-featured-image figcaption,
.ngheduoc-article__body .wp-block-image figcaption {
	font-size: var(--wp--preset--font-size--x-small);
	font-style: italic;
	margin-top: 0.5rem;
	text-align: center;
}

/*
 * Data tables (NFR-2, NFR-3, DEC-10). Dosage, legal comparison and other multi-column tables keep a
 * 32rem minimum width and scroll sideways inside their figure instead of crushing their columns.
 * Scroll shadows: the two "local" cover gradients travel with the content and hide the "scroll"
 * shadows at either end, so a shadow shows only on a side where more of the table is hidden.
 */
.wp-block-table {
	background:
		linear-gradient(to right, var(--wp--preset--color--base, #fff) 30%, transparent) 0 0 / 40px 100% no-repeat local,
		linear-gradient(to left, var(--wp--preset--color--base, #fff) 30%, transparent) 100% 0 / 40px 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--wp--preset--color--contrast, #16313d) 16%, transparent), transparent) 0 0 / 16px 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--wp--preset--color--contrast, #16313d) 16%, transparent), transparent) 100% 0 / 16px 100% no-repeat scroll;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--card, 10px);
	box-sizing: border-box;
	margin-block: var(--wp--preset--spacing--40);
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	scrollbar-color: var(--wp--preset--color--border) var(--wp--preset--color--surface);
	scrollbar-width: thin;
}

.wp-block-table table {
	border-collapse: collapse;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	margin: 0;
	min-width: 32rem;
	width: 100%;
}

.wp-block-table thead th {
	background: var(--wp--preset--color--surface);
	border-bottom: 2px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.75rem 1rem;
	text-align: left;
}

.wp-block-table td,
.wp-block-table th {
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--contrast);
	padding: 0.625rem 1rem;
	vertical-align: top;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--wp--preset--color--surface);
}

.wp-block-table figcaption {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	margin-top: 0.5rem;
	padding: 0 0.5rem;
	text-align: left;
}

.ngheduoc-meta-line {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/*
 * Topics as chips on the legal document page; 44px tall on touch screens (NFR-3). Articles show
 * their topics in the ngheduoc/article-terms box instead (FB-17).
 */
.ngheduoc-topics a {
	align-items: center;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	display: inline-flex;
	margin: 0 0.25rem 0.5rem 0;
	min-height: 2rem;
	padding: 0 0.75rem;
	text-decoration: none;
}

@media (pointer: coarse) {
	.ngheduoc-topics a {
		min-height: 44px;
	}
}

.ngheduoc-topics .wp-block-post-terms__separator {
	display: none;
}

/*
 * Article end-matter (templates/single.html): the action zone (the community CTA) right after the text
 * (client feedback of 2026-10-31), then credibility (sources, disclaimer, expert box) and the share
 * buttons, then, after the topics and audiences boxes, discovery (related). Previous / next links and
 * trust links left the article in FB-17.
 */
.ngheduoc-credibility-zone {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
}

.ngheduoc-discovery-zone {
	border-top: 1px solid var(--wp--preset--color--border);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--60);
}

/*
 * Action zone right after the article text: the community CTA, above the expert box (client feedback
 * of 2026-10-31; before, after the expert box with the share buttons, FB-32).
 */
.ngheduoc-action-zone {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

/*
 * Share buttons (plugin block ngheduoc/share). In the meta line under the title: round icon buttons
 * pushed to the end of the line. At the end of the article: a label, then pill buttons with their text.
 * 44px targets on touch screens (NFR-3).
 */
.ngheduoc-share {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

.ngheduoc-share__label {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	margin: 0;
}

.ngheduoc-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-share__button {
	align-items: center;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	gap: 0.5rem;
	min-height: 40px;
	padding: 0 1rem 0 0.75rem;
	text-decoration: none;
}

.ngheduoc-share__button:hover,
.ngheduoc-share__button:focus-visible {
	background: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--primary);
}

.ngheduoc-share__button.is-done {
	border-color: var(--wp--preset--color--positive);
	color: var(--wp--preset--color--positive);
}

.ngheduoc-share__icon {
	fill: currentcolor;
	flex: none;
}

.ngheduoc-share--icons {
	margin-inline-start: auto;
}

.ngheduoc-share--icons .ngheduoc-share__button {
	height: 36px;
	justify-content: center;
	min-height: 0;
	padding: 0;
	width: 36px;
}

/* Icon-only buttons keep their text for screen readers. */
.ngheduoc-share--icons .ngheduoc-share__text {
	clip: rect(0, 0, 0, 0);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

@media (pointer: coarse) {
	.ngheduoc-share__button,
	.ngheduoc-share--icons .ngheduoc-share__button {
		min-height: 44px;
	}

	.ngheduoc-share--icons .ngheduoc-share__button {
		height: 44px;
		width: 44px;
	}
}

/*
 * The article's community CTA (FB-32: livelier and more prominent): a band in the accent colour with a
 * light ring pattern, the group icon in a white disc, the heading in white and a white button. The
 * accent passes contrast with white text (DEC-10). Other locations keep the plugin's quiet box.
 * One row from 560px (client feedback of 2026-10-31): icon | heading and text | button on the right,
 * vertically centred; narrower, the parts stack.
 */
.ngheduoc-cta--article {
	background:
		radial-gradient(circle at 100% 0, color-mix(in srgb, var(--wp--preset--color--on-accent) 16%, transparent) 0 6rem, transparent 6rem),
		radial-gradient(circle at 100% 0, color-mix(in srgb, var(--wp--preset--color--on-accent) 8%, transparent) 0 10rem, transparent 10rem),
		var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--custom--radius--card, 10px);
	box-shadow: 0 10px 28px color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent);
	color: var(--wp--preset--color--on-accent);
	align-items: center;
	display: grid;
	gap: 0.25rem 1.25rem;
	grid-template-columns: auto minmax(0, 1fr) auto;
	padding: 1.75rem;
}

.ngheduoc-cta--article > :is(.ngheduoc-cta__heading, .ngheduoc-cta__text) {
	grid-column: 2;
	margin: 0;
}

.ngheduoc-cta--article .ngheduoc-cta__action {
	grid-column: 3;
	grid-row: 1 / span 2;
	margin: 0;
}

.ngheduoc-cta--article .ngheduoc-cta__icon {
	align-items: center;
	background: var(--wp--preset--color--on-accent);
	border-radius: 50%;
	color: var(--wp--preset--color--accent);
	display: flex;
	grid-row: 1 / span 2;
	height: 3.5rem;
	justify-content: center;
	width: 3.5rem;
}

.ngheduoc-cta--article .ngheduoc-cta__icon svg {
	fill: currentcolor;
}

.ngheduoc-cta--article .ngheduoc-cta__heading,
.ngheduoc-cta--article .ngheduoc-cta__text {
	color: var(--wp--preset--color--on-accent);
}

.ngheduoc-cta--article .ngheduoc-cta__heading {
	font-size: var(--wp--preset--font-size--x-large, 1.625rem);
	line-height: 1.25;
}

.ngheduoc-cta--article .ngheduoc-cta__button {
	background: var(--wp--preset--color--on-accent);
	border-radius: 999px;
	color: var(--wp--preset--color--accent);
	font-weight: 700;
	padding-inline: 1.5rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ngheduoc-cta--article .ngheduoc-cta__button::after {
	content: "→";
	margin-inline-start: 0.5rem;
}

.ngheduoc-cta--article .ngheduoc-cta__button:hover,
.ngheduoc-cta--article .ngheduoc-cta__button:focus-visible {
	box-shadow: 0 6px 16px color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.ngheduoc-cta--article .ngheduoc-cta__button {
		transition: none;
	}
}

@media (max-width: 559px) {
	.ngheduoc-cta--article {
		align-items: start;
		grid-template-columns: 1fr;
		padding: 1.5rem 1.25rem;
	}

	.ngheduoc-cta--article > :is(.ngheduoc-cta__heading, .ngheduoc-cta__text),
	.ngheduoc-cta--article .ngheduoc-cta__action {
		grid-column: auto;
		grid-row: auto;
	}

	.ngheduoc-cta--article .ngheduoc-cta__action {
		margin-top: 0.75rem;
	}

	.ngheduoc-cta--article .ngheduoc-cta__icon {
		grid-row: auto;
		height: 3rem;
		width: 3rem;
	}
}

/*
 * Site footer (patterns/footer.php): the brand block, then the link columns, whatever their number
 * (the pattern has four; the production copy, edited in the Site Editor, has three).
 *   phones          brand across the row, link columns two by two; an odd last column takes the row
 *   600-999px       brand across the row, link columns side by side, as many as there are
 *   from 1000px     brand column wider, then one equal column per link column, no empty column
 * The grid is forced with a three-class selector: an editor who switches the footer group to a flex
 * layout in the Site Editor (the production copy is flex, no wrap) must not squeeze the columns into
 * one row on a phone (owner, 2026-10-22).
 */
.ngheduoc-footer .ngheduoc-footer__grid.ngheduoc-footer__grid {
	align-items: start;
	display: grid;
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ngheduoc-footer__grid > .ngheduoc-footer__brand {
	grid-column: 1 / -1;
}

@media (max-width: 599px) {
	/* Brand is child 1, so an even-numbered last child is a column left alone on its row. */
	.ngheduoc-footer__grid > .ngheduoc-footer__column:last-child:nth-child(even) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 600px) and (max-width: 999px) {
	.ngheduoc-footer .ngheduoc-footer__grid.ngheduoc-footer__grid {
		display: flex;
		flex-wrap: wrap;
	}

	.ngheduoc-footer__grid > .ngheduoc-footer__brand {
		flex: 0 0 100%;
	}

	.ngheduoc-footer__grid > .ngheduoc-footer__column {
		flex: 1 1 0;
		min-width: 0;
	}
}

@media (min-width: 1000px) {
	/* The brand takes the first, wider column; every link column gets one equal column after it. */
	.ngheduoc-footer .ngheduoc-footer__grid.ngheduoc-footer__grid {
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		grid-template-columns: minmax(0, 1.6fr);
	}

	.ngheduoc-footer__grid > .ngheduoc-footer__brand {
		grid-column: auto;
	}
}

.ngheduoc-footer__grid > * {
	margin-block-start: 0;
}

.ngheduoc-footer__heading {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
	margin: 0 0 0.5rem;
	text-transform: uppercase;
}

.ngheduoc-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-footer__links a {
	align-items: center;
	color: var(--wp--preset--color--contrast);
	display: inline-flex;
	font-size: var(--wp--preset--font-size--small);
	min-height: 2.25rem;
	text-decoration: none;
}

.ngheduoc-footer__links a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

@media (pointer: coarse) {
	.ngheduoc-footer__links a {
		min-height: 44px;
	}
}

/*
 * Community group links in the Connect column (client feedback FB-37, 2026-10-24): each link gets a
 * round icon before its text, so a reader sees at once that it opens a group. The icon follows the
 * link's address, not its wording, so it also works on the production footer, whose markup was saved
 * in the Site Editor: a link to the social network's domain shows its mark, any other group link a
 * generic group icon. The icon is a CSS mask, so it takes the text colour; the text stays.
 */
.ngheduoc-footer__links a[data-ngheduoc-cta] {
	gap: 0.625rem;
	line-height: 1.35;
	padding-block: 0.25rem;
}

.ngheduoc-footer__links a[data-ngheduoc-cta]::before {
	background-color: var(--wp--preset--color--primary);
	content: "";
	flex: none;
	height: 1.5rem;
	-webkit-mask: url("assets/images/icons/group.svg") center / contain no-repeat;
	mask: url("assets/images/icons/group.svg") center / contain no-repeat;
	width: 1.5rem;
}

.ngheduoc-footer__links a[data-ngheduoc-cta]:is([href*="facebook.com/"], [href*="fb.com/"], [href*="fb.me/"])::before {
	-webkit-mask-image: url("assets/images/icons/social-f.svg");
	mask-image: url("assets/images/icons/social-f.svg");
}

.ngheduoc-footer__note {
	color: var(--wp--preset--color--muted);
	max-width: 22rem;
}

.ngheduoc-footer__bottom {
	border-top: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
}

.ngheduoc-footer__bottom p {
	margin: 0;
}

/*
 * Equal-height cards in a terms grid: each card fills its row and the description takes the spare
 * height. Generic presentation; a candidate to move up into the parent theme.
 */
.wp-block-terms-query .wp-block-term-template {
	align-items: stretch;
}

.wp-block-terms-query .wp-block-term {
	display: flex;
}

.wp-block-terms-query .is-style-broadsheet-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
}

.wp-block-terms-query .is-style-broadsheet-card .wp-block-term-description {
	flex-grow: 1;
}

/*
 * Title colour and weight: titles rest in contrast ink and turn primary on hover or focus, at weight
 * 600 so the Vietnamese diacritics of Be Vietnam Pro stay legible. Post titles get this from
 * theme.json (core/post-title); term names have no theme.json entry, so they get it here.
 */
.wp-block-term-name {
	font-weight: 600;
}

.wp-block-term-name a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: color 0.15s ease-in-out;
}

.wp-block-term-name a:hover,
.wp-block-term-name a:focus {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

/*
 * List of experts (templates/archive-expert.html): a round photo, the name and the credentials on
 * equal-height cards. An expert without a photo gets the parent's no-image tile, shaped here as an
 * empty circle of the same size so the names stay on one line.
 */
.ngheduoc-expert-grid .wp-block-post {
	display: flex;
}

.ngheduoc-expert-card {
	box-sizing: border-box;
	width: 100%;
}

.ngheduoc-expert-card .wp-block-post-title {
	margin: 0;
}

.ngheduoc-expert-card .broadsheet-noimage {
	aspect-ratio: 1;
	border-radius: 50%;
	width: 96px;
}

.ngheduoc-expert-card .broadsheet-noimage__type {
	display: none;
}

.ngheduoc-expert-card .ngheduoc-expert-profile {
	font-size: var(--wp--preset--font-size--small);
}

/* Kicker section headings in contrast ink, weight 600. */
.is-style-broadsheet-kicker {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

/*
 * Header brand: the logo mark (functions.php fallback or the editor's logo) beside the site title,
 * both centred on one axis.
 */
.broadsheet-header__brand {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.broadsheet-header__brand .wp-block-site-logo {
	display: flex;
	align-items: center;
	margin: 0;
	line-height: 1;
}

.broadsheet-header__brand .wp-block-site-logo a {
	display: flex;
	align-items: center;
	line-height: 1;
}

.broadsheet-header__brand .wp-block-site-logo img {
	width: auto;
	height: 35px;
	max-width: 50px;
	object-fit: contain;
	display: block;
	transform: translateY(1px); /* Optical adjustment: aligns the mark's N-D stems with the title's x-height. */
}

.broadsheet-header__brand .wp-block-site-title {
	display: flex;
	align-items: center;
	margin: 0;
	line-height: 1.1;
}

.broadsheet-header__brand .wp-block-site-title a {
	display: inline-block;
	color: var(--wp--preset--color--primary);
	line-height: 1.1;
}

/*
 * Header: menu on its own full-width row (FB-16). From 1100px the brand and search stay on the first
 * row; the inline nav moves below on a single centred row. The row no longer scrolls sideways
 * (child theme 0.11.0): a scrolling box clips the dropdowns, which hang below it. Five
 * production-length labels with their dropdown arrows take about 910px of the 1068px row at 1100px,
 * so the row fits on one line without scrolling or smaller labels.
 */
@media (min-width: 1100px) {
	.broadsheet-header .broadsheet-header__bar {
		flex-wrap: wrap;
	}

	.broadsheet-header .broadsheet-header__bar > .broadsheet-header__brand {
		order: 1;
	}

	.broadsheet-header .broadsheet-header__bar > .broadsheet-search-wide {
		order: 3;
		margin-left: auto;
	}

	.broadsheet-header .broadsheet-header__bar > .broadsheet-nav-inline {
		border-top: 1px solid var(--wp--preset--color--border);
		flex: 0 0 100%;
		margin-inline: 0;
		margin-top: var(--wp--preset--spacing--20);
		min-width: 0;
		order: 4;
		padding-top: 0;
	}

	.broadsheet-header .broadsheet-header__bar > .broadsheet-nav-inline .wp-block-navigation__container {
		flex-wrap: nowrap;
		justify-content: safe center;
	}

	.broadsheet-header .broadsheet-header__bar > .broadsheet-nav-inline .wp-block-navigation__container > .wp-block-navigation-item,
	.broadsheet-header .broadsheet-header__bar > .broadsheet-nav-inline .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
	.broadsheet-header .broadsheet-header__bar > .broadsheet-nav-inline .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content > .wp-block-navigation-item__label {
		white-space: nowrap;
	}
}

/*
 * Compact header and banner (client feedback FB-21 and FB-22, 2026-10-24: the header was 156px tall
 * with too much empty space). From 1100px:
 *
 *   row 1   brand · banner (728 × 60 at most, centred in the space left) · search field (40px)
 *   row 2   the menu, 40px rows, right under a hairline
 *
 * which makes the header about 120px with a banner and about 100px without one. The header group's
 * padding is an inline style saved with the header markup (the production copy too), so only
 * !important can trim it. The banner shrinks with the window (612px wide at 1100px) and is hidden
 * below 1100px, where the bar is one line of logo and icons. --broadsheet-header-h, the sticky
 * header's height, keeps in-page targets and the article rails clear of it.
 */
@media (min-width: 1100px) {
	:root {
		--broadsheet-header-h: 7.5rem;
	}

	.wp-block-group.broadsheet-header {
		padding-bottom: 0 !important;
		padding-top: var(--wp--preset--spacing--20) !important;
	}

	.broadsheet-header .broadsheet-header__bar {
		row-gap: 0;
	}

	/* A zero basis: the banner fills the space between brand and search, up to 728px, and never wraps. */
	.broadsheet-header .broadsheet-header__bar > .ngheduoc-header-banner {
		flex: 1 1 0;
		max-width: 728px;
		line-height: 0;
		margin-inline: auto;
		min-width: 0;
		order: 2;
	}

	.ngheduoc-header-banner__image {
		display: block;
		height: auto;
		max-height: 60px;
		object-fit: contain;
		width: 100%;
	}

	.broadsheet-header .broadsheet-search-wide .wp-block-search__input {
		min-height: 40px;
	}

	.broadsheet-header .broadsheet-search-wide .wp-block-search__inside-wrapper {
		padding: 2px;
	}

	.broadsheet-header .broadsheet-search-wide .wp-block-search__button {
		min-height: 36px;
		padding-block: 0;
	}

	.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		min-height: 40px;
	}
}

@media (max-width: 1099px) {
	.broadsheet-header .ngheduoc-header-banner {
		display: none;
	}
}

/*
 * Header dropdowns (plugin urls.php step 6: a category's children, or entries an editor nested by
 * hand). Core opens them on hover, and from the keyboard on the arrow button beside the label (Enter
 * or Space; Escape closes); the label itself stays a link to the category.
 *
 *   from 1100px  a white panel with a border and a light shadow under the label, 15rem to 22rem
 *                wide, long names wrapping inside it; a child's own children follow it in the same
 *                panel, indented, instead of opening a second panel sideways off the screen. The
 *                last two items open towards the left so the panel stays inside the window. The
 *                sticky header (z-index 20) keeps the panel above the page.
 *   below 1100px the overlay menu lists every level open, each one indented under its parent with a
 *                rule on its left; the arrow buttons are hidden there by core.
 */
.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--card);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--wp--preset--color--contrast) 14%, transparent);
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	padding-block: var(--wp--preset--spacing--20);
	z-index: 30;
}

/* Open states only: a closed panel keeps core's zero size, so it never widens the page. */
.broadsheet-header .broadsheet-nav-inline .has-child:not(.open-on-click):hover > .wp-block-navigation__submenu-container,
.broadsheet-header .broadsheet-nav-inline .has-child .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	max-width: 22rem;
	min-width: 15rem;
	width: max-content;
}

.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__container > .has-child:nth-last-child(-n+2) > .wp-block-navigation__submenu-container {
	left: auto;
	right: 0;
}

/* Rows are the parent's 44px minimum (content box), so no extra padding on top of it. */
.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 0 var(--wp--preset--spacing--40);
	white-space: normal;
}

.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
}

/* A child with children of its own: they follow it inside the same panel, indented. */
.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .has-child {
	display: block;
}

.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .wp-block-navigation-submenu__toggle {
	display: none;
}

.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
	background: transparent;
	border: 0;
	box-shadow: none;
	flex-basis: 100%;
	height: auto;
	min-width: 0;
	opacity: 1;
	overflow: visible;
	padding: 0 0 0 var(--wp--preset--spacing--40);
	position: static;
	visibility: inherit;
	width: auto;
}

.broadsheet-header .broadsheet-nav-inline .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: var(--wp--preset--color--muted);
}

/*
 * Overlay menu: every level open, 44px rows (parent theme) without extra gaps, each level set in from
 * the side the menu is aligned to (the parent aligns it right) with a rule on that side.
 */
.broadsheet-header .broadsheet-nav-overlay .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border-left: 1px solid var(--wp--preset--color--border);
	gap: 0;
	margin-left: var(--wp--preset--spacing--20);
	padding: 0 0 0 var(--wp--preset--spacing--40);
}

.broadsheet-header .broadsheet-nav-overlay.items-justified-right .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border-left: 0;
	border-right: 1px solid var(--wp--preset--color--border);
	margin-left: 0;
	margin-right: var(--wp--preset--spacing--20);
	padding: 0 var(--wp--preset--spacing--40) 0 0;
}

.broadsheet-header .broadsheet-nav-overlay .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	gap: 0;
}

/* Core pads these rows on top of the parent's 44px minimum height; the minimum alone is enough. */
.broadsheet-header .broadsheet-nav-overlay .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: var(--wp--preset--color--muted);
	font-weight: 500;
	padding-block: 0;
}

/* =================================================================================================
 * Home page layouts (plugin cli.php, ngheduoc_home_content(); client feedback of 2026-10-18, after
 * the reference layouts). The plugin writes core blocks and these class names; everything visual is
 * here. Light rules and white space separate stories; only the sidebar boxes and the audience cards
 * have a surface.
 *
 *   1  (no intro band since 2026-10-21; the page's H1 is visually hidden)
 *   2  layout A          .ngheduoc-lead-list         lead alone, or lead about 2/3 wide with a list beside it;
 *                        .ngheduoc-featured__head    heading and topic chips on one row
 *   3  audiences         .ngheduoc-audience-cards    2 names per row on phones, 2-7 cards with no empty slot
 *   4  columns           .ngheduoc-home-columns      main 2/3 + sidebar 1/3 from 1024px
 *      layout B          .ngheduoc-block-b           1 large story, 2 text stories, 3 title links
 *                                                    (no title links below 560px)
 *      layout C          .ngheduoc-block-c           feature story + 4 thumbnail rows (2 below 560px)
 *      layout D          .ngheduoc-block-d           strip of 4 image cards
 *      sidebar boxes     .ngheduoc-side-box          main topics, experts, legal documents
 *
 * Sections measure their own width (container queries), not the window's, so a section lays out the
 * same whether the main column is beside the sidebar or alone.
 * ============================================================================================== */

/*
 * 2. Featured head row: the heading on the left, the topic chips at the end of the same row. When the
 * row is too narrow for both, the chips move under the heading and stay on one line, scrolling sideways
 * inside themselves instead of wrapping into a block of pills above the lead story.
 */
.ngheduoc-featured__head {
	column-gap: var(--wp--preset--spacing--40);
	row-gap: var(--wp--preset--spacing--30);
}

.ngheduoc-featured__head > .ngheduoc-section__title {
	flex: 0 0 auto;
	min-width: 0;
}

/* margin-left:auto pushes the chips to the row's end; start-aligned inside, so a scrolled row never
   hides its first chip off the left edge as end-alignment would. */
.ngheduoc-featured__head > .ngheduoc-home-chips {
	flex: 0 1 auto;
	flex-wrap: nowrap;
	margin-left: auto;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.ngheduoc-featured__head > .ngheduoc-home-chips > * {
	flex: none;
}

@media (max-width: 781px) {
	.ngheduoc-featured__head > .ngheduoc-home-chips {
		flex-basis: 100%;
		margin-left: 0;
	}
}

/* Topic chips: each single-term Terms Query (and the legal documents paragraph) is one pill. */
.ngheduoc-home-chips .wp-block-term-template {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-home-chips .wp-block-term,
.ngheduoc-home-chips .wp-block-term-name,
.ngheduoc-home-chips > .ngheduoc-chip {
	margin: 0;
}

.ngheduoc-home-chips a {
	align-items: center;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--contrast);
	display: inline-flex;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	min-height: 2.25rem;
	padding: 0 1rem;
	text-decoration: none;
	white-space: nowrap;
}

.ngheduoc-home-chips a:hover,
.ngheduoc-home-chips a:focus {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

@media (pointer: coarse) {
	.ngheduoc-home-chips a {
		min-height: 44px;
	}
}

/* Section titles and head rows: the name in primary ink, a light rule under the row. */
.ngheduoc-section__title {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.25;
	margin: 0;
}

.ngheduoc-section__title a {
	color: inherit;
	text-decoration: none;
}

.ngheduoc-section__title a:hover,
.ngheduoc-section__title a:focus {
	text-decoration: underline;
}

.ngheduoc-section__title--ruled,
.ngheduoc-section__head {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-bottom: var(--wp--preset--spacing--30);
}

.ngheduoc-section__head > * {
	margin: 0;
}

/*
 * Head row order, whatever the width: the name and "See all" share the first row; the topic links get
 * their own single row underneath, which scrolls sideways inside itself when it is too long. (Beside
 * a long name the links were squeezed into several short lines.)
 */
.ngheduoc-section__head > .ngheduoc-section__title {
	flex: 1 1 0;
	min-width: 10rem;
}

.ngheduoc-section__head > .ngheduoc-section__more {
	order: 2;
}

.ngheduoc-section__head > .ngheduoc-topic-links {
	flex-basis: 100%;
	min-width: 0;
	order: 3;
}

.ngheduoc-section__head > .ngheduoc-topic-links ul {
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.ngheduoc-section__head > .ngheduoc-topic-links li {
	flex: none;
	white-space: nowrap;
}

/* "See all" sits at the end of the head row; two classes outrank the flex layout's own margin. */
.ngheduoc-section__head > .ngheduoc-section__more {
	margin-left: auto;
}

.ngheduoc-section__more {
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

.ngheduoc-section__more a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.ngheduoc-section__more a:hover,
.ngheduoc-section__more a:focus {
	text-decoration: underline;
}

/* Story lists in every home layout: no bullets, indents or flow margins; spacing set per layout. */
.ngheduoc-section,
.ngheduoc-home-columns .wp-block-query {
	min-width: 0;
}

.ngheduoc-section {
	container: ngheduoc-section / inline-size;
}

:is(.ngheduoc-section, .ngheduoc-home-aside) .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
}

:is(.ngheduoc-section, .ngheduoc-home-aside) .wp-block-post-template > li {
	margin: 0;
	min-width: 0;
}

:is(.ngheduoc-section, .ngheduoc-home-aside) .wp-block-post-template > li > *,
:is(.ngheduoc-block-b, .ngheduoc-block-c, .ngheduoc-block-d) > * {
	margin-block: 0;
}

.ngheduoc-section .wp-block-post-template > li {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.ngheduoc-section .wp-block-post-featured-image {
	width: 100%;
}

.ngheduoc-section .wp-block-post-featured-image img {
	border-radius: var(--wp--custom--radius--control);
}

.ngheduoc-section .wp-block-post-title {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.35;
	text-wrap: pretty;
}

/* Excerpts in muted ink, cut after a few lines so stories side by side stay close in height. */
.ngheduoc-section .wp-block-post-excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.ngheduoc-section .wp-block-post-excerpt__excerpt {
	-webkit-box-orient: vertical;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	margin: 0;
	overflow: hidden;
}

.ngheduoc-section .wp-block-post-date {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

/* A story without an image keeps the parent's tile; in small slots it shows no label. */
.ngheduoc-thumb-list .broadsheet-noimage > * {
	display: none;
}

/*
 * 2. Layout A "lead + list" (featured content), the one standard layout of the section whatever the
 * number of sticky posts (owner, 2026-10-20: editors only pin posts, they never pick a layout).
 *
 *   picks   narrow < 560px            medium 560-959px                 wide >= 960px
 *   1       lead card                 lead, image beside the text      lead, image beside the text
 *   2 to 5  lead card, rows under it  lead, rows under it              lead about 2/3, rows beside it
 *
 * The parent theme already lays out one pick, and two to five below 960px, this way. From 960px it
 * would turn two or three picks into equal cards, and four or five into a lead with small cards under
 * it; the rules below replace that with the lead in the left 2/3 and compact rows (thumbnail, category,
 * title, date) on the right, divided by rules.
 *
 * Every selector names the counts two to five (the Query block shows at most five), so it outranks the
 * parent's count rules, which carry one count each.
 */
@container broadsheet-picks (min-width: 960px) {
	/* Step 1: two columns, the lead spanning the rows of the list. */
	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) {
		align-items: start;
		column-gap: var(--wp--preset--spacing--60);
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		row-gap: 0;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li:first-child {
		grid-column: 1;
		grid-row: 1 / span 4;
	}

	/* Step 2: the lead keeps its size and excerpt; image above the text in the 2/3 column. */
	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li:first-child > .broadsheet-teaser {
		display: flex;
		flex-direction: column;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li:first-child .wp-block-post-title {
		font-size: var(--wp--preset--font-size--x-large);
		line-height: 1.2;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li:first-child .wp-block-post-excerpt {
		display: block;
		font-size: var(--wp--preset--font-size--medium);
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li:first-child .wp-block-post-date {
		margin-top: 0;
	}

	/* Step 3: the list, one compact row per story in the right column. */
	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li {
		border-top: 1px solid var(--wp--preset--color--border);
		grid-column: 2;
		padding-block: var(--wp--preset--spacing--40);
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li:nth-child(2) {
		border-top: 0;
		padding-top: 0;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li > .broadsheet-teaser {
		column-gap: var(--wp--preset--spacing--40);
		display: grid;
		grid-template-columns: 7.5rem minmax(0, 1fr);
		grid-template-rows: auto auto 1fr;
		row-gap: 0.125rem;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li .wp-block-post-featured-image {
		grid-column: 1;
		grid-row: 1 / span 3;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li .broadsheet-teaser > :not(.wp-block-post-featured-image) {
		grid-column: 2;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li .wp-block-post-title {
		font-size: var(--wp--preset--font-size--medium);
		line-height: 1.35;
	}

	/* The parent shows excerpts on its equal cards (two or three picks); rows carry none. */
	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li .wp-block-post-excerpt {
		display: none;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li .wp-block-post-date {
		margin-top: 0;
	}

	.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template:is(:has(> li:nth-child(2):last-child), :has(> li:nth-child(3):last-child), :has(> li:nth-child(4):last-child), :has(> li:nth-child(5):last-child)) > li + li .broadsheet-noimage > * {
		display: none;
	}
}

/*
 * 2b. Featured content rows, every story after the lead, at every width (owner, 2026-11-13): the
 * thumbnail is exactly as tall as the text beside it, and a row shows one category.
 *
 * Flow:
 *   1. The row is a grid whose image cell spans the three text lines: category, title, date (the
 *      parent theme below 960px, step 3 above from 960px).
 *   2. The image cell stretches over those lines and the image is laid over the cell (absolute,
 *      cover), so the image no longer sets the row's height from its own 16:9 ratio; the text does.
 *      The minimum keeps 16:9 of the 7.5rem column for a row whose text would be shorter.
 *   3. After the first category link, the separator and any further category are hidden, so the
 *      category takes one line. The first is core's order (by name).
 *   4. Where two rows share a line (560 to 959px), each keeps its own height instead of stretching to
 *      its neighbour's, which would make its image taller than its own text.
 */
.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template > li + li {
	align-self: start;
}

.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template > li + li .wp-block-post-featured-image {
	align-self: stretch;
	min-height: 4.25rem;
	position: relative;
}

.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template > li + li .wp-block-post-featured-image img {
	height: 100%;
	inset: 0;
	position: absolute;
	width: 100%;
}

.broadsheet-picks.ngheduoc-lead-list > .wp-block-post-template > li + li .wp-block-post-terms > a:first-of-type ~ * {
	display: none;
}

/*
 * 3. Audience cards, compact: names only on phones, with descriptions from 600px. Any number of
 * audiences from 2 to 7 fills its rows with no empty slot (production has 5, child theme 0.11.0):
 *
 *   flow   a row holds --ngheduoc-audience-per-row cards; the cards of a row that is not full grow to
 *          share its width, so a short last row is wider cards, never a gap. The count is read with
 *          :has(), so the home page markup and its layout version stay as they are.
 *   phone  (below 600px) 2 per row; an odd last card spans the row. Names only, two short columns
 *          keep the whole section within about one screen and give large tap targets.
 *   tablet (600-1023px) 3 per row, 2 for four audiences (2 + 2); seven split 3 + 2 + 2.
 *   wide   (from 1024px) one row of equal cards up to five; six split 3 + 3, seven 4 + 3.
 */
.ngheduoc-audience-cards .wp-block-term-template {
	--ngheduoc-audience-gap: var(--wp--preset--spacing--30);
	--ngheduoc-audience-per-row: 2;
	display: flex;
	flex-wrap: wrap;
	gap: var(--ngheduoc-audience-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-audience-cards .wp-block-term-template > li {
	flex: 1 1 calc((100% - (var(--ngheduoc-audience-per-row) - 1) * var(--ngheduoc-audience-gap)) / var(--ngheduoc-audience-per-row));
	margin: 0;
	min-width: 0;
}

@media (min-width: 600px) and (max-width: 1023px) {
	.ngheduoc-audience-cards .wp-block-term-template {
		--ngheduoc-audience-per-row: 3;
	}

	.ngheduoc-audience-cards .wp-block-term-template:has(> li:nth-child(4):last-child) {
		--ngheduoc-audience-per-row: 2;
	}

	/* Seven: the first row keeps three, the four after it pair up. */
	.ngheduoc-audience-cards .wp-block-term-template:has(> li:nth-child(7):last-child) > li:nth-child(n+4) {
		--ngheduoc-audience-per-row: 2;
	}
}

@media (min-width: 1024px) {
	.ngheduoc-audience-cards .wp-block-term-template {
		--ngheduoc-audience-per-row: 5;
	}

	.ngheduoc-audience-cards .wp-block-term-template:has(> li:nth-child(6):last-child) {
		--ngheduoc-audience-per-row: 3;
	}

	.ngheduoc-audience-cards .wp-block-term-template:has(> li:nth-child(7)) {
		--ngheduoc-audience-per-row: 4;
	}
}

.ngheduoc-audience-cards .is-style-broadsheet-card {
	padding: var(--wp--preset--spacing--40);
}

.ngheduoc-audience-cards .wp-block-term-name {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.3;
	margin: 0;
}

@media (max-width: 599px) {
	.ngheduoc-audience-cards .wp-block-term-description {
		display: none;
	}
}

/* 4. Main column + sidebar: 2/3 + 1/3 from 1024px; below that the sidebar follows the main column. */
.ngheduoc-home-columns > .ngheduoc-home-aside {
	margin-top: var(--wp--preset--spacing--60);
}

@media (min-width: 1024px) {
	.ngheduoc-home-columns {
		align-items: start;
		column-gap: var(--wp--preset--spacing--60);
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}

	.ngheduoc-home-columns > .ngheduoc-home-main,
	.ngheduoc-home-columns > .ngheduoc-home-aside {
		margin-block: 0;
		min-width: 0;
	}
}

/*
 * Layout B "section block". Narrow (below 560px): the large story and the two text stories in one
 * column, divided by rules; the three title links are left out to keep the phone page short (owner,
 * 2026-10-21; "See all" in the head row leads to them). From 560px: the large story on the left; the
 * two text stories stacked on the right; the three title links in a row underneath, under a rule.
 */
.ngheduoc-block-b {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.ngheduoc-block-b__lead .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
}

.ngheduoc-block-b__side .wp-block-post-template > li,
.ngheduoc-block-b__links .wp-block-post-template > li {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--40);
}

.ngheduoc-block-b__side .wp-block-post-template,
.ngheduoc-block-b__links .wp-block-post-template {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.ngheduoc-block-b__links .wp-block-post-title {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

/* The exact complement of the 560px rule below, so no section width shows both or neither. */
@container ngheduoc-section not (min-width: 560px) {
	.ngheduoc-block-b > .ngheduoc-block-b__links {
		display: none;
	}
}

@container ngheduoc-section (min-width: 560px) {
	.ngheduoc-block-b {
		column-gap: var(--wp--preset--spacing--50);
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	}

	.ngheduoc-block-b > .ngheduoc-block-b__links {
		grid-column: 1 / -1;
	}

	.ngheduoc-block-b__side .wp-block-post-template > li:first-child {
		border-top: 0;
		padding-top: 0;
	}

	.ngheduoc-block-b__links .wp-block-post-template {
		border-top: 1px solid var(--wp--preset--color--border);
		column-gap: var(--wp--preset--spacing--50);
		grid-template-columns: repeat(3, minmax(0, 1fr));
		padding-top: var(--wp--preset--spacing--40);
	}

	.ngheduoc-block-b__links .wp-block-post-template > li {
		border-top: 0;
		padding-top: 0;
	}
}

/*
 * Layout C "feature + thumbnail list". Narrow (below 560px): the feature story, then the first two
 * rows only (owner, 2026-10-21: a shorter phone page). From 560px: the feature on the left, four rows
 * of thumbnail and title on the right, divided by rules.
 */
.ngheduoc-block-c {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.ngheduoc-block-c__feature .wp-block-post-title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
	text-wrap: balance;
}

.ngheduoc-thumb-list .wp-block-post-template > li {
	align-items: start;
	border-top: 1px solid var(--wp--preset--color--border);
	column-gap: var(--wp--preset--spacing--40);
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr);
	padding-block: var(--wp--preset--spacing--40);
}

.ngheduoc-thumb-list .wp-block-post-title {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

@container ngheduoc-section not (min-width: 560px) {
	.ngheduoc-block-c__list .wp-block-post-template > li:nth-child(n + 3) {
		display: none;
	}
}

@container ngheduoc-section (min-width: 560px) {
	.ngheduoc-block-c {
		column-gap: var(--wp--preset--spacing--50);
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.ngheduoc-thumb-list .wp-block-post-template > li:first-child {
		border-top: 0;
		padding-top: 0;
	}
}

/* Layout D "strip": four image cards, two per row on phones, one row of four from 640px. */
.ngheduoc-block-d__cards .wp-block-post-template {
	display: grid;
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ngheduoc-block-d__cards .wp-block-post-title {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

.ngheduoc-block-d__cards .wp-block-post-terms {
	font-size: var(--wp--preset--font-size--x-small);
}

@container ngheduoc-section (min-width: 640px) {
	.ngheduoc-block-d__cards .wp-block-post-template {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Sidebar boxes: a tinted surface without a border, the heading in primary ink. */
.ngheduoc-side-box {
	border-radius: var(--wp--custom--radius--card);
}

.ngheduoc-side-box__title {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	margin: 0;
}

.ngheduoc-side-box .wp-block-post-template > li + li {
	border-top: 1px solid var(--wp--preset--color--border);
}

.ngheduoc-side-box .wp-block-post-template > li {
	padding-block: var(--wp--preset--spacing--30);
}

.ngheduoc-side-box .wp-block-post-template > li:first-child {
	padding-top: 0;
}

.ngheduoc-side-box .wp-block-post-title {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	margin: 0;
}

.ngheduoc-side-box .wp-block-post-date {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

/*
 * Audience cards (FB-23): the square icon (plugin block ngheduoc/term-icon) beside the name, centred on
 * the name's first line.
 */
.ngheduoc-term-card__head {
	align-items: center;
}

.ngheduoc-term-card__head > .wp-block-term-name {
	margin: 0;
	min-width: 0;
}

/* Home page: room between the last section and the footer (owner, 2026-10-21). */
.home .wp-block-post-content > :last-child {
	margin-block-end: var(--wp--preset--spacing--70);
}

/* =================================================================================================
 * Category page layouts (client feedback FB-29 and FB-30, 2026-10-24; owner 2026-10-27). The plugin
 * picks the template (includes/category-layouts.php) and builds its blocks with the home page builder,
 * so the stories look as they do on the home page: the rules above ("Home page layouts") draw them.
 * Every layout: the breadcrumb, a visually hidden H1 (the category name, for search engines and screen
 * readers), then three or four blocks and the page numbers. No visible title, description or topic list.
 * Topic and audience pages using these layouts share the same head (FB-42, owner 2026-11-14).
 *
 *   A  .ngheduoc-cat-blocks--a   lead + list · section block · most read, across the page
 *   B  .ngheduoc-cat-blocks--b   section block · thumbnail list | most read (home columns)
 *   C  .ngheduoc-cat-blocks--c   lead alone · strip of cards · feature + thumbnail list · most read
 *
 * Only what differs from the home page is here.
 * ============================================================================================== */

/* Blocks follow one another with the home sections' spacing and a light rule between them; the most
   read box has a surface of its own and needs none. */
.ngheduoc-cat-blocks > .ngheduoc-cat-block + .ngheduoc-cat-block:not(.ngheduoc-cat-most-read),
.ngheduoc-cat-blocks .ngheduoc-home-main > .ngheduoc-cat-block + .ngheduoc-cat-block {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--60);
}

/*
 * Every story of the page stays visible. The home page leaves the section block's title links and the
 * thumbnail list's last rows out below 560px (its "See all" leads to them); a category page has no
 * further link to them, so its stories are all shown, the links as a one-column list.
 */
@container ngheduoc-section not (min-width: 560px) {
	.ngheduoc-cat-block .ngheduoc-block-b > .ngheduoc-block-b__links {
		display: block;
	}

	.ngheduoc-cat-block .ngheduoc-block-c__list .wp-block-post-template > li:nth-child(n + 3) {
		display: grid;
	}
}

/*
 * B's thumbnail list: the picture beside the title, excerpt and date, a larger picture than the home
 * page's list from 560px, as the list carries more text.
 */
.ngheduoc-cat-list .ngheduoc-thumb-list .wp-block-post-template > li {
	grid-template-rows: auto auto 1fr;
	row-gap: var(--wp--preset--spacing--20);
}

.ngheduoc-cat-list .ngheduoc-thumb-list .wp-block-post-featured-image {
	grid-column: 1;
	grid-row: 1 / span 3;
}

.ngheduoc-cat-list .ngheduoc-thumb-list li > :not(.wp-block-post-featured-image) {
	grid-column: 2;
}

.ngheduoc-cat-list .ngheduoc-thumb-list .wp-block-post-template > li:first-child {
	border-top: 0;
	padding-top: 0;
}

@container ngheduoc-section (min-width: 560px) {
	.ngheduoc-cat-list .ngheduoc-thumb-list .wp-block-post-template > li {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	}

	.ngheduoc-cat-list .ngheduoc-thumb-list .wp-block-post-title {
		font-size: var(--wp--preset--font-size--medium);
	}
}

/* The page numbers under the blocks; the rule between blocks does not reach them. */
.ngheduoc-cat-pages {
	margin-top: var(--wp--preset--spacing--60);
}

/*
 * Most read across the page (A and C): the ranked rows side by side, two per row from 600px; from
 * 1000px all five in one row, the rank beside the title and date, without the picture, which would
 * leave the title a few words per line. In B's side column it stays the home sidebar's list.
 */
.ngheduoc-cat-blocks > .ngheduoc-cat-most-read {
	container: ngheduoc-most-read / inline-size;
}

@container ngheduoc-most-read (min-width: 600px) {
	.ngheduoc-cat-most-read .ngheduoc-ranked {
		display: grid;
		gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container ngheduoc-most-read (min-width: 1000px) {
	.ngheduoc-cat-most-read .ngheduoc-ranked {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.ngheduoc-cat-most-read .ngheduoc-ranked__item {
		grid-template-columns: 1.5rem minmax(0, 1fr);
	}

	.ngheduoc-cat-most-read .ngheduoc-ranked__image {
		display: none;
	}
}

/*
 * Breadcrumb on phones. The parent drops the last crumb there because the page title repeats it right
 * below; a category page has no visible title any more (FB-29), topic and audience pages (FB-42) have
 * no visible title either, and on an article the last crumb is now the section, not the title (FB-35),
 * so on each the last crumb stays.
 */
@media (max-width: 599px) {
	:is(.category, .single-post, .tax-topic, .tax-audience) .wp-block-breadcrumbs li:last-child:not(:first-child) {
		display: revert;
	}
}
