.match-compare-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: fit-content;
    padding: 7px 12px;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
    color: var(--blue);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.5;
}

.match-compare-small:hover {
    background: #e7eff7;
    border-color: var(--blue);
}

html.match-compare-open {
    overflow: hidden;
}

.match-compare {
    width: min(960px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 28px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 20px 70px #172b3e33;
}

.match-compare::backdrop {
    background: #172b3e99;
}

.match-compare:not([open]) {
    display: none;
}

.match-compare-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.match-compare-heading h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.match-compare-close {
    flex: 0 0 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--blue);
    font-size: 1.5rem;
    line-height: 1;
}

.match-compare p {
    font-size: .9rem;
}

.match-compare form {
    margin-top: 20px;
}

.match-compare label {
    display: block;
    margin-bottom: 7px;
    font-size: .9rem;
    font-weight: 600;
}

.match-compare input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--ink);
    font-size: 1rem;
}

.match-compare input[aria-invalid="true"] {
    border-color: var(--rose);
}

.match-compare #match-compare-hint {
    margin-top: 7px;
    font-size: .8rem;
}

.match-compare form .button {
    margin-top: 14px;
}

.match-compare .match-compare-error {
    color: #a52b45;
    margin-top: 8px;
}

.match-compare .match-compare-error:empty {
    display: none;
}

.match-compare-result-note {
    margin-top: 24px;
}

.match-compare-chart {
    margin: 12px 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
}

.match-compare-chart canvas {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
}

.match-compare [hidden] {
    display: none;
}

@media (max-width: 560px) {
    .match-compare {
        padding: 18px;
    }
}
