/**
 * App Detail page polish (Task 52).
 * Scoped to .single-apps — does not affect homepage.
 */

body.single-apps {
    --app-detail-sticky-height: 64px;
    --app-detail-section-gap: 12px;
    overflow-x: hidden;
}

/* ── Compact hero ── */
body.single-apps .app-detail-hero.hero-section {
    padding: 18px 0 14px;
}

body.single-apps .app-detail-hero__grid {
    gap: 12px;
}

body.single-apps .app-detail-hero__brand {
    gap: 12px;
    align-items: center;
}

body.single-apps .app-detail-hero__logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 1.25rem;
}

body.single-apps .app-detail-hero .section-eyebrow {
    font-size: 0.72rem;
    margin-bottom: 2px;
}

body.light-mode.single-apps .app-detail-hero .hero-title,
body.light-mode.single-apps .app-detail-hero .app-detail-hero__title {
    color: #ffffff;
}

body.single-apps .app-detail-hero__title {
    font-size: clamp(1.25rem, 5vw, 1.85rem);
    line-height: 1.15;
    margin: 4px 0 6px;
}

body.single-apps .app-detail-hero__bonus {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

body.single-apps .app-detail-hero__stats.atlas-ds-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 769px) {
    body.single-apps .app-detail-hero__stats.atlas-ds-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Hero stats detail — base in design-system.css */

/* ── Main layout ── */
body.single-apps .app-detail-layout {
    padding: 12px 0 32px;
}

@media (max-width: 768px) {
    /* Clearance for fixed sticky download bar (was wrongly on Highlights). */
    body.single-apps .app-detail-layout {
        padding-bottom: calc(24px + var(--app-detail-sticky-height, 64px) + env(safe-area-inset-bottom, 0px));
    }
}

body.single-apps .app-detail-layout__main,
body.single-apps .app-detail-layout__inner {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

body.single-apps .app-detail-section {
    padding: 16px;
    margin-bottom: var(--app-detail-section-gap);
}

body.single-apps .app-detail-section .atlas-ds-section-header {
    margin-bottom: 12px;
    gap: 4px;
}

body.single-apps .app-detail-section .atlas-ds-section-header__title {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
    line-height: 1.2;
}

body.single-apps .app-detail-section .atlas-ds-section-header__subtitle {
    font-size: 0.86rem;
    line-height: 1.5;
}

/* Quick Information — layout in design-system.css */

body.single-apps .atlas-ds-info-grid .atlas-ds-info-card {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

body.single-apps .atlas-ds-info-grid .atlas-ds-info-card__label {
    color: #64748b;
}

body.single-apps .atlas-ds-info-grid .atlas-ds-info-card__value {
    color: #0f172a;
}

body.light-mode.single-apps .atlas-ds-info-grid .atlas-ds-info-card {
    background: #f8fafc;
}

body.single-apps:not(.light-mode) .atlas-ds-info-grid .atlas-ds-info-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-border-base);
}

body.single-apps:not(.light-mode) .atlas-ds-info-grid .atlas-ds-info-card__label {
    color: #94a3b8;
}

body.single-apps:not(.light-mode) .atlas-ds-info-grid .atlas-ds-info-card__value {
    color: #f8fafc;
}

/* ── Pros & Cons ── */
body.single-apps .app-pros-cons {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
    gap: 14px;
    align-items: start;
    width: 100%;
}

body.single-apps .app-pros-cons:has(.app-pros-cons__column--pros:only-child),
body.single-apps .app-pros-cons:has(.app-pros-cons__column--cons:only-child) {
    grid-template-columns: minmax(0, 1fr);
}

body.single-apps .app-pros-cons__column.card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: none;
}

body.single-apps .app-pros-cons__column--pros {
    padding: 20px 18px;
    background: linear-gradient(160deg, #ecfdf5 0%, #f8fafc 55%);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-left: 4px solid #10b981;
}

body.single-apps .app-pros-cons__column--cons {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 2px solid rgba(239, 68, 68, 0.28);
}

body.single-apps .app-pros-cons__title {
    margin: 0 0 12px;
    font-weight: 800;
    line-height: 1.3;
}

body.single-apps .app-pros-cons__column--pros .app-pros-cons__title {
    font-size: 1.06rem;
    color: #065f46;
}

body.single-apps .app-pros-cons__column--cons .app-pros-cons__title {
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
}

body.single-apps .app-pros-cons__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    width: 100%;
    min-width: 0;
    line-height: 1.65;
}

body.single-apps .app-pros-cons__column--pros .app-pros-cons__list {
    gap: 12px;
    font-size: 0.92rem;
    color: #1e293b;
}

body.single-apps .app-pros-cons__column--cons .app-pros-cons__list {
    gap: 8px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.55;
}

body.single-apps .app-pros-cons__list li {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 1.45rem;
    word-break: break-word;
}

body.single-apps .app-pros-cons__column--pros .app-pros-cons__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.05em;
    color: #10b981;
    font-weight: 800;
    font-size: 1rem;
}

body.single-apps .app-pros-cons__column--cons .app-pros-cons__list li::before {
    content: "✕";
    position: absolute;
    left: 0;
    top: 0.1em;
    color: #f87171;
    font-weight: 600;
    font-size: 0.85em;
}

body.single-apps:not(.light-mode) .app-pros-cons__column--pros {
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.14) 0%, rgba(255, 255, 255, 0.05) 60%);
    border-color: rgba(16, 185, 129, 0.28);
}

body.single-apps:not(.light-mode) .app-pros-cons__column--cons {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(148, 163, 184, 0.14);
    border-left-color: rgba(248, 113, 113, 0.35);
}

body.single-apps:not(.light-mode) .app-pros-cons__column--pros .app-pros-cons__title {
    color: #6ee7b7;
}

body.single-apps:not(.light-mode) .app-pros-cons__column--cons .app-pros-cons__title {
    color: #94a3b8;
}

body.single-apps:not(.light-mode) .app-pros-cons__column--pros .app-pros-cons__list {
    color: #e2e8f0;
}

body.single-apps:not(.light-mode) .app-pros-cons__column--cons .app-pros-cons__list {
    color: #94a3b8;
}

@media (max-width: 768px) {
    body.single-apps .app-pros-cons {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    body.single-apps .app-pros-cons__column--pros {
        padding: 18px 16px;
    }

    body.single-apps .app-pros-cons__column--cons {
        padding: 12px 14px;
    }
}

/* ── Latest Update ── */
body.single-apps .app-latest-update.card {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
    padding: 18px 20px;
}

body.single-apps .app-latest-update__row {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.single-apps .app-latest-update__row dt {
    color: #64748b;
    font-weight: 600;
}

body.single-apps .app-latest-update__row dd {
    color: #0f172a;
    font-weight: 700;
}

body.single-apps:not(.light-mode) .app-latest-update.card {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-border-base);
}

body.single-apps:not(.light-mode) .app-latest-update__row dt {
    color: #94a3b8;
}

body.single-apps:not(.light-mode) .app-latest-update__row dd {
    color: #f8fafc;
}

/* ── How to Install ── */
body.single-apps .app-how-to-install {
    color: #334155;
}

body.single-apps .app-how-to-install__steps {
    --install-divider: rgba(15, 23, 42, 0.08);
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--install-divider);
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

body.single-apps .app-how-to-install__step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border-bottom: 1px solid var(--install-divider);
}

body.single-apps .app-how-to-install__step:last-child {
    border-bottom: 0;
}

body.single-apps .app-how-to-install__step-badge {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: none;
}

body.single-apps .app-how-to-install__step-body {
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #475569;
}

body.single-apps .app-how-to-install__step-body p {
    margin: 0;
}

body.single-apps .app-how-to-install__step-body p + p {
    margin-top: 6px;
}

body.single-apps .app-how-to-install__step-body strong {
    color: #0f172a;
    font-weight: 700;
}

body.single-apps .app-how-to-install__content {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    line-height: 1.65;
    font-size: 0.88rem;
}

body.single-apps:not(.light-mode) .app-how-to-install__steps,
body.single-apps:not(.light-mode) .app-how-to-install__content {
    --install-divider: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border-base);
}

body.single-apps:not(.light-mode) .app-how-to-install__step-body,
body.single-apps:not(.light-mode) .app-how-to-install__content {
    color: #cbd5e1;
}

body.single-apps:not(.light-mode) .app-how-to-install__step-body strong,
body.single-apps:not(.light-mode) .app-how-to-install__content strong {
    color: #f8fafc;
}

@media (min-width: 640px) {
    body.single-apps .app-how-to-install__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.single-apps .app-how-to-install__step {
        padding: 12px 14px;
        border-right: 1px solid var(--install-divider);
    }

    body.single-apps .app-how-to-install__step:nth-child(2n) {
        border-right: 0;
    }

    body.single-apps .app-how-to-install__step:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    body.single-apps .app-how-to-install__step:last-child:nth-child(odd) {
        border-bottom: 0;
        grid-column: 1 / -1;
        border-right: 0;
    }
}

@media (max-width: 639px) {
    body.single-apps .app-how-to-install__step {
        grid-template-columns: 26px minmax(0, 1fr);
        gap: 9px;
        padding: 10px 12px;
    }

    body.single-apps .app-how-to-install__step-badge {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    body.single-apps .app-how-to-install__step-body {
        font-size: 0.84rem;
        line-height: 1.5;
    }
}

/* ── Features ── */
body.single-apps .app-detail-features .app-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

body.single-apps .app-detail-features .app-feature {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "description description";
    gap: 8px 14px;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 16px;
    box-sizing: border-box;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: none;
}

body.single-apps .app-detail-features .app-feature__icon-wrap {
    grid-area: icon;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    flex-shrink: 0;
    align-self: center;
}

body.single-apps .app-detail-features .app-feature__icon,
body.single-apps .app-detail-features .app-feature__icon-image {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
}

body.single-apps .app-detail-features .app-feature__icon-image {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

body.single-apps .app-detail-features .app-feature__title {
    grid-area: title;
    margin: 0;
    min-width: 0;
    align-self: center;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
}

body.single-apps .app-detail-features .app-feature__description {
    grid-area: description;
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #475569;
}

body.light-mode.single-apps .app-detail-features .app-feature {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode.single-apps .app-detail-features .app-feature__title {
    color: #0f172a;
}

body.light-mode.single-apps .app-detail-features .app-feature__description {
    color: #475569;
}

@media (min-width: 769px) {
    body.single-apps .app-detail-features .app-features:has(.app-feature:nth-child(2):last-child) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    body.single-apps .app-detail-features .app-features:has(.app-feature:nth-child(3)) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    body.single-apps .app-detail-features .app-features:has(.app-feature:nth-child(3)) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Screenshots ── */
body.single-apps .app-detail-screenshots__stage {
    position: relative;
    width: 100%;
}

body.single-apps .app-detail-screenshots__download {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

body.single-apps .app-detail-screenshots__download .app-detail-download__button {
    pointer-events: auto;
}

body.single-apps .app-detail-download__button--overlay {
    width: auto;
    min-width: 168px;
    max-width: calc(100% - 32px);
    min-height: 48px;
    padding: 12px 28px;
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.single-apps .app-detail-screenshots .app-detail-gallery,
body.single-apps .app-detail-screenshots .app-detail-gallery--embedded {
    width: 100%;
}

body.single-apps .app-detail-screenshots .app-detail-gallery__track {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    margin: 0;
}

body.single-apps .app-detail-screenshots .app-detail-gallery__item {
    flex: unset;
    width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
}

body.single-apps .app-detail-screenshots .app-detail-gallery__track:has(.app-detail-gallery__item:only-child) {
    grid-template-columns: 1fr;
    justify-content: stretch;
}

body.single-apps .app-detail-screenshots .app-detail-gallery__trigger {
    width: 100%;
    border-radius: inherit;
}

body.single-apps .app-detail-screenshots .app-detail-gallery__trigger img {
    width: 100%;
    height: auto;
    aspect-ratio: 1672 / 941;
    object-fit: cover;
    object-position: center;
    background: transparent;
}

body.single-apps .app-detail-screenshots .app-detail-gallery__track:has(.app-detail-gallery__item:only-child) .app-detail-gallery__trigger img {
    aspect-ratio: 1672 / 941;
    max-height: none;
    object-fit: cover;
}

@media (max-width: 768px) {
    /* Full-bleed image inside the Highlights card — reads larger on phones. */
    body.single-apps .app-detail-screenshots {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 12px;
    }

    body.single-apps .app-detail-screenshots .atlas-ds-section-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.single-apps .app-detail-screenshots .app-detail-gallery__item {
        border-radius: 0;
    }

    body.single-apps .app-detail-screenshots .app-detail-gallery__trigger img,
    body.single-apps .app-detail-screenshots .app-detail-gallery__track:has(.app-detail-gallery__item:only-child) .app-detail-gallery__trigger img {
        width: 100%;
        min-height: 210px;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    body.single-apps .app-detail-screenshots .app-detail-gallery__track:not(:has(.app-detail-gallery__item:only-child)) {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 2px 16px 8px;
        scrollbar-width: thin;
    }

    body.single-apps .app-detail-screenshots .app-detail-gallery__track:not(:has(.app-detail-gallery__item:only-child)) .app-detail-gallery__item {
        flex: 0 0 min(88vw, 480px);
        border-radius: 14px;
        scroll-snap-align: start;
    }

    body.single-apps .app-detail-screenshots__download .app-detail-download__button {
        min-width: min(220px, calc(100% - 32px));
        min-height: 52px;
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* ── FAQ ── */
body.single-apps .app-detail-faq {
    padding: 16px;
    margin-bottom: var(--app-detail-section-gap);
    background: var(--color-surface);
    border: 1px solid var(--color-border-base);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

body.single-apps .app-detail-faq .atlas-ds-section-header {
    margin-bottom: 12px;
}

body.single-apps .faq-grid--accordion {
    gap: 10px;
}

body.single-apps .faq-item--accordion {
    min-width: 0;
}

body.single-apps .faq-item--accordion summary {
    padding: 14px 16px;
    font-size: 0.92rem;
    line-height: 1.4;
}

body.single-apps .faq-item__answer {
    padding: 0 16px 14px;
}

body.single-apps .faq-item__answer p {
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ── CTA visibility: mobile inline + sticky; desktop sidebar only ── */
body.atlas-mobile-first.single-apps .app-detail-mobile-cta,
body.atlas-mobile-first.single-apps .app-detail-sticky-download {
    display: none;
}

@media (max-width: 768px) {
    body.single-apps .app-detail-hero__brand {
        flex-direction: row;
        align-items: center;
    }

    body.atlas-mobile-first.single-apps .app-detail-mobile-cta {
        display: block;
        padding: 10px 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border-base);
    }

    body.single-apps .app-detail-download {
        display: none;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download {
        display: block;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        z-index: 88;
        width: min(100%, var(--app-shell-max-width, 800px));
        max-height: none;
        padding: 8px 12px;
        background: transparent;
        border-top: 0;
        backdrop-filter: none;
        box-sizing: border-box;
        pointer-events: none;
    }

    body.light-mode.atlas-mobile-first.single-apps .app-detail-sticky-download {
        background: transparent;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__prompt {
        pointer-events: auto;
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 52px;
        padding: 8px 12px 8px 10px;
        border-radius: 14px;
        text-decoration: none;
        color: #0f172a;
        background: linear-gradient(180deg, #fffdf8 0%, #fff7e8 100%);
        border: 1px solid rgba(180, 120, 40, 0.28);
        box-shadow:
            0 8px 24px rgba(15, 23, 42, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__icon,
    body.atlas-mobile-first.single-apps .app-detail-sticky-download__logo {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        overflow: hidden;
        color: #fff;
        background: var(--gradient-primary);
        box-shadow: 0 2px 8px rgba(34, 197, 94, 0.28);
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__logo-img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__logo-letter {
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.02em;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__copy {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__label {
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.01em;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__hint {
        font-size: 0.72rem;
        font-weight: 500;
        line-height: 1.25;
        color: rgba(15, 23, 42, 0.58);
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__go,
    body.atlas-mobile-first.single-apps .app-detail-sticky-download__action {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #fff;
        background: var(--gradient-primary);
        box-shadow: 0 2px 8px rgba(34, 197, 94, 0.32);
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__action-icon {
        display: block;
        flex: 0 0 auto;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__action-text {
        line-height: 1;
    }

    body.atlas-mobile-first.single-apps .app-detail-sticky-download__button {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }

    body.atlas-mobile-first.single-apps .app-detail-layout {
        padding-bottom: calc(
            var(--mobile-nav-height) + var(--app-detail-sticky-height) + 20px + env(safe-area-inset-bottom)
        );
    }

    body.atlas-mobile-first.single-apps .app-detail-layout__sidebar-wrap {
        display: none !important;
    }
}

@media (min-width: 769px) {
    body.atlas-mobile-first.single-apps .app-detail-layout__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        align-items: start;
    }
}

/* ── Download CTA module ── */
body.single-apps .app-detail-download {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 16px;
    margin-bottom: var(--app-detail-section-gap);
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.single-apps .app-detail-download__panel {
    display: contents;
}

body.single-apps .app-detail-download__button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    line-height: 1.2;
}

body.single-apps .app-detail-download__button--image {
    display: block;
    width: min(100%, 420px);
    max-width: 100%;
    height: clamp(64px, 8vw, 96px);
    overflow: hidden;
    border-radius: 12px;
}

body.single-apps .app-detail-download__button.is-unlinked {
    cursor: default;
    opacity: 0.92;
}

body.single-apps .app-detail-download__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

body.single-apps .app-detail-download__button--text {
    width: auto;
    min-width: 168px;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: 999px;
    line-height: 1.2;
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    body.single-apps .app-detail-download__button--image {
        height: clamp(56px, 14vw, 80px);
    }
}

body.single-apps .app-detail-download__label {
    font-weight: 700;
    font-size: 1.05rem;
}

/* ── Community CTA module (full width) ── */
body.single-apps .app-detail-community {
    padding: 0;
}

body.single-apps .app-detail-sidebar {
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.single-apps .app-detail-sidebar__module {
    display: grid;
    gap: 14px;
}

body.single-apps .app-detail-sidebar__trust {
    justify-self: start;
    background: #ffffff;
    color: #0f172a;
    border: 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

body.single-apps .app-detail-sidebar__card.atlas-ds-cta-card {
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

body.single-apps .app-detail-sidebar__card-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    padding: 22px 24px;
    align-items: center;
}

body.single-apps .app-detail-sidebar__card .atlas-ds-cta-card__title {
    font-size: 1.05rem;
}

body.single-apps .app-detail-sidebar__card .atlas-ds-cta-card__actions {
    flex-direction: column;
    min-width: 220px;
}

body.single-apps .app-detail-sidebar__card .atlas-ds-btn {
    width: 100%;
    justify-content: center;
}

body.single-apps .app-detail-sidebar__card .atlas-ds-btn--download-pulse,
body.single-apps .app-detail-mobile-cta .atlas-ds-btn--download-pulse {
    width: 100%;
}

body.single-apps .app-detail-sidebar__card .atlas-ds-btn--outline {
    border-color: rgba(255, 255, 255, 0.42);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.22);
}

body.single-apps .app-detail-sidebar__card .atlas-ds-btn--outline:hover,
body.single-apps .app-detail-sidebar__card .atlas-ds-btn--outline:focus-visible {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(15, 23, 42, 0.34);
    color: #ffffff;
}

@media (max-width: 768px) {
    body.single-apps .app-detail-sidebar__card-inner {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
    }

    body.single-apps .app-detail-sidebar__card .atlas-ds-cta-card__media {
        justify-self: center;
    }

    body.single-apps .app-detail-sidebar__card .atlas-ds-cta-card__actions {
        min-width: 0;
    }

    body.single-apps .app-detail-sidebar__trust {
        justify-self: center;
    }
}

/* ── Overflow guard ── */
body.single-apps .site-main.app-detail,
body.single-apps .entry-content,
body.single-apps .app-detail-overview__content {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
