body{
    background-color: ivory; /* cornsilk, ivory, ghostwhite, */
    margin: 0;
    padding: 0 16px;
}

#wrapper1, #wrapper2, #wrapper3 {
    width: 100%;
    max-width: 1000px;
    height: auto;
    margin: 0 auto;
    display: grid;
    justify-content: center;
    box-sizing: border-box;
}

.buttons_wrapper{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#buttons_wrapper_1, #buttons_wrapper_2, #buttons_wrapper_3 {
    width: 100%;
    max-width: 900px;
}

button{
    border: 1px solid #888;
    background-color: lavender;
    color: #333;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.16s ease;
    margin: 8px 4px;
    font-family: "Quattrocento Sans";
    font-size: 14px;
}

button:hover{
    background-color: aquamarine;
}

#chart_wrapper_1, #chart_wrapper_2, #chart_wrapper_3 {
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    height: auto;
    min-height: unset;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

/* Let every chart's SVG scale to its container instead of staying pixel-fixed */
#chart_wrapper_1 svg, #chart_wrapper_2 svg, #chart_wrapper_3 svg {
    width: 100%;
    /* min-height: 400px; */
    height: auto;
    display: block;
}

h1{
    text-align: center;
    font-family: "Merriweather";
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    padding: 0 8px;
}

h2{
    margin-top: 30px;
    margin-bottom: 7px;
    font-family: "Viga";
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    /* text-align: center; */
}

p{
    margin-top: 3px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 800px;
    font-family: "Ruda";
}

.description{
    margin-top: 3px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 800px;
    font-family: "Ruda";
}

.categories-legend{
    margin-top: 3px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 800px;
    font-family: "Ruda";
        display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

span.support {
  display: inline-block;
  margin: 2px 1px;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 0.85rem;
}

.region-africa { background-color: #4E79A7;}
.region-asia { background-color: #E15759;}
.region-americas { background-color: #F28E2C;}
.region-europe { background-color: #76B7B2;}
.region-oceania { background-color: #59A14F;}

.north-america{ background-color: #66C2A5; }
.europe{ background-color: #FC8D62; }
.oceania{ background-color: #8DA0CB; }
.latin-america{ background-color: #FFD92F; }
.ssasia{ background-color: #E5C494; }
.sub-saharan-africa{ background-color: #B3B3B3;}
.east-asia{ background-color: #A6D854; }
.mena{ background-color: #E78AC3;}

.data{
    display: flex;
    justify-content: center;
    margin-top: 10px;
    text-align: center;
}

/* --- Mobile tweaks --- */
@media (max-width: 600px) {
  button{
    font-size: 13px;
    padding: 5px 10px;
    margin: 6px 3px;
  }
  .description, p {
    font-size: 0.9rem;
  }
  span.support {
    font-size: 0.75rem;
  }
}