summary { cursor: pointer; }

.cs-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--cs-space-3);
    flex-wrap: wrap;
    margin-bottom: var(--cs-space-3);
}
.cs-page-head > div:first-child { min-width: 0; flex: 1; }
.cs-page-head > .btn,
.cs-page-head > .cs-record-actions,
.cs-page-head > a.btn {
    flex-shrink: 0;
    align-self: center;
}
.cs-page-title {
    font-size: var(--cs-fs-page);
    line-height: var(--cs-line-tight);
}
.cs-record-head {
    align-items: center;
}
.cs-record-actions,
.cs-comm-actions,
.cs-hero-actions,
.cs-dash-hero-side {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cs-gap-control);
    align-items: center;
}

.cs-icon-btn {
    width: var(--cs-icon-btn);
    height: var(--cs-icon-btn);
    min-width: var(--cs-icon-btn);
    min-height: var(--cs-icon-btn);
    padding: 0;
}
.cs-icon-btn .cs-icon {
    width: var(--cs-icon-md);
    height: var(--cs-icon-md);
}
.cs-icon-btn:focus-visible,
.cs-chip:focus-visible,
.cs-search-trigger:focus-visible,
.cs-qa-tile:focus-visible,
.cs-kpi:focus-visible {
    outline: none;
    box-shadow: var(--cs-focus);
}

.cs-chip {
    min-height: var(--cs-control-sm);
    height: auto;
    padding: 0 10px;
    line-height: var(--cs-line-ui);
}

.cs-clamp-1,
.cs-list-body strong,
.cs-chat-row strong,
.cs-chat-row .preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-qa-tile .cs-qa-label {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.dropdown-item,
.cs-popover a,
.cs-popover button.cs-menu-item,
.cs-cl-menu button {
    display: flex;
    align-items: center;
    min-height: var(--cs-control-md);
    gap: var(--cs-space-2);
    font-size: var(--cs-font-md);
    line-height: var(--cs-line-tight);
}

.flash,
.errors,
.cs-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--cs-space-2);
}

.cs-toast {
    display: flex;
    align-items: center;
    gap: var(--cs-space-2);
    min-height: var(--cs-control-lg);
    line-height: var(--cs-line-tight);
}
.cs-toast button { flex-shrink: 0; }

.cs-progress {
    height: 5px;
    border-radius: 999px;
}

.cs-mood-stat {
    width: 40px;
}
.cs-mood-stat > span[aria-hidden] {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    line-height: 1;
    font-size: 1.2rem;
}
.cs-mood-pop button {
    display: grid;
    place-items: center;
    line-height: 1;
}

.cs-dash-v2 .cs-kpi-label,
.cs-dash-v2 .cs-kpi-hint {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.cs-widget-title {
    min-height: var(--cs-control-sm);
    align-items: center;
}
.cs-widget-title h2 {
    font-size: var(--cs-font-md);
    line-height: var(--cs-line-tight);
}

.cs-nav-text,
.cs-brand-text,
.cs-account-name,
.cs-account-role {
    line-height: var(--cs-line-tight);
}

.cs-page-heading {
    line-height: var(--cs-line-tight);
}

.cs-search-trigger {
    min-height: var(--cs-icon-btn);
    height: var(--cs-icon-btn);
}

.cs-chat-actions {
    min-height: var(--cs-control-md);
}
.cs-chat-actions .btn,
.cs-chat-actions .cs-icon-btn {
    min-height: var(--cs-control-md);
}
.cs-chat-bubble {
    display: grid;
    gap: 2px;
}
.cs-chat-bubble time {
    margin-left: 0;
    justify-self: end;
}

.cs-bottom-nav a span,
.cs-bottom-nav button span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-local-nav a {
    min-height: var(--cs-control-md);
    line-height: 1;
}

.cs-command-item {
    min-height: var(--cs-row-h);
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    gap: var(--cs-gap-control);
}
.modal-footer {
    justify-content: flex-end;
    flex-wrap: wrap;
}
.modal-title {
    margin: 0;
    font-size: var(--cs-fs-title);
    line-height: var(--cs-line-tight);
}
.btn-close {
    width: var(--cs-icon-btn);
    height: var(--cs-icon-btn);
}

.auth-card .btn { width: 100%; min-height: var(--cs-control-lg); }
.auth-card h1 { line-height: var(--cs-line-tight); }

.cs-chat-lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--cs-radius-md);
}

.cs-meta {
    font-size: var(--cs-font-sm);
    line-height: var(--cs-line-tight);
    color: var(--cs-text-muted);
}

.d-flex.justify-content-between:has(> .cs-page-title),
.d-flex.justify-content-between:has(> h1) {
    align-items: center;
    gap: var(--cs-gap-control);
    flex-wrap: wrap;
}

.cs-page-head .btn,
.cs-cal-toolbar .btn,
.cs-dash-hero-side .btn {
    align-self: center;
}

.cs-chat-head .avatar {
    --cs-avatar-size: var(--cs-avatar-md);
}

.cs-duplicate-warning,
.cs-duplicate-live .cs-card {
    border-color: var(--cs-warning);
}

.cs-presence {
    width: var(--cs-presence);
    height: var(--cs-presence);
}

.cs-cl-check {
    margin-top: .2em;
}

.cs-inspector-head .btn,
.cs-inspector-foot .btn {
    min-height: var(--cs-control-sm);
}

.cs-file-row {
    min-height: var(--cs-control-md);
}

.cs-local-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cs-space-1);
    align-items: center;
}

.kanban-col [data-col-total] {
    text-align: right;
    font-size: var(--cs-font-sm);
    line-height: var(--cs-line-tight);
}

@media (max-width: 1023px) {
    .cs-page-heading {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

@media (max-width: 760px) {
    .cs-content { overflow-x: clip; }
    .cs-file-preview-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .cs-file-preview-head h2 { max-width: 100%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    .cs-kpi { transition: none; }
}

.cs-text-title {
    line-height: var(--cs-line-ui);
    overflow-wrap: break-word;
}
.cs-text-meta {
    font-size: var(--cs-font-xs);
    line-height: var(--cs-line-ui);
    color: var(--cs-text-muted);
}
.cs-stat-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1.2;
}

