.editor-content {
    color: #212529;
    font-size: 1.5rem;
    line-height: 1.5;
}

.cdx-block {
    padding: 0;
}

/* --- Абзацы --- */

.editor-content p,
.editor-content .ce-paragraph {
    margin: 0 0 20px;
    line-height: 1.5;
}

/* --- Заголовки --- */

.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6,
.editor-content .ce-header {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
}

.editor-content .ce-header {
    padding: 0;
}

.editor-content h1 {
    margin: 0 0 40px;
    font-family: 'Normalidad UltraExtended', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
}

.editor-content h2 {
    margin: 0 0 45px;
    font-size: 2rem;
}

.editor-content h3 {
    margin: 0 0 25px;
    font-size: 1.75rem;
}

.editor-content h4 {
    margin: 0 0 25px;
    font-size: 1.5rem;
}

.editor-content h5 {
    margin: 0 0 25px;
    font-size: 1.25rem;
}

.editor-content h6 {
    margin: 0 0 25px;
    font-size: 1rem;
}

/* --- Списки --- */

.editor-content .prs-list,
.editor-content .cdx-list {
    margin: 0 0 20px;
}

/* В админке список — грид: сдвигаем его, чтобы маркер был с тем же отступом, что и ul в клиенте */
.editor-content .cdx-list {
    gap: 0;
    padding-left: 1.75rem;
}

.editor-content .cdx-list__item,
.editor-content .cdx-list__item-content {
    line-height: 1.5;
}

.editor-content .cdx-list__item-children {
    gap: 0;
    padding-top: 0;
    /* каждый вложенный список нумеруется заново, как <ol> в клиенте */
    counter-reset: item;
}

.editor-content .prs-list ul,
.editor-content .prs-list ol {
    margin-bottom: 0;
}

/* Вложенные нумерованные списки в клиенте начинают нумерацию заново — так же и в админке */
.editor-content .cdx-list-ordered .cdx-list-ordered .cdx-list__item:before {
    content: counter(item, var(--list-counter-type, decimal)) ".";
}

/* Тип маркера ненумерованного списка (тюн «Маркер списка») */
.editor-content .prs-list-unordered {
    list-style-type: disc;
}

.editor-content .prs-list-unordered--dash {
    list-style-type: "–  ";
}

.editor-content .prs-list-unordered--none {
    padding-left: 0;
    list-style-type: none;
}

/* Тип маркера второго и более глубоких уровней (тюн «Маркер 2 уровня») */
.editor-content .prs-list .prs-list-level2--ordered {
    list-style-type: decimal;
}

.editor-content .prs-list .prs-list-level2--bullet {
    list-style-type: disc;
}

.editor-content .prs-list .prs-list-level2--dash {
    list-style-type: "–  ";
}

.editor-content .prs-list .prs-list-level2--none {
    padding-left: 0;
    list-style-type: none;
    margin-bottom: 20px;
}

.editor-content .ce-block[data-list-marker='dash'] .cdx-list-unordered .cdx-list__item:before {
    content: "–";
}

.editor-content .ce-block[data-list-marker='none'] .cdx-list-unordered .cdx-list__item:before {
    content: "";
}

.editor-content .ce-block[data-list-marker='none'] .cdx-list-unordered {
    padding-left: 0;
}

.editor-content .ce-block[data-list-marker-level2='ordered'] .cdx-list__item-children .cdx-list__item:before {
    content: counter(item, decimal) ".";
}

.editor-content .ce-block[data-list-marker-level2='bullet'] .cdx-list__item-children .cdx-list__item:before {
    content: "•";
}

.editor-content .ce-block[data-list-marker-level2='dash'] .cdx-list__item-children .cdx-list__item:before {
    content: "–";
}

.editor-content .ce-block[data-list-marker-level2='none'] .cdx-list__item-children .cdx-list__item:before {
    content: "";
}

.editor-content .ce-block[data-list-marker-level2='none'] .cdx-list__item-children {
    padding-left: 0;
}

/* Чек-лист */
.editor-content .prs-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.editor-content .prs-checklist .prs-checklist {
    margin: 0.5rem 0 0 1.75rem;
}

.editor-content .prs-checklist-item {
    margin-bottom: 0.5rem;
}

.editor-content .prs-checklist-item:last-child {
    margin-bottom: 0;
}

.editor-content .prs-checklist-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0;
    cursor: default;
}

.editor-content .prs-checklist-checkbox {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.1875rem;
    accent-color: #2a2b2c;
}

.editor-content .prs-checklist-text {
    flex: 1;
    line-height: 1.45;
}

.editor-content .prs-checklist-checkbox:checked+.prs-checklist-text {
    color: #949494;
    text-decoration: line-through;
}

.editor-content .cdx-list__checkbox {
    --size-checkbox: 1.125rem;
    --color-bg-checked: #2a2b2c;
    --color-bg-checked-hover: #000;
}

/* --- Цитата --- */

.editor-content .prs-quote,
.editor-content .cdx-quote {
    margin: 0 0 30px;
}

.editor-content .cdx-quote__text {
    min-height: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.editor-content .prs-blockquote {
    margin: 0;
    font-size: 1.25rem;
}

.editor-content .prs-quote figcaption,
.editor-content .cdx-quote__caption {
    margin-top: 5px;
    font-size: 12px;
    font-style: italic;
    color: #bac2cc;
}

/* --- Таблицы --- */

.editor-content .prs-table,
.editor-content .tc-wrap {
    width: 100%;
    margin: 0 0 30px;
}

.editor-content .prs-table th,
.editor-content .tc-cell {
    color: #39434d;
}

.editor-content .prs-table td,
.editor-content .prs-table th,
.editor-content .tc-cell {
    border-width: 1px;
    border-style: solid;
    border-color: rgba(186, 196, 204, 0.5);
    padding: 9px 15px;
}

/* В админке таблица собрана на гридах — убираем двойные рамки */
.editor-content .tc-wrap {
    --color-border: rgba(186, 196, 204, 0.5);
    --color-background: transparent;
}

.editor-content .tc-table {
    font-size: inherit;
    border-top: 1px solid rgba(186, 196, 204, 0.5);
    border-left: 1px solid rgba(186, 196, 204, 0.5);
}

.editor-content .tc-row {
    border-bottom: 0;
}

.editor-content .tc-row:after {
    display: none;
}

.editor-content .tc-cell {
    border-top: 0;
    border-left: 0;
}

.editor-content .tc-table--heading .tc-row:first-child {
    border-bottom: 0;
    font-weight: 700;
}

/* --- Изображения, видео, вставки --- */

.editor-content .prs-image,
.editor-content .prs-video,
.editor-content .prs-embed,
.editor-content .image-tool,
.editor-content .embed-tool {
    margin: 0 0 30px;
}

.editor-content .prs-image img,
.editor-content .prs-video video,
.editor-content .image-tool__image-picture {
    max-width: 100%;
    height: auto;
}

.editor-content .prs-embed iframe,
.editor-content .embed-tool iframe {
    max-width: 100%;
}

.editor-content .prs-embed iframe {
    width: 100%;
}

.editor-content .image-tool__image {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.editor-content .embed-tool__content {
    border: 0;
    border-radius: 0;
}

.editor-content .prs-image figcaption,
.editor-content .prs-video figcaption,
.editor-content .prs-embed figcaption,
.editor-content .image-tool__caption,
.editor-content .embed-tool__caption {
    margin-top: 5px;
    font-size: 12px;
    font-style: italic;
    color: #bac2cc;
}

.editor-content .image-tool__caption {
    min-height: 0;
    padding: 0;
}

/* --- Разделитель и код --- */

.editor-content .prs-delimiter {
    margin: 20px 0;
    border-top: 2px solid #acaba9;
    border-radius: 2px;
    opacity: 1;
}

.editor-content .ce-delimiter:before {
    background-color: #acaba9;
}

.editor-content .prs-code {
    margin: 0 0 30px;
    padding: 1rem;
    background-color: #f8f8f8;
    border-radius: 0;
    font-family: ui-monospace, sfmono-regular, monospace;
}

.editor-content .prs-code pre {
    margin: 0;
}

/* --- Прикреплённые файлы --- */

.editor-content .prs-attaches,
.editor-content .cdx-attaches {
    margin-bottom: 20px;
}

.editor-content .prs-attaches-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    color: #2a2b2c;
    text-decoration: none;
    background-color: #ebdece;
    transition: opacity 0.2s ease;
}

.editor-content .prs-attaches-link:hover {
    color: #2a2b2c;
    text-decoration: none;
    opacity: 0.9;
}

.editor-content .prs-attaches-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    color: #fff;
    background-color: #2a2b2c;
}

.editor-content .prs-attaches-extension {
    font-size: 0.85rem;
    line-height: 1;
    text-transform: uppercase;
}

.editor-content .prs-attaches-body {
    flex: 1;
    min-width: 0;
}

.editor-content .prs-attaches-title {
    overflow: hidden;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-content .prs-attaches-size {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.3;
    color: #949494;
}

.editor-content .prs-attaches-download {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: #898989;
    background-color: #faf2e6;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.editor-content .prs-attaches-download svg {
    width: 0.875rem;
    height: 1rem;
    fill: currentColor;
}

.editor-content .prs-attaches-link:hover .prs-attaches-download {
    color: #fff;
    background-color: #2a2b2c;
}

/* Прикреплённый файл в админке — та же карточка, что и в клиенте */
.editor-content .cdx-attaches--with-file {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background-color: #ebdece;
    border: 0;
    border-radius: 0;
}

.editor-content .cdx-attaches__file-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
}

.editor-content .cdx-attaches__file-icon-background {
    display: none;
}

.editor-content .cdx-attaches__file-icon-label {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    padding: 0;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    background-color: #2a2b2c !important;
}

.editor-content .cdx-attaches__file-info {
    display: grid;
    flex-grow: 1;
    gap: 0.25rem;
    max-width: none;
    margin: 0;
}

.editor-content .cdx-attaches__title {
    max-width: none;
    overflow: hidden;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-content .cdx-attaches__size {
    font-size: 1rem;
    line-height: 1.3;
    color: #949494;
}

.editor-content .cdx-attaches__download-button {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0;
    color: #898989;
    background-color: #faf2e6;
    border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.editor-content .cdx-attaches__download-button:hover {
    color: #fff;
    background-color: #2a2b2c;
}

.editor-content .cdx-attaches__download-button svg {
    width: 0.875rem;
    height: 1rem;
    fill: currentColor;
}

/* --- Мобильные --- */

@media (max-width: 991.98px) {
    .editor-content h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .editor-content {
        font-size: 1rem;
    }

    .editor-content p,
    .editor-content .ce-paragraph,
    .editor-content .prs-image,
    .editor-content .prs-video,
    .editor-content .prs-embed,
    .editor-content .prs-quote,
    .editor-content .prs-table,
    .editor-content .tc-wrap,
    .editor-content .image-tool,
    .editor-content .embed-tool {
        margin: 0 0 0.8rem;
    }

    .editor-content h1 {
        margin-bottom: 25px;
    }

    .editor-content h2 {
        margin-bottom: 20px;
    }

    .editor-content h3,
    .editor-content h4,
    .editor-content h5,
    .editor-content h6 {
        margin-bottom: 20px;
    }

    .editor-content .cdx-quote__text,
    .editor-content .prs-blockquote {
        font-size: 1rem;
    }

    .editor-content .prs-attaches-link {
        gap: 0.75rem;
        padding: 0.625rem;
    }

    .editor-content .prs-attaches-icon,
    .editor-content .cdx-attaches__file-icon,
    .editor-content .cdx-attaches__file-icon-label {
        width: 2.75rem;
        height: 2.75rem;
    }

    .editor-content .cdx-attaches--with-file {
        gap: 0.75rem;
        padding: 0.625rem;
    }

    .editor-content .prs-attaches-extension {
        font-size: 0.75rem;
    }

    .editor-content .prs-attaches-title,
    .editor-content .cdx-attaches__title {
        font-size: 0.9375rem;
    }

    .editor-content .prs-attaches-size,
    .editor-content .cdx-attaches__size {
        display: none;
    }

    .editor-content .prs-attaches-download,
    .editor-content .cdx-attaches__download-button {
        width: 2.25rem;
        height: 2.25rem;
    }

    .editor-content .prs-attaches-download svg,
    .editor-content .cdx-attaches__download-button svg {
        width: 0.75rem;
        height: 0.875rem;
    }
}
/* --- Тул «Загрузка видео» (editorjsVideoResumable.js) --- */

.editorjs-video__dropzone {
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    border: 2px dashed rgba(186, 196, 204, 0.9);
    border-radius: 0.5rem;
    transition: border-color 0.2s ease;
}

.editorjs-video__dropzone:hover {
    border-color: #2a2b2c;
}

.editorjs-video__title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.editorjs-video__hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #949494;
}

.editorjs-video__progress {
    margin-top: 0.75rem;
}

.editorjs-video__progress-bar {
    height: 0.5rem;
    background-color: #2a2b2c;
    border-radius: 0.25rem;
    transition: width 0.2s ease;
}

.editorjs-video__progress-text {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    text-align: center;
}

.editorjs-video__status {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #949494;
    text-align: center;
}

.editorjs-video__status--error {
    color: #dc3545;
}

.editorjs-video__player {
    width: 100%;
    border-radius: 0.375rem;
}

.editorjs-video__caption {
    margin-top: 0.5rem;
}
