/* ===================================================================
   ea/identity-band — what phase 4 ADDS to the band.

   The band's geometry is not here and must not move here. `.ea-id`,
   `.ea-id__stack`, `.ea-id__title`, `.ea-id__lead`, `.ea-id--light` and
   `.ea-id--media` are all in ea-content.css §5.1, ported value for value from
   the signed-off mockup. This file carries two things the port could not:
   the star arc as a pseudo-element, and the ranking disclosure on a blue band.
   ===================================================================*/

/* -------------------------------------------------------------------
   1. THE STAR ARC, AS A BACKGROUND RATHER THAN AN <img>

   In the mockups the motif is `<img class="ea-stars">` inside a
   `div.ea-id__stars` wrapper. In WordPress it is a pseudo-element, for three
   reasons in the order they matter.

   ONE. Every offset in `ea_star_clip_map()` is the CENTRE OF A SWEPT PLATEAU:
   `concept/verify/wp/`'s collision sweep proved that no drawn polygon lands
   behind type at that position. An image an editor can place makes each of
   those measurements a statement about a position the page no longer has, and
   the sweep goes on reporting green about it.

   TWO. An `<img>` inside a block renders in the editor canvas as a broken box,
   because the canvas does not resolve the mu-plugin's relative asset paths.

   THREE. The wrapper existed only to clip the image, and `.ea-band` already
   declares `overflow: hidden`.

   WHY THERE ARE NO OFFSETS IN THIS FILE. There are five measured hero-arc
   placements across the thirteen templates and no two agree:

     countries        top: calc(50% + 140px)   left: rail + 700px   440px
     alternatives-to  top: 50%                 left: rail + 700px   390px
     methodology      top: calc(50% + 40px)    left: rail + 792px   440px
     press-kit        top: calc(50% + 150px)   left: rail + 700px   440px  + clip
     submit-service   top: calc(50% + 96px)    left: rail + 700px   440px

   Each belongs to the page that swept it, so each ships in that page's own
   stylesheet in phases 5, 10 and 11 against the class this file switches on.
   Putting them here now would be five rules matching nothing, and by the time
   the templates arrived nobody would know which page each belonged to. That is
   ea-class-map.php's own reasoning for being a data file rather than a
   stylesheet, and it applies unchanged.

   HOW A TEMPLATE TURNS ONE ON. Pass `stars => '<slug>'` to the band, which puts
   `.ea-id--stars-<slug>` on the section, then declare in the template's
   stylesheet:

     .ea-id--stars-methodology::before {
         display: block;
         top: calc(50% + 40px);
         left: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2) + 792px);
         width: 440px;
     }

   AND PASTE THE CLIP FROM ea_star_clip_map() WITH ITS REASON. Both assets draw
   polygons outside their own viewBox, so an SVG's own viewport slices them and
   no offset can recover the points. The map's seventeen values each cut in a
   gap between stars in the asset's own coordinates. A placement shipped without
   its clip renders bitten stars, and `checkStars` cannot see it, because the
   harness does not model `clip-path`.
   ------------------------------------------------------------------- */

/* Both arcs are off until a placement names one. `content` is set here rather
   than in each placement rule so a template's rule is offsets only. */
.ea-id::before,
.ea-id::after {
    content: "";
    position: absolute;
    z-index: 0;
    display: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    pointer-events: none;
}

/* The hero arc. `aspect-ratio` replaces the mockup's `height: auto` on an
   `<img>`: a pseudo-element has no intrinsic ratio, so it is declared from the
   asset's own viewBox, 440 by 660. A placement sets `width` and the height
   follows, exactly as the image did. */
.ea-id::before {
    aspect-ratio: 440 / 660;
    background-image: url("../../assets/stars/stars-arc-hero.svg");
}

/* The corner segment, viewBox 240 by 240. The shared layer's own default for
   `.ea-stars--band-corner` is `display: none` with `right: -64px; bottom:
   -76px; width: 300px`, turned on per page inside a media query, so the same
   default holds here and the offsets travel with the placement. */
.ea-id::after {
    aspect-ratio: 1;
    right: -64px;
    bottom: -76px;
    width: 300px;
    background-image: url("../../assets/stars/stars-arc-corner.svg");
}

/* `.ea-id__stack` already carries `position: relative; z-index: 1`, so the
   content sits above both arcs. Restated as a comment rather than as a rule:
   duplicating it here would give the same declaration two owners. */

/* -------------------------------------------------------------------
   2. THE RANKING DISCLOSURE

   `.ea-provenance` is ea-content.css §5.28 and its comment says plainly that it
   may not be dropped at any breakpoint and may not move below the list it
   describes, because that is Art. 7(4a) of Directive 2005/29/EC rather than a
   design preference. Nothing in this file adds a media query to it, and nothing
   may.

   The one thing the port needs. §5.28 paints ink-500, which is right on the
   light surfaces it was written for. Inside a blue band `.ea-band p` at (0,1,1)
   beats `.ea-provenance` at (0,1,0) and the line renders solid white, which is
   legible and reads as body copy rather than as the quiet legal line it is. The
   rule below is (0,2,0) so it wins on specificity rather than on source order,
   and 0.78 white on --ea-blue-700 measures 7.15:1, the same treatment
   `.ea-band .ea-label` already uses.
   ------------------------------------------------------------------- */

.ea-id__basis {
    /* It sits in normal flow inside `.ea-id__stack` and inside no grid, so no
       column collapse can move it and no track can hide it. On the media
       variant it is inside `.ea-id__text`, which is a grid ITEM rather than a
       grid, so the same holds. */
    margin-top: var(--ea-s4);
}

.ea-band .ea-id__basis {
    color: rgba(255, 255, 255, 0.78);
}

/* THE LINK INSIDE IT NEEDS NO RULE HERE, and adding one would be the mistake
   rather than the fix. ea-content.css §2 already declares
   `.ea-main p a:not(.ea-btn)` for the underline at (0,2,2) and
   `.ea-main .ea-band p a:not(.ea-btn)` for gold on a band at (0,3,2). A rule
   written here would be (0,2,1), lose to both, and leave a second owner for a
   declaration that already has one. */

/* -------------------------------------------------------------------
   3. THE FIVE COMPOSED-PAGE PLACEMENTS

   WHY THEY ARE HERE AND NOT IN A PAGE STYLESHEET, which is what section 1
   above says should happen. Three of the five now do have a page stylesheet,
   `css/pages/methodology.css`, `css/pages/press-kit.css` and
   `css/pages/countries.css`, written on 2026-09-05, and every one of them
   deliberately LEFT THE ARCS OUT. countries.css says so under "NOT PORTED FOR
   A DIFFERENT REASON: THE STAR ARCS": the map from a page to its placement
   slug and the offsets that go with it belong to the band, and writing an
   offset into a page sheet would put a second owner on a geometry whose
   collision sweep lives here. The other two, submit-service and
   alternatives-to, have no page stylesheet and nothing enqueues one, so a
   placement written for them into a file that does not exist would reach no
   page at all.

   Both halves point at the same file. This sheet is registered as
   `ea-identity-band` and `ea_render_identity_band()` enqueues it wherever a
   band renders, composed page included, so it is the one file inside the
   band's own ownership that every one of the five actually loads. Each rule
   is scoped to its own placement class and therefore reaches exactly one
   page. If the ownership is ever moved, move a page's whole block below into
   its sheet unchanged, including the breakpoints and the clips, and delete it
   here rather than leaving both.

   EVERY VALUE IS PASTED FROM THE SIGNED-OFF MOCKUP WITH ITS BREAKPOINT AND
   ITS COMMENT, file and line named. Nothing here was chosen: the offsets are
   the centres of swept plateaus and the clips are ea_star_clip_map() entries,
   which is why the reasons travel with the numbers rather than being
   summarised.

   THE MOCKUP'S TWO ELEMENTS MAP ONTO THE TWO PSEUDO-ELEMENTS:
     img.ea-stars--band         (stars-arc-hero.svg)    ->  .ea-id::before
     img.ea-stars--band-corner  (stars-arc-corner.svg)  ->  .ea-id::after

   `height` is not restated on any of them. The mockup's `<img>` took its
   height from the asset's viewBox and `height: auto`; section 1 declares the
   same ratio as `aspect-ratio` on each pseudo-element, so a width is all a
   placement owes.
   ------------------------------------------------------------------- */

/* ---- methodology, css/pages/methodology.css:45, 388, 393, 460 ------
   The portal invariant is the SIZE OF A STAR, not the arc's share of the
   band: 440px renders a 68.5px star, as on the front page and About.
   Anchored to the RAIL, so the 792px is measured from its left edge. */
.ea-id--stars-methodology::before {
    display: block;
    top: calc(50% + 40px);
    left: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2) + 792px);
    width: 440px;
    transform: translateY(-50%);
}
/* 1359 is derived, not chosen: the arc's outermost star sits at viewport/2 +
   675, so it is whole only from 1360 up. Move the placement above and this
   breakpoint has to be re-derived. */
@media (max-width: 1359px) {
    .ea-id--stars-methodology::before {
        display: none;
    }
}
/* The corner arc takes section 1's own defaults here, `right: -64px;
   bottom: -76px; width: 300px`, which are ea-content.css §5.5's
   `.ea-stars--band-corner`. Only the switch is stated, exactly as the mockup
   states only the switch. */
@media (max-width: 860px) and (min-width: 768px) {
    .ea-id--stars-methodology::after {
        display: block;
    }
}
/* Do not remove this inset: `stars-arc-corner.svg` draws its 85 degree star
   outside its own 240-unit box, so the SVG viewport cuts it flat. 21% is 50.4
   units, inside the asset's gap between ink at 42.16 and 59.80.
   Do not compensate the padding split by pushing this arc further out either:
   at -96px the sweep is clean but the 45 degree star falls from 30.5 per cent
   to 2.7, and at -112px the 100 per cent star goes with it. */
@media (max-width: 767px) {
    .ea-id--stars-methodology::after {
        display: block;
        right: -80px;
        bottom: -80px;
        width: 300px;
        clip-path: inset(0 0 0 21%);
    }
}

/* ---- press-kit, css/pages/press-kit.css:89, 104, 695, 762, 805 -----
   The offset is measured from the RAIL's left edge, not the window's, so the
   clearance against the copy column is one number at every width. The asset
   draws its stars from 45.8% of its width, so its box may overlap that column.
   Do not remove the clip: `stars-arc-hero.svg` draws its first and last star
   outside its own viewBox, and both insets fall in gaps between stars. Because
   they are pixels rather than percentages they are tied to the 440px beside
   them: change that width and re-derive both numbers. */
.ea-id--stars-press-kit::before {
    display: block;
    top: calc(50% + 150px);
    left: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2) + 700px);
    width: 440px;
    transform: translateY(-50%);
    clip-path: inset(10px 0 17px 0);
}
/* The same defect in `stars-arc-corner.svg`, and `checkStars` cannot see an
   SVG's own viewport, so a green sweep is no evidence here: 20 per cent is 48
   of its 240 units, a gap between stars, so only the sliced end stars are
   dropped. The mockup declares this on `.ea-stars--band-corner` and
   `.ea-stars--closing-corner` in one rule. Only the band's half is here,
   because the closing band's arc is a different element with a different
   owner, and the other half is reported rather than duplicated. */
.ea-id--stars-press-kit::after {
    clip-path: inset(20% 0 0 20%);
}
@media (max-width: 1199px) {
    .ea-id--stars-press-kit::before {
        display: none;
    }
    .ea-id--stars-press-kit::after {
        display: block;
    }
}
/* -76px, not -68px: measured worst clearance to the lead across 601 to 767 is
   14px at -68 and 22px at -76, and the lead is copy that will be rewritten. */
@media (max-width: 768px) {
    .ea-id--stars-press-kit::after {
        width: 240px;
        right: -76px;
        bottom: -60px;
    }
}
/* Do not move the clip's edges: 20 per cent is 48 units and 47 per cent is
   112.8 of the asset's own box, each within a pixel of the midpoint of a gap
   between stars, so three stars are dropped whole and none is cut. */
@media (max-width: 600px) {
    .ea-id--stars-press-kit::after {
        display: block;
        width: 190px;
        right: -30px;
        top: -81px;
        bottom: auto;
        transform: rotate(90deg);
        clip-path: inset(20% 0 0 47%);
    }
}

/* ---- submit-service, css/pages/submit-service.css:42, 815, 924 -----
   The invariant is the SIZE OF A STAR, 72px, not the arc's share of the band:
   440px is what renders it, as on the front page, the country overview and the
   press kit. Anchored to the RAIL, not to the window. */
.ea-id--stars-submit-service::before {
    display: block;
    top: calc(50% + 96px);
    left: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2) + 700px);
    width: 440px;
    transform: translateY(-50%);
}
@media (max-width: 1200px) {
    .ea-id--stars-submit-service::before {
        display: none;
    }
    .ea-id--stars-submit-service::after {
        display: block;
    }
}
@media (max-width: 768px) {
    .ea-id--stars-submit-service::after {
        display: block;
        right: -40px;
        bottom: -140px;
        width: 220px;
        transform: rotate(180deg);
    }
}

/* ---- countries, css/pages/countries.css:23, 155, 162, 225 ----------
   Sized as a proportion of the ASSET, not of the band: 01 §9.4's invariant is
   the size of a star, so a shorter band shows fewer of them, never smaller
   ones. Anchored to the RAIL, so the clearance to the copy holds at every
   width. Rendered at /services-by-countries/. */
.ea-id--stars-countries::before {
    display: block;
    top: calc(50% + 140px);
    left: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2) + 700px);
    width: 440px;
    transform: translateY(-50%);
}
/* `stars-arc-corner.svg` draws two of its five stars outside its own
   `0 0 240 240` viewBox and an SVG clips at its canvas, so the 180 degree
   rotation is a correctness fix: it puts both cut edges off screen. */
@media (max-width: 1199px) {
    .ea-id--stars-countries::before {
        display: none;
    }
    .ea-id--stars-countries::after {
        display: block;
        right: -140px;
        bottom: -24px;
        width: 300px;
        transform: rotate(180deg);
    }
}
@media (max-width: 767px) {
    .ea-id--stars-countries::after {
        right: -34px;
        bottom: -142px;
        width: 220px;
    }
}

/* ---- alternatives-to, css/pages/alternatives-to.css:31, 38, 235, 429
   The offset is measured from the RAIL's left edge, not the window's, so the
   clearance against the copy column is one number at every width. This is the
   one placement whose hero arc is 390px rather than 440px, and the one whose
   corner arc overrides section 1's defaults at base width. Rendered at
   /alternative-to/. */
.ea-id--stars-alternatives-to::before {
    display: block;
    top: 50%;
    left: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2) + 700px);
    width: 390px;
    transform: translateY(-50%);
}
.ea-id--stars-alternatives-to::after {
    right: -48px;
    bottom: -56px;
    width: 220px;
}
@media (max-width: 1199px) {
    .ea-id--stars-alternatives-to::before {
        display: none;
    }
    .ea-id--stars-alternatives-to::after {
        display: block;
    }
}
/* The inset is not decoration: `stars-arc-corner.svg` draws its 85 degree star
   from x = -7.30 in a viewBox that starts at 0, so the ASSET's own viewport
   slices that star's left point flat at every placement. 21% is 50.4 units,
   inside the asset's gap between ink at 42.16 and 59.80, so it drops the
   bitten star and cuts no other. `bottom: -24px` is not a placement choice, it
   is the padding change's other half: the arc is anchored to the band's BOTTOM
   and the band's height did not move, so splitting the padding pushed the copy
   24px down the arc and nothing pushed the arc back. starsweep caught the
   result at 328, 488 and 496 as a 6px star tip on the lead's last line. */
@media (max-width: 767px) {
    .ea-id--stars-alternatives-to::after {
        display: block;
        right: -80px;
        bottom: -24px;
        width: 190px;
        clip-path: inset(0 0 0 21%);
    }
}

/* ---- article, css/pages/article-single.css:41, 52 ------------------
   THE ONE PLACEMENT THAT WAS PASSED AND NEVER DECLARED. `hub/single.php:139`
   passes `'stars' => 'article-corner'`, so every article band has carried
   `.ea-id--stars-article-corner` since the template shipped, and no stylesheet
   anywhere defined it. `.ea-id::after` ships `display: none`, so the arc was
   not merely mispositioned, it never painted at any width. Verified against the
   187 KB LiteSpeed-combined bundle rather than against the source: the class
   occurs 0 times in it while `ea-id--stars-methodology` occurs once, so the
   bundle is complete and the rule was genuinely absent.

   NO `clip-path`, AND THAT IS DELIBERATE. This is the one corner placement with
   no entry in `ea_star_clip_map()`, and the mockup computes `clip-path: none`
   at every width. Adding one because the neighbouring placements have one would
   change what the page draws.

   The mockup's own two reasons, kept verbatim because both are measurements
   rather than preferences:

     "300px is the portal's one corner-arc size rather than this band's
      preference: the same asset draws the same 61.8px star on every page, so a
      band that cannot hold the arc shows fewer stars, never smaller ones
      (01 §9.4)."

     "Swept, not chosen: these offsets are the ones that leave one whole 61.8px
      star and no collision at every 8px from 320 to 767, floor 10.2px at 456."

   So do not round these four numbers, and re-sweep if the band's padding
   changes. */
.ea-id--stars-article-corner::after {
    display: block;
    right: -64px;
    bottom: -76px;
    width: 300px;
}
@media (max-width: 767px) {
    .ea-id--stars-article-corner::after {
        right: -88px;
        bottom: -92px;
        width: 300px;
    }
}

/* ---- knowledge-hub, css/pages/knowledge-hub.css --------------------
   The hero band drew no arc at all: `ea_identity_band_page_stars()` held no
   entry for this page, so both pseudo-elements stayed at the base
   `display: none` and the blue band was bare. The map entry ships with this
   rule.

   `width: 300px`, NOT the mockup's 440. The mockup's `<img>` is bound by its
   container's width and letterboxes to 300x450 on this page, so 440 here would
   draw an arc the mockup never draws. Measured on the mockup, not read off its
   declaration.

   THE BOTTOM OFFSET IS THE PORTAL'S, NOT THE MOCKUP'S, and this is the one
   value that is deliberately different. At the mockup's `-12px` the arc's ink
   lands on the lead: 36x18 at 360 and 2x18 at 320. The cause is a band the
   mockup does not have, because the live identity band carries 48px of bottom
   padding where the mockup's hero carries 64, so the copy sits 16px lower
   relative to a bottom-anchored arc. The strip is restored at the width the arc
   appears rather than the offset being moved, which keeps the arc where the
   mockup puts it and fixes the thing that actually differs. Swept at fourteen
   widths from 320 to 900: clean at every one. */
.ea-id--stars-knowledge-hub::before {
    display: block;
    top: 50%;
    right: calc(max(var(--section-padding-x), (100% - var(--site-content-width)) / 2));
    width: 300px;
    transform: translateY(-50%);
}
@media (max-width: 900px) {
    .ea-id--stars-knowledge-hub::before {
        display: none;
    }
    .ea-id--stars-knowledge-hub::after {
        display: block;
        right: -70px;
        bottom: -12px;
        width: 190px;
        clip-path: inset(46% 0 0 21%);
    }
    /* The strip the arc stands in, which is the mockup's own and which the
       shared band does not give this page. Without it the offset above has to
       move and the arc stops being where the mockup draws it. */
    .ea-id--stars-knowledge-hub.ea-band {
        padding-bottom: var(--ea-s8);
    }
}
