/* PB Author Tools Page */
.pb-author-tools-page {
    max-width: 1120px;
}

.pbt-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    gap: clamp(28px, 6vw, 70px);
    align-items: center;
    padding: clamp(32px, 7vw, 76px);
    margin: 12px 0 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.86)),
        linear-gradient(90deg, rgba(109, 40, 217, 0.12), rgba(249, 115, 22, 0.12));
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(50, 16, 79, 0.1);
}

.pbt-kicker {
    margin: 0 0 10px;
    color: #6d28d9;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pbt-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1;
    color: var(--text-primary);
}

.pbt-lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--text-secondary);
    font-family: var(--font-playful);
    font-size: clamp(1.16rem, 2vw, 1.52rem);
    font-weight: 600;
    line-height: 1.45;
}

.pbt-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.pbt-hero__art {
    justify-self: center;
}

.pbt-hero__art img {
    width: min(100%, 280px);
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 28%;
    box-shadow: 0 18px 36px rgba(50, 16, 79, 0.16);
}

.pbt-showcase {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(24px, 4vw, 44px);
    align-items: center;
    margin: 28px 0;
    padding: clamp(24px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(50, 16, 79, 0.08);
}

#what-it-does,
#editions,
#install {
    scroll-margin-top: 96px;
}

.pbt-showcase__copy h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.pbt-showcase__copy p {
    margin-top: 14px;
    color: var(--text-secondary);
}

.pbt-feature-list {
    grid-column: 1;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pbt-feature-list li {
    position: relative;
    padding-left: 28px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.55;
}

.pbt-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 12px;
    height: 12px;
    background: #6d28d9;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(109, 40, 217, 0.12);
}

.pbt-showcase__media {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
}

.pbt-preview-trigger {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--border-radius-sm);
    cursor: zoom-in;
}

.pbt-preview-trigger:focus-visible {
    outline: 3px solid rgba(109, 40, 217, 0.72);
    outline-offset: 5px;
}

.pbt-showcase__media img {
    display: block;
    width: 100%;
    aspect-ratio: 478 / 338;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 16px 36px rgba(50, 16, 79, 0.14);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pbt-preview-trigger:hover img,
.pbt-preview-trigger:focus-visible img {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(50, 16, 79, 0.2);
}

.pbt-showcase__media figcaption {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    text-align: center;
}

.pbt-section {
    margin: 28px 0;
    padding: clamp(24px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(50, 16, 79, 0.08);
}

.pbt-section__heading {
    max-width: 760px;
    margin-bottom: 22px;
}

.pbt-section__heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.pbt-section__heading p {
    margin: 12px 0 0;
    color: var(--text-secondary);
}

/* Two editions */
.pbt-edition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.pbt-edition-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(109, 40, 217, 0.18);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 6px 18px var(--shadow-light);
}

.pbt-edition-card__badge {
    align-self: flex-start;
    padding: 5px 12px;
    color: #5b21b6;
    background: rgba(109, 40, 217, 0.12);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pbt-edition-card h3 {
    margin: 0;
    font-size: 1.32rem;
}

.pbt-edition-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.pbt-edition-card .btn {
    margin-top: auto;
    text-align: center;
}

/* Install steps */
.pbt-steps {
    margin: 0 0 1.25rem 1.4rem;
    padding: 0;
}

.pbt-steps li {
    margin-bottom: 14px;
    padding-left: 6px;
    line-height: 1.6;
}

.pbt-steps li:last-child {
    margin-bottom: 0;
}

.pbt-steps strong {
    color: var(--text-primary);
}

.pbt-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.pbt-inline-actions + .pbt-note {
    margin-top: 24px;
}

.pbt-note {
    margin: 0;
    padding: 16px 18px;
    color: var(--text-secondary);
    background: rgba(249, 115, 22, 0.1);
    border-left: 4px solid #f97316;
    border-radius: var(--border-radius-sm);
    line-height: 1.6;
}

.pbt-note strong {
    color: var(--text-primary);
}

/* Resources / help links */
.pbt-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.pbt-resource-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid rgba(50, 16, 79, 0.1);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 14px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pbt-resource-card:hover {
    transform: translateY(-3px);
    border-color: #6d28d9;
    box-shadow: 0 10px 24px rgba(50, 16, 79, 0.12);
    color: var(--text-primary);
}

.pbt-resource-card strong {
    font-family: var(--font-headings);
    font-size: 1.05rem;
}

.pbt-resource-card span {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.pbt-resource-card:focus-visible {
    outline: 3px solid rgba(109, 40, 217, 0.6);
    outline-offset: 3px;
}

.pbt-back {
    margin-top: 8px;
    text-align: center;
}

/* Full-screen preview modal */
body.modal-open {
    overflow: hidden;
}

.pbt-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 48px);
    background: rgba(6, 12, 24, 0.92);
}

.pbt-preview-modal[hidden] {
    display: none;
}

.pbt-preview-modal__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 1100px);
    max-height: calc(100vh - 96px);
}

.pbt-preview-modal__frame img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.pbt-preview-modal__close {
    position: fixed;
    top: clamp(14px, 3vw, 26px);
    right: clamp(14px, 3vw, 26px);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.pbt-preview-modal__close:hover,
.pbt-preview-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: 3px solid rgba(255, 255, 255, 0.32);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .pbt-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pbt-hero__actions {
        justify-content: center;
    }

    .pbt-showcase {
        grid-template-columns: 1fr;
    }

    .pbt-showcase__media,
    .pbt-feature-list {
        grid-column: auto;
        grid-row: auto;
    }

    .pbt-section__heading {
        margin-inline: auto;
    }

    .pbt-edition-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .pb-author-tools-page {
        padding-inline: 14px;
    }

    .pbt-hero {
        gap: 16px;
        padding: 22px 20px;
    }

    .pbt-hero,
    .pbt-section,
    .pbt-showcase {
        border-radius: var(--border-radius-sm);
    }

    .pbt-hero h1 {
        font-size: clamp(2.5rem, 12vw, 3.15rem);
    }

    .pbt-kicker {
        margin-bottom: 6px;
        font-size: 0.82rem;
    }

    .pbt-lead {
        margin-top: 16px;
        font-size: 1.08rem;
    }

    .pbt-hero__art img {
        width: min(52vw, 150px);
    }

    .pbt-hero__actions .btn,
    .pbt-edition-card .btn,
    .pbt-inline-actions .btn {
        width: 100%;
    }

    .pbt-showcase {
        padding: 22px 20px;
    }

    .pbt-showcase__copy h2 {
        font-size: 1.9rem;
    }

    .pbt-showcase__media figcaption {
        font-size: 0.86rem;
    }

    .pbt-preview-modal {
        padding: 54px 12px 20px;
    }

    .pbt-preview-modal__frame,
    .pbt-preview-modal__frame img {
        max-height: calc(100vh - 86px);
    }
}

/* ----------------------------------------------------------------
   Sub-pages: installation, help & tips, support, terms, privacy
   ---------------------------------------------------------------- */
.pbt-subpage {
    max-width: 900px;
}

.pbt-subhead {
    padding: clamp(28px, 5vw, 52px);
    margin: 12px 0 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.86)),
        linear-gradient(90deg, rgba(109, 40, 217, 0.12), rgba(249, 115, 22, 0.12));
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(50, 16, 79, 0.1);
}

.pbt-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: #6d28d9;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pbt-breadcrumb:hover {
    color: #4c1d95;
}

.pbt-subhead h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    color: var(--text-primary);
}

.pbt-subhead__lead {
    max-width: 640px;
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-family: var(--font-playful);
    font-size: clamp(1.05rem, 1.6vw, 1.24rem);
    font-weight: 600;
    line-height: 1.5;
}

/* Prose inside a panel */
.pbt-prose > :first-child {
    margin-top: 0;
}

.pbt-prose p {
    margin: 0 0 1em;
    color: var(--text-primary);
    line-height: 1.7;
}

.pbt-prose p:last-child {
    margin-bottom: 0;
}

.pbt-prose h2 {
    margin: 1.6em 0 0.5em;
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    color: var(--text-primary);
}

.pbt-prose ul,
.pbt-prose ol {
    margin: 0 0 1em 1.4rem;
}

.pbt-prose li {
    margin-bottom: 8px;
    line-height: 1.65;
}

.pbt-prose li:last-child {
    margin-bottom: 0;
}

.pbt-prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 18px 0;
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 24px var(--shadow-light);
}

.pbt-prose strong {
    color: var(--text-primary);
}

.pbt-prose a {
    color: #6d28d9;
    font-weight: 600;
}

.pbt-prose a:hover {
    color: #4c1d95;
}

.pbt-prose .pbt-note {
    margin: 18px 0;
}

/* Numbered step list with screenshots */
.pbt-step-list {
    counter-reset: pbt-step;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: clamp(24px, 4vw, 34px);
}

.pbt-step-list > li {
    counter-increment: pbt-step;
    position: relative;
    padding-left: 58px;
}

.pbt-step-list > li::before {
    content: counter(pbt-step);
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-radius: 50%;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(109, 40, 217, 0.3);
}

.pbt-step-list p {
    margin: 8px 0 0;
    line-height: 1.65;
}

.pbt-step-list img {
    display: block;
    width: 100%;
    margin-top: 14px;
    border: 1px solid rgba(50, 16, 79, 0.08);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 24px var(--shadow-light);
}

.pbt-subpage .pbt-back {
    margin-top: 26px;
}

@media (max-width: 560px) {
    .pbt-subpage {
        padding-inline: 14px;
    }

    .pbt-subhead {
        padding: 22px 20px;
        border-radius: var(--border-radius-sm);
    }

    .pbt-step-list > li {
        padding-left: 0;
        padding-top: 52px;
    }

    .pbt-step-list > li::before {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}
