
/* Карточки задач из yandex-contests/previews */
.md-typeset .preview-problem {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0 0 0.75rem;
    padding: 0.05rem 0 0.05rem;
    position: relative;
}

.md-typeset .preview-problem:last-child {
    margin-bottom: 0;
}

.md-typeset details.task > p:has(> .preview-problem) {
    margin: 0 !important;
}

.md-typeset hr.preview-problem-divider {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.18);
    margin: 0.85rem 0 0.95rem !important;
}

.md-typeset .preview-problem::after {
    clear: both;
    content: "";
    display: block;
}

.md-typeset .preview-problem-tag {
    background: #f0efee;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    color: rgba(0, 0, 0, 0.72);
    float: right;
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    margin: 0.1rem 0 0.75rem 0.75rem;
    padding: 0.3rem 0.52rem;
}

.md-typeset .problem-statement {
    font-family: inherit;
    font-size: 0.96em;
    line-height: 1.58;
    margin: 0;
}

.md-typeset .problem-statement .problem-math {
    font-family: Cambria Math, "STIX Two Math", "Times New Roman", serif;
    font-size: 1.18em;
    font-style: italic;
    white-space: nowrap;
}

.md-typeset .problem-statement a,
.md-typeset .problem-statement a:hover,
.md-typeset .problem-statement a:focus {
    color: inherit !important;
    text-decoration: underline;
}

.md-typeset .problem-statement code,
.md-typeset .problem-statement td code,
.md-typeset .problem-statement p code,
.md-typeset .problem-statement li code {
    background: rgba(0, 0, 0, 0.045) !important;
    border-radius: 4px;
    color: inherit !important;
    font-size: 0.96em !important;
    padding: 0.04em 0.22em !important;
}

.md-typeset .problem-statement p {
    margin: 0 0 0.5rem;
}

.md-typeset .problem-statement .header {
    margin: 0 3rem 0.65rem 0;
    text-align: left;
}

.md-typeset .preview-problem:not(:has(.preview-problem-tag)) .problem-statement .header {
    margin-right: 0;
}

.md-typeset .problem-statement .header .title {
    font-family: inherit;
    font-size: 1.28em;
    font-weight: 700;
    line-height: 1.2;
}

.md-typeset .problem-statement .legend,
.md-typeset .problem-statement .input-specification,
.md-typeset .problem-statement .output-specification,
.md-typeset .problem-statement .sample-tests {
    margin-top: 0.58rem;
}

.md-typeset .problem-statement .legend {
    margin-top: 0;
}

.md-typeset .problem-statement .section-title {
    color: var(--color-heading-text);
    font-family: inherit;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 0.28rem;
    text-transform: none;
}

.md-typeset .problem-statement .sample-test {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.md-typeset .problem-statement .sample-test:last-child {
    margin-bottom: 0;
}

.md-typeset .problem-statement .sample-tests .input,
.md-typeset .problem-statement .sample-tests .output {
    background: #f3f2f1;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
}

.md-typeset .problem-statement .sample-tests .title {
    background: transparent;
    border-bottom: 0;
    color: rgba(0, 0, 0, 0.78);
    font-family: inherit;
    font-size: 0.86em;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
    padding: 0.58rem 0.8rem 0.18rem;
    text-transform: none;
}

.md-typeset .problem-statement .sample-tests pre {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    color: var(--color-io-pre-text) !important;
    font-family: var(--md-code-font-family, monospace) !important;
    font-size: 0.96em !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0.02rem 0.8rem 0.65rem !important;
    white-space: pre;
    word-break: normal;
}

@media (min-width: 52em) {
    .md-typeset .problem-statement .sample-test {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
