:root {
  --bg: #fbfaf7;
  --text: #1f1e1c;
  --muted: #6b6a66;
  --line: #e4e2dc;
  --accent: #1d6f5a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --text: #ecebe7; --muted: #a3a19b; --line: #2e2d2a; --accent: #5dcaa5; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 680px; margin: 0 auto; padding: 56px 24px 40px; }
header.site { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 40px; }
header.site a.brand { font-weight: 600; font-size: 20px; color: var(--text); text-decoration: none; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:hover, a { color: var(--accent); }
h1 { font-size: 38px; line-height: 1.15; margin: 0 0 16px; font-weight: 650; }
h2 { font-size: 21px; margin: 36px 0 8px; font-weight: 600; }
p.lede { font-size: 20px; color: var(--muted); margin: 0 0 28px; }
.badge { display: inline-block; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); margin-bottom: 18px; }
ul.points { list-style: none; padding: 0; margin: 0 0 28px; }
ul.points li { padding: 12px 0; border-top: 1px solid var(--line); }
ul.points li:last-child { border-bottom: 1px solid var(--line); }
ul.points strong { display: block; }
.muted { color: var(--muted); }
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
footer { max-width: 680px; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer a { color: var(--muted); margin-right: 16px; }

/* Keep-the-best demo */
.demo { border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 32px; background: color-mix(in srgb, var(--bg) 92%, var(--text) 8%); }
.demo-head { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 12px; }
.demo-title { font-weight: 600; }
.demo-size { color: var(--muted); font-variant-numeric: tabular-nums; }
.shots { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px;
  transition: opacity .6s ease, transform .6s ease, outline-color .4s ease, filter .6s ease; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot.v1 img { filter: blur(2.5px); }
.shot.v2 img { filter: brightness(.68) saturate(.85); }
.shot.v3 img { transform: scale(1.18) rotate(-4deg) translate(4%, 3%); }
.shot.v4 img { filter: blur(1.2px) brightness(1.25) saturate(.7); }
.shot .tag { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  background: var(--accent); color: #fff; opacity: 0; transform: translateY(-4px); transition: opacity .4s ease, transform .4s ease; }
.scanline { position: absolute; top: -4px; bottom: -4px; width: 3px; left: 0; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 14px var(--accent); opacity: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 26px; }
.chips span { font-size: 13px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--accent);
  opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease; }
.demo-foot { margin-top: 10px; font-size: 15px; color: var(--muted); min-height: 24px; }
.demo-foot strong { color: var(--accent); }

/* states */
.demo.scanning .scanline { animation: scan 1.4s ease-in-out forwards; }
@keyframes scan { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 3px); opacity: 0; } }
.demo.picked .shot.keeper { outline-color: var(--accent); }
.demo.picked .shot.keeper .tag, .demo.picked .chips span { opacity: 1; transform: none; }
.demo.picked .shot:not(.keeper) { opacity: .55; }
.demo.cleared .shot:not(.keeper) { opacity: 0; transform: scale(.6) translateY(16px); }
.demo.cleared .shot.keeper { transform: scale(1.12); z-index: 1; }
.demo.fading .shots, .demo.fading .chips { opacity: 0; transition: opacity .4s ease; }
.demo .shots, .demo .chips { transition: opacity .4s ease; }

@media (max-width: 480px) { h1 { font-size: 31px; } .demo.cleared .shot.keeper { transform: scale(1.6); } .demo.cleared .shots { margin: 22px 0; } .shots { gap: 5px; } .shot { border-radius: 7px; } .shot .tag { font-size: 10px; padding: 1px 5px; left: 3px; top: 3px; } }
@media (prefers-reduced-motion: reduce) { .shot, .chips span, .shot .tag { transition: none; } .demo.scanning .scanline { animation: none; } }
