.editorial-page[data-page-template='event'] .editorial-sections {
    --event-panel-line: color-mix(in srgb, var(--editorial-accent) 25%, var(--editorial-paper));
    --event-panel-accent: var(--event-poster-highlight, color-mix(in srgb, var(--editorial-accent) 17%, #fffaf2));
    display: grid;
    gap: clamp(18px, 2.8vw, 30px);
    padding-block: clamp(24px, 4.5vw, 56px);
}
@media screen {
    .editorial-page[data-page-template='event'] .editorial-sections {
        /* Separate the first card from the hero using the shared section rhythm. */
        padding-block-start: var(--page-section-space) !important;
    }
}
.editorial-page[data-page-template='event'] .editorial-sections > * {
    min-inline-size: 0;
    margin-block-start: 0;
}
.editorial-page[data-page-template='event'] .editorial-sections > :is(.event-detail-section, .event-location-panel) {
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid var(--event-panel-line);
    border-radius: 16px;
    background-color: color-mix(in srgb, var(--editorial-paper) 62%, #fff);
}
.editorial-page[data-page-template='event'] .editorial-sections :is(.event-detail-section, .event-location-panel) h2 {
    color: var(--editorial-accent);
    font-size: clamp(1.75rem, 3.5vw, 2.65rem);
    line-height: 1.08;
}
.event-section-icon {
    display: grid;
    place-items: center;
    inline-size: 42px;
    block-size: 42px;
    margin-block-end: 15px;
    border-radius: 50%;
    background: var(--event-panel-accent);
    color: var(--event-on-highlight, #241a21);
}
.event-section-icon .ui-icon { width: 21px; height: 21px; }
.editorial-page[data-page-template='event'] .event-detail-section .editorial-items {
    margin-block-start: 20px;
}
.event-detail-section .editorial-item {
    padding-block: 16px;
}
.event-detail-section .editorial-item:first-child { padding-block-start: 0; }
.event-detail-section .editorial-item:last-child { padding-block-end: 0; }
.event-detail-section .editorial-item h3 {
    font-size: clamp(1.15rem, 2.1vw, 1.4rem);
    line-height: 1.24;
}
.event-detail-section .editorial-item p,
.page-location-map-description {
    margin-block-start: 8px;
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.event-detail-section .editorial-item img {
    max-block-size: 390px;
    border-radius: 10px;
}
.event-detail-section .editorial-item-with-value strong {
    justify-self: start;
    padding: 4px 9px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--event-panel-accent) 43%, var(--editorial-paper));
    color: #241a21;
    overflow-wrap: anywhere;
}
.event-program-section .editorial-items:has(.editorial-item-with-value) {
    border-inline-start: 1px solid var(--event-panel-line);
    padding-inline-start: 20px;
    margin-inline-start: 5px;
}
.event-program-section .editorial-items:has(.editorial-item-with-value) .editorial-item {
    position: relative;
}
.event-program-section .editorial-items:has(.editorial-item-with-value) .editorial-item::before {
    content: "";
    position: absolute;
    inset-inline-start: -25px;
    inset-block-start: 23px;
    inline-size: 9px;
    block-size: 9px;
    border: 1px solid var(--editorial-accent);
    border-radius: 50%;
    background: var(--event-panel-accent);
}
.event-program-section .editorial-items:has(.editorial-item-with-value) .editorial-item:first-child::before {
    inset-block-start: 7px;
}
.editorial-page[data-page-template='event'] .editorial-sections > .event-performer-section {
    background-color: color-mix(in srgb, var(--editorial-accent) 55%, #17161c);
    background-image: repeating-radial-gradient(circle at 104% 100%, transparent 0 23px,
        color-mix(in srgb, var(--event-panel-accent) 17%, transparent) 24px 25px, transparent 26px 36px);
    color: #fffaf2;
}
.editorial-page[data-page-template='event'] .editorial-sections .event-performer-section h2,
.event-performer-section .editorial-item p {
    color: inherit;
}
.event-performer-section .editorial-item {
    border-color: color-mix(in srgb, currentColor 27%, transparent);
}
.editorial-page[data-page-template='event'] .event-location-panel .page-location-map-card {
    margin-block-start: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}
.event-location-panel .page-location-map-copy h3 {
    font-size: clamp(1.15rem, 2vw, 1.36rem);
}
.event-location-panel .page-location-map-address {
    font-size: 1rem;
    font-weight: 650;
}
.event-location-panel h3 + .page-location-map-address { font-weight: 500; }
.event-location-panel .page-location-map-description { white-space: pre-wrap; }
.event-location-panel .page-location-map-note { margin-block-start: var(--compact-action-gap); }
.event-venue-details {
    display: grid;
    gap: var(--compact-action-gap);
    margin-block-start: var(--compact-action-gap);
}
.event-venue-detail p { overflow-wrap: anywhere; }
.event-venue-detail-title { font-weight: 750; }
.event-venue-detail img {
    display: block;
    max-inline-size: 100%;
    max-block-size: 240px;
    object-fit: contain;
    border-radius: 8px;
    margin-block-end: var(--compact-action-gap);
}
.event-location-panel .page-location-map-copy .page-location-map-links {
    margin-block-start: var(--action-content-space);
}
.event-location-panel .page-location-map-copy .page-location-map-links a {
    flex: 1 1 112px;
    justify-content: center;
    text-align: center;
    background-color: color-mix(in srgb, currentColor 8%, transparent);
}
.event-location-panel .page-location-map-copy .page-location-map-links a:hover {
    background-color: color-mix(in srgb, currentColor 16%, transparent);
}
.event-location-panel .page-location-map-copy .page-location-map-links .ui-icon { display: none; }
.event-map-disclosure {
    align-self: start;
    min-inline-size: 0;
    border-block-start: 1px solid var(--event-panel-line);
}
.event-map-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--compact-action-gap);
    min-height: 44px;
    padding: 8px 0;
    border-radius: 8px;
    font: 700 .875rem/1.35 var(--brand-sans);
    cursor: pointer;
    list-style: none;
}
.event-map-disclosure > summary::before {
    order: 1;
    margin-inline-end: 0;
}
.event-map-disclosure > summary::-webkit-details-marker { display: none; }
.event-map-disclosure > summary:hover { text-decoration: underline; }
.event-map-disclosure > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.event-map-disclosure:not([open]) .event-map-collapse,
.event-map-disclosure[open] .event-map-expand { display: none; }
.event-map-frame:not(:empty) { margin-block-start: var(--compact-action-gap); }

.event-location-panel .event-map-frame iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-block-size: 200px;
    max-block-size: 320px;
    background-color: var(--editorial-paper);
    border: 1px solid var(--event-panel-line);
    border-radius: 10px;
}
@media (min-width: 880px) {
    .editorial-page[data-page-template='event'] .editorial-sections:has(> .event-performer-section + .event-location-panel) {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    }
    .editorial-page[data-page-template='event'] .editorial-sections:has(> .event-performer-section + .event-location-panel) >
        :not(.event-performer-section:has(+ .event-location-panel), .event-performer-section + .event-location-panel) {
        grid-column: 1 / -1;
    }
}
@media (max-width: 500px) {
    .editorial-page[data-page-template='event'] .event-detail-section .editorial-item-with-value {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
    .editorial-page[data-page-template='event'] .event-detail-section .editorial-item-with-value strong { grid-area: 1 / 1; }
    .editorial-page[data-page-template='event'] .event-detail-section .editorial-item-with-value > :not(strong) { grid-column: 1; }
}

.editorial-page[data-event-artwork] {
    --event-canvas: color-mix(in srgb, var(--event-poster-primary) 40%, #161017);
    --editorial-paper: var(--event-canvas);
    --editorial-surface: var(--event-canvas);
    --editorial-hero-ink: #fffaf3;
    --editorial-ink: var(--editorial-hero-ink);
    --editorial-accent: var(--editorial-hero-ink);
    --editorial-line: color-mix(in srgb, var(--editorial-ink) 23%, transparent);
    --editorial-content-width: 1200px;
    --event-card-surface: color-mix(in srgb, var(--event-canvas) 91%, #000);
    --event-readable-secondary: color-mix(in srgb, var(--event-poster-secondary) 44%, var(--editorial-ink));
}

.draft-page-preview:has(> .editorial-page[data-event-artwork]) { padding-block-end: 0; }
.draft-page-preview > .editorial-page[data-event-artwork] { padding-block-end: calc(74px + env(safe-area-inset-bottom)); }

.editorial-page[data-event-artwork] .editorial-hero {
    position: relative;
    isolation: isolate;
    border-block-end: 1px solid var(--editorial-line);
    background: var(--event-canvas);
}

.editorial-page[data-event-artwork] .editorial-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('/brand/event-hero-grain.webp') 0 0 / 128px 128px;
    mix-blend-mode: soft-light;
    opacity: .17;
    pointer-events: none;
}

.editorial-page[data-event-artwork] .editorial-has-art .editorial-hero-inner {
    grid-template-columns: minmax(0, 1.32fr) minmax(0, .88fr);
    grid-template-areas: "flyer event";
    gap: clamp(24px, 4.5vw, 62px);
    padding-block: clamp(28px, 4.6vw, 64px);
}

.editorial-page[data-event-artwork] .editorial-intro { grid-area: event; }

.editorial-page[data-event-artwork] .editorial-intro h1 {
    max-inline-size: 22ch;
    font-size: clamp(2.15rem, 4.4vw, 3.95rem);
    line-height: 1.02;
    text-wrap: balance;
}

.event-artwork-venue {
    margin-block-start: 8px;
    color: var(--event-readable-secondary);
    font-size: clamp(1.18rem, 2.1vw, 1.65rem);
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.editorial-page[data-event-artwork] .event-hero-billing strong {
    font-size: clamp(1.05rem, 1.65vw, 1.35rem);
}

.editorial-page[data-event-artwork] .editorial-facts {
    justify-content: flex-start;
    gap: 10px clamp(20px, 4vw, 46px);
    padding: 14px 0 0;
    border: 0;
    border-block-start: 1px solid var(--editorial-line);
    border-radius: 0;
    background: transparent;
}

.editorial-page[data-event-artwork] .editorial-facts > div { flex: 0 1 auto; }
.editorial-page[data-event-artwork] .editorial-facts dt { color: var(--event-readable-secondary); }

.editorial-page[data-event-artwork] .editorial-hero-media {
    grid-area: flyer;
    justify-self: center;
    max-inline-size: 100%;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    box-shadow: 0 18px 42px #0005;
}

.editorial-page[data-event-artwork] .editorial-hero-media .editorial-cover {
    width: auto;
    max-width: 100%;
    max-height: min(73svh, 590px);
    border-radius: inherit;
}

.editorial-page[data-event-artwork] .editorial-section-nav {
    background: var(--event-card-surface);
}

.editorial-page[data-event-artwork] .editorial-sections {
    --event-panel-line: var(--editorial-line);
    --event-panel-accent: var(--event-readable-secondary);
    padding-block: clamp(22px, 3.9vw, 48px);
}

.editorial-page[data-event-artwork] .editorial-sections > :is(.event-detail-section, .event-location-panel) {
    background-color: var(--event-card-surface);
}

.editorial-page[data-event-artwork] .editorial-sections .event-location-panel h2 {
    font-size: clamp(1.45rem, 2.7vw, 2rem);
}

.editorial-page[data-event-artwork] .event-location-panel .event-section-icon {
    inline-size: 30px;
    block-size: 30px;
    margin-block-end: 9px;
    background: var(--event-readable-secondary);
}

.editorial-page[data-event-artwork] .event-location-panel .event-section-icon .ui-icon {
    width: 16px;
    height: 16px;
}

.editorial-page[data-event-artwork] .event-detail-section .editorial-item p { color: inherit; }

.editorial-page[data-event-artwork] .event-detail-section .editorial-item-with-value strong {
    background: color-mix(in srgb, var(--event-card-surface) 86%, var(--editorial-ink));
    color: var(--editorial-ink);
}

@media (max-width: 760px) {
    .editorial-page[data-event-artwork] .editorial-has-art .editorial-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "flyer"
            "event";
    }

    .editorial-page[data-event-artwork] .editorial-intro h1 { text-wrap: pretty; }
}

.editorial-page[data-page-template='event'][data-event-pattern] {
    --event-pattern-line: color-mix(in srgb, var(--event-poster-secondary, var(--accent)) 19%, transparent);
    --event-pattern-dot: color-mix(in srgb, var(--event-poster-secondary, var(--accent)) 26%, transparent);
    --event-pattern-wash: color-mix(in srgb, var(--event-poster-highlight, var(--highlight)) 9%, transparent);
    background-image: var(--event-pattern-image, none);
    background-size: var(--event-pattern-size, auto);
}

.editorial-page[data-event-pattern='contour'] {
    --event-pattern-image:
        radial-gradient(ellipse 62% 420px at 95% 20px, var(--event-pattern-wash), transparent),
        repeating-radial-gradient(ellipse 650px 420px at 101% -96px,
            transparent 0 34px, var(--event-pattern-line) 35px 36px, transparent 37px 54px);
}

.editorial-page[data-event-pattern='halftone'] {
    --event-pattern-image:
        radial-gradient(ellipse 65% 460px at 2% 0, var(--event-pattern-wash), transparent),
        radial-gradient(circle at 4px 4px, var(--event-pattern-dot) 0 1px, transparent 1.5px),
        radial-gradient(circle at 10px 10px, var(--event-pattern-line) 0 .7px, transparent 1.2px);
    --event-pattern-size: auto, 12px 12px, 12px 12px;
}

.editorial-page[data-event-pattern='grid'] {
    --event-pattern-image:
        linear-gradient(136deg, var(--event-pattern-wash), transparent 600px),
        linear-gradient(45deg, transparent calc(50% - 1px), var(--event-pattern-line) 50%, transparent calc(50% + 1px)),
        linear-gradient(-45deg, transparent calc(50% - 1px), var(--event-pattern-line) 50%, transparent calc(50% + 1px));
    --event-pattern-size: auto, 44px 44px, 44px 44px;
}

.editorial-page[data-page-template='event'][data-event-pattern] .editorial-hero {
    background-image: var(--event-pattern-image, none);
    background-size: var(--event-pattern-size, auto);
    background-blend-mode: normal;
}

.editorial-page[data-event-artwork][data-event-pattern] {
    --event-details-tone: color-mix(in srgb, var(--event-canvas) 88%, #f3e6d8);
    background-color: var(--event-details-surface, var(--event-details-tone));
}

@supports (color: oklch(from red min(l, .50) c h)) {
    .editorial-page[data-event-artwork][data-event-pattern] {
        --event-details-surface: oklch(from var(--event-details-tone) min(l, .50) c h);
    }
}

/* Tint the hero over the shared pattern so the motif stays aligned below it. */
.editorial-page[data-event-artwork][data-event-pattern] .editorial-hero {
    background: color-mix(in srgb, #161017 24%, transparent);
}

.editorial-page[data-event-artwork][data-event-pattern] .editorial-hero::before {
    content: none;
}

.editorial-page[data-event-artwork][data-event-pattern] .editorial-section-nav {
    background-color: color-mix(in srgb, var(--event-details-surface, var(--event-details-tone)) 90%, var(--event-canvas));
}

.editorial-page[data-page-template='event'][data-event-pattern] .editorial-sections > .event-performer-section {
    background-image: none;
}

@media (max-width: 760px) {
    .editorial-page[data-page-template='event'][data-event-pattern] {
        --event-pattern-line: color-mix(in srgb, var(--event-poster-secondary, var(--accent)) 15%, transparent);
        --event-pattern-dot: color-mix(in srgb, var(--event-poster-secondary, var(--accent)) 21%, transparent);
    }

    .editorial-page[data-event-pattern='contour'] {
        --event-pattern-image:
            radial-gradient(ellipse 78% 350px at 100% 12px, var(--event-pattern-wash), transparent),
            repeating-radial-gradient(ellipse 390px 270px at 106% -48px,
                transparent 0 26px, var(--event-pattern-line) 27px 28px, transparent 29px 40px);
    }
}

@media screen and (min-width: 1024px) {
    .editorial-page[data-event-artwork] .editorial-has-art .editorial-hero-inner {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        gap: clamp(32px, 4.5vw, 72px);
    }

    .editorial-page[data-event-artwork] .editorial-has-art .editorial-hero-media {
        justify-self: start;
    }

    .editorial-page[data-event-artwork] .editorial-has-art .editorial-cover {
        max-block-size: min(73svh, 640px);
    }

    .editorial-page[data-event-artwork] .editorial-has-art .editorial-intro::before {
        content: '';
        display: block;
        inline-size: 48px;
        block-size: 4px;
        margin-block-end: 20px;
        background: var(--event-poster-highlight, var(--editorial-accent));
    }

    .editorial-page[data-page-template='event'] .editorial-event-photo .editorial-hero-inner {
        --page-title-size: clamp(3.125rem, 4.9vw, 4.25rem);
        width: min(var(--editorial-content-width), 100% - 2 * var(--editorial-gutter));
        grid-template-columns: minmax(min(56%, 31rem), 1.05fr) minmax(0, 1fr);
        grid-template-areas: 'event photo';
        gap: clamp(32px, 3.6vw, 52px);

        & .editorial-intro { grid-area: event; }
        & .editorial-hero-media {
            grid-area: photo;
            justify-self: stretch;
        }
        & h1 {
            max-inline-size: 13ch;
            text-wrap: balance;
        }
        & .editorial-facts {
            column-gap: var(--action-gap);
            padding-inline: 12px;
        }
        & .editorial-facts-with-date:has(> div:nth-child(3):last-child) {
            flex-wrap: nowrap;

            & > div + div {
                flex-shrink: 0;
                max-inline-size: 40%;
            }
        }
        & .editorial-facts dd { text-wrap: pretty; }
        & .editorial-cover {
            width: 100%;
            max-block-size: none;
            aspect-ratio: 4 / 3;
            object-fit: cover;
        }
    }

    .editorial-page[data-event-artwork][data-event-pattern] {
        --event-pattern-line: color-mix(in srgb, var(--event-poster-secondary, var(--accent)) 12%, transparent);
        --event-pattern-dot: color-mix(in srgb, var(--event-poster-secondary, var(--accent)) 16%, transparent);
    }

    .editorial-page[data-event-artwork] .editorial-sections:has(> .event-program-section:first-child + .event-location-panel:last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        column-gap: clamp(32px, 4vw, 48px);

        & > :is(.event-program-section, .event-location-panel) {
            padding: 0 !important;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        & > :is(.event-program-section, .event-location-panel) > .event-section-icon { display: none; }

        & .event-program-section .editorial-items {
            margin: 0;
            padding-inline-start: 0;
            border-inline-start: 0;
            border-block-start: 1px solid var(--event-panel-line);
        }

        & .event-program-section .editorial-item::before { content: none; }
        & .event-program-section .editorial-item:first-child { padding-block-start: 16px; }

        & .event-program-section .editorial-item-with-value {
            grid-template-columns: minmax(0, clamp(6.5rem, 9vw, 8rem)) minmax(0, 1fr);
            column-gap: 16px;
        }

        & .event-program-section .editorial-item-with-value strong {
            padding: 0;
            background: none;
            color: var(--event-readable-secondary);
        }

        & .event-location-panel .page-location-map-card {
            margin-block-start: 0;
            padding: clamp(20px, 2.5vw, 30px);
            border: 1px solid var(--event-panel-line);
            border-radius: 16px;
            background-color: var(--event-card-surface);
        }
    }
}
