/*
Theme Name: ZieloneGrzanie
Theme URI: https://zielonegrzanie.pl/
Author: ZieloneGrzanie.pl
Description: Local hybrid theme scaffold for the ZieloneGrzanie editorial portal.
Version: 0.4.0
Text Domain: zielonegrzanie
License: GPL-2.0-or-later
*/

:root {
  --zg-forest-900: #173d32;
  --zg-forest-700: #2f6453;
  --zg-sage-300: #b9ccbf;
  --zg-sage-100: #eaf0eb;
  --zg-copper-600: #a85e36;
  --zg-background: #f7f7f2;
  --zg-surface: #fff;
  --zg-surface-muted: #eef1ed;
  --zg-text: #1f2925;
  --zg-text-muted: #52615a;
  --zg-border: #d8e0da;
  --zg-link: #1f5f4a;
  --zg-focus: #145fcc;
  --zg-success: #2b6547;
  --zg-warning: #8c5e00;
  --zg-danger: #a3322d;
  --zg-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --zg-font-display: Georgia, "Times New Roman", serif;
  --zg-content-width: 45rem;
  --zg-reading-width: 44rem;
  --zg-wide-width: 76rem;
  --zg-page-gutter: clamp(1rem, 4vw, 2.5rem);
  --zg-space-1: .25rem;
  --zg-space-2: .5rem;
  --zg-space-3: .75rem;
  --zg-space-4: 1rem;
  --zg-space-5: 1.5rem;
  --zg-space-6: 2rem;
  --zg-space-7: 3rem;
  --zg-space-8: 4rem;
  --zg-radius-sm: .25rem;
  --zg-radius-md: .5rem;
  --zg-radius-lg: .75rem;
  color-scheme: light;
  font-family: var(--zg-font-body);
  color: var(--zg-text);
  background: var(--zg-background);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--zg-background); color: var(--zg-text); font-family: var(--zg-font-body); font-size: 1.0625rem; line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: var(--zg-link); text-decoration-thickness: .075em; text-underline-offset: .18em; }
a:hover { color: var(--zg-forest-900); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--zg-focus); outline-offset: 3px; }
button, input { font: inherit; }
button { color: inherit; }
::selection { background: var(--zg-sage-100); color: var(--zg-forest-900); }

.zg-shell { width: min(calc(100% - 2 * var(--zg-page-gutter)), var(--zg-wide-width)); margin-inline: auto; }
.zg-skip-link { position: absolute; z-index: 1000; top: .5rem; left: -9999px; padding: .7rem 1rem; background: var(--zg-surface); color: var(--zg-text); }
.zg-skip-link:focus { left: .75rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Header and navigation */
.zg-site-header { position: relative; z-index: 10; background: var(--zg-surface); border-bottom: 1px solid var(--zg-border); }
.zg-header-inner { min-height: 5.25rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.zg-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--zg-forest-900); text-decoration: none; font-size: 1.25rem; font-weight: 780; letter-spacing: -.045em; white-space: nowrap; }
.zg-brand-mark { display: grid; width: 2.25rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--zg-sage-100); color: var(--zg-forest-700); }
.zg-brand-mark svg { width: 1.2rem; height: 1.2rem; }
.zg-brand img { width: auto; max-height: 3.25rem; }
.zg-nav-toggle { display: none; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-sm); padding: .55rem .75rem; background: var(--zg-surface); font-size: .95rem; font-weight: 700; cursor: pointer; }
.zg-primary-nav ul, .zg-footer-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem clamp(.4rem, 1.2vw, 1.15rem); margin: 0; padding: 0; list-style: none; }
.zg-primary-nav li { position: relative; min-width: 0; }
.zg-primary-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem .2rem; color: var(--zg-text); text-decoration: none; font-size: .92rem; font-weight: 650; }
.zg-primary-nav a:hover, .zg-primary-nav .current-menu-item > a { color: var(--zg-forest-700); }
.zg-primary-nav .sub-menu { position: absolute; z-index: 30; top: calc(100% - .1rem); left: 0; display: none; width: max-content; min-width: 15rem; max-width: min(22rem, calc(100vw - 2rem)); padding: .45rem; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); box-shadow: 0 .65rem 1.5rem rgb(31 41 37 / 10%); }
@media (min-width: 62.001rem) {
.zg-primary-nav li:hover > .sub-menu, .zg-primary-nav li:focus-within > .sub-menu, .zg-primary-nav li.is-submenu-open > .sub-menu { display: grid; gap: 0; }
}
.zg-primary-nav .sub-menu li { border: 0; }
.zg-primary-nav .sub-menu a { width: 100%; min-height: 2.6rem; padding: .5rem .65rem; border-radius: var(--zg-radius-sm); white-space: normal; }
.zg-primary-nav .sub-menu a:hover, .zg-primary-nav .sub-menu .current-menu-item > a { background: var(--zg-sage-100); }
.zg-submenu-toggle { display: none; width: 2rem; min-width: 2rem; min-height: 2rem; place-items: center; margin-inline-start: .1rem; padding: 0; border: 1px solid transparent; border-radius: var(--zg-radius-sm); background: transparent; color: var(--zg-text-muted); cursor: pointer; }
.zg-submenu-toggle:hover, .zg-submenu-toggle[aria-expanded="true"] { border-color: var(--zg-border); background: var(--zg-sage-100); color: var(--zg-forest-900); }
.zg-submenu-toggle__icon { transition: transform .16s ease; }
.zg-submenu-toggle[aria-expanded="true"] .zg-submenu-toggle__icon { transform: rotate(180deg); }
.zg-js .zg-primary-nav .menu-item-has-children > .sub-menu, .zg-js .zg-primary-nav .page_item_has_children > ul { display: none; }
@media (min-width: 62.001rem) {
.zg-js .zg-primary-nav li:hover > .sub-menu, .zg-js .zg-primary-nav li:focus-within > .sub-menu, .zg-js .zg-primary-nav li.is-submenu-open > .sub-menu, .zg-js .zg-primary-nav li:hover > ul, .zg-js .zg-primary-nav li:focus-within > ul, .zg-js .zg-primary-nav li.is-submenu-open > ul { display: grid; }
}
.zg-js .zg-primary-nav .sub-menu { gap: 0; }
.zg-js .zg-primary-nav .sub-menu .sub-menu { top: 0; left: calc(100% - .2rem); }
.zg-header-actions { display: flex; justify-content: flex-end; }
.zg-search-form { display: flex; gap: .35rem; }
.zg-search-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.zg-search-form input[type="search"] { flex: 0 0 auto; width: 13rem; min-width: 13rem; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-sm); padding: .55rem .7rem; background: var(--zg-surface); color: var(--zg-text); }
.zg-search-form button[type="submit"], .zg-button, .wp-block-button__link { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; border: 1px solid var(--zg-forest-900); border-radius: var(--zg-radius-sm); padding: .62rem 1rem; background: var(--zg-forest-900); color: var(--zg-surface); font-size: .95rem; font-weight: 720; line-height: 1.25; text-decoration: none; cursor: pointer; }
.zg-search-form button[type="submit"]:hover, .zg-button:hover, .wp-block-button__link:hover { background: var(--zg-forest-700); color: var(--zg-surface); }
.zg-button--secondary { border-color: var(--zg-border); background: var(--zg-surface); color: var(--zg-forest-900); }
.zg-button--secondary:hover { border-color: var(--zg-forest-700); background: var(--zg-sage-100); color: var(--zg-forest-900); }

/* Type and common blocks */
h1, h2, h3, h4, h5, h6 { margin-top: 0; color: var(--zg-forest-900); font-family: var(--zg-font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
h1 { margin-bottom: var(--zg-space-5); font-size: clamp(2.55rem, 5.7vw, 4.5rem); }
h2 { margin-bottom: var(--zg-space-4); font-size: clamp(1.8rem, 3.4vw, 2.65rem); }
h3 { margin-bottom: var(--zg-space-3); font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h4 { margin-bottom: var(--zg-space-3); font-size: 1.2rem; }
p { margin-top: 0; }
.zg-eyebrow { margin: 0 0 .65rem; color: var(--zg-forest-700); font-family: var(--zg-font-body); font-size: .78rem; font-weight: 780; letter-spacing: .105em; line-height: 1.4; text-transform: uppercase; }
.zg-section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: var(--zg-space-5); }
.zg-section-heading h2 { margin: 0; }
.zg-section-heading > a { margin-bottom: .3rem; font-size: .95rem; font-weight: 700; }
.zg-main { min-height: 55vh; padding-block: var(--zg-space-8); }
.zg-section { margin-block: var(--zg-space-8); }
.zg-section--muted { padding-block: var(--zg-space-7); background: var(--zg-surface-muted); }
.zg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; color: var(--zg-text-muted); font-size: .88rem; }
.zg-meta a { color: inherit; }
.zg-category-label { display: inline-flex; width: fit-content; align-items: center; border-radius: 2rem; padding: .3rem .65rem; background: var(--zg-sage-100); color: var(--zg-forest-900); font-size: .77rem; font-weight: 760; line-height: 1.3; text-decoration: none; }
.zg-category-label:hover { background: #dbe7de; color: var(--zg-forest-900); }

/* Homepage */
.zg-home-intro { padding-block: clamp(2rem, 5vw, 4rem) var(--zg-space-5); }
.zg-home-intro h1 { max-width: 13ch; margin-bottom: var(--zg-space-3); }
.zg-home-intro p:not(.zg-eyebrow) { max-width: 58ch; margin-bottom: var(--zg-space-5); color: var(--zg-text-muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.zg-home-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.zg-hero-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(17rem, .8fr); gap: var(--zg-space-5); align-items: stretch; }
.zg-hero-feature { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(18rem, .97fr); overflow: hidden; min-height: 26rem; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-lg); background: var(--zg-surface); }
.zg-hero-feature__image { position: relative; min-height: 20rem; background: var(--zg-sage-100); }
.zg-hero-feature__image img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; }
.zg-hero-feature__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(1.35rem, 3vw, 2.5rem); }
.zg-hero-feature__body h2 { margin: .85rem 0 1rem; font-size: clamp(1.7rem, 3vw, 2.65rem); }
.zg-hero-feature__body > p { color: var(--zg-text-muted); }
.zg-hero-list { display: grid; grid-template-rows: auto 1fr 1fr; border-top: 2px solid var(--zg-forest-900); }
.zg-hero-list__heading { padding: .8rem 0; font-size: .78rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.zg-hero-list .zg-mini-story { display: flex; flex-direction: column; justify-content: center; padding: 1rem 0; border-top: 1px solid var(--zg-border); }
.zg-mini-story h3 { margin: .65rem 0; font-family: var(--zg-font-display); font-size: clamp(1.3rem, 2vw, 1.7rem); }
.zg-mini-story h3 a { color: var(--zg-forest-900); text-decoration: none; }
.zg-mini-story h3 a:hover { text-decoration: underline; text-decoration-color: var(--zg-copper-600); }
.zg-category-strip { display: flex; flex-wrap: wrap; gap: .55rem; }
.zg-category-strip a { display: inline-flex; min-height: 2.65rem; align-items: center; border: 1px solid var(--zg-border); border-radius: 2rem; padding: .45rem .9rem; background: var(--zg-surface); color: var(--zg-text); font-size: .92rem; font-weight: 650; text-decoration: none; }
.zg-category-strip a:hover { border-color: var(--zg-forest-700); color: var(--zg-forest-700); }
.zg-editorial-note { display: grid; grid-template-columns: minmax(12rem, .75fr) minmax(0, 1.25fr); gap: var(--zg-space-6); align-items: center; padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--zg-radius-lg); background: var(--zg-forest-900); color: var(--zg-surface); }
.zg-editorial-note h2 { margin: 0; color: var(--zg-surface); }
.zg-editorial-note p { max-width: 60ch; margin: 0; color: #e5eee8; }
.zg-monetization-slot { margin-block: var(--zg-space-7); }

/* Cards and editorial modules */
.zg-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.zg-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); transition: border-color .18s ease, transform .18s ease; }
.zg-card:hover { border-color: var(--zg-sage-300); transform: translateY(-2px); }
.zg-card__image { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--zg-sage-100); }
.zg-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.zg-card:hover .zg-card__image img { transform: scale(1.025); }
.zg-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.1rem 1.15rem 1.25rem; }
.zg-card__title { margin: .75rem 0 .7rem; font-size: clamp(1.28rem, 1.75vw, 1.55rem); }
.zg-card__title a { color: var(--zg-forest-900); text-decoration: none; }
.zg-card__title a:hover { text-decoration: underline; text-decoration-color: var(--zg-copper-600); }
.zg-card__excerpt { margin: 0 0 .8rem; color: var(--zg-text-muted); font-size: .95rem; }
.zg-card__body .zg-meta { margin-top: auto; padding-top: .45rem; }
.zg-card--featured { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
.zg-card--featured .zg-card__image { height: 100%; min-height: 16rem; aspect-ratio: auto; }
.zg-card--featured .zg-card__body { justify-content: center; padding: clamp(1.3rem, 3vw, 2.4rem); }
.zg-card--featured .zg-card__title { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.zg-pagination { margin-top: var(--zg-space-7); }
.zg-pagination .page-numbers { display: inline-flex; min-width: 2.65rem; min-height: 2.65rem; align-items: center; justify-content: center; margin-right: .35rem; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-sm); background: var(--zg-surface); color: var(--zg-text); text-decoration: none; }
.zg-pagination .current { border-color: var(--zg-forest-900); background: var(--zg-forest-900); color: var(--zg-surface); }

/* Archives and pages */
.zg-archive-header { max-width: var(--zg-content-width); margin-bottom: var(--zg-space-7); }
.zg-archive-header h1 { margin-bottom: .8rem; }
.zg-archive-description { max-width: 68ch; color: var(--zg-text-muted); }
.zg-archive-description p { margin-bottom: .8rem; }
.zg-page { width: min(100%, var(--zg-reading-width)); margin-inline: auto; }
.zg-page-header { margin-bottom: var(--zg-space-6); }
.zg-main--search .zg-archive-header { max-width: 52rem; }
.zg-empty-state { padding: var(--zg-space-6); border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); }

/* Article */
.zg-article-layout { display: grid; grid-template-columns: minmax(0, var(--zg-reading-width)) minmax(12rem, 16rem); justify-content: center; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.zg-article-layout--no-aside { grid-template-columns: minmax(0, var(--zg-reading-width)); }
.zg-entry { min-width: 0; }
.zg-entry-header { margin-bottom: var(--zg-space-6); }
.zg-entry-header h1 { margin: .9rem 0 1rem; font-size: clamp(2.35rem, 5.4vw, 4.15rem); }
.zg-entry-title { margin: .9rem 0 1rem; color: var(--zg-forest-900); font-family: var(--zg-font-display); font-size: clamp(2.35rem, 5.4vw, 4.15rem); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.zg-entry-deck { max-width: 60ch; color: var(--zg-text-muted); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.55; }
.zg-entry-meta { margin-top: var(--zg-space-4); }
.zg-breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem .55rem; align-items: center; margin-bottom: var(--zg-space-5); color: var(--zg-text-muted); font-size: .85rem; }
.zg-breadcrumbs a { color: inherit; text-decoration: none; }
.zg-breadcrumbs a:hover { color: var(--zg-forest-700); text-decoration: underline; }
.zg-featured-image { margin: 0 0 var(--zg-space-6); }
.zg-featured-image img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--zg-radius-md); }
.zg-featured-image figcaption, .zg-entry-content figcaption, .wp-element-caption { margin-top: .55rem; color: var(--zg-text-muted); font-size: .88rem; text-align: left; }
.zg-entry-content { min-width: 0; color: #28332e; font-size: clamp(1.06rem, 1.18vw, 1.16rem); line-height: 1.8; }
.zg-entry-content > * { margin-block: 0 var(--zg-space-5); }
.zg-entry-content p:not(.wp-element-caption):not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right):not(.zg-meta):not(.zg-affiliate-disclosure) { text-align: justify; }
.zg-entry-content figcaption, .zg-entry-content figcaption p, .zg-entry-content td, .zg-entry-content td p, .zg-entry-content th, .zg-entry-content th p, .zg-entry-content .wp-element-caption, .zg-entry-content .zg-affiliate-disclosure p, .zg-entry-content .zg-affiliate-box p, .zg-entry-content .zg-product-card p, .zg-entry-content .zg-sponsored-card p, .zg-entry-content .zg-cta p { text-align: left; }
.zg-entry-content h2 { margin-top: 2.6em; margin-bottom: .75em; font-size: clamp(1.75rem, 3vw, 2.25rem); }
.zg-entry-content h3 { margin-top: 2em; margin-bottom: .65em; font-size: clamp(1.35rem, 2.2vw, 1.65rem); }
.zg-entry-content h4 { margin-top: 1.6em; }
.zg-entry-content ul, .zg-entry-content ol { padding-left: 1.5em; }
.zg-entry-content li + li { margin-top: .45em; }
.zg-entry-content blockquote { margin-inline: 0; padding: .25rem 0 .25rem 1.2rem; border-left: 3px solid var(--zg-copper-600); color: var(--zg-text-muted); font-family: var(--zg-font-display); font-size: 1.25em; }
.zg-entry-content table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92em; line-height: 1.5; }
.zg-entry-content th, .zg-entry-content td { min-width: 7rem; padding: .75rem .8rem; border: 1px solid var(--zg-border); vertical-align: top; text-align: left; }
.zg-entry-content th { background: var(--zg-sage-100); color: var(--zg-forest-900); font-weight: 720; }
.zg-entry-content .wp-block-table { max-width: 100%; overflow-x: auto; }
/* Legacy raw tables need a block scrollport; figure-wrapped block tables keep their layout. */
.zg-entry-content table.wp-block-table { display: block; }
.zg-entry-content .wp-block-table figcaption { text-align: left; }
@media (max-width: 42rem) {
  .zg-entry-content .zg-comparison-table--wide table { min-width: 42rem; }
  .zg-entry-content .zg-comparison-table--wide::before { content: 'Przewiń tabelę w poziomie →'; display: block; margin-bottom: .5rem; font-size: .875rem; }
}
.zg-toc, .ez-toc-container, #ez-toc-container { margin-block: var(--zg-space-6); padding: 1.1rem 1.3rem; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); }
.zg-toc__title { margin: 0 0 .6rem; color: var(--zg-forest-900); font-weight: 760; }
.zg-toc__list { margin: 0; padding-left: 1.25rem; }
.zg-toc__item { margin-block: .25rem; }
.zg-toc__item--level-3 { margin-left: .9rem; font-size: .94em; }
.zg-text-link { display: inline-flex; align-items: center; gap: .45rem; margin-top: .7rem; font-weight: 730; text-decoration: none; }
.zg-toc a, .ez-toc-container a, #ez-toc-container a { text-decoration: none; }
.zg-callout, .zg-notice, .zg-affiliate-disclosure { margin-block: var(--zg-space-6); padding: 1.1rem 1.25rem; border: 1px solid var(--zg-border); border-left: 4px solid var(--zg-forest-700); border-radius: var(--zg-radius-sm); background: var(--zg-surface); }
.zg-callout > :last-child, .zg-notice > :last-child, .zg-affiliate-disclosure > :last-child { margin-bottom: 0; }
.zg-notice--warning { border-left-color: var(--zg-warning); background: #fffaf0; }
.zg-notice--danger { border-left-color: var(--zg-danger); background: #fff7f6; }
.zg-notice__title, .zg-callout__title { margin: 0 0 .45rem; font-family: var(--zg-font-body); font-size: 1rem; font-weight: 760; }
.zg-cta { margin-block: var(--zg-space-6); padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--zg-sage-300); border-radius: var(--zg-radius-md); background: var(--zg-sage-100); }
.zg-cta > :last-child, .zg-cta .wp-block-buttons:last-child { margin-bottom: 0; }
.zg-cta h2, .zg-cta h3 { max-width: 28ch; }
.zg-cta p { max-width: 62ch; }
.zg-affiliate-disclosure { border-left-color: var(--zg-copper-600); background: #faf6f1; color: #503a2e; font-size: .92rem; }
.zg-affiliate-box, .zg-product-card, .zg-sponsored-card { margin-block: var(--zg-space-6); padding: clamp(1.1rem, 2.5vw, 1.6rem); border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); }
.zg-affiliate-box { border-top: 3px solid var(--zg-copper-600); }
.zg-product-card { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; }
.zg-entry-content .zg-product-card { grid-template-columns: minmax(0, 1fr); }
.zg-product-card__image { display: grid; min-height: 7rem; place-items: center; border-radius: var(--zg-radius-sm); background: var(--zg-surface-muted); color: var(--zg-text-muted); font-size: .8rem; text-align: center; }
.zg-product-card__title { margin: 0 0 .4rem; font-family: var(--zg-font-body); font-size: 1.15rem; font-weight: 760; }
.zg-product-card__facts { margin: 0; color: var(--zg-text-muted); font-size: .9rem; }
.zg-sponsored-card { border-top: 3px solid var(--zg-copper-600); }
.zg-sponsored-label { display: inline-flex; margin-bottom: .7rem; color: #754323; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.zg-ranking-list { counter-reset: zg-ranking; list-style: none; padding: 0 !important; }
.zg-ranking-list li { position: relative; min-height: 3rem; padding: .7rem .8rem .7rem 3.6rem; border-bottom: 1px solid var(--zg-border); }
.zg-ranking-list li::before { counter-increment: zg-ranking; content: counter(zg-ranking, decimal-leading-zero); position: absolute; left: .7rem; top: .62rem; color: var(--zg-forest-700); font-weight: 800; font-variant-numeric: tabular-nums; }
.zg-article-aside { position: sticky; top: 1.5rem; }
.zg-author-box { padding: 1rem 0; border-top: 1px solid var(--zg-border); border-bottom: 1px solid var(--zg-border); }
.zg-author-box__name { margin: 0 0 .2rem; color: var(--zg-forest-900); font-weight: 740; }
.zg-author-box__bio { margin: .5rem 0 0; color: var(--zg-text-muted); font-size: .9rem; }
.zg-author-box { display: flex; align-items: flex-start; gap: 1rem; margin-block: var(--zg-space-6); padding: 1.25rem; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); }
.zg-author-box__image { flex: 0 0 4.5rem; }
.zg-author-box__avatar { display: block; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; }
.zg-author-box__details { min-width: 0; }
.zg-author-box__label { margin: 0 0 .2rem; color: var(--zg-text-muted); font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.zg-author-box__name a { color: var(--zg-forest-900); text-decoration: none; }
.zg-author-box__name a:hover { text-decoration: underline; }
.zg-widget-area { min-width: 0; margin-block: var(--zg-space-5); }
.zg-widget-area--post-sidebar { margin: 0; }
.zg-widget-area .widget + .widget { margin-top: var(--zg-space-5); }
.zg-widget-area .widget { min-width: 0; }
.zg-widget-area .widget-title { margin-bottom: .7rem; font-family: var(--zg-font-body); font-size: 1rem; letter-spacing: 0; }
/* Existing Organic Farm areas keep their IDs, instances and contextual placement. */
.zg-legacy-layout { display: grid; gap: var(--zg-space-6); align-items: start; }
.zg-legacy-main, .zg-legacy-sidebar, .zg-post-sidebars { min-width: 0; }
.zg-legacy-sidebar > .zg-widget-area:first-child { margin-top: 0; }
.zg-legacy-sidebar .wp-block-search__inside-wrapper, .zg-legacy-footer-widgets .wp-block-search__inside-wrapper { min-width: 0; }
.zg-legacy-sidebar .wp-block-search__input, .zg-legacy-footer-widgets .wp-block-search__input { min-width: 0; width: 100%; }
.zg-legacy-sidebar img, .zg-legacy-footer-widgets img { max-width: 100%; height: auto; }
/* Keep an empty quote widget assigned and editable without an empty frontend box. */
.zg-widget-area--legacy .widget_block:has(> blockquote:only-child > p:only-child:empty) { display: none; }
.zg-legacy-footer-widgets { display: grid; gap: var(--zg-space-5); margin-top: var(--zg-space-7); padding-top: var(--zg-space-5); border-top: 1px solid #426458; }
.zg-legacy-footer-widgets .zg-widget-area { margin: 0; }
.zg-legacy-footer-widgets a { color: inherit; }
.zg-legacy-footer-widgets .widget-title { color: inherit; }
@media (min-width: 48.001rem) { .zg-legacy-footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 75rem) {
  .zg-legacy-layout { grid-template-columns: minmax(0, 1fr) minmax(14rem, 16rem); }
  .zg-legacy-layout .zg-hero-grid, .zg-legacy-layout .zg-hero-feature { grid-template-columns: 1fr; }
  .zg-legacy-layout .zg-hero-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: 1.5rem; }
  .zg-legacy-layout .zg-hero-list__heading { grid-column: 1 / -1; }
  .zg-legacy-footer-widgets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.zg-comments { width: min(100%, var(--zg-reading-width)); margin: var(--zg-space-8) auto 0; padding-top: var(--zg-space-6); border-top: 1px solid var(--zg-border); }
.zg-comments h2 { font-size: 1.8rem; }
.zg-comments__count, .zg-comments__closed, .zg-comment-moderation-note { color: var(--zg-text-muted); font-size: .92rem; }
.zg-comments .comment-list { margin: 0; padding: 0; list-style: none; }
.zg-comments .comment { min-width: 0; margin-block: var(--zg-space-4); padding: var(--zg-space-4); border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); }
.zg-comments .children { margin: var(--zg-space-4) 0 0; padding-left: var(--zg-space-5); list-style: none; border-left: 2px solid var(--zg-sage-300); }
.zg-comments .comment-author { font-weight: 720; }
.zg-comments .comment-meta { color: var(--zg-text-muted); font-size: .85rem; }
.zg-comments .comment-content { overflow-wrap: anywhere; }
.zg-comments .comment-reply-link, .zg-comments__pagination a { display: inline-flex; min-height: 2.5rem; align-items: center; margin-top: .4rem; font-weight: 700; }
.zg-comments .comment-respond { margin-top: var(--zg-space-6); padding: var(--zg-space-5); border: 1px solid var(--zg-border); border-radius: var(--zg-radius-md); background: var(--zg-surface); }
.zg-comments .comment-form input:not([type="checkbox"]):not([type="submit"]):not([type="button"]), .zg-comments .comment-form textarea { width: 100%; max-width: 100%; border: 1px solid var(--zg-border); border-radius: var(--zg-radius-sm); padding: .65rem .75rem; background: var(--zg-surface); }
.zg-comments .comment-form textarea { min-height: 9rem; resize: vertical; }
.zg-comments .comment-form label { display: block; margin-bottom: .25rem; font-weight: 650; }
.zg-comments .comment-form .submit { min-height: 2.75rem; border: 1px solid var(--zg-forest-900); border-radius: var(--zg-radius-sm); padding: .6rem 1rem; background: var(--zg-forest-900); color: var(--zg-surface); font: inherit; font-weight: 720; cursor: pointer; }
.zg-comments .comment-form .submit:hover { background: var(--zg-forest-700); }
.zg-related { margin-top: var(--zg-space-8); padding-top: var(--zg-space-6); border-top: 1px solid var(--zg-border); }
.zg-related h2 { font-size: 1.8rem; }

/* Footer */
.zg-site-footer { margin-top: var(--zg-space-8); padding-block: var(--zg-space-7); background: var(--zg-forest-900); color: #f5f8f5; }
.zg-footer-grid { display: grid; grid-template-columns: minmax(14rem, 1.25fr) repeat(2, minmax(10rem, .75fr)); gap: var(--zg-space-7); }
.zg-footer-brand { color: #fff; }
.zg-footer-intro { max-width: 34ch; margin-top: 1rem; color: #d9e5de; font-size: .95rem; }
.zg-footer-heading { margin: 0 0 .75rem; color: #d9e5de; font-family: var(--zg-font-body); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.zg-footer-nav ul { display: grid; gap: .3rem; }
.zg-footer-nav a { display: inline-flex; min-height: 2.2rem; align-items: center; color: #f5f8f5; text-decoration: none; font-size: .94rem; }
.zg-footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: var(--zg-space-7); padding-top: var(--zg-space-4); border-top: 1px solid #426458; color: #d9e5de; font-size: .85rem; }
.zg-footer-meta p { margin: 0; }

@media (max-width: 74rem) {
  .zg-header-inner { grid-template-columns: auto 1fr auto; }
  .zg-primary-nav ul { gap: .1rem .65rem; }
  .zg-primary-nav a { font-size: .86rem; }
  .zg-article-layout { grid-template-columns: minmax(0, var(--zg-reading-width)) minmax(10rem, 13rem); gap: 2rem; }
}
/* Give a wide editorial menu its own row, without squeezing brand or search. */
@media (min-width: 62.001rem) {
  .zg-header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 2rem; padding-block: .65rem; }
  .zg-brand-wrap { grid-column: 1; grid-row: 1; }
  .zg-header-actions { grid-column: 2; grid-row: 1; }
  .zg-primary-nav { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 62rem) {
  .zg-header-inner { grid-template-columns: 1fr auto; padding-block: .7rem; }
  /* Initial geometry is CSS-owned; the noscript fallback is supplied in head. */
  .zg-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .zg-header-actions { grid-column: 2; grid-row: 1; gap: .65rem; }
  .zg-primary-nav { grid-column: 1 / -1; grid-row: 2; }
  .zg-primary-nav { display: none; }
  .zg-primary-nav.is-open { display: block; }
  .zg-primary-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; padding-block: .4rem .8rem; }
  .zg-primary-nav li { display: flex; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--zg-border); }
  .zg-primary-nav li > a { flex: 1 1 0; width: auto; min-width: 0; }
  .zg-primary-nav .zg-submenu-toggle { display: inline-grid; }
  .zg-primary-nav .sub-menu, .zg-js .zg-primary-nav .sub-menu, .zg-js .zg-primary-nav .page_item_has_children > ul { position: static; width: 100%; max-width: none; margin: 0; padding: 0 0 .4rem .75rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .zg-primary-nav .sub-menu li { display: flex; flex-wrap: wrap; align-items: center; }
  .zg-primary-nav .sub-menu a { flex: 1 1 auto; }
  .zg-primary-nav .sub-menu .sub-menu { padding-left: .75rem; }
  .zg-primary-nav .zg-submenu-toggle { flex: 0 0 2rem; }
  .zg-js .zg-primary-nav .menu-item-has-children > .sub-menu, .zg-js .zg-primary-nav .page_item_has_children > ul { display: none; }
  .zg-js .zg-primary-nav li.is-submenu-open > .sub-menu, .zg-js .zg-primary-nav li.is-submenu-open > ul { display: grid; }
  .zg-hero-grid { grid-template-columns: 1fr; }
  .zg-hero-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: 1.5rem; }
  .zg-hero-list__heading { grid-column: 1 / -1; }
  .zg-article-layout { grid-template-columns: minmax(0, var(--zg-reading-width)); }
  .zg-article-aside { position: static; order: 2; }
  .zg-author-box { display: grid; grid-template-columns: minmax(8rem, .4fr) 1fr; gap: .3rem 1rem; }
  .zg-author-box__bio { grid-column: 2; }
}
@media (max-width: 48rem) {
  .zg-header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .zg-header-actions { display: contents; }
  .zg-nav-toggle { grid-column: 2; grid-row: 1; }
  .zg-search-form { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
  .zg-primary-nav { grid-row: 3; }
  .zg-search-form input[type="search"] { flex: 1 1 auto; width: 100%; min-width: 0; }
  body { font-size: 1rem; }
  .zg-main { padding-block: var(--zg-space-6); }
  .zg-section { margin-block: var(--zg-space-7); }
  .zg-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zg-card--featured { grid-column: span 2; }
  .zg-hero-feature { grid-template-columns: minmax(0, 1fr); }
  .zg-hero-feature__image { min-height: 0; aspect-ratio: 16 / 9; }
  .zg-editorial-note { grid-template-columns: 1fr; gap: var(--zg-space-3); }
  .zg-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--zg-space-5); }
  .zg-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 37.5rem) {
  :root { --zg-page-gutter: 1rem; }
  .zg-header-inner { gap: .7rem; }
  .zg-brand { font-size: 1.08rem; }
  .zg-brand-mark { width: 2rem; }
  .zg-header-actions { gap: .4rem; }
  .zg-search-form input[type="search"] { padding-inline: .5rem; }
  .zg-search-form button[type="submit"] { width: 2.75rem; padding-inline: .2rem; font-size: 1.25rem; }
  .zg-primary-nav ul { grid-template-columns: 1fr; }
  .zg-card-grid { grid-template-columns: 1fr; }
  .zg-card--featured { grid-column: auto; grid-template-columns: 1fr; }
  .zg-card--featured .zg-card__image { min-height: 13rem; aspect-ratio: 16 / 10; }
  .zg-card--featured .zg-card__body { padding: 1.2rem; }
  .zg-hero-list { grid-template-columns: 1fr; }
  .zg-hero-list__heading { grid-column: auto; }
  .zg-product-card { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .8rem; }
  .zg-product-card .wp-block-buttons { grid-column: 1 / -1; width: 100%; }
  .zg-product-card .wp-block-button, .zg-product-card .wp-block-button__link { width: 100%; }
  .zg-footer-grid { grid-template-columns: 1fr; }
  .zg-footer-grid > :first-child { grid-column: auto; }
  .zg-author-box { grid-template-columns: 1fr; }
  .zg-author-box__bio { grid-column: auto; }
  .zg-author-box { gap: .75rem; padding: 1rem; }
  .zg-author-box__image { flex-basis: 3.5rem; }
  .zg-author-box__avatar { width: 3.5rem; height: 3.5rem; }
  .zg-comments .children { padding-left: .75rem; }
  .zg-comments .comment { padding: .85rem; }
  .zg-entry-content table { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Hide incomplete pattern buttons until they have a destination. */
.zg-entry-content .zg-cta .wp-block-button__link:not([href]),
.zg-entry-content .zg-cta .wp-block-button__link[href=""],
.zg-entry-content .zg-cta .wp-block-button__link[href="#"],
.zg-entry-content .zg-product-card .wp-block-button__link:not([href]),
.zg-entry-content .zg-product-card .wp-block-button__link[href=""],
.zg-entry-content .zg-product-card .wp-block-button__link[href="#"] { display: none; }

.zg-author-box__image[hidden] { display: none; }
.zg-comments .comment-form .submit:focus-visible { outline: 3px solid var(--zg-forest-700); outline-offset: 3px; }
.zg-comments .comment-form .submit:active { background: var(--zg-forest-900); }
