.mx-media {
  --mx-domain: #c14a22;
  --mx-wash: color-mix(in srgb, var(--mx-domain) 10%, transparent);
  margin: 34px 0 42px;
}

.mx-frame {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 5vw, 36px);
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(118deg, var(--mx-wash), transparent 34%), var(--paper);
  box-shadow: 0 24px 56px -48px rgba(20, 17, 14, 0.9);
}

.mx-frame::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 88px;
  height: 3px;
  background: var(--mx-domain);
}

.mx-frame::after {
  content: "//";
  position: absolute;
  top: 16px;
  right: 18px;
  color: var(--mx-domain);
  font: 500 0.72rem/1 var(--mono);
}

.mx-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mx-domain);
  font: 500 0.68rem/1.2 var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.mx-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}

.mx-title {
  max-width: 540px;
  margin: 9px 0 24px;
  color: var(--p-ink);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 420;
  letter-spacing: 0;
  line-height: 1.04;
  text-wrap: balance;
}

article .mx-caption {
  margin: 11px 0 0;
  color: var(--p-faint);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.45;
}

.mx-grid-2,
.mx-checks,
.mx-loop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--rule);
}

.mx-panel,
.mx-loop {
  min-width: 0;
  padding: 20px 20px 20px 0;
}

.mx-panel + .mx-panel,
.mx-loop + .mx-loop {
  padding-right: 0;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}

.mx-panel h3,
.mx-loop h3 {
  margin: 0 0 7px;
  color: var(--p-ink);
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.08;
}

article .mx-panel p,
article .mx-loop p {
  margin: 0;
  color: var(--p-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mx-panel ul {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.mx-panel li {
  position: relative;
  padding-left: 15px;
  color: var(--p-soft);
  font-size: 0.84rem;
}

.mx-panel li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--mx-domain);
}

.mx-gap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--mx-domain);
  font: 500 0.68rem/1 var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.mx-gap::before,
.mx-gap::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mx-domain), transparent);
  opacity: 0.55;
}

.mx-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 40px;
}

.mx-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 3%;
  right: 3%;
  height: 2px;
  background: linear-gradient(90deg, var(--mx-domain), #bd942b, #c14a22, var(--p-ink));
}

.mx-timeline::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 3%;
  width: 14px;
  height: 14px;
  background: var(--mx-domain);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--rule);
  animation: mx-window 7s linear infinite;
}

@keyframes mx-window {
  from { left: 3%; }
  to { left: calc(97% - 14px); }
}

.mx-step {
  min-width: 0;
  padding: 15px 12px 3px;
  border-left: 1px solid var(--rule);
}

.mx-step:first-child {
  padding-left: 0;
  border-left: 0;
}

.mx-step:last-child {
  padding-right: 0;
}

.mx-step b {
  display: block;
  margin-bottom: 6px;
  color: var(--p-ink);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.08;
}

.mx-step span {
  color: var(--p-soft);
  font-size: 0.78rem;
  line-height: 1.4;
}

.mx-check {
  min-height: 118px;
  padding: 19px;
  border-left: 1px solid var(--rule);
}

.mx-check:nth-child(odd) {
  padding-left: 0;
  border-left: 0;
}

.mx-check:nth-child(even) {
  padding-right: 0;
}

.mx-check:nth-child(n + 3) {
  border-top: 1px solid var(--rule);
}

.mx-check i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 11px;
  border: 1px solid var(--mx-domain);
  color: var(--mx-domain);
  font: 500 0.72rem/1 var(--mono);
  font-style: normal;
}

.mx-check b {
  display: block;
  margin-bottom: 5px;
  color: var(--p-ink);
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.08;
}

.mx-check span {
  color: var(--p-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

.mx-svg {
  display: block;
  width: 100%;
  height: auto;
  border-block: 1px solid var(--rule);
  background:
    linear-gradient(90deg, rgba(27, 24, 19, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27, 24, 19, 0.04) 1px, transparent 1px),
    rgba(236, 228, 211, 0.34);
  background-size: 24px 24px;
}

.mx-svg text {
  fill: var(--p-ink);
  font-family: var(--body);
  letter-spacing: 0;
}

.mx-svg .mx-mono {
  fill: var(--p-faint);
  font-family: var(--mono);
}

.mx-svg .mx-line {
  fill: none;
  stroke: var(--mx-domain);
  stroke-width: 3;
}

.mx-svg .mx-node {
  fill: #fffdf7;
  stroke: var(--mx-domain);
  stroke-width: 1.5;
}

.mx-svg .mx-domain-fill {
  fill: var(--mx-domain);
}

.mx-svg .mx-soft-fill {
  fill: var(--mx-wash);
}

.mx-loop .mx-svg {
  border: 0;
  background: transparent;
}

.mx-test {
  margin-top: 15px;
  padding: 14px 0 0 16px;
  border-left: 4px solid var(--mx-domain);
  color: var(--p-ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .mx-grid-2,
  .mx-checks,
  .mx-loop-grid {
    grid-template-columns: 1fr;
  }

  .mx-panel,
  .mx-panel + .mx-panel,
  .mx-loop,
  .mx-loop + .mx-loop,
  .mx-check,
  .mx-check:nth-child(odd),
  .mx-check:nth-child(even) {
    min-height: auto;
    padding: 18px 0;
    border-left: 0;
  }

  .mx-panel + .mx-panel,
  .mx-loop + .mx-loop,
  .mx-check + .mx-check {
    border-top: 1px solid var(--rule);
  }

  .mx-timeline {
    grid-template-columns: 1fr;
    padding: 0 0 0 25px;
  }

  .mx-timeline::before {
    top: 8px;
    bottom: 8px;
    left: 6px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .mx-timeline::after {
    top: 4px;
    left: 0;
    width: 12px;
    height: 12px;
    animation: none;
  }

  .mx-step,
  .mx-step:first-child,
  .mx-step:last-child {
    padding: 15px 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

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

  .mx-frame {
    padding: 20px;
  }

  .mx-svg {
    width: calc(100% + 40px);
    max-width: none;
    margin-left: -20px;
  }

  .mx-loop .mx-svg {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mx-timeline::after {
    animation: none;
  }
}
