.library-shell {
    --library-ink: #111114;
    --library-accent: #E6F2BA;--library-accent-bg:linear-gradient(160deg,#F6F8C2 0%,#D6ECB2 100%);
    --library-body: #43433E;
    --library-muted: #70736D;
    --library-soft: #F1F0EA;
    max-width: 1920px;
    margin: 0 auto;
    background: #fff;
    border-radius: clamp(18px, 2.4vw, 30px);
    overflow: hidden;
    color: var(--library-ink);
    letter-spacing: -.006em;
    -webkit-font-smoothing: antialiased;
}
.library-shell *, .library-shell *::before, .library-shell *::after { box-sizing: border-box; }
.library-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: clamp(44px, 6vw, 80px) clamp(20px, 4vw, 40px) clamp(72px, 9vw, 136px);
}
.library-eyebrow {
    display: block;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--library-muted);
}
.library-title {
    margin: 0;
    font-size: clamp(30px, 3.6vw, 52px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.04em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.library-lead {
    max-width: 60ch;
    margin: 16px 0 0;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.5;
    color: var(--library-body);
}

/* Lista */
.library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: clamp(28px, 4vw, 44px) 0 clamp(24px, 3vw, 36px);
}
.library-filter {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #DCDCD6;
    border-radius: 999px;
    color: var(--library-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    touch-action: manipulation;
}
.library-filter:hover, .library-filter:focus-visible { border-color: var(--library-ink); color: var(--library-ink); text-decoration: underline !important; }
.library-filter.is-active { background: var(--library-ink); border-color: var(--library-ink); color: #fff; }
.library-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.library-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    border: 1px solid #E4E4E0;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
}
.library-card:hover, .library-card:focus-visible { color: inherit; text-decoration: none; }
.library-card:hover .library-card-title, .library-card:focus-visible .library-card-title { text-decoration: underline; }
.library-card-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--library-soft);
    overflow: hidden;
}
.library-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.library-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--library-muted);
}
.library-card-body { display: flex; flex: 1; flex-direction: column; padding: clamp(20px, 2vw, 26px); }
.library-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.library-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    background: var(--library-soft);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.library-tag.is-free { background: var(--library-accent-bg); }
.library-card-title {
    margin: 0 0 8px;
    font-size: clamp(18px, 1.25vw, 21px);
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.library-card-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--library-body); overflow-wrap: anywhere; }
.library-empty {
    max-width: 760px;
    padding: clamp(36px, 5vw, 64px);
    border-radius: clamp(18px, 2vw, 26px);
    background: #F6F6F6;
}
.library-empty h2 { margin: 0 0 16px; font-size: clamp(26px, 3vw, 40px); font-weight: 400; line-height: 1.05; letter-spacing: -.04em; }
.library-empty p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--library-body); }

/* Strona produktu */
.library-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; font-size: 13px; font-weight: 500; color: var(--library-muted); }
.library-breadcrumb a { color: var(--library-ink); font-weight: 500; text-decoration: none; }
.library-breadcrumb a:hover, .library-breadcrumb a:focus-visible { text-decoration: underline !important; }
.library-product {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: start;
}
.library-product-cover {
    width: 100%;
    max-width: 420px;
    margin-top: clamp(24px, 3vw, 36px);
    border-radius: 18px;
    overflow: hidden;
    background: var(--library-soft);
}
.library-product-cover img { display: block; width: 100%; height: auto; }
.library-product-description {
    margin-top: clamp(24px, 3vw, 36px);
    font-size: 16px;
    line-height: 1.7;
    color: var(--library-body);
    overflow-wrap: anywhere;
}
.library-course-link {
    display: block;
    margin-top: clamp(24px, 3vw, 36px);
    padding: 20px 22px;
    border-radius: 18px;
    background: var(--library-soft);
    color: var(--library-ink);
    text-decoration: none;
}
.library-course-link:hover .library-course-link-title, .library-course-link:focus-visible .library-course-link-title { text-decoration: underline; }
.library-course-link-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--library-muted); }
.library-course-link-title { font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }

.library-form-box {
    position: sticky;
    top: 20px;
    padding: clamp(26px, 3vw, 40px);
    background: var(--library-accent-bg);
}
.library-form-title { margin: 0 0 8px; font-size: clamp(22px, 2vw, 28px); font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.library-form-text { margin: 0 0 28px; font-size: 14px; line-height: 1.55; color: #2f2f2a; }
.library-field { margin-bottom: 24px; }
.library-field label { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #374151; }
.library-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(17, 17, 20, .45);
    border-radius: 0;
    background: transparent;
    font-size: 16px;
    color: var(--library-ink);
    outline: none;
}
.library-field input:focus { border-bottom-color: var(--library-ink); }
.library-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #374151;
    cursor: pointer;
}
.library-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--library-ink); cursor: pointer; }
.library-consent a { color: var(--library-ink); text-decoration: underline; }
.library-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.library-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 14px;
    padding: 12px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--library-ink);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity .2s ease;
}
.library-submit:hover, .library-submit:focus-visible { opacity: .85; color: #fff; text-decoration: none; }
.library-submit:disabled { opacity: .6; cursor: wait; }
.library-message { display: none; margin-bottom: 18px; padding: 12px 16px; border-left: 3px solid #EC4899; background: #fff0f6; font-size: 13px; font-weight: 500; line-height: 1.5; }
.library-success { display: none; }
.library-success h3 { margin: 0 0 10px; font-size: 22px; font-weight: 500; line-height: 1.25; }
.library-success p { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.library-price { margin: 0 0 18px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }

/* Strona pobierania */
.library-download-box {
    max-width: 620px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px);
    border-radius: clamp(18px, 2vw, 26px);
    background: var(--library-soft);
    text-align: center;
}
.library-download-box h1 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 36px); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.library-download-box p { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--library-body); }
.library-download-box .library-submit { width: auto; min-width: 220px; }
.library-secondary-link { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 500; color: var(--library-ink); }

@media (max-width: 1199px) {
    .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .library-product { grid-template-columns: minmax(0, 1fr); }
    .library-form-box { position: static; }
}
@media (max-width: 599px) {
    .library-grid { grid-template-columns: minmax(0, 1fr); }
    .library-container { padding-left: 20px; padding-right: 20px; }
    .library-download-box .library-submit { width: 100%; }
}

/* Rama strony jak w blogu: tlo body i odstep wokol zaokraglonego wrappera */
html, body { background: #E7E5DF !important; overflow-x: hidden !important; }
#app-page-frame { background: #E7E5DF !important; padding: clamp(8px, 1.4vw, 16px) !important; }
@media (max-width: 767px) {
    .library-shell { border-radius: 18px; }
}
