/* Homepage company figures. Every rule is local to .xf-metrics. */
.xf-metrics {
    container: xf-company-metrics / inline-size;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 6% 0 0;
    padding: 23px 0 21px;
    color: #fff;
    background: linear-gradient(115deg, #003c76 0%, #07568f 100%);
    border: 1px solid #06477d;
    text-align: left;
    isolation: isolate;
}

.xf-metrics::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 48px;
    height: 3px;
    background: #9ed5f3;
    pointer-events: none;
}

.xf-metrics::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 12px;
    width: 35px;
    height: 8px;
    background: repeating-linear-gradient(120deg, transparent 0 7px, #8db9da 7px 9px, transparent 9px 12px);
    opacity: .5;
    pointer-events: none;
}

.xf-metrics .xf-metrics__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 0;
}

.xf-metrics .xf-metrics__item {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
}

.xf-metrics .xf-metrics__item:nth-child(even)::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 1px;
    left: 0;
    width: 1px;
    background: #5283ab;
}

.xf-metrics .xf-metrics__item:nth-child(n + 3) {
    margin-top: 19px;
    padding-top: 17px;
    border-top: 1px solid #5283ab;
}

.xf-metrics .xf-metrics__item:nth-child(n + 3)::before {
    top: 20px;
}

.xf-metrics .xf-metrics__label {
    order: 2;
    margin: 7px 0 0;
    padding: 0;
    color: #e0ebf5;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
}

.xf-metrics .xf-metrics__value {
    order: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 3px;
    min-width: 0;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.xf-metrics .xf-metrics__number {
    min-width: 0;
    color: #fff;
    font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    font-size: 46px;
    font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1.08;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.xf-metrics .xf-metrics__qualifier {
    align-self: flex-start;
    margin-top: 4px;
    color: #cce5f6;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
}

/* Reserve the final number's width during counting, including decimal digits.
   The hidden sizing text follows responsive font changes without layout reads. */
.xf-metrics__number[data-xf-count-target] {
    display: inline-grid;
}

.xf-metrics__number[data-xf-count-target]::after {
    content: attr(data-xf-count-target);
    visibility: hidden;
    grid-area: 1 / 1;
}

.xf-metrics__count {
    grid-area: 1 / 1;
    justify-self: start;
}

.xf-metrics .xf-metrics__unit {
    color: #e0ebf5;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

.xf-metrics .xf-metrics__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Follow the width of the existing About text column, including its
   expansion to full width on the legacy tablet/mobile layout. */
@container xf-company-metrics (min-width: 440px) {
    .xf-metrics .xf-metrics__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .xf-metrics .xf-metrics__item {
        padding: 0 12px;
    }

    .xf-metrics .xf-metrics__item:nth-child(n + 3) {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .xf-metrics .xf-metrics__item:not(:first-child)::before {
        content: "";
        position: absolute;
        top: 3px;
        bottom: 1px;
        left: 0;
        width: 1px;
        background: #5283ab;
    }

    .xf-metrics .xf-metrics__number {
        font-size: clamp(30px, 7cqi, 48px);
    }

    .xf-metrics .xf-metrics__qualifier {
        margin-top: 2px;
        font-size: clamp(17px, 3.6cqi, 23px);
    }

    .xf-metrics .xf-metrics__unit {
        font-size: clamp(11px, 2.2cqi, 14px);
    }

    .xf-metrics .xf-metrics__label {
        font-size: clamp(11px, 2.1cqi, 12px);
    }
}

@container xf-company-metrics (max-width: 319px) {
    .xf-metrics .xf-metrics__item {
        padding-right: 12px;
        padding-left: 12px;
    }

    .xf-metrics .xf-metrics__number {
        font-size: 39px;
    }

    .xf-metrics .xf-metrics__unit {
        font-size: 12px;
    }
}

/* Native scroll treatment complements the brief count-up enhancement.
   Only this module's outer About wrapper supplies a timeline;
   its legacy overflow:hidden descendants cannot track viewport scrolling.
   The scroll treatment changes only transform/opacity, with no persistent layers. */
@supports (animation-timeline: view()) and (animation-range: entry 0% cover 50%) and selector(:has(*)) {
    @media screen and (prefers-reduced-motion: no-preference) {
        .wrap:has(> .i_about > .txts > .xf-metrics) {
            view-timeline: --xf-metrics-reveal block;
        }

        .xf-metrics::before {
            width: calc(100% + 2px);
            transform-origin: left center;
            animation: xf-metrics-line auto linear both;
            animation-timeline: --xf-metrics-reveal;
            animation-range: cover 32% cover 64%;
        }

        .xf-metrics .xf-metrics__value {
            animation: xf-metrics-settle auto ease-out both;
            animation-timeline: --xf-metrics-reveal;
            animation-range: cover 32% cover 52%;
        }

        .xf-metrics .xf-metrics__item:nth-child(2) .xf-metrics__value {
            animation-range: cover 33% cover 54%;
        }

        .xf-metrics .xf-metrics__item:nth-child(3) .xf-metrics__value {
            animation-range: cover 34% cover 56%;
        }

        .xf-metrics .xf-metrics__item:nth-child(4) .xf-metrics__value {
            animation-range: cover 35% cover 58%;
        }
    }
}

@keyframes xf-metrics-line {
    from { transform: scaleX(.075); opacity: .65; }
    to { transform: scaleX(1); opacity: 1; }
}

@keyframes xf-metrics-settle {
    from { transform: translateY(4px); opacity: .88; }
    to { transform: translateY(0); opacity: 1; }
}

/* Figures are always readable, including before entry and without JavaScript.
   Reduced motion, unsupported timelines and print retain the static treatment. */
@media (prefers-reduced-motion: reduce) {
    .xf-metrics,
    .xf-metrics *,
    .xf-metrics::before,
    .xf-metrics::after {
        animation: none;
        transition: none;
    }
}

@media print {
    .xf-metrics {
        color: #003c76;
        background: #fff;
        border-color: #8099ae;
    }

    .xf-metrics .xf-metrics__number,
    .xf-metrics .xf-metrics__qualifier,
    .xf-metrics .xf-metrics__unit,
    .xf-metrics .xf-metrics__label {
        color: #003c76;
    }
}
