/* The slope chart. Plain CSS in a file of its own for each chart form (decision 0012), so that
   changing one form never changes another form's frozen embeds (decision 0009). Uses the house
   tokens. */

.sl {
  font-size: 14px;
}

.sl .head,
.sl .body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22% minmax(0, 1fr);
}

.sl .head {
  margin-bottom: 10px;
  color: var(--ink-2);
  font-weight: 600;
}

.sl .ha {
  grid-column: 1;
  padding-right: 8px;
  text-align: right;
}

.sl .hb {
  grid-column: 3;
  padding-left: 8px;
}

.sl .body {
  height: var(--h);
}

.sl .side {
  position: relative;
  height: var(--h);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sl .side li {
  position: absolute;
  right: 0;
  left: 0;
  display: flex;
  gap: 8px;
  line-height: 18px;
  color: var(--ink-2);
  transform: translateY(-50%);
  white-space: nowrap;
}

.sl .side.a li {
  justify-content: flex-end;
  padding-right: 8px;
}

.sl .side.b li {
  justify-content: flex-start;
  padding-left: 8px;
}

.sl .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl .nu {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.sl .hl .nm {
  color: var(--ink);
  font-weight: 600;
}

.sl .lines {
  display: block;
  width: 100%;
  height: var(--h);
}

.sl line {
  stroke: var(--axis);
  stroke-width: 1.5;
}

.sl line.hl {
  stroke: var(--accent);
  stroke-width: 3;
}

/* On a narrow screen the names stand once, at the right; both numbers stay. */
@container (max-width: 30rem) {
  .sl .head,
  .sl .body {
    grid-template-columns: minmax(0, 0.6fr) 14% minmax(0, 1.4fr);
  }

  .sl .side.a .nm {
    display: none;
  }
}

/* The share card. */
.sl-card {
  font-size: 22px;
}

.sl-card .side li {
  line-height: 26px;
}

.sl-card .head {
  margin-bottom: 14px;
}
