/* Lesson pictures, narration player and videos. Uses the area accent variables from app.css. */
.art-fig { margin: 0; border-radius: var(--r-xl); overflow: hidden; background: var(--ac-t); line-height: 0; }
.art-fig svg.art { display: block; width: 100%; height: auto; aspect-ratio: 800 / 320; }
.art-fig.cover { box-shadow: var(--shadow); }
@media (max-width: 520px) { .art-fig { margin-left: -.25rem; margin-right: -.25rem; } }

/* narration player */
.aud { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .55rem .7rem; padding: .7rem .8rem; background: var(--mist); border-radius: var(--r-xl); }
.aud-play { width: 46px; height: 46px; border-radius: 50%; background: var(--ac-solid); color: var(--on-ac); display: grid; place-items: center; font-size: 1.05rem; box-shadow: 0 2px 6px rgba(30, 40, 40, .22); flex: none; }
.aud-play:hover { filter: brightness(1.08); }
.aud-play:active { transform: scale(.96); }
.aud-play .ic { width: 1em; height: 1em; }
.aud-play svg:not(.ic) { margin-left: 2px; }
.aud-main { min-width: 0; display: grid; gap: .45rem; }
.aud-row { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-size: .92rem; }
.aud-row strong { font-weight: 600; color: var(--ink); min-width: 0; }
.aud-time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; }
.aud-track { position: relative; height: 8px; border-radius: 6px; background: color-mix(in srgb, var(--ac) 18%, #fff); cursor: pointer; touch-action: none; }
.aud-track::before { content: ""; position: absolute; inset: -14px 0; }
.aud-track i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--ac-solid); position: relative; }
.aud-track i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--ac-solid); box-shadow: 0 0 0 3px var(--ac-t2); }
.aud-speed, .aud-rd { min-height: 38px; padding: 0 .7rem; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--ac) 35%, transparent); color: var(--ac-ink); font-weight: 600; font-size: .88rem; background: var(--surface); display: inline-flex; align-items: center; gap: .35rem; }
.aud-speed { min-width: 52px; justify-content: center; font-variant-numeric: tabular-nums; }
.aud-rd[aria-pressed="true"] { background: var(--ac-solid); color: var(--on-ac); border-color: var(--ac-solid); }
.aud-text { grid-column: 1 / -1; margin-top: .25rem; padding: .8rem .95rem; border-radius: var(--r); background: #fff; font-size: 1rem; line-height: 1.75; color: var(--ink-2); max-height: 15rem; overflow: auto; }
.aud-text span { border-radius: 5px; padding: 1px 2px; transition: background .2s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.aud-text span.on { background: var(--gold-wash); color: var(--ink); box-shadow: 0 0 0 2px var(--gold-wash); }
.aud.bad { background: var(--warn-wash); border-color: var(--warn-line); }
@media (max-width: 470px) {
  .aud { grid-template-columns: auto 1fr; }
  .aud-row { flex-direction: column; align-items: flex-start; gap: 0; }
  .aud-speed, .aud-rd { grid-row: 2; }
  .aud-speed { grid-column: 1; justify-self: start; min-width: 64px; }
  .aud-rd { grid-column: 2; justify-self: start; }
}

/* videos */
.vid { margin: 0; border-radius: var(--r-xl); overflow: hidden; background: #0F3A36; box-shadow: var(--shadow); }
.vid video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0F3A36; }
.vid-stage { position: relative; line-height: 0; background: #0F3A36; }
.vid-stage video { object-fit: cover; }
.vid-go { position: absolute; inset: 0; width: 100%; display: grid; place-content: center; justify-items: center; gap: .65rem; color: #fff; background: linear-gradient(180deg, rgba(10, 40, 37, .05) 30%, rgba(10, 40, 37, .55)); line-height: 1.2; cursor: pointer; }
.vid-btn { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #0F3A36; box-shadow: 0 8px 26px rgba(0, 0, 0, .35); transition: transform .15s; }
.vid-btn svg { width: 30px; height: 30px; margin-left: 4px; }
.vid-go:hover .vid-btn { transform: scale(1.06); }
.vid-lab { font-weight: 600; font-size: .95rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(10, 40, 37, .72); }
.vid.on .vid-go { display: none; }
.vid-btn .spin { display: none; }
.vid.loading .vid-btn svg { display: none; }
.vid.loading .vid-btn .spin { display: inline-block; width: 30px; height: 30px; border-width: 4px; }
.vid-msg { position: absolute; left: .75rem; right: .75rem; bottom: .75rem; padding: .7rem .85rem; border-radius: var(--r); background: var(--warn-wash); color: var(--ink); font-size: .9rem; line-height: 1.4; }
.spin { display: inline-block; width: 1.15em; height: 1.15em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; vertical-align: -.2em; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.aud.loading .aud-play { opacity: .9; }

/* Check sound and video */
.chk-act { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.chks { display: grid; gap: 0; margin-top: .75rem; }
.chk { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.chk p { font-size: .88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.chk-i { width: 1.35rem; height: 1.35rem; border-radius: 50%; margin-top: .1rem; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--ink-2); }
.chk.ok .chk-i { background: var(--ok); color: #fff; }
.chk.ok .chk-i::before { content: "\2713"; }
.chk.bad .chk-i { background: var(--alert-solid); color: #fff; }
.chk.bad .chk-i::before { content: "!"; }
.chk.skip .chk-i { background: var(--warn-wash); color: var(--warn); border: 1px solid var(--warn-line); }
.chk.skip .chk-i::before { content: "i"; }
.chk.run .chk-i { background: none; border: 3px solid var(--ac); border-right-color: transparent; animation: spin .75s linear infinite; }
.chk-test { margin-top: .75rem; font-weight: 600; min-height: 1.4em; }

.vid figcaption { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem; background: var(--surface); font-size: .92rem; }
.vid figcaption strong { font-weight: 600; white-space: nowrap; flex: none; }
.vid figcaption span { color: var(--ink-3); min-width: 0; line-height: 1.35; }
.vid figcaption .ic { color: var(--ac-ink); flex: none; }
.watch { display: grid; gap: .55rem; }
.watch h2 { font-size: 1.02rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
