html, body.branded {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: Outfit, BlinkMacSystemFont, -apple-system, "Segoe UI", sans-serif;
    color: #2d2d2d;
}

/* Keep layout width stable when page height changes (home vs tables etc.). */
html:has(body.branded) {
    scrollbar-gutter: stable;
}

body.branded .tabs,
body.branded .tabs a,
body.branded .button,
body.branded .dl-nav {
    font-family: Outfit, BlinkMacSystemFont, -apple-system, "Segoe UI", sans-serif;
}

/* Branded mobile nav (hamburger) — desktop keeps .tabs */
.dl-nav {
    position: relative;
}

.dl-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #dbdbdb;
}

.dl-nav-current {
    font-size: 1.05rem;
    font-weight: 600;
    color: #3273dc;
    letter-spacing: -0.01em;
    padding: 0.35rem 0;
}

.dl-nav-burger {
    margin-left: auto;
    height: 3rem;
    width: 3rem;
    color: #4a4a4a;
}

.dl-nav-burger:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dl-nav-menu {
    display: none;
    background: #fff;
    border-bottom: 1px solid #dbdbdb;
    margin: 0 0 0.5rem;
}

.dl-nav-menu.is-active {
    display: block;
}

.dl-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0 0.5rem;
}

.dl-nav-menu li a {
    display: block;
    padding: 0.7rem 0.15rem;
    color: #4a4a4a;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.dl-nav-menu li:last-child a {
    border-bottom: none;
}

.dl-nav-menu li.is-active a {
    color: #3273dc;
    font-weight: 600;
}

.dl-nav-menu li a:hover,
.dl-nav-menu li a:focus-visible {
    color: #3273dc;
}

.dl-header {
    background: #fff;
    margin: 0;
}

.dl-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px auto;
    max-width: 1600px;
    width: 100%;
    padding: 0 12px;
    flex-wrap: nowrap;
    gap: clamp(4px, 1.2vw, 18px);
    /* Fixed row box — same on every page, before images finish loading. */
    height: 180px;
    box-sizing: content-box;
}

.dl-header-inner img {
    /* Equal slots so logos don't redistribute when one image paints later. */
    flex: 1 1 0;
    width: 0;
    height: 180px;
    max-height: 180px;
    object-fit: contain;
    display: block;
}

.dl-wrap {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.dl-home {
    padding-top: 1.75rem;
    padding-left: 1.25rem;
}

.dl-branded-page {
    padding-top: 1.25rem;
    padding-left: 1.25rem;
}

.dl-entries-toolbar {
    margin: 0 0 1.25rem;
}

body.branded .dl-empty,
.dl-empty {
    font-family: Outfit, BlinkMacSystemFont, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: #8a8a8a;
    margin: 0.15rem 0 0;
}

.dl-round-switch {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
    margin: 0 0 1.35rem;
}

.dl-round-switch-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
}

.dl-round-switch .select select {
    min-width: 14rem;
    font-family: Outfit, BlinkMacSystemFont, -apple-system, "Segoe UI", sans-serif;
}

.dl-round-switch-current {
    color: #555;
    font-size: 1.02rem;
}

.dl-groups-heading {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.dl-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: flex-start;
}

body.branded .dl-groups + .dl-empty,
.dl-groups + .dl-empty {
    margin-top: 1.5rem;
}

.dl-group {
    min-width: 220px;
    max-width: 340px;
    flex: 1 1 240px;
}

.dl-group h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.dl-group .table {
    width: 100%;
}

body.branded .tn-table-wrap {
    margin-top: 0;
}

body.branded .tn-tabs {
    display: none;
}

.dl-home h1 {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #2a2a2a;
    margin: 0 0 0.4rem;
}

.dl-home .dl-season {
    color: #8a8a8a;
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0 0 1.5rem;
}

.dl-home h3 {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #2a2a2a;
    margin-top: 1.85rem;
    margin-bottom: 0.55rem;
}

.dl-home h5 {
    margin: 0.3rem 0;
    font-size: 1.08rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.dl-round-date {
    color: #363636;
}

.dl-round-date.is-featured {
    color: #5566ee;
    text-decoration: underline;
}

.dl-footer {
    padding: 2.5rem 0 0;
}

.dl-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #888;
    font-size: 0.7rem;
    text-decoration: none;
}

.dl-footer-brand img {
    height: 14px;
    width: auto;
    display: block;
    filter: grayscale(1);
    transition: filter 0.2s ease;
}

.dl-footer-brand:hover img,
.dl-footer-brand:focus-visible img {
    filter: none;
}

@media only screen and (max-width: 1600px) {
    .dl-header-inner { height: 150px; }
    .dl-header-inner img { height: 150px; max-height: 150px; }
}
@media only screen and (max-width: 1200px) {
    .dl-header-inner { height: 120px; }
    .dl-header-inner img { height: 120px; max-height: 120px; }
}
@media only screen and (max-width: 1000px) {
    .dl-header-inner { height: 100px; }
    .dl-header-inner img { height: 100px; max-height: 100px; }
}
@media only screen and (max-width: 800px) {
    .dl-header-inner { height: 80px; }
    .dl-header-inner img { height: 80px; max-height: 80px; }
}
@media only screen and (max-width: 600px) {
    .dl-header-inner {
        margin-top: 12px;
        margin-bottom: 12px;
        height: auto;
        min-height: 48px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .dl-header-inner img {
        flex: 0 1 calc(25% - 8px);
        width: auto;
        height: 48px;
        max-height: 48px;
    }
    .dl-home {
        padding-top: 1.1rem;
    }
    .dl-home h1 {
        font-size: 1.35rem;
    }
}

/* ── Deblowa Liga: winner + podium branding ── */
body.branded {
    --dl-blue: #1d6fa5;
    --dl-blue-deep: #134e75;
    --dl-teal: #3d9a9a;
    --dl-teal-deep: #2a6b6b;
    --dl-sky: #7ba3c4;
    --dl-sky-deep: #3d5a73;
}

/* Match / player results — winner in logo blue */
body.branded .tn-matches-table .winner,
body.branded .winner {
    background-color: #d6ebf5 !important;
    border-left-color: var(--dl-blue);
}

body.branded .tn-matches-table .winner a,
body.branded .winner a {
    color: var(--dl-blue-deep) !important;
}

body.branded .tn-matches-table .both,
body.branded .both {
    background-color: #e8f4f4 !important;
    border-left-color: var(--dl-teal);
}

body.branded .tn-matches-table .both a,
body.branded .both a {
    color: var(--dl-teal-deep) !important;
}

@media (max-width: 768px) {
    body.branded .tn-matches-table .tn-col-p1.winner,
    body.branded .tn-matches-table .tn-col-p2.winner {
        background-color: #d6ebf5 !important;
    }

    body.branded .tn-matches-table .tn-col-p1.winner a,
    body.branded .tn-matches-table .tn-col-p2.winner a {
        color: var(--dl-blue-deep) !important;
    }

    body.branded .tn-matches-table .tn-col-p1.both,
    body.branded .tn-matches-table .tn-col-p2.both {
        background-color: #e8f4f4 !important;
    }

    body.branded .tn-matches-table .tn-col-p1.both a,
    body.branded .tn-matches-table .tn-col-p2.both a {
        color: var(--dl-teal-deep) !important;
    }
}

/* Standings 1 / 2 / 3 — blue / teal / sky from logo palette */
body.branded .tn-table-wrap .table tbody tr.medal-gold {
    background: #d6ebf5 !important;
    border-left-color: var(--dl-blue);
}

body.branded .tn-table-wrap .table tbody tr.medal-gold:hover {
    background: #c2e0f0 !important;
}

body.branded .tn-table-wrap .table tbody tr.medal-gold td {
    color: var(--dl-blue-deep);
}

body.branded .medal-gold .medal-icon {
    color: var(--dl-blue);
}

body.branded .tn-table-wrap .table tbody tr.medal-silver {
    background: #e4f4f4 !important;
    border-left-color: var(--dl-teal);
}

body.branded .tn-table-wrap .table tbody tr.medal-silver:hover {
    background: #d2ebeb !important;
}

body.branded .tn-table-wrap .table tbody tr.medal-silver td {
    color: var(--dl-teal-deep);
}

body.branded .medal-silver .medal-icon {
    color: var(--dl-teal);
}

body.branded .tn-table-wrap .table tbody tr.medal-bronze {
    background: #eef3f7 !important;
    border-left-color: var(--dl-sky);
}

body.branded .tn-table-wrap .table tbody tr.medal-bronze:hover {
    background: #e0e8ef !important;
}

body.branded .tn-table-wrap .table tbody tr.medal-bronze td {
    color: var(--dl-sky-deep);
}

body.branded .medal-bronze .medal-icon {
    color: var(--dl-sky);
}

body.branded .tn-table-wrap .table tbody td a:hover {
    color: var(--dl-blue);
}
