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

* {
  margin: 0;
  padding: 0;
}

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

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

ul,
ol {
  list-style: none;
}

a {
  color: currentColor;
}

:root {
  --font-family: "Oswald", sans-serif;

  --font-size-sm: 0.8rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.563rem;
  --font-size-2xl: 1.953rem;
  --font-size-3xl: 2.441rem;
  --font-size-4xl: 3.052rem;
  --font-size-5xl: 3.815rem;

  --font-weight-bold: 700;
  --font-weight-normal: 400;

  --color-white: #ffffff;
  --color-black: #2d2d2d;
  --color-primary: #e3e9ed;
  --color-accent: #d13135;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--color-black);
  background-color: var(--color-white);
}

main {
  width: min(100% - 4rem, 75rem);
  margin: 4rem auto;
}

main > * + * {
  margin-block-start: 2rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 4rem;
}

h1 {
  line-height: 1;
  display: grid;
  text-transform: uppercase;
  width: min-content;
}

h1 > * {
  padding: 0.125em 0.25em 0.2em;
}

h1 > :nth-child(1),
h1 > :nth-child(3) {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-normal);
  background-color: var(--color-primary);
}

h1 > :nth-child(1) {
  justify-self: flex-start;
  transform: translateY(0.125em);
}

h1 > :nth-child(3) {
  justify-self: flex-end;
  transform: translateY(-0.25em);
}

h1 > :nth-child(2) {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  background-color: var(--color-accent);
  transform: rotate(-5deg);
  z-index: 1;
}

header > div {
  max-width: 50ch;
}

header > div > p + p {
  margin-block-start: 0.5em;
}

header strong {
  font-weight: var(--font-weight-bold);
}

.map .state {
  fill: var(--color-primary);
  stroke: var(--color-white);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map .spike,
.legend .tick__path {
  fill: var(--color-black);
  fill-opacity: 0.8;
  mix-blend-mode: multiply;
}

.legend .legend__title {
  fill: currentColor;
}

.legend .legend__base {
  stroke: currentColor;
}

.legend .tick__text {
  font-size: var(--font-size-md);
}

.annotation {
  pointer-events: none;
  user-select: none;
}

.annotation__link {
  stroke: var(--color-accent);
}

.annotation__content {
  display: flex;
  flex-direction: column;
  font-size: var(--font-size-md);
  line-height: 1;
}

.annotation__content[data-align="start"] {
  align-items: flex-start;
}

.annotation__content[data-align="end"] {
  align-items: flex-end;
}

.annotation__name {
  color: var(--color-white);
  background-color: var(--color-accent);
  padding: 0.125em 0.25em 0.2em;
  text-transform: uppercase;
}

.annotation__value {
  color: var(--color-black);
  padding: 0.125em 0.25em 0.2em;
}
