.page-baza-wiedzy {
    --baza-ink: var(--palette-ink, #0a0a0a);
    --baza-ink-soft: rgb(10 10 10 / 0.52);
    background-color: var(--palette-paper, #fff);
    color: var(--baza-ink);
}

.page-baza-wiedzy #baza-archive-heading {
    scroll-margin-top: var(--navbar-offset);
}

.page-baza-wiedzy .baza-page {
    padding-top: var(--navbar-offset);
    padding-bottom: var(--section-y, clamp(2.5rem, 6vw, 4rem));
}

.page-baza-wiedzy .posts-rail.posts-rail--archive {
    background: transparent;
    padding: 0;
}

.page-baza-wiedzy .posts-rail.posts-rail--archive .posts-rail__head--archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.baza-hero {
    width: 100%;
    max-width: 42rem;
    margin-inline: auto;
    text-align: center;
}

.page-baza-wiedzy main .posts-rail--archive h1.posts-rail__title.baza-hero__title {
    margin: 0 0 clamp(0.65rem, 1.8vw, 0.95rem);
    padding-left: 0;
    border-left: none;
    font-weight: 600;
    font-size: clamp(1.85rem, 4.5vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.042em;
}

.baza-hero__lead {
    margin: 0 auto;
    max-width: 36rem;
    font-size: clamp(0.9375rem, 1.65vw, 1.0625rem);
    line-height: 1.55;
    color: var(--baza-ink-soft);
}

.baza-hero__prefix {
    margin: clamp(0.55rem, 1.4vw, 0.75rem) auto 0;
    max-width: 36rem;
    font-size: clamp(0.6875rem, 1.1vw, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--primary, #39732d);
}

/* Ten sam styl paska filtrów co w pozostałych archiwach */
.aktualnosci-filter-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
    width: 100%;
}

.aktualnosci-filter-bar {
    width: 100%;
    max-width: min(52rem, 100%);
    display: flex;
    justify-content: center;
}

.aktualnosci-filter-bar__track {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(0.35rem, 1.2vw, 0.55rem);
    padding: clamp(0.35rem, 1vw, 0.5rem) clamp(0.25rem, 1vw, 0.5rem);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
}

.aktualnosci-filter-bar__pill {
    appearance: none;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(0.65rem, 1.35vw, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.25;
    color: rgb(10 10 10 / 0.5);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-inner, 8px);
    padding: clamp(0.5rem, 1.3vw, 0.62rem) clamp(0.8rem, 2.1vw, 1.15rem);
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.aktualnosci-filter-bar__pill:hover:not(.is-active) {
    color: var(--text-dark);
    background: var(--palette-brand-alpha-6, rgb(57 115 45 / 0.06));
}

.aktualnosci-filter-bar__pill:focus-visible:not(.is-active) {
    outline: none;
    color: var(--primary);
    background: var(--primary-soft);
}

.aktualnosci-filter-bar__pill.is-active:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.aktualnosci-filter-bar__pill.is-active {
    color: var(--primary);
    font-weight: 700;
    background: var(--primary-soft);
    border-color: transparent;
}

.aktualnosci-filter-bar__pill.is-active:hover {
    color: var(--primary-hover);
    background: var(--palette-brand-alpha-10, rgb(57 115 45 / 0.1));
}

.page-baza-wiedzy .posts-rail--archive .posts-rail__track {
    grid-template-columns: 1fr;
}

@media (min-width: 680px) {
    .page-baza-wiedzy .posts-rail--archive .posts-rail__track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .aktualnosci-filter-bar {
        justify-content: center;
    }

    .aktualnosci-filter-bar__track {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        align-content: center;
        gap: clamp(0.4rem, 2vw, 0.55rem);
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: clamp(0.25rem, 1vw, 0.4rem) clamp(0.5rem, 3vw, 1rem);
        overflow: visible;
    }

    .aktualnosci-filter-bar__pill {
        flex: 0 1 30%;
        min-width: 4.65rem;
        max-width: 10.5rem;
        justify-content: center;
        text-align: center;
        padding-inline: clamp(0.4rem, 2.2vw, 0.65rem);
        font-size: clamp(0.58rem, 2.8vw, 0.7rem);
        box-sizing: border-box;
    }
    .border-clip {
        width: clamp(0.25rem, 1vw, 0.5rem);
        height: clamp(0.25rem, 1vw, 0.5rem);
        background: var(--palette-brand-alpha-6, rgb(57 115 45 / 0.06));
        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}
