/* The Revenue page (/sites/{id}/revenue): the overview, path to purchase and lifetime
   value by first source. Tokens are tokens.css: money is coral, what visitors did is the
   visitors' blue (violet in dark). The flow chart's five tones are a categorical set
   checked for colour-blind separation on both surfaces; a sixth source and "Other" share
   a quiet grey, and every flow is also named in its label, the phone list and the table.
   Motion: numbers tick (the page script), bars grow from their baseline, flows draw in
   left to right; nothing moves for prefers-reduced-motion. Boxes hold their size, so a
   period change never shifts the page. */

.rv {
  --flow-1: #3b78d8;
  --flow-2: #e8708a;
  --flow-3: #d39a2c;
  --flow-4: #8b5cf6;
  --flow-5: #2a9d8f;
  --flow-other: #b3b9c5;
  --flow-alpha: .5;
}

:where(:root[data-theme="dark"]) .rv {
  --flow-1: #4f8ef0;
  --flow-2: #e0607a;
  --flow-3: #b97f1a;
  --flow-4: #9d6bff;
  --flow-5: #22a08f;
  --flow-other: #4a4a4a;
  --flow-alpha: .55;
}

@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .rv {
    --flow-1: #4f8ef0;
    --flow-2: #e0607a;
    --flow-3: #b97f1a;
    --flow-4: #9d6bff;
    --flow-5: #22a08f;
    --flow-other: #4a4a4a;
    --flow-alpha: .55;
  }
}

.rv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.rv-sprite-host {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.rv-swap {
  transition: opacity .2s ease;
}

.rv-swap[aria-busy="true"] {
  opacity: .55;
}

/* Panels */

.rv-panel {
  margin-top: 16px;
  padding: 22px 24px;
}

.rv-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 16px;
}

.rv-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.rv-sub {
  color: var(--muted);
  font-size: 13.5px;
}

.rv-foot {
  margin-top: 16px;
  max-width: 82ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rv-link {
  color: var(--revenue-ink);
  font-weight: 600;
  white-space: nowrap;
}

.rv-empty-text {
  padding: 18px 0 6px;
  max-width: 70ch;
  color: var(--muted);
}

.rv-connect {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 28px;
}

.rv-connect-text {
  max-width: 64ch;
  color: var(--ink-2);
}

/* The four numbers */

.rv-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 -24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rv-kpi {
  min-width: 0;
  padding: 16px 24px 14px;
  border-left: 1px solid var(--line-2);
}

.rv-kpi:first-child {
  border-left: 0;
}

.rv-kpi-label {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.rv-kpi-value {
  margin: 2px 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rv-kpi-value.rv-money {
  color: var(--revenue-ink);
}

.rv-change {
  display: flex;
  flex-wrap: wrap;
  gap: 0 5px;
  min-height: 1.45em;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.45;
}

.rv-change .amount {
  font-weight: 600;
}

.rv-change.up {
  color: var(--live-ink);
}

.rv-change.down {
  color: var(--down);
}

.rv-change.none .amount,
.rv-change.flat .amount {
  font-weight: 400;
}

.rv-change .versus {
  color: var(--faint);
}

.rv-kpi-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

/* Revenue per day */

.rv-chart-box {
  min-height: 286px;
}

.rv-chart {
  --gutter: 48px;
  position: relative;
  padding-top: 22px;
}

.rv-plot {
  position: relative;
  height: 230px;
  margin-left: var(--gutter);
}

.rv-grid,
.rv-bars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rv-grid {
  pointer-events: none;
}

.rv-grid-line {
  stroke: var(--line-2);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.rv-grid-line.base {
  stroke: var(--line);
}

.rv-grid-label {
  fill: var(--faint);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.rv-bar {
  fill: var(--revenue);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rv-x {
  display: block;
  width: calc(100% - var(--gutter));
  height: 24px;
  margin: 6px 0 0 var(--gutter);
  overflow: visible;
}

.rv-tick {
  fill: var(--muted);
  font-size: 12px;
}

.rv-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

.rv-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  min-width: 110px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-menu);
  font-size: 12.5px;
  pointer-events: none;
  white-space: nowrap;
}

.rv-tip-label,
.rv-tip-detail {
  color: var(--muted);
}

.rv-tip-value {
  color: var(--revenue-ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.rv-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

/* Sources, channels, countries, campaigns */

.rv-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rv-list {
  min-width: 0;
  min-height: 286px;
  padding: 14px 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.rv-list-title {
  font-size: 14.5px;
  font-weight: 620;
}

.rv-rows-head {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 4px;
  padding: 0 10px;
  color: var(--faint);
  font-size: 12.5px;
}

.rv-rows {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 3px;
}

.rv-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 72px;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 10px;
}

.rv-row-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rv-row-bar rect {
  fill: var(--revenue-bar);
  transform-box: fill-box;
  transform-origin: left center;
}

.rv-row-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rv-mark-box {
  display: inline-flex;
  flex: none;
}

.rv-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.rv-row-detail {
  flex: 0 1000 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12.5px;
}

.rv-row-count {
  position: relative;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rv-row-value {
  position: relative;
  color: var(--revenue-ink);
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rv-row-value.negative {
  color: var(--down);
}

.rv-rows-empty {
  padding: 36px 10px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

/* Marks: a logo, our own tile, a channel glyph, a flag or a letter. */

.rv-mark {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ink);
  fill: currentColor;
  overflow: visible;
}

.rv-mark.flag {
  border-radius: 50%;
}

.rv-letter {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.rv-dot {
  display: inline-grid;
  place-items: center;
}

.rv-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

/* Path to purchase */

.rv-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rv-tile {
  min-width: 0;
  padding: 14px 16px 12px;
  border-radius: var(--radius-control);
  background: var(--surface-2);
}

.rv-tile-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.rv-tile-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rv-tile-unit {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.rv-tile-sub {
  color: var(--faint);
  font-size: 12.5px;
}

.rv-block {
  min-width: 0;
  margin-top: 22px;
}

.rv-block-title {
  margin-bottom: 10px;
  font-size: 14.5px;
  font-weight: 620;
}

.rv-block-sub {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.rv-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}

/* The flow chart */

.rv-sankey {
  padding: 14px 16px 12px;
  border-radius: var(--radius-control);
  background: var(--surface-2);
}

.rv-sankey-heads {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.rv-sankey-svg {
  display: block;
  overflow: visible;
}

.rv-flow {
  fill: var(--flow-other);
  fill-opacity: var(--flow-alpha);
  cursor: default;
  outline: none;
  transition: fill-opacity .2s ease;
}

.rv-flow.tone-1 { fill: var(--flow-1); }
.rv-flow.tone-2 { fill: var(--flow-2); }
.rv-flow.tone-3 { fill: var(--flow-3); }
.rv-flow.tone-4 { fill: var(--flow-4); }
.rv-flow.tone-5 { fill: var(--flow-5); }

/* One flow (or a node's flows) lit, the rest stepped back. Without the script, a hovered
   or focused flow still lights itself. */
.rv-flows-reveal:has(.rv-flow:hover, .rv-flow:focus-visible) .rv-flow,
.rv-sankey[data-active] .rv-flow {
  fill-opacity: .12;
}

.rv-flows-reveal .rv-flow:hover,
.rv-flows-reveal .rv-flow:focus-visible,
.rv-sankey[data-active] .rv-flow.lit {
  fill-opacity: .9;
}

.rv-flow:focus-visible {
  stroke: var(--ink);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.rv-node-bar {
  fill: var(--flow-other);
  transition: opacity .2s ease;
}

.rv-node-bar.tone-1 { fill: var(--flow-1); }
.rv-node-bar.tone-2 { fill: var(--flow-2); }
.rv-node-bar.tone-3 { fill: var(--flow-3); }
.rv-node-bar.tone-4 { fill: var(--flow-4); }
.rv-node-bar.tone-5 { fill: var(--flow-5); }

/* The source credited with the sale holds the money. */
.rv-node-bar.rv-node-credited {
  fill: var(--revenue);
}

.rv-node {
  cursor: default;
  transition: opacity .2s ease;
}

.rv-sankey[data-active] .rv-node {
  opacity: .4;
}

.rv-sankey[data-active] .rv-node.lit {
  opacity: 1;
}

.rv-node-label {
  fill: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

.rv-node-n {
  fill: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.rv-mark-use {
  color: var(--ink);
  fill: currentColor;
}

.rv-letter-svg rect {
  fill: var(--surface);
  stroke: var(--line);
}

.rv-letter-svg text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.rv-dot-svg {
  fill: var(--faint);
}

.rv-flag-svg {
  clip-path: circle(50%);
}

.rv-readout {
  min-height: 2.9em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rv-readout strong {
  color: var(--ink);
  font-weight: 650;
}

/* Phones: the flows as a ranked list instead of the chart. */
.rv-flow-list {
  display: none;
  list-style: none;
  padding: 0;
  gap: 3px;
}

.rv-flow-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 4px 10px;
}

.rv-flow-item-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rv-flow-item-bar rect {
  fill: var(--flow-other);
  fill-opacity: .28;
  transform-box: fill-box;
  transform-origin: left center;
}

.rv-flow-item-bar .tone-1 { fill: var(--flow-1); }
.rv-flow-item-bar .tone-2 { fill: var(--flow-2); }
.rv-flow-item-bar .tone-3 { fill: var(--flow-3); }
.rv-flow-item-bar .tone-4 { fill: var(--flow-4); }
.rv-flow-item-bar .tone-5 { fill: var(--flow-5); }

.rv-flow-item-path {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  min-width: 0;
  color: var(--ink);
  font-size: 13.5px;
}

.rv-flow-item-name {
  overflow-wrap: anywhere;
}

.rv-arrow {
  color: var(--muted);
}

.rv-flow-item-n {
  position: relative;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rv-flow-more {
  display: none;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

/* The table behind the chart. */
.rv-table-toggle {
  margin-top: 6px;
}

.rv-table-toggle > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.rv-table-toggle > summary::-webkit-details-marker {
  display: none;
}

.rv-table-toggle > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s var(--ease-out);
}

.rv-table-toggle[open] > summary::before {
  transform: rotate(45deg);
}

.rv-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 13px;
}

.rv-table th,
.rv-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.rv-table th {
  color: var(--muted);
  font-weight: 600;
}

.rv-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* The histogram */

.rv-hist {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.rv-hist-col {
  display: grid;
  grid-template-rows: auto 132px auto;
  align-content: start;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.rv-hist-n {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.rv-hist-col.zero .rv-hist-n {
  color: var(--faint);
  font-weight: 400;
}

.rv-hist-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.rv-hist-track {
  fill: var(--line-2);
}

.rv-hist-fill {
  fill: var(--revenue);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.rv-hist-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

/* Pages before paying */

.rv-pages {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2px;
}

.rv-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 36%) 44px;
  align-items: center;
  gap: 12px;
  min-height: 30px;
}

.rv-page-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.rv-meter {
  display: block;
  width: 100%;
  height: 8px;
  overflow: visible;
}

.rv-meter-track {
  fill: var(--line-2);
}

.rv-meter-fill {
  fill: var(--visitors);
  transform-box: fill-box;
  transform-origin: left center;
}

.rv-page-pct {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Lifetime value */

.rv-ltv-box {
  overflow-x: auto;
  margin: 0 -6px;
  padding: 0 6px;
}

.rv-ltv {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rv-ltv thead th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.rv-ltv th.num,
.rv-ltv td.num {
  text-align: right;
}

.rv-ltv tbody th,
.rv-ltv tbody td,
.rv-ltv tfoot th,
.rv-ltv tfoot td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-2);
  font-weight: 400;
  text-align: left;
}

.rv-ltv td {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rv-ltv td.rv-money {
  color: var(--revenue-ink);
  font-weight: 600;
}

.rv-ltv-source {
  max-width: 340px;
}

.rv-ltv-other .rv-row-name {
  color: var(--muted);
}

.rv-ltv tfoot th,
.rv-ltv tfoot td {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  font-weight: 650;
}

.rv-ltv tfoot .rv-row-name {
  font-weight: 650;
}

/* Narrower screens */

@media (max-width: 1000px) {
  .rv-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .rv-lists {
    grid-template-columns: minmax(0, 1fr);
  }

  .rv-list {
    min-height: 0;
  }

  .rv-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .rv-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rv-kpi:nth-child(3) {
    border-left: 0;
  }

  .rv-kpi:nth-child(n + 3) {
    border-top: 1px solid var(--line-2);
  }
}

@media (max-width: 640px) {
  .rv-panel {
    padding: 18px 16px;
  }

  .rv-kpis {
    margin: 0 -16px;
  }

  .rv-kpi {
    padding: 14px 16px 12px;
  }

  .rv-kpi-value {
    font-size: 28px;
  }

  .rv-title {
    font-size: 20px;
  }

  .rv-chart {
    --gutter: 40px;
  }

  .rv-plot {
    height: 180px;
  }

  .rv-chart-box {
    min-height: 236px;
  }

  .rv-tick.minor {
    display: none;
  }

  .rv-list {
    padding: 12px 8px 8px;
  }

  .rv-row {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 10px;
    padding: 0 8px;
  }

  .rv-row-count {
    display: none;
  }

  .rv-tile-value {
    font-size: 24px;
  }

  .rv-sankey {
    padding: 12px 8px 10px;
  }

  .rv-sankey-heads,
  .rv-sankey-box {
    display: none;
  }

  .rv-flow-list {
    display: grid;
  }

  .rv-flow-more {
    display: block;
  }

  .rv-readout {
    display: none;
  }

  .rv-table-toggle {
    margin-top: 10px;
    padding: 0 2px;
  }

  .rv-table-toggle table {
    display: block;
    overflow-x: auto;
  }

  .rv-hist {
    gap: 3px;
  }

  .rv-hist-col {
    grid-template-rows: auto 104px auto;
  }

  .rv-hist-label {
    font-size: 11px;
  }

  .rv-page {
    grid-template-columns: minmax(0, 1fr) 72px 40px;
    gap: 8px;
  }

  /* The lifetime table: one card per source, its numbers in a grid with their names. */
  .rv-ltv-box {
    overflow: visible;
  }

  .rv-ltv thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .rv-ltv,
  .rv-ltv tbody,
  .rv-ltv tfoot {
    display: block;
  }

  .rv-ltv tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    padding: 12px 2px;
    border-bottom: 1px solid var(--line-2);
  }

  .rv-ltv tfoot tr {
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .rv-ltv tbody th,
  .rv-ltv tbody td,
  .rv-ltv tfoot th,
  .rv-ltv tfoot td {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .rv-ltv th.rv-ltv-source {
    grid-column: 1 / -1;
    max-width: none;
  }

  .rv-ltv td::before {
    content: attr(data-col);
    color: var(--faint);
    font-size: 12px;
    font-weight: 400;
  }

  .rv-ltv td.num {
    text-align: right;
  }
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .rv-bar {
    animation: rv-grow-y .9s var(--ease-out) .1s both;
  }

  .rv-hist-fill {
    animation: rv-grow-y .9s var(--ease-out) .2s both;
  }

  .rv-hist-col:nth-child(2) .rv-hist-fill { animation-delay: .25s; }
  .rv-hist-col:nth-child(3) .rv-hist-fill { animation-delay: .3s; }
  .rv-hist-col:nth-child(4) .rv-hist-fill { animation-delay: .35s; }
  .rv-hist-col:nth-child(5) .rv-hist-fill { animation-delay: .4s; }
  .rv-hist-col:nth-child(6) .rv-hist-fill { animation-delay: .45s; }
  .rv-hist-col:nth-child(7) .rv-hist-fill { animation-delay: .5s; }
  .rv-hist-col:nth-child(8) .rv-hist-fill { animation-delay: .55s; }

  .rv-row-bar rect,
  .rv-meter-fill,
  .rv-flow-item-bar rect {
    animation: rv-grow-x .9s var(--ease-out) .15s both;
  }

  .rv-rows .rv-row:nth-child(2) .rv-row-bar rect { animation-delay: .19s; }
  .rv-rows .rv-row:nth-child(3) .rv-row-bar rect { animation-delay: .23s; }
  .rv-rows .rv-row:nth-child(4) .rv-row-bar rect { animation-delay: .27s; }
  .rv-rows .rv-row:nth-child(5) .rv-row-bar rect { animation-delay: .31s; }
  .rv-rows .rv-row:nth-child(6) .rv-row-bar rect { animation-delay: .35s; }

  /* The flows draw in from the source that brought the buyer in. */
  .rv-flows-reveal {
    animation: rv-reveal var(--duration-draw) var(--ease-in-out) .15s both;
  }

  .rv-node {
    animation: rv-fade .5s ease .1s backwards;
  }
}

@keyframes rv-grow-y {
  from {
    transform: scaleY(0);
  }
}

@keyframes rv-grow-x {
  from {
    transform: scaleX(0);
  }
}

@keyframes rv-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes rv-fade {
  from {
    opacity: 0;
  }
}
