/* Listen to this report (listen.js): a "now playing" strip above the report text.
   While a report is being read (or paused part-way) it sticks just under the top bar as you scroll. */
.listen { position: relative; margin: 0 0 30px; border: 1px solid #2c2c2c; background: linear-gradient(180deg, #121214, #0b0b0c); overflow: hidden; }
.listen[hidden], .listen-stop[hidden] { display: none; }
/* corner ticks, like the site's other framed panels */
.listen::before, .listen::after { content: ""; position: absolute; width: 8px; height: 8px; pointer-events: none; }
.listen::before { top: -1px; left: -1px; border-top: 1px solid #8a8a8a; border-left: 1px solid #8a8a8a; }
.listen::after { bottom: -1px; right: -1px; border-bottom: 1px solid #8a8a8a; border-right: 1px solid #8a8a8a; }

.listen-in { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; }

/* the round play button */
.listen-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #555; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2e2e30, #121214 70%); color: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .1s; }
.listen-play:hover, .listen-play:focus-visible { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.listen-play:active { transform: scale(.96); }
.listen-play svg { margin-left: 1px; }
.listen .ico-pause { display: none; }
.listen.is-playing .ico-play { display: none; }
.listen.is-playing .ico-pause { display: block; margin-left: 0; }
.listen.is-playing .listen-play { border-color: #c8c8c8; box-shadow: 0 0 0 4px rgba(255,255,255,.05), 0 0 18px rgba(255,255,255,.08); }

/* what's playing: equaliser + labels */
.listen-now { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.listen-eq { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.listen-eq i { width: 3px; height: 4px; background: #5a5a5a; transition: background .3s; }
.listen.is-playing .listen-eq i { background: #d8d8d8; animation: listen-eq 1s ease-in-out infinite; }
.listen.is-playing .listen-eq i:nth-child(2) { animation-delay: -.6s; animation-duration: .8s; }
.listen.is-playing .listen-eq i:nth-child(3) { animation-delay: -.3s; animation-duration: 1.15s; }
.listen.is-playing .listen-eq i:nth-child(4) { animation-delay: -.8s; animation-duration: .9s; }
.listen.is-playing .listen-eq i:nth-child(5) { animation-delay: -.45s; animation-duration: 1.05s; }
.listen.is-playing .listen-eq i:nth-child(6) { animation-delay: -.15s; animation-duration: .95s; }
/* 3-6-9: every third bar burns brighter, like the Art Bell signal meter */
.listen-eq i.is-3 { background: #7a7a7a; }
.listen.is-playing .listen-eq i.is-3 { background: #fff; box-shadow: 0 0 4px rgba(255,255,255,.5); }
@keyframes listen-eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@media (prefers-reduced-motion: reduce) { .listen.is-playing .listen-eq i { animation: none; height: 12px; } }
.listen-track { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.listen-k { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #8a8a8a; white-space: nowrap; overflow: hidden; }
.listen-k span { overflow: hidden; text-overflow: ellipsis; }
.listen-sec { display: flex; align-items: baseline; gap: 10px; font-size: 15px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; }
.listen-sec .js-listen-sec { overflow: hidden; text-overflow: ellipsis; }
/* "on air" dot: hidden until playing, pulses while reading, holds still when paused */
.listen-dot { display: none; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.listen.is-active .listen-dot { display: block; background: #8a8a8a; }
.listen.is-playing .listen-dot { background: #fff; animation: listen-dot 1.6s ease-in-out infinite; }
@keyframes listen-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); opacity: 1; } 50% { box-shadow: 0 0 0 5px rgba(255,255,255,0); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .listen.is-playing .listen-dot { animation: none; } }
.listen.is-playing .listen-k { color: #fff; }
/* section number in front of its name, like the numbered headings */
.listen-num { flex: none; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; color: #8a8a8a; }
.listen-num:empty { display: none; }

/* stop, speed, volume */
.listen-ctl { flex: none; display: flex; align-items: center; gap: 10px; }
.listen-stop { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #3a3a3a; border-radius: 50%; background: transparent; color: #c8c8c8; cursor: pointer; }
.listen-stop:hover, .listen-stop:focus-visible { border-color: #fff; color: #fff; }
.listen-rate select { height: 32px; padding: 0 6px; border: 1px solid #3a3a3a; border-radius: 2px; background: #0c0c0c; color: #c8c8c8; font-family: var(--mono); font-size: 12px; cursor: pointer; }
.listen-vol { display: inline-flex; align-items: center; gap: 7px; height: 32px; color: #8a8a8a; }
.listen-vol input { -webkit-appearance: none; appearance: none; width: 84px; height: 3px; margin: 0; border-radius: 2px; cursor: pointer;
  background: linear-gradient(to right, #c8c8c8 var(--fill, 100%), #3a3a3a var(--fill, 100%)); }
.listen-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.listen-vol input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.listen-vol input:focus-visible { outline: 1px solid #fff; outline-offset: 6px; }

/* maker's nameplate, like BOT313-RADIO on the Art Bell dial (greys here; its light glows while reading) */
.listen-brand { flex: none; display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; padding: 4px 9px 4px 8px; border: 1px solid #3a3a3a; border-radius: 2px;
  background: linear-gradient(180deg, #2a2a2a, #141414); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.6);
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .26em; color: #c8c8c8; text-shadow: 0 -1px 0 #000; }
.listen-brand i { width: 5px; height: 5px; border-radius: 50%; background: #4a4a4a; transition: background .3s, box-shadow .3s; }
.listen.is-playing .listen-brand i { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.85); }

/* progress line along the bottom edge */
.listen-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #1e1e20; }
.listen-prog i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #8a8a8a, #fff); transition: width .4s ease; }

/* Sticky while a report is being read or paused part-way: rides under the top bar, slightly see-through */
.listen.is-active { position: sticky; top: calc(var(--bar-h, 42px) + 8px); z-index: 30;
  background: rgba(14, 14, 16, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.55); }

/* the paragraph being read */
.case-content .is-reading, .case-head h1.is-reading { background: rgba(255, 255, 255, .06); box-shadow: -10px 0 0 rgba(255, 255, 255, .06), 10px 0 0 rgba(255, 255, 255, .06), inset 2px 0 0 #c8c8c8; border-radius: 2px; transition: background .2s; }
/* keep the highlighted paragraph clear of the sticky player when the page scrolls to it */
.case-content > * { scroll-margin-top: calc(var(--bar-h, 42px) + 100px); }

@media (max-width: 640px) {
  .listen { margin-bottom: 22px; }
  .listen-in { flex-wrap: wrap; gap: 10px 12px; padding: 10px; }
  .listen-play { width: 40px; height: 40px; }
  .listen-now { flex: 1 1 0; }
  .listen-sec { font-size: 14px; }
  .listen-ctl { flex: 1 1 100%; justify-content: flex-end; }
  .listen-vol { margin-right: auto; order: -1; }
  .listen-vol input { width: 110px; }
  /* on phones the sticky player shrinks to one row: hide speed/volume while it rides along */
  .listen.is-active .listen-ctl .listen-rate, .listen.is-active .listen-ctl .listen-vol, .listen.is-active .listen-brand { display: none; }
  .listen-brand { margin-left: auto; }
  .listen.is-active .listen-ctl { flex: none; }
  .listen.is-active .listen-in { flex-wrap: nowrap; }
}
