/*
 * Front-end styles of the ngheduoc/* blocks. Colours and sizes come from the active theme's
 * presets, with fallbacks so the blocks stay readable under any theme.
 */

/* Padding stays inside the reading column's max-width instead of widening the box past it. */
.ngheduoc-toc,
.ngheduoc-sources,
.ngheduoc-disclaimer,
.ngheduoc-expert-box,
.ngheduoc-expert-box__card,
.ngheduoc-legal-meta,
.ngheduoc-cta {
	box-sizing: border-box;
}

.ngheduoc-byline {
	color: var(--wp--preset--color--muted, #5b6b74);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	gap: 0.25rem 1rem;
}

.ngheduoc-byline a {
	color: var(--wp--preset--color--primary, #075985);
	font-weight: 600;
}

/* Table of contents */
.ngheduoc-toc {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: var(--wp--custom--radius--card, 10px);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	padding: 0.75rem 1rem;
}

.ngheduoc-toc summary {
	cursor: pointer;
	font-weight: 700;
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--primary, #075985);
	list-style: none;
}

/* The flex summary hides the browser's own marker; a chevron in a round button replaces it. */
.ngheduoc-toc summary::-webkit-details-marker {
	display: none;
}

.ngheduoc-toc__count {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-weight: 400;
}

.ngheduoc-toc__count::before {
	content: "·";
	margin-right: 0.5rem;
}

.ngheduoc-toc summary::after {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	flex: none;
	height: 0.55rem;
	margin: 0 0.5rem 0.25rem auto;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	width: 0.55rem;
}

.ngheduoc-toc details[open] > summary::after {
	margin-bottom: -0.25rem;
	transform: rotate(-135deg);
}

@media (prefers-reduced-motion: reduce) {
	.ngheduoc-toc summary::after {
		transition: none;
	}
}

.ngheduoc-toc ol {
	margin: 0.25rem 0 0;
	padding-left: 1.25rem;
}

.ngheduoc-toc li {
	margin: 0.25rem 0;
}

.ngheduoc-toc a {
	color: var(--wp--preset--color--primary, #075985);
	text-decoration: none;
}

.ngheduoc-toc a:hover {
	text-decoration: underline;
}

/*
 * Floating quick-jump pill and bottom-sheet drawer (view.js), below 1200px only. While hidden they
 * are also visibility:hidden, so their controls leave the tab order and the accessibility tree;
 * the visibility switch is delayed until the fade-out ends.
 */
.ngheduoc-toc-pill {
	align-items: center;
	background: var(--wp--preset--color--surface, #f2f7f7);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: 999px;
	bottom: 1.5rem;
	box-shadow: 0 4px 16px color-mix(in srgb, var(--wp--preset--color--contrast, #16313d) 14%, transparent);
	box-sizing: border-box;
	color: var(--wp--preset--color--contrast, #16313d);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--wp--preset--font-family--ui, "Be Vietnam Pro", sans-serif);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 600;
	gap: 0.5rem;
	min-height: 44px;
	opacity: 0;
	padding: 0 1.125rem;
	pointer-events: none;
	position: fixed;
	right: 1.5rem;
	transform: translateY(20px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
	visibility: hidden;
	z-index: 90;
}

.ngheduoc-toc-pill.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	transition-delay: 0s;
	visibility: visible;
}

.ngheduoc-toc-pill:hover,
.ngheduoc-toc-pill:focus-visible {
	background: var(--wp--preset--color--base, #fff);
	border-color: var(--wp--preset--color--primary, #075985);
	color: var(--wp--preset--color--primary, #075985);
}

.ngheduoc-toc-pill svg {
	flex-shrink: 0;
}

.ngheduoc-toc-backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--contrast, #16313d) 45%, transparent);
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	transition: opacity 0.25s ease;
	z-index: 98;
}

.ngheduoc-toc-backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.ngheduoc-toc-drawer {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border-radius: 16px 16px 0 0;
	border-top: 1px solid var(--wp--preset--color--border, #d5e1e3);
	bottom: 0;
	box-shadow: 0 -4px 24px color-mix(in srgb, var(--wp--preset--color--contrast, #16313d) 18%, transparent);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	left: 0;
	max-height: 75vh;
	pointer-events: none;
	position: fixed;
	right: 0;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
	visibility: hidden;
	z-index: 99;
}

.ngheduoc-toc-drawer.is-open {
	pointer-events: auto;
	transform: translateY(0);
	transition-delay: 0s;
	visibility: visible;
}

.ngheduoc-toc-drawer__header {
	align-items: center;
	border-bottom: 1px solid var(--wp--preset--color--border, #d5e1e3);
	box-sizing: border-box;
	display: flex;
	justify-content: space-between;
	padding: 0.75rem 1.25rem;
}

.ngheduoc-toc-drawer__title {
	color: var(--wp--preset--color--primary, #075985);
	font-family: var(--wp--preset--font-family--ui, "Be Vietnam Pro", sans-serif);
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
	font-weight: 700;
	margin: 0;
}

.ngheduoc-toc-drawer__close {
	align-items: center;
	background: transparent;
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: 999px;
	box-sizing: border-box;
	color: var(--wp--preset--color--muted, #5b6b74);
	cursor: pointer;
	display: inline-flex;
	font-size: 1.25rem;
	height: 44px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	padding: 0;
	width: 44px;
}

.ngheduoc-toc-drawer__close:hover,
.ngheduoc-toc-drawer__close:focus-visible {
	border-color: var(--wp--preset--color--primary, #075985);
	color: var(--wp--preset--color--primary, #075985);
}

.ngheduoc-toc-drawer__body {
	-webkit-overflow-scrolling: touch;
	overflow-y: auto;
	padding: 0.5rem 1.25rem 2rem;
}

.ngheduoc-toc-drawer__body ol {
	list-style: decimal;
	margin: 0;
	padding-left: 1.25rem;
}

.ngheduoc-toc-drawer__body ol ol {
	padding-left: 1.25rem;
}

.ngheduoc-toc-drawer__body li {
	margin: 0;
}

.ngheduoc-toc-drawer__body a {
	align-items: center;
	border-bottom: 1px solid var(--wp--preset--color--border, #d5e1e3);
	box-sizing: border-box;
	color: var(--wp--preset--color--contrast, #16313d);
	display: flex;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	min-height: 44px;
	padding: 0.5rem 0.25rem;
	text-decoration: none;
	width: 100%;
}

.ngheduoc-toc-drawer__body a:hover,
.ngheduoc-toc-drawer__body a:focus-visible {
	color: var(--wp--preset--color--primary, #075985);
	text-decoration: underline;
}

@media (min-width: 1200px) {
	.ngheduoc-toc-pill,
	.ngheduoc-toc-backdrop,
	.ngheduoc-toc-drawer {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ngheduoc-toc-pill,
	.ngheduoc-toc-backdrop,
	.ngheduoc-toc-drawer {
		transition-duration: 0s;
		transition-delay: 0s;
	}
}

/*
 * NFR-3: on touch screens, links stacked in a list get a 44px tall target. Pointer devices keep the
 * compact list, where 44px rows would only push the article down (and lengthen the sticky table of
 * contents from 1200px).
 */
@media (pointer: coarse) {
	.ngheduoc-toc a {
		align-items: center;
		box-sizing: border-box;
		display: flex;
		min-height: 44px;
		padding: 0.375rem 0.5rem;
		width: 100%;
	}

	.ngheduoc-toc li {
		margin: 0;
	}

	.ngheduoc-expert-box__name a,
	.ngheduoc-expert-articles li > a {
		align-items: center;
		display: inline-flex;
		min-height: 44px;
	}
}

/* Headings jumped to from the table of contents clear the sticky header. */
:where(.wp-block-post-content) :is(h2, h3)[id] {
	scroll-margin-top: 6rem;
}

/* Sources */
.ngheduoc-sources {
	border-top: 1px solid var(--wp--preset--color--border, #d5e1e3);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	padding-top: 1rem;
}

.ngheduoc-sources__heading {
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
}

.ngheduoc-sources__list li {
	margin: 0.375rem 0;
}

.ngheduoc-sources__detail {
	color: var(--wp--preset--color--muted, #5b6b74);
}

.ngheduoc-sources__tier {
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: 999px;
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	margin-left: 0.5rem;
	padding: 0 0.5rem;
	white-space: nowrap;
}

/* Disclaimer */
.ngheduoc-disclaimer {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border-left: 3px solid var(--wp--preset--color--primary, #075985);
	border-radius: 0 4px 4px 0;
	color: var(--wp--preset--color--contrast, #16313d);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.5;
	padding: 0.75rem 1rem;
}

.ngheduoc-disclaimer p {
	margin: 0;
}

/* Expert box */
.ngheduoc-expert-box {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.ngheduoc-expert-box__card {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: var(--wp--custom--radius--card, 10px);
	display: flex;
	gap: 1rem;
	padding: 1rem;
}

.ngheduoc-expert-box__card p {
	margin: 0 0 0.25rem;
}

.ngheduoc-expert-box__photo {
	border-radius: 50%;
	flex: none;
	height: 64px;
	object-fit: cover;
	width: 64px;
}

.ngheduoc-expert-box__role,
.ngheduoc-expert-box__title {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

.ngheduoc-expert-box__name {
	font-weight: 700;
}

.ngheduoc-expert-box__bio {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
}

/* Legal document details */
.ngheduoc-legal-meta {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: var(--wp--custom--radius--card, 10px);
	display: grid;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	gap: 0.5rem 1rem;
	grid-template-columns: minmax(8rem, max-content) 1fr;
	padding: 1rem;
}

.ngheduoc-legal-meta dt {
	color: var(--wp--preset--color--muted, #5b6b74);
}

.ngheduoc-legal-meta dd {
	font-weight: 600;
	margin: 0;
}

/* Semantic badges (DEC-10): red only for warnings, green only for a valid state. */
.ngheduoc-badge {
	border-radius: 999px;
	display: inline-block;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	padding: 0.125rem 0.625rem;
}

.ngheduoc-badge--positive {
	background: var(--wp--preset--color--positive, #15803d);
	color: var(--wp--preset--color--base, #fff);
}

.ngheduoc-badge--alert {
	background: var(--wp--preset--color--alert, #c62828);
	color: var(--wp--preset--color--base, #fff);
}

.ngheduoc-badge--neutral {
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	color: var(--wp--preset--color--contrast, #16313d);
}

/* Expert profile and article list */
.ngheduoc-expert-profile__title {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-weight: 600;
}

.ngheduoc-expert-profile__label {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 1rem 0 0.25rem;
	text-transform: uppercase;
}

.ngheduoc-expert-profile__expertise,
.ngheduoc-expert-profile__profiles {
	margin: 0;
	padding-left: 1.25rem;
}

.ngheduoc-expert-articles ul {
	padding-left: 1.25rem;
}

.ngheduoc-expert-articles li {
	margin: 0.5rem 0;
}

.ngheduoc-expert-articles__meta {
	color: var(--wp--preset--color--muted, #5b6b74);
	display: block;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

@media (max-width: 600px) {
	.ngheduoc-legal-meta {
		grid-template-columns: 1fr;
	}

	.ngheduoc-legal-meta dd {
		margin-bottom: 0.5rem;
	}
}

/* Section heading used by the related, featured, topics and pillar blocks. */
.ngheduoc-section-heading {
	font-size: var(--wp--preset--font-size--large, 1.375rem);
	margin: 0 0 1rem;
}

/*
 * Related articles: three cards fit the 760px reading column side by side, so the third never sits
 * alone on its own row; a narrow screen still drops to two columns, then one.
 */
.ngheduoc-related .ngheduoc-cards {
	grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr));
}

/* Article cards: a responsive grid; the "lead" variant is one large horizontal card. */
.ngheduoc-cards {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-card {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.ngheduoc-card__image img {
	aspect-ratio: 16 / 9;
	border-radius: var(--wp--custom--radius--card, 10px);
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.ngheduoc-card p,
.ngheduoc-card h3 {
	margin: 0;
}

.ngheduoc-card__kicker {
	color: var(--wp--preset--color--accent, #0a7a6f);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
}

/* Card titles match post titles: contrast ink at weight 600, primary on hover or focus. */
.ngheduoc-card__title {
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
	font-weight: 600;
	line-height: 1.35;
}

.ngheduoc-card__title a {
	color: var(--wp--preset--color--contrast, #16313d);
	text-decoration: none;
	transition: color 0.15s ease-in-out;
}

.ngheduoc-card__title a:hover,
.ngheduoc-card__title a:focus {
	color: var(--wp--preset--color--primary, #075985);
	text-decoration: underline;
}

.ngheduoc-card__date {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

@media (min-width: 782px) {
	.ngheduoc-cards--lead {
		grid-template-columns: 1fr;
	}

	.ngheduoc-cards--lead .ngheduoc-card {
		align-items: center;
		display: grid;
		gap: 0.375rem 1.5rem;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.ngheduoc-cards--lead .ngheduoc-card__image {
		grid-row: span 3;
	}

	.ngheduoc-cards--lead .ngheduoc-card__title {
		font-size: var(--wp--preset--font-size--x-large, 1.875rem);
	}
}

/* Community CTA */
.ngheduoc-cta {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: var(--wp--custom--radius--card, 10px);
	padding: 1.5rem;
}

.ngheduoc-cta__heading {
	font-size: var(--wp--preset--font-size--large, 1.375rem);
	margin: 0 0 0.5rem;
}

.ngheduoc-cta__text {
	margin: 0 0 1rem;
}

.ngheduoc-cta__action {
	margin: 0;
}

/* Decorative group icon: hidden by default, a theme shows it where the CTA should stand out. */
.ngheduoc-cta__icon {
	display: none;
}

.ngheduoc-cta__button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-decoration: none;
}

/* Topic chips */
.ngheduoc-topic-chips ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-topic-chips a {
	align-items: center;
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: 999px;
	display: inline-flex;
	gap: 0.375rem;
	min-height: 44px;
	padding: 0 1rem;
	text-decoration: none;
}

.ngheduoc-topic-chips__count {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

/*
 * Topic links, compact variant of ngheduoc/archive-topics (home section heads): a short row of plain
 * muted links divided by thin rules, like the sub-section links of a news site's section head.
 */
.ngheduoc-topic-links ul {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-topic-links li + li {
	border-left: 1px solid var(--wp--preset--color--border, #d5e1e3);
}

.ngheduoc-topic-links a {
	align-items: center;
	color: var(--wp--preset--color--muted, #5b6b74);
	display: inline-flex;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	min-height: 24px;
	padding: 0 0.625rem;
	text-decoration: none;
}

.ngheduoc-topic-links li:first-child a {
	padding-left: 0;
}

.ngheduoc-topic-links a:hover,
.ngheduoc-topic-links a:focus {
	color: var(--wp--preset--color--accent, #0a7a6f);
	text-decoration: underline;
}

/* Main topics with counts (ngheduoc/topic-list): name on one line, the count under it. */
.ngheduoc-topic-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-topic-list__items li {
	display: flex;
	flex-direction: column;
	padding-block: 0.5rem;
}

.ngheduoc-topic-list__items li + li {
	border-top: 1px solid var(--wp--preset--color--border, #d5e1e3);
}

.ngheduoc-topic-list__items a {
	color: var(--wp--preset--color--contrast, #16313d);
	font-weight: 600;
	text-decoration: none;
}

.ngheduoc-topic-list__items a:hover,
.ngheduoc-topic-list__items a:focus {
	color: var(--wp--preset--color--accent, #0a7a6f);
	text-decoration: underline;
}

.ngheduoc-topic-list__count {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

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

	.ngheduoc-topic-list__items a {
		align-items: center;
		display: inline-flex;
		min-height: 44px;
	}
}


/* Trust links: muted text, 44px targets on touch screens (NFR-3). */
.ngheduoc-trust-links {
	align-items: center;
	color: var(--wp--preset--color--muted, #5b6b74);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	gap: 0.5rem 1rem;
	margin: 0;
}

.ngheduoc-trust-links a {
	align-items: center;
	color: var(--wp--preset--color--muted, #5b6b74);
	display: inline-flex;
	min-height: 2.25rem;
	text-decoration: underline;
}

.ngheduoc-trust-links a:hover {
	color: var(--wp--preset--color--primary, #075985);
}

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

/*
 * Article topics and audiences (ngheduoc/article-terms): a small card like the table of contents,
 * so the two sit together in the right column; chips that wrap in a narrow column. 44px targets on
 * touch screens (NFR-3).
 */
.ngheduoc-terms-box {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: var(--wp--custom--radius--card, 10px);
	box-sizing: border-box;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	padding: 0.75rem 1rem;
}

.ngheduoc-terms-box__heading {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-family: var(--wp--preset--font-family--ui, "Be Vietnam Pro", sans-serif);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	margin: 0 0 0.5rem;
	text-transform: uppercase;
}

.ngheduoc-terms-box__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-terms-box__list li {
	margin: 0;
	max-width: 100%;
}

.ngheduoc-terms-box__list a {
	align-items: center;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	/* A pill on one line; a long name that wraps in a narrow column keeps a tidy rounded box. */
	border-radius: 1rem;
	box-sizing: border-box;
	color: var(--wp--preset--color--primary, #075985);
	display: inline-flex;
	line-height: 1.3;
	max-width: 100%;
	min-height: 2rem;
	padding: 0.25rem 0.75rem;
	text-decoration: none;
}

.ngheduoc-terms-box__list a:hover,
.ngheduoc-terms-box__list a:focus-visible {
	border-color: var(--wp--preset--color--primary, #075985);
	text-decoration: underline;
}

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

/*
 * Frequently asked questions (ngheduoc/faq): one bordered row per question; the summary is the
 * question, with a plus that turns into a minus once open. 44px question rows (NFR-3).
 */
.ngheduoc-faq {
	box-sizing: border-box;
	margin-block: var(--wp--preset--spacing--50, 2rem);
}

.ngheduoc-faq__heading {
	font-size: var(--wp--preset--font-size--large, 1.375rem);
	margin: 0 0 1rem;
}

.ngheduoc-faq__items {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

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

.ngheduoc-faq .wp-block-details {
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: var(--wp--custom--radius--card, 10px);
	box-sizing: border-box;
	padding: 0 1rem;
}

.ngheduoc-faq .wp-block-details[open] {
	background: var(--wp--preset--color--surface, #f2f7f7);
	padding-bottom: 0.75rem;
}

.ngheduoc-faq .wp-block-details > summary {
	align-items: center;
	color: var(--wp--preset--color--contrast, #16313d);
	cursor: pointer;
	display: flex;
	font-weight: 600;
	gap: 1rem;
	justify-content: space-between;
	list-style: none;
	min-height: 44px;
	padding: 0.5rem 0;
}

.ngheduoc-faq .wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.ngheduoc-faq .wp-block-details > summary::after {
	color: var(--wp--preset--color--primary, #075985);
	content: "+";
	/* Decorative: an empty alternative text keeps "plus" out of the question's accessible name. */
	content: "+" / "";
	flex: none;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
}

.ngheduoc-faq .wp-block-details[open] > summary::after {
	content: "\2212";
	content: "\2212" / "";
}

.ngheduoc-faq .wp-block-details > summary:hover {
	color: var(--wp--preset--color--primary, #075985);
}

.ngheduoc-faq .wp-block-details > :not(summary) {
	margin-block: 0.5rem 0;
}

/*
 * Search results (PG-04 P1, FB-08). Tabs: one row of 44px pills that wraps on phones; the active tab
 * is filled with the accent (the darker teal that passes contrast as a background, DEC-10) and also
 * set in a heavier weight, so it does not rely on colour alone.
 */
.ngheduoc-search-tabs ul,
.ngheduoc-search-empty__types {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-search-tabs a,
.ngheduoc-search-empty__types a {
	align-items: center;
	border: 1px solid var(--wp--preset--color--border, #d5e1e3);
	border-radius: 999px;
	box-sizing: border-box;
	color: var(--wp--preset--color--contrast, #16313d);
	display: inline-flex;
	font-family: var(--wp--preset--font-family--ui, inherit);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	gap: 0.5rem;
	min-height: 44px;
	padding: 0 1rem;
	text-decoration: none;
}

.ngheduoc-search-tabs a:hover,
.ngheduoc-search-empty__types a:hover {
	border-color: var(--wp--preset--color--primary, #075985);
	color: var(--wp--preset--color--primary, #075985);
}

.ngheduoc-search-tabs a[aria-current="page"] {
	background: var(--wp--preset--color--accent, #0a7a6f);
	border-color: var(--wp--preset--color--accent, #0a7a6f);
	color: var(--wp--preset--color--on-accent, #fff);
	font-weight: 600;
}

.ngheduoc-search-tabs__count {
	background: var(--wp--preset--color--surface, #f2f7f7);
	border-radius: 999px;
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1;
	min-width: 1.5em;
	padding: 0.25rem 0.5rem;
	text-align: center;
}

.ngheduoc-search-tabs a[aria-current="page"] .ngheduoc-search-tabs__count {
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--accent, #0a7a6f);
}

.ngheduoc-search-empty__lead {
	font-weight: 600;
}

/* Type label of a legal document or an expert, where an article shows its category. */
.ngheduoc-result-type {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-family: var(--wp--preset--font-family--ui, inherit);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 0;
	text-transform: uppercase;
}

/* Legal document summary in a list: one short line each for number, issuer and status. */
.ngheduoc-legal-summary {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.5;
	margin: 0;
}

.ngheduoc-legal-summary > div + div {
	margin-top: 0.25rem;
}

.ngheduoc-legal-summary dt,
.ngheduoc-legal-summary dd {
	display: inline;
	margin: 0;
}

.ngheduoc-legal-summary dt {
	color: var(--wp--preset--color--muted, #5b6b74);
	margin-right: 0.375rem;
}

.ngheduoc-legal-summary dd {
	font-weight: 600;
}

/*
 * Term icon (FB-23): a 2.75rem square. A chosen image fills it; a built-in icon is a mask in the accent
 * colour on a tinted tile; a letter sits in the same tile.
 */
.ngheduoc-term-icon {
	align-items: center;
	background: color-mix(in srgb, var(--wp--preset--color--accent, #0a7a6f) 12%, transparent);
	border-radius: 8px;
	color: var(--wp--preset--color--accent, #0a7a6f);
	display: inline-flex;
	flex: none;
	height: 2.75rem;
	justify-content: center;
	overflow: hidden;
	width: 2.75rem;
}

.ngheduoc-term-icon--image {
	background: none;
}

.ngheduoc-term-icon__image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ngheduoc-term-icon__mask {
	background-color: currentcolor;
	height: 1.5rem;
	-webkit-mask: var(--ngheduoc-icon) center / contain no-repeat;
	mask: var(--ngheduoc-icon) center / contain no-repeat;
	width: 1.5rem;
}

.ngheduoc-term-icon__letter {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
}

/*
 * Ranked articles (FB-26): the list's own counter as a large rank number, then a square picture,
 * then title and date. 1 to 5 in the accent colour, the rest muted. Only "most read" is a ranking;
 * "latest" is a plain list of picture, title and date, without numbers (owner, 2026-10-28).
 */
.ngheduoc-ranked {
	counter-reset: ngheduoc-rank;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ngheduoc-ranked__item {
	align-items: flex-start;
	counter-increment: ngheduoc-rank;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: 1.5rem 4.5rem minmax(0, 1fr);
}

.ngheduoc-ranked__item::before {
	color: var(--wp--preset--color--accent, #0a7a6f);
	content: counter(ngheduoc-rank);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
}

.ngheduoc-ranked--latest .ngheduoc-ranked__item {
	grid-template-columns: 4.5rem minmax(0, 1fr);
}

.ngheduoc-ranked--latest .ngheduoc-ranked__item::before {
	content: none;
}

.ngheduoc-ranked__image {
	aspect-ratio: 1;
	border-radius: 6px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.ngheduoc-ranked__image--empty {
	background: var(--wp--preset--color--border, #d5e1e3);
}

.ngheduoc-ranked__title {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 0.25rem;
}

.ngheduoc-ranked__title a {
	color: var(--wp--preset--color--contrast, #16313d);
	text-decoration: none;
}

.ngheduoc-ranked__title a:hover,
.ngheduoc-ranked__title a:focus-visible {
	color: var(--wp--preset--color--primary, #075985);
	text-decoration: underline;
}

.ngheduoc-ranked__date {
	color: var(--wp--preset--color--muted, #5b6b74);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}
