main:has(> .reading-progress) {
  position: relative;
}

main:has(> .reading-progress) > content {
  display: block;
}

.reading-progress {
  color: var(--text-color);
  font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace;
  margin: 1rem 0;
}

.reading-progress__meter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reading-progress__track {
  position: relative;
  display: block;
  width: 144px;
  height: 10px;
  color: var(--text-color);
  mask-image: repeating-linear-gradient(
    to right, #000 0 4px, transparent 4px 6px
  );
  background: currentColor;
  background: color-mix(in srgb, currentColor 25%, transparent);
}

.reading-progress__track::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--reading-fill, 0%);
  background: currentColor;
}

.reading-progress__time {
  margin-top: 6px;
  font-size: 12px;
}

@media (min-width: 1160px) {
  .reading-progress {
    position: absolute;
    inset: 0 calc(100% + 24px) 0 auto;
    width: 184px;
    margin: 0;
  }

  .reading-progress__panel {
    position: sticky;
    top: 2rem;
  }
}
