/* Framingham Appliance Repair — custom static build.
   Adapted from the v3 WordPress theme style.css (component classes
   copied verbatim); WordPress theme header removed. New spec-only
   components (.flow, .callout--sage, .toc, .btn, .sub-toggle) are
   appended at the end, per DESIGN_SPEC §4.13. One file, no GA. */

/* ============================================================
   TOKENS — approved workshop palette. NO blue, NO white as a
   main colour, NO burgundy, NO gold, NO black, NO charcoal.
   Light surfaces are warm sand / peach / sage, never #fff.
   Text is deep green, never #000.
   ============================================================ */
:root{
  --green:#175c39;
  --green-dark:#0e4028;
  --green-deep:#0a2e1d;
  --green-mid:#2a7a4e;
  --green-3:#227245;
  --orange:#e05a17;
  --orange-dark:#ad3e0a;
  --rust:#b23a26;
  --rust-dark:#8c2b1c;
  --sage:#a9bf9b;
  --sage-light:#dce8d3;
  --sage-pale:#e9f0e2;
  --sage-2:#cfdfb4;
  --peach:#fbe3cd;
  --peach-2:#f7d7ae;
  --peach-light:#fdf0dd;
  --sand:#f6eedd;
  --sand-2:#eee0c2;
  --sand-deep:#efe3cb;
  --cream:#fdf6e0;
  --cream-soft:#ecdfc0;
  --card:#fdf6e0;
  --ink:#26382a;          /* body text: deep green, not black */
  --ink-soft:#2e4a38;
  --muted:#54624f;
  --paper-text:#fdf6e0;   /* light text on dark green/rust */
  --line:#c9b896;
  --line-dark:#b7a678;
  --radius:14px;
  --wrap:1180px;
  --tap:44px;
  --font:"Barlow",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-head:"Barlow Condensed","Barlow",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

/* ============================================================
   CRITICAL FIX — no sideways scrolling, ever (Lesson 13).
   overflow-x:clip on html AND body is the safety net; every
   layout rule below is also built to fit 360px.
   ============================================================ */
html,body{overflow-x:clip;}
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font);
  font-size:17px;
  line-height:1.65;
  color:var(--ink);
  background:var(--sand);
  overflow-wrap:break-word;
}
img,svg,video{max-width:100%;height:auto;display:block;}
a{color:var(--orange-dark);text-decoration-thickness:2px;text-underline-offset:3px;}
a:hover,a:focus{color:var(--rust);}
a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--orange);outline-offset:2px;}
h1,h2,h3,h4{font-family:var(--font-head);line-height:1.15;color:var(--green-dark);overflow-wrap:break-word;letter-spacing:.02em;}
h1{font-size:clamp(1.9rem,5vw,2.9rem);}
h2{font-size:clamp(1.45rem,3.6vw,2rem);margin-top:2.2rem;}
h3{font-size:1.2rem;}
p{margin:0 0 1rem;}
ul,ol{margin:0 0 1rem;padding-left:1.4rem;}
li{margin-bottom:.35rem;}
table{width:100%;border-collapse:collapse;margin:0 0 1.5rem;background:var(--cream);font-size:.95rem;}
th,td{border:1px solid var(--line);padding:.65rem .7rem;text-align:left;vertical-align:top;overflow-wrap:break-word;}
th{background:var(--green);color:var(--paper-text);}
td{color:var(--ink);}
figure{margin:0 0 1.5rem;}
figcaption{font-size:.9rem;color:var(--ink-soft);padding-top:.4rem;}
.wrap{max-width:var(--wrap);margin:0 auto;padding-left:20px;padding-right:20px;}
.skip-link{position:absolute;left:-9999px;top:0;background:var(--orange-dark);color:var(--paper-text);padding:.7rem 1rem;z-index:200;}
.skip-link:focus{left:12px;top:12px;}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}

/* ---------- Header / nav ---------- */
.site-header{background:var(--green-dark);color:var(--paper-text);position:sticky;top:0;z-index:90;border-bottom:4px solid var(--orange);}
.header-inner{display:flex;align-items:center;gap:16px;min-height:72px;}
.site-logo{display:flex;align-items:center;gap:10px;color:var(--paper-text);text-decoration:none;min-height:var(--tap);flex-shrink:0;}
.site-logo img{width:44px;height:44px;flex-shrink:0;}
.site-logo .wordmark{font-weight:800;line-height:1.15;font-size:1.05rem;letter-spacing:.01em;}
.site-logo .wordmark small{display:block;font-weight:600;font-size:.78rem;color:var(--peach);}
.main-nav{margin-left:auto;}
.nav-list{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0;}
.nav-list>li{position:relative;}
.nav-list>li.has-children{display:flex;align-items:center;}
.nav-list a{display:flex;align-items:center;min-height:var(--tap);padding:8px 12px;color:var(--paper-text);text-decoration:none;font-weight:600;border-radius:8px;white-space:nowrap;}
.nav-list a:hover,.nav-list a:focus{background:var(--green);}
.nav-list .current-menu-item>a,.nav-list .current_page_item>a,.nav-list .current-menu-parent>a{background:var(--orange-dark);}
.has-children>button{display:flex;align-items:center;gap:4px;min-height:var(--tap);min-width:var(--tap);padding:8px 10px;background:none;border:0;color:var(--paper-text);font:inherit;font-weight:600;cursor:pointer;border-radius:8px;}
.has-children>button:hover{background:var(--green);}
.sub-menu{display:none;position:absolute;top:100%;left:0;min-width:260px;max-width:340px;background:var(--cream);list-style:none;margin:0;padding:8px;border:2px solid var(--green);border-radius:12px;box-shadow:0 12px 28px rgba(10,46,29,.28);z-index:95;}
.sub-menu a{color:var(--ink);white-space:nowrap;padding:10px 12px;}
.sub-menu a:hover,.sub-menu a:focus{background:var(--sage-light);color:var(--green-dark);}
.has-children:hover>.sub-menu,.has-children:focus-within>.sub-menu,.has-children.open>.sub-menu{display:block;}
.header-call{display:inline-flex;align-items:center;gap:8px;min-height:var(--tap);padding:10px 16px;background:var(--orange-dark);color:var(--paper-text);font-weight:800;text-decoration:none;border-radius:999px;white-space:nowrap;flex-shrink:0;}
.header-call:hover{background:var(--orange-dark);color:var(--paper-text);}
.menu-toggle{display:none;min-width:var(--tap);min-height:var(--tap);margin-left:auto;background:var(--green);border:2px solid var(--peach);border-radius:10px;color:var(--paper-text);cursor:pointer;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:10px 12px;}
.menu-toggle span{display:block;width:22px;height:3px;background:var(--paper-text);border-radius:2px;}

/* ---------- Breadcrumbs (Rule 86: same inset as content) ---------- */
.breadcrumbs{font-size:.92rem;color:var(--ink-soft);padding:14px 0 0;}
.breadcrumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 8px;}
.breadcrumbs li{margin:0;}
.breadcrumbs li+li::before{content:"›";margin-right:8px;color:var(--orange-dark);}
.breadcrumbs a{color:var(--green);font-weight:600;}

/* ---------- Hero + Service Ticket ---------- */
.hero{background:var(--green);color:var(--paper-text);padding:34px 0 40px;border-bottom:5px solid var(--orange);}
.hero-inner{display:grid;grid-template-columns:1.35fr .85fr;gap:32px;align-items:stretch;}
.eyebrow{display:inline-block;font-weight:800;letter-spacing:.08em;text-transform:uppercase;font-size:.82rem;color:var(--peach);border:2px dashed var(--peach);border-radius:999px;padding:6px 14px;margin-bottom:14px;}
.hero h1{color:var(--paper-text);margin:0 0 12px;}
.hero-intro{font-size:1.12rem;color:var(--peach-light);max-width:56ch;}
.hero figure{margin:0;}
.hero figure img{border-radius:var(--radius);border:3px solid var(--peach);aspect-ratio:4/3;object-fit:cover;width:100%;height:100%;}
/* Service Ticket — dashed card in the hero */
.service-ticket{background:var(--cream);color:var(--ink);border:2px dashed var(--orange-dark);border-radius:var(--radius);padding:18px 20px;margin-top:20px;max-width:560px;}
.service-ticket h2{font-size:1rem;letter-spacing:.1em;text-transform:uppercase;color:var(--rust);margin:0 0 10px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.service-ticket h2 .ticket-no{color:var(--ink-soft);letter-spacing:0;text-transform:none;font-size:.9rem;}
.ticket-rows{list-style:none;margin:0;padding:0;}
.ticket-rows li{display:flex;gap:12px;padding:8px 0;border-bottom:1px dashed var(--line);}
.ticket-rows li:last-child{border-bottom:0;}
.ticket-rows .t-label{font-weight:800;color:var(--green-dark);flex:0 0 110px;}
.ticket-rows .t-value{flex:1;min-width:0;overflow-wrap:anywhere;}
.ticket-rows a{color:var(--orange-dark);font-weight:700;}
.ticket-call{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);margin-top:12px;padding:11px 20px;background:var(--orange-dark);color:var(--paper-text);font-weight:800;text-decoration:none;border-radius:999px;}
.ticket-call:hover{background:var(--orange-dark);color:var(--paper-text);}

/* ---------- Ticker ---------- */
.ticker{background:var(--rust);color:var(--paper-text);overflow:hidden;padding:10px 0;font-weight:700;}
.ticker-track{display:flex;gap:2.2rem;white-space:nowrap;animation:tick 32s linear infinite;width:max-content;}
.ticker:hover .ticker-track{animation-play-state:paused;}
@keyframes tick{from{transform:translateX(0);}to{transform:translateX(-50%);}}
@media (prefers-reduced-motion:reduce){.ticker-track{animation:none;}html{scroll-behavior:auto;}}

/* ---------- Content sections (Rule 77: card treatment on cards only) ---------- */
.site-main{padding-bottom:8px;}
.content{padding:26px 0 10px;}
.content .wrap>*:first-child{margin-top:0;}
.entry-content img{border-radius:12px;}
.entry-content figure img{aspect-ratio:16/10;object-fit:cover;width:100%;}
/* ---------- Control-panel service cards ---------- */
.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;list-style:none;margin:0 0 1.5rem;padding:0;}
.panel-card{background:var(--cream);border:2px solid var(--green);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;}
.panel-card .card-head{padding:12px 16px;color:var(--paper-text);font-weight:800;display:flex;align-items:center;gap:10px;}
.panel-card .card-head--green{background:var(--green);}
.panel-card .card-head--orange{background:var(--orange-dark);}
.panel-card .card-head--rust{background:var(--rust);}
.panel-card .dot{width:12px;height:12px;border-radius:50%;background:var(--peach);border:2px solid var(--paper-text);flex-shrink:0;}
.panel-card .card-body{padding:16px;display:flex;flex-direction:column;gap:10px;flex:1;}
.panel-card h3{margin:0;color:var(--green-dark);}
.panel-card h3 a{color:var(--green-dark);text-decoration:none;}
.panel-card p{margin:0;color:var(--ink-soft);flex:1;}
.panel-card .card-link{font-weight:800;color:var(--orange-dark);min-height:var(--tap);display:inline-flex;align-items:center;}
.panel-card figure{margin:0;}
.panel-card figure img{aspect-ratio:16/10;object-fit:cover;width:100%;border-radius:0;}

/* ---------- Slim CTA strips (Rules 21/34) ---------- */
.cta-strip{background:var(--green-dark);color:var(--paper-text);border-radius:var(--radius);padding:16px 20px;margin:0 0 1.8rem;display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:space-between;}
/* Strip text MUST stay light cream. The strip sits inside .svc-body on
   service pages, and .svc-body p paints text dark muted green — that
   overrode the inherited light colour and the text was invisible on the
   dark green strip (contrast 1.82:1, Shams 2026-12-04). The doubled
   class beats .svc-body p regardless of source order. */
.cta-strip.cta-strip p{margin:0;font-weight:700;font-size:1.05rem;flex:1;min-width:220px;color:var(--paper-text);}
.cta-strip .btn-call{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:11px 20px;background:var(--orange-dark);color:var(--paper-text);font-weight:800;text-decoration:none;border-radius:999px;white-space:nowrap;}
.cta-strip .btn-call:hover{background:var(--orange-dark);color:var(--paper-text);}
/* Figures moved out of the service grid (Shams 2026-12-04): a tall
   portrait photo must not run full-width under the grid. Constrain
   and centre it so it reads as one illustration, not a wall. */
.grid-figure{max-width:560px;margin:0 auto 18px;}
.grid-figure img{width:100%;height:auto;}
/* Sticky fill for the empty slot in a service grid (Shams 2026-12-04):
   the moved photo + CTA fill the empty place in the last row instead of
   sitting below the grid, and stay pinned while the reader scrolls
   through the section (design lesson 3: make it sticky, not longer).
   align-self:start keeps it from stretching the row. On phones it
   behaves as a normal stacked box. --wide spans 2 columns where the
   last row has 2 empty slots. */
.sticky-fill{position:sticky;top:90px;align-self:start;background:var(--green-dark);border-radius:var(--radius);overflow:hidden;box-shadow:0 10px 26px rgba(38,56,42,.16);display:flex;flex-direction:column;}
.sticky-fill-img img{width:100%;height:220px;object-fit:cover;display:block;}
.sticky-fill-text{color:var(--paper-text);font-weight:700;font-size:1.05rem;margin:0;padding:18px 18px 0;}
.sticky-fill .btn-call{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:11px 20px;margin:14px 18px 18px;background:var(--orange-dark);color:var(--paper-text);font-weight:800;text-decoration:none;border-radius:999px;white-space:nowrap;}
.sticky-fill .btn-call:hover{background:var(--orange-dark);color:var(--paper-text);}
.sticky-fill--wide{grid-column:span 2;}
@media (max-width:680px){.sticky-fill{position:static;}.sticky-fill--wide{grid-column:auto;}}
.callout{background:var(--peach-light);border-left:6px solid var(--orange);border-radius:0 12px 12px 0;padding:16px 18px;margin:0 0 1.5rem;}
.callout h3{margin-top:0;}

/* ---------- PAA (Rule 52: distinct boxes, unlike FAQ) ---------- */
.paa{margin:0 0 1.8rem;}
.paa>h3{margin-bottom:12px;}
.paa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;}
.paa-item{background:var(--peach);border-top:6px solid var(--rust);border-radius:12px;padding:16px;}
.paa-item h4{margin:0 0 8px;color:var(--rust-dark);font-size:1.05rem;display:flex;gap:10px;}
.paa-item h4 .q-badge{flex-shrink:0;width:28px;height:28px;border-radius:50%;background:var(--rust);color:var(--paper-text);display:inline-flex;align-items:center;justify-content:center;font-size:1rem;}
.paa-item p{margin:0;color:var(--ink);}

/* ---------- FAQ accordion (native details/summary) ---------- */
.faq{background:var(--cream);border:2px solid var(--sage);border-radius:12px;margin:0 0 12px;padding:0;}
.faq summary{cursor:pointer;min-height:var(--tap);padding:14px 16px;font-weight:700;color:var(--green-dark);list-style:none;display:flex;align-items:center;gap:10px;}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{content:"+";margin-left:auto;font-size:1.4rem;color:var(--orange-dark);font-weight:800;flex-shrink:0;}
.faq[open ] summary::after{content:"−";}
.faq p{padding:0 16px 16px;margin:0;color:var(--ink-soft);}

/* ---------- Symptom finder + replace checker ---------- */
.symptom-finder,.replace-checker{background:var(--sage-pale);border:2px solid var(--green);border-radius:var(--radius);padding:18px;margin:0 0 1.8rem;}
.symptom-finder h3,.replace-checker h3{margin-top:0;}
.finder-buttons,.checker-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px;}
.finder-buttons button,.checker-buttons button{min-height:var(--tap);padding:10px 16px;border:2px solid var(--green);border-radius:999px;background:var(--cream);color:var(--green-dark);font:inherit;font-weight:700;cursor:pointer;}
/* Buttons are direct children of .symptom-finder / .replace-checker
   (no .finder-buttons / .checker-buttons wrapper in the content),
   so the wrapper-less buttons need the same treatment. With no flex
   parent, the buttons space themselves with a right/bottom margin. */
.symptom-finder>button,.replace-checker>button{min-height:var(--tap);padding:10px 16px;margin:0 10px 10px 0;border:2px solid var(--green);border-radius:999px;background:var(--cream);color:var(--green-dark);font:inherit;font-weight:700;cursor:pointer;}
.finder-buttons button[aria-pressed="true"],.checker-buttons button[aria-pressed="true"],.symptom-finder>button[aria-pressed="true"],.replace-checker>button[aria-pressed="true"]{background:var(--green);color:var(--paper-text);}
.finder-result,.checker-result{display:none;background:var(--cream);border-radius:10px;padding:14px 16px;}
.finder-result.is-open,.checker-result.is-open{display:block;}
.finder-result p,.checker-result p{margin:0;}

/* ---------- Rating-plate contact panel — CRITICAL FIX (a) ---------- */
.rating-plate{background:var(--green-dark);color:var(--paper-text);border:3px solid var(--orange);border-radius:var(--radius);padding:20px 22px;margin:28px 0;max-width:100%;}
.rating-plate h2{color:var(--paper-text);margin:0 0 4px;font-size:1.05rem;letter-spacing:.1em;text-transform:uppercase;}
.rating-plate .plate-sub{color:var(--peach);margin:0 0 14px;}
.plate-rows{list-style:none;margin:0;padding:0;}
.plate-rows li{display:flex;gap:14px;padding:10px 0;border-bottom:1px dashed rgba(253,248,236,.35);min-width:0;}
.plate-rows li:last-child{border-bottom:0;}
.plate-label{font-weight:800;color:var(--peach);flex:0 0 130px;}
.plate-value{flex:1;min-width:0;overflow-wrap:anywhere;word-break:break-word;}
.plate-value a{color:var(--paper-text);font-weight:700;}
.plate-value a:hover{color:var(--peach);}
.plate-call{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);margin-top:14px;padding:11px 22px;background:var(--orange-dark);color:var(--paper-text);font-weight:800;text-decoration:none;border-radius:999px;}
.plate-call:hover{background:var(--orange-dark);color:var(--paper-text);}

/* ---------- Contact band (sage) ---------- */
.contact-band{background:var(--sage-light);padding:28px 0;}
.contact-band .wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;}
.contact-box{background:var(--cream);border:2px solid var(--green);border-radius:var(--radius);padding:18px;}
.contact-box h3{margin:0 0 6px;}
.contact-box p{margin:0 0 8px;color:var(--ink-soft);overflow-wrap:anywhere;}
.contact-box a{font-weight:700;overflow-wrap:anywhere;}

/* ---------- Footer: open columns, no boxes (Shams 2026-12-04) ----------
   Brand row on top, four open link columns, disclaimer, then a dark
   bottom bar with the copyright. No box borders or fills anywhere.
   Bottom padding lives on .footer-bottom (see below), NOT on
   .site-footer, so no green band sits under the dark bottom bar. */
.site-footer{background:var(--green);color:var(--paper-text);}
.site-footer .wrap{padding-top:44px;}
.footer-brand{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;padding-bottom:28px;border-bottom:1px solid rgba(169,191,155,.35);}
.footer-brand h2{font-family:var(--font-head);font-size:2rem;line-height:1.05;color:var(--cream);letter-spacing:.02em;margin:0;}
.footer-brand h2 span{color:var(--peach);}
.footer-brand p{color:var(--peach-light);font-size:.98rem;margin:6px 0 0;max-width:560px;}
.footer-call{text-align:right;}
.footer-call .call-label{font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;color:var(--sage);}
.footer-call a{display:block;font-family:var(--font-head);font-size:1.7rem;font-weight:700;color:var(--peach);text-decoration:none;line-height:1.2;}
.footer-call a:hover{color:#fff;text-decoration:underline;}
.footer-cols{display:grid;grid-template-columns:repeat(4,1fr);gap:28px;padding:30px 0 26px;}
.footer-col h3{color:var(--peach);margin:0 0 12px;font-size:1.05rem;letter-spacing:.08em;text-transform:uppercase;}
.footer-col h3::after{content:"";display:block;width:32px;height:3px;background:var(--orange);margin-top:7px;border-radius:2px;}
.footer-col ul{list-style:none;margin:0;padding:0;}
.footer-col li{margin:0 0 5px;}
.footer-col a{color:var(--paper-text);text-decoration:none;font-size:.97rem;line-height:1.45;}
.footer-col a:hover{color:var(--peach);text-decoration:underline;}
.footer-col p{margin:0 0 8px;color:var(--peach-light);overflow-wrap:anywhere;font-size:.97rem;line-height:1.5;}
.footer-col p a{color:var(--peach);}
.footer-col a[href^="mailto:"]{font-size:.88rem;white-space:nowrap;}
a[href^="tel:"]{white-space:nowrap;}
.footer-disclaimer{font-size:.92rem;color:var(--peach-light);border-top:1px solid rgba(169,191,155,.35);padding:20px 0;}
.footer-disclaimer p{margin:0;}
.footer-bottom{background:var(--green-dark);padding:16px 20px 40px;text-align:center;}
.footer-copy{font-size:.9rem;color:var(--peach);margin:0;}
.footer-copy a{color:var(--paper-text);}
@media (max-width:860px){.footer-cols{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){
  .site-footer .wrap{padding-top:36px;}
  .footer-brand{flex-direction:column;align-items:flex-start;}
  .footer-call{text-align:left;}
  .footer-cols{grid-template-columns:1fr;gap:0;padding:10px 0 6px;}
  .footer-col{padding:16px 0;border-bottom:1px solid rgba(169,191,155,.25);}
  .footer-col:last-child{border-bottom:0;}
}

/* ---------- Sticky call + back-to-top — CRITICAL FIX (b) ----------
   Both raised above the bottom edge with env(safe-area-inset-bottom),
   stacked clear of each other, 56px tap targets. Footer bottom
   padding on phones (below) keeps the last line uncovered. */
.sticky-call{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:120;width:56px;height:56px;border-radius:50%;background:var(--orange);color:var(--paper-text);display:flex;align-items:center;justify-content:center;text-decoration:none;box-shadow:0 6px 18px rgba(10,46,29,.4);border:3px solid var(--cream);}
.sticky-call:hover{background:var(--orange-dark);color:var(--paper-text);}
.sticky-call svg{width:26px;height:26px;}
.back-to-top{position:fixed;right:16px;bottom:calc(88px + env(safe-area-inset-bottom,0px));z-index:120;width:56px;height:56px;border-radius:50%;background:var(--green-dark);color:var(--paper-text);border:3px solid var(--peach);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(10,46,29,.4);opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s;font-size:1.4rem;line-height:1;}
.back-to-top.is-visible{opacity:1;visibility:visible;}
.back-to-top:hover{background:var(--green);}

/* ---------- Last updated line (visible freshness date) ---------- */
.last-updated{font-size:.92rem;color:var(--ink-soft);margin:0 0 1.5rem;}
.last-updated time{font-weight:700;color:var(--green-dark);}

/* ---------- Blog ---------- */
.post-meta{color:var(--ink-soft);font-size:.95rem;margin:0 0 10px;}
.post-meta a{color:var(--green);font-weight:700;}
.related-articles{margin:28px 0;}
.related-articles h2{margin-bottom:16px;}
.byline{font-weight:700;color:var(--green-dark);}
.pagination{margin:24px 0;display:flex;gap:8px;flex-wrap:wrap;}
.pagination a,.pagination span{min-height:var(--tap);min-width:var(--tap);display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border:2px solid var(--green);border-radius:10px;text-decoration:none;font-weight:700;color:var(--green-dark);background:var(--cream);}
.pagination .current{background:var(--green);color:var(--paper-text);}
.no-results,.error-404{padding:30px 0 40px;}
.search-form{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0;}
.search-form input[type="search"]{flex:1;min-width:200px;min-height:var(--tap);padding:10px 14px;border:2px solid var(--green);border-radius:10px;font:inherit;background:var(--cream);color:var(--ink);}
.search-form button{min-height:var(--tap);padding:10px 20px;background:var(--orange-dark);color:var(--paper-text);border:0;border-radius:999px;font:inherit;font-weight:800;cursor:pointer;}
@media (max-width:640px){
  .search-form{flex-direction:column;align-items:flex-start;}
  .search-form input[type="search"]{width:100%;}
  .search-form button{align-self:flex-start;}
}

/* ---------- Phones: 360–390px ---------- */
@media (max-width:860px){
  .menu-toggle{display:inline-flex;}
  .main-nav{position:absolute;top:100%;left:0;right:0;background:var(--green-dark);display:none;border-bottom:4px solid var(--orange);max-height:calc(100vh - 72px);overflow-y:auto;}
  .main-nav.is-open{display:block;}
  .nav-list{flex-direction:column;align-items:stretch;padding:10px 16px 16px;}
  .nav-list>li{border-bottom:1px solid rgba(253,248,236,.18);}
  .nav-list>li.has-children{flex-wrap:wrap;}
  .nav-list a{white-space:normal;padding:12px 8px;}
  .has-children>button{width:auto;flex-shrink:0;justify-content:space-between;padding:12px 8px;}
  .sub-menu{position:static;display:none;max-width:none;background:transparent;border:0;box-shadow:none;padding:0 0 8px 16px;flex-basis:100%;}
  .sub-menu a{color:var(--paper-text);white-space:normal;}
  .sub-menu a:hover{background:var(--green);}
  .has-children.open>.sub-menu{display:block;}
  .has-children:hover>.sub-menu{display:none;}
  .has-children.open:hover>.sub-menu{display:block;}
  .header-call{display:none;}
  .hero-inner{grid-template-columns:1fr;}
  .hero{padding:26px 0 30px;}
}
@media (max-width:640px){
  body{font-size:16px;}
  .wrap{padding-left:16px;padding-right:16px;}
  /* Card grids: 1 column on phones, so every row is full (Rule 65).
     3 columns hold from desktop down to 640px. */
  .card-grid{grid-template-columns:minmax(0,1fr);}
  /* CRITICAL FIX (a): rating-plate + ticket rows STACK, wrap, fit. */
  .plate-rows li,.ticket-rows li{flex-direction:column;gap:2px;}
  .plate-label,.ticket-rows .t-label{flex:none;}
  .plate-value,.ticket-rows .t-value{overflow-wrap:anywhere;word-break:break-word;}
  .rating-plate{padding:16px;}
  .service-ticket{padding:16px;}
  /* Footer bottom padding now lives on .footer-bottom (see below);
     nothing here — a padding on .site-footer would put a green band
     under the dark copyright bar. */
  .cta-strip{flex-direction:column;align-items:stretch;text-align:center;}
  .cta-strip p{min-width:0;}
  .cta-strip .btn-call{width:100%;}
  /* Tables scroll inside their own box, never the page. */
  .entry-content table{display:block;overflow-x:auto;max-width:100%;}
  .ticker-track{font-size:.92rem;}
  th,td{padding:.55rem .5rem;}
}
@media (max-width:390px){
  .site-logo{min-width:0;flex-shrink:1;}
  .site-logo img{width:36px;height:36px;}
  .site-logo .wordmark{font-size:.88rem;min-width:0;overflow-wrap:anywhere;}
  .site-logo .wordmark small{font-size:.72rem;}
  .hero h1{font-size:1.75rem;}
  /* Phones: the call/back-to-top buttons sat only 12px above the bottom
     edge, so a real phone's bottom browser bar covered the lower half of
     the orange call button (Shams 2026-12-04: "Why this cutting in Half").
     Raised to 64px so both buttons sit fully above the browser bar. */
  .sticky-call{right:12px;bottom:calc(64px + env(safe-area-inset-bottom,0px));}
  .back-to-top{right:12px;bottom:calc(136px + env(safe-area-inset-bottom,0px));}
}
@media print{
  .sticky-call,.back-to-top,.ticker,.menu-toggle,.site-header .header-call{display:none;}
  body{background:var(--cream);}
}

/* ============================================================
   V3 REBUILD — designed content components (approved preview).
   The content filter (inc/design.php) restructures plain H2/H3
   sections into these components at render time. Colours, radii
   and spacing follow the approved workshop artifacts exactly.
   ============================================================ */

/* --- Section kickers + headings (preview .kicker / .sec-head) --- */
.kicker{display:inline-flex;align-items:center;font-family:var(--font-head);font-weight:700;font-size:1rem;letter-spacing:.18em;text-transform:uppercase;color:var(--rust-dark);}
.kicker::before{content:"";display:inline-block;width:26px;height:3px;background:var(--orange);margin-right:10px;flex:none;}
.sec-head{max-width:780px;margin-bottom:32px;}
.sec-head h2{margin-top:8px;}

/* --- Designed content section bands (v3 filter, T4) ---
   Each plain prose H2 section becomes a distinct card/band so the
   page is a sequence of designed sections, never one plain column.
   Alternating .alt uses the warm peach tint from the preview. */
.entry-content section.block{background:var(--card);color:var(--ink);border:1.5px solid var(--line-dark);border-radius:var(--radius);padding:26px 28px;margin:26px 0;box-shadow:0 10px 26px rgba(38,56,42,.10);}
.entry-content section.block.alt{background:var(--peach-light);}
.entry-content section.block h2{margin-top:0;}
.entry-content section.block h2:first-child{margin-top:0;}
.entry-content section.block p:last-child{margin-bottom:0;}
.entry-content section.block figure{margin:18px 0 18px;}

/* --- Control-panel service cards (v3 filter, T1) ---
   .svc-grid holds all 9 services (3x3, no empty slot). The green
   "Kitchen equipment down?" CTA is a full-width banner below the
   grid (.cta-full). Commercial used to sit beside the CTA in a
   .svc-pair, which left the grid's last row one card short and an
   empty slot (Shams 2026-12-04); the pair is gone. */
.svc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:22px 0;}
.svc{background:var(--card);color:var(--ink);border:1.5px solid var(--line-dark);border-radius:var(--radius);overflow:hidden;box-shadow:0 10px 26px rgba(38,56,42,.12);display:flex;flex-direction:column;min-width:0;}
.svc-panel{display:flex;align-items:center;gap:6px;padding:11px 15px;color:var(--cream);font-family:var(--font-head);font-weight:700;letter-spacing:.06em;text-transform:uppercase;font-size:1rem;}
.svc-panel.p-green{background:var(--green);}
.svc-panel.p-orange{background:var(--orange);}
.svc-panel.p-rust{background:var(--rust);}
.svc-panel .dot{width:10px;height:10px;border-radius:50%;background:#ffe9b8;box-shadow:0 0 0 3px rgba(255,255,255,.25);flex:none;}
.svc-panel .dot.on{background:#b7f0a0;}
.svc-panel span:last-child{margin-left:auto;}
.svc-body{padding:16px 18px 18px;display:flex;flex-direction:column;flex:1;min-width:0;}
.svc-body h3{margin:0 0 8px;font-size:1.3rem;color:var(--green-dark);}
.svc-body h3 a{color:var(--green-dark);text-decoration:none;}
.svc-body h3 a:hover{color:var(--rust-dark);text-decoration:underline;}
.svc-body p{color:var(--muted);margin:0 0 12px;}
.svc-body ul{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
.svc-body ul li{background:var(--sage-light);color:var(--green-dark);border:1px solid var(--sage-2);border-radius:999px;padding:4px 11px;font-size:.85rem;font-weight:600;}
.svc-body a.more{display:inline-block;margin-top:auto;color:var(--orange-dark);font-weight:700;text-decoration:none;}
.svc-body a.more:hover{color:var(--rust-dark);text-decoration:underline;}
/* Full-width CTA banner below the services grid. Two columns:
   heading + text on the left, phone + button on the right.
   Uses .svc-cta-card.cta-full (two classes) so it beats the base
   .svc-cta-card column layout regardless of source order — a plain
   .cta-full rule LOST to the later base rule and the banner rendered
   631px tall with the text stretched (Shams 2026-12-04). */
.svc-cta-card.cta-full{display:grid;grid-template-columns:1fr auto;gap:4px 32px;align-items:center;margin:18px 0 22px;padding:26px 28px;}
.svc-cta-card.cta-full h3{grid-column:1;grid-row:1;}
.svc-cta-card.cta-full p{grid-column:1;grid-row:2;}
.svc-cta-card.cta-full .svc-cta-num{grid-column:2;grid-row:1;justify-self:end;align-self:center;}
.svc-cta-card.cta-full .btn{grid-column:2;grid-row:2;justify-self:end;align-self:center;margin-top:0;}
@media (max-width:640px){
  .svc-cta-card.cta-full{grid-template-columns:1fr;gap:10px;}
  .svc-cta-card.cta-full .svc-cta-num{grid-column:1;grid-row:3;justify-self:start;}
  .svc-cta-card.cta-full .btn{grid-column:1;grid-row:4;justify-self:start;}
}
.svc-cta-card{background:var(--green);color:var(--cream);border-radius:var(--radius);padding:24px;display:flex;flex-direction:column;gap:10px;box-shadow:0 10px 26px rgba(38,56,42,.16);min-width:0;}
.svc-cta-card h3{margin:0;color:var(--cream);font-size:1.55rem;}
.svc-cta-card p{color:var(--cream-soft);margin:0;font-size:.97rem;}
.svc-cta-num{font-family:var(--font-head);font-weight:700;font-size:1.9rem;color:var(--cream);text-decoration:none;overflow-wrap:anywhere;}
.svc-cta-num:hover{color:#f59a5c;}
.svc-cta-card .btn{align-self:flex-start;margin-top:auto;background:var(--cream);color:var(--green-dark);border:2px solid transparent;}
.svc-cta-card .btn:hover{background:var(--peach);color:var(--green-dark);}

/* --- Dial-style numbered steps (v3 filter, T2 + T5) --- */
.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;margin:22px 0;}
.step{background:var(--card);color:var(--ink);border:2px solid var(--line);border-radius:var(--radius);padding:20px 18px;text-align:center;min-width:0;}
.step .dial{width:74px;height:74px;border-radius:50%;border:5px solid var(--sand-deep);margin:0 auto 14px;display:flex;align-items:center;justify-content:center;font-family:var(--font-head);font-weight:700;font-size:1.9rem;color:var(--cream);background:var(--green);}
.step:nth-child(4n+2) .dial{background:var(--orange);}
.step:nth-child(4n+3) .dial{background:var(--rust);}
.step:nth-child(4n+4) .dial{background:var(--green-3);}
.step h3{margin:0 0 8px;font-size:1.25rem;color:var(--green-dark);}
.step p{color:var(--muted);margin:0;font-size:.97rem;}

/* --- Areas Served: intro boxes + town grid (v3 filter, T3) --- */
.areas-intro{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0 16px;}
.areas-box{background:var(--card);color:var(--ink);border:1.5px solid var(--line-dark);border-radius:var(--radius);padding:22px 24px;box-shadow:0 10px 26px rgba(38,56,42,.10);min-width:0;}
.areas-box h3{margin:0 0 10px;font-size:1.45rem;color:var(--green-dark);}
.areas-box p{color:var(--muted);margin:0 0 12px;font-size:.97rem;}
.areas-box p:last-child{margin-bottom:0;}
.areas-box a{color:var(--orange-dark);font-weight:700;}
.mini-list{display:flex;flex-wrap:wrap;gap:6px;}
.mini-list span{background:var(--sage-light);color:var(--ink);border:1px solid var(--sage-2);border-radius:999px;padding:5px 11px;font-size:.85rem;font-weight:600;}
.town-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0;}
.town{background:var(--card);color:var(--ink);border:1.5px solid var(--line-dark);border-radius:10px;padding:13px 15px;min-width:0;}
.town b{display:block;font-family:var(--font-head);font-weight:700;font-size:1.2rem;color:var(--green-dark);overflow-wrap:break-word;}
.town span{display:block;font-size:.85rem;color:var(--muted);font-weight:600;overflow-wrap:break-word;}
.note{color:var(--muted);font-size:.95rem;margin:14px 0 0;}
.note a{color:var(--orange-dark);font-weight:700;}

/* --- Designed tables (v3 filter, T6) --- */
.tbl-wrap{border:1.5px solid var(--line-dark);border-radius:var(--radius);overflow:hidden;box-shadow:0 10px 26px rgba(38,56,42,.10);margin:18px 0 20px;}
.tbl-wrap table{width:100%;border-collapse:collapse;margin:0;font-size:.97rem;color:var(--ink);}
.tbl-wrap caption{text-align:left;font-family:var(--font-head);font-weight:700;font-size:1.45rem;padding:18px 20px 6px;color:var(--green-dark);}
.tbl-wrap th{background:var(--green-dark);color:var(--cream);text-align:left;padding:13px 16px;font-family:var(--font-head);font-size:1.05rem;letter-spacing:.05em;text-transform:uppercase;}
.tbl-wrap td{padding:13px 16px;border-top:1px solid var(--line);background:var(--card);vertical-align:top;}
.tbl-wrap tr:nth-child(even) td{background:var(--sand);}
.tbl-wrap td b{color:var(--ink);font-weight:700;}
.pill{display:inline-block;font-size:.8rem;font-weight:700;border-radius:999px;padding:3px 10px;background:var(--sage-light);color:var(--green-dark);margin-top:6px;}
.pill.hot{background:var(--peach);color:var(--rust-dark);}

/* --- Footer: bottom padding (CRITICAL FIX b, redesigned 2026-12-04) ---
   The padding sits on .footer-bottom, the last element, so the dark
   copyright bar ends the footer flush — no green band below it.
   Desktop/tablet: 40px below the copyright (measured gap ~56px,
   copyright clears the fixed buttons by 12px+). Phones (<=640px):
   bottom padding is 48px (not 140px) AND the bar gets 76px right
   padding — a safe zone for the fixed call/back-to-top buttons
   (68px from the right edge). The centered copyright can then sit
   low without ever sliding under the buttons, so the empty space
   below it stays small. Rust top border matches the approved
   preview footer. */
.site-footer{border-top:6px solid var(--rust);}
@media (max-width:640px){.footer-bottom{padding:16px 76px calc(48px + env(safe-area-inset-bottom,0px)) 20px;}}
.footer-col h3{font-family:var(--font-head);}

/* --- V3 responsive rules --- */
@media (max-width:960px){
  .svc-grid{grid-template-columns:repeat(2,1fr);}
  .town-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:880px){
  .areas-intro{grid-template-columns:1fr;}
}
@media (max-width:680px){
  .tbl-wrap{overflow-x:auto;}
  .tbl-wrap table.tbl-stack thead{display:none;}
  .tbl-wrap table.tbl-stack tbody,.tbl-wrap table.tbl-stack tr,.tbl-wrap table.tbl-stack td{display:block;width:100%;}
  .tbl-wrap table.tbl-stack tr{border-top:3px solid var(--green-dark);}
  .tbl-wrap table.tbl-stack td{border-top:1px solid var(--line);}
  .tbl-wrap table.tbl-stack td::before{content:attr(data-l);display:block;font-size:.8rem;font-weight:700;color:var(--rust-dark);text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px;}
  .tbl-wrap table.tbl-stack td[data-l=""]::before{display:none;}
}
@media (max-width:600px){
  .svc-grid{grid-template-columns:1fr;}
  .town-grid{grid-template-columns:1fr;}
  .entry-content section.block{padding:20px;}
  .svc-cta-card .btn{width:100%;text-align:center;}
}

/* ============================================================
   STATIC BUILD — additions over the v3 theme (DESIGN_SPEC §4.13).
   These classes have NO v3 equivalent; they are built to the spec.
   ============================================================ */

/* --- Generic .btn (v3 only had it scoped to .svc-cta-card) --- */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:11px 20px;background:var(--cream);color:var(--green-dark);border:2px solid transparent;border-radius:999px;font-weight:800;text-decoration:none;white-space:nowrap;}
.btn:hover{background:var(--peach);color:var(--green-dark);}

/* --- Dropdown toggle button (JS injects .sub-toggle where missing;
   same styling as the v3 .has-children>button rule) --- */
.sub-toggle{display:flex;align-items:center;gap:4px;min-height:var(--tap);min-width:var(--tap);padding:8px 10px;background:none;border:0;color:var(--paper-text);font:inherit;font-weight:600;cursor:pointer;border-radius:8px;}
.sub-toggle:hover{background:var(--green);}

/* --- Designed section bands outside .entry-content (v3 scoped them
   to .entry-content section.block only; static pages use the same
   class wherever the band sits) --- */
section.block{background:var(--card);color:var(--ink);border:1.5px solid var(--line-dark);border-radius:var(--radius);padding:26px 28px;margin:26px 0;box-shadow:0 10px 26px rgba(38,56,42,.10);}
section.block.alt{background:var(--peach-light);}
section.block h2{margin-top:0;}
section.block p:last-child{margin-bottom:0;}

/* --- Flow diagram (§4.13 / §8.2): Call -> Diagnosis First ->
   Part Replacement -> Test Cycle. Row on desktop, stacked on phones. --- */
.flow{display:flex;align-items:stretch;gap:12px;margin:22px 0;}
.flow-box{flex:1;min-width:0;background:var(--card);color:var(--ink);border:2px solid var(--green);border-radius:var(--radius);padding:18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;}
.flow-box .flow-num{flex:none;width:44px;height:44px;border-radius:50%;background:var(--green);color:var(--cream);display:flex;align-items:center;justify-content:center;font-family:var(--font-head);font-weight:700;font-size:1.3rem;line-height:1;}
.flow-box h3{margin:0;font-size:1.2rem;color:var(--green-dark);}
.flow-box p{margin:0;color:var(--muted);font-size:.95rem;}
.flow-arrow{flex:none;align-self:center;font-weight:700;font-size:1.6rem;color:var(--orange-dark);line-height:1;}
.flow-prep{color:var(--muted);font-size:.95rem;margin:0 0 1.5rem;}

/* --- Key Takeaways box (§4.10): same shape as .callout, sage --- */
.callout--sage{background:var(--sage-light);border-left:6px solid var(--green);border-radius:0 12px 12px 0;padding:16px 18px;margin:0 0 1.5rem;}
.callout--sage h3{margin-top:0;}

/* --- Table of contents, blog posts only (§4.13) --- */
.toc{background:var(--card);color:var(--ink);border:2px solid var(--sage);border-radius:12px;padding:16px 18px;margin:0 0 1.8rem;}
.toc h2{margin:0 0 10px;font-size:1.2rem;color:var(--green-dark);}
.toc ul{list-style:none;margin:0;padding:0;}
.toc li{margin:0 0 6px;}
.toc li:last-child{margin-bottom:0;}
.toc a{color:var(--orange-dark);font-weight:700;}

@media (max-width:640px){
  .flow{flex-direction:column;align-items:stretch;}
  .flow-arrow{align-self:center;transform:rotate(90deg);}
  section.block{padding:20px;}
}
