/* Only controls created by PTU Video Chapters are styled. */
.ptu-chapter {
  appearance: none;
  display: inline-block;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: .3rem;
  padding: .25rem .4rem;
  margin: -.25rem 0;
  min-height: 2.75rem;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
  vertical-align: baseline;
}
.ptu-chapter:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.ptu-chapter:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.ptu-chapter[aria-current="true"] { background: color-mix(in srgb, currentColor 10%, transparent); font-weight: 700; }
.ptu-chapter[aria-busy="true"] { border-style: dashed; border-color: currentColor; }
.ptu-chapter[data-state="error"] { border-color: currentColor; }
.ptu-chapters-status { margin-block: .75rem; font-size: .95em; overflow-wrap: anywhere; }
.ptu-chapters-status:empty { display: none; }
@media (forced-colors: active) {
  .ptu-chapter { color: LinkText; }
  .ptu-chapter:focus-visible { outline-color: Highlight; }
}

/* Generated labels are visual feedback only; no extra text enters quotes. */
.ptu-chapter[data-state="loading"]::after,
.ptu-chapter[data-state="seeking"]::after { content: " · loading…"; font-size: .8em; }
.ptu-chapter[data-state="success"]::after { content: " · selected"; font-size: .8em; }
.ptu-chapter[data-state="seeked"]::after,
.ptu-chapter[data-state="needs-play"]::after { content: " · press Play in video"; font-size: .8em; }
.ptu-chapter[data-state="error"]::after { content: " · unavailable"; font-size: .8em; }

/* Native scroll-padding leaves room for the theme header; add a small gap.
   Scroll margin changes neither iframe layout nor its saved/embed content. */
article[data-ips-first-post][data-ptu-chapters] iframe[src^="https://player.vimeo.com/video/"] {
  scroll-margin-block-start: 1rem;
}
