.insight-rows {
  --chart-ink: #88bdff;
  --chart-track: #555c65;
  --chart-label: #b6bac3;
  background: #000;
  color: #f5f5f7;
}

.insight-row {
  --copy-shift: -1.8rem;
  --plot-shift: 1.8rem;
  overflow: clip;
  border-top: 1px solid #292a2d;
}

.insight-row:nth-child(even) {
  --copy-shift: 1.8rem;
  --plot-shift: -1.8rem;
}

.insight-row-inner {
  width: min(76rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  padding-block: clamp(4.25rem, 8.5vw, 8rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "copy plot";
  align-items: center;
  gap: clamp(2.5rem, 8vw, 8rem);
}

.insight-row:nth-child(even) .insight-row-inner {
  grid-template-areas: "plot copy";
}

.insight-row-copy { grid-area: copy; }
.insight-row-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 3.7vw, 3.65rem);
  line-height: 1.13;
  font-weight: 620;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.insight-row-copy p {
  margin: 1.15rem 0 0;
  max-width: 41ch;
  color: #c7c8ce;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.insight-plot {
  grid-area: plot;
  justify-self: center;
  width: min(100%, 31rem);
  font-variant-numeric: tabular-nums;
}

.insight-plot figcaption {
  margin-top: 1.1rem;
  color: var(--chart-label);
  font-size: .875rem;
  line-height: 1.5;
  text-align: center;
}

.day-plot { display: grid; gap: .6rem; }
.day-band {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: .6rem;
  align-items: center;
  color: var(--chart-label);
  font-size: .875rem;
}

.day-cells {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: clamp(2px, .22vw, 4px);
}

.day-cells i {
  display: block;
  height: clamp(1.15rem, 2vw, 1.65rem);
  background: var(--chart-track);
  border-radius: 2px;
}

.day-cells .worked { background: var(--chart-ink); }

.token-plot {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(9rem, 1fr);
  gap: clamp(.65rem, 2vw, 1.25rem);
}

.token-plot svg { width: 100%; height: 10.5rem; fill: none; }
.token-plot .stream-0 { stroke: var(--chart-ink); }
.token-plot .stream-1 { stroke: #648bc0; }
.token-plot .stream-2 { stroke: #8790a0; }
.token-plot dl { display: grid; grid-template-rows: repeat(3, 1fr); }
.token-plot dl > div,
.preference-plot > div {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.token-plot dl > div { justify-content: space-between; }
.token-plot dt, .preference-plot dt { font-weight: 550; }
.token-plot dd { color: var(--chart-label); }

.preference-plot { display: grid; gap: 1rem; }
.preference-plot dt { min-width: 5.35rem; }
.preference-plot dd {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  font-size: .9375rem;
  color: var(--chart-label);
}

.preference-meter {
  height: .55rem;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--chart-track);
}

.preference-meter::before {
  content: "";
  display: block;
  height: 100%;
  width: calc(100% * var(--share));
  border-radius: inherit;
  background: var(--chart-ink);
  transform-origin: left;
}

.rhythm-plot { display: block; width: min(100%, 17rem); height: auto; margin-inline: auto; }
.rhythm-guide { stroke: var(--chart-track); stroke-width: 1; fill: none; }
.rhythm-rays { stroke: #808997; stroke-width: 5; stroke-linecap: round; fill: none; }
.rhythm-rays .peak-hour { stroke: var(--chart-ink); }
.rhythm-labels { font-size: 13px; fill: var(--chart-label); }
.rhythm-peak { font-size: 21px; font-weight: 600; fill: #f5f5f7; }

@media (prefers-reduced-motion: no-preference) {
  .insight-row.motion-ready { --column-arrival: 0; }
  .insight-row.motion-ready.in-view {
    --column-arrival: 1;
    transition: --column-arrival 780ms cubic-bezier(.2, .67, .28, 1);
  }

  .insight-row.motion-ready .insight-row-copy,
  .insight-row.motion-ready .insight-plot { opacity: var(--column-arrival); }
  .insight-row.motion-ready .insight-row-copy { transform: translateX(calc((1 - var(--column-arrival)) * var(--copy-shift))); }
  .insight-row.motion-ready .insight-plot { transform: translateX(calc((1 - var(--column-arrival)) * var(--plot-shift))); }
  .insight-row.motion-ready .worked { clip-path: inset(calc((1 - var(--draw-progress)) * 100%) 0 0); }
  .insight-row.motion-ready .token-plot path,
  .insight-row.motion-ready .rhythm-rays path {
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--draw-progress));
  }
  .insight-row.motion-ready .preference-meter::before { transform: scaleX(var(--draw-progress)); }
}

@media (max-width: 46rem) {
  .insight-row .insight-row-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "plot";
    gap: 2.5rem;
    padding-block: 3.75rem;
  }
  .insight-row:nth-child(even) .insight-row-inner { grid-template-areas: "copy" "plot"; }
  .insight-row-copy p { max-width: 47ch; }
  .token-plot svg { height: 8rem; }
  .rhythm-plot { width: min(100%, 14rem); }
}
