/* Path of a transactional e-mail (includes/visuals/mailpath.php): senders, relay, authenticated domain, inbox; spoof lane and log below */
.ml { --ml-gap: 22px; }
.ml-path { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--ml-gap); align-items: start; }
.ml-col { position: relative; z-index: 1; min-width: 0; display: grid; gap: 14px; }

/* the rail behind the top row of cards, and the dashed spoof lane joining the domain card from below */
.ml-rail { position: absolute; z-index: 0; left: 12%; right: 10%; top: 56px; height: 3px; background: var(--forest); border-radius: 2px; }
.ml-rail::after { content: ""; position: absolute; right: -2px; top: -5px; width: 13px; height: 13px; border-top: 3px solid var(--forest); border-right: 3px solid var(--forest); transform: rotate(45deg); border-radius: 2px; }
.ml-packet { position: absolute; top: -6px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--forest); opacity: 0; }
.ml-lane { position: absolute; z-index: 0; left: 24%; right: 34%; bottom: 40px; height: 3px; border-top: 3px dashed #7d8a80; }
.ml-lane::before { content: ""; position: absolute; left: 0; bottom: 0; width: 3px; height: 70px; border-left: 3px dashed #7d8a80; }

/* shared card parts */
.ml-t { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 19px; line-height: 1.2; color: var(--forest); }
.ml-s { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.ml-tick { width: 14px; height: 14px; flex: none; }
.ml-from { display: block; font-weight: 600; color: var(--ink); }
.ml-addr { display: block; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }

/* senders */
.ml-senders { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ml-sender { display: grid; gap: 3px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.ml-sender-n { font-weight: 600; font-size: 15px; line-height: 1.25; color: var(--forest); }
.ml-sender-d { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.ml-access { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--green-text); }
.ml-key { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--green-2); box-sizing: border-box; }

/* relay: dark card */
.ml-relay { background: var(--forest); color: var(--white); border-radius: var(--radius); padding: 18px 18px 16px; }
.ml-relay .ml-t { color: var(--white); }
.ml-relay .ml-s { color: var(--sage); }
.ml-rules { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.35; }
.ml-rules li { display: flex; gap: 8px; align-items: flex-start; }
.ml-rules .ml-tick { color: var(--green); margin-top: 2px; }

/* domain and checks */
.ml-domain { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.ml-checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.ml-check { display: grid; grid-template-columns: 24px auto minmax(0, 1fr); align-items: center; gap: 8px; }
.ml-check-i { width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: var(--green-text); display: inline-flex; align-items: center; justify-content: center; }
.ml-check-a { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--forest); }
.ml-check-l { font-size: 13px; line-height: 1.3; color: var(--ink-2); }

/* spoof attempt: under the domain card, on the dashed lane */
.ml-spoof { position: relative; background: var(--white); border: 1.5px dashed #7d8a80; border-radius: var(--radius-sm); padding: 14px 16px; }
.ml-spoof-t { font-size: 16px; }
.ml-spoof-from { margin: 10px 0 0; font-size: 13.5px; line-height: 1.35; }
.ml-stamp { margin: 12px 0 0; display: grid; gap: 4px; }
.ml-stamp-v { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 5px 10px; border: 2px solid #b4321f; border-radius: 6px; color: #b4321f; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-4deg); transform-origin: left center; }
.ml-stamp-n { font-size: 12.5px; color: var(--ink-2); }

/* inbox: the delivered message */
.ml-inbox { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.ml-mail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.ml-mail-subj { margin: 0; font-weight: 600; font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.ml-mail-from { margin: 0; font-size: 13px; line-height: 1.35; }
.ml-mail-tag { margin: 4px 0 0; display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 10px; border-radius: 999px; background: var(--mint); color: var(--green-text); font-size: 12.5px; font-weight: 700; }

/* log */
.ml-log { margin-top: 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.ml-log-t { margin: 0 0 8px; }
.ml-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.ml-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.35; }
.ml-row:first-child { border-top: 0; }
.ml-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12.5px; }
.ml-text { color: var(--ink); min-width: 0; }
.ml-state { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.ml-row--ok .ml-state { background: var(--mint); color: var(--green-text); }
.ml-row--deferred .ml-state { background: #fff1c2; color: #7a5200; }
.ml-row--rejected .ml-state { background: #fde3de; color: #b4321f; }
.ml-legend { margin-top: 16px; list-style: none; padding: 0; }
.ml-legend li { display: inline-flex; align-items: center; gap: 8px; }
.ml-key--spoof { border-top-color: #7d8a80; }

/* intro: the packet travels, the checks tick, the stamp lands, the rows appear */
.js .vz-figure .ml-col > *, .js .vz-figure .ml-sender, .js .vz-figure .ml-row { opacity: 0; transform: translateY(10px); }
.js .vz-figure .ml-check, .js .vz-figure .ml-mail-tag { opacity: 0; }
.js .vz-figure .ml-stamp-v { opacity: 0; transform: rotate(-4deg) scale(1.4); }
.js .vz-figure.is-visible .ml-col > *, .js .vz-figure.is-visible .ml-sender, .js .vz-figure.is-visible .ml-row { animation: mlUp .5s ease-out forwards; }
.js .vz-figure.is-visible .ml-col--senders > * { animation-delay: .1s; }
.js .vz-figure.is-visible .ml-sender--1 { animation-delay: .15s; } .js .vz-figure.is-visible .ml-sender--2 { animation-delay: .25s; } .js .vz-figure.is-visible .ml-sender--3 { animation-delay: .35s; }
.js .vz-figure.is-visible .ml-col--relay > * { animation-delay: .5s; }
.js .vz-figure.is-visible .ml-col--domain > .ml-domain { animation-delay: .9s; }
.js .vz-figure.is-visible .ml-col--inbox > * { animation-delay: 1.9s; }
.js .vz-figure.is-visible .ml-col--domain > .ml-spoof { animation-delay: 2.4s; }
.js .vz-figure.is-visible .ml-check { animation: mlIn .35s ease-out forwards; }
.js .vz-figure.is-visible .ml-check--1 { animation-delay: 1.2s; } .js .vz-figure.is-visible .ml-check--2 { animation-delay: 1.45s; } .js .vz-figure.is-visible .ml-check--3 { animation-delay: 1.7s; }
.js .vz-figure.is-visible .ml-mail-tag { animation: mlIn .4s ease-out 2.3s forwards; }
.js .vz-figure.is-visible .ml-stamp-v { animation: mlStamp .35s cubic-bezier(.2, .9, .3, 1.2) 3s forwards; }
.js .vz-figure.is-visible .ml-row--1 { animation-delay: 2.9s; } .js .vz-figure.is-visible .ml-row--2 { animation-delay: 3.05s; }
.js .vz-figure.is-visible .ml-row--3 { animation-delay: 3.2s; } .js .vz-figure.is-visible .ml-row--4 { animation-delay: 3.4s; }
.js .vz-figure.is-visible .ml-packet { animation: mlPacket 2.2s ease-in-out .4s forwards; }
@keyframes mlUp { to { opacity: 1; transform: none; } }
@keyframes mlIn { to { opacity: 1; } }
@keyframes mlStamp { to { opacity: 1; transform: rotate(-4deg) scale(1); } }
@keyframes mlPacket { 0% { opacity: 0; left: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; left: calc(100% - 15px); } }
@media (prefers-reduced-motion: reduce) {
  .js .vz-figure .ml-col > *, .js .vz-figure .ml-sender, .js .vz-figure .ml-row, .js .vz-figure .ml-check, .js .vz-figure .ml-mail-tag, .js .vz-figure .ml-stamp-v { animation: none !important; opacity: 1; transform: none; }
  .js .vz-figure .ml-stamp-v { transform: rotate(-4deg); }
  .ml-packet { display: none; }
}

/* two columns on tablets: senders + relay, then domain + inbox; the rail and lane are hidden */
@media (max-width: 1099px) and (min-width: 701px) {
  .ml-path { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 22px; }
  .ml-rail, .ml-lane { display: none; }
}
/* phones: one column in reading order */
@media (max-width: 700px) {
  .ml-path { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .ml-rail, .ml-lane { display: none; }
  .ml-t { font-size: 18px; }
  .ml-row { grid-template-columns: 62px minmax(0, 1fr); }
  .ml-state { grid-column: 2; justify-self: start; }
}
