/**
 * HairColorGPT Unified UI Components
 * Component layer for shared UI patterns.
 */

:root {
    --hcgpt-photo-shape-radius: 24px;
    --hcgpt-photo-shape-radius-sm: 12px;
    --hcgpt-photo-shape-left: var(--hcgpt-photo-shape-radius) 0 0 var(--hcgpt-photo-shape-radius);
    --hcgpt-photo-shape-right: 0 var(--hcgpt-photo-shape-radius) var(--hcgpt-photo-shape-radius) 0;
    --hcgpt-photo-shape-left-sm: var(--hcgpt-photo-shape-radius-sm) 0 0 var(--hcgpt-photo-shape-radius-sm);
    --hcgpt-photo-shape-right-sm: 0 var(--hcgpt-photo-shape-radius-sm) var(--hcgpt-photo-shape-radius-sm) 0;
}

.hcgpt-photo-shape,
.hcgpt-photo-shape--left {
    border-radius: var(--hcgpt-photo-shape-left);
    object-fit: cover;
    overflow: hidden;
}

.hcgpt-photo-shape--right {
    border-radius: var(--hcgpt-photo-shape-right);
    object-fit: cover;
    overflow: hidden;
}

.hcgpt-photo-shape--sm,
.hcgpt-photo-shape--left-sm {
    border-radius: var(--hcgpt-photo-shape-left-sm);
    object-fit: cover;
    overflow: hidden;
}

.hcgpt-photo-shape--right-sm {
    border-radius: var(--hcgpt-photo-shape-right-sm);
    object-fit: cover;
    overflow: hidden;
}

.hcgpt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hcgpt-space-2);
    padding: var(--hcgpt-space-2) var(--hcgpt-space-4);
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-md);
    background: var(--hcgpt-color-surface);
    color: var(--hcgpt-color-text);
    font-size: var(--hcgpt-text-sm);
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: var(--hcgpt-line-height-120);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--hcgpt-transition-fast), border-color var(--hcgpt-transition-fast), color var(--hcgpt-transition-fast), box-shadow var(--hcgpt-transition-fast), transform var(--hcgpt-transition-fast);
    font-family: var(--hcgpt-font-sans);
    font-style: normal;
}

/* Primary button — gradient pill (brand v2, 2.20.18).
 *
 * Brand-aligned with the auth-card LOG IN / Create account buttons
 * shipped in hcgpt-membership 0.8.0-beta.53+. Single source of truth
 * for every primary CTA across HairColorGPT user-facing surfaces
 * (User Settings, Academy, Plan card, Formulas Book, etc).
 *
 * Three things change vs the pre-2.20.18 indigo solid:
 *   1. background          solid → linear-gradient (135°)
 *   2. border-radius       md (8px-ish) → full pill (999px)
 *   3. hover                color shift → translateY + shadow lift
 *
 * Shadow is coloured (var(--hcgpt-brand-shadow) = rgba viola 30%)
 * to add depth without the generic neutral shadow look.
 *
 * Selector note (2.20.18 hotfix):
 * The codebase has TWO parallel classnames in flight:
 *   - `.hcgpt-btn--primary`  (BEM, modern templates / admin UI)
 *   - `.hcgpt-btn-primary`   (kebab, legacy templates: account-preferences,
 *                             add-client-form, fb-editor-surface, etc)
 * Until we converge on one, we have to style both. Same goes for
 * `--secondary` / `-secondary` and `--ghost` / `-ghost` below.
 *
 * Out of scope: chat composer Send button (kept as is per Davide's
 * 2026-05-05 call), and `.hcgpt-btn--danger` / `.hcgpt-btn-danger`
 * (semantic red, also kept untouched — Resume/Delete border-only
 * pattern stays). */
.hcgpt-btn--primary,
.hcgpt-btn-primary {
    background: var(--hcgpt-brand-gradient);
    border-color: transparent;
    color: var(--hcgpt-color-on-primary, #fff);
    border-radius: var(--hcgpt-radius-full, 999px);
    box-shadow: var(--hcgpt-brand-shadow);
    font-weight: var(--hcgpt-font-weight-semibold, 600);
}

.hcgpt-btn--primary:hover,
.hcgpt-btn-primary:hover {
    background: var(--hcgpt-brand-gradient);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--hcgpt-brand-shadow-lg);
}

.hcgpt-btn--primary:active,
.hcgpt-btn-primary:active {
    transform: translateY(0);
}

/* Secondary — outline that picks up the brand viola on hover.
 * Default state still neutral so it doesn't compete with primary. */
.hcgpt-btn--secondary,
.hcgpt-btn-secondary {
    background: var(--hcgpt-color-surface);
    border-color: var(--hcgpt-color-border);
    color: var(--hcgpt-color-text);
}

.hcgpt-btn--secondary:hover,
.hcgpt-btn-secondary:hover {
    background: var(--hcgpt-brand-bg);
    border-color: var(--hcgpt-brand-1);
    color: var(--hcgpt-brand-1);
}

.hcgpt-btn--ghost,
.hcgpt-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--hcgpt-color-text-muted);
}

.hcgpt-btn--ghost:hover,
.hcgpt-btn-ghost:hover {
    background: var(--hcgpt-brand-bg);
    border-color: transparent;
    color: var(--hcgpt-brand-1);
}

.hcgpt-btn--danger {
    background: var(--hcgpt-danger);
    border-color: var(--hcgpt-danger);
    color: var(--hcgpt-color-on-danger);
    box-shadow: var(--hcgpt-shadow-sm);
}

.hcgpt-btn--danger:hover {
    background: var(--hcgpt-danger-hover);
    border-color: var(--hcgpt-danger-hover);
    box-shadow: var(--hcgpt-shadow-base);
}

.hcgpt-btn--sm {
    padding: var(--hcgpt-space-1) var(--hcgpt-space-3);
    font-size: var(--hcgpt-text-xs);
}

.hcgpt-btn--md {
    padding: var(--hcgpt-space-2) var(--hcgpt-space-4);
    font-size: var(--hcgpt-text-sm);
}

.hcgpt-btn--lg {
    padding: var(--hcgpt-space-3) var(--hcgpt-space-5);
    font-size: var(--hcgpt-text-base);
}

.hcgpt-btn--icon {
    width: calc(var(--hcgpt-space-6) + var(--hcgpt-space-3));
    height: calc(var(--hcgpt-space-6) + var(--hcgpt-space-3));
    padding: 0;
    border-radius: var(--hcgpt-radius-full);
}

.hcgpt-btn:disabled,
.hcgpt-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.hcgpt-btn.is-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.hcgpt-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: hcgpt-btn-spin 700ms linear infinite;
}

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

.hcgpt-field {
    display: flex;
    flex-direction: column;
    gap: var(--hcgpt-space-2);
    margin-bottom: var(--hcgpt-space-4);
}

.hcgpt-label {
    font-size: var(--hcgpt-text-sm);
    font-weight: var(--hcgpt-font-weight-semibold);
    color: var(--hcgpt-color-text);
}

.hcgpt-help {
    font-size: var(--hcgpt-text-xs);
    color: var(--hcgpt-color-text-muted);
    font-family: var(--hcgpt-font-sans);
}

.hcgpt-error-text {
    font-size: var(--hcgpt-text-xs);
    color: var(--hcgpt-danger);
}

.hcgpt-input,
.hcgpt-textarea,
.hcgpt-select {
    width: 100%;
    padding: var(--hcgpt-space-2) var(--hcgpt-space-3);
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-md);
    background: var(--hcgpt-color-surface);
    color: var(--hcgpt-color-text);
    font-size: var(--hcgpt-text-sm);
    transition: border-color var(--hcgpt-transition-fast), box-shadow var(--hcgpt-transition-fast);
}
.hcgpt-input {
    font-family: var(--hcgpt-font-sans);
}


.hcgpt-textarea {
    min-height: 120px;
    resize: vertical;
}

.hcgpt-field.is-invalid .hcgpt-input,
.hcgpt-field.is-invalid .hcgpt-textarea,
.hcgpt-field.is-invalid .hcgpt-select {
    border-color: var(--hcgpt-danger);
}

.hcgpt-card {
    background: var(--hcgpt-color-surface);
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-lg);
    box-shadow: var(--hcgpt-shadow-sm);
    overflow: hidden;
}

.hcgpt-card--flat {
    box-shadow: none;
}

.hcgpt-card__header,
.hcgpt-card__body,
.hcgpt-card__footer {
    padding: var(--hcgpt-space-4);
}

.hcgpt-card__header {
    background: var(--hcgpt-color-surface-2);
    border-bottom: 1px solid var(--hcgpt-color-border);
}

.hcgpt-card__footer {
    background: var(--hcgpt-color-surface-2);
    border-top: 1px solid var(--hcgpt-color-border);
}

.hcgpt-card__title {
    margin: 0;
    font-size: var(--hcgpt-text-md);
    color: var(--hcgpt-color-text);
    font-family: var(--hcgpt-font-heading);
    font-weight: var(--hcgpt-font-weight-medium);
    font-style: normal;
    text-transform: capitalize;
}

.hcgpt-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--hcgpt-space-1);
    padding: 2px var(--hcgpt-space-2);
    border-radius: var(--hcgpt-radius-full);
    font-size: var(--hcgpt-text-xs);
    font-weight: var(--hcgpt-font-weight-bold);
    border: 1px solid transparent;
    font-family: var(--hcgpt-font-sans);
    font-style: normal;
}

.hcgpt-badge--success {
    background: var(--hcgpt-success);
    color: var(--hcgpt-color-on-success);
}

.hcgpt-badge--warning {
    background: var(--hcgpt-warning);
    color: var(--hcgpt-color-on-warning);
}

.hcgpt-badge--danger {
    background: var(--hcgpt-danger);
    color: var(--hcgpt-color-on-danger);
}

.hcgpt-badge--info {
    background: var(--hcgpt-info);
    color: var(--hcgpt-color-on-info);
}

.hcgpt-badge--neutral {
    background: var(--hcgpt-color-surface-2);
    border-color: var(--hcgpt-color-border);
    color: var(--hcgpt-color-text-muted);
}

.hcgpt-alert {
    padding: var(--hcgpt-space-3) var(--hcgpt-space-4);
    border: 1px solid var(--hcgpt-color-border);
    border-left-width: 4px;
    border-radius: var(--hcgpt-radius-md);
    background: var(--hcgpt-color-surface-2);
    color: var(--hcgpt-color-text);
}

.hcgpt-alert--success {
    border-left-color: var(--hcgpt-success);
}

.hcgpt-alert--warning {
    border-left-color: var(--hcgpt-warning);
}

.hcgpt-alert--danger {
    border-left-color: var(--hcgpt-danger);
}

.hcgpt-alert--info {
    border-left-color: var(--hcgpt-info);
}

.hcgpt-alert--neutral {
    border-left-color: var(--hcgpt-color-border-strong);
}

.hcgpt-tabs {
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-md);
    background: var(--hcgpt-color-surface);
    overflow: hidden;
}

.hcgpt-tablist {
    display: flex;
    gap: var(--hcgpt-space-2);
    padding: var(--hcgpt-space-2);
    border-bottom: 1px solid var(--hcgpt-color-border);
    background: var(--hcgpt-color-surface-2);
}

.hcgpt-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--hcgpt-radius-md);
    padding: var(--hcgpt-space-2) var(--hcgpt-space-3);
    font-size: var(--hcgpt-text-sm);
    color: var(--hcgpt-color-text-muted);
    cursor: pointer;
    transition: background var(--hcgpt-transition-fast), border-color var(--hcgpt-transition-fast), color var(--hcgpt-transition-fast);
}

.hcgpt-tab:hover {
    background: var(--hcgpt-color-surface);
    border-color: var(--hcgpt-color-border);
    color: var(--hcgpt-color-text);
}

.hcgpt-tabpanel {
    padding: var(--hcgpt-space-4);
    color: var(--hcgpt-color-text);
}

.hcgpt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-md);
    overflow: hidden;
    background: var(--hcgpt-color-surface);
    font-size: var(--hcgpt-text-sm);
}

.hcgpt-table th,
.hcgpt-table td {
    padding: var(--hcgpt-space-2) var(--hcgpt-space-3);
    text-align: left;
    border-bottom: 1px solid var(--hcgpt-color-border);
}

.hcgpt-table thead th {
    background: var(--hcgpt-color-surface-2);
    color: var(--hcgpt-color-text);
    font-weight: var(--hcgpt-font-weight-semibold);
}

.hcgpt-table tbody tr:nth-child(even) {
    background: var(--hcgpt-color-surface-2);
}

.hcgpt-table tbody tr:last-child td {
    border-bottom: none;
}

.hcgpt-modal-demo {
    position: relative;
    min-height: 240px;
    border: 1px dashed var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-md);
    background: var(--hcgpt-color-surface-2);
    overflow: hidden;
}

.hcgpt-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--hcgpt-space-4);
    background: var(--hcgpt-color-overlay);
    z-index: var(--hcgpt-z-modal);
}

.hcgpt-modal-overlay--demo {
    position: absolute;
    inset: 0;
    background: var(--hcgpt-color-overlay-soft);
    z-index: 1;
}

.hcgpt-modal {
    width: 100%;
    max-width: 520px;
    background: var(--hcgpt-color-surface);
    border-radius: var(--hcgpt-radius-lg);
    box-shadow: var(--hcgpt-shadow-lg);
    overflow: hidden;
}

.hcgpt-modal__header,
.hcgpt-modal__body,
.hcgpt-modal__footer {
    padding: var(--hcgpt-space-4);
}

.hcgpt-modal__header {
    border-bottom: 1px solid var(--hcgpt-color-border);
}

.hcgpt-modal__title {
    margin: 0;
    font-size: var(--hcgpt-text-md);
    color: var(--hcgpt-type-structural-strong);
    font-family: var(--hcgpt-font-sans);
    font-weight: var(--hcgpt-font-weight-semibold);
    text-transform: var(--hcgpt-text-transform-uppercase);
    letter-spacing: var(--hcgpt-letter-spacing-003em);
}

.hcgpt-modal__body {
    color: var(--hcgpt-color-text-muted);
}

.hcgpt-modal__footer {
    border-top: 1px solid var(--hcgpt-color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--hcgpt-space-2);
}

.hcgpt-stack {
    display: flex;
    flex-direction: column;
    gap: var(--hcgpt-space-4);
}

.hcgpt-inline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hcgpt-space-3);
    align-items: center;
}

.hcgpt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--hcgpt-space-4);
}

.hcgpt-divider {
    height: 1px;
    background: var(--hcgpt-color-border);
    border: 0;
    margin: var(--hcgpt-space-4) 0;
}

/* Prose / Markdown typography (chat messages) */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose {
    color: var(--hcgpt-color-text);
    font-size: 15px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.62;
    word-wrap: break-word;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose> :where(p,
    ul,
    ol,
    pre,
    blockquote,
    table,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    hr) {
    margin: 0 0 var(--hcgpt-space-2);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose> :last-child {
    margin-bottom: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(h1, h2, h3, h4, h5, h6) {
    margin-top: var(--hcgpt-space-3);
    margin-bottom: var(--hcgpt-space-2);
    font-family: var(--hcgpt-font-editorial, var(--hcgpt-font-heading));
    font-style: normal;
    text-transform: var(--hcgpt-text-transform-none);
    letter-spacing: var(--hcgpt-letter-spacing-0);
    text-wrap: balance;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose h1 {
    font-size: 26px;
    font-weight: var(--hcgpt-font-weight-black);
    line-height: 1.14;
    color: var(--hcgpt-type-editorial-strong);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose h2 {
    font-size: 21px;
    font-weight: var(--hcgpt-font-weight-black);
    line-height: 1.16;
    color: var(--hcgpt-type-editorial-strong);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose h3 {
    font-size: 17px;
    font-weight: var(--hcgpt-font-weight-bold);
    line-height: 1.24;
    color: var(--hcgpt-type-editorial-mid);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose h4 {
    font-size: 15px;
    font-weight: var(--hcgpt-font-weight-semibold);
    line-height: 1.28;
    color: var(--hcgpt-type-structural-strong);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose h5 {
    font-size: 13px;
    font-weight: var(--hcgpt-font-weight-semibold);
    line-height: 1.3;
    color: var(--hcgpt-type-editorial-mid);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose h6 {
    font-size: 12px;
    font-weight: var(--hcgpt-font-weight-semibold);
    line-height: 1.3;
    color: var(--hcgpt-type-structural-soft);
}

/* Assistant/Bot prose typography refresh (light-only). */
:where(#hcgpt-unified-chat-wrapper[data-hcgpt-theme="light"], .hcgpt-scope[data-hcgpt-theme="light"])
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose {
    --hcgpt-bot-prose-color: var(--hcgpt-color-text);
    --hcgpt-bot-h1-color: var(--hcgpt-type-editorial-strong);
    --hcgpt-bot-h2-color: var(--hcgpt-type-editorial-strong);
    --hcgpt-bot-h3-color: var(--hcgpt-type-editorial-mid);
    --hcgpt-bot-h4-color: var(--hcgpt-type-structural-strong);
    --hcgpt-bot-h5-color: var(--hcgpt-type-structural-soft);
    --hcgpt-bot-h6-color: var(--hcgpt-type-structural-soft);
    --hcgpt-bot-h1-size: 25px;
    --hcgpt-bot-h2-size: 20px;
    --hcgpt-bot-h3-size: 16px;
    --hcgpt-bot-h4-size: 14px;
    --hcgpt-bot-h5-size: 12px;
    --hcgpt-bot-h6-size: 11px;
}

@media (prefers-color-scheme: light) {
    :where(#hcgpt-unified-chat-wrapper[data-hcgpt-theme="system"], .hcgpt-scope[data-hcgpt-theme="system"])
    :is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
    .hcgpt-message-content.hcgpt-prose {
        --hcgpt-bot-prose-color: var(--hcgpt-color-text);
        --hcgpt-bot-h1-color: var(--hcgpt-type-editorial-strong);
        --hcgpt-bot-h2-color: var(--hcgpt-type-editorial-strong);
        --hcgpt-bot-h3-color: var(--hcgpt-type-editorial-mid);
        --hcgpt-bot-h4-color: var(--hcgpt-type-structural-strong);
        --hcgpt-bot-h5-color: var(--hcgpt-type-structural-soft);
        --hcgpt-bot-h6-color: var(--hcgpt-type-structural-soft);
        --hcgpt-bot-h1-size: 25px;
        --hcgpt-bot-h2-size: 20px;
        --hcgpt-bot-h3-size: 16px;
        --hcgpt-bot-h4-size: 14px;
        --hcgpt-bot-h5-size: 12px;
        --hcgpt-bot-h6-size: 11px;
    }
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose {
    color: var(--hcgpt-bot-prose-color, var(--hcgpt-color-text));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h1 {
    font-size: var(--hcgpt-bot-h1-size, 28px);
    color: var(--hcgpt-bot-h1-color, var(--hcgpt-type-editorial-strong));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h2 {
    font-size: var(--hcgpt-bot-h2-size, 22px);
    color: var(--hcgpt-bot-h2-color, var(--hcgpt-type-structural-soft));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h3 {
    font-size: var(--hcgpt-bot-h3-size, 18px);
    color: var(--hcgpt-bot-h3-color, var(--hcgpt-type-editorial-mid));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h4 {
    font-size: var(--hcgpt-bot-h4-size, 16px);
    color: var(--hcgpt-bot-h4-color, var(--hcgpt-type-structural-strong));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h5 {
    font-size: var(--hcgpt-bot-h5-size, 14px);
    color: var(--hcgpt-bot-h5-color, var(--hcgpt-type-editorial-mid));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h6 {
    font-size: var(--hcgpt-bot-h6-size, 13px);
    color: var(--hcgpt-bot-h6-color, var(--hcgpt-type-structural-soft));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose p {
    font-size: 15px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.62;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(strong, b) {
    font-size: inherit;
    font-weight: var(--hcgpt-font-weight-bold);
    line-height: inherit;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(em, i) {
    font-size: inherit;
    font-style: italic;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: inherit;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(figcaption, caption, label, .hcgpt-caption, .hcgpt-label) {
    font-size: 12px;
    font-weight: var(--hcgpt-font-weight-semibold);
    line-height: 1.4;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(ul, ol) {
    padding-left: 1.25rem;
    margin-bottom: var(--hcgpt-space-2);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose li {
    font-size: 15px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.58;
    margin: 0 0 4px;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose li:last-child {
    margin-bottom: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose :is(ul, ol) :is(ul, ol) > li {
    font-size: 14px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.6;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose li>p {
    margin: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose a {
    color: var(--hcgpt-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose a:hover {
    color: var(--hcgpt-primary-hover);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose code {
    font-family: var(--hcgpt-font-mono);
    font-size: 13px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.5;
    font-style: normal;
    background: var(--hcgpt-color-surface-2);
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-sm);
    padding: 0.1em 0.35em;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-message-content.hcgpt-prose code {
    font-size: 13px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.5;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose pre {
    background: color-mix(in srgb, var(--hcgpt-color-surface-2) 92%, transparent);
    border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-md);
    padding: var(--hcgpt-space-3);
    overflow-x: auto;
    max-width: 100%;
    font-family: var(--hcgpt-font-mono);
    font-size: 13px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.6;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose pre code {
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose blockquote {
    margin: 0 0 var(--hcgpt-space-3);
    padding: var(--hcgpt-space-3);
    border: 1px solid var(--hcgpt-color-border);
    border-left: 3px solid var(--hcgpt-color-border-strong);
    border-radius: var(--hcgpt-radius-md);
    background: color-mix(in srgb, var(--hcgpt-color-surface-2) 72%, transparent);
    color: var(--hcgpt-color-text);
    font-size: 15px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.58;
    font-style: normal;
    opacity: 1;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose hr {
    border: 0;
    border-top: 1px solid var(--hcgpt-color-border);
    margin: var(--hcgpt-space-4) 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--hcgpt-text-sm);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose th,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose td {
    border: 1px solid var(--hcgpt-color-border);
    padding: var(--hcgpt-space-2) var(--hcgpt-space-3);
    text-align: left;
    vertical-align: top;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose thead th {
    background: var(--hcgpt-color-surface-2);
    color: var(--hcgpt-color-text);
    font-weight: var(--hcgpt-font-weight-semibold);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-prose img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   Bot prose — brand pass (Variant A full brand)
   Coerente con HairColorGPT/assets/css/chat-share.css
   (templates/logs/single-chat.php) e mockup A in
   docs/mockups/shared-chat-brand-proposals.html.
   Scope: solo bot bubbles in-chat (.hcgpt-message-content.hcgpt-prose).
   ============================================================ */

/* H1: editorial Neuton + text-gradient */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h1 {
    font-family: var(--hcgpt-font-editorial, "Neuton", Georgia, serif);
    font-weight: var(--hcgpt-font-weight-black, 900);
    line-height: var(--hcgpt-line-height-115, 1.15);
    letter-spacing: 0;
    background: var(--hcgpt-brand-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

/* H2: editorial Neuton + text-gradient */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h2 {
    font-family: var(--hcgpt-font-editorial, "Neuton", Georgia, serif);
    font-weight: var(--hcgpt-font-weight-black, 900);
    line-height: var(--hcgpt-line-height-115, 1.15);
    letter-spacing: 0;
    background: var(--hcgpt-brand-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

/* H3: Roboto Mono violet uppercase eyebrow */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose h3 {
    font-family: var(--hcgpt-font-mono, "Roboto Mono", Menlo, Consolas, monospace);
    font-size: var(--hcgpt-font-size-11, 11px);
    font-weight: var(--hcgpt-font-weight-bold, 700);
    letter-spacing: var(--hcgpt-letter-spacing-008em, .08em);
    text-transform: uppercase;
    line-height: var(--hcgpt-line-height-120, 1.2);
    color: var(--hcgpt-brand-1, #6e3aff);
}

/* Strong: violet emphasis */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose :is(strong, b) {
    color: var(--hcgpt-brand-1, #6e3aff);
}

/* UL bullets: gradient circle dots (replace browser default) */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose ul {
    list-style: none;
    padding-left: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose ul > li {
    position: relative;
    padding-left: 22px;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hcgpt-brand-gradient);
}

/* OL counters: gradient circle chips with mono number */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose ol {
    list-style: none;
    counter-reset: hcgpt-prose-li;
    padding-left: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose ol > li {
    position: relative;
    padding-left: 34px;
    counter-increment: hcgpt-prose-li;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope)
:is(.hcgpt-message.assistant, .hcgpt-message.bot, .hcgpt-message-assistant, .hcgpt-message-bot)
.hcgpt-message-content.hcgpt-prose ol > li::before {
    content: counter(hcgpt-prose-li);
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--hcgpt-brand-gradient);
    color: #fff;
    font-family: var(--hcgpt-font-mono, "Roboto Mono", Menlo, monospace);
    font-size: 11px;
    font-weight: var(--hcgpt-font-weight-bold, 700);
    line-height: 1;
}

/* Active client context pill */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    max-width: min(42vw, 520px);
    margin: 0;
    padding: 5px 5px 5px 12px;
    border: 1px solid transparent;
    border-radius: var(--hcgpt-radius-full);
    background:
        linear-gradient(
            color-mix(in srgb, var(--hcgpt-color-surface) 94%, transparent),
            color-mix(in srgb, var(--hcgpt-color-surface) 94%, transparent)
        ) padding-box,
        var(--hcgpt-brand-gradient) border-box;
    color: var(--hcgpt-color-text);
    font-family: var(--hcgpt-font-sans);
    font-size: var(--hcgpt-font-size-12);
    line-height: var(--hcgpt-line-height-120);
    box-shadow: none;
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    backdrop-filter: blur(12px) saturate(1.08);
}

:where(.hcgpt-app-topbar__chat) > .hcgpt-active-client-context {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    flex: 0 1 auto;
    margin: 0;
    transform: translate(-50%, -50%);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--hcgpt-brand-gradient);
    box-shadow: none;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__label {
    color: var(--hcgpt-color-text-muted);
    font-family: var(--hcgpt-font-mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__name {
    min-width: 0;
    max-width: 28ch;
    overflow: hidden;
    color: var(--hcgpt-color-text);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--hcgpt-brand-2, #ff3a8c) 48%, var(--hcgpt-color-border));
    border-radius: var(--hcgpt-radius-full);
    background: var(--hcgpt-color-surface);
    color: color-mix(in srgb, var(--hcgpt-brand-2, #ff3a8c) 72%, var(--hcgpt-color-text));
    cursor: pointer;
    font-family: var(--hcgpt-font-sans);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.02em;
    line-height: var(--hcgpt-line-height-100);
    text-transform: uppercase;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__clear:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__clear:focus-visible {
    background: var(--hcgpt-color-surface);
    border-color: color-mix(in srgb, var(--hcgpt-brand-2, #ff3a8c) 72%, var(--hcgpt-color-border));
    color: color-mix(in srgb, var(--hcgpt-brand-2, #ff3a8c) 86%, var(--hcgpt-color-text));
    transform: none;
}

@media (max-width: 767.98px) {
    :where(.hcgpt-app-topbar__chat) > .hcgpt-active-client-context {
        max-width: min(58vw, 320px);
    }

    :where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context {
        min-height: 34px;
        gap: 6px;
        padding: 4px 4px 4px 9px;
    }

    :where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__label {
        display: none;
    }

    :where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-active-client-context__clear {
        min-height: 26px;
        padding-inline: 9px;
    }
}

/* Chat frame alignment (messages + input share the same column) */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-chat-container {
    padding-left: calc(var(--hcgpt-chat-frame-pad) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--hcgpt-chat-frame-pad) + env(safe-area-inset-right, 0px));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-messages {
    width: 100%;
    max-width: var(--hcgpt-messages-max-width, var(--hcgpt-chat-frame-max));
    margin-inline: var(--hcgpt-messages-margin-inline, auto);
    position: relative;
    z-index: var(--hcgpt-messages-z-index, 0);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box {
    width: 100%;
    max-width: var(--hcgpt-input-box-max-width, calc(var(--hcgpt-chat-frame-max) - 40px));
    margin-inline: var(--hcgpt-input-box-margin-inline, auto);
    position: relative;
    z-index: var(--hcgpt-input-box-z-index, 1000);
}

/* Message turns (user/assistant) */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-turn {
    padding: var(--hcgpt-space-3) var(--hcgpt-space-4);
    border-radius: var(--hcgpt-bubble-radius);
    line-height: var(--hcgpt-line-height-150);
    word-wrap: break-word;
    position: relative;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-turn--assistant {
    background: var(--hcgpt-bubble-assistant-bg);
    color: var(--hcgpt-color-text);
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
    padding-left: 0;
    border: 1px solid transparent;
    max-width: var(--hcgpt-bubble-assistant-max);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-turn--user {
    background:
        linear-gradient(var(--hcgpt-bubble-user-bg), var(--hcgpt-bubble-user-bg)) padding-box,
        var(--hcgpt-brand-gradient) border-box;
    color: var(--hcgpt-color-text);
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
    border: 1px solid transparent;
    max-width: var(--hcgpt-bubble-user-max);
}

/* Menu shells */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) :is(.hcgpt-dropdown, .hcgpt-action-menu, .hcgpt-portal-menu, .hcgpt-positive-feedback-dropdown-content, .hcgpt-tools-menu, .hcgpt-chat-style-menu) {
    background-color: var(--hcgpt-overlay-bg);
    border: 1px solid var(--hcgpt-overlay-border);
    border-radius: var(--hcgpt-menu-shell-radius, var(--hcgpt-overlay-radius));
    box-shadow: var(--hcgpt-overlay-shadow);
}

/* Overlays / modals */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) :is(.hcgpt-share-modal, .hcgpt-feedback-modal, .hcgpt-modal-dialog) {
    background-color: var(--hcgpt-overlay-bg);
    border: 1px solid var(--hcgpt-overlay-border);
    border-radius: var(--hcgpt-overlay-radius);
    box-shadow: var(--hcgpt-overlay-shadow);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) :is(.hcgpt-share-overlay, .hcgpt-feedback-overlay, .hcgpt-modal-overlay) {
    background: var(--hcgpt-overlay-backdrop-bg);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    z-index: 9999;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-modal-overlay[aria-hidden="false"],
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-modal-overlay.is-visible {
    display: flex;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-modal-dialog {
    max-width: 760px;
    width: 92%;
    padding: 20px 22px;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-modal-dialog h3 {
    margin: 0 0 8px 0;
    font-family: var(--hcgpt-font-heading);
    font-weight: var(--hcgpt-font-weight-semibold);
    text-transform: var(--hcgpt-text-transform-uppercase);
    letter-spacing: var(--hcgpt-letter-spacing-003em);
    color: var(--hcgpt-type-structural-strong);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-modal-dialog p {
    margin: 0 0 14px 0;
    font-size: var(--hcgpt-font-size-14);
    line-height: var(--hcgpt-line-height-150);
    font-family: var(--hcgpt-font-sans);
    font-weight: var(--hcgpt-font-weight-thin);
    font-style: normal;
    text-transform: var(--hcgpt-text-transform-none);
}

/* Composer (chat input + controls) */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chatbox-input-container {
    background: transparent;
    color: var(--hcgpt-color-text);
    border-color: var(--hcgpt-color-border);
    padding-left: var(--hcgpt-chatbox-input-pad-left, calc(var(--hcgpt-chat-frame-pad) + var(--hcgpt-chat-shell-pad, 0px) + env(safe-area-inset-left, 0px)));
    padding-right: var(--hcgpt-chatbox-input-pad-right, calc(var(--hcgpt-chat-frame-pad) + var(--hcgpt-chat-shell-pad, 0px) + env(safe-area-inset-right, 0px)));
}

#hcgpt-input-box {
    bottom: 0px;
    width: 100%;
    border-radius: 20px 20px 0 0;
    border: none;
    padding-block: 8px 16px;
    padding-inline: 0;
    box-sizing: border-box;
    --hcgpt-send-size: 36px;
    --hcgpt-send-inset-x: 4px;
    --hcgpt-send-inset-y: 4px;
    --hcgpt-send-gap: 6px;
    --hcgpt-send-icon-size: 18px;
    --hcgpt-send-stop-icon-size: 20px;
    --hcgpt-send-stop-square-size: 12px;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-user-input {
    background: var(--hcgpt-input-bg);
    border: 1px solid var(--hcgpt-input-border);
    border-radius: var(--hcgpt-input-radius);
    color: var(--hcgpt-color-text);
    box-shadow: none;
    transition: border-color var(--hcgpt-transition-fast), box-shadow var(--hcgpt-transition-fast), background var(--hcgpt-transition-fast), color var(--hcgpt-transition-fast);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-user-input::placeholder {
    color: var(--hcgpt-placeholder-color);
    font-size: 15px;
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: 1.7;
    opacity: 0.4;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-user-input::selection {
    background: color-mix(in srgb, var(--hcgpt-color-focus-ring) 25%, transparent);
    color: var(--hcgpt-color-text);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-user-input:disabled {
    opacity: var(--hcgpt-control-disabled-opacity);
    cursor: not-allowed;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--hcgpt-color-text-muted);
    border-radius: 12px;
    padding: 0 .75rem;
    cursor: pointer;
    transition: background var(--hcgpt-transition-fast), color var(--hcgpt-transition-fast), box-shadow var(--hcgpt-transition-fast), transform var(--hcgpt-transition-fast);
    font-weight: var(--hcgpt-font-weight-regular);
    font-family: var(--hcgpt-font-sans);
    font-style: normal;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn--icon {
    width: 36px;
    justify-content: center;
    padding: 0;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn--pill {
    padding: 0 .9rem;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn:hover {
    background: var(--hcgpt-control-hover-bg);
    color: var(--hcgpt-color-text);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn:disabled,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn.is-disabled {
    opacity: var(--hcgpt-control-disabled-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-stt,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-rec,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-stt-btn,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-rec-btn {
    background: transparent;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    color: var(--hcgpt-color-text-muted);
    transition: background var(--hcgpt-transition-fast), color var(--hcgpt-transition-fast), opacity var(--hcgpt-transition-fast);
    flex-shrink: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-stt:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-rec:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-stt-btn:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-rec-btn:hover {
    background: var(--hcgpt-control-hover-bg);
    color: var(--hcgpt-color-text);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-stt:disabled,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-rec:disabled,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-stt-btn:disabled,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-rec-btn:disabled {
    opacity: var(--hcgpt-control-disabled-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-input-box .hcgpt-btn-stt.recording svg {
    stroke: var(--hcgpt-danger);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn {
    position: absolute;
    right: var(--hcgpt-send-inset-x);
    bottom: var(--hcgpt-send-inset-y);
    z-index: 101;
    width: var(--hcgpt-send-size);
    height: var(--hcgpt-send-size);
    min-width: var(--hcgpt-send-size);
    min-height: var(--hcgpt-send-size);
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 0;
    box-sizing: border-box;
    cursor: pointer;
    background: var(--hcgpt-brand-gradient);
    border: 1px solid transparent;
    color: #fff;
    box-shadow: none;
    transition: filter var(--hcgpt-transition-fast), box-shadow var(--hcgpt-transition-fast), transform var(--hcgpt-transition-fast);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) :is(#hcgpt-right-controls, .hcgpt-right-controls) {
    position: absolute;
    right: calc(var(--hcgpt-send-inset-x) + var(--hcgpt-send-size) + var(--hcgpt-send-gap));
    bottom: var(--hcgpt-send-inset-y);
    z-index: 101;
    display: flex;
    align-items: center;
    gap: var(--hcgpt-send-gap);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn:hover {
    filter: brightness(1.06);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn:disabled,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn.is-loading,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn[aria-disabled="true"] {
    opacity: var(--hcgpt-control-disabled-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn.hcgpt-stop-mode {
    background: var(--hcgpt-control-active-bg);
}

/* Dark mode: remove chat input borders (composer field + send button) */
:where(.hcgpt-scope:is([data-hcgpt-theme="dark"], [data-hcgpt-resolved-theme="dark"])) :is(#hcgpt-user-input, #hcgpt-send-btn),
:where(body.hcgpt-chat-page.hcgpt-theme-dark) :is(#hcgpt-user-input, #hcgpt-send-btn),
:where(body.hcgpt-chat-page:is([data-hcgpt-theme="dark"], [data-hcgpt-resolved-theme="dark"])) :is(#hcgpt-user-input, #hcgpt-send-btn),
:where(:is([data-hcgpt-theme="dark"], [data-hcgpt-resolved-theme="dark"])) #hcgpt-unified-chat-wrapper :is(#hcgpt-user-input, #hcgpt-send-btn) {
    border-color: transparent;
}

@media (prefers-color-scheme: dark) {
    :where(.hcgpt-scope:not([data-hcgpt-theme])) :is(#hcgpt-user-input, #hcgpt-send-btn),
    :where(.hcgpt-scope[data-hcgpt-theme="system"]) :is(#hcgpt-user-input, #hcgpt-send-btn),
    :where(body.hcgpt-chat-page.hcgpt-theme-system) :is(#hcgpt-user-input, #hcgpt-send-btn) {
        border-color: transparent;
    }
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn.hcgpt-stop-mode:hover {
    background: var(--hcgpt-control-hover-bg);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn svg {
    width: var(--hcgpt-send-icon-size);
    height: var(--hcgpt-send-icon-size);
    display: block;
    color: currentColor;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-send-btn.hcgpt-stop-mode svg {
    width: var(--hcgpt-send-stop-icon-size);
    height: var(--hcgpt-send-stop-icon-size);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-upload-btn,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-grey-buttons-container>label,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-grey-buttons-container .hcgpt-grey-btn,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-refresh-suggestions,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-websearch-btn,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tools-main-btn {
    color: var(--hcgpt-color-text-muted);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-upload-btn:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-grey-buttons-container>label:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-grey-buttons-container .hcgpt-grey-btn:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-refresh-suggestions:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) #hcgpt-websearch-btn:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tools-main-btn:hover {
    background: var(--hcgpt-control-hover-bg);
    color: var(--hcgpt-color-text);
}

/* Tool dropdown menu items */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tools-menu {
    color: var(--hcgpt-color-text);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-item {
    color: var(--hcgpt-color-text);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-item:hover {
    background: var(--hcgpt-menu-item-hover-bg, var(--hcgpt-overlay-item-hover-bg));
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tools-divider {
    background: var(--hcgpt-color-border);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-item.hcgpt-tool-reset,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-reset {
    color: var(--hcgpt-color-text-muted);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-item.hcgpt-tool-reset:hover,
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-reset:hover {
    color: var(--hcgpt-danger);
    background: color-mix(in srgb, var(--hcgpt-danger) 12%, transparent);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-tool-indicator {
    background: color-mix(in srgb, var(--hcgpt-accent) 12%, var(--hcgpt-surface));
    border: 1px solid color-mix(in srgb, var(--hcgpt-accent) 35%, var(--hcgpt-color-border));
    color: var(--hcgpt-accent);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-indicator-close {
    color: var(--hcgpt-accent);
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-indicator-close:hover {
    background: color-mix(in srgb, var(--hcgpt-accent) 18%, transparent);
    color: var(--hcgpt-accent);
}

/* Welcome block */
:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chat-welcome-screen {
    width: 100%;
    max-width: min(820px, 100%);
    margin: 0 auto;
    padding: var(--hcgpt-space-2) var(--hcgpt-space-4);
    text-align: center;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chat-welcome-title {
    margin: 0;
    color: var(--hcgpt-color-text);
    font-family: var(--hcgpt-font-editorial, var(--hcgpt-font-heading));
    font-size: clamp(var(--hcgpt-font-size-28), 3vw, var(--hcgpt-font-size-35));
    font-weight: var(--hcgpt-font-weight-black);
    line-height: var(--hcgpt-line-height-110);
    letter-spacing: var(--hcgpt-letter-spacing-0);
    text-transform: var(--hcgpt-text-transform-none);
    text-wrap: balance;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chat-welcome-title__name {
    background: var(--hcgpt-brand-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chat-welcome-subtitle {
    margin: var(--hcgpt-space-2) auto 0;
    max-width: 42ch;
    color: var(--hcgpt-color-text-muted);
    font-family: var(--hcgpt-font-sans);
    font-size: var(--hcgpt-font-size-18);
    font-weight: var(--hcgpt-font-weight-regular);
    line-height: var(--hcgpt-line-height-140);
    letter-spacing: var(--hcgpt-letter-spacing-0);
}

@media (max-width: 767.98px) {
    :where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chat-welcome-screen {
        padding-inline: var(--hcgpt-space-3);
    }

    :where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-chat-welcome-subtitle {
        font-size: var(--hcgpt-font-size-16);
        max-width: 28ch;
    }
}

@media (prefers-reduced-motion: reduce) {

    .hcgpt-btn,
    .hcgpt-input,
    .hcgpt-textarea,
    .hcgpt-select,
    .hcgpt-tab {
        transition: none;
    }
.hcgpt-input {
    font-family: var(--hcgpt-font-sans);
}

.hcgpt-btn {
    font-family: var(--hcgpt-font-sans);
    font-weight: var(--hcgpt-font-weight-regular);
    font-style: normal;
}


    .hcgpt-btn.is-loading::after {
        animation: none;
    }
}

/* ===== Onboarding guide wizard =====
   Owner: assets/js/hcgpt-onboarding-guide.js + templates/chat-onboarding-guide.php
   Riusa .hcgpt-modal-overlay / .hcgpt-modal / .hcgpt-modal__header|__body|__footer.
   Token UI Kit (--hcgpt-*): dark mode automatico. Nessun blu su surface. */
/* Show/hide via .is-visible (+ aria-hidden), coerente col contratto canonico .hcgpt-modal-overlay */
.hcgpt-guide-overlay { display: none; }
.hcgpt-guide-overlay.is-visible { display: flex; }

:where(#hcgpt-unified-chat-wrapper, .hcgpt-scope) .hcgpt-shell .hcgpt-guide-overlay {
	left: 0;
	right: 0;
	padding-left: calc(var(--hcgpt-app-main-left, 0px) + var(--hcgpt-space-4, 16px));
	padding-right: calc(var(--hcgpt-app-main-right, 0px) + var(--hcgpt-space-4, 16px));
	box-sizing: border-box;
}

.hcgpt-guide [hidden] { display: none; }            /* batte le regole display:* dei figli (es. __chk flex) */
.hcgpt-guide__back.is-hidden { visibility: hidden; }
/* primary "Avanti/Next": vince sugli override app-shell/dark senza !important */
.hcgpt-guide .hcgpt-guide__next.hcgpt-btn--primary {
	background: var(--hcgpt-brand-gradient);
	color: #fff;
	border: 0;
	box-shadow: var(--hcgpt-brand-shadow);
}
/* Centra il contenuto dei pallini/badge: lo scope app-shell li forza a flex flex-start,
   spingendo la cifra/icona ~7px a sinistra. Specificità (0,3,0) per vincere l'override. */
.hcgpt-guide .hcgpt-guide__body :is(.hcgpt-guide-s3__n, .hcgpt-guide-why__i, .hcgpt-guide-mk, .hcgpt-guide-blob, .hcgpt-guide-clientbar__av) {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.hcgpt-modal.hcgpt-guide { max-width: 580px; width: min(580px, calc(100% - var(--hcgpt-space-8, 32px))); display: flex; flex-direction: column; }

.hcgpt-guide__header { display: flex; align-items: center; gap: var(--hcgpt-space-2); }
.hcgpt-guide__spacer { flex: 1; }
.hcgpt-guide__close {
    width: 32px; height: 32px; flex: none; border-radius: var(--hcgpt-radius-full);
    border: 1px solid var(--hcgpt-color-border); background: var(--hcgpt-color-surface);
    color: var(--hcgpt-color-text-muted); cursor: pointer; font-size: 18px; line-height: 1;
}
.hcgpt-guide__close:hover { background: var(--hcgpt-color-surface-2); color: var(--hcgpt-color-text); }

.hcgpt-guide__progress { display: flex; align-items: center; gap: var(--hcgpt-space-3);
    padding: 0 var(--hcgpt-space-4) var(--hcgpt-space-3); }
.hcgpt-guide__track { display: flex; align-items: center; gap: 6px; flex: 1; }
.hcgpt-guide__seg { height: 5px; flex: 1; border-radius: var(--hcgpt-radius-full);
    background: var(--hcgpt-color-surface-3); }
.hcgpt-guide__seg.is-done { background: var(--hcgpt-brand-1); }
.hcgpt-guide__seg.is-cur { background: var(--hcgpt-brand-gradient); }
.hcgpt-guide__label { font-size: 11.5px; font-weight: 700; color: var(--hcgpt-color-text-muted); white-space: nowrap; }

.hcgpt-guide__body { max-height: min(720px, calc(100vh - 180px)); overflow: auto; color: var(--hcgpt-color-text); }
.hcgpt-guide__step { display: none; }
.hcgpt-guide__step.is-active { display: block; }

.hcgpt-guide__footer { align-items: center; gap: var(--hcgpt-space-3); flex-wrap: wrap; justify-content: flex-start; }
.hcgpt-guide__chk { display: flex; align-items: center; gap: var(--hcgpt-space-2); font-size: 13px; color: var(--hcgpt-color-text-muted); cursor: pointer; }
.hcgpt-guide__hint { font-size: 12px; color: var(--hcgpt-color-text-muted); }
.hcgpt-guide__skip { font-size: 13px; font-weight: 600; color: var(--hcgpt-color-text-muted); cursor: pointer; text-decoration: none; }
.hcgpt-guide__skip:hover { color: var(--hcgpt-color-text); text-decoration: underline; }

.hcgpt-guide-sectlabel { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    color: var(--hcgpt-color-text-muted); margin: var(--hcgpt-space-2) 0; }
.hcgpt-guide-lead { font-size: 14px; color: var(--hcgpt-color-text-muted); margin: 2px 0 var(--hcgpt-space-3); }
.hcgpt-guide-why { display: flex; gap: 9px; align-items: flex-start; background: var(--hcgpt-color-surface-2);
    border: 1px solid var(--hcgpt-color-border); border-radius: var(--hcgpt-radius-lg); padding: 11px 13px;
    font-size: 13px; color: var(--hcgpt-color-text-muted); margin-top: var(--hcgpt-space-3); }
.hcgpt-guide-why__i { flex: none; width: 20px; height: 20px; border-radius: var(--hcgpt-radius-full);
    background: var(--hcgpt-brand-gradient); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* step 1 — benvenuto */
.hcgpt-guide-hero { display: flex; gap: 13px; align-items: center; margin: 6px 0 var(--hcgpt-space-3); }
.hcgpt-guide-blob { width: 52px; height: 52px; flex: none; border-radius: 18px; background: var(--hcgpt-brand-gradient);
    display: grid; place-items: center; color: #fff; font-size: 26px; }
.hcgpt-guide-hero__title { margin: 0; font-size: 16px; color: var(--hcgpt-color-text); }
.hcgpt-guide-hero__text { margin: 2px 0 0; font-size: 13px; color: var(--hcgpt-color-text-muted); }
.hcgpt-guide-steps3 { display: grid; gap: var(--hcgpt-space-2); }
.hcgpt-guide-s3 { display: flex; gap: 11px; align-items: center; background: var(--hcgpt-color-surface-2);
    border: 1px solid var(--hcgpt-color-border); border-radius: var(--hcgpt-radius-lg); padding: 11px 13px; }
.hcgpt-guide-s3__n { width: 24px; height: 24px; flex: none; border-radius: var(--hcgpt-radius-full);
    background: var(--hcgpt-color-surface); border: 1px solid var(--hcgpt-color-border); display: grid; place-items: center;
    font-size: 12px; font-weight: 700; color: var(--hcgpt-color-text-muted); }
.hcgpt-guide-s3 b { font-size: 13.5px; color: var(--hcgpt-color-text); }
.hcgpt-guide-s3 span { display: block; font-size: 12.5px; color: var(--hcgpt-color-text-muted); margin-top: 1px; }

/* step 2 — foto */
.hcgpt-guide-slots { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--hcgpt-space-2); margin: 4px 0 var(--hcgpt-space-3); }
.hcgpt-guide .hcgpt-guide-slots .hcgpt-guide-slot { aspect-ratio: 1/1; border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-lg); position: relative; overflow: hidden; display: block;
    background: var(--hcgpt-color-surface-2); }
.hcgpt-guide-slot__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hcgpt-guide-slot__num { position: absolute; top: 6px; left: 6px; z-index: 2; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
    color: #fff; background: rgba(0,0,0,.55); border-radius: var(--hcgpt-radius-full); }
.hcgpt-guide-slot__label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center;
    font-size: 11.5px; font-weight: 600; color: #fff; padding: 16px 6px 6px;
    background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0)); }
.hcgpt-guide-rec-pill { display: inline-block; margin-left: 8px; vertical-align: middle; font-size: 10px; font-weight: 700;
    text-transform: none; letter-spacing: 0; color: #fff; background: var(--hcgpt-brand-gradient);
    border-radius: var(--hcgpt-radius-full); padding: 2px 8px; }
.hcgpt-guide-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 2px 0 var(--hcgpt-space-3); font-size: 13.5px; }
.hcgpt-guide-rule { display: flex; align-items: center; gap: var(--hcgpt-space-2); color: var(--hcgpt-color-text); }
.hcgpt-guide-rule--no { color: var(--hcgpt-color-text-muted); }
.hcgpt-guide-mk { width: 18px; height: 18px; flex: none; border-radius: var(--hcgpt-radius-full); display: grid; place-items: center; font-size: 11px; color: #fff; }
.hcgpt-guide-rule--ok .hcgpt-guide-mk { background: var(--hcgpt-success); }
.hcgpt-guide-rule--no .hcgpt-guide-mk { background: var(--hcgpt-danger); }
.hcgpt-guide-examples { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hcgpt-space-3); margin: 10px 0 4px; }
.hcgpt-guide-ex { border: 1px solid var(--hcgpt-color-border); border-radius: var(--hcgpt-radius-lg); overflow: hidden; background: var(--hcgpt-color-surface); }
.hcgpt-guide-ex__cap { display: flex; align-items: center; gap: 7px; padding: 8px 11px; font-size: 12.5px; font-weight: 600; }
.hcgpt-guide-ex--good .hcgpt-guide-ex__cap { color: var(--hcgpt-success); }
.hcgpt-guide-ex--bad .hcgpt-guide-ex__cap { color: var(--hcgpt-danger); }
.hcgpt-guide-ex__art { height: 92px; display: grid; place-items: center; background: var(--hcgpt-color-surface-2); border-top: 1px solid var(--hcgpt-color-border); }
.hcgpt-guide-tag { font-size: 10px; font-weight: 700; border-radius: var(--hcgpt-radius-full); padding: 1px 7px; color: #fff; }
.hcgpt-guide-tag--g { background: var(--hcgpt-success); }
.hcgpt-guide-tag--b { background: var(--hcgpt-danger); }

/* step 3 — cliente */
.hcgpt-guide-clientbar { display: flex; align-items: center; gap: var(--hcgpt-space-2); border: 1px solid var(--hcgpt-color-border);
    border-radius: var(--hcgpt-radius-full); padding: 7px 8px 7px 13px; background: var(--hcgpt-color-surface-2);
    font-size: 13.5px; font-weight: 600; margin: 4px 0 var(--hcgpt-space-3); }
.hcgpt-guide-clientbar__av { width: 26px; height: 26px; flex: none; border-radius: var(--hcgpt-radius-full); background: var(--hcgpt-brand-gradient);
    color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.hcgpt-guide-clientbar__chev { color: var(--hcgpt-color-text-muted); font-weight: 600; }
.hcgpt-guide-ctx { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 var(--hcgpt-space-3); }
.hcgpt-guide-chip { font-size: 12px; font-weight: 600; color: var(--hcgpt-color-text-muted); background: var(--hcgpt-color-surface);
    border: 1px solid var(--hcgpt-color-border); border-radius: var(--hcgpt-radius-full); padding: 4px 10px; }
.hcgpt-guide-chip b { color: var(--hcgpt-color-text); }

/* step 4 — formula */
.hcgpt-guide-out { border: 1px solid var(--hcgpt-color-border); border-radius: var(--hcgpt-radius-lg); overflow: hidden; margin: 4px 0 var(--hcgpt-space-3); }
.hcgpt-guide-out__h { padding: 9px 13px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    color: var(--hcgpt-color-text-muted); background: var(--hcgpt-color-surface-2); border-bottom: 1px solid var(--hcgpt-color-border); }
.hcgpt-guide-out__b { padding: 11px 13px; font-size: 13px; }
.hcgpt-guide-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--hcgpt-color-border); }
.hcgpt-guide-row:last-child { border-bottom: 0; }
.hcgpt-guide-row__k { color: var(--hcgpt-color-text-muted); }
.hcgpt-guide-row__v { font-weight: 600; text-align: right; color: var(--hcgpt-color-text); }
.hcgpt-guide-askchips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 2px; }
.hcgpt-guide-ac { font-size: 12px; font-weight: 600; color: #fff; background: var(--hcgpt-brand-gradient); border-radius: var(--hcgpt-radius-full); padding: 4px 11px; }

@media (max-width: 560px) {
    .hcgpt-guide-rules { grid-template-columns: 1fr; }
    .hcgpt-guide-examples { grid-template-columns: 1fr; }
}
