:root {
  color-scheme: dark;
  font: 100%/1.4 Arial, Helvetica, sans-serif;
  background: #18191a;
  color: #f7f5f1;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; }
a { color: inherit; text-underline-offset: .2em; }
button, select { font: inherit; }
button, select, .pdf { min-height: 2.75rem; }
button, select { border: 1px solid #5a5b5b; border-radius: .3rem; background: #2e3031; color: inherit; }
button { padding: .45rem .9rem; cursor: pointer; }
button:disabled { opacity: .42; cursor: default; }
button:hover:enabled, select:hover { border-color: #b9bcbd; }
:focus-visible { outline: 3px solid #ff9eab; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
header { flex: none; padding: .55rem clamp(1rem, 4vw, 4rem); display: flex; align-items: center; justify-content: space-between; background: #111213; border-bottom: 1px solid #38393a; }
.brand { font: bold 1.9rem Georgia, serif; letter-spacing: -.08em; text-decoration: none; }
.brand span { color: #f26070; }
nav { display: flex; gap: 1.4rem; font-size: .95rem; }
main { flex: 1; min-height: 0; display: flex; flex-direction: column; width: min(90rem, 100%); margin: 0 auto; padding: 1.1rem clamp(.65rem, 3vw, 3rem) 1.3rem; }
.heading { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
h1 { margin: 0; font: normal clamp(1.75rem,3vw,2.65rem)/1.05 Georgia,serif; }
.heading p { margin: .38rem 0 0; color: #cfcdca; }
.resources { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 1rem; }
.resources a { display: inline-flex; align-items: center; min-height: 2.75rem; white-space: nowrap; }
.player { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; container-type: inline-size; }
/* Start at full width (16:9), then shrink the slide to leave room for the controls. */
.stage { height: 56.25cqw; min-height: min(6rem, 56.25cqw); aspect-ratio: 16 / 9; position: relative; overflow: hidden; isolation: isolate; background: #0e0f10; }
.cover, .frame, .slide-image, .layer, .advance-area { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide-image, .layer, .cover { display: block; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.layer { pointer-events: none; opacity: 0; }
.layer.shown { opacity: 1; }
.quotes .layer { transition: opacity 500ms ease-in-out; }
.rack-caption { opacity: 1; transition: opacity 350ms ease-in-out; }
.rack-photo { transition: opacity 1800ms ease-in-out; }
.rack-quote { transition: opacity 550ms ease-in-out; }
.rack-built .rack-caption { opacity: 0; }
.rack-built .rack-photo, .rack-built .rack-quote { opacity: 1; }
.rack-built .rack-quote { transition-delay: 1250ms; }
.advance-area { background: transparent; border: 0; border-radius: 0; }
.advance-area:focus-visible { outline-offset: -4px; }
.controls { flex: none; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem; margin-top: .8rem; }
.picker select { padding: .45rem .45rem; width: 9.25rem; }
.primary { background: #ae2d43; border-color: #d74861; font-weight: bold; min-width: 7.4rem; }
.fullscreen { background: transparent; }
.slide-link { position: absolute; }
.clip-button, .clip-video { position: absolute; left: 37.292%; top: 10%; width: 60%; height: 80%; border: 0; padding: 0; }
.clip-button { background: transparent; display: grid; place-items: center; }
.clip-button span { padding: .6em 1em; border-radius: 2rem; background: #19191be8; border: 1px solid #f4f2ef; color: white; font-weight: bold; font-size: clamp(.8rem,2vw,1.2rem); }
.clip-video { background: black; object-fit: contain; }
.audio-cue { position: absolute; left: 3.7%; top: 76.5%; width: 22%; height: 12%; min-height: 0; padding: 0; background: transparent; border: 0; }
.audio-cue[aria-pressed="true"] { border: 2px solid #fff; border-radius: .35rem; }
.media-error { position: absolute; inset: auto 4% 4%; background: #161719; border: 1px solid #aaa; padding: .5rem; text-align: center; }
.player:fullscreen, .player.expanded { background: #101112; width: 100%; height: 100%; justify-content: center; padding: .5rem; }
.player.expanded { position: fixed; z-index: 10; inset: 0; }
body:has(.expanded) { overflow: hidden; }
@media (max-width: 640px) {
  main { padding: .85rem 0; }
  .heading { padding: 0 .8rem; display: block; }
  .resources { margin-top: .25rem; justify-content: flex-start; font-size: .9rem; }
  .heading p { font-size: .9rem; }
  .pdf { font-size: .87rem; }
  .controls { gap: .35rem; padding: 0 .25rem; }
  .controls button,.picker select { padding: .35rem .45rem; font-size: .88rem; }
  .picker select { width: 7.9rem; }
  .primary { min-width: 5.8rem; }
}
@media (max-width: 390px) {
  .fullscreen { flex-basis: 60%; }
}
@media (prefers-reduced-motion: reduce) {
  .layer { transition: none !important; }
}
.picker { display: inline-flex; position: relative; align-items: center; justify-content: center; min-height: 2.75rem; padding: .35rem 1.5rem .35rem .65rem; border: 1px solid #5a5b5b; border-radius: .3rem; background: #2e3031; white-space: nowrap; }
.picker::after { content: ""; position: absolute; right: .55rem; top: 44%; border: solid currentColor; border-width: 0 1.5px 1.5px 0; width: .35rem; height: .35rem; transform: rotate(45deg); pointer-events: none; }
.picker:focus-within { outline: 3px solid #ff9eab; outline-offset: 3px; }
.picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
@media (max-width: 640px) { .picker { font-size: .88rem; } }
