/* ourhistory.html: page styles moved out of the HTML (tools/extract-styles.js). Edit here, then bump ?v= in ourhistory.html. */
    /* ===== Journey of Excellence timeline (this page only) ===== */
    .jhs-journey {
        --jhs-bg: #f5f8fd;
        --jhs-stack-top: 100px;
        --jhs-stack-step: 16px;
        background: var(--jhs-bg);
    }
    .jhs-journey .title-area {
        margin-bottom: 48px;
    }

    .jhs-tl {
        position: relative;
        list-style: none;
        margin: 0;
        padding: 0 0 0 46px;
    }
    /* continuous spine behind the year markers */
    .jhs-tl::before {
        content: '';
        position: absolute;
        left: 13px;
        top: 10px;
        bottom: 10px;
        width: 2px;
        background: linear-gradient(180deg, rgba(0, 28, 84, 0) 0%, #001c54 9%, #001c54 91%, rgba(0, 28, 84, 0) 100%);
    }
    .jhs-tl__item {
        position: relative;
    }
    .jhs-tl__item + .jhs-tl__item {
        margin-top: 26px;
    }
    .jhs-tl__dot {
        position: absolute;
        left: -46px;
        top: 5px;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid #001c54;
        display: grid;
        place-items: center;
    }
    .jhs-tl__dot::after {
        content: '';
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #ffca06;
    }
    .jhs-tl__year {
        display: inline-block;
        margin: 0 0 12px;
        padding: 7px 18px;
        border-radius: 99px;
        background: #001c54;
        color: #ffca06;
        font-family: var(--title-font);
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .05em;
        white-space: nowrap;
    }
    .jhs-tl__card {
        position: relative;
        overflow: hidden;
        background: #fff;
        border: 1px solid #e6ebf5;
        border-radius: 18px;
        padding: 24px 24px 20px;
        box-shadow: 0 6px 24px rgba(11, 29, 58, .06);
        transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    }
    /* gold edge that reads as the top of the card when the deck stacks up */
    .jhs-tl__card::before {
        content: '';
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: linear-gradient(90deg, #001c54 0%, #ffca06 55%, #ffb539 100%);
    }
    .jhs-tl__card:hover {
        transform: translateY(-4px);
        border-color: #ffca06;
        box-shadow: 0 18px 44px rgba(11, 29, 58, .12);
    }
    .jhs-tl__title {
        margin: 0 0 16px;
        color: #001c54;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.3;
    }
    .jhs-tl__list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .jhs-tl__list li {
        position: relative;
        margin-bottom: 12px;
        padding-left: 26px;
        color: #55617a;
        font-size: 16px;
        line-height: 1.7;
        overflow-wrap: break-word;
    }
    .jhs-tl__list li:last-child {
        margin-bottom: 0;
    }
    .jhs-tl__list li::before {
        content: '';
        position: absolute;
        left: 2px;
        top: .62em;
        width: 9px;
        height: 9px;
        border-radius: 2px;
        background: #ffca06;
        transform: rotate(45deg);
    }
    .jhs-tl__list b {
        color: #001c54;
        font-weight: 700;
    }

    .jhs-tl__tail {
        display: none;
    }

    /* Cards stack like a deck on scroll: each era pins a little lower than the last */
    @media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
        /* Real trailing element, not padding/margin: a sticky item is constrained to its
           containing block's content box, so only extra content buys it travel. */
        .jhs-tl__tail {
            display: block;
            height: 240px;
        }
        .jhs-tl::before {
            bottom: 250px;
        }
        .jhs-tl__item {
            position: sticky;
            top: calc(var(--jhs-stack-top) + var(--i, 0) * var(--jhs-stack-step));
        }
        /* Uniform pills carrying a background-coloured plate above them: as the deck
           stacks, each pill hides the one behind instead of clipping its text.
           The plate is a plain rectangle - a rounded one leaves corner slivers. */
        .jhs-tl__year {
            position: relative;
            min-width: 190px;
            text-align: center;
        }
        .jhs-tl__year::before {
            content: '';
            position: absolute;
            left: -8px;
            right: -8px;
            bottom: 100%;
            height: calc(var(--jhs-stack-step) + 1px);
            background: var(--jhs-bg);
        }
        /* Even card heights keep the deck flush - a shorter card on top would let the
           one beneath poke out. Tuned per breakpoint to the tallest era on this page. */
        .jhs-tl__card {
            min-height: 450px;
            box-shadow: 0 -10px 28px rgba(11, 29, 58, .10), 0 6px 24px rgba(11, 29, 58, .06);
        }
        .jhs-tl__card:hover {
            box-shadow: 0 -10px 28px rgba(11, 29, 58, .10), 0 18px 44px rgba(11, 29, 58, .12);
        }
    }
    @media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
        .jhs-tl__card {
            min-height: 415px;
        }
    }
    @media (min-width: 1440px) and (prefers-reduced-motion: no-preference) {
        .jhs-tl__card {
            min-height: 360px;
        }
    }

    /* Year moves into its own column beside the spine on large screens */
    @media (min-width: 992px) {
        .jhs-tl {
            padding-left: 0;
        }
        .jhs-tl::before {
            left: 214px;
        }
        .jhs-tl__item {
            display: grid;
            grid-template-columns: 190px 1fr;
            column-gap: 72px;
            align-items: start;
        }
        .jhs-tl__item + .jhs-tl__item {
            margin-top: 36px;
        }
        .jhs-tl__dot {
            left: 201px;
            top: 24px;
        }
        .jhs-tl__year {
            justify-self: end;
            width: 100%;
            margin: 20px 0 0;
            font-size: 16px;
        }
        .jhs-tl__card {
            padding: 28px 32px 24px;
        }
        .jhs-tl__title {
            font-size: 24px;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .jhs-tl__card {
            transition: none;
        }
        .jhs-tl__card:hover {
            transform: none;
        }
    }
