/* ==========================================================================
   Tool app block — shared by every free tool page.
   Sits directly under the tool's result: the moments after the answer where
   the app takes over, and the App Store screens that show those moments.
   Each page sets --tool-app-accent (and optionally --tool-app-tint) on the
   section to its own cluster colour; nothing here reaches outside .tool-app.
   ========================================================================== */

body.page-sketch .tool-app,
.tool-app {
    --tool-app-accent: #2d5da1;
    --tool-app-tint: color-mix(in srgb, var(--tool-app-accent) 7%, #fdfbf7);
    margin: 40px 0 8px;
    padding: 28px 26px 26px;
    border-radius: 18px;
    background: var(--tool-app-tint);
    border: 1px solid color-mix(in srgb, var(--tool-app-accent) 22%, transparent);
    color: #23231f;
}

.tool-app-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.tool-app-icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 13px;
    outline: 1px solid rgba(0, 0, 0, 0.08);
    outline-offset: -1px;
}

.tool-app-kicker {
    margin: 0 0 2px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tool-app-accent);
}

.tool-app h2 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.25;
    text-wrap: balance;
    color: #23231f;
}

/* ---------------------------------------------------------------- moments -- */
.tool-app-moments {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: grid;
    gap: 10px;
    counter-reset: tool-app-moment;
}

.tool-app-moments li {
    position: relative;
    padding-left: 36px;
    line-height: 1.55;
    color: #3b3a35;
    counter-increment: tool-app-moment;
}

.tool-app-moments li::before {
    content: counter(tool-app-moment);
    position: absolute;
    left: 0;
    top: 1px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tool-app-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.tool-app-moments strong { color: #23231f; }

/* ------------------------------------------------------------------ shots -- */
.tool-app-shots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
    padding: 0;
}

.tool-app-shot {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-app-shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 460 / 996;
    border-radius: 14px;
    background: #fff;
    outline: 1px solid rgba(0, 0, 0, 0.08);
    outline-offset: -1px;
    box-shadow: 0 6px 18px rgba(35, 35, 31, 0.10);
}

.tool-app-shot figcaption {
    font-size: 0.86rem;
    line-height: 1.45;
    color: #5f5c55;
}

.tool-app-shot figcaption strong {
    display: block;
    color: #23231f;
}

/* -------------------------------------------------------------------- cta -- */
.tool-app-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.tool-app-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    background: var(--tool-app-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition-property: opacity, scale;
    transition-duration: 0.15s;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.tool-app-button:hover { opacity: 0.92; color: #fff; }
.tool-app-button:active { scale: 0.96; }

.tool-app-fine {
    font-size: 0.86rem;
    color: #5f5c55;
}

/* Phones: the three screens become a swipeable row instead of three
   thumbnails too small to read. */
@media (max-width: 640px) {
    body.page-sketch .tool-app,
    .tool-app { padding: 22px 18px 20px; }

    .tool-app-shots {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: -18px;
        padding: 0 18px 6px;
        scroll-padding-inline: 18px;
        scrollbar-width: none;
    }

    .tool-app-shots::-webkit-scrollbar { display: none; }

    .tool-app-shot {
        flex: 0 0 62%;
        scroll-snap-align: start;
    }

    .tool-app-button { flex: 1 1 100%; text-align: center; }
}
