/* ==========================================================================
   EasyCrocht brand layer for Kadence.
   Colors map to the Kadence global palette (set in the Customizer):
   palette1 sage-dark (actions) · palette2 sage-deep (hover) · palette3 charcoal
   palette4 body text · palette5 muted · palette6 line · palette7 cream
   palette8 soft ivory · palette9 ivory (page)
   ========================================================================== */

:root {
	--ec-sage: #687c69;
	--ec-sage-dark: var(--global-palette1, #4f6352);
	--ec-sage-deep: var(--global-palette2, #3e4f41);
	--ec-ink: var(--global-palette3, #292d29);
	--ec-text: var(--global-palette4, #363b36);
	--ec-muted: var(--global-palette5, #5e655e);
	--ec-line: var(--global-palette6, #e5ddd2);
	--ec-cream: var(--global-palette7, #f8f5ef);
	--ec-ivory: var(--global-palette9, #fffefa);
	--ec-terra: #c98770;
	--ec-terra-soft: #dba590;
	--ec-terra-dark: #a65f47;
	--ec-blush: #ebdcd8;
	--ec-radius: 10px;
	--ec-radius-lg: 18px;
	--ec-serif: "Fraunces", Georgia, "Times New Roman", serif;
	--ec-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ec-shadow: 0 1px 2px rgb(41 45 41 / 6%), 0 6px 20px rgb(41 45 41 / 6%);
	--ec-gap: clamp(1.25rem, 2.5vw, 2rem);
}

/* --- Base ----------------------------------------------------------------- */
body { text-rendering: optimizeLegibility; font-optical-sizing: auto; }
h1, h2, h3, h4, .entry-title, .site-title { font-variation-settings: "SOFT" 50; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--ec-blush); color: var(--ec-ink); }

/* Visible, consistent focus indicator (WCAG 2.4.7 / 2.4.11). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ec-terra-dark);
	outline-offset: 3px;
	border-radius: 4px;
}
.screen-reader-text:focus { outline: 3px solid var(--ec-terra-dark); }

/* --- Buttons -------------------------------------------------------------- */
.ec-button,
.wp-block-button__link,
.button, button.button, input[type="submit"], .kb-forms-submit {
	font-family: var(--ec-sans);
	font-weight: 600;
	letter-spacing: .01em;
	border-radius: 999px;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ec-button {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .8em 1.6em; min-height: 44px;
	background: var(--ec-sage-dark); color: #fff; border: 2px solid var(--ec-sage-dark);
	text-decoration: none; line-height: 1.2;
}
.ec-button:hover, .ec-button:focus-visible { background: var(--ec-sage-deep); border-color: var(--ec-sage-deep); color: #fff; }
.ec-button--outline, .is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--ec-sage-dark); border: 2px solid currentColor;
}
.ec-button--outline:hover, .is-style-outline > .wp-block-button__link:hover { background: var(--ec-sage-dark); color: #fff; border-color: var(--ec-sage-dark); }
.wp-block-button__link { padding: .8em 1.6em; min-height: 44px; }
.ec-link-arrow { font-weight: 600; color: var(--ec-sage-dark); text-decoration: underline; text-underline-offset: .25em; }
.ec-link-arrow::after { content: " →"; }

/* --- Header --------------------------------------------------------------- */
#masthead .site-main-header-wrap .site-header-row-container-inner { border-bottom: 1px solid var(--ec-line); }
.site-branding .custom-logo { height: auto; }
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	font-family: var(--ec-sans); font-weight: 500; letter-spacing: .01em;
	padding-block: .6em;
}
.main-navigation .primary-menu-container > ul > li.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a { color: var(--ec-sage-dark); }
.main-navigation .primary-menu-container > ul > li.menu-item > a { text-decoration-thickness: 2px; text-underline-offset: .45em; }
.main-navigation .primary-menu-container > ul > li.current-menu-item > a { text-decoration-line: underline; text-decoration-color: var(--ec-terra); }
.search-toggle-open, .menu-toggle-open { min-width: 44px; min-height: 44px; }
#search-drawer .drawer-inner { background: rgb(255 254 250 / 97%); }
#search-drawer .drawer-inner input.search-field { font-family: var(--ec-serif); color: var(--ec-ink); border-bottom-color: var(--ec-sage) !important; }
#mobile-drawer .drawer-inner { background: var(--ec-sage-deep); }

/* --- Sections (homepage) --------------------------------------------------- */
.ec-section { margin-block: clamp(3rem, 7vw, 5.5rem); }
.ec-section__head { max-width: 46rem; margin: 0 auto clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.ec-section__title { font-size: clamp(1.75rem, 3.2vw, 2.4rem); margin: 0; color: var(--ec-ink); }
.ec-section__title::after {
	content: ""; display: block; width: 3rem; height: 3px; border-radius: 3px;
	background: var(--ec-terra); margin: .75rem auto 0;
}
.ec-section__intro { color: var(--ec-muted); margin: .9rem 0 0; font-size: 1.05rem; }
.ec-section__more { text-align: center; margin-top: 2rem; }

/* Hero */
.ec-hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.ec-hero .wp-block-columns { align-items: center; gap: clamp(2rem, 5vw, 4rem); }
.ec-hero__eyebrow {
	font-family: var(--ec-sans); font-size: .82rem !important; font-weight: 600;
	letter-spacing: .14em; text-transform: uppercase; color: var(--ec-terra-dark); margin-bottom: 1rem;
}
.ec-hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.06; letter-spacing: -.015em; margin: 0 0 1.25rem; }
.ec-hero h1 em { font-style: italic; color: var(--ec-sage-dark); }
.ec-hero__lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ec-text); max-width: 34rem; margin-bottom: 2rem; }
.ec-hero .wp-block-buttons { gap: .75rem; }
.ec-hero-art { max-width: 480px; margin-inline: auto; }
.ec-hero-art svg { width: 100%; height: auto; display: block; }

/* Topics */
.ec-topics {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: clamp(.75rem, 2vw, 1.25rem);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .ec-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ec-topics { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ec-topic { margin: 0; }
.ec-topic__link, .ec-topic--preview {
	display: flex; flex-direction: column; align-items: center; gap: .75rem;
	padding: 1.5rem 1rem 1.25rem; height: 100%;
	background: var(--ec-ivory); border: 1px solid var(--ec-line); border-radius: var(--ec-radius-lg);
	text-decoration: none; color: var(--ec-ink); text-align: center;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ec-topic__link:hover { transform: translateY(-3px); box-shadow: var(--ec-shadow); border-color: var(--ec-sage); }
.ec-topic__icon {
	display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%;
	background: var(--ec-cream); color: var(--ec-sage-dark);
}
.ec-topic:nth-child(even) .ec-topic__icon { background: var(--ec-blush); }
.ec-topic__icon .ec-icon { width: 2.6rem; height: 2.6rem; }
.ec-icon .ec-i-accent { stroke: var(--ec-terra-dark); }
.ec-topic__label { font-family: var(--ec-serif); font-weight: 600; font-size: 1.08rem; line-height: 1.25; }

/* Cards */
.ec-grid { display: grid; gap: var(--ec-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.ec-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.ec-card { display: flex; flex-direction: column; background: var(--ec-ivory); border-radius: var(--ec-radius); overflow: hidden; }
.ec-card__media { display: block; aspect-ratio: 4 / 3; background: var(--ec-cream); border-radius: var(--ec-radius); overflow: hidden; }
.ec-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.ec-card:hover .ec-card__img { transform: scale(1.03); }
.ec-card__placeholder { display: grid; place-items: center; height: 100%; color: var(--ec-sage); }
.ec-card__placeholder .ec-icon { width: 30%; height: auto; opacity: .7; }
.ec-card__body { padding: 1rem .25rem 0; }
.ec-card__cat {
	display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	color: var(--ec-terra-dark); text-decoration: none; margin-bottom: .4rem;
}
.ec-card__cat:hover { text-decoration: underline; }
.ec-card__title { font-size: 1.22rem; line-height: 1.3; margin: 0; }
.ec-card__title a { color: var(--ec-ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s ease; }
.ec-card__title a:hover { background-size: 100% 1.5px; }
.ec-card__excerpt { color: var(--ec-muted); margin: .6rem 0 0; }
.ec-card--large .ec-card__media { aspect-ratio: 3 / 2; }
.ec-card--large .ec-card__title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.ec-featured { display: grid; gap: var(--ec-gap); }
@media (min-width: 900px) {
	.ec-featured { grid-template-columns: 1.6fr 1fr; grid-template-rows: auto auto; }
	.ec-featured > .ec-card--large { grid-row: span 2; }
}

/* Beginner */
.ec-beginner {
	display: grid; gap: var(--ec-gap); align-items: center;
	background: var(--ec-cream); border-radius: var(--ec-radius-lg); padding: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 768px) { .ec-beginner { grid-template-columns: 10rem 1fr; } }
.ec-beginner__art { color: var(--ec-sage-dark); justify-self: center; }
.ec-beginner__art .ec-icon { width: 8rem; height: 8rem; }
.ec-beginner__list { margin: 1rem 0 1.5rem; padding-left: 1.2rem; }
.ec-beginner__list li { margin-bottom: .4rem; }

/* About band (static blocks on the Home page) */
.ec-about {
	background: var(--ec-sage-deep); color: #f8f5ef;
	border-radius: var(--ec-radius-lg); padding: clamp(2rem, 5vw, 4rem) !important;
	margin-block: clamp(3rem, 7vw, 5.5rem);
}
.ec-about h2 { color: #fff; font-size: clamp(1.75rem, 3.2vw, 2.4rem); margin-top: 0; }
.ec-about p { color: #ece7dd; font-size: 1.08rem; }
.ec-about .wp-block-columns { align-items: center; gap: clamp(1.5rem, 4vw, 3rem); }
.ec-about .ec-button, .ec-about .wp-block-button__link { background: #f8f5ef; color: var(--ec-sage-deep); border-color: #f8f5ef; }
.ec-about .ec-button:hover, .ec-about .wp-block-button__link:hover { background: #fff; color: var(--ec-sage-deep); }
.ec-about__mark img { width: 100%; max-width: 220px; height: auto; display: block; margin-inline: auto; }

/* Newsletter (only rendered when a provider embed is configured) */
.ec-newsletter { display: grid; gap: var(--ec-gap); align-items: center; background: var(--ec-blush); border-radius: var(--ec-radius-lg); padding: clamp(1.5rem, 4vw, 3rem); margin-block: clamp(3rem, 7vw, 5.5rem); }
@media (min-width: 900px) { .ec-newsletter { grid-template-columns: 1fr 1fr; } }
.ec-newsletter h2 { margin: 0 0 .5rem; }

/* --- Single article ------------------------------------------------------- */
.single-post .entry-header .entry-title { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.12; letter-spacing: -.01em; }
.single-post .entry-header { margin-bottom: 1.5rem; }
.kadence-breadcrumbs, .entry-meta { font-size: .9rem; color: var(--ec-muted); }
.kadence-breadcrumbs a { color: var(--ec-muted); }
.kadence-breadcrumbs a:hover { color: var(--ec-sage-dark); }
.entry-taxonomies .category-links a, .entry-header .category-links a {
	font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ec-terra-dark);
}
.single-post .post-thumbnail { border-radius: var(--ec-radius-lg); overflow: hidden; }

.single-content { font-size: 1.0625rem; }
.single-content > * + * { margin-top: 1.25em; }
.single-content h2 { margin-top: 2.2em; font-size: clamp(1.6rem, 2.6vw, 2rem); }
.single-content h3 { margin-top: 1.8em; font-size: clamp(1.3rem, 2vw, 1.5rem); }
.single-content h4 { margin-top: 1.6em; font-family: var(--ec-sans); font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; }
.single-content a:not(.wp-block-button__link):not(.wp-block-file__button):not(.ec-button):not(.ec-card__cat):not(.ec-topic__link) {
	color: var(--ec-sage-dark); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em;
}
.single-content a:not(.wp-block-button__link):not(.wp-block-file__button):not(.ec-button):not(.ec-card__cat):not(.ec-topic__link):hover { color: var(--ec-terra-dark); }
.single-content li { margin-bottom: .45em; }
.single-content li::marker { color: var(--ec-terra-dark); }
.single-content img { border-radius: var(--ec-radius); }
.single-content figcaption, .wp-element-caption { font-size: .88rem; color: var(--ec-muted); text-align: center; margin-top: .6em; }
.single-content blockquote, .wp-block-quote {
	border-left: 3px solid var(--ec-terra); padding: .25em 0 .25em 1.25em; margin-inline: 0;
	font-family: var(--ec-serif); font-size: 1.2rem; color: var(--ec-ink);
}
.single-content abbr[title] { text-decoration: underline dotted; cursor: help; }
.single-content code { background: var(--ec-cream); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.single-content hr, .wp-block-separator { border: 0; border-top: 1px solid var(--ec-line); margin-block: 2.5em; }

/* Tables (patterns, gauge charts, yarn comparisons) */
.ec-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: 1.5em; }
.ec-table-scroll > .wp-block-table { margin: 0; }
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--ec-line); padding: .65em .85em; text-align: left; vertical-align: top; }
.wp-block-table thead th { background: var(--ec-cream); font-weight: 700; color: var(--ec-ink); border-bottom: 2px solid var(--ec-sage); }
.wp-block-table tbody tr:nth-child(even) td { background: #fcfaf6; }

/* Crochet block styles */
.is-style-ec-materials { list-style: none; padding: 1.25em 1.5em; background: var(--ec-cream); border-radius: var(--ec-radius); }
.is-style-ec-materials li { position: relative; padding-left: 1.9em; }
.is-style-ec-materials li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 1.15em; height: 1.15em;
	border: 2px solid var(--ec-sage); border-radius: 4px;
}
ol.is-style-ec-steps { list-style: none; counter-reset: ec-step; padding-left: 0; }
ol.is-style-ec-steps > li { counter-increment: ec-step; position: relative; padding-left: 3.1em; margin-bottom: 1.1em; min-height: 2.2em; }
ol.is-style-ec-steps > li::before {
	content: counter(ec-step); position: absolute; left: 0; top: -.1em;
	width: 2.1em; height: 2.1em; display: grid; place-items: center; border-radius: 50%;
	background: var(--ec-sage-dark); color: #fff; font-weight: 700; font-size: .95em;
}
.is-style-ec-pattern-box {
	background: var(--ec-ivory); border: 1px solid var(--ec-line); border-top: 4px solid var(--ec-sage);
	border-radius: var(--ec-radius); padding: clamp(1.25rem, 3vw, 2rem) !important;
}
.is-style-ec-pattern-box > :first-child { margin-top: 0; }
.is-style-ec-abbrev td:first-child { font-weight: 700; white-space: nowrap; color: var(--ec-sage-deep); width: 1%; }

/* File (pattern download) block */
.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 1rem 1.25rem; background: var(--ec-cream); border-radius: var(--ec-radius); }
.wp-block-file .wp-block-file__button { background: var(--ec-sage-dark); color: #fff; border-radius: 999px; padding: .6em 1.3em; font-weight: 600; text-decoration: none; }
.wp-block-file .wp-block-file__button:hover { background: var(--ec-sage-deep); }

/* Related posts + post navigation */
.entry-related { background: var(--ec-cream) !important; }
.entry-related-title { text-align: center; }
.post-navigation .nav-links { border-top: 1px solid var(--ec-line); padding-top: 1.5rem; }
.post-navigation a { color: var(--ec-ink); }
.post-navigation .post-navigation-sub small { letter-spacing: .1em; color: var(--ec-muted); }

/* --- Archives & search --------------------------------------------------- */
.archive .entry-hero .entry-header, .search .entry-hero .entry-header, .blog .entry-hero .entry-header { text-align: center; }
.archive-description { max-width: 44rem; margin-inline: auto; color: var(--ec-muted); }
.loop-entry { border-radius: var(--ec-radius); overflow: hidden; background: transparent !important; box-shadow: none !important; }
.loop-entry .post-thumbnail { border-radius: var(--ec-radius); overflow: hidden; }
.loop-entry .entry-content-wrap { padding: 1rem .25rem 0 !important; }
.loop-entry .entry-title { font-size: 1.22rem; line-height: 1.3; }
.loop-entry .entry-title a { color: var(--ec-ink); }
.loop-entry .entry-title a:hover { color: var(--ec-sage-dark); }
.loop-entry .entry-summary { color: var(--ec-muted); font-size: .98rem; }
.pagination .page-numbers { border-radius: 999px; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.pagination .page-numbers.current { background: var(--ec-sage-dark); color: #fff; }

/* Sub-category chips (Fusion child theme) and shared chip list */
.ec-chip-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.ec-chip-list a, .sub-cats a, .subcategories a {
	display: inline-block; padding: .5em 1.1em; border: 1px solid var(--ec-line); border-radius: 999px;
	background: var(--ec-ivory); color: var(--ec-ink); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.ec-chip-list a:hover, .sub-cats a:hover, .subcategories a:hover { border-color: var(--ec-sage); color: var(--ec-sage-dark); }

/* Empty states / 404 */
.ec-next-steps { text-align: center; margin: 2rem auto 1rem; }
.ec-next-steps__title { font-size: 1.3rem; margin: 2rem 0 0; }
.error .page-content, .error-404 .page-content { text-align: center; }
.error .search-form { max-width: 32rem; margin-inline: auto; }

/* --- Forms ---------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], textarea, select {
	border-radius: 8px !important; border: 1px solid #8f968f !important; background: #fff !important; color: var(--ec-ink);
	min-height: 44px; font-size: 1rem;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--ec-sage-dark) !important; }
.kb-form label, .kb-adv-form label { font-weight: 600; color: var(--ec-ink); }
.kb-form .kb-form-field .required, .kb-form .required { color: var(--ec-terra-dark); }
.kadence-blocks-form-message.kadence-blocks-form-success { background: #eef3ee; border: 1px solid var(--ec-sage); color: var(--ec-sage-deep); border-radius: 8px; }
.kadence-blocks-form-message.kadence-blocks-form-warning { background: #fbefeb; border: 1px solid var(--ec-terra-dark); color: #7a3b28; border-radius: 8px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--ec-line); }
.site-footer .widget-title, .site-footer .widgettitle {
	font-family: var(--ec-sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ec-ink);
	margin-bottom: 1rem;
}
.site-footer .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget_nav_menu li { margin: 0 0 .55rem; }
.site-footer .widget_nav_menu a { color: var(--ec-text); text-decoration: none; }
.site-footer .widget_nav_menu a:hover { color: var(--ec-sage-dark); text-decoration: underline; }
.ec-footer-brand__logo img { height: 40px; width: auto; display: block; }
.ec-footer-brand p { color: var(--ec-muted); margin: 1rem 0 0; max-width: 22rem; }
.site-bottom-footer-wrap .site-footer-row-container-inner { border-top: 1px solid var(--ec-line); font-size: .88rem; color: var(--ec-muted); }

/* --- Motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.ec-topic__link:hover, .ec-card:hover .ec-card__img { transform: none; }
}

/* --- Layout helpers for the full-width Home page --------------------------- */
.ec-wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); box-sizing: border-box; }
.ec-home .entry-content { margin: 0; }
.ec-home .entry-content > .ec-band { margin-block: 0; }
.ec-band--cream { background: var(--ec-cream); }
.ec-band--hero { background: linear-gradient(180deg, var(--ec-cream) 0%, var(--ec-ivory) 100%); }

/* --- Contact form ------------------------------------------------------------ */
.ec-form { display: grid; gap: 1.1rem; max-width: 40rem; }
.ec-form__field label { display: block; font-weight: 600; color: var(--ec-ink); margin-bottom: .35rem; }
.ec-form__field input, .ec-form__field textarea { width: 100%; box-sizing: border-box; padding: .7em .9em; }
.ec-form__field.is-invalid input, .ec-form__field.is-invalid textarea { border-color: #9a3b26 !important; border-width: 2px !important; }
.ec-form__error { color: #8a3420; font-size: .92rem; margin: .35rem 0 0; font-weight: 500; }
.ec-form__required-note, .ec-form__privacy { font-size: .92rem; color: var(--ec-muted); margin: 0; }
.ec-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ec-notice { border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.ec-notice ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.ec-notice--success { background: #eef3ee; border: 1px solid var(--ec-sage); color: var(--ec-sage-deep); }
.ec-notice--error { background: #fbefeb; border: 1px solid #a65f47; color: #7a3b28; }
.ec-notice--error a { color: #7a3b28; text-decoration: underline; }

/* --- Owner-review callouts on draft legal pages (visible only in drafts) ----- */
.ec-owner-note { border: 2px dashed var(--ec-terra-dark); background: #fdf6f3; padding: 1rem 1.25rem; border-radius: 10px; }

/* --- Refinements after first render review ---------------------------------- */
.ec-card a, .ec-topic__link, .ec-card__title a { text-decoration: none; }
.ec-topic--preview { cursor: default; }
@media (max-width: 639px) {
	.ec-topic__link, .ec-topic--preview { padding: 1rem .5rem .9rem; gap: .5rem; }
	.ec-topic__icon { width: 3.25rem; height: 3.25rem; }
	.ec-topic__icon .ec-icon { width: 2rem; height: 2rem; }
	.ec-topic__label { font-size: .98rem; }
}
@media (max-width: 781px) {
	.ec-hero-art { max-width: 300px; }
	.ec-hero .wp-block-columns { gap: 1.5rem; }
	.ec-about__mark img { max-width: 120px; }
	.ec-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.ec-hero .wp-block-button__link { display: block; text-align: center; }
}

.entry-content .ec-topics, .entry-content .ec-chip-list, .entry-content .ec-beginner__list { margin-left: 0; margin-right: 0; }
.entry-content .ec-topics, .entry-content .ec-chip-list { padding: 0 !important; }
.ec-topic__label { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.entry-content .ec-card a, .entry-content .ec-topic__link, .entry-content .ec-card__title a { text-decoration: none !important; }
.entry-content .ec-topics, .entry-content .ec-chip-list { list-style: none; }
.entry-content .ec-topics > li::marker { content: ""; }
.entry-content a.ec-button, .entry-content a.ec-button:hover, .entry-content a.ec-button:focus-visible { color: #fff; text-decoration: none; }
.entry-content a.ec-button--outline { color: var(--ec-sage-dark); }
.entry-content a.ec-button--outline:hover { color: #fff; }
.entry-content .wp-block-button__link { text-decoration: none; }
/* Single featured post: horizontal hero card. */
@media (min-width: 900px) {
	.ec-featured--1 { grid-template-columns: 1fr; }
	.ec-featured--1 > .ec-card--large { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--ec-gap); align-items: center; }
	.ec-featured--1 > .ec-card--large .ec-card__body { padding: 0; }
	.ec-featured--2 { grid-template-rows: auto; }
	.ec-featured--2 > .ec-card--large { grid-row: auto; }
}
.entry-content .ec-card__title { margin: 0; }
.entry-content .ec-card__cat { margin: 0 0 .35rem; }
.single-content .ec-card__title a { color: var(--ec-ink); }
.entry-content .ec-card .ec-card__title a, .entry-content .ec-card .ec-card__title a:hover { color: var(--ec-ink); }
.entry-content ul.is-style-ec-materials { list-style: none; padding-left: 1.5em; }
.entry-content ul.is-style-ec-materials > li::marker { content: ""; }

/* --- Final visual review refinements ------------------------------------------ */
/* Rhythm: first section after the hero sits closer. */
.ec-band--hero + .ec-wrap > .ec-section:first-child,
.ec-band--hero + .ec-wrap > :first-child .ec-section,
.ec-band--hero + .ec-wrap .ec-section--topics { margin-top: clamp(2.5rem, 5vw, 4rem); }
.ec-hero { padding-block: clamp(2rem, 5vw, 4.25rem) clamp(2.5rem, 5vw, 4.5rem); }

/* Editorial lede used on About and other pages. */
.entry-content .ec-lede, .entry-content .ec-lede.has-large-font-size {
	font-family: var(--ec-serif); font-size: clamp(1.25rem, 2.1vw, 1.5rem) !important;
	line-height: 1.5; color: var(--ec-ink); font-weight: 400; margin-bottom: 2rem;
}

/* Sub-category chips in archive heroes. */
.ec-subcats { margin-top: 1.25rem; }
.entry-hero .ec-chip-list a { background: var(--ec-ivory); }

/* Consistent accent rule under related-posts heading. */
.entry-related-title::after {
	content: ""; display: block; width: 3rem; height: 3px; border-radius: 3px; background: var(--ec-terra); margin: .75rem auto 0;
}

/* Mobile card grids: two compact columns for faster browsing. */
@media (max-width: 599px) {
	.ec-grid, .ec-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .85rem; }
	.ec-grid .ec-card__title { font-size: 1.02rem; line-height: 1.3; }
	.ec-card__cat { font-size: .75rem; letter-spacing: .08em; }
	.ec-card__body { padding-top: .7rem; }
	.post-archive .loop-entry .entry-title, .search-archive .loop-entry .entry-title, .loop-entry .entry-title { font-size: 1.02rem; }
	.loop-entry .entry-summary { display: none; }
	.loop-entry .entry-content-wrap { padding-top: .7rem !important; }
	.loop-entry .entry-taxonomies { font-size: .75rem; }
}

/* Archive hero: slightly more air and an accent rule under the title. */
.archive .entry-hero .page-title::after, .blog .entry-hero .page-title::after, .search .entry-hero .page-title::after {
	content: ""; display: block; width: 3rem; height: 3px; border-radius: 3px; background: var(--ec-terra); margin: .8rem auto 0;
}
/* Topic tiles: flexible rows so a short last row stays centered. */
.ec-topics { display: flex !important; flex-wrap: wrap; justify-content: center; --ec-cols: 2; --ec-tgap: clamp(.75rem, 2vw, 1.25rem); gap: var(--ec-tgap); }
.ec-topic { flex: 0 0 calc((100% - (var(--ec-cols) - 1) * var(--ec-tgap)) / var(--ec-cols)); }
@media (min-width: 640px) { .ec-topics { --ec-cols: 3; } }
@media (min-width: 1024px) { .ec-topics { --ec-cols: 5; } }
@media (max-width: 599px) {
	.content-wrap .loop-entry .entry-title, .site-main .loop-entry h2.entry-title { font-size: 1.02rem !important; line-height: 1.3; }
}
@media (max-width: 781px) {
	.ec-hero { padding-bottom: 1.5rem; }
	.ec-hero-art { max-width: 260px; }
	.ec-band--hero + .ec-wrap .ec-section--topics { margin-top: 2rem; }
}
@media (max-width: 599px) {
	.loop-entry .post-thumbnail { margin-bottom: 0 !important; }
	.loop-entry .entry-header .entry-taxonomies { margin-bottom: .3rem; }
}

/* --- Empty archives (new site): designed panel replaces the generic message --- */
.ec-empty-archive .content-area .error { display: none; }
.ec-empty {
	max-width: 40rem; margin: clamp(1rem, 4vw, 2.5rem) auto clamp(2rem, 6vw, 4rem); text-align: center;
	background: var(--ec-ivory); border: 1px solid var(--ec-line); border-radius: var(--ec-radius-lg);
	padding: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 4vw, 3rem);
}
.ec-empty__icon { display: grid; place-items: center; width: 5.5rem; height: 5.5rem; margin: 0 auto 1.25rem; border-radius: 50%; background: var(--ec-blush); color: var(--ec-sage-dark); }
.ec-empty__icon .ec-icon { width: 3.1rem; height: 3.1rem; }
.ec-empty__title { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0 0 .75rem; }
.ec-empty__text { color: var(--ec-muted); margin: 0 auto 1.75rem; max-width: 32rem; }
.ec-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.ec-empty__subtitle { font-family: var(--ec-sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ec-muted); margin: 2rem 0 0; }
.entry-content-wrap a.ec-button, .content-area a.ec-button { color: #fff; text-decoration: none; }
.content-area a.ec-button--outline { color: var(--ec-sage-dark); }
.content-area a.ec-button--outline:hover { color: #fff; }
@media (max-width: 480px) { .ec-empty__actions .ec-button { width: 100%; justify-content: center; } }
