/* Layout overlay for the public Header/RootLayout in Hemmelig v7.4.8. */
header:has(> div > .text-center > h1) {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

header:has(> div > .text-center > h1) > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
}

/* Keep the existing DOM and links, arranging the logo between navigation. */
header:has(> div > .text-center > h1) > div > :first-child,
header > div > .text-center:has(> h1) {
    display: contents;
}

header:has(> div > .text-center > h1) > div > :first-child > a {
    grid-area: 1 / 1;
    justify-self: start;
}

header:has(> div > .text-center > h1) > div > :first-child > div {
    grid-area: 1 / 3;
    justify-self: end;
}

header > div > .text-center:has(> h1) > :first-child {
    grid-area: 1 / 2;
    margin-bottom: 0;
}

header > div > .text-center:has(> h1) > :first-child img,
header > div > .text-center:has(> h1) > :first-child svg {
    height: 2.25rem;
    max-width: 4.5rem;
    object-fit: contain;
}

header > div > .text-center > h1 {
    grid-area: 2 / 1 / auto / -1;
    margin: 0.75rem 0 0;
    text-align: center;
}

header > div > .text-center:has(> h1) > p {
    grid-area: 3 / 1 / auto / -1;
    margin-top: 0.375rem;
    text-align: center;
}

/* Public home/request form wrappers beneath the shared header. */
header:has(> div > .text-center > h1) + main > div.py-6 {
    padding-top: 1rem;
}

@media (min-width: 640px) {
    header > div > .text-center:has(> h1) > :first-child img,
    header > div > .text-center:has(> h1) > :first-child svg {
        height: 3.5rem;
        max-width: 7rem;
    }
}
