.uf8-finding {
  border-left-color: #9b5d35;
  background: #f4eee4;
}

.uf8-explainer {
  margin: 2.5rem 0;
  padding: 1.4rem;
  overflow: hidden;
  border: 1px solid #d8ccbb;
  border-radius: 18px;
  background: #f5efe4;
  color: #19211f;
  box-shadow: 0 18px 48px rgba(42, 34, 24, 0.08);
}

.uf8-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.15rem;
}

.uf8-head h3 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
}

.uf8-head p {
  max-width: 25rem;
  margin: 0;
  color: #5c625d;
  font-size: 0.88rem;
}

.uf8-eyebrow {
  color: #8c5637;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.uf8-stage {
  position: relative;
  padding: 1rem;
  border: 1px solid #cbbda9;
  border-radius: 14px;
  background: #fffaf1;
}

.uf8-register {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #1f3530;
  color: #fff;
}

.uf8-register span {
  color: #d9c6a6;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.uf8-register strong {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.uf8-register small {
  color: #e7dfd2;
  text-align: right;
}

.uf8-road {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  height: 70px;
  margin: 1rem 2rem 0.2rem;
  background: linear-gradient(#e3d8c8 0 7px, transparent 7px 63px, #e3d8c8 63px);
}

.uf8-road::before,
.uf8-road::after {
  content: "";
  position: absolute;
  left: 0;
  top: 31px;
  height: 8px;
  border-radius: 10px;
}

.uf8-road::before {
  right: 0;
  background: #d7c9b6;
}

.uf8-road::after {
  width: 10%;
  background: #a55f37;
  transition: width 0.65s ease;
}

.uf8-road i {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  justify-self: center;
  border: 4px solid #fffaf1;
  border-radius: 50%;
  background: #b7aa98;
  box-shadow: 0 0 0 1px #8b7c69;
  transition: transform 0.4s ease, background 0.4s ease;
}

.uf8-marker {
  position: absolute;
  left: 2%;
  top: 0;
  padding: 0.24rem 0.42rem;
  border-radius: 5px;
  background: #efe0c9;
  color: #614832;
  font-size: 0.62rem;
  font-weight: 700;
  transition: left 0.65s ease;
}

.uf8-nodes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.uf8-node {
  display: flex;
  min-height: 72px;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.58rem;
  border: 1px solid #ddd1c0;
  border-radius: 9px;
  background: #faf6ef;
  transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.uf8-node b { color: #9b5d35; font-size: 0.65rem; }
.uf8-node span { font-size: 0.78rem; font-weight: 700; }
.uf8-node small { color: #6c706c; font-size: 0.66rem; }

.uf8-actors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.uf8-actors span {
  padding: 0.45rem;
  border: 1px dashed #b9aa95;
  border-radius: 8px;
  color: #5f625e;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.uf8-boundary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: #ece6dc;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.uf8-boundary span::before { content: "↔ "; color: #8c5637; }
.uf8-boundary strong::before { content: "▣ "; color: #1f3530; }

.uf8-live {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
  background: #1f3530;
  color: #fff;
}

.uf8-live strong { color: #d9c6a6; font-size: 0.65rem; letter-spacing: 0.1em; }
.uf8-live span { font-size: 0.78rem; }

.uf8-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.9rem 0;
}

.uf8-controls button {
  padding: 0.46rem 0.72rem;
  border: 1px solid #907c63;
  border-radius: 999px;
  background: #fffaf1;
  color: #25322e;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.uf8-controls button:hover { background: #eadfcf; }
.uf8-controls button:focus-visible { outline: 3px solid #cb7b49; outline-offset: 2px; }

.uf8-controls [data-uf8-counter] {
  margin-left: auto;
  color: #636761;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.uf8-states {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.uf8-states li {
  padding: 0.68rem;
  border: 1px solid #d8ccbb;
  border-radius: 9px;
  background: #fffaf1;
}

.uf8-states strong,
.uf8-states span { display: block; }
.uf8-states strong { color: #7f4e32; font-size: 0.72rem; }
.uf8-states span { margin-top: 0.26rem; color: #5d625e; font-size: 0.66rem; line-height: 1.4; }

.uf8-states li.is-active {
  border-color: #9b5d35;
  background: #f0dfca;
  box-shadow: 0 5px 16px rgba(89, 59, 38, 0.12);
}

.uf8-explainer figcaption { margin-top: 0.85rem; color: #686b67; font-size: 0.72rem; }
.uf8-explainer[data-step="0"] .uf8-road::after { width: 10%; }
.uf8-explainer[data-step="1"] .uf8-road::after { width: 30%; }
.uf8-explainer[data-step="2"] .uf8-road::after { width: 50%; }
.uf8-explainer[data-step="3"] .uf8-road::after { width: 70%; }
.uf8-explainer[data-step="4"] .uf8-road::after { width: 90%; }
.uf8-explainer[data-step="0"] .uf8-marker { left: 2%; }
.uf8-explainer[data-step="1"] .uf8-marker { left: 22%; }
.uf8-explainer[data-step="2"] .uf8-marker { left: 42%; }
.uf8-explainer[data-step="3"] .uf8-marker { left: 62%; }
.uf8-explainer[data-step="4"] .uf8-marker { left: 82%; }

.uf8-explainer[data-step="0"] .uf8-node:nth-child(1),
.uf8-explainer[data-step="1"] .uf8-node:nth-child(2),
.uf8-explainer[data-step="2"] .uf8-node:nth-child(3),
.uf8-explainer[data-step="3"] .uf8-node:nth-child(4),
.uf8-explainer[data-step="4"] .uf8-node:nth-child(5) {
  transform: translateY(-4px);
  border-color: #9b5d35;
  background: #f0dfca;
}

.uf8-explainer[data-step="0"] .uf8-road i:nth-child(1),
.uf8-explainer[data-step="1"] .uf8-road i:nth-child(-n + 2),
.uf8-explainer[data-step="2"] .uf8-road i:nth-child(-n + 3),
.uf8-explainer[data-step="3"] .uf8-road i:nth-child(-n + 4),
.uf8-explainer[data-step="4"] .uf8-road i {
  transform: scale(1.08);
  background: #9b5d35;
}

@media (max-width: 760px) {
  .uf8-explainer { margin-right: -0.5rem; margin-left: -0.5rem; padding: 1rem; }
  .uf8-head { display: block; }
  .uf8-head p { margin-top: 0.55rem; }
  .uf8-register { grid-template-columns: 1fr; }
  .uf8-register small { text-align: left; }
  .uf8-road { margin-right: 0.5rem; margin-left: 0.5rem; }
  .uf8-nodes, .uf8-states { grid-template-columns: 1fr; }
  .uf8-node { min-height: 0; }
  .uf8-actors { grid-template-columns: 1fr 1fr; }
  .uf8-boundary, .uf8-live { display: block; }
  .uf8-boundary strong, .uf8-live span { display: block; margin-top: 0.45rem; }
  .uf8-controls [data-uf8-counter] { width: 100%; margin-left: 0; }
  .uf8-stage { padding: 0.75rem; }
  .uf8-states li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.4rem; }
  .uf8-states span { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .uf8-road::after,
  .uf8-marker,
  .uf8-node,
  .uf8-road i { transition: none !important; }
}
