/*
Theme Name: TT5 Atelier
Description: Tạp chí nghệ thuật: chữ serif, giấy ngà, đường kẻ đôi và điểm nhấn đất nung. Child theme của Twenty Twenty-Five, nội dung bài chỉ hiển thị ở trang chi tiết.
Author: Custom Studio
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tt5-atelier
Tags: blog, portfolio, news, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, translation-ready, wide-blocks
*/

/* The parent supplies content and functionality; the home layout adds a sidebar. */
:root {
	--atelier-ink: var(--wp--preset--color--contrast, #29251F);
	--atelier-paper: var(--wp--preset--color--base, #F8F4EC);
	--atelier-line: color-mix(in srgb, var(--atelier-ink) 16%, transparent);
	--atelier-tint: color-mix(in srgb, var(--atelier-ink) 5%, var(--atelier-paper));
	--atelier-radius: 18px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) {
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a, button, input, textarea, select):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 5px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(h1, h2, h3) {
	text-wrap: balance;
}

/* Existing header, including the original navigation and mobile overlay. */
.wp-site-blocks > .wp-block-template-part:first-child {
	border-top: 5px solid var(--atelier-ink);
	border-bottom: 1px solid var(--atelier-line);
}

.wp-site-blocks > .wp-block-template-part:first-child .wp-block-group.alignwide {
	min-height: 86px;
	box-sizing: border-box;
	gap: 24px;
}

.wp-site-blocks > .wp-block-template-part:first-child .wp-block-site-title {
	font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
	letter-spacing: -.055em;
	line-height: 1.2;
	min-width: 0;
}

.wp-block-navigation .wp-block-navigation-item__content {
	text-underline-offset: .35em;
}

.wp-site-blocks > .wp-block-template-part:first-child .wp-block-navigation-item__content {
	padding-block: 10px;
}

.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	border-color: var(--atelier-line);
	box-shadow: 0 12px 32px #29251F10;
}

/* Enlarge the existing page heading without adding marketing copy. */
body:where(.blog, .archive, .search) .wp-site-blocks > main > :where(h1, .wp-block-query-title) {
	max-width: var(--wp--style--global--wide-size);
	font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
	letter-spacing: -.04em;
	line-height: 1.08;
	padding-bottom: clamp(24px, 4vw, 48px);
	margin-bottom: 0;
	border-bottom: 1px solid var(--atelier-line);
}

body:where(.blog, .archive, .search) .wp-site-blocks > main > .wp-block-term-description {
	max-width: var(--wp--style--global--wide-size);
}

/* Restyle only the inherited primary feed; full article content stays visible. */
body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template {
	width: auto;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
	box-sizing: content-box;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post {
	margin-block-start: 28px;
	padding: clamp(22px, 4vw, 48px);
	border: 1px solid var(--atelier-line);
	border-radius: var(--atelier-radius);
	background: color-mix(in srgb, var(--atelier-paper) 72%, var(--atelier-surface));
	box-shadow: 0 6px 24px #29251F05;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group {
	/* Override the parent pattern's inline section padding, preserving its blocks. */
	padding-block: 0 !important;
	padding-inline: 0;
	margin-inline: 0;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group > * {
	max-width: 100%;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post .wp-block-post-title {
	font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem) !important;
	line-height: 1.2;
	letter-spacing: -.045em;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group > .wp-block-post-content {
	margin-inline: 0;
	padding-inline: 0;
	min-width: 0;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group > .wp-block-post-content > :where(.alignwide, .alignfull) {
	margin-inline: 0;
	max-width: 100%;
}

/* The parent reserves space for an empty no-results wrapper even with results. */
body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-group:not(:has(> *)) {
	padding-block: 0 !important;
	margin-block: 0;
}

body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post .wp-block-post-date {
	padding-top: 20px;
	border-top: 1px solid var(--atelier-line);
	letter-spacing: .02em;
}

/* Images keep their original aspect ratio and links. */
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-post-featured-image img {
	border-radius: 12px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(.wp-block-button__link, .wp-block-search__button, .wp-element-button) {
	transition: background-color .18s ease, box-shadow .18s ease;
}

:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-button__link:hover {
	box-shadow: 0 5px 16px #29251F18;
}

.wp-block-query-pagination {
	gap: 16px;
	padding-block: 24px;
	border-top: 1px solid var(--atelier-line);
}

.wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	border: 1px solid var(--atelier-line);
	border-radius: 50%;
	text-decoration: none;
}

.wp-block-query-pagination-numbers .current {
	background: var(--atelier-ink);
	color: var(--atelier-paper);
}

/* Single posts, search, and comments share the same visual language. */
.wp-block-post-content { line-height: 1.8; }
.wp-block-post-content > :where(p, ul, ol) { margin-block: 1.4em; }
.wp-block-post-content :where(img, video, iframe) { max-width: 100%; }
.wp-block-post-content :where(pre, .wp-block-table) { overflow-x: auto; }
.wp-block-post-terms a { white-space: normal; }

.wp-block-search .wp-block-search__input,
.wp-block-post-comments-form :where(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea) {
	box-sizing: border-box;
	max-width: 100%;
	padding: 14px 18px;
	border: 1px solid var(--atelier-line);
	border-radius: 10px;
	background: var(--atelier-paper);
	color: var(--atelier-ink);
	font: inherit;
}

.wp-block-search .wp-block-search__inside-wrapper { gap: 10px; }
.wp-block-search .wp-block-search__button { margin-inline-start: 0; }
.wp-block-comments { padding-block: 32px; border-top: 1px solid var(--atelier-line); }
.wp-block-comment-template > li { padding-block: 24px; border-bottom: 1px solid var(--atelier-line); }

/* Keep every footer column, logo, tagline, link, and original credit. */
.wp-site-blocks > .wp-block-template-part:last-child {
	margin-top: clamp(64px, 8vw, 112px);
	border-top: 1px solid var(--atelier-line);
	background: var(--atelier-tint);
}

.wp-site-blocks > .wp-block-template-part:last-child .wp-block-site-title {
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	letter-spacing: -.035em;
}

.wp-site-blocks > .wp-block-template-part:last-child .wp-block-navigation {
	font-size: .875rem;
}

.wp-site-blocks > .wp-block-template-part:last-child .wp-block-group.alignwide > .wp-block-group:last-child {
	padding-top: 24px;
	border-top: 1px solid var(--atelier-line);
}

@media (min-width: 960px) {
	body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group:has(> .wp-block-post-featured-image) {
		display: grid;
		grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
		column-gap: clamp(28px, 4vw, 56px);
		align-items: start;
	}

	body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group:has(> .wp-block-post-featured-image) > * {
		grid-column: 2;
		width: 100%;
		box-sizing: border-box;
		margin-inline: 0;
	}

	body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group:has(> .wp-block-post-featured-image) > .wp-block-post-featured-image {
		grid-column: 1;
		grid-row: 1 / span 3;
		margin-block: 0;
	}

	body:where(.blog, .archive, .search) main > .wp-block-query > .wp-block-post-template > .wp-block-post > .wp-block-group:has(> .wp-block-post-featured-image) > .wp-block-post-title {
		margin-top: 0;
	}
}

@media (max-width: 600px) {
	.wp-site-blocks > .wp-block-template-part:first-child .wp-block-group.alignwide { min-height: 76px; gap: 16px; }
	.wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding-block: 10px; }
	.wp-block-query-pagination { justify-content: flex-start; }
	.wp-block-search .wp-block-search__inside-wrapper { flex-wrap: wrap; }
	.wp-block-search .wp-block-search__input { flex-basis: 140px; min-width: 0; }
	.wp-site-blocks > .wp-block-template-part:last-child .wp-block-group.is-layout-flex { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	:where(.wp-site-blocks, .editor-styles-wrapper) :where(.wp-block-button__link, .wp-block-search__button, .wp-element-button) { transition: none; }
}

/* Studio home: an editorial masthead, responsive article grid, and live sidebar. */
.atelier-home {
	margin-block-start: 0;
}

.atelier-intro {
	position: relative;
	padding-block: clamp(36px, 5vw, 72px) 36px;
	border-bottom: 1px solid var(--atelier-line);
	background: radial-gradient(ellipse at 85% 12%, #E7C9A14d, transparent 48%);
}

.atelier-eyebrow {
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	line-height: 1.6;
}

.atelier-intro > .atelier-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.atelier-intro > .atelier-eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	background: currentColor;
}

.atelier-intro h1 {
	font-size: clamp(2.5rem, 1.75rem + 3vw, 4rem);
	line-height: 1.15;
	font-weight: 500;
	letter-spacing: -.045em;
	margin-block: 14px 24px;
}

.atelier-intro h1::after {
	content: "";
	display: inline-block;
	width: .11em;
	height: .11em;
	margin-inline-start: .08em;
	border-radius: 50%;
	background: #A04E2E;
}

.atelier-intro-bottom { gap: 16px 32px; }
.atelier-intro-bottom > p { margin: 0; font-size: .9375rem; }
.atelier-intro-bottom > p:first-child { max-width: 480px; color: var(--wp--preset--color--accent-4); }
.atelier-jump-link a { text-decoration: none; font-size: .875rem; font-weight: 600; }
.atelier-jump-link span { margin-inline-start: 20px; font-size: 1.4rem; }
.atelier-jump-link a:hover { text-decoration: underline; }

.atelier-home .atelier-home-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 270px;
	align-items: start;
	gap: 40px;
	margin-block-start: 40px;
}

.atelier-home-layout > * { min-width: 0; margin-block-start: 0; }
.atelier-section-heading { min-height: 40px; gap: 8px 20px; margin-bottom: 24px; }
.atelier-section-heading h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.04em; margin: 0; scroll-margin-top: 24px; }
.atelier-section-heading p { margin: 0; font-size: .75rem; color: var(--wp--preset--color--accent-4); text-transform: uppercase; letter-spacing: .1em; }

.atelier-feed > .wp-block-query,
.atelier-feed > .wp-block-query > .wp-block-post-template {
	margin-inline: 0;
	padding-inline: 0;
	max-width: 100%;
}

.atelier-feed > .wp-block-query > .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	border: 1px solid var(--atelier-line);
	border-radius: 14px;
	background: color-mix(in srgb, var(--atelier-paper) 30%, var(--atelier-surface));
	box-shadow: 0 4px 18px #29251F04;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:hover {
	border-color: color-mix(in srgb, var(--atelier-ink) 40%, transparent);
	box-shadow: 0 10px 28px #29251F0d;
}

/* Decorative covers only fill the space when a post has no featured image. */
.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:not(:has(.wp-block-post-featured-image img))::before {
	content: "";
	display: block;
	flex: 0 0 auto;
	aspect-ratio: 3 / 2;
	border-radius: 13px 13px 0 0;
	background:
		radial-gradient(circle at 72% 62%, transparent 0 29%, #E7C9A155 29.5% 30%, transparent 30.5% 40%, #E7C9A133 40.5% 41%, transparent 41.5%),
		linear-gradient(135deg, #29251F, #8A4528);
}

.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:nth-child(3n + 2):not(:has(.wp-block-post-featured-image img))::before {
	background:
		radial-gradient(circle at 30% 95%, #F8F4EC 0 25%, transparent 25.5%),
		radial-gradient(circle at 68% 40%, transparent 0 26%, #F8F4EC88 26.5% 27%, transparent 27.5%),
		linear-gradient(135deg, #A04E2E, #E7D7C7);
}

.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:nth-child(3n):not(:has(.wp-block-post-featured-image img))::before {
	background:
		linear-gradient(125deg, transparent 40%, #F8F4EC55 40.5% 60%, transparent 60.5%),
		linear-gradient(40deg, #8A4528, #E7C9A1);
}

.atelier-feed .wp-block-post > .wp-block-group {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 16px;
	/* The inherited pattern has inline padding intended for a full-width row. */
	padding: 22px !important;
	margin: 0;
	box-sizing: border-box;
	min-width: 0;
}

.atelier-feed .wp-block-post > .wp-block-group > * {
	margin: 0;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}

.atelier-feed .wp-block-post > .wp-block-group > .wp-block-post-featured-image {
	width: calc(100% + 44px);
	max-width: none;
	margin: -22px -22px 4px;
	/* WordPress constrained layouts apply automatic inline margins with !important. */
	margin-inline: -22px !important;
}

.atelier-feed .wp-block-post-featured-image img { border-radius: 13px 13px 0 0; }
/* Match the parent pattern’s explicit font-size preset without changing its blocks. */
.atelier-feed .wp-block-post-title { font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem) !important; line-height: 1.4; letter-spacing: -.02em; font-weight: 600; }
.atelier-feed .wp-block-post-content { padding-inline: 0; font-size: 1rem; line-height: 1.7; }
.atelier-feed .wp-block-post-content > :where(.alignfull, .alignwide) { margin-inline: 0; max-width: 100%; }
.atelier-feed .wp-block-post-content > :first-child { margin-top: 0; }
.atelier-feed .wp-block-post-content > :last-child { margin-bottom: 0; }
.atelier-feed .wp-block-post > .wp-block-group > .wp-block-post-date { margin-top: auto !important; padding-top: 16px; border-top: 1px solid var(--atelier-line); font-size: .8125rem; letter-spacing: .02em; }
.atelier-feed > .wp-block-query > .wp-block-group { padding-inline: 0; margin-inline: 0; }
.atelier-feed > .wp-block-query > .wp-block-group:not(:has(> *)) { padding-block: 0 !important; margin-block: 0; }
.atelier-feed .wp-block-query-pagination { margin-top: 32px; font-size: .875rem; }

.atelier-sidebar { font-size: .875rem; }
.atelier-sidebar > * + * { margin-top: 24px; }
.atelier-sidebar h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.025em; }
.atelier-sidebar-search { padding: 26px; border-radius: 14px; background: var(--atelier-ink); color: var(--atelier-paper); }
.atelier-sidebar-search .atelier-eyebrow { color: #E7C9A1; font-size: .75rem; margin: 0 0 20px; }
.atelier-sidebar-search h2 { font-size: 1.25rem; font-weight: 500; line-height: 1.45; margin: 0 0 24px; }
.atelier-sidebar-search .wp-block-search { margin: 0; }
.atelier-sidebar-search .wp-block-search__label { font-size: .8125rem; display: block; margin-bottom: 8px; }
.atelier-sidebar-search .wp-block-search__inside-wrapper { gap: 6px; flex-wrap: nowrap; }
.atelier-sidebar-search .wp-block-search__input { padding: 10px 12px; border-radius: 7px; min-width: 0; font-size: 1rem; }
.atelier-sidebar-search .wp-block-search__button { padding: 10px; border-radius: 7px; background: var(--wp--preset--color--accent-1); color: var(--atelier-ink); flex-shrink: 0; }
.atelier-sidebar-search .wp-block-search__button:hover { background: var(--atelier-paper); color: var(--atelier-ink); }
.atelier-sidebar-search .wp-block-search__input:focus-visible { outline-color: #E7C9A1; }
.atelier-sidebar-panel { padding: 22px 0 0; border-top: 1px solid var(--atelier-line); }
.atelier-sidebar-panel h2 { margin: 0 0 18px; }
.atelier-sidebar-panel :where(ul, ol) { padding-left: 0; list-style: none; margin: 0; }
.atelier-sidebar-panel li { padding-block: 10px; margin-top: 0; border-bottom: 1px solid var(--atelier-line); font-size: .875rem; }
.atelier-sidebar-panel li:last-child { border-bottom: 0; }
.atelier-sidebar-panel li ul { padding-inline-start: 14px; margin-top: 8px; }
.atelier-sidebar-panel a { text-decoration: none; }
.atelier-sidebar-panel a:hover { text-decoration: underline; }
.atelier-sidebar-panel .wp-block-categories a { margin-inline-end: 6px; }
.atelier-sidebar-panel .wp-block-latest-posts li { padding-block: 14px; }
.atelier-sidebar-panel .wp-block-latest-posts__post-title { font-size: .9375rem; font-weight: 600; }
.atelier-sidebar-panel .wp-block-latest-posts__post-date { margin-top: 6px; font-size: .8125rem; color: var(--wp--preset--color--accent-4); }

@media (min-width: 1280px) {
	.atelier-feed > .wp-block-query > .wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 959px) {
	.atelier-home .atelier-home-layout { grid-template-columns: minmax(0, 1fr); }
	.atelier-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
	.atelier-sidebar > * { margin: 0; }
}

@media (max-width: 599px) {
	.atelier-intro { padding-block: 32px 28px; }
	.atelier-home .atelier-home-layout { margin-top: 28px; gap: 36px; }
	.atelier-feed > .wp-block-query > .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
	.atelier-sidebar { grid-template-columns: minmax(0, 1fr); }
	.atelier-section-heading { margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post { transition: none; }
}

/* Single posts: only wrappers and presentation change; parent blocks render data. */
.wp-site-blocks > .atelier-single { margin-top: clamp(24px, 4vw, 48px) !important; }
.atelier-single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 36px; }
.atelier-single-layout > * { min-width: 0; margin-block-start: 0; }
.atelier-single-layout > .atelier-article {
	box-sizing: border-box;
	margin-inline: 0;
	padding: clamp(24px, 3.5vw, 48px) !important;
	border: 1px solid var(--atelier-line);
	border-radius: 16px;
	background: color-mix(in srgb, var(--atelier-paper) 25%, var(--atelier-surface));
}

.atelier-article-heading .atelier-eyebrow { margin: 0 0 16px; color: var(--wp--preset--color--accent-4); font-size: .75rem; }
.atelier-article-heading h1 { margin: 0; font-size: clamp(2rem, 1.5rem + 1.5vw, 3rem); line-height: 1.25; letter-spacing: -.035em; }
.atelier-article-heading .atelier-article-date { margin-top: 18px; font-size: .8125rem; }
.atelier-article > .wp-block-post-featured-image { margin-block: 28px; }
.atelier-article-meta { padding-block: 18px; border-top: 1px solid var(--atelier-line); border-bottom: 1px solid var(--atelier-line); }
.atelier-article-meta > .wp-block-group { margin-bottom: 0 !important; gap: .35em .5em; line-height: 1.7; }
.atelier-article-meta .wp-block-post-author-name { font-weight: 600; }
.atelier-article-meta a { text-decoration-thickness: 1px; text-underline-offset: .2em; }

.atelier-article > .wp-block-post-content {
	margin: 28px 0 0;
	padding-inline: 0;
	font-size: 1rem;
	line-height: 1.85;
}

/* Wide/full blocks use the available article width without escaping into the sidebar. */
.atelier-article > .wp-block-post-content > :where(.alignwide, .alignfull) { margin-inline: 0; max-width: 100%; }
.atelier-article > .wp-block-post-content > :first-child { margin-top: 0; }
.atelier-article > .wp-block-post-content > :last-child { margin-bottom: 0; }
.atelier-article .wp-block-post-content :where(h2, h3, h4) { margin-block: 1.6em .65em; line-height: 1.4; }
.atelier-article .wp-block-post-content :where(ul, ol) { padding-inline-start: 1.5em; }
.atelier-article .wp-block-post-content :where(figure, .wp-block-embed, .wp-block-table) { margin-block: 28px; }
.atelier-article .wp-block-post-content figcaption { font-size: .8125rem; line-height: 1.6; color: var(--wp--preset--color--accent-4); }
.atelier-article .wp-block-post-content .wp-block-code { border: 1px solid var(--atelier-line); border-radius: 10px; padding: 20px; }
.atelier-article .wp-block-post-content .wp-block-table :where(th, td) { padding: 12px 16px; border-color: var(--atelier-line); }
.atelier-article .wp-block-post-content .wp-block-table th { background: var(--atelier-tint); text-align: start; }

.atelier-article > .atelier-article-tags { padding: 24px 0 0 !important; }
.atelier-article-tags .wp-block-post-terms { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.atelier-article-tags .wp-block-post-terms a { padding: 5px 12px; border: 1px solid var(--atelier-line); border-radius: 6px; background: var(--atelier-tint); text-decoration: none; font-size: .8125rem; }
.atelier-article-tags .wp-block-post-terms a:hover { text-decoration: underline; }
/* Empty wrappers still exist; they simply stop reserving large blank sections. */
.atelier-article > .atelier-article-tags:not(:has(.wp-block-post-terms)) { padding-block: 0 !important; margin-block: 0; }
.atelier-article-navigation > .wp-block-group { margin-block: 28px !important; }
.atelier-article-navigation nav { gap: 20px; padding-block: 20px !important; align-items: stretch; flex-wrap: wrap; }
.atelier-article-navigation .wp-block-post-navigation-link { flex: 1 1 180px; min-width: 0; font-size: .9375rem; }
.atelier-article-navigation .wp-block-post-navigation-link a { display: block; padding: 16px; border: 1px solid var(--atelier-line); border-radius: 10px; text-decoration: none; line-height: 1.6; }
.atelier-article-navigation .wp-block-post-navigation-link a:hover { background: var(--atelier-tint); text-decoration: underline; }
.atelier-article-navigation:not(:has(a)),
.atelier-article-navigation:not(:has(a)) > .wp-block-group { margin-block: 0 !important; }
.atelier-article-navigation nav:not(:has(a)) { padding-block: 0 !important; border-top-width: 0 !important; }

.atelier-article > .wp-block-comments { margin-block: 32px 0 !important; padding-block: 28px 0; }
.atelier-article .wp-block-comments > h2 { font-size: 1.5rem !important; margin-block: 0 16px; }
.atelier-article .wp-block-comments-title { font-size: 1.125rem !important; line-height: 1.5; }
.atelier-article .wp-block-comment-template { padding-inline-start: 0; }
.atelier-article .wp-block-comment-template > li { padding-block: 20px; }
.atelier-article .wp-block-comment-template li > .wp-block-group { margin-bottom: 0 !important; }
.atelier-article .wp-block-comment-template .wp-block-group.is-layout-flex > .wp-block-group { min-width: 0; flex: 1; }
.atelier-article .wp-block-comment-template .wp-block-avatar { flex-shrink: 0; }
.atelier-article .wp-block-comment-content { line-height: 1.8; }
.atelier-article .wp-block-post-comments-form { padding: 24px; background: var(--atelier-tint); border: 1px solid var(--atelier-line); border-radius: 12px; }
.atelier-article .comment-reply-title { margin-top: 0; font-size: 1.25rem; }
.atelier-article .comment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.atelier-article .comment-form > * { grid-column: 1 / -1; margin: 0; min-width: 0; }
.atelier-article .comment-form .comment-form-author { grid-column: 1; }
.atelier-article .comment-form .comment-form-email { grid-column: 2; }
.atelier-article .comment-form label:not([for="wp-comment-cookies-consent"]) { display: block; margin-bottom: 6px; }
.atelier-article .comment-form :where(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea) { width: 100%; }
.atelier-article .comment-form textarea { min-height: 160px; resize: vertical; }
.atelier-article .comment-form .comment-form-cookies-consent { display: flex; align-items: baseline; gap: 8px; line-height: 1.6; }
.atelier-article .comment-form .submit { white-space: normal; max-width: 100%; }

.atelier-single > .atelier-more-posts { margin-top: 40px; }
.atelier-more-posts > .wp-block-group { padding: 28px 0 !important; border-top: 1px solid var(--atelier-line); }
.atelier-more-posts .wp-block-query { padding-inline: 0; }
.atelier-more-posts .wp-block-post-template { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-inline: 0; }
.atelier-more-posts .wp-block-post { min-width: 0; margin-block: 0; }
.atelier-more-posts .wp-block-post > .wp-block-group {
	box-sizing: border-box;
	height: 100%;
	margin-inline: 0;
	padding: 22px !important;
	border: 1px solid var(--atelier-line);
	border-radius: 12px;
	background: color-mix(in srgb, var(--atelier-paper) 50%, var(--atelier-surface));
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}
.atelier-more-posts .wp-block-post-title { margin: 0; font-size: 1.125rem !important; line-height: 1.5; }
.atelier-more-posts .wp-block-post-date { text-align: start; font-size: .8125rem; }

@media (max-width: 959px) {
	.atelier-single-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 599px) {
	.atelier-single-layout > .atelier-article { padding: 22px 18px !important; border-radius: 12px; }
	.atelier-article-heading h1 { font-size: 1.875rem; }
	.atelier-article-meta { padding-block: 14px; }
	.atelier-article .wp-block-post-comments-form { padding: 18px 14px; }
	.atelier-article .comment-form { grid-template-columns: minmax(0, 1fr); }
	.atelier-article .comment-form .comment-form-email { grid-column: 1; }
	.atelier-article .wp-block-comment-template .children { padding-inline-start: 12px; }
	.atelier-article .wp-block-comment-template .wp-block-group.is-layout-flex { gap: 12px; }
	.atelier-more-posts .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
}

/* Category archives reuse the original inherited query and the home card grid. */
.wp-site-blocks > .atelier-category { margin-top: clamp(28px, 4vw, 48px) !important; }
.atelier-category-heading {
	padding: clamp(24px, 3vw, 40px);
	border: 1px solid var(--atelier-line);
	border-inline-start: 4px solid var(--atelier-ink);
	border-radius: 0 14px 14px 0;
	background: linear-gradient(110deg, var(--atelier-tint), var(--atelier-paper));
}
.atelier-category-heading > .atelier-eyebrow { margin: 0 0 16px; font-size: .75rem; color: var(--wp--preset--color--accent-4); }
.atelier-category-heading > .wp-block-query-title {
	margin: 0;
	font-size: clamp(1.875rem, 1.5rem + 1.5vw, 3rem);
	line-height: 1.3;
	font-weight: 500;
	letter-spacing: -.035em;
	overflow-wrap: anywhere;
}
.atelier-category-heading > .wp-block-term-description { max-width: 780px; margin-top: 20px; font-size: 1rem; line-height: 1.8; }
.atelier-category-heading .wp-block-term-description > :first-child { margin-top: 0; }
.atelier-category-heading .wp-block-term-description > :last-child { margin-bottom: 0; }
.atelier-category-heading .wp-block-term-description :where(img, iframe, video) { max-width: 100%; }
.atelier-category .atelier-category-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; align-items: start; margin-top: 36px; }
.atelier-category-layout > * { min-width: 0; margin-block-start: 0; }
.atelier-category .atelier-section-heading { display: flex; align-items: center; }
.atelier-category .atelier-sidebar-panel .current-cat > a { font-weight: 700; text-decoration: underline; text-underline-offset: .25em; }
.atelier-category .atelier-sidebar-panel .current-cat { border-inline-start: 2px solid var(--atelier-ink); padding-inline-start: 10px; }
.atelier-category .wp-block-query-no-results { padding: 24px; border: 1px dashed var(--atelier-line); border-radius: 12px; background: var(--atelier-tint); }
.atelier-category .wp-block-query-no-results > :first-child { margin-top: 0; }
.atelier-category .wp-block-query-no-results > :last-child { margin-bottom: 0; }
.atelier-category .atelier-feed > .wp-block-query > .wp-block-group:has(.wp-block-query-no-results) { padding-block: 16px !important; }

@media (max-width: 959px) {
	.atelier-category .atelier-category-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 599px) {
	.atelier-category-heading { padding: 22px 18px; }
	.atelier-category .atelier-category-layout { margin-top: 28px; }
	.atelier-category .atelier-section-heading h2 { font-size: 1.125rem; }
	.atelier-category .wp-block-query-pagination { gap: 14px; flex-wrap: wrap; }
}

/* Variant identity: Atelier. Colors include decorative art and surfaces. */
:root { --atelier-surface: #FFFCF7; --atelier-accent: #A04E2E; --atelier-heading-font: Georgia, "Times New Roman", serif; --atelier-radius: 3px; --atelier-cover-a: #29251F; --atelier-cover-b: #8A4528; --atelier-cover-line: color-mix(in srgb,#E7C9A1 45%,transparent); }
:where(.wp-site-blocks,.editor-styles-wrapper) :where(h1,h2,h3,.wp-block-site-title) { font-family: var(--atelier-heading-font); }
.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post { border-radius: 3px; }
.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:not(:has(.wp-block-post-featured-image img))::before,
.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:nth-child(3n + 2):not(:has(.wp-block-post-featured-image img))::before,
.atelier-feed > .wp-block-query > .wp-block-post-template > .wp-block-post:nth-child(3n):not(:has(.wp-block-post-featured-image img))::before { border-radius: 2px 2px 0 0; background: radial-gradient(circle at 72% 62%,transparent 0 29%,var(--atelier-cover-line) 29.5% 30%,transparent 30.5% 40%,var(--atelier-cover-line) 40.5% 41%,transparent 41.5%),linear-gradient(135deg,var(--atelier-cover-a),var(--atelier-cover-b)); }
.atelier-feed .wp-block-post-featured-image img { border-radius: 2px 2px 0 0; }
.atelier-sidebar-search,.atelier-single-layout > .atelier-article,.atelier-category-heading,.atelier-more-posts .wp-block-post > .wp-block-group { border-radius: 3px; }
.atelier-sidebar-search .atelier-eyebrow { color: inherit; }
.atelier-sidebar-search input::placeholder { color: var(--wp--preset--color--accent-4); opacity: 1; }
.atelier-sidebar-search .wp-block-search__input:focus-visible { outline: 2px solid var(--atelier-accent); outline-offset: 3px; }
@media (min-width:960px) { .atelier-home .atelier-home-layout,.atelier-category .atelier-category-layout,.atelier-single-layout { grid-template-columns:minmax(0,1fr) 270px; } }

.atelier-intro { border-block: 3px double var(--atelier-ink); margin-top: 28px; background: transparent; padding-block: 36px; }
.atelier-intro h1 { font-style: italic; }
.atelier-section-heading { border-bottom: 1px solid var(--atelier-line); padding-bottom: 12px; }
.atelier-sidebar-search { background: var(--atelier-tint); color: var(--atelier-ink); border: 1px solid var(--atelier-line); }
.atelier-category-heading { border: 3px double var(--atelier-line); background: var(--atelier-surface); }
.atelier-article-heading { border-bottom: 3px double var(--atelier-line); padding-bottom: 24px; }
.wp-site-blocks > .wp-block-template-part:last-child { border-top: 3px double var(--atelier-ink); }
