:root {
  --bg: #f3efe6;
  --bg-2: #eae3d4;
  --ink: #1b1814;
  --muted: #5a5448;
  --accent: #b24510;
  --accent-ink: #fffaf4;
  --deep: #1e3a2f;
  --line: #d6cebe;
  --card: #fffcf7;
  --shadow: 0 10px 30px rgba(27, 24, 20, 0.06);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.logo {
  font-family: var(--serif); font-weight: 600; font-size: 1.35rem;
  letter-spacing: -0.03em; text-decoration: none;
}
.logo span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 20px; }
nav a { text-decoration: none; font-size: 0.95rem; color: var(--muted); }
nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 999px; padding: 0.7rem 1.15rem;
  background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost, .btn.secondary {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn.small { padding: 0.45rem 0.85rem; font-size: 0.9rem; }
.hero { padding: 4.2rem 0 3rem; }
.kicker {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem;
  font-weight: 600; color: var(--accent); margin: 0 0 1rem;
}
h1, h2, h3, h4 { font-family: var(--serif); letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); margin: 0 0 1rem; font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 0 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 40rem; margin: 0 0 1.6rem; }
.hero-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.search-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 1.2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 18px; max-width: 34rem; box-shadow: var(--shadow);
}
.search-bar input {
  flex: 1; border: 0; background: transparent; font: inherit; min-width: 160px;
  padding: 0.55rem 0; color: var(--ink);
}
.search-bar input:focus { outline: none; }
.stats, .chips-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--card); margin: 2rem 0 0;
}
.stat, .chip-stat { padding: 1.1rem 1.2rem; }
.stat + .stat, .chip-stat + .chip-stat { border-left: 1px solid var(--line); }
.stat b, .chip-stat b { display: block; font-family: var(--serif); font-size: 1.6rem; }
.stat span, .chip-stat span { color: var(--muted); font-size: 0.9rem; }
.section { padding: 3.2rem 0; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 40rem; margin-bottom: 1.6rem; }
.city-grid, .card-grid, .type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.city-card, .company, .step, .faq, .service, .guide-card, .info-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.city-card, .guide-card, .type-card {
  padding: 1.2rem 1.25rem 1.3rem; text-decoration: none;
  display: flex; flex-direction: column; min-height: 140px;
}
.city-card:hover, .guide-card:hover, .type-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}
.city-card em, .type-card em { margin-top: auto; font-style: normal; color: var(--muted); font-size: 0.92rem; }
.steps, .services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step, .service, .faq, .info-card { padding: 1.25rem 1.3rem; }
.step .num { font-family: var(--serif); color: var(--accent); font-size: 1.4rem; margin-bottom: 0.4rem; }
.company-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.company { padding: 1.35rem 1.4rem 1.45rem; }
.company-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.company h2, .company h3 { font-size: 1.35rem; margin: 0 0 0.3rem; }
.meta { color: var(--muted); margin: 0 0 0.85rem; font-size: 0.95rem; }
.rating {
  background: #efe4c8; color: #5a3b00; border-radius: 999px;
  padding: 0.2rem 0.65rem; font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.7rem 0 1rem; }
.tag, .filter-btn {
  background: var(--bg-2); border-radius: 999px; padding: 0.18rem 0.6rem;
  font-size: 0.8rem; border: 1px solid transparent;
}
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.2rem; }
.filter-btn { cursor: pointer; font: inherit; color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); }
.company-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice {
  border: 1px solid #e2c27a; background: #fff4d6; color: #5a4308;
  padding: 1rem 1.1rem; border-radius: 12px; margin-bottom: 1.4rem;
}
.slot, .ad-slot, .featured-slot, .product-slot {
  border: 1px dashed var(--line); border-radius: 16px;
  padding: 1.1rem 1.2rem; background: color-mix(in srgb, var(--bg-2) 60%, white);
  color: var(--muted); margin: 1rem 0;
}
.slot-label, .ad-slot strong, .featured-slot strong {
  display: block; font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem;
}
.layout-split { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 22px; align-items: start; }
.sticky-card { position: sticky; top: 92px; }
form, .quote-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.3rem; display: grid; gap: 12px;
}
form.grid-2 { grid-template-columns: 1fr 1fr; }
form .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; font-weight: 600; }
input, select, textarea {
  font: inherit; font-weight: 400; padding: 0.7rem 0.8rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.form-note { color: var(--muted); font-size: 0.9rem; margin: 0; }
#form-status, .step-panel { display: none; }
#form-status.show, .step-panel.active { display: block; }
.quiz-progress { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.8rem; }
.crumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.1rem; }
.crumb a { color: var(--ink); text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 22px; }
.hours, .nearby { margin-top: 1.2rem; }
.nearby a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
footer { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
footer a { color: var(--ink); text-decoration: none; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: 0 0 0.4rem; }
.footer-bottom { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  nav .hide-sm { display: none; }
  .stats, .steps, .services, form.grid-2, .company-list, .layout-split, .detail-grid, .footer-grid, .chips-row {
    grid-template-columns: 1fr;
  }
  .stat + .stat, .chip-stat + .chip-stat { border-left: 0; border-top: 1px solid var(--line); }
  .hero { padding-top: 2.4rem; }
  .sticky-card { position: static; }
}
.company.is-hidden { display: none; }

/* city content, fence-type pages, source links */
.cc-block { margin: 1.6rem 0; }
.cc-list { padding-left: 1.2rem; display: grid; gap: 0.55rem; }
.cc-list ul { padding-left: 1.1rem; margin: 0.3rem 0; }
.sources { font-size: 0.85rem; color: var(--muted); margin: 0.35rem 0 0; }
.sources a, a.cite { font-size: 0.85rem; }
.type-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem 1.6rem; }
.type-group h3 { margin-bottom: 0.4rem; }

/* markdown guides */
.guide-body { max-width: 780px; }
.guide-body h2 { margin-top: 2rem; }
.guide-body h3 { margin-top: 1.4rem; }
.guide-body ul, .guide-body ol { padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.guide-body blockquote { margin: 1rem 0; padding: 0.6rem 1rem; border-left: 4px solid var(--accent); background: var(--card); }
.guide-body code { font-size: 0.9em; background: var(--card); padding: 0 0.25em; }
.guide-body ol li { overflow-wrap: anywhere; }
.guide-line { margin: 1rem 0; }
/* verified badge, advertise page */
.badge-verified {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #dff0e3; color: #14532d; border: 1px solid #a7d7b5; border-radius: 999px;
  padding: 0.15rem 0.6rem; font-size: 0.78rem; font-weight: 600; margin-right: 6px;
}
.badge-verified::before { content: "\2713"; font-weight: 700; }
.company .company-top { flex-wrap: wrap; justify-content: flex-start; }
.company .company-top > :first-child { flex: 1 1 100%; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.advertise-wrap { max-width: 820px; margin-inline: auto; }
.adv-section { margin: 2.2rem 0; }
.price-placeholder { display: inline-block; font-family: ui-monospace, monospace; background: var(--bg-2); border: 1px dashed var(--line); border-radius: 8px; padding: 0.3rem 0.6rem; }
#adv-status { display: none; }
#adv-status.show { display: block; }
#adv-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#adv-form .full { grid-column: 1 / -1; }
#adv-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
#adv-form input, #adv-form select, #adv-form textarea { font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
#adv-form textarea { min-height: 110px; }
@media (max-width: 720px) { #adv-form { grid-template-columns: 1fr; } }

/* Web3Forms lead forms */
[hidden] { display: none !important; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 0.8rem; }
.lead-form .full { grid-column: 1 / -1; }
.lead-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.lead-form input, .lead-form select, .lead-form textarea { font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.lead-form textarea { min-height: 110px; }
.lead-form input[readonly] { background: var(--bg-2); }
.form-error { margin-top: 0.8rem; border-color: #e5a3a3; background: #fdf0f0; color: #7f1d1d; }
.phone-note { font-weight: 400; opacity: 0.85; }
@media (max-width: 720px) { .lead-form { grid-template-columns: 1fr; } }
