/* Content layout overrides for the PrimeCode homepage. */
#header .content {
    width: 48rem;
}

#header .content p {
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
    line-height: 1.7;
}

#header .content .brand {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.2rem;
}

#header h1 {
    text-transform: none;
    letter-spacing: normal;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

#header .content .inner {
    max-height: 60rem;
    padding: 1.5rem 1rem;
}

#header .actions {
    flex-wrap: wrap;
    gap: 1rem;
}

#header .actions li {
    padding: 0;
}

#header nav ul li a,
.button {
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
}

#main h2.major {
    max-width: 100%;
    overflow-wrap: break-word;
}

#main h3,
#main h4 {
    text-transform: none;
    letter-spacing: normal;
}

.button {
    height: auto;
    min-height: 2.75rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    white-space: normal;
}

/* Keep the opening content and navigation within typical screen heights. */
#wrapper {
    min-height: 100svh;
    padding: 1.5rem 1rem;
}

#header {
    padding: 0;
}

#header > * {
    margin-top: 1.25rem;
}

#header > *::before {
    top: calc(-1.25rem - 1px);
    height: calc(1.25rem + 1px);
}

#header .content p,
#header h1 {
    margin-bottom: 1rem;
}

#header .content .brand {
    margin-bottom: 0.5rem;
}

@media screen and (max-width: 600px) {
    #header .logo {
        width: 3rem;
        height: 3rem;
        line-height: 3rem;
    }

    #header .content .inner {
        padding: 1rem 0.5rem;
    }

    #header .content p {
        line-height: 1.5;
    }

    #header .actions {
        gap: 0.5rem;
    }

    #header nav {
        width: 100%;
    }

    #header nav ul {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        min-width: 0;
    }

    #header nav ul li {
        grid-column: span 2;
        border-top: 0;
        border-left: solid 1px rgba(255, 255, 255, 0.5);
    }

    #header nav ul li:first-child,
    #header nav ul li:nth-child(4) {
        border-left: 0;
    }

    #header nav ul li:nth-child(n + 4) {
        grid-column: span 3;
        border-top: solid 1px rgba(255, 255, 255, 0.5);
    }

    #header nav ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        height: auto;
        padding: 0.5rem 0.25rem;
        line-height: 1.4;
    }
}

@media screen and (max-width: 600px) and (max-height: 700px) {
    #header > * {
        margin-top: 0.75rem;
    }

    #header > *::before {
        top: calc(-0.75rem - 1px);
        height: calc(0.75rem + 1px);
    }

    #header .content .inner {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    #header .content p,
    #header h1 {
        margin-bottom: 0.75rem;
    }

    #header .content .brand {
        margin-bottom: 0.25rem;
    }
}
