.cpcc-section {
    --tool-accent: #6366F1;
    --tool-accent-rgb: 99, 102, 241;
    --tool-text-secondary: var(--text-secondary, #334155);
}

.cpcc-options {
    margin-bottom: 1.25rem;
}

/* Colors list */
.cpcc-colors-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding: 0 1rem;
}

.cpcc-colors-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tool-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cpcc-colors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0 1rem;
}

.cpcc-color-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--tool-surface);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius-sm);
    padding: 0.3rem 0.5rem;
}

.cpcc-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--tool-border);
    padding: 1px;
    cursor: pointer;
    background: none;
}

.cpcc-color-hex {
    font-family: var(--tool-font-mono);
    font-size: 0.9375rem;
    width: 80px;
    border: none;
    background: transparent;
    color: var(--tool-text-primary);
    text-transform: uppercase;
}

.cpcc-color-hex:focus {
    outline: none;
}

.cpcc-color-del {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--tool-text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    transition: color 0.15s;
    padding: 0;
}

.cpcc-color-del:hover {
    color: #ef4444;
}

/* Check bar */
.cpcc-check-bar {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

/* Matrix */
.cpcc-matrix-wrap {
    margin-top: 1rem;
    padding: 0 1rem 1.5rem;
}

.cpcc-matrix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cpcc-matrix-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tool-text-secondary);
}

.cpcc-legend {
    display: flex;
    gap: 0.75rem;
}

.cpcc-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.cpcc-legend-pass {
    color: #15803d;
}

.cpcc-legend-fail {
    color: #dc2626;
}

.cpcc-matrix-scroll {
    overflow-x: auto;
}

.cpcc-matrix {
    border-collapse: collapse;
    min-width: 100%;
}

.cpcc-matrix th,
.cpcc-matrix td {
    border: 1px solid var(--tool-border);
    text-align: center;
    font-size: 0.9375rem;
}

.cpcc-matrix th {
    background: var(--tool-surface);
    font-weight: 600;
    padding: 0.5rem 0.65rem;
    white-space: nowrap;
}

.cpcc-matrix td {
    padding: 0.35rem 0.3rem;
    vertical-align: middle;
}

.cpcc-matrix th.cpcc-th-color {
    min-width: 120px;
}

.cpcc-th-swatch {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin: 0 auto 0.25rem;
    border: 1px solid var(--tool-border);
}

/* Preview cell — background applied via inline style */
.cpcc-cell {
    padding: 0.5rem 0.4rem 0.4rem;
    min-width: 110px;
}

.cpcc-cell-aa {
    display: block;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.cpcc-cell-ratio {
    display: inline-block;
    font-size: 0.6875rem;
    font-family: var(--tool-font-mono);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    padding: 1px 5px;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.cpcc-cell-badges {
    display: flex;
    gap: 3px;
    justify-content: center;
}

.cpcc-badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.cpcc-badge--pass {
    background: #15803d;
    color: #fff;
}

.cpcc-badge--fail {
    background: #dc2626;
    color: #fff;
}

.cpcc-cell-same {
    background: var(--tool-surface);
    color: var(--tool-text-muted);
}

.cpcc-summary {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding: 0.65rem 0.875rem;
    background: var(--tool-surface);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius-sm);
}

/* Header cell additions — hex label + pass-count badge */
.cpcc-th-hex {
    display: block;
    font-family: var(--tool-font-mono);
    font-size: 0.8125rem;
    margin-top: 0.2rem;
}

.cpcc-th-count {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--tool-text-muted);
    margin-top: 0.15rem;
}

.cpcc-th-count--all {
    color: #15803d;
}

.cpcc-th-count--none {
    color: #dc2626;
}

/* Export bar */
.cpcc-export-bar {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--tool-border);
}

/* Options bar hint text */
.cpcc-options-hint {
    font-size: 0.8125rem;
    color: var(--tool-text-muted);
    font-style: italic;
    align-self: center;
}