/* Hand-written overrides for this migration — client-hhwt.
 *
 * DELIBERATELY OUTSIDE site/public/styles/ (gotcha 49): tools/port-css.mjs owns
 * that directory and clears its own hashed outputs on every run, so a hand-written
 * sheet placed there is deleted by the next port with no error anywhere — on one
 * site that silently removed the sheet that hides the inactive device bands, and
 * all three headers then rendered at every width.
 *
 * EVERY NUMBER BELOW WAS CENSUSED ON THIS SITE. That sentence is here because the
 * file this was carried forward from was byte-identical to client-naturescapelawn's
 * and every count in its prose belonged to that client or to one before it — a blog
 * declaring 29 with 10 visible, ".flexslider on 6 of 31 pages", "27 of 31 pages"
 * carry an accordion, "93 captures", and a paragraph about a slider on
 * insulationspecialistusa.net. None of that is true here. The RULES were sound and
 * are kept; the arithmetic around them is re-derived.
 *
 * Population: 339 captures (113 pages x 3 bands) plus all 113 raw served documents.
 *
 * Keep this file minimal. Anything that can come from the ported cascade should.
 */

/* The honeypot. Positioned off-screen rather than display:none — bots skip
 * obviously-hidden fields, and taking it out of flow means it costs no layout,
 * which the pixel gate would otherwise measure. Live has NO honeypot on either of
 * this site's two forms, so this is ours and must cost nothing. */
.mg-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* SPECIFICITY NOTE — read before editing any rule below.
 *
 * Duda emits a per-widget rule for EVERY widget on the site, shaped
 *
 *     #dm .dmBody div.u_1213107879 { display: block !important }
 *
 * That is specificity (1,2,1) and it is `!important`. A hide written as a plain
 * `.mg-only-t { display:none !important }` is (0,1,0), so `!important` on both
 * sides means SPECIFICITY decides and Duda's rule wins — the element stays visible
 * and nothing in the console says so.
 *
 * So every gate below repeats its class three times behind `#dm`, giving (1,3,0),
 * which outranks (1,2,1) on class count without relying on source order. Do not
 * "tidy" the repetition away.
 */

/* ---------------------------------------------------------------------------
 * BLOG PAGINATION — AND THIS SITE HAS BOTH OF DUDA'S CONTROL SHAPES AT ONCE.
 *
 * Censused on the raw served html of all 113 pages:
 *
 *   /blog            declared 20, visible 9   SHOW MORE, APPENDS
 *                    <a class="more-posts-text-container">, driven on live it runs
 *                    9 -> 18 -> 20 and the control then removes itself.
 *                    more-posts x1, pagination-nav x0.
 *
 *   20 blog posts    declared 19, visible 10  NUMBERED PAGER, REPLACES
 *                    <nav class="pagination-nav"> with data-action="paginate",
 *                    POSTing /_dm/s/rt/scripts/ajax_widj_refresh.jsp and SWAPPING
 *                    the card set — page 1 and page 2 are ten different aliases
 *                    each. more-posts x0, pagination-nav x1 on all 20.
 *
 * blog.rss independently declares 20 items, which is the cross-check.
 *
 * A static build has no Duda backend, so every card ships and the ones past the
 * first page are stamped mg-blog-hidden with data-mg-blog-page; runtime.js reveals
 * or swaps them in live's own step size. This rule is what hides them initially.
 * ------------------------------------------------------------------------- */
#dm .mg-blog-hidden.mg-blog-hidden.mg-blog-hidden {
  display: none !important;
}

/* display:none DOES NOT CHANGE CHILD INDICES, so shipping the withheld cards
 * silently moves which card is :last-child — gotcha 69.
 *
 * Duda's own rule is `.postArticle:not(:last-child){padding-bottom:Npx}`. On live
 * the last VISIBLE card is genuinely :last-child and takes none of it. In our build
 * it is followed by hidden siblings, so it stops matching and GAINS that padding,
 * pushing the control and the whole footer down by a constant amount at every width
 * — the signature of one shared element rather than a per-page fault.
 *
 * Keyed on `:has(+ .mg-blog-hidden)` rather than on a stamped class, because that
 * tracks the SEQUENCE as batches are revealed instead of pinning the initial state;
 * runtime.js does not have to re-stamp anything as cards appear. */
#dm .postArticle:not(.mg-blog-hidden):has(+ .postArticle.mg-blog-hidden) {
  padding-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * PER-DEVICE WIDGET FORKS.
 *
 * THE DEVICE FORK ON THIS SITE IS TWO-WAY, MEASURED: the tablet document is
 * BYTE-IDENTICAL to the desktop one on 8 of 8 pages sampled, and only the phone
 * document differs (dmtemplateid mobileHamburgerLayout against Hamburger). The
 * `mg-only-t` gate is therefore expected to be unused or to carry a copy identical
 * to `mg-only-d`; it is kept because build-pages.py emits three pieces wherever the
 * captures disagree, and a gate that is present and unused costs nothing while a
 * missing one is silent.
 *
 * The band boundaries are Duda's own, read out of the ported cascade and confirmed
 * against the hamburger sweep: mobile <=767, tablet 768-1024, desktop >=1025. Note
 * 1025 rather than 1024+1 by assumption — the horizontal nav has width 0 up to 1024
 * and first paints at 1025, and the hamburger button is display:flex up to 1024 and
 * none from 1025.
 *
 * These hide rather than remove, deliberately — the elements stay in the document
 * so the runtime can still address them, and display:none costs no layout.
 *
 * Only the INACTIVE bands are hidden, inside the media queries. The active band is
 * never touched, so it keeps whatever `display` the ported cascade gives it — an
 * earlier version hid all three and restored one with `display: revert`, which
 * reverts past the author cascade to the UA default and would have replaced the
 * widget's real display value with a plain `block`.
 * ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  #dm .mg-only-d.mg-only-d.mg-only-d,
  #dm .mg-only-t.mg-only-t.mg-only-t {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #dm .mg-only-d.mg-only-d.mg-only-d,
  #dm .mg-only-m.mg-only-m.mg-only-m {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  #dm .mg-only-t.mg-only-t.mg-only-t,
  #dm .mg-only-m.mg-only-m.mg-only-m {
    display: none !important;
  }
}

/* ---------------------------------------------------------------------------
 * NO SLIDER RULES, AND THAT IS A MEASUREMENT RATHER THAN AN OMISSION.
 *
 * Censused over all 113 raw served documents and all 339 captures:
 *     .flexslider            0
 *     ssrimageslider         0
 *     .bgGallerySlide        0
 *     [data-gallery-bg]      0
 *     <video autoplay>       0
 *
 * So this site has no carousel of any kind, nothing auto-advances, and none of
 * gotchas 28, 29, 78, 87, 90 or 91's slider clauses has a subject here. Nothing is
 * excluded from the pixel gate on rotation grounds either — see
 * visual-diff.config.json, whose hiddenRegions is short for the same reason.
 *
 * The paragraph this replaces described a media-slider film role on a client two
 * migrations back and had already been retargeted once to a THIRD client's /reviews
 * page — a page neither this site nor that one has.
 * ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
 * ACCORDION OPEN STATE — recovering a rule the live CSS read cannot see.
 *
 * The FAQ accordion is a styled-component driven by Duda's runtime, which is
 * correctly not ported. The markup and the ported cascade both arrive intact, so
 * the widget PAINTS in its settled state and the pixel gate scores the page 0.000%
 * — while every click is inert.
 *
 * CENSUSED HERE, on data-element-type rather than on a class token (styled
 * components generate their class names, so a class regex finds nothing on these):
 * an ssraccordion is on 44 of 113 pages, one widget each, 5 items on 43 of them and
 * 7 on /faq. 25 distinct widget ids, because one widget is shared across the 20
 * blog posts.
 *
 * THE CLOSED RULE IS IN THE PORT AND THE OPEN RULE IS NOT, AND THAT IS NOT A
 * PORTING MISTAKE. styled-components insert through the CSSOM, so a class exists in
 * a document's sheet only if that component actually RENDERED with it. Measured:
 * the closed state
 *
 *     .dygwmn { overflow:hidden; transition:max-height .3s ease-out;
 *               height:auto; max-height:0px; }
 *
 * appears 537 times across the captures, while the OPEN class is minted per render
 * — ELEVEN distinct names seen (ctGkua, iWTYns, jrXmxD, lkQkcT, hVjNUn, jCZtbv,
 * cpMcTW, gqFKNX, CoQjN, lbMDqK and more), differing by page AND by device. So no
 * open-state name can be hardcoded, and restoring the rule under OUR OWN class is
 * recovering a sheet the live read could not reach.
 *
 * The transition runs on MAX-HEIGHT, so opening means raising it.
 *
 * Repeated behind #dm to clear Duda's own per-widget !important display rules.
 * ------------------------------------------------------------------------- */
#dm .mg-acc-open.mg-acc-open.mg-acc-open {
  max-height: 2000px;
}
