/* Shared public art direction. Loaded after optional frontend themes; never loaded for operations routes. */
body.public-storytelling-shell {
    --tac-ink: #18181b;
    --tac-canvas: #f6f2eb;
    --tac-paper: #fbfaf7;
    --tac-muted: #18181b;
    --tac-link: #465CAA;
    /* Use the actual public palette for the heading faces. */
    --public-heading-vermilion: #F15A3A;
    --public-heading-yellow: #E0CA4A;
    --public-heading-cobalt: #3454D1;
    --bs-body-color: var(--tac-ink);
    --bs-body-bg: var(--tac-canvas);
    --public-art-card-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 240, 0.982));
    --public-art-border: rgba(24, 24, 27, 0.16);
    --public-art-shadow:
        0 1px 2px rgba(24, 24, 27, 0.05),
        0 11px 30px rgba(24, 24, 27, 0.08);
    background-color: var(--tac-canvas);
    background-image:
        url("../images/branding/storytelling-paper-grain.svg?v=2.2.65"),
        radial-gradient(ellipse 58rem 42rem at 104% -3rem, rgba(241, 90, 58, 0.16), transparent 72%),
        radial-gradient(ellipse 62rem 48rem at -8rem 82%, rgba(70, 92, 170, 0.14), transparent 74%),
        radial-gradient(ellipse 52rem 40rem at 105% 92%, rgba(224, 202, 74, 0.15), transparent 75%),
        radial-gradient(ellipse 58rem 74rem at 50% 36%, rgba(255, 255, 255, 0.34), transparent 76%);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: 720px 720px, auto, auto, auto, auto;
    background-position: left top, right top, left bottom, right bottom, center top;
    color: var(--tac-ink);
}

body.public-storytelling-shell .site-navbar {
    background: rgba(251, 248, 242, 0.96);
    border-bottom-color: var(--public-art-border);
    box-shadow: 0 5px 20px rgba(24, 24, 27, 0.05);
    backdrop-filter: none;
}

/* The alternate Living Exhibition shell supplies the public navigation on its
   selected theme. Keep its structure, but bring it into the shared public
   surface system. */
body.public-storytelling-shell .le-header {
    background: rgba(251, 248, 242, 0.96);
    border-bottom-color: var(--public-art-border);
    box-shadow: 0 5px 20px rgba(24, 24, 27, 0.05);
}

body.public-storytelling-shell .le-nav a,
body.public-storytelling-shell .le-menu-toggle {
    color: var(--tac-ink);
}

body.public-storytelling-shell .le-menu-toggle {
    border-color: var(--public-art-border);
    background: rgba(255, 255, 255, 0.74);
}

body.public-storytelling-shell .le-header-cta {
    background: #F15A3A;
    color: var(--tac-ink);
}

body.public-storytelling-shell .le-nav a:is(:hover, :focus-visible) {
    color: #F15A3A;
}

/* Public headings now carry the hierarchy on their own. Keep operational
   labels and metadata intact, but remove the repeated eyebrow prefaces. */
body.public-storytelling-shell .eyebrow {
    display: none;
}

body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) {
    color: var(--public-heading-vermilion);
    font-family: var(--tac-font-display);
    font-weight: 400;
    font-style: normal;
    letter-spacing: -0.025em;
    text-shadow:
        2px 2px 0 #3454D1,
        4px 4px 0 #E0CA4A;
}

body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6).storytelling-heading-treatment--vermilion {
    color: var(--public-heading-vermilion);
    text-shadow:
        2px 2px 0 #3454D1,
        4px 4px 0 #E0CA4A;
}

body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6).storytelling-heading-treatment--yellow {
    color: var(--public-heading-yellow);
    text-shadow:
        2px 2px 0 #F15A3A,
        4px 4px 0 #3454D1;
}

body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6).storytelling-heading-treatment--cobalt {
    color: var(--public-heading-cobalt);
    text-shadow:
        2px 2px 0 #E0CA4A,
        4px 4px 0 #F15A3A;
}

body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) a,
body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) a:is(:hover, :focus, :focus-visible) {
    color: inherit;
}

body.public-storytelling-shell :is(.artist-directory-intro, .artist-directory-editor-head) h1 {
    color: var(--tac-ink);
    font-family: var(--tac-font-sans);
    font-weight: 700;
    letter-spacing: -0.035em;
    text-shadow: none;
}

/* Keep color and the two stepped shadow layers, without a third keyline. */
body.public-storytelling-shell :is(
    .storytelling-hero-title-word--art,
    .exhibition-title-treatment
) {
    color: var(--public-heading-vermilion);
}

body.public-storytelling-shell .storytelling-hero-title-word--gather {
    color: var(--public-heading-yellow);
}

body.public-storytelling-shell .storytelling-hero-title-word--grow {
    color: var(--public-heading-cobalt);
}

body.public-storytelling-shell :is(
    .frame-panel,
    .hero-panel,
    .hero-note,
    .glass-card,
    .form-shell,
    .result-card,
    .login-card,
    .module-card,
    .map-rail,
    .map-stage-shell,
    .story-feature,
    .program-card,
    .participation-item,
    .support-slab,
    .editorial-card,
    .pos-panel
) {
    --frame-surface: var(--public-art-card-surface);
    color: var(--tac-ink);
    border-color: var(--public-art-border);
    box-shadow: var(--public-art-shadow);
    backdrop-filter: none;
}

/* Carousel cards sit close together. A compact downward shadow preserves
   their separation without overlapping into the paper-filled gutters. */
body.public-storytelling-shell .storytelling-card-carousel-item {
    margin-bottom: 0;
    box-shadow: 0 3px 10px rgba(24, 24, 27, 0.07);
}

/* The image belongs to the frame background, so the existing corner marks
   remain above it while the paper surface can dissolve into the artwork. */
body.storytelling-homepage .storytelling-hero-copy--with-image {
    --frame-surface:
        linear-gradient(90deg, rgba(251, 250, 247, 1) 0%, rgba(251, 250, 247, 0.99) 39%, rgba(251, 250, 247, 0.86) 54%, rgba(251, 250, 247, 0.48) 67%, rgba(251, 250, 247, 0.08) 84%, rgba(251, 250, 247, 0) 100%) 0 0 / 100% 100% no-repeat,
        var(--storytelling-hero-image) right center / cover no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 240, 0.982)) 0 0 / 100% 100% no-repeat;
}

/* Current-exhibition images use the same paper-to-artwork dissolve as the
   hero. The source is right aligned at full frame height, with the copy
   layered over the quiet paper side. */
body.public-storytelling-shell .storytelling-exhibition-carousel {
    position: relative;
    background: var(--tac-paper);
}

body.public-storytelling-shell .storytelling-exhibition-carousel::after {
    content: "";
    grid-area: 1 / 1;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(251, 250, 247, 1) 0%, rgba(251, 250, 247, 1) 44%, rgba(251, 250, 247, 0.96) 52%, rgba(251, 250, 247, 0.7) 65%, rgba(251, 250, 247, 0.3) 78%, rgba(251, 250, 247, 0.04) 91%, rgba(251, 250, 247, 0) 100%);
}

body.public-storytelling-shell :is(
    .storytelling-feature.has-exhibition-media,
    .storytelling-gallery-story.has-media,
    .gallery-exhibition-showcase.has-media
) {
    display: block;
    min-height: clamp(29rem, 34vw, 38rem);
    isolation: isolate;
    overflow: hidden;
    padding: 0 !important;
}

body.public-storytelling-shell :is(
    .storytelling-feature.has-exhibition-media,
    .storytelling-gallery-story.has-media,
    .gallery-exhibition-showcase.has-media
) > .storytelling-exhibition-carousel {
    position: absolute;
    inset: 0;
    z-index: 0 !important;
    width: 100%;
    max-width: none;
    height: 100%;
    aspect-ratio: auto;
    margin: 0 !important;
    border-radius: 0;
    background: transparent;
}

/* The carousel spans the full card so its fade can conceal the photo's left
   edge. The photograph itself remains on the right 60% at full height. */
body.public-storytelling-shell :is(
    .storytelling-feature.has-exhibition-media,
    .storytelling-gallery-story.has-media,
    .gallery-exhibition-showcase.has-media
) > .storytelling-exhibition-carousel .storytelling-exhibition-slide img {
    width: 60%;
    justify-self: end;
}

body.public-storytelling-shell :is(
    .storytelling-feature.has-exhibition-media,
    .storytelling-gallery-story.has-media,
    .gallery-exhibition-showcase.has-media
) > .storytelling-exhibition-carousel::after {
    display: block;
}

body.public-storytelling-shell :is(
    .storytelling-feature.has-exhibition-media,
    .storytelling-gallery-story.has-media,
    .gallery-exhibition-showcase.has-media
) > :is(.storytelling-feature-copy, .storytelling-gallery-copy, .gallery-exhibition-copy) {
    position: relative;
    z-index: 2;
    display: grid;
    width: min(58%, 44rem);
    min-height: clamp(29rem, 34vw, 38rem);
    align-content: center;
    justify-items: start;
    padding: max(2rem, var(--frame-safe-y)) var(--frame-padding-x);
}

body.public-storytelling-shell :is(
    .storytelling-feature.has-exhibition-media,
    .storytelling-gallery-story.has-media,
    .gallery-exhibition-showcase.has-media
)::before {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 0;
    pointer-events: none;
    background:
        url("../images/branding/corner-01.svg") left var(--frame-offset) top var(--frame-offset) / var(--frame-corner-width) var(--frame-corner-height) no-repeat,
        url("../images/branding/corner-02.svg") right var(--frame-offset) top var(--frame-offset) / var(--frame-corner-width) var(--frame-corner-height) no-repeat,
        url("../images/branding/corner-03.svg") left var(--frame-offset) bottom var(--frame-offset) / var(--frame-corner-width) var(--frame-corner-height) no-repeat,
        url("../images/branding/corner-04.svg") right var(--frame-offset) bottom var(--frame-offset) / var(--frame-corner-width) var(--frame-corner-height) no-repeat;
}

@media (min-width: 992px) {
    body.storytelling-homepage .storytelling-hero-copy--with-image .storytelling-hero-copy-content {
        max-inline-size: min(58%, 42rem);
    }
}

@media (max-width: 991.98px) {
    body.storytelling-homepage .storytelling-hero-copy--with-image {
        --frame-surface:
            linear-gradient(90deg, rgba(251, 250, 247, 1) 0%, rgba(251, 250, 247, 0.99) 48%, rgba(251, 250, 247, 0.88) 62%, rgba(251, 250, 247, 0.54) 78%, rgba(251, 250, 247, 0.1) 94%, rgba(251, 250, 247, 0) 100%) 0 0 / 100% 100% no-repeat,
            var(--storytelling-hero-image) right center / cover no-repeat,
            linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 240, 0.982)) 0 0 / 100% 100% no-repeat;
    }

    body.storytelling-homepage .storytelling-hero-copy--with-image .storytelling-hero-copy-content {
        max-inline-size: 76%;
    }

    body.public-storytelling-shell .storytelling-exhibition-carousel::after {
        background: linear-gradient(90deg, rgba(251, 250, 247, 1) 0%, rgba(251, 250, 247, 0.99) 48%, rgba(251, 250, 247, 0.88) 62%, rgba(251, 250, 247, 0.54) 78%, rgba(251, 250, 247, 0.1) 94%, rgba(251, 250, 247, 0) 100%);
    }

    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ),
    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ) > :is(.storytelling-feature-copy, .storytelling-gallery-copy, .gallery-exhibition-copy) {
        min-height: clamp(30rem, 134vw, 42rem);
    }

    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ) > :is(.storytelling-feature-copy, .storytelling-gallery-copy, .gallery-exhibition-copy) {
        width: min(72%, 36rem);
    }

    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ) > .storytelling-exhibition-carousel .storytelling-exhibition-slide img {
        width: 100%;
    }

}

body.public-storytelling-shell main :is(
    .event-card,
    .featured-story-card,
    .membership-plan-card,
    .membership-signup-card,
    .podcast-episode-card,
    .podcast-side-card,
    .community-source-card,
    .gallery-address-card,
    .contact-page-intro,
    .contact-page-form,
    .member-auth-card,
    .member-access-card,
    .member-dashboard-card,
    .member-event-card,
    .member-plan-change-card,
    .member-renewal-card,
    .member-zine-release-card,
    .ticket-card,
    .donation-amount-option
) {
    color: var(--tac-ink);
    border-color: var(--public-art-border);
    background: var(--public-art-card-surface);
    box-shadow: var(--public-art-shadow);
}

body.public-storytelling-shell :is(.form-control, .form-select, .input-group-text) {
    color: var(--tac-ink);
    border-color: rgba(24, 24, 27, 0.17);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
}

body.public-storytelling-shell :is(.form-control, .form-select):focus {
    border-color: rgba(70, 92, 170, 0.62);
    box-shadow: 0 0 0 0.2rem rgba(70, 92, 170, 0.14);
}

body.public-storytelling-shell .btn-outline-dark {
    border-color: rgba(24, 24, 27, 0.22);
    background-color: rgba(255, 255, 255, 0.72);
    background-image: linear-gradient(var(--tac-ink), var(--tac-ink));
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 0 100%;
    color: var(--tac-ink);
    transition:
        background-size 190ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 190ms ease,
        box-shadow 190ms ease,
        color 150ms ease,
        transform 190ms ease;
}

body.public-storytelling-shell .btn-outline-dark:is(:hover, :focus-visible) {
    border-color: var(--tac-ink);
    background-size: 100% 100%;
    box-shadow: 0 0.38rem 0.78rem rgba(24, 24, 27, 0.15);
    color: var(--tac-canvas);
    transform: translateY(-1px);
}

body.public-storytelling-shell .btn-outline-dark:active {
    box-shadow: none;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    body.public-storytelling-shell .btn-outline-dark {
        transition: none;
    }
}

body.public-storytelling-shell .site-footer {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 240, 232, 0.96));
    border-top-color: var(--public-art-border);
}

body.public-storytelling-shell .site-footer :is(h2, h3) {
    font-family: var(--tac-font-sans);
}

body.public-storytelling-shell .le-footer {
    background: var(--public-art-card-surface);
    color: var(--tac-ink);
    border-top: 1px solid var(--public-art-border);
    box-shadow: 0 -8px 24px rgba(24, 24, 27, 0.04);
}

body.public-storytelling-shell .le-footer > div {
    border-right-color: rgba(24, 24, 27, 0.14);
}

body.public-storytelling-shell .le-footer :is(a, strong) {
    color: var(--tac-ink);
}

body.public-storytelling-shell .le-footer a:is(:hover, :focus-visible) {
    color: #F15A3A;
}

body.public-storytelling-shell .le-footer-brand img {
    filter: none;
}

body.public-storytelling-shell .le-footer-newsletter input {
    border: 1px solid rgba(24, 24, 27, 0.17);
    background: rgba(255, 255, 255, 0.96);
    color: var(--tac-ink);
}

body.public-storytelling-shell .le-footer-newsletter button {
    border: 1px solid rgba(24, 24, 27, 0.17);
    border-left: 0;
    background: #F15A3A;
    color: var(--tac-ink);
}

body.public-storytelling-shell .le-footer-meta {
    color: rgba(24, 24, 27, 0.64);
}

body.public-storytelling-shell .podcast-adjacent-card,
body.public-storytelling-shell .podcast-adjacent-card:is(:visited, :hover, :focus, :focus-visible),
body.public-storytelling-shell .podcast-adjacent-card .podcast-adjacent-title {
    color: #18181b !important;
    -webkit-text-fill-color: #18181b !important;
}

body.public-storytelling-shell .podcast-adjacent-card .podcast-adjacent-label {
    color: #4b4b50 !important;
    -webkit-text-fill-color: #4b4b50 !important;
}

@media (prefers-contrast: more) {
    body.storytelling-homepage .storytelling-hero-copy--with-image {
        --frame-surface: var(--public-art-card-surface) !important;
    }

    body.public-storytelling-shell .storytelling-exhibition-carousel::after {
        display: none;
    }

    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ) > .storytelling-exhibition-carousel {
        display: none;
    }

    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ),
    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ) > :is(.storytelling-feature-copy, .storytelling-gallery-copy, .gallery-exhibition-copy) {
        min-height: 0;
    }

    body.public-storytelling-shell :is(
        .storytelling-feature.has-exhibition-media,
        .storytelling-gallery-story.has-media,
        .gallery-exhibition-showcase.has-media
    ) > :is(.storytelling-feature-copy, .storytelling-gallery-copy, .gallery-exhibition-copy) {
        width: 100%;
    }

    body.public-storytelling-shell :is(
        .storytelling-hero-title-word--art,
        .storytelling-hero-title-word--gather,
        .storytelling-hero-title-word--grow,
        .exhibition-title-treatment
    ),
    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) {
        color: #18181b !important;
        text-shadow: none !important;
    }

}

@media (forced-colors: active) {
    body.public-storytelling-shell .btn-outline-dark,
    body.public-storytelling-shell .btn-outline-dark:is(:hover, :focus-visible, :active) {
        background: ButtonFace;
        border-color: ButtonText;
        box-shadow: none;
        color: ButtonText;
        transform: none;
    }

    body.public-storytelling-shell :is(
        .storytelling-hero-title-word--art,
        .storytelling-hero-title-word--gather,
        .storytelling-hero-title-word--grow,
        .exhibition-title-treatment
    ),
    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) {
        color: CanvasText !important;
        text-shadow: none !important;
    }

}

@media (max-width: 767.98px) {
    body.public-storytelling-shell {
        background-image:
            url("../images/branding/storytelling-paper-grain.svg?v=2.2.65"),
            radial-gradient(ellipse 34rem 28rem at 108% -2rem, rgba(241, 90, 58, 0.12), transparent 74%),
            radial-gradient(ellipse 36rem 30rem at -9rem 78%, rgba(70, 92, 170, 0.11), transparent 76%),
            radial-gradient(ellipse 32rem 26rem at 108% 94%, rgba(224, 202, 74, 0.12), transparent 77%),
            radial-gradient(ellipse 32rem 56rem at 50% 33%, rgba(255, 255, 255, 0.3), transparent 78%);
        background-size: 560px 560px, auto, auto, auto, auto;
    }

    body.public-storytelling-shell .le-nav {
        background: rgba(251, 248, 242, 0.99);
        border-bottom-color: var(--public-art-border);
        box-shadow: 0 12px 20px rgba(24, 24, 27, 0.07);
    }

    body.public-storytelling-shell .le-footer > div {
        border-bottom-color: rgba(24, 24, 27, 0.14);
    }

    /* Narrow screens need smaller, equal steps so the hard-shadow layers do
       not compete with wrapped letterforms. */
    body.public-storytelling-shell .storytelling-hero-copy h1 {
        line-height: 1.02;
        letter-spacing: -0.045em;
    }

    body.public-storytelling-shell .exhibition-title-treatment,
    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) {
        line-height: 1.04;
    }

    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6) {
        text-shadow:
            1px 1px 0 #3454D1,
            2px 2px 0 #E0CA4A;
    }

    body.public-storytelling-shell :is(
        .storytelling-hero-title-word--art,
        .exhibition-title-treatment
    ),
    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6).storytelling-heading-treatment--vermilion {
        text-shadow:
            1px 1px 0 #3454D1,
            2px 2px 0 #E0CA4A;
    }

    body.public-storytelling-shell .storytelling-hero-title-word--gather,
    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6).storytelling-heading-treatment--yellow {
        text-shadow:
            1px 1px 0 #F15A3A,
            2px 2px 0 #3454D1;
    }

    body.public-storytelling-shell .storytelling-hero-title-word--grow,
    body.public-storytelling-shell main .section-heading :is(h1, h2, h3, h4, h5, h6).storytelling-heading-treatment--cobalt {
        text-shadow:
            1px 1px 0 #E0CA4A,
            2px 2px 0 #F15A3A;
    }

}
