.conflict-page {
    --war-zone: #9d2b25;
    --belligerent: #c36f32;
    --hostilities: #4f7669;
    --mafia-conflict: #6b3f83;
    --flashpoint: #5d6f9f;
    --food-risk: #7b2d26;
    --nuclear-risk: #321016;
}

.conflict-note {
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.72em;
    line-height: 1.45;
    color: #555;
    max-width: 780px;
}

.conflict-controls-section {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 0 1rem;
}

.conflict-filters {
    display: grid;
    gap: 1rem;
    margin: 1.2rem 0 0.8rem;
}

.conflict-filters fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.conflict-filters legend {
    color: #555;
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.72em;
    line-height: 1.25;
    margin-bottom: 0.45rem;
}

.conflict-filters label {
    display: flex;
    gap: 0.35rem;
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.72em;
    line-height: 1.25;
}

.map-mode-radios,
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.25rem;
}

.map-mode-radios label,
.checkbox-grid label {
    align-items: center;
    flex-direction: row;
    white-space: nowrap;
}

.map-mode-radios input,
.checkbox-grid input {
    margin: 0;
}

.war-controls,
.alliance-controls,
.nuclear-controls {
    border-top: 1px solid var(--border-color) !important;
    margin-top: 0.35rem !important;
    padding-top: 0.85rem !important;
}

.nuclear-slider-label {
    align-items: baseline;
    justify-content: space-between;
    max-width: 680px;
}

.nuclear-slider {
    display: block;
    margin: 0.25rem 0 0;
    max-width: 680px;
    width: 100%;
}

.nuclear-debug-controls {
    border-left: 2px solid #111;
    margin-top: 0.85rem;
    max-width: 680px;
    padding-left: 0.8rem;
}

.nuclear-debug-controls .nuclear-slider-label {
    margin-top: 0.55rem;
}

.nuclear-stats {
    color: #555;
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.72em;
    line-height: 1.45;
    margin-top: 0.55rem;
    max-width: 780px;
}

.hidden-control {
    display: none;
}

.conflict-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.1rem;
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.68em;
    margin: 0.5rem 0 0.85rem;
}

.conflict-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.conflict-legend i,
.conflict-swatch {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border: 1px solid #111;
    flex: 0 0 auto;
}

.legend-war-zone,
.status-war-zone {
    background: var(--war-zone);
}

.legend-belligerent,
.status-belligerent {
    background: var(--belligerent);
}

.legend-hostilities,
.status-hostilities {
    background: var(--hostilities);
}

.legend-mafia,
.status-mafia {
    background: var(--mafia-conflict);
}

.legend-flashpoint,
.status-flashpoint {
    background: var(--flashpoint);
}

.status-food {
    background: var(--food-risk);
}

.status-nuclear {
    background: var(--nuclear-risk);
}

.conflict-map {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 1rem 0 2rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.conflict-map svg {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
    font-family: 'Gill Sans', sans-serif;
}

.conflict-map svg path,
.conflict-map svg polygon,
.conflict-map svg circle {
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}

.conflict-map svg path:hover,
.conflict-map svg polygon:hover,
.conflict-map svg circle:hover {
    stroke-width: 1.45;
}

.table-breakout {
    overflow-x: auto;
    margin: 1rem 0 2rem;
}

.conflict-table {
    min-width: 980px;
    font-size: 0.64em;
}

.conflict-table th,
.conflict-table td {
    vertical-align: top;
}

.conflict-table th:nth-child(1),
.conflict-table td:nth-child(1),
.conflict-table th:nth-child(3),
.conflict-table td:nth-child(3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.conflict-table th:nth-child(2),
.conflict-table td:nth-child(2),
.conflict-table th:nth-child(4),
.conflict-table td:nth-child(4),
.conflict-table th:nth-child(5),
.conflict-table td:nth-child(5),
.conflict-table th:nth-child(6),
.conflict-table td:nth-child(6),
.conflict-table th:nth-child(7),
.conflict-table td:nth-child(7) {
    text-align: left;
}

.conflict-table tbody tr {
    cursor: pointer;
}

.conflict-table tbody tr.selected td {
    background: rgba(17, 17, 17, 0.035);
}

.status-cell {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    white-space: nowrap;
}

.numeric-cell {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.member-list {
    max-width: 42rem;
}

.overlay-cell {
    min-width: 16rem;
}

.overlay-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
}

.overlay-chip {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    white-space: nowrap;
}

.overlay-swatch {
    border: 1px solid #111;
    display: inline-block;
    flex: 0 0 auto;
    height: 0.72rem;
    width: 0.72rem;
}

.selected-conflict {
    border-top: 1px solid #111;
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.72em;
    line-height: 1.45;
    padding-top: 0.9rem;
}

.selected-conflict dl {
    display: grid;
    grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
    gap: 0.4rem 1rem;
    margin: 0;
}

.selected-conflict dt {
    color: #555;
}

.selected-conflict dd {
    margin: 0;
}

.selected-conflict a {
    color: #111;
}

.source-section {
    margin-top: 5rem;
}

@media (min-width: 1080px) {
    .conflict-map,
    .table-breakout {
        width: calc(100% + 220px);
        margin-left: -110px;
        margin-right: -110px;
    }
}

@media (max-width: 620px) {
    .map-mode-radios,
    .checkbox-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .selected-conflict dl {
        grid-template-columns: 1fr;
    }
}
