* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial;
    background: #f4f6f8;
    text-align: center;
    height: 100vh;
    overflow-y: auto;
}

#layout {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    height: calc(100% - 50px);
    padding: 0 60px;
}
h2{
    height: 50px;
    padding: 15px;
}
h3{
    padding: 10px;
    width: 100%;
    text-align: center;
}
svg {
  width: 100%;    
  height: auto;      
}
ul{
    padding: 10px;
    padding-left: 20px;
}
.state {
    fill: #d9d9d9;
    stroke: #333;
    stroke-width: .5;
    cursor: pointer;
    transition: .3s;
}

.state:hover {
    stroke: #eb0505;
    stroke-width: 2;
}

.visited {
    fill: #4caf50;
}

.capital {
    fill: #1976d2;
}

.label {
    font-size: 16px;
    text-anchor: middle;
    pointer-events: none;
}

.capitalPin {
    fill: #0d47a1;
    stroke: white;
    stroke-width: 1.5;
    opacity: .35;
    transition: opacity .2s, r .2s;
    cursor: pointer;
    transition: opacity .2s, r .15s ease-out;
    pointer-events: none;
}

.capitalPin:hover {
    opacity: 1;
    r: 7;
}

.capitalVisible {
    opacity: 1;
}

#sidebar {
    width: 420px;
    height: 95%;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    text-align: left;
    overflow-x: hidden;
    overflow-y: auto;
}li{
    padding: 2px 0;
}
li:hover {
    color: #1976d2;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    #layout {
        flex-direction: column;
        align-items: center;
    }

    #map {
        width: 100vw;
        aspect-ratio: 2/5;
        padding-top: 15px;
    }

    #sidebar {
        width: 95vw;
        margin-bottom: 5px;
    }

    li {
        padding: 8px 0;
        font-size: 16px;
    }
}