.road-finding {
  border-left-color: #9a583d;
  background: #f3ecdf;
}

.road-explainer {
  margin: 3.2rem 0;
  overflow: hidden;
  border: 1px solid #d5c8b3;
  border-radius: 22px;
  background: #f4efe5;
  color: #1d292c;
  box-shadow: 0 18px 45px rgba(45, 39, 29, .1);
}

.road-explainer:focus-visible {
  outline: 3px solid #9a583d;
  outline-offset: 4px;
}

.road-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem 1.8rem 1.25rem;
  border-bottom: 1px solid #d5c8b3;
}

.road-head span,
.road-document > span,
.road-decision > span,
.road-gate > span,
.road-clocks span {
  display: block;
  margin-bottom: .35rem;
  color: #805d47;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.road-head h3 {
  margin: 0;
  color: #172528;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  line-height: 1.08;
}

.road-head p {
  max-width: 17rem;
  margin: 0;
  color: #6f665c;
  font-size: .78rem;
  line-height: 1.45;
  text-align: right;
}

.road-figure { margin: 0; }

.road-stage {
  padding: 1.7rem 1.8rem 1.35rem;
  background:
    radial-gradient(circle at 85% 18%, rgba(176, 116, 62, .12), transparent 28%),
    linear-gradient(180deg, #fbf8f1 0%, #eee5d6 100%);
}

.road-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .55rem;
  padding: 0;
  margin: 0 0 1.6rem;
  list-style: none;
}

.road-route::before {
  position: absolute;
  top: 1.1rem;
  right: 8%;
  left: 8%;
  height: 2px;
  content: "";
  background: #c7b8a3;
}

.road-route li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: .14rem;
  color: #74695e;
  text-align: center;
}

.road-route i {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 2px solid #b8aa96;
  border-radius: 50%;
  background: #fbf8f1;
  color: #766b5f;
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  transition: background .35s ease, border-color .35s ease, color .35s ease, transform .35s ease;
}

.road-route strong { font-size: .75rem; }
.road-route small { max-width: 8rem; font-size: .63rem; line-height: 1.25; }
.road-route li.is-past i { border-color: #315f58; background: #dbe7df; color: #244944; }
.road-route li.is-active i { border-color: #9a583d; background: #9a583d; color: #fff; transform: scale(1.12); }
.road-route li.is-active { color: #1d292c; }

.road-system {
  display: grid;
  grid-template-columns: minmax(9rem, .9fr) minmax(3rem, .35fr) minmax(9rem, .9fr) minmax(15rem, 1.5fr);
  align-items: stretch;
  gap: .7rem;
}

.road-site,
.road-file,
.road-clocks,
.road-document,
.road-decision,
.road-gate {
  border: 1px solid #cbbda9;
  border-radius: 13px;
  background: rgba(255, 253, 248, .86);
}

.road-site,
.road-file {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 8rem;
  padding: 1rem;
  text-align: center;
}

.road-site b,
.road-file b { margin-top: .45rem; font-size: .85rem; }
.road-site small,
.road-file small { color: #72675b; font-size: .63rem; }

.road-cut {
  position: relative;
  display: block;
  width: 5.4rem;
  height: 3.2rem;
  overflow: hidden;
  border-radius: 7px;
  background: #d5c3a9;
}

.road-cut::before,
.road-cut::after {
  position: absolute;
  top: -.6rem;
  width: 1.35rem;
  height: 4.4rem;
  content: "";
  background: #4b5553;
  transform: rotate(12deg);
}

.road-cut::before { left: .75rem; }
.road-cut::after { right: .75rem; }

.road-cut i {
  position: absolute;
  z-index: 1;
  top: 1.1rem;
  left: 2.25rem;
  width: 1rem;
  height: 1.5rem;
  border: 2px solid #f2d7ae;
  border-top: 0;
  border-bottom: 0;
  transform: skew(-18deg);
}

.road-track { position: relative; align-self: center; height: 4px; background: #b9ab97; }
.road-track::after { position: absolute; top: -4px; right: -1px; content: ""; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #9a583d; }
.road-track i { position: absolute; top: -5px; left: 0; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #9a583d; box-shadow: 0 0 0 1px #9a583d; transform: translateX(0); transition: transform .65s cubic-bezier(.2,.8,.2,1); }
.road-explainer[data-step="1"] .road-track i { transform: translateX(35%); }
.road-explainer[data-step="2"] .road-track i { transform: translateX(85%); }
.road-explainer[data-step="3"] .road-track i { transform: translateX(145%); }
.road-explainer[data-step="4"] .road-track i { transform: translateX(220%); }

.road-file span {
  position: relative;
  display: block;
  width: 3rem;
  height: 3.7rem;
  border: 2px solid #9a583d;
  border-radius: 4px;
  background: repeating-linear-gradient(to bottom, transparent 0 8px, #dfd1bf 8px 9px);
}

.road-file span::after {
  position: absolute;
  right: -.25rem;
  bottom: -.25rem;
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  content: "✓";
  border-radius: 50%;
  background: #315f58;
  color: #fff;
  font-size: .7rem;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .3s ease, transform .3s ease;
}

.road-explainer[data-step="4"] .road-file span::after { opacity: 1; transform: scale(1); }

.road-clocks { display: grid; grid-template-columns: repeat(2, 1fr); }
.road-clocks div { padding: .62rem .8rem; border-right: 1px solid #ded3c3; border-bottom: 1px solid #ded3c3; }
.road-clocks div:nth-child(2n) { border-right: 0; }
.road-clocks div:nth-child(n+3) { border-bottom: 0; }
.road-clocks span { margin-bottom: .12rem; font-size: .56rem; }
.road-clocks b { display: block; font-size: .73rem; line-height: 1.25; transition: color .3s ease; }
.road-explainer[data-step="4"] .road-clocks b { color: #315f58; }

.road-document,
.road-decision,
.road-gate { margin-top: .7rem; padding: .75rem .9rem; }
.road-document { display: grid; grid-template-columns: 1fr 1.5fr 1fr; align-items: center; gap: .8rem; }
.road-document > span { margin: 0; }
.road-document b,
.road-decision b,
.road-gate b { font-size: .78rem; line-height: 1.3; }
.road-document small { color: #6c6257; font-size: .69rem; text-align: right; }
.road-decision,
.road-gate { display: inline-grid; width: calc(50% - .5rem); min-height: 5.3rem; vertical-align: top; }
.road-gate { margin-left: .65rem; }

.road-live {
  display: flex;
  gap: .75rem;
  align-items: baseline;
  padding: 1rem 1.8rem;
  border-top: 1px solid #d5c8b3;
  border-bottom: 1px solid #d5c8b3;
  background: #1d292c;
  color: #fff;
}

.road-live strong { flex: 0 0 34%; color: #e8c7aa; font-size: .85rem; }
.road-live span { font-size: .8rem; line-height: 1.45; }
.road-controls { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; padding: 1rem 1.8rem .7rem; }
.road-controls button { min-height: 2.3rem; padding: .48rem .76rem; border: 1px solid #aa9984; border-radius: 999px; background: #fffdf8; color: #1d292c; font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; }
.road-controls button:hover { border-color: #9a583d; color: #7b402d; }
.road-controls button:focus-visible { outline: 3px solid rgba(154, 88, 61, .35); outline-offset: 2px; }
.road-counter { margin-left: auto; color: #6d6256; font-size: .72rem; font-variant-numeric: tabular-nums; }
.road-figure figcaption { padding: 0 1.8rem 1.25rem; color: #6d6256; font-size: .72rem; line-height: 1.45; }

.road-state-copy {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0;
  margin: 0;
  border-top: 1px solid #d5c8b3;
  list-style: none;
}

.road-state-copy li { min-height: 8rem; padding: 1rem; border-right: 1px solid #d5c8b3; background: #eee6d9; color: #645b51; transition: background .35s ease, color .35s ease; }
.road-state-copy li:last-child { border-right: 0; }
.road-state-copy strong,
.road-state-copy span { display: block; }
.road-state-copy strong { margin-bottom: .4rem; font-size: .75rem; line-height: 1.25; }
.road-state-copy span { font-size: .68rem; line-height: 1.45; }
.road-state-copy li.is-active { background: #fffaf1; color: #1d292c; box-shadow: inset 0 4px 0 #9a583d; }

@media (max-width: 760px) {
  .road-head { display: block; padding: 1.3rem 1.1rem 1rem; }
  .road-head p { max-width: none; margin-top: .7rem; text-align: left; }
  .road-stage { padding: 1.25rem 1.05rem 1rem; }
  .road-route { overflow-x: auto; grid-template-columns: repeat(5, minmax(6.8rem, 1fr)); padding-bottom: .45rem; }
  .road-route::before { right: 3rem; left: 3rem; }
  .road-system { grid-template-columns: 1fr 2.5rem 1fr; }
  .road-clocks { grid-column: 1 / -1; }
  .road-document { grid-template-columns: 1fr; }
  .road-document small { text-align: left; }
  .road-decision,
  .road-gate { display: grid; width: 100%; min-height: auto; }
  .road-gate { margin-left: 0; }
  .road-live { display: block; padding: .9rem 1.1rem; }
  .road-live strong,
  .road-live span { display: block; }
  .road-live span { margin-top: .35rem; }
  .road-controls { padding: .9rem 1.1rem .65rem; }
  .road-counter { flex-basis: 100%; margin: .2rem 0 0; }
  .road-figure figcaption { padding: 0 1.1rem 1rem; }
  .road-state-copy { grid-template-columns: 1fr; }
  .road-state-copy li { min-height: auto; border-right: 0; border-bottom: 1px solid #d5c8b3; }
  .road-state-copy li:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .road-explainer *,
  .road-explainer *::before,
  .road-explainer *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
