:root {
    --racial-bg: #0e0906;
    --racial-panel: #130b06;
    --racial-panel-deep: #0a0604;
    --racial-border: #3a1a08;
    --racial-gold: #c8922a;
    --racial-gold-lit: #e0a040;
    --racial-copy: #d8c29a;
    --racial-muted: #806747;
}

.section-content > .container,
.pagebody > .container,
.section-pageheader > .container {
    max-width: 1700px !important;
}

#racials-root,
#racials-root * {
    box-sizing: border-box;
    text-wrap: auto;
    letter-spacing: 0;
}

#racials-root {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    color: var(--racial-copy);
    font-family: 'Poppins', sans-serif;
}

#racials-factions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.racial-faction {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--racial-border);
    background: var(--racial-panel);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.racial-faction-header {
    display: flex;
    align-items: center;
    min-height: 92px;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--racial-border);
}

.racial-faction-alliance .racial-faction-header {
    background: linear-gradient(105deg, #071225 0%, #10131b 60%, #211607 100%);
    box-shadow: inset 4px 0 0 #315f9d;
}

.racial-faction-horde .racial-faction-header {
    background: linear-gradient(105deg, #250706 0%, #18100d 60%, #211607 100%);
    box-shadow: inset 4px 0 0 #90332b;
}

.racial-faction-emblem {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .65));
}

.racial-faction-header span {
    display: block;
    color: var(--racial-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.racial-faction-header h2 {
    margin: 2px 0 0;
    color: var(--racial-gold-lit);
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

.racial-races {
    min-height: 610px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background:
        radial-gradient(circle at 50% 100%, rgba(133, 55, 10, .12), transparent 46%),
        linear-gradient(180deg, var(--racial-panel) 0%, var(--racial-panel-deep) 100%);
}

.racial-race-card {
    overflow: hidden;
    border: 1px solid #42230d;
    background: rgba(8, 5, 3, .72);
}

.racial-race-heading {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .015);
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}

.racial-race-heading:hover {
    background: rgba(200, 146, 42, .055);
}

.racial-race-card.is-open .racial-race-heading {
    border-bottom: 1px solid rgba(90, 48, 14, .72);
    background: linear-gradient(90deg, rgba(79, 38, 9, .28), rgba(255, 255, 255, .012));
}

.racial-race-portrait {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border: 1px solid #694018;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .45);
}

.racial-race-title {
    min-width: 0;
    flex: 1;
}

.racial-race-name {
    display: block;
    color: var(--racial-gold-lit);
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.racial-race-count {
    display: block;
    margin-top: 2px;
    color: var(--racial-muted);
    font-size: 12px;
}

.racial-chevron {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border: 1px solid #754014;
    background: rgba(88, 39, 7, .18);
    color: var(--racial-gold-lit);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    transition: color .15s, border-color .15s, background .15s, transform .15s;
}

.racial-race-heading:hover .racial-chevron {
    border-color: var(--racial-gold);
    background: rgba(142, 69, 13, .28);
    color: #f0bd4f;
}

.racial-race-card.is-open .racial-chevron {
    color: var(--racial-gold-lit);
    transform: rotate(45deg);
}

.racial-race-details[hidden] {
    display: none;
}

.racial-list {
    display: flex;
    flex-direction: column;
}

.racial-entry {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(72, 39, 13, .58);
    transition: background .15s;
}

.racial-entry:last-child {
    border-bottom: 0;
}

.racial-entry:hover {
    background: rgba(200, 146, 42, .045);
}

.racial-entry-icon {
    width: 44px;
    height: 44px;
    border: 1px solid #5b3414;
    border-radius: 5px;
    object-fit: cover;
    background: #080503;
}

.racial-entry-body {
    min-width: 0;
}

.racial-entry-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 4px;
}

.racial-entry-title h4 {
    margin: 0;
    color: #efc65f;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
}

.racial-entry p {
    margin: 0;
    color: #c7ad7a;
    font-size: 13px;
    line-height: 1.55;
}

.racial-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 1px 7px;
    border-radius: 9px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.racial-badge-new {
    background: #623a9e;
}

.racial-badge-buff {
    background: #2d7a2d;
}

.racial-badge-reworked {
    background: #1f6b6b;
}

.racials-loading,
.racials-error {
    grid-column: 1 / -1;
    padding: 36px;
    border: 1px solid var(--racial-border);
    background: var(--racial-panel);
    color: var(--racial-muted);
    text-align: center;
}

@media (max-width: 1100px) {
    #racials-factions {
        grid-template-columns: 1fr;
    }

    .racial-races {
        min-height: 0;
    }
}

@media (max-width: 620px) {
    .racial-faction-header {
        min-height: 78px;
        padding: 11px 14px;
    }

    .racial-faction-emblem {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .racial-faction-header h2 {
        font-size: 20px;
    }

    .racial-race-heading {
        padding: 10px 12px;
    }

    .racial-chevron {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 25px;
    }

    .racial-entry {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 9px;
        padding: 10px 12px;
    }

    .racial-entry-icon {
        width: 38px;
        height: 38px;
    }

    .racial-entry-title h4 {
        font-size: 13px;
    }

    .racial-entry p {
        font-size: 12px;
    }
}
