/* Reset, media slots, video controls, accessibility helpers. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; border-radius: .5rem;
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: 1rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 3px; border-radius: 4px; }

/* Media slot: holds its aspect ratio whether or not the file exists. */
.slot { position: relative; overflow: hidden; aspect-ratio: var(--ar, 16 / 9); background: var(--slot-bg, #111); }
.slot > img, .slot > video, .slot > picture, .slot > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot[data-missing]::after { content: attr(data-missing); position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 .8rem/1.3 ui-monospace, monospace; letter-spacing: .04em; color: var(--muted); text-align: center; padding: 1rem; }

/* Video play button: shown only when reduced motion is on, or autoplay was refused. */
.vplay { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; display: none; align-items: center; gap: .5rem;
  min-height: 44px; padding: 0 1rem 0 .85rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; font-size: .85rem; cursor: pointer; backdrop-filter: blur(6px); }
.vplay svg { width: 14px; height: 14px; }
.slot.is-manual .vplay { display: inline-flex; }

/* Copy-email feedback */
.copied { opacity: 0; transition: opacity .2s; }
.copied.is-on { opacity: 1; }

[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
