/* ---------- Compare page ---------- */

.cmpp-head {
    background: var(--blue);
    color: var(--white);
    padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 40px);
    overflow: hidden;
}

.cmpp-head__inner {
    display: grid;
    grid-template-columns: 1fr minmax(0, 440px);
    grid-template-areas: "crumbs crumbs" "title side";
    align-items: end;
    gap: 16px 48px;
}

.cmpp-head .crumbs {
    grid-area: crumbs;
}

.cmpp-head h1 {
    grid-area: title;
    font-size: clamp(2.8rem, 8.5vw, 7.5rem);
    line-height: .78;
    margin-bottom: -.04em;
}

.cmpp-head__side {
    grid-area: side;
    display: grid;
    gap: 20px;
    padding-bottom: 8px;
}

.cmpp-head__side p {
    margin: 0;
    color: var(--muted-on-blue);
    font-size: .9375rem;
}

.cmpp-head__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
}

.cmpp-head .link {
    color: var(--yellow);
}

/* Toggle switch */

.switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .875rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.switch input {
    appearance: none;
    position: relative;
    flex: none;
    width: 48px;
    height: 26px;
    margin: 0;
    background: var(--blue-night);
    border-radius: 13px;
    cursor: pointer;
    transition: background .2s;
}

.switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: transform .25s var(--ease);
}

.switch input:checked {
    background: var(--yellow);
}

.switch input:checked::after {
    background: var(--ink);
    transform: translateX(22px);
}

.switch input:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
}

.cmpp {
    padding-top: clamp(32px, 4vw, 56px);
}

.cmpp .demo-note {
    margin-top: 40px;
}

/* Quiz band */

.cmpp-band {
    background: var(--yellow);
    padding: 36px 0;
}

.cmpp-quiz {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 32px;
}

.cmpp-quiz p {
    margin: 0;
}

.cmpp-quiz .d {
    font-size: clamp(2rem, 4vw, 3rem);
}

.cmpp-quiz .btn {
    margin-left: auto;
}

@media (max-width: 760px) {
    .cmpp-head__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "crumbs" "title" "side";
    }

    .cmpp-quiz .btn {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .switch input,
    .switch input::after { transition: none; }
}
