:root {
    --pcs-fiolet: #8624E1;
    --pcs-granat: #3607A6;
    --pcs-akcent: #ce247a;
    --pcs-gradient: linear-gradient(135deg, #8624E1 0%, #3607A6 100%);
    --pcs-promien: 16px;
    --pcs-cien: 0 1px 2px rgba(30, 10, 70, .06), 0 8px 24px rgba(30, 10, 70, .08);
    --pcs-tekst: #1d1b2c;
    --pcs-szary: #5d5a6e;
    --pcs-linia: #ebe7f3;
}

/* Karty */
.pcs-siatka {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 28px;
    margin: 0 0 1.5em;
}
.pcs-siatka--jeden { grid-template-columns: minmax(0, 480px); }

.pcs-karta {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--pcs-promien);
    box-shadow: var(--pcs-cien);
    overflow: hidden;
    color: var(--pcs-tekst);
    transition: transform .2s ease, box-shadow .2s ease;
}
.pcs-karta:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(30, 10, 70, .06), 0 14px 34px rgba(30, 10, 70, .13); }
.pcs-karta__obraz { aspect-ratio: 16 / 9; background: var(--pcs-gradient); overflow: hidden; }
.pcs-karta__obraz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcs-karta__tresc { display: flex; flex-direction: column; gap: 12px; padding: 24px; flex: 1; }
.pcs-karta__tytul { margin: 0; padding: 0; font-size: 1.25em; line-height: 1.3; color: var(--pcs-tekst); }
.pcs-karta__opis { margin: 0; padding: 0; color: var(--pcs-szary); line-height: 1.55; font-size: .95em; }

.pcs-branza {
    align-self: flex-start;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(206, 36, 122, .1);
    color: var(--pcs-akcent);
    font-size: .78em;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.pcs-efekt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.pcs-efekt__liczba {
    font-size: 3em;
    font-weight: 800;
    line-height: 1;
    background: var(--pcs-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pcs-efekt__podpis { color: var(--pcs-szary); font-size: .92em; line-height: 1.35; max-width: 18em; }

.pcs-wskazniki {
    list-style: none !important;
    margin: 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid var(--pcs-linia);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}
.pcs-wskazniki li { margin: 0 !important; padding: 0 !important; list-style: none !important; display: flex; flex-direction: column; gap: 2px; }
.pcs-wskazniki li::before { content: none !important; }
.pcs-wskazniki strong { color: var(--pcs-fiolet); font-size: 1.2em; line-height: 1.2; }
.pcs-wskazniki span { color: var(--pcs-szary); font-size: .8em; line-height: 1.3; }

.pcs-przycisk,
.pcs-przycisk:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--pcs-gradient);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.2;
    transition: filter .2s ease, transform .2s ease;
}
.pcs-karta .pcs-przycisk { align-self: stretch; }
.pcs-przycisk:hover { filter: brightness(1.12); transform: translateY(-1px); }
.pcs-przycisk:focus-visible, .pcs-modal__zamknij:focus-visible, .pcs-modal__strona:focus-visible, .pcs-powieksz:focus-visible, .pcs-lightbox__zamknij:focus-visible {
    outline: 3px solid var(--pcs-akcent);
    outline-offset: 3px;
}
.pcs-przycisk--akcent { background: var(--pcs-akcent); }

/* Pełna treść (modal i strona) */
.pcs-naglowek { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.pcs-naglowek__tytul { margin: 0; padding: 0; line-height: 1.2; color: var(--pcs-tekst); }
h2.pcs-naglowek__tytul { font-size: 1.8em; }
.pcs-naglowek__wyniki {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px 28px;
    padding: 20px 24px;
    border-radius: var(--pcs-promien);
    background: linear-gradient(135deg, rgba(134, 36, 225, .07), rgba(54, 7, 166, .07));
}
.pcs-naglowek__wyniki .pcs-wskazniki { border-top: 0; padding-top: 0 !important; }
.pcs-naglowek__wyniki > :only-child { grid-column: 1 / -1; }

.pcs-tresc { line-height: 1.7; color: var(--pcs-tekst); }
.pcs-tresc img { max-width: 100%; height: auto; border-radius: 12px; }

/* Typografia treści — prefiks „body” przebija globalne zerowanie marginesów i list w Divi */
body .pcs-tresc p { margin: 0 0 1.1em; padding: 0; line-height: 1.7; }
body .pcs-tresc h2 { margin: 2.2em 0 .6em; padding: 0; line-height: 1.3; }
body .pcs-tresc h3 { margin: 1.6em 0 .5em; padding: 0; line-height: 1.35; }
body .pcs-tresc > :first-child { margin-top: 0; }
body .pcs-tresc ul, body .pcs-tresc ol { margin: 0 0 1.1em; padding: 0 0 0 1.4em; line-height: 1.7; }
body .pcs-tresc ul { list-style: disc outside; }
body .pcs-tresc ol { list-style: decimal outside; }
body .pcs-tresc li { margin: 0 0 .4em; padding: 0; list-style: inherit; }
body .pcs-tresc li::marker { color: var(--pcs-fiolet); }
body .pcs-tresc figure { margin: 1.8em 0; padding: 0; }
body .pcs-tresc figure img { display: block; max-width: 100%; height: auto; }
body .pcs-tresc figcaption { margin-top: .6em; font-size: 14px; line-height: 1.5; color: var(--pcs-szary); }
body .pcs-tresc .pcs-lead { margin: 0 0 1.6em; padding: 18px 22px; background: #f6f2fd; border-radius: 12px; }
body .pcs-tresc .pcs-note { margin-top: 2em; font-size: 14px; line-height: 1.5; color: var(--pcs-szary); }
.pcs-tresc table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95em; }
.pcs-tresc th, .pcs-tresc td { padding: 10px 12px; border: 1px solid var(--pcs-linia); text-align: left; }
.pcs-tresc th { background: #f7f4fc; }
.pcs-powieksz { cursor: zoom-in; }

.pcs-opinia { margin: 32px 0 0; padding: 24px 28px; border-radius: var(--pcs-promien); background: #fff; box-shadow: var(--pcs-cien); border-left: 4px solid var(--pcs-akcent); }
.pcs-opinia__ocena { color: #f5b301; font-size: 1.2em; letter-spacing: 2px; margin-bottom: 8px; }
.pcs-opinia__pusta { color: #ddd8e6; }
.pcs-opinia blockquote { margin: 0; padding: 0; border: 0; font-style: italic; font-size: 1.05em; line-height: 1.6; color: var(--pcs-tekst); }
.pcs-opinia blockquote p:last-child { margin-bottom: 0; padding-bottom: 0; }
.pcs-opinia figcaption { margin-top: 12px; color: var(--pcs-szary); font-size: .9em; }
.pcs-opinia figcaption a { color: var(--pcs-fiolet); }

.pcs-cta {
    margin-top: 36px;
    padding: 32px 28px;
    border-radius: var(--pcs-promien);
    background: var(--pcs-gradient);
    color: #fff;
    text-align: center;
}
.pcs-cta__naglowek { margin: 0 0 16px; padding: 0; font-size: 1.35em; font-weight: 700; color: #fff; }

/* Modal */
html.pcs-zablokowane { overflow: hidden; }
html.pcs-zablokowane body { padding-right: var(--pcs-pasek, 0); }

.pcs-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.pcs-modal[hidden] { display: none; }
.pcs-modal__tlo { position: absolute; inset: 0; background: rgba(20, 8, 50, .62); opacity: 0; transition: opacity .2s ease; }
.pcs-modal__okno {
    position: relative;
    width: 100%;
    max-width: 860px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--pcs-promien);
    box-shadow: 0 24px 64px rgba(20, 8, 50, .35);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: opacity .2s ease, transform .2s ease;
    outline: none;
}
.pcs-modal--widoczny .pcs-modal__tlo { opacity: 1; }
.pcs-modal--widoczny .pcs-modal__okno { opacity: 1; transform: none; }
.pcs-modal__pasek {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 24px;
    background: var(--pcs-gradient);
    color: #fff;
    flex: none;
}
.pcs-modal__strona, .pcs-modal__strona:visited { color: #fff !important; font-size: .9em; text-decoration: underline; text-underline-offset: 3px; }
.pcs-modal__zamknij {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.pcs-modal__zamknij:hover { background: rgba(255, 255, 255, .3); }
.pcs-modal__przewijanie { overflow-y: auto; overscroll-behavior: contain; padding: 32px 40px 40px; -webkit-overflow-scrolling: touch; }

/* Lightbox */
.pcs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 4, 28, .9);
    cursor: zoom-out;
}
.pcs-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; cursor: default; box-shadow: 0 16px 48px rgba(0, 0, 0, .5); }
.pcs-lightbox__zamknij {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

/* Strona pojedyncza */
.pcs-strona { max-width: 860px; margin: 0 auto; padding-bottom: 72px; }
.pcs-strona h1.pcs-naglowek__tytul { font-size: 2.4em; }

@media (max-width: 600px) {
    .pcs-modal { padding: 0; }
    .pcs-modal__okno { max-height: 100vh; max-height: 100dvh; height: 100%; border-radius: 0; }
    .pcs-modal__przewijanie { padding: 24px 20px 32px; }
    .pcs-naglowek__wyniki { grid-template-columns: 1fr; padding: 18px; }
    .pcs-efekt__liczba { font-size: 2.6em; }
    .pcs-strona { padding-bottom: 48px; }
    .pcs-tresc table { display: block; overflow-x: auto; }
    .pcs-strona h1.pcs-naglowek__tytul { font-size: 1.8em; }
}

@media (prefers-reduced-motion: reduce) {
    .pcs-karta, .pcs-przycisk, .pcs-modal__tlo, .pcs-modal__okno { transition: none; }
}
