/* Keep the overview close to the page heading, before the longer descriptions. */
.features-catalog-hero .features-catalog-hero__inner {
    padding-block: 36px 32px;
}

.features-catalog-hero .features-catalog-hero__inner h1 {
    font-size: clamp(32px, 3.8vw, 48px);
    line-height: 1.25;
}

.features-catalog-hero .features-catalog-hero__label {
    margin-bottom: 10px;
}

.features-catalog-hero .features-catalog-hero__inner > p:not(.features-catalog-hero__label) {
    margin-top: 12px;
}

.features-catalog-hero .features-catalog-hero__facts {
    display: flex;
    width: fit-content;
    margin-top: 18px;
}

.features-catalog-hero .features-catalog-hero__facts div {
    grid-template-columns: auto auto;
    gap: 8px;
    padding: 9px 14px;
}

.page-shell.features-catalog-page {
    padding-top: 28px;
}

.features-catalog-page .features-catalog-search {
    padding: 18px;
}

.features-overview {
    margin-bottom: 64px;
}

.features-overview__header {
    margin-bottom: 28px;
}

.features-overview__header h2,
.features-catalog-detail-title {
    margin: 0 0 10px;
    color: var(--brand-ink);
    font-size: clamp(24px, 2.5vw, 30px);
    line-height: 1.4;
}

.features-overview__header p {
    margin: 0;
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.7;
}

.features-overview__section + .features-overview__section {
    margin-top: 28px;
}

.features-overview__section h3 {
    margin: 0 0 8px;
    color: var(--brand-ink);
    font-size: 17px;
    line-height: 1.5;
}

.features-overview__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.features-overview__list li {
    min-width: 0;
    border-bottom: 1px solid var(--brand-border);
}

.features-overview__list a {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 12px;
    min-height: 56px;
    padding: 10px 6px;
    color: var(--brand-ink);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.features-overview__name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
}

.features-overview__summary {
    color: var(--brand-muted);
    font-size: 13px;
    line-height: 1.7;
}

.features-overview__list a:hover {
    background: var(--brand-surface);
}

.features-overview__list a:hover .features-overview__name {
    color: var(--brand-red-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.features-overview__list a:focus-visible {
    outline: 2px solid var(--brand-red-strong);
    outline-offset: 2px;
}

.features-catalog-detail-title,
.features-overview__section h3 {
    scroll-margin-top: 100px;
}

[data-feature-overview][hidden],
[data-feature-overview-section][hidden],
[data-feature-overview-id][hidden],
[data-feature-details][hidden] {
    display: none;
}

@media (max-width: 900px) {
    .features-overview__list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Feature images retain their measured intrinsic proportions in both languages. */
.features-catalog-page .features-catalog-item {
    gap: 16px 30px;
    padding-block: 25px;
}

.features-catalog-page .features-catalog-item dt {
    font-size: 18px;
}

.features-catalog-page .features-catalog-item dd {
    font-size: 17px;
    line-height: 1.9;
}

.features-catalog-page .features-catalog-item .features-catalog-media {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.features-catalog-page .features-catalog-item .features-catalog-guide {
    grid-column: 2;
}

.features-catalog-page .features-catalog-screenshot a {
    /* Reserve the measured width so lazy image loads do not move detail links. */
    width: min(100%, var(--feature-image-width));
    padding: 0;
    border: 1px solid var(--brand-border);
    background: transparent;
    box-shadow: 0 4px 18px rgba(22, 35, 58, 0.08);
}

.features-catalog-page .features-catalog-screenshot img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
    border-radius: 0;
}

.features-catalog-page .features-catalog-screenshot figcaption {
    padding-left: 0;
    font-size: 15px;
    line-height: 1.8;
}

.features-catalog-page .features-catalog-screenshot figcaption::before {
    content: none;
}

@media (max-width: 680px) {
    .features-overview__list a {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .features-catalog-page .features-catalog-item .features-catalog-guide {
        grid-column: 1;
    }

    .features-catalog-page .features-catalog-item {
        gap: 10px;
        padding-inline: 0;
    }

    .features-catalog-page .features-catalog-item dt {
        font-size: 18px;
    }
}
