/* Only what theme.json cannot express. Keep this file small. */

body {
	background-image: var(--g-texture);
	background-blend-mode: multiply;
	-webkit-font-smoothing: antialiased;
}

:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--grimoire-green);
	outline-offset: 3px;
	border-radius: 2px;
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--grimoire-green);
	color: var(--wp--preset--color--paper-on-green);
}

.wp-element-button:active {
	transform: translateY(1px);
}

p {
	text-wrap: pretty;
}

.is-style-script,
.has-script-font-family {
	line-height: 1.05;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------------
   Components (Phase 1 style tile). Registered as block styles in functions.php.
   Radius rule: buttons and inputs 3px, cards 16px, hero panel 24px.
   ------------------------------------------------------------------ */
:root {
	--g-earth-text: #684E3A; /* earth, a shade deeper, for small text (WCAG AA on every paper tint) */
	--g-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .4 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
	--g-torn: polygon(0 0, 100% 0, 100.0% calc(100% - 5px), 97.9% calc(100% - 6px), 96.3% calc(100% - 1px), 94.7% calc(100% - 5px), 93.1% calc(100% - 3px), 91.5% calc(100% - 1px), 88.3% calc(100% - 6px), 86.7% calc(100% - 3px), 85.1% calc(100% - 6px), 83.5% calc(100% - 1px), 81.4% calc(100% - 0px), 78.2% calc(100% - 0px), 76.1% calc(100% - 0px), 74.0% calc(100% - 4px), 70.8% calc(100% - 2px), 69.2% calc(100% - 4px), 67.1% calc(100% - 1px), 65.0% calc(100% - 5px), 63.4% calc(100% - 1px), 61.8% calc(100% - 3px), 58.6% calc(100% - 6px), 56.0% calc(100% - 7px), 52.8% calc(100% - 5px), 50.2% calc(100% - 3px), 48.1% calc(100% - 3px), 46.5% calc(100% - 4px), 43.3% calc(100% - 5px), 40.1% calc(100% - 4px), 38.5% calc(100% - 1px), 35.3% calc(100% - 2px), 32.7% calc(100% - 2px), 29.5% calc(100% - 6px), 27.9% calc(100% - 1px), 25.3% calc(100% - 5px), 22.7% calc(100% - 7px), 19.5% calc(100% - 1px), 17.9% calc(100% - 4px), 14.7% calc(100% - 1px), 13.1% calc(100% - 4px), 9.9% calc(100% - 4px), 6.7% calc(100% - 5px), 5.1% calc(100% - 7px), 2.5% calc(100% - 2px), 0.9% calc(100% - 7px), 0 calc(100% - 3px));
	--g-torn-up: polygon(0 100%, 0.0% 7px, 3.2% 7px, 5.3% 2px, 8.5% 2px, 10.1% 7px, 12.7% 2px, 14.3% 0px, 17.5% 7px, 19.6% 0px, 21.2% 0px, 22.8% 3px, 24.9% 0px, 28.1% 5px, 31.3% 3px, 33.4% 4px, 36.6% 0px, 38.2% 7px, 40.8% 6px, 42.4% 4px, 45.0% 3px, 47.6% 0px, 49.2% 1px, 52.4% 1px, 55.0% 6px, 56.6% 0px, 58.2% 3px, 60.3% 0px, 63.5% 6px, 66.7% 6px, 68.3% 3px, 70.9% 5px, 72.5% 4px, 75.1% 0px, 78.3% 1px, 80.4% 3px, 82.0% 0px, 83.6% 7px, 86.8% 2px, 88.9% 7px, 91.0% 2px, 94.2% 6px, 95.8% 6px, 99.0% 3px, 100% 3px, 100% 100%);
	--g-rule: var(--wp--preset--color--sage-rule);
	--g-muted: rgba(31, 51, 38, 0.78);
	--g-label-paper: #F7F1E6;
	--g-hatch: repeating-linear-gradient(135deg, rgba(161, 167, 151, 0.16) 0 2px, transparent 2px 16px);
}

/* Buttons: outline variant and small text link */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border-width: 1px;
	padding: 0.6em 1.35em;
	color: var(--wp--preset--color--ink);
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}
.g-arrow-link a {
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.95rem;
	font-weight: 500;
}

/* Small label, script accent, monogram oval, flag */
.is-style-label {
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.is-style-script {
	font-family: var(--wp--preset--font-family--script);
	font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem);
	line-height: 1.05;
	color: var(--wp--preset--color--grimoire-green);
}
.is-style-monogram {
	display: inline-grid;
	place-items: center;
	min-width: 2.8em;
	height: 1.9em;
	padding: 0 0.6em;
	border: 1px solid currentColor;
	border-radius: 50%;
	outline: 1px solid currentColor;
	outline-offset: 3px;
	font-family: var(--wp--preset--font-family--display);
	line-height: 1;
}
.is-style-flag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.8rem;
	line-height: 1;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--g-rule);
	border-radius: 3px;
	padding: 7px 10px;
}

/* Double-rule frame, like the Grimoire page border */
.is-style-frame,
.is-style-tinted-card,
.is-style-tile,
.is-style-soon-tile {
	position: relative;
	border: 1px solid var(--g-rule);
	border-radius: 16px;
}
.is-style-frame::before,
.is-style-tinted-card::before,
.is-style-tile::before,
.is-style-soon-tile::before {
	content: "";
	position: absolute;
	inset: 5px;
	border: 1px solid var(--g-rule);
	border-radius: 11px;
	pointer-events: none;
}
.is-style-frame { padding: clamp(18px, 3vw, 36px); background: var(--wp--preset--color--paper); }
.is-style-tinted-card { padding: clamp(18px, 3vw, 32px); background: var(--wp--preset--color--card); }

/* Contents index: like the Grimoire's index. Each child group (a heading and a line) gets a Nº and a hairline.
   Used instead of grids of boxes. One column on phones, two from 800px. */
.is-style-index { counter-reset: g-index; display: grid !important; column-gap: clamp(28px, 5vw, 72px); }
.is-style-index > * { counter-increment: g-index; position: relative; margin: 0 !important; padding: 18px 0 20px 3.6rem; border-bottom: 1px solid var(--g-rule); }
.is-style-index > :first-child { border-top: 1px solid var(--wp--preset--color--ink); }
.is-style-index > *::before { content: "Nº " counter(g-index, decimal-leading-zero); position: absolute; left: 0; top: 23px; font-family: var(--wp--preset--font-family--label); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--g-earth-text); }
.is-style-index h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); line-height: 1.2; margin: 0; }
.is-style-index p { margin: 4px 0 0; color: var(--g-muted); font-size: 1.02rem; }
@media (min-width: 800px) {
	.is-style-index { grid-template-columns: 1fr 1fr; }
	.is-style-index > :nth-child(2) { border-top: 1px solid var(--wp--preset--color--ink); }
}

/* Headings inside boxes stay modest; the section heading above carries the weight. */
.is-style-tinted-card h3, .is-style-frame h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); line-height: 1.2; }

/* Paper label with a torn bottom edge and a double inner rule */
.is-style-paper-label {
	position: relative;
	background: var(--g-label-paper);
	padding: 28px 30px 38px;
	clip-path: var(--g-torn);
	filter: drop-shadow(0 18px 18px rgba(31, 51, 38, 0.28));
}
.is-style-paper-label::before,
.is-style-paper-label::after {
	content: "";
	position: absolute;
	border: 1px solid var(--wp--preset--color--ink);
	pointer-events: none;
}
.is-style-paper-label::before { inset: 8px 8px 14px; }
.is-style-paper-label::after { inset: 12px 12px 18px; }

/* Photo slot: a cover block that shows a hatched placeholder until an image is added */
.wp-block-cover.is-style-photo-slot {
	border: 1px dashed var(--wp--preset--color--earth);
	border-radius: 16px;
	overflow: hidden;
}
.wp-block-cover.is-style-photo-slot:not(:has(.wp-block-cover__image-background, .wp-block-cover__video-background)) .wp-block-cover__background {
	background-image: var(--g-hatch);
}
.wp-block-cover.is-style-photo-slot:has(.wp-block-cover__image-background, .wp-block-cover__video-background) {
	border-style: solid;
	border-color: transparent;
}
.wp-block-cover.is-style-photo-slot:has(.wp-block-cover__image-background, .wp-block-cover__video-background) .wp-block-cover__background {
	opacity: 0 !important;
}
.is-style-slot-note {
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--g-earth-text);
	text-align: center;
	max-width: 36ch;
	margin-inline: auto;
}
.wp-block-cover:has(.wp-block-cover__image-background) .is-style-slot-note { display: none; }

/* Hero: photo slot with the paper label at the bottom left */
.g-hero.wp-block-cover { border-radius: 24px; min-height: clamp(520px, 60vw, 640px); align-items: flex-end; justify-content: flex-start; padding: clamp(14px, 3vw, 40px); }
.g-hero .wp-block-cover__inner-container { width: 100%; max-width: none; }
.g-hero .is-style-slot-note { position: absolute; top: 18%; right: 6%; width: min(40%, 34ch); }
.g-hero .is-style-paper-label { max-width: 520px; }
.g-hero h1 { margin-top: 0.1em; }
@media (max-width: 781px) {
	.g-hero .is-style-slot-note { position: static; width: auto; margin-bottom: 24px; }
}

/* Product row: one horizontal scroll row */
.g-shop-row {
	display: flex !important;
	gap: 22px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 20px;
	scrollbar-width: thin;
	scrollbar-color: var(--g-rule) transparent;
}
.g-shop-row > * { margin: 0 !important; flex: 0 0 min(72vw, 270px); scroll-snap-align: start; }
.g-product { position: relative; }
.g-product > * + * { margin-top: 6px !important; }
.g-product h3 { font-size: 1.35rem; margin-top: 12px !important; }
.g-product h3 a { text-decoration: none; }
.g-product h3 a::after { content: ""; position: absolute; inset: 0; }
.g-product p { margin: 0; }
.g-product .g-desc { color: var(--g-muted); font-size: 1.02rem; }
.g-product .g-meta { font-family: var(--wp--preset--font-family--label); font-size: 0.88rem; }
.g-product:hover .is-style-tile,
.g-product:hover .is-style-soon-tile { border-color: var(--wp--preset--color--gold); }
.is-style-tile,
.is-style-soon-tile {
	aspect-ratio: 4 / 5;
	display: grid !important;
	place-items: center;
	overflow: hidden;
	background: var(--wp--preset--color--paper-deep);
	transition: border-color 0.3s;
}
.is-style-tile > *,
.is-style-soon-tile > * { margin: 0 !important; grid-area: 1 / 1; }
.is-style-tile .wp-block-image { width: 60%; }
.is-style-tile .wp-block-image img { width: 100%; height: auto; }
.is-style-tile.g-book { background: var(--wp--preset--color--card); }
.is-style-tile.g-book img { box-shadow: var(--wp--preset--shadow--book); }
.is-style-soon-tile { background: var(--g-hatch), var(--wp--preset--color--paper); border-style: dashed; }
.is-style-soon-tile .is-style-flag { align-self: start; justify-self: start; margin: 14px !important; }
.is-style-soon-tile .is-style-monogram { font-size: 1.6rem; }

/* Section tiles: photo slot on top, caption below; the whole tile is clickable */
.g-section-grid { display: grid !important; gap: 16px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 300px; }
.g-section-grid > * { margin: 0 !important; }
.g-section-grid > :first-child { grid-column: span 2; grid-row: span 2; }
@media (min-width: 900px) { .g-section-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 280px; } }
@media (max-width: 600px) { .g-section-grid { grid-template-columns: 1fr; grid-auto-rows: 270px; } .g-section-grid > :first-child { grid-column: auto; grid-row: auto; } }
.is-style-section-tile {
	position: relative;
	display: flex !important;
	flex-direction: column;
	border: 1px solid var(--g-rule);
	border-radius: 16px;
	background: var(--wp--preset--color--paper);
	overflow: hidden;
	transition: border-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-style-section-tile:hover { border-color: var(--wp--preset--color--gold); transform: translateY(-3px); }
.is-style-section-tile > * { margin: 0 !important; }
.is-style-section-tile .wp-block-cover { flex: 1 1 0; min-height: 0 !important; border: 0; border-bottom: 1px solid var(--g-rule); border-radius: 0; padding: 12px; }
.is-style-section-tile .g-caption { padding: 14px 18px 16px; display: grid !important; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.is-style-section-tile .g-caption > * { margin: 0 !important; }
.is-style-section-tile h3 { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); }
.is-style-section-tile h3 a { text-decoration: none; }
.is-style-section-tile h3 a::after { content: ""; position: absolute; inset: 0; }
.is-style-section-tile .g-count { font-family: var(--wp--preset--font-family--label); font-size: 0.9rem; color: var(--g-muted); white-space: nowrap; }
.is-style-section-tile .g-line { grid-column: 1 / -1; font-size: 0.98rem; color: var(--g-muted); line-height: 1.35; }
.g-section-grid > :first-child h3 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); }

/* At-a-glance panel (herb pages) */
.is-style-glance {
	background: var(--wp--preset--color--grimoire-green);
	color: var(--wp--preset--color--paper-on-green);
	padding: 20px 22px 22px;
	border-radius: 4px;
}
.is-style-glance h3,
.is-style-glance h4 { color: var(--wp--preset--color--paper-on-green); }
.is-style-glance .g-glance-head { display: flex !important; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(234, 238, 224, 0.35); padding-bottom: 10px; margin-bottom: 14px; }
.is-style-glance .g-glance-head > * { margin: 0 !important; }
.is-style-glance .g-glance-head .is-style-script { color: var(--wp--preset--color--paper-on-green); font-size: 2rem; }
.is-style-glance .g-glance-grid { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.is-style-glance .g-glance-grid > * { margin: 0 !important; }
.is-style-glance .g-glance-grid p { margin: 0; }
.is-style-glance .is-style-label { opacity: 0.85; font-size: 0.66rem; }
.is-style-glance .g-value { font-size: 1.05rem; line-height: 1.25; margin-top: 4px !important; }
@media (min-width: 700px) { .is-style-glance .g-glance-grid { grid-template-columns: repeat(3, 1fr); } }

/* Reflection line */
.is-style-reflection { border-top: 1px solid var(--wp--preset--color--ink); padding-top: 16px; text-align: center; }
.is-style-reflection > * { margin-inline: auto; }
.is-style-reflection .g-question { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.15; margin-top: 6px; }

/* Tinted paper band with torn edges (full-width sections) */
.is-style-tinted-band {
	position: relative;
	background-color: #E9E0CD;
	background-image: var(--g-texture);
	background-blend-mode: multiply;
	box-shadow: inset 0 0 160px rgba(122, 94, 72, 0.08);
}
.is-style-tinted-band::before,
.is-style-tinted-band::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 12px;
	background-color: #E9E0CD;
	background-image: var(--g-texture);
	background-blend-mode: multiply;
	pointer-events: none;
	z-index: 1;
}
.is-style-tinted-band::before { top: -11px; clip-path: var(--g-torn-up); }
.is-style-tinted-band::after { top: calc(100% - 1px); clip-path: var(--g-torn); }

/* Journal list: centred numbered rows */
.g-journal { max-width: 860px; margin-inline: auto !important; border-bottom: 1px solid var(--wp--preset--color--ink); }
.g-journal > * { margin: 0 !important; }
.g-post { position: relative; display: grid !important; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 20px 4px; border-top: 1px solid var(--wp--preset--color--ink); }
.g-post > * { margin: 0 !important; }
.g-post h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.g-post h3 a { text-decoration: none; }
.g-post h3 a::after { content: ""; position: absolute; inset: 0; }
.g-post:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.2em; }
.g-post .is-style-label { color: var(--g-earth-text); letter-spacing: 0.14em; }
.g-post .is-style-script { font-size: 1.9rem; white-space: nowrap; }
@media (max-width: 560px) { .g-post { grid-template-columns: 44px 1fr; } .g-post .is-style-script { display: none; } }

/* Forms: herb search and the email form placeholder */
.wp-block-search__input,
.g-form input[type="email"] {
	min-height: 52px;
	padding: 0 18px;
	font: 1.1rem var(--wp--preset--font-family--body);
	background: #FBF7EE;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 3px;
}
.wp-block-search__input::placeholder,
.g-form input::placeholder { color: rgba(31, 51, 38, 0.6); }
.wp-block-search__inside-wrapper { gap: 10px; }
.wp-block-search__button { margin-left: 0; min-height: 52px; }
.g-form { display: grid; gap: 8px; width: min(100%, 560px); margin-inline: auto; text-align: left; }
.g-form label { font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; }
.g-form .g-row { display: flex; flex-direction: column; gap: 10px; }
.g-form .g-row input { flex: 1; min-width: 0; }
.g-form .g-help { font-size: 0.95rem; color: var(--g-muted); text-align: center; margin: 0; }
@media (min-width: 600px) { .g-form .g-row { flex-direction: row; } }
.g-form-status { margin: 0; text-align: center; font-size: 1rem; }
.g-form-status:empty { display: none; }
.g-form-status:focus { outline: none; }
.g-form.is-done label, .g-form.is-done .g-row, .g-form.is-done .g-help { display: none; }
.g-form.is-done .g-form-status { padding: 18px 20px; border: 1px solid var(--g-rule); border-radius: 3px; background: var(--wp--preset--color--paper); font-size: 1.1rem; line-height: 1.5; }
.g-form button:disabled { opacity: 0.7; cursor: progress; }
@media (max-width: 560px) { .wp-block-search__inside-wrapper { flex-direction: column; } }

/* Seal block */
.grimoire-seal svg { display: block; }
.grimoire-seal .grimoire-seal__ring { font-family: var(--wp--preset--font-family--label); text-transform: uppercase; }
.grimoire-seal .grimoire-seal__centre { font-family: var(--wp--preset--font-family--highlight); font-style: italic; }

/* Style tile page helpers */
.g-swatches { display: grid !important; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.g-swatches > * { margin: 0 !important; }
.g-swatch { border-radius: 12px; padding: 18px 16px; border: 1px solid var(--g-rule); min-height: 110px; }
.g-swatch p { margin: 0; font-size: 0.95rem; line-height: 1.35; }
.g-demo-row { display: flex !important; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.g-demo-row > * { margin: 0 !important; }
.g-green-demo { background: var(--wp--preset--color--grimoire-green); color: var(--wp--preset--color--paper-on-green); border-radius: 16px; padding: 24px; }

/* Paper button for green backgrounds */
.wp-block-button.is-style-paper > .wp-block-button__link {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--paper);
}
.wp-block-button.is-style-paper > .wp-block-button__link:hover {
	background: var(--wp--preset--color--paper-on-green);
	border-color: var(--wp--preset--color--paper-on-green);
}
.g-green-demo :focus-visible { outline-color: var(--wp--preset--color--paper-on-green); }

/* Hero title and stamp */
.g-hero .is-style-paper-label h1,
.g-hero .is-style-paper-label h2 { font-size: var(--wp--preset--font-size--huge); letter-spacing: -0.01em; }
.g-hero .is-style-paper-label > * + * { margin-top: 12px; }
.g-hero .is-style-paper-label .g-lead { font-size: 1.12rem; line-height: 1.45; max-width: 34ch; }
.g-hero .g-hero-stamp { position: absolute; right: 4%; bottom: 6%; margin: 0; filter: drop-shadow(0 8px 10px rgba(31, 51, 38, 0.25)); }
.g-hero .g-hero-stamp circle:first-child { fill: var(--g-label-paper); }
@media (max-width: 781px) { .g-hero .g-hero-stamp { display: none; } }

/* Free sample signup */
.g-signup { max-width: 760px; margin-inline: auto !important; text-align: center; }
.g-signup > * { margin-inline: auto; }
.g-signup h2 { margin-top: 4px; }

/* Style tile page sections */
.g-tile-section { margin-top: var(--wp--preset--spacing--70) !important; }
.g-tile-section > h2 { margin-bottom: 8px; }
.g-tile-section > .g-note { color: var(--g-muted); margin-bottom: var(--wp--preset--spacing--40); }

/* Cover blocks: keep brand ink instead of core's black on light covers */
.wp-block-cover.is-style-photo-slot .wp-block-cover__inner-container { color: var(--wp--preset--color--ink); }
/* Hero: note and stamp position against the whole photo, above the placeholder */
.g-hero .wp-block-cover__inner-container { position: static; }
.g-hero .is-style-paper-label,
.g-hero .is-style-slot-note,
.g-hero .g-hero-stamp { z-index: 2; }
.is-style-monogram { margin-left: 4px; }
.g-tile-section > h3 { margin-top: var(--wp--preset--spacing--60); margin-bottom: var(--wp--preset--spacing--30); }

/* ------------------------------------------------------------------
   Phase 2: header, footer and homepage layout
   ------------------------------------------------------------------ */
.g-topbar { height: 10px; }
.g-header { border-bottom: 1px solid var(--g-rule); }
.g-header-row { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 72px; }
.g-header-row > * { margin: 0 !important; }
.g-header-row .g-main-nav { justify-self: start; }
/* Wordmark: the site title, lowercase "miru herbs" in the display face */
.g-header-row .g-brand { justify-self: center; white-space: nowrap; font-size: clamp(1.45rem, 1.2rem + 0.9vw, 2rem); letter-spacing: -0.005em; line-height: 1; }
.g-header-row .g-header-end { justify-self: end; display: flex !important; align-items: center; gap: 14px; }
.g-header-end > * { margin: 0 !important; }
.g-basket-link { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--wp--preset--color--ink); border-radius: 50%; transition: background-color 0.2s; }
.g-basket-link[hidden] { display: none; }
.g-basket-link:hover { background: rgba(31, 51, 38, 0.06); }
.g-basket-icon { width: 26px; height: 26px; }
.g-basket-count { position: absolute; top: 3px; right: 0; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wp--preset--color--grimoire-green); color: var(--wp--preset--color--paper-on-green); font-family: var(--wp--preset--font-family--label); font-size: 0.7rem; line-height: 1; }
.g-header-cta .wp-block-button__link { padding: 0.5em 1.1em; font-size: 0.9rem; }
.g-main-nav .wp-block-navigation-item__content { padding: 10px 0; border-bottom: 1px solid transparent; text-decoration: none; }
.g-main-nav .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--gold); }
.g-main-nav .wp-block-navigation__container { gap: 28px; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--ink) !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; letter-spacing: 0; text-transform: none; }
@media (max-width: 599px) {
	.g-header-cta .wp-block-button__link { font-size: 0.82rem; padding: 0.45em 0.8em; }
}

.g-footer { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); }
/* Footer links: no underline at rest (they sit in labelled lists); a thin gold line appears on hover and keyboard focus */
.g-footer a { color: var(--wp--preset--color--paper-on-green); text-decoration: none; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.g-footer .g-brand { font-size: 2rem; letter-spacing: -0.005em; line-height: 1; margin-block: 20px 0 !important; }
.g-footer .g-brand a { text-decoration: none; }
.g-footer a:hover, .g-footer a:focus-visible { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); }
.g-footer :focus-visible { outline-color: var(--wp--preset--color--paper-on-green); }
.g-footer-top { display: grid !important; gap: 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(234, 238, 224, 0.28); }
.g-footer-top > * { margin: 0 !important; }
.g-footer-brand > * + * { margin-top: 14px; }
.g-footer-line { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.2; max-width: 22ch; opacity: 0.9; }
.g-footer-cols { display: grid !important; gap: 28px 24px; grid-template-columns: repeat(2, 1fr); }
.g-footer-cols > * { margin: 0 !important; }
.g-footer-h { font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; margin: 0 0 8px; }
.g-footer-cols ul { list-style: none; padding: 0; margin: 0; }
.g-footer-cols li a { display: inline-block; padding: 5px 0; }
/* Reopens the CookieScript consent banner (it listens for clicks on .csconsentlink). */
.g-footer .g-cookie-link { display: inline-block; padding: 5px 0; font: inherit; color: var(--wp--preset--color--paper-on-green); background: none; border: 0; cursor: pointer; text-align: left; }
.g-footer .g-cookie-link:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.25em; }
.g-footer-copy { font-size: 0.95rem; opacity: 0.9; margin-top: 22px; }
@media (min-width: 900px) { .g-footer-top { grid-template-columns: 1fr 2.6fr; gap: clamp(32px, 6vw, 96px); } .g-footer-cols { grid-template-columns: repeat(4, 1fr); } }

/* Homepage sections */
.g-home { margin: 0; }
.g-home .wp-block-post-content > * { margin-block: 0; }
.g-sec { padding-block: var(--wp--preset--spacing--70); }
.g-sec--hero { padding-block: clamp(20px, 3vw, 36px) var(--wp--preset--spacing--60); }
.g-sec-head { max-width: 60ch; margin-bottom: var(--wp--preset--spacing--50) !important; }
.g-sec-head > * + * { margin-top: 10px; }
.g-sec-head p { color: var(--g-muted); font-size: 1.1rem; }
.g-sec-head.is-center { text-align: center; margin-inline: auto !important; }
.g-sec-head.is-center > * { margin-inline: auto; }

/* Shop row controls (added by assets/js/shop-row.js) */
.g-row-ctrl { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 14px; }
.g-row-ctrl button { width: 42px; height: 42px; border-radius: 3px; border: 1px solid var(--wp--preset--color--ink); background: transparent; color: var(--wp--preset--color--ink); font: 500 1.2rem/1 var(--wp--preset--font-family--label); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.g-row-ctrl button:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.g-product h3 a:focus-visible { outline: none; }
.g-product:has(h3 a:focus-visible) .is-style-tile,
.g-product:has(h3 a:focus-visible) .is-style-soon-tile { outline: 3px solid var(--wp--preset--color--grimoire-green); outline-offset: 3px; }

/* Find your herb */
.g-find .wp-block-search { max-width: 720px; margin-inline: auto; }
.g-browse-head { margin-top: var(--wp--preset--spacing--60) !important; }
.g-browse-head h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.g-center-buttons { justify-content: center; margin-top: var(--wp--preset--spacing--40) !important; }
.is-style-section-tile h3 a:focus-visible { outline: none; }
.is-style-section-tile:has(h3 a:focus-visible) { outline: 3px solid var(--wp--preset--color--grimoire-green); outline-offset: 3px; }

/* Inside the Grimoire: framed spread and a colophon row */
.g-stage { padding: clamp(14px, 2.4vw, 28px) !important; background: var(--wp--preset--color--card) !important; }
.g-stage .wp-block-image { margin: 0; }
.g-stage .wp-block-image img { width: 100%; height: auto; box-shadow: var(--wp--preset--shadow--book); }
.g-stage .g-caption-line { margin-top: 12px; font-size: 0.95rem; color: var(--g-muted); }
.g-colophon { display: grid !important; grid-template-columns: repeat(2, 1fr); border-block: 1px solid var(--wp--preset--color--ink); margin-top: clamp(28px, 4vw, 44px) !important; }
.g-colophon > * { margin: 0 !important; padding: 18px 16px 18px 0; }
.g-colophon > * > * { margin: 0; }
.g-colophon .g-big { font-family: var(--wp--preset--font-family--display); font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); line-height: 1; }
.g-colophon .g-lbl { color: var(--g-muted); }
.g-colophon .g-buy { grid-column: 1 / -1; border-top: 1px solid var(--g-rule); display: flex !important; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.g-colophon .g-price { font-family: var(--wp--preset--font-family--display); font-size: 1.7rem; }
.g-colophon .g-buy .wp-block-buttons { margin: 0; }
.g-small-print { font-size: 0.95rem; color: var(--g-muted); margin-top: 12px !important; }

/* Section head beside its picture (product pages): text left, image or photo slot right; stacked on phones. */
.g-split { display: grid !important; gap: clamp(20px, 3vw, 40px); align-items: center; margin-bottom: clamp(24px, 4vw, 44px) !important; }
.g-split > * { margin: 0 !important; }
.g-split .g-sec-head { margin-bottom: 0 !important; }
@media (min-width: 900px) { .g-split { grid-template-columns: 5fr 6fr; } }

/* Photo slots inside page content stay compact until the real image arrives. */
.wp-block-cover.g-slot-compact { min-height: 0 !important; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; }
/* Two plain sections in a row share one gap instead of stacking two (all inner pages). */
body:not(.home) .wp-block-post-content > .g-sec:not(.is-style-tinted-band) + .g-sec:not(.is-style-tinted-band) { padding-top: 0 !important; }
.g-spreads { margin-top: 22px !important; }

/* "Is your herb inside?" under the Grimoire's section index */
.g-inline-finder { margin-top: clamp(28px, 4vw, 44px) !important; text-align: center; }
.g-inline-finder h3 { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); margin-bottom: 14px; }

/* Thank-you page after checkout (Payhip success redirect) */
.g-thanks > * + * { margin-top: 0; }
.g-thanks-head { margin-bottom: clamp(28px, 4vw, 40px) !important; }
.g-thanks-head > * + * { margin-top: 8px; }
.g-thanks-head .g-lead { font-size: 1.15rem; }
.g-thanks-next { margin-top: clamp(44px, 6vw, 72px) !important; }
.g-thanks-next h2 { margin: 0 0 8px; }
.g-thanks-next .wp-block-buttons { margin-top: 18px; }

/* Questions: heading left, questions right */
.g-qa { display: grid !important; gap: 18px clamp(28px, 5vw, 72px); }
.g-qa > * { margin: 0 !important; }
.g-qa__head h2 { margin: 0; }
.g-qa__head p { margin-top: 10px; color: var(--g-muted); }
@media (min-width: 900px) { .g-qa { grid-template-columns: 1fr 2fr; } .g-qa__head { position: sticky; top: 24px; align-self: start; } }
@media (min-width: 900px) {
	.g-colophon { grid-template-columns: 1fr 1fr 1fr 1.6fr; }
	.g-colophon > * + * { border-left: 1px solid var(--g-rule); padding-left: 22px; }
	.g-colophon .g-buy { grid-column: auto; border-top: 0; justify-content: flex-end; }
}

/* About: the only image and text split on the page */
.g-maker { display: grid !important; gap: 32px; align-items: center; }
.g-maker > * { margin: 0 !important; }
.g-maker .is-style-frame { max-width: 340px; padding: 14px !important; background: var(--wp--preset--color--card); }
.g-maker .wp-block-cover { aspect-ratio: 4 / 5; min-height: 0 !important; border-radius: 8px; }
.g-maker-copy > * + * { margin-top: 18px; }
.g-pull { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: clamp(1.9rem, 1.4rem + 1.8vw, 3rem); line-height: 1.12; max-width: 22ch; color: var(--wp--preset--color--grimoire-green); }
@media (min-width: 900px) { .g-maker { grid-template-columns: 4fr 6fr; gap: clamp(40px, 7vw, 110px); } }
/* About: chapters with the heading in the margin, on the same two columns as the portrait and intro above. */
.g-chapter { display: grid !important; gap: 10px; }
.g-chapter + .g-chapter { margin-top: clamp(44px, 6vw, 80px) !important; }
.g-chapter > * { margin: 0 !important; }
.g-chapter__head h2 { margin: 0; }
.g-chapter__body > * + * { margin-top: 1em; }
.g-chapter__body .is-style-index { grid-template-columns: 1fr !important; }
.g-chapter__body .is-style-index > :nth-child(2) { border-top: 0; }
@media (min-width: 900px) {
	.g-chapter { grid-template-columns: 4fr 6fr; gap: clamp(40px, 7vw, 110px); }
	.g-chapter__head { position: sticky; top: 24px; align-self: start; }
}

/* Journal: latest posts as numbered rows (numbers come from CSS) */
.g-journal.wp-block-post-template { list-style: none; padding: 0; counter-reset: gpost; }
.g-journal.wp-block-post-template > li { counter-increment: gpost; margin: 0; }
.g-journal .g-post::before {
	content: "Nº " counter(gpost);
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	color: var(--g-earth-text);
}
.g-journal .wp-block-post-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); margin: 0; }
.g-journal .wp-block-post-title a { text-decoration: none; }
.g-journal .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.g-journal .wp-block-post-title a:focus-visible { outline: none; }
.g-journal .g-post:has(a:focus-visible) { outline: 3px solid var(--wp--preset--color--grimoire-green); outline-offset: 2px; }
.g-header-cta .wp-block-button__link { white-space: nowrap; }

/* ------------------------------------------------------------------
   Phase 3: shop and product pages
   ------------------------------------------------------------------ */
.g-product-page { margin: 0; }
.g-product-page .wp-block-post-content > * { margin-block: 0; }
.g-product-hero { padding-block: var(--wp--preset--spacing--60) !important; }
.g-product-hero-grid { display: grid !important; gap: clamp(28px, 5vw, 72px); align-items: center; }
.g-product-hero-grid > * { margin: 0 !important; }
.g-product-art { background: var(--wp--preset--color--card) !important; display: grid !important; place-items: center; padding: clamp(20px, 4vw, 48px) !important; }
.g-product-art .wp-block-post-featured-image { margin: 0; max-width: 360px; }
/* Photo covers (opaque mock-ups) fill the frame; cut-out plates keep paper around them. */
.g-product-art:has(.is-photo) { padding: clamp(10px, 1.4vw, 16px) !important; }
.g-product-art .wp-block-post-featured-image.is-photo { max-width: none; width: 100%; border-radius: 8px; overflow: hidden; }
.g-product-art .wp-block-post-featured-image.is-photo img { width: 100%; height: auto; display: block; }

.g-product-info > * + * { margin-top: 14px; }
.g-crumbs { font-family: var(--wp--preset--font-family--label); font-size: 0.9rem; }
.g-product-lead { font-size: var(--wp--preset--font-size--large); color: var(--g-muted); }
.g-product-lead p { margin: 0; }
.g-product-price { font-family: var(--wp--preset--font-family--display); font-size: 2rem; line-height: 1; margin-top: 22px !important; }
.g-product-format,
.g-product-licence { font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; }
.g-product-licence:empty { display: none; }
@media (min-width: 900px) { .g-product-hero-grid { grid-template-columns: 5fr 6fr; } }

.g-buy { margin-top: 22px !important; }
.g-buy .wp-block-buttons { margin: 0; }
.g-buy-note { font-size: 0.9rem; color: var(--g-muted); max-width: 46ch; margin-top: 10px; }
.g-buy-missing { font-family: var(--wp--preset--font-family--label); font-size: 0.9rem; color: var(--g-earth-text); border: 1px dashed var(--wp--preset--color--earth); border-radius: 3px; padding: 10px 12px; margin: 0; }

/* Shop grid: products from the Products list, in their "Order" */
.g-shop-grid.wp-block-post-template { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); list-style: none; padding: 0; }
.g-shop-grid > li { margin: 0; position: relative; }
.g-shop-grid .wp-block-post-featured-image { margin: 0; aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--wp--preset--color--paper-deep); border: 1px solid var(--g-rule); border-radius: 16px; overflow: hidden; position: relative; transition: border-color 0.3s; }
.g-shop-grid .wp-block-post-featured-image::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--g-rule); border-radius: 11px; pointer-events: none; }
.g-shop-grid .wp-block-post-featured-image img { width: 58% !important; height: auto !important; object-fit: contain; }
.g-shop-grid .wp-block-post-featured-image::before { z-index: 1; }
.g-shop-grid .wp-block-post-featured-image.is-photo img { width: 100% !important; height: 100% !important; object-fit: cover; }
/* Main shop grid (shop page, homepage): the covers are square, so the tiles are too. Pack grids on product pages stay 4:5 for their contact sheets. */
body:not(.single-grimoire_product) .g-shop-grid .wp-block-post-featured-image { aspect-ratio: 1 / 1; }
.g-shop-grid .wp-block-post-featured-image.is-photo.is-tall img { object-position: top; }
.g-shop-grid .wp-block-post-featured-image .is-style-flag { position: absolute; top: 12px; left: 12px; z-index: 2; }
.g-product-art .wp-block-post-featured-image.is-photo.is-tall { max-width: 300px; margin-inline: auto; }
.g-product-art .wp-block-post-featured-image .is-style-flag { display: none; }
.g-shop-grid .g-soon-art { background: var(--g-hatch), var(--wp--preset--color--paper); border-style: dashed; }
.g-shop-grid .g-soon-art .is-style-flag { position: absolute; left: 14px; top: 14px; }
.g-shop-grid .g-soon-art .is-style-monogram { font-size: 1.6rem; }
.g-shop-grid li:hover .wp-block-post-featured-image { border-color: var(--wp--preset--color--gold); }
.g-shop-grid .wp-block-post-title { font-size: 1.35rem; margin: 12px 0 0; }
.g-shop-grid .wp-block-post-title a { text-decoration: none; }
.g-shop-grid .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.g-shop-grid .wp-block-post-title a:focus-visible { outline: none; }
.g-shop-grid li:has(.wp-block-post-title a:focus-visible) .wp-block-post-featured-image { outline: 3px solid var(--wp--preset--color--grimoire-green); outline-offset: 3px; }
.g-shop-grid .wp-block-post-excerpt { margin: 4px 0 0; color: var(--g-muted); font-size: 1.02rem; }
.g-shop-grid .wp-block-post-excerpt p { margin: 0; }
.g-shop-grid .g-card-meta { font-family: var(--wp--preset--font-family--label); font-size: 0.88rem; margin: 6px 0 0; }
.g-shop-grid .is-coming-soon .g-card-meta { display: none; }

/* The homepage row reuses the grid cards but scrolls sideways */
.g-shop-row .g-shop-grid.wp-block-post-template { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px; gap: 22px; scrollbar-width: thin; scrollbar-color: var(--g-rule) transparent; }
.g-shop-row .g-shop-grid > li { flex: 0 0 min(72vw, 270px); scroll-snap-align: start; }

/* Product page content helpers */
.g-sections-list { display: grid !important; gap: 0; border-top: 1px solid var(--wp--preset--color--ink); }
.g-sections-list > * { margin: 0 !important; }
.g-sections-list .wp-block-details { border-bottom: 1px solid var(--wp--preset--color--ink); padding: 14px 4px; }
.g-sections-list summary { font-family: var(--wp--preset--font-family--display); font-size: 1.4rem; cursor: pointer; }
.g-sections-list summary .g-n { font-family: var(--wp--preset--font-family--label); font-size: 0.9rem; color: var(--g-muted); margin-left: 8px; }
.g-herb-names { columns: 2 12rem; column-gap: 28px; list-style: none; padding: 12px 0 4px; margin: 0; font-size: 1rem; }
.g-herb-names li { break-inside: avoid; padding: 2px 0; }
.g-herb-names .g-no { font-family: var(--wp--preset--font-family--label); font-size: 0.75rem; color: var(--g-earth-text); display: inline-block; min-width: 2.6em; }
.g-pack-herbs { columns: 2 11rem; column-gap: 28px; list-style: none; padding: 4px 0 0; margin: 0; }
.g-pack-herbs li { break-inside: avoid; padding: 2px 0; }
/* Pack page: every plate as a small paper tile with its name; tap opens the core lightbox. */
.g-plate-grid { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
@media (min-width: 600px) { .g-plate-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .g-plate-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .g-plate-grid { grid-template-columns: repeat(5, 1fr); } }
.g-plate-grid > * { margin: 0 !important; }
.g-plate { display: flex; flex-direction: column; }
.g-plate img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; display: block; background: var(--wp--preset--color--paper); padding: 8px; border: 1px solid var(--g-rule); border-radius: 3px; transition: border-color .2s ease; }
.g-plate:hover img { border-color: var(--wp--preset--color--grimoire-green); }
.g-plate figcaption { margin: 8px 0 0; text-align: center; font-size: 0.98rem; line-height: 1.3; color: var(--wp--preset--color--ink); }
.g-two { display: grid !important; gap: 22px; }
.g-two > * { margin: 0 !important; }
@media (min-width: 800px) { .g-two { grid-template-columns: 1fr 1fr; } }
.g-tier > * + * { margin-top: 10px; }
.g-tier h3 { font-size: 1.6rem; }
.g-tier ul { padding-left: 1.1em; margin: 0; }
.g-tier li { margin: 4px 0; }
.g-faq .wp-block-details { border-top: 1px solid var(--g-rule); padding: 14px 4px; margin: 0; }
.g-faq .wp-block-details:last-child { border-bottom: 1px solid var(--g-rule); }
.g-faq summary { font-family: var(--wp--preset--font-family--display); font-size: 1.2rem; cursor: pointer; }
.g-faq .wp-block-details p { margin-top: 8px; }
.g-two .wp-block-cover.is-style-photo-slot { min-height: 0 !important; aspect-ratio: 4 / 3; }

/* ------------------------------------------------------------------
   Phase 4: herb pages, herb index and the herb finder
   ------------------------------------------------------------------ */
.g-herb-page { margin: 0; }
.g-herb-hero { padding-block: var(--wp--preset--spacing--60) !important; }
.g-herb-grid { display: grid !important; gap: clamp(28px, 5vw, 72px); align-items: start; }
.g-herb-grid > * { margin: 0 !important; }
.g-herb-art { position: relative; }
.g-herb-plate { background: var(--wp--preset--color--paper) !important; padding: clamp(16px, 3vw, 36px) !important; }
.g-herb-plate .wp-block-post-featured-image { margin: 0; }
.g-herb-plate .wp-block-post-featured-image img { width: 100%; height: auto; }
.g-herb-seal { position: absolute; right: -12px; bottom: -22px; margin: 0; }
.g-herb-seal circle:first-child { fill: var(--g-label-paper); }
.g-herb-info > * + * { margin-top: 14px; }
.g-herb-title { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.g-herb-title > * { margin: 0 !important; }
.g-herb-title .is-style-monogram { font-size: 1rem; }
.g-herb-latin { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1.5rem; line-height: 1.2; margin-top: 4px !important; }
.g-herb-alt:not(:empty)::before { content: "Also called "; }
.g-herb-alt { color: var(--g-muted); font-size: 1rem; }
.g-herb-essence { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); line-height: 1.2; color: var(--wp--preset--color--grimoire-green); }
.g-herb-caution { display: inline-block; font-family: var(--wp--preset--font-family--label); font-weight: 500; font-size: 0.95rem; color: var(--wp--preset--color--paper); background: var(--wp--preset--color--night); padding: 8px 14px; border-radius: 3px; }
.g-herb-page p:empty { display: none; }
.g-glance-title { font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; color: var(--wp--preset--color--paper-on-green); margin: 0; }
.is-style-glance { margin-top: 22px !important; }
.g-herb-h { font-family: var(--wp--preset--font-family--label) !important; font-size: 0.72rem !important; margin-bottom: 6px; color: var(--g-earth-text); }
.g-herb-desc .wp-block-post-content p { margin: 0; }
.g-herb-family:not(:empty)::before { content: "Family: "; }
.g-herb-family { color: var(--g-muted); font-size: 1rem; margin-top: 8px !important; }
.g-herb-desc, .g-herb-corr { margin-top: 26px !important; }
.g-herb-corr-list { font-size: 1.1rem; }
@media (min-width: 900px) { .g-herb-grid { grid-template-columns: 5fr 6fr; } .g-herb-art { position: sticky; top: 24px; } }

/* Grimoire card on herb pages */
.g-book-card { display: grid !important; gap: 24px; align-items: center; background: var(--wp--preset--color--paper) !important; }
.g-book-card > * { margin: 0 !important; position: relative; }
.g-book-card__cover { display: block; max-width: 180px; }
.g-book-card__cover img { width: 100%; height: auto; box-shadow: var(--wp--preset--shadow--book); }
.g-book-card__text > * + * { margin-top: 12px; }
.g-book-card__text h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
.g-book-card .g-buy { margin-top: 16px !important; }
@media (min-width: 700px) { .g-book-card { grid-template-columns: 180px 1fr; gap: clamp(24px, 4vw, 48px); } }

/* Herb cards: related herbs and the index */
.g-related h2 { margin-bottom: var(--wp--preset--spacing--40); font-size: clamp(1.7rem, 1.3rem + 1.3vw, 2.4rem); line-height: 1.12; }
.g-related .g-related__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 800px) { .g-related .g-related__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* The rest of the section, in the book: fills the columns the herb cards leave free. */
.g-related__more { grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: clamp(22px, 3vw, 40px); background: var(--wp--preset--color--card); border: 1px solid var(--g-rule); border-radius: 12px; }
@media (min-width: 800px) { .g-related__more { grid-column: span var(--span, 1); } }
.g-related__more > * { margin: 0; }
.g-related__count { font-family: var(--wp--preset--font-family--display); font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: 1; color: var(--wp--preset--color--grimoire-green); }
.g-related__line { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1.25rem; line-height: 1.3; max-width: 36ch; }
.g-related__links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px !important; }
.g-related__links a { text-underline-offset: 0.25em; text-decoration-color: var(--wp--preset--color--gold); }
.g-related + .g-small-print { max-width: 75rem; margin-top: var(--wp--preset--spacing--50) !important; }
.g-herb-page .g-sec > .g-small-print { max-width: var(--wp--style--global--wide-size); }
.g-herb-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.g-herb-cards > li { margin: 0; }
.g-herb-card { position: relative; display: grid; gap: 2px; align-content: start; }
.g-herb-card[hidden] { display: none; }
.g-herb-card__art { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--wp--preset--color--paper-deep); border: 1px solid var(--g-rule); border-radius: 12px; margin-bottom: 8px; overflow: hidden; transition: border-color 0.3s; }
.g-herb-card__art img { width: 78%; height: auto; max-height: 90%; object-fit: contain; }
.g-herb-card__art .is-style-monogram { font-size: 1.2rem; }
.g-herb-card.is-book-only .g-herb-card__art { background: var(--g-hatch), var(--wp--preset--color--paper); border-style: dashed; }
.g-herb-card__name { font-family: var(--wp--preset--font-family--display); font-size: 1.2rem; line-height: 1.15; text-decoration: none; }
a.g-herb-card__name::after { content: ""; position: absolute; inset: 0; }
a.g-herb-card__name:focus-visible { outline: none; }
.g-herb-card:has(a:focus-visible) .g-herb-card__art { outline: 3px solid var(--wp--preset--color--grimoire-green); outline-offset: 3px; }
.g-herb-card:has(a):hover .g-herb-card__art { border-color: var(--wp--preset--color--gold); }
.g-herb-card__latin { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1rem; color: var(--g-muted); }
.g-herb-card__no { font-family: var(--wp--preset--font-family--label); font-size: 0.78rem; color: var(--g-earth-text); }
.g-herb-cards--index { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .g-herb-cards--index { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .g-herb-cards--index { grid-template-columns: repeat(6, 1fr); } }

/* The rest of the book: a framed "page" after the grid, never a list of names.
   Text on the left, three plates fanned like loose pages on the right (decorative). */
.g-herb-rest {
	position: relative;
	display: grid;
	gap: 28px;
	align-items: center;
	margin-top: var(--wp--preset--spacing--60);
	padding: clamp(28px, 4vw, 56px);
	background: var(--wp--preset--color--paper-deep);
	border: 1px solid var(--wp--preset--color--sage-rule);
	border-radius: 12px;
}
.g-herb-rest::after { content: ""; position: absolute; inset: 7px; border: 1px solid var(--wp--preset--color--sage-rule); border-radius: 8px; pointer-events: none; }
.g-herb-rest__text { position: relative; z-index: 1; max-width: 34rem; }
.g-herb-rest.is-text-only .g-herb-rest__text { margin-inline: auto; text-align: center; }
.g-herb-rest.is-text-only .g-herb-rest__actions { justify-content: center; }
.g-herb-rest__title { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.1; margin: 0 0 12px; }
.g-herb-rest__text > p { margin: 0; color: var(--g-muted); }
.g-herb-rest__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px !important; }
.g-herb-rest__alt { color: var(--wp--preset--color--ink); text-underline-offset: 0.25em; text-decoration-color: var(--wp--preset--color--gold); }
.g-herb-rest__pages { position: relative; aspect-ratio: 5 / 3; max-height: 320px; margin: 6px 7% 10px; }
.g-herb-rest__page { position: absolute; top: 12%; width: 34%; aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 6%; background: var(--wp--preset--color--paper); border: 1px solid var(--wp--preset--color--sage-rule); border-radius: 6px; }
.g-herb-rest__page img { width: 100%; height: 100%; object-fit: contain; }
.g-herb-rest__page:nth-child(1) { left: 2%; transform: rotate(-6deg); }
.g-herb-rest__page:nth-child(2) { left: 32%; top: 4%; transform: rotate(1.5deg); z-index: 1; }
.g-herb-rest__page:nth-child(3) { left: 62%; transform: rotate(6deg); }
@media (min-width: 800px) { .g-herb-rest:not(.is-text-only) { grid-template-columns: 1.05fr 0.95fr; } }
.g-finder__hint { margin: 6px 0 4px; color: var(--g-muted); font-size: 1rem; }
/* "Ask for this herb" form under a not-found answer */
.g-request { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--g-rule); }
.g-request p { margin: 0; }
.g-request__lead { font-family: var(--wp--preset--font-family--display); font-size: 1.2rem; margin-bottom: 12px !important; }
.g-request__fields { display: grid; gap: 12px; }
@media (min-width: 600px) { .g-request__fields { grid-template-columns: 1fr 1.3fr; } }
.g-request label { display: block; font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; margin-bottom: 6px; }
.g-request input[type="text"], .g-request input[type="email"] { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; font: 1.05rem var(--wp--preset--font-family--body); color: var(--wp--preset--color--ink); background: #FFFDF8; border: 1px solid var(--wp--preset--color--ink); border-radius: 3px; }
.g-request__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px !important; }
.g-request__help { font-size: 0.95rem; color: var(--g-muted); }
.g-request__status:empty { display: none; }
.g-request__status { margin-top: 10px !important; }
.g-request__status:focus { outline: none; }
.g-request__trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.g-request.is-done .g-request__lead, .g-request.is-done .g-request__fields, .g-request.is-done .g-request__actions { display: none; }
.g-request.is-done .g-request__status { margin-top: 0 !important; font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1.4rem; color: var(--wp--preset--color--grimoire-green); }

.g-index-finder { margin: 0 auto var(--wp--preset--spacing--60) !important; }
.g-index__sections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.g-index__sections a { font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; text-decoration: none; padding: 9px 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--g-rule); border-radius: 3px; }
.g-index__sections a span { color: var(--g-muted); font-size: 0.85rem; }
.g-index__sections a:hover { border-color: var(--wp--preset--color--ink); }
.g-index__sections a[aria-current="page"] { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); border-color: var(--wp--preset--color--ink); }
.g-index__sections a[aria-current="page"] span { color: var(--wp--preset--color--paper-on-green); }
.g-index__intro { color: var(--g-muted); margin-bottom: 14px; }

/* Finder (homepage and index) */
.g-finder { max-width: 720px; margin-inline: auto; }
.g-finder__form { display: flex; gap: 10px; width: 100%; }
.g-finder__form input[type="search"] { flex: 1; min-width: 0; min-height: 54px; padding: 0 18px; font: 1.15rem var(--wp--preset--font-family--body); background: #FBF7EE; color: var(--wp--preset--color--ink); border: 1px solid var(--wp--preset--color--ink); border-radius: 3px; }
.g-finder__form input::placeholder { color: rgba(31, 51, 38, 0.6); }
.g-finder__form .wp-block-button__link { min-height: 54px; }
.g-finder__try { text-align: center; font-family: var(--wp--preset--font-family--label); font-size: 1rem; color: var(--g-muted); margin-top: 12px; }
.g-finder__try button { font: inherit; color: var(--wp--preset--color--ink); background: none; border: 0; padding: 6px 4px; min-height: 32px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.22em; }
.g-finder__result { margin-top: 18px; background: #FBF7EE; border: 1px solid var(--g-rule); border-radius: 16px; padding: 18px 22px 12px; text-align: left; }
.g-finder__result[hidden] { display: none; }
.g-finder__verdict { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1.7rem; line-height: 1.1; color: var(--wp--preset--color--grimoire-green); margin: 0 0 10px; }
.g-finder__result ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--wp--preset--color--ink); }
.g-finder__result li { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 12px 4px; border-bottom: 1px solid var(--g-rule); align-items: baseline; }
.g-finder__result li:last-child { border-bottom: 0; }
.g-finder__name { font-family: var(--wp--preset--font-family--display); font-size: 1.3rem; text-decoration: none; }
a.g-finder__name:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); }
.g-finder__meta { grid-column: 2; grid-row: 1; font-family: var(--wp--preset--font-family--label); font-size: 0.88rem; color: var(--g-muted); }
.g-finder__latin { grid-column: 1; font-family: var(--wp--preset--font-family--highlight); color: var(--g-muted); }
.g-finder__more { display: inline-block; margin: 10px 0 4px; font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; }
@media (max-width: 560px) { .g-finder__form { flex-direction: column; } .g-finder__result li { grid-template-columns: 1fr; } .g-finder__meta { grid-column: 1; grid-row: auto; } }
@media (max-width: 699px) { .g-book-card__cover { max-width: 120px; } }

/* ------------------------------------------------------------------
   Phase 5: journal, posts, letters, free sample, plain pages
   ------------------------------------------------------------------ */
.g-page, .g-post-page { margin: 0; }
.g-page .wp-block-post-content > *, .g-post-page .wp-block-post-content > * { margin-block-start: 0; }
.g-page-head { padding-bottom: 0 !important; }
.g-page .wp-block-post-content > .g-sec:first-child { padding-top: var(--wp--preset--spacing--40) !important; }
/* Section headings inside page content: calmer than the homepage's, so long pages read as one piece. */
body:not(.home) .wp-block-post-content h2:not(.g-herb-rest__title) { font-size: clamp(1.7rem, 1.3rem + 1.3vw, 2.4rem); line-height: 1.12; }
.g-page .wp-block-post-content { padding-bottom: var(--wp--preset--spacing--70); }
/* The 44rem content column already keeps lines near 70 characters; a narrower cap here pushed paragraphs off the heading line. */
.g-page .wp-block-post-content h2 { margin-top: var(--wp--preset--spacing--50); }

.g-journal-grid.wp-block-post-template { display: grid; gap: 36px 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); list-style: none; padding: 0; }
.g-journal-grid > li { margin: 0; position: relative; }
.g-journal-grid .wp-block-post-featured-image { margin: 0 0 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--g-rule); }
.g-journal-grid .wp-block-post-title { font-size: 1.5rem; margin: 4px 0 0; }
.g-journal-grid .wp-block-post-title a { text-decoration: none; }
.g-journal-grid .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.g-journal-grid li:hover .wp-block-post-title a { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.g-journal-grid .wp-block-post-excerpt { margin-top: 6px; color: var(--g-muted); }
.g-journal-grid .wp-block-post-excerpt p { margin: 0; }
.g-post-date, .g-byline { font-family: var(--wp--preset--font-family--label); font-size: 0.9rem; color: var(--g-earth-text); }
.g-pagination { margin-top: var(--wp--preset--spacing--50); font-family: var(--wp--preset--font-family--label); gap: 18px; }

.g-article > * + * { margin-top: 16px; }
.g-article .wp-block-post-title { margin-top: 10px; }
.g-byline { gap: 6px 14px; }
.g-byline .wp-block-post-author-name::before { content: "by "; }
.g-article .wp-block-post-featured-image { margin-block: var(--wp--preset--spacing--50) !important; border-radius: 12px; overflow: hidden; }
.g-article .wp-block-post-content { font-size: clamp(1.15rem, 1.1rem + 0.2vw, 1.25rem); }
.g-article .wp-block-post-content > * + * { margin-top: 1.1em; }
.g-article .wp-block-post-content h2 { margin-top: 1.8em; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.g-post-herbs { margin-top: var(--wp--preset--spacing--60) !important; border-top: 1px solid var(--wp--preset--color--ink); padding-top: var(--wp--preset--spacing--40); }
.g-post-herbs h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: var(--wp--preset--spacing--40); }
.g-post-herbs__book { margin-top: var(--wp--preset--spacing--40); }
.g-author { margin-top: var(--wp--preset--spacing--60) !important; }
.g-author .wp-block-post-author { gap: 16px; align-items: flex-start; }
.g-author .wp-block-post-author__avatar img { border-radius: 50%; }
.g-author .wp-block-post-author__byline { font-family: var(--wp--preset--font-family--label); font-size: 0.85rem; color: var(--wp--preset--color--ink); margin: 0; }
.g-author .wp-block-post-author__name { font-family: var(--wp--preset--font-family--display); font-size: 1.3rem; margin: 2px 0 6px; }
.g-author .wp-block-post-author__bio { font-size: 1.02rem; margin: 0; }

/* ------------------------------------------------------------------
   Phase 6: supporting pages, 404, search
   ------------------------------------------------------------------ */
.g-draft { background: rgba(122, 94, 72, 0.12); border-left: 3px solid var(--wp--preset--color--earth); padding: 10px 14px; font-size: 0.98rem; }
.g-owner { font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; color: var(--g-earth-text); border: 1px dashed var(--wp--preset--color--earth); border-radius: 3px; padding: 10px 14px; }
.g-page .wp-block-post-content .g-sec > * + * { margin-top: 1em; }
.g-page .wp-block-list { padding-left: 1.2em; }
.g-page .wp-block-list li { margin: 6px 0; }
.g-notfound { text-align: center; padding-block: var(--wp--preset--spacing--70) !important; }
.g-notfound > * { margin-inline: auto !important; }
.g-notfound > * + * { margin-top: 16px; }
.g-notfound .g-finder { margin-top: 28px !important; }
.g-site-search { max-width: 720px; margin-block: 20px 36px; }
.g-results.wp-block-post-template { list-style: none; padding: 0; border-top: 1px solid var(--g-rule); }
.g-results > li { padding: 18px 0; border-bottom: 1px solid var(--g-rule); margin: 0; }
.g-results .wp-block-post-title { font-size: 1.5rem; margin: 0; }
.g-results .wp-block-post-excerpt { color: var(--g-muted); margin-top: 4px; }
.g-results .wp-block-post-excerpt p { margin: 0; }
.wp-block-post-content .g-sec h2:not(:first-child) { margin-top: var(--wp--preset--spacing--50); }
.wp-block-post-content .g-sec > .g-two, .wp-block-post-content .g-sec > .wp-block-buttons { margin-top: var(--wp--preset--spacing--30); }
.g-two > .is-style-tinted-card { align-self: start; }


/* Licence picker + "Add to basket" (image packs and the collection) */
.g-licence { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; max-width: 30rem; }
.g-licence legend { font-family: var(--wp--preset--font-family--label); font-size: 0.95rem; margin-bottom: 8px; padding: 0; }
.g-licence__opt { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--g-rule); border-radius: 3px; background: var(--wp--preset--color--paper); cursor: pointer; }
.g-licence__opt:has(input:checked) { border-color: var(--wp--preset--color--grimoire-green); box-shadow: inset 0 0 0 1px var(--wp--preset--color--grimoire-green); }
.g-licence__opt:has(input:focus-visible) { outline: 3px solid var(--wp--preset--color--grimoire-green); outline-offset: 2px; }
.g-licence__opt input { grid-row: span 2; align-self: center; width: 18px; height: 18px; accent-color: var(--wp--preset--color--grimoire-green); margin: 0; }
.g-licence__name { font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; }
.g-licence__price { font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; }
.g-licence__line { grid-column: 2 / -1; color: var(--g-muted); font-size: 0.95rem; }
.g-licence-buy button.wp-block-button__link { cursor: pointer; border: 0; font: inherit; }
/* Confirmation is for screen readers only; sighted visitors see the button and the basket count change. */
.g-basket-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g-licence-buy button.is-added { background: var(--wp--preset--color--ink); }
@media (prefers-reduced-motion: no-preference) {
	.g-basket-link.is-bump .g-basket-count { animation: g-bump 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
	@keyframes g-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
}

/* Basket page: packs on the left (licences as lines underneath), order summary on the right. */
.g-bk-head { margin-bottom: clamp(20px, 3vw, 32px) !important; }
.g-bk-head h1 { margin: 0; }
.g-basket { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
@media (min-width: 900px) { .g-basket { grid-template-columns: minmax(0, 1fr) 21rem; gap: clamp(40px, 5vw, 72px); } }
.g-bk__packs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wp--preset--color--ink); }
.g-bk-pack { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--g-rule); }
.g-bk-pack__img { box-sizing: border-box; width: 96px; height: 96px; object-fit: contain; padding: 6px; background: var(--wp--preset--color--paper); border: 1px solid var(--g-rule); border-radius: 3px; }
.g-bk-pack__title { font-family: var(--wp--preset--font-family--display); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.2; text-decoration: none; }
.g-bk-pack__title:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.2em; }
.g-bk-pack__kind { margin: 2px 0 10px; font-family: var(--wp--preset--font-family--label); font-size: 0.85rem; color: var(--g-muted); }
.g-bk-lines { list-style: none; margin: 0; padding: 0; }
.g-bk-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 4.5rem; gap: 6px 18px; align-items: center; padding: 8px 0; }
.g-bk-line + .g-bk-line { border-top: 1px dashed var(--g-rule); }
.g-bk-line__lic { font-size: 1.05rem; }
.g-bk-line__each { font-size: 0.95rem; color: var(--g-muted); }
.g-bk-line__total { font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; text-align: right; }
.g-bk-qty { display: inline-flex; align-items: center; gap: 2px; }
.g-bk-qty button { width: 34px; height: 34px; display: grid; place-items: center; font: 1.1rem/1 var(--wp--preset--font-family--body); color: var(--wp--preset--color--ink); background: none; border: 1px solid var(--g-rule); border-radius: 50%; cursor: pointer; transition: border-color .2s, background-color .2s; }
.g-bk-qty button:hover { border-color: var(--wp--preset--color--ink); background: rgba(31, 51, 38, 0.05); }
.g-bk-qty button:disabled { opacity: .35; cursor: default; }
.g-bk-qty__n { min-width: 2ch; text-align: center; font-family: var(--wp--preset--font-family--display); font-size: 1.1rem; }
.g-bk-addlic, .g-bk__nudge-btn { margin-top: 8px; padding: 6px 0; font: inherit; font-size: 0.95rem; color: var(--wp--preset--color--grimoire-green); background: none; border: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.25em; }
.g-bk__nudge { margin-top: 22px; padding: 16px 20px; background: var(--wp--preset--color--card); border-left: 3px solid var(--wp--preset--color--grimoire-green); }
.g-bk__nudge p { margin: 0; }
.g-bk__more { display: inline-block; margin-top: 22px; font-size: 0.98rem; }
.g-bk__summary { position: relative; padding: 26px 26px 22px; background: var(--wp--preset--color--paper); border: 1px solid var(--g-rule); border-radius: 16px; }
.g-bk__summary::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--g-rule); border-radius: 11px; pointer-events: none; }
@media (min-width: 900px) { .g-bk__summary { position: sticky; top: 24px; } }
.g-bk__sumtitle { font-size: 1.35rem !important; margin: 0 0 14px; }
.g-bk__sum { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; margin: 0; }
.g-bk__sum dt, .g-bk__sum dd { margin: 0; color: var(--g-muted); }
.g-bk__sum dd { text-align: right; }
.g-bk__sum .g-bk__sum-total { margin-top: 10px; color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; }
.g-bk__sum dt.g-bk__sum-total { font-size: 1.15rem; align-self: baseline; }
.g-bk__sum dd.g-bk__sum-total { align-self: baseline; }
.g-bk__small { margin: 12px 0 0; font-size: 0.9rem; line-height: 1.5; color: var(--g-muted); }
.g-bk__consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin-top: 18px; font-size: 0.95rem; line-height: 1.45; cursor: pointer; }
.g-bk__consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--wp--preset--color--grimoire-green); }
.g-bk__consent a { color: inherit; text-underline-offset: 0.2em; text-decoration-color: var(--wp--preset--color--gold); }
.g-bk__checkout { display: block; width: 100%; margin-top: 16px; text-align: center; box-sizing: border-box; }
.g-bk__checkout[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.g-bk__wait { margin: 10px 0 0; font-size: 0.9rem; color: var(--g-earth-text); }
.g-basket__empty { font-family: var(--wp--preset--font-family--display); font-size: 1.4rem; }
.g-basket > .g-basket__empty, .g-basket > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 599px) {
	.g-bk-pack { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
	.g-bk-pack__img { width: 64px; height: 64px; }
	.g-bk-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lic total" "each qty"; }
	.g-bk-line__lic { grid-area: lic; } .g-bk-line__total { grid-area: total; } .g-bk-line__each { grid-area: each; } .g-bk-qty { grid-area: qty; }
}
}

/* Letters (/letters/): latest Substack letters as a dated list; friendly note while the feed is empty. */
.wp-block-rss.g-letters { list-style: none; padding: 0; margin: var(--wp--preset--spacing--40) 0 !important; border-top: 1px solid var(--wp--preset--color--ink); max-width: 52rem; }
.g-letters .wp-block-rss__item { display: grid; grid-template-columns: 9rem 1fr; gap: 4px 28px; padding: 20px 0; border-bottom: 1px solid var(--g-rule); margin: 0; }
.g-letters .wp-block-rss__item-publish-date { grid-column: 1; grid-row: 1; font-family: var(--wp--preset--font-family--label); font-size: 0.85rem; color: var(--g-earth-text); padding-top: 6px; }
.g-letters .wp-block-rss__item-title { grid-column: 2; font-family: var(--wp--preset--font-family--display); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.2; }
.g-letters .wp-block-rss__item-title a { text-decoration: none; }
.g-letters .wp-block-rss__item-title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.2em; }
.g-letters .wp-block-rss__item-excerpt { grid-column: 2; margin: 2px 0 0; color: var(--g-muted); }
@media (max-width: 599px) { .g-letters .wp-block-rss__item { grid-template-columns: 1fr; } .g-letters .wp-block-rss__item-publish-date, .g-letters .wp-block-rss__item-title, .g-letters .wp-block-rss__item-excerpt { grid-column: 1; grid-row: auto; padding-top: 0; } }
.g-letters-empty { margin: var(--wp--preset--spacing--40) 0; padding: 24px 28px; max-width: 40rem; background: var(--wp--preset--color--card); border-left: 3px solid var(--wp--preset--color--grimoire-green); }
.g-letters-empty p { margin: 0; color: var(--g-muted); }
.g-letters-empty .g-letters-empty__title { font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1.5rem; color: var(--wp--preset--color--grimoire-green); margin-bottom: 6px; }

/* Legal pages (built from docs/legal-drafts.md) */
.g-legal mark.g-ph { background: rgba(185, 163, 101, 0.28); color: inherit; padding: 0 3px; border-radius: 2px; }
.g-legal .g-updated { font-family: var(--wp--preset--font-family--label); font-size: 0.9rem; color: var(--g-muted); margin-bottom: var(--wp--preset--spacing--40) !important; }
.g-legal .g-draft { margin-block: 1.2em !important; }
.g-legal .g-draft .wp-block-list { margin: 0; }
.g-table { margin-block: 1.2em !important; overflow-x: auto; }
.g-table table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.g-table th, .g-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border: 0; border-bottom: 1px solid var(--g-rule); }
.g-table thead th { font-family: var(--wp--preset--font-family--label); font-weight: 400; font-size: 0.85rem; color: var(--g-muted); border-bottom: 1px solid var(--wp--preset--color--ink); }
@media (max-width: 599px) { .g-table table { min-width: 34rem; } }

/* Logo (inline SVG inside the site title). Letters use the text colour; the leaf stays gold. */
.g-brand a { display: inline-flex; align-items: center; color: inherit; }
.g-logo { display: block; height: auto; }
.g-header-row .g-brand .g-logo { width: clamp(150px, 11vw + 70px, 230px); }
.g-header-row .g-brand a { color: #394D37; }
.g-footer .g-brand .g-logo { width: 200px; }
.g-footer .g-brand a { color: var(--wp--preset--color--paper-on-green); }
.g-footer { --g-logo-leaf: var(--wp--preset--color--gold); }
@media (max-width: 599px) { .g-header-row .g-brand .g-logo { width: 132px; } }
.g-article .wp-block-post-content .wp-block-image img { border-radius: 12px; }

/* Sticky header: the menu stays at the top while you scroll (below the admin bar when logged in). */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; background: var(--wp--preset--color--paper); }
.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; } }
:target, h2[id] { scroll-margin-top: 120px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* "In this letter": automatic table of contents in journal posts */
.g-toc { margin: 1.8em 0 !important; padding: 18px 22px 16px; background: var(--wp--preset--color--card); border-left: 3px solid var(--wp--preset--color--grimoire-green); border-radius: 3px; }
.g-toc__title { margin: 0 0 8px !important; font-family: var(--wp--preset--font-family--label); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-muted); }
.g-toc ol { margin: 0; padding-left: 1.3em; font-size: 1.02rem; line-height: 1.5; }
.g-toc li { margin: 3px 0; }
.g-toc a { text-decoration: none; }
.g-toc a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 0.2em; }

/* Closing line before the herbs in a letter */
.g-closing { margin-top: 2em !important; font-family: var(--wp--preset--font-family--highlight); font-style: italic; font-size: 1.45rem; line-height: 1.3; color: var(--wp--preset--color--grimoire-green); }
/* Kit's "are you human?" check, shown inside the sign-up box when Kit asks for it */
.g-form.is-checking label, .g-form.is-checking .g-row, .g-form.is-checking .g-help { display: none; }
.g-kit-check { display: block; width: 100%; height: 320px; margin-top: 10px; border: 1px solid var(--g-rule); border-radius: 3px; background: #fff; }
