/* Semantic heading + centroid layout — cache key v=20260821s */
html { color-scheme: light; }
html.theme-dark,
html[data-theme="dark"],
body.dark { color-scheme: dark; }
/* Native heading tags keep their own type scale even when a mismatched
   .h3/.h4/.h5 utility class is still on the element. */

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: #14532d;
  color: #fff;
  border-radius: 0.4rem;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero-first,
main > section:first-of-type {
  padding-top: 0.75rem !important;
  padding-bottom: 0.35rem !important;
}

.hero-first h1,
main > section:first-of-type h1 {
  margin-bottom: 0.75rem !important;
}

@media (max-width: 767px) {
  main#main {
    padding-top: 5.75rem !important;
  }
  .hero-first,
  main > section:first-of-type {
    padding-top: 0.75rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .hero-first h1,
  main > section:first-of-type h1 {
    font-size: 1.12rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.45rem !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    text-wrap: balance;
  }
}

#calculator {
  padding-top: 0.25rem !important;
  padding-bottom: 2rem !important;
}

#calculator > .container {
  display: flex;
  flex-direction: column;
}

#fence-calculator-form {
  order: -1;
  margin-top: 0.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 767px) {
  .hero-cta-row {
    display: none !important;
  }
  #fence-calculator-form > div {
    padding-top: 0.75rem !important;
    padding-bottom: 1rem !important;
  }
  #fence-calculator-form h2 {
    font-size: 1.15rem !important;
    margin-bottom: 0.5rem !important;
  }
}

#main,
#calculator,
#fence-calculator-form,
#fence-kit,
#skip-hire-calculator,
#gate-cost-calculator,
#fence-design-calculator,
#faq,
#contact,
#features,
#fence-types-section {
  scroll-margin-top: 6rem;
}

form.card.card-surface {
  display: block;
}

main h1 {
  font-size: var(--heading-h1-size) !important;
  line-height: var(--heading-h1-line-height) !important;
  letter-spacing: var(--heading-h1-letter-spacing) !important;
  font-weight: var(--heading-h1-weight) !important;
}

main h2 {
  font-size: var(--heading-h2-size) !important;
  line-height: var(--heading-h2-line-height) !important;
  letter-spacing: var(--heading-h2-letter-spacing) !important;
  font-weight: var(--heading-h2-weight) !important;
  text-align: left;
  margin-bottom: 2rem !important;
}

main h3 {
  font-size: var(--heading-h3-size) !important;
  line-height: var(--heading-h3-line-height) !important;
  letter-spacing: var(--heading-h3-letter-spacing) !important;
  font-weight: var(--heading-h3-weight) !important;
  margin-bottom: 1rem !important;
}

main h4 {
  font-size: var(--heading-h4-size) !important;
  line-height: var(--heading-h4-line-height) !important;
  letter-spacing: var(--heading-h4-letter-spacing) !important;
  font-weight: var(--heading-h4-weight) !important;
  margin-bottom: 0.75rem !important;
}

main h5 {
  font-size: var(--heading-h5-size) !important;
  line-height: var(--heading-h5-line-height) !important;
  letter-spacing: var(--heading-h5-letter-spacing) !important;
  font-weight: var(--heading-h5-weight) !important;
}

@media (min-width: 768px) {
  main h2 {
    text-align: center;
  }
}

#fence-calculator-form h2,
#skip-hire-calculator h2,
#gate-cost-calculator h2,
#fence-design-calculator h2 {
  text-align: left;
}

@media (min-width: 768px) {
  #fence-calculator-form h2,
  #skip-hire-calculator h2,
  #gate-cost-calculator h2,
  #fence-design-calculator h2 {
    text-align: center;
  }
}

form.card output {
  display: inline-block;
}

table > caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: #166534;
  padding: 0.5rem 0.75rem 0.75rem;
}

fieldset.mb-6 {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
}

fieldset.mb-6 > legend.input-label {
  padding: 0;
  margin-bottom: 0.5rem;
}

section:target,
form:target {
  outline: 2px solid #166534;
  outline-offset: 8px;
}

.hero-kit-link {
  text-align: center;
  margin: 0.25rem 0 0.75rem;
  font-size: 0.95rem;
}
.hero-kit-link a { color: #166534; font-weight: 600; }

#fence-kit {
  order: -1;
  background: #f0fdf4;
  padding: 2.5rem 1.25rem 4rem;
}
#calculator #fence-kit {
  padding: 1.75rem 0 2.75rem;
  background: transparent;
  margin: 0 0 1.25rem;
}
#fence-kit .fence-kit-wrap { max-width: 56rem; margin: 0 auto; }
#fence-kit .fence-kit-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #166534;
  margin: 0 0 0.4rem;
  text-align: left;
}
#fence-kit h2 {
  color: #166534 !important;
  text-align: left !important;
  margin: 0 0 0.6rem !important;
  font-size: 1.875rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
  font-weight: 700 !important;
}
#fence-kit h3 {
  color: #146b3a !important;
  text-align: left !important;
  margin: 0 0 0.5rem !important;
  font-size: 1.5rem !important;
  line-height: 1.25 !important;
  letter-spacing: -0.025em !important;
  font-weight: 600 !important;
}
#fence-kit h4 {
  color: #146b3a !important;
  text-align: left !important;
  margin: 0.25rem 0 0.35rem !important;
  font-size: 1.125rem !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  font-weight: 600 !important;
}
@media (min-width: 768px) {
  #fence-kit h2 { font-size: 2.25rem !important; }
  #fence-kit h3 { font-size: 1.75rem !important; }
}
#fence-kit .fence-kit-lede,
#fence-kit .fence-kit-stage {
  color: #1f2937;
  margin: 0 0 0.9rem;
  max-width: 42rem;
  text-align: left;
}
#fence-kit .fence-kit-group { margin: 2.25rem 0 0.5rem; }
#fence-kit .fence-kit-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
#fence-kit article {
  background: #f3fbf6;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#fence-kit article:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
#fence-kit figure {
  margin: 0;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
#fence-kit figure img {
  max-width: 100%;
  max-height: 170px;
  object-fit: contain;
}
#fence-kit .fence-kit-badge {
  align-self: flex-start;
  background: #fff;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0;
}
#fence-kit article p { margin: 0; color: #1f2937; }
#fence-kit article ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #57534e;
}
#fence-kit article > a {
  display: block;
  background: #146b3a;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  margin-top: auto;
}
#fence-kit article > a:hover { background: #115c32; color: #fff; }
#fence-kit .fence-kit-info {
  background: #f0fdf4;
  border-left: 4px solid #86efac;
  padding: 0.65rem 0.9rem;
  margin: 1.5rem 0 0.5rem;
  font-size: 0.95rem;
}
#fence-kit .fence-kit-note {
  font-size: 0.75rem;
  color: #57534e;
  margin-top: 0.75rem;
}

/* Dark mode: kit prose was hardcoded charcoal on a transparent (black) section. */
body.dark #fence-kit h2,
body.dark #fence-kit h3,
body.dark #fence-kit h4 {
  color: #86efac !important;
}
body.dark #fence-kit p,
body.dark #fence-kit .fence-kit-stage,
body.dark #fence-kit .fence-kit-lede,
body.dark #fence-kit article p,
body.dark #fence-kit .fence-kit-info {
  color: #e7e5e4 !important;
}
body.dark #fence-kit article ul,
body.dark #fence-kit .fence-kit-note {
  color: #a8a29e !important;
}
body.dark #fence-kit article {
  background: #1c1917;
  border-color: #44403c;
}
body.dark #fence-kit figure {
  background: #292524;
  border-color: #44403c;
}
body.dark #fence-kit .fence-kit-badge {
  background: #1c1917;
  color: #86efac;
  border-color: #166534;
}
body.dark #fence-kit article > a {
  background: #16a34a !important;
  color: #052e16 !important;
}
body.dark #fence-kit article > a:hover {
  background: #22c55e !important;
  color: #052e16 !important;
}
body.dark #fence-kit .fence-kit-info {
  background: #1c1917;
  border-left-color: #22c55e;
}
