/* Share Home's lead spacing and text-only Latest Headlines card across reader templates. */
@layer tsp-public-story-layout {
    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) {
        --tsp-headline-list-ink: #172027;
        --tsp-headline-list-rule: #e0e4e7;
        box-sizing: border-box;
        min-width: 0;
        padding: 13px 15px 5px !important;
        color: var(--tsp-headline-list-ink) !important;
        background: #fff !important;
        border: 1px solid var(--tsp-headline-list-rule) !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 2px #17202709 !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest)
        > :is(header, .tsp-section-heading, .tsp-th-section-heading) {
        margin: 0 !important;
        padding: 0 0 9px !important;
        background: transparent !important;
        border: 0 !important;
        border-bottom: 1px solid var(--tsp-headline-list-rule) !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest)
        > :is(header, .tsp-section-heading, .tsp-th-section-heading)::before,
    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest)
        > :is(header, .tsp-section-heading, .tsp-th-section-heading) :is(.ed-live-dot, .tsp-section-line) {
        display: none !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest)
        > :is(h2, header h2, .tsp-section-heading h2, .tsp-th-section-heading h2) {
        margin: 0 !important;
        color: inherit !important;
    }

    /* Transparent outside markers keep Safari's native list semantics. */
    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        list-style: disc outside !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li {
        display: list-item !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li::marker {
        color: transparent !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li:not(:last-child) {
        border-bottom: 1px solid var(--tsp-headline-list-rule) !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li > a {
        box-sizing: border-box;
        display: flex !important;
        align-items: center;
        min-height: 44px;
        padding: 6px 0 !important;
        color: inherit !important;
        overflow-wrap: anywhere;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li > a h3 {
        margin: 0 !important;
        color: inherit !important;
    }

    :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li > a:focus-visible {
        outline: 2px solid #246b93;
        outline-offset: -2px;
    }

    @media (hover: hover) {
        :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) > ul > li > a:hover {
            background-color: #edf2f6 !important;
            box-shadow: none !important;
        }
    }

    #tsp-stories .preview-espn-opening .v3-story-primary > .v3-lead-copy {
        min-height: 0 !important;
        padding: 15px 19px 18px !important;
        border-top: 0 !important;
    }

    #tsp-stories .preview-espn-opening .v3-story-primary > .v3-lead-copy > h1 {
        margin: 0 !important;
    }

    #tsp-stories .preview-espn-opening .v3-story-primary > .v3-lead-copy > p {
        margin: 8px 0 0 !important;
    }

    @media (max-width: 490px) {
        :is(#latest-headlines:not(.bos-latest), #tf-latest, #fb-latest, .tsp-business-latest) {
            padding-inline: 12px !important;
        }

        #tsp-stories .preview-espn-opening .v3-story-primary > .v3-lead-copy {
            padding: 12px 13px 14px !important;
        }
    }
}
