.traffic-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  padding: .17rem;
  border-radius: 8px;
  background: #edf2f8;
}
.traffic-ranges button {
  padding: .36rem .64rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #182c45;
  background: transparent;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.traffic-ranges button:hover { background: #dce9fa; }
.traffic-ranges button[aria-pressed="true"] { background: #fff; border-color: #ceddef; color: #144d99; }
.traffic-legend { display: flex; flex-wrap: wrap; gap: .65rem .95rem; color: var(--muted); font-size: .83rem; }
.traffic-legend span { display: inline-flex; align-items: center; gap: .34rem; }
.traffic-legend i { width: .65rem; height: .65rem; border-radius: 2px; }
.upload-color { background: #286ac9; }
.download-color { background: #1a827b; }
.missing-color { border: 1px dashed #91a3bb; }
.traffic-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; margin-top: .95rem; }
.traffic-plot-main { min-width: 0; }
#traffic-axis {
  height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-size: .75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#traffic-bars {
  list-style: none;
  height: 178px;
  padding: 0;
  margin: 0;
  display: flex;
  gap: clamp(1px, .35vw, 5px);
  align-items: stretch;
  border-block: 1px solid #dbe4ef;
  background: linear-gradient(#e7eef7, #e7eef7) center / 100% 1px no-repeat;
}
#traffic-bars > li { flex: 1; min-width: 0; }
.traffic-bar {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px 4px 0 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.traffic-bar:hover, .traffic-bar[data-selected] { background: #edf4fc; }
.traffic-ranges button:focus-visible, .traffic-bar:focus-visible {
  outline: 3px solid #68a4ff;
  outline-offset: 0;
  position: relative;
  z-index: 1;
}
.traffic-stack { display: flex; flex-direction: column; width: 100%; max-width: 48px; min-height: 2px; border-radius: 3px 3px 0 0; overflow: hidden; }
.traffic-stack > span { flex: 0 0 0; }
.traffic-bar[data-state="zero"] .traffic-stack { background: #a4c8e8; }
.traffic-bar[data-state="missing"] .traffic-stack { border-bottom: 1px dashed #8f9eb4; }
#traffic-labels { display: flex; justify-content: space-between; margin-top: .4rem; color: var(--muted); font-size: .75rem; }
.traffic-point { margin-top: .7rem; color: #273d57; font-size: .85rem; min-height: 1.5em; }
.traffic-note { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .75rem; font-size: .82rem; color: var(--muted); }

@media (max-width: 760px) {
  #traffic-bars, #traffic-axis { height: 138px; }
}
