/* Public site: the header — the KADOR mark and the menu. */

.app-site-head {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.app-site-head__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

/* The mark is a logo, so it stays in capitals (rules.md §1.2); the small one is the footer's. */
.app-brand {
    /* The plate's vertical padding is a variable: the touch zone on a phone is derived from it. */
    --brand-pad: var(--inset-mark);
    padding: var(--brand-pad) var(--space-1);
    border-radius: var(--radius-glyph);
    background: var(--accent);
    color: var(--surface);
    font-size: var(--fs-site-read);
    font-weight: var(--fw-bold);
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
}

/* The mark is a link home: the link hover colour of base.css would dim the letters on the accent. */
.app-brand:hover {
    color: var(--surface);
    text-decoration: none;
}

.app-brand--sm {
    --brand-pad: 2px;
    padding: var(--brand-pad) var(--space-half);
    font-size: var(--fs-site-label);
}

.app-site-nav {
    display: flex;
    gap: var(--space-5);
    font-size: var(--fs-site-read);
}

.app-site-nav a {
    color: var(--text-2);
}

.app-site-nav a:hover {
    color: var(--text);
    text-decoration: none;
}

/* The current item is painted with the accent (owner, 13.10.2026: the grey-to-black step was hardly seen); the weight stays, so the row does not shift. */
.app-site-nav a[aria-current] {
    color: var(--accent);
}

@container (max-width: 719px) {
    .app-site-nav {
        gap: var(--space-3);
    }
}

/* Touch target: the items grow to --field tall by padding-free min-height; the text keeps its size (core.md §19.1). */
@container (max-width: 719px) {
    .app-site-nav a {
        display: flex;
        align-items: center;
        min-height: var(--field);
    }
}

/*
 * Touch target of the mark: the link is --field tall, the accent badge keeps its look: the transparent border
 * is the zone around it, background-clip stops the paint at the padding box (core.md §19.1).
 */
@container (max-width: 719px) {
    .app-brand {
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
        min-height: var(--field);
        /* The zone is what is missing to --field around the plate (line-height 1.4 is set above): both sizes come out --field. */
        --brand-zone: calc((var(--field) - 1.4em - 2 * var(--brand-pad)) / 2);
        border-block: var(--brand-zone) solid transparent;
        background-clip: padding-box;
        /* The vertical radius grows by the border, so the painted padding box keeps the original corner. */
        border-radius: var(--radius-glyph) / calc(var(--radius-glyph) + var(--brand-zone));
    }
}
