/* Stories archive (Figma 19-7574). A template, not a page of blocks: the distances around the title, filter
   and load more are its own (SPEC wp-030, open question 2), measured on 1057px. The grid is the block's. */

/* Figma 19-7738: two centred lines, "What's new?" in the accent, then the sans line. */
.stories-archive__title {
    margin-top: 5.5625rem;
    font-family: var(--font-primary);
    font-size: 2.625rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.stories-archive__title .accent {
    display: block;
}

/* Without a title the page keeps its name for screen readers only. */
.stories-archive__title--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.stories-archive .archive-filter {
    margin-top: 3.25rem;
}

/* With a hidden title the filter is the first thing on the page. */
.stories-archive__title--hidden + .archive-filter {
    margin-top: 5.5625rem;
}

.stories-archive .block--stories-overview__grid {
    margin-top: 3.9375rem;
}

/* With a hidden title and no filter (no themes) the grid is the first thing on the page. */
.stories-archive__title--hidden + .block--stories-overview__grid {
    margin-top: 5.5625rem;
}

.stories-archive .archive-filter__more {
    margin-top: 3.75rem;
}

/* Figma 19-7940, 19-7942: every pill off-white, no line, no orange. The custom label keeps its orange. */
.story-teaser--archive .story-teaser__pill,
.story-teaser--archive .story-teaser__pill--service {
    background-color: var(--color-off-white);
    box-shadow: none;
}

/* The theme pill opens the theme, above the link that covers the card. */
.story-teaser--archive a.story-teaser__pill {
    position: relative;
    z-index: 1;
    min-width: 2.75rem;
    text-align: center;
}

.story-teaser--archive a.story-teaser__pill:hover {
    background-color: color-mix(in srgb, var(--color-off-white), var(--color-dark) 10%);
}

/* A 44px tall hit area, only vertical: sideways it stays inside the pill, so the 6px gap is free. */
.story-teaser--archive a.story-teaser__pill::after {
    content: '';
    position: absolute;
    top: calc(50% - 1.375rem);
    right: 0;
    bottom: calc(50% - 1.375rem);
    left: 0;
}

/* On touch two rows of pills stay apart: a 31px pill plus 14px is at least 44px. */
@media (pointer: coarse) {
    .story-teaser--archive .story-teaser__pills {
        row-gap: 0.875rem;
    }
}
