.chain-finding { border-left-color: #a56545; background: #f3e8d9; }

.chain-explainer {
  margin: 2.6rem 0 3rem;
  overflow: hidden;
  border: 1px solid #d6c3a9;
  border-radius: 22px;
  background: #f2ebdf;
  color: #172823;
  box-shadow: 0 18px 44px rgba(45, 39, 30, .11);
}
.chain-explainer:focus-visible { outline: 3px solid #a56545; outline-offset: 4px; }
.chain-head { display: flex; justify-content: space-between; gap: 2rem; padding: 1.55rem 1.7rem 1.2rem; border-bottom: 1px solid #d6c3a9; }
.chain-head span,
.chain-origin span,
.chain-port > span,
.chain-document > span,
.chain-outcomes span { display: block; margin-bottom: .35rem; color: #875a3f; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.chain-head h3 { margin: 0; color: #172823; font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.1; }
.chain-head p { max-width: 18rem; margin: 0; color: #6b6257; font-size: .76rem; line-height: 1.45; text-align: right; }
.chain-figure { margin: 0; }
.chain-stage { padding: 1.6rem 1.7rem 1.25rem; background: radial-gradient(circle at 12% 12%, rgba(165,101,69,.13), transparent 28%), radial-gradient(circle at 88% 82%, rgba(43,88,78,.12), transparent 30%), linear-gradient(180deg,#fdfaf4,#e9dece); }

.chain-route { position: relative; display: grid; grid-template-columns: repeat(5,1fr); gap: .4rem; padding: 0; margin: 0 0 1.4rem; list-style: none; }
.chain-route::before { position: absolute; top: 1.05rem; right: 8%; left: 8%; height: 2px; content: ""; background: #c5b399; }
.chain-route li { position: relative; z-index: 1; display: grid; justify-items: center; gap: .14rem; color: #71665a; text-align: center; }
.chain-route i { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border: 2px solid #b5a58f; border-radius: 50%; background: #fbf8f2; color: #75695d; font-size: .65rem; font-style: normal; font-weight: 700; transition: transform .35s ease, background .35s ease, border-color .35s ease, color .35s ease; }
.chain-route strong { font-size: .72rem; }
.chain-route small { max-width: 7rem; font-size: .6rem; line-height: 1.25; }
.chain-route li.is-past i { border-color: #2b584e; background: #dce7df; color: #21483f; }
.chain-route li.is-active i { border-color: #a56545; background: #a56545; color: #fff; transform: scale(1.12); }
.chain-route li.is-active { color: #172823; }

.chain-map { position: relative; min-height: 13rem; overflow: hidden; border: 1px solid #c9b89f; border-radius: 15px; background: linear-gradient(180deg,#e4ebe4 0 55%,#e8dcc8 55%); }
.chain-map::before { position: absolute; inset: 0; content: ""; opacity: .4; background-image: radial-gradient(#8a9a8b .7px,transparent .7px); background-size: 18px 18px; }
.chain-origin,
.chain-port { position: absolute; z-index: 2; top: 50%; display: grid; align-content: center; width: 8.2rem; min-height: 6.1rem; padding: .8rem; transform: translateY(-50%); border: 1px solid #b8a68f; border-radius: 12px; background: #fffcf6; text-align: center; box-shadow: 0 8px 24px rgba(48,42,32,.09); }
.chain-origin { left: 4%; }
.chain-port { right: 4%; border-color: #2b584e; background: #e8f0e9; }
.chain-origin b,
.chain-port b { font-size: .78rem; line-height: 1.35; }
.chain-port b { color: #214c43; }
.chain-road { position: absolute; z-index: 1; right: 12%; left: 12%; height: 2.4rem; border-radius: 999px; }
.chain-road span { position: absolute; top: -.95rem; left: 50%; width: max-content; transform: translateX(-50%); color: #625a50; font-size: .58rem; font-weight: 700; letter-spacing: .08em; }
.road-current { top: 40%; border: 1px solid #464a45; background: repeating-linear-gradient(90deg,#656963 0 26px,#5b5f5a 26px 52px); box-shadow: inset 0 0 0 .72rem #656963; }
.road-current::after { position: absolute; top: 50%; right: 2%; left: 2%; height: 2px; content: ""; transform: translateY(-50%); background: repeating-linear-gradient(90deg,#f3d99a 0 20px,transparent 20px 34px); }
.road-future { top: 70%; border: 2px dashed #aa8068; background: rgba(255,252,246,.55); }
.road-future em { position: absolute; top: 50%; left: 50%; padding: .22rem .45rem; transform: translate(-50%,-50%); border-radius: 999px; background: #efe1cf; color: #865b43; font-size: .59rem; font-style: normal; font-weight: 700; }
.chain-truck { position: absolute; z-index: 3; top: 50%; left: 13%; width: 3.4rem; height: 1.35rem; transform: translateY(-50%); border: 2px solid #173f38; border-radius: 3px; background: #f5ead6; transition: left .8s cubic-bezier(.2,.8,.2,1), transform .35s ease; }
.chain-truck::before { position: absolute; right: -1rem; bottom: -2px; width: 1rem; height: .92rem; content: ""; border: 2px solid #173f38; border-radius: 2px 5px 2px 2px; background: #d8e6df; }
.chain-truck::after { position: absolute; right: -.84rem; bottom: -.42rem; width: .5rem; height: .5rem; content: ""; border: 2px solid #e9dece; border-radius: 50%; background: #173f38; box-shadow: -2.95rem 0 0 -1px #173f38; }
.chain-crane { position: relative; display: block; width: 2.5rem; height: 1.7rem; margin: .45rem auto 0; border-left: 3px solid #2b584e; border-top: 3px solid #2b584e; }
.chain-crane::before { position: absolute; top: -3px; right: -.1rem; width: 1.8rem; height: 3px; content: ""; background: #2b584e; transform: rotate(15deg); transform-origin: left; }
.chain-crane::after { position: absolute; top: .15rem; right: -.45rem; width: 1px; height: 1rem; content: ""; background: #2b584e; }
.chain-explainer[data-step="0"] .chain-truck { left: 14%; }
.chain-explainer[data-step="1"] .chain-truck { left: 28%; }
.chain-explainer[data-step="2"] .chain-truck { left: 45%; }
.chain-explainer[data-step="3"] .chain-truck { left: 61%; transform: translateY(-50%) rotate(-3deg); }
.chain-explainer[data-step="4"] .chain-truck { left: 76%; }
.chain-explainer[data-step="3"] .road-current { box-shadow: inset 0 0 0 .72rem #656963, 0 0 0 3px rgba(165,75,59,.35); }
.chain-explainer[data-step="4"] .chain-port { box-shadow: inset 0 0 0 2px #2b584e, 0 8px 24px rgba(48,42,32,.09); }

.chain-document { display: grid; grid-template-columns: 1fr 1.45fr 1fr; align-items: center; gap: .7rem; margin-top: .7rem; padding: .75rem .85rem; border: 1px solid #c9b89f; border-radius: 11px; background: rgba(255,253,248,.92); }
.chain-document > span { margin: 0; }
.chain-document b { font-size: .75rem; line-height: 1.35; }
.chain-document small { color: #6a6157; font-size: .66rem; text-align: right; }
.chain-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .65rem; }
.chain-outcomes div { padding: .72rem .85rem; border: 1px solid #c9b89f; border-radius: 11px; background: rgba(255,253,248,.92); }
.chain-outcomes div:last-child { border-style: dashed; }
.chain-outcomes b { font-size: .75rem; line-height: 1.35; }

.chain-live { display: flex; gap: .8rem; align-items: baseline; padding: .95rem 1.7rem; border-block: 1px solid #d6c3a9; background: #1c332e; color: #fff; }
.chain-live strong { flex: 0 0 34%; color: #edcdb0; font-size: .82rem; }
.chain-live span { font-size: .76rem; line-height: 1.45; }
.chain-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .9rem 1.7rem .65rem; }
.chain-controls button { min-height: 2.25rem; padding: .45rem .72rem; border: 1px solid #a9977f; border-radius: 999px; background: #fffdf8; color: #1c332e; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; }
.chain-controls button:hover { border-color: #a56545; color: #76422f; }
.chain-controls button:focus-visible { outline: 3px solid rgba(165,101,69,.34); outline-offset: 2px; }
.chain-counter { margin-left: auto; color: #6c6156; font-size: .7rem; font-variant-numeric: tabular-nums; }
.chain-figure figcaption { padding: 0 1.7rem 1.15rem; color: #6c6156; font-size: .7rem; line-height: 1.45; }
.chain-state-copy { display: grid; grid-template-columns: repeat(5,1fr); padding: 0; margin: 0; border-top: 1px solid #d6c3a9; list-style: none; }
.chain-state-copy li { min-height: 7.6rem; padding: .9rem; border-right: 1px solid #d6c3a9; background: #ece2d4; color: #655b51; transition: background .35s ease, color .35s ease; }
.chain-state-copy li:last-child { border-right: 0; }
.chain-state-copy strong,
.chain-state-copy span { display: block; }
.chain-state-copy strong { margin-bottom: .38rem; font-size: .72rem; line-height: 1.25; }
.chain-state-copy span { font-size: .65rem; line-height: 1.45; }
.chain-state-copy li.is-active { background: #fffaf1; color: #1c332e; box-shadow: inset 0 4px 0 #a56545; }

@media (max-width: 760px) {
  .chain-head { display: block; padding: 1.25rem 1.05rem 1rem; }
  .chain-head p { max-width: none; margin-top: .7rem; text-align: left; }
  .chain-stage { padding: 1.2rem 1rem 1rem; }
  .chain-route { overflow-x: auto; grid-template-columns: repeat(5,minmax(6.7rem,1fr)); padding-bottom: .4rem; }
  .chain-route::before { right: 3rem; left: 3rem; }
  .chain-map { min-height: 16rem; }
  .chain-origin,.chain-port { top: 1rem; width: 7.2rem; min-height: 4.7rem; transform: none; }
  .chain-origin { left: 1rem; }
  .chain-port { right: 1rem; }
  .road-current { top: 52%; right: 8%; left: 8%; }
  .road-future { top: 76%; right: 8%; left: 8%; }
  .chain-document { grid-template-columns: 1fr; }
  .chain-document small { text-align: left; }
  .chain-live { display: block; padding: .85rem 1.05rem; }
  .chain-live strong,.chain-live span { display: block; }
  .chain-live span { margin-top: .35rem; }
  .chain-controls { padding: .85rem 1.05rem .6rem; }
  .chain-counter { flex-basis: 100%; margin: .15rem 0 0; }
  .chain-figure figcaption { padding: 0 1.05rem 1rem; }
  .chain-state-copy { grid-template-columns: 1fr; }
  .chain-state-copy li { min-height: auto; border-right: 0; border-bottom: 1px solid #d6c3a9; }
  .chain-state-copy li:last-child { border-bottom: 0; }
}
@media (max-width: 430px) {
  .chain-map { min-height: 17rem; }
  .chain-origin,.chain-port { width: 6.35rem; padding: .55rem; }
  .chain-truck { transition: none; }
  .chain-outcomes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .chain-explainer *, .chain-explainer *::before, .chain-explainer *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
