:root {
  --hue: 223;
  --bg: hsl(var(--hue),90%,10%);
  --fg: hsl(var(--hue),90%,90%);
  --fill: rgb(124,97,255);
  --trans-dur: 0.3s;
  font-size: calc(16px + (24 - 16) * (100vw - 320px) / (2560 - 320));
}

body,
button {
  font: 1em/1.5 "DM Sans", sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  height: 50vh;
}

.yr-progress {
  margin: auto;
  padding: 6em 0 1.5em 0;
  text-align: center;
  width: calc(100% - 2em);
  filter: drop-shadow(0px 4px 8px rgba(1, 1, 13, 0.5));
}

.yr-progress__bar {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 1em;
  box-shadow: 0 0.125em 0.125em rgba(255, 255, 255, 0.2) inset, 0 -0.125em 0.125em rgba(255, 255, 255, 0.3) inset;
  margin: 0 0.75em;
  padding: 0.25em;
  position: relative;
  max-width: 27em;
  width: 100%;
  height: 2em;
  filter: drop-shadow(0px 4px 8px rgba(1, 1, 13, 0.5));
}

.yr-progress__bar-fill-wrap,
.yr-progress__bar-fill {
  overflow: hidden;
}

.yr-progress__bar-fill-wrap {
  border-radius: 0.75em;
  position: absolute;
  inset: 0.25em;
  z-index: -1;
}

.yr-progress__bar-fill-wrap--glow {
  border-radius: 1.25em;
  filter: blur(16px);
  inset: -0.25em;
  opacity: 0.7;
}

.yr-progress__bar-fill {
  width: 100%;
  height: 100%;
  transform: translate3d(-100%, 0, 0);
  transition: transform var(--trans-dur) ease-in-out;
}

.yr-progress__bar:before,
.yr-progress__bar-fill:before {
  content: "";
  display: block;
  position: absolute;
}

.yr-progress__bar:before {
  border-radius: 0.6em;
  box-shadow: 0 0.4em 0 rgba(255, 255, 255, 0.6) inset, 0 -0.25em 0 rgba(255, 255, 255, 0.5) inset;
  filter: blur(2px);
  top: 0.25em;
  left: 0.25em;
  width: calc(100% - 0.5em);
  height: 1.5em;
}

.yr-progress__bar-fill:before {
  background-image: linear-gradient(90deg, fuchsia, fuchsia, #dc170a, #ffc700, #13dd3f);
  width: 100%;
  height: 100%;
}

.yr-progress__bar-fill-sr {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
}

.yr-progress__bar-divs {
  display: flex;
  position: absolute;
  top: 0;
  left: 0.25em;
  width: calc(100% - 0.5em);
  height: 100%;
}

.yr-progress__bar-div {
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.3) inset, 1px 0 0 rgba(0, 0, 0, 0.2) inset;
  width: 100%;
  height: 100%;
}

.yr-progress__bar-div:first-child {
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.3) inset;
}

.yr-progress__bar-div:last-child {
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.2) inset;
}

.yr-progress__checkbox {
  margin-right: 0.75em;
}

.yr-progress__label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5em;
  -webkit-tap-highlight-color: transparent;
}

.yr-progress__percent,
.yr-progress__yr {
  font-size: 1.5em;
  line-height: 1;
}

.yr-progress__percent {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.yr-progress__stats {
  border-radius: 0.25em;
  margin: 0 auto 1.5em auto;
  max-width: 15em;
  padding: 0.375em 0;
  transition: background-color var(--trans-dur) linear;
}

.yr-progress__stat-summary {
  cursor: pointer;
  font-weight: 700;
  outline: transparent;
}

.yr-progress__stat-label {
  color: hsl(var(--hue), 90%, 70%);
  font-size: 0.75em;
  line-height: 1;
  margin-top: 0.375rem;
}

.yr-progress__stat-value small {
  font-size: 0.75em;
}

.yr-progress__stats:hover {
  background-color: hsl(var(--hue), 90%, 20%);
}

.yr-progress__wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5em;
}

.yr-progress__yr {
  text-align: right;
  width: 4.5rem;
}

.yr-progress__yr ~ .yr-progress__yr {
  text-align: left;
}

/* `:has()` support */
@supports selector(:has(+ *)) {
  .yr-progress__stats:has(.yr-progress__stat-summary:focus-visible) {
    background-color: hsl(var(--hue), 90%, 20%);
  }
}