/* Raleigh Expert Fence: TOWN pages and the Service Areas front door (design-lead, 2026-11-25). Linked only by
   build-town.js and build-areas.js pages; every rule is scoped to body.pt-town or body.pt-areas. Base: page-designs/
   location.css (the starting design's town look, recolored), reworked to today's rules.
   The local-guide look: a white top with the town's name on a lime highlighter stroke, the town photo as a wide postcard
   with its caption, the facts as one ruled strip; one centered reading column for the story; alternating photo rows on
   lavender; the town's rules beside the form on the eggplant band; link grids; pin links for the nearby towns. */

/* hero: the postcard */
:is(body.pt-town,body.pt-areas) .ssc.sx.dp.tw-hero{background:#fff;padding:52px 0 44px}
:is(body.pt-town,body.pt-areas) .tw-name{color:var(--p);background:linear-gradient(transparent 70%,rgba(181,218,76,.7) 70%,rgba(181,218,76,.7) 92%,transparent 92%);padding:0 .06em}
:is(body.pt-town,body.pt-areas) main .ssc.sx.dp.tw-hero .lead{margin:0 0 30px}
body.pt-town .tw-postcard{position:relative;margin:0;border-radius:16px;overflow:hidden;box-shadow:0 18px 44px rgba(33,22,42,.16)}
body.pt-town .tw-postcard img{display:block;width:100%;height:auto;aspect-ratio:21/9;object-fit:cover}
body.pt-town .tw-postcard figcaption{position:absolute;left:0;bottom:0;display:flex;gap:8px;align-items:center;max-width:80%;background:rgba(48,27,55,.88);color:#fff;font:600 15px/1.35 var(--bf);padding:10px 18px 10px 14px;border-top-right-radius:12px}
body.pt-town .tw-postcard figcaption .ic{width:18px;height:18px;color:var(--a);flex:none}
@media(max-width:767px){
  body.pt-town .tw-postcard img{aspect-ratio:4/3}
  body.pt-town .tw-postcard figcaption{position:static;max-width:none;border-radius:0}
}
body.pt-town .tw-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:28px 0 0;border-top:3px solid var(--p);border-bottom:1px solid var(--line)}
body.pt-town .tw-facts.n1{grid-template-columns:minmax(0,1fr)}
body.pt-town .tw-facts.n2{grid-template-columns:repeat(2,minmax(0,1fr))}
body.pt-town .tw-facts.n3{grid-template-columns:repeat(3,minmax(0,1fr))}
body.pt-town .tw-facts.n5{grid-template-columns:repeat(5,minmax(0,1fr))}
body.pt-town .tw-facts>div{padding:16px 18px;border-left:1px solid var(--line)}
body.pt-town .tw-facts>div:first-child{border-left:0;padding-left:0}
body.pt-town .tw-facts dt{font:700 13px/1.2 var(--bf);text-transform:uppercase;letter-spacing:.06em;color:var(--mute);margin:0 0 6px}
body.pt-town main .ssc.sx.dp .tw-facts dd{margin:0;font:700 17px/1.4 var(--hf);color:var(--ink)}
@media(max-width:900px){
  body.pt-town .tw-facts,body.pt-town .tw-facts.n3,body.pt-town .tw-facts.n5{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.pt-town .tw-facts>div:nth-child(odd){border-left:0;padding-left:0}
  body.pt-town .tw-facts>div:nth-child(n+3){border-top:1px solid var(--line)}
}
@media(max-width:480px){body.pt-town .tw-facts,body.pt-town .tw-facts[class*="n"]{grid-template-columns:minmax(0,1fr)}body.pt-town .tw-facts>div{border-left:0;padding-left:0}body.pt-town .tw-facts>div+div{border-top:1px solid var(--line)}}

/* story: one centered reading column, the photo breaking wider */
body.pt-town .ssc.sx.dp.tw-story{background:#fff;padding:56px 0 84px}
body.pt-town .tw-col{max-width:760px;margin:0 auto}
@media(min-width:1100px){body.pt-town .tw-col .rf-fig{margin:34px -110px}}
body.pt-town .tw-col .rf-fig img{aspect-ratio:3/2}

/* houses: alternating photo and text rows on lavender */
:is(body.pt-town,body.pt-areas) .tw-head{margin:0 0 36px}
:is(body.pt-town,body.pt-areas) .tw-head h2:before{content:"";display:block;width:40px;height:40px;margin:0 0 14px;background:var(--a);clip-path:polygon(50% 0,100% 26%,100% 100%,0 100%,0 26%)}
body.pt-town .ssc.sx.dp.tw-houses{background:var(--soft);padding:84px 0}
body.pt-town .tw-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:56px;align-items:center;margin:0 0 52px}
body.pt-town .tw-row:last-child{margin-bottom:0}
body.pt-town .tw-row.flip figure{order:2}
body.pt-town .tw-row figure{margin:0}
body.pt-town .tw-row figure img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:14px}
body.pt-town main .ssc.sx.dp .tw-row-text h3{font-size:1.4rem;margin:0 0 10px}
body.pt-town .tw-row-text p:last-child{margin-bottom:0}
@media(max-width:900px){body.pt-town .tw-row{grid-template-columns:minmax(0,1fr);gap:24px}body.pt-town .tw-row.flip figure{order:0}}
@media(max-width:767px){body.pt-town .ssc.sx.dp.tw-houses{padding:60px 0}}

/* the town's rules beside the form, on the eggplant band; lime edge where the band meets what follows */
:is(body.pt-town,body.pt-areas) .ssc.sx.dp.tw-permits{padding:88px 0;color:#e2d9e5;border-bottom:2px solid var(--a);
  background:radial-gradient(60% 120% at 0% 0%,rgba(var(--glow-btn),.42) 0%,rgba(var(--glow-btn),.12) 50%,rgba(var(--glow-btn),0) 80%),
  radial-gradient(60% 120% at 100% 100%,var(--lift) 0%,rgba(var(--lift-rgb),.3) 55%,rgba(var(--lift-rgb),0) 85%),var(--p)}
:is(body.pt-town,body.pt-areas) main .ssc.sx.dp.tw-permits :is(h2,h3,.rf-form h3.fh){color:#fff}
:is(body.pt-town,body.pt-areas) main .ssc.sx.dp.tw-permits :is(p,li){color:#e2d9e5}
:is(body.pt-town,body.pt-areas) .tw-permits .rf-copy a{color:#fff}
:is(body.pt-town,body.pt-areas) .tw-permits .rf-copy strong{color:#fff}
:is(body.pt-town,body.pt-areas) .tw-permits .rf-box{background:rgba(255,255,255,.08)}
:is(body.pt-town,body.pt-areas) .tw-permits .ssc.sx .rf-checks li,:is(body.pt-town,body.pt-areas) .tw-permits .rf-checks li{color:#fff}
:is(body.pt-town,body.pt-areas) .tw-permits .rf-checks .ic{background:var(--a);color:var(--oa)}
:is(body.pt-town,body.pt-areas) .tw-permits-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,512px);gap:64px;align-items:start}
:is(body.pt-town,body.pt-areas) .tw-permits-grid.stack{grid-template-columns:minmax(0,1fr);max-width:820px;gap:36px}
:is(body.pt-town,body.pt-areas) .tw-permits-grid.stack .rf-form{max-width:512px}
@media(max-width:1199px){:is(body.pt-town,body.pt-areas) .tw-permits-grid{gap:48px}}
@media(max-width:1023px){:is(body.pt-town,body.pt-areas) .tw-permits-grid{grid-template-columns:minmax(0,1fr);gap:36px}:is(body.pt-town,body.pt-areas) .tw-permits-grid .rf-form{max-width:560px}}
@media(max-width:767px){:is(body.pt-town,body.pt-areas) .ssc.sx.dp.tw-permits{padding:60px 0}}

/* services: the nine as a plain link grid */
body.pt-town .ssc.sx.dp.tw-services{background:#fff;padding:84px 0}
body.pt-town .tw-services-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr);gap:56px;align-items:start}
body.pt-town .ssc.sx .tw-svc-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px;list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
body.pt-town .ssc.sx .tw-svc-links a{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line);color:var(--ink);font:700 17px/1.3 var(--hf);text-decoration:none}
body.pt-town .tw-svc-links a:hover{color:var(--p)}
body.pt-town .tw-svc-links .ic{width:22px;height:22px;padding:4px;border-radius:50%;background:var(--a);color:var(--oa);flex:none}
@media(max-width:900px){body.pt-town .tw-services-grid{grid-template-columns:minmax(0,1fr);gap:24px}}
@media(max-width:560px){body.pt-town .ssc.sx .tw-svc-links{grid-template-columns:minmax(0,1fr)}}

/* faq: centered, in the site's FAQ band (site.css .faq-band) */
body.pt-town .ssc.sx.dp.tw-faq{padding:84px 0}
body.pt-town main .ssc.sx.dp.tw-faq>.w>h2{text-align:center;margin-bottom:28px}
@media(max-width:767px){body.pt-town .ssc.sx.dp.tw-faq{padding:60px 0}}

/* nearby towns: pin links; the last thing before the footer leaves real room */
body.pt-town .ssc.sx.dp.tw-nearby{background:#fff;padding:72px 0 104px;border-top:1px solid var(--line)}
body.pt-town .ssc.sx .tw-near-links{display:flex;flex-wrap:wrap;gap:12px;list-style:none;margin:24px 0 0;padding:0}
body.pt-town .ssc.sx .tw-near-links a{display:inline-flex;gap:8px;align-items:center;background:#fff;border:1.5px solid var(--line);border-radius:999px;padding:12px 20px 12px 16px;font:700 17px/1.2 var(--hf);color:var(--ink);text-decoration:none}
body.pt-town .tw-near-links a:hover{border-color:var(--p)}
body.pt-town .tw-near-links .ic{width:18px;height:18px;color:var(--btn)}

/* ---- the Service Areas front door ---- */
body.pt-areas .ssc.sx.dp.tw-hero.ar-hero{border-bottom:1px solid var(--line);padding:56px 0 48px;
  background:radial-gradient(50% 120% at 100% 0%,rgba(181,218,76,.18) 0%,rgba(181,218,76,0) 70%),#fff}
body.pt-areas main .ssc.sx.dp.ar-hero .lead{margin:0}
body.pt-areas .ssc.sx.dp.ar-towns{background:var(--soft);padding:72px 0 84px}
body.pt-areas .ar-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
body.pt-areas .ssc.sx .ar-card{display:block;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;text-decoration:none;color:var(--body);transition:border-color .15s,box-shadow .15s}
body.pt-areas .ar-card:hover{border-color:var(--p);box-shadow:var(--sh)}
body.pt-areas .ar-card .cimg img{display:block;width:100%;height:auto;aspect-ratio:21/9;object-fit:cover}
body.pt-areas main .ssc.sx.dp .ar-card h3{margin:0;padding:18px 24px 6px;font-size:1.3rem}
body.pt-areas main .ssc.sx.dp .ar-card p{margin:0;padding:0 24px 22px}
@media(max-width:767px){body.pt-areas .ar-grid{grid-template-columns:minmax(0,1fr)}body.pt-areas .ssc.sx.dp.ar-towns{padding:56px 0 60px}}
body.pt-areas .ssc.sx.dp.ar-rules{background:#fff;padding:84px 0}
body.pt-areas .ar-table th:first-child a{color:var(--p);text-decoration:underline;text-decoration-color:var(--a);text-decoration-thickness:2px}
body.pt-areas main .ssc.sx.dp .ar-note{margin:18px 0 0;color:var(--mute);font-size:17px}
@media(max-width:767px){body.pt-areas .ssc.sx.dp.ar-rules{padding:60px 0}}
