/*
Theme Name: Herbarium
Description: Supplement review and health guide theme with a botanical home page (variant 4). Reviews and articles live on this site; each supplement's buying page can live on its own subdomain.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: herbarium
*/

:root {
	--ink: #0f2d2c;
	--ink-2: #163b39;
	--paper: #f5f8f4;
	--panel: #ffffff;
	--mint: #dcebe2;
	--signal: #f0a81b;
	--muted: #4f6663;
	--on-dark: #eaf3ee;
	--on-dark-muted: #9fbab2;
	--max: 1160px;
	--head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--body: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
h1, h2, h3 { overflow-wrap: break-word; font-family: var(--head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.sr, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.crumb { color: var(--muted); font-weight: 500; font-size: .95rem; margin: 0 0 .4rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 56ch; }

/* Header */
.site-header { border-bottom: 3px solid var(--ink); background: var(--paper); }
.bar { display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; justify-content: space-between; padding-top: .95rem; padding-bottom: .95rem; }
.brand-name { font: 700 1.4rem/1 var(--head); text-decoration: none; }
.primary ul, .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.primary a { text-decoration: none; font-weight: 500; }
.nav-toggle { display: none; font: 600 1rem/1 var(--body); color: var(--ink); background: transparent; border: 2px solid var(--ink); border-radius: 4px; padding: .6rem 1rem; min-height: 44px; cursor: pointer; }
.entry table { display: block; overflow-x: auto; max-width: 100%; }
.entry iframe, .entry video { max-width: 100%; }
.primary a:hover { text-decoration: underline; }

/* Buttons and fields */
.btn { display: inline-block; min-height: 44px; background: var(--signal); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: .65rem 1.2rem; font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: #ffc24a; }
.btn-small { padding: .4rem .85rem; font-size: .9rem; min-height: 38px; }
input[type="search"], input[type="text"], select { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 2px solid var(--ink); border-radius: 4px; padding: .7rem .85rem; }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-copy h1 { max-width: 13ch; }
.hero-search { display: flex; gap: .5rem; max-width: 600px; margin-top: 1.5rem; }
.pills { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills a { display: inline-block; padding: .4rem .95rem; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .95rem; }
.pills a:hover { background: var(--ink); color: #fff; }
.hero-feature { background: var(--mint); border: 3px solid var(--ink); }
.hf-img { display: block; border-bottom: 3px solid var(--ink); aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink-2); }
.hf-img img { width: 100%; height: 100%; object-fit: cover; }
.hf-body { padding: 1.25rem 1.4rem 1.5rem; }
.hf-body h2 { font-size: 1.6rem; }
.hf-body h2 a { text-decoration: none; }
.hf-body h2 a:hover { text-decoration: underline; }

.ph { display: flex; width: 100%; height: 100%; min-height: 160px; align-items: center; justify-content: center; font: 700 4rem/1 var(--head); color: var(--mint); background: var(--ink-2); }

/* Sections */
.block { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 3px solid var(--ink); padding-bottom: .5rem; margin-bottom: 1.25rem; }
.sec-head h2 { margin: 0; }
.sec-head .all { font-weight: 600; }

.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.topics a { display: block; padding: .85rem 1rem; background: var(--mint); border-left: 6px solid var(--ink); text-decoration: none; }
.topics a:hover { border-left-color: var(--signal); background: #cfe3d7; }
.topics .tn { display: block; font: 700 1.1rem/1.2 var(--head); }
.topics .tc { display: block; color: var(--muted); font-size: .9rem; }

.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.75rem; }
.item-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border: 2px solid var(--ink); background: var(--ink-2); margin-bottom: .9rem; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item h3 { margin-bottom: .3rem; }
.item h3 a { text-decoration: none; }
.item h3 a:hover { text-decoration: underline; }
.item p { color: var(--muted); }

/* Directory: full-width dark section with a name grid */
.dir { background: var(--ink); color: var(--on-dark); padding-bottom: clamp(2.5rem, 6vw, 4rem); margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-top: clamp(2.5rem, 6vw, 4rem); }
.dir h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.dir-lede { color: var(--on-dark-muted); max-width: 60ch; }
.dir-filter { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin: 1.5rem 0 1rem; }
.dir-filter label { display: block; font-weight: 600; margin-bottom: .3rem; }
.dir-count { color: var(--on-dark-muted); margin-bottom: .75rem; }
.dir-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(234, 243, 238, .22); border: 1px solid rgba(234, 243, 238, .22); }
.dir-grid li { background: var(--ink); }
.dir-grid a, .dir-grid .dl { display: block; height: 100%; padding: 1rem 1.1rem; text-decoration: none; color: var(--on-dark); }
.dir-grid a:hover, .dir-grid a:focus-visible { background: var(--ink-2); }
.dir-grid a:hover .dn { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; }
.dn { display: block; font: 700 1.05rem/1.25 var(--head); color: #fff; }
.dt { display: block; margin-top: .15rem; font-size: .85rem; color: var(--on-dark-muted); }
.dir-empty { margin-top: 1rem; font-weight: 500; }

.chips { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .45rem 1rem; background: var(--mint); border-radius: 999px; text-decoration: none; font-weight: 500; }
.chips a:hover { background: var(--ink); color: #fff; }

.art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.art-grid article { padding: 1.1rem 0; border-top: 1px solid var(--ink); }
.art-grid h3 { margin-bottom: .3rem; }
.art-grid h3 a { text-decoration: none; }
.art-grid h3 a:hover { text-decoration: underline; }
.art-grid p:last-child { color: var(--muted); margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps > div { border-top: 6px solid var(--signal); padding-top: 1rem; }
.steps p { color: var(--muted); margin: 0; }

/* Inner pages */
.page { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: 3rem; }
.page-head { max-width: 760px; margin-bottom: 1.75rem; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.entry { max-width: 72ch; }
.entry h2, .entry h3 { margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.3rem; }
.hero-img { margin: 0 0 1.5rem; border: 2px solid var(--ink); }
.single .side { max-width: 420px; margin-top: 2rem; background: var(--panel); border: 3px solid var(--ink); padding: 1rem 1.25rem; }
.side-head { border-bottom: 8px solid var(--ink); margin-bottom: .5rem; }
.side-head h2 { font-size: 1.4rem; margin: 0 0 .3rem; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { padding: .55rem 0; border-top: 1px solid var(--ink); }
.side a { font-weight: 600; }
.note { margin-top: 2rem; max-width: 72ch; color: var(--muted); font-size: .95rem; border-left: 4px solid var(--signal); padding-left: .9rem; }
.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .3rem .75rem; border: 2px solid var(--ink); text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; }

/* Footer */
.site-footer { margin-top: clamp(3rem, 7vw, 5rem); background: var(--ink); color: var(--on-dark); padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; border-top: 8px solid var(--signal); }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem 2.5rem; }
.foot-brand { font: 700 1.6rem/1.1 var(--head); color: #fff; display: inline-block; margin-bottom: .75rem; }
.foot-about p { color: var(--on-dark-muted); max-width: 36ch; }
.site-footer h2 { font: 700 1rem/1.2 var(--head); color: #fff; margin: 0 0 .8rem; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: block; }
.site-footer li { margin: 0 0 .5rem; }
.foot-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(234, 243, 238, .22); }
.disclosure { max-width: 80ch; font-weight: 500; }
.small { margin: 0; font-size: .9rem; color: var(--on-dark-muted); max-width: 80ch; }

@media (max-width: 1000px) {
	.dir-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	.nav-toggle { display: inline-block; }
	.primary { display: none; width: 100%; order: 3; }
	.primary.open { display: block; }
	.primary ul { flex-direction: column; gap: 0; }
	.primary a { display: block; padding: .8rem 0; border-top: 1px solid var(--ink); }
	.hero-grid { grid-template-columns: 1fr; }
	.dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dir-filter { grid-template-columns: 1fr; }
	.art-grid, .steps { grid-template-columns: 1fr; }
	.hero-search { flex-direction: column; }
}
@media (max-width: 520px) {
	.items { grid-template-columns: 1fr; }
	.foot-grid { grid-template-columns: 1fr; }
	.dir-grid a, .dir-grid .dl { padding: .85rem .9rem; }
	.dn { font-size: 1rem; }
}

.more { display: inline-block; font-weight: 600; padding: .5rem 0; min-height: 44px; }
.empty-note { padding: 1rem 1.25rem; background: var(--mint); border-left: 6px solid var(--ink); max-width: 60ch; }

/* Article layout: left content column + right sticky product box (v1.2.3)
   Use inside post/page content:
   <div class="lw-article-layout">
     <div class="lw-article-main"> ...article... </div>
     <aside class="lw-product-box"> <img> <a class="btn"> </aside>
   </div> */

/* .entry is capped at 72ch, which is too narrow for two columns.
   Lift the cap only for entries that contain the layout; all other pages are unchanged. */
.entry:has(.lw-article-layout) { max-width: none; }

.lw-article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2.5rem;
	align-items: start; /* do not stretch the box to the full row height, or sticky has no room to move */
}
.lw-article-main { min-width: 0; max-width: 72ch; } /* same reading width as before */
.lw-article-main > :first-child { margin-top: 0; }

.lw-product-box {
	position: sticky;
	top: 1.25rem;
	align-self: start;
	background: var(--panel);
	border: 3px solid var(--ink);
	padding: 1rem 1.25rem;
}
.admin-bar .lw-product-box { top: calc(32px + 1.25rem); }
.lw-product-box img { width: 100%; height: auto; margin: 0 0 1rem; }
.lw-product-box h2, .lw-product-box h3 { margin-top: 0; font-size: 1.25rem; }
.lw-product-box p { color: var(--muted); }
.lw-product-box .btn { display: block; text-align: center; }

@media (max-width: 900px) {
	.lw-article-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
	.lw-product-box { position: static; max-width: 420px; }
}

/* ==========================================================================
   Article sidebar system (v1.3.0)
   Printed by template-parts/entry.php when a post has an "Article Sidebar" block.
   The theme only provides the two-column frame; what goes inside is up to each post.
   ========================================================================== */

.lw-layout {
	--lw-side-w: 320px;
	display: grid;
	grid-template-columns: minmax(0, 46rem) var(--lw-side-w);
	justify-content: space-between;
	column-gap: clamp(2rem, 4vw, 3.5rem);
	align-items: stretch; /* the column is as tall as the article; the inner box sticks inside it */
}
.lw-layout > .entry { max-width: none; min-width: 0; }
.lw-layout-side { min-width: 0; }

/* Neutral by design: no border or background. Content brings its own styling. */
.lw-side-inner { min-width: 0; font-size: .96rem; line-height: 1.55; overflow-wrap: break-word; }
.lw-side-inner > :first-child { margin-top: 0; }
.lw-side-inner > :last-child { margin-bottom: 0; }
.lw-side-inner h2, .lw-side-inner h3, .lw-side-inner h4 { margin: 1.4em 0 .5em; font-size: 1.2rem; }
.lw-side-inner h2 { font-size: 1.35rem; }
.lw-side-inner ul, .lw-side-inner ol { padding-left: 1.3rem; }
.lw-side-inner figure { margin: 0 0 1rem; }
.lw-side-inner img, .lw-side-inner video, .lw-side-inner iframe, .lw-side-inner svg { max-width: 100%; }
.lw-side-inner table { display: block; max-width: 100%; overflow-x: auto; font-size: .92rem; }
.lw-side-inner pre { max-width: 100%; overflow-x: auto; }
.lw-side-inner .lw-product-box { position: static; } /* old manual box: never nest sticky inside the sticky column */

/* Sticky (desktop only). Nothing between here and <body> sets overflow, so sticky is not blocked. */
@media (min-width: 901px) {
	.lw-sticky .lw-side-inner {
		position: sticky;
		top: 1.25rem;
		max-height: calc(100vh - 2.5rem);
		max-height: calc(100dvh - 2.5rem); /* a tall sidebar scrolls inside itself instead of being cut off */
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		padding: 6px; /* room so focus outlines are not clipped by the scroll area */
		margin: -6px;
	}
	.admin-bar .lw-sticky .lw-side-inner {
		top: calc(32px + 1.25rem);
		max-height: calc(100vh - 32px - 2.5rem);
		max-height: calc(100dvh - 32px - 2.5rem);
	}
}

/* Tablets and phones: one column, sidebar after (or, if chosen, before) the article. */
@media (max-width: 900px) {
	.lw-layout { grid-template-columns: minmax(0, 1fr); row-gap: 2.5rem; }
	.lw-layout-side { max-width: 40rem; }
	.lw-mobile-above .lw-layout-side { order: -1; }
}

/* ==========================================================================
   v1.3.1: hand-written two-column layouts work without any CSS inside the post
   1) The 72ch cap on .entry is lifted automatically when a post contains a sidebar-style layout
      (a sticky box, a 2-column grid with a narrow right column, or <div> ... <aside> markup).
      Plain text posts keep the 72ch reading width. assets/article-layout.js adds .lw-wide.
   2) Default two-column styling for <div class="anything"> <div>main</div> <aside>box</aside> </div>.
      Written with :where() so it has zero specificity: a post's own CSS always wins when present.
   ========================================================================== */
.entry.lw-wide,
.entry:has(> div > aside) { max-width: none; }
.entry.lw-wide > :is(p, ul, ol, h1, h2, h3, h4, h5, h6, blockquote, pre),
.entry:has(> div > aside) > :is(p, ul, ol, h1, h2, h3, h4, h5, h6, blockquote, pre) { max-width: 72ch; }

:where(.entry > div:has(> aside)) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2.5rem;
	align-items: start;
	width: 100%;
}
:where(.entry > div:has(> aside) > :not(aside)) { min-width: 0; max-width: 72ch; }
:where(.entry > div > aside) { position: sticky; top: 1.25rem; align-self: start; }
:where(.admin-bar .entry > div > aside) { top: calc(32px + 1.25rem); }
@media (max-width: 900px) {
	:where(.entry > div:has(> aside)) { grid-template-columns: minmax(0, 1fr); }
	:where(.entry > div:has(> aside) > :not(aside)) { max-width: none; }
	:where(.entry > div > aside) { position: static; max-width: 420px; }
}

/* v1.3.2: sticky buy button on phones/tablets. Created by assets/article-layout.js from the post's own button. */
.lw-sticky-cta { display: none; }
@media (max-width: 900px) {
	.lw-sticky-cta {
		display: block;
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 50;
		padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px));
		background: var(--paper);
		border-top: 2px solid var(--ink);
		transform: translateY(110%);
		visibility: hidden;
		transition: transform .2s ease, visibility 0s linear .2s;
	}
	.lw-sticky-cta.is-on { transform: none; visibility: visible; transition: transform .2s ease; }
	.lw-sticky-cta .btn { display: block; width: 100%; text-align: center; }
	body.lw-has-sticky-cta { padding-bottom: 4.5rem; }
}
@media (prefers-reduced-motion: reduce) { .lw-sticky-cta, .lw-sticky-cta.is-on { transition: none; } }

/* Related posts (1.4.0): hand-picked per post, shown at the end of the page */
.related { margin-top: 3rem; padding-top: 1.5rem; border-top: 3px solid var(--ink); }
.related > h2 { margin-bottom: 1.25rem; }

/* Product box from the editor panel (1.4.1) */
.lw-product-box .lw-box-title { font: 700 1.25rem/1.2 var(--head); color: var(--ink); margin: 0 0 .5rem; }
.lw-side-inner .lw-product-box { margin: 0; }

/* Featured image (1.4.2): printed once by template-parts/entry.php, centred above the article text,
   inside the text column. 250px wide; on small screens never wider than 80% of the column, height automatic. */
.lw-hero { margin: 0 0 1.5rem; text-align: center; }
.lw-hero .hero-img { display: block; width: 250px; max-width: 80%; height: auto; margin: 0 auto; }
/* Hand-written two-column posts: the image sits over the text column only, not over the sidebar column. */
.entry.lw-wide > .lw-hero,
.entry:has(> div > aside) > .lw-hero,
.entry:has(.lw-article-layout) > .lw-hero { max-width: min(72ch, calc(100% - 320px - 2.5rem)); }
/* Block or panel sidebar: the entry already is the text column. */
.lw-layout .entry.lw-layout-main > .lw-hero { max-width: none; }
@media (max-width: 900px) {
	.entry.lw-wide > .lw-hero,
	.entry:has(> div > aside) > .lw-hero,
	.entry:has(.lw-article-layout) > .lw-hero { max-width: none; }
}

/* ==========================================================================
   Herbarium, variant 4: centred header, light footer and botanical home page (header.php, footer.php, front-page.php).
   Header: hd-*, hb-head, hb-hsearch. Footer: bt-foot-* (light design). Home classes start with hb-.
   The header is not sticky on purpose, so sticky sidebars and boxes in posts keep their exact positions.
   ========================================================================== */
:root { --hb-forest: #1d3b2f; --hb-sage: #e1ead9; --hb-cream: #f7f2e7; --hb-peach: #f4dcc8; --hb-mist: #dbe7e6; --hb-sand: #efe3c8; --hb-clay: #b4492a; --hb-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif; }
.home { background-color: var(--hb-cream); }

/* ---- Header: centred masthead ---- */
.site-header.hb-head { position: relative; z-index: 30; background: #fff; border-bottom: 0; }
.hd-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding-top: 1.1rem; padding-bottom: 1rem; }
.hd-left { justify-self: start; }
.hd-right { justify-self: end; display: flex; align-items: center; gap: .6rem; }
.brand { text-align: center; }
.brand-link { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--hb-forest); color: var(--hb-sage); }
.brand-name { font: 700 clamp(1.5rem, 3vw, 2rem)/1 var(--hb-serif); letter-spacing: -.01em; color: var(--hb-forest); }
.hb-tagline { margin: .4rem 0 0; font: 600 .72rem/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hd-cta { display: inline-block; padding: .55rem 1.1rem; background: var(--hb-clay); color: #fff; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; }
.hd-cta:hover { background: #963a20; }
.nav-toggle { border-radius: 999px; }
.primary.wrap { border-top: 1px solid rgba(29, 59, 47, .22); border-bottom: 3px double var(--hb-forest); }
.primary ul, .primary .menu { justify-content: center; gap: .25rem 2.3rem; padding: .85rem 0; }
.primary a { position: relative; display: inline-block; padding: .2rem 0; font: 600 .82rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--hb-forest); }
.primary a::after { content: ""; position: absolute; left: 50%; bottom: -.5rem; width: 6px; height: 6px; border-radius: 50%; background: var(--hb-clay); transform: translateX(-50%) scale(0); transition: transform .2s ease; }
.primary a:hover { text-decoration: none; color: var(--hb-clay); }
.primary a:hover::after, .primary .is-current > a::after, .primary .current-menu-item > a::after { transform: translateX(-50%) scale(1); }
.primary .is-current > a, .primary .current-menu-item > a { color: var(--hb-clay); }
.hb-hsearch { position: relative; }
.hb-hsearch > summary { list-style: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .4rem .95rem; border: 2px solid var(--hb-forest); border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--hb-forest); cursor: pointer; }
.hb-hsearch > summary::-webkit-details-marker { display: none; }
.hb-hsearch > summary:hover, .hb-hsearch[open] > summary { background: var(--hb-forest); color: #fff; }
.hb-hsearch form { position: absolute; left: 0; top: calc(100% + .6rem); z-index: 40; display: flex; gap: .5rem; width: min(340px, 86vw); padding: .7rem; background: #fff; border: 2px solid var(--hb-forest); border-radius: 16px; box-shadow: 0 22px 40px -22px rgba(29, 59, 47, .55); }
.hb-hsearch input[type="search"] { min-width: 0; border-radius: 10px; }
.hb-hsearch .btn { border-radius: 10px; }

/* ---- Footer: same structure as the reference, light design ---- */
.site-footer.bt-foot { position: relative; margin-top: clamp(4rem, 8vw, 6rem); padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem; background: var(--hb-sage); color: var(--hb-forest); border-top: 0; }
.site-footer.bt-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 36px; transform: translateY(-99%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 36' preserveAspectRatio='none'%3E%3Cpath fill='%23e1ead9' d='M0 36V18C240 0 480 0 720 14s480 18 720 0v22z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; pointer-events: none; }
.bt-foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 2rem; }
.bt-foot-brand { max-width: 600px; }
.bt-foot .brand-name { font-size: 1.6rem; }
.bt-foot-text { margin: .9rem 0 0; color: var(--hb-forest); }
.bt-foot-nav ul, .bt-foot-nav .menu { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.bt-foot-nav li { margin: 0; }
.bt-foot-nav a { display: inline-block; padding: .4rem 1rem; border: 2px solid var(--hb-forest); border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--hb-forest); text-decoration: none; transition: background .15s ease, color .15s ease; }
.bt-foot-nav a:hover { background: var(--hb-forest); color: #fff; text-decoration: none; }
.bt-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem; margin-top: 1.75rem; padding-top: 1.35rem; border-top: 2px dotted rgba(29, 59, 47, .45); font-size: .85rem; font-weight: 700; }
.bt-foot-bottom p { margin: 0; color: var(--hb-forest); }
.bt-foot-disc { max-width: 100ch; margin: .9rem 0 0; font-size: .82rem; color: #3d5a4c; }

/* ---- Home: hero ---- */
.hb-hero { position: relative; overflow: hidden; padding: clamp(2.25rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); background: radial-gradient(700px 420px at 100% 0%, rgba(244, 220, 200, .8), transparent 62%), radial-gradient(600px 400px at -5% 100%, rgba(225, 234, 217, .95), transparent 60%), var(--hb-cream); }
.hb-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hb-eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem; font: 700 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--hb-clay); }
.hb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hb-clay); }
.hb-hero h1 { max-width: 13ch; margin: 0 0 .5rem; font-family: var(--hb-serif); font-weight: 700; font-size: clamp(2.5rem, 5.4vw, 4.3rem); line-height: 1.05; letter-spacing: -.02em; color: var(--hb-forest); }
.hb-squig { display: block; max-width: 100%; margin: 0 0 1.2rem; }
.hb-lede { max-width: 50ch; margin-bottom: 1.6rem; font-size: 1.15rem; color: var(--muted); }
.hb-search { display: flex; gap: .5rem; max-width: 560px; padding: .4rem; background: #fff; border: 2px solid var(--hb-forest); border-radius: 999px; box-shadow: 0 18px 36px -26px rgba(29, 59, 47, .6); }
.hb-search input[type="search"] { min-width: 0; padding-left: 1.1rem; background: transparent; border: 0; border-radius: 999px; }
.hb-search .btn { padding-left: 1.4rem; padding-right: 1.4rem; background: var(--hb-clay); color: #fff; border-color: var(--hb-clay); border-radius: 999px; }
.hb-search .btn:hover { background: #963a20; }
.hb-goals { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.1rem 0 0; font-size: .95rem; color: var(--muted); }
.hb-goals a { padding: .25rem .85rem; background: #fff; border: 1px solid rgba(29, 59, 47, .3); border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--hb-forest); }
.hb-goals a:hover { background: var(--hb-forest); color: #fff; }
.hb-meta { margin: 1.2rem 0 0; font-size: .9rem; font-weight: 600; color: var(--muted); }

.hb-art { position: relative; width: 100%; max-width: 440px; margin-left: auto; }
.hb-art::before { content: ""; position: absolute; inset: 8% -6% -6% 10%; z-index: 0; background: var(--hb-sage); border-radius: 999px 999px 40px 40px; }
.hb-arch { position: relative; z-index: 1; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-2); border: 6px solid #fff; border-radius: 999px 999px 28px 28px; box-shadow: 0 30px 60px -34px rgba(29, 59, 47, .6); }
.hb-arch-img { display: block; width: 100%; height: 100%; }
.hb-arch-img img, .hb-arch-img .ph { width: 100%; height: 100%; object-fit: cover; }
.hb-seal { position: absolute; z-index: 3; top: 6%; left: -4%; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--hb-clay); color: #fff; outline: 3px solid var(--hb-clay); border: 3px solid #fff; font: 700 .76rem/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; text-align: center; transform: rotate(-12deg); }
.hb-cap { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: -1.5rem; padding: .85rem 1.1rem; background: #fff; border-radius: 16px; box-shadow: 0 20px 36px -22px rgba(29, 59, 47, .6); text-decoration: none; color: var(--hb-forest); }
.hb-cap small { display: block; font: 700 .72rem/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--hb-clay); }
.hb-cap strong { display: block; font: 700 1.1rem/1.25 var(--hb-serif); }
.hb-arch-plain .hb-arch-img { display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 2rem; text-align: center; background: var(--hb-sage); color: var(--hb-forest); }
.hb-arch-plain svg { width: 64px; height: 64px; }

/* ---- Home: shared section styles ---- */
.hb-sec { margin-top: clamp(3rem, 7vw, 5rem); }
.hb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem 1.5rem; margin-bottom: 1.75rem; }
.hb-head h2 { margin: 0 0 .25rem; font-family: var(--hb-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--hb-forest); }
.hb-head p { margin: 0; color: var(--muted); }
.hb-all { font-weight: 700; white-space: nowrap; color: var(--hb-clay); }

/* ---- Home: goal cards ---- */
.hb-goalcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.hb-goalcards a { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; background: #fff; border: 1px solid rgba(29, 59, 47, .14); border-radius: 20px; box-shadow: 0 14px 28px -24px rgba(29, 59, 47, .55); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.hb-goalcards a:hover { transform: translateY(-3px); box-shadow: 0 22px 34px -24px rgba(29, 59, 47, .6); }
.hb-initial { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--hb-sage); font: 700 1.5rem/1 var(--hb-serif); color: var(--hb-forest); }
.hb-goalcards li:nth-child(4n+2) .hb-initial { background: var(--hb-peach); }
.hb-goalcards li:nth-child(4n+3) .hb-initial { background: var(--hb-mist); }
.hb-goalcards li:nth-child(4n) .hb-initial { background: var(--hb-sand); }
.hb-goal-text { flex: 1; min-width: 0; }
.hb-goal-text strong { display: block; font: 700 1.1rem/1.2 var(--hb-serif); color: var(--hb-forest); }
.hb-goal-text small { color: var(--muted); font-size: .88rem; }
.hb-goal-go { color: var(--hb-clay); font-size: 1.2rem; transition: transform .2s ease; }
.hb-goalcards a:hover .hb-goal-go { transform: translateX(4px); }

/* ---- Home: arch review cards ---- */
.hb-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 1.5rem; align-items: start; }
.hb-card:nth-child(even) { margin-top: 2rem; }
.hb-card-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 1rem; background: var(--ink-2); border-radius: 999px 999px 18px 18px; box-shadow: 0 22px 36px -26px rgba(29, 59, 47, .6); transition: transform .3s ease; }
.hb-card:hover .hb-card-img { transform: translateY(-5px); }
.hb-card-img img, .hb-card-img .ph { width: 100%; height: 100%; object-fit: cover; }
.hb-card-topic { display: block; margin-bottom: .25rem; font: 700 .72rem/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--hb-clay); }
.hb-card h3 { margin: 0 0 .4rem; font: 700 1.2rem/1.25 var(--hb-serif); }
.hb-card h3 a, .hb-guide h3 a { color: var(--hb-forest); text-decoration: none; }
.hb-card h3 a:hover, .hb-guide h3 a:hover { text-decoration: underline; }
.hb-card p { margin: 0 0 .6rem; color: var(--muted); font-size: .95rem; }
.hb-go { font-weight: 700; color: var(--hb-clay); text-decoration: none; }
.hb-go:hover { text-decoration: underline; }

/* ---- Home: label checklist ---- */
.hb-check { padding: clamp(2.5rem, 6vw, 4rem) 0; background: var(--hb-sage); }
.hb-check-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 2rem 3.5rem; align-items: start; }
.hb-check-copy h2 { margin-bottom: .5rem; font-family: var(--hb-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--hb-forest); }
.hb-check-copy p { max-width: 30ch; color: #3d5a4c; }
.hb-tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; counter-reset: tip; }
.hb-tips li { position: relative; counter-increment: tip; padding: 1.2rem 1.3rem 1.3rem 4.2rem; background: #fff; border-radius: 20px; }
.hb-tips li::before { content: counter(tip); position: absolute; left: 1.1rem; top: 1rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--hb-forest); color: #fff; font: 700 1.2rem/1 var(--hb-serif); }
.hb-tips h3 { margin: 0 0 .3rem; font: 700 1.05rem/1.25 var(--hb-serif); }
.hb-tips p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---- Home: directory as a menu (same filter as before) ---- */
.hb-dir-box { padding: clamp(1.5rem, 4vw, 2.75rem); background: #fff; border: 1px solid rgba(29, 59, 47, .16); border-radius: 30px; box-shadow: 0 30px 60px -44px rgba(29, 59, 47, .6); }
.hb-dir-head h2 { margin-bottom: .3rem; font-family: var(--hb-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--hb-forest); }
.hb-dir-head > p { margin: 0; color: var(--muted); }
.hb-filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; max-width: 640px; margin: 1.25rem 0 0; }
.hb-filter label { display: block; margin-bottom: .25rem; font-size: .85rem; font-weight: 600; }
.hb-filter input[type="search"], .hb-filter select { border-width: 1px; border-radius: 12px; }
.hb-count { margin: .9rem 0 0; font-weight: 600; color: var(--muted); }
.hb-menu { list-style: none; margin: 1.25rem 0 0; padding: 0; columns: 2; column-gap: 3.5rem; }
.hb-menu li { break-inside: avoid; }
.hb-menu a, .hb-menu .dl { display: flex; align-items: baseline; gap: .6rem; padding: .55rem 0; text-decoration: none; }
.hb-menu .dn { font: 700 1.1rem/1.3 var(--hb-serif); color: var(--hb-forest); }
.hb-lead { flex: 1 1 1.5rem; min-width: 1rem; border-bottom: 2px dotted rgba(29, 59, 47, .4); transform: translateY(-.28em); }
.hb-menu .dt { flex: none; max-width: 45%; font-size: .9rem; font-style: italic; color: var(--muted); text-align: right; }
.hb-menu a:hover .dn { color: var(--hb-clay); text-decoration: underline; text-underline-offset: 4px; }

/* ---- Home: ingredient bubbles ---- */
.hb-ing { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 4.5rem); background: var(--hb-forest); color: var(--on-dark); }
.hb-head-light h2 { color: #fff; }
.hb-head-light p { color: var(--on-dark-muted); }
.hb-head-light .hb-all { color: var(--hb-peach); }
.hb-bubbles { list-style: none; margin: 0; padding: 0 0 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }
.hb-bubbles li:nth-child(3n+2) { transform: translateY(16px); }
.hb-bubbles a { display: grid; place-items: center; width: clamp(92px, 11vw, 126px); aspect-ratio: 1; padding: .55rem; background: var(--hb-sage); border-radius: 50%; font: 700 .84rem/1.2 var(--hb-serif); color: var(--hb-forest); text-align: center; text-decoration: none; overflow-wrap: anywhere; transition: transform .2s ease, background .2s ease; }
.hb-bubbles li:nth-child(4n+2) a { background: var(--hb-peach); }
.hb-bubbles li:nth-child(4n+3) a { background: var(--hb-mist); }
.hb-bubbles li:nth-child(4n) a { background: var(--hb-sand); }
.hb-bubbles a:hover, .hb-bubbles a:focus-visible { background: #fff; transform: scale(1.08) rotate(-3deg); }

/* ---- Home: guide cards ---- */
.hb-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.hb-guide { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid rgba(29, 59, 47, .14); border-radius: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.hb-guide:hover { transform: translateY(-4px); box-shadow: 0 26px 40px -30px rgba(29, 59, 47, .6); }
.hb-guide-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.3rem; background: linear-gradient(135deg, var(--hb-sage), #f0f5ea); color: var(--hb-forest); font: 700 .78rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.hb-guide:nth-child(3n+2) .hb-guide-top { background: linear-gradient(135deg, var(--hb-peach), #fbeee2); }
.hb-guide:nth-child(3n) .hb-guide-top { background: linear-gradient(135deg, var(--hb-mist), #ecf3f2); }
.hb-guide-body { display: flex; flex: 1; flex-direction: column; padding: 1.2rem 1.3rem 1.4rem; }
.hb-guide h3 { margin: 0 0 .5rem; font: 700 1.2rem/1.3 var(--hb-serif); }
.hb-guide p { margin: 0 0 .8rem; color: var(--muted); font-size: .95rem; }
.hb-guide .hb-go { margin-top: auto; }

/* ---- Home: safety note ---- */
.hb-note { display: flex; gap: 1.25rem; align-items: flex-start; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--hb-peach); border-radius: 30px; }
.hb-note-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--hb-forest); color: #fff; }
.hb-note h2 { margin: 0 0 .5rem; font-family: var(--hb-serif); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--hb-forest); }
.hb-note ul { max-width: 75ch; margin: 0; padding-left: 1.2rem; }
.hb-note li { margin: .35rem 0; }

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
	.primary a::after, .hb-goalcards a, .hb-goal-go, .hb-card-img, .hb-bubbles a, .hb-guide, .bt-foot-nav a { transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
	.hb-hero-grid { grid-template-columns: minmax(0, 1fr); }
	.hb-art { margin: 0 auto 1.5rem; max-width: 400px; }
	.hb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-card:nth-child(even) { margin-top: 0; }
	.hb-check-in { grid-template-columns: minmax(0, 1fr); }
	.hb-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-menu { columns: 1; }
}
@media (max-width: 760px) {
	.hd-top { grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem; }
	.brand { grid-column: 1; grid-row: 1; justify-self: start; text-align: left; }
	.hd-left { grid-column: 2; grid-row: 1; }
	.hd-right { grid-column: 3; grid-row: 1; }
	.hd-cta { display: none; }
	.hb-hsearch > summary span { display: none; }
	.hb-hsearch > summary { padding: .4rem .7rem; }
	.hb-hsearch form { left: auto; right: -4.5rem; }
	.primary.wrap { border-top: 0; }
	.primary ul, .primary .menu { gap: 0; padding: 0; }
	.primary a { display: block; padding: .8rem 0; border-top: 1px solid rgba(29, 59, 47, .3); letter-spacing: .1em; }
	.primary a::after { display: none; }
	.hb-tips { grid-template-columns: minmax(0, 1fr); }
	.hb-guides { grid-template-columns: minmax(0, 1fr); }
	.hb-filter { grid-template-columns: minmax(0, 1fr); }
	.hb-search { border-radius: 22px; }
	.hb-note { flex-direction: column; }
	.bt-foot-top, .bt-foot-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
	.hb-cards { grid-template-columns: minmax(0, 1fr); }
	.hb-seal { left: 0; width: 82px; height: 82px; font-size: .68rem; }
	.brand-name { font-size: 1.3rem; }
}
