/*
Theme Name: HandyGarden
Description: A lightweight editorial block theme for practical gardening. Native WordPress blocks, system fonts, and no page-builder dependency.
Version: 0.1.5
Author: HandyGarden
Requires at least: 6.6
Tested up to: 6.8
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: handygarden
Tags: blog, news, full-site-editing, block-patterns, custom-colors, editor-style, featured-images, wide-blocks
*/

/* Small presentation layer. Structure and tokens live in native blocks/theme.json. */
* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; }
a { text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #a1450a; outline-offset: 4px; }
:where(input, button, textarea, select) { font: inherit; }
:where(img) { max-width: 100%; height: auto; }
::selection { background: #d4ef70; color: #102b22; }
.wp-site-blocks > * { margin-block-start: 0; }
:where(.wp-block-post-content, .wp-block-post-title, .wp-block-navigation-item__label) { overflow-wrap: anywhere; }
.wp-block-post-content :where(p, li) { line-height: 1.8; }
.wp-block-post-content :where(h2, h3) { margin-top: 2.5rem; }
.wp-block-post-content :where(pre, table) { max-width: 100%; overflow-x: auto; }
.wp-block-button__link, .wp-block-search__button { min-height: 44px; border-radius: 0; }
.wp-block-button__link:hover, .wp-block-search__button:hover { background: #27583b; color: white; }
.wp-block-search__input { min-width: 0; min-height: 44px; border: 1px solid #102b22; border-radius: 0; padding: 0.65rem 0.8rem; font-size: 1rem; }
.wp-block-search__button { margin-left: 0.5rem; }
.wp-block-search__label { font-weight: 700; font-size: 0.875rem; }
.wp-block-search__inside-wrapper { margin-top: 0.5rem; }
.wp-block-query-pagination { margin-top: 3rem; padding-block: 1rem; border-top: 1px solid #cbd3ca; gap: 1rem; }
.wp-block-query-pagination :where(a, span) { display: inline-block; padding: 0.35rem; }
.wp-block-query-pagination .current { font-weight: 700; text-decoration: underline; }
.hg-eyebrow { font-family: Arial, Helvetica, sans-serif; font-size: 0.75rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; }
.hg-header { margin-top: 0; }
.hg-topline { padding-block: 0.65rem; border-bottom: 1px solid #cbd3ca; }
.hg-topline p { margin: 0; }
.hg-masthead { padding-block: 1.75rem 1.5rem; margin-block-start: 0; gap: 2rem; }
.hg-brand { font-size: clamp(2.3rem, 4.4vw, 4.25rem); line-height: 1; margin: 0; }
.hg-brand a { text-decoration: none; }
.hg-brand-note { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; font-style: italic; line-height: 1.4; padding-left: 1.2rem; border-left: 1px solid #cbd3ca; margin: 0; }
.hg-nav-row { border-block: 1px solid #102b22; min-height: 4.4rem; padding-block: 0.7rem; margin-block-start: 0; gap: 1.5rem; }
.hg-nav-row > .wp-block-navigation { flex: 1 1 auto; }
.hg-nav-row .wp-block-navigation a { padding-block: 0.45rem; }
.hg-header-search { flex: 0 1 260px; max-width: 260px; }
.hg-header-search .wp-block-search__inside-wrapper { margin: 0; }
.hg-header-search .wp-block-search__input { width: 100%; font-size: 0.875rem; }
.hg-header-search .wp-block-search__button { padding-inline: 0.65rem; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container-close, .wp-block-navigation__responsive-container-open { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.hg-main { padding-top: 2rem; padding-bottom: 1rem; }
.hg-hero-intro { margin-block: 0 1rem; }
.hg-hero-intro p { margin: 0; }
.hg-hero { gap: 0; margin-block: 0; }
.hg-hero-photo { position: relative; }
.hg-hero-photo figure { height: 100%; margin: 0; position: relative; }
.hg-hero-photo img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; display: block; }
.hg-hero-photo figcaption { position: absolute; left: 1rem; bottom: 1rem; background: #08291d; color: white; font-size: 0.7rem; padding: 0.3rem 0.55rem; margin: 0; }
.hg-hero-copy { padding: clamp(2rem, 3.1vw, 3.4rem); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hg-hero-copy h1 { font-size: clamp(2.6rem, 4.2vw, 4.3rem); line-height: 1.05; letter-spacing: -0.045em; margin-block: 1.2rem; max-width: 10em; }
.hg-hero-copy > p { margin: 0; max-width: 27rem; }
.hg-hero-copy .wp-block-buttons { margin-top: 1.5rem; }
.hg-section { margin-block-start: var(--wp--preset--spacing--60); }
.hg-section-heading { border-top: 2px solid #102b22; padding-top: 1rem; margin-bottom: 1.5rem; }
.hg-story-grid { gap: 2.2rem 2rem; }
.hg-story-card .wp-block-post-featured-image { margin-bottom: 1.2rem; }
.hg-story-card .wp-block-post-featured-image img { display: block; }
.hg-story-card .wp-block-post-terms { margin-top: 0; color: #3d6550; }
.hg-story-card .wp-block-post-title { font-size: 1.7rem; line-height: 1.16; letter-spacing: -0.025em; margin-block: 0.6rem 0.75rem; }
.hg-story-card .wp-block-post-title a:hover { text-decoration: underline; }
.hg-story-card .wp-block-post-excerpt { font-size: 0.9375rem; line-height: 1.55; margin: 0; }
.hg-story-card .wp-block-post-excerpt p { margin: 0; }
.hg-story-card .wp-block-post-date { margin-top: 1rem; }
.hg-story-card:not(:has(.wp-block-post-featured-image)) { border-top: 4px solid #d4ef70; padding-top: 1.3rem; }
.hg-garden-note { padding: clamp(2rem, 5vw, 4rem); margin-block-start: var(--wp--preset--spacing--60); }
.hg-garden-note h2 { color: white; font-size: clamp(2.5rem, 4vw, 3.5rem); }
.hg-garden-note p { max-width: 45rem; }
.hg-category-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; }
.hg-category-list > li { padding-block: 1rem; border-bottom: 1px solid #cbd3ca; font: 1.4rem/1.3 Georgia, 'Times New Roman', serif; }
.hg-category-list a { text-decoration: none; }
.hg-category-list a:hover { text-decoration: underline; }
.hg-category-list .children { font-size: 1rem; margin-top: 0.7rem; padding-left: 1.2rem; }
.hg-page-title, .hg-archive-heading { margin-block: 1rem 2.5rem; }
.hg-archive-heading .wp-block-term-description { color: #4e6057; max-width: 50rem; margin-inline: 0; }
.hg-article-heading { padding-block: 1rem; }
.hg-article-heading .wp-block-post-title { margin-top: 1rem; }
.hg-standfirst { font-size: 1.25rem; }
.hg-standfirst p { margin: 0; }
.hg-byline { border-top: 1px solid #cbd3ca; padding-top: 1rem; font-size: 0.8125rem; gap: 1.2rem; }
.hg-article-image { margin-block: 2rem 3rem; }
.hg-article-image img { max-height: 620px; object-fit: cover; }
.hg-article-body { font-size: 1.125rem; }
.hg-post-end { margin-top: 3rem; border-top: 1px solid #cbd3ca; padding-top: 1.5rem; }
.hg-post-navigation { gap: 2rem; font-size: 0.9375rem; }
.hg-post-navigation > div { max-width: 48%; }
.hg-comments { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #cbd3ca; }
.hg-comments .comment-form :where(input:not([type=checkbox]):not([type=submit]), textarea) { max-width: 100%; border: 1px solid #cbd3ca; padding: 0.65rem; }
.hg-comments .comment-form :where(label) { display: block; }
.hg-comments .comment-form-cookies-consent label { display: inline; }
.hg-comments .submit { background: #102b22; color: white; padding: 0.8rem 1.2rem; border: 0; min-height: 44px; }
.hg-fact-box { padding: 1.5rem 1.8rem; }
.hg-fact-box .hg-eyebrow { margin-top: 0; }
.hg-not-found { padding-block: 3rem; }
.hg-footer { padding-block: 3rem 1.5rem; margin-top: var(--wp--preset--spacing--60); }
.hg-footer :where(a, .wp-block-site-title a) { color: white; }
.hg-footer-top { gap: 3rem; }
.hg-footer-top p:not(.wp-block-site-title) { font-size: 0.9375rem; color: #cedbd1; }
.hg-footer-brand { font-size: 2.8rem; line-height: 1.05; }
.hg-footer-bottom { border-top: 1px solid #52705d; padding-top: 1.2rem; margin-top: 3rem; gap: 1.5rem; color: #bdcfc1; font-size: 0.75rem; }
.hg-footer-bottom p { margin: 0; }
.hg-footer :focus-visible { outline-color: #d4ef70; }
@media (max-width: 960px) {
  .hg-nav-row { gap: 1rem; }
  .hg-nav-row .wp-block-navigation { font-size: 0.8125rem; }
  .hg-header-search { flex-basis: 210px; }
  .hg-hero-photo img { min-height: 460px; }
  .hg-story-grid { gap: 2rem 1.5rem; }
}
@media (max-width: 781px) {
  .hg-hero-photo img { height: 380px; min-height: 0; }
  .hg-hero-copy { padding: 2rem; }
  .hg-hero-copy h1 { font-size: clamp(2.6rem, 8vw, 4rem); max-width: 14em; }
  .hg-story-grid.wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hg-category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hg-footer-top { align-items: flex-start; }
}
@media (max-width: 599px) {
  .hg-brand-note { display: none; }
  .hg-masthead { padding-block: 1.5rem; }
  .hg-header-search { flex-basis: 240px; max-width: min(75%, 270px); }
  .hg-main { padding-top: 1.5rem; }
  .hg-hero-photo img { height: 300px; }
  .hg-hero-copy { padding: 1.75rem 1.5rem; }
  .hg-hero-copy h1 { font-size: 2.8rem; }
  .hg-story-grid.wp-block-post-template { grid-template-columns: 1fr; gap: 2.5rem; }
  .hg-category-list { grid-template-columns: 1fr; }
  .hg-garden-note { padding: 2rem 1.5rem; }
  .hg-article-image { margin-block: 1.5rem 2rem; }
  .hg-post-navigation { flex-direction: column; align-items: flex-start; }
  .hg-post-navigation > div { max-width: 100%; }
  .hg-footer-brand { font-size: 2.3rem; }
  .hg-footer-top { flex-direction: column; gap: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.hg-skip-link { position: absolute; top: -10rem; left: 1rem; z-index: 100000; background: #d4ef70; color: #102b22; padding: 0.8rem 1.2rem; font-weight: 700; }
.hg-skip-link:focus { position: fixed; top: 1rem; }

/* Match the approved starter-article previews: warm paper and a compact brand. */
.hg-topline { padding-block: .45rem; }
.hg-masthead { padding-block: 1rem; gap: 1rem; }
.hg-masthead > .wp-block-group { gap: .85rem; }
.hg-brand { font: 600 1.875rem/1.2 Arial, Helvetica, sans-serif; color: #254d35; letter-spacing: -.025em; }
.hg-brand a { color: #254d35; }
.hg-masthead .wp-block-site-logo { width: 48px; flex: 0 0 48px; }
.hg-masthead .wp-block-site-logo img { width: 48px; height: 48px; object-fit: contain; }
.hg-brand-note { font-size: .875rem; }
.hg-nav-row { min-height: 3.6rem; padding-block: .45rem; border-color: #d9dfd3; }
.hg-hero-copy h1 { font-size: clamp(2.125rem, 3.8vw, 3.25rem); line-height: 1.12; letter-spacing: -.025em; }
.hg-hero-photo img { min-height: 440px; }
.hg-article-heading .wp-block-post-title, .hg-page-title { font-size: clamp(2.125rem, 4.5vw, 3.25rem); line-height: 1.12; }
.hg-article-body { font: 19px/1.65 Georgia, 'Times New Roman', serif; }
.hg-article-body :where(p,li) { line-height: 1.65; }
.hg-article-body h2 { font-size: 27px; line-height: 1.25; letter-spacing: 0; }
.hg-article-body h3 { font-size: 24px; line-height: 1.3; letter-spacing: 0; }
.hg-article-body .reading { font: 14px/1.6 Arial, Helvetica, sans-serif; border-top: 1px solid #d9dfd3; margin-top: 2rem; padding-top: 1.1rem; }
.hg-article-body table { border-collapse: collapse; width: 100%; font: 16px/1.55 Arial, Helvetica, sans-serif; }
.hg-article-body :where(th,td) { padding: .8rem; border-bottom: 1px solid #d9dfd3; vertical-align: top; overflow-wrap: anywhere; }
.hg-article-body th { background: #edf2e8; }
.hg-article-body sup { font: 12px/1 Arial, Helvetica, sans-serif; }
@media (max-width:781px) { .hg-hero-photo img { min-height: 0; } }
@media (max-width:599px) {
 .hg-masthead { padding-block: .85rem; }
 .hg-brand { font-size: 1.5rem; }
 .hg-masthead .wp-block-site-logo { width: 40px; flex-basis: 40px; }
 .hg-masthead .wp-block-site-logo img { width: 40px; height: 40px; }
 .hg-hero-copy h1 { font-size: 2.125rem; }
 .hg-article-body { font-size: 18px; }
 .hg-article-body h2 { font-size: 25px; }
 .hg-article-body :where(th,td) { padding: .6rem; }
}
