:root {
  --p-forest: #1B4332;
  --p-forest-d: #122E22;
  --p-forest-s: #EBF3EE;
  --p-slate: #1E293B;
  --p-stone: #F7F5F0;
  --p-stone-m: #ECE7DC;
  --p-ochre: #9A5B2C;
  --p-ochre-s: #FBF2EA;
  --p-white: #FFFFFF;
  --p-body: #334155;
  --p-muted: #5B6777;
  --p-line: #DCD7CC;
  --p-line-2: #C2BCB0;
  --p-serif: 'Bitter', Georgia, 'Times New Roman', serif;
  --p-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --p-r: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--p-sans); color: var(--p-body); background: var(--p-white);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--p-serif); color: var(--p-slate); font-weight: 700; letter-spacing: -0.02em; line-height: 1.14; margin: 0 0 0.75rem; }
h3, h4 { font-family: var(--p-sans); color: var(--p-slate); font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin: 0 0 0.45rem; }
h1 { font-size: clamp(2rem, 3.8vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.08rem); }
h3 { font-size: 1.04rem; }
p { margin: 0 0 1rem; }
a { color: var(--p-forest); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
.p-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.p-narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.p-num { font-variant-numeric: tabular-nums; }

/* Header */
.p-topbar { background: var(--p-forest); color: #E2EFE8; font-size: 0.8rem; font-weight: 600; padding: 7px 0; }
.p-topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-hdr { position: sticky; top: 0; z-index: 40; background: var(--p-white); border-bottom: 1px solid var(--p-line); }
.p-hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; }
.p-logo { font-family: var(--p-serif); font-weight: 700; font-size: 1.38rem; color: var(--p-slate); letter-spacing: -0.025em; white-space: nowrap; }
.p-logo:hover { text-decoration: none; }
.p-logo span { color: var(--p-forest); }
.p-nav { display: flex; align-items: center; gap: 20px; }
.p-nav a { color: var(--p-body); font-size: 0.9rem; font-weight: 600; }
.p-nav a:hover, .p-nav a[aria-current="page"] { color: var(--p-forest); text-decoration: none; }
.p-hact { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.p-menu { display: none; background: var(--p-stone); border: 1.5px solid var(--p-line-2); border-radius: var(--p-r); padding: 7px 11px; font-weight: 700; font-size: 0.84rem; color: var(--p-slate); cursor: pointer; }

/* Buttons */
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--p-r);
  font-family: var(--p-sans); font-weight: 700; font-size: 0.93rem;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.15;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.p-btn:hover { text-decoration: none; }
.p-btn-f { background: var(--p-forest); color: #fff; }
.p-btn-f:hover { background: var(--p-forest-d); color: #fff; }
.p-btn-o { background: var(--p-white); color: var(--p-slate); border-color: var(--p-slate); }
.p-btn-o:hover { background: var(--p-stone); color: var(--p-slate); }
.p-btn-sm { min-height: 38px; padding: 0 15px; font-size: 0.84rem; }

/* Split Form-First Hero on Warm Limestone */
.p-hero { background: var(--p-stone); border-bottom: 1px solid var(--p-line); padding: clamp(28px, 4.5vw, 54px) 0 clamp(32px, 5vw, 58px); }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.p-kicker { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--p-forest); background: var(--p-forest-s); border: 1px solid #C5DDD0; padding: 4px 10px; border-radius: 4px; margin-bottom: 14px; }
.p-lead { font-size: clamp(1.01rem, 1.25vw, 1.13rem); color: var(--p-body); max-width: 56ch; margin: 0 0 20px; }
.p-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.p-trust { font-size: 0.9rem; font-weight: 700; color: var(--p-slate); margin: 0 0 24px; }

/* 4 Architectural Metric Blocks */
.p-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.p-metrics li { background: var(--p-white); border: 1px solid var(--p-line); border-top: 3px solid var(--p-forest); border-radius: var(--p-r); padding: 13px 15px; }
.p-metrics strong { display: block; font-family: var(--p-serif); font-size: clamp(1.18rem, 1.6vw, 1.4rem); font-weight: 700; color: var(--p-slate); line-height: 1.15; }
.p-metrics span { display: block; font-size: 0.81rem; color: var(--p-muted); margin-top: 4px; line-height: 1.35; }

/* Compact Page Header for Guides & Counties */
.p-subhero { background: var(--p-stone); border-bottom: 1px solid var(--p-line); padding: clamp(28px, 4vw, 48px) 0; }
.p-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.84rem; color: var(--p-muted); margin-bottom: 12px; }
.p-crumbs a { color: var(--p-muted); }

/* Embedded Interactive Porch Cost & Class 7 Form Card */
.p-calc { background: var(--p-white); border: 1.5px solid var(--p-slate); border-radius: 8px; padding: clamp(18px, 2.5vw, 26px); box-shadow: 0 14px 36px rgba(30, 41, 59, 0.08); }
.p-calc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.p-calc-title { font-family: var(--p-serif); font-size: 1.14rem; font-weight: 700; color: var(--p-slate); }
.p-step-tag { font-size: 0.78rem; font-weight: 700; color: var(--p-forest); background: var(--p-forest-s); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.p-prog { height: 6px; background: var(--p-stone-m); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.p-prog i { display: block; height: 100%; background: var(--p-forest); transition: width .22s ease; }
.p-step { display: none; }
.p-step.on { display: block; }
.p-step h3 { font-family: var(--p-serif); font-size: 1.18rem; margin: 0 0 4px; }
.p-help { font-size: 0.86rem; color: var(--p-muted); margin: 0 0 13px; }
.p-pic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.p-pic-btn {
  text-align: left; padding: 0; border: 1.5px solid var(--p-line-2); border-radius: var(--p-r);
  background: var(--p-white); overflow: hidden; cursor: pointer; font-family: var(--p-sans);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.p-pic-btn:hover, .p-pic-btn.picked { border-color: var(--p-forest); box-shadow: inset 0 0 0 1px var(--p-forest); }
.p-pic-btn img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--p-line); }
.p-pic-cap { display: block; padding: 8px 10px; font-weight: 700; font-size: 0.85rem; color: var(--p-slate); line-height: 1.25; }
.p-pic-cap small { display: block; font-weight: 500; font-size: 0.76rem; color: var(--p-forest); margin-top: 2px; }
.p-opt-col { display: grid; gap: 8px; }
.p-opt {
  width: 100%; text-align: left; padding: 11px 13px; border: 1.5px solid var(--p-line-2);
  border-radius: var(--p-r); background: var(--p-white); cursor: pointer; font-family: var(--p-sans);
  font-size: 0.91rem; font-weight: 700; color: var(--p-slate);
}
.p-opt:hover, .p-opt.picked { border-color: var(--p-forest); background: var(--p-forest-s); }
.p-opt small { display: block; font-weight: 400; font-size: 0.79rem; color: var(--p-muted); margin-top: 2px; }
.p-res-card { background: var(--p-stone); border: 1px solid var(--p-line); border-left: 4px solid var(--p-forest); border-radius: 0 var(--p-r) var(--p-r) 0; padding: 13px 15px; margin-bottom: 14px; }
.p-res-lbl { font-size: 0.77rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--p-forest); }
.p-res-price { font-family: var(--p-serif); font-size: 1.46rem; font-weight: 700; color: var(--p-slate); line-height: 1.2; margin: 2px 0 4px; }
.p-res-spec { font-size: 0.82rem; color: var(--p-body); margin: 0 0 8px; }
.p-verdict { font-size: 0.82rem; font-weight: 600; padding: 8px 10px; border-radius: 5px; line-height: 1.4; }
.p-verdict.ok { background: #E3F3EA; color: #134E2E; border: 1px solid #B7DEC8; }
.p-verdict.warn { background: var(--p-ochre-s); color: #783F14; border: 1px solid #E5C1A2; }
.p-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p-field { margin-bottom: 9px; }
.p-field label { display: block; font-size: 0.81rem; font-weight: 700; color: var(--p-slate); margin-bottom: 4px; }
.p-field input, .p-field select, .p-field textarea {
  width: 100%; min-height: 43px; padding: 9px 11px; border: 1.5px solid var(--p-line-2);
  border-radius: 5px; font-family: var(--p-sans); font-size: 0.96rem; color: var(--p-slate); background: var(--p-white);
}
.p-field input:focus, .p-field select:focus, .p-field textarea:focus { outline: none; border-color: var(--p-forest); }
.p-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.p-consent { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border: 1px solid var(--p-line); border-radius: 5px; background: var(--p-stone); font-size: 0.8rem; color: var(--p-body); margin: 6px 0 11px; line-height: 1.42; }
.p-consent input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--p-forest); flex: none; }
.p-fnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.p-back { background: transparent; border: 0; color: var(--p-muted); font-family: var(--p-sans); font-size: 0.88rem; font-weight: 700; cursor: pointer; padding: 6px 2px; }
.p-err { color: #B42318; font-size: 0.85rem; font-weight: 700; min-height: 1.1em; margin: 6px 0 0; }

/* Sections */
.p-sec { padding: clamp(44px, 6vw, 68px) 0; background: var(--p-white); }
.p-sec.stone { background: var(--p-stone); }
.p-sec + .p-sec { border-top: 1px solid var(--p-line); }
.p-sh { max-width: 720px; margin-bottom: 26px; }
.p-sh p { color: var(--p-muted); margin: 0; font-size: 0.99rem; }

/* Showcase Cards */
.p-cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.p-cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.p-cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.p-pcard { border: 1px solid var(--p-line); border-radius: var(--p-r); overflow: hidden; background: var(--p-white); display: flex; flex-direction: column; }
.p-pcard-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--p-stone); border-bottom: 1px solid var(--p-line); }
.p-pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.p-pcard:hover .p-pcard-img img { transform: scale(1.03); }
.p-pcard-in { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.p-pcard-price { font-family: var(--p-serif); font-weight: 700; color: var(--p-forest); font-size: 1rem; margin: 2px 0 8px; }
.p-pcard-in p { font-size: 0.86rem; color: var(--p-muted); margin: 0 0 12px; flex: 1; }
.p-card { border: 1px solid var(--p-line); border-radius: var(--p-r); padding: 20px; background: var(--p-white); }
.p-card p:last-child { margin-bottom: 0; }
.p-card.accent { border-color: var(--p-forest); border-top: 3px solid var(--p-forest); }

/* Architectural Diagram Box */
.p-diag-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 28px; align-items: center; }
.p-diag-box { background: var(--p-white); border: 1px solid var(--p-line); border-radius: var(--p-r); padding: 18px; }
.p-diag-cap { font-size: 0.81rem; color: var(--p-muted); margin-top: 10px; font-weight: 600; }

/* Standalone Interactive Class 7 Checker */
.p-c7-box { background: var(--p-white); border: 1.5px solid var(--p-forest); border-radius: 8px; padding: clamp(20px, 3vw, 28px); }
.p-c7-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.p-range-val { font-weight: 700; color: var(--p-forest); float: right; }
.p-c7-box input[type="range"] { width: 100%; accent-color: var(--p-forest); margin-top: 6px; }

/* Tables */
.p-tbl { overflow-x: auto; border: 1px solid var(--p-line); border-radius: var(--p-r); background: var(--p-white); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--p-line); vertical-align: top; }
th { background: var(--p-stone); font-weight: 700; color: var(--p-slate); font-size: 0.84rem; }
tr:last-child td { border-bottom: 0; }

/* Quote Band */
.p-band { background: var(--p-slate); color: #E2E8F0; border-radius: 8px; padding: clamp(24px, 4vw, 38px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.p-band h2 { color: #FFFFFF; margin-bottom: 6px; }
.p-band p { color: #CBD5E1; margin: 0; max-width: 58ch; }

/* County Directory Chips */
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.p-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--p-line-2); border-radius: 5px; background: var(--p-white); color: var(--p-slate); font-weight: 600; font-size: 0.87rem; }
.p-chips a:hover { border-color: var(--p-forest); background: var(--p-forest-s); color: var(--p-forest); text-decoration: none; }
.p-chips small { font-size: 0.74rem; color: var(--p-muted); font-weight: 600; }

/* Prose & Note Box */
.p-note { border-left: 4px solid var(--p-ochre); background: var(--p-ochre-s); padding: 15px 18px; border-radius: 0 var(--p-r) var(--p-r) 0; margin: 20px 0; color: var(--p-slate); }
.p-prose h2 { margin-top: 2rem; }
.p-prose ul { padding-left: 20px; margin: 0 0 1.15rem; }
.p-prose li { margin-bottom: 0.45rem; }

/* FAQ */
.p-faqs { max-width: 860px; border-top: 1px solid var(--p-line); }
details.p-faq { border-bottom: 1px solid var(--p-line); padding: 15px 0; }
details.p-faq summary { font-family: var(--p-serif); font-weight: 700; font-size: 1.03rem; color: var(--p-slate); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
details.p-faq summary::-webkit-details-marker { display: none; }
details.p-faq summary::after { content: '+'; font-family: var(--p-sans); font-size: 1.25rem; color: var(--p-forest); flex: none; }
details.p-faq[open] summary::after { content: '-'; }
details.p-faq p { margin: 10px 0 0; font-size: 0.95rem; }

/* Thanks Photo Uploader */
.p-more { max-width: 680px; border: 1.5px solid var(--p-line-2); border-radius: 8px; padding: clamp(20px, 3vw, 28px); background: var(--p-white); }
.p-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px 16px; border: 2px dashed var(--p-line-2); border-radius: var(--p-r); background: var(--p-stone); cursor: pointer; text-align: center; }
.p-drop:hover { border-color: var(--p-forest); }
.p-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.p-th { position: relative; aspect-ratio: 4 / 3; border-radius: 5px; overflow: hidden; border: 1px solid var(--p-line); }
.p-th img { width: 100%; height: 100%; object-fit: cover; }
.p-th button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, 0.8); color: #fff; font-weight: 700; cursor: pointer; }

/* Footer */
.p-foot { background: var(--p-slate); color: #CBD5E1; padding: 48px 0 28px; font-size: 0.89rem; }
.p-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 32px; }
.p-foot h4 { color: #FFFFFF; font-size: 0.9rem; margin: 0 0 10px; }
.p-foot a { display: block; color: #CBD5E1; margin-bottom: 7px; }
.p-foot a:hover { color: #FFFFFF; }
.p-foot-logo { font-family: var(--p-serif); font-weight: 700; font-size: 1.35rem; color: #FFFFFF; display: inline-block; margin-bottom: 10px; }
.p-foot-logo span { color: #86EFAC; }
.p-foot-btm { border-top: 1px solid #334155; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: #94A3B8; }
.p-foot-btm a { display: inline; color: #CBD5E1; }

@media (max-width: 960px) {
  .p-hero-grid, .p-diag-grid, .p-foot-grid { grid-template-columns: 1fr; }
  .p-cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-cards-3 { grid-template-columns: 1fr; }
  .p-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--p-white); border-bottom: 1px solid var(--p-line); flex-direction: column; align-items: stretch; padding: 14px 20px; gap: 10px; }
  .p-nav.open { display: flex; }
  .p-menu { display: inline-flex; }
}
@media (max-width: 620px) {
  .p-cards-4, .p-cards-2, .p-fgrid, .p-c7-grid { grid-template-columns: 1fr; }
  .p-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-pic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
