/* Hand-written overrides for this migration — client-tempehandymanpro.
 *
 * 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 (client-prosidersinc) had every count belonging
 * to that client or to one before it — including a numbered-pager description of a
 * blog control this site does not have, and an assertion that its 36 sliders declare
 * isAutoPlay TRUE when all 57 of this site's declare FALSE. The RULES were sound and
 * are kept; the arithmetic around them is re-derived.
 *
 * Population: 120 captures (40 pages x 3 bands) plus all 40 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.
 *
 * /migration phase 8 specifies exactly this and one fleet repo shipped the spec
 * unimplemented — its honeypot rendered as an ordinary 40px text field and read as a
 * 46px layout defect. */
.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 (1,2,1) and it is `!important`. A hide written as a plain
 * `.mg-only-t { display:none !important }` is (0,1,0), so with `!important` on both
 * sides 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 — ONE REAL CONTROL, ON ONE PAGE.
 *
 * Censused on the raw served html of all 40 pages and confirmed by driving live's
 * own control (generated/blog-widgets.json, 63 of 63 records, 0 errored):
 *
 *   /blog             declared 20, visible 9    SHOW MORE, APPENDS
 *                     <a class="more-posts-text-container">, more-posts x1,
 *                     pagination-nav x0. Driven on live it steps 9 -> 18 -> 20 on
 *                     all three bands, then the control removes itself.
 *
 *   20 blog posts     declared 19, visible 10   NO CONTROL AT ALL
 *                     more-posts x0, pagination-nav x0. LIVE ITSELF strands the
 *                     other nine — measured in a fresh browser after a full scroll
 *                     settle on 60 of 60 post/band records
 *                     (tools/probe-blog-control-live.mjs, whose positive control on
 *                     /blog PASSED, so "no control" is not the probe failing to see
 *                     one). So there is nothing to reveal there and nothing to hide;
 *                     the rule below has no subject on those 20 pages.
 *
 * There is NO numbered pagination-nav anywhere on this site; the "pager / replaces"
 * shape the inherited file described has no instance here.
 *
 * blog.rss independently declares 20 items, which is the cross-check that makes a
 * truncated /blog fail rather than ship quietly, and the captured alias set equals it
 * exactly in both directions.
 *
 * A static build has no Duda backend, so every card ships and the ones past the
 * first batch are stamped mg-blog-hidden with data-mg-blog-page; runtime.js reveals
 * them in live's own step size of 9. This rule is what hides them initially — 44
 * cards on the one page that has a control.
 * ------------------------------------------------------------------------- */
#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 swapped instead of pinning the initial state;
 * runtime.js does not have to re-stamp anything. */
#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 THREE INDEPENDENT WAYS: the
 * tablet document is BYTE-IDENTICAL to the desktop one on 41 of 41 paths under an
 * iPad UA and differs from mobile on 41 of 41 (tools/measure-served-fork.mjs); the
 * Duda EXPORT agrees on 14 of 14 pages after normalising rendition suffixes and the
 * device word; and the /404 document fetched at three UAs comes back as exactly TWO
 * distinct bodies. dmtemplateid is Hamburger on desktop and tablet and
 * mobileHamburgerLayout on phone, and data-responsive-name is
 * ResponsiveDesktopTopTabletHamburger — the template gotcha 62 names for this fork.
 *
 * The `mg-only-t` gate still carries real content: the two bands are ONE document
 * settled at TWO viewports, so Duda's runtime decorates them differently (skrollr
 * classes on desktop only, per-viewport rendition suffixes, band classes), and
 * build-pages.py emits three pieces wherever the captures disagree — 53 occurrences
 * of each gate across 29 of the 41 built pages.
 *
 * THE BAND BOUNDARIES ARE DUDA'S OWN AND WERE MEASURED TWO INDEPENDENT WAYS ON THIS
 * SITE, not carried forward:
 *
 *   (a) the media queries the ported cascade actually contains, counted over all
 *       200 emitted sheets:
 *          max-width: 767px   x141      min-width: 768px   x124
 *          max-width: 1024px  x70       min-width: 1025px  x49
 *
 *   (b) behaviour, by sweeping 12 viewport widths on LIVE with a desktop UA and
 *       reading the drawer's painted width
 *       (tools/scratch/probe-band-edges.mjs):
 *          320 -> 128.00   375 -> 150.00   600 -> 240.00   767 -> 306.80
 *          768 -> 307.19   860 -> 344.00  1023 -> 409.19  1024 -> 409.59
 *         1025 -> 0       1200 -> 0       1440 -> 0
 *       The ratio is 0.400 at every one of the nine widths up to 1024 — a clean
 *       40vw over NINE data points, not two, which is what makes it a ratio rather
 *       than a coincidence (gotcha 74) — and the drawer is gone from 1025, where the
 *       hamburger button also stops painting. The two readings agree exactly, so
 *       1025 is the desktop edge on evidence rather than by assuming 1024+1.
 *
 *       NOTE THE UA: that sweep is a DESKTOP UA, so it gets the DESKTOP document at
 *       every width and reads #hamburger-drawer throughout. Under the harness's own
 *       phone profile 375 gets the PHONE document and a different element,
 *       #mobile-hamburger-drawer at 318.75px = 85vw. Both are live's real behaviour
 *       for their respective clients; conflating them is gotcha 66.
 *
 * So: mobile <=767, tablet 768-1024, desktop >=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 — hiding
 * all three and restoring one with `display: revert` reverts past the author cascade
 * to the UA default and replaces 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;
  }
}

/* ---------------------------------------------------------------------------
 * SLIDERS: THIS SITE HAS THEM, AND THEY DO NOT MOVE. NO RULE IS NEEDED HERE.
 *
 * The inherited copy asserted 36 widgets declaring isAutoPlay TRUE with
 * directionNav TRUE. Re-censused over all 40 raw served documents, parsing each
 * widget's OWN sliderscriptparams payload:
 *
 *     .flexslider                                57 widgets on 17 of 40 pages
 *     ssrimageslider / .bgGallerySlide /
 *     [data-gallery-bg] / <video>                0, in served html AND captures
 *
 * All 57 fall into a SINGLE bucket:
 *   { isAutoPlay: false, directionNav: false, isFade: true, slideshowSpeed: 7000,
 *     animationDuration: 600, pausePlay: true, controlNav: false }
 * and EVERY ONE HAS EXACTLY ONE <li> SLIDE, so there is nothing to advance to, no
 * arrows to bind, and a single slide cannot cross-fade to anything.
 *
 * Verified on the served build against live rather than reasoned about:
 * check-slider.mjs over 45 slider roots on 8 pages x 3 widths returns 45 ok /
 * 0 failed, with every MOTION assertion honestly SKIPPED ("1 real slide — nothing
 * to advance"). A skip is not a pass, and it is recorded as a skip.
 *
 * Consequences, and both matter:
 *   * NOTHING IS EXCLUDED FROM THE PIXEL GATE on rotation grounds. An exclusion that
 *     is not needed is not free — it costs that region's entire pixel coverage.
 *   * .flex-viewport is absent, which is gotcha 90's fact for an isFade slider. Any
 *     driver must neither BUILD one nor GATE on one; a fleet repo shipped
 *     `if (!viewport || !ul) return;` and thereby killed every fade slider it had.
 *
 * `ed-version` IS LOAD-BEARING and lives in the PORTED cascade, not here (gotcha 28).
 * ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
 * ACCORDION OPEN STATE — recovering a rule the live CSS read cannot see.
 *
 * The FAQ-style 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): the accordion
 * is on 38 of 40 pages, from 12 DISTINCT widget ids, 0 payloads failing to parse.
 * Its two flags do NOT agree across the site — 10 widgets are firstExpanded TRUE /
 * closeOthers TRUE and 2 are FALSE / TRUE — so both are stamped per widget from the
 * widget's own base64 payload rather than applied site-wide. And the auto-open is on
 * REVEAL, measured on live per widget: 38 of 38 covered, 36 auto-open when scrolled
 * into view, 2 stay closed, 0 errored. This site has no /faq page at all, so the
 * inherited note about /faq being the one page WITHOUT the widget has no subject
 * here — which is worth stating, because a probe aimed at /faq would 404 rather than
 * report clean.
 *
 * 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. The served
 * <style data-styled> is EMPTY and 20 rules are injected at runtime. Measured on live:
 *
 *     closed  .dygwmn  { overflow:hidden; transition:max-height .3s ease-out;
 *                        height:auto; max-height:0px }
 *     open    .eZPHSz  { … max-height:185px }
 *     open    .eDGbXZ  { … max-height:211px }
 *     open    .crqarE  { … max-height:236px }
 *
 * THE OPEN CLASS IS MINTED PER DISTINCT PIXEL HEIGHT, so items sharing a height share
 * a class. 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. The generous ceiling
 * below reproduces the SETTLED states exactly — closed is max-height:0 from the ported
 * cascade, open is "tall enough" — which is what the gate compares. It does NOT
 * reproduce live's per-item easing curve, and that is recorded as a deviation rather
 * than hidden: the 185/211/236 values are viewport- and font-dependent and were
 * measured on one page at one width, so pinning them site-wide would be a fabricated
 * precision, not a faithful one.
 *
 * 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;
}
