/* DivyGfx, comparison sections (.cv): animated layer. Behaviour in compare-x.js. */

/* head: VS medallion, floating logos, shimmering column tops */
.cv-head { position: relative; }
.cv-head > .b { padding-left: 34px !important; }
.cv-head > .a, .cv-head > .b { position: relative; overflow: hidden; }
.cv-head > .a::after, .cv-head > .b::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--cva), transparent); background-size: 200% 100%; animation: cvxShim 3.2s linear infinite; }
.cv-head > .b::after { background-image: linear-gradient(90deg, transparent, var(--cvb), transparent); animation-delay: -1.6s; }
@keyframes cvxShim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.cv-head .cv-logo { animation: cvxBob 4s ease-in-out infinite; box-shadow: 0 8px 16px -12px rgba(15,17,21,.5); background: #fff; }
.cv-head .b .cv-logo { animation-delay: -2s; }
@keyframes cvxBob { 50% { transform: translateY(-3px) rotate(-4deg); } }
.cvx-vs { position: absolute; z-index: 3; top: 50%; left: var(--vx, 64.7%); width: 40px; height: 40px; margin: -20px 0 0 -20px; display: grid; place-items: center; border-radius: 50%; background: var(--dark); color: #fff; font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .04em; box-shadow: 0 0 0 4px #fff, 0 10px 22px -10px rgba(15,17,21,.7); }
.cvx-vs::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; background: conic-gradient(var(--cva), var(--cvb), var(--cva)); -webkit-mask: radial-gradient(closest-side, transparent 78%, #000 80%); mask: radial-gradient(closest-side, transparent 78%, #000 80%); animation: cvxSpin 4s linear infinite; }
@keyframes cvxSpin { to { transform: rotate(360deg); } }

/* rows: winning cell fills in, Edge badge pops, accent rail on hover */
.cv-row { position: relative; }
.cv-row::before { content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--cva), var(--cvb)); transform: scaleY(0); transition: transform .35s var(--ease); }
.cv-row:hover::before { transform: none; }
.cv-row .win { isolation: isolate; }
.cv-row .win::before { content: ""; position: absolute; inset: 4px; z-index: -1; border-radius: 12px; transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); transition-delay: calc(var(--i, 0) * .07s + .35s); }
.cv-row .a.win::before { background: linear-gradient(90deg, color-mix(in srgb, var(--cva) 12%, #fff), color-mix(in srgb, var(--cva) 3%, #fff)); }
.cv-row .b.win::before { background: linear-gradient(90deg, color-mix(in srgb, var(--cvb) 12%, #fff), color-mix(in srgb, var(--cvb) 3%, #fff)); }
.cv-table.is-in .cv-row .win::before { transform: none; }
.cv-row .win::after { transform: scale(0); transition: transform .4s cubic-bezier(.2,1.6,.4,1); transition-delay: calc(var(--i, 0) * .07s + .7s); }
.cv-table.is-in .cv-row .win::after { transform: none; }
.cv-row > div:first-child { position: relative; padding-left: 22px; }

/* the side the quiz favours glows */
.cv-wrap.lean-a .cv-head > .a, .cv-wrap.lean-b .cv-head > .b { box-shadow: inset 0 -3px 0 var(--cvx-c); }
.cv-wrap.lean-a { --cvx-c: var(--cva); } .cv-wrap.lean-b { --cvx-c: var(--cvb); }
.cv-wrap.lean-a .cv-row .a.win::before, .cv-wrap.lean-b .cv-row .b.win::before { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cvx-c) 45%, transparent); }
.cv-wrap.lean-a .cv-row .b, .cv-wrap.lean-b .cv-row .a { opacity: .72; transition: opacity .4s ease; }

/* tally of edges */
.cvx-tally { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line-2); background: linear-gradient(180deg, #fbfcfd, #fff); }
.cvx-tally > span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted-2); line-height: 1.3; }
.cvx-tally > span:last-child { text-align: right; }
.cvx-tally > span b { font-family: var(--font-head); font-size: 26px; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cvx-tally > span:first-child b { color: color-mix(in srgb, var(--cva) 80%, #000); } .cvx-tally > span:last-child b { color: color-mix(in srgb, var(--cvb) 80%, #000); }
.cvx-bar { position: relative; display: flex; height: 12px; border-radius: 99px; background: var(--soft-2); overflow: hidden; }
.cvx-bar i { height: 100%; width: 0; transition: width 1.2s var(--ease) .3s; }
.cvx-bar i:first-child { background: linear-gradient(90deg, color-mix(in srgb, var(--cva) 60%, #fff), var(--cva)); }
.cvx-bar i:last-child { margin-left: auto; background: linear-gradient(90deg, var(--cvb), color-mix(in srgb, var(--cvb) 60%, #fff)); }
.cvx-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #fff; }
.cvx-tally small.cvx-cap { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--muted-2); margin-top: -6px; }

/* best-for cards */
.cv-best > div { position: relative; padding-left: 52px; transition: background-color .3s ease; }
.cv-best > div::before { content: ""; position: absolute; left: 18px; top: 18px; width: 22px; height: 22px; border-radius: 7px; background: var(--cva) center / 13px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); box-shadow: 0 6px 12px -6px var(--cva); }
.cv-best > div + div::before { background-color: var(--cvb); box-shadow: 0 6px 12px -6px var(--cvb); }
.cv-best > div:first-child:hover { background: color-mix(in srgb, var(--cva) 5%, #fff); } .cv-best > div + div:hover { background: color-mix(in srgb, var(--cvb) 5%, #fff); }

/* quiz: progress, lively meter, winner card */
.cv-quiz { overflow: hidden; isolation: isolate; }
.cv-quiz::before { content: ""; position: absolute; right: -80px; top: -80px; z-index: -1; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--cva) 45%, transparent), transparent); opacity: .6; animation: cvxDrift 9s ease-in-out infinite alternate; }
.cv-quiz::after { content: ""; position: absolute; left: -80px; bottom: -100px; z-index: -1; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--cvb) 40%, transparent), transparent); opacity: .5; animation: cvxDrift 11s ease-in-out infinite alternate-reverse; }
@keyframes cvxDrift { to { transform: translate(-30px, 30px) scale(1.15); } }
.cvx-prog { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.7); }
.cvx-prog i { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.cvx-prog i::after { content: ""; display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--cva), var(--cvb)); transition: width .5s var(--ease); }
.cv-q { transition: box-shadow .3s ease, background-color .3s ease; }
.cv-q.done { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.cv-q p { display: flex; gap: 8px; }
.cv-q p::before { content: attr(data-n); flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.1); font-size: 11.5px; font-weight: 700; color: #fff; transition: background-color .3s ease, color .3s ease; }
.cv-q.done p::before { content: "✓"; background: #22c55e; }
.cv-q button { transition: background-color .2s ease, color .2s ease, transform .25s var(--ease); }
.cv-q button:active { transform: scale(.95); }
.cv-q button.on { animation: cvxPick .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes cvxPick { from { transform: scale(.9); } }
.cv-mr > div { position: relative; height: 10px; }
.cv-mr i { position: relative; overflow: hidden; }
.cv-mr i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: cvxGleam 2.4s ease-in-out infinite; }
@keyframes cvxGleam { 60%, 100% { transform: translateX(100%); } }
.cv-mr.lead span { color: #fff; font-weight: 700; } .cv-mr.lead em { color: #fff; }
.cv-res { position: relative; }
.cv-res.cvx-has { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.cv-res .cvx-win { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cvx-c, #fff) 60%, transparent); }
.cv-res .cvx-win img { width: 24px; height: 24px; }
.cv-res .cvx-win.tie { background: rgba(255,255,255,.12); color: #fff; font-family: var(--font-head); font-size: 13px; font-weight: 700; box-shadow: none; }
.cvx-burst { position: absolute; left: 34px; top: 34px; pointer-events: none; }
.cvx-burst i { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: var(--c); animation: cvxBurst .9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes cvxBurst { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(220deg); opacity: 0; } }

@media (max-width: 760px) {
  .cvx-vs { --vx: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; font-size: 10px; }
  .cv-row > div:first-child { padding-left: 12px; }
  .cv-head > .b { padding-left: 26px !important; }
  .cvx-tally > span b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-wrap *, .cv-wrap *::before, .cv-wrap *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
}
