.event-browse-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.event-browse-actions button, .partner-contact {
    border: 1px solid #00796b; border-radius: 8px; padding: 11px 16px;
    background: #fff; color: #00695c; font: inherit; font-weight: 600;
    cursor: pointer; min-height: 44px;
}
.event-browse-actions input { width: 100%; min-width: 0; padding: 10px; }
.event-browse-actions input[hidden] { display: none; }
#event-archive .event-compact { display: block; }
#event-archive .event-compact .event-gallery,
#event-archive .event-compact .event-copy > p,
#event-archive .event-compact .event-facts,
#event-archive .event-compact .event-copy > .event-annual-note { display: none; }
.partner-panel { scroll-margin-top: var(--about-guide-offset, 190px); margin: 36px 0; padding: 28px; border: 1px solid #b2dfdb; border-radius: 16px; background: #f4fbf8; }
.partner-panel h2 { margin-top: 0; color: #00695c; }
.partner-panel p, .partner-panel li { line-height: 1.7; }
.partner-contact { display: inline-block; margin-top: 8px; text-decoration: none; }
.event-browse-actions button:focus-visible, .partner-contact:focus-visible { outline: 3px solid #00796b; outline-offset: 3px; }
/* Cylingo community gatherings — editorial, warm, and deliberately distinct from press coverage. */
#events-section {
    --event-ink: #214740;
    --event-muted: #5e7169;
    --event-paper: #fbf6e9;
    --event-line: rgba(32, 91, 76, .2);
    max-width: 1120px;
    margin: 42px auto 58px;
    padding: clamp(22px, 4vw, 46px);
    color: var(--event-ink);
    background:
        radial-gradient(ellipse at 0 100%, rgba(239, 194, 125, .2), transparent 30%),
        linear-gradient(135deg, #f5f7ed 0%, var(--event-paper) 100%);
    border: 1px solid var(--event-line);
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(28, 75, 63, .1);
    scroll-margin-top: 24px;
}

.event-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--event-line);
}

.event-eyebrow,
.event-date-label {
    color: #9c593d;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.event-section-heading h2 {
    margin: 6px 0 0;
    color: var(--event-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.035em;
    text-align: left;
}

.event-edition {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: #42675d;
    border: 1px solid var(--event-line);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.event-story {
    display: grid;
    grid-template-columns: minmax(250px, .78fr) minmax(0, 1.22fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

.event-copy {
    padding: 10px 0 0;
}

.event-story + .event-story {
    margin-top: 42px;
    padding-top: 42px;
    border-top: 1px solid var(--event-line);
}

.event-story { scroll-margin-top: 24px; }

.event-gallery-nav[hidden],
.event-gallery-thumbnails[hidden] { display: none; }
.event-viewer-step:disabled { opacity: .35; cursor: default; }

.event-archive {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--event-line);
}

.event-archive > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border: 1px solid var(--event-line);
    border-radius: 14px;
    background: #edf2e8;
    color: var(--event-ink);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.event-archive > summary::-webkit-details-marker { display: none; }
.event-archive > summary:hover { background: #e3ecdd; }
.event-archive > summary:focus-visible { outline: 3px solid #b85f3e; outline-offset: 3px; }
.event-archive-content { padding-top: 32px; }
.event-archive-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--event-ink);
}
.event-archive-tools label { font-weight: 700; font-size: .9rem; }
.event-archive-tools select {
    min-height: 44px;
    max-width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--event-line);
    border-radius: 8px;
    background: #fffdf6;
    color: var(--event-ink);
    font: inherit;
}
.event-archive-tools select:focus-visible,
.event-archive-index a:focus-visible { outline: 3px solid #b85f3e; outline-offset: 3px; }
#events-section .event-archive-index {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    flex-basis: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
#events-section .event-archive-index li { margin: 0; padding: 0; }
#events-section .event-archive-index a {
    display: inline-block;
    padding: 10px 0;
    color: var(--event-ink);
    font-size: .9rem;
    text-underline-offset: 3px;
}
.event-archive [hidden] { display: none !important; }
.event-archive .event-archive-first { margin-top: 0; padding-top: 0; border-top: 0; }
.event-archive-hide,
.event-archive[open] .event-archive-show { display: none; }
.event-archive[open] .event-archive-hide { display: inline; }
.event-archive-chevron {
    flex: 0 0 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}
.event-archive[open] .event-archive-chevron { transform: rotate(225deg); }

.event-date {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 3px solid #cf7952;
}

.event-date time {
    color: var(--event-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
}

.event-copy h3 {
    margin: 0 0 14px;
    color: var(--event-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 400;
    line-height: 1.15;
    text-align: left;
}

.event-copy > p {
    margin: 0 0 23px;
    color: var(--event-muted);
    font-size: .98rem;
    line-height: 1.75;
    text-align: left;
}

.event-sponsor-contact {
    color: var(--event-ink);
    font-weight: 700;
    text-underline-offset: 4px;
}

.event-sponsor-contact:focus-visible {
    outline: 2px solid #b85f3e;
    outline-offset: 3px;
}

.event-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    border-top: 1px solid var(--event-line);
}

.event-facts div {
    min-width: 0;
    padding: 15px 12px 14px 0;
    border-bottom: 1px solid var(--event-line);
}

.event-facts div:nth-child(odd) {
    border-right: 1px solid var(--event-line);
}

.event-facts div:nth-child(even) {
    padding-left: 14px;
}

.event-facts dt {
    margin-bottom: 5px;
    color: var(--event-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.event-facts dd {
    margin: 0;
    color: var(--event-ink);
    font-size: .91rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.event-gallery {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(32, 91, 76, .18);
    border-radius: 18px;
    background: rgba(255, 255, 255, .56);
}

.event-gallery-stage {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #e8e5d8;
}

.event-gallery-open {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.event-gallery-open img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 610px;
    object-fit: cover;
    object-position: center;
}

.event-gallery-landscape .event-gallery-open img {
    aspect-ratio: 4 / 3;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.event-gallery-open:focus-visible,
.event-gallery button:focus-visible,
.event-viewer button:focus-visible {
    outline: 3px solid #b85f3e;
    outline-offset: 3px;
}

.event-gallery-nav {
    position: absolute;
    inset: 50% 10px auto;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.event-gallery-nav button {
    display: grid;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    color: #fffdf4;
    background: rgba(25, 60, 52, .78);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color .18s ease, transform .18s ease;
}

.event-gallery-nav button:hover {
    background: #214740;
    transform: scale(1.04);
}

.event-gallery-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 2px 10px;
    color: var(--event-muted);
    font-size: .8rem;
}

.event-gallery-count {
    color: var(--event-ink);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.event-gallery-hint {
    text-align: right;
}

.event-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(var(--event-photo-count, 4), minmax(0, 1fr));
    gap: 8px;
}

.event-gallery-thumb {
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #e8e5d8;
    cursor: pointer;
}

.event-gallery-thumb[aria-current="true"] {
    border-color: #b85f3e;
    box-shadow: 0 0 0 1px #b85f3e;
}

.event-gallery-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.event-gallery-thumb-number {
    position: absolute;
    right: 5px;
    bottom: 5px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(25, 60, 52, .84);
    font-size: .68rem;
    font-weight: 800;
}

.event-viewer {
    width: min(94vw, 1100px);
    max-width: none;
    max-height: 94dvh;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    color: #fbf6e9;
    background: #173d35;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .35);
}

.event-viewer::backdrop {
    background: rgba(16, 34, 30, .88);
}

.event-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 0 12px;
    color: #e3e9df;
    font-size: .85rem;
}

.event-viewer-active { overflow: hidden; }

.event-viewer-browse {
    display: flex;
    align-items: center;
    gap: 14px;
}

.event-viewer-close,
.event-viewer-step {
    display: grid;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: #fbf6e9;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.event-viewer-image-wrap {
    display: grid;
    min-height: 180px;
    max-height: calc(94dvh - 88px);
    place-items: center;
}

.event-viewer-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(94dvh - 88px);
    object-fit: contain;
}

.event-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    #events-section {
        margin: 30px 12px 42px;
        padding: 22px 18px;
        border-radius: 19px;
    }

    .event-section-heading {
        display: block;
    }

    .event-edition {
        display: none;
    }

    .event-story {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .event-copy { padding-top: 0; }
    .event-gallery { padding: 9px; }
    .event-gallery-open img { max-height: 72vh; }
    .event-gallery-nav { inset-inline: 7px; }
    .event-gallery-nav button { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .event-gallery-nav button { transition: none; }
}
