:root {
    --ce-accent: #10b981;
    --ce-navy: #1e2a4a;
    --ce-border: #d1d5db;
}

/* .ic-wrap box model (max-width/padding/margin) is owned centrally by
   dev-tool.css's ".dev-tool-widget .ic-wrap" rule — not redefined here
   to avoid the two paddings stacking and misaligning tool content. */

.ic-note {
    font-size: 13px;
    color: #6b7280;
    margin-top: 16px;
    line-height: 1.6;
}

/* ==== ACTION BAR ==== */
.ic-actionbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.ic-btn {
    background: var(--ce-navy);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.ic-btn:hover {
    background: #16213e;
}

.ic-btn-outline {
    background: #fff;
    color: var(--ce-navy);
    border: 1px solid var(--ce-border);
}

.ic-btn-outline:hover {
    border-color: var(--ce-navy);
    background: #f9fafb;
}

.ce-autorun-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ce-navy);
    background: #fff;
    border: 1px solid var(--ce-border);
    border-radius: 7px;
    padding: 9px 12px;
    white-space: nowrap;
}

.ce-autorun-label input[type="checkbox"] {
    accent-color: var(--ce-accent);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* ==== 2x2 editor grid (HTML | CSS / JS | Preview) ==== */
.ce-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.ce-panel {
    background: #fff;
    border: 1px solid var(--ce-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ce-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid var(--ce-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--ce-navy);
}

.ce-copy-btn {
    background: none;
    border: 1px solid var(--ce-border);
    color: var(--ce-navy);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ce-copy-btn:hover {
    background: var(--ce-accent);
    border-color: var(--ce-accent);
    color: #fff;
}

.ce-copy-btn.ce-copied {
    background: var(--ce-accent);
    border-color: var(--ce-accent);
    color: #fff;
}

.ce-textarea {
    flex: 1;
    min-height: 220px;
    border: none;
    resize: vertical;
    padding: 14px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ce-navy);
    background: #fff;
}

.ce-textarea:focus {
    outline: none;
}

.ce-preview-frame {
    flex: 1;
    min-height: 220px;
    border: none;
    background: #fff;
    width: 100%;
}

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

    .ce-textarea,
    .ce-preview-frame {
        min-height: 200px;
    }

    .ic-actionbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ic-actionbar .ic-btn,
    .ic-actionbar .ce-autorun-label {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
