/* Workbook page shell + preview access gate.
 * Core content typography/components live in workbook-content.css.
 */

.dyn-workbook-reader--preview {
    position: relative;
}

.dyn-workbook-preview-content {
    position: relative;
    z-index: 1;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 72%,
        rgba(0, 0, 0, .94) 79%,
        rgba(0, 0, 0, .72) 86%,
        rgba(0, 0, 0, .38) 93%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 72%,
        rgba(0, 0, 0, .94) 79%,
        rgba(0, 0, 0, .72) 86%,
        rgba(0, 0, 0, .38) 93%,
        transparent 100%
    );
}

.dyn-workbook-gate {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    z-index: 4;
    --dyn-workbook-gate-overlap: 96px;
    margin: calc(-1 * var(--dyn-workbook-gate-overlap)) -34px -34px;
    padding: calc(var(--dyn-workbook-gate-overlap) + 44px) 32px 52px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .10) 24%,
        rgba(255, 255, 255, .34) 40%,
        rgba(255, 255, 255, .72) 55%,
        #fff 68%,
        #fff 100%
    );
    box-shadow: none;
    text-align: center;
}

.dyn-workbook-gate.is-motion-ready {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity .30s cubic-bezier(.2, .7, .2, 1),
        transform .30s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}

.dyn-workbook-gate.is-motion-ready.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.dyn-workbook-gate__lock {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border: 1px solid #f3d7ca;
    border-radius: 12px;
    background: #fff1ea;
    color: #f14700;
    box-shadow: 0 6px 18px rgba(241, 71, 0, .06);
}

.dyn-workbook-gate__lock svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: none;
}

.dyn-workbook-gate h2 {
    max-width: 720px;
    margin: 0 auto;
    color: #20272d;
    font-size: clamp(24px, 2.6vw, 31px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.16;
}

.dyn-workbook-gate p {
    max-width: 620px;
    margin: 12px auto 0;
    color: #697178;
    font-size: 14px;
    line-height: 1.65;
}

.dyn-workbook-gate__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.dyn-workbook-gate__button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none !important;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.dyn-workbook-gate__button:hover {
    transform: translateY(-1px);
}

.dyn-workbook-gate__button--primary {
    border: 1px solid #f14700;
    background: #f14700;
    color: #fff !important;
}

.dyn-workbook-gate__button--primary:hover {
    border-color: #d93f00;
    background: #d93f00;
}

.dyn-workbook-gate__button--secondary {
    border: 1px solid #d7dcdf;
    background: #fff;
    color: #20272d !important;
}

.dyn-workbook-gate__button--secondary:hover {
    border-color: #bac1c5;
    background: #fafafa;
}

body.single-dynamips_workbook .entry-title {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    color: #17191d;
    font-size: clamp(27px, 2.8vw, 34px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}

body.single-dynamips_workbook .entry-content {
    margin-top: 34px;
}

body.single-dynamips_workbook .dyn-workbook-gate {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .dyn-workbook-gate {
        --dyn-workbook-gate-overlap: 72px;
        margin: calc(-1 * var(--dyn-workbook-gate-overlap)) -18px -24px;
        padding: calc(var(--dyn-workbook-gate-overlap) + 30px) 18px 38px;
    }

    .dyn-workbook-gate__lock {
        width: 42px;
        height: 42px;
        margin-bottom: 16px;
    }

    .dyn-workbook-gate__lock svg {
        width: 20px;
        height: 20px;
    }

    .dyn-workbook-gate__actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-top: 26px;
    }

    .dyn-workbook-gate__button {
        width: 100%;
        min-height: 42px;
        padding: 0 16px;
        font-size: 12px;
    }

    body.single-dynamips_workbook .entry-title {
        font-size: clamp(25px, 6.5vw, 30px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dyn-workbook-gate.is-motion-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Public Workbook reader */
.dyn-public-workbook-page {
    min-height: 70vh;
    padding: 42px 24px 64px;
    background: #f5f7f8;
}

.dyn-public-workbook-wrap {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.dyn-public-workbook-card {
    overflow: hidden;
    border: 1px solid #e1e5e8;
    border-radius: 20px;
    background: #fff;
    box-shadow:
        0 16px 40px rgba(29, 39, 46, .055),
        0 1px 2px rgba(24, 32, 38, .03);
}

.dyn-public-workbook-head {
    padding: 42px 46px 36px;
    border-bottom: 1px solid #e5e8eb;
    background:
        radial-gradient(circle at 92% 8%, rgba(241, 71, 0, .055), transparent 23%),
        linear-gradient(180deg, #fff 0%, #fcfcfc 100%);
}

.dyn-public-workbook-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.dyn-public-workbook-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dyn-public-workbook-meta span {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f5f6;
    color: #657078;
    font-size: 10px;
    font-weight: 750;
}

.dyn-public-workbook-badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 820;
    box-shadow: 0 3px 12px rgba(24, 32, 38, .06);
}

.dyn-public-workbook-badge.is-member {
    background: #eef9f1;
    color: #1d8c46;
}

.dyn-public-workbook-badge.is-premium {
    background: #fff3ed;
    color: #b54d24;
}

.dyn-public-workbook-head h1 {
    max-width: 1050px;
    margin: 0;
    color: #17191d;
    font-size: clamp(27px, 2.8vw, 34px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.dyn-public-workbook-head > p {
    max-width: 880px;
    margin: 17px 0 0;
    color: #69747c;
    font-size: 15px;
    line-height: 1.7;
}

.dyn-public-workbook-content {
    padding: 42px 46px 46px;
}

.dyn-public-workbook-content .dyn-workbook-content {
    width: min(100%, 1000px);
    margin: 0 auto;
}

.dyn-public-workbook-content .dyn-workbook-gate {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    border-radius: 16px;
}

@media (max-width: 760px) {
    .dyn-public-workbook-page {
        padding: 18px 12px 38px;
    }

    .dyn-public-workbook-card {
        border-radius: 15px;
    }

    .dyn-public-workbook-head {
        padding: 26px 20px 24px;
    }

    .dyn-public-workbook-topline {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .dyn-public-workbook-head h1 {
        font-size: clamp(25px, 6.5vw, 30px);
    }

    .dyn-public-workbook-content {
        padding: 26px 18px 30px;
    }

    .dyn-public-workbook-content .dyn-workbook-gate {
        border-radius: 14px;
    }
}

