/* ============================================================
   PRIVACY and TERMS — the pair's own bridge.

   ONE FILE FOR TWO PAGES, because they are one page twice: their scripts are
   byte-identical on the static site and `page-privacy.css` and `page-terms.css`
   differ by a single declaration. Loaded for both by `pag_v6_page_base()`.
   ============================================================ */

/* ------------------------------------------------------------
   1. WHERE THE OPENING PHOTOGRAPH IS CROPPED
   The one line the two static stylesheets do not share. Privacy's picture is
   cropped at 60% and Terms' at 45%, so `pag-v6-legal.css` carries Privacy's —
   it is that file, byte for byte — and Terms overrides it here against the body
   class every v6 page now carries.

   Scoped by handle rather than by `page-id-182`: the id is a number this build
   happened to assign, and it would mean a different page on a rebuilt install.
   ------------------------------------------------------------ */
body.pag-v6-terms .open-bg img{ object-position:center 45%; }

/* ------------------------------------------------------------
   2. A CLAUSE'S CHILDREN ARE ITS OWN
   v6 writes a clause as a `<section>` holding a heading, paragraphs and lists
   directly, and three of its rules depend on that being literally true:

       .cl > ul{ margin:var(--s4) 0 var(--s5) }
       .cl > ul:last-child{ margin-bottom:0 }
       .cl > *:last-child{ margin-bottom:0 }

   Elementor puts two divs between the clause and everything inside it, so all
   three matched the wrappers instead — every list in the document lost its
   spacing, and the last thing in each of eighty-five clauses kept a bottom
   margin it should not have.

   TWO FIXES, and the first one does not do the second's job.

   `display:contents` takes the wrappers out of the BOX tree, which is what puts
   the heading's own margin back into the clause's flow. It does NOT change the
   DOM, so `.cl > ul` still does not match through it — trap 3, and the reason
   the three rules below exist rather than a comment saying "handled".

   Restated against the markup that is actually there, with v6's own values read
   from the same tokens. `.elementor-widget-container` is the div the clause's
   markup sits inside, so its children are the clause's children.

   `> .elementor-widget`, not `> .elementor-element`: a container carries the
   second class but not the first, and there is no reason for a clause to hold
   one — but the narrower selector is what stops a later one being flattened by
   accident.
   ------------------------------------------------------------ */
body.pag-v6 .cl > .elementor-widget,
body.pag-v6 .cl > .elementor-widget > .elementor-widget-container{ display:contents; }

/* `:is()` covers BOTH shapes of Elementor's widget markup, and on this site the
   second one is the dead half. Elementor 4's "Optimized Markup" is on by
   default and drops `.elementor-widget-container` entirely — there is not one
   on any page of this build, so every bridge rule that names it has always been
   inert. The `> .elementor-widget` half is what does the work.

   Both are kept rather than the dead one deleted: turning that experiment off
   is a single setting, and the day somebody does, the container reappears
   between the clause and its markup and these rules have to keep matching. */
body.pag-v6 :is( .cl > .elementor-widget, .cl > .elementor-widget > .elementor-widget-container ) > ul{
  margin:var(--s4) 0 var(--s5);
}
body.pag-v6 :is( .cl > .elementor-widget:last-child, .cl > .elementor-widget:last-child > .elementor-widget-container ) > :last-child{
  margin-bottom:0;
}

/* An Elementor container is a flex column with a gap; v6's `.cl` is a plain
   block whose spacing comes entirely from the margins its children carry. With
   the wrappers gone the gap would be added on top of every one of them. */
body.pag-v6 .cl{ display:block; }

/* ------------------------------------------------------------
   3. THE CLAUSE TITLE'S LINE HEIGHT
   §13 of the shared bridge restates v6's heading rhythm against Elementor's
   `.elementor-heading-title{line-height:1}`, and h2 there is 1.12 — the size a
   SECTION of the homepage is set at. A clause title is not that: `.cl-h` sets
   1.3, deliberately, because thirty h2s inside one panel at section size is a
   document shouting every fifteen lines.

   §13's selector weighs (0,2,2) and `.cl-h` (0,1,0), so §13 won and every
   clause title came out 24.19px tall against v6's 28.08. Adding `.cl-h` to the
   selector is enough — (0,3,2) — and the value is the one `.cl-h` states four
   lines above it in the page's own stylesheet.
   ------------------------------------------------------------ */
body.pag-v6 h2.cl-h.elementor-heading-title{ line-height:1.3; }

/* ------------------------------------------------------------
   4. THE CONTENTS RAIL, THE ASIDE AND THE DISCLOSURE
   Each is one HTML widget inside a container, so the widget's two divs sit
   between the container and the markup. `.toc`, `.vitals` and `.toc-m` are all
   reached by descendant selectors and do not care — but `.toc` is
   `position:sticky` with its own scroll, and `.doc-aside` is the grid item the
   card sits in, so both need their contents to be the box they contain rather
   than a div inside a div inside them.
   ------------------------------------------------------------ */
body.pag-v6 .toc > .elementor-widget,
body.pag-v6 .toc > .elementor-widget > .elementor-widget-container,
body.pag-v6 .doc-aside > .elementor-widget,
body.pag-v6 .doc-aside > .elementor-widget > .elementor-widget-container,
body.pag-v6 .doc-body > .elementor-widget,
body.pag-v6 .doc-body > .elementor-widget > .elementor-widget-container{ display:contents; }

/* THE GAP ONLY, NOT `display`, AND THAT DISTINCTION COST A MEASUREMENT ROUND.
   These three are containers, so Elementor makes them flex columns with a gap,
   and v6 spaces their contents with margins — `.cl + .cl{margin-top:var(--s8)}`,
   `.toc-m{margin-bottom:var(--s7)}` — which the gap would be added to.

   The first version said `display:block`, which fixed that and broke the whole
   page below 1081px. `.toc{display:none}` lives inside
   `@media (max-width:1079px)` and weighs (0,1,0); an unconditional
   `body.pag-v6 .toc{display:block}` weighs (0,2,0) and beats it at EVERY width.
   So the rail never went away on a narrow window: it was auto-placed into a
   grid whose `grid-template-areas` no longer has a `rail`, which generated
   implicit columns, and the document came out 4086px taller at 900 and 13925px
   taller at 600.

   A bridge rule with no media query beats a v6 rule that has one, whatever it
   is. Third time this build: `.foot-end` in §10 of the shared bridge and the
   rail here. Set the property you actually need to change.
   ------------------------------------------------------------ */
body.pag-v6 .doc-body,
body.pag-v6 .toc,
body.pag-v6 .doc-aside{ gap:0; }

/* ------------------------------------------------------------
   5. HELLO ELEMENTOR'S HEADING MARGIN, IN RAW MARKUP
   `h1,h2,h3,h4,h5,h6{margin-block-start:.5rem}` ships in the parent theme's
   reset at (0,0,1). v6's own reset is `*{margin:0}` at (0,0,0) — LOWER — so on
   every heading that is not an Elementor Heading widget the parent theme wins
   and 8px appears above it.

   Only raw markup is affected, which on these pages is the `.card` blocks
   inside a clause: `<h4>Privacy Officer</h4>` and its five siblings. An
   Elementor Heading emits `.elementor-heading-title`, which carries its own
   reset, so nothing built as a widget ever showed it.

   Four clauses out of thirty on Privacy, and it is 8px per card: clauses 24, 25
   and 28 hold one card each and clause 30 holds three, so the page came out 48px
   short and every other clause measured exactly. The kind of difference that is
   only ever found by comparing all thirty rather than the first three.

   Restating 0 is restating v6's own reset, not inventing a value.

   `:where()` FOR THE SAME REASON AS §14 OF THE SHARED BRIDGE, and the first
   version without it proved the point immediately. Written as
   `body.pag-v6 .cl :is(h1…h6)` it weighs (0,2,1) — which beats the parent
   theme's rule, and also beats `.cl-sub{margin:var(--s7) 0 var(--s4)}` at
   (0,1,0). `.cl-sub` is an `<h3>`, and its 48px top margin is what separates
   the sub-clauses inside a long clause: clause 3 alone lost 144px of it.

   `:where(body.pag-v6 .cl)` weighs nothing, so the selector lands at (0,0,1):
   a tie with the rule it is undoing, won on load order, and a loss to every v6
   rule that means to set a margin on a heading.
   ------------------------------------------------------------ */
:where(body.pag-v6 .cl) :is(h1,h2,h3,h4,h5,h6){ margin-block-start:0; }
