.mfo-as-top-wrap {
    max-width: var(--mfo-top-max-width, 1100px);
    margin: var(--mfo-top-margin, 0 auto);
}

.mfo-as-top-heading {
    font-size: 24px;
    font-weight: 800;
    color: #1a2540;
    text-align: center;
    margin: 0 0 8px;
}

.mfo-as-top-subtitle {
    font-size: 14px;
    color: #5a6478;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 24px;
}

.mfo-as-top-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.mfo-as-top-col-title {
    font-size: 17px;
    font-weight: 800;
    color: #1a2540;
    margin: 0 0 12px;
}

.mfo-as-top-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mfo-as-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.mfo-as-top-row:hover {
    border-color: #2271b1;
}

.mfo-as-top-row-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2d3d;
}

.mfo-as-top-row-count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #2271b1;
    background: #eaf3fb;
    padding: 3px 10px;
    border-radius: 999px;
    margin-left: 10px;
    white-space: nowrap;
}

.mfo-as-top-more {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    text-align: center;
    border: 1px dashed #b0b0b0;
    border-radius: 8px;
    background: #f7f7f7;
    color: #555;
    font-size: 13px;
    cursor: pointer;
}

.mfo-as-top-more:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.mfo-as-top-more:disabled {
    opacity: 0.6;
    cursor: default;
}

.mfo-as-top-services-panel {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e2e7ed;
    border-radius: 10px;
    background: #f7f9fb;
    position: relative;
}

.mfo-as-top-panel-close {
    background: none;
    border: none;
    color: #2271b1;
    cursor: pointer;
    font-size: 13px;
    padding: 0 0 12px;
}

.mfo-as-top-panel-close:hover {
    text-decoration: underline;
}

.mfo-as-top-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2540;
    margin: 0 0 14px;
}

.mfo-as-top-panel-loading {
    text-align: center;
    padding: 20px;
    color: #6b7785;
    font-size: 14px;
}

.mfo-as-top-wrap .mfo-as-top-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 8px;
}

.mfo-as-top-service {
    display: block;
    padding: 10px 14px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #1f2d3d;
    text-decoration: none;
    text-align: left;
}

a.mfo-as-top-service:hover {
    border-color: #2271b1;
}

.mfo-as-top-service--plain {
    cursor: default;
    color: #6b7785;
}

@media screen and (max-width: 700px) {
    .mfo-as-top-cols {
        grid-template-columns: 1fr;
    }
}

/* --- Полная карточка сервиса внутри панели (без внешней ссылки) --- */

.mfo-as-top-service--js {
    cursor: pointer;
    font-family: inherit;
    border: 1px solid #e2e2e2;
}

.mfo-as-top-service--js:hover {
    border-color: #2271b1;
}

.mfo-as-top-panel-back {
    margin-bottom: 12px;
}

.mfo-as-detail-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.mfo-as-detail-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mfo-as-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mfo-as-field-value {
    font-size: 15px;
    word-break: break-word;
}

.mfo-as-link {
    font-size: 15px;
    color: #2271b1;
    word-break: break-all;
}

.mfo-as-copyable-text {
    font-size: 15px;
    word-break: break-word;
    text-decoration: none !important;
    -webkit-text-decoration-skip: none;
}

.mfo-as-multi-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mfo-as-multi-row {
    font-size: 15px;
}

.mfo-as-copy-btn {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    color: #333;
    vertical-align: middle;
}

.mfo-as-copy-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

/* Список вариантов в выписке — намеренно НЕ <ul>/<li>, чтобы стили темы
   (буллеты, отступы, заглавные буквы и т.п.) не перебивали внешний вид */
.mfo-as-plain-list {
    margin: 4px 0 0 0;
    padding: 0;
    list-style: none;
}

.mfo-as-plain-line {
    font-size: 14px;
    padding: 2px 0;
    text-transform: none;
    list-style: none;
}

.mfo-as-name-block {
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 16px 0;
    padding: 0;
}

.mfo-as-name-block--bottom {
    margin: 24px 0 0 0;
    padding-top: 16px;
    border-top: 1px solid #e2e2e2;
}

.mfo-as-global-block--top {
    margin: 0 0 20px 0;
}

.mfo-as-global-block--bottom {
    margin: 20px 0 0 0;
}

/* Подсказка-"?" с инструкцией по всплытию */
.mfo-as-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
}

.mfo-as-tooltip-text {
    display: none;
    position: absolute;
    bottom: 130%;
    left: 0;
    width: 260px;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 6px;
    z-index: 10;
}

.mfo-as-tooltip:hover .mfo-as-tooltip-text,
.mfo-as-tooltip:focus .mfo-as-tooltip-text {
    display: block;
}

