/*
 * European Alternatives — design tokens and site styles.
 *
 * Reference: data/sites/european-alternatives.devowl.io/concept/archive/header-footer-analysis.md
 * Mockup:    data/sites/european-alternatives.devowl.io/concept/mockups/01-base-layout/
 *
 * Sections: 1 fonts · 2 tokens · 3 header · 4 footer
 *
 * Loaded after Blocksy's global.css (enqueued with ['ct-main-styles'] as a
 * dependency), so plain-specificity overrides win. !important is used only
 * where Blocksy itself uses it.
 */

/* ---------- 1. Fonts ---------------------------------------------- */
@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/nunito-sans-normal-400.woff2") format("woff2");
}
@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/nunito-sans-normal-600.woff2") format("woff2");
}
@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("fonts/nunito-sans-normal-800.woff2") format("woff2");
}
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/lato-regular.woff2") format("woff2");
}
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/lato-bold.woff2") format("woff2");
}

/* ---------- 2. Tokens ---------------------------------------------- */
:root {
    --ea-blue: #003399;
    --ea-blue-hover: #002766;
    --ea-yellow: #f2b903;
    --ea-yellow-hover: #b28802;
    --ea-bg-secondary: #f5f7fa;

    --ea-header-bg: #ffffff;
    --ea-header-text: #333333;
    --ea-header-text-hover: var(--ea-blue);

    --ea-content-bg: #ffffff;
    --ea-content-bg-alt: #f0f3f7;
    --ea-content-border: #e8e8e8;
    --ea-content-faded: #999999;

    --ea-footer-bg: #333333;
    --ea-footer-border: #444444;
    --ea-footer-text: #bababa;
    --ea-footer-heading: #f5f5f5;

    --ea-font-body: Lato, sans-serif;
    --ea-font-heading: "Nunito Sans", sans-serif;
    --ea-h6-color: #535b7c;

    --ea-rail: 1080px;
    --ea-header-height: 80px;
    --ea-logo-height: 55px;
    --ea-gutter: 42.5px;
    --ea-section-y: 68px;
    --ea-section-x: 42.5px;
    --ea-burger-size: 24px;

    --ea-shadow-dropdown: 0 5px 15px rgba(0, 0, 0, 0.15);
    --ea-shadow-header: 0 1px 0 rgba(0, 0, 0, 0.08);
    --ea-shadow-panel: 0 3px 3px rgba(0, 0, 0, 0.1);

    /* Mobile panel: tint behind the current page's row. */
    --ea-active-bg: rgba(0, 51, 153, 0.06);
}

/* ===================================================================
   --ea-sticky-top — HOW MUCH OF THE VIEWPORT TOP IS ALREADY TAKEN

   Every sticky or fixed element on this portal wants to sit flush against the
   top of the browser window. Nothing on the portal is pinned above it: the
   masthead scrolls away, which is why `css/parts/ea-filter.css` settled the
   filter bar on `top: 0` in round 18 rather than on `var(--ea-header-height)`.
   The one exception is the WordPress admin bar, which is another product's
   fixed element and is present only for a signed-in editor.

   SO THE VALUE IS 0 FOR EVERY VISITOR and the ladder below exists only for the
   admin bar. It is not a guessed constant: measured on staging 2026-09-08 with
   Playwright, signed in, reading `#wpadminbar`'s own computed `position` and
   its own `getBoundingClientRect().height` at the widths WordPress switches on:

     width  1440  1025  1024   783 |  782   601 |  600   390   320
     pos    fixed fixed fixed fixed| fixed fixed| abs   abs   abs
     height   32    32    32    32 |   46    46 |  46    46    46

   Two switches, both of them core's (wp-includes/css/admin-bar.css): the bar
   grows to 46px at 782 and stops being `fixed` at 600, where it scrolls away
   with the page and therefore occupies nothing. A single hard-coded 32 is
   wrong at two of the three bands, which is why this is a ladder and not a
   number.

   `html { margin-top: 32px !important }` is NOT the discriminator, however
   convenient it looks: core keeps writing it at 600 and below, where the bar is
   `absolute`, so a rule derived from it would push the sticky element 46px down
   on a phone with nothing above it.

   THIS IS THE ONLY DECLARATION. It was written twice during round 19, in
   `records/ea-record-parts.css` and `css/pages/methodology.css`, because the
   agent that derived the ladder did not own this file; both copies were deleted
   when it was hoisted here on 2026-09-08. Every sticky element on the portal
   reads it: the two record bars, the methodology contents bar and the filter
   bar, which until then hard-coded the same intent as a literal `top: 0` and
   was therefore 32 or 46px wrong behind the admin bar.

   A NOTE FOR THE UCSS PASS: `body.admin-bar` never appears in a logged-out
   render, so LiteSpeed may drop the three rules below it. That is harmless and
   not worth an allowlist entry, because the `:root` value is the logged-out
   answer and it is the correct one.
   ===================================================================*/
:root {
    --ea-sticky-top: 0px;
}
body.admin-bar {
    --ea-sticky-top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar {
        --ea-sticky-top: 46px;
    }
}
@media screen and (max-width: 600px) {
    body.admin-bar {
        --ea-sticky-top: 0px;
    }
}

/*
 * Token naming: these are --ea-*, the mockup uses --color-*, --font-*,
 * --site-*. When a page stylesheet is copied out of mockups/01-base-layout/,
 * map them: --color-header-bg -> --ea-header-bg, --site-content-width ->
 * --ea-rail, --box-shadow -> --ea-shadow-dropdown, --font-family ->
 * --ea-font-body, --h1-font-family -> --ea-font-heading.
 *
 * Responsive spacing, measured breakpoint by breakpoint on the reference site.
 * Cumulative "everything below" queries, not bands: each one differs from the
 * previous only because a narrower query overrides it further down. Order
 * matters, do not reorder.
 *
 * The reference grows the bar to 100px and the burger to 32px between 1051 and
 * 1150px. Both were settled as defects (analysis section 8, row 3), so the bar
 * is 80px everywhere above 768px and the burger is 24px at every width.
 *
 *   >= 1051      bar  80px  logo 55  gutter 42.5  section 68 / 42.5
 *   1025 - 1050  bar  80px  logo 55  gutter 17    section 68 / 42.5
 *    769 - 1024  bar  80px  logo 55  gutter 17    section 42.5 / 42.5
 *    601 -  768  bar  70px  logo 50  gutter 17    section 42.5 / 25.5
 *   <=  600      bar  70px  logo 50  gutter 17    section 25.5 / 25.5
 */
@media (max-width: 1050px) {
    :root {
        --ea-gutter: 17px;
    }
}
@media (max-width: 1024px) {
    :root {
        --ea-section-y: 42.5px;
    }
}
@media (max-width: 768px) {
    :root {
        --ea-header-height: 70px;
        --ea-logo-height: 50px;
        --ea-section-x: 25.5px;
    }
}
@media (max-width: 600px) {
    :root {
        --ea-section-y: 25.5px;
    }
}

/*
 * Blocksy's reset applies -webkit-font-smoothing: antialiased to body
 * (static/sass/frontend/2-basics/reset.scss). The reference site leaves it at
 * auto, and antialiased renders Nunito Sans 600 visibly lighter. This is
 * invisible to getComputedStyle-based checks, so it has to be set deliberately.
 */
body {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

/* h6 is the one heading that is not EA blue. */
h6,
.entry-content h6 {
    color: var(--ea-h6-color);
}

/* Heading rhythm from the mockup. */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 1.5rem;
}
h2 {
    margin-bottom: 1rem;
}
h3 {
    margin-bottom: 1.3rem;
}

/*
 * Responsive headings. The reference inverts its own scale below 1281px (h6
 * 1.3rem against h5 1.1rem) and enlarges h4, h5 and h6 on phones where
 * everything else shrinks. Settled as a defect to repair (analysis section 8,
 * row 5): the scale is monotone at every width and only h1 changes.
 */
@media (max-width: 768px) {
    h1,
    .entry-content h1 {
        font-size: 39.1px;
    }
}

/* Focus affordance. Blocksy's own outline is a palette colour on a light
   background and disappears on the blue hero. */
:focus-visible {
    outline: 2px solid var(--ea-blue);
    outline-offset: 2px;
}

/* ---------- 3. Header ----------------------------------------------- */

/*
 * Blocksy switches desktop/mobile header rows at a hard-coded 999.98px and has
 * no option for it. The reference switches at 1149px, and both rows are always
 * rendered, so this re-declares Blocksy's own two media queries at the new
 * boundary. display:block for the mobile row, never flex: Blocksy's mobile row
 * is a block whose inner .ct-container is full width, and flex makes the
 * container shrink-to-fit so the burger lands next to the logo.
 */
@media (max-width: 1149.98px) {
    #header [data-device="desktop"] {
        display: none !important;
    }
    #header [data-device="mobile"] {
        display: block !important;
    }
    /*
     * The offcanvas has its OWN pair of [data-device] panes and Blocksy switches
     * them on the same hard-coded 999.98px. Moving only the header rows left a
     * dead band from 1000px to 1149px where the burger appeared but opened the
     * desktop pane, which is empty because every offcanvas item lives in the
     * mobile structure. The panel opened onto nothing.
     */
    #offcanvas .ct-panel-content[data-device="desktop"] {
        display: none !important;
    }
    #offcanvas .ct-panel-content[data-device="mobile"] {
        display: flex !important;
    }
}
@media (min-width: 1150px) {
    #header [data-device="desktop"] {
        display: block !important;
    }
    #header [data-device="mobile"] {
        display: none !important;
    }
    #offcanvas .ct-panel-content[data-device="desktop"] {
        display: flex !important;
    }
    #offcanvas .ct-panel-content[data-device="mobile"] {
        display: none !important;
    }
}

/* Fixed from the first pixel, never changes: no shrink, no shadow change,
   no hide-on-scroll. */
header.ct-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 111;
}
/* Never set min-height on .ct-header: the row shrinks, the header does not,
   and the surplus collects at the bottom as asymmetric whitespace. */
header.ct-header,
header.ct-header.ct-sticky-active {
    min-height: 0;
}

/*
 * Row height comes from --height, which Blocksy consumes as
 * [data-row] > div { min-height: var(--shrink-height, var(--height)) }.
 * Setting --header-height instead leaves the inner container at Blocksy's
 * 120px default while getComputedStyle(row).height still reports 80px.
 */
/*
 * Specificity note: Blocksy emits
 *   [data-header*="type-1"] .ct-header [data-row*="middle"] { --height:120px;
 *     background-color:var(--theme-palette-color-8); --theme-box-shadow:none; }
 * at (0,3,0), and the shadow itself is applied by #header [data-row] through an
 * ID selector, so box-shadow must be steered via --theme-box-shadow rather than
 * set directly. [data-header] on <body> plus the element selector puts this rule
 * at (0,3,1), one step above Blocksy's, without hardcoding the section id.
 */
[data-header] header.ct-header [data-row="middle"] {
    --height: var(--ea-header-height);
    --shrink-height: var(--ea-header-height);
    --theme-box-shadow: var(--ea-shadow-header);
    height: var(--ea-header-height);
    padding-left: var(--ea-gutter);
    padding-right: var(--ea-gutter);
    background-color: var(--ea-header-bg);
    background-image: none;
    color: var(--ea-header-text);
}

/*
 * The rail. Blocksy's container is width: var(--theme-container-width), which
 * resolves through a 90vw term, so overriding only max-width leaves a
 * 5%-per-side inset below ~1200px. width: 100% removes the vw term; the row's
 * own padding provides the gutter.
 */
[data-header] header.ct-header [data-row="middle"] > .ct-container {
    width: 100%;
    max-width: var(--ea-rail);
    padding-left: 0;
    padding-right: 0;
}

/* THE OFFSET IS GONE, BECAUSE THE PREMISE IN THE COMMENT ABOVE IT WAS WRONG.
   It read "the fixed bar does not push content, so the first section needs the
   offset". Measured 2026-09-05: `header.ct-header` computes
   `position: relative`, so the bar DOES push content and `main.site-main`
   already begins at y=80. The padding therefore counted the header twice.

   The visible cost was a strip of body colour under the header on every page,
   105.5px on the record templates and 80px on the composed ones, with
   methodology's first band starting at y=160 where the mockup starts it at
   y=80. It is the kind of defect that reads as "a bit of space" rather than as
   a fault, which is why it survived every structural gate.

   If a sticky header is ever switched on, the offset belongs on a rule that
   also tests for it, not on the container unconditionally. */

/* AND BLOCKSY'S OWN CONTAINER PADDING GOES WITH IT, on this portal only.
   With the double-count removed, `main.site-main` starts at y=80 and
   `.ct-container-full` then adds 60px of its own, so the first band still sat
   at y=140 where the mockup puts it at y=80. That padding is right for a theme
   whose content is a measure-width column on a page ground. Every page here
   opens with a full-bleed band that paints its own ground edge to edge, so the
   padding shows as a strip of body colour above the blue rather than as
   breathing room. The sections carry their own vertical rhythm, 48px on the
   identity band, so nothing is lost by removing it. */
main.site-main > .ct-container-full {
    padding-top: 0;
    padding-bottom: 0;
}

/*
 * Logo. Blocksy's logoMaxHeight clamps the <a>, not the <img>. Setting the
 * height on the img alone makes it render bigger while the grid cell, the row
 * and the header stay small, so the logo dangles out of a too-short bar.
 */
header.ct-header [data-id="logo"],
header.ct-header [data-id="logo"] .site-logo-container,
header.ct-header [data-id="logo"] a {
    height: var(--ea-logo-height);
    line-height: 0;
}
header.ct-header [data-id="logo"] img {
    height: var(--ea-logo-height);
    max-height: var(--ea-logo-height);
    width: auto;
}
/* Replaces the has_site_title / has_tagline panel options, which are per-item
   values this build does not write. */
header.ct-header [data-id="logo"] .site-title-container,
header.ct-header [data-id="logo"] .site-title,
header.ct-header [data-id="logo"] .site-description {
    display: none;
}

/* ---- desktop menu ---- */
/*
 * The reference's level-1 items are 50px tall and vertically centred in the
 * 80px bar, so the dropdown's `top: 50px` lands at y = 65 and leaves a visible
 * gap below the label. Blocksy's menu <ul> is a flex container with the default
 * align-items: stretch, so the <li> filled the full 80px row and the same
 * `top: 50px` landed at y = 50, putting the panel's edge level with the label's
 * own text. That reads as "not enough spacing" and is a position problem, not a
 * padding one: the padding measured identical to the reference throughout.
 */
header.ct-header [data-id="menu"] .menu {
    align-items: center;
}
header.ct-header [data-id="menu"] .menu > li {
    height: 50px;
}

header.ct-header [data-id="menu"] .menu > li > .ct-menu-link {
    display: flex;
    align-items: center;
    padding: 0 17px;
    font-family: var(--ea-font-heading);
    font-size: 18.7px;
    font-weight: 600;
    line-height: 50px;
    letter-spacing: 0;
    /* Blocksy's default menu font is uppercase; the reference is not. */
    text-transform: none;
    color: var(--ea-header-text);
    text-decoration: none;
    transition: color 0.2s;
}
/* Hover, current item and open parent share one colour. No background, no
   underline, no movement, no indicator bar. */
header.ct-header [data-id="menu"] .menu > li:hover > .ct-menu-link,
header.ct-header [data-id="menu"] .menu > li.current-menu-item > .ct-menu-link,
header.ct-header [data-id="menu"] .menu > li.current-menu-ancestor > .ct-menu-link,
header.ct-header [data-id="menu"] .menu > li.current-page-ancestor > .ct-menu-link {
    color: var(--ea-header-text-hover);
}
header.ct-header [data-id="menu"] .ct-menu-link::before,
header.ct-header [data-id="menu"] .ct-menu-link::after {
    display: none;
}

/*
 * The chevron sits inside the link, exactly as on the reference, so it needs no
 * padding compensation: the item is 17px + label + 23px + 17px either way. The
 * reference glyph is 22.44px on a 23px box with a 8.98px gap (analysis 3.6).
 */
header.ct-header [data-id="menu"] .ct-toggle-dropdown-desktop {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 23px;
    height: 50px;
    margin: 0;
    padding: 0;
    color: inherit;
}
header.ct-header [data-id="menu"] .ct-toggle-dropdown-desktop svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transform: none;
    transition: none; /* the reference chevron does not rotate on open */
}

/* ---- desktop dropdown ---- */
header.ct-header [data-id="menu"] .sub-menu {
    top: 50px;
    left: 0;
    /*
     * Blocksy sets width: var(--dropdown-width, 200px), a FIXED width, so the
     * panel stayed at its 204px min-width and the label overflowed its own
     * 20px padding: no gap on the right, none on the left either. The reference
     * shrink-wraps to the widest item (228px for this menu) with 204px as the
     * floor, which is what max-content restores.
     */
    width: max-content;
    max-width: 90vw;
    min-width: 204px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--ea-header-bg);
    color: var(--ea-header-text);
    box-shadow: var(--ea-shadow-dropdown);
    transform: none;
    transition:
        opacity 0.3s,
        visibility 0.3s;
}
header.ct-header [data-id="menu"] .sub-menu > li > .ct-menu-link {
    display: block;
    padding: 11.22px 20px;
    font-family: var(--ea-font-heading);
    font-size: 18.7px;
    font-weight: 600;
    line-height: 28.05px;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    text-align: left;
    text-decoration: none;
    color: var(--ea-header-text);
}
header.ct-header [data-id="menu"] .sub-menu > li > .ct-menu-link:hover {
    color: var(--ea-header-text-hover);
    background: transparent;
}

/* ---- language switcher ---- */
/*
 * TranslatePress locks the flag down with
 *   .trp-flag-image { width: var(--flag-size, 18px) !important;
 *                     aspect-ratio: var(--aspect-ratio, 4/3) !important;
 *                     height: auto !important; }
 * and adds object-fit: cover for custom flags. A round SVG in an 18x14 box is
 * therefore cropped top and bottom. Set its own variables rather than fighting
 * the !important, and drop the crop.
 */
header.ct-header .trp-flag-image,
#offcanvas .trp-flag-image {
    --flag-size: 20px;
    --aspect-ratio: 1 / 1;
    object-fit: contain;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}
/*
 * The reference places the header flag at x + 22px / y + 14px of the anchor
 * box. In-flow alignment alone lands 5px left of and 2.4px below that.
 */
header.ct-header [data-id="menu"] .menu > li.menu-item-object-language_switcher > .ct-menu-link .trp-flag-image {
    position: relative;
    top: -2.4px;
    margin-left: 5px;
    margin-right: 3px;
}
header.ct-header [data-id="menu"] .menu > li > .ct-menu-link .trp-ls-language-name {
    display: none;
}
header.ct-header [data-id="menu"] .sub-menu .trp-ls-language-name {
    display: inline;
}

/* ---- burger ---- */
/*
 * Blocksy draws an 18x14 SVG with three rx="1" rounded bars. The reference is
 * three square 24x2px bars 8px apart. Rather than stretch the viewBox (which
 * scales non-uniformly and rounds the ends), the rect geometry is set in CSS:
 * x, y, width, height and rx are CSS geometry properties in every current
 * browser. preserveAspectRatio defaults to "meet", so a 24x24 box scales the
 * 18x14 viewBox uniformly by 24/18 = 1.3333 and centres it.
 *   bar height  1.5 user units x 1.3333 = 2px
 *   bar spacing 6   user units x 1.3333 = 8px
 *   content centre y = 7 user units, so tops at 0.25 / 6.25 / 12.25
 */
header.ct-header [data-id="trigger"] {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 50px;
    padding: 0 13.6px;
    margin-right: -13.6px;
    border: 0;
    background: none;
    color: var(--ea-header-text);
}
header.ct-header [data-id="trigger"] .ct-label {
    display: none;
}
header.ct-header [data-id="trigger"] svg.ct-icon {
    width: var(--ea-burger-size);
    height: var(--ea-burger-size);
    fill: currentColor;
}
header.ct-header [data-id="trigger"] svg.ct-icon rect {
    height: 1.5px;
    rx: 0px;
    transform-box: fill-box;
    transform-origin: center;
    transition:
        y 0.2s cubic-bezier(0, 1, 0.8, 1) 0.2s,
        opacity 0.2s cubic-bezier(0, 1, 0.8, 1),
        transform 0.2s cubic-bezier(0, 1, 0.8, 1);
}
header.ct-header [data-id="trigger"] svg.ct-icon rect:nth-child(1) {
    y: 0.25px;
}
header.ct-header [data-id="trigger"] svg.ct-icon rect:nth-child(2) {
    y: 6.25px;
}
header.ct-header [data-id="trigger"] svg.ct-icon rect:nth-child(3) {
    y: 12.25px;
}

/* Open state: the bars slide to the centre first, then rotate into an X.
   45deg and 135deg because the rects are siblings, not nested. The mockup
   nests them (`.ea-burger__icon > span` rotates 45deg and its `::after` adds
   another 90deg on top), so its absolute angles are 45 / 45 / 135 with the top
   bar faded out. Flattened onto three siblings, that is what the three rules
   below declare.

   EVERY ONE OF THESE IS AN INTERACTION-STATE RULE, gated on
   `[aria-expanded="true"]`, which a logged-out first render never carries. If
   LiteSpeed's UCSS is ever switched back on, this whole block is exactly the
   class of rule it drops, and the symptom would be a burger that stays three
   flat bars while the panel is open. It belongs in `litespeed_ucss_whitelist`
   together with the offcanvas rules below it.

   WHY ALL FIVE PROPERTIES ARE NAMED ON ALL THREE RECTS, and it is not
   tidiness. Blocksy ships its own burger-to-X animation and this build had
   never noticed, because both blocks fire at once and neither wins outright.
   Blocksy's, from `static/bundle/main.min.css`:

     .ct-header-trigger[aria-expanded="true"] .ct-icon[data-type] rect:nth-child(1),
     .ct-header-trigger[aria-expanded="true"] .ct-icon[data-type] rect:nth-child(3)
                                                     { width: 18px; y: 6.15px }
     …rect:nth-child(1) { x: 0; transform: rotate(45deg) }
     …rect:nth-child(2) { opacity: 0 }
     …rect:nth-child(3) { transform: rotate(-45deg) }

   Those selectors are (0,5,1) and the ones here are (0,5,3), so this file wins
   every property it DECLARES and Blocksy keeps every property it does not.
   The union, not either block, is what the browser drew. Measured on staging
   2026-09-09 at 390 with the panel hidden so the icon could be seen at all:

     rect 1  opacity 0  rotate(45)    <- transform leaked in from Blocksy
     rect 2  opacity 0  rotate(45)    <- OPACITY LEAKED IN, and this is the bug
     rect 3  opacity 1  rotate(135)

   Two of the three bars invisible, so the open state painted a single diagonal
   stroke, not an X. The one bar that matters is the middle one: this file
   turned it 45deg and never said it should stay visible, so Blocksy's
   `opacity: 0` (which is right for ITS animation, where the middle bar is the
   one that disappears) survived into ours, where the middle bar is the one
   that becomes an arm of the X.

   It went unseen for two reasons worth writing down. Blocksy's offcanvas
   covers the header at every burger width, and its own close button is an X in
   almost the same place, so the panel that hides the defect also supplies the
   glyph the defect removes; the icon is only visible while the panel slides in
   and out. And `interactions.mjs` asserted `rects[1].transform !== "none"`,
   which the leak satisfies, so a check that could not fail reported it green.

   The fix is therefore not a new animation and not the removal of an override.
   It is making these three rules EXHAUSTIVE over the properties Blocksy's
   open-state block sets — x, y, width, opacity, transform — so nothing of
   Blocksy's can survive into the union. Do not trim a declaration back out
   because it looks redundant: a declaration that repeats the closed-state
   value is what keeps a Blocksy declaration from taking its place. */
header.ct-header [data-id="trigger"][aria-expanded="true"] svg.ct-icon rect {
    transition:
        y 0.2s cubic-bezier(0, 1, 0.8, 1),
        opacity 0.2s cubic-bezier(0, 1, 0.8, 1) 0.2s,
        transform 0.2s cubic-bezier(0, 1, 0.8, 1) 0.2s;
}
/* Top bar: to the centre, then out. It rotates with the other two because in
   the mockup it is a child of the element that rotates. */
header.ct-header [data-id="trigger"][aria-expanded="true"] svg.ct-icon rect:nth-child(1) {
    x: 0;
    y: 6.25px;
    width: 18px;
    opacity: 0;
    transform: rotate(45deg);
}
/* Middle bar: the first arm of the X, and the one Blocksy was hiding. */
header.ct-header [data-id="trigger"][aria-expanded="true"] svg.ct-icon rect:nth-child(2) {
    x: 0;
    y: 6.25px;
    width: 18px;
    opacity: 1;
    transform: rotate(45deg);
}
/* Bottom bar: to the centre, then the second arm. */
header.ct-header [data-id="trigger"][aria-expanded="true"] svg.ct-icon rect:nth-child(3) {
    x: 0;
    y: 6.25px;
    width: 18px;
    opacity: 1;
    transform: rotate(135deg);
}

/* ---- mobile panel ---- */
/*
 * ACCEPTED DEVIATION (analysis section 8, row 9). The reference drops a
 * full-width white sheet below the bar. Blocksy reveals its offcanvas only from
 * the left or the right and has no sheet mode, so the build keeps Blocksy's own
 * panel behaviour and carries the European Alternatives design into it.
 *
 * Everything in this block is mobile-only: the panel does not exist above the
 * burger breakpoint.
 *
 * Panel DOM, which is not obvious and drives the rules below:
 *   .ct-panel-inner
 *     .ct-panel-actions                       -> the close button, on its own
 *     .ct-panel-content[data-device=desktop]  -> empty here
 *     .ct-panel-content[data-device=mobile]   -> the logo and the menu
 * The logo therefore sits BELOW the close button in the DOM. It is lifted onto
 * the same row by absolute positioning rather than by restructuring, which
 * would mean fighting Blocksy's panel renderer.
 *
 * Specificity: Blocksy paints the panel from
 *   [data-header*="type-1"] #offcanvas .ct-panel-inner
 * which carries an ID, so an ID is needed here too.
 *
 * AND EQUAL SPECIFICITY IS NOT ENOUGH, which cost this build a regression on a
 * signed-off surface. `[data-header]` and `[data-header*="type-1"]` are both
 * (0,1,0), so the two selectors tie at (1,2,0) and the winner is whichever the
 * bundle prints last. Measured in the served LiteSpeed bundle on 2026-09-04:
 * this rule at byte 109,629 and Blocksy's at 164,581, so Blocksy won by about
 * 55 KB of source order and the mobile panel painted its dark default,
 * rgba(18, 21, 25, 0.98), over a white one that had been signed off.
 *
 * The attribute is repeated to take this to (1,3,0), which wins on specificity
 * and is therefore independent of where a combining cache decides to put it.
 * Repeating a selector is ugly and it is the honest instrument here: the
 * alternative is `!important`, which this file reserves for the places Blocksy
 * itself uses it, or re-ordering the enqueue, which is a promise about a cache
 * rather than about CSS.
 */
[data-header][data-header] #offcanvas .ct-panel-inner {
    position: relative;
    padding: 0;
    background-color: var(--ea-header-bg);
    color: var(--ea-header-text);
    border-radius: 0;
}

/* --- panel header row: logo left, close right, mirroring the site header --- */
[data-header] #offcanvas .ct-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: var(--ea-header-height);
    padding: 0 17px;
    margin: 0;
    border-bottom: 1px solid var(--ea-content-border);
}
[data-header] #offcanvas .ct-panel-actions .ct-toggle-close,
[data-header] #offcanvas .ct-panel-actions .ct-toggle-close svg {
    color: var(--ea-header-text);
    fill: currentColor;
}
[data-header] #offcanvas .ct-panel-actions .ct-toggle-close {
    width: 44px; /* touch target */
    height: 44px;
    margin: 0;
    justify-content: flex-end;
}

#offcanvas [data-id="offcanvas-logo"] {
    position: absolute;
    top: 0;
    left: 17px;
    z-index: 1;
    display: flex;
    align-items: center;
    height: var(--ea-header-height);
    margin: 0;
}
#offcanvas [data-id="offcanvas-logo"] .site-logo-container,
#offcanvas [data-id="offcanvas-logo"] a {
    display: block;
    height: 40px;
    line-height: 0;
}
#offcanvas [data-id="offcanvas-logo"] img {
    height: 40px;
    max-height: 40px;
    width: auto;
}
#offcanvas [data-id="offcanvas-logo"] .site-title-container,
#offcanvas [data-id="offcanvas-logo"] .site-title,
#offcanvas [data-id="offcanvas-logo"] .site-description {
    display: none;
}

/* --- menu --- */
#offcanvas .ct-panel-content-inner {
    padding: 0;
}
#offcanvas [data-id="mobile-menu"] {
    margin: 0;
}
#offcanvas [data-id="mobile-menu"] > ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/*
 * A separator per item. The reference's sheet gets its structure from the white
 * card against the page behind it; a full-height side panel has no such edge,
 * so without rules the items read as floating in empty space.
 */
#offcanvas [data-id="mobile-menu"] > ul > li {
    border-bottom: 1px solid var(--ea-content-border);
}
#offcanvas [data-id="mobile-menu"] > ul > li:last-child {
    border-bottom: 0;
}

/*
 * Blocksy wraps a link that has children in <span class="ct-sub-menu-parent">,
 * so `> li > .ct-menu-link` misses exactly the items with a submenu and leaves
 * them unstyled. Style every link in the panel and override level 2 by
 * specificity instead of by child combinator.
 */
/*
 * The gutter belongs to the ROW, not to the label. With the padding only on the
 * link, the caret sat in the flex line beside it and overhung the panel edge by
 * 5px. Both the label and the caret now sit inside one 17px gutter, the same one
 * the close button above them uses.
 */
#offcanvas [data-id="mobile-menu"] .ct-menu-link {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 17px;
    font-family: var(--ea-font-heading);
    font-size: 18.7px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    text-decoration: none;
    color: var(--ea-header-text);
    transition: color 0.2s;
}
#offcanvas [data-id="mobile-menu"] .ct-menu-link:hover {
    color: var(--ea-header-text-hover);
}

/*
 * The current page gets a tinted row and a 3px accent on top of the blue label.
 * The language switcher is excluded by name: TranslatePress marks the active
 * language with .current-language-menu-item and Blocksy also treats that item as
 * a current menu item, so without the :not() the switcher would light up as if
 * it were the page you are on.
 */
#offcanvas [data-id="mobile-menu"] > ul > li.current-menu-item:not(.trp-language-switcher-container),
#offcanvas [data-id="mobile-menu"] > ul > li.current_page_item:not(.trp-language-switcher-container),
#offcanvas [data-id="mobile-menu"] > ul > li.current-menu-ancestor:not(.trp-language-switcher-container),
#offcanvas [data-id="mobile-menu"] > ul > li.current-page-ancestor:not(.trp-language-switcher-container) {
    background: var(--ea-active-bg);
    box-shadow: inset 3px 0 0 var(--ea-blue);
}
#offcanvas [data-id="mobile-menu"] li.current-menu-item:not(.trp-language-switcher-container) > .ct-menu-link,
#offcanvas [data-id="mobile-menu"] li.current_page_item:not(.trp-language-switcher-container) > .ct-menu-link,
#offcanvas
    [data-id="mobile-menu"]
    li.current-menu-item:not(.trp-language-switcher-container)
    > .ct-sub-menu-parent
    > .ct-menu-link,
#offcanvas
    [data-id="mobile-menu"]
    li.current_page_item:not(.trp-language-switcher-container)
    > .ct-sub-menu-parent
    > .ct-menu-link,
#offcanvas [data-id="mobile-menu"] .sub-menu li.current-menu-item > .ct-menu-link {
    color: var(--ea-header-text-hover);
}
/* The parent wrapper has to lay the link and its caret out on one row. */
#offcanvas [data-id="mobile-menu"] .ct-sub-menu-parent {
    display: flex;
    align-items: center;
    padding-right: 17px;
}
#offcanvas [data-id="mobile-menu"] .ct-sub-menu-parent > .ct-menu-link {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
}

/* The caret is a 44px touch target, not a 15px icon. */
/*
 * flex: 0 0 44px, not width: 44px. The link beside it is a flex item that grows,
 * so with the default flex-shrink: 1 the caret was squeezed from its declared
 * width down to its content, 25px, and then overhung the gutter.
 */
#offcanvas [data-id="mobile-menu"] .ct-toggle-dropdown-mobile {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: flex-end;
    min-height: 56px;
    /* Blocksy adds margin-right: -5px here, which pulled the caret back out of
       the row's gutter after the flex fix. */
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    /* #888888 and not --ea-content-faded (#999999): the caret is a control, so
       it needs 3:1 (WCAG 1.4.11). #999999 measured 2.56:1 on the open menu's
       tinted background (#f0f3f9) on 2026-12-01, #888888 measures 3.19:1, the
       lightest grey that passes, so the look moves as little as it must. */
    color: #888888;
}
#offcanvas [data-id="mobile-menu"] .ct-toggle-dropdown-mobile svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
#offcanvas [data-id="mobile-menu"] li.active > .ct-sub-menu-parent > .ct-toggle-dropdown-mobile {
    color: var(--ea-header-text-hover);
}

/*
 * Submenu: a tinted, inset block so the nesting is legible without an indent
 * guide. Blocksy draws a bullet before each child (data-submenu-dots="yes");
 * the reference has none.
 */
#offcanvas [data-id="mobile-menu"] .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--ea-bg-secondary);
    border-top: 1px solid var(--ea-content-border);
}
#offcanvas [data-id="mobile-menu"] .sub-menu > li + li {
    border-top: 1px solid var(--ea-content-border);
}
#offcanvas [data-id="mobile-menu"] .sub-menu .ct-menu-link {
    min-height: 48px;
    padding-left: 34px;
    padding-right: 17px;
    font-size: 17px;
    font-weight: 400;
}
#offcanvas [data-id="mobile-menu"] .sub-menu .ct-menu-link::before,
#offcanvas [data-id="mobile-menu"] .sub-menu .ct-menu-link::after {
    content: none;
    display: none;
}

/*
 * The language switcher closes the list. It must not inherit the current-item
 * blue: TranslatePress marks the active language with
 * .current-language-menu-item, which Blocksy also treats as a current menu
 * item, so without the exclusion the switcher lights up as if it were the page
 * you are on.
 *
 * IT IS NO LONGER PLAYED DOWN, and that is the client's correction of
 * 2026-09-07 (item G19): "the language chooser is formatted entirely
 * differently from every other menu item; make it visually distinct without
 * looking like something else." An earlier pass had reasoned it was the least
 * important row and typed it a step smaller and a weight lighter. Measured at
 * 390 before the change, with the drawer open: every navigation row ran
 * 18.7px / 600 on a 56px link, and this one ran 17px / 400 on a 48px link, so
 * it read as a different kind of thing rather than as a quieter one.
 *
 * THE MOCKUP SETTLES IT AND IT IS NOT THE EARLIER READING.
 * `01-base-layout/css/ea-base.css` gives `.ea-menu__item--lang` no typography
 * of its own at all: its link is the same `.ea-menu__link` as every other item,
 * and the mobile block at `max-width: 1149px` adds exactly one rule for it,
 * `.ea-menu__item--lang .ea-lang-name { display: inline }`, which reveals the
 * language name beside the flag. So the mockup's differentiator is the FLAG,
 * plus the name the desktop hides, and nothing else.
 *
 * That is what is restored here: the same face, size, weight and row height as
 * the navigation above it, with the flag carrying the difference. The
 * current-item tint stays excluded, which is the one thing the earlier rule was
 * right about, and the flag grows from its inline default to the 20px the
 * mockup draws so it reads as an icon rather than as punctuation.
 */
#offcanvas [data-id="mobile-menu"] > ul > li.trp-language-switcher-container {
    background: none;
    box-shadow: none;
}
#offcanvas [data-id="mobile-menu"] li.trp-language-switcher-container > .ct-sub-menu-parent > .ct-menu-link,
#offcanvas [data-id="mobile-menu"] li.trp-language-switcher-container > .ct-menu-link {
    /* The navigation row's own metrics, restated so this selector's higher
       specificity cannot leave the item on Blocksy's defaults. */
    min-height: 56px;
    font-family: var(--ea-font-heading);
    font-size: 18.7px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ea-header-text);
}
/* The submenu row keeps the submenu's own step, exactly as a page submenu row
   does, so the open switcher nests the way "Services by Countries" does. */
#offcanvas [data-id="mobile-menu"] li.trp-language-switcher-container .sub-menu .ct-menu-link {
    min-height: 48px;
    font-size: 17px;
    font-weight: 400;
}
#offcanvas .trp-ls-language-name {
    display: inline;
}
#offcanvas .trp-flag-image {
    position: static;
    /* 20px is the mockup's `.ea-flag`; TranslatePress ships the image at 18px
       and at 18px beside an 18.7px label it reads as a smudge (G19). */
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* ---------- 4. Footer ----------------------------------------------- */
/*
 * Specificity note: Blocksy emits
 *   [data-footer*="type-1"] .ct-footer [data-row*="bottom"] { ... }
 * at (0,3,0), so the row rules below carry [data-footer] plus the element
 * selector to land at (0,3,1) without hardcoding the section id, exactly as the
 * header rows do.
 *
 * The rendered column attribute carries the ITEM ID, not an index:
 * data-column="widget-area-1", never data-column="1". `.ct-footer-column` does
 * not exist anywhere in Blocksy.
 */
/* Blocksy paints the footer from its section settings at (0,2,0); [data-footer]
   on <body> plus the element selector lands one step above that. */
[data-footer] footer.ct-footer {
    background-color: var(--ea-footer-bg);
    color: var(--ea-footer-text);
}

[data-footer] footer.ct-footer [data-row] {
    padding: var(--ea-section-y) var(--ea-section-x);
    background-color: transparent;
}
/* padding: 0 on all sides, not just left/right. Blocksy gives the footer
   container padding: 25px 0 with a 50px grid gap, which made the copyright band
   219px tall instead of the reference's 169px. */
[data-footer] footer.ct-footer [data-row] > .ct-container {
    width: 100%; /* same 90vw inset as the header container */
    max-width: var(--ea-rail);
    padding: 0;
}

/* Three equal 326px columns inside the 1080px rail, 51px apart. */
[data-footer] footer.ct-footer [data-row="middle"] > .ct-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 51px;
}
[data-footer] footer.ct-footer [data-row="middle"] [data-column] {
    width: auto;
    padding: 0;
}

/* Alignment differs per column on purpose: left, centre, right. */
footer.ct-footer [data-column="widget-area-1"] {
    text-align: left;
}
footer.ct-footer [data-column="widget-area-2"] {
    text-align: center;
}
footer.ct-footer [data-column="widget-area-3"] {
    text-align: right;
}

/* Type. The heading is a <p class="ea-footer-heading">, so it needs to beat the
   footer's own paragraph rule on specificity, not on source order. */
footer.ct-footer .ea-footer-heading {
    margin: 0 0 17px;
    font-family: var(--ea-font-heading);
    font-size: 20.4px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ea-footer-heading);
}
footer.ct-footer p,
footer.ct-footer li {
    font-family: var(--ea-font-body);
    font-size: 14.45px;
    font-weight: 400;
    line-height: 32px;
    color: var(--ea-footer-text);
}
footer.ct-footer p {
    margin: 0 0 25.5px;
}

/* Links: no underline at rest, underline on hover, colour never changes.
   The reference declares a hover colour but never applies it to these links. */
footer.ct-footer a {
    color: var(--ea-footer-text);
    text-decoration: none;
}
footer.ct-footer a:hover {
    color: var(--ea-footer-text);
    text-decoration: underline;
}

footer.ct-footer .ea-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}
footer.ct-footer .ea-footer-links li {
    margin: 0 0 8.5px;
}

footer.ct-footer .ea-footer-logo {
    width: 70px;
    margin: 0;
}
footer.ct-footer .ea-footer-logo img {
    width: 70px;
    height: 70px;
}

/*
 * CTA. The reference keeps its base gradient and fades a second gradient in on
 * top.
 *
 * The overlay must NOT use a negative z-index. Tried first: base gradient on
 * ::before and hover gradient on ::after, both at z-index -1 inside an
 * isolation: isolate context. It renders correctly on first paint and then both
 * gradients vanish after scrollIntoView, with the computed styles unchanged, so
 * it is a compositing artefact rather than a cascade problem. The label is
 * wrapped in a <span> in the widget markup instead, which is what the approved
 * mockup does, and the overlay sits at z-index 0 underneath it.
 */
/*
 * .wp-block-buttons is a flex container, so the column's text-align: right does
 * not reach the button: it stayed hard left. Align the flex line instead.
 */
footer.ct-footer .ea-footer-cta {
    display: flex;
    justify-content: flex-end;
}

footer.ct-footer .ea-footer-cta .wp-block-button__link {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 10.71px 30.6px;
    border: 0;
    border-radius: 1.7px;
    font-family: var(--ea-font-body);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    /* Dark blue, not white (REVIEWS.md §1.4 item 3). White on this gradient
       measured 1.79:1 at the light end and 3.27:1 at the dark end, under the
       4.5:1 a 17px label needs. --ea-blue-900 measures 8.25:1 and 4.52:1 on
       the same two stops (2026-12-01), the portal's own blue-on-gold pairing
       one step darker, and the gradient stays as signed off. */
    color: var(--ea-blue-900);
    background: linear-gradient(135deg, var(--ea-yellow-hover) 0%, var(--ea-yellow) 100%);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition:
        box-shadow 0.3s,
        color 0.3s,
        transform 0.3s;
}
footer.ct-footer .ea-footer-cta .wp-block-button__link > * {
    position: relative;
    z-index: 1;
}
footer.ct-footer .ea-footer-cta .wp-block-button__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    border-radius: inherit;
    background: linear-gradient(30deg, var(--ea-yellow) 0%, var(--ea-yellow-hover) 50%);
    transition: opacity 0.3s ease;
}
footer.ct-footer .ea-footer-cta .wp-block-button__link:hover {
    color: var(--ea-blue-900);
    text-decoration: none;
}
footer.ct-footer .ea-footer-cta .wp-block-button__link:hover::after {
    opacity: 1;
}

/* Copyright band. */
[data-footer] footer.ct-footer [data-row="bottom"] {
    --theme-border-top: 1px solid var(--ea-footer-border);
    border-top: 1px solid var(--ea-footer-border);
}
footer.ct-footer .ea-footer-copyright {
    margin: 0;
    text-align: center;
}

/*
 * The three Real Cookie Banner consent controls.
 *
 * The separator is a PSEUDO-ELEMENT and not the literal " · " the widget used
 * to carry between the shortcodes, because a literal one is its own text node:
 * at 390 the row wrapped after it and left a dangling " · " hanging at the end
 * of the first line. Attached to the link, it wraps with the link it belongs to.
 *
 * Below 600 the row stacks instead and drops the separators altogether, which is
 * where the three labels stop fitting on one line at all. That is the same
 * breakpoint the submit form's own one-column gate uses; it is not a new one.
 */
footer.ct-footer .ea-consent-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 var(--ea-s2);
}
footer.ct-footer .ea-consent-links > a + a::before {
    content: "\00b7";
    margin-right: var(--ea-s2);
}
@media (max-width: 600px) {
    footer.ct-footer .ea-consent-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ea-s1) 0;
    }
    footer.ct-footer .ea-consent-links > a + a::before {
        content: none;
    }
}

/*
 * Below 768px the columns stack, everything left-aligns, and the mark and the
 * CTA column disappear. Confirmed as a deliberate mobile design decision
 * (analysis section 8, row 1), so it is reproduced rather than fixed.
 */
@media (max-width: 768px) {
    [data-footer] footer.ct-footer [data-row="middle"] > .ct-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
    footer.ct-footer [data-column="widget-area-1"],
    footer.ct-footer [data-column="widget-area-2"],
    footer.ct-footer [data-column="widget-area-3"] {
        text-align: left;
    }
    footer.ct-footer .ea-footer-copyright {
        text-align: left;
    }
    footer.ct-footer .ea-footer-cta {
        justify-content: flex-start;
    }
    footer.ct-footer .ea-footer-logo {
        display: none;
    }
    footer.ct-footer [data-column="widget-area-3"] {
        display: none;
    }
}
