/* /compare/ — "versus": VS cards, burst badge, matchup reader. Builds on /qw/qw.css. */

.vs {
    padding-top: 28px;
}

/* ---- header ------------------------------------------------------------ */

.vs-head {
    position: relative;
    max-width: 720px;
    margin: 6px auto 40px;
    text-align: center;
}

.vs-head__tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.vs-head__title {
    font-weight: 400;
}

.vs-head__title .qw-sticker {
    font-size: clamp(68px, 13vw, 140px);
}

.vs-head > .vs-burst {
    position: absolute;
    top: 30px;
    right: 4%;
    width: 96px;
    height: 96px;
    animation: vs-spin 7s linear infinite;
}

.vs-head > .vs-burst b {
    animation: vs-spin 7s linear infinite reverse;
}

@keyframes vs-spin {
    to {
        transform: rotate(360deg);
    }
}

.vs-head__lead {
    max-width: 520px;
    margin: 16px auto 0;
    font-family: var(--font-pixel);
    font-size: 15px;
    line-height: 1.35;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 60, 140, 0.45);
}

.vs-head__count {
    margin-top: 8px;
    font-size: 24px;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 60, 140, 0.5);
    transform: rotate(-2deg);
}

/* ---- VS burst badge ---------------------------------------------------- */

.vs-burst {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: none;
    filter: drop-shadow(0 6px 10px rgba(160, 20, 20, 0.3));
}

.vs-burst svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.vs-burst polygon {
    fill: var(--red);
    stroke: var(--white);
    stroke-width: 5;
    stroke-linejoin: round;
}

.vs-burst b {
    position: relative;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: 26px;
    line-height: 1;
    color: var(--white);
    text-transform: uppercase;
    transform: rotate(-8deg);
}

/* ---- sides ------------------------------------------------------------- */

.vs-arena {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.vs-side {
    display: flex;
    justify-content: center;
    min-width: 0;
    text-align: center;
    container-type: inline-size;
}

.vs-side--us img {
    width: min(150px, 100%);
    height: auto;
    transform: rotate(-5deg);
    filter: drop-shadow(0 6px 10px rgba(0, 70, 160, 0.25));
}

.vs-name {
    display: block;
    font-family: var(--font-pixel);
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--pink-hot);
    -webkit-text-stroke: 0.16em var(--white);
    paint-order: stroke fill;
    filter: drop-shadow(0 4px 0 rgba(22, 22, 22, 0.1)) drop-shadow(0 8px 14px rgba(0, 70, 160, 0.22));
    transform: rotate(3deg);
}

.vs-side--a .vs-name,
.vs-side--b .vs-name {
    font-size: clamp(14px, calc(175cqi / var(--n, 6)), var(--max-fs, 46px));
}

.vs-side--a .vs-name {
    color: var(--blue);
    transform: rotate(-4deg);
}

.vs-side--solo {
    justify-content: flex-start;
    text-align: left;
}

.vs-side--solo .vs-name {
    color: var(--ink);
    font-size: clamp(24px, 2.6vw, 32px);
    transform: rotate(-2deg);
}

.vs-solo__q {
    width: 78px;
    height: auto;
    transform: rotate(-10deg);
    filter: drop-shadow(0 6px 10px rgba(0, 70, 160, 0.25));
}

.vs-arena:has(.vs-solo__q) {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
}

/* ---- matchup cards ----------------------------------------------------- */

.vs-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 28px;
    max-width: 1060px;
    margin: 0 auto;
}

.vs-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 14px 14px 20px;
    border-radius: 36px;
    color: var(--ink);
    text-decoration: none;
    background: rgba(253, 253, 253, 0.82);
    transform: rotate(var(--r, 0deg));
    transition: transform 0.4s var(--ease-pop), box-shadow 0.3s, background-color 0.2s;
}

.vs-card .vs-arena {
    min-height: 150px;
    padding: 20px 16px;
    border-radius: 26px;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #eceef1 25%, transparent 25%),
        linear-gradient(-45deg, #eceef1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eceef1 75%),
        linear-gradient(-45deg, transparent 75%, #eceef1 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
    box-shadow: 0 0 0 1px rgba(22, 22, 22, 0.04) inset;
}

.vs-card:hover {
    background: var(--white);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.85) inset, 0 26px 50px rgba(0, 60, 140, 0.22);
    animation: vs-wiggle 0.55s var(--ease-out);
}

.vs-card:hover .vs-burst svg {
    transform: rotate(25deg) scale(1.12);
}

.vs-burst svg {
    transition: transform 0.45s var(--ease-pop);
}

.vs-card:hover .vs-side--a {
    transform: translateX(6px);
}

.vs-card:hover .vs-side--b {
    transform: translateX(-6px);
}

.vs-side {
    transition: transform 0.35s var(--ease-pop);
}

.vs-card:active {
    transform: scale(0.98);
}

@keyframes vs-wiggle {
    20% {
        transform: rotate(-2deg) scale(1.02);
    }
    45% {
        transform: rotate(1.6deg) scale(1.02);
    }
    70% {
        transform: rotate(-0.8deg) scale(1.015);
    }
    100% {
        transform: rotate(0deg) scale(1.015);
    }
}

.vs-card__title {
    padding: 0 8px;
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: 21px;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.vs-card__desc {
    padding: 0 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #4f5157;
}

.vs-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding: 4px 8px 0;
}

.vs-card__go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-pixel);
    font-size: 14px;
    text-transform: uppercase;
    transition: transform 0.35s var(--ease-pop);
}

.vs-card__go svg {
    width: 16px;
    height: 16px;
}

.vs-card:hover .vs-card__go {
    transform: translateX(4px) rotate(-4deg);
}

/* ==========================================================================
   single matchup
   ========================================================================== */

.vs-hero {
    max-width: 900px;
    margin: 10px auto 40px;
    text-align: center;
}

.vs-hero__h1 {
    font-weight: 400;
}

.vs-arena--hero {
    position: relative;
    gap: clamp(10px, 3vw, 36px);
    padding: clamp(20px, 4vw, 44px) clamp(14px, 3vw, 40px);
    border-radius: 40px;
    background: rgba(253, 253, 253, 0.42);
    border: 1px solid rgba(253, 253, 253, 0.75);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.85) inset, 0 18px 40px rgba(0, 60, 140, 0.14);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
}

.vs-arena--hero .vs-side--us img {
    width: min(260px, 100%);
}

.vs-arena--hero .vs-name {
    --max-fs: 92px;
}

.vs-arena--hero .vs-side--solo .vs-name {
    font-size: clamp(32px, 5vw, 60px);
}

.vs-arena--hero .vs-solo__q {
    width: clamp(80px, 12vw, 130px);
}

.vs-arena--hero .vs-burst {
    width: clamp(84px, 11vw, 130px);
    height: clamp(84px, 11vw, 130px);
    animation: vs-pulse 2.4s var(--ease-pop) infinite;
}

.vs-arena--hero .vs-burst b {
    font-size: clamp(28px, 3.6vw, 44px);
}

@keyframes vs-pulse {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }
    12% {
        transform: scale(1.14) rotate(-8deg);
    }
    24% {
        transform: scale(1) rotate(0deg);
    }
}

.vs-hero__sub {
    display: inline-block;
    margin-top: 22px;
    padding: 10px 20px 8px;
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-pixel);
    font-size: clamp(18px, 2.4vw, 26px);
    line-height: 1.15;
    box-shadow: 0 4px 0 rgba(0, 60, 140, 0.12);
    transform: rotate(-1.5deg);
}

.vs-hero__desc {
    max-width: 600px;
    margin: 20px auto 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--white);
    text-shadow: 0 1px 10px rgba(0, 50, 120, 0.55);
}

.vs-hero__meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.vs-hero__meta .qw-tag {
    font-size: 14px;
}

.vs-body {
    max-width: calc(68ch + 2 * clamp(22px, 5vw, 64px));
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px);
    border-radius: 40px;
    background: rgba(253, 253, 253, 0.95);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.vs-body .qw-prose {
    max-width: 68ch;
    margin: 0 auto;
}

.vs-body .qw-prose table {
    box-shadow: 0 0 0 2px var(--ink);
    margin-top: 1.4em;
    margin-bottom: 1.4em;
}

.vs-body .qw-prose th {
    background: var(--red);
    color: var(--white);
}

.vs-body .qw-prose tr:nth-child(even) td {
    background: #f1f6ff;
}

.vs-body .qw-prose td {
    background: var(--white);
    border-bottom: 1px solid #e3e8f0;
}

.vs-body .qw-prose td:first-child {
    font-weight: 700;
}

.vs-body .qw-prose h2::before {
    background: var(--red);
}

/* ---- signup + more ------------------------------------------------------ */

.vs-signup {
    position: relative;
    max-width: 640px;
    margin: 64px auto 0;
    padding: 56px clamp(18px, 4vw, 40px) 28px;
    text-align: center;
}

.vs-signup__sticker {
    position: absolute;
    top: -46px;
    left: 50%;
    width: 230px;
    margin-left: -115px;
}

.vs-signup__lead {
    margin-bottom: 16px;
    font-family: var(--font-pixel);
    font-size: 16px;
    line-height: 1.3;
    text-transform: uppercase;
}

.vs-signup .qw-form {
    max-width: 480px;
    margin: 0 auto;
}

.vs-more {
    max-width: 1060px;
    margin: 72px auto 0;
}

.vs-more__head {
    text-align: center;
    margin-bottom: 22px;
}

.vs-list--mini {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.vs-card--mini {
    gap: 10px;
    padding: 10px 10px 16px;
    border-radius: 28px;
}

.vs-card--mini .vs-arena {
    min-height: 100px;
    padding: 12px 8px;
    gap: 4px;
    border-radius: 20px;
}

.vs-card--mini .vs-name {
    --max-fs: 24px;
}

.vs-card--mini .vs-side--us img {
    width: 70px;
}

.vs-card--mini .vs-burst {
    width: 46px;
    height: 46px;
}

.vs-card--mini .vs-burst b {
    font-size: 15px;
}

.vs-card--mini .vs-solo__q {
    width: 46px;
}

.vs-card--mini .vs-arena:has(.vs-solo__q) {
    gap: 8px;
}

.vs-card--mini .vs-card__title {
    font-size: 15px;
    padding: 0 6px;
}

.vs-more__all {
    margin-top: 34px;
    text-align: center;
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 960px) {
    .vs-list--mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .vs-list {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .vs-list--mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 560px) {
    .vs {
        padding-top: 16px;
    }

    .vs-head > .vs-burst {
        width: 62px;
        height: 62px;
        top: 34px;
        right: -4px;
    }

    .vs-head > .vs-burst b {
        font-size: 20px;
    }

    .vs-head__lead {
        font-size: 13px;
    }

    .vs-card {
        border-radius: 30px;
        padding: 10px 10px 16px;
    }

    .vs-card .vs-arena {
        min-height: 120px;
        padding: 14px 10px;
        border-radius: 22px;
    }


    .vs-burst {
        width: 60px;
        height: 60px;
    }

    .vs-burst b {
        font-size: 20px;
    }

    .vs-card__title {
        font-size: 18px;
    }

    .vs-card__desc {
        font-size: 14px;
    }

    .vs-arena--hero {
        border-radius: 30px;
        padding: 22px 10px;
        gap: 6px;
    }

    .vs-arena--hero .vs-side--us img {
        width: 100%;
    }

    .vs-hero__desc {
        font-size: 16px;
    }

    .vs-body {
        border-radius: 30px;
    }

    .vs-card--mini .vs-arena {
        min-height: 86px;
    }


    .vs-card--mini .vs-card__title {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vs-head > .vs-burst,
    .vs-head > .vs-burst b,
    .vs-arena--hero .vs-burst {
        animation: none;
    }
}

.vs-card--mini .vs-side--solo .vs-name {
    font-size: 16px;
}

/* give the opponent's name more room than our logo */
.vs-arena:has(.vs-side--a.vs-side--us) {
    grid-template-columns: minmax(0, 0.72fr) auto minmax(0, 1.28fr);
}

.vs-arena:has(.vs-side--b.vs-side--us) {
    grid-template-columns: minmax(0, 1.28fr) auto minmax(0, 0.72fr);
}

.vs-body .qw-prose > :first-child {
    margin-top: 0;
}
