@font-face{font-family:Oxanium;src:url('./fonts/Oxanium-Variable.ttf') format('truetype');font-weight:200 800;font-display:swap}
@font-face{font-family:Outfit;src:url('./fonts/Outfit-Variable.ttf') format('truetype');font-weight:100 900;font-display:swap}
:root{--bg:#070a12;--fg:#e7e3d6;--accent:#c8e83e;--on-accent:#070a12;--surface:#15191a;--line:#717c73;--muted:#d0d1c9;color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font-body,Outfit,Arial,sans-serif)}
button,a,input{touch-action:manipulation}
button,a{font:inherit}
button{cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.viewer{max-width:1160px;margin:auto;padding:20px}
.viewer h1{font:750 clamp(23px,4vw,36px)/1.12 var(--font-display,Oxanium,Arial,sans-serif);margin:0 0 12px;overflow-wrap:break-word}
.intro{font-size:16px;line-height:1.5;max-width:800px;margin:0 0 20px}
.eyebrow,.credit,.state-number,.toolbar{font-family:var(--font-mono,monospace);font-size:11px;line-height:1.5}
.eyebrow{color:var(--accent);margin:0 0 10px}
.proof-body{display:grid;gap:12px}
.stage{position:relative;min-width:0;background:var(--surface);border:1px solid var(--line);overflow:hidden;aspect-ratio:var(--ratio,8/5)}
.image-layer{position:absolute;inset:0;overflow:hidden}
.stage img{position:absolute;display:block;width:100%;height:100%;inset:0;object-fit:contain;user-select:none}
.image-message{position:absolute;inset:0;margin:0;padding:24px;display:grid;place-content:center;text-align:center;color:var(--muted);font-size:15px;line-height:1.5}
.stage img[hidden]{display:none}
.stage.loading::after{content:'Loading…';position:absolute;bottom:12px;right:12px;padding:6px 9px;background:var(--bg);color:var(--fg);font:12px monospace}
.caption{margin:0;line-height:1.5;font-size:15px;min-height:48px}
.caption strong{font-weight:600;color:var(--accent);margin-right:8px}
.choices{display:grid;grid-template-columns:repeat(var(--columns,4),minmax(0,1fr));grid-auto-rows:max-content;align-content:start;gap:8px}
.choice{padding:0;border:1px solid var(--line);background:var(--surface);color:var(--fg);text-align:left;min-width:0;overflow:hidden}
.choice img{width:100%;height:54px;display:block;object-fit:cover;background:var(--surface)}
.choice span{display:block;padding:9px 8px;font-size:13px;line-height:1.2;font-weight:500;overflow-wrap:break-word}
.choice[aria-pressed=true]{border-color:var(--accent);background:var(--accent);color:var(--on-accent);box-shadow:inset 0 0 0 1px var(--accent)}
.choice:hover{border-color:var(--accent)}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding-top:10px}
.toolbar a{color:var(--fg);text-decoration:underline;text-underline-offset:3px}
.state-number{color:var(--muted)}
.credit{color:var(--muted);margin:0}
.hint{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
.comparison .before-layer{clip-path:inset(0 calc(100% - var(--reveal,50%)) 0 0)}
.divider{position:absolute;top:0;bottom:0;left:var(--reveal,50%);width:2px;background:#fff;transform:translateX(-50%);pointer-events:none}
.divider::after{content:'↔';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border:2px solid white;border-radius:50%;background:#070a12;color:#fff;font:24px Arial;width:40px;height:40px;display:grid;place-items:center}
.range{position:absolute;z-index:2;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:ew-resize;touch-action:pan-y}
.stage:focus-within{outline:3px solid var(--accent);outline-offset:2px}
.corner{position:absolute;top:10px;background:#070a12;color:#e7e3d6;padding:6px 8px;font:11px/1.3 monospace;pointer-events:none}
.corner.before-label{left:10px}.corner.after-label{right:10px}
.actions{display:flex;gap:8px}.actions button{flex:1;min-height:44px;border:1px solid var(--line);background:var(--surface);color:var(--fg);padding:8px;font-size:13px}
.actions button[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.status{padding:24px;font-size:17px;line-height:1.5}
.target-reference{display:flex;gap:12px;align-items:center;min-width:0}.target-image-frame{position:relative;flex:0 0 30%;max-width:140px;height:90px;overflow:hidden;background:var(--surface)}.target-reference img{display:block;width:100%;height:100%;object-fit:contain}.target-reference .caption{min-height:0;min-width:0}
.embed .viewer{height:100dvh;max-width:none;padding:14px;display:grid;grid-template-rows:minmax(0,1fr)}
.embed .page-heading{display:none}
.embed.show-heading .viewer{grid-template-rows:auto minmax(0,1fr)}
.embed.show-heading .page-heading{display:block;max-height:88px;overflow:auto;margin:0 0 10px}
.embed.show-heading .page-heading .eyebrow{display:none}
.embed.show-heading .page-heading h1{font-size:clamp(20px,3.2vw,27px);margin-bottom:6px}
.embed.show-heading .page-heading .intro{font-size:13px;line-height:1.4;margin:0}
.embed .proof-body{min-height:0;grid-template-rows:minmax(130px,1fr) auto auto auto auto;gap:10px}
.embed .stage{aspect-ratio:auto;min-height:0}
.embed .caption{font-size:14px;min-height:42px;max-height:90px;overflow:auto}
.embed .choices{grid-template-columns:repeat(var(--columns,4),minmax(0,1fr));gap:7px;max-height:clamp(96px,30dvh,240px);overflow-y:auto;overscroll-behavior:contain}
.embed .choice img{height:42px}
.embed .toolbar{font-size:10px;padding-top:8px}
.embed .credit{display:block;font-size:10px;line-height:1.4;max-height:42px;overflow:auto}
.embed .credit:empty,.caption:empty{display:none}
.embed .comparison-body{grid-template-rows:minmax(130px,1fr) auto auto auto auto}
.embed.show-heading .proof-body{grid-template-rows:minmax(60px,1fr) auto auto auto auto}
.embed.show-heading .choices{max-height:clamp(88px,23dvh,180px)}
@media(max-width:559px){
 .viewer{padding:12px}.choices{grid-template-columns:repeat(3,minmax(0,1fr))}
 .embed .viewer{padding:10px}.embed .proof-body{gap:8px}.embed .choices{grid-template-columns:repeat(var(--mobile-columns,3),minmax(0,1fr))}
 .choice span{padding:8px 5px;font-size:12px;min-height:42px;display:flex;align-items:center}
 .embed .choice img{height:34px}.embed .caption{font-size:13px;min-height:54px}
 .toolbar{font-size:10px}.credit{font-size:10px}.intro{font-size:14px}.hint{font-size:11px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
