/* 実績の推移を折れ線で見せ、数字は数え上がる。色と書体は変えない。 */

/* 上の罫線が ±0。点はその月の損益の位置に置くので、線は零を通って上がる */
#results .result-timeline > div { padding-top: 76px; }
#results .result-timeline > div:nth-of-type(1) .timeline-dot { transform: translateY(46px); }
#results .result-timeline > div:nth-of-type(3) .timeline-dot { transform: translateY(-46px); }
#results .result-timeline::before { background: #d9ee7c4d; }
.results-trace { stroke-width: 1.8; }

/* 点から零までの隔たりを垂線で見せる */
#results .result-timeline > div:nth-of-type(1) .timeline-dot::before,
#results .result-timeline > div:nth-of-type(3) .timeline-dot::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 46px;
  margin-left: -.5px;
  background: linear-gradient(var(--trace-fade, 180deg), #d9ee7c4a, #d9ee7c0d);
  opacity: 0;
  transition: opacity .5s ease .9s;
}
#results .result-timeline > div:nth-of-type(1) .timeline-dot::before { bottom: 50%; --trace-fade: 0deg; }
#results .result-timeline > div:nth-of-type(3) .timeline-dot::before { top: 50%; }
#results .result-timeline.is-results-visible > div .timeline-dot::before { opacity: 1; }

/* 数え上がる数字。桁が増えても単位が動かないよう、先に幅を確保する */
.count-slot {
  display: inline-block;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 761px) {
  /* 仕切りは上が濃く、下へ向かって消える */
  #results .support-results > div + div {
    border-left-width: 1px;
    border-left-style: solid;
    border-image: linear-gradient(180deg, #ffffff3d, #ffffff08) 1;
  }
}

@media (max-width: 760px) {
  #results .result-timeline > div { padding-top: 52px; }
  #results .result-timeline > div:nth-of-type(1) .timeline-dot { transform: translateY(30px); }
  #results .result-timeline > div:nth-of-type(3) .timeline-dot { transform: translateY(-30px); }
  #results .result-timeline .timeline-dot::before { height: 30px; }
}

/* 帯の下の罫線が、読み進んだ量ぶんだけ濃くなる */
.read-progress {
  position: fixed;
  top: calc(var(--header) - 1px);
  left: 0;
  right: 0;
  height: 1px;
  z-index: 41;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
