/* The visitor list and visitor journeys (wave 3). Loaded on every page with tokens.css
   and app.css; every rule is scoped to .vis, .jr or .av so nothing else changes.
   Motion holds Outpost's bar: rows rise in, numbers tick up, a row unfolds in place,
   the journey's rule draws down; nothing moves for prefers-reduced-motion. Rows hold
   their height while they open, so nothing beside them shifts. */

/* ------------------------------------------------------------------ avatars */

.av {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  --av-eye: #1d2027;
  --av-white: #ffffff;
  --av-nose: #3b2c28;
  --av-beak: #f2a33a;
  --av-beak-2: #e2572f;
  --av-blush: #f28fa5;
  --av-horn: #e6d8bd;
  --av-antler: #b08d64;
  --av-iris: #f2b64a;
}

.av-big {
  width: 72px;
  height: 72px;
}

.av-tile { fill: var(--av-tile); }
.av-f { fill: var(--av-fur); }
.av-sh { fill: #0b0d12; opacity: .1; }
.av-f2 { fill: var(--av-fur-2); }
.av-l { fill: var(--av-light); }
.av-in { fill: var(--av-inner); }
.av-pt { fill: var(--av-fur-2); }
.av-w { fill: var(--av-white); }
.av-e { fill: var(--av-eye); }
.av-hl { fill: #ffffff; }
.av-ir { fill: var(--av-iris); }
.av-n { fill: var(--av-nose); }
.av-bk { fill: var(--av-beak); }
.av-bk2 { fill: var(--av-beak-2); }
.av-bl { fill: var(--av-blush); opacity: .5; }
.av-hn { fill: var(--av-horn); }
.av-ant { fill: var(--av-antler); }
.av-tk { fill: #f3ead6; }
.av-fr { fill: var(--av-fur-2); opacity: .55; }
.av-st { fill: #f2b64a; }
.av-lf { fill: #7cc47f; }

.av-k,
.av-an,
.av-wh,
.av-gl,
.av-tkl,
.av-sp {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.av-k { stroke: var(--av-eye); stroke-width: 1.2; }
.av-an { stroke: var(--av-antler); stroke-width: 2; }
.av-wh { stroke: var(--av-fur-2); stroke-width: .8; }
.av-gl { stroke: #e0607f; stroke-width: 2.2; }
.av-tkl { stroke: #c9b98f; stroke-width: .7; }
.av-sp { stroke: #4f9a55; stroke-width: 1.2; }

/* Tiles: soft tints that sit beside the visitor blue and revenue coral. */
.av-bg-0 { --av-tile: #e3eefc; }
.av-bg-1 { --av-tile: #dcf3e8; }
.av-bg-2 { --av-tile: #ece6fb; }
.av-bg-3 { --av-tile: #fbf0cf; }
.av-bg-4 { --av-tile: #fde5d8; }
.av-bg-5 { --av-tile: #e4ecdc; }
.av-bg-6 { --av-tile: #e6ebf1; }
.av-bg-7 { --av-tile: #fbe3ea; }

/* Fur: the face, ears and marks, the muzzle, the inside of ears. */
.av-fur-brown { --av-fur: #a8714a; --av-fur-2: #7d5034; --av-light: #f1dcc8; --av-inner: #e9b9a0; }
.av-fur-ginger { --av-fur: #e8803a; --av-fur-2: #b85a1f; --av-light: #fff3e6; --av-inner: #f6c2a0; }
.av-fur-cream { --av-fur: #ead8b8; --av-fur-2: #c4a87c; --av-light: #fff8ec; --av-inner: #f0b3bb; }
.av-fur-tan { --av-fur: #cfa16f; --av-fur-2: #9f7447; --av-light: #f6e7d3; --av-inner: #ecbfa6; }
.av-fur-grey { --av-fur: #9aa3ae; --av-fur-2: #4f5661; --av-light: #e7eaee; --av-inner: #d9c2c8; }
.av-fur-white { --av-fur: #f7f7f5; --av-fur-2: #23262d; --av-light: #ffffff; --av-inner: #e8d6da; }
.av-fur-ink { --av-fur: #2a2f3a; --av-fur-2: #171a20; --av-light: #f5f3ee; --av-inner: #555b66; }
.av-fur-pink { --av-fur: #f4a7bd; --av-fur-2: #d9708f; --av-light: #fde3eb; --av-inner: #e88aa6; }
.av-fur-green { --av-fur: #7cc47f; --av-fur-2: #4f9a55; --av-light: #e3f4e0; --av-inner: #a8d8a6; }
.av-fur-gold { --av-fur: #f0b65a; --av-fur-2: #c48a2f; --av-light: #fff1d6; --av-inner: #f5c6a0; }
.av-fur-blue { --av-fur: #8fb3d6; --av-fur-2: #5f86ad; --av-light: #e3eef8; --av-inner: #c3d6ea; }

/* Ink animals keep a light face, so their eyes need the dark ink still. */
.av-fur-white .av-n,
.av-fur-ink .av-n { fill: #23262d; }

:where(:root[data-theme="dark"]) .av {
  --av-white: #f1f1ee;
}

:where(:root[data-theme="dark"]) .av-sh { opacity: .45; }

:where(:root[data-theme="dark"]) .av-bg-0 { --av-tile: #16233a; }
:where(:root[data-theme="dark"]) .av-bg-1 { --av-tile: #12291f; }
:where(:root[data-theme="dark"]) .av-bg-2 { --av-tile: #221a36; }
:where(:root[data-theme="dark"]) .av-bg-3 { --av-tile: #2b2412; }
:where(:root[data-theme="dark"]) .av-bg-4 { --av-tile: #2e1c14; }
:where(:root[data-theme="dark"]) .av-bg-5 { --av-tile: #1c2418; }
:where(:root[data-theme="dark"]) .av-bg-6 { --av-tile: #1d2129; }
:where(:root[data-theme="dark"]) .av-bg-7 { --av-tile: #2c1820; }

:where(:root[data-theme="dark"]) .av-fur-white { --av-fur: #e9e9e6; --av-light: #f4f4f1; }
:where(:root[data-theme="dark"]) .av-fur-cream { --av-fur: #e6d8c0; --av-light: #f6efe2; }
:where(:root[data-theme="dark"]) .av-fur-ink { --av-fur: #3a404d; --av-fur-2: #20242c; }

@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .av {
    --av-white: #f1f1ee;
  }

  :where(:root:not([data-theme="light"])) .av-sh { opacity: .45; }

  :where(:root:not([data-theme="light"])) .av-bg-0 { --av-tile: #16233a; }
  :where(:root:not([data-theme="light"])) .av-bg-1 { --av-tile: #12291f; }
  :where(:root:not([data-theme="light"])) .av-bg-2 { --av-tile: #221a36; }
  :where(:root:not([data-theme="light"])) .av-bg-3 { --av-tile: #2b2412; }
  :where(:root:not([data-theme="light"])) .av-bg-4 { --av-tile: #2e1c14; }
  :where(:root:not([data-theme="light"])) .av-bg-5 { --av-tile: #1c2418; }
  :where(:root:not([data-theme="light"])) .av-bg-6 { --av-tile: #1d2129; }
  :where(:root:not([data-theme="light"])) .av-bg-7 { --av-tile: #2c1820; }

  :where(:root:not([data-theme="light"])) .av-fur-white { --av-fur: #e9e9e6; --av-light: #f4f4f1; }
  :where(:root:not([data-theme="light"])) .av-fur-cream { --av-fur: #e6d8c0; --av-light: #f6efe2; }
  :where(:root:not([data-theme="light"])) .av-fur-ink { --av-fur: #3a404d; --av-fur-2: #20242c; }
}

/* ---------------------------------------------------------------- the list */

.vis .crumbs [aria-current] {
  color: var(--ink-2);
}

.vis-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 18px;
}

.vis-title {
  min-width: 0;
}

.vis-title h2 {
  font-size: 38px;
  font-weight: 620;
  letter-spacing: -.015em;
}

.vis-tally {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.vis-big {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.vis-big.paying {
  color: var(--revenue-ink);
}

.vis-sep {
  align-self: center;
  width: 4px;
  height: 4px;
  margin: 0 6px;
  border-radius: 1px;
  background: var(--faint);
  transform: rotate(45deg);
}

.vis-period {
  margin-top: 4px;
  color: var(--faint);
  font-size: 13px;
}

.vis-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.vis-menu {
  margin-left: 0;
}

.vis-menu .menu-value {
  min-width: 0;
}

/* The customers-only switch: a link that flips the filter, drawn as a squared track. */
.vis-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
  user-select: none;
  transition: border-color .15s ease, background-color .2s ease;
}

.vis-switch:hover {
  border-color: var(--faint);
}

.vis-switch-track {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  border-radius: 5px;
  background: var(--line);
  transition: background-color .25s ease;
}

.vis-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(11, 13, 18, .25);
  transition: transform .3s var(--ease-out);
}

.vis-switch[aria-checked="true"] {
  border-color: var(--revenue-line);
  background: var(--revenue-bar);
}

.vis-switch[aria-checked="true"] .vis-switch-track {
  background: var(--revenue);
}

.vis-switch[aria-checked="true"] .vis-switch-thumb {
  transform: translateX(14px);
}

.vis-mode-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  max-width: none;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--brand-tint);
  color: var(--ink-2);
}

/* What drives Likely to buy. */
.vis-explain {
  margin-bottom: 14px;
  padding: 14px 18px;
  border: 1px dashed var(--revenue-line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.vis-explain-title {
  font-size: 14.5px;
  font-weight: 650;
}

.vis-explain-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 22px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--muted);
}

.vis-strong {
  color: var(--ink);
  font-weight: 600;
}

/* The table: one grid for the column heads and every row, so columns line up. */
.vis-panel {
  padding: 6px 0 0;
  overflow: hidden;
}

.vis-cols,
.vis-sum {
  display: grid;
  grid-template-columns:
    minmax(0, 1.9fr) minmax(0, .9fr) minmax(0, 1.5fr) 64px minmax(0, .9fr)
    76px 84px 16px;
  grid-template-areas: "who src path visits time rev seen chev";
  align-items: center;
  column-gap: 16px;
  padding: 0 20px;
}

.vis-cols {
  height: 38px;
  color: var(--faint);
  font-size: 12.5px;
  border-bottom: 1px solid var(--line-2);
}

.vis-cols span:nth-child(6),
.vis-cols span:nth-child(7) {
  text-align: right;
}

.vis-rows {
  list-style: none;
  padding: 0;
}

.vis-row + .vis-row {
  border-top: 1px solid var(--line-2);
}

.vis-item > summary {
  list-style: none;
}

.vis-item > summary::-webkit-details-marker {
  display: none;
}

.vis-sum {
  min-height: 74px;
  padding-top: 12px;
  padding-bottom: 12px;
  cursor: pointer;
  transition: background-color .15s ease;
}

.vis-sum:hover,
.vis-item[open] > .vis-sum {
  background: var(--surface-2);
}

.vis-sum:focus-visible {
  outline-offset: -2px;
}

.vis-who { grid-area: who; }
.vis-src { grid-area: src; }
.vis-path { grid-area: path; }
.vis-count-cell { grid-area: visits; }
.vis-time { grid-area: time; }
.vis-rev { grid-area: rev; }
.vis-seen { grid-area: seen; }
.vis-chev { grid-area: chev; }

.vis-who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.vis-id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.vis-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 620;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A customer: a small coral coin. */
.vis-customer {
  flex: none;
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--revenue);
}

.vis-customer::after {
  content: "$";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.vis-where {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.vis-where .flag {
  width: 14px;
  height: 14px;
}

.vis-where-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vis-dayhash {
  color: var(--faint);
  font-size: 12px;
}

.vis-src {
  display: grid;
  min-width: 0;
}

.vis-src-name {
  color: var(--ink);
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vis-src-detail {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vis-path {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.vis-path-label {
  color: var(--faint);
  font-size: 12px;
}

.vis-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 3px;
  min-width: 0;
}

/* Path chips: squared, never pills. Pricing and checkout pages wear the money tint. */
.vis-chip {
  display: inline-block;
  max-width: 100%;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* In a row the latest visit's chips hold one line: each long path gives way. */
.vis-path .vis-chips {
  flex-wrap: nowrap;
  overflow: hidden;
}

.vis-path .vis-chip {
  flex: 0 1 auto;
  min-width: 2.6em;
  max-width: 13em;
}

.vis-path .vis-chip.more {
  flex: none;
  min-width: 0;
}

.vis-chip.intent {
  border-color: var(--revenue-line);
  background: var(--revenue-bar);
  color: var(--revenue-ink);
}

.vis-chip.more {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}

.vis-arrow {
  flex: none;
  width: 5px;
  height: 5px;
  margin: 0 2px 0 1px;
  border-top: 1.5px solid var(--faint);
  border-right: 1.5px solid var(--faint);
  transform: rotate(45deg);
}

.vis-count-cell {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vis-time {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.vis-time .vis-strong {
  font-weight: 580;
}

.vis-sub {
  font-size: 12.5px;
}

.vis-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--down);
  font-size: 12px;
  white-space: nowrap;
}

/* The outlier flag: a pennant. */
.vis-flag-mark {
  flex: none;
  position: relative;
  width: 8px;
  height: 10px;
  border-left: 1.5px solid currentColor;
}

.vis-flag-mark::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  border-left: 6px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.vis-rev,
.vis-seen {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vis-money {
  color: var(--revenue-ink);
  font-weight: 650;
}

.vis-none {
  color: var(--faint);
}

.vis-seen {
  color: var(--muted);
  font-size: 13.5px;
}

.vis-chev {
  display: grid;
  place-items: center;
}

.vis-item[open] > .vis-sum .chevron {
  transform: rotate(180deg);
}

/* Likely to buy, row by row. */
.vis-score {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.vis-score > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vis-meter {
  flex: none;
  width: 54px;
  height: 6px;
}

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

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

/* A row unfolded: every visit in the period. */
.vis-more {
  overflow: hidden;
  padding: 4px 20px 18px 72px;
  background: var(--surface-2);
}

.vis-more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 6px 0 8px;
}

.vis-more-title {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.vis-journey-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
}

.vis-journey-link:hover {
  text-decoration: underline;
}

.vis-go,
.vis-back {
  flex: none;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.vis-back {
  transform: rotate(-135deg);
}

.vis-visit-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.vis-visit {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.vis-visit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
}

.vis-visit-when {
  color: var(--ink);
  font-weight: 580;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.vis-visit-src {
  display: inline-flex;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}

.vis-visit-src .vis-src-detail::before {
  content: "· ";
}

.vis-visit-facts {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.vis-credited {
  margin-left: 8px;
  color: var(--revenue-ink);
  font-weight: 600;
}

.vis-outlier {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--down-tint);
  color: var(--down);
  font-size: 12.5px;
  line-height: 1.45;
}

.vis-outlier .vis-flag-mark {
  top: 1px;
}

.vis-more-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.vis-empty {
  padding: 56px 20px;
  color: var(--muted);
  text-align: center;
}

.vis-foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-height: 60px;
  padding: 10px 20px;
  border-top: 1px solid var(--line-2);
}

.vis-range {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.vis-pager {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vis-page-link {
  height: 36px;
}

.vis-page-gap {
  width: 1px;
}

.vis-page-n {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.vis-foot {
  margin-top: 14px;
  max-width: 96ch;
}

[data-vis-swap] {
  transition: opacity .2s ease;
}

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

/* -------------------------------------------------------------- the journey */

.jr-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.jr-av {
  flex: none;
}

.jr-id {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.jr-id h1 {
  font-size: 38px;
  font-weight: 620;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.jr-id .vis-where {
  font-size: 14px;
}

.jr-id .vis-where-text {
  white-space: normal;
}

.jr-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.jr-facts > div {
  min-width: 0;
  padding: 14px 18px;
  border-left: 1px solid var(--line-2);
}

.jr-facts > div:first-child {
  border-left: 0;
}

.jr-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.jr-facts dd {
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.jr-facts dd.vis-money {
  color: var(--revenue-ink);
}

.jr-facts dd.vis-none {
  color: var(--faint);
}

.jr-unit {
  font-family: var(--font);
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
}

.jr-fact-detail {
  display: block;
  margin-top: 4px;
  font-family: var(--font);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 450;
}

.jr-touches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.jr-touch {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.jr-touch-title {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.jr-credit {
  border-color: var(--revenue-line);
}

.jr-credit .jr-touch-title {
  color: var(--revenue-ink);
}

.jr-touch-src {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.jr-touch-src .vis-src-name {
  font-size: 19px;
  font-weight: 650;
}

.jr-touch-src .vis-src-detail {
  font-size: 13.5px;
}

.jr-touch-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 14px;
  min-width: 0;
}

.jr-rule {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--faint);
  font-size: 12.5px;
}

.jr-evidence,
.jr-touch-empty {
  color: var(--muted);
  font-size: 13px;
}

.jr-timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 14px;
}

.jr-order {
  color: var(--muted);
  font-size: 13px;
}

/* The timeline: a rule down the left, a node per visit (blue) or payment (coral). */
.jr-items {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 0 0 0 26px;
  list-style: none;
}

.jr-items::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 1px;
  background: var(--line);
  transform-origin: top center;
}

.jr-item {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.jr-item:target {
  border-color: var(--brand);
}

.jr-node {
  position: absolute;
  left: -26px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--visitors);
  box-shadow: 0 0 0 1px var(--line);
}

.jr-node-pay {
  border-radius: 3px;
  background: var(--revenue);
  transform: rotate(45deg);
}

.jr-pay {
  border-color: var(--revenue-line);
  box-shadow: inset 3px 0 0 var(--revenue);
}

.jr-pay[data-negative] {
  border-color: var(--line);
  box-shadow: inset 3px 0 0 var(--line);
}

.jr-visit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.jr-when {
  color: var(--ink);
  font-weight: 620;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.jr-badge {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 560;
}

.jr-visit-src {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-size: 14px;
}

.jr-visit-where {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.jr-steps {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding: 0;
  list-style: none;
}

.jr-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 4px 0;
  border-top: 1px dashed var(--line-2);
}

.jr-step:first-child {
  border-top: 0;
}

.jr-step .vis-chip {
  justify-self: start;
}

.jr-step-at {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.jr-step-time {
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.jr-events {
  grid-column: 2 / -1;
  display: grid;
  gap: 2px;
  padding: 0;
  list-style: none;
}

.jr-events:empty {
  display: none;
}

.jr-event {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  color: var(--muted);
  font-size: 12.5px;
  min-width: 0;
}

.jr-event-mark {
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 2px;
}

.jr-goal .jr-event-mark {
  border-radius: 2px;
  background: var(--live);
  transform: rotate(45deg) scale(.85);
}

.jr-out .jr-event-mark {
  border-top: 1.5px solid var(--brand);
  border-right: 1.5px solid var(--brand);
}

.jr-props {
  color: var(--faint);
}

.jr-url {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.jr-pay-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.jr-amount {
  color: var(--revenue-ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.jr-pay[data-negative] .jr-amount {
  color: var(--ink-2);
}

.jr-kind {
  color: var(--ink);
  font-weight: 600;
}

.jr-pay-link {
  color: var(--muted);
  font-size: 13px;
}

.jr-pay-link:empty {
  display: none;
}

.jr .vis-pager {
  justify-content: space-between;
  margin-top: 16px;
}

/* --------------------------------------------------------------- narrower */

@media (max-width: 1100px) {
  .vis-cols {
    display: none;
  }

  .vis-sum {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto 16px;
    grid-template-areas:
      "who  who  time rev  chev"
      "src  path path seen chev"
      "src  path path visits chev";
    row-gap: 8px;
  }

  .vis-count-cell,
  .vis-seen {
    text-align: right;
    font-size: 13px;
    color: var(--muted);
  }

  .vis-explain-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .jr-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jr-facts > div:nth-child(4) {
    border-left: 0;
  }

  .jr-facts > div:nth-child(n + 4) {
    border-top: 1px solid var(--line-2);
  }
}

@media (max-width: 640px) {
  .vis-title h2,
  .jr-id h1 {
    font-size: 30px;
  }

  .vis-head {
    align-items: stretch;
  }

  .vis-controls {
    width: 100%;
    margin-left: 0;
  }

  .vis-switch {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .vis-menu {
    flex: 1 1 0;
    min-width: 0;
  }

  .vis-menu .menu-button {
    width: 100%;
    justify-content: space-between;
  }

  .vis-menu .menu-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vis-menu:last-child .menu-list {
    right: 0;
  }

  .vis-menu:first-of-type .menu-list {
    left: 0;
    right: auto;
  }

  .vis-sum {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "who    rev"
      "src    seen"
      "path   path"
      "time   visits";
    padding: 12px 14px;
    row-gap: 8px;
  }

  .vis-chev {
    display: none;
  }

  /* Nothing paid: say nothing, rather than a dash in the corner. */
  .vis-rev .vis-none {
    visibility: hidden;
  }

  .vis-where-text {
    white-space: normal;
  }

  .vis-time {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
  }

  .vis-count-cell {
    align-self: start;
  }

  .vis-path .vis-chip {
    max-width: 10em;
  }

  .vis-more {
    padding: 4px 14px 16px;
  }

  .vis-foot-bar {
    padding: 10px 14px;
    justify-content: center;
  }

  .vis-pager {
    width: 100%;
    justify-content: space-between;
  }

  .jr-head {
    align-items: flex-start;
  }

  .jr-head .av-big {
    width: 56px;
    height: 56px;
  }

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

  .jr-facts > div {
    padding: 12px 14px;
  }

  .jr-facts > div:nth-child(3),
  .jr-facts > div:nth-child(5) {
    border-left: 0;
  }

  .jr-facts > div:nth-child(4) {
    border-left: 1px solid var(--line-2);
  }

  .jr-facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--line-2);
  }

  .jr-facts dd {
    font-size: 21px;
  }

  .jr-touches {
    grid-template-columns: minmax(0, 1fr);
  }

  .jr-items {
    padding-left: 20px;
  }

  .jr-items::before {
    left: 3px;
  }

  .jr-node {
    left: -21px;
  }

  .jr-item {
    padding: 10px 12px 12px;
  }

  .jr-step {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }
}

/* ------------------------------------------------------------------ motion */

@media (prefers-reduced-motion: no-preference) {
  .vis-rows .vis-row {
    animation: vis-rise .5s var(--ease-out) both;
  }

  .vis-rows .vis-row:nth-child(2) { animation-delay: .03s; }
  .vis-rows .vis-row:nth-child(3) { animation-delay: .06s; }
  .vis-rows .vis-row:nth-child(4) { animation-delay: .09s; }
  .vis-rows .vis-row:nth-child(5) { animation-delay: .12s; }
  .vis-rows .vis-row:nth-child(6) { animation-delay: .15s; }
  .vis-rows .vis-row:nth-child(7) { animation-delay: .18s; }
  .vis-rows .vis-row:nth-child(8) { animation-delay: .21s; }
  .vis-rows .vis-row:nth-child(n + 9) { animation-delay: .24s; }

  .vis-meter-fill {
    animation: tally-grow .9s var(--ease-out) .2s both;
  }

  .vis-sum .chevron {
    transition: transform .3s var(--ease-out);
  }

  .vis-visit {
    animation: vis-rise .4s var(--ease-out) both;
  }

  .vis-menu[open] .menu-list {
    animation: tally-menu .2s var(--ease-out) both;
  }

  .jr-items::before {
    animation: vis-draw-down 1.1s var(--ease-in-out) .1s both;
  }

  .jr-item {
    animation: vis-rise .55s var(--ease-out) both;
  }

  .jr-item:nth-child(2) { animation-delay: .08s; }
  .jr-item:nth-child(3) { animation-delay: .16s; }
  .jr-item:nth-child(4) { animation-delay: .24s; }
  .jr-item:nth-child(n + 5) { animation-delay: .32s; }

  .jr-node {
    animation: vis-pop .45s var(--ease-out) .25s both;
  }

  .jr-node-pay {
    animation-name: vis-pop-pay;
  }
}

@keyframes vis-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
}

@keyframes vis-draw-down {
  from {
    transform: scaleY(0);
  }
}

@keyframes vis-pop {
  from {
    transform: scale(.2);
    opacity: 0;
  }
}

@keyframes vis-pop-pay {
  from {
    transform: rotate(45deg) scale(.2);
    opacity: 0;
  }
}
