/* =====================================================
   CorpoCoders — Component Primitives

   REQUIRES assets/site/css/site.css (tokens, base reset).
   Load order: site.css → components.css → <page>.css

   Prefix: .cc-*   (cards are .cs-slab / .cs-cell — see CLAUDE.md §1.5)

   Contents
      1. Buttons
      2. Badges
      3. Chips & tags
      4. Form controls
      5. Tabs
      6. Tables
      7. Modal / dialog
      8. Toasts
      9. Empty state
     10. Skeletons
     11. Pagination
===================================================== */


/* =========================
   1. BUTTONS
========================= */

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--cc-s-2);
    height: 42px;
    padding: 0 var(--cc-s-5);
    border: 1px solid transparent;
    border-radius: var(--cc-r-sm);
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--cc-t), border-color var(--cc-t), color var(--cc-t),
        box-shadow var(--cc-t), opacity var(--cc-t);
}

.cc-btn i {
    font-size: 1.15em;
}

.cc-btn-primary {
    background: var(--cc-grad);
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(15, 61, 222, .8);
}

.cc-btn-primary:hover {
    box-shadow: 0 12px 26px -10px rgba(15, 61, 222, .95);
}

.cc-btn-secondary {
    background: var(--cc-surface);
    border-color: var(--cc-border);
    color: var(--cc-tx-1);
}

.cc-btn-secondary:hover {
    border-color: var(--cc-border-str);
    background: var(--cc-surface-2);
}

.cc-btn-ghost {
    color: var(--cc-tx-2);
}

.cc-btn-ghost:hover {
    background: var(--cc-surface);
    color: var(--cc-tx-1);
}

.cc-btn-danger {
    background: var(--cc-danger);
    color: #fff;
}

.cc-btn-danger:hover {
    box-shadow: 0 10px 24px -12px rgba(220, 38, 38, .9);
}

/* Sizes */
.cc-btn-sm {
    height: 34px;
    padding: 0 var(--cc-s-4);
    font-size: 13px;
}

.cc-btn-lg {
    height: 50px;
    padding: 0 var(--cc-s-6);
    font-size: 15.5px;
}

.cc-btn-icon {
    width: 42px;
    padding: 0;
}

.cc-btn-icon.cc-btn-sm {
    width: 34px;
}

.cc-btn-icon.cc-btn-lg {
    width: 50px;
}

.cc-btn-block {
    display: flex;
    width: 100%;
}

/* States */
.cc-btn:disabled,
.cc-btn.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.cc-btn.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.cc-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    color: #fff;
    animation: cc-spin .6s linear infinite;
}

.cc-btn-secondary.is-loading::after,
.cc-btn-ghost.is-loading::after {
    color: var(--cc-tx-1);
}

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


/* =========================
   2. BADGES
========================= */

.cc-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--cc-s-1);
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.cc-badge-brand {
    background: rgba(0, 194, 255, .12);
    border-color: rgba(0, 194, 255, .3);
    color: var(--cc-brand-2);
}

.cc-badge-success {
    background: rgba(22, 163, 74, .12);
    border-color: rgba(22, 163, 74, .32);
    color: #22C55E;
}

.cc-badge-warning {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .32);
    color: #F59E0B;
}

.cc-badge-danger {
    background: rgba(220, 38, 38, .12);
    border-color: rgba(220, 38, 38, .32);
    color: #F87171;
}

.cc-badge-neutral {
    background: var(--cc-surface);
    border-color: var(--cc-border);
    color: var(--cc-tx-2);
}

/* Cyan and the lighter status colours fail contrast on white */
:root[data-theme="light"] .cc-badge-brand {
    color: var(--cc-brand-1);
    background: rgba(15, 61, 222, .08);
    border-color: rgba(15, 61, 222, .26);
}

:root[data-theme="light"] .cc-badge-success {
    color: #15803D;
}

:root[data-theme="light"] .cc-badge-warning {
    color: #B45309;
}

:root[data-theme="light"] .cc-badge-danger {
    color: #B91C1C;
}

.cc-badge-solid {
    border-color: transparent;
    color: #fff;
}

.cc-badge-solid.cc-badge-brand {
    background: var(--cc-grad);
}

.cc-badge-solid.cc-badge-success {
    background: var(--cc-success);
}

.cc-badge-solid.cc-badge-warning {
    background: var(--cc-warning);
}

.cc-badge-solid.cc-badge-danger {
    background: var(--cc-danger);
}

.cc-badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}


/* =========================
   3. CHIPS & TAGS
========================= */

/* Interactive filter chip — pill */
.cc-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--cc-s-2);
    height: 32px;
    padding: 0 var(--cc-s-3);
    border: 1px solid var(--cc-border);
    border-radius: 999px;
    background: var(--cc-surface);
    color: var(--cc-tx-2);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color var(--cc-t), border-color var(--cc-t), background var(--cc-t);
}

.cc-chip:hover {
    color: var(--cc-tx-1);
    border-color: var(--cc-border-str);
}

.cc-chip.is-active {
    border-color: rgba(0, 194, 255, .45);
    background: var(--cc-grad-soft);
    color: var(--cc-brand-2);
}

:root[data-theme="light"] .cc-chip.is-active {
    border-color: rgba(15, 61, 222, .4);
    color: var(--cc-brand-1);
}

.cc-chip-x {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-right: -4px;
    border: 0;
    border-radius: 50%;
    background: var(--cc-border);
    color: inherit;
    font-size: 11px;
    cursor: pointer;
}

.cc-chip-x:hover {
    background: var(--cc-danger);
    color: #fff;
}

/* Static mono tag — squared, matches .cs-tags */
.cc-tag {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid var(--cc-border);
    border-radius: 6px;
    color: var(--cc-tx-3);
    font-family: var(--cc-mono);
    font-size: 11.5px;
    line-height: 1.5;
    white-space: nowrap;
}


/* =========================
   4. FORM CONTROLS
========================= */

.cc-field {
    display: grid;
    gap: 7px;
}

.cc-label {
    color: var(--cc-tx-2);
    font-size: 13px;
    font-weight: 600;
}

.cc-req {
    color: var(--cc-danger);
}

.cc-input,
.cc-textarea,
.cc-select {
    width: 100%;
    padding: 0 var(--cc-s-4);
    height: 42px;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-r-sm);
    background: var(--cc-surface);
    color: var(--cc-tx-1);
    font-family: inherit;
    font-size: 14.5px;
    transition: border-color var(--cc-t), box-shadow var(--cc-t), background var(--cc-t);
}

.cc-textarea {
    height: auto;
    min-height: 108px;
    padding: var(--cc-s-3) var(--cc-s-4);
    line-height: 1.6;
    resize: vertical;
}

.cc-input::placeholder,
.cc-textarea::placeholder {
    color: var(--cc-tx-3);
}

.cc-input:focus,
.cc-textarea:focus,
.cc-select:focus {
    outline: none;
    border-color: var(--cc-brand-2);
    box-shadow: 0 0 0 3px rgba(0, 194, 255, .16);
}

:root[data-theme="light"] .cc-input:focus,
:root[data-theme="light"] .cc-textarea:focus,
:root[data-theme="light"] .cc-select:focus {
    border-color: var(--cc-brand-1);
    box-shadow: 0 0 0 3px rgba(15, 61, 222, .13);
}

.cc-input:disabled,
.cc-textarea:disabled,
.cc-select:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.cc-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: var(--cc-s-9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2394A3B8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--cc-s-4) center;
    cursor: pointer;
}

/* Invalid */
.cc-input.is-invalid,
.cc-textarea.is-invalid,
.cc-select.is-invalid {
    border-color: var(--cc-danger);
}

.cc-input.is-invalid:focus,
.cc-textarea.is-invalid:focus,
.cc-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .16);
}

.cc-hint {
    color: var(--cc-tx-3);
    font-size: 12.5px;
}

.cc-error {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #F87171;
    font-size: 12.5px;
}

:root[data-theme="light"] .cc-error {
    color: #B91C1C;
}

/* Input with a leading icon */
.cc-input-group {
    position: relative;
}

.cc-input-group i {
    position: absolute;
    top: 50%;
    left: var(--cc-s-4);
    transform: translateY(-50%);
    color: var(--cc-tx-3);
    font-size: 17px;
    pointer-events: none;
}

.cc-input-group .cc-input {
    padding-left: var(--cc-s-10);
}

/* Checkbox / radio */
.cc-check {
    display: inline-flex;
    align-items: center;
    gap: var(--cc-s-2);
    color: var(--cc-tx-2);
    font-size: 14px;
    cursor: pointer;
}

.cc-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    border: 1px solid var(--cc-border-str);
    border-radius: 5px;
    background: var(--cc-surface);
    cursor: pointer;
    transition: background var(--cc-t), border-color var(--cc-t);
}

.cc-check input[type="radio"] {
    border-radius: 50%;
}

.cc-check input:checked {
    border-color: transparent;
    background: var(--cc-grad);
}

.cc-check input[type="checkbox"]:checked {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 4.6 4 7.5 10 1.5'/%3E%3C/svg%3E"),
        var(--cc-grad);
    background-repeat: no-repeat;
    background-position: center;
}

.cc-check input[type="radio"]:checked {
    box-shadow: inset 0 0 0 3.5px var(--cc-bg);
}

/* Switch */
.cc-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--cc-s-3);
    color: var(--cc-tx-2);
    font-size: 14px;
    cursor: pointer;
}

.cc-switch input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 40px;
    height: 22px;
    flex: 0 0 40px;
    margin: 0;
    border: 1px solid var(--cc-border-str);
    border-radius: 999px;
    background: var(--cc-surface);
    cursor: pointer;
    transition: background var(--cc-t), border-color var(--cc-t);
}

.cc-switch input::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cc-tx-3);
    transform: translateY(-50%);
    transition: left var(--cc-t), background var(--cc-t);
}

.cc-switch input:checked {
    border-color: transparent;
    background: var(--cc-grad);
}

.cc-switch input:checked::after {
    left: 21px;
    background: #fff;
}


/* =========================
   5. TABS
========================= */

.cc-tabs {
    display: flex;
    gap: var(--cc-s-1);
    border-bottom: 1px solid var(--cc-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.cc-tabs::-webkit-scrollbar {
    display: none;
}

.cc-tab {
    padding: var(--cc-s-3) var(--cc-s-4);
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--cc-tx-2);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--cc-t), border-color var(--cc-t);
}

.cc-tab:hover {
    color: var(--cc-tx-1);
}

.cc-tab.is-active {
    color: var(--cc-tx-1);
    border-bottom-color: var(--cc-brand-2);
}

:root[data-theme="light"] .cc-tab.is-active {
    border-bottom-color: var(--cc-brand-1);
}

.cc-tab-panel {
    display: none;
    padding-top: var(--cc-s-5);
}

.cc-tab-panel.is-active {
    display: block;
}


/* =========================
   6. TABLES
========================= */

.cc-table-wrap {
    border: 1px solid var(--cc-border);
    overflow-x: auto;
}

.cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cc-table th {
    padding: var(--cc-s-4);
    border-bottom: 1px solid var(--cc-border);
    color: var(--cc-tx-3);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.cc-table td {
    padding: var(--cc-s-4);
    border-top: 1px solid var(--cc-border);
    color: var(--cc-tx-2);
}

.cc-table tbody tr {
    transition: background var(--cc-t);
}

.cc-table tbody tr:hover {
    background: var(--cc-surface);
}

.cc-table .cc-td-strong {
    color: var(--cc-tx-1);
    font-weight: 600;
}

.cc-table .cc-td-num {
    font-family: var(--cc-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
}


/* =========================
   7. MODAL / DIALOG
========================= */

.cc-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--cc-z-overlay);
    display: grid;
    place-items: center;
    padding: var(--cc-s-4);
    background: var(--cc-scrim);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--cc-t), visibility var(--cc-t);
}

.cc-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.cc-modal {
    position: relative;
    z-index: var(--cc-z-modal);
    width: min(560px, 100%);
    max-height: calc(100vh - var(--cc-s-8));
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-r-md);
    background: var(--cc-glass-solid);
    box-shadow: var(--cc-shadow);
    transform: translateY(10px) scale(.98);
    transition: transform var(--cc-t);
}

.cc-overlay.is-open .cc-modal {
    transform: none;
}

.cc-modal-sm {
    width: min(420px, 100%);
}

.cc-modal-lg {
    width: min(820px, 100%);
}

.cc-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--cc-s-4);
    padding: var(--cc-s-5) var(--cc-s-6);
    border-bottom: 1px solid var(--cc-border);
}

.cc-modal-head h3 {
    font-size: 1.06rem;
}

.cc-modal-head p {
    margin-top: 3px;
    color: var(--cc-tx-3);
    font-size: 13px;
}

.cc-modal-body {
    padding: var(--cc-s-6);
    overflow-y: auto;
}

.cc-modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--cc-s-2);
    padding: var(--cc-s-4) var(--cc-s-6);
    border-top: 1px solid var(--cc-border);
}

.cc-modal-x {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 0;
    border-radius: var(--cc-r-sm);
    background: none;
    color: var(--cc-tx-3);
    font-size: 18px;
    cursor: pointer;
    transition: background var(--cc-t), color var(--cc-t);
}

.cc-modal-x:hover {
    background: var(--cc-surface);
    color: var(--cc-tx-1);
}

/* Confirm dialog — icon + centred copy */
.cc-dialog {
    text-align: center;
    padding: var(--cc-s-7) var(--cc-s-6) var(--cc-s-6);
}

.cc-dialog-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto var(--cc-s-4);
    border-radius: 50%;
    background: rgba(220, 38, 38, .12);
    color: var(--cc-danger);
    font-size: 24px;
}

.cc-dialog h3 {
    font-size: 1.12rem;
}

.cc-dialog p {
    margin-top: var(--cc-s-2);
    color: var(--cc-tx-2);
    font-size: 14px;
}


/* =========================
   8. TOASTS
========================= */

.cc-toasts {
    position: fixed;
    right: var(--cc-s-5);
    bottom: var(--cc-s-5);
    z-index: var(--cc-z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--cc-s-2);
    max-width: calc(100vw - var(--cc-s-8));
    pointer-events: none;
}

.cc-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--cc-s-3);
    width: 340px;
    max-width: 100%;
    padding: var(--cc-s-3) var(--cc-s-4);
    border: 1px solid var(--cc-border);
    border-left: 3px solid var(--cc-tx-3);
    border-radius: var(--cc-r-sm);
    background: var(--cc-glass-solid);
    box-shadow: var(--cc-shadow);
    pointer-events: auto;
    animation: cc-toast-in .28s cubic-bezier(.2, .7, .3, 1);
}

.cc-toast.is-leaving {
    animation: cc-toast-out .22s ease forwards;
}

.cc-toast i {
    font-size: 18px;
    line-height: 1.35;
}

.cc-toast-body {
    flex: 1;
    min-width: 0;
}

.cc-toast-title {
    color: var(--cc-tx-1);
    font-size: 14px;
    font-weight: 600;
}

.cc-toast-msg {
    margin-top: 2px;
    color: var(--cc-tx-2);
    font-size: 13px;
}

.cc-toast-success {
    border-left-color: var(--cc-success);
}

.cc-toast-success i {
    color: var(--cc-success);
}

.cc-toast-error {
    border-left-color: var(--cc-danger);
}

.cc-toast-error i {
    color: var(--cc-danger);
}

.cc-toast-warning {
    border-left-color: var(--cc-warning);
}

.cc-toast-warning i {
    color: var(--cc-warning);
}

.cc-toast-info {
    border-left-color: var(--cc-brand-2);
}

.cc-toast-info i {
    color: var(--cc-brand-2);
}

@keyframes cc-toast-in {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
}

@keyframes cc-toast-out {
    to {
        opacity: 0;
        transform: translateX(16px);
    }
}


/* =========================
   9. EMPTY STATE
========================= */

.cc-empty {
    padding: var(--cc-s-11) var(--cc-s-6);
    text-align: center;
}

.cc-empty-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto var(--cc-s-5);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-r-md);
    background: var(--cc-surface-2);
    color: var(--cc-tx-3);
    font-size: 26px;
}

.cc-empty h3 {
    font-size: 1.08rem;
}

.cc-empty p {
    max-width: 42ch;
    margin: var(--cc-s-2) auto 0;
    color: var(--cc-tx-2);
    font-size: 14px;
}

.cc-empty-actions {
    display: flex;
    justify-content: center;
    gap: var(--cc-s-2);
    margin-top: var(--cc-s-5);
}


/* =========================
   10. SKELETONS
========================= */

.cc-skel {
    position: relative;
    border-radius: 6px;
    background: var(--cc-surface-2);
    overflow: hidden;
}

.cc-skel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--cc-glass-bg), transparent);
    transform: translateX(-100%);
    animation: cc-shimmer 1.4s infinite;
}

.cc-skel-text {
    height: 12px;
}

.cc-skel-text+.cc-skel-text {
    margin-top: var(--cc-s-2);
}

.cc-skel-title {
    height: 20px;
    width: 55%;
}

.cc-skel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.cc-skel-tile {
    width: 52px;
    height: 52px;
    border-radius: var(--cc-r-md);
}

.cc-skel-w-40 {
    width: 40%;
}

.cc-skel-w-60 {
    width: 60%;
}

.cc-skel-w-80 {
    width: 80%;
}

@keyframes cc-shimmer {
    to {
        transform: translateX(100%);
    }
}


/* =========================
   11. PAGINATION
========================= */

.cc-pager {
    display: flex;
    align-items: center;
    gap: var(--cc-s-1);
    flex-wrap: wrap;
}

.cc-pager-btn {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 var(--cc-s-2);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-r-sm);
    background: none;
    color: var(--cc-tx-2);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--cc-t), border-color var(--cc-t), background var(--cc-t);
}

.cc-pager-btn:hover:not(:disabled):not(.is-active) {
    border-color: var(--cc-border-str);
    color: var(--cc-tx-1);
    background: var(--cc-surface);
}

.cc-pager-btn.is-active {
    border-color: transparent;
    background: var(--cc-grad);
    color: #fff;
}

.cc-pager-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.cc-pager-gap {
    padding: 0 var(--cc-s-1);
    color: var(--cc-tx-3);
}

.cc-pager-info {
    color: var(--cc-tx-3);
    font-size: 13px;
}


/* =====================================================
   12. SLAB CARD SYSTEM  (.cs-*)

   The site-wide card language (CLAUDE.md §1.5). One connected frame, no
   gaps, 1px hairline dividers drawn per-cell via box-shadow (so the grid
   is correct at any column count with no nth-child rules), square corners,
   and a two-corner glow + bracket hover.

   The base primitive lives here so every page that loads components.css
   gets it. Page CSS adds grid variants and cell anatomy, and sets
   --cc-glow-size / --cc-corner-size to suit the cell height.

   NOTE: the approved coming-soon page keeps its own copy in coming-soon.css
   (it does not load this file); these rules are identical. When that page
   adopts the shared layout (Phase 1.1) its copy can be removed.

   Hover is colour + light only — never transform a cell, it tears the
   shared hairlines.
===================================================== */

.cs-slab {
    /* Declared on the slab so cells inherit the default; a variant's own
       declaration then wins regardless of source order. */
    --cc-glow-size: 230px;
    --cc-corner-size: 44px;

    display: grid;
    border: 1px solid var(--cc-border);
    overflow: hidden;
}

.cs-cell {
    position: relative;
    overflow: hidden;
    box-shadow:
        1px 0 0 var(--cc-border),
        0 1px 0 var(--cc-border);
    transition: background var(--cc-t);
}

.cs-cell:hover {
    background: var(--cc-surface);
}

/* Content sits above the glows — ::after is the last generated child, so
   without this it would paint over the copy. */
.cs-cell>* {
    position: relative;
    z-index: 1;
}

/* Corner glow — top-left cyan, bottom-right brand blue */
.cs-cell::before,
.cs-cell::after {
    content: '';
    position: absolute;
    z-index: 0;
    width: var(--cc-glow-size);
    height: var(--cc-glow-size);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s ease;
}

.cs-cell::before {
    top: calc(var(--cc-glow-size) / -2);
    left: calc(var(--cc-glow-size) / -2);
    background: radial-gradient(circle, rgba(0, 194, 255, .18), transparent 68%);
}

.cs-cell::after {
    right: calc(var(--cc-glow-size) / -2);
    bottom: calc(var(--cc-glow-size) / -2);
    background: radial-gradient(circle, rgba(15, 61, 222, .22), transparent 68%);
}

.cs-cell:hover::before,
.cs-cell:hover::after {
    opacity: 1;
}

/* Light mode gets the softest glow — the airy canvas needs only a hint. */
:root[data-theme="light"] .cs-cell::before {
    background: radial-gradient(circle, rgba(0, 194, 255, .12), transparent 70%);
}

:root[data-theme="light"] .cs-cell::after {
    background: radial-gradient(circle, rgba(15, 61, 222, .09), transparent 70%);
}

/* Corner brackets — cyan top-left, brand blue bottom-right */
.cs-corner {
    position: absolute;
    z-index: 2;
    width: var(--cc-corner-size);
    height: var(--cc-corner-size);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.cs-corner-tl {
    top: 0;
    left: 0;
    border-top: 2px solid var(--cc-brand-2);
    border-left: 2px solid var(--cc-brand-2);
}

.cs-corner-br {
    right: 0;
    bottom: 0;
    border-right: 2px solid var(--cc-brand-1);
    border-bottom: 2px solid var(--cc-brand-1);
}

.cs-cell:hover .cs-corner {
    opacity: 1;
}


/* =========================
   MOTION PREFERENCE
========================= */

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

    .cc-skel::after,
    .cc-btn.is-loading::after {
        animation: none;
    }

    .cc-toast {
        animation: none;
    }
}
