/* ==========================================================================
   Components: the Elements that go inside a Section.
   One block per element, in the same order as the /elements folder.
   ========================================================================== */

/* Cards
   ========================================================================== */

.cards {
    display: grid;
    gap: 20px;
}

.columns-1 { grid-template-columns: 1fr; }
.columns-2 { grid-template-columns: repeat(2, 1fr); }
.columns-3 { grid-template-columns: repeat(3, 1fr); }
.columns-4 { grid-template-columns: repeat(4, 1fr); }
.columns-5 { grid-template-columns: repeat(5, 1fr); }

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--color-grey);
    border-radius: 20px;
    background: var(--color-white);
    color: var(--color-deep-blue);
}

.card-icon {
    display: flex;
    align-items: center;
    height: 31px;
}

/* The title of a card, list item or step is a heading whose level is set by the theme
   (fc_item_heading_tag), so nothing about how it looks may come from its tag. */
.item-title {
    margin: 0;
    max-width: none;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    letter-spacing: inherit;
    text-wrap: inherit;
}

.step-title {
    font-size: var(--text-title);
    line-height: 1.2;
    text-wrap: balance;
}

.card-title {
    font-size: var(--text-title);
    font-weight: 600;
    line-height: 1.2;
}

.card-text {
    flex: 1;
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

.card-link {
    color: var(--color-funding-blue);
    font-size: 15px;
    font-weight: 600;
}

/* An image at the top of a card, edge to edge */
.card-image {
    display: block;
    overflow: hidden;
    margin: -28px -28px 6px;
    border-radius: 19px 19px 0 0;
    aspect-ratio: 16 / 10;
    background: var(--color-grey);
}

.card-image-square {
    aspect-ratio: 1;
}

.card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A small heading above a set of cards */
.cards-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: var(--text-title);
    font-weight: 700;
}

.cards-title .icon {
    width: 26px;
    height: 26px;
    color: var(--color-funding-blue);
}

.column .cards {
    gap: 16px;
}

/* A "this became that" row at the top of a card: grey label, arrow, coloured label */
.card-change {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.card-change-before,
.card-change-after {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-grey);
    color: var(--color-text-muted);
}

.card-change-after {
    background: var(--accent-pale);
    color: var(--color-deep-blue);
}

.card-change-after .icon {
    width: 16px;
    height: 16px;
}

.card-change-arrow {
    color: var(--color-sky);
    font-size: 20px;
}

/* Cards with a coloured left edge and a tinted icon box */
.cards-tinted .card {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    padding: 32px;
}

.cards-tinted .card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 6px;
    background: var(--accent);
}

.cards-tinted .card-icon {
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-pale);
}

.cards-tinted .card-link {
    color: var(--color-deep-blue);
}

/* With an image, the coloured edge runs beside the text only, and the card is as tall as its content */
.cards-tinted .card:has(.card-image) {
    min-height: 0;
}

.cards-tinted .card-image {
    position: relative;
    margin: -32px -32px 6px;
    border-radius: 0;
}

.card-link-arrow {
    display: inline-block;
    transition: transform .18s;
}

a.card:hover .card-link-arrow {
    transform: translateX(4px);
}

/* Dark card */
.card.card-dark {
    border-color: var(--color-deep-blue);
    background: var(--color-deep-blue);
    color: var(--color-white);
}

.card-dark .card-text {
    color: rgba(255, 255, 255, .8);
}

.card-dark .card-link {
    color: var(--color-white);
}

.card-dark .card-icon {
    background: rgba(255, 255, 255, .14);
}

.card-dark .card-icon .icon {
    color: var(--color-white);
}

/* Cards in a deep blue section: translucent, with a solid blue icon box */
.bg-deep-blue .card {
    gap: 10px;
    padding: 26px;
    border-color: rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
    color: var(--color-white);
}

.bg-deep-blue .card-icon {
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: var(--color-funding-blue);
}

.bg-deep-blue .card-icon .icon {
    color: var(--color-white);
    --icon-accent: currentColor;
}

.bg-deep-blue .card-title {
    line-height: 1.5;
}

.bg-deep-blue .card-text {
    color: rgba(255, 255, 255, .75);
}

/* Carousel: cards in a row that scrolls sideways
   ========================================================================== */

.carousel {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 60px) / 3.5);
    padding-bottom: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel .card {
    scroll-snap-align: start;
}

.carousel-arrows {
    display: flex;
    gap: 8px;
}

.carousel-arrow {
    width: 44px;
    height: 44px;
    border: 2px solid var(--color-deep-blue);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-deep-blue);
    font-size: 18px;
    cursor: pointer;
}

.carousel-arrow:hover {
    background: var(--color-magnolia);
}

.carousel-arrow .icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    /* The dots' targets are taller than the dots: these margins keep the dots where they were */
    margin: 20px 0 -8px;
}

/* Each dot is a 24px target (the smallest that is comfortable to tap) with the visible dot drawn inside it. */
.carousel-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transition: width .2s;
}

.carousel-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--color-sky);
    transition: width .2s, background .2s;
}

.carousel-dot.active {
    width: 44px;
}

.carousel-dot.active::before {
    width: 28px;
    background: var(--color-funding-blue);
}

/* Accordion
   ========================================================================== */

.accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: var(--measure-width);
}

.accordion-item {
    padding: 0 24px;
    border-radius: var(--radius-medium);
    background: var(--color-white);
}

.bg-white .accordion-item {
    background: var(--color-magnolia);
}

.accordion-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    font-size: var(--text-title-small);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.accordion-item summary::-webkit-details-marker {
    display: none;
}

.accordion-item summary .icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--color-funding-blue);
    transition: transform .2s;
}

/* js/main.js slides the answer open and shut, and adds "closing" while it shuts */
.accordion-item[open]:not(.closing) summary .icon {
    transform: rotate(180deg);
}

.accordion-item p {
    max-width: 70ch;
    padding-bottom: 22px;
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

/* Form
   Every form is a Gravity Forms form. Gravity Forms' own stylesheets are
   switched off (functions/forms.php), so these rules style its markup.
   ========================================================================== */

.form-box {
    padding: 28px;
    text-align: left;   /* Also in a centred section */
    border: 1px solid var(--color-grey);
    border-radius: 20px;
    background: var(--color-white);
}

.form-missing {
    color: var(--color-text-muted);
    font-size: 16px;
}

/* Fields sit on a 12-column grid, so two half-width fields share a row */
.gform_fields {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.gfield {
    grid-column: span 12;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.gfield--width-three-quarter {
    grid-column: span 9;
}

.gfield--width-two-thirds {
    grid-column: span 8;
}

.gfield--width-half {
    grid-column: span 6;
}

.gfield--width-third {
    grid-column: span 4;
}

.gfield--width-quarter {
    grid-column: span 3;
}

.gfield_label {
    display: block;
    margin-bottom: 6px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
}

.gfield_required {
    margin-left: 4px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 400;
}

/* Text boxes, dropdowns and the search box share one look */
.gform_wrapper :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea),
.search-field {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1.5px solid var(--color-field-border);
    border-radius: 12px;
    background: var(--color-white);
    color: var(--color-deep-blue);
    font: inherit;
}

.gform_wrapper textarea {
    height: 100px;
    resize: vertical;
}

.gform_wrapper :is(input, select, textarea):focus,
.search-field:focus {
    outline: none;
    border-color: var(--color-funding-blue);
    box-shadow: 0 0 0 3px rgba(5, 146, 232, .2);
}

/* Fields made of several boxes, such as a full name or an address */
.ginput_complex {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.gform-field-label--type-sub {
    display: block;
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* Tick boxes and radio buttons */
.gfield_checkbox,
.gfield_radio {
    display: grid;
    gap: 8px;
}

.gchoice,
.ginput_container_consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
}

.gform_wrapper :is(input[type="checkbox"], input[type="radio"]) {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--color-funding-blue);
}

/* Help text and error messages */
.gfield_description,
.gform_required_legend {
    margin-top: 6px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.gform_required_legend {
    margin: 0 0 14px;
}

.gform_wrapper .gfield_error :is(input, select, textarea) {
    border-color: var(--color-error);
}

.gfield_description.validation_message {
    color: var(--color-error);
    font-weight: 600;
}

.gform_validation_errors {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--color-salmon-pale);
}

.gform_submission_error {
    max-width: none;
    color: var(--color-error);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* A form split into steps shows how far along the visitor is: "Step 1 of 2" above a bar */
.gf_progressbar_wrapper {
    margin-bottom: 28px;
}

.gf_progressbar_title {
    margin-bottom: 10px;
    font-size: var(--text-small);
    font-weight: 600;
}

.gf_progressbar {
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--color-grey);
    overflow: hidden;
}

.gf_progressbar_percentage {
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--color-funding-blue);
    transition: width .3s;
}

/* The bar shows the progress; the same figure as text ("50%") is not repeated */
.gf_progressbar_percentage span {
    display: none;
}

/* List field: rows the visitor can add to, each a text box with Add and Remove buttons */
.gfield_list_header {
    display: none;
}

.gfield_list_groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gfield_list_group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gfield_list_group_item {
    flex: 1;
    min-width: 0;
}

.gfield_list_icons {
    display: flex;
    gap: 6px;
}

.gfield_list_icons button {
    min-height: 36px;
    padding: 6px 14px;
    border: 1.5px solid var(--color-field-border);
    border-radius: var(--radius-pill);
    background: var(--color-white);
    color: var(--color-deep-blue);
    font: inherit;
    font-size: var(--text-x-small);
    font-weight: 600;
    cursor: pointer;
}

.gfield_list_icons button:hover {
    border-color: var(--color-deep-blue);
}

/* Gravity Forms hides Remove while there is only one row; it should not leave a gap */
.gfield_list_icons button[style*="hidden"] {
    display: none;
}

/* Date field given the CSS class "month-year-only" in the form editor: the day box is hidden */
.month-year-only .gfield_date_day {
    display: none;
}

/* Submit, Next and Previous buttons */
.gform_footer,
.gform_page_footer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.gform_ajax_spinner {
    width: 22px;
    height: 22px;
}

/* The thank-you message replaces the form and its box */
.form-box:has(.gform_confirmation_message) {
    padding: 0;
    border: 0;
}

.gform_confirmation_message {
    padding: 28px;
    border-radius: 20px;
    background: var(--color-magnolia);
    font-weight: 600;
}

/* Parts Gravity Forms expects to be hidden */
.gform_validation_container,
.gform_hidden,
.gfield_visibility_hidden,
.gf_invisible,
.hidden_label .gfield_label,
.gform_wrapper .screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Pop-up (modal)
   A <dialog> that opens over the page. See sections/modal.php.
   ========================================================================== */

.modal {
    width: min(520px, calc(100% - 40px));
    max-height: 90vh;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 24px;
    background: var(--color-white);
    color: var(--color-deep-blue);
    box-shadow: 0 30px 80px rgba(14, 27, 100, .3);
}

.modal::backdrop {
    background: rgba(14, 27, 100, .55);
}

/* The page behind does not scroll while a pop-up is open */
html:has(.modal[open]) {
    overflow: hidden;
}

.modal-box {
    position: relative;
    padding: 36px;
}

.modal-heading {
    padding-right: 36px;
    font-size: var(--text-subheading);
}

.modal-box > .text-muted {
    margin-top: 8px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--color-deep-blue);
    cursor: pointer;
}

.modal-close svg {
    width: 26px;
    height: 26px;
    --icon-accent: currentColor;
}

/* Display: a drawer that slides in from the right, the full height of the screen */
.modal-drawer {
    width: min(560px, 100%);
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0 0 0 auto;
    border-radius: var(--radius-large) 0 0 var(--radius-large);
    box-shadow: -30px 0 80px rgba(14, 27, 100, .3);
}

.modal-drawer .modal-box {
    padding: 44px 40px;
}

.modal-drawer[open] {
    animation: drawer-in .4s cubic-bezier(.2, .7, .2, 1);
}

.modal-drawer[open]::backdrop {
    animation: backdrop-in .4s ease;
}

@keyframes drawer-in {
    from { transform: translateX(100%); }
}

@keyframes backdrop-in {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-drawer[open],
    .modal-drawer[open]::backdrop {
        animation: none;
    }
}

@media (max-width: 820px) {
    .modal-drawer {
        border-radius: 0;
    }

    .modal-drawer .modal-box {
        padding: 36px 24px;
    }
}

/* A form inside a pop-up needs no box of its own */
.modal .form-box {
    margin-top: 20px;
    padding: 0;
    border: 0;
}

/* Heading and text
   ========================================================================== */

/* The size of the heading is set here, not by its tag: the tag (h2 or h3)
   depends on whether the section has a heading of its own. */
.heading-large {
    max-width: 22ch;
    font-size: var(--text-heading);
    line-height: 1.1;
    font-weight: 700;
}

.heading-small {
    max-width: none;
    font-size: var(--text-title);
    line-height: 1.2;
    font-weight: 600;
}

.heading-block .lead {
    margin-top: 14px;
}

.heading-block-small .text-muted {
    margin-top: 8px;
}

/* Icon list
   ========================================================================== */

.icon-list-item {
    display: flex;
    color: var(--color-deep-blue);
}

.icon-list-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.icon-list-body {
    display: flex;
    flex-direction: column;
}

.icon-list-label {
    color: var(--color-funding-blue);
    font-size: var(--text-small);
    font-weight: 600;
}

.icon-list-title {
    font-weight: 600;
}

.icon-list-text {
    color: var(--color-text-muted);
}

/* Style: cards */
.icon-list-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: left;
}

.icon-list-cards .icon-list-item {
    flex-direction: column;
    gap: 10px;
    padding: 30px;
    border: 1px solid var(--color-grey);
    border-radius: 20px;
    background: var(--color-white);
}

.icon-list-cards .icon-list-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--accent-pale);
}

.icon-list-cards .icon {
    width: 26px;
    height: 26px;
}

.icon-list-cards .icon-list-body {
    gap: 10px;
}

.icon-list-cards .icon-list-title {
    font-size: var(--text-title);
}

.icon-list-cards .icon-list-text {
    font-size: var(--text-small);
    line-height: 1.5;
}

/* Dark card: one item picked out in Deep Blue, like a dark card in the Cards element */
.icon-list-cards .icon-list-item-dark {
    border-color: var(--color-deep-blue);
    background: var(--color-deep-blue);
    color: var(--color-white);
}

.icon-list-cards .icon-list-item-dark .icon-list-icon {
    background: rgba(255, 255, 255, .14);
}

.icon-list-cards .icon-list-item-dark .icon {
    color: var(--color-white);
}

.icon-list-cards .icon-list-item-dark .icon-list-label {
    color: var(--color-sky);
}

.icon-list-cards .icon-list-item-dark .icon-list-text {
    color: rgba(255, 255, 255, .8);
}

/* Style: rows */
.icon-list-rows .icon-list-item {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 26px;
}

.icon-list-rows .icon-list-icon,
.icon-list-chips .icon-list-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent-pale);
}

.icon-list-rows .icon-list-title {
    font-size: var(--text-title);
    line-height: 1.2;
}

.icon-list-rows .icon-list-text {
    margin-top: 4px;
    font-size: var(--text-small);
}

/* Style: chips */
.icon-list-chips {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.icon-list-chips .icon-list-item {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    text-align: center;
}

.icon-list-chips .icon-list-icon {
    width: 48px;
    height: 48px;
}

.icon-list-chips .icon {
    width: 38px;
    height: 38px;
}

/* Style: columns */
.icon-list-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.icon-list-columns .icon-list-item {
    flex-direction: column;
    gap: 12px;
}

.icon-list-columns .icon-list-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

.bg-white .icon-list-columns .icon-list-icon {
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.icon-list-columns .icon-list-body {
    gap: 8px;
}

.icon-list-columns .icon-list-title {
    font-size: var(--text-subheading);
    font-weight: 700;
    line-height: 1.15;
}

.icon-list-columns .icon-list-text {
    max-width: 44ch;
    font-size: var(--text-small);
}

/* Style: panels */
.icon-list-panels,
.icon-list-ticks {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.icon-list-panels .icon-list-item {
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--radius-medium);
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.icon-list-panels .icon-list-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

.icon-list-panels .icon {
    width: 26px;
    height: 26px;
}

.icon-list-panels .icon-list-title {
    font-size: var(--text-title-small);
}

.icon-list-panels .icon-list-text,
.icon-list-ticks .icon-list-text {
    font-size: var(--text-small);
}

.icon-list-panels .icon-list-text {
    line-height: 1.8;
}

/* On a tinted section the panels turn white, so they still stand out */
.bg-tint .icon-list-panels .icon-list-item {
    border: 1px solid var(--color-grey);
    background: var(--color-white);
}

.bg-tint .icon-list-panels .icon-list-icon {
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.bg-deep-blue .icon-list-panels .icon-list-item {
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
    color: var(--color-white);
}

.bg-deep-blue .icon-list-panels .icon-list-icon {
    background: var(--color-funding-blue);
}

.bg-deep-blue .icon-list-panels .icon {
    color: var(--color-white);
    --icon-accent: currentColor;
}

.bg-deep-blue .icon-list-panels .icon-list-text {
    color: rgba(255, 255, 255, .75);
}

/* Panels with their boxes hidden: only the icon circle and the text remain */
.icon-list-panels.no-boxes .icon-list-item {
    border: 0;
    background: none;
}

.icon-list-panels.no-boxes .icon-list-icon {
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.bg-tint .icon-list-panels.no-boxes .icon-list-icon {
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

/* Style: figures. A large number or icon in a box, beside a title and text.
   The box sits on the left, then the right, alternating down the page. */
.icon-list-figures {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.icon-list-figures .icon-list-item {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 32px;
    align-items: center;
    padding: 28px 32px;
    border-radius: 20px;
    background: var(--color-magnolia);
}

.icon-list-figures .icon-list-item:nth-child(even) {
    grid-template-columns: 1.6fr 1fr;
}

.icon-list-figures .icon-list-item:nth-child(even) .icon-list-icon {
    order: 2;
}

.icon-list-figures .icon-list-icon {
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border-radius: var(--radius-medium);
    background: var(--color-white);
    text-align: center;
}

.icon-list-figure {
    display: inline-flex;
    color: var(--color-funding-blue);
    font-size: var(--text-number);
    font-weight: 700;
    line-height: 1;
}

.icon-list-figures .icon-list-icon .icon {
    width: 48px;
    height: 48px;
    color: var(--color-funding-blue);
}

.icon-list-caption {
    max-width: 22ch;
    color: var(--color-text-muted);
    font-size: var(--text-x-small);
}

.icon-list-figures .icon-list-title {
    font-size: var(--text-title);
    line-height: 1.2;
    text-wrap: balance;
}

.icon-list-figures .icon-list-text {
    margin-top: 6px;
    font-size: var(--text-small);
}

/* On a tinted section the rows turn white and the box tinted */
.bg-tint .icon-list-figures .icon-list-item {
    background: var(--color-white);
}

.bg-tint .icon-list-figures .icon-list-icon {
    background: var(--color-magnolia);
}

/* Style: ticks */
.icon-list-ticks {
    gap: 16px;
}

.icon-list-ticks .icon-list-item {
    align-items: flex-start;
    gap: 12px;
}

.icon-list-ticks .icon {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: var(--color-funding-blue);
}

.box-deep-blue .icon-list-ticks .icon {
    color: var(--color-sky);
}

/* A tick icon is shown as a white tick in a filled blue circle. The tick is drawn here,
   so every tick looks the same whichever tick icon was chosen (see elements/icon-list.php). */
.icon-list-ticks .icon-list-tick {
    position: relative;
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--color-funding-blue);
}

.icon-list-ticks .icon-list-tick::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--color-white);
    -webkit-mask: url('../icons/tick-02.svg') center / contain no-repeat;
    mask: url('../icons/tick-02.svg') center / contain no-repeat;
}

.icon-list-ticks .icon-list-tick .icon {
    display: none;
}

.icon-list-ticks .icon-list-title {
    font-size: var(--text-title-small);
}

/* A point with a title and no text reads as a plain line */
.icon-list-ticks .icon-list-title:only-child {
    font-size: var(--text-small);
    font-weight: 400;
}

/* Elements stacked in the same section
   ========================================================================== */

.section > .container > :is(.cards, .icon-list, .boxes, .columns, .testimonials, .steps, .media, .accordion, .logos, .gallery, .slideshow, .table-scroll, .embed, .contact-details) + :is(.cards, .icon-list, .boxes, .columns, .testimonials, .steps, .media, .accordion, .logos, .gallery, .slideshow, .table-scroll, .embed, .contact-details, .cards-title, .text-body, .text-lead) {
    margin-top: 40px;
}

/* The newer elements also sit a little below a block of text */
.section > .container > .text + :is(.gallery, .slideshow, .table-scroll, .embed, .contact-details, .testimonials) {
    margin-top: 28px;
}

/* Logos
   ========================================================================== */

.logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.logo-box {
    display: inline-flex;
    align-items: center;
    height: 64px;
    padding: 0 16px;
    border: 1px solid var(--color-grey);
    border-radius: 12px;
    background: var(--color-white);
}

.logo-box img {
    display: block;
    width: auto;
    height: 48px;
}

/* Boxed text
   ========================================================================== */

.boxes {
    display: grid;
    gap: 20px;
}

.box {
    padding: 36px;
    border-radius: var(--radius-large);
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

.box-heading {
    max-width: 22ch;
    margin: 6px 0 20px;
    font-size: var(--text-subheading);
    line-height: 1.1;
    font-weight: 700;
}

/* Three boxes in a row are narrower, so their headings are smaller. So is a box inside a column. */
.boxes.columns-3 .box,
.column .box {
    padding: 32px;
}

.boxes.columns-3 .box-heading,
.column .box-heading {
    font-size: var(--text-title);
    line-height: 1.2;
}

.column .box-heading {
    max-width: none;
    margin-bottom: 12px;
}

.box-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--color-magnolia);
}

.box-icon .icon {
    width: 26px;
    height: 26px;
}


.box-text {
    margin: -8px 0 20px;
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

/* The last thing in a box needs no space beneath it */
.box > :last-child {
    margin-bottom: 0;
}

.box .buttons {
    margin-top: 0;
}

/* On a white section the light box is tinted, so it still stands out */
.bg-white .box:not(.box-deep-blue) {
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.bg-white .box:not(.box-deep-blue) .box-icon {
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

/* A box with a colour of its own. (The section rules above only apply to "Standard" boxes.) */
.section .box.box-white { background: var(--color-white); }
.section .box.box-magnolia { background: var(--color-magnolia); }
.section .box.box-grey { background: var(--color-grey); }
.section .box.box-lavender { background: var(--color-lavender-pale); }
.section .box.box-salmon { background: var(--color-salmon-pale); }
.section .box.box-pistachio { background: var(--color-pistachio-pale); }
.section .box.box-pink { background: var(--color-pink-pale); }

.section .box:is(.box-magnolia, .box-grey, .box-lavender, .box-salmon, .box-pistachio, .box-pink) .box-icon {
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

.section .box.box-white .box-icon {
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.box-deep-blue .box-icon {
    background: var(--color-funding-blue);
}

.box-deep-blue .box-icon .icon {
    color: var(--color-white);
    --icon-accent: currentColor;
}

/* The brand mark is shown larger and without the circle */
.section .box .box-icon.box-icon-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: none;
}

.box-icon-brand-mark .icon {
    width: 40px;
    height: 40px;
}

/* A box on its own: the icon sits beside the text, not above it */
.box-icon-beside {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
}

.box-icon-beside > * {
    grid-column: 2;
}

.box-icon-beside > .box-icon {
    grid-column: 1;
    grid-row: 1 / span 8;
    align-self: start;
    margin-bottom: 0;
}

.box-icon-beside > .box-heading {
    margin-top: 0;
}

.box-deep-blue .box-text {
    color: rgba(255, 255, 255, .78);
}

.box-deep-blue {
    background: var(--color-deep-blue);
    color: var(--color-white);
}

.box-deep-blue .eyebrow {
    color: var(--color-sky);
}

.box-deep-blue .icon-list-item {
    color: var(--color-white);
}

.box-deep-blue .icon-list-text {
    color: rgba(255, 255, 255, .75);
}

/* Columns
   ========================================================================== */

.columns {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: start;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.columns-centre {
    align-items: center;
}

.columns-reverse .column:first-child {
    order: 2;
}

/* Two columns, one wider than the other */
.columns-wider-left {
    grid-template-columns: 1.6fr 1fr;
}

.columns-wider-right {
    grid-template-columns: 1fr 1.6fr;
}

/* Three columns */
.columns-three {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Stats
   ========================================================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 44px;
    padding: 40px 0 8px;
    border-top: 1px solid var(--color-grey);
    border-bottom: 1px solid var(--color-grey);
    border-radius: 12px;
    color: inherit;
    transition: background .15s;
}

a.stats:hover {
    background: var(--color-magnolia);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 24px;
    text-align: center;
}

.stat-number {
    color: var(--color-funding-blue);
    font-size: var(--text-number);
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    max-width: 26ch;
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

/* Style: brand shapes. Each number sits in a tilted flower shape and counts up. */
.stats-shapes {
    align-items: center;
    justify-items: center;
    margin: 0;
    padding: 0;
    border: 0;
}

.stats-shapes .stat {
    position: relative;
    align-items: center;
    justify-content: center;
    width: min(100%, 340px);
    aspect-ratio: 1;
    padding: 0 48px;
    text-align: center;
    transform: rotate(var(--tilt));
    animation: stat-pop .7s cubic-bezier(.2, .9, .3, 1.2) both;
}

/* The flower shape, filled with the stat's colour */
.stats-shapes .stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--shape-colour);
    -webkit-mask: url('../img/shape-flower.svg') center / contain no-repeat;
    mask: url('../img/shape-flower.svg') center / contain no-repeat;
}

/* The tilt and colour repeat in threes: blue, deep blue, magnolia */
.stats-shapes .stat:nth-child(3n+1) { --tilt: -6deg; --shape-colour: var(--color-funding-blue); }
.stats-shapes .stat:nth-child(3n+2) { --tilt: 4deg; --shape-colour: var(--color-deep-blue); margin-top: 40px; animation-delay: .12s; }
.stats-shapes .stat:nth-child(3n) { --tilt: -3deg; --shape-colour: var(--color-magnolia); animation-delay: .24s; }

/* The number and label are turned back so they read level */
.stats-shapes .stat-number,
.stats-shapes .stat-label {
    position: relative;
    transform: rotate(calc(var(--tilt) * -1));
}

.stats-shapes .stat-number {
    color: var(--color-white);
    font-variant-numeric: tabular-nums;
}

.stats-shapes .stat-label {
    max-width: 16ch;
    color: rgba(255, 255, 255, .85);
    line-height: 1.3;
}

.stats-shapes .stat:nth-child(3n+2) .stat-number {
    color: var(--color-funding-blue);
}

.stats-shapes .stat:nth-child(3n) .stat-number {
    color: var(--color-deep-blue);
}

.stats-shapes .stat:nth-child(3n) .stat-label {
    color: var(--color-text-muted);
}

@keyframes stat-pop {
    from { opacity: 0; transform: rotate(var(--tilt)) scale(.6); }
    to { opacity: 1; transform: rotate(var(--tilt)) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .stats-shapes .stat {
        animation: none;
    }
}

/* Style: one number in a tinted banner */
.stats-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: -16px 0 40px;
    padding: 24px 30px;
    border: 0;
    border-radius: 18px;
    background: var(--color-magnolia);
}

.stats-banner .stat {
    display: contents;
}

.stats-banner .stat-number {
    font-size: var(--text-heading);
    white-space: nowrap;
}

.stats-banner .stat-label {
    max-width: none;
}

/* A dark panel with one large number, shown beside testimonials */
.stat-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    overflow: hidden;
    border-radius: var(--radius-large);
    background: var(--color-deep-blue);
    color: var(--color-white);
}

.stat-panel-number {
    position: relative;
    color: var(--color-funding-blue);
    font-size: var(--text-number);
    font-weight: 700;
    line-height: 1;
}

.stat-panel-label {
    position: relative;
    color: rgba(255, 255, 255, .8);
    font-size: var(--text-small);
}

/* The same panel on its own (Stats style "panel") is larger */
.stat-panel-large {
    min-height: 360px;
    padding: 48px 40px;
}

.stat-panel-large .stat-panel-number {
    font-size: clamp(64px, 8vw, 112px);
}

.stat-panel-large .stat-panel-label {
    max-width: 22ch;
    font-size: var(--text-lead);
}

.stat-panel .motion-line {
    bottom: -180px;
    left: -140px;
    width: 700px;
    opacity: .14;
}

/* Steps
   ========================================================================== */

.steps {
    position: relative;
    display: grid;
    gap: 32px;
}

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step p {
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

/* The title and text sit directly in the step, except in the numbered style */
.step-text {
    display: contents;
}

.step-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

/* Style: icons joined by arrows. Each icon sits on a pale tile in the step's colour,
   like the tiles in the home page's dashboard mockup. */
.steps-arrows .step-icon {
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-medium);
    background: var(--accent-pale);
    --icon-accent: var(--accent-icon);
}

.steps-arrows .step-icon .icon {
    width: 36px;
    height: 36px;
}

/* On a tinted section the tiles turn white, so they still stand out */
.bg-tint .steps-arrows .step-icon {
    background: var(--color-white);
}

/* Style: coloured discs on a line */
.steps-discs::before {
    content: "";
    position: absolute;
    top: 44px;
    right: 44px;
    left: 44px;
    height: 2px;
    background: var(--color-sky);
}

.steps-discs .step-icon {
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 4px solid var(--color-white);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--color-grey);

    /* On a solid colour an icon is one colour, never two-tone */
    --icon-accent: currentColor;
}

.bg-grey .steps-discs .step-icon {
    box-shadow: 0 0 0 2px var(--color-white);
}

.steps-discs .step-icon .icon {
    width: 52px;
    height: 52px;
}

.steps-discs .accent-blue .icon,
.steps-discs .accent-deep-blue .icon {
    color: var(--color-white);
    --icon-accent: currentColor;
}

/* Style: journey */
.steps-journey {
    gap: 0;
}

.steps-journey::before {
    content: "";
    position: absolute;
    top: 62px;
    right: 12%;
    left: 12%;
    height: 2px;
    background: var(--color-sky);
}

.steps-journey .step {
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    text-align: center;
}

.step-label {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-magnolia);
    color: var(--color-funding-blue);
    font-size: var(--text-x-small);
    font-weight: 600;
}

.steps-journey .step-icon {
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 4px solid var(--color-white);
    border-radius: 50%;
    background: var(--color-deep-blue);
    box-shadow: 0 0 0 2px var(--color-sky);
}

.steps-journey .step-icon .icon {
    color: var(--color-white);
    --icon-accent: var(--color-sky);
}

.steps-journey .step-title {
    margin-top: 4px;
    font-size: var(--text-title-small);
    line-height: 1.5;
}

.steps-journey .step p {
    font-size: var(--text-small);
}

/* Style: numbered list */
.steps-numbered {
    grid-template-columns: 1fr;
    gap: 0;
}

/* Four or more numbered steps form two columns */
.steps-numbered:has(> :nth-child(4)) {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
}

.steps-numbered .step {
    flex-direction: row;
    gap: 24px;
    padding: 28px 0;
    border-top: 1px solid var(--color-grey);
}

.steps-numbered .step:last-child {
    border-bottom: 1px solid var(--color-grey);
}

.steps-numbered:has(> :nth-child(4)) .step:last-child {
    border-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 64px;
    color: var(--color-funding-blue);
    font-size: var(--text-heading);
    font-weight: 700;
    line-height: 1;
}

.steps-numbered .step-text {
    display: block;
}

.steps-numbered .step-title {
    margin-bottom: 6px;
    line-height: 1.5;
}

.steps-numbered .step p {
    font-size: var(--text-small);
}

.bg-deep-blue .steps-numbered .step {
    border-color: rgba(255, 255, 255, .18);
}

.bg-deep-blue .steps-numbered .step p {
    color: rgba(255, 255, 255, .75);
}

/* Style: numbered pills */
.step-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-pills li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    background: var(--color-white);
    font-size: 16px;
    font-weight: 600;
    counter-increment: step;
}

.step-pills li::before {
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-button-blue);
    color: var(--color-white);
    font-size: 13px;
}

/* Pills sit closer to the section heading above them */
.section-head:has(+ .step-pills) {
    margin-bottom: 14px;
}

/* The line and arrow between steps, on desktop only */
@media (min-width: 1025px) {
    .steps-arrows .step:not(:last-child)::before {
        content: "";
        position: absolute;
        top: 35px;
        right: -8px;
        left: 88px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, rgba(129, 189, 234, 0), var(--color-sky) 40%);
    }

    .steps-arrows .step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 25px;
        right: -20px;
        width: 22px;
        height: 22px;
        background: var(--color-sky);
        -webkit-mask: url('../icons/arrow-right-02.svg') center / contain no-repeat;
        mask: url('../icons/arrow-right-02.svg') center / contain no-repeat;
    }
}

/* Testimonials
   ========================================================================== */

.testimonials {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
}

/* One quote on its own fills the width */
.testimonials-single {
    grid-template-columns: 1fr;
}

.testimonials-single .testimonial-featured {
    min-height: 0;
}

.testimonials-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

.testimonial {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 30px 32px 26px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--color-magnolia);
    color: var(--color-deep-blue);
}

.testimonial blockquote {
    position: relative;
    z-index: 1;
    flex: 1;
    margin: 0;
    padding-right: 48px;
    font-size: var(--text-title);
    font-weight: 600;
    line-height: 1.3;
}

.testimonial blockquote em {
    color: var(--color-funding-blue);
    font-style: normal;
}

.testimonial-author {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 15px;
}

.testimonial-author > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.testimonial-author strong {
    color: var(--color-deep-blue);
    font-weight: 600;
}

.testimonial-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-button-blue);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 700;
}

/* The large faded quotation mark in the corner */
.testimonial-quote-mark {
    position: absolute;
    top: -18px;
    right: 22px;
    color: var(--color-sky);
    font-size: 150px;
    font-weight: 700;
    line-height: 1;
    opacity: .45;
    pointer-events: none;
}

/* The first testimonial, shown large and dark */
.testimonial-featured {
    gap: 24px;
    min-height: 420px;
    padding: 32px 32px 76px;
    background: var(--color-deep-blue);
    color: var(--color-white);
}

.testimonial-mark {
    align-self: flex-start;
    width: 40px;
    height: 40px;
}

.testimonial-featured blockquote {
    margin-top: 8px;
    padding-right: 0;
    font-size: var(--text-subheading);
    line-height: 1.25;
}

.testimonial-featured .testimonial-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    color: rgba(255, 255, 255, .75);
    line-height: 1.35;
}

.testimonial-featured .testimonial-author strong {
    color: var(--color-white);
}

.testimonial-band {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 72px;
    padding: 0 20px 12px;
    background: var(--color-funding-blue);
    clip-path: polygon(0 42%, 100% 12%, 100% 100%, 0 100%);
}

.testimonial-pill {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--color-white);
    color: var(--color-deep-blue);
    font-size: 14px;
    font-weight: 600;
}

/* Text
   ========================================================================== */

.text > * + * {
    margin-top: 1em;
}

/* A large opening paragraph */
.text-lead {
    max-width: 60ch;
    font-size: var(--text-lead);
}

/* A very large, centred line under the brand mark */
.text-statement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.text-statement .text-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
}

.text-statement p {
    max-width: 22ch;
    font-size: var(--text-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* A short bold statement under other elements */
.text-note {
    margin-top: 40px;
    font-size: var(--text-lead);
    font-weight: 600;
}

.section-centred .text-note {
    max-width: 34ch;
    margin: 32px auto 0;
}

/* Inside a column the column's own spacing is enough */
.column .text-note {
    margin-top: 0;
}

/* Text page: long text such as a policy or a set of terms
   ========================================================================== */

.text-page :is(h2, h3, h4, h5, h6) {
    max-width: none;
    margin: 40px 0 0;
}

.text-page h2 {
    font-size: var(--text-subheading);
}

.text-page h4 {
    font-size: var(--text-title-small);
    font-weight: 600;
    line-height: 1.3;
}

.text-page :is(h5, h6) {
    margin-top: 28px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.text-page > :first-child {
    margin-top: 0;
}

.text-page a {
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.text-page a:hover {
    color: var(--color-deep-blue);
}

.text-page :is(ul, ol) {
    margin-bottom: 0;
    padding-left: 26px;
}

.text-page li + li,
.text-page li > :is(ul, ol) {
    margin-top: 8px;
}

.text-page img {
    height: auto;
    border-radius: var(--radius-small);
}

/* Search results
   ========================================================================== */

.search-form {
    display: flex;
    gap: 12px;
}

.search-results {
    display: grid;
    gap: 14px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.search-result {
    display: block;
    padding: 24px 28px;
    border: 1px solid var(--color-grey);
    border-radius: 20px;
    color: var(--color-deep-blue);
}

.search-result-type {
    color: var(--color-funding-blue);
    font-size: 14px;
    font-weight: 600;
}

.search-result-title {
    max-width: none;
    margin: 4px 0 6px;
    font-size: var(--text-title);
    line-height: 1.2;
}

.search-empty {
    margin-top: 32px;
}

/* Page numbers under a long list of results */
.pagination {
    margin-top: 32px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1.5px solid var(--color-grey);
    border-radius: var(--radius-pill);
    color: var(--color-deep-blue);
    font-size: 16px;
    font-weight: 600;
}

.page-numbers.current {
    border-color: var(--color-deep-blue);
    background: var(--color-deep-blue);
    color: var(--color-white);
}

/* Contact details
   ========================================================================== */

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-align: left;
}

.contact-detail-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--color-magnolia);
    --icon-accent: var(--color-sky);
}

.bg-tint .contact-detail-icon {
    background: var(--color-white);
    --icon-accent: var(--color-funding-blue);
}

.contact-detail-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-top: 2px;
}

.contact-detail-label {
    font-size: var(--text-small);
    font-weight: 600;
}

.contact-detail-body a {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-detail-body a:hover {
    color: var(--color-deep-blue);
}

.contact-detail-body address {
    color: var(--color-text-muted);
    font-style: normal;
}

.bg-deep-blue .contact-detail-icon {
    background: rgba(255, 255, 255, .12);
    --icon-accent: var(--color-sky);
}

.bg-deep-blue .contact-detail-icon .icon {
    color: var(--color-white);
}

.bg-deep-blue .contact-detail-body address {
    color: rgba(255, 255, 255, .78);
}

.bg-deep-blue .contact-detail-body a {
    color: var(--color-white);
    text-decoration: underline;
}

/* Embed
   ========================================================================== */

.embed {
    overflow: hidden;
    border-radius: var(--radius-large);
}

.embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.embed-16-9 { aspect-ratio: 16 / 9; }
.embed-4-3 { aspect-ratio: 4 / 3; }
.embed-square { aspect-ratio: 1; }

/* A shortcode prints whatever it likes, so it gets no frame */
.embed-shortcode {
    overflow: visible;
    border-radius: 0;
}

/* Gallery
   ========================================================================== */

.gallery {
    display: grid;
    gap: 16px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-medium);
    background: var(--color-grey);
    cursor: zoom-in;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* The larger view: a <dialog> made by js/main.js (initGallery) */
.lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(14, 27, 100, .92);
    color: var(--color-white);
}

.lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

html:has(.lightbox[open]) {
    overflow: hidden;
}

.lightbox-image {
    max-width: min(1400px, calc(100% - 140px));
    max-height: calc(100% - 120px);
    border-radius: var(--radius-small);
    object-fit: contain;
}

.lightbox-caption {
    max-width: 70ch;
    padding: 0 20px;
    font-size: var(--text-small);
    text-align: center;
}

.lightbox-button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid var(--color-white);
    border-radius: 50%;
    background: none;
    color: var(--color-white);
    cursor: pointer;
}

.lightbox-button:hover {
    background: var(--color-white);
    color: var(--color-deep-blue);
}

.lightbox-button:focus-visible {
    outline-color: var(--color-white);
}

/* The icon takes the button's colour: white, then Deep Blue when the button fills on hover */
.lightbox-button .icon {
    width: 24px;
    height: 24px;
    color: inherit;
}

.lightbox-close { top: 16px; right: 16px; }
.lightbox-previous { top: 50%; left: 16px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 16px; transform: translateY(-50%); }

/* Slideshow
   ========================================================================== */

.slideshow-window {
    overflow: hidden;
    border-radius: var(--radius-large);
}

.slideshow-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.slideshow-track::-webkit-scrollbar {
    display: none;
}

.slide {
    margin: 0;
    scroll-snap-align: start;
}

.slide img {
    display: block;
    width: 100%;
    height: auto;
}

.slide figcaption {
    padding: 12px 4px 0;
    color: var(--color-text-muted);
    font-size: var(--text-x-small);
    text-align: center;
}

.slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.slideshow-controls .carousel-dots {
    margin: 0;
}

/* A browser window frame, for screenshots of the platform */
.slideshow-framed .slideshow-window {
    padding: 0 10px 10px;
    border-radius: 20px;
    background: var(--color-deep-blue);
    box-shadow: 0 30px 70px rgba(14, 27, 100, .22);
}

.slideshow-bar {
    display: flex;
    gap: 7px;
    padding: 13px 8px;
}

.slideshow-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
}

.slideshow-framed .slideshow-track {
    border-radius: 12px;
    background: var(--color-white);
}

.slideshow-framed .slide figcaption {
    padding: 10px 12px;
}

.bg-deep-blue .slide figcaption {
    color: rgba(255, 255, 255, .78);
}

.bg-deep-blue .slideshow-framed .slide figcaption {
    color: var(--color-text-muted);
}

/* Table
   The same rules style the Table element and tables in long text (policies and terms).
   The rounded box is the wrapper, which also lets a wide table scroll sideways on a small screen.
   ========================================================================== */

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--color-grey);
    border-radius: var(--radius-medium);
    background: var(--color-white);
    color: var(--color-deep-blue);
}

.table,
.text-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-small);
}

/* Lines between cells only: the wrapper draws the outside edge */
.table :is(th, td),
.text-page :is(th, td) {
    padding: 12px 14px;
    border: solid var(--color-grey);
    border-width: 0 1px 1px 0;
    text-align: left;
    vertical-align: top;
}

.table :is(th, td):last-child,
.text-page :is(th, td):last-child {
    border-right-width: 0;
}

.table tbody tr:last-child :is(th, td),
.text-page tbody tr:last-child :is(th, td) {
    border-bottom-width: 0;
}

.table th,
.text-page th {
    background: var(--color-magnolia);
    font-weight: 600;
}

/* The caption is a strip across the top of the box */
.table caption {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-grey);
    color: var(--color-text-muted);
    font-size: var(--text-x-small);
    text-align: left;
    caption-side: top;
}

/* On a coloured section the lines are a little darker, so they still show */
.section:not(.bg-white) .table-scroll,
.section:not(.bg-white) .table :is(th, td, caption) {
    border-color: rgba(14, 27, 100, .14);
}

/* Tablet
   ========================================================================== */

@media (max-width: 1024px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-discs::before,
    .steps-journey::before {
        display: none;
    }

    .steps-journey,
    .steps-numbered {
        grid-template-columns: 1fr;
    }

    .carousel {
        grid-auto-columns: calc((100% - 20px) / 2);
    }

    .testimonials {
        grid-template-columns: 1fr;
    }

    .stats,
    .cards.columns-3,
    .cards.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .boxes {
        grid-template-columns: 1fr;
    }

    .columns-three {
        grid-template-columns: 1fr;
    }

    .gallery.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-shapes {
        grid-template-columns: repeat(3, 1fr);
    }

    .icon-list-chips {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile
   ========================================================================== */

@media (max-width: 820px) {
    .carousel {
        grid-auto-columns: 88%;
    }

    .icon-list-cards,
    .steps,
    .stats,
    .columns,
    .cards[class*="columns-"] {
        grid-template-columns: 1fr;
    }

    .steps-numbered:has(> :nth-child(4)),
    .icon-list-columns,
    .icon-list-figures .icon-list-item,
    .icon-list-figures .icon-list-item:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .icon-list-figures .icon-list-item:nth-child(even) .icon-list-icon {
        order: 0;
    }

    .stats-shapes .stat:nth-child(3n+2) {
        margin-top: 0;
    }

    .stats-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stats-banner .stat-number {
        white-space: normal;
    }

    .columns-reverse .column:first-child {
        order: 0;
    }

    .gallery[class*="columns-"] {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Square images (photographs of people) stay two to a row */
    .cards[class*="columns-"]:has(.card-image-square) {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cards:has(.card-image-square) .card {
        padding: 18px;
    }

    .cards:has(.card-image-square) .card-image {
        margin: -18px -18px 4px;
    }

    .lightbox-image {
        max-width: calc(100% - 24px);
    }

    .lightbox-previous,
    .lightbox-next {
        top: auto;
        bottom: 16px;
        transform: none;
    }

    .icon-list-chips {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-box {
        padding: 22px;
    }

    .gfield {
        grid-column: span 12;
    }

    .text-page table {
        min-width: 560px;
    }

    .search-form {
        flex-direction: column;
    }
}
