:root {
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    color: #111;
    background: #000;
}

a {
    color: inherit;
}

.wrapper {
    width: min(1280px, calc(100% - 20px));
    margin: 0 auto;
}

.site-header {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: center;
    min-height: 150px;
    padding: 8px 0;
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand img {
    display: block;
    width: min(100%, 300px);
    height: auto;
    aspect-ratio: 5 / 1;
}

.site-heading {
    padding: 10px 24px;
    text-align: center;
}

.site-heading h1 {
    margin: 0 0 7px;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: 0;
}

.site-heading p {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
    padding: 9px 8px;
    color: #fff;
    background: #101010;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.main-nav > a,
.live-nav {
    padding: 3px 12px;
}

.main-nav a {
    text-decoration: none;
}

.main-nav > * + * {
    border-left: 1px solid #666;
}

.live-nav {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.online-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    background: #29c45a;
    border: 1px solid #8bf0a7;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #157732;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: #8aaae5;
    text-decoration: underline;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.site-card {
    min-width: 0;
    height: 60px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #000;
    border-radius: 6px;
}

.site-card:hover,
.site-card:focus-within {
    background: #eee;
}

.featured-card {
    border-color: #29a852;
}

.site-link {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 7px 100px 7px 5px;
    color: #000;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
}

.site-link:hover .site-name,
.site-link:focus-visible .site-name {
    text-decoration: underline;
}

.site-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url('/assets/sprite.webp');
    background-repeat: no-repeat;
}

.site-icon-image {
    object-fit: contain;
    background: none;
}

.site-name {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-copy {
    max-width: 920px;
    margin: 28px auto 8px;
    padding: 22px 20px 6px;
    color: #f2f2f2;
    border-top: 1px solid #444;
    font-size: 17px;
    line-height: 1.6;
    text-align: center;
}

.home-copy h2 {
    margin: 0 0 10px;
    color: #8aaae5;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
}

.home-copy p {
    margin: 8px auto;
}

.home-slogan {
    font-weight: 700;
}

.category-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 50px;
    padding: 4px;
    color: #000;
    background: linear-gradient(to left top, #8aaae5 0%, #fff 100%);
    border: 1px solid #d00000;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.content-page {
    max-width: 820px;
    min-height: 260px;
    margin: 18px auto 30px;
    padding: 20px 24px;
    color: #111;
    background: #fff;
    border-radius: 6px;
    font-size: 17px;
    line-height: 1.6;
}

.content-page h2 {
    margin: 24px 0 6px;
    font-size: 21px;
    letter-spacing: 0;
}

.about-lead {
    margin-top: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.content-page a,
.contact-link {
    color: #164d9b;
    font-weight: 700;
    text-decoration: underline;
}

.gallery-images {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    margin: 18px 0;
}

.gallery-images img {
    display: block;
    width: auto;
    max-width: calc(50% - 7px);
    height: auto;
}

.site-footer {
    padding: 24px 10px 22px;
    color: #ddd;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.site-footer p {
    margin: 5px auto;
}

.site-footer a {
    font-weight: 700;
}

@media (max-width: 1023px) {
    .site-header {
        grid-template-columns: 1fr;
    }

    .brand {
        justify-content: center;
    }

    .site-heading {
        padding: 10px 12px 16px;
    }

    .directory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header {
        min-height: 0;
    }

    .directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479px) {
    .wrapper {
        width: min(100% - 16px, 1280px);
    }

    .site-heading h1 {
        font-size: 22px;
    }

    .main-nav {
        font-size: 13px;
    }

    .main-nav > a,
    .live-nav {
        padding: 5px 7px;
        border: 0 !important;
    }

    .directory-grid {
        grid-template-columns: 1fr;
    }

    .content-page {
        padding: 16px;
    }

    .home-copy {
        margin-top: 22px;
        padding: 18px 8px 4px;
        font-size: 16px;
        text-align: left;
    }

    .home-copy h2 {
        font-size: 21px;
    }
}
