/* Live follow on the Interactive Daf page (live-follow.js). The panel borrows
   the page's own look; the two overlays draw over the printed daf in the same
   blue as the page's own "playing now" highlight (.vilna-active-rect). */
.live-follow { padding: 14px 20px; margin: 14px 0; }
.lf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lf-heading h2 { margin: 2px 0 2px; font-size: 18px; }
.lf-heading p { margin: 0; color: var(--muted); font-size: 13px; max-width: 46em; }
.lf-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 9px; }
.lf-body { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.lf-body[hidden] { display: none; }
.lf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.lf-daf { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.lf-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.lf-seg-option { cursor: pointer; }
.lf-seg-option input { position: absolute; opacity: 0; pointer-events: none; }
.lf-seg-option span { display: block; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lf-seg-option input:checked + span { background: var(--accent-strong, #2f6ea5); color: #fff; }
.lf-seg-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.lf-seg-option.lf-disabled { cursor: not-allowed; }
.lf-seg-option.lf-disabled span { opacity: .45; }
.lf-source-note { margin: -4px 0 0; color: var(--muted); font-size: 12.5px; }
.lf-video label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.lf-video[hidden] { display: none; }
.lf-hint { font-weight: 400; color: var(--muted); }
.lf-video-row { display: flex; gap: 8px; }
.lf-video-row input { flex: 1; min-width: 0; }
.lf-video-message { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.lf-video-message.error { color: var(--danger); }
.lf-run { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.lf-start { flex: 0 0 auto; min-width: 190px; }
.lf-start.stop { background: var(--danger); border-color: transparent; color: #fff; }
.lf-status { flex: 1 1 260px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; text-align: center; min-width: 0; }
.lf-status-row { display: flex; align-items: center; justify-content: center; gap: 9px; }
.lf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.lf-dot.reading, .lf-dot.listening { background: #2fb36f; box-shadow: 0 0 0 4px rgba(47,179,111,.2); }
.lf-dot.explaining { background: #e0a43a; }
.lf-dot.searching { background: #e0a43a; animation: lf-pulse 1s infinite; }
.lf-dot.error { background: var(--danger); }
@keyframes lf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lf-status-detail { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.lf-meter { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 7px; }
.lf-meter > div { height: 100%; width: 0; background: #2fb36f; transition: width .08s linear; }
.lf-debug { font-size: 12px; }
.lf-debug summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.lf-debug dl { margin: 8px 0; }
.lf-debug dl > div { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.lf-debug dt { flex: none; width: 100px; color: var(--muted); font-weight: 600; }
.lf-debug dd { margin: 0; flex: 1; min-width: 0; word-break: break-word; }
.lf-debug dd[dir="rtl"] { text-align: right; }

/* Live follow's own marks on the printed page: the lighter "just heard" bars
   (before a phrase is confirmed) and the tapped starting word. */
.vilna-live-provisional-overlay,
.vilna-live-anchor-overlay { position: absolute; inset: 0; pointer-events: none; }
.vilna-live-provisional-rect { position: absolute; background: rgba(142, 205, 245, .42); mix-blend-mode: multiply; border-radius: 999px; }
.vilna-live-anchor-rect { position: absolute; outline: 2px solid var(--accent-strong, #2f6ea5); outline-offset: 1px; border-radius: 4px; background: rgba(47, 110, 165, .14); }
/* Explaining/searching: the last phrase read stays on the page, quieter. */
body.lf-quiet .vilna-active-rect { background: rgba(142, 155, 175, .55); }
body.lf-quiet .daf-segment.active { opacity: .6; }
body.lf-on #vilnaPageWrap { cursor: pointer; }

/* "Choose daf" scrolls to the page's picker and flashes it so it is easy to find. */
.lf-picker-flash { animation: lf-picker-flash 1.6s ease-out; border-radius: 12px; }
@keyframes lf-picker-flash {
  0%, 35% { box-shadow: 0 0 0 3px var(--accent, #d4a843); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) { .lf-picker-flash { animation: none; } }

/* Said on the printed page itself, where the missing highlight is noticed. */
.lf-page-banner { margin: 0 0 10px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line-strong, rgba(19,34,56,.25)); background: rgba(212,168,67,.14); color: inherit; font-size: 13px; line-height: 1.45; }
.lf-page-banner[hidden] { display: none; }
.lf-page-banner.is-unavailable { background: rgba(142,155,175,.18); }
