/* Main */
:root {
  --black: #002925;
  --white: #f2f2f2;
  --green-grey: #95ada9;
  --green-900: #002925;
  --green-700: #003732; /* background */
  --green-500: #24897a; /* unselected lines */
  --green-300: #95c2bf; /* body */
  --lime-green: #a7e9a6; /* people */
  --yellow: #ffd914; /* highlight */
  --font-serif: "Big Caslon CC", "Libre Caslon Text", "DM Serif Text", serif;
  --font-sans: "DM Sans", sans-serif;
  --max-width-copy: 680px;
  --max-width-header: 1180px;
  --max-width-container: 680px;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5em;
  background: var(--green-700);
  color: var(--green-300);
  margin: 4.5rem auto;
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  font-family: var(--font-serif);
  font-size: 3.5em;
  line-height: 1.4em;
  margin-bottom: 6px;
  /* text-align: center; */
  text-wrap: balance;
}

h2 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5em;
  color: var(--white);
  /* font-family: var(--font-serif); */
  text-wrap: balance;
}

p {
  max-width: var(--max-width-copy);
  font-size: 1.125em;
  line-height: 153%;
  margin-bottom: 1.5rem;
}

a {
  color: var(--yellow);
}

a:hover {
  color: var(--white);
}

italic {
  font-style: italic;
}

.white {
  color: var(--white);
}

.container {
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  max-width: var(--max-width-container);
  padding: 0;
}

.container-fluid {
  margin: 5em auto 6em;
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* header */

header {
  display: flex;
  flex-direction: column;
  /* align-items: start; */
  color: var(--white);
  max-width: var(--max-width-header);
}

.standfirst {
  font-size: 1.25em;
  line-height: 1.5em;
  max-width: var(--max-width-header);
  margin-bottom: 0;
  color: var(--green-300);
  font-weight: 400;
  padding-bottom: 14px;
}

.byline {
  font-size: 0.875rem;
  padding-top: 0;
  color: var(--green-300);
}

/* article */

.copy {
  margin: 2.5em 0 0;
}

.about {
  font-size: 1em;
  line-height: 1.5em;
}

/* information row */

.information-row {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 2em;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin: 0 auto 1.5rem;
  max-width: var(--max-width-copy);
}

.information-row p {
  font-size: 1rem;
}

.legend-container {
  justify-content: space-around;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legend {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  width: auto;
  margin-bottom: 0;
  font-size: 1rem;
}

.legend .dot {
  font-size: 0.3em;
  color: var(--white);
}

/* visuals (info by consulate) */
.visuals-consulate {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  align-self: stretch;
  margin: 3rem auto 0 !important;
  padding: 0;
}

.visuals-consulate .information {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  width: calc(50% - 0.75rem);
  padding: 0;
}

.information p {
  margin-bottom: 0;
  /* text-wrap: balance; */
}

.icon {
  width: 1.125rem;
  display: inline-block;
  padding-right: 2px;
}

.icon img {
  width: 100%;
  height: auto;
}
.general-consulates {
  color: var(--yellow);
}
.visuals-consulate .consulate-map {
  display: flex;
  width: calc(50% - 0.75rem);
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
}

.visuals-consulate .consulate-map p {
  width: 100%;
  text-align: center;
  text-wrap: balance;
  margin-top: 3px;
  font-size: 1rem;
}

.hide {
  display: none;
}

/* area chart */

.about .graphics {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 4em;
  justify-content: space-around;
  flex-wrap: wrap;
  align-items: flex-end;
}

.graphics .graphic-summary {
  width: calc(50% - 4em);
}

#spaniards-living-abroad,
#spaniards-living-us {
  width: 100%;
  aspect-ratio: 2/1.2;
  height: auto;
}

/* footer */

footer {
  margin-top: 4rem !important;
  border-top: 1px solid var(--green-300);
  padding: 5rem 0 0 !important;
}

footer p {
  font-size: 1rem;
}

/* tablet L */
@media only screen and (max-width: 1024px) {
  body {
    margin: 4.5rem auto;
    padding: 0 2em;
  }

  .copy {
    margin: 0 0 2em;
  }

  .graphics-wrapper {
    margin: 2em auto;
  }

  .visuals-consulate {
    flex-direction: column-reverse;
    margin: 1rem auto 0 !important;
  }

  .visuals-consulate .information {
    width: 100%;
  }

  .visuals-consulate .consulate-map {
    width: 100%;
    align-items: center;
  }

  .about {
    width: 100%;
  }

  .about .graphics {
    max-width: 100%;
  }
}

/*  tablet M*/
@media only screen and (max-width: 900px) {
  body {
    margin: 4.5rem auto;
    padding: 10px;
    width: 100%;
  }

  h1 {
    font-size: 2em;
    text-wrap: balance;
  }

  .standfirst {
    font-size: 1.3em;
    text-wrap: balance;
    padding-bottom: 14px;
  }

  .information-row {
    gap: 1em;
    flex-direction: column;
    align-items: flex-start;
  }

  .about .graphics {
    flex-direction: column;
    align-items: start;
    max-width: var(--max-width-container);
  }

  .about .graphics .br {
    display: none;
  }

  .graphics .graphic-summary {
    width: 100%;
  }

  .container-fluid {
    margin: 2em auto 3em;
    padding: 0;
  }
}

/*  tablet M*/
@media only screen and (max-width: 600px) {
  body {
    margin: 2rem 0;
    padding: 10px;
    width: 100%;
  }

  h1 {
    font-size: 2em;
    text-wrap: balance;
  }

  .standfirst {
    font-size: 1.3em;
    text-wrap: balance;
    padding-bottom: 14px;
  }

  .byline {
    padding-bottom: 1rem;
  }

  .information-row {
    gap: 0.5em;
    flex-direction: column;
    align-items: center;
  }

  #spaniards-living-abroad,
  #spaniards-living-us {
    aspect-ratio: 2/2;
  }

  footer {
    margin-top: 2rem !important;
    padding: 2rem 0 0 !important;
  }

  .container-fluid {
    padding: 0;
  }
}
