/*
Theme Name: HRG Shield
Theme URI: https://homerepairgrants.org/
Description: A calm, fast GeneratePress child theme for HomeRepairGrants.org. Built for plain-English home repair grant and assistance guides.
Author: HomeRepairGrants.org
Template: generatepress
Version:      1.3.0
Text Domain: hrg-shield
*/


:root {
  --hrg-bg: #f5efe6;
  --hrg-bg-soft: #fbf7f1;
  --hrg-surface: #fffdf8;
  --hrg-surface-strong: #ffffff;
  --hrg-text: #2a221b;
  --hrg-muted: #66594b;
  --hrg-primary: #6b432b;
  --hrg-primary-2: #8a5734;
  --hrg-accent: #b97745;
  --hrg-accent-soft: #f4e3d4;
  --hrg-help: #6f694f;
  --hrg-help-soft: #f0eadc;
  --hrg-warning: #9a6230;
  --hrg-warning-soft: #fff0dc;
  --hrg-border: #e3d5c4;
  --hrg-border-strong: #c9ad91;
  --hrg-shadow: 0 10px 24px rgba(80, 50, 30, .08);
  --hrg-shadow-soft: 0 4px 14px rgba(80, 50, 30, .06);
  --hrg-radius: 14px;
  --hrg-radius-sm: 10px;
  --hrg-max: 1120px;
  --hrg-font-body: "Nunito Sans", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hrg-font-head: "Lora", Georgia, "Times New Roman", serif;
  --hrg-focus: 0 0 0 4px rgba(185, 119, 69, .25);
}

html { scroll-behavior: smooth; }
body {
  background: var(--hrg-bg);
  color: var(--hrg-text);
  font-family: var(--hrg-font-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
body.hrg-shield-active { background: var(--hrg-bg); }
body.front-page .site-content,
body.home .site-content { display: block; padding: 0; }
body.front-page .site.grid-container,
body.home .site.grid-container { max-width: none; padding: 0; }
body.front-page .inside-article,
body.home .inside-article { padding: 0; }

body.front-page .site-header,
body.front-page .site-footer,
body.front-page .main-navigation {
  display: none;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  color: var(--hrg-text);
  font-family: var(--hrg-font-head);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
h1 { font-size: clamp(2.05rem, 3.5vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 2.35vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.55vw, 1.38rem); }
a { color: var(--hrg-primary-2); text-underline-offset: .2em; }
a:hover { color: var(--hrg-accent); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 0;
  box-shadow: var(--hrg-focus);
}
img { max-width: 100%; height: auto; }

.hrg-skip-link {
  position: absolute;
  left: 1rem;
  top: .75rem;
  transform: translateY(-180%);
  z-index: 9999;
  background: var(--hrg-primary);
  color: #fff;
  padding: .65rem .9rem;
  border-radius: 999px;
  text-decoration: none;
}
.hrg-skip-link:focus { transform: translateY(0); }

.hrg-wrap { width: min(var(--hrg-max), calc(100% - 32px)); margin-inline: auto; }
.hrg-section { padding: clamp(1.85rem, 3.8vw, 3.25rem) 0; }
.hrg-section-tight { padding: clamp(1.75rem, 3.5vw, 3rem) 0; }
.hrg-eyebrow {
  color: var(--hrg-accent);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 0 0 .55rem;
  text-transform: uppercase;
}
.hrg-lede { color: var(--hrg-muted); font-size: clamp(1rem, 1.25vw, 1.15rem); max-width: 720px; }
.hrg-small { color: var(--hrg-muted); font-size: .95rem; }

.hrg-notice-bar {
  background: var(--hrg-primary);
  color: #fff;
  font-size: .88rem;
  padding: .42rem 0;
}
.hrg-notice-bar strong { color: #fff7de; }
.hrg-site-header {
  background: rgba(255,253,248,.96);
  border-bottom: 1px solid var(--hrg-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.15) blur(10px);
}
.admin-bar .hrg-site-header { top: 32px; }
.hrg-header-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 62px;
}
.hrg-brand {
  align-items: center;
  color: var(--hrg-text);
  display: inline-flex;
  font-family: var(--hrg-font-head);
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 800;
  gap: .72rem;
  text-decoration: none;
}
.hrg-brand-mark {
  align-items: center;
  background: var(--hrg-help-soft);
  border: 1px solid var(--hrg-border-strong);
  border-radius: 14px;
  color: var(--hrg-help);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.hrg-nav { align-items: center; display: flex; gap: .2rem; }
.hrg-nav a {
  border-radius: 999px;
  color: var(--hrg-text);
  font-size: .9rem;
  font-weight: 850;
  padding: .45rem .68rem;
  text-decoration: none;
}
.hrg-nav a:hover { background: var(--hrg-accent-soft); color: var(--hrg-primary); }
.hrg-menu-toggle {
  align-items: center;
  background: var(--hrg-primary);
  border: 0;
  border-radius: 999px;
  color: #fff;
  display: none;
  font-weight: 800;
  gap: .4rem;
  padding: .72rem .95rem;
}

.hrg-hero {
  background:
    radial-gradient(circle at 18% 12%, rgba(168,100,54,.14), transparent 32%),
    radial-gradient(circle at 92% 16%, rgba(91,56,40,.10), transparent 28%),
    linear-gradient(135deg, #fbf7f0, #fffaf2 58%, #f1e5d7);
  border-bottom: 1px solid var(--hrg-border);
  overflow: hidden;
  padding: clamp(1.55rem, 3vw, 2.75rem) 0;
}
.hrg-hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.4rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
}
.hrg-hero h1 { margin: 0 0 .75rem; max-width: 760px; }
.hrg-hero-copy { max-width: 760px; }
.hrg-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.15rem 0 .75rem; }
.hrg-trust-line {
  align-items: flex-start;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius-sm);
  color: var(--hrg-muted);
  display: flex;
  gap: .65rem;
  margin-top: .8rem;
  max-width: 720px;
  padding: .7rem .85rem;
}
.hrg-hero-media {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: 20px;
  box-shadow: var(--hrg-shadow);
  overflow: hidden;
  padding: .45rem;
  position: relative;
}
.hrg-hero-media img { border-radius: 16px; display: block; width: 100%; max-height: 340px; object-fit: cover; }
.hrg-hero-note {
  background: rgba(255,253,248,.93);
  border: 1px solid var(--hrg-border);
  border-radius: 16px;
  bottom: .9rem;
  box-shadow: var(--hrg-shadow-soft);
  left: .9rem;
  max-width: 85%;
  padding: .7rem .8rem;
  position: absolute;
}
.hrg-hero-note strong { display: block; font-size: .92rem; }
.hrg-hero-note span { color: var(--hrg-muted); display: block; font-size: .86rem; line-height: 1.4; margin-top: .2rem; }

.hrg-btn {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: .62rem .95rem;
  text-decoration: none;
}
.hrg-btn-primary { background: var(--hrg-primary); color: #fff; }
.hrg-btn-primary:hover { background: var(--hrg-primary-2); color: #fff; }
.hrg-btn-secondary { background: #fff; border-color: var(--hrg-border-strong); color: var(--hrg-primary); }
.hrg-btn-secondary:hover { border-color: var(--hrg-accent); color: var(--hrg-accent); }
.hrg-btn-text { color: var(--hrg-primary); font-weight: 900; text-decoration: none; }
.hrg-btn-text:hover { color: var(--hrg-accent); }

.hrg-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hrg-card {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius);
  box-shadow: var(--hrg-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-height: 100%;
  padding: 1rem;
  position: relative;
}
.hrg-card:hover { border-color: var(--hrg-border-strong); }
.hrg-card h3 { margin: 0; }
.hrg-card p { color: var(--hrg-muted); font-size: .98rem; margin: 0; }
.hrg-card a:not(.hrg-btn) { font-weight: 900; margin-top: auto; text-decoration: none; }
.hrg-card-icon {
  align-items: center;
  background: var(--hrg-help-soft);
  border-radius: 999px;
  color: var(--hrg-help);
  display: inline-flex;
  font-size: 1.08rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.hrg-card-warning .hrg-card-icon { background: var(--hrg-warning-soft); color: var(--hrg-warning); }

.hrg-split {
  align-items: start;
  display: grid;
  gap: clamp(1rem, 2.4vw, 2rem);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
}
.hrg-panel {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius);
  box-shadow: var(--hrg-shadow-soft);
  padding: clamp(1rem, 2.4vw, 1.55rem);
}
.hrg-panel h2, .hrg-panel h3 { margin-top: 0; }

.hrg-ad-slot { display: none !important; }

.hrg-state-tools {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1rem 0 .8rem;
}
.hrg-state-search {
  background: #fff;
  border: 1px solid var(--hrg-border-strong);
  border-radius: 999px;
  font: inherit;
  min-height: 44px;
  padding: .7rem 1rem;
  width: min(430px, 100%);
}
.hrg-state-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.hrg-state-grid a {
  align-items: center;
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: 999px;
  color: var(--hrg-text);
  display: flex;
  font-weight: 850;
  min-height: 40px;
  padding: .45rem .7rem;
  text-decoration: none;
}
.hrg-state-grid a:hover { background: var(--hrg-help-soft); border-color: #b7d9cf; color: var(--hrg-help); }

.hrg-program-list {
  display: grid;
  gap: .85rem;
}
.hrg-program-item {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius-sm);
  padding: 1rem;
}
.hrg-program-item strong { color: var(--hrg-primary); display: block; }
.hrg-program-item span { color: var(--hrg-muted); display: block; font-size: .96rem; margin-top: .2rem; }

.hrg-latest-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hrg-post-card {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius);
  box-shadow: var(--hrg-shadow-soft);
  overflow: hidden;
}
.hrg-post-thumb {
  align-items: center;
  background: linear-gradient(135deg, #f4e2d3, #edf3eb);
  display: flex;
  justify-content: center;
  min-height: 125px;
}
.hrg-post-thumb span { font-size: 2.3rem; }
.hrg-post-content { padding: 1.1rem; }
.hrg-post-meta { color: var(--hrg-muted); font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.hrg-post-card h3 { margin: .35rem 0 .55rem; }
.hrg-post-card p { color: var(--hrg-muted); font-size: .96rem; margin: 0 0 .75rem; }

.hrg-trust-band {
  background: var(--hrg-primary);
  color: #fff;
}
.hrg-trust-band h2, .hrg-trust-band h3 { color: #fff; }
.hrg-trust-band .hrg-lede { color: rgba(255,255,255,.82); }
.hrg-trust-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}
.hrg-trust-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--hrg-radius);
  padding: 1rem;
}
.hrg-trust-card p { color: rgba(255,255,255,.78); margin: .4rem 0 0; }


.hrg-site-footer {
  background: #4b2f22;
  color: rgba(255,255,255,.82);
  padding: clamp(2rem, 4vw, 3.4rem) 0 1.15rem;
}
.hrg-site-footer a { color: #f8e4c8; text-decoration: none; }
.hrg-site-footer a:hover { color: #fff; text-decoration: underline; }
.hrg-footer-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.25fr repeat(3, 1fr);
}
.hrg-site-footer h2, .hrg-site-footer h3 { color: #fff; font-size: 1.08rem; margin-top: 0; }
.hrg-site-footer ul { list-style: none; margin: 0; padding: 0; }
.hrg-site-footer li + li { margin-top: .45rem; }
.hrg-footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.72);
  font-size: .92rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
}

.hrg-callout,
.hrg-resource-box,
.hrg-doc-checklist,
.hrg-state-notice,
.hrg-deadline-warning {
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius-sm);
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
}
.hrg-callout { background: var(--hrg-bg-soft); }
.hrg-callout-tip, .hrg-callout-program, .hrg-state-notice { background: var(--hrg-help-soft); border-color: #bddbd2; }
.hrg-callout-warning, .hrg-deadline-warning { background: var(--hrg-warning-soft); border-color: #e5c795; }
.hrg-callout-info { background: #f8efe4; border-color: #dfc9ad; }
.hrg-resource-box { background: #fff; }
.hrg-resource-box-title { color: var(--hrg-primary); display: block; font-weight: 900; margin-bottom: .35rem; }
.hrg-doc-checklist { background: #fff; }
.hrg-doc-checklist ul { margin-bottom: 0; }

.single .entry-content,
.page .entry-content { max-width: 820px; }
.entry-content p,
.entry-content li { font-size: 1.04rem; }
.entry-content table {
  border-collapse: collapse;
  margin: 1.5rem 0;
  width: 100%;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--hrg-border);
  padding: .75rem;
  text-align: left;
  vertical-align: top;
}
.entry-content th { background: var(--hrg-bg-soft); color: var(--hrg-primary); }


/* v1.2 compact production cleanup */
.hrg-home > section:first-child { margin-top: 0; }
.hrg-home section + section { margin-top: 0; }
.hrg-home .hrg-wrap > h2,
.hrg-home .hrg-wrap > p { margin-top: 0; }
.hrg-card p:last-child, .hrg-panel p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  body { font-size: 17px; }
  .admin-bar .hrg-site-header { top: 0; }
  .hrg-menu-toggle { display: inline-flex; }
  .hrg-nav {
    background: var(--hrg-surface);
    border: 1px solid var(--hrg-border);
    border-radius: var(--hrg-radius-sm);
    box-shadow: var(--hrg-shadow-soft);
    display: none;
    flex-direction: column;
    gap: .15rem;
    left: 17px;
    padding: .6rem;
    position: absolute;
    right: 17px;
    top: calc(100% + .4rem);
  }
  .hrg-nav.is-open { display: flex; }
  .hrg-nav a { width: 100%; }
  .hrg-hero-grid,
  .hrg-split { grid-template-columns: 1fr; }
  .hrg-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hrg-latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hrg-state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hrg-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hrg-header-inner { min-height: 58px; }
  .hrg-card-grid,
  .hrg-latest-grid,
  .hrg-trust-grid,
  .hrg-footer-grid { grid-template-columns: 1fr; }
  .hrg-state-tools { align-items: stretch; flex-direction: column; }
  .hrg-state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hrg-hero-note { position: static; margin-top: .75rem; max-width: none; }
  .hrg-hero-media { padding: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media print {
  .hrg-notice-bar,
  .hrg-site-header,
  .hrg-site-footer,
  .hrg-ad-slot,
  .hrg-hero-media,
  .hrg-menu-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  .hrg-card, .hrg-panel { box-shadow: none; border-color: #bbb; }
}


/* v1.3 production cleanup: tighter spacing, warmer brown palette, full-site footer, publish-ready pages */
h1 { font-size: clamp(1.85rem, 3vw, 2.85rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.95rem); }
h3 { font-size: clamp(1.08rem, 1.35vw, 1.24rem); }
.hrg-section { padding: clamp(1.45rem, 3vw, 2.45rem) 0; }
.hrg-hero { padding: clamp(1.35rem, 2.6vw, 2.2rem) 0; }
.hrg-hero h1 { max-width: 690px; }
.hrg-lede { margin-top: 0; }
.hrg-hero-media img { max-height: 300px; }
.hrg-card-grid, .hrg-latest-grid, .hrg-trust-grid { gap: .85rem; }
.hrg-card, .hrg-program-item, .hrg-post-card, .hrg-trust-card { border-radius: 12px; }
.hrg-card { padding: .9rem; }
.hrg-state-grid { gap: .5rem; }
.hrg-trust-band { background: #6b432b; }
.hrg-site-footer {
  background: #5f3d28;
  color: rgba(255,255,255,.86);
  padding: clamp(1.6rem, 3.2vw, 2.6rem) 0 1rem;
}
.hrg-footer-grid { gap: 1rem; }
.hrg-footer-disclaimer { margin-top: 1rem; padding-top: 1rem; }

/* GeneratePress inner-page cleanup */
.hrg-shield-active:not(.front-page) .site-footer,
.hrg-shield-active:not(.front-page) .footer-widgets {
  margin-top: 0;
}
.hrg-shield-active:not(.front-page) .site-content {
  padding-top: 0;
}
.hrg-shield-active .inside-article {
  border-radius: 0;
}

/* Legal / info pages */
.hrg-legal-page {
  background: var(--hrg-bg);
  color: var(--hrg-text);
}
.hrg-page-hero {
  background: linear-gradient(135deg, #fffaf2, #f1e3d2);
  border-bottom: 1px solid var(--hrg-border);
  padding: clamp(1.8rem, 4vw, 3.4rem) 0;
}
.hrg-page-hero h1 {
  margin: 0 0 .55rem;
  max-width: 820px;
}
.hrg-page-hero p {
  color: var(--hrg-muted);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  margin: 0;
  max-width: 760px;
}
.hrg-page-layout {
  align-items: start;
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1fr) 280px;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3.2vw, 2.5rem);
}
.hrg-prose {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius);
  box-shadow: var(--hrg-shadow-soft);
  max-width: 820px;
  padding: clamp(1.15rem, 2.8vw, 2rem);
}
.hrg-prose h2 {
  margin: 1.4rem 0 .55rem;
}
.hrg-prose h2:first-child,
.hrg-prose .hrg-last-updated + h2 {
  margin-top: 0;
}
.hrg-prose p,
.hrg-prose li {
  color: var(--hrg-text);
  font-size: 1.02rem;
  line-height: 1.72;
}
.hrg-prose a {
  color: var(--hrg-primary-2);
  font-weight: 800;
}
.hrg-last-updated {
  background: var(--hrg-bg-soft);
  border: 1px solid var(--hrg-border);
  border-radius: 999px;
  color: var(--hrg-muted);
  display: inline-flex;
  font-size: .88rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding: .35rem .7rem;
}
.hrg-toc {
  background: var(--hrg-surface);
  border: 1px solid var(--hrg-border);
  border-radius: var(--hrg-radius);
  box-shadow: var(--hrg-shadow-soft);
  padding: 1rem;
  position: sticky;
  top: 86px;
}
.hrg-toc h2 {
  font-size: 1.05rem;
  margin: 0 0 .75rem;
}
.hrg-toc a,
.hrg-toc p {
  border-top: 1px solid var(--hrg-border);
  color: var(--hrg-muted);
  display: block;
  font-size: .92rem;
  line-height: 1.5;
  margin: 0;
  padding: .55rem 0;
  text-decoration: none;
}
.hrg-toc a:hover {
  color: var(--hrg-primary-2);
  text-decoration: underline;
}
.hrg-side-note p:first-of-type { border-top: 0; }
.hrg-contact-content {
  border-top: 1px solid var(--hrg-border);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

@media (max-width: 980px) {
  .hrg-page-layout { grid-template-columns: 1fr; }
  .hrg-toc { position: static; }
  .hrg-hero-media img { max-height: 260px; }
}
@media (max-width: 640px) {
  .hrg-section { padding: 1.25rem 0; }
  .hrg-page-hero { padding: 1.4rem 0; }
  .hrg-page-layout { padding-top: 1rem; }
  .hrg-prose { padding: 1rem; }
  .hrg-hero-media img { max-height: 220px; }
}
