/* "Read or Listen" player - built by audio-player.js. Hidden until the script has
   built it, so a page never shows a control that cannot work. */
.listen { display: none; }
.listen.is-ready {
  display: flex; align-items: center; gap: 14px;
  /* The player sits beside other content, so it has to be able to shrink.
     Without these a 360px phone ends up with a page wider than its screen. */
  max-width: 100%; min-width: 0;
  margin: 0 0 34px; padding: 12px 14px 12px 12px;
  background: var(--paper);
  border: 1px solid var(--sage-line);
  border-radius: var(--r-md);
  box-shadow: 0 6px 20px rgba(27, 26, 23, 0.05);
  font-family: var(--font-ui);
  -webkit-user-select: none; user-select: none;
}
.listen-play {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sage-dk); color: #fff; border: 0; cursor: pointer;
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.listen-play:hover { background: var(--sage-deep); }
.listen-play:active { transform: scale(0.96); }
.listen-play svg { width: 20px; height: 20px; }
.listen-body { flex: 1 1 0; min-width: 0; }
.listen-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  min-width: 0;
  margin-bottom: 9px;
}
.listen-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage-dk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;   /* ellipsis the label rather than widen the page */
}
.listen-time { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Thin visible bar, generous invisible hit area. */
.listen-track {
  position: relative; height: 18px; cursor: pointer; touch-action: none;
  border-radius: 9px;
}
.listen-track::before, .listen-fill {
  content: ""; position: absolute; left: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 3px;
}
.listen-track::before { right: 0; background: rgba(62, 80, 66, 0.14); }
.listen-fill { width: 0; background: var(--sage-dk); }
.listen-speed {
  flex: none; min-width: 54px; height: 36px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--sage-line); background: transparent;
  font-family: var(--font-ui); font-size: 0.82rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background 200ms var(--ease-out);
}
.listen-speed:hover { background: rgba(111, 130, 109, 0.1); }
.listen-play:focus-visible, .listen-speed:focus-visible, .listen-track:focus-visible {
  outline: 2px solid var(--clay); outline-offset: 3px;
}
.listen.is-error .listen-play, .listen.is-error .listen-track { opacity: 0.4; pointer-events: none; }

/* Centred intro pages (Insights index, Q&A) */
.listen.listen--centred {   /* needs .listen too, or .listen.is-ready wins and it sits left */
  max-width: 560px; margin-left: auto; margin-right: auto;
}

@media (max-width: 560px) {
  .listen.is-ready { gap: 10px; padding: 10px 10px 10px 10px; }
  .listen-speed { min-width: 48px; height: 44px; }
  .listen-label { letter-spacing: 0.1em; }
}
@media (prefers-reduced-motion: reduce) {
  .listen-play, .listen-speed { transition: none; }
}
