.mg-evidence-comparison {
  --evidence-height: 390px;
  --evidence-line: #d4d5d1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin: 28px auto 0;
}

.mg-evidence-live {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px}
.mg-evidence-comparison > figure {display: grid; gap: 12px; min-width: 0; margin: 0}
.mg-evidence-comparison figcaption {color: #515550; text-align: center; font-weight: 500; line-height: 1.4}

.mg-evidence-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: var(--evidence-height);
}

.mg-evidence-screen {
  position: relative;
  flex: none;
  height: 100%;
}

.mg-evidence-screen img {
  display: block;
  width: auto;
  height: 100%;
  border: 1px solid var(--evidence-line);
  border-radius: 14px;
}

.mg-evidence-zoom {position: relative; flex: 0 1 220px; min-width: 0}
.mg-evidence-zoom img {display: block; width: 100%; height: auto}

.mg-evidence-screen + .mg-evidence-zoom::before {
  position: absolute;
  top: 50%;
  right: 100%;
  width: 20px;
  border-top: 1px solid var(--evidence-line);
  content: "";
}

.mg-evidence-arrow {display: block; width: 40px; color: #646864}
.mg-photo-detail {flex-basis: 330px}

.mg-home-pair {gap: 0}
.mg-home-before {justify-content: flex-end}
.mg-home-after {justify-content: flex-start}
.mg-home-comparison figcaption {width: min(100%, calc(var(--evidence-height) * .46 + 180px))}
.mg-home-comparison > figure:first-child figcaption {justify-self: end}
.mg-home-comparison > figure:last-child figcaption {justify-self: start}

.mg-home-notes {
  position: relative;
  z-index: 1;
  flex: 1 1 180px;
  min-width: 0;
  max-width: 180px;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-home-note {
  --leader-offset: calc(var(--evidence-height) * var(--note-inset));
  position: absolute;
  inset: var(--note-y) 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline-start: 28px;
  color: #454b45;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transform: translateY(-50%);
}

.mg-home-before .mg-home-note {
  justify-content: flex-end;
  padding-inline: 0 28px;
  text-align: right;
}

.mg-home-note::before,
.mg-home-note::after {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--leader-offset));
  background: #738073;
  content: "";
}
.mg-home-note::before {width: calc(21px + var(--leader-offset)); height: 1px}
.mg-home-note::after {width: 5px; height: 5px; border-radius: 50%; transform: translate(-50%, -40%)}
.mg-home-before .mg-home-note::before,
.mg-home-before .mg-home-note::after {right: calc(-1 * var(--leader-offset)); left: auto}
.mg-home-before .mg-home-note::after {transform: translate(50%, -40%)}

.mg-home-note-map {--note-y: 27%; --note-inset: .05}
.mg-home-note-plans {--note-y: 60%; --note-inset: .035}
.mg-home-before .mg-home-note-start {--note-y: 81.5%; --note-inset: .07}
.mg-home-note-status {--note-y: 27.7%; --note-inset: .115}
.mg-home-note-dog {--note-y: 41%; --note-inset: .17}
.mg-home-note-stats {--note-y: 65.5%; --note-inset: .16}
.mg-home-after .mg-home-note-start {--note-y: 82.6%; --note-inset: .185}

.mg-home-note-dog img {display: block; flex: none; width: 44px; height: auto}

.mg-photo-detail::after,
.mg-lock-screen::after,
.mg-island-screen::after {
  position: absolute;
  border: 2px solid #df524b;
  border-radius: 9px;
  content: "";
  pointer-events: none;
}

.mg-photo-detail::after {inset: 28% 4% auto auto; width: 14%; height: 19%}
.mg-lock-screen::after {inset: 73% 3% auto; height: 12%}
.mg-island-screen::after {inset: 1.3% 17% auto; height: 6.5%; border-radius: 20px}
.mg-evidence-live .mg-evidence-zoom {flex: 1 1 0; max-width: 380px}
.mg-lock-pair .mg-evidence-zoom {transform: translateY(calc(var(--evidence-height) * .29))}
.mg-island-pair .mg-evidence-zoom {align-self: flex-start}
.mg-island-pair .mg-evidence-zoom::before {top: calc(var(--evidence-height) * .045)}
.mg-evidence-note {margin-top: 14px; color: #666b64; font-size: 14px}

.project-mongram .n-section .mg-evidence-note {max-width: unset; margin: 18px 0 0; font-size: 14px; color: #666b64}
.project-mongram #home-design .mg-evidence-comparison {max-width: 1080px}

@media (max-width: 900px) {
  .project-mongram .mg-evidence-comparison {
    --evidence-height: 320px;
    grid-template-columns: 1fr;
    max-width: 470px;
  }
  .project-mongram .mg-evidence-arrow {justify-self: center; transform: rotate(90deg)}
  .project-mongram .mg-home-pair {justify-content: center}
  .project-mongram .mg-home-comparison > figure figcaption {justify-self: center}
}

@media (max-width: 480px) {
  .project-mongram .mg-evidence-comparison {--evidence-height: 250px}
  .project-mongram .mg-family-case .mg-evidence-pair {gap: 12px}
  .project-mongram .mg-family-case .mg-evidence-zoom::before {width: 12px}
  .project-mongram .mg-home-note {font-size: 13px}
  .project-mongram .mg-home-note-dog img {width: 32px}
}

/* Use the published full screenshots for the magnified evidence. */
.mg-evidence-revised {aspect-ratio: 260 / 565}
.mg-evidence-revised img {width: 100%; object-fit: cover; object-position: top}

.mg-evidence-crop {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--crop-ratio);
  border: 1px solid var(--evidence-line);
  border-radius: 10px;
}

.mg-evidence-crop img {
  position: absolute;
  inset: 0 auto auto 0;
  width: var(--crop-width, 100%);
  max-width: none;
  transform: translate(var(--crop-x, 0), var(--crop-y, 0));
}

.mg-crop-guardian {--crop-ratio: 370 / 244; --crop-width: 108%; --crop-x: -3.5%; --crop-y: -56%}
.mg-crop-family {--crop-ratio: 370 / 275; --crop-width: 105%; --crop-x: -2.5%; --crop-y: -36%}
.mg-crop-photo {--crop-ratio: 618 / 508; --crop-y: -59.5%}
.mg-crop-lock {--crop-ratio: 365 / 119; --crop-width: 108%; --crop-x: -3.75%; --crop-y: -72%}
.mg-crop-island {--crop-ratio: 365 / 96; --crop-width: 147%; --crop-x: -17%; --crop-y: -.3%}
