[data-pilot-demo] {
  width: min(100%, 50rem);
  margin-inline: auto;
  color: #f7f0ff;
}

.wd-pilot-card {
  display: grid;
  gap: clamp(.85rem, 2.4vh, 1.35rem);
  padding: clamp(1rem, 2.4vw, 1.8rem);
  border: 1px solid #554660;
  border-radius: 14px;
  background: #281e31;
}

.wd-pilot-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.wd-pilot-header > div:first-child { flex: 1 1 14rem; }
.wd-pilot-header p.wd-pilot-source { margin-bottom: .35rem; color: #d3bfdc; font-size: .875rem; }
.wd-pilot-header h3 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.wd-pilot-periods {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid #6c5779;
  border-radius: 8px;
  background: #1d1525;
}

.wd-pilot-periods button {
  min-height: 40px;
  padding: .3rem .6rem;
  border: 0;
  border-radius: 5px;
  color: #dccfe4;
  background: transparent;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
}

.wd-pilot-periods button:hover { color: white; }
.wd-pilot-periods button[aria-pressed="true"] { color: #281732; background: #e0c3f8; }
#demo-app .wd-pilot-periods button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.wd-pilot-groups { display: grid; gap: .85rem; margin: 0; }
.wd-pilot-group {
  --pilot-fill: #d6aafb;
  display: grid;
  align-items: baseline;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .35rem .65rem;
}

.wd-pilot-group:nth-child(2) { --pilot-fill: #ac9fb8; }
.wd-pilot-group dt { font-weight: 650; }
.wd-pilot-group dd { display: contents; }
.wd-pilot-count { color: #d0bfda; font-size: .875rem; }
.wd-pilot-rate { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.05; }
.wd-pilot-track {
  grid-column: 1 / -1;
  position: relative;
  height: 12px;
  overflow: hidden;
  background: #493c53;
}

.wd-pilot-track i { display: block; height: 100%; background: var(--pilot-fill); transition: width .3s ease-out; }
/* One block per participant in the twenty-person group. */
.wd-pilot-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent calc(100% - 2px), #281e31 0) 0 0 / 5% 100% repeat-x;
}

.wd-pilot-card p.wd-pilot-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin: 0;
  padding-top: .75rem;
  border-top: 1px solid #54465f;
  color: #d7c8e0;
  font-size: .9rem;
}
.wd-pilot-result strong { flex: none; color: #ebd5ff; font-variant-numeric: tabular-nums; }

@media (max-width: 420px) {
  .wd-pilot-card { padding: .8rem; }
  .wd-pilot-group { gap: .35rem .5rem; }
  .wd-pilot-group dt { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wd-pilot-track i { transition: none; }
}
