*,
*::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-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: "Archivo Narrow", sans-serif;

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

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

  --color-white: #fff;
  --color-black: #000;
  --color-neutral-50: #f6f2ec;
  --color-neutral-100: #f1ebe1;
  --color-neutral-200: #e4d5be;
  --color-neutral-300: #cdbda2;
  --color-neutral-400: #b1a48c;
  --color-neutral-500: #958975;
  --color-neutral-600: #776d5d;
  --color-neutral-700: #5a5245;
  --color-neutral-800: #3d372e;
  --color-neutral-900: #211e18;
  --color-neutral-950: #13110d;

  --color-bg: var(--color-neutral-50);
  --color-text: var(--color-neutral-950);
  --color-text-muted: var(--color-neutral-800);
}

body {
  font-family: var(--font-family);
  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-size: var(--font-size-5xl);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height-title);
  text-transform: uppercase;
  text-align: end;
}

main {
  margin-block: 4rem;
}

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

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

.header {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 4rem;
  align-items: center;
  justify-content: center;
  margin-block-start: calc(
    50svh - var(--font-size-5xl) * var(--line-height-title) * 3
  ); /* Align the end of the the title to around the half screen height */
}

.header p {
  font-size: var(--font-size-lg);
  flex-basis: 40ch;
  text-wrap: pretty;
}

.sticky {
  background-color: var(--color-bg);
  padding-block: 1rem;
  position: sticky;
  top: 0;
}

.footer {
  color: var(--color-text-muted);
  margin-block-end: 50vh;
}

.swatches {
  --min-width: 100px;
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, var(--min-width)), 1fr)
  );
  gap: 0.25rem 1rem;
}

.swatch {
  --strip-width: 8px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-title);
  padding: 0.1em 0.4em 0.1em calc(0.4em + var(--strip-width));
  border: 1px solid var(--color-bg);
  background-color: color-mix(in srgb, var(--color-swatch) 50%, transparent);
  color: var(--color-text);
}

.swatch::before {
  content: "";
  position: absolute;
  width: var(--strip-width);
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--color-swatch);
}

.swatch__icon {
  width: 20px;
  height: 20px;
}

.swatch__icon > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sorted-stream-graph {
  font-variant-numeric: tabular-nums;
}

.sorted-stream-graph > svg {
  overflow: visible;
}

.sorted-stream-graph .axis {
  font-family: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.sorted-stream-graph .stream {
  mix-blend-mode: multiply;
}

.sorted-stream-graph .indicator__line {
  stroke: var(--color-text);
  stroke-width: 1.5px;
}

.sorted-stream-graph .indicator__annotation {
  height: 100%;
}

.sorted-stream-graph .indicator__annotation > * {
  font-size: var(--font-size-md);
  background-color: var(--color-text);
  color: var(--color-white);
  padding: 0.1em 0.4em;
  width: fit-content;
  text-align: center;
}
