.wire {
  position: relative;
  height: 2px;
  min-width: 24px;
  background: repeating-linear-gradient(90deg, var(--wire) 0 6px, transparent 6px 11px);
}

.model {
  display: grid;
  grid-template-columns:
    auto 64px auto minmax(28px, 1fr) auto minmax(28px, 1fr) auto minmax(28px, 1fr)
    auto;
  align-items: center;
}
.srcs {
  display: grid;
  gap: 10px;
}
.chip {
  font: 13px/18px var(--mono);
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--body);
  white-space: nowrap;
}
.fan {
  width: 64px;
  height: 174px;
  overflow: visible;
}
.fan path {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.fan circle {
  fill: var(--navy);
}
.tier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 10px;
  min-width: 150px;
}
.tier b {
  display: block;
  font-weight: 600;
  font-size: 15px;
}
.tier .sub {
  display: block;
  font: 11.5px var(--mono);
  color: var(--muted);
  margin-bottom: 8px;
}
.tier .r {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 12.5px/1.9 var(--mono);
  color: var(--body);
  border-top: 1px dashed #e5e8ec;
}
.tier .r em {
  font-style: normal;
  color: var(--ok);
}
.tier.gold {
  border-color: #b8c6dc;
}
.tier.gold b {
  color: var(--navy);
}
.uses {
  display: grid;
  gap: 12px;
}
.use {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  width: 190px;
}
.use b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.bars {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 40px;
}
.bars span {
  flex: 1;
  background: var(--navy);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
  transform-origin: bottom;
}
.mini-chat {
  font-size: 12.5px;
  line-height: 1.4;
}
.mini-chat .q2 {
  color: var(--muted);
}
.mini-chat .a2 {
  margin-top: 4px;
}
.mini-chat .a2 small {
  display: block;
  font: 11px var(--mono);
  color: var(--muted);
}
.model .w1 {
  display: none;
}
.wire i {
  --sx: 0;
  --sy: -3px;
  --ex: calc(100% - 8px);
  --ey: -3px;
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
  opacity: 0;
}
.run .model .wire i {
  animation: hop 4.8s linear infinite;
}
.run .model .wire i:nth-child(2) {
  animation-name: hop2;
}
.run .model .wire i:nth-child(3) {
  animation-name: hop3;
}
.run .model .w2 i {
  animation-delay: 1.2s;
}
.run .model .w3 i {
  animation-delay: 2.4s;
}
.run .model .w4 i {
  animation-delay: 3.6s;
}
@keyframes hop {
  0% {
    left: var(--sx);
    top: var(--sy);
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  15% {
    left: var(--ex);
    top: var(--ey);
    opacity: 1;
  }
  17%,
  100% {
    left: var(--ex);
    top: var(--ey);
    opacity: 0;
  }
}
@keyframes hop2 {
  0%,
  3% {
    left: var(--sx);
    top: var(--sy);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  18% {
    left: var(--ex);
    top: var(--ey);
    opacity: 1;
  }
  20%,
  100% {
    left: var(--ex);
    top: var(--ey);
    opacity: 0;
  }
}
@keyframes hop3 {
  0%,
  6% {
    left: var(--sx);
    top: var(--sy);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  21% {
    left: var(--ex);
    top: var(--ey);
    opacity: 1;
  }
  23%,
  100% {
    left: var(--ex);
    top: var(--ey);
    opacity: 0;
  }
}
.run .model .glow {
  animation: glow 4.8s ease-out infinite;
}
.run .model .t1 {
  animation-delay: 0.8s;
}
.run .model .t2 {
  animation-delay: 2s;
}
.run .model .t3 {
  animation-delay: 3.2s;
}
.run .model .uses .glow {
  animation-delay: 4.4s;
}
@keyframes glow {
  0% {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.14);
  }
  12%,
  100% {
    border-color: var(--line);
    box-shadow: none;
  }
}
.run .model .tier.gold.glow {
  animation-name: glow-gold;
}
@keyframes glow-gold {
  0% {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.14);
  }
  12%,
  100% {
    border-color: #b8c6dc;
    box-shadow: none;
  }
}
.run .model .bars span {
  animation: grow 4.8s ease-out infinite;
  animation-delay: 4.4s;
}
@keyframes grow {
  0% {
    transform: scaleY(0.4);
  }
  10%,
  100% {
    transform: scaleY(1);
  }
}

.why {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.why p {
  color: var(--body);
}
.why p + p {
  margin-top: 12px;
}
.why b {
  color: var(--ink);
  font-weight: 600;
}
.stack-h {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.marks span {
  font: 600 14px var(--sans);
  padding: 8px 13px;
  letter-spacing: -0.01em;
  color: #4b5563;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

@media (max-width: 1100px) {
  .model {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .fan {
    display: none;
  }
  .model .w1 {
    display: block;
  }
  .model .wire {
    width: 2px;
    height: 28px;
    min-width: 0;
    background: repeating-linear-gradient(180deg, var(--wire) 0 6px, transparent 6px 11px);
  }
  .model .wire i {
    --sx: -3px;
    --sy: 0;
    --ex: -3px;
    --ey: calc(100% - 8px);
  }
  .srcs,
  .uses {
    grid-auto-flow: column;
  }
  .tier {
    width: min(100%, 320px);
  }
}
@media (max-width: 900px) {
  .why {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 560px) {
  .srcs,
  .uses {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
  }
  .use {
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .run .model * {
    animation: none !important;
  }
}
