/* HandyGarden editorial refinements. Native navigation retains its focus and keyboard behavior. */
body {
  --hg-gutter: clamp(1.25rem, 4vw, 3rem);
  --wp--style--root--padding-left: var(--hg-gutter);
  --wp--style--root--padding-right: var(--hg-gutter);
}
/* WordPress nested global-padding rules zero these containers. Give each outer
   landmark one gutter; do not repeatedly pad its article/section descendants. */
body .hg-header.has-global-padding,
body .hg-main.has-global-padding,
body .hg-footer.has-global-padding {
  padding-inline: var(--hg-gutter);
}
body .hg-main > :where(.hg-article-heading, .hg-article-body, .hg-post-end, .hg-section).has-global-padding,
body .hg-footer-top > .has-global-padding {
  padding-inline: 0;
}
.hg-main { padding-block: clamp(1.5rem, 3vw, 2.5rem) 1rem; }
.hg-header .hg-topline { padding-block: .6rem; }
.hg-header .hg-masthead { padding-block: 1.25rem; }
.hg-header .hg-nav-row { border-top: 1px solid #d9dfd3; border-bottom: 2px solid #254d35; }
.hg-header .hg-nav-row > .wp-block-navigation { min-width: 0; }
.hg-header-search { min-width: 0; }
.hg-header-search .wp-block-search__inside-wrapper { gap: 0; }
.hg-header-search .wp-block-search__input { border-color: #aebcad; background: #fffefa; }
.hg-header-search .wp-block-search__button { margin-left: 0; min-width: 44px; }
.hg-header .hg-nav-row .wp-block-navigation-item__content { text-decoration: none; text-underline-offset: .35em; }
.hg-header .hg-nav-row .wp-block-navigation-item__content:hover,
.hg-header .hg-nav-row .wp-block-navigation-item__content[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.hg-header .hg-nav-row .wp-block-navigation__responsive-container-open {
  gap: .6rem; padding: .5rem .85rem; border: 1px solid #aebcad;
  background: #edf2e8; color: #254d35; font: 700 .875rem/1 Arial, sans-serif;
}
.hg-header .hg-nav-row .wp-block-navigation__responsive-container-open::after { content: "Menu"; }
.hg-header .hg-nav-row .wp-block-navigation__responsive-container-open:hover { background: #d4ef70; }
/* Keep the native WordPress dialog, focus trap, Escape and return-focus logic. */
.hg-header .hg-nav-row nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  background: #fbf8ef; color: #102b22; overflow-y: auto;
}
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-close { max-width: 48rem; margin-inline: auto; }
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-dialog { position: relative; }
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-dialog::before {
  content: "HandyGarden"; display: block; padding: .65rem 4rem 1.75rem 0;
  border-bottom: 2px solid #254d35; color: #254d35;
  font: 600 clamp(22px, 3.4vw, 26px)/1.2 Arial, sans-serif; letter-spacing: -.025em;
}
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-container-close {
  position: absolute; top: 0; right: 0; border: 1px solid #aebcad;
  border-radius: 50%; background: #edf2e8; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
}
.hg-header .hg-nav-row .wp-block-navigation__responsive-container-close svg {
  display: block; flex: 0 0 24px; width: 24px; height: 24px;
}
.hg-header .hg-nav-row .wp-block-navigation :where(button):focus-visible {
  outline: 2px solid #254d35; outline-offset: 2px;
}
.hg-header .hg-nav-row .is-menu-open .wp-block-navigation-item__content:focus-visible {
  outline: none; background: #edf2e8; color: #102b22;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .25em;
}
.hg-header .hg-masthead .wp-block-site-logo { width: 60px; flex: 0 0 60px; }
.hg-header .hg-masthead .wp-block-site-logo img { width: 60px; height: 60px; }
.hg-header .hg-brand { font-size: 28px; }
@media (max-width: 599px) {
  .hg-header .hg-masthead .wp-block-site-logo { width: 52px; flex-basis: 52px; }
  .hg-header .hg-masthead .wp-block-site-logo img { width: 52px; height: 52px; }
  .hg-header .hg-brand { font-size: 22px; }
}
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-container-close:hover { background: #d4ef70; }
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__responsive-container-content {
  padding-top: 1rem; align-items: stretch; gap: 0;
}
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation__container {
  width: 100%; gap: 0; align-items: stretch;
}
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation-item { width: 100%; align-items: stretch; }
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation-item__content {
  width: 100%; padding: .75rem .25rem; min-height: 48px;
  border-bottom: 1px solid #cbd3ca; color: #102b22;
  font: 400 clamp(20px, 2.8vw, 22px)/1.3 Georgia, serif;
}
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation-item__content:hover { background: #edf2e8; }
.hg-header .hg-nav-row nav.wp-block-navigation .is-menu-open .wp-block-navigation-item__content[aria-current="page"] { color: #254d35; }
/* Tablet links need room too; open the native mobile dialog below 1100px. */
@media (max-width: 1099px) {
  .hg-header .hg-nav-row .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
  .hg-header .hg-nav-row .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .hg-header .hg-nav-row { gap: 1rem; padding-block: .8rem; }
  .hg-header-search { flex: 0 1 280px; max-width: 60%; }
}
@media (min-width: 1100px) {
  .hg-header .hg-nav-row .wp-block-navigation__container { gap: clamp(.8rem, 1.6vw, 1.6rem); }
  .hg-header .hg-nav-row .wp-block-navigation-item__content { min-height: 44px; display: flex; align-items: center; }
  .hg-header-search { flex-basis: 230px; }
}
.hg-story-card .wp-block-post-featured-image { overflow: hidden; background: #edf2e8; }
.hg-story-card .wp-block-post-title { text-wrap: pretty; }
.hg-story-card .wp-block-post-terms a { text-decoration: none; }
.hg-story-card .wp-block-post-terms a:hover { text-decoration: underline; }
.hg-article-heading .wp-block-post-title { text-wrap: pretty; }
.hg-standfirst { line-height: 1.6; color: #4e6057; }
.hg-article-body :where(p, li) { overflow-wrap: break-word; }
.hg-article-body :where(h2, h3) { scroll-margin-top: 1.5rem; text-wrap: pretty; }
.hg-article-body :where(ul, ol) { padding-inline-start: 1.5em; }
.hg-article-body li + li { margin-top: .55rem; }
.hg-article-body .choice-table, .hg-article-body .wp-block-table { overflow-x: auto; max-width: 100%; }
/* Let table regions scroll instead of splitting words into narrow columns. */
.hg-article-body :is(.choice-table, .wp-block-table) table {
  table-layout: auto; width: 100%; max-width: none;
}
.hg-article-body :is(.choice-table, .wp-block-table) table:has(tr > :nth-child(3)) {
  min-width: 36rem;
}
.hg-article-body :where(th, td) {
  text-align: start; overflow-wrap: normal; word-break: normal; hyphens: manual;
}
.hg-article-body .reading { padding: 1.25rem; background: #edf2e8; border: 1px solid #d9dfd3; }
.hg-post-navigation > div { flex: 1; padding: 1.25rem; background: #edf2e8; }
.hg-post-navigation .post-navigation-link__label { display: block; margin-bottom: .5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hg-post-navigation a { display: inline-block; line-height: 1.5; }
.hg-footer .wp-block-page-list { list-style: none; margin: 0; padding: 0; }
.hg-footer .wp-block-navigation-item__content { display: inline-block; min-height: 44px; padding-block: .55rem; line-height: 1.5; }
.hg-footer .hg-footer-brand { font-family: Arial, sans-serif; font-size: 28px; font-weight: 600; letter-spacing: -.035em; }
@media (max-width: 599px) { .hg-footer .hg-footer-brand { font-size: 26px; } }
.wp-block-query-pagination .page-numbers { min-width: 44px; min-height: 44px; text-align: center; padding: .55rem; }
.wp-block-query-pagination .current { background: #254d35; color: #fff; text-decoration: none; }
@media (max-width: 599px) {
  .hg-header .hg-masthead { padding-block: 1rem; }
  .hg-header .hg-nav-row { gap: .75rem; }
  .hg-header-search { flex: 1 1 0; max-width: none; }
  .hg-header .hg-nav-row > .wp-block-navigation { flex: 0 0 auto; }
  .hg-header-search .wp-block-search__input { padding-inline: .6rem; font-size: 1rem; }
  .hg-header-search .wp-block-search__button { padding-inline: .5rem; }
  .hg-hero-photo img { height: 260px; }
  .hg-hero-copy { padding: 1.75rem 1.25rem; }
  .hg-hero-copy h1 { font-size: clamp(1.95rem, 8vw, 2.5rem); }
  .hg-story-grid.wp-block-post-template { gap: 2rem; }
  .hg-story-card .wp-block-post-title { font-size: 24px !important; }
  .hg-article-heading .wp-block-post-title, .hg-page-title { font-size: clamp(2rem, 8vw, 2.625rem); }
  .hg-standfirst { font-size: 1.125rem; }
  .hg-article-body { font-size: 1.125rem; }
  .hg-article-body :where(th, td) { font-size: .875rem; padding: .65rem .5rem; }
  .hg-byline { gap: .5rem 1rem; }
  .hg-post-navigation { gap: 1rem; align-items: stretch; }
  .hg-post-navigation > div { width: 100%; }
  .hg-footer-brand { font-size: 2rem; }
  .hg-footer-top, .hg-footer-bottom { gap: 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hg-header .hg-nav-row button, .hg-header .hg-nav-row a { transition: background-color .15s ease, color .15s ease; }
}
@media print {
  .hg-header .hg-nav-row, .hg-footer, .hg-post-navigation { display: none; }
  .hg-main { padding-inline: 0 !important; }
  .hg-article-body { font-size: 11pt; }
}

/* Compact in-page guide navigation and real-overflow table hints. */
.hg-guide-contents { margin-block: 1.5rem 2rem; padding: 1rem 1.25rem; border: 1px solid #d9dfd3; background: #edf2e8; font: 16px/1.5 Arial, sans-serif; }
.hg-guide-contents > p { margin: 0 0 .5rem; }
.hg-guide-contents ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; padding: 0; margin: 0; list-style: none; }
.hg-guide-contents li + li { margin-top: 0; }
.hg-guide-contents a { display: block; min-height: 44px; padding: .6rem .25rem; color: #254d35; }
.hg-guide-contents a:hover, .hg-guide-contents a:focus-visible { background: #d9e5d4; }
.hg-table-scroll-hint { margin: 1.25rem 0 .5rem; font: 600 14px/1.5 Arial, sans-serif; color: #254d35; }
.hg-table-scroll-hint[hidden] { display: none !important; }
.hg-inline-link, .hg-form-privacy a, .hg-comment-privacy a { color: #254d35 !important; font-weight: 700; }
#latest-guides, .hg-article-body h2[id] { scroll-margin-top: 3rem; }
@media (max-width: 599px) { .hg-guide-contents ul { grid-template-columns: 1fr; } }
@media print { .hg-guide-contents, .hg-table-scroll-hint { display: none; } }
