/* Yi Vision Core: quiz motion layer. CSS-first, JS only enhances.
   Animates transform and opacity only. One easing: cubic-bezier(.2,.7,.2,1). */

/* ---------- Static styles (always on) ---------- */
#quiz .qq{position:relative;padding-left:16px}
#quiz .qq h3{margin-bottom:20px!important}
#quiz .qq::before{content:"";position:absolute;left:0;top:2px;bottom:2px;width:3px;border-radius:3px;background:var(--gr,#0B8F47);opacity:0}
#quiz .qq.yi-answered::before{opacity:1}

#quiz .chip{position:relative;box-shadow:0 0 0 rgba(31,42,92,0)}
#quiz .chip[aria-pressed=true]::before{content:"\2713";display:inline-block;margin-right:8px;font-weight:700;line-height:1}
#quiz .chip:focus-visible{outline:3px solid var(--nv,#1F2A5C);outline-offset:2px}

/* Progress */
.yi-qprog{max-width:900px;margin:0 0 24px}
.yi-qprog__label{margin:0 0 8px;font:600 14px/1.3 Inter,sans-serif;color:var(--nv,#1F2A5C)}
.yi-qprog__track{height:4px;border-radius:4px;background:var(--line,#e3e6ef);overflow:hidden}
.yi-qprog__bar{height:100%;width:100%;border-radius:4px;background:linear-gradient(90deg,#F58220,#0B8F47);transform-origin:left center;transform:scaleX(0)}

/* Result list: number badges */
#result ol{list-style:none;padding-left:0;counter-reset:yires}
#result ol li{counter-increment:yires;position:relative;padding-left:44px;min-height:32px}
#result ol li::before{content:counter(yires);position:absolute;left:0;top:-1px;width:32px;height:32px;border-radius:50%;background:var(--nv,#1F2A5C);color:#fff;display:grid;place-items:center;font:700 15px/1 Archivo,Inter,sans-serif}

#result .btn{min-height:48px}

@media(max-width:560px){
	#quiz .qq{padding-left:12px}
	#quiz .chip{max-width:100%}
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference){
	#quiz .chip{transition:transform .2s cubic-bezier(.2,.7,.2,1),box-shadow .2s cubic-bezier(.2,.7,.2,1),background-color .2s cubic-bezier(.2,.7,.2,1),border-color .2s cubic-bezier(.2,.7,.2,1),color .2s cubic-bezier(.2,.7,.2,1)}
	#quiz .chip:hover{transform:translateY(-2px);border-color:var(--sa,#F58220);box-shadow:0 6px 16px rgba(31,42,92,.12)}
	#quiz .chip:active{transform:scale(.98);box-shadow:0 2px 6px rgba(31,42,92,.1)}
	#quiz .chip[aria-pressed=true]{animation:yi-pop .3s cubic-bezier(.2,.7,.2,1)}
	#quiz .chip[aria-pressed=true]::before{animation:yi-tick .3s cubic-bezier(.2,.7,.2,1) both}

	.yi-qprog__bar{transition:transform .4s cubic-bezier(.2,.7,.2,1)}
	#quiz .qq::before{transition:opacity .3s cubic-bezier(.2,.7,.2,1)}

	/* Scroll reveal: hidden state only when JS marked the element */
	#quiz .qq.yi-pre{opacity:0;transform:translateY(14px)}
	#quiz .qq.yi-pre.yi-in{opacity:1;transform:none;transition:opacity .4s cubic-bezier(.2,.7,.2,1),transform .4s cubic-bezier(.2,.7,.2,1);transition-delay:var(--yi-d,0ms)}

	/* Result */
	#result.show{animation:yi-rise .45s cubic-bezier(.2,.7,.2,1) both}
	#result.show ol li{animation:yi-rise-s .35s cubic-bezier(.2,.7,.2,1) both}
	#result.show ol li:nth-child(1){animation-delay:.12s}
	#result.show ol li:nth-child(2){animation-delay:.2s}
	#result.show ol li:nth-child(3){animation-delay:.28s}
	#result.show ol li:nth-child(4){animation-delay:.36s}
	#result.show ol li:nth-child(5){animation-delay:.44s}
	#result.show ol li:nth-child(n+6){animation-delay:.52s}
	#result ol li::before{transition:transform .2s cubic-bezier(.2,.7,.2,1)}
	#result ol li:hover::before{transform:scale(1.12)}
	#result .btn{transition:transform .2s cubic-bezier(.2,.7,.2,1),box-shadow .2s cubic-bezier(.2,.7,.2,1),background-color .2s cubic-bezier(.2,.7,.2,1),color .2s cubic-bezier(.2,.7,.2,1),border-color .2s cubic-bezier(.2,.7,.2,1)}
	#result .btn:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(31,42,92,.16)}
	#result .btn:active{transform:scale(.98)}
}
#result .btn.sa:hover{background:var(--sa-d,#C85F00)}
#result .btn.ghost:hover{background:var(--nv,#1F2A5C);border-color:var(--nv,#1F2A5C);color:#fff}

@keyframes yi-pop{0%{transform:scale(1)}45%{transform:scale(1.04)}100%{transform:scale(1)}}
@keyframes yi-tick{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}
@keyframes yi-rise{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@keyframes yi-rise-s{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
