/*
 * CBAM Advisory - surfaces (added in v42)
 *
 * One place for the "raised card" look used on the EU website: white cards with slightly rounded
 * corners and a soft shadow, a small yellow tab on top, photos that fill the top of the card and
 * zoom in slowly when the mouse is over them. Nothing here changes wording, layout order or logic;
 * it only changes how the existing boxes and photos are drawn.
 *
 * Every rule starts with "body" so it wins over the page CSS files whichever one loads last.
 * Palette is unchanged. The only new values are the shadow (a transparent version of #262626) and
 * the radius. Motion is switched off for visitors who ask their system for reduced motion.
 */

:root {
    --sf-radius: 8px;
    --sf-line: #EBEBEB;
    --sf-shadow: 0 1px 2px rgba(38, 38, 38, 0.08), 0 4px 12px rgba(38, 38, 38, 0.08);
    --sf-shadow-hover: 0 2px 4px rgba(38, 38, 38, 0.10), 0 8px 22px rgba(38, 38, 38, 0.16);
    --sf-tab: linear-gradient(#FFDE39, #FFDE39);
}

/* ---------- 1. Cards: white, raised, yellow tab ---------- */
body .eu-cbam .eu-stat,
body .eu-cbam .eu-scenario,
body .eu-cbam .eu-file,
body .eu-cbam .eu-next-card,
body .uk-cbam .uk-stat,
body .uk-cbam .uk-affect-card,
body .uk-cbam .uk-formula-box,
body .uk-cbam .uk-data-col,
body .uk-cbam .uk-timeline li,
body .about-page .about-facts,
body .about-page .about-member,
body .filing-page .fp-stat,
body .filing-page .fp-card,
body .filing-page .fp-split-body,
body .contact-page .cp-card,
body .contact-page .cp-address-panel,
body .reduce-page .rp-card,
body .reduce-page .rp-graph,
body .reduce-page .rp-panel,
body .reduce-page .rp-sector,
body .cbc-card,
body .hm-facts,
body .hm-card,
body .ds-card {
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
    background-color: #FFFFFF;
    background-image: var(--sf-tab);
    background-repeat: no-repeat;
    background-size: 40px 4px;
    background-position: 24px 0;
}

/* ---------- 2. Panels: soft grey, rounded, same yellow tab (no side bars) ---------- */
body .eu-cbam .eu-position,
body .eu-cbam .eu-contact,
body .uk-cbam .uk-position,
body .uk-cbam .uk-data-route,
body .uk-cbam .uk-contact,
body .about-page .about-story,
body .about-page .about-contact,
body .filing-page .fp-position,
body .filing-page .fp-form-block,
body .contact-page .cp-form-box,
body .reduce-page .rp-calc,
body .reduce-page .rp-callout,
body .reduce-page .rp-final,
body .hm-cta,
body .ds-panel {
    border: 0;
    border-radius: var(--sf-radius);
    background-color: #F4F4F4;
    background-image: var(--sf-tab);
    background-repeat: no-repeat;
    background-size: 40px 4px;
    background-position: 28px 0;
}

/* ---------- 3. Notes: keep the yellow bar, round the outer corners ---------- */
body .eu-cbam .eu-watch,
body .eu-cbam .eu-note,
body .uk-cbam .uk-watch,
body .uk-cbam .uk-note,
body .filing-page .fp-result,
body .about-page .about-note,
body .reduce-page .rp-note,
body .hm .section .container > p.hm-note,
body .contact-page .cp-sent,
body .ds-note {
    border-radius: 0 var(--sf-radius) var(--sf-radius) 0;
}

/* ---------- 4. Small boxes and chips ---------- */
body .eu-cbam .eu-tags li,
body .uk-cbam .uk-tags li,
body .filing-page .fp-flow-step,
body .reduce-page .rp-flow-step,
body .filing-page .fp-choice {
    border-radius: 6px;
}

body .eu-cbam .eu-scenario p.eu-scenario-response {
    border-radius: 0 6px 6px 0;
}

/* ---------- 5. Photo frames: photo fills the frame, rounded, raised ---------- */
body .eu-cbam .eu-hero-image,
body .eu-cbam .eu-split-media,
body .eu-cbam .eu-sector-media,
body .uk-cbam .uk-hero-image,
body .uk-cbam .uk-split-media,
body .filing-page .fp-hero,
body .filing-page .fp-split-media,
body .reduce-page .rp-hero,
body .ds-image-frame {
    padding: 0;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
    background: #FFFFFF;
    overflow: hidden;
}

/* Diagram and banner pictures have text printed on them: keep the white margin, no zoom */
body .eu-cbam .eu-banner,
body .uk-cbam .uk-banner {
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
}

/* The big photo beside the intro text fills its frame edge to edge (was inset by 8px) */
@media (min-width: 1000px) {
    body .eu-cbam .eu-intro > .eu-hero-image img,
    body .uk-cbam .uk-intro > .uk-hero-image img,
    body .filing-page .fp-intro > .fp-hero img,
    body .reduce-page .rp-intro > .rp-hero img {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Photos inside cards */
body .reduce-page .rp-sector-media {
    overflow: hidden;
    border-radius: 6px;
}

body .reduce-page .rp-sector-media img {
    border: 0;
    border-radius: 6px;
}

body .hm-vision .hm-card {
    overflow: hidden;
    background-image: none;
}

body .hm-vision img {
    border-bottom: 0;
}

body .hm-vision .hm-body {
    background-image: var(--sf-tab);
    background-repeat: no-repeat;
    background-size: 40px 4px;
    background-position: 24px 0;
    background-color: #FFFFFF;
}

/* Home process steps: photo and label bar are clipped to the rounded corners.
   (The step itself is not clipped, because the arrows between the steps sit outside it.) */
body .hm-step {
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
    padding: 0;
}

body .hm-step figure {
    overflow: hidden;
    border-radius: var(--sf-radius) var(--sf-radius) 0 0;
}

body .hm-step .hm-label {
    border-radius: 0 0 calc(var(--sf-radius) - 1px) calc(var(--sf-radius) - 1px);
}

/* ---------- 6. Hover: slow photo zoom, link cards lift their shadow ---------- */
body .eu-cbam .eu-hero-image img,
body .eu-cbam .eu-split-media img,
body .eu-cbam .eu-sector-media img,
body .uk-cbam .uk-hero-image img,
body .uk-cbam .uk-split-media img,
body .filing-page .fp-hero img,
body .filing-page .fp-split-media img,
body .reduce-page .rp-hero img,
body .reduce-page .rp-sector-media img,
body .hm-vision img,
body .hm-step figure img,
body .ds-image-frame img {
    transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}

body .eu-cbam .eu-hero-image:hover img,
body .eu-cbam .eu-split-media:hover img,
body .eu-cbam .eu-sector-media:hover img,
body .uk-cbam .uk-hero-image:hover img,
body .uk-cbam .uk-split-media:hover img,
body .filing-page .fp-hero:hover img,
body .filing-page .fp-split-media:hover img,
body .reduce-page .rp-hero:hover img,
body .reduce-page .rp-sector-media:hover img,
body .hm-vision .hm-card:hover img,
body .hm-step:hover figure img,
body .ds-image-frame:hover img {
    transform: scale(1.06);
}

body .hm-card,
body .contact-page .cp-link-card {
    transition: box-shadow 0.25s ease;
}

body .hm-card:hover,
body .contact-page .cp-link-card:hover {
    box-shadow: var(--sf-shadow-hover);
}

@media (prefers-reduced-motion: reduce) {
    body .eu-cbam .eu-hero-image img,
    body .eu-cbam .eu-split-media img,
    body .eu-cbam .eu-sector-media img,
    body .uk-cbam .uk-hero-image img,
    body .uk-cbam .uk-split-media img,
    body .filing-page .fp-hero img,
    body .filing-page .fp-split-media img,
    body .reduce-page .rp-hero img,
    body .reduce-page .rp-sector-media img,
    body .hm-vision img,
    body .hm-step figure img,
    body .ds-image-frame img,
    body .hm-card,
    body .contact-page .cp-link-card {
        transition: none;
    }

    body .eu-cbam .eu-hero-image:hover img,
    body .eu-cbam .eu-split-media:hover img,
    body .eu-cbam .eu-sector-media:hover img,
    body .uk-cbam .uk-hero-image:hover img,
    body .uk-cbam .uk-split-media:hover img,
    body .filing-page .fp-hero:hover img,
    body .filing-page .fp-split-media:hover img,
    body .reduce-page .rp-hero:hover img,
    body .reduce-page .rp-sector-media:hover img,
    body .hm-vision .hm-card:hover img,
    body .hm-step:hover figure img,
    body .ds-image-frame:hover img {
        transform: none;
    }
}

/* ---------- 7. Buttons and form fields: same soft corners ---------- */
body .eu-btn,
body .uk-btn,
body .about-btn,
body .about-contact-btn,
body .fp-btn,
body .rp-btn,
body .cp-btn,
body .cbc-btn,
body .hm-btn {
    border-radius: 6px;
}

body input[type="text"],
body input[type="email"],
body input[type="tel"],
body input[type="search"],
body select,
body textarea {
    border-radius: 4px;
}

/* ---------- 8. Step cards: the grey "You receive" bar runs the full card width ---------- */
body .filing-page .fp-card,
body .reduce-page .rp-card {
    overflow: hidden;
}

body .filing-page .fp-card-receive,
body .filing-page .fp-tech-note,
body .reduce-page .rp-card-receive {
    max-width: none;
}

/* =====================================================================
   v43 refinements
   ===================================================================== */

/* ---------- 9. Intro photo is exactly as tall as the text beside it ---------- */
@media (min-width: 1000px) {
    body .eu-cbam .eu-intro > .eu-hero-image,
    body .uk-cbam .uk-intro > .uk-hero-image,
    body .filing-page .fp-intro > .fp-hero,
    body .reduce-page .rp-intro > .rp-hero {
        min-height: 0;
    }
}

/* ---------- 10. Step rows ("Support at any stage", "How CBAM Advisory assesses..."):
   numbered, card look, thicker arrows, and a connector that shows the second row continues the first ---------- */
body .filing-page .fp-flow {
    counter-reset: fpflow;
    row-gap: 28px;
}

body .filing-page .fp-flow li {
    counter-increment: fpflow;
}

body .filing-page .fp-flow-step,
body .reduce-page .rp-flow-step {
    gap: 12px;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
}

body .filing-page .fp-flow-step::before {
    content: counter(fpflow);
    content: counter(fpflow) / '';
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4073AF;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
}

body .reduce-page .rp-flow-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

body .reduce-page .rp-flow {
    row-gap: 28px;
}

/* Arrows: same thick arrow as the Home page steps (the old text arrow is hidden) */
body .filing-page .fp-flow-arrow,
body .reduce-page .rp-flow-arrow {
    font-size: 0;
    color: transparent;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='24' viewBox='0 0 40 24'%3E%3Cpath d='M1 12H35M26 3L36 12L26 21' fill='none' stroke='%234073AF' stroke-width='3' stroke-linecap='square'/%3E%3C/svg%3E") no-repeat center / 28px 17px;
}

body .reduce-page .rp-flow-arrow::before {
    content: none;
}

/* Connector from the last box of one row to the first box of the next row */
@media (min-width: 900px) {
body .filing-page .fp-flow li:nth-child(4n):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% - 3 * (100% + 32px));
    width: calc(3 * (100% + 32px));
    height: 28px;
    pointer-events: none;
    background:
        linear-gradient(#4073AF, #4073AF) 0 50% / 100% 2px no-repeat,
        linear-gradient(#4073AF, #4073AF) 100% 0 / 2px 50% no-repeat,
        linear-gradient(#4073AF, #4073AF) 0 100% / 2px 50% no-repeat;
}

body .filing-page .fp-flow li:nth-child(4n):not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 20px);
    left: calc(50% - 3 * (100% + 32px) - 7px);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #4073AF;
}
}

@media (min-width: 640px) and (max-width: 899px) {
body .filing-page .fp-flow li:nth-child(2n):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% - 1 * (100% + 32px));
    width: calc(1 * (100% + 32px));
    height: 28px;
    pointer-events: none;
    background:
        linear-gradient(#4073AF, #4073AF) 0 50% / 100% 2px no-repeat,
        linear-gradient(#4073AF, #4073AF) 100% 0 / 2px 50% no-repeat,
        linear-gradient(#4073AF, #4073AF) 0 100% / 2px 50% no-repeat;
}

body .filing-page .fp-flow li:nth-child(2n):not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 20px);
    left: calc(50% - 1 * (100% + 32px) - 7px);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #4073AF;
}
}

@media (min-width: 901px) {
body .reduce-page .rp-flow-nodes li:nth-child(4n):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% - 3 * (100% + 32px));
    width: calc(3 * (100% + 32px));
    height: 28px;
    pointer-events: none;
    background:
        linear-gradient(#4073AF, #4073AF) 0 50% / 100% 2px no-repeat,
        linear-gradient(#4073AF, #4073AF) 100% 0 / 2px 50% no-repeat,
        linear-gradient(#4073AF, #4073AF) 0 100% / 2px 50% no-repeat;
}

body .reduce-page .rp-flow-nodes li:nth-child(4n):not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 20px);
    left: calc(50% - 3 * (100% + 32px) - 7px);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #4073AF;
}

body .reduce-page .rp-flow-chain li:nth-child(3n):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% - 2 * (100% + 32px));
    width: calc(2 * (100% + 32px));
    height: 28px;
    pointer-events: none;
    background:
        linear-gradient(#4073AF, #4073AF) 0 50% / 100% 2px no-repeat,
        linear-gradient(#4073AF, #4073AF) 100% 0 / 2px 50% no-repeat,
        linear-gradient(#4073AF, #4073AF) 0 100% / 2px 50% no-repeat;
}

body .reduce-page .rp-flow-chain li:nth-child(3n):not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 20px);
    left: calc(50% - 2 * (100% + 32px) - 7px);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #4073AF;
}
}

@media (min-width: 641px) and (max-width: 900px) {
body .reduce-page .rp-flow-nodes li:nth-child(2n):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% - 1 * (100% + 32px));
    width: calc(1 * (100% + 32px));
    height: 28px;
    pointer-events: none;
    background:
        linear-gradient(#4073AF, #4073AF) 0 50% / 100% 2px no-repeat,
        linear-gradient(#4073AF, #4073AF) 100% 0 / 2px 50% no-repeat,
        linear-gradient(#4073AF, #4073AF) 0 100% / 2px 50% no-repeat;
}

body .reduce-page .rp-flow-nodes li:nth-child(2n):not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 20px);
    left: calc(50% - 1 * (100% + 32px) - 7px);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #4073AF;
}

body .reduce-page .rp-flow-chain li:nth-child(2n):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: calc(50% - 1 * (100% + 32px));
    width: calc(1 * (100% + 32px));
    height: 28px;
    pointer-events: none;
    background:
        linear-gradient(#4073AF, #4073AF) 0 50% / 100% 2px no-repeat,
        linear-gradient(#4073AF, #4073AF) 100% 0 / 2px 50% no-repeat,
        linear-gradient(#4073AF, #4073AF) 0 100% / 2px 50% no-repeat;
}

body .reduce-page .rp-flow-chain li:nth-child(2n):not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 20px);
    left: calc(50% - 1 * (100% + 32px) - 7px);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #4073AF;
}
}

@media (max-width: 639px) {
    body .filing-page .fp-flow,
    body .reduce-page .rp-flow {
        row-gap: 12px;
    }
}

/* ---------- 11. Calculator: the field and button use the whole box width ---------- */
body .reduce-page .rp-calc-field {
    max-width: none;
}

@media (min-width: 901px) {
    body .reduce-page .rp-calc .rp-btn {
        min-width: 260px;
    }
}

/* ---------- 12. Sector cards: bigger photos ---------- */
@media (min-width: 901px) {
    body .reduce-page .rp-sector {
        grid-template-columns: 340px minmax(0, 1fr);
        gap: 32px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    body .reduce-page .rp-sector {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

/* ---------- 13. Wide panels use both halves (nothing empty on the right) ---------- */
@media (min-width: 1000px) {
    /* Independent Technology Assessment: the two paragraphs side by side */
    body .reduce-page .rp-callout {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    body .reduce-page .rp-callout p {
        max-width: none;
        margin: 0;
    }

    body .reduce-page .rp-callout p:first-child {
        padding-right: 40px;
    }

    body .reduce-page .rp-callout p:last-child {
        padding-left: 40px;
        border-left: 1px solid #CFCFCF;
    }

    /* Need to understand what is worth reducing: text left, button right */
    body .reduce-page .rp-final {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 48px;
        align-items: center;
    }

    body .reduce-page .rp-final > h2,
    body .reduce-page .rp-final > p {
        grid-column: 1;
    }

    body .reduce-page .rp-final > .rp-buttons {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin: 0;
    }

    /* About: company box in two halves */
    body .about-page .about-note {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 48px;
    }

    /* About: Speak With the Team - text left, buttons right */
    body .about-page .about-contact {
        display: grid;
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        column-gap: 48px;
        align-items: start;
    }

    body .about-page .about-contact > h2,
    body .about-page .about-contact > p {
        grid-column: 1;
    }

    body .about-page .about-contact > .about-buttons {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: end;
        margin: 0;
    }

    body .about-page .about-contact > .about-contact-buttons {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
        margin-top: 12px;
    }

    /* Contact: the form box is as tall as the three cards, the message box takes the spare height */
    body .contact-page .cp-layout .cp-form-box {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    body .contact-page .cp-layout .cp-form {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    body .contact-page .cp-layout .cp-field:has(textarea) {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    body .contact-page .cp-layout .cp-form textarea {
        flex: 1 1 auto;
        min-height: 180px;
    }
}

/* Form: the Send button keeps its own width (the form column is a flex column now) */
body .contact-page .cp-layout .cp-form .cp-btn {
    align-self: flex-start;
}

/* Step chips and the narrow contact cards stay left aligned */
body .filing-page .fp-flow li,
body .reduce-page .rp-flow li,
body .contact-page .cp-card {
    text-align: left;
}

/* =====================================================================
   v45 refinements
   ===================================================================== */

/* ---------- 14. Step rows on phones: one column, a thin line with an arrowhead joins one step to the next ---------- */
@media (max-width: 639px) {
    body .filing-page .fp-flow {
        row-gap: 32px;
    }

body .filing-page .fp-flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 31px;
    width: 2px;
    height: 32px;
    background: #4073AF;
    pointer-events: none;
}

body .filing-page .fp-flow li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 24px);
    left: 26px;
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #4073AF;
}
}

@media (max-width: 640px) {
    body .reduce-page .rp-flow {
        row-gap: 32px;
    }

    body .reduce-page .rp-flow-arrow {
        display: none !important;
    }

body .reduce-page .rp-flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 27px;
    width: 2px;
    height: 32px;
    background: #4073AF;
    pointer-events: none;
}

body .reduce-page .rp-flow li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(100% + 24px);
    left: 22px;
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #4073AF;
}
}


/* ---------- 15. Buttons and links react when you point at them, press them or tab to them ---------- */
body .eu-btn,
body .uk-btn,
body .about-btn,
body .about-contact-btn,
body .fp-btn,
body .rp-btn,
body .cp-btn,
body .cbc-btn,
body .hm-btn,
body .cookie-banner .cookie-btn {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
                box-shadow 0.2s ease, transform 0.2s ease;
}

body .eu-btn:hover,
body .uk-btn:hover,
body .about-btn:hover,
body .about-contact-btn:hover,
body .fp-btn:hover,
body .rp-btn:hover,
body .cp-btn:hover,
body .cbc-btn:hover,
body .hm-btn:hover,
body .cookie-banner .cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(38, 38, 38, 0.22);
}

body .eu-btn:active,
body .uk-btn:active,
body .about-btn:active,
body .about-contact-btn:active,
body .fp-btn:active,
body .rp-btn:active,
body .cp-btn:active,
body .cbc-btn:active,
body .hm-btn:active,
body .cookie-banner .cookie-btn:active {
    transform: translateY(0);
    box-shadow: none;
    transition-duration: 0.05s;
}

/* Text links: the underline thickens and the colour fades to the darker blue */
body a {
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease, text-decoration-thickness 0.2s ease;
}

body a:hover {
    text-decoration-thickness: 2px;
}

/* "Learn more" arrows move a little to the right */
body .hm-more::after {
    transition: transform 0.2s ease;
}

body .hm-more:hover::after,
body .hm-more:focus-visible::after {
    transform: translateX(5px);
}

/* Form fields: the frame fades in */
body input[type="text"],
body input[type="email"],
body input[type="tel"],
body select,
body textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
    body .eu-btn,
    body .uk-btn,
    body .about-btn,
    body .about-contact-btn,
    body .fp-btn,
    body .rp-btn,
    body .cp-btn,
    body .cbc-btn,
    body .hm-btn,
    body .cookie-banner .cookie-btn,
    body a,
    body .hm-more::after,
    body input,
    body select,
    body textarea {
        transition: none;
    }

    body .eu-btn:hover,
    body .uk-btn:hover,
    body .about-btn:hover,
    body .about-contact-btn:hover,
    body .fp-btn:hover,
    body .rp-btn:hover,
    body .cp-btn:hover,
    body .cbc-btn:hover,
    body .hm-btn:hover,
    body .cookie-banner .cookie-btn:hover,
    body .hm-more:hover::after {
        transform: none;
    }
}

/* ---------- 16. Finishing touches ---------- */

/* Smooth jump to a section when a link points to it (not for visitors who ask for less motion) */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* The skip link moves the keyboard focus to the main content without drawing a frame around the whole page */
body #main-content:focus {
    outline: none;
}

/* Headings break into balanced lines; paragraphs avoid a single lonely word on the last line */
body h1,
body h2,
body h3 {
    text-wrap: balance;
}

body main p,
body main li {
    text-wrap: pretty;
}

/* Selected text uses the site yellow */
::selection {
    background: #FFDE39;
    color: #262626;
}

/* Long e-mail addresses on the About buttons never run out of the button on a phone */
body .about-contact-btn span {
    overflow-wrap: anywhere;
    min-width: 0;
}

/* ===== v46: Contact button that stays on screen (phones and tablets only) =====
 * The word "Contact" is drawn by CSS, so the page words stay exactly as approved.
 * It sits under the cookie notice (z-index) and is hidden when printing. */
.sticky-contact { display: none; }

@media (max-width: 800px) {
    body .sticky-contact {
        position: fixed;
        right: 16px;
        bottom: 16px;
        z-index: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 22px;
        background: #FFDE39;
        color: #262626;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(38, 38, 38, 0.18), 0 6px 14px rgba(38, 38, 38, 0.22);
        font-family: Arial, Helvetica, sans-serif;
        font-size: 1rem;
        font-weight: bold;
        text-decoration: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    body .sticky-contact::before { content: "Contact"; }
    body .sticky-contact:hover,
    body .sticky-contact:focus-visible { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(38, 38, 38, 0.22), 0 8px 18px rgba(38, 38, 38, 0.26); }
    body .sticky-contact:active { transform: translateY(0); }
    body .sticky-contact:focus-visible { outline: 3px solid #1D497C; outline-offset: 3px; }
    /* room so the button never covers the last line of the footer */
    body .site-footer { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    body .sticky-contact { transition: none; }
}

@media print { .sticky-contact { display: none !important; } }

/* ===== v47: Home installation flow - one connector between EVERY pair of steps =====
 * The arrows between steps in the same row already existed. New: after the last step of a row
 * (step 4 on wide screens, steps 2, 4 and 6 on tablets) a line leaves the bottom of the step,
 * runs along the gap and goes down with an arrowhead into the first step of the next row.
 * "cqw" is 1% of the width of the .hm-process list, so the line always ends in the middle of
 * the next step. The picture of step 5 sits on white, so it has no grey bars. */
body .hm-process { container-type: inline-size; }
body .hm-step img.hm-contain { background: #FFFFFF; }

@media (min-width: 1101px) {
    body .hm-process .hm-step:nth-child(4)::after {
        display: block;
        content: "";
        position: absolute;
        top: calc(100% + 1px);
        right: calc(50% - 1.5px);
        left: auto;
        bottom: auto;
        width: calc(70.833cqw + 39.667px + 3px);
        height: 21.5px;
        margin: 0;
        background: none;
        border-right: 3px solid #4073AF;
        border-bottom: 3px solid #4073AF;
    }
    body .hm-process .hm-step:nth-child(5)::before {
        content: "";
        position: absolute;
        top: -21px;
        left: calc(50% - 12px);
        width: 24px;
        height: 19px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='19' viewBox='0 0 24 19'%3E%3Cpath d='M12 0V15M4 8L12 17L20 8' fill='none' stroke='%234073AF' stroke-width='3' stroke-linecap='square'/%3E%3C/svg%3E") no-repeat center / 24px 19px;
    }
}

@media (min-width: 641px) and (max-width: 1100px) {
    body .hm-process .hm-step:nth-child(2n):not(:last-child)::after {
        display: block;
        content: "";
        position: absolute;
        top: calc(100% + 1px);
        right: calc(50% - 1.5px);
        left: auto;
        bottom: auto;
        width: calc(50cqw + 28px + 3px);
        height: 21.5px;
        margin: 0;
        background: none;
        border-right: 3px solid #4073AF;
        border-bottom: 3px solid #4073AF;
    }
    body .hm-process .hm-step:nth-child(2n+1):not(:first-child)::before {
        content: "";
        position: absolute;
        top: -21px;
        left: calc(50% - 12px);
        width: 24px;
        height: 19px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='19' viewBox='0 0 24 19'%3E%3Cpath d='M12 0V15M4 8L12 17L20 8' fill='none' stroke='%234073AF' stroke-width='3' stroke-linecap='square'/%3E%3C/svg%3E") no-repeat center / 24px 19px;
    }
}

/* v47: the skip link must show above the sticky menu */
body .skip-link:focus { z-index: 1100; }

/* ===== v47: EU CBAM "What CBAM Advisory actually builds" picture =====
 * The picture has its own white edge and text printed on it, so it is neither cropped nor
 * enlarged. It now sits on a light "stage" that is as wide as the three file cards below it,
 * with a soft shadow, so it lines up with them instead of floating as a small framed card. */
body .eu-cbam .eu-banner {
    max-width: none;
    margin: 0 0 24px 0;
    padding: 32px 24px;
    display: flex;
    justify-content: center;
    background: #E8EEF6;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow);
}

body .eu-cbam .eu-banner img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(38, 38, 38, 0.12), 0 10px 24px rgba(38, 38, 38, 0.18);
}

@media (max-width: 640px) {
    body .eu-cbam .eu-banner { padding: 16px 12px; }
}

/* ===== v47: EU CBAM checker - "calculator" look =====
 * CSS only. All ids, names and classes used by the checker script are unchanged.
 *   - both panels get a dark-blue title bar with a yellow base line, like the top of a calculator
 *   - the answers (radio buttons) are raised "keys" that sink when pressed; the chosen key is blue
 *   - the quantity field is a "display": larger digits, right aligned, inset
 *   - the Check coverage button is the big "equals" key
 *   - the empty assessment is a display screen showing a 0 */
body .cbc .cbc-grid > .cbc-card {
    padding: 0 24px 24px;
    background-image: none;
    border-top: 1px solid var(--sf-line);
    overflow: hidden;
}

body .cbc .cbc-grid > .cbc-card > h2,
body .cbc .cbc-grid > .cbc-card > .cbc-card-head {
    margin: 0 -24px 22px;
    padding: 16px 24px;
    background: #1D497C;
    border-bottom: 4px solid #FFDE39;
    color: #FFFFFF;
}

body .cbc .cbc-grid > .cbc-card > .cbc-card-head {
    align-items: center;
}

body .cbc .cbc-grid > .cbc-card > .cbc-card-head h2 {
    margin: 0;
    color: #FFFFFF;
}

body .cbc .cbc-grid > .cbc-card > .cbc-card-head .cbc-tag {
    margin: 0;
    padding: 3px 10px;
    background: #255D9D;
    border-radius: 4px;
    color: #FFFFFF;
    font-weight: bold;
}

/* Fields: soft corners, a small inset look */
body .cbc input[type="text"],
body .cbc select {
    border-radius: 4px;
    border-color: #595959;
    box-shadow: inset 0 1px 2px rgba(38, 38, 38, 0.12);
}

body .cbc input[type="text"]:focus,
body .cbc select:focus {
    box-shadow: 0 0 0 5px #262626;
}

/* Answer keys */
body .cbc .cbc-radios {
    gap: 10px;
}

body .cbc .cbc-radios .cbc-radio {
    position: relative;
    display: block;
    margin: 0;
}

body .cbc .cbc-radio input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

body .cbc .cbc-radio label {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 18px;
    background: #FFFFFF;
    border: 1px solid #CFCFCF;
    border-bottom: 4px solid #CFCFCF;
    border-radius: 6px;
    color: #262626;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

body .cbc .cbc-radio input:hover + label {
    background: #E8EEF6;
    border-color: #4073AF;
}

body .cbc .cbc-radio input:active + label {
    transform: translateY(2px);
    border-bottom-width: 2px;
    margin-bottom: 2px;
}

body .cbc .cbc-radio input:checked + label {
    background: #4073AF;
    border-color: #1D497C;
    color: #FFFFFF;
}

body .cbc .cbc-radio input:focus-visible + label {
    outline: 3px solid #FFDE39;
    outline-offset: 0;
    box-shadow: 0 0 0 5px #262626;
}

body .cbc .cbc-radio input:disabled {
    cursor: not-allowed;
}

body .cbc .cbc-radio input:disabled + label {
    background: #F4F4F4;
    border-color: #EBEBEB;
    color: #595959;
}

/* Quantity: the display */
body .cbc .cbc-qty-input input[type="text"] {
    height: 60px;
    background: #F4F4F4;
    border-radius: 4px 0 0 4px;
    box-shadow: inset 0 2px 5px rgba(38, 38, 38, 0.18);
    font-family: "Courier New", Courier, monospace;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body .cbc .cbc-qty-input select {
    height: 60px;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
}

/* The "equals" key */
body .cbc .cbc-btn-block {
    min-height: 60px;
    border-radius: 8px;
    border-bottom: 5px solid #1D497C;
    font-size: 1.15rem;
}

body .cbc .cbc-btn-block:disabled {
    border-bottom: 5px solid #CFCFCF;
}

body .cbc .cbc-btn-block:hover:not(:disabled) {
    transform: translateY(-2px);
}

body .cbc .cbc-btn-block:active:not(:disabled) {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* Empty assessment = display screen */
body .cbc .cbc-placeholder {
    position: relative;
    min-height: 170px;
    padding: 18px 18px 18px;
    background: #E8EEF6;
    border: 1px solid #CFCFCF;
    border-radius: 6px;
    box-shadow: inset 0 3px 8px rgba(38, 38, 38, 0.2);
    color: #262626;
}

body .cbc .cbc-placeholder::before {
    content: "0";
    display: block;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #CFCFCF;
    color: #1D497C;
    font-family: "Courier New", Courier, monospace;
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
    text-align: right;
}

@media (prefers-reduced-motion: reduce) {
    body .cbc .cbc-radio label { transition: none; }
    body .cbc .cbc-btn-block:hover:not(:disabled) { transform: none; }
}

/* The assessment "display" keeps its own height instead of stretching to the long form */
@media (min-width: 801px) {
    body .cbc .cbc-grid > .cbc-card:last-child { align-self: start; }
}

/* ===== v47: Contact page - icons, clearer cards, finer form =====
 * CSS only (the words and the form fields are unchanged). Small blue icons mark each way of
 * getting in touch; the "Before you contact us" cards show an arrow and lift when hovered. */
body .contact-page .cp-contact-cards .cp-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
}

body .contact-page .cp-contact-cards .cp-card h3::before {
    content: "";
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #E8EEF6;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
}

body .contact-page .cp-contact-cards .cp-card:nth-child(1) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23255D9D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
body .contact-page .cp-contact-cards .cp-card:nth-child(2) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23255D9D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E"); }
body .contact-page .cp-contact-cards .cp-card:nth-child(3) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23255D9D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E"); }

body .contact-page .cp-mail::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: -3px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23255D9D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
}

body .contact-page .cp-mail.cp-phone::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23255D9D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-2.5 1.5a11 11 0 0 0 6 6L16 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }

/* Form: roomier box, 48px fields, a clear primary button with an arrow */
body .contact-page .cp-form-box {
    padding: 28px;
}

body .contact-page .cp-form input[type="text"],
body .contact-page .cp-form input[type="email"],
body .contact-page .cp-form select {
    min-height: 48px;
    border-radius: 4px;
    border-color: #595959;
    background-color: #FFFFFF;
}

body .contact-page .cp-form textarea {
    border-radius: 4px;
    border-color: #595959;
    background-color: #FFFFFF;
}

body .contact-page .cp-form input:focus,
body .contact-page .cp-form select:focus,
body .contact-page .cp-form textarea:focus {
    border-color: #262626;
}

body .contact-page .cp-btn-primary {
    min-height: 52px;
    min-width: 200px;
    padding: 0 28px;
    font-size: 1.05rem;
}

body .contact-page .cp-btn-primary::after {
    content: "\2192";
    margin-left: 12px;
    transition: transform 0.2s ease;
}

body .contact-page .cp-btn-primary:hover::after {
    transform: translateX(5px);
}

@media (max-width: 599px) {
    body .contact-page .cp-form-box { padding: 20px 16px; }
    body .contact-page .cp-layout .cp-form .cp-btn { align-self: stretch; }
}

/* "Before you contact us": arrow on each card, lifts on hover */
body .contact-page .cp-link-card {
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    padding-bottom: 46px;
}

body .contact-page .cp-link-card:hover {
    transform: translateY(-3px);
}

body .contact-page .cp-link-card h3 a::before {
    content: "\2192";
    position: absolute;
    right: 18px;
    bottom: 14px;
    color: #255D9D;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.2s ease;
}

body .contact-page .cp-link-card:hover h3 a::before {
    transform: translateX(5px);
}

/* Registered address: location icon */
body .contact-page .cp-address-panel address {
    position: relative;
    padding-left: 44px;
}

body .contact-page .cp-address-panel address::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #E8EEF6;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23255D9D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
    body .contact-page .cp-btn-primary::after,
    body .contact-page .cp-link-card,
    body .contact-page .cp-link-card h3 a::before { transition: none; }
    body .contact-page .cp-btn-primary:hover::after,
    body .contact-page .cp-link-card:hover,
    body .contact-page .cp-link-card:hover h3 a::before { transform: none; }
}

/* Checker unit box (tonnes / kg): wide enough on phones so "tonnes" is not cut */
body .cbc .cbc-qty-input { grid-template-columns: minmax(0, 1fr) 124px; }
body .cbc .cbc-qty-input select { padding-left: 10px; padding-right: 30px; background-position: right 10px center; }


/* ---------- v49 fixes ---------- */

/* Menu: hovering an item only draws the yellow line. The current page keeps the darker box, so the two look different (wide screens). */
@media (min-width: 801px) {
    body .main-nav .menu-list a:hover:not(.current),
    body .main-nav .menu-list a:focus-visible:not(.current) {
        background: var(--blue);
    }
}

/* Logo: gentle zoom on hover, the same style as the photos */
body .logo-link img {
    transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
    transform-origin: left center;
}

body .logo-link:hover img,
body .logo-link:focus-visible img {
    transform: scale(1.06);
}

/* Arrow links and arrow buttons: the arrow slides right on hover */
body .eu-cbam .eu-arrow,
body .cbc-btn > span[aria-hidden="true"] {
    display: inline-block;
    transition: transform 0.2s ease;
}

body .eu-cbam .eu-arrow-link:hover .eu-arrow,
body .eu-cbam .eu-arrow-link:focus-visible .eu-arrow,
body .cbc-btn:hover:not(:disabled) > span[aria-hidden="true"],
body .cbc-btn:focus-visible > span[aria-hidden="true"] {
    transform: translateX(5px);
}

body .contact-page .cp-link-card h3 a::before {
    transition: transform 0.2s ease;
}

body .contact-page .cp-link-card:hover h3 a::before,
body .contact-page .cp-link-card h3 a:focus-visible::before {
    transform: translateX(5px);
}

/* Checker: more space between a tick box and the question below it */
body #cbc-form > .cbc-check,
body #cbc-qty > .cbc-check {
    margin-bottom: 16px;
}

/* Checker result: when the page scrolls to it, keep the whole card clear of the sticky menu */
@media (min-width: 801px) {
    body .cbc #cbc-out-h {
        scroll-margin-top: 96px;
    }
}

/* Words in a justified line that has to stretch too far are left aligned instead (set by main.js) */
body .no-justify {
    text-align: left;
}

@media (prefers-reduced-motion: reduce) {
    body .logo-link img,
    body .eu-cbam .eu-arrow,
    body .cbc-btn > span[aria-hidden="true"],
    body .contact-page .cp-link-card h3 a::before {
        transition: none;
    }
}
