body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  padding: 12px;
  background: whitesmoke;
  color: #222;
}
@media (min-width: 680px) {
  body {
    padding: 30px;
  }
}

.text-link {
  color: #f39;
}

select, input {
  font: inherit;
  padding: 6px 10px;
  font-weight: 400;
  font-size: 0.9em;
  border: 2px solid #efefef;
  border-radius: 3px;
  display: block;
  margin: 4px 0;
  box-sizing: border-box;
}
select:focus, input:focus {
  outline: none;
  border-color: #f39;
}

button {
  font: inherit;
  font-weight: 700;
  color: white;
  background: #f39;
  padding: 10px 20px;
  border: 0;
  border-radius: 3px;
  box-sizing: border-box;
}
button:hover {
  cursor: pointer;
}

.page-title {
  text-align: center;
}

.attribution {
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.6;
}

.sorting {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.sorting button {
  margin: 6px;
  font-size: 0.9em;
}
.sorting .active {
  background: #333;
}

.search {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}
.search input {
  width: 100%;
}
@media (min-width: 680px) {
  .search input {
    width: 250px;
  }
}

.wrapper {
  max-width: 250px;
  margin: 0 auto;
}
@media (min-width: 500px) {
  .wrapper {
    max-width: 740px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 30px;
  }
}
@media (min-width: 680px) {
  .wrapper {
    padding: 0;
  }
}

.card {
  display: block;
  background: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow-x: hidden;
  margin-bottom: 20px;
}
@media (min-width: 500px) {
  .card {
    width: 46%;
    margin-bottom: 40px;
  }
}
@media (min-width: 680px) {
  .card {
    width: 30%;
    margin-bottom: 40px;
  }
}

.flag {
  background-size: 100% 100%;
  height: 125px;
  display: block;
}

.country-name {
  font-size: 0.9em;
  height: 1.6em;
  line-height: 1.6em;
  vertical-align: middle;
  margin: 0;
  text-align: center;
  padding: 5px 8px;
  background: #333;
  color: white;
}

.stats-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  font-size: 0.85em;
  margin: 4px 0;
}
.stats-table th {
  text-align: left;
  padding: 5px 8px;
}
.stats-table td {
  text-align: right;
  padding: 5px 8px;
}
.stats-table tr:nth-child(2n) {
  background-color: #efefef;
}