*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  -webkit-font-smoothing: antialiased;
}

svg,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  color: currentColor;
}

:root {
  --font-size-7xl: 5.96rem;
  --font-size-6xl: 4.768rem;
  --font-size-5xl: 3.815rem;
  --font-size-4xl: 3.052rem;
  --font-size-3xl: 2.441rem;
  --font-size-2xl: 1.953rem;
  --font-size-xl: 1.563rem;
  --font-size-lg: 1.25rem;
  --font-size-md: 1rem;
  --font-size-sm: 0.8rem;

  --font-family-serif: "Noto Serif", serif;
  --font-family-sans: "Noto Sans", sans-serif;

  --font-weight-body: 400;
  --font-weight-title: 700;
  --font-weight-h1: 900;

  --line-height-title: 1.2;
  --line-height-body: 1.5;

  --color-bg: #fbf8f3;
  --color-text: #314158;
  --color-border: #ffffff;
  --color-accent: #f5c077;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1 {
  font-family: var(--font-family-serif);
  font-size: var(--font-size-6xl);
  line-height: var(--line-height-title);
  font-weight: var(--font-weight-h1);
}

h1 + p {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-title);
}

.intro {
  margin-block-start: 2rem;
  font-size: var(--font-size-lg);
}

main {
  margin-block: 4rem;
}

article {
  width: min(100% - 2rem, 64rem);
  margin-inline: auto;
}

article > * + * {
  margin-block-start: 4rem;
}

.intro > * + * {
  margin-block-start: 1rem;
}

.land,
.border {
  fill: none;
  stroke: var(--color-border);
  stroke-linejoin: round;
  stroke-linecap: round;
}

.rank__circle {
  fill: var(--color-accent);
}

.rank__value {
  fill: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-title);
}

.bar__value {
  fill: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-title);
}

.bar__label__city,
.bar__label__state {
  fill: var(--color-text);
  font-size: var(--font-size-md);
}

.bar__label__city {
  font-weight: var(--font-weight-title);
}

.bar-title {
  font-size: var(--font-size-md);
  fill: var(--color-text);
  font-weight: var(--font-weight-title);
}

@media (max-width: 60rem) {
  h1 {
    font-size: var(--font-size-5xl);
  }

  h1 + p {
    font-size: var(--font-size-3xl);
  }
}

/* https://cssloaders.github.io/#objects */
.loader {
  --color-1: #f5c077;
  --color-2: #314158;
  --color-3: rgba(0, 0, 0, 0.1);
  --size: 1.5px;

  transform: translateZ(calc(1 * var(--size)));
  display: flex;
  justify-content: center;
  margin-block: 120px;
}
.loader:after {
  content: "$";
  display: inline-block;
  width: calc(48 * var(--size));
  height: calc(48 * var(--size));
  border-radius: 50%;
  text-align: center;
  line-height: calc(40 * var(--size));
  font-size: calc(32 * var(--size));
  font-weight: bold;
  background: var(--color-1);
  color: var(--color-2);
  border: calc(4 * var(--size)) double;
  box-sizing: border-box;
  box-shadow: calc(2 * var(--size)) calc(2 * var(--size)) calc(2 * var(--size))
    calc(1 * var(--size)) var(--color-3);
  animation: coin-flip 4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
@keyframes coin-flip {
  0%,
  100% {
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);
  }
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(1800deg);
    animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);
  }
  100% {
    transform: rotateY(3600deg);
  }
}
