@font-face {
  font-family: "HND";
  src: url("fonts/HelveticaNowProDisplayLight.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "HNT";
  src: url("fonts/HelveticaNowProTextLight.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "HNT";
  src: url("fonts/HelveticaNowProTextLightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "HNT";
  src: url("fonts/HelveticaNowProTextMedium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ground: #1f1f1f;
  --raised: #262626;
  --rule: #3a3a3a;
  --white: #ffffff;
  --muted: #868686;
  --accent: #f45944;
  --teal: #81c1c0;
  --blue: #7ea3ff;

  --font-sans: "HNT", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "HND", "HNT", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-h1: clamp(2.8271rem, 2.3042rem + 2.3242vw, 5.7905rem);
  --text-h2: clamp(1.9994rem, 1.7392rem + 1.1562vw, 3.4736rem);
  --text-h3: clamp(1.414rem, 1.2958rem + 0.5253vw, 2.0838rem);
  --text-body: clamp(1rem, 0.9559rem + 0.1961vw, 1.25rem);

  --gutter: clamp(20px, 4vw, 60px);
  --section: clamp(70px, 9vw, 160px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ground);
}

body {
  margin: 0;
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.225;
  letter-spacing: -1px;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

.wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 300;
  margin: 0;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.13;
}

p {
  margin: 0;
}

em {
  font-style: italic;
}

strong {
  font-weight: 500;
  letter-spacing: -0.9px;
}

.label {
  color: var(--muted);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.wordmark {
  height: 22px;
  width: auto;
}

.hero {
  padding-top: clamp(60px, 10vw, 180px);
  padding-bottom: var(--section);
  display: grid;
  gap: 40px;
}

.lede {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: 1.13;
  letter-spacing: 0;
  color: var(--muted);
  max-width: 34ch;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 2fr;
    gap: 40px;
  }
}

.prose {
  display: grid;
  gap: 1em;
  max-width: 60ch;
}

.intro {
  padding-bottom: var(--section);
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  padding-bottom: var(--section);
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 40px 30px 40px 0;
  border-bottom: 1px solid var(--rule);
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-value .vs {
  font-size: var(--text-body);
  color: var(--muted);
  letter-spacing: -1px;
  vertical-align: middle;
}

.stat-accent .stat-value {
  color: var(--accent);
}

.stat-label {
  font-weight: 500;
  letter-spacing: -0.9px;
}

.stat-note {
  color: var(--muted);
}

.chart-section {
  padding-bottom: var(--section);
  display: grid;
  gap: 30px;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}

.chart-head > div:first-child {
  display: grid;
  gap: 20px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
}

.toggle button {
  font: inherit;
  letter-spacing: inherit;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 200ms, background-color 200ms;
}

.toggle button:hover {
  color: var(--white);
}

.toggle button[aria-pressed="true"] {
  background: var(--white);
  color: var(--ground);
}

.chart {
  position: relative;
  width: 100%;
}

.chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.axis text {
  fill: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: -0.3px;
}

.axis path,
.axis line {
  stroke: var(--rule);
}

.gridline line {
  stroke: var(--rule);
  stroke-dasharray: 2 4;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: -0.4px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.legend i.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend i.dash {
  background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px);
}

.explain {
  padding-top: 20px;
}

.tooltip {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  max-width: 360px;
  background: var(--white);
  color: var(--ground);
  border-radius: 6px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms, transform 150ms;
}

.tooltip.show {
  opacity: 1;
  transform: none;
}

.tooltip h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: -0.4px;
}

.tooltip .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.tooltip .muted {
  color: #636363;
}

.tooltip .group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #dfdfdf;
}

.tooltip .group-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.tooltip .converted .group-title {
  color: #2f8584;
}

.tooltip .lost .group-title {
  color: #d23f2b;
}

.tooltip .item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.tooltip .item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insights {
  padding-bottom: var(--section);
  display: grid;
  gap: 30px;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}

.insight-list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  counter-reset: insight;
  display: grid;
  gap: 0;
}

.insight-list li {
  counter-increment: insight;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  padding: 35px 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 768px) {
  .insight-list li {
    grid-template-columns: 60px 1fr 1.4fr;
    gap: 40px;
  }
}

.insight-list li::before {
  content: counter(insight, decimal-leading-zero);
  color: var(--muted);
}

.insight-list p {
  color: var(--muted);
  max-width: 55ch;
}

.insight-list strong {
  color: var(--white);
}

.method {
  padding-bottom: var(--section);
  display: grid;
  gap: 30px;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px 40px;
  margin-top: 30px;
}

@media (min-width: 768px) {
  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .method-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.method-grid > div {
  display: grid;
  align-content: start;
  gap: 15px;
}

.method-grid p {
  color: var(--muted);
}

.foot {
  padding-top: 40px;
  padding-bottom: 60px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}
