/*
 * Public site: a post in a list (.app-post) and the text of a page (.app-article — a post, About, a product).
 * A link inside a sentence is underlined at rest (rules.md §2.1, the rule of variant 2).
 */

.app-post {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-half);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color var(--transition);
}

.app-post:hover {
    border-color: var(--border-3);
}

.app-post:has(.app-cardlink:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-post__title {
    color: var(--text);
    font-size: var(--fs-text);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
    line-height: var(--lh-tight);
}

.app-post__text {
    color: var(--text-2);
    font-size: var(--fs-site-read);
    line-height: var(--lh-text);
}

.app-post__meta {
    color: var(--text-3);
    font-size: var(--fs-site-meta);
}

/* --- the text of a page ---------------------------------------------------------------------------------- */

.app-article__title {
    margin: 0 0 var(--space-1);
    font-size: var(--fs-page);
    font-weight: var(--fw-bold);
    letter-spacing: -0.025em;
    line-height: var(--lh-tight);
}

.app-article__meta {
    margin-bottom: var(--space-5);
    color: var(--text-3);
    font-size: var(--fs-site-meta);
}

/* A lead right under a page title (Contacts, Books): a step of air between the two. */
.app-article__title + .app-article__lead {
    margin-top: var(--space-2);
}

.app-article__lead {
    margin-bottom: var(--space-2);
    color: var(--text);
    font-size: var(--fs-card);
    line-height: var(--lh-text);
}

/* The line "In this post: …" under the lead. */
.app-article__links {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--border);
    color: var(--text-3);
    font-size: var(--fs-site-read);
}

.app-article__body p {
    margin-bottom: var(--space-3);
    color: var(--text-2);
    line-height: 1.7;
}

.app-article__body h2 {
    margin: var(--space-6) 0 var(--space-1);
    font-size: var(--fs-section);
    font-weight: var(--fw-bold);
    letter-spacing: -0.015em;
}

.app-article__body a {
    text-decoration-line: underline;
    text-underline-offset: 2px;
}

@container (max-width: 719px) {
    .app-article__title {
        font-size: var(--fs-value);
        letter-spacing: -0.02em;
    }
}

/* Touch target of «All posts →» (its base rule is in frame.css): at least --field tall on a phone (core.md §19.1). */
@container (max-width: 719px) {
    .app-site__more {
        display: inline-flex;
        align-items: center;
        min-height: var(--field);
        margin-top: 0;
    }
}

/* Touch target: the title of a post in a list, the links of the meta lines and of «In this post» are at least --field tall; the text keeps its size, the zone grows (core.md §19.1). */
@container (max-width: 719px) {
    .app-post__title {
        display: flex;
        align-items: center;
        min-height: var(--field);
    }

    .app-article__meta a,
    .app-article__links a {
        display: inline-flex;
        align-items: center;
        min-height: var(--field);
    }
}

/* The portrait of the owner on About (owner, 20.10.2026): round, beside the lead (the first paragraph) and above it on a phone. A heading clears it, so the next section starts under the picture, not beside it. */
.app-about__photo {
    float: left;
    width: calc(var(--space-6) * 4);
    height: calc(var(--space-6) * 4);
    margin: var(--space-half) var(--space-5) var(--space-3) 0;
    border-radius: 50%;
    object-fit: cover;
}

.app-about__photo ~ .app-article__body h2 {
    clear: left;
}

@container (max-width: 719px) {
    .app-about__photo {
        float: none;
        display: block;
        margin: 0 0 var(--space-3);
    }
}
