/*
 * Public site: the page of a product — its head (mark, name, status, type) and the plans. The plan marked
 * as recommended gets a gold edge and the sign of rec.css (rules.md §2.3); the edge is a mark, not an action.
 */

.app-prodhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-2);
    margin-bottom: var(--space-3);
}

/* The title is a step down the scale from the title of a page, so the mark and the capitals of the name hold one line (owner, 13.10.2026; D-027). */
.app-prodhead .app-article__title {
    margin: 0;
    font-size: var(--fs-value);
}

/* The line box of a heading holds more room under the capitals than over them, so the mark centred on the box sits high: it steps down to the middle of the capitals (checked at 28px: the centres differ by 0.5px). */
.app-prodhead > .app-pmark {
    margin-top: var(--space-0);
}

/* The plans stand in columns of equal width, one column per plan (two, three or four); on a phone they fold into one. */
.app-plans {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: var(--space-3);
    margin: 0;
    padding: var(--space-1) 0 0;
    list-style: none;
}

/* A column shows the sign, the name, the price and the text only; the plans carry no buttons (D-031), the one button of the product stands under the block. */
.app-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-3) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.app-plan--rec {
    border-color: var(--gold-strong);
}

/* The sign sits on the top edge like a tab, so the names of all the columns stay on one line. */
.app-plan .app-rec {
    position: absolute;
    top: 0;
    left: var(--space-3);
    padding: 0 var(--space-1);
    background: var(--surface);
    transform: translateY(-50%);
}

.app-plan__name {
    font-weight: var(--fw-semibold);
}

.app-plan__price {
    font-size: var(--fs-value);
    font-variant-numeric: var(--numeric);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.02em;
    line-height: var(--lh-tight);
}

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

@container (max-width: 719px) {
    .app-plans {
        grid-auto-flow: row;
        gap: var(--space-4);
    }
}

/* The top of the page: the head, the tagline and the line of the dates. */
.app-prodtop {
    margin-bottom: var(--space-2);
}

.app-prodtop .app-article__lead {
    margin-bottom: var(--space-0);
}

.app-prodtop .app-article__meta {
    margin-bottom: 0;
}

/* The cover under the description (the card view); the picture keeps its own proportions. */
.app-prodcover {
    display: block;
    width: 100%;
    height: auto; /* the height attribute reserves the box; the ratio below draws it */
    aspect-ratio: 16 / 9;
    object-fit: contain;
    margin-bottom: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

/* The line under the plans: the terms pages, wrapping on a narrow screen. */
.app-linkrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-4);
    margin-top: var(--space-3);
    color: var(--text-3);
    font-size: var(--fs-site-read);
}

/* The plate of the owner's preview: a draft is shown to the owner only. */
.app-preview {
    margin-bottom: var(--space-4);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-control);
    background: var(--scale-warn-1);
    color: var(--scale-warn-4);
    font-size: var(--fs-site-read);
    font-weight: var(--fw-medium);
}

/* Touch target: the terms links under the plans are at least --field tall, the row does not shrink their zones (core.md §19.1). */
@container (max-width: 719px) {
    .app-linkrow a {
        display: inline-flex;
        align-items: center;
        min-height: var(--field);
    }
}
