/* Publiczny profil eksperta: szablony views/templates/users/default.twig (xp--default) i editorial.twig (xp--editorial). */
.xp {
    --xp-ink: #111114;
    --xp-body: #43433E;
    --xp-muted: #70736D;
    --xp-soft: #F1F0EA;
    --xp-line: #E6E5E0;
    --xp-lime: linear-gradient(160deg, #F6F8C2 0%, #D6ECB2 100%);
    max-width: 1920px;
    margin: 0 auto;
    background: #fff;
    border-radius: clamp(18px, 2.4vw, 30px);
    overflow: hidden;
    color: var(--xp-ink);
    letter-spacing: -.006em;
    -webkit-font-smoothing: antialiased;
}
.xp *, .xp *::before, .xp *::after { box-sizing: border-box; }
.xp img { display: block; max-width: 100%; }
html, body { background: #E7E5DF !important; overflow-x: hidden !important; }
#app-page-frame { background: #E7E5DF !important; padding: clamp(8px, 1.4vw, 16px) !important; }

.xp-container { width: 100%; max-width: 1600px; margin: 0 auto; padding: clamp(24px, 3vw, 44px) clamp(20px, 4vw, 40px) clamp(64px, 8vw, 120px); }
.xp-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 clamp(24px, 3vw, 36px); font-size: 13px; color: var(--xp-muted); }
.xp-crumbs a { color: var(--xp-ink); text-decoration: none; }
.xp-crumbs a:hover, .xp-crumbs a:focus-visible { text-decoration: underline !important; }
.xp-eyebrow { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--xp-muted); }
.xp-h2 { margin: 0; font-size: clamp(26px, 2.8vw, 40px); font-weight: 400; line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
.xp-name { margin: 0; font-size: clamp(34px, 4.6vw, 64px); font-weight: 400; line-height: 1; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; }
.xp-headline { max-width: 46ch; margin: 18px 0 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.45; color: var(--xp-body); overflow-wrap: anywhere; }

.xp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.xp-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 12px; border-radius: 999px; background: var(--xp-soft); color: var(--xp-ink); font-size: 10px; font-weight: 800; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; }
/* Specjalizacje: jednolite pigulki z cienkim obrysem i zwyklymi literami, glowna wypelniona na czarno. */
.xp-tags .xp-tag { min-height: 30px; padding: 5px 13px; border: 1px solid #E2E1DB; background: #fff; color: var(--xp-ink); font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.xp-tags .xp-tag.is-main { border-color: var(--xp-ink); background: var(--xp-ink); color: #fff; }
.xp-tags.is-top { margin: 0 0 20px; }
.xp-tags.is-top .xp-tags-more { font-size: 12.5px; }
.xp-actions { align-items: center; }
.xp-social-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--xp-soft); color: var(--xp-ink); text-decoration: none !important; transition: background .18s ease, color .18s ease; }
.xp-social-ico:hover, .xp-social-ico:focus-visible { background: var(--xp-ink); color: #fff; }
.xp-social-ico b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.xp-social-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.xp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.xp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--xp-soft); color: var(--xp-ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background .18s ease, color .18s ease; }
.xp-btn.is-primary { background: var(--xp-lime); }
.xp-btn.is-dark { background: var(--xp-ink); color: #fff; }
.xp-btn:hover, .xp-btn:focus-visible { background: var(--xp-ink); color: #fff; text-decoration: none; }
.xp-btn.is-dark:hover, .xp-btn.is-dark:focus-visible { background: #fff; color: var(--xp-ink); }
.xp-btn:focus-visible { outline: 2px solid var(--xp-ink); outline-offset: 3px; }

.xp-socials { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; }
.xp-socials a { color: var(--xp-ink); font-weight: 500; text-decoration: none; }
.xp-socials a:hover, .xp-socials a:focus-visible { text-decoration: underline !important; text-underline-offset: 3px; }

.xp-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--xp-muted); }
.xp-facts b { margin-right: 4px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; color: var(--xp-ink); }

.xp-photo { position: relative; overflow: hidden; border-radius: 24px; background: var(--xp-soft); }
.xp-photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.xp-photo.is-cutout img { object-fit: contain; object-position: center bottom; }
.xp-initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: clamp(64px, 9vw, 140px); font-weight: 500; letter-spacing: -.06em; color: var(--xp-ink); }

.xp-section { padding-top: clamp(56px, 7vw, 104px); }
.xp-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.xp-link { color: var(--xp-ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.xp-link:hover, .xp-link:focus-visible { text-decoration: underline !important; text-underline-offset: 3px; }

.xp-bio { max-width: 70ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.7; color: var(--xp-body); overflow-wrap: anywhere; }
.xp-sub { margin: clamp(32px, 4vw, 48px) 0 0; font-size: clamp(18px, 1.5vw, 22px); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; color: var(--xp-ink); }
.xp-sub + .xp-highlights { margin-top: 28px; }
.xp-highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px 24px; margin: clamp(24px, 3vw, 36px) 0 0; padding: 0; list-style: none; }
.xp-highlights li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.5; color: var(--xp-ink); overflow-wrap: anywhere; }
.xp-highlights li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: #111114 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D6ECB2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }

.xp-exp { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--xp-line); }
.xp-exp li { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 8px 32px; padding: clamp(18px, 2vw, 26px) 0; border-bottom: 1px solid var(--xp-line); }
.xp-exp-when { font-size: 14px; font-weight: 500; color: var(--xp-muted); }
.xp-exp h3 { margin: 0; font-size: clamp(17px, 1.4vw, 20px); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: anywhere; }
.xp-exp-company { margin: 4px 0 0; font-size: 14px; color: var(--xp-body); }
.xp-exp li.is-undated { grid-template-columns: minmax(0, 1fr); }
.xp-exp-names { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.xp-exp-names span { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px; border: 1px solid #E2E1DB; border-radius: 999px; background: #fff; color: var(--xp-ink); font-size: 13.5px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.xp-exp-desc { max-width: 64ch; margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--xp-body); overflow-wrap: anywhere; }

.xp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.xp-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 20px; overflow: hidden; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 10px 30px -18px rgba(17,17,20,.22); transition: transform .2s ease, box-shadow .2s ease; }
.xp-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(17,17,20,.3); color: inherit; text-decoration: none; }
.xp-card:focus-visible { outline: 2px solid var(--xp-ink); outline-offset: 3px; }
.xp-card-cover { aspect-ratio: 16 / 10; overflow: hidden; background: #1d1d1d; }
.xp-card-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; transition: transform .35s ease; }
.xp-card:hover .xp-card-cover img { transform: scale(1.035); }
.xp-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 22px 20px; }
.xp-card-title { margin: 0; font-size: clamp(16px, 1.2vw, 19px); font-weight: 700; line-height: 1.22; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.xp-card-meta { margin: 0; font-size: 13px; color: var(--xp-muted); }
.xp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--xp-line); font-size: 14px; font-weight: 600; }
.xp-card-foot span:last-child { transition: transform .2s ease; }
.xp-card:hover .xp-card-foot span:last-child { transform: translateX(3px); }
.xp-card.is-lime { background: var(--xp-lime); box-shadow: none; }
.xp-card.is-lime .xp-card-foot { border-top-color: rgba(17,17,20,.14); }
.xp-status { align-self: flex-start; display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; background: var(--xp-soft); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.xp-status.is-upcoming { background: var(--xp-lime); }

.xp-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.xp-gallery div { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 16px; background: var(--xp-soft); }
.xp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.xp-gallery div:hover img { transform: scale(1.04); }

.xp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px clamp(24px, 5vw, 80px); margin-top: clamp(56px, 7vw, 104px); padding: clamp(28px, 4.5vw, 56px); border-radius: clamp(20px, 2.4vw, 32px); background: var(--xp-soft); }
.xp-cta > div { flex: 1 1 420px; min-width: 0; }
.xp-cta .xp-h2 { max-width: 28ch; }
.xp-cta p { max-width: 56ch; margin: 14px 0 0; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.55; color: var(--xp-body); }
.xp-cta .xp-btn { flex: 0 0 auto; }

/* Domyslny: tekst po lewej, duze zdjecie po prawej, sekcje "O mnie" w dwoch kolumnach */
.xp--default .xp-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.xp--default .xp-hero .xp-photo { aspect-ratio: 4 / 5; max-height: 680px; }
.xp--default .xp-split { display: grid; grid-template-columns: minmax(200px, .6fr) minmax(0, 1.4fr); gap: clamp(24px, 6vw, 96px); align-items: start; }

/* Edytorialski: limonkowa okladka strony, pod nia przyklejona kolumna "W skrocie" i tresc jak w artykule */
.xp--editorial .xp-name { font-size: clamp(40px, 6vw, 84px); line-height: .95; }
.xp--editorial .xp-ed-body { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; padding-top: clamp(40px, 5vw, 72px); }
.xp--editorial .xp-ed-aside { position: sticky; top: 24px; display: grid; gap: 22px; padding-top: 8px; }
.xp--editorial .xp-ed-aside h2 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--xp-muted); }
.xp--editorial .xp-ed-aside .xp-tags, .xp--editorial .xp-ed-aside .xp-socials { margin-top: 0; }
.xp--editorial .xp-ed-aside .xp-socials { flex-direction: column; gap: 8px; }
.xp--editorial .xp-ed-main { min-width: 0; }
.xp--editorial .xp-ed-main .xp-section:first-child { padding-top: 0; }
.xp--editorial .xp-lede { max-width: 30ch; margin: 0 0 24px; font-size: clamp(22px, 2.2vw, 32px); font-weight: 400; line-height: 1.3; letter-spacing: -.02em; color: var(--xp-ink); text-wrap: pretty; }
.xp--editorial .xp-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--xp-line); }
.xp--editorial .xp-rows a { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--xp-line); color: inherit; text-decoration: none; }
.xp--editorial .xp-rows a:hover .xp-card-title { text-decoration: underline; text-underline-offset: 3px; }
.xp--editorial .xp-rows .xp-card-meta { grid-column: 1; }
.xp--editorial .xp-rows .xp-row-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 18px; transition: transform .2s ease; }
.xp--editorial .xp-rows a:hover .xp-row-arrow { transform: translateX(4px); }
.xp--editorial .xp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xp--editorial .xp-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xp--editorial .xp-gallery div:first-child { grid-column: span 2; grid-row: span 2; }

@media (max-width: 1199px) {
    .xp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
    .xp--default .xp-hero, .xp--default .xp-split, .xp-cta { grid-template-columns: minmax(0, 1fr); }
    .xp--default .xp-hero .xp-photo { max-width: 480px; }
    .xp--editorial .xp-ed-hero, .xp--editorial .xp-ed-body { grid-template-columns: minmax(0, 1fr); }
    .xp--editorial .xp-ed-aside { position: static; }
    .xp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .xp-cta .xp-btn { flex: 1 1 100%; }
    .xp-cards, .xp--editorial .xp-cards { grid-template-columns: minmax(0, 1fr); }
    .xp-exp li { grid-template-columns: minmax(0, 1fr); }
    .xp-actions .xp-btn { flex: 1 1 100%; }
    .xp--editorial .xp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xp--editorial .xp-gallery div:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 767px) {
    .xp { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .xp *, .xp *::before { transition: none !important; }
}

/* Kafelki szkolen i e-bookow jak w /events i /library */
.xp-tile { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px -18px rgba(17,17,20,.22); transition: transform .2s ease, box-shadow .2s ease; }
.xp-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(17,17,20,.3); }
.xp-tile-link { display: flex; flex: 1; flex-direction: column; color: inherit; text-decoration: none; }
.xp-tile-link:hover, .xp-tile-link:focus-visible { color: inherit; text-decoration: none; }
.xp-tile-link:focus-visible, .xp-tile:has(.xp-tile-stretch:focus-visible) { outline: 2px solid var(--xp-ink); outline-offset: 3px; }
.xp-tile-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #1d1d1d; }
.xp-tile-cover.is-contain { background: #EEEEEA; transition: background .22s ease; }
.xp-tile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; transition: transform .35s ease; }
.xp-tile-cover.is-contain img { object-fit: contain; object-position: center; }
.xp-tile:hover .xp-tile-cover img { transform: scale(1.035); }
.xp-tile:hover .xp-tile-cover.is-contain { background: var(--xp-lime); }
.xp-tile-badge { position: absolute; left: 0; display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.xp-tile-badge.is-dark { top: 12px; background: var(--xp-ink); color: #fff; }
.xp-tile-badge.is-bottom { bottom: 12px; background: var(--xp-lime); color: #4B2095; letter-spacing: .11em; }
.xp-tile-pills { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 1; display: flex; gap: 6px; }
.xp-tile-pills span { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--xp-ink); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.xp-tile-pills .is-free { margin-left: auto; background: linear-gradient(160deg, #F6F8C2 0%, #D6ECB2 100%); }
.xp-tile-body { display: flex; flex: 1; flex-direction: column; padding: clamp(20px, 2vw, 26px); }
.xp-tile-tag { align-self: flex-start; display: inline-flex; align-items: center; min-height: 26px; margin-bottom: clamp(14px, 1.4vw, 18px); padding: 4px 8px; background: var(--xp-soft); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.xp-tile-tag.is-lime { background: var(--xp-lime); }
.xp-tile-title { margin: 0; color: var(--xp-ink); font-size: clamp(16px, 1.15vw, 20px); font-weight: 700; line-height: 1.22; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.xp-tile-stretch { color: inherit; text-decoration: none; }
.xp-tile-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.xp-tile-stretch:hover, .xp-tile-stretch:focus-visible { color: inherit; text-decoration: none !important; outline: 0; }
.xp-tile-meta { display: block; margin-top: 8px; font-size: 13px; color: var(--xp-muted); }
.xp-tile-person { display: block; margin-top: 16px; font-size: 14px; line-height: 1.35; color: #5E625C; overflow-wrap: anywhere; }
.xp-tile-person strong { color: var(--xp-ink); font-weight: 700; }
.xp-tile-text { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--xp-body); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xp-tile-authors { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--xp-muted); min-width: 0; }
.xp-tile-faces { display: inline-flex; flex: 0 0 auto; }
.xp-tile-faces img, .xp-tile-faces span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(17,17,20,.22); object-fit: cover; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: var(--xp-ink); }
.xp-tile-faces > * + * { margin-left: -7px; }
.xp-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.xp-tile-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.xp-tile-price small { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--xp-muted); }
.xp-tile-btn { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 10px 16px; border-radius: 999px; background: var(--xp-soft); color: var(--xp-ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.xp-tile-btn.is-primary { background: var(--xp-lime); }
.xp-tile-btn:hover, .xp-tile-btn:focus-visible { background: var(--xp-ink); color: #fff; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .xp-tile, .xp-tile-cover img { transition: none; } }

/* Edytorialski: naglowek jak wersja 01, na bialym tle; wyciete zdjecie stoi na linii pod naglowkiem */
.xp--editorial .xp-ed-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px clamp(24px, 4vw, 56px); align-items: end; border-bottom: 1px solid var(--xp-line); }
.xp--editorial .xp-ed-hero-text { min-width: 0; padding-bottom: clamp(32px, 5vw, 72px); }
.xp--editorial .xp-ed-hero-photo { display: flex; justify-content: center; min-width: 0; }
.xp--editorial .xp-ed-hero-photo img { display: block; width: auto; max-width: 100%; max-height: 560px; object-fit: contain; object-position: center bottom; }
.xp--editorial .xp-ed-hero-photo .xp-initial { aspect-ratio: 1 / 1; max-width: 360px; border-radius: 50%; background: var(--xp-soft); }
.xp-tags-more { display: inline-flex; align-items: center; min-height: 26px; padding: 0 4px; color: var(--xp-muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.xp-tags-more:hover, .xp-tags-more:focus-visible { color: var(--xp-ink); text-decoration: underline !important; }
@media (max-width: 899px) {
    .xp--editorial .xp-ed-hero { grid-template-columns: minmax(0, 1fr); }
    .xp--editorial .xp-ed-hero-text { padding-bottom: 0; }
    .xp--editorial .xp-ed-hero-photo img { max-height: 420px; }
}
.xp-highlights { padding-bottom: clamp(24px, 3vw, 40px); }

/* Sekcja wspolpracy w stylu "Masz wiedze, ktora powinna trafic dalej?" z listy ekspertow */
.xp-cta { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: end; gap: clamp(32px, 6vw, 96px); padding: clamp(34px, 5vw, 72px); border-radius: clamp(18px, 2.4vw, 30px); background: var(--xp-ink); color: #fff; }
.xp-cta > div { flex: none; }
.xp-cta .xp-eyebrow { margin-bottom: 14px; color: #E6F2BA; font-weight: 700; }
.xp-cta .xp-h2 { max-width: 14ch; font-size: clamp(30px, 4vw, 56px); line-height: 1.02; letter-spacing: -.04em; color: #fff; }
.xp-cta p { max-width: 48ch; margin: 0 0 26px; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; color: rgba(255,255,255,.72); }
.xp-cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 12px 24px; border: 1px solid #E6F2BA; border-radius: 999px; background: var(--xp-lime); color: var(--xp-ink); font-size: 13px; font-weight: 700; line-height: 1.2; text-decoration: none; touch-action: manipulation; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.xp-cta-button span { transition: transform .18s ease; }
.xp-cta-button:hover, .xp-cta-button:focus-visible { border-color: #fff; background: #fff; color: var(--xp-ink); text-decoration: none; }
.xp-cta-button:hover span { transform: translateX(3px); }
.xp-cta-button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 899px) { .xp-cta { grid-template-columns: minmax(0, 1fr); align-items: start; } }
@media (max-width: 599px) { .xp-cta-button { width: 100%; } }
@media (max-width: 899px) { .xp--editorial .xp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .xp--editorial .xp-cards { grid-template-columns: minmax(0, 1fr); } }
/* Oba szablony: 4 kafelki w rzedzie na szerokim ekranie */
.xp--default .xp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 899px) { .xp--default .xp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .xp--default .xp-cards { grid-template-columns: minmax(0, 1fr); } }
/* Kafelki e-bookow jak na liscie e-bookow: "Bezplatny" po prawej na zielono. */
.xp-cards.library-items.is-grid .library-item-pills .is-free { margin-left: auto; background: linear-gradient(160deg, #F6F8C2 0%, #D6ECB2 100%); }

/* Portfolio eksperta: siatka prac z opisami i podglad na caly ekran */
.xp-portfolio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .xp-portfolio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .xp-portfolio { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.xp-pf-item { min-width: 0; margin: 0; }
.xp-pf-item[hidden] { display: none; }
.xp-pf-open { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--xp-soft); cursor: zoom-in; aspect-ratio: 4 / 5; }
.xp-pf-open img, .xp-pf-blank { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.xp-pf-open:hover img, .xp-pf-open:focus-visible img { transform: scale(1.03); }
.xp-pf-open:focus-visible { outline: 2px solid var(--xp-ink); outline-offset: 3px; }
.xp-pf-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(17, 17, 20, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xp-pf-play svg { width: 22px; height: 22px; margin-left: 3px; fill: #fff; }
.xp-pf-caption { margin: 10px 2px 0; font-size: 14px; line-height: 1.45; color: var(--xp-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.xp-pf-more { margin-top: clamp(18px, 2vw, 26px); }
.xp-pf-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 56px 16px 20px; border: 0; background: rgba(12, 12, 14, .96); color: #fff; box-sizing: border-box; }
.xp-pf-viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.xp-pf-viewer::backdrop { background: rgba(12, 12, 14, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xp-pf-stage { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; flex: 1; }
.xp-pf-stage img, .xp-pf-stage video { display: block; max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.xp-pf-stage iframe { width: min(100%, 1100px); aspect-ratio: 16 / 9; height: auto; max-height: 100%; border: 0; border-radius: 12px; }
.xp-pf-viewer-caption { max-width: 70ch; margin: 0; font-size: 15px; line-height: 1.5; text-align: center; color: #e7e6e1; overflow-wrap: anywhere; }
.xp-pf-count { position: absolute; top: 18px; left: 20px; font-size: 13px; color: #a9a8a2; font-variant-numeric: tabular-nums; }
.xp-pf-nav, .xp-pf-close { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.xp-pf-nav:hover, .xp-pf-close:hover, .xp-pf-nav:focus-visible, .xp-pf-close:focus-visible { background: rgba(255, 255, 255, .24); }
.xp-pf-nav svg, .xp-pf-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xp-pf-close { top: 8px; right: 12px; }
.xp-pf-nav { top: 50%; margin-top: -24px; }
.xp-pf-nav.is-prev { left: 12px; }
.xp-pf-nav.is-next { right: 12px; }
@media (max-width: 767px) { .xp-pf-nav { top: auto; bottom: 16px; margin-top: 0; } .xp-pf-viewer { padding-bottom: 76px; } }
@media (prefers-reduced-motion: reduce) { .xp-pf-open img { transition: none; } }
