.tl-section {
    position: relative;
    overflow: hidden;
    --tl-accent: var(--color-green);
    --tl-gap: 2.5rem;
    color: var(--color-navy);
}

/* Section backgrounds */
.tl-section.bg-cyan  { background: var(--color-cyan); }
.tl-section.bg-white { background: var(--color-white); }
.tl-section.bg-azure { background: var(--color-azure); }
.tl-section.bg-pink  { background: var(--color-pink); }

/* Accent colours (eyebrow, year, line) */
.tl-section.accent-green  { --tl-accent: var(--color-green); }
.tl-section.accent-blue   { --tl-accent: var(--color-blue); }
.tl-section.accent-purple { --tl-accent: var(--color-purple); }
.tl-section.accent-navy   { --tl-accent: var(--color-navy); }

/* ---------- Header ---------- */
.tl-section .tl-head { margin-bottom: 4.5rem; }
.tl-section .tl-eyebrow {
    margin: 0 0 1rem;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--tl-accent);
}
.tl-section.header-center .tl-eyebrow,
.tl-section.header-center .tl-intro { text-align: center; }

.tl-section .tl-head-row {
    display: grid;
    align-items: center;
    column-gap: 1rem;
}
.tl-section.header-center .tl-head-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "prev title next";
}
.tl-section.header-left .tl-head-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "title prev next";
}
.tl-section .tl-prev  { grid-area: prev; }
.tl-section .tl-next  { grid-area: next; }
.tl-section .tl-title { grid-area: title; margin: 0; color: var(--color-navy); }
.tl-section.header-center .tl-title { text-align: center; }

.tl-section .tl-intro { max-width: 45rem; margin-top: 1.5rem; }
.tl-section.header-center .tl-intro { margin-left: auto; margin-right: auto; }
.tl-section .tl-intro,
.tl-section .tl-intro * { color: var(--color-navy); }
.tl-section .tl-intro > *:last-child { margin-bottom: 0; }

/* Arrows - navy when usable, white when at the start/end */
.tl-section .tl-arrow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-navy);
    color: var(--color-white);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.tl-section .tl-arrow svg {
    margin-left: 8%;
}
.tl-section .tl-arrow.tl-prev svg {
    transform: rotate(180deg);
    margin-left: -8% !important;
}
.tl-section .tl-arrow:disabled svg path {
    stroke: var(--color-navy);
}
.tl-section .tl-arrow[hidden] { display: none; }
.tl-section .tl-arrow span {
    display: block;
    width: .85rem;
    height: .85rem;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}
.tl-section .tl-prev span { transform: rotate(-135deg); margin-left: .3rem; }
.tl-section .tl-next span { transform: rotate(45deg);  margin-right: .3rem; }
.tl-section .tl-arrow:hover:not(:disabled) { background: var(--color-purple); }
.tl-section .tl-arrow:disabled {
    background: var(--color-white);
    color: var(--color-navy);
    cursor: default;
}
.tl-section .tl-arrow:focus-visible { outline: 3px solid var(--color-purple); outline-offset: 3px; }

/* ---------- Slider ---------- */
.tl-section .splide { visibility: visible; }
.tl-section .tl-slider .splide__list { align-items: stretch; }
.tl-section .tl-item { height: auto; display: flex; }

/* Let the next slide peek off the right edge of the screen, but not leak out on the left */
.tl-section.has-peek .tl-slider .splide__track {
    overflow: visible;
}
.tl-section .tl-list > li:last-of-type .tl-marker:after {
    display: none !important;
}
.tl-section .tl-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
.tl-section .tl-year {
    margin: 0 0 1.25rem;
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--tl-accent);
}

/* Marker + line (the line runs across the gap to the next slide) */
.tl-section .tl-marker {
    position: relative;
    height: 1.25rem;
    margin-bottom: 1.75rem;
}
.tl-section .tl-marker::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--tl-accent);
    border-radius: 50%;
    background: transparent;
}
.tl-section .tl-marker::after {
    content: "";
    position: absolute;
    top: calc(50% - 1px);
    left: 1.25rem;
    right: calc(var(--tl-gap) * -1);
    height: 2px;
    background: var(--tl-accent);
}
.tl-section .tl-item:last-child .tl-marker::after { right: 0; }

.tl-section .tl-item-title {
    margin: 0 0 .75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-navy);
}
.tl-section .tl-text { font-size: 1.0625rem; line-height: 1.65; }
.tl-section .tl-text > *:last-child { margin-bottom: 0; }

/* Image - pinned to the bottom so images line up across slides */
.tl-section .tl-media {
    position: relative;
    margin-top: auto;
    padding-top: 2.75rem;
}
.tl-section .tl-media::before { content: ""; display: block; }
.tl-section .tl-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--border-radius, 8px);
}
.tl-section.ratio-4-3 .tl-image    { aspect-ratio: 4 / 3; }
.tl-section.ratio-16-9 .tl-image   { aspect-ratio: 16 / 9; }
.tl-section.ratio-square .tl-image { aspect-ratio: 1 / 1; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 991.98px) {
    .tl-section .tl-head { margin-bottom: 3rem; }
    .tl-section .tl-arrow { width: 3.25rem; height: 3.25rem; }
    .tl-section .tl-year { font-size: 2.125rem; }
}

@media (max-width: 575.98px) {
    .tl-section { --tl-gap: 1.5rem; }
    .tl-section .tl-head { margin-bottom: 2.25rem; }
    .tl-section .tl-arrow { width: 2.75rem; height: 2.75rem; }
    .tl-section .tl-arrow span { width: .65rem; height: .65rem; border-width: 2px; }
    .tl-section .tl-head-row { column-gap: .5rem; }
    .tl-section .tl-year { font-size: 1.875rem; }
    .tl-section .tl-text { font-size: 1rem; }
    .tl-section .tl-arrow { display: none; }
}
