.aps-scroll { overflow-x: auto; border: 1px solid #d6c9b5; background: #fffdf8; }
.aps-chart { width: 100%; min-width: 780px; border-collapse: collapse; font-size: .82rem; }
.aps-chart th { width: 138px; padding: 8px 12px; text-align: left; }
.aps-chart tr > th[colspan] { padding-top: 13px; border-top: 1px solid #d6c9b5; color: #173f52; }
.aps-chart td { padding-right: 18px; }
.aps-axis { display: flex; justify-content: space-between; padding: 10px 0; color: #4a5968; }
.aps-track {
  position: relative;
  height: 32px;
  background-image: repeating-linear-gradient(to right, #c9d7da66 0 1px, transparent 1px calc(100% / 6));
  background-color: #f1f5f4;
}
.aps-track::before,
.aps-track::after { content: ""; position: absolute; inset-block: 0; border-left: 1px dashed; }
.aps-track::before { left: calc(100% * 3 / 18); color: #9b721c; }
.aps-track::after { left: calc(100% * 14 / 18); color: #bd4741; }
.aps-bar {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: calc(var(--start) * 100% / 18);
  width: calc(var(--length) * 100% / 18);
  padding: 5px 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-radius: 4px;
  font-size: .75rem;
}
.aps-chart .original, .aps-legend .original { background: #aabbd0; color: #14243b; }
.aps-chart .rescheduled, .aps-legend .rescheduled { background: #176575; color: #fff; }
.aps-chart .rush, .aps-legend .rush { background: #e7c36c; color: #282013; }
.aps-chart .delay, .aps-legend .delay { background: #ad3937; color: #fff; }
.aps-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 12px; list-style: none; border-top: 1px solid #e2dbce; font-size: .82rem; }
.aps-legend li { display: flex; align-items: center; gap: 7px; }
.aps-legend span { width: 10px; height: 10px; border-radius: 50%; }
#videoUnavailable { color: #fff; padding: 18px; text-align: center; }

.aps-workflow {
  --diagram-center: 50%;
  position: relative;
}

.aps-workflow h3 {
  position: absolute;
  top: 26px;
  left: 69%;
  margin: 0;
  font-size: clamp(1.05rem, 1.65vw, 1.4rem);
  line-height: 1.24;
}

.aps-model {
  padding-top: var(--connector-length);
}

.aps-chart-connector {
  position: absolute;
  top: 0;
  left: var(--diagram-center);
  width: 2px;
  height: calc(var(--connector-length) + 6px);
  background: #176575;
  pointer-events: none;
}

.aps-chart-connector span {
  position: absolute;
  top: 0;
  left: -5px;
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: #176575;
}

.aps-layers {
  display: flex;
  flex-direction: column-reverse;
  margin: 0;
  padding: var(--tier-top-gap) 0 0 30%;
  list-style: none;
}

.aps-layer {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
  align-items: center;
  min-height: 65px;
  --tier-inset: 0%;
  --callout-gap: clamp(20px, 3vw, 44px);
  --tier-top: #dce8ef;
  --tier-face: #a5b8c9;
  --tier-line: #647f97;
  --tier-ink: #14243b;
}

.aps-layer-2 {
  --tier-inset: 5%;
  --tier-top: #f5e8c1;
  --tier-face: #d6b35c;
  --tier-line: #987529;
}

.aps-layer-3 {
  --tier-inset: 10%;
  --tier-top: #d0e9e8;
  --tier-face: #176575;
  --tier-line: #176575;
  --tier-ink: #fff;
}

.aps-tread {
  position: relative;
  align-self: stretch;
  min-height: 65px;
  isolation: isolate;
}

.aps-tread::before {
  content: "";
  position: absolute;
  inset: 0 var(--tier-inset) 50%;
  background: var(--tier-top);
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
  z-index: -1;
}

.aps-tread h4 {
  position: absolute;
  inset: calc(50% - 10px) var(--tier-inset) auto;
  display: grid;
  place-items: center;
  min-height: 29px;
  margin: 0;
  padding: 3px 11px;
  border-bottom: 3px solid var(--tier-line);
  background: var(--tier-face);
  color: var(--tier-ink);
  text-align: center;
  font-size: clamp(.73rem, 1.2vw, .95rem);
  line-height: 1.2;
}

.aps-connector {
  position: absolute;
  top: calc(50% + 4px);
  left: calc(100% - var(--tier-inset));
  right: calc(-1 * var(--callout-gap));
  border-top: 1px solid var(--tier-line);
}

.aps-connector::before {
  content: "";
  position: absolute;
  left: -8px;
  top: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tier-ink);
}

.aps-object {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 92px;
  height: 33px;
  transform: translateX(-50%) scale(.9);
  transform-origin: center top;
  filter: drop-shadow(1px 3px 2px #19364c44);
  pointer-events: none;
}

.aps-object i { position: absolute; display: block; }

.aps-object-twin i,
.aps-object-data i {
  bottom: 1px;
  width: 22px;
  height: 20px;
  background: linear-gradient(150deg, #b0d0e5 0 19%, #518eb5 20% 78%, #386583 79%);
  border: 1px solid #5794b4;
  border-radius: 2px;
}
.aps-object i:first-child { left: 7px; }
.aps-object i:nth-child(2) { left: 50%; translate: -50% 0; }
.aps-object i:last-child { right: 7px; }

.aps-object-twin i::after {
  content: "";
  position: absolute;
  inset: 5px 3px 3px;
  border: 1px solid #a7cde4;
  background: linear-gradient(32deg, transparent 47%, #a7cde4 48% 52%, transparent 53%),
              linear-gradient(-32deg, transparent 47%, #a7cde4 48% 52%, transparent 53%);
}
.aps-object-twin i:nth-child(2) { width: 29px; height: 29px; }

.aps-object-data i:not(:nth-child(2)) {
  background: repeating-linear-gradient(to bottom, #6194b6 0 2px, #315b7c 2px 5px);
  border: 3px solid #8ab0c9;
}
.aps-object-data i:nth-child(2) {
  width: 31px;
  height: 25px;
  border-radius: 50% / 18%;
  background: repeating-linear-gradient(to bottom, #649bbf 0 6px, #b5d2e5 6px 8px, #386789 8px 10px);
}

.aps-object-context i:first-child,
.aps-object-context i:last-child {
  bottom: 1px;
  left: 22px;
  right: auto;
  width: 23px;
  height: 29px;
  background: radial-gradient(ellipse at 58% 18%, #447fa4 25%, transparent 26%),
              radial-gradient(ellipse at 30% 43%, #386e97 29%, transparent 30%),
              radial-gradient(ellipse at 55% 71%, #315a83 40%, transparent 41%),
              radial-gradient(ellipse at 75% 49%, #315a83 26%, transparent 27%);
}
.aps-object-context i:last-child { left: auto; right: 22px; transform: scaleX(-1); }
.aps-object-context i:nth-child(2) {
  bottom: 3px;
  width: 2px;
  height: 26px;
  border-radius: 2px;
  background: #aad0e3;
}

.aps-layer p {
  grid-column: 2;
  grid-row: 1;
  margin: 3px 0 3px var(--callout-gap);
  padding: 8px 10px;
  border: 1px solid var(--tier-line);
  background: #fffdf8;
  line-height: 1.35;
  font-size: .83rem;
}

.aps-layer p strong { margin-right: 4px; color: #435769; }

@media (max-width: 600px) {
  .aps-workflow h3 { left: 56%; top: 24px; }
  .aps-layers { padding-left: 5%; }
  .aps-layer { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); --callout-gap: 14px; }
  .aps-layer p { padding: 6px; font-size: .76rem; }
  .aps-chart-connector { height: 40px; }
  .aps-chart-connector::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: calc(23.15cqw + 2px);
    height: calc(var(--connector-length) - 34px);
    border-top: 2px solid #176575;
    border-left: 2px solid #176575;
  }
}

.aps-support {
  --connector-length: 75px;
  --tier-top-gap: 8px;
  container-type: inline-size;
  display: grid;
  gap: 24px;
}

.aps-experience {
  width: min(100%, 340px);
  padding: 18px;
  border: 1px solid #d6c9b5;
  border-top: 3px solid #176575;
  background: #fffdf8;
}

.aps-experience h3 { margin: 0; font-size: 1.2rem; line-height: 1.35; }
.aps-experience p { margin: 8px 0 14px; line-height: 1.5; }
.aps-experience img { display: block; width: 100%; height: auto; }
.aps-experience h4 { margin: 14px 0 8px; font-size: .88rem; }

.aps-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #d6c9b5;
}

.aps-metrics div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 10px 4px 0;
  text-align: center;
}

.aps-metrics div + div { border-left: 1px solid #d6c9b5; }
.aps-metrics dt { font-size: .72rem; line-height: 1.35; }
.aps-metrics dd { margin: 0; color: #176575; font-weight: 700; line-height: 1.3; }


@media (min-width: 901px) {
  .aps-support > .aps-workflow,
  .aps-support > .aps-experience {
    grid-area: 1 / 1;
  }

  .aps-support > .aps-experience {
    align-self: start;
    justify-self: start;
    position: relative;
    z-index: 1;
    width: min(27%, 340px);
    margin-top: calc(var(--connector-length) + var(--tier-top-gap));
    padding: clamp(10px, 1.2vw, 18px);
  }
}
