.amr-plan-dialog.has-preview {
    width: min(1100px, calc(100vw - 24px));
    box-sizing: border-box;
    padding: 20px;
    background: #f5f3fa;
}

.amr-preview,
.amr-preview * {
    box-sizing: border-box;
}

.amr-preview {
    color: #28173f;
    font-size: 14px;
    line-height: 1.8;
    text-align: start;
    overflow-wrap: anywhere;
}

.amr-preview-header,
.amr-preview-sample-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.amr-preview-brand {
    font-size: 25px;
    color: #7144c5;
    letter-spacing: 0;
}

.amr-preview-badge {
    padding: 5px 12px;
    border-radius: 20px;
    background: #eae2fa;
    color: #573486;
    font-size: 12px;
}

.amr-preview-heading {
    margin-block: 22px;
}

.amr-preview-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(21px, 3vw, 30px);
    line-height: 1.5;
    letter-spacing: 0;
}

.amr-preview p {
    margin: 8px 0;
}

.amr-preview h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0;
}

.amr-preview-heading p,
.amr-preview-muted,
.amr-preview-sidebar>p {
    color: #766785;
    font-size: 12px;
}

.amr-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.amr-preview-stat {
    display: grid;
    gap: 4px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e0f2;
    border-radius: 16px;
}

.amr-preview-stat strong {
    font-size: 23px;
    color: #6440a0;
}

.amr-preview-stat span {
    font-size: 12px;
    color: #766785;
}

.amr-preview-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(0, 2fr);
    gap: 18px;
    align-items: start;
}

.amr-preview-sidebar {
    padding: 18px;
    border-radius: 18px;
    background: #241438;
    color: #fff;
}

.amr-preview-sidebar>p {
    color: #d4c7e4;
}

.amr-preview-workflow {
    display: grid;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
}

.amr-preview button {
    font: inherit;
    cursor: pointer;
}

.amr-preview-step {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    text-align: start;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #e5dbef;
    font-size: 12px !important;
}

.amr-preview-step.is-active {
    background: #7144c5;
    color: #fff;
    border-color: #a98add;
}

.amr-preview-step-number {
    flex: 0 0 25px;
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    background: #ffffff16;
    border-radius: 8px;
}

.amr-preview-main {
    min-width: 0;
}

.amr-preview-demo-note {
    padding: 12px 14px;
    border-radius: 12px;
    background: #eee8f9;
    color: #60477c;
    font-size: 12px;
}

.amr-preview-sample,
.amr-preview-section,
.amr-preview-details article {
    padding: 18px;
    margin-top: 14px;
    border: 1px solid #e8e0f2;
    border-radius: 16px;
    background: #fff;
}

.amr-preview-sample-header {
    padding-bottom: 12px;
    border-bottom: 1px solid #eee8f4;
    font-size: 12px;
}

.amr-preview-progress-layout {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-block: 22px;
}

.amr-preview-ring {
    --position: 0deg;
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#8050cd var(--position),
            #eee8f6 0deg);
}

.amr-preview-ring strong {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #6440a0;
    font-size: 15px;
}

.amr-preview-progress {
    display: block;
    width: 100%;
    height: 8px;
    accent-color: #7144c5;
}

.amr-preview-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.amr-preview-controls button {
    border: 1px solid #daccec;
    border-radius: 10px;
    padding: 8px 12px;
    background: #f4eefc;
    color: #573486;
    font-size: 12px;
}

.amr-preview button:focus-visible {
    outline: 3px solid #b28ce8;
    outline-offset: 3px;
}

.amr-preview button:disabled {
    opacity: .45;
    cursor: default;
}

.amr-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.amr-preview-chips li {
    padding: 6px 10px;
    border-radius: 9px;
    background: #f4f0fa;
    color: #60477c;
    font-size: 12px;
}

.amr-preview-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.amr-preview-details p {
    font-size: 13px;
    color: #766785;
}

@media (max-width: 650px) {
    .amr-plan-dialog.has-preview {
        padding: 12px;
    }

    .amr-preview-layout,
    .amr-preview-details {
        grid-template-columns: 1fr;
    }

    .amr-preview-stats {
        gap: 6px;
    }

    .amr-preview-stat {
        padding: 10px;
    }

    .amr-preview-stat strong {
        font-size: 18px;
    }
}