/*
 * Public site: the contact channels — a row of text links with a coloured dot, no frame, no fill at rest:
 * not buttons (rules.md §3.1, D-018). The colour of a channel is data: the page puts it on the link as --app-chan.
 */

.app-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-0) 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-contacts__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-control);
    color: var(--text-2);
    font-size: var(--fs-site-read);
    font-weight: var(--fw-medium);
    line-height: var(--lh-text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.app-contacts__link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.app-contacts__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    background: var(--surface-2);
}

.app-contacts__dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--app-chan, var(--text-4));
    transition: transform var(--transition);
}

.app-contacts__link:hover .app-contacts__dot {
    transform: scale(1.4);
}

/* The strip of the channels: one for every page (Home too), right before the footer, over the width of the column, centred; no line above it (owner, 13.10.2026, 20.10.2026). It sits flush to the footer: padding above only, the links' own padding gives the breath below. */
.app-chanbar {
    padding: var(--space-2) 0 0;
}

.app-chanbar .app-contacts {
    justify-content: center;
}

/* On a text page the row stands between the title and the text, aligned with the text edge. */
.app-site__text .app-contacts {
    margin: var(--space-3) calc(-1 * var(--space-3));
}

/* Touch target: a channel link is at least --field tall; the text keeps its size (core.md §19.1). */
@container (max-width: 719px) {
    .app-contacts__link {
        min-height: var(--field);
    }
}

/* The follow block (KDR-224, KDR-225: About, Contacts, the band before the footer): the character with a mug on the left, to its right two lines — «Follow me» with an arrow
   that bends down to the second line, and the channels; on a phone the character stands above the two lines. */
.app-follow {
    /* The character is 1.4 times the height of the two lines beside it (two lines of text and the padding of the channels' links): at 1.0 the mug was hard to make out (owner, 20.10.2026). One place for the band, About and Contacts. */
    --follow-hero: calc(1.4 * (2 * var(--fs-site-read) * var(--lh-text) + 3 * var(--space-1)));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    margin: var(--space-4) 0 var(--space-5);
}

.app-follow__hero {
    display: block;
    flex: none;
    width: auto;
    height: var(--follow-hero);
}

.app-follow__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.app-follow__line {
    display: flex;
    align-items: flex-end;
    gap: var(--space-1);
    margin: 0;
    padding: 0 var(--space-3);
    color: var(--text-2);
    font-size: var(--fs-site-read);
    font-weight: var(--fw-medium);
    line-height: var(--lh-text);
}

.app-follow__arrow {
    flex: none;
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.app-site__text .app-follow .app-contacts {
    margin: 0;
}

@container (min-width: 720px) {
    .app-follow {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: var(--space-3);
    }

}

/* In the band the block is centred on a phone too and stands flush to the footer: no margin, the links' padding gives the breath. */
.app-chanbar .app-follow {
    align-items: center;
    margin: 0;
}

/* On a wide screen the two lines share a left edge, as on About; on a phone the stacked block is centred. */
@container (max-width: 719px) {
    .app-chanbar .app-follow__text {
        align-items: center;
    }
}

.app-chanbar .app-follow .app-contacts {
    justify-content: center;
}

/* Contacts' good-day: one line beside the character, no channels row. */
.app-site__text .app-follow:not(:has(.app-contacts)) {
    justify-content: flex-start;
    margin: var(--space-5) 0;
}
