.week-load-chart {
  display: grid;
  gap: 10px;
}

.week-load-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.week-load-subtitle {
  margin: 0;
  color: #577391;
  font-size: .82rem;
}

.week-load-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.week-load-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4b6785;
  font-size: .78rem;
}

.week-load-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.week-load-dot.low { background: #58a55c; }
.week-load-dot.moderate { background: #f2b43f; }
.week-load-dot.high { background: #de6c62; }

.week-load-plot-wrap {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
}

.week-load-axis-label {
  font-size: .74rem;
  color: #5a7390;
  font-weight: 700;
  letter-spacing: .02em;
  padding-top: 4px;
}

.week-load-plot {
  position: relative;
  border: 1px solid #d7e6f8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  min-height: calc(246px + var(--week-load-label-space, 40px));
  overflow: hidden;
}

.week-load-grid-lines {
  position: absolute;
  inset: 12px 8px calc(var(--week-load-label-space, 40px) + 24px) 8px;
}

.week-load-tick {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(50%);
  pointer-events: none;
}

.week-load-tick-line {
  display: block;
  border-top: 1px solid #e1ecf9;
}

.week-load-tick-label {
  position: absolute;
  left: -44px;
  top: -9px;
  color: #6f8aa7;
  font-size: .7rem;
  font-weight: 600;
}

.week-load-columns {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: calc(246px + var(--week-load-label-space, 40px));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(62px, 1fr);
  align-items: end;
  gap: 10px;
  padding: 12px 10px 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.week-load-col {
  position: relative;
  min-width: 62px;
  height: auto;
  display: grid;
  grid-template-rows: 220px 16px minmax(24px, var(--week-load-label-space, 40px));
  align-items: stretch;
  gap: 4px;
}

.week-load-col-inner {
  position: relative;
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.week-load-stack {
  width: 40px;
  max-width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d4e4f8;
  background: #eff5fd;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08);
}

.week-load-seg {
  width: 100%;
  min-height: 0;
}

.week-load-seg.low { background: linear-gradient(180deg, #6ab66d 0%, #58a55c 100%); }
.week-load-seg.moderate { background: linear-gradient(180deg, #f8c96e 0%, #f2b43f 100%); }
.week-load-seg.high { background: linear-gradient(180deg, #ea8a82 0%, #de6c62 100%); }

.week-load-time-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .95);
  border: 1px solid #d7e6f8;
  border-radius: 6px;
  padding: 1px 5px;
  font-size: .78rem;
  font-weight: 700;
  color: #153a60;
  white-space: nowrap;
}

.week-load-km-label {
  margin: 0;
  text-align: center;
  color: #1f4f7c;
  font-size: .73rem;
  font-weight: 700;
  height: 16px;
  min-height: 16px;
  line-height: 16px;
}

.week-load-xlabel {
  margin: 0;
  text-align: center;
  color: #4f6e8e;
  font-size: .72rem;
  line-height: 1.2;
  height: auto;
  min-height: 24px;
  overflow: visible;
  display: block;
  word-break: break-word;
}

@media (max-width: 860px) {
  .week-load-plot-wrap {
    grid-template-columns: 1fr;
  }

  .week-load-axis-label {
    display: none;
  }

  .week-load-tick-label {
    left: 2px;
    background: rgba(255, 255, 255, .85);
    border-radius: 4px;
    padding: 0 2px;
  }

  .week-load-columns {
    padding-left: 8px;
    padding-right: 8px;
  }
}
