.rich-text {
    color: #222;
    font-size: 16px;
    line-height: 1.65;
}

.rich-text p {
    margin: 0 0 14px;
}

.rich-text strong {
    font-weight: 600;
    color: #111;
}

.rich-text em {
    font-style: italic;
    color: #333;
}

/* Заголовки, если позже заменишь strong на h2/h3/h4 */
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin: 28px 0 12px;
    color: #111;
    font-weight: 600;
    line-height: 1.3;
}

.rich-text h1 {
    font-size: 32px;
}

.rich-text h2 {
    font-size: 24px;
}

.rich-text h3 {
    font-size: 20px;
}

.rich-text h4 {
    font-size: 17px;
}

/* Если заголовки пока оформлены через <p><strong>...</strong></p> */
.rich-text > p:has(> strong:only-child) {
    margin: 28px 0 12px;
}

.rich-text > p:has(> strong:only-child) strong {
    display: block;
    font-size: 22px;
    line-height: 1.3;
}

/* Подзаголовки вида "Проверяемые параметры:" */
.rich-text p:has(> em:only-child) {
    margin-bottom: 4px;
}

.rich-text ul,
.rich-text ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.rich-text li {
    margin: 0 0 8px;
}

.rich-text li:last-child {
    margin-bottom: 0;
}

/* Таблица */
.rich-text table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
    line-height: 1.5;
}

.rich-text tr:first-child td {
    background: #f6f6f6;
    font-weight: 600;
    color: #111;
}

.rich-text td {
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    vertical-align: top;
}

/* Чтобы длинные строки в таблице не ломали layout */
.rich-text td:first-child {
    width: 32%;
}

/* Отступы между крупными блоками */
.rich-text ul + p,
.rich-text ol + p,
.rich-text table + p {
    margin-top: 18px;
}

/* Первый элемент без лишнего верхнего отступа */
.rich-text > :first-child {
    margin-top: 0 !important;
}

/* Последний элемент без лишнего нижнего отступа */
.rich-text > :last-child {
    margin-bottom: 0 !important;
}

/* Ссылки, если появятся */
.rich-text a:not([class]) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-text a:hover:not([class]) {
    text-decoration: none;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .rich-text {
        font-size: 15px;
        line-height: 1.6;
    }

    .rich-text h1 {
        font-size: 28px;
    }

    .rich-text h2 {
        font-size: 22px;
    }

    .rich-text h3 {
        font-size: 18px;
    }

    .rich-text h4 {
        font-size: 16px;
    }

    .rich-text > p:has(> strong:only-child) strong {
        font-size: 20px;
    }

    .rich-text table {
        display: block;
        overflow-x: auto;
        white-space: normal;
    }

    .rich-text td {
        min-width: 180px;
        padding: 10px 12px;
    }
}