/* AiM Config Merge - Frontend Styles */
/* Uses Rush Auto Works design tokens where available */

.acm-wrap {
    max-width: 640px;
    margin: 2rem auto;
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--text-primary, #e0e0e0);
}

/* The lint report is denser than the merge tool (long findings + a checkbox gutter),
   so give it more horizontal room. */
.acm-lint-wrap {
    max-width: 900px;
}

.acm-intro h3 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.acm-intro p {
    color: var(--text-muted, #a0a0a0);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.acm-note {
    font-size: 0.82rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 200, 0, 0.06);
    border: 1px solid rgba(255, 200, 0, 0.15);
    border-radius: 6px;
    color: var(--text-muted, #a0a0a0);
    margin-bottom: 1.5rem;
}

/* Steps */
.acm-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.acm-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.acm-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--raw-orange, #FF8000);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.acm-step code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Dropzone */
.acm-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.acm-dropzone:hover,
.acm-dropzone--active {
    border-color: var(--raw-cyan, #47C7FC);
    background: rgba(71, 199, 252, 0.04);
}

.acm-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.acm-upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted, #a0a0a0);
    margin-bottom: 0.5rem;
}

.acm-dropzone-text {
    font-size: 1rem;
    color: var(--text-primary, #e0e0e0);
}

.acm-dropzone-sub {
    font-size: 0.85rem;
    color: var(--text-dim, #666);
}

.acm-dropzone-hint {
    font-size: 0.75rem;
    color: var(--text-dim, #666);
    margin-top: 0.5rem;
}

.acm-browse-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--raw-orange, #FF8000);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.acm-browse-btn:hover {
    background: #e67300;
}

#acm-file-input,
#acm-lint-file-input,
#acm-compare-file-input-a,
#acm-compare-file-input-b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Compare tool: two side-by-side dropzones. */
.acm-compare-wrap {
    max-width: 900px;
}

.acm-compare-dropzones {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.acm-compare-slot {
    flex: 1 1 260px;
    min-width: 0;
}

.acm-compare-slot-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #a0a0a0);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.acm-compare-section {
    margin-bottom: 1.5rem;
}

.acm-compare-section h4 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1.1rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.acm-compare-empty {
    color: var(--text-muted, #a0a0a0);
    font-size: 0.9rem;
}

.acm-compare-files {
    color: var(--text-muted, #a0a0a0);
    font-size: 0.9rem;
    word-break: break-word;
}

/* File info */
.acm-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.acm-remove-btn {
    background: none;
    border: none;
    color: var(--text-muted, #a0a0a0);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.acm-remove-btn:hover {
    color: #ff4444;
}

/* Submit button */
.acm-submit-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    margin-top: 1rem;
    background: var(--raw-orange, #FF8000);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.acm-submit-btn:hover:not(:disabled) {
    background: #e67300;
}

.acm-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.acm-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.acm-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: acm-spin 0.6s linear infinite;
}

@keyframes acm-spin {
    to { transform: rotate(360deg); }
}

/* Preview section */
.acm-preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.acm-scan-icon {
    width: 32px;
    height: 32px;
    color: var(--raw-cyan, #47C7FC);
}

.acm-preview-header h3 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1.3rem;
    text-transform: uppercase;
    margin: 0;
}

/* Version info */
.acm-version-info {
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(71, 199, 252, 0.06);
    border: 1px solid rgba(71, 199, 252, 0.15);
    border-radius: 6px;
    font-size: 0.85rem;
}

.acm-version-info p {
    margin: 0;
}

/* Preview diff */
.acm-preview-diff {
    margin-bottom: 1.5rem;
}

.acm-preview-diff h4 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Accordions */
.acm-accordion {
    margin-bottom: 0.5rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.acm-accordion summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}

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

.acm-accordion summary::after {
    content: '▸';
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.5;
    transition: transform 0.2s;
}

.acm-accordion[open] summary::after {
    transform: rotate(90deg);
}

.acm-accordion-add summary  { background: rgba(34, 197, 94, 0.08); color: #22c55e; }
.acm-accordion-mod summary  { background: rgba(255, 200, 0, 0.07); color: #ffc800; }
.acm-accordion-skip summary { background: rgba(255, 255, 255, 0.03); color: var(--text-muted, #a0a0a0); }
.acm-accordion-warn summary { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

.acm-accordion-body {
    padding: 0.5rem 0.9rem 0.75rem;
    background: rgba(0, 0, 0, 0.15);
}

.acm-accordion-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.acm-diff-list {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
}

.acm-diff-list li {
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 2px;
    background: rgba(255, 255, 255, 0.02);
}

.acm-diff-name {
    font-weight: 600;
}

.acm-diff-unit {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted, #a0a0a0);
    font-weight: 400;
}

.acm-diff-detail {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim, #666);
    margin-top: 2px;
    font-family: monospace;
}

.acm-alarm-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.acm-alarm-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(71, 199, 252, 0.12);
    color: var(--raw-cyan, #47C7FC);
    border: 1px solid rgba(71, 199, 252, 0.2);
}

.acm-uptodate {
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0a0);
    margin: 0.5rem 0 0;
}

.acm-diff-conflict-label {
    color: #ef4444;
}

/* Feature selection */
.acm-features-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.acm-features-section h4 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem;
}

.acm-features-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0a0);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.acm-features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.acm-feature-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

.acm-feature-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.acm-feature-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.acm-feature-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--raw-orange, #FF8000);
    cursor: pointer;
    flex-shrink: 0;
}

.acm-feature-toggle-label {
    font-weight: 600;
}

.acm-feature-desc {
    font-size: 0.8rem;
    color: var(--text-dim, #666);
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

.acm-feature-select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    background: var(--bg-primary, #041E42);
    color: var(--text-primary, #e0e0e0);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 0.9rem;
    appearance: auto;
}

.acm-feature-select:focus {
    border-color: var(--raw-cyan, #47C7FC);
    outline: none;
}

.acm-feature-detected {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 500;
}

/* Results */
.acm-results-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.acm-check-icon {
    width: 32px;
    height: 32px;
    color: #22c55e;
}

.acm-results-header h3 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1.3rem;
    text-transform: uppercase;
    margin: 0;
}

.acm-detected {
    margin-bottom: 1.5rem;
}

.acm-detected p {
    margin: 0.25rem 0;
}

.acm-detected-customer {
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0a0);
}

.acm-detected-source {
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0a0);
}

.acm-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.acm-summary-table th,
.acm-summary-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.acm-summary-table th {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-muted, #a0a0a0);
}

.acm-summary-table td:nth-child(2),
.acm-summary-table td:nth-child(3) {
    text-align: center;
    font-weight: 600;
}

.acm-count-added {
    color: #22c55e;
}

.acm-uptodate {
    text-align: center;
    color: #22c55e;
    font-weight: 600;
    padding: 0.5rem;
}

/* Changelog */
.acm-changelog {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(71, 199, 252, 0.06);
    border: 1px solid rgba(71, 199, 252, 0.12);
    border-radius: 6px;
}

.acm-changelog-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Warnings */
.acm-warnings {
    background: rgba(255, 200, 0, 0.08);
    border: 1px solid rgba(255, 200, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.acm-warnings ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.acm-warnings li {
    font-size: 0.9rem;
    color: #ffc800;
}

/* Download button */
.acm-download-section {
    margin-bottom: 1.5rem;
}

.acm-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: var(--raw-orange, #FF8000);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s;
}

.acm-download-btn:hover {
    background: #e67300;
    color: #fff !important;
}

.acm-download-btn svg {
    width: 20px;
    height: 20px;
}

/* Try again / Retry */
.acm-try-again-btn {
    display: block;
    width: 100%;
    padding: 0.6rem;
    background: transparent;
    color: var(--text-muted, #a0a0a0);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    margin-top: 0.75rem;
}

.acm-try-again-btn:hover {
    border-color: var(--raw-cyan, #47C7FC);
    color: var(--raw-cyan, #47C7FC);
}

/* Error */
.acm-error-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.acm-error-icon {
    width: 32px;
    height: 32px;
    color: #ef4444;
}

.acm-error-header h3 {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: #ef4444;
    font-size: 1.3rem;
    text-transform: uppercase;
    margin: 0;
}

#acm-error-message {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Mobile */
@media (max-width: 640px) {
    .acm-wrap {
        margin: 1rem;
    }

    .acm-dropzone {
        min-height: 160px;
        padding: 1.5rem;
    }

    .acm-features-section {
        padding: 1rem;
    }

    .acm-feature-item {
        padding: 0.6rem;
    }
}

/* ===========================================================================
   AiM Config Linter — report view (shares dropzone / button / spinner styles)
   =========================================================================== */

.acm-lint-headline {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    border-left: 3px solid var(--raw-cyan, #47C7FC);
}

.acm-lint-headline p {
    margin: 0;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.15rem;
    color: var(--text-primary, #e0e0e0);
}

.acm-lint-headline--clean {
    border-left-color: #3ad29f;
    background: rgba(58, 210, 159, 0.08);
}

.acm-lint-headline--warn {
    border-left-color: var(--raw-orange, #FF8000);
    background: rgba(255, 128, 0, 0.08);
}

.acm-issue-group {
    margin: 22px 0 10px;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
}

.acm-issue {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    border-left: 3px solid rgba(255, 255, 255, 0.15);
}

/* Left gutter holds the per-row opt-out checkbox (empty on non-fixable rows so the
   content column stays aligned). */
.acm-issue-check {
    flex: none;
    width: 18px;
    display: flex;
    justify-content: center;
    padding-top: 3px;
}

.acm-issue-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--raw-cyan, #47C7FC);
    cursor: pointer;
}

.acm-issue-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* Fixable rows read as actionable; the cyan tint nudges the eye to the checkbox. */
.acm-issue--fixable {
    background: rgba(71, 199, 252, 0.05);
}

.acm-issue-error   { border-left-color: #ff5c5c; }
.acm-issue-warning { border-left-color: var(--raw-orange, #FF8000); }
.acm-issue-info    { border-left-color: rgba(160, 160, 160, 0.5); }

.acm-issue-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.acm-issue-title {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.05rem;
    color: var(--text-primary, #e0e0e0);
}

.acm-issue-badge {
    flex: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.acm-issue-badge--fix {
    background: rgba(58, 210, 159, 0.15);
    color: #3ad29f;
}

.acm-issue-badge--manual {
    background: rgba(255, 128, 0, 0.15);
    color: var(--raw-orange, #FF8000);
}

.acm-issue-exp {
    margin: 6px 0 0;
    color: var(--text-muted, #a0a0a0);
    font-size: 0.92rem;
}

.acm-issue-detail {
    margin: 6px 0 0;
    color: var(--text-dim, #666);
    font-size: 0.82rem;
    font-family: var(--font-mono, ui-monospace, 'SFMono-Regular', Menlo, monospace);
    word-break: break-word;
}

.acm-issue-hint {
    margin: 6px 0 0;
    color: var(--text-muted, #a0a0a0);
    font-size: 0.88rem;
    font-style: italic;
}

/* Select all / none bar above the findings */
.acm-selectall-bar {
    display: flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.acm-selectall-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, #a0a0a0);
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.acm-selectall-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--raw-cyan, #47C7FC);
    cursor: pointer;
}

/* Report severity groups as accordions */
.acm-issue-accordion {
    margin-bottom: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.acm-issue-accordion > summary.acm-issue-group {
    cursor: pointer;
    list-style: none;
    user-select: none;
    margin: 0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
}

.acm-issue-accordion > summary.acm-issue-group::-webkit-details-marker { display: none; }

.acm-issue-accordion > summary.acm-issue-group::after {
    content: '▸';
    margin-left: auto;
    color: var(--text-muted, #a0a0a0);
    transition: transform 0.15s ease;
}

.acm-issue-accordion[open] > summary.acm-issue-group::after { transform: rotate(90deg); }

.acm-issue-group-count {
    flex: none;
    min-width: 24px;
    text-align: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #e0e0e0);
}

.acm-issue-accordion-error   > summary .acm-issue-group-count { background: rgba(255, 92, 92, 0.18); color: #ff8c8c; }
.acm-issue-accordion-warning > summary .acm-issue-group-count { background: rgba(255, 128, 0, 0.18); color: var(--raw-orange, #FF8000); }

.acm-issue-accordion-body { padding: 12px 14px 4px; }
.acm-issue-accordion-body .acm-issue:last-child { margin-bottom: 8px; }

/* ── Config Compare v2: summary strip + inline-delta rows ── */
.acm-slot-hint { color: var(--text-muted, #a0a0a0); font-weight: 400; font-size: 0.85em; }

.acm-summary-strip { margin: 0 0 14px; }
.acm-summary-pair {
    font-size: 1.02rem;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 8px;
    word-break: break-word;
}
.acm-summary-base { color: var(--text-primary, #e0e0e0); font-weight: 600; }
.acm-summary-arrow { color: var(--text-muted, #a0a0a0); }
.acm-summary-comp { color: var(--raw-cyan, #47C7FC); font-weight: 600; }
.acm-summary-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.acm-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
}
.acm-badge-diff  { background: rgba(255, 200, 0, 0.12); color: #ffc800; }
.acm-badge-clean { background: rgba(255, 255, 255, 0.05); color: var(--text-muted, #a0a0a0); }
.acm-summary-total { color: var(--text-muted, #a0a0a0); font-size: 0.9rem; margin: 0; }

.acm-compare-controls { display: flex; gap: 8px; margin-bottom: 14px; }
.acm-ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary, #e0e0e0);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.acm-ctrl-btn:hover { border-color: var(--raw-cyan, #47C7FC); background: rgba(71, 199, 252, 0.08); }

.acm-cat-section { margin-bottom: 18px; }
.acm-cat-title {
    color: var(--raw-cyan, #47C7FC);
    font-size: 1rem;
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.acm-cat-empty { color: var(--text-muted, #a0a0a0); font-size: 0.88rem; margin: 0 0 4px; }

.acm-row-list { display: flex; flex-direction: column; gap: 3px; }
.acm-row {
    padding: 5px 10px;
    border-radius: 5px;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}
.acm-row-removed { border-left-color: #ef4444; }
.acm-row-added   { border-left-color: #22c55e; }
.acm-row-changed { border-left-color: #ffc800; }
.acm-row-same    { border-left-color: rgba(255, 255, 255, 0.12); opacity: 0.72; }

.acm-row-head { display: flex; align-items: baseline; gap: 8px; }
.acm-row-mark { font-weight: 700; width: 0.9em; flex: none; text-align: center; }
.acm-row-removed .acm-row-mark { color: #ef4444; }
.acm-row-added   .acm-row-mark { color: #22c55e; }
.acm-row-changed .acm-row-mark { color: #ffc800; }
.acm-row-same    .acm-row-mark { color: var(--text-muted, #a0a0a0); }
.acm-row-name { color: var(--text-primary, #e0e0e0); font-weight: 500; word-break: break-word; }

.acm-row-changes { margin: 3px 0 0 calc(0.9em + 8px); display: flex; flex-direction: column; gap: 1px; }
.acm-fc { font-size: 0.86rem; color: var(--text-muted, #a0a0a0); font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-word; }
.acm-fc-field { color: var(--text-primary, #e0e0e0); }
.acm-fc-a { color: #ef8f8f; }
.acm-fc-arrow { color: var(--text-muted, #a0a0a0); }
.acm-fc-b { color: #7ee0a0; }

.acm-unchanged-line { display: block; color: var(--text-muted, #a0a0a0); font-size: 0.84rem; margin: 6px 0 0; }
.acm-identical-banner { display: block; color: #22c55e; font-weight: 600; margin-bottom: 8px; }

/* Example-demo trigger under the upload dropzones. */
.acm-compare-demo { text-align: center; margin-top: 6px; }
.acm-demo-link {
    background: none;
    border: none;
    color: var(--raw-cyan, #47C7FC);
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
}
.acm-demo-link:hover { color: var(--raw-orange, #FF8000); }

/* --- Config-compare v2 display-page diff --- */
.acm-display-section { margin-top: 1.5rem; }
.acm-page-card { margin: 0 0 1.5rem; }
.acm-page-title { margin: 0 0 .5rem; font-size: 1rem; }
.acm-page-cols { display: flex; gap: 1rem; flex-wrap: wrap; }
.acm-page-col { flex: 1 1 320px; min-width: 0; }
.acm-page-col-label { display: block; font-size: .8rem; opacity: .7; margin-bottom: .25rem; }
.acm-page-svg { width: 100%; height: auto; background: #111; border-radius: 4px; display: block; }
.acm-w { stroke-width: 1; }
.acm-w-label { fill: #ddd; font-size: 11px; pointer-events: none; }
.acm-w-unchanged { fill: rgba(120,120,120,.13); stroke: #888; }
.acm-w-rebound   { fill: rgba(255,191,0,.20); stroke: #d99e00; }   /* amber: dangerous */
.acm-w-moved     { fill: rgba(45,140,255,.20); stroke: #2d8cff; }  /* blue: cosmetic */
.acm-w-resized   { fill: rgba(45,140,255,.20); stroke: #2d8cff; }
.acm-w-reordered { fill: rgba(138,92,255,.20); stroke: #8a5cff; }
.acm-w-only_b    { fill: rgba(34,197,94,.22); stroke: #22c55e; }   /* added (Comparison side) */
.acm-w-only_a    { fill: rgba(239,68,68,.22); stroke: #ef4444; }   /* removed (Baseline side) */

.acm-page-changes { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; }
.acm-page-change { padding: .15rem .4rem; border-radius: 3px; cursor: default; }
.acm-page-change[data-match]:hover, .acm-row-hi { background: rgba(255,255,255,.10); }
.acm-change-rebound { color: #d99e00; }
.acm-change-moved, .acm-change-resized { color: #2d8cff; }
.acm-change-reordered { color: #8a5cff; }
.acm-change-only_b { color: #22c55e; }
.acm-change-only_a { color: #ef4444; }
.acm-w-hi { stroke-width: 3 !important; }
.acm-ghost { fill: none; stroke: #2d8cff; stroke-dasharray: 4 3; opacity: .5; }
.acm-ghost-hover { visibility: hidden; }
.acm-ghost-hover.acm-w-hi { visibility: visible; }

.acm-unchanged-pages { margin-top: .75rem; }
.acm-unchanged-toggle { background: none; border: 0; color: inherit; cursor: pointer;
    font-size: .9rem; opacity: .8; padding: .2rem 0; text-decoration: underline; }
.acm-unchanged-body { margin-top: .5rem; }
.acm-page-card-unchanged .acm-page-svg { max-width: 480px; }
