.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
  padding-block: 88px 96px;
}
.hero h1 {
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 11em;
}
.hero h1.rot {
  display: grid;
}
.hero h1.rot span {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero h1.rot span.on {
  opacity: 1;
}
.hero .hsub {
  margin-top: 22px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--body);
  max-width: 30em;
}
.actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.show {
  max-width: 620px;
  justify-self: end;
  width: 100%;
}
.panel {
  display: grid;
  min-height: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(18, 24, 33, 0.04),
    0 30px 60px -40px rgba(27, 58, 107, 0.4);
  overflow: hidden;
}
.scene {
  grid-area: 1 / 1;
  min-width: 0;
  padding: 28px 32px;
  opacity: 0;
  transition: opacity 0.9s ease;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
}
.scene.on {
  opacity: 1;
}
.scene h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.scene h3 small {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.scene .fig {
  align-self: center;
}

.ingest {
  width: 100%;
  height: auto;
  overflow: visible;
}
.ingest .chip rect {
  fill: var(--surface);
  stroke: var(--line);
}
.ingest text {
  font: 500 13px var(--sans);
  fill: var(--ink);
}
.ingest text.sm {
  font: 12px var(--sans);
  fill: var(--muted);
  font-weight: 400;
}
.ingest .w {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.5;
}
.ingest .wh rect {
  fill: var(--navy);
}
.ingest .wh text {
  fill: #fff;
  text-anchor: middle;
}
.ingest .wh text.sm {
  fill: #b3c3dc;
}
.ingest .pk {
  fill: var(--navy);
  opacity: 0;
}

.runs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.runs th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
.runs th:last-child,
.runs td:last-child {
  text-align: right;
}
.runs td {
  padding: 11px 0;
  border-bottom: 1px solid #edf0f3;
  font-variant-numeric: tabular-nums;
}
.runs td:first-child {
  font-weight: 500;
}
.runs td.n {
  color: var(--body);
}
.runs .st {
  font-style: normal;
  display: inline-block;
  min-width: 72px;
  text-align: left;
  color: var(--muted);
}
.runs .st::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1.5px solid var(--wire);
  vertical-align: 0;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.runs tr.pass .st {
  color: var(--ok);
}
.runs tr.pass .st::before {
  background: var(--ok);
  border-color: var(--ok);
}
.runs tr.pass .st span::after {
  content: "passed";
}
.runs .st span::after {
  content: "running";
}
.runs tfoot td {
  border: 0;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.insight {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.rep {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.rep .t {
  font-size: 13px;
  color: var(--muted);
}
.rep .v {
  margin-top: 2px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rep .v small {
  font-size: 13px;
  font-weight: 500;
  color: var(--ok);
  margin-left: 8px;
  letter-spacing: 0;
}
.rep svg {
  display: block;
  width: 100%;
  height: auto;
  flex: 1 0 auto;
  margin-top: 12px;
  overflow: visible;
}
.rep .ln {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  vector-effect: non-scaling-stroke;
}
.rep .ar {
  fill: var(--navy);
  opacity: 0;
}
.rep.drawn .ln {
  animation: draw 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}
.rep.drawn .ar {
  opacity: 0.08;
  transition: opacity 0.8s ease 1.4s;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.ask {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  font-size: 13.5px;
  line-height: 1.45;
}
.ask .t {
  font-size: 13px;
  color: var(--muted);
}
.ask .q {
  justify-self: end;
  max-width: 92%;
  background: var(--tint);
  color: var(--navy);
  padding: 7px 11px;
  border-radius: 10px 10px 2px 10px;
}
.ask .a {
  color: var(--ink);
}
.ask .a small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.steps {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: step;
}
.steps button {
  all: unset;
  cursor: pointer;
  padding-top: 12px;
  position: relative;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.3;
}
.steps button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
  border-radius: 4px;
}
.steps button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
}
.steps button i {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--navy);
  border-radius: 1px;
}
.steps button[aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
}
.steps button[aria-current="true"] i {
  width: 100%;
  transition: width var(--hold, 6s) linear;
}
.steps button span {
  display: block;
  font-variant-numeric: tabular-nums;
}
.steps button span::before {
  content: counter(step) ". ";
  counter-increment: step;
}
.flow {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 28px 1fr;
  align-items: center;
  column-gap: 0;
}
.fnode {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  min-height: 96px;
  opacity: 0.45;
  transition:
    opacity 0.4s,
    border-color 0.4s,
    box-shadow 0.4s;
}
.fnode.lit {
  opacity: 1;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.1);
}
.fnode.was {
  opacity: 1;
}
.fnode b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.fnode b em {
  font-style: normal;
  font: 11px var(--mono);
  color: #fff;
  background: var(--navy);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: 1px;
}
.fnode span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.fnode .okt {
  color: var(--ok);
}
.fwire {
  display: block;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--wire) 0 5px, transparent 5px 9px);
}
.fwire.lit {
  background: var(--navy);
}
.fnote {
  grid-column: 1 / -1;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--body);
  opacity: 0;
  transition: opacity 0.5s;
}
.fnote.lit {
  opacity: 1;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .show {
    justify-self: start;
  }
}
@media (max-width: 560px) {
  .hero {
    padding-block: 48px 64px;
  }
  .panel {
    min-height: 0;
  }
  .scene {
    padding: 20px 18px;
  }
  .insight {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
  }
  .flow {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }
  .fwire {
    width: 2px;
    height: 16px;
    margin-left: 24px;
    background: repeating-linear-gradient(180deg, var(--wire) 0 5px, transparent 5px 9px);
  }
  .fnode {
    min-height: 0;
  }
  .steps button {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene,
  .hero h1.rot span,
  .steps button i,
  .rep .ar {
    transition: none;
  }
  .rep.drawn .ln {
    animation: none !important;
  }
  .rep .ln {
    stroke-dashoffset: 0;
  }
}
