.material-journey {
  --journey-ink: #174261;
  --journey-paper: #fffaf0;
  --journey-wire: #d5bc8e;
  --journey-gap: clamp(13px, 2.05vw, 32px);
  padding: clamp(27px, 3.4vw, 51px);
  background: linear-gradient(110deg, #fffdf7, #fff8e9 66%, #fffaf3);
  border: 1px solid #e4d9c4;
  border-radius: 25px;
  color: var(--navy);
}
.material-journey .journey-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.material-journey .journey-head h2 { max-width: none; font-size: clamp(27px, 3.2vw, 46px); }
.material-journey .journey-head .eyebrow { margin-bottom: 8px; color: #78511d; background: #f7e9cd; }
.material-journey .journey-head a { flex-shrink: 0; }
.material-journey .journey-stages { margin: 21px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: var(--journey-gap); }
.material-journey .journey-stage { position: relative; display: grid; align-content: start; grid-template-rows: auto 32px auto; min-width: 0; }
.material-journey .journey-scene { display: block; width: 100%; max-width: 200px; height: clamp(87px, 8vw, 122px); margin-inline: auto; transform-origin: center bottom; }
.material-journey .journey-node { display: grid; place-items: center; width: 27px; height: 27px; margin-block: 3px 2px; position: relative; border-radius: 50%; color: #fff; background: var(--journey-ink); border: 3px solid var(--journey-paper); box-sizing: content-box; font-size: 11px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; justify-self: start; }
.material-journey .journey-stage:not(:last-child)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset-inline-start: 33px;
  inset-inline-end: calc(0px - var(--journey-gap));
  top: calc(clamp(87px,8vw,122px) + 19px);
  border-top: 1px solid var(--journey-wire);
  pointer-events: none;
}
.material-journey .journey-caption { padding-top: 12px; }
.material-journey .journey-caption h3 { margin: 0; color: var(--journey-ink); letter-spacing: -.015em; font-size: clamp(16px,1.33vw,20px); line-height: 1.3; }
html:lang(ar) .material-journey .journey-caption h3 { letter-spacing: 0; line-height: 1.55; }
.material-journey .journey-caption p { margin: 6px 0 0; color: #4b5b60; max-width: 37ch; font-size: 14px; line-height: 1.58; }
html:lang(ar) .material-journey .journey-caption p { line-height: 1.78; }
.material-journey .journey-scene .j-line { stroke: var(--journey-ink); stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.material-journey .journey-scene .j-fine { stroke-width: 1.25; }
.material-journey .journey-scene .j-shadow { fill: #dbceb4; opacity: .59; }
.material-journey .journey-scene .j-navy { fill: #204b66; }
.material-journey .journey-scene .j-blue { fill: #78a7bb; }
.material-journey .journey-scene .j-light { fill: #d6e5e6; }
.material-journey .journey-scene .j-gold { fill: #e9b85c; }
.material-journey .journey-scene .j-green { fill: #507b65; }
.material-journey .journey-scene .j-cream { fill: #f6ead0; }
.material-journey .journey-scene .j-clear { fill: none; }
.material-journey .journey-scene .j-inkwhite { fill: none; stroke: #fffaf0; }
.material-journey .journey-scene .j-inkgold { fill: none; stroke: #e8b559; }
.material-journey .journey-scene .j-inkbrown { fill: none; stroke: #a0732e; }
@media screen and (min-width: 841px) and (prefers-reduced-motion: no-preference) {
  .material-journey.sequence-visible .journey-scene { animation: journey-arrival 480ms cubic-bezier(.16,.65,.22,1) both; }
  .material-journey.sequence-visible .journey-stage:nth-child(2) .journey-scene { animation-delay: 90ms; }
  .material-journey.sequence-visible .journey-stage:nth-child(3) .journey-scene { animation-delay: 180ms; }
  .material-journey.sequence-visible .journey-stage:nth-child(4) .journey-scene { animation-delay: 270ms; }
  .material-journey.sequence-visible .journey-stage:nth-child(5) .journey-scene { animation-delay: 360ms; }
  @keyframes journey-arrival { from { transform: translateY(5px); opacity: .74; } to { transform: translateY(0); opacity: 1; } }
}
@media screen and (max-width: 840px) {
  .material-journey { padding: clamp(18px,4vw,30px); }
  .material-journey .journey-head { align-items: flex-start; flex-wrap: wrap; gap: 5px 14px; }
  .material-journey .journey-head h2 { max-width: 29ch; }
  .material-journey .journey-stages { grid-template-columns: minmax(0,1fr); gap: 0; margin-top: 15px; }
  .material-journey .journey-stage { grid-template-columns: 27px clamp(68px,12vw,100px) minmax(0,1fr); grid-template-rows: auto; align-items: center; gap: 7px; padding-block: 11px; }
  .material-journey .journey-stage:not(:last-child) { border-bottom: 1px solid #e8dfcf; }
  .material-journey .journey-scene { grid-column: 2; grid-row: 1; height: auto; width: 100%; }
  .material-journey .journey-node { grid-column: 1; grid-row: 1; width: 21px; height: 21px; margin: 0; font-size: 10px; }
  .material-journey .journey-stage:not(:last-child)::before { display: none; }
  .material-journey .journey-caption { grid-column: 3; grid-row: 1; padding: 0; }
  .material-journey .journey-caption p { max-width: 65ch; margin-top: 3px; font-size: 13px; }
}
@media screen and (max-width: 400px) {
  .material-journey .journey-stage { grid-template-columns: 67px minmax(0,1fr); gap: 10px; }
  .material-journey .journey-node { grid-column: 1; align-self: end; justify-self: center; width: 19px; height: 19px; margin: 0; font-size: 9px; }
  .material-journey .journey-scene { grid-column: 1; padding-bottom: 17px; }
  .material-journey .journey-caption { grid-column: 2; }
}
@media print {
  .material-journey { break-inside: avoid; margin: 0 0 3mm; padding: 3mm; border-radius: 3mm; }
  .material-journey .journey-head { display: flex; justify-content: space-between; }
  .material-journey .journey-head .eyebrow { font-size: 7.5pt; margin-bottom: 1mm; }
  .material-journey .journey-head h2 { max-width: none; font-size: 15pt; }
  .material-journey .journey-head .text-link { display: none; }
  .material-journey .journey-stages { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2mm; margin-top: 2mm; }
  .material-journey .journey-stage { grid-template-rows: auto 5mm auto; }
  .material-journey .journey-scene { width: 100%; height: 16mm; }
  .material-journey .journey-node { margin: 0; width: 4mm; height: 4mm; font-size: 6pt; border-width: .5mm; }
  .material-journey .journey-stage:not(:last-child)::before { inset-inline-start: 5mm; inset-inline-end: -2mm; top: 18.5mm; }
  .material-journey .journey-caption { padding-top: 1mm; }
  .material-journey .journey-caption h3, html:lang(ar) .material-journey .journey-caption h3 { font-size: 8.2pt; line-height: 1.35; }
  .material-journey .journey-caption p, html:lang(ar) .material-journey .journey-caption p { font-size: 7.7pt; line-height: 1.4; margin-top: 1mm; }
}
