:root {
  color: #172033;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: #ffffff;
  margin: 0;
  min-height: 100%;
}

body {
  min-width: 0;
}

.toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dce2ea;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px 22px;
}

.heading {
  min-width: 360px;
}

h1 {
  color: #111827;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 3px;
}

#status {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls,
.rank-control,
.date-control {
  align-items: center;
  display: flex;
}

.controls {
  flex: 0 0 auto;
  gap: 24px;
}

.rank-control,
.date-control {
  color: #344054;
  font-size: 13px;
  font-weight: 600;
  gap: 9px;
  white-space: nowrap;
}

#rankCount {
  accent-color: #2563eb;
  cursor: pointer;
  width: 180px;
}

#rankCountValue {
  color: #111827;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: right;
}

#startDate {
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 4px;
  color: #111827;
  font: inherit;
  font-weight: 500;
  height: 34px;
  padding: 4px 8px;
}

main {
  min-height: calc(100vh - 72px);
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

#chart {
  min-height: calc(100vh - 72px);
  min-width: 760px;
  width: 100%;
}

#chart .hoverlayer .legendpoints,
#chart .hoverlayer .legendlines,
#chart .hoverlayer .legendfill {
  display: none;
}

#chart .hoverlayer .legendtext {
  transform: translateX(-30px);
}

.error {
  background: #fff3f2;
  border: 1px solid #fecdca;
  border-radius: 4px;
  color: #b42318;
  font-size: 14px;
  margin: 24px;
  padding: 14px 16px;
}

@media (max-width: 900px) {
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .heading {
    min-width: 0;
    width: 100%;
  }

  h1 {
    font-size: 15px;
  }

  #status {
    white-space: normal;
  }

  .controls {
    flex-wrap: wrap;
    gap: 14px 20px;
    justify-content: flex-start;
    width: 100%;
  }

  #rankCount {
    width: 140px;
  }

  main,
  #chart {
    min-height: calc(100vh - 118px);
  }
}
