.kpwf,
.kpwf * {
    box-sizing: border-box;
}

.kpwf {
    --kpwf-accent: #3366ff;
    --kpwf-accent-dark: #2450d8;
    --kpwf-text: #20242a;
    --kpwf-muted: #68707a;
    --kpwf-border: #dfe4ea;
    --kpwf-border-strong: #cbd3dd;
    --kpwf-soft: #f6f8fc;
    --kpwf-bg: #fff;
    --kpwf-success: #21633a;
    --kpwf-error: #8a2424;
    width: 100%;
    margin: 24px 0;
    color: var(--kpwf-text);
    font-family: "Open Sans", Arial, sans-serif;
}

.kpwf button,
.kpwf input,
.kpwf select {
    font: inherit;
}

.kpwf__shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid var(--kpwf-border);
    border-radius: 16px;
    background: var(--kpwf-bg);
    box-shadow: 0 10px 30px rgba(21, 29, 45, 0.06);
}

.kpwf__header {
    margin-bottom: 24px;
}

.kpwf__title {
    margin: 0 0 10px;
    color: var(--kpwf-text);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 500;
    line-height: 1.2;
}

.kpwf__lead,
.kpwf__hint,
.kpwf__settings-note {
    margin: 0;
    color: var(--kpwf-muted);
    line-height: 1.6;
}

.kpwf__form {
    display: grid;
    gap: 22px;
}

.kpwf__modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kpwf__mode {
    display: flex;
    align-items: center;
    min-height: 62px;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--kpwf-border);
    border-radius: 11px;
    background: #fff;
    color: var(--kpwf-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.kpwf__mode:hover {
    border-color: var(--kpwf-border-strong);
    background: var(--kpwf-soft);
}

.kpwf__mode.is-active {
    border-color: var(--kpwf-accent);
    background: #f7f9ff;
    box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.11);
}

.kpwf__mode input {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--kpwf-accent);
}

.kpwf__requirements {
    min-width: 0;
}

.kpwf__requirements-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.kpwf__mdr-strip {
    --mdr-gap: 16px;
    --mdr-height: 270px;
    --mdr-speed: 72;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.kpwf__mdr-marquee {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 12px 0;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, 0.96) 4%, rgba(0, 0, 0, 0.96) 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, 0.96) 4%, rgba(0, 0, 0, 0.96) 96%, transparent 100%);
}

.kpwf__mdr-marquee::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.kpwf__mdr-track,
.kpwf__mdr-group {
    display: flex;
    align-items: center;
    gap: var(--mdr-gap);
    width: max-content;
    min-width: max-content;
    margin: 0;
    padding: 0;
}

.kpwf__mdr-track {
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.kpwf__mdr-track.kpwf__mdr-run {
    animation: kpwf-scroll-left var(--mdr-duration, 40s) linear infinite;
}

.kpwf__mdr-group {
    flex: 0 0 auto;
}

.kpwf__mdr-card {
    display: block;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: var(--mdr-height);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--kpwf-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 0;
    cursor: zoom-in;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.kpwf__mdr-card img {
    display: block;
    width: auto;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.kpwf__mdr-card:focus-visible,
.kpwf__modal-close:focus-visible,
.kpwf__action:focus-visible,
.kpwf__file-button:focus-visible,
.kpwf__settings summary:focus-visible {
    outline: 3px solid rgba(51, 102, 255, 0.3);
    outline-offset: 3px;
}

@media (hover: hover) {
    .kpwf__mdr-card:hover {
        z-index: 2;
        transform: translateY(-3px);
        border-color: #cbd5e1;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
}

@keyframes kpwf-scroll-left {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-1 * var(--mdr-loop-distance, 1000px)), 0, 0); }
}

.kpwf__workspace {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--kpwf-border);
    border-radius: 13px;
    background: var(--kpwf-soft);
}

.kpwf__file-block {
    min-width: 0;
}

.kpwf__file {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.kpwf__file-picker {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid var(--kpwf-border-strong);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.kpwf__file-button {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    flex: 0 0 auto;
    padding: 0 18px;
    border-right: 1px solid var(--kpwf-border-strong);
    background: #fff;
    color: var(--kpwf-accent-dark);
    font-weight: 700;
}

.kpwf__file-name {
    min-width: 0;
    padding: 11px 14px;
    overflow: hidden;
    color: var(--kpwf-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpwf__file-picker.has-file .kpwf__file-name {
    color: var(--kpwf-text);
}

.kpwf__hint {
    margin-top: 8px;
    font-size: 13px;
}

.kpwf__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.kpwf__action {
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid var(--kpwf-accent);
    border-radius: 9px;
    background: #fff;
    color: var(--kpwf-accent-dark);
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.kpwf__action:hover {
    transform: translateY(-1px);
    background: #eef3ff;
}

.kpwf__action.is-selected,
.kpwf__action--format.is-selected,
.kpwf__action--audit.is-selected {
    background: var(--kpwf-accent);
    color: #fff;
}

.kpwf__action[disabled] {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.kpwf__settings {
    border: 1px solid var(--kpwf-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.kpwf__settings summary {
    position: relative;
    padding: 16px 48px 16px 18px;
    background: var(--kpwf-soft);
    color: var(--kpwf-text);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.kpwf__settings summary::-webkit-details-marker {
    display: none;
}

.kpwf__settings summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--kpwf-accent);
    font-size: 24px;
    font-weight: 400;
}

.kpwf__settings[open] summary::after {
    content: "−";
}

.kpwf__settings-body {
    padding: 18px;
}

.kpwf__settings-note {
    margin-bottom: 16px;
}

.kpwf__settings-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--kpwf-border);
    border-radius: 10px;
}

.kpwf__settings-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
}

.kpwf__settings-table th,
.kpwf__settings-table td {
    padding: 11px 12px;
    border-right: 1px solid var(--kpwf-border);
    border-bottom: 1px solid var(--kpwf-border);
    vertical-align: middle;
    text-align: left;
}

.kpwf__settings-table th:last-child,
.kpwf__settings-table td:last-child {
    border-right: 0;
}

.kpwf__settings-table tbody tr:last-child th,
.kpwf__settings-table tbody tr:last-child td {
    border-bottom: 0;
}

.kpwf__settings-table thead th {
    background: #eef2f7;
    font-weight: 700;
}

.kpwf__settings-table thead th:nth-child(1) { width: 31%; }
.kpwf__settings-table thead th:nth-child(2) { width: 35%; }
.kpwf__settings-table thead th:nth-child(3) { width: 34%; }

.kpwf__settings-table tbody > tr:not(.kpwf__settings-group):hover {
    background: #fbfcfe;
}

.kpwf__settings-group th {
    padding: 10px 12px;
    background: #f3f6fb;
    color: #344255;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.kpwf__settings-table input[type="number"],
.kpwf__settings-table input[type="text"],
.kpwf__settings-table select {
    width: 100%;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid var(--kpwf-border-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--kpwf-text);
}

.kpwf__settings-table code {
    white-space: normal;
    color: #374151;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 13px;
}

.kpwf__control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.kpwf__control > span,
.kpwf__inline-fields label > span {
    color: var(--kpwf-muted);
    font-size: 12px;
}

.kpwf__inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.kpwf__inline-fields label {
    display: grid;
    gap: 4px;
}

.kpwf__switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.kpwf__switch input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--kpwf-accent);
}

.kpwf__status {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #eef4ff;
    color: #24437a;
}

.kpwf__status--error {
    background: #fff0f0;
    color: var(--kpwf-error);
}

.kpwf__status--success {
    background: #edf9f1;
    color: var(--kpwf-success);
}

.kpwf__results {
    margin-top: 18px;
    overflow-x: auto;
}

.kpwf__results h3 {
    margin: 0 0 12px;
}

.kpwf__table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 14px;
}

.kpwf__table th,
.kpwf__table td {
    padding: 10px 12px;
    border: 1px solid var(--kpwf-border);
    vertical-align: top;
    text-align: left;
}

.kpwf__table th {
    background: var(--kpwf-soft);
}

.kpwf__badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.kpwf__badge--error {
    background: #ffe7e7;
    color: var(--kpwf-error);
}

.kpwf__badge--warning {
    background: #fff5d8;
    color: #755500;
}

.kpwf__manual {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 4px solid #d6a400;
    background: #fff9e7;
    color: #5b4a10;
}

.kpwf__empty {
    padding: 16px;
    border: 1px solid #b8dfc5;
    border-radius: 10px;
    background: #effaf3;
    color: var(--kpwf-success);
}

.kpwf__modal[hidden] {
    display: none !important;
}

.kpwf__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.82);
    font-family: inherit;
}

.kpwf__modal-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    overflow: hidden;
}

.kpwf__modal-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    background: #111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.kpwf__modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    color: #222;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.kpwf__modal-close:hover,
.kpwf__modal-close:focus {
    background: #fff;
    color: var(--kpwf-accent);
}

@media (max-width: 980px) {
    .kpwf__workspace {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .kpwf__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .kpwf__modes {
        grid-template-columns: 1fr;
    }

    .kpwf__mdr-strip {
        --mdr-gap: 12px;
        --mdr-height: 226px;
        --mdr-speed: 64;
    }
}

@media (max-width: 620px) {
    .kpwf__shell {
        padding: 16px;
        border-radius: 12px;
    }

    .kpwf__workspace {
        padding: 14px;
    }

    .kpwf__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .kpwf__action {
        width: 100%;
    }

    .kpwf__file-picker {
        display: grid;
    }

    .kpwf__file-button {
        min-height: 44px;
        justify-content: center;
        border-right: 0;
        border-bottom: 1px solid var(--kpwf-border-strong);
    }

    .kpwf__file-name {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .kpwf__mdr-strip {
        --mdr-gap: 10px;
        --mdr-height: 196px;
        --mdr-speed: 56;
    }

    .kpwf__modal {
        padding: 8px;
    }

    .kpwf__modal-inner {
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
    }

    .kpwf__modal-close {
        top: 6px;
        right: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kpwf__mdr-card,
    .kpwf__mode,
    .kpwf__action {
        transition: none;
    }

}

.kpwf__settings-table code {
    padding: 0;
    border: 0;
    background: transparent;
}

/* Окно предварительного оформления документа. Лента примеров выше не изменяется. */
.kpwf__editor-modal[hidden]{display:none!important}
.kpwf__editor-modal{position:fixed;inset:0;z-index:100001;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.76);font-family:inherit}
.kpwf__editor-window{display:flex;flex-direction:column;width:min(1560px,100%);height:calc(100vh - 36px);height:calc(100dvh - 36px);overflow:hidden;border-radius:14px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.34)}
.kpwf__editor-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:20px 24px 14px;border-bottom:1px solid #e5e7eb}
.kpwf__editor-header h3{margin:0 0 6px;font-size:24px;line-height:1.25;color:#1f2937}
.kpwf__editor-header p{margin:0;color:#667085;line-height:1.45}
.kpwf__editor-close{flex:0 0 auto;width:42px;height:42px;border:0;border-radius:50%;background:#f3f4f6;color:#222;font-size:28px;line-height:1;cursor:pointer}
.kpwf__editor-close:hover,.kpwf__editor-close:focus{background:#e8eefc;color:#3366ff}
.kpwf__editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 24px;border-bottom:1px solid #e5e7eb;background:#f8fafc;color:#475467}
.kpwf__editor-actions{display:flex;gap:10px;flex-wrap:wrap}
.kpwf__editor-cancel,.kpwf__editor-apply{min-height:42px;padding:9px 18px;border-radius:7px;font:inherit;cursor:pointer}
.kpwf__editor-cancel{border:1px solid #d0d5dd;background:#fff;color:#344054}
.kpwf__editor-apply{border:1px solid #3366ff;background:#3366ff;color:#fff;font-weight:600}
.kpwf__editor-apply:hover,.kpwf__editor-apply:focus{background:#2856d9}
.kpwf__editor-apply:disabled{opacity:.55;cursor:wait}
.kpwf__editor-body{display:grid;grid-template-columns:minmax(300px,350px) minmax(0,1fr);min-height:0;flex:1;background:#e9edf3}
.kpwf__editor-sidebar{min-height:0;overflow:auto;border-right:1px solid #d0d5dd;background:#fff}
.kpwf__style-panel,.kpwf__outline-panel{padding:16px}
.kpwf__style-panel h4,.kpwf__outline-panel h4{margin:0 0 8px;color:#26364b;font-size:16px;line-height:1.3}
.kpwf__style-panel>p{margin:0 0 13px;color:#667085;font-size:13px;line-height:1.45}
.kpwf__style-list{display:grid;gap:7px}
.kpwf__style-button{display:grid;gap:3px;width:100%;margin:0;padding:10px 11px;border:1px solid #e2e7ee;border-radius:7px;background:#f8fafc;color:#344054;text-align:left;font:inherit;cursor:pointer;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.kpwf__style-button strong{font-size:14px;font-weight:700;line-height:1.25}
.kpwf__style-button small{color:#667085;font-size:11px;line-height:1.35}
.kpwf__style-button:hover,.kpwf__style-button:focus{border-color:#9db4ee;background:#eef3ff;outline:0}
.kpwf__style-button.is-active{border-color:#3366ff;background:#eaf0ff;box-shadow:0 0 0 2px rgba(51,102,255,.12)}
.kpwf__style-button--normal{border-left:4px solid #3366ff;background:#f3f6ff}
.kpwf__selection-status{position:sticky;bottom:0;margin:12px 0 0;padding:9px 10px;border:1px solid #d8e0eb;border-radius:6px;background:rgba(255,255,255,.97);color:#475467;font-size:12px;line-height:1.35;box-shadow:0 -4px 14px rgba(15,23,42,.04)}
.kpwf__selection-status.is-warning{border-color:#e8c56b;background:#fff9e8;color:#725400}
.kpwf__outline-panel{border-top:1px solid #e5e7eb}
.kpwf__editor-outline{display:grid;gap:7px}
.kpwf__outline-item{display:block;width:100%;margin:0;padding:8px 10px;border:0;border-left:3px solid transparent;border-radius:4px;background:#f8fafc;color:#344054;text-align:left;font:inherit;font-size:13px;line-height:1.35;cursor:pointer}
.kpwf__outline-item:hover,.kpwf__outline-item:focus{border-left-color:#3366ff;background:#eef3ff}
.kpwf__outline-item--heading2{padding-left:22px;font-size:12.5px}
.kpwf__outline-item--heading3{padding-left:34px;font-size:12px}
.kpwf__outline-item--table,.kpwf__outline-item--figure,.kpwf__outline-item--formula,.kpwf__outline-item--table_caption,.kpwf__outline-item--figure_caption{color:#5b6472;font-size:12px}
.kpwf__document-preview{width:min(900px,calc(100% - 48px));margin:24px auto;padding:52px 66px;overflow:auto;background:#fff;box-shadow:0 4px 22px rgba(15,23,42,.16);font-family:"Times New Roman",Times,serif;font-size:var(--kpwf-preview-body-size,14pt);line-height:var(--kpwf-preview-line-spacing,1.5);color:#000}
.kpwf__preview-block{position:relative;margin:0;scroll-margin-top:20px;border-radius:3px;transition:box-shadow .12s ease,background .12s ease}
.kpwf__preview-block.is-selected-text{background:rgba(51,102,255,.075);box-shadow:0 0 0 2px rgba(51,102,255,.34)}
.kpwf__editable-text{min-height:1.5em;margin:0;padding:0;border:0;outline:0;white-space:pre-wrap;overflow-wrap:anywhere;caret-color:#1d4ed8}
.kpwf__editable-text:focus{outline:0}
.kpwf__preview-paragraph .kpwf__editable-text,.kpwf__preview-block--normal .kpwf__editable-text{margin:0;text-align:justify;text-indent:var(--kpwf-preview-first-line,1.25cm);font-family:"Times New Roman",Times,serif;font-size:var(--kpwf-preview-body-size,14pt);font-weight:400;font-style:normal;line-height:var(--kpwf-preview-line-spacing,1.5)}
.kpwf__preview-heading1{margin:var(--kpwf-preview-heading-before,12pt) 0 var(--kpwf-preview-heading-after,3pt);text-align:center;font-size:var(--kpwf-preview-heading1-size,14pt);font-weight:700;text-transform:uppercase}
.kpwf__preview-heading1 .kpwf__editable-text{margin:0;text-align:center;text-indent:0;font-size:inherit;font-weight:700;line-height:var(--kpwf-preview-line-spacing,1.5)}
.kpwf__preview-heading2{margin:var(--kpwf-preview-subheading-before,12pt) 0 var(--kpwf-preview-subheading-after,3pt);text-align:center;font-size:var(--kpwf-preview-heading2-size,14pt);font-weight:700}
.kpwf__preview-heading2 .kpwf__editable-text{margin:0;text-align:center;text-indent:0;font-size:inherit;font-weight:700;line-height:var(--kpwf-preview-line-spacing,1.5)}
.kpwf__preview-heading3{margin:18px 0 12px;font-weight:400;font-style:normal}
.kpwf__preview-heading3 .kpwf__editable-text{margin:0;text-align:left;text-indent:0;font-weight:400;font-style:normal;line-height:1.5}
.kpwf__preview-structural-plain{margin:30px 0 18px;text-align:center;font-weight:400;font-style:normal;text-transform:uppercase}
.kpwf__preview-structural-plain .kpwf__editable-text{margin:0;text-align:center;text-indent:0;font-weight:400;font-style:normal;line-height:1.5}
.kpwf__preview-caption{margin:10px 0;text-indent:0}
.kpwf__preview-caption .kpwf__editable-text{margin:0;text-indent:0;line-height:1.5}
.kpwf__preview-block--table_caption .kpwf__editable-text{text-align:var(--kpwf-preview-table-caption-align,justify);font-size:var(--kpwf-preview-table-caption-size,14pt)}
.kpwf__preview-block--figure_caption .kpwf__editable-text{text-align:center;font-size:var(--kpwf-preview-figure-caption-size,14pt)}
.kpwf__preview-note{font-size:12pt}
.kpwf__preview-note .kpwf__editable-text{margin:0;text-align:left;text-indent:1.25cm;line-height:1.5}
.kpwf__preview-list-item .kpwf__editable-text{margin:0;padding-left:1.25cm;text-align:left;text-indent:-.55cm;line-height:1.5}
.kpwf__preview-block--ignore{margin:5px 0;padding:5px;border:1px dashed #b7c0cc;background:#fafafa}
.kpwf__object-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;margin:10px 0;padding:16px;border:1px dashed #94a3b8;border-radius:6px;background:#f8fafc;text-align:center;text-indent:0;font-family:"Open Sans",Arial,sans-serif;font-size:14px;line-height:1.45}
.kpwf__object-placeholder--figure{min-height:180px;background:linear-gradient(135deg,#f8fafc,#eef2f7)}
.kpwf__object-placeholder strong{margin-bottom:4px}
.kpwf__object-placeholder span,.kpwf__object-placeholder small{color:#667085}
.kpwf__object-placeholder small{display:block;max-width:100%;margin-top:7px}
@media(max-width:900px){.kpwf__editor-modal{padding:0}.kpwf__editor-window{height:100vh;height:100dvh;border-radius:0}.kpwf__editor-toolbar{align-items:flex-start;flex-direction:column}.kpwf__editor-body{grid-template-columns:1fr;grid-template-rows:minmax(210px,40vh) minmax(0,1fr)}.kpwf__editor-sidebar{border-right:0;border-bottom:1px solid #d0d5dd}.kpwf__style-list{grid-template-columns:repeat(2,minmax(0,1fr))}.kpwf__outline-panel{display:none}.kpwf__document-preview{width:calc(100% - 24px);margin:12px;padding:34px 24px;font-size:13pt}}
@media(max-width:520px){.kpwf__editor-header{padding:15px}.kpwf__editor-header h3{font-size:20px}.kpwf__editor-toolbar{padding:10px 15px}.kpwf__editor-actions{width:100%}.kpwf__editor-cancel,.kpwf__editor-apply{flex:1}.kpwf__style-list{grid-template-columns:1fr}.kpwf__document-preview{padding:28px 18px;font-size:12.5pt}}

.kpwf__object-caption-found {
    display: block;
    color: #2f6f45;
}

.kpwf__object-caption-warning {
    display: block;
    color: #8a4b08;
    font-weight: 600;
}

.kpwf__object-caption-editor {
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(220px, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.kpwf__object-caption-editor.is-single {
    grid-template-columns: 1fr;
}

.kpwf__object-caption-editor select,
.kpwf__object-caption-editor input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #ccd3dd;
    border-radius: 6px;
    background: #fff;
    color: #20242a;
    font: inherit;
}

@media (max-width: 680px) {
    .kpwf__object-caption-editor {
        grid-template-columns: 1fr;
    }
}

/* Источник документа: DOCX или текст. */
.kpwf__source-block {
    min-width: 0;
}

.kpwf__source-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 12px;
    padding: 4px;
    border: 1px solid var(--kpwf-border);
    border-radius: 10px;
    background: #fff;
}

.kpwf__source-tab {
    min-height: 38px;
    margin: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #20242a;
    font-weight: 700;
    cursor: pointer;
}

.kpwf__source-tab:hover,
.kpwf__source-tab:focus {
    background: #f1f4f8;
    color: #000;
    outline: 0;
}

.kpwf__source-tab.is-active {
    background: var(--kpwf-accent);
    color: #fff;
}

.kpwf__source-panel[hidden] {
    display: none !important;
}

.kpwf__text-label {
    display: block;
    margin: 0 0 7px;
    color: #20242a;
    font-weight: 700;
}

.kpwf__text-input {
    display: block;
    width: 100%;
    min-height: 280px;
    resize: vertical;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid var(--kpwf-border-strong);
    border-radius: 9px;
    background: #fff;
    color: #000;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.5;
}

.kpwf__text-input:hover,
.kpwf__text-input:focus {
    border-color: #8799b3;
    color: #000;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.1);
}

.kpwf__text-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    color: #5d6671;
    font-size: 13px;
    line-height: 1.4;
}

.kpwf__text-meta .is-over-limit {
    color: var(--kpwf-error);
    font-weight: 700;
}

/* Нейтральные элементы интерфейса не сереют при наведении. */
.kpwf__mode:hover,
.kpwf__mode:focus-within,
.kpwf__settings summary:hover,
.kpwf__settings summary:focus,
.kpwf__file-picker:hover .kpwf__file-button,
.kpwf__file-picker:hover .kpwf__file-name,
.kpwf__style-button:hover strong,
.kpwf__style-button:focus strong,
.kpwf__outline-item:hover,
.kpwf__outline-item:focus {
    color: #000;
}

@media (max-width: 680px) {
    .kpwf__source-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .kpwf__source-tab {
        width: 100%;
    }

    .kpwf__text-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

.kpwf__editor-toolbar-text {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.kpwf__editor-status {
    padding: 7px 10px;
    border: 1px solid #d5deea;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    font-size: 13px;
    line-height: 1.4;
}

.kpwf__editor-status--success {
    border-color: #b8d9c2;
    background: #f1faf4;
    color: #21633a;
}

.kpwf__editor-status--error {
    border-color: #e2b8b8;
    background: #fff5f5;
    color: #8a2424;
}

/* Единая система кнопок. Явные цвета защищают текст от правил шаблона Joomla. */
.kpwf {
    --kpwf-btn-primary-bg: #3366ff;
    --kpwf-btn-primary-hover: #2450d8;
    --kpwf-btn-primary-active: #193fae;
    --kpwf-btn-primary-text: #ffffff;
    --kpwf-btn-secondary-bg: #ffffff;
    --kpwf-btn-secondary-hover: #eaf0ff;
    --kpwf-btn-secondary-active: #dce6ff;
    --kpwf-btn-secondary-text: #2147b7;
    --kpwf-btn-neutral-bg: #f6f8fc;
    --kpwf-btn-neutral-hover: #e9eef7;
    --kpwf-btn-neutral-active: #dce3ee;
    --kpwf-btn-neutral-text: #20242a;
    --kpwf-btn-disabled-bg: #e9edf3;
    --kpwf-btn-disabled-text: #68707a;
    --kpwf-btn-focus-ring: rgba(51, 102, 255, 0.34);
}

.kpwf button.kpwf__action,
.kpwf button.kpwf__source-tab,
.kpwf button.kpwf__editor-apply,
.kpwf button.kpwf__editor-cancel,
.kpwf button.kpwf__style-button,
.kpwf button.kpwf__outline-item,
.kpwf button.kpwf__editor-close,
.kpwf button.kpwf__modal-close {
    opacity: 1;
    text-shadow: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Основные кнопки действия. */
.kpwf button.kpwf__editor-apply,
.kpwf button.kpwf__action.is-selected {
    border-color: var(--kpwf-btn-primary-bg) !important;
    background: var(--kpwf-btn-primary-bg) !important;
    color: var(--kpwf-btn-primary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-primary-text) !important;
    box-shadow: 0 2px 5px rgba(36, 80, 216, 0.18);
}

.kpwf button.kpwf__editor-apply:hover,
.kpwf button.kpwf__editor-apply:focus,
.kpwf button.kpwf__editor-apply:focus-visible,
.kpwf button.kpwf__action.is-selected:hover,
.kpwf button.kpwf__action.is-selected:focus,
.kpwf button.kpwf__action.is-selected:focus-visible {
    border-color: var(--kpwf-btn-primary-hover) !important;
    background: var(--kpwf-btn-primary-hover) !important;
    color: var(--kpwf-btn-primary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-primary-text) !important;
}

.kpwf button.kpwf__editor-apply:active,
.kpwf button.kpwf__action.is-selected:active {
    border-color: var(--kpwf-btn-primary-active) !important;
    background: var(--kpwf-btn-primary-active) !important;
    color: var(--kpwf-btn-primary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-primary-text) !important;
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

/* Вторичные кнопки: действие доступно, но не выбрано. */
.kpwf button.kpwf__action:not(.is-selected),
.kpwf button.kpwf__editor-cancel,
.kpwf button.kpwf__source-tab:not(.is-active) {
    border-color: var(--kpwf-btn-primary-bg) !important;
    background: var(--kpwf-btn-secondary-bg) !important;
    color: var(--kpwf-btn-secondary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-secondary-text) !important;
}

.kpwf button.kpwf__action:not(.is-selected):hover,
.kpwf button.kpwf__action:not(.is-selected):focus,
.kpwf button.kpwf__action:not(.is-selected):focus-visible,
.kpwf button.kpwf__editor-cancel:hover,
.kpwf button.kpwf__editor-cancel:focus,
.kpwf button.kpwf__editor-cancel:focus-visible,
.kpwf button.kpwf__source-tab:not(.is-active):hover,
.kpwf button.kpwf__source-tab:not(.is-active):focus,
.kpwf button.kpwf__source-tab:not(.is-active):focus-visible {
    border-color: var(--kpwf-btn-primary-hover) !important;
    background: var(--kpwf-btn-secondary-hover) !important;
    color: #17388f !important;
    -webkit-text-fill-color: #17388f !important;
}

.kpwf button.kpwf__action:not(.is-selected):active,
.kpwf button.kpwf__editor-cancel:active,
.kpwf button.kpwf__source-tab:not(.is-active):active {
    border-color: var(--kpwf-btn-primary-active) !important;
    background: var(--kpwf-btn-secondary-active) !important;
    color: #102d79 !important;
    -webkit-text-fill-color: #102d79 !important;
}

/* Активная вкладка источника. */
.kpwf button.kpwf__source-tab.is-active,
.kpwf button.kpwf__source-tab.is-active:hover,
.kpwf button.kpwf__source-tab.is-active:focus,
.kpwf button.kpwf__source-tab.is-active:focus-visible,
.kpwf button.kpwf__source-tab.is-active:active {
    border-color: var(--kpwf-btn-primary-bg) !important;
    background: var(--kpwf-btn-primary-bg) !important;
    color: var(--kpwf-btn-primary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-primary-text) !important;
}

/* Кнопки стилей и структуры документа. */
.kpwf button.kpwf__style-button,
.kpwf button.kpwf__outline-item {
    border-color: #d8e0eb !important;
    background: var(--kpwf-btn-neutral-bg) !important;
    color: var(--kpwf-btn-neutral-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-neutral-text) !important;
}

.kpwf button.kpwf__style-button strong,
.kpwf button.kpwf__style-button small,
.kpwf button.kpwf__outline-item {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}

.kpwf button.kpwf__style-button:hover,
.kpwf button.kpwf__style-button:focus,
.kpwf button.kpwf__style-button:focus-visible,
.kpwf button.kpwf__outline-item:hover,
.kpwf button.kpwf__outline-item:focus,
.kpwf button.kpwf__outline-item:focus-visible {
    border-color: #9db4ee !important;
    background: var(--kpwf-btn-neutral-hover) !important;
    color: #17388f !important;
    -webkit-text-fill-color: #17388f !important;
}

.kpwf button.kpwf__style-button:active,
.kpwf button.kpwf__outline-item:active {
    background: var(--kpwf-btn-neutral-active) !important;
    color: #102d79 !important;
    -webkit-text-fill-color: #102d79 !important;
}

.kpwf button.kpwf__style-button.is-active,
.kpwf button.kpwf__style-button.is-active:hover,
.kpwf button.kpwf__style-button.is-active:focus,
.kpwf button.kpwf__style-button.is-active:focus-visible,
.kpwf button.kpwf__style-button.is-active:active {
    border-color: var(--kpwf-btn-primary-bg) !important;
    background: var(--kpwf-btn-primary-bg) !important;
    color: var(--kpwf-btn-primary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-primary-text) !important;
    box-shadow: 0 0 0 2px rgba(51, 102, 255, 0.14);
}

/* Кнопки закрытия остаются контрастными на любом фоне. */
.kpwf button.kpwf__editor-close,
.kpwf button.kpwf__modal-close {
    border: 1px solid #d5dce6 !important;
    background: #ffffff !important;
    color: #20242a !important;
    -webkit-text-fill-color: #20242a !important;
}

.kpwf button.kpwf__editor-close:hover,
.kpwf button.kpwf__editor-close:focus,
.kpwf button.kpwf__editor-close:focus-visible,
.kpwf button.kpwf__modal-close:hover,
.kpwf button.kpwf__modal-close:focus,
.kpwf button.kpwf__modal-close:focus-visible {
    border-color: #9db4ee !important;
    background: #eaf0ff !important;
    color: #17388f !important;
    -webkit-text-fill-color: #17388f !important;
}

.kpwf button.kpwf__editor-close:active,
.kpwf button.kpwf__modal-close:active {
    background: #dce6ff !important;
    color: #102d79 !important;
    -webkit-text-fill-color: #102d79 !important;
}

/* Единый фокус и отключённое состояние. */
.kpwf button.kpwf__action:focus-visible,
.kpwf button.kpwf__source-tab:focus-visible,
.kpwf button.kpwf__editor-apply:focus-visible,
.kpwf button.kpwf__editor-cancel:focus-visible,
.kpwf button.kpwf__style-button:focus-visible,
.kpwf button.kpwf__outline-item:focus-visible,
.kpwf button.kpwf__editor-close:focus-visible,
.kpwf button.kpwf__modal-close:focus-visible {
    outline: 3px solid var(--kpwf-btn-focus-ring) !important;
    outline-offset: 3px !important;
}

.kpwf button.kpwf__action:disabled,
.kpwf button.kpwf__editor-apply:disabled,
.kpwf button.kpwf__editor-cancel:disabled,
.kpwf button.kpwf__source-tab:disabled,
.kpwf button.kpwf__style-button:disabled,
.kpwf button.kpwf__outline-item:disabled {
    border-color: #cfd6df !important;
    background: var(--kpwf-btn-disabled-bg) !important;
    color: var(--kpwf-btn-disabled-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-disabled-text) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Выбор файла — такой же контрастный вторичный элемент. */
.kpwf__file-button,
.kpwf__file-picker:hover .kpwf__file-button,
.kpwf__file-picker:focus-within .kpwf__file-button,
.kpwf__file-picker:active .kpwf__file-button {
    background: #ffffff !important;
    color: var(--kpwf-btn-secondary-text) !important;
    -webkit-text-fill-color: var(--kpwf-btn-secondary-text) !important;
}

.kpwf__file-picker:hover,
.kpwf__file-picker:focus-within {
    border-color: var(--kpwf-btn-primary-bg);
    box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.1);
}

/* Эталонные профили Word */
.kpwf .kpwf__template-choice {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    background: #f8fafc;
}

.kpwf .kpwf__template-choice-main {
    display: grid;
    grid-template-columns: minmax(190px, .42fr) minmax(280px, 1fr);
    gap: 14px;
    align-items: center;
}

.kpwf .kpwf__template-choice-main > label {
    margin: 0;
    color: #20242a !important;
    font-weight: 700;
}

.kpwf .kpwf__template-choice select {
    width: 100%;
    min-height: 44px;
    padding: 9px 38px 9px 12px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background-color: #fff;
    color: #20242a !important;
    -webkit-text-fill-color: #20242a !important;
    font: inherit;
}

.kpwf .kpwf__template-description {
    margin: 0;
    color: #62666d;
    font-size: .94em;
    line-height: 1.5;
}

.kpwf .kpwf__template-lock {
    width: fit-content;
    margin: 0;
}

.kpwf [data-kpwf-manual-settings].is-locked {
    position: relative;
    opacity: .64;
}

.kpwf [data-kpwf-manual-settings].is-locked::before {
    content: "Параметры заданы выбранным эталоном";
    display: block;
    margin: 0 0 10px;
    padding: 9px 12px;
    border: 1px solid #d6deea;
    border-radius: 7px;
    background: #f4f7fb;
    color: #3e4b5e;
    font-size: .92em;
}

@media (max-width: 720px) {
    .kpwf .kpwf__template-choice-main {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

.kpwf__preview-block--appendix .kpwf__editable-text{margin:0;text-align:var(--kpwf-preview-appendix-align,right);text-indent:0;font-size:var(--kpwf-preview-body-size,14pt);font-weight:400;font-style:normal;line-height:var(--kpwf-preview-line-spacing,1.5)}
.kpwf__document-preview table,.kpwf__document-preview table *{font-family:"Times New Roman",Times,serif;font-size:var(--kpwf-preview-table-size,12pt);font-style:normal}

/* Версия 2.0.7: упрощённое окно оформления. */
.kpwf__editor-window {
    width: min(1440px, 100%);
}

.kpwf__editor-header {
    align-items: center;
    padding: 16px 20px 12px;
}

.kpwf__editor-heading {
    min-width: 0;
}

.kpwf__editor-header h3 {
    margin-bottom: 3px;
    font-size: 22px;
}

.kpwf__editor-header p {
    font-size: 14px;
}

.kpwf__editor-summary {
    margin-top: 4px !important;
    color: #475467 !important;
    font-size: 13px !important;
}

.kpwf__editor-toolbar {
    padding: 10px 20px;
    background: #f8fafc;
}

.kpwf__editor-toolbar-text > span {
    color: #475467;
    font-size: 13px;
    line-height: 1.4;
}

.kpwf__editor-body {
    grid-template-columns: 292px minmax(0, 1fr);
    background: #e8edf4;
}

.kpwf__editor-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kpwf__editor-sidebar-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.kpwf button.kpwf__editor-sidebar-tab {
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid transparent !important;
    border-radius: 7px;
    background: transparent !important;
    color: #344054 !important;
    -webkit-text-fill-color: #344054 !important;
    font-weight: 700;
    cursor: pointer;
}

.kpwf button.kpwf__editor-sidebar-tab:hover,
.kpwf button.kpwf__editor-sidebar-tab:focus,
.kpwf button.kpwf__editor-sidebar-tab:focus-visible {
    border-color: #c9d6f5 !important;
    background: #edf2ff !important;
    color: #17388f !important;
    -webkit-text-fill-color: #17388f !important;
}

.kpwf button.kpwf__editor-sidebar-tab.is-active,
.kpwf button.kpwf__editor-sidebar-tab.is-active:hover,
.kpwf button.kpwf__editor-sidebar-tab.is-active:focus {
    border-color: #3366ff !important;
    background: #3366ff !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.kpwf__style-panel,
.kpwf__outline-panel {
    min-height: 0;
    padding: 14px;
    overflow: auto;
    border-top: 0;
}

.kpwf__style-panel h4,
.kpwf__outline-panel h4 {
    margin-bottom: 9px;
    font-size: 15px;
}

.kpwf__selection-status {
    position: static;
    margin: 0 0 12px;
    padding: 8px 9px;
    box-shadow: none;
}

.kpwf__style-list {
    display: grid;
    gap: 12px;
}

.kpwf__style-group {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}

.kpwf__style-group h5,
.kpwf__style-group summary {
    margin: 0;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.kpwf__style-group summary {
    padding: 7px 0;
    cursor: pointer;
    list-style-position: inside;
}

.kpwf__style-group-list {
    display: grid;
    gap: 6px;
}

.kpwf__style-button {
    min-height: 40px;
    padding: 8px 10px;
}

.kpwf__style-button strong {
    font-size: 13px;
}

.kpwf__style-button small {
    font-size: 10.5px;
}

.kpwf__preview-stage {
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

.kpwf__document-preview {
    width: min(820px, calc(100% - 40px));
    min-height: calc(100% - 40px);
    margin: 20px auto;
    padding: 48px 60px;
    overflow: visible;
}

.kpwf__editor-status {
    max-width: 760px;
}

.kpwf__editor-status--error {
    border-color: #f0b7b7;
    background: #fff6f6;
}

@media (max-width: 1180px) {
    .kpwf__editor-modal {
        padding: 0;
    }

    .kpwf__editor-window {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }

    .kpwf__editor-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .kpwf__editor-sidebar {
        max-height: 250px;
        border-right: 0;
        border-bottom: 1px solid #d0d5dd;
    }

    .kpwf__style-panel,
    .kpwf__outline-panel {
        max-height: 196px;
    }

    .kpwf__style-group-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpwf__document-preview {
        width: min(820px, calc(100% - 24px));
        min-height: auto;
        margin: 12px auto 24px;
        padding: 42px 50px;
    }
}

@media (max-width: 760px) {
    .kpwf__editor-header {
        padding: 13px 14px 10px;
    }

    .kpwf__editor-header h3 {
        font-size: 19px;
    }

    .kpwf__editor-heading > p:not(.kpwf__editor-summary) {
        display: none;
    }

    .kpwf__editor-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 9px 14px;
    }

    .kpwf__editor-actions {
        width: 100%;
    }

    .kpwf__editor-cancel,
    .kpwf__editor-apply {
        flex: 1;
    }

    .kpwf__editor-sidebar {
        max-height: 290px;
    }

    .kpwf__style-panel,
    .kpwf__outline-panel {
        max-height: 236px;
    }

    .kpwf__style-group-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpwf__document-preview {
        padding: 32px 22px;
        font-size: 12.5pt;
    }
}

@media (max-width: 480px) {
    .kpwf__style-group-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .kpwf__style-panel:not([hidden]),
    .kpwf__outline-panel:not([hidden]) {
        display: block;
    }
}

/* Версия 2.0.10: упрощённая последовательность основной формы. */
.kpwf__text-entry {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--kpwf-border);
    border-radius: 13px;
    background: #fff;
}

.kpwf__document-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
    padding: 18px 20px;
    border: 1px solid var(--kpwf-border);
    border-radius: 13px;
    background: var(--kpwf-soft);
}

.kpwf__upload-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    min-width: 0;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid var(--kpwf-border-strong);
    border-radius: 9px;
    background: #fff;
}

.kpwf__upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0;
    padding: 11px 20px;
    border: 0;
    border-right: 1px solid var(--kpwf-border-strong);
    background: #fff !important;
    color: var(--kpwf-btn-secondary-text, #17388f) !important;
    -webkit-text-fill-color: var(--kpwf-btn-secondary-text, #17388f) !important;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.kpwf__upload-control:hover,
.kpwf__upload-control:focus-within {
    border-color: var(--kpwf-accent);
    box-shadow: 0 0 0 3px rgba(51, 102, 255, .1);
}

.kpwf__upload-control:hover .kpwf__upload-button,
.kpwf__upload-control:focus-within .kpwf__upload-button,
.kpwf__upload-button:active {
    background: #eaf0ff !important;
    color: #17388f !important;
    -webkit-text-fill-color: #17388f !important;
}

.kpwf__upload-control.has-file .kpwf__file-name {
    color: var(--kpwf-text);
    font-weight: 600;
}

.kpwf__document-actions > .kpwf__action {
    min-width: 210px;
    white-space: nowrap;
}

.kpwf__document-actions > .kpwf__hint,
.kpwf__document-actions > .kpwf__progress {
    grid-column: 1 / -1;
}

.kpwf__document-actions > .kpwf__hint {
    margin: 0;
}

.kpwf__document-actions > .kpwf__progress {
    margin-top: 0;
}

@media (max-width: 760px) {
    .kpwf__document-actions {
        grid-template-columns: 1fr;
    }

    .kpwf__document-actions > .kpwf__action {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .kpwf__text-entry,
    .kpwf__document-actions {
        padding: 14px;
    }

    .kpwf__upload-control {
        grid-template-columns: 1fr;
    }

    .kpwf__upload-button {
        border-right: 0;
        border-bottom: 1px solid var(--kpwf-border-strong);
    }

    .kpwf__file-name {
        text-align: center;
    }
}

/* Версия 2.0.11: индикатор обработки непосредственно под полем текста. */
.kpwf__progress {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #d9e2f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #26364b;
}

.kpwf__progress[hidden] {
    display: none !important;
}

.kpwf__progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 14px;
    line-height: 1.35;
}

.kpwf__progress-head strong {
    flex: 0 0 auto;
    min-width: 42px;
    color: #244fc7;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.kpwf__progress-track {
    position: relative;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eaf2;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}

.kpwf__progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3366ff 0%, #5b83ff 100%);
    transition: width .32s ease;
}

.kpwf__progress--success {
    border-color: #b9dfc8;
    background: #f3fbf6;
}

.kpwf__progress--success .kpwf__progress-head strong {
    color: #1d7a43;
}

.kpwf__progress--success .kpwf__progress-bar {
    background: #24945a;
}

.kpwf__progress--error {
    border-color: #efb7b7;
    background: #fff6f6;
    color: #a33a3a;
}

.kpwf__progress--error .kpwf__progress-head strong {
    color: #a33a3a;
}

.kpwf__progress--error .kpwf__progress-bar {
    background: #cf4a4a;
}

/* Кнопки стилей растут по высоте вместе с названием и пояснением. */
.kpwf .kpwf__style-list,
.kpwf .kpwf__style-group-list {
    grid-auto-rows: auto !important;
    align-items: stretch;
}

.kpwf button.kpwf__style-button {
    display: grid !important;
    grid-template-rows: auto auto;
    align-content: center;
    height: auto !important;
    min-height: 54px !important;
    max-height: none !important;
    padding: 9px 11px !important;
    overflow: visible !important;
    white-space: normal !important;
}

.kpwf button.kpwf__style-button strong,
.kpwf button.kpwf__style-button small {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    text-overflow: clip;
}

.kpwf button.kpwf__style-button strong {
    font-size: clamp(12px, .9vw, 13px) !important;
    line-height: 1.25 !important;
}

.kpwf button.kpwf__style-button small {
    margin-top: 3px;
    font-size: clamp(10px, .78vw, 11px) !important;
    line-height: 1.3 !important;
}

/* Версия 2.0.12: эталонный статус в одну строку и лента сразу под заголовком. */
.kpwf .kpwf__header {
    margin-bottom: 14px;
}

.kpwf > .kpwf__shell > .kpwf__requirements {
    margin: 0 0 22px;
}

.kpwf .kpwf__template-status-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
    color: #3e4b5e;
    font-size: .94em;
    line-height: 1.45;
}

.kpwf .kpwf__template-status-line .kpwf__template-lock {
    flex: 0 0 auto;
}

.kpwf .kpwf__template-status-line .kpwf__template-description {
    display: inline;
    min-width: 0;
    margin: 0;
    color: #3e4b5e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpwf .kpwf__template-separator {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .kpwf .kpwf__template-status-line {
        white-space: normal;
        flex-wrap: wrap;
    }

    .kpwf .kpwf__template-status-line .kpwf__template-description {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}


/* Версия 2.0.22: единственный режим оформления и выбор эталона в одной строке. */
.kpwf .kpwf__format-template-row {
    display: grid;
    grid-template-columns: minmax(210px, .55fr) auto minmax(280px, 1fr);
    gap: 14px;
    align-items: center;
}

.kpwf .kpwf__format-title {
    margin: 0;
    color: #20242a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.kpwf .kpwf__format-template-row > label {
    margin: 0;
    color: #20242a !important;
    font-weight: 700;
    white-space: nowrap;
}

.kpwf .kpwf__format-template-row select {
    width: 100%;
    min-width: 0;
}

@media (max-width: 760px) {
    .kpwf .kpwf__format-template-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .kpwf .kpwf__format-template-row > label {
        white-space: normal;
    }
}

/* Версия 2.0.23: единый режим оформления, пример оформления и административные спойлеры. */
.kpwf .kpwf__mode-template-grid {
    display: grid;
    grid-template-columns: minmax(260px, .72fr) minmax(360px, 1.28fr);
    gap: 16px;
    align-items: stretch;
}

.kpwf .kpwf__mode-card,
.kpwf .kpwf__example-card {
    min-width: 0;
    min-height: 74px;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    background: #fff;
}

.kpwf .kpwf__mode-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    color: #20242a;
}

.kpwf .kpwf__mode-card.is-selected {
    border-color: #3366ff;
    background: #f6f8ff;
    box-shadow: 0 0 0 3px rgba(51, 102, 255, .10);
}

.kpwf .kpwf__mode-card input[type="checkbox"] {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 0;
    opacity: 1;
    accent-color: #3366ff;
}

.kpwf .kpwf__mode-card strong {
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.35;
}

.kpwf .kpwf__example-card {
    display: grid;
    grid-template-columns: minmax(150px, .34fr) minmax(250px, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
}

.kpwf .kpwf__example-card > label {
    margin: 0;
    color: #20242a !important;
    font-weight: 700;
    line-height: 1.35;
}

.kpwf .kpwf__example-card select {
    width: 100%;
    min-width: 0;
}

.kpwf .kpwf__admin-spoiler {
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    background: #fff;
}

.kpwf .kpwf__admin-spoiler > summary {
    position: relative;
    display: block;
    padding: 15px 48px 15px 18px;
    background: #f7f9fc;
    color: #20242a !important;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.kpwf .kpwf__admin-spoiler > summary::-webkit-details-marker {
    display: none;
}

.kpwf .kpwf__admin-spoiler > summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #3366ff;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
}

.kpwf .kpwf__admin-spoiler[open] > summary::after {
    content: "−";
}

.kpwf .kpwf__admin-spoiler > summary:hover,
.kpwf .kpwf__admin-spoiler > summary:focus,
.kpwf .kpwf__admin-spoiler > summary:active {
    background: #eef3ff;
    color: #20242a !important;
    -webkit-text-fill-color: #20242a !important;
}

.kpwf .kpwf__admin-spoiler-content {
    padding: 18px;
    color: #20242a;
    line-height: 1.6;
}

.kpwf .kpwf__admin-spoiler-content > :first-child {
    margin-top: 0;
}

.kpwf .kpwf__admin-spoiler-content > :last-child {
    margin-bottom: 0;
}

.kpwf .kpwf__admin-spoiler-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;
}

.kpwf .kpwf__admin-spoiler-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 820px) {
    .kpwf .kpwf__mode-template-grid {
        grid-template-columns: 1fr;
    }

    .kpwf .kpwf__example-card {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}


/* Версия 2.0.24: однострочные заголовки и единая компактная компоновка. */
.kpwf .kpwf__header {
    min-width: 0;
}

.kpwf .kpwf__title {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
    overflow: visible;
    color: inherit;
    font-family: inherit;
    font-size: clamp(16px, 2.35vw, 32px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: normal;
    white-space: nowrap;
}

.kpwf .kpwf__mode-card .kpwf__mode-label,
.kpwf .kpwf__example-card .kpwf__example-label {
    display: block;
    min-width: 0;
    margin: 0;
    overflow: visible;
    color: inherit !important;
    line-height: 1.3;
    white-space: nowrap;
}

.kpwf .kpwf__mode-card .kpwf__mode-label {
    font-size: clamp(15px, 1.25vw, 18px);
}

.kpwf .kpwf__example-card .kpwf__example-label {
    font-size: 16px;
    font-weight: 700;
}

.kpwf .kpwf__mode-template-grid {
    grid-template-columns: minmax(300px, .78fr) minmax(500px, 1.22fr);
}

.kpwf .kpwf__example-card {
    grid-template-columns: max-content minmax(260px, 1fr);
}

@media (max-width: 900px) {
    .kpwf .kpwf__mode-template-grid {
        grid-template-columns: 1fr;
    }

    .kpwf .kpwf__example-card {
        grid-template-columns: max-content minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .kpwf .kpwf__title {
        font-size: 12px;
    }

    .kpwf .kpwf__example-card {
        grid-template-columns: 1fr;
    }
}


/* Версия 2.0.25: удалён неинтерактивный блок режима оформления. */
.kpwf .kpwf__template-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.kpwf .kpwf__example-card.kpwf__example-card--full {
    width: 100%;
    min-height: 74px;
    grid-template-columns: max-content minmax(260px, 1fr);
}

@media (max-width: 560px) {
    .kpwf .kpwf__example-card.kpwf__example-card--full {
        grid-template-columns: 1fr;
    }
}


/* Версия 2.0.28: всплывающее уведомление о превышении лимита. */
body.kpwf-limit-modal-open {
    overflow: hidden;
}

.kpwf .kpwf__limit-modal[hidden] {
    display: none !important;
}

.kpwf .kpwf__limit-modal {
    position: fixed;
    inset: 0;
    z-index: 100200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.kpwf .kpwf__limit-dialog {
    position: relative;
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    color: #172033;
}

.kpwf .kpwf__limit-dialog h3 {
    margin: 0 44px 12px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.kpwf .kpwf__limit-dialog p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.kpwf .kpwf__limit-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef2f7 !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.kpwf .kpwf__limit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.kpwf .kpwf__limit-primary,
.kpwf .kpwf__limit-login,
.kpwf .kpwf__limit-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

.kpwf .kpwf__limit-primary,
.kpwf .kpwf__limit-primary:hover,
.kpwf .kpwf__limit-primary:focus,
.kpwf .kpwf__limit-primary:active {
    border: 1px solid #3366ff !important;
    background: #3366ff !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.kpwf .kpwf__limit-primary:hover,
.kpwf .kpwf__limit-primary:focus {
    background: #2450d8 !important;
}

.kpwf .kpwf__limit-login,
.kpwf .kpwf__limit-login:hover,
.kpwf .kpwf__limit-login:focus,
.kpwf .kpwf__limit-login:active,
.kpwf .kpwf__limit-secondary,
.kpwf .kpwf__limit-secondary:hover,
.kpwf .kpwf__limit-secondary:focus,
.kpwf .kpwf__limit-secondary:active {
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

.kpwf .kpwf__limit-login:hover,
.kpwf .kpwf__limit-login:focus,
.kpwf .kpwf__limit-secondary:hover,
.kpwf .kpwf__limit-secondary:focus {
    background: #f1f5f9 !important;
}

@media (max-width: 520px) {
    .kpwf .kpwf__limit-dialog {
        padding: 24px 18px 18px;
    }
    .kpwf .kpwf__limit-actions {
        flex-direction: column-reverse;
    }
    .kpwf .kpwf__limit-primary,
    .kpwf .kpwf__limit-login,
    .kpwf .kpwf__limit-secondary {
        width: 100%;
    }
}


/* SEO-блок компонента «Оформление по ГОСТ» */
.kpwf .kpwf__title {
    margin: 0;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.2;
}
.kpwf .kpwf__seo-text {
    max-width: 980px;
    margin: 8px 0 0;
    color: inherit;
    font: inherit;
    line-height: 1.6;
}

/* Версия 1.0.2: промежуточный диалог перед приобретением платного доступа. */
body.kpwf-offer-modal-open {
    overflow: hidden;
}

.kpwf .kpwf__offer-modal[hidden] {
    display: none !important;
}

.kpwf .kpwf__offer-modal {
    position: fixed;
    inset: 0;
    z-index: 100210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    background: rgba(15, 23, 42, 0.76);
}

.kpwf .kpwf__offer-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 30px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
    color: #172033;
}

.kpwf .kpwf__offer-dialog h3 {
    margin: 0 48px 18px 0;
    color: #172033;
    font-family: inherit;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.kpwf .kpwf__offer-content {
    display: grid;
    gap: 12px;
}

.kpwf .kpwf__offer-content p {
    margin: 0;
    color: #344054;
    font-size: 15px;
    line-height: 1.55;
}

.kpwf .kpwf__offer-provider {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.kpwf .kpwf__offer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.kpwf .kpwf__offer-links a,
.kpwf .kpwf__offer-links a:hover,
.kpwf .kpwf__offer-links a:focus {
    color: #2450d8 !important;
    -webkit-text-fill-color: #2450d8 !important;
    font-weight: 600;
    text-decoration: underline !important;
}

.kpwf .kpwf__offer-consent {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 4px;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #172033;
    cursor: pointer;
}

.kpwf .kpwf__offer-consent input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
}

.kpwf .kpwf__offer-warning {
    padding: 10px 12px;
    border: 1px solid #fda29b;
    border-radius: 8px;
    background: #fff1f0;
    color: #b42318 !important;
}

.kpwf .kpwf__offer-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.kpwf .kpwf__offer-primary,
.kpwf .kpwf__offer-secondary,
.kpwf .kpwf__offer-close {
    font-family: inherit;
    cursor: pointer;
}

.kpwf .kpwf__offer-primary,
.kpwf .kpwf__offer-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.2;
}

.kpwf .kpwf__offer-primary,
.kpwf .kpwf__offer-primary:hover,
.kpwf .kpwf__offer-primary:focus,
.kpwf .kpwf__offer-primary:active {
    border: 1px solid #3366ff !important;
    background: #3366ff !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.kpwf .kpwf__offer-primary:hover,
.kpwf .kpwf__offer-primary:focus {
    background: #2450d8 !important;
}

.kpwf .kpwf__offer-primary:disabled {
    border-color: #cbd5e1 !important;
    background: #e2e8f0 !important;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    cursor: not-allowed;
}

.kpwf .kpwf__offer-secondary,
.kpwf .kpwf__offer-secondary:hover,
.kpwf .kpwf__offer-secondary:focus,
.kpwf .kpwf__offer-secondary:active {
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
}

.kpwf .kpwf__offer-secondary:hover,
.kpwf .kpwf__offer-secondary:focus {
    background: #f1f5f9 !important;
}

.kpwf .kpwf__offer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef2f7 !important;
    color: #172033 !important;
    -webkit-text-fill-color: #172033 !important;
    font-size: 28px;
    line-height: 1;
}

@media (max-width: 640px) {
    .kpwf .kpwf__offer-modal {
        padding: 8px;
    }
    .kpwf .kpwf__offer-dialog {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 24px 16px 18px;
    }
    .kpwf .kpwf__offer-dialog h3 {
        font-size: 21px;
    }
    .kpwf .kpwf__offer-actions {
        flex-direction: column-reverse;
    }
    .kpwf .kpwf__offer-primary,
    .kpwf .kpwf__offer-secondary {
        width: 100%;
    }
}

/* Версия 1.0.6: длинный заголовок всегда остаётся внутри ширины компонента. */
.kpwf .kpwf__header {
    container-type: inline-size;
    min-width: 0;
    overflow: hidden;
}

.kpwf .kpwf__title[data-kpwf-fit-line] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
    overflow: hidden;
    color: inherit;
    font-family: inherit;
    font-size: clamp(8px, 2vw, 28px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: normal;
    white-space: nowrap;
    text-overflow: clip;
}

/* DP5 Access 2.0.1 B: централизованный лимит и остаток операций. */
.kpwf .kpwf__access-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.kpwf .kpwf__access-row .kpwf__hint {
    flex: 1 1 520px;
    margin: 0;
}

.kpwf .kpwf__access-status {
    flex: 0 1 auto;
    color: #52627a;
    font-size: 14px;
    line-height: 1.45;
    text-align: right;
    white-space: nowrap;
}

.kpwf .kpwf__access-status.is-paid {
    color: #216e4d;
    font-weight: 600;
}

.kpwf .kpwf__access-status.is-error {
    color: #c62828;
    white-space: normal;
}

.kpwf [data-kpwf-submit]:disabled,
.kpwf [data-kpwf-editor-apply]:disabled {
    cursor: not-allowed;
    opacity: .58;
}

@media (max-width: 720px) {
    .kpwf .kpwf__access-status {
        width: 100%;
        text-align: left;
        white-space: normal;
    }
}


/* DP5 unified B interface */
.kpwf.kpwf--design-b{max-width:1400px;margin:0 auto 24px;color:#1f2937}
.kpwf--design-b .kpwf__shell{border:1px solid #e2e7ef;border-radius:16px;background:#fff;box-shadow:0 8px 28px rgba(26,38,58,.08)}
.kpwf--design-b input,.kpwf--design-b select,.kpwf--design-b textarea{border-radius:10px}
.kpwf--design-b .kpwf__action--format,.kpwf--design-b .kpwf__editor-apply{background:#3366ff;border-color:#3366ff;color:#fff}
.kpwf--design-b .kpwf__action--format:hover,.kpwf--design-b .kpwf__editor-apply:hover{background:#2856d9;border-color:#2856d9}
.kpwf__queue{margin:0 0 16px;padding:14px 16px;border:1px solid #cbd8ff;border-radius:12px;background:#f6f8ff}
.kpwf__queue-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}
.kpwf__queue-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;font-size:14px}
.kpwf__queue-cancel{margin-top:12px;width:auto!important;padding:8px 14px!important;background:#fff!important;color:#334155!important;border:1px solid #cbd5e1!important}
@media(max-width:760px){.kpwf__queue-grid{grid-template-columns:1fr 1fr}}
