:root {
    --hm-accent: #10b981;
    --hm-navy: #1e2a4a;
    --hm-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;
}

.ic-note code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
}

.ic-note strong {
    color: var(--hm-navy);
}

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

.ic-btn {
    background: var(--hm-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(--hm-navy);
    border: 1px solid var(--hm-border);
}

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

/* ==== Two-panel layout, flush shared border ==== */
.hm-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--hm-border);
    border-radius: 10px;
    overflow: hidden;
}

.hm-panel {
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hm-panel:first-child {
    border-right: 1px solid var(--hm-border);
}

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

.hm-copy-btn {
    background: none;
    border: 1px solid var(--hm-border);
    color: var(--hm-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;
}

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

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

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

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

.hm-textarea[readonly] {
    background: #f9fafb;
    color: #374151;
}

/* ==== Size stats ==== */
.hm-stats {
    margin-top: 14px;
    padding: 10px 14px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0d9668;
    text-align: center;
}

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

    .hm-panel:first-child {
        border-right: none;
        border-bottom: 1px solid var(--hm-border);
    }

    .hm-textarea {
        min-height: 240px;
    }

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

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