/* ==========================================================================
   NabiMakes — projects.css
   Projects archive, taxonomy archives, and single Project detail styles.
   Loaded only on: nm_project archive, Project taxonomy archives,
   single nm_project, and editor contexts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ARCHIVE HEADER
   -------------------------------------------------------------------------- */

/* Page-header band sits flush under the sticky site header — remove the root
   block-gap that the flow layout adds above <main>. */
.nm-archive-main {
	margin-block-start: 0;
}

/* The archive header band, breadcrumb, title, description, and view-all link
   are shared across every archive page — see archives.css
   (.nm-archive-header*, .nm-breadcrumb). */

/* --------------------------------------------------------------------------
   2. ARCHIVE LAYOUT — 2-column (filters + results)
   -------------------------------------------------------------------------- */

.nm-project-archive-layout {
	display: grid;
	grid-template-columns: 264px minmax(0, 1fr);
	gap: clamp(1.75rem, 3vw, 3rem);
	align-items: start;
	max-width: var(--wp--style--global--wide-size, 1280px);
	margin-inline: auto;
	padding-block: var(--wp--preset--spacing--60);
	padding-inline: var(--nm-page-gutter);
}

.nm-project-archive-layout.is-layout-flex {
	display: grid !important;
	grid-template-columns: 264px minmax(0, 1fr);
}

.nm-project-archive-results {
	min-width: 0;
}

/* --------------------------------------------------------------------------
   3. FILTER RAIL — desktop sticky sidebar
   -------------------------------------------------------------------------- */

.nm-project-filter-rail {
	position: sticky;
	top: calc(var(--nm-header-height, 64px) + var(--wp--preset--spacing--40));
	max-height: calc(100dvh - var(--nm-header-height, 64px) - var(--wp--preset--spacing--60));
	overflow-y: auto;
	padding-right: var(--wp--preset--spacing--20);
}

/* --------------------------------------------------------------------------
   4. FILTER FORM
   -------------------------------------------------------------------------- */

.nm-project-filter-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.nm-project-filter-form__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--40);
}

.nm-project-filter-form__header > span {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--deep-teal);
}

.nm-project-filter-clear {
	padding: 0;
	border: 0;
	background: transparent;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--signal-red);
	text-decoration: none;
}

.nm-project-filter-form__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--20);
}

.nm-project-filter-submit {
	width: 100%;
	justify-content: center;
	padding: 0.625rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}

/* --------------------------------------------------------------------------
   5. FILTER GROUPS & CHIPS
   -------------------------------------------------------------------------- */

.nm-project-filter-group {
	border: 0;
	border-block-start: 1px solid var(--wp--preset--color--default-border);
	padding: var(--wp--preset--spacing--40) 0;
	margin: 0;
}

.nm-project-filter-group__legend {
	/* Float the legend out of its default straddle over the fieldset border so
	   the group divider line sits cleanly above the label (matches design). */
	float: left;
	width: 100%;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	color: var(--wp--preset--color--muted-text);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: var(--wp--preset--spacing--30);
	padding: 0;
}

.nm-project-filter-group__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	clear: both;
}

.nm-project-filter-chip {
	display: flex;
	align-items: center;
}

.nm-project-filter-chip__input {
	/* Visually hide the native checkbox while keeping it accessible */
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.nm-project-filter-chip__label {
	font-family: var(--wp--preset--font-family--body);
}

.nm-project-filter-chip__input:focus-visible + .nm-project-filter-chip__label {
	outline: 2px solid var(--wp--preset--color--workshop-teal);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   6. MOBILE FILTER TRIGGER
   Default: hidden. Shown via .nm-filters-js class on <html> (added by view.js).
   -------------------------------------------------------------------------- */

.nm-project-filter-trigger {
	display: none;
	cursor: pointer;
	min-block-size: 42px;
}

.nm-project-filter-trigger__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.25rem;
	border-radius: 100px;
	background-color: var(--wp--preset--color--signal-red);
	color: var(--wp--preset--color--studio-white);
	font-size: 0.625rem;
	font-weight: 700;
	font-family: var(--wp--preset--font-family--mono);
}

/* --------------------------------------------------------------------------
   7. MOBILE FILTER DIALOG
   -------------------------------------------------------------------------- */

.nm-project-filter-dialog {
	position: fixed;
	inset: auto 0 0 0;
	width: 100%;
	max-width: 100%;
	max-height: 82vh;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 16px 16px 0 0;
	background: var(--wp--preset--color--studio-white);
	box-shadow: 0 -4px 24px rgba(16, 40, 42, 0.12);
	overflow: hidden;
}

.nm-project-filter-dialog::backdrop {
	background: rgba(16, 40, 42, 0.4);
}

.nm-project-filter-dialog__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	max-height: 82vh;
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.nm-project-filter-dialog__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-block-end: 1px solid var(--wp--preset--color--default-border);
	flex-shrink: 0;
}

.nm-project-filter-dialog__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--heading-4);
	color: var(--wp--preset--color--deep-teal);
}

.nm-project-filter-dialog__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: 1.25rem;
	color: var(--wp--preset--color--deep-teal);
	cursor: pointer;
}

.nm-project-filter-dialog__close:hover {
	color: var(--wp--preset--color--signal-red);
}

.nm-project-filter-dialog__close:focus-visible {
	outline: 2px solid var(--wp--preset--color--workshop-teal);
	outline-offset: 2px;
}

.nm-project-filter-dialog__content {
	overflow-y: auto;
	flex: 1;
	padding: 0 var(--wp--preset--spacing--50);
}

.nm-project-filter-dialog .nm-project-filter-form {
	min-height: 100%;
}

.nm-project-filter-dialog .nm-project-filter-form__actions {
	position: sticky;
	bottom: 0;
	z-index: 1;
	margin-inline: calc(var(--wp--preset--spacing--50) * -1);
	margin-top: auto;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-block-start: 1px solid var(--wp--preset--color--default-border);
	background: var(--wp--preset--color--studio-white);
}

.nm-project-filter-dialog .nm-project-filter-clear,
.nm-project-filter-dialog .nm-project-filter-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	border-radius: 6px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.nm-project-filter-dialog .nm-project-filter-clear {
	flex: 1;
	border: 1px solid var(--wp--preset--color--default-border);
	background: var(--wp--preset--color--white-surface);
	color: var(--wp--preset--color--deep-teal);
}

.nm-project-filter-dialog .nm-project-filter-submit {
	flex: 2;
	width: auto;
	border-color: var(--wp--preset--color--signal-red);
	background: var(--wp--preset--color--signal-red);
	color: var(--wp--preset--color--white-surface);
}

/* Reduced motion: no slide animation on dialog */
@media (prefers-reduced-motion: no-preference) {
	.nm-project-filter-dialog {
		animation: nm-dialog-slide-up 250ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
	}

	@keyframes nm-dialog-slide-up {
		from { transform: translateY(100%); opacity: 0; }
		to { transform: translateY(0); opacity: 1; }
	}
}

/* --------------------------------------------------------------------------
   8. RESULT SUMMARY
   -------------------------------------------------------------------------- */

.nm-project-results-summary {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted-text);
	margin: 0 0 var(--wp--preset--spacing--40);
	font-family: var(--wp--preset--font-family--mono);
}

.nm-project-results-summary__filtered {
	font-style: normal;
	color: var(--wp--preset--color--workshop-teal);
}

/* --------------------------------------------------------------------------
   9. ARCHIVE GRID — Project cards
   -------------------------------------------------------------------------- */

.wp-block-post-template.is-layout-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px 24px;
}

/* Base project-card component. Lives here (not archives.css) because
   projects.css loads in every Project-card context: project archive, single
   Project (related projects), and Project taxonomy listings. */
.nm-project-card {
	min-width: 0;
	display: flex;
	flex-direction: column;
	color: var(--wp--preset--color--deep-teal);
	text-decoration: none;
}

.nm-project-card__media {
	position: relative;
	margin-bottom: var(--wp--preset--spacing--40);
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: var(--nm-radius-card);
	background: var(--wp--preset--color--subtle-surface);
}

.nm-project-card__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0;
	transition: transform var(--nm-transition-base) var(--nm-ease-standard);
}

.nm-project-card__number {
	position: absolute;
	top: var(--wp--preset--spacing--30);
	left: var(--wp--preset--spacing--30);
	z-index: 1;
	border-radius: 4px;
	background: color-mix(in srgb, var(--wp--preset--color--studio-white) 78%, transparent);
	color: var(--wp--preset--color--workshop-teal);
	padding: 0.125rem 0.375rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nm-project-card__meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--20);
}

.nm-project-card__category {
	color: var(--wp--preset--color--signal-red);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.nm-project-card__meta {
	color: var(--wp--preset--color--muted-text);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	font-weight: 500;
}

.nm-project-card__title {
	margin: 0 0 var(--wp--preset--spacing--20);
}

.nm-project-card__description {
	margin: 0 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted-text);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

.nm-project-card__action {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: auto;
	color: var(--wp--preset--color--workshop-teal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration-line: underline;
	text-underline-offset: 0.22em;
}

.nm-project-card__action::after {
	content: "->";
	transition: transform var(--nm-transition-fast) var(--nm-ease-standard);
}

@media (hover: hover) {
	.nm-project-card:hover .nm-project-card__action::after {
		transform: translateX(0.2rem);
	}

	.nm-project-card:hover .nm-project-card__media img {
		transform: scale(1.03);
	}

	.nm-project-card:hover .nm-project-card__media {
		border-color: var(--wp--preset--color--workshop-teal);
	}
}

.nm-project-card-block .nm-project-card__badges {
	position: absolute;
	top: var(--wp--preset--spacing--20);
	right: var(--wp--preset--spacing--20);
	display: flex;
	gap: 0.25rem;
}

.nm-project-card__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 5px;
	background: color-mix(in srgb, var(--wp--preset--color--deep-teal) 82%, transparent);
	color: var(--wp--preset--color--studio-white);
	backdrop-filter: blur(4px);
}

.nm-project-card__badge svg {
	display: block;
}

.nm-project-card__difficulty {
	font-size: var(--wp--preset--font-size--technical-xs);
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--muted-text);
	background: var(--wp--preset--color--subtle-surface);
	border-radius: 4px;
	padding: 0.125rem 0.375rem;
}

/* Archive & model-kit variants: difficulty is plain mono text (no pill). */
.nm-project-card--archive .nm-project-card__difficulty,
.nm-project-card--model-kit .nm-project-card__difficulty {
	background: none;
	border-radius: 0;
	padding: 0;
}

/* Archive & model-kit variants: title matches the design (Barlow 600, ~24px). */
.nm-project-card--archive .nm-project-card__title,
.nm-project-card--model-kit .nm-project-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	line-height: 1.05;
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.5rem);
}

/* Archive & model-kit variants: meta + call to action share one bottom row. */
.nm-project-card--archive .nm-project-card__footer,
.nm-project-card--model-kit .nm-project-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	margin-top: auto;
}

.nm-project-card--archive .nm-project-card__footer .nm-project-card__meta,
.nm-project-card--model-kit .nm-project-card__footer .nm-project-card__meta {
	margin: 0;
}

.nm-project-card--archive .nm-project-card__footer .nm-project-card__action,
.nm-project-card--model-kit .nm-project-card__footer .nm-project-card__action {
	margin-top: 0;
	text-decoration: none;
}

/* Model-kit cards: scale badge sits opposite the project number (top-right). */
.nm-project-card__scale {
	position: absolute;
	top: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	z-index: 1;
	border-radius: 4px;
	background: color-mix(in srgb, var(--wp--preset--color--deep-teal) 82%, transparent);
	color: var(--wp--preset--color--studio-white);
	padding: 0.125rem 0.4375rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	font-weight: 500;
	letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   10. PAGINATION — Load more builds
   -------------------------------------------------------------------------- */

.nm-project-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--60);
}

.nm-load-more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.75rem;
	border: 1px solid var(--wp--preset--color--deep-teal);
	border-radius: 6px;
	background: transparent;
	color: var(--wp--preset--color--deep-teal);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
	min-block-size: 2.75rem;
}

.nm-load-more:hover {
	background-color: var(--wp--preset--color--deep-teal);
	color: var(--wp--preset--color--studio-white);
	text-decoration: none;
}

.nm-load-more:focus-visible {
	outline: 2px solid var(--wp--preset--color--workshop-teal);
	outline-offset: 2px;
}

.nm-load-more__count {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	opacity: 0.7;
}

.nm-prev-builds {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted-text);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   11. NO-RESULTS STATE
   -------------------------------------------------------------------------- */

.nm-project-empty {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	text-align: center;
	background: var(--wp--preset--color--subtle-surface);
	border-radius: 8px;
}

.nm-project-empty__heading {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--heading-3);
	font-weight: 600;
	color: var(--wp--preset--color--deep-teal);
	margin: 0 0 var(--wp--preset--spacing--20);
}

.nm-project-empty__message {
	color: var(--wp--preset--color--muted-text);
	margin: 0 0 var(--wp--preset--spacing--40);
}

/* --------------------------------------------------------------------------
   12. PROJECT HEADER (single project)
   -------------------------------------------------------------------------- */

/* Single-project layout tokens (design: Makers Project.dc.html). */
.nm-single-project-main {
	--nm-content-gutter: clamp(1.5rem, 5vw, 2.5rem);
	--nm-prose-ink: var(--wp--preset--color--prose-ink);
	--nm-mistake-surface: var(--wp--preset--color--mistake-surface);
	--nm-mistake-border: var(--wp--preset--color--mistake-border);
	--nm-mistake-ink: var(--wp--preset--color--mistake-ink);

	/* Flush under the sticky site header — drop the root flow block-gap. */
	margin-block-start: 0;
}

/* Header sits on the plain studio canvas (no band, no divider). */
.nm-project-header {
	padding-block: 0;
}

/* Text column constrains to 880; the hero is a wider sibling (1080). */
.nm-project-header__inner {
	max-width: 880px;
	margin-inline: auto;
	padding-inline: var(--nm-content-gutter);
	padding-block-start: clamp(2rem, 4vw, 3.5rem);
}

.nm-project-header__breadcrumb {
	margin-bottom: 1.625rem;
}

.nm-project-header__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.875rem;
	margin-bottom: 1.125rem;
}

/* Primary type term renders as a solid red category badge. */
.nm-project-header__label {
	display: inline-flex;
	align-items: center;
	min-block-size: 26px;
	padding: 0 11px;
	border-radius: 5px;
	background: var(--wp--preset--color--signal-red);
	color: var(--wp--preset--color--white-surface);
	font-family: var(--wp--preset--font-family--body);
	font-size: 12px;
	font-weight: 600;
}

.nm-project-header__number {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--muted-text);
}

.nm-project-header__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.75rem, 6vw, 5.125rem);
	font-weight: 700;
	line-height: 0.96;
	color: var(--wp--preset--color--deep-teal);
	margin: 0 0 1.25rem;
}

.nm-project-header__summary {
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	line-height: 1.5;
	color: var(--wp--preset--color--muted-text);
	max-width: 40ch;
	margin: 0 0 2rem;
}

.nm-project-header__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 0;
}

.nm-project-header__action {
	display: inline-flex;
	align-items: center;
	gap: 0.5625rem;
	height: 50px;
	padding: 0 22px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

/* Icons are drawn via masked pseudo-elements so the render stays markup-light. */
.nm-project-header__action::before {
	content: "";
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	background-color: currentColor;
	-webkit-mask: center / contain no-repeat;
	mask: center / contain no-repeat;
}

.nm-project-header__action--video {
	background-color: var(--wp--preset--color--signal-red);
	color: var(--wp--preset--color--white-surface);
}

.nm-project-header__action--video::before {
	width: 1.25rem;
	height: 1.25rem;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.nm-project-header__action--video:hover {
	background-color: var(--wp--preset--color--primary-hover);
	color: var(--wp--preset--color--white-surface);
	text-decoration: none;
}

.nm-project-header__action--downloads {
	border: 1px solid var(--wp--preset--color--deep-teal);
	color: var(--wp--preset--color--deep-teal);
}

.nm-project-header__action--downloads::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M8 11l4 4 4-4M5 21h14'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M8 11l4 4 4-4M5 21h14'/%3E%3C/svg%3E");
}

.nm-project-header__action--downloads:hover {
	background-color: var(--wp--preset--color--deep-teal);
	color: var(--wp--preset--color--studio-white);
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   13. HERO IMAGE
   -------------------------------------------------------------------------- */

.nm-project-hero {
	width: min(1080px, 100% - var(--nm-content-gutter) - var(--nm-content-gutter));
	margin: clamp(2rem, 4vw, 3rem) auto 0;
}

.nm-project-hero__image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 12px;
	background: var(--wp--preset--color--subtle-surface);
}

.nm-project-hero__caption {
	font-size: var(--wp--preset--font-size--technical-xs);
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--muted-text);
	margin-top: 0.75rem;
	display: block;
}

/* --------------------------------------------------------------------------
   14. SPECIFICATIONS STRIP
   -------------------------------------------------------------------------- */

/* Single bordered white card. Cells are divided by 1px grid gaps that reveal
   the card's border-colored background — robust as columns wrap responsively. */
.nm-project-specifications {
	display: grid;
	gap: 1px;
	width: min(1080px, 100% - var(--nm-content-gutter) - var(--nm-content-gutter));
	margin: clamp(2.5rem, 5vw, 4rem) auto 0;
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 10px;
	overflow: hidden;
	background: var(--wp--preset--color--default-border);
}

.nm-project-specifications--1-items { grid-template-columns: 1fr; }
.nm-project-specifications--2-items { grid-template-columns: repeat(2, 1fr); }
.nm-project-specifications--3-items { grid-template-columns: repeat(3, 1fr); }
.nm-project-specifications--4-items { grid-template-columns: repeat(4, 1fr); }
.nm-project-specifications--5-items { grid-template-columns: repeat(5, 1fr); }

.nm-project-specification {
	padding: clamp(1rem, 2vw, 1.375rem) 1.25rem;
	background: var(--wp--preset--color--white-surface);
}

.nm-project-specification__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted-text);
	margin: 0 0 0.5rem;
}

.nm-project-specification__value {
	font-size: 17px;
	font-weight: 600;
	color: var(--wp--preset--color--deep-teal);
	margin: 0;
}

/* Project number cell reads as a mono catalogue figure. */
.nm-project-spec--number .nm-project-specification__value {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
	font-size: 18px;
}

/* --------------------------------------------------------------------------
   15. PROJECT PROSE — editorial story content
   -------------------------------------------------------------------------- */

.nm-project-prose-section {
	padding-block: var(--wp--preset--spacing--50);
}

/* Editorial prose typography (post-content body) — matches the design. */
.nm-single-project-main .wp-block-post-content p {
	font-size: 17px;
	line-height: 1.72;
	color: var(--nm-prose-ink);
}

.nm-single-project-main .wp-block-post-content h2 {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(1.75rem, 3vw, 2.375rem);
	line-height: 1.05;
	margin-block: 0 1.25rem;
}

/* Numbered build step — 40×40 teal index square, hanging at the left. */
.is-style-nm-project-step,
.nm-project-step {
	position: relative;
	padding: 0 0 2.75rem 56px;
	margin-block: 0;
	background: none;
	border: 0;
	border-radius: 0;
}

/* Scoped above .wp-block-post-content p so the white mono number is not
   overridden by the body-prose paragraph rule. */
.nm-single-project-main .wp-block-post-content .nm-project-step__number {
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--wp--preset--color--deep-teal);
	color: var(--wp--preset--color--studio-white);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	margin: 0;
}

.nm-project-step :is(h3, .wp-block-heading) {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.1;
	margin: 0.375rem 0 0.75rem;
}

/* Body paragraphs only — never the index number. */
.nm-single-project-main .wp-block-post-content .nm-project-step p:not(.nm-project-step__number) {
	font-size: 16px;
	line-height: 1.7;
	color: var(--nm-prose-ink);
	margin: 0;
}

/* ───────────────────────────────────────────────────────────────────
   Build Process block (nabimakes/build-process + nabimakes/build-step).
   Self-contained, auto-numbered step list. The step number is a CSS
   counter rendered via ::before, so nothing is stored in markup and
   reordering re-numbers automatically. Mirrors the design's "Build
   process" section.
   ─────────────────────────────────────────────────────────────────── */
.nm-build-process {
	counter-reset: nm-build-step;
	max-width: 760px;
	margin-inline: auto;
	margin-block-start: clamp(3rem, 6vw, 5rem);
}

.nm-build-process__eyebrow,
.nm-single-project-main .wp-block-post-content .nm-build-process__eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--workshop-teal);
}

.nm-build-process__eyebrow::before {
	content: "";
	flex: 0 0 auto;
	width: 24px;
	height: 1px;
	background: var(--wp--preset--color--soft-brass);
}

.nm-build-process__heading,
.nm-single-project-main .wp-block-post-content .nm-build-process__heading {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(1.75rem, 3vw, 2.375rem);
	line-height: 1.05;
	margin: 0 0 8px;
}

.nm-build-process__steps {
	margin-top: 32px;
}

.nm-build-step {
	position: relative;
	counter-increment: nm-build-step;
	padding: 0 0 44px 56px;
	margin-block: 0;
}

.nm-build-step::before {
	content: counter(nm-build-step, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--wp--preset--color--deep-teal);
	color: var(--wp--preset--color--studio-white);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 14px;
	font-weight: 400;
}

.nm-build-step__title,
.nm-single-project-main .wp-block-post-content .nm-build-step__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.1;
	margin: 6px 0 12px;
}

.nm-build-step__body > * {
	margin-block: 0;
}

.nm-build-step__body > * + * {
	margin-block-start: 1rem;
}

.nm-build-step__body p,
.nm-single-project-main .wp-block-post-content .nm-build-step__body p {
	font-size: 16px;
	line-height: 1.7;
	color: var(--nm-prose-ink);
}

/* Editorial callouts — measurement (brass), mistake (red), heads-up (teal). */
.is-style-nm-project-measurement,
.nm-project-measurement,
.is-style-nm-project-warning,
.nm-project-warning {
	padding: 18px 20px;
	background: var(--wp--preset--color--white-surface);
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 8px;
	margin-block: 1.5rem;
}

.is-style-nm-project-measurement,
.nm-project-measurement {
	border-left: 3px solid var(--wp--preset--color--soft-brass);
}

.is-style-nm-project-warning,
.nm-project-warning {
	border-left: 3px solid var(--wp--preset--color--workshop-teal);
}

.is-style-nm-project-mistake,
.nm-project-mistake {
	padding: 20px 22px;
	background: var(--nm-mistake-surface);
	border: 1px solid var(--nm-mistake-border);
	border-left: 3px solid var(--wp--preset--color--signal-red);
	border-radius: 8px;
	margin-block: 1.5rem;
}

/* Labels are scoped above .wp-block-post-content p so their accent color,
   size, and spacing survive the body-prose paragraph rule. */
.nm-single-project-main .wp-block-post-content .nm-project-measurement__label,
.nm-single-project-main .wp-block-post-content .nm-project-mistake__label,
.nm-single-project-main .wp-block-post-content .nm-project-warning__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 0.4375rem;
}

.nm-single-project-main .wp-block-post-content .nm-project-measurement__label {
	color: var(--wp--preset--color--soft-brass);
}

.nm-single-project-main .wp-block-post-content .nm-project-warning__label {
	color: var(--wp--preset--color--workshop-teal);
}

.nm-single-project-main .wp-block-post-content .nm-project-mistake__label {
	color: var(--wp--preset--color--signal-red);
}

/* Body paragraphs only — never the accent label. */
.nm-single-project-main .wp-block-post-content .nm-project-measurement p:not(.nm-project-measurement__label),
.nm-single-project-main .wp-block-post-content .nm-project-warning p:not(.nm-project-warning__label) {
	font-size: 15px;
	line-height: 1.6;
	color: var(--nm-prose-ink);
	margin: 0;
}

.nm-single-project-main .wp-block-post-content .nm-project-mistake p:not(.nm-project-mistake__label) {
	font-size: 15px;
	line-height: 1.65;
	color: var(--nm-mistake-ink);
	margin: 0;
}

/* ───────────────────────────────────────────────────────────────────
   Callout block (nabimakes/callout) — three variants in one block, each
   with a built-in icon, accent border, and label. Tokens are referenced
   directly (not the .nm-single-project-main-scoped --nm-* aliases) so the
   panel renders correctly in the editor canvas too.
   ─────────────────────────────────────────────────────────────────── */
.nm-callout {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 20px;
	margin-block: 1.5rem;
	background: var(--wp--preset--color--white-surface);
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 8px;
}

.nm-callout__icon {
	flex: 0 0 auto;
	margin-top: 1px;
}

.nm-callout__content {
	min-width: 0;
}

.nm-callout--measurement {
	border-left: 3px solid var(--wp--preset--color--soft-brass);
}

.nm-callout--measurement .nm-callout__icon {
	color: var(--wp--preset--color--soft-brass);
}

.nm-callout--heads-up {
	gap: 14px;
	border-left: 3px solid var(--wp--preset--color--workshop-teal);
}

.nm-callout--heads-up .nm-callout__icon {
	color: var(--wp--preset--color--workshop-teal);
}

.nm-callout--mistake {
	padding: 20px 22px;
	background: var(--wp--preset--color--mistake-surface);
	border: 1px solid var(--wp--preset--color--mistake-border);
	border-left: 3px solid var(--wp--preset--color--signal-red);
}

.nm-callout--mistake .nm-callout__icon {
	color: var(--wp--preset--color--signal-red);
}

/* Label + body are scoped above .wp-block-post-content p so their accent
   colour, size, and spacing survive the body-prose paragraph rule. */
.nm-callout__label,
.nm-single-project-main .wp-block-post-content .nm-callout__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 0.4375rem;
}

.nm-callout--measurement .nm-callout__label {
	color: var(--wp--preset--color--soft-brass);
}

.nm-callout--heads-up .nm-callout__label {
	color: var(--wp--preset--color--workshop-teal);
}

.nm-callout--mistake .nm-callout__label {
	color: var(--wp--preset--color--signal-red);
}

.nm-callout__body,
.nm-single-project-main .wp-block-post-content .nm-callout__body {
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--preset--color--prose-ink);
	margin: 0;
}

.nm-callout--mistake .nm-callout__body,
.nm-single-project-main .wp-block-post-content .nm-callout--mistake .nm-callout__body {
	line-height: 1.65;
	color: var(--wp--preset--color--mistake-ink);
}

/* Paired build images — two-up, collapsing to one column on tablet. */
.is-style-nm-project-media-pair,
.nm-project-media-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Resource Details accordion style — kept for backwards-compat with any
   existing project content that still uses core/details + is-style-nm-project-resource. */
.is-style-nm-project-resource {
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 6px;
	padding: 0;
	overflow: hidden;
	margin-block: 0.5rem;
}

.is-style-nm-project-resource summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--deep-teal);
	cursor: pointer;
	min-block-size: 2.75rem;
	list-style: none;
}

.is-style-nm-project-resource summary::-webkit-details-marker {
	display: none;
}

.is-style-nm-project-resource summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1rem;
	color: var(--wp--preset--color--muted-text);
}

.is-style-nm-project-resource[open] summary::after {
	content: "−";
}

.is-style-nm-project-resource summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--workshop-teal);
	outline-offset: -2px;
}

.is-style-nm-project-resource > *:not(summary) {
	padding: 0 var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
}

/* --------------------------------------------------------------------------
   16. TOOLS & MATERIALS BLOCK
   -------------------------------------------------------------------------- */

.nm-tools-and-materials {
	margin-block: var(--wp--preset--spacing--60);
}

.nm-tools-and-materials__heading {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(1.75rem, 3vw, 2.375rem);
	line-height: 1.05;
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--deep-teal);
}

.nm-tools-and-materials__card {
	counter-reset: nm-tools-section;
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 10px;
	overflow: hidden;
	background: var(--wp--preset--color--white-surface);
}

/* Section panels */

.nm-tools-section {
	counter-increment: nm-tools-section;
	border-bottom: 1px solid var(--wp--preset--color--default-border);
}

.nm-tools-section:last-child {
	border-bottom: none;
}

.nm-tools-section summary,
.nm-tools-section__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	background: none;
	border: none;
	cursor: pointer;
	list-style: none;
}

.nm-tools-section summary::-webkit-details-marker {
	display: none;
}

.nm-tools-section summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--workshop-teal);
	outline-offset: -2px;
}

.nm-tools-section__header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nm-tools-section__index {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: var(--wp--preset--color--soft-brass);
}

.nm-tools-section__index::before {
	content: counter(nm-tools-section, decimal-leading-zero);
}

.nm-tools-section__label {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--wp--preset--color--deep-teal);
}

.nm-tools-section__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted-text);
}

.nm-tools-section__chevron {
	color: var(--wp--preset--color--workshop-teal);
	transition: transform 0.2s ease;
	display: inline-flex;
}

.nm-tools-section[open] .nm-tools-section__chevron {
	transform: rotate(180deg);
}

.nm-tools-section__content {
	padding: 0 20px 20px 52px;
}

/* List items inside each section */

.nm-tools-section__content .wp-block-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.nm-tools-section__content .wp-block-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--prose-ink);
}

.nm-tools-section__content .wp-block-list li::before {
	content: '';
	flex-shrink: 0;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--wp--preset--color--workshop-teal);
	margin-top: 0.45em;
}

/* Editor-only: always-open layout for section edit views */

.nm-tools-section--editor .nm-tools-section__summary {
	border-bottom: 1px solid var(--wp--preset--color--default-border);
}

/* --------------------------------------------------------------------------
   17. PROJECT VIDEO BLOCK
   -------------------------------------------------------------------------- */

.nm-project-video {
	/* Self-constrain so the panel stays centred and gutter-aligned whether it
	   renders inside the constrained post-content or as a direct child of the
	   flow-layout single-project main (the fixed fallback position). */
	width: min(1080px, 100% - var(--nm-content-gutter) - var(--nm-content-gutter));
	margin-block: var(--wp--preset--spacing--60);
	margin-inline: auto;
}

.nm-project-video__panel {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--soft-brass) 25%, transparent);
	background: radial-gradient(
		120% 130% at 50% 0%,
		color-mix(in srgb, var(--wp--preset--color--deep-teal) 85%, var(--wp--preset--color--white-surface)),
		var(--wp--preset--color--deep-teal)
	);
	max-width: 1080px;
}

.nm-project-video__media {
	position: absolute;
	inset: 0;
	opacity: 0.34;
}

.nm-project-video__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nm-project-video__overlay {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--wp--preset--color--studio-white);
}

/* Label sits top-left, duration bottom-right, play button centered. */
.nm-project-video__label {
	position: absolute;
	left: 18px;
	top: 16px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--soft-brass);
}

.nm-project-video__play {
	display: grid;
	place-items: center;
	color: var(--wp--preset--color--studio-white);
	text-decoration: none;
}

.nm-project-video__play:hover {
	text-decoration: none;
}

.nm-project-video__play-icon {
	display: grid;
	place-items: center;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: var(--wp--preset--color--signal-red);
	box-shadow: 0 8px 28px color-mix(in srgb, var(--wp--preset--color--deep-teal) 55%, transparent);
	color: var(--wp--preset--color--studio-white);
}

.nm-project-video__play:hover .nm-project-video__play-icon {
	background: var(--wp--preset--color--primary-hover);
}

/* Centred red disc is self-explanatory; the link keeps an aria-label. */
.nm-project-video__play-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.nm-project-video__duration {
	position: absolute;
	right: 16px;
	bottom: 14px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	color: var(--wp--preset--color--studio-white);
	background: color-mix(in srgb, var(--wp--preset--color--deep-teal) 60%, transparent);
	padding: 3px 8px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: no-preference) {
	.nm-project-video__play:hover .nm-project-video__play-icon {
		transform: scale(1.08);
		transition: transform 200ms ease;
	}
}

/* --------------------------------------------------------------------------
   17. PROJECT GALLERY
   -------------------------------------------------------------------------- */

.nm-project-gallery {
	/* Self-constrain so the gallery stays centred and gutter-aligned whether it
	   renders inside the constrained post-content or as a direct child of the
	   flow-layout single-project main (the fixed fallback position). */
	width: min(1080px, 100% - var(--nm-content-gutter) - var(--nm-content-gutter));
	margin-block: var(--wp--preset--spacing--50);
	margin-inline: auto;
}

.nm-project-gallery__stage {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 12px;
	background: var(--wp--preset--color--subtle-surface);
	margin: 0 0 0.875rem;
}

.nm-project-gallery__active-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nm-project-gallery--transitions .nm-project-gallery__active-image {
	transition: opacity 200ms ease;
}

.nm-project-gallery__caption {
	font-size: var(--wp--preset--font-size--technical-xs);
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--muted-text);
	margin: 0 0 0.875rem;
}

.nm-project-gallery__thumbnails {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.nm-project-gallery__thumbnail {
	flex: 1;
	min-width: 0;
	aspect-ratio: 16 / 10;
	padding: 0;
	border: 2px solid var(--wp--preset--color--default-border);
	border-radius: 8px;
	background: var(--wp--preset--color--subtle-surface);
	cursor: pointer;
	overflow: hidden;
	transition: border-color 150ms ease;
}

.nm-project-gallery__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nm-project-gallery__thumbnail--active,
.nm-project-gallery__thumbnail[aria-pressed="true"] {
	border-color: var(--wp--preset--color--signal-red);
}

.nm-project-gallery__thumbnail:hover {
	border-color: var(--wp--preset--color--workshop-teal);
}

.nm-project-gallery__thumbnail:focus-visible {
	outline: 2px solid var(--wp--preset--color--workshop-teal);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   18. PROJECT DOWNLOADS
   -------------------------------------------------------------------------- */

.nm-project-downloads {
	width: min(1080px, 100% - var(--nm-content-gutter) - var(--nm-content-gutter));
	margin: clamp(3rem, 6vw, 5rem) auto 0;
	padding-block: 0;
	border-block-start: 0;
}

/* Centered narrow header over the wide card grid (matches the design). */
.nm-project-downloads__header {
	max-width: 760px;
	margin: 0 auto 1.75rem;
}

.nm-project-downloads__kicker {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--workshop-teal);
	margin: 0 0 0.875rem;
}

.nm-project-downloads__kicker::before {
	content: "";
	width: 24px;
	height: 1px;
	background: var(--wp--preset--color--soft-brass);
}

.nm-project-downloads__heading {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.75rem, 3vw, 2.375rem);
	font-weight: 700;
	line-height: 1.05;
	color: var(--wp--preset--color--deep-teal);
	margin: 0;
}

.nm-project-download-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--wp--preset--spacing--40);
}

.nm-project-download-card {
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--default-border);
	border-radius: 10px;
	background: var(--wp--preset--color--white-surface);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.nm-project-download-card__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nm-project-download-card__type {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--muted-text);
}

.nm-project-download-card__free {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	padding: 0.125rem 0.5rem;
	background: rgba(31, 122, 77, 0.1);
	color: var(--wp--preset--color--status-success);
	border-radius: 4px;
}

.nm-project-download-card__meta {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.nm-project-download-card__version,
.nm-project-download-card__size {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--technical-xs);
	color: var(--wp--preset--color--muted-text);
}

.nm-project-download-card__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--wp--preset--color--deep-teal);
	margin: 0;
}

.nm-project-download-card__project,
.nm-project-download-card__description {
	font-size: var(--wp--preset--font-size--technical-xs);
	color: var(--wp--preset--color--muted-text);
	margin: 0;
}

.nm-project-download-card__details {
	font-size: var(--wp--preset--font-size--technical-xs);
	color: var(--wp--preset--color--muted-text);
	margin: 0;
}

.nm-project-download-card__details div {
	display: flex;
	gap: 0.375rem;
}

.nm-project-download-card__details dt {
	font-weight: 500;
}

.nm-project-download-card__action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: auto;
	height: 44px;
	border-radius: 6px;
	background: var(--wp--preset--color--deep-teal);
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--studio-white);
	text-decoration: none;
}

.nm-project-download-card__action:hover {
	background: var(--wp--preset--color--deep-teal-pressed);
	color: var(--wp--preset--color--studio-white);
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   19. RELATED PROJECTS
   -------------------------------------------------------------------------- */

/* Full-bleed subtle band; its content is centered to the wide-size (1280). */
.nm-related-projects {
	margin-block-start: clamp(3.5rem, 7vw, 7rem);
	padding-block: clamp(3rem, 6vw, 5.5rem);
	background: var(--wp--preset--color--subtle-surface);
	border-block-start: 1px solid var(--wp--preset--color--default-border);
}

.nm-related-projects__header,
.nm-related-projects__grid {
	max-width: var(--wp--style--global--wide-size, 1280px);
	margin-inline: auto;
	padding-inline: var(--nm-page-gutter);
}

.nm-related-projects__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1rem;
	margin-bottom: 2.25rem;
}

.nm-related-projects__heading {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--deep-teal);
	margin: 0;
}

.nm-related-projects__all {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--workshop-teal);
	white-space: nowrap;
	text-decoration: none;
}

.nm-related-projects__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* --------------------------------------------------------------------------
   20. RESPONSIVE — Tablet (≤960px)
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
	/* Archive layout: collapse to single column */
	.nm-project-archive-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	}

	.nm-project-archive-layout.is-layout-flex {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
	}

	/* Hide desktop filter rail, show mobile trigger (needs .nm-filters-js) */
	.nm-project-filters-block {
		grid-column: 2;
		grid-row: 1;
	}

	.nm-project-filter-rail {
		display: none;
	}

	.nm-filters-js .nm-project-filter-trigger {
		display: inline-flex;
	}

	.nm-project-filter-mobile-wrapper {
		display: flex;
		justify-content: flex-end;
	}

	/* Results bar: count and filter trigger share the first mobile row. */
	.nm-project-archive-results {
		display: contents;
	}

	.nm-project-results-summary {
		grid-column: 1;
		grid-row: 1;
		align-self: center;
		margin-bottom: 0;
	}

	.nm-project-archive-results > .wp-block-query {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.nm-project-archive-results > .wp-block-nabimakes-project-archive-pagination {
		grid-column: 1 / -1;
	}

	/* Project grid: 2 columns */
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Specs: 2 columns */
	.nm-project-specifications--3-items,
	.nm-project-specifications--4-items,
	.nm-project-specifications--5-items {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Paired build images: single column */
	.is-style-nm-project-media-pair,
	.nm-project-media-pair {
		grid-template-columns: 1fr;
	}

	/* Related: 2 columns */
	.nm-related-projects__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Downloads: 1 column */
	.nm-project-download-grid {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   21. RESPONSIVE — Mobile compact (≤560px)
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
	/* Project grid: 1 column */
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr;
	}

	/* Specs: single column */
	.nm-project-specifications--2-items,
	.nm-project-specifications--3-items,
	.nm-project-specifications--4-items,
	.nm-project-specifications--5-items {
		grid-template-columns: 1fr;
	}

	/* Related: 1 column */
	.nm-related-projects__grid {
		grid-template-columns: 1fr;
	}

	/* Actions: full-width stacked buttons */
	.nm-project-header__action {
		flex: 1 1 100%;
		justify-content: center;
	}

	/* Gallery thumbnails wrap to two per row */
	.nm-project-gallery__thumbnail {
		flex: 1 1 calc(50% - 0.375rem);
	}
}

/* --------------------------------------------------------------------------
   22. ACCESSIBILITY — Focus and visually hidden
   -------------------------------------------------------------------------- */

/* Ensure .screen-reader-text is properly hidden */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* --------------------------------------------------------------------------
   23. EDITOR NOTICE
   -------------------------------------------------------------------------- */

.nm-block-editor-notice {
	padding: 1rem;
	border: 1px dashed var(--wp--preset--color--default-border);
	border-radius: 6px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted-text);
	background: var(--wp--preset--color--subtle-surface);
	margin: 0;
}
