/* ==========================================
   CHADY COACH v1
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:Inter,Arial,sans-serif;
    background:#eef3f8;
    color:#1f2937;
}

#app{
    display:flex;
    min-height:100vh;
}

/* ==========================================
   SIDEBAR
========================================== */

.sidebar{
    width:260px;
    background:#0C447C;
    color:#fff;
    padding:30px 24px;
    flex-shrink:0;
}

.logo{
    margin-bottom:45px;
}

.logo h2{
    font-size:38px;
    line-height:1.05;
    margin-bottom:8px;
}

.logo small{
    opacity:.7;
    font-size:14px;
}

.sidebar nav{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.sidebar a{
    color:#fff;
    text-decoration:none;
    padding:14px 16px;
    border-radius:10px;
    transition:.2s;
    font-weight:500;
}

.sidebar a:hover,
.sidebar a.active{
    background:rgba(255,255,255,.16);
}

/* ==========================================
   MAIN
========================================== */

#main-content{
    flex:1;
    padding:40px;
    overflow:auto;
}

/* ==========================================
   HEADER
========================================== */

.dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:center;

    background:#fff;
    padding:28px;

    border-radius:18px;

    box-shadow:0 12px 28px rgba(0,0,0,.08);
}

.dashboard-header h1{
    font-size:38px;
    margin-bottom:8px;
}

.dashboard-header p{
    color:#64748b;
}

.status-badge{
    background:#22c55e;
    color:white;
    padding:10px 18px;
    border-radius:30px;
    font-weight:700;
}

/* ==========================================
   KPI CARDS
========================================== */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;

    margin-top:28px;
}

.stat-card{

    background:white;

    padding:24px;

    border-radius:18px;

    box-shadow:0 10px 24px rgba(0,0,0,.08);

}

.stat-card p{
    color:#64748b;
    margin-bottom:10px;
}

.stat-card h2{
    font-size:34px;
    margin-bottom:8px;
}

.stat-card span{
    color:#64748b;
    font-size:14px;
}

/* ==========================================
   MODULES
========================================== */

.section-title{

    margin-top:40px;
    margin-bottom:18px;

}

.section-title h2{

    font-size:28px;

    margin-bottom:6px;

}

.section-title p{

    color:#64748b;

}

.module-grid{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:22px;

}

.module-card{

    background:white;

    padding:28px;

    border-radius:18px;

    box-shadow:0 12px 28px rgba(0,0,0,.08);

}

.module-card h3{

    font-size:24px;

    margin-bottom:10px;

}

.module-card p{

    color:#64748b;

    line-height:1.6;

    margin-bottom:22px;

}

.module-card a{

    display:inline-block;

    text-decoration:none;

    color:white;

    background:#0C447C;

    padding:12px 20px;

    border-radius:10px;

    font-weight:700;

}

.module-card:hover{

    transform:translateY(-3px);

    transition:.2s;

}

/* ==========================================
   FORMS
========================================== */

.form-card{

    background:white;

    padding:30px;

    border-radius:18px;

    box-shadow:0 12px 28px rgba(0,0,0,.08);

    max-width:900px;

}

label{

    display:block;

    margin-top:18px;

    margin-bottom:8px;

    font-weight:700;

}

input,
select,
textarea{

    width:100%;

    padding:14px;

    border:1px solid #d1d5db;

    border-radius:10px;

    font-size:15px;

}

textarea{

    min-height:140px;

    resize:vertical;

}

button{

    margin-top:24px;

    background:#0C447C;

    color:white;

    border:none;

    padding:14px 24px;

    border-radius:10px;

    cursor:pointer;

    font-size:16px;

    font-weight:700;

}

/* ==========================================
   MOBILE
========================================== */

@media(max-width:1200px){

.stats-grid{

grid-template-columns:repeat(2,1fr);

}

.module-grid{

grid-template-columns:1fr;

}

}

@media(max-width:768px){

#app{

flex-direction:column;

}

.sidebar{

width:100%;

}

.stats-grid{

grid-template-columns:1fr;

}

.dashboard-header{

flex-direction:column;

align-items:flex-start;

gap:20px;

}

}

.primary-btn {
    background: #0C447C;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.table-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    text-align: left;
    padding: 16px;
    color: #475569;
    font-size: 14px;
}

td {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

tr:hover {
    background: #f8fafc;
}

.mxf-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 28px;
}

.case-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.table-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    text-align: left;
    padding: 16px;
    color: #475569;
    font-size: 14px;
}

td {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

tr:hover {
    background: #f8fafc;
}

@media(max-width:900px) {
    .mxf-layout {
        grid-template-columns: 1fr;
    }
}

.actions {
    white-space: nowrap;
}

.edit-btn,
.secondary-btn {
    display: inline-block;
    background: #e0f2fe;
    color: #075985;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 18px;
}

.delete-btn {
    background: #fee2e2;
    color: #991b1b;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
}


/* ==========================================
   STRATEGY ENGINE
   Page styles only. Keep markup in strategy.php.
========================================== */

#strategy-engine {
    max-width: 1100px;
    margin: 0 auto;
}

#strategy-engine .strategy-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

#strategy-engine .strategy-page-header h1 {
    margin: 0 0 8px;
    color: #102a4c;
    font-size: 32px;
    line-height: 1.15;
}

#strategy-engine .strategy-page-header p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

#strategy-engine .strategy-card {
    background: #ffffff;
    border: 1px solid #dce5ef;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(15, 42, 76, 0.08);
}

#strategy-engine .strategy-card h2 {
    margin: 0 0 10px;
    color: #102a4c;
    font-size: 22px;
}

#strategy-engine .strategy-card > p {
    margin: 0;
    max-width: 720px;
    color: #64748b;
    line-height: 1.65;
}

#strategy-engine .strategy-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

#strategy-engine .strategy-btn {
    margin-top: 0;
    background: #0C447C;
    color: #ffffff;
    border: 0;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#strategy-engine .strategy-btn:hover {
    background: #093963;
    box-shadow: 0 9px 18px rgba(12, 68, 124, 0.22);
    transform: translateY(-1px);
}

#strategy-engine .strategy-btn:focus-visible {
    outline: 3px solid rgba(56, 189, 248, 0.45);
    outline-offset: 3px;
}

#strategy-engine .strategy-divider {
    height: 1px;
    margin: 28px 0;
    border: 0;
    background: #e4ebf2;
}

#strategy-engine .strategy-results {
    min-height: 150px;
}

#strategy-engine .strategy-empty-state {
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 28px;
    border: 1px dashed #c9d7e5;
    border-radius: 12px;
    background: #f8fbfe;
    color: #64748b;
    text-align: center;
}

@media (max-width: 700px) {
    #strategy-engine .strategy-page-header {
        display: block;
    }

    #strategy-engine .strategy-card {
        padding: 20px;
    }

    #strategy-engine .strategy-page-header h1 {
        font-size: 28px;
    }
}

/* ==========================================
   WEEKLY GENERATOR COMMAND CENTER
   Page markup: pages/weekly.php
========================================== */

.wc-command-center {
        --wc-ink: #eaf4ff;
        --wc-muted: #95a8c0;
        --wc-line: rgba(139, 176, 222, .18);
        --wc-panel: rgba(11, 23, 47, .80);
        --wc-panel-strong: rgba(9, 18, 39, .94);
        --wc-cyan: #37d9ff;
        --wc-violet: #8d7bff;
        --wc-green: #46e3a1;
        --wc-amber: #ffc86b;
        --wc-rose: #ff7ca5;
        position: relative;
        min-height: calc(100vh - 80px);
        overflow: hidden;
        padding: 28px;
        border-radius: 24px;
        background:
            radial-gradient(circle at 12% 4%, rgba(55, 217, 255, .15), transparent 31%),
            radial-gradient(circle at 89% 2%, rgba(141, 123, 255, .18), transparent 33%),
            linear-gradient(140deg, #071225 0%, #0a1630 46%, #071024 100%);
        color: var(--wc-ink);
        isolation: isolate;
    }

    .wc-command-center::before,
    .wc-command-center::after {
        content: '';
        position: absolute;
        pointer-events: none;
        z-index: -1;
    }

    .wc-command-center::before {
        inset: 0;
        opacity: .34;
        background-image:
            linear-gradient(rgba(112, 179, 255, .07) 1px, transparent 1px),
            linear-gradient(90deg, rgba(112, 179, 255, .07) 1px, transparent 1px);
        background-size: 38px 38px;
        mask-image: linear-gradient(to bottom, #000, transparent 76%);
    }

    .wc-command-center::after {
        width: 360px;
        height: 360px;
        right: -150px;
        bottom: -160px;
        border-radius: 50%;
        background: rgba(55, 217, 255, .16);
        filter: blur(18px);
        animation: wcPulse 7s ease-in-out infinite;
    }

    .wc-command-center * { box-sizing: border-box; }
    .wc-command-center button,
    .wc-command-center input,
    .wc-command-center select { font: inherit; }

    .wc-topbar,
    .wc-hero,
    .wc-tabs,
    .wc-status-card,
    .wc-plan-card,
    .wc-panel,
    .wc-intelligence-card,
    .wc-history-row,
    .wc-empty-card,
    .wc-toast {
        border: 1px solid var(--wc-line);
        background: linear-gradient(145deg, rgba(16, 35, 67, .92), rgba(7, 17, 36, .80));
        box-shadow: inset 0 1px rgba(255,255,255,.035), 0 18px 42px rgba(0, 0, 0, .18);
        backdrop-filter: blur(18px);
    }

    .wc-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 12px 14px 12px 16px;
        border-radius: 15px;
    }

    .wc-brand-lockup,
    .wc-top-actions,
    .wc-tab-list,
    .wc-hero-badges,
    .wc-plan-meta,
    .wc-card-actions,
    .wc-filter-actions,
    .wc-status-row,
    .wc-mini-chip-row,
    .wc-history-meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 9px;
    }

    .wc-orb {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--wc-cyan);
        box-shadow: 0 0 0 5px rgba(55,217,255,.1), 0 0 22px rgba(55,217,255,.9);
        animation: wcBlink 2s ease-in-out infinite;
    }

    .wc-kicker,
    .wc-panel-kicker,
    .wc-micro-label,
    .wc-status-label,
    .wc-day-index,
    .wc-card-label,
    .wc-history-label {
        color: #89a7ca;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .14em;
        text-transform: uppercase;
    }

    .wc-brand-name {
        margin: 0;
        color: #f3f8ff;
        font-size: 15px;
        font-weight: 800;
        letter-spacing: .02em;
    }

    .wc-week-code {
        color: var(--wc-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .wc-button,
    .wc-ghost-button,
    .wc-icon-button,
    .wc-tab {
        border: 0;
        cursor: pointer;
        transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
    }

    .wc-button:hover,
    .wc-ghost-button:hover,
    .wc-icon-button:hover,
    .wc-tab:hover { transform: translateY(-1px); }

    .wc-button {
        min-height: 38px;
        padding: 9px 14px;
        border-radius: 10px;
        background: linear-gradient(135deg, #25ceff, #756dff);
        color: #071225;
        box-shadow: 0 8px 24px rgba(55, 217, 255, .25);
        font-size: 12px;
        font-weight: 900;
    }

    .wc-button:hover { box-shadow: 0 12px 32px rgba(55, 217, 255, .35); }

    .wc-ghost-button,
    .wc-icon-button {
        min-height: 38px;
        padding: 9px 12px;
        border: 1px solid rgba(150, 191, 239, .24);
        border-radius: 10px;
        background: rgba(13, 29, 57, .58);
        color: #c7ddf8;
        font-size: 12px;
        font-weight: 800;
    }

    .wc-icon-button { min-width: 38px; padding: 8px; }

    .wc-hero {
        display: block;
        margin-top: 18px;
        padding: 26px;
        border-radius: 20px;
    }

    .wc-hero h1 {
        max-width: none;
        width: 100%;
        margin: 6px 0 9px;
        color: #f7fbff;
        font-size: clamp(29px, 4.1vw, 48px);
        line-height: 1.03;
        letter-spacing: -.045em;
    }

    .wc-hero h1 span {
        display: inline-block;
        background: linear-gradient(96deg, #46e0ff 10%, #a194ff 64%, #ff8cb0 100%);
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        font-size: 1.16em;
        font-weight: 900;
        letter-spacing: -.06em;
    }

    .wc-hero p {
        max-width: 720px;
        margin: 0;
        color: #a9bbd0;
        font-size: 14px;
        line-height: 1.65;
    }

    .wc-badge,
    .wc-chip,
    .wc-case-chip,
    .wc-state-badge,
    .wc-marker,
    .wc-badge-dot {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    .wc-badge,
    .wc-chip {
        min-height: 27px;
        padding: 5px 9px;
        border: 1px solid rgba(158, 198, 247, .18);
        border-radius: 999px;
        background: rgba(25, 49, 85, .45);
        color: #bdcde0;
        font-size: 11px;
        font-weight: 800;
    }

    .wc-badge-live { color: #b7ffe0; border-color: rgba(70, 227, 161, .3); background: rgba(19, 107, 70, .18); }
    .wc-badge-preview { color: #ffd798; border-color: rgba(255, 200, 107, .26); background: rgba(124, 80, 17, .17); }

    .wc-side-intel {
        display: grid;
        align-content: center;
        gap: 11px;
        padding: 18px;
        border: 1px solid rgba(91, 161, 230, .18);
        border-radius: 16px;
        background: radial-gradient(circle at 100% 0%, rgba(73, 217, 255, .10), transparent 38%), rgba(4, 12, 29, .56);
    }

    .wc-side-intel h2 { margin: 0; color: #f3f8ff; font-size: 18px; }
    .wc-side-intel p { margin: 0; font-size: 12px; }

    .wc-side-intel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .wc-side-metric { padding: 11px; border: 1px solid rgba(143, 181, 228, .14); border-radius: 11px; background: rgba(15, 36, 67, .52); }
    .wc-side-metric strong { display: block; margin-top: 4px; color: #f5fbff; font-size: 18px; }

    .wc-tabs {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-top: 18px;
        padding: 8px;
        border-radius: 15px;
    }

    .wc-tab-list { gap: 7px; }

    .wc-tab {
        min-height: 36px;
        padding: 8px 11px;
        border-radius: 9px;
        background: transparent;
        color: #9eb4cc;
        font-size: 12px;
        font-weight: 800;
    }

    .wc-tab.is-active {
        background: linear-gradient(135deg, rgba(55,217,255,.18), rgba(141,123,255,.18));
        color: #eef9ff;
        box-shadow: inset 0 0 0 1px rgba(97, 220, 255, .2), 0 7px 18px rgba(21, 137, 209, .10);
    }

    .wc-week-range { color: #93acd0; font-size: 12px; font-weight: 800; }

    .wc-pane { display: none; margin-top: 18px; }
    .wc-pane.is-active { display: block; animation: wcFade .28s ease both; }

    .wc-planner-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 14px;
    }

    .wc-week-navigator,
    .wc-planner-toolbar-actions {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
    }

    .wc-planner-toolbar-actions {
        margin-left: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .wc-week-nav-button {
        display: inline-grid;
        width: 38px;
        min-width: 38px;
        padding: 0;
        place-items: center;
    }

    .wc-week-nav-button svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2.2;
    }

    .wc-week-nav-label {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 6px;
        min-width: 0;
    }

    .wc-week-nav-label span,
    .wc-week-nav-label small { color: var(--wc-muted); }
    .wc-week-nav-label strong { color: var(--wc-ink); }

    .wc-status-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 18px;
    }

    .wc-status-card {
        position: relative;
        overflow: hidden;
        min-height: 112px;
        padding: 15px;
        border-radius: 15px;
    }

    .wc-status-card::after {
        content: '';
        position: absolute;
        right: -24px;
        bottom: -27px;
        width: 100px;
        height: 100px;
        border: 1px solid rgba(91, 220, 255, .13);
        border-radius: 50%;
    }

    .wc-status-value { display: block; margin-top: 7px; color: #f5fbff; font-size: 25px; font-weight: 900; letter-spacing: -.04em; }
    .wc-status-note { display: block; margin-top: 4px; color: #8fa7c3; font-size: 11px; line-height: 1.35; }

    .wc-planner-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
    .wc-plan-list { display: grid; gap: 11px; }

    .wc-plan-card {
        position: relative;
        overflow: hidden;
        padding: 16px;
        border-radius: 15px;
    }

    .wc-plan-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(to bottom, var(--wc-cyan), var(--wc-violet));
        opacity: .82;
    }

    .wc-plan-card[data-state="approved"]::before { background: var(--wc-green); }
    .wc-plan-card[data-state="published"]::before { background: var(--wc-amber); }
    .wc-plan-card[data-state="solved"]::before { background: var(--wc-rose); }

    .wc-card-grid { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
    .wc-date-block { display: grid; gap: 3px; padding-top: 1px; }
    .wc-date-number { color: #eff7ff; font-size: 23px; font-weight: 900; letter-spacing: -.04em; }

    .wc-plan-card h3 { margin: 4px 0 5px; color: #f4f9ff; font-size: 17px; line-height: 1.25; }
    .wc-plan-card p { margin: 0; color: #98aec7; font-size: 12px; line-height: 1.55; }

    .wc-case-chip {
        max-width: 100%;
        margin-top: 10px;
        padding: 6px 8px;
        border: 1px solid rgba(57, 214, 255, .19);
        border-radius: 8px;
        background: rgba(9, 54, 87, .30);
        color: #bceeff;
        font-size: 11px;
        font-weight: 800;
    }

    .wc-case-chip strong { color: #f4fbff; }
    .wc-card-controls { display: grid; justify-items: end; gap: 8px; }

    .wc-state-badge {
        justify-content: center;
        min-width: 76px;
        min-height: 25px;
        padding: 5px 8px;
        border: 1px solid rgba(94, 207, 255, .22);
        border-radius: 999px;
        background: rgba(29, 94, 136, .18);
        color: #9eeaff;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .wc-plan-card[data-state="approved"] .wc-state-badge { border-color: rgba(70,227,161,.28); background: rgba(18,122,75,.18); color: #a8ffd5; }
    .wc-plan-card[data-state="published"] .wc-state-badge { border-color: rgba(255,200,107,.28); background: rgba(141,93,17,.18); color: #ffe0a4; }
    .wc-plan-card[data-state="solved"] .wc-state-badge { border-color: rgba(255,124,165,.28); background: rgba(131,23,64,.17); color: #ffc0d5; }

    .wc-card-actions { justify-content: flex-end; gap: 6px; }
    .wc-card-actions .wc-ghost-button { min-height: 31px; padding: 7px 9px; font-size: 10px; }
    .wc-card-actions .wc-button { min-height: 31px; padding: 7px 9px; font-size: 10px; }

    .wc-card-detail {
        display: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        margin-top: 13px;
        padding-top: 13px;
        border-top: 1px solid rgba(142, 177, 219, .13);
    }

    .wc-plan-card.is-expanded .wc-card-detail { display: grid; animation: wcFade .24s ease both; }
    .wc-detail-item { padding: 10px; border: 1px solid rgba(129, 167, 211, .14); border-radius: 10px; background: rgba(8, 23, 47, .42); }
    .wc-detail-item strong { display: block; margin-top: 5px; color: #d9eaff; font-size: 11px; line-height: 1.35; }

    .wc-side-stack { display: grid; gap: 12px; }
    .wc-panel { padding: 16px; border-radius: 15px; }
    .wc-panel h2 { margin: 4px 0 6px; color: #f5fbff; font-size: 16px; }
    .wc-panel p { margin: 0; color: #94aac3; font-size: 12px; line-height: 1.55; }
    .wc-panel-divider { margin: 14px 0; border: 0; border-top: 1px solid rgba(137, 175, 218, .14); }

    .wc-checklist { display: grid; gap: 9px; margin-top: 13px; }
    .wc-checkline { display: flex; gap: 8px; align-items: flex-start; color: #bdcee0; font-size: 11px; line-height: 1.45; }
    .wc-check { width: 17px; height: 17px; flex: 0 0 17px; border: 1px solid rgba(70,227,161,.4); border-radius: 5px; background: rgba(42, 173, 115, .15); color: #b6ffe1; text-align: center; font-size: 11px; line-height: 15px; }

    .wc-rule-grid { display: grid; gap: 9px; margin-top: 12px; }
    .wc-rule { padding: 10px; border-left: 2px solid var(--wc-violet); border-radius: 0 9px 9px 0; background: rgba(111, 86, 255, .08); color: #bbcae1; font-size: 11px; line-height: 1.48; }

    .wc-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
    .wc-filter-field { display: grid; gap: 5px; }
    .wc-filter-field label { color: #91a9c8; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
    .wc-filter-field input,
    .wc-filter-field select {
        min-height: 39px;
        width: 100%;
        padding: 8px 10px;
        border: 1px solid rgba(143, 183, 227, .2);
        border-radius: 9px;
        outline: none;
        background: rgba(7, 19, 40, .78);
        color: #dcecff;
        font-size: 12px;
    }

    .wc-filter-field input::placeholder { color: #7288a5; }
    .wc-filter-field input:focus,
    .wc-filter-field select:focus { border-color: rgba(55,217,255,.65); box-shadow: 0 0 0 3px rgba(55,217,255,.10); }

    .wc-history-list { display: grid; gap: 10px; margin-top: 15px; }
    .wc-history-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border-radius: 13px; }
    .wc-history-title { margin: 3px 0 0; color: #eaf4ff; font-size: 14px; font-weight: 800; }
    .wc-history-row p { margin: 4px 0 0; color: #91a8c2; font-size: 11px; line-height: 1.45; }

    .wc-empty-card { display: grid; place-items: center; min-height: 160px; margin-top: 15px; padding: 20px; border-radius: 14px; text-align: center; }
    .wc-empty-card[hidden] { display: none !important; }
    .wc-empty-card strong { display: block; color: #ecf6ff; font-size: 15px; }
    .wc-empty-card span { display: block; max-width: 520px; margin-top: 7px; color: #91a8c2; font-size: 12px; line-height: 1.55; }

    .wc-intelligence-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; }
    .wc-intelligence-card { padding: 16px; border-radius: 15px; }
    .wc-intelligence-card h2 { margin: 4px 0 6px; color: #f3f9ff; font-size: 17px; }
    .wc-intelligence-card p { margin: 0; color: #94abc4; font-size: 12px; line-height: 1.55; }

    .wc-coverage-ring { display: grid; place-items: center; width: 154px; height: 154px; margin: 18px auto; border-radius: 50%; background: conic-gradient(var(--wc-cyan) 0deg 140deg, var(--wc-violet) 140deg 235deg, rgba(125, 157, 199, .16) 235deg 360deg); box-shadow: 0 0 40px rgba(55,217,255,.16); }
    .wc-coverage-ring::before { content: '60D'; display: grid; place-items: center; width: 124px; height: 124px; border-radius: 50%; background: #0a1831; color: #ecf7ff; font-size: 23px; font-weight: 900; letter-spacing: -.05em; box-shadow: inset 0 0 18px rgba(0,0,0,.3); }

    .wc-case-table-wrap { overflow-x: auto; margin-top: 15px; }
    .wc-case-table { width: 100%; min-width: 720px; border-collapse: collapse; }
    .wc-case-table th { padding: 10px; border-bottom: 1px solid rgba(136, 177, 218, .16); color: #88a4c5; text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
    .wc-case-table td { padding: 12px 10px; border-bottom: 1px solid rgba(136, 177, 218, .11); color: #c5d7ea; font-size: 12px; vertical-align: middle; }
    .wc-case-table tr:last-child td { border-bottom: 0; }
    .wc-case-table tr.is-hidden { display: none; }
    .wc-case-id { color: #8feaff; font-weight: 900; }
    .wc-case-title { color: #f0f7ff; font-weight: 800; }
    .wc-coverage-tag { padding: 4px 7px; border: 1px solid rgba(141,123,255,.22); border-radius: 999px; background: rgba(97,72,206,.13); color: #c9c0ff; font-size: 10px; font-weight: 900; }

    .wc-toast {
        position: fixed;
        right: 24px;
        bottom: 24px;
        z-index: 30;
        width: min(360px, calc(100vw - 48px));
        padding: 13px 15px;
        border-radius: 12px;
        color: #d9f7ff;
        font-size: 12px;
        line-height: 1.45;
        opacity: 0;
        pointer-events: none;
        transform: translateY(18px);
        transition: opacity .24s ease, transform .24s ease;
    }

    .wc-toast.is-visible { opacity: 1; transform: translateY(0); }

    @keyframes wcBlink { 50% { opacity: .45; transform: scale(.85); } }
    @keyframes wcPulse { 50% { transform: scale(1.13); opacity: .6; } }
    @keyframes wcFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

    @media (max-width: 1180px) {
        .wc-hero, .wc-planner-layout, .wc-intelligence-layout { grid-template-columns: 1fr; }
        .wc-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .wc-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 820px) {
        .wc-command-center { padding: 17px; border-radius: 16px; }
        .wc-topbar, .wc-tabs { align-items: flex-start; flex-direction: column; }
        .wc-top-actions { width: 100%; }
        .wc-top-actions .wc-button, .wc-top-actions .wc-ghost-button { flex: 1; }
        .wc-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .wc-card-grid { grid-template-columns: 58px minmax(0, 1fr); }
        .wc-card-controls { grid-column: 1 / -1; justify-items: start; }
        .wc-card-actions { justify-content: flex-start; }
        .wc-card-detail { grid-template-columns: 1fr; }
        .wc-history-row { grid-template-columns: 1fr; }
    }

    @media (max-width: 520px) {
        .wc-hero { padding: 19px; }
        .wc-status-grid, .wc-side-stack, .wc-filter-grid { grid-template-columns: 1fr; }
        .wc-tab-list { width: 100%; }
        .wc-tab { flex: 1; }
        .wc-week-range { width: 100%; }
    }

/* Weekly page utility variants moved out of inline markup. */
.wc-command-center .wc-hero-badges--spaced {
    margin-top: 15px;
}

.wc-command-center .wc-button--full {
    width: 100%;
}

.wc-command-center .wc-ghost-button--stacked {
    width: 100%;
    margin-top: 8px;
}

.wc-command-center .wc-filter-grid--spaced {
    margin-top: 16px;
}

.wc-command-center .wc-history-empty--hidden {
    display: none;
}

.wc-command-center .wc-filter-grid--history {
    margin-top: 15px;
    grid-template-columns: minmax(0, 1fr) 190px 160px;
}

/* ==========================================
   CHADY COACH COMMAND CENTER SIDEBAR
========================================== */

.cc-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    width: 286px;
    min-height: 100vh;
    padding: 24px 16px 18px;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(52, 196, 255, .22), transparent 31%),
        radial-gradient(circle at 92% 20%, rgba(127, 92, 255, .20), transparent 27%),
        linear-gradient(180deg, #071d37 0%, #092846 48%, #061827 100%);
    box-shadow: 18px 0 46px rgba(9, 31, 56, .12);
}

.cc-sidebar::before,
.cc-sidebar::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.cc-sidebar::before {
    top: 106px;
    right: -82px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(108, 211, 255, .16);
    border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(79, 156, 255, .025), 0 0 50px rgba(80, 179, 255, .12);
}

.cc-sidebar::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, rgba(5, 12, 28, .24));
}

.cc-sidebar-brand,
.cc-sidebar-nav,
.cc-sidebar-footer {
    position: relative;
    z-index: 1;
}

.cc-sidebar-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 27px;
    padding: 4px 5px 18px;
    border-bottom: 1px solid rgba(166, 214, 255, .16);
}

.cc-sidebar-logo {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #f6fbff !important;
    text-decoration: none;
}

.cc-sidebar-logo:hover {
    background: transparent !important;
}

.cc-sidebar-logo-mark {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    border: 1px solid rgba(111, 225, 255, .46);
    border-radius: 12px;
    background:
        linear-gradient(145deg, rgba(55, 214, 255, .28), rgba(135, 107, 255, .25)),
        rgba(8, 32, 58, .78);
    box-shadow: 0 0 0 4px rgba(69, 212, 255, .06), 0 0 23px rgba(56, 197, 255, .26);
    color: #e8fbff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -.05em;
}

.cc-sidebar-logo-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.cc-sidebar-logo-copy strong {
    overflow: hidden;
    color: #f8fcff;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-sidebar-logo-copy small {
    overflow: hidden;
    color: #93b5d4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.cc-sidebar-version {
    margin-top: 3px;
    padding: 5px 7px;
    border: 1px solid rgba(132, 188, 234, .21);
    border-radius: 999px;
    background: rgba(5, 20, 40, .40);
    color: #b3cae3;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cc-sidebar-nav {
    display: grid !important;
    gap: 22px !important;
    overflow: auto;
    padding: 0 4px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 202, 255, .26) transparent;
}

.cc-sidebar-group {
    display: grid;
    gap: 5px;
}

.cc-sidebar-group-label {
    display: block;
    margin: 0 8px 4px;
    color: #6fa0c9;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.cc-sidebar-link {
    position: relative;
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 43px;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 9px 10px !important;
    border: 1px solid transparent;
    border-radius: 11px !important;
    background: transparent !important;
    color: #c9dbed !important;
    font-size: 13px;
    font-weight: 750 !important;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.cc-sidebar-link:hover {
    transform: translateX(2px);
    border-color: rgba(113, 207, 255, .18);
    background: rgba(52, 122, 181, .18) !important;
    color: #f5fbff !important;
}

.cc-sidebar-link.is-active {
    border-color: rgba(82, 225, 255, .33);
    background:
        linear-gradient(100deg, rgba(56, 215, 255, .20), rgba(111, 104, 255, .16)),
        rgba(10, 55, 96, .68) !important;
    box-shadow: inset 0 0 0 1px rgba(96, 218, 255, .07), 0 8px 24px rgba(5, 18, 42, .20), 0 0 24px rgba(56, 206, 255, .12);
    color: #ffffff !important;
}

.cc-sidebar-link.is-active::before {
    content: '';
    position: absolute;
    left: -5px;
    width: 3px;
    height: 24px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(#55e5ff, #a28aff);
    box-shadow: 0 0 15px rgba(70, 220, 255, .75);
}

.cc-sidebar-link-icon {
    display: grid;
    width: 24px;
    height: 24px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(126, 187, 236, .15);
    border-radius: 8px;
    background: rgba(8, 31, 57, .40);
    color: #83dff5;
    font-size: 13px;
    transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.cc-sidebar-link-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
}

.cc-sidebar-link-icon::before {
    content: none !important;
}

.cc-sidebar-link:hover .cc-sidebar-link-icon,
.cc-sidebar-link.is-active .cc-sidebar-link-icon {
    border-color: rgba(103, 228, 255, .31);
    background: rgba(17, 82, 132, .34);
    color: #e2faff;
    box-shadow: 0 0 14px rgba(55, 207, 255, .13);
}

.cc-sidebar-link-icon::before {
    display: block;
    line-height: 1;
}

.cc-sidebar-link[data-nav-icon="grid"] .cc-sidebar-link-icon::before { content: '⌘'; }
.cc-sidebar-link[data-nav-icon="spark"] .cc-sidebar-link-icon::before { content: '✦'; }
.cc-sidebar-link[data-nav-icon="bolt"] .cc-sidebar-link-icon::before { content: 'ϟ'; }
.cc-sidebar-link[data-nav-icon="build"] .cc-sidebar-link-icon::before { content: '◈'; }
.cc-sidebar-link[data-nav-icon="case"] .cc-sidebar-link-icon::before { content: '▣'; }
.cc-sidebar-link[data-nav-icon="signal"] .cc-sidebar-link-icon::before { content: '⌁'; }
.cc-sidebar-link[data-nav-icon="check"] .cc-sidebar-link-icon::before { content: '✓'; }
.cc-sidebar-link[data-nav-icon="chart"] .cc-sidebar-link-icon::before { content: '↗'; }
.cc-sidebar-link[data-nav-icon="settings"] .cc-sidebar-link-icon::before { content: '◌'; }

.cc-sidebar-link-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-sidebar-footer {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 11px 12px;
    border: 1px solid rgba(113, 195, 239, .15);
    border-radius: 11px;
    background: rgba(4, 18, 37, .42);
    color: #92b7d6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
}

.cc-sidebar-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #51e7a6;
    box-shadow: 0 0 0 4px rgba(81, 231, 166, .10), 0 0 14px rgba(81, 231, 166, .68);
    animation: ccStatusPulse 2s ease-in-out infinite;
}

@keyframes ccStatusPulse {
    50% { transform: scale(.76); opacity: .58; }
}

@media (max-width: 900px) {
    .cc-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        padding: 15px;
    }

    .cc-sidebar::before,
    .cc-sidebar::after {
        display: none;
    }

    .cc-sidebar-brand {
        margin-bottom: 13px;
        padding-bottom: 13px;
    }

    .cc-sidebar-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px !important;
        padding-bottom: 0;
        overflow: visible;
    }

    .cc-sidebar-group {
        gap: 4px;
    }

    .cc-sidebar-group-label {
        margin-left: 2px;
    }

    .cc-sidebar-footer {
        display: none;
    }
}

@media (max-width: 640px) {
    .cc-sidebar-nav {
        grid-template-columns: 1fr;
    }

    .cc-sidebar-link {
        min-height: 40px;
    }
}

/* ==========================================
   STRATEGY INTELLIGENCE
   Markup lives in pages/strategy.php.
========================================== */

#strategy-intelligence {
    position: relative;
    max-width: 1440px;
    min-height: calc(100vh - 80px);
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(73, 166, 227, .20);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 8%, rgba(117, 87, 255, .18), transparent 25%),
        radial-gradient(circle at 8% 30%, rgba(35, 204, 255, .13), transparent 28%),
        linear-gradient(135deg, #07182d 0%, #0a2340 52%, #10194b 100%);
    box-shadow: 0 20px 52px rgba(3, 15, 33, .24);
    color: #dcecff;
}

#strategy-intelligence::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(115, 201, 255, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(115, 201, 255, .18) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

#strategy-intelligence > * {
    position: relative;
    z-index: 1;
}

.si-topbar,
.si-hero,
.si-tabbar,
.si-panel,
.si-stat-card,
.si-action-card {
    border: 1px solid rgba(111, 189, 242, .19);
    background: rgba(5, 24, 49, .72);
    box-shadow: inset 0 1px 0 rgba(210, 245, 255, .03), 0 14px 34px rgba(0, 6, 22, .17);
}

.si-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    margin-bottom: 14px;
    padding: 12px 15px;
    border-radius: 15px;
}

.si-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.si-orb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #45e5ff;
    box-shadow: 0 0 0 5px rgba(69, 229, 255, .10), 0 0 18px rgba(69, 229, 255, .78);
}

.si-kicker,
.si-label {
    color: #7cb9e8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.si-title-small {
    margin: 2px 0 0;
    color: #f4faff;
    font-size: 14px;
    font-weight: 850;
}

.si-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(95, 237, 182, .28);
    border-radius: 999px;
    background: rgba(61, 197, 144, .11);
    color: #9ff0c7;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.si-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr);
    gap: 26px;
    align-items: center;
    margin-bottom: 14px;
    padding: 26px;
    border-radius: 18px;
}

.si-hero h1 {
    max-width: 780px;
    margin: 7px 0 10px;
    color: #f6fbff;
    font-size: clamp(31px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.si-hero h1 .si-accent {
    background: linear-gradient(90deg, #51defe, #a890ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.si-hero p {
    max-width: 720px;
    margin: 0;
    color: #9ab6d1;
    font-size: 14px;
    line-height: 1.65;
}

.si-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.si-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border: 1px solid rgba(117, 201, 249, .24);
    border-radius: 999px;
    background: rgba(23, 86, 137, .22);
    color: #bce5ff;
    font-size: 10px;
    font-weight: 850;
}

.si-badge.is-green {
    border-color: rgba(90, 239, 174, .25);
    background: rgba(41, 182, 125, .12);
    color: #a7f3cc;
}

.si-command-card {
    padding: 18px;
    border: 1px solid rgba(92, 204, 255, .22);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(7, 34, 64, .88), rgba(10, 24, 57, .80));
}

.si-command-card h2 {
    margin: 4px 0 7px;
    color: #ecf8ff;
    font-size: 17px;
}

.si-command-card p {
    margin: 0 0 14px;
    color: #92acc7;
    font-size: 12px;
    line-height: 1.55;
}

.si-open-weekly {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 9px;
    background: linear-gradient(105deg, #27c9ee, #7280ff);
    box-shadow: 0 10px 24px rgba(45, 185, 252, .20);
    color: #04152b;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.si-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    padding: 8px;
    border-radius: 13px;
}

.si-tab {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #9ebbd8;
    font-size: 12px;
    font-weight: 800;
}

.si-tab.is-active {
    border-color: rgba(91, 211, 255, .30);
    background: rgba(34, 115, 178, .33);
    box-shadow: 0 0 18px rgba(42, 188, 255, .11);
    color: #f2fbff;
}

.si-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 14px;
}

.si-stat-card {
    min-height: 112px;
    padding: 16px;
    border-radius: 14px;
}

.si-stat-card strong {
    display: block;
    margin-top: 7px;
    color: #f6fbff;
    font-size: 30px;
    letter-spacing: -.04em;
}

.si-stat-card p {
    margin: 4px 0 0;
    color: #8daac5;
    font-size: 11px;
    line-height: 1.45;
}

.si-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
    gap: 14px;
}

.si-panel {
    padding: 18px;
    border-radius: 15px;
}

.si-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.si-panel h2 {
    margin: 4px 0 0;
    color: #eff9ff;
    font-size: 18px;
}

.si-panel-header p,
.si-panel > p {
    margin: 5px 0 0;
    color: #94afc9;
    font-size: 12px;
    line-height: 1.5;
}

.si-list {
    display: grid;
    gap: 9px;
}

.si-list-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 59px;
    padding: 10px 11px;
    border: 1px solid rgba(100, 177, 234, .15);
    border-radius: 10px;
    background: rgba(8, 38, 71, .48);
}

.si-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #53dcff;
    box-shadow: 0 0 12px rgba(83, 220, 255, .65);
}

.si-list-dot.is-warning {
    background: #ffbe5d;
    box-shadow: 0 0 12px rgba(255, 190, 93, .50);
}

.si-list-dot.is-purple {
    background: #a992ff;
    box-shadow: 0 0 12px rgba(169, 146, 255, .55);
}

.si-list-item strong,
.si-list-item span {
    display: block;
}

.si-list-item strong {
    color: #eaf6ff;
    font-size: 12px;
}

.si-list-item span {
    margin-top: 3px;
    color: #89a8c2;
    font-size: 11px;
    line-height: 1.45;
}

.si-list-meta {
    color: #7ccdf4 !important;
    font-size: 10px !important;
    font-weight: 900;
    letter-spacing: .05em;
    text-align: right;
    text-transform: uppercase;
}

.si-action-stack {
    display: grid;
    gap: 10px;
}

.si-action-card {
    padding: 14px;
    border-radius: 12px;
}

.si-action-card h3 {
    margin: 5px 0 5px;
    color: #edf8ff;
    font-size: 14px;
}

.si-action-card p {
    margin: 0;
    color: #91adc7;
    font-size: 12px;
    line-height: 1.55;
}

.si-action-card .si-mini-link {
    display: inline-flex;
    margin-top: 10px;
    color: #72dfff;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.si-empty-note {
    margin: 0;
    padding: 13px;
    border: 1px dashed rgba(110, 186, 235, .24);
    border-radius: 10px;
    background: rgba(9, 35, 66, .38);
    color: #98b4cd;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 1120px) {
    .si-hero,
    .si-dashboard-grid { grid-template-columns: 1fr; }

    .si-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    #strategy-intelligence { padding: 16px; border-radius: 16px; }
    .si-topbar, .si-panel-header { align-items: flex-start; flex-direction: column; }
    .si-hero { padding: 20px; }
    .si-stats-grid { grid-template-columns: 1fr; }
    .si-list-item { grid-template-columns: 8px minmax(0, 1fr); }
    .si-list-meta { grid-column: 2; text-align: left; }
}

/* ==========================================
   WEEKLY GENERATOR — REVIEW / SUGGESTIONS FIX
   Matches pages/weekly.php + assets/js/weekly.js.
========================================== */

/* Stop the app-wide form spacing from pushing every Weekly Generator control down. */
.wc-command-center button,
.wc-command-center input,
.wc-command-center select,
.wc-command-center textarea {
    margin-top: 0;
    font-family: inherit;
}

.wc-command-center button:disabled,
.wc-command-center a[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .52;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* The page uses <label class="wc-filter-field">, not a label inside the field. */
.wc-command-center label.wc-filter-field {
    margin: 0;
    font-weight: 400;
}

.wc-command-center .wc-filter-field > span {
    color: #91a9c8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.wc-command-center .wc-hero-actions {
    justify-content: flex-start;
    margin-top: 18px;
}

.wc-command-center .wc-empty-actions {
    justify-content: center;
    margin-top: 18px;
}

.wc-command-center .wc-busy-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 13px 0 0;
    color: #9be9ff;
    font-size: 12px;
    font-weight: 800;
}

.wc-command-center .wc-busy-label::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--wc-cyan);
    box-shadow: 0 0 0 4px rgba(55, 217, 255, .10), 0 0 14px rgba(55, 217, 255, .72);
    animation: wcBlink 1.35s ease-in-out infinite;
}

.wc-command-center .wc-busy-label[hidden] {
    display: none !important;
}

.wc-command-center .wc-case-count-note {
    margin-top: 12px;
    color: #8fa9c5;
    font-size: 11px;
    line-height: 1.5;
}

/* Declined is a live revision state, not a dead-end or a destructive action. */
.wc-command-center .wc-plan-card[data-state="declined"]::before {
    background: #ffc86b;
}

.wc-command-center .wc-plan-card[data-state="declined"] .wc-state-badge {
    border-color: rgba(255, 200, 107, .32);
    background: rgba(145, 91, 15, .20);
    color: #ffe0a4;
}

/* The expanded content area contains one full-width review panel plus content details. */
.wc-command-center .wc-card-detail {
    align-items: start;
}

.wc-command-center .wc-review-panel {
    display: grid;
    grid-column: 1 / -1;
    gap: 10px;
    padding: 15px;
    border-color: rgba(96, 218, 255, .28);
    background:
        radial-gradient(circle at 100% 0%, rgba(75, 214, 255, .10), transparent 42%),
        linear-gradient(145deg, rgba(12, 48, 82, .78), rgba(7, 24, 49, .84));
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 10px 24px rgba(0, 0, 0, .12);
}

.wc-command-center .wc-review-panel .wc-card-label,
.wc-command-center .wc-review-input,
.wc-command-center .wc-review-hint,
.wc-command-center .wc-review-actions {
    grid-column: 1 / -1;
}

.wc-command-center .wc-review-input {
    display: block;
    width: 100%;
    min-height: 118px;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid rgba(139, 193, 244, .27);
    border-radius: 10px;
    outline: none;
    background: rgba(4, 17, 36, .80);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    color: #e4f2ff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.58;
    resize: vertical;
}

.wc-command-center .wc-review-input::placeholder {
    color: #6f89a7;
    opacity: 1;
}

.wc-command-center .wc-review-input:hover {
    border-color: rgba(112, 209, 255, .46);
}

.wc-command-center .wc-review-input:focus {
    border-color: rgba(55, 217, 255, .82);
    box-shadow: 0 0 0 3px rgba(55, 217, 255, .13), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.wc-command-center .wc-review-hint {
    color: #91acc8;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.45;
}

.wc-command-center .wc-review-actions {
    justify-content: flex-end;
    gap: 8px;
    margin: 2px 0 0;
}

.wc-command-center .wc-review-actions .wc-button,
.wc-command-center .wc-review-actions .wc-ghost-button {
    min-height: 38px;
    margin: 0;
    padding: 9px 13px;
    font-size: 11px;
}

/* Decline means "save these requested changes." Make that obvious without using a delete style. */
.wc-command-center [data-weekly-decline] {
    border-color: rgba(255, 200, 107, .38);
    background: rgba(117, 77, 18, .20);
    color: #ffd996;
}

.wc-command-center [data-weekly-decline]:hover {
    border-color: rgba(255, 216, 141, .72);
    background: rgba(149, 96, 20, .34);
    box-shadow: 0 8px 18px rgba(106, 67, 13, .20);
    color: #fff0cb;
}

.wc-command-center [data-weekly-regenerate-day] {
    background: linear-gradient(135deg, #36d8ff, #8875ff);
    color: #061329;
    box-shadow: 0 9px 22px rgba(82, 187, 255, .27);
}

.wc-command-center [data-weekly-regenerate-day]:hover {
    box-shadow: 0 13px 29px rgba(105, 154, 255, .38);
}

.wc-command-center [data-weekly-toggle-review] {
    border-color: rgba(141, 123, 255, .30);
    color: #d5cdff;
}

.wc-command-center [data-weekly-toggle-review]:hover {
    border-color: rgba(174, 159, 255, .55);
    background: rgba(104, 79, 207, .18);
    color: #eeeaff;
}

/* Keep every compact action button compact, despite the global button rule above. */
.wc-command-center .wc-top-actions .wc-button,
.wc-command-center .wc-top-actions .wc-ghost-button,
.wc-command-center .wc-card-actions .wc-button,
.wc-command-center .wc-card-actions .wc-ghost-button,
.wc-command-center .wc-tabs .wc-tab,
.wc-command-center .wc-panel .wc-button,
.wc-command-center .wc-panel .wc-ghost-button {
    margin-top: 0;
}

@media (max-width: 820px) {
    .wc-command-center .wc-review-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .wc-command-center .wc-review-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .wc-command-center .wc-review-actions .wc-button,
    .wc-command-center .wc-review-actions .wc-ghost-button {
        width: 100%;
    }
}

/* ==========================================
   WEEKLY GENERATOR — DESKTOP WIDTH FIX
   The left sidebar reduces usable page width. At normal laptop widths,
   the detail grid must collapse before the browser reaches mobile size.
========================================== */
.wc-command-center .wc-detail-item {
    min-width: 0;
    overflow-wrap: anywhere;
}

.wc-command-center .wc-detail-item strong,
.wc-command-center .wc-detail-item span {
    overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
    .wc-command-center .wc-card-detail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .wc-command-center .wc-card-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .wc-command-center .wc-card-grid {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .wc-command-center .wc-card-controls {
        grid-column: 1 / -1;
        justify-items: start;
    }

    .wc-command-center .wc-card-actions {
        justify-content: flex-start;
    }
}

/* ==========================================
   WEEKLY GENERATOR — TRUE CONTENT-WIDTH FIX
   The browser can be wide while the planner is narrow because the
   permanent sidebar and workflow panel consume space. Use two columns
   by default and only open three columns on very wide screens.
========================================== */
.wc-command-center .wc-card-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1750px) {
    .wc-command-center .wc-card-detail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .wc-command-center .wc-card-detail {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =========================================================
   MASTER MIND — SHARED WORKFLOW / PROGRESS UI
   Used by all modules that run multi-step tasks.
   Markup belongs in page files. JS changes state only.
========================================================= */

.mm-progress {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(121, 190, 245, .20);
    border-radius: 16px;
    background:
        radial-gradient(circle at 92% 4%, rgba(55, 217, 255, .10), transparent 32%),
        rgba(8, 22, 45, .72);
    color: #eaf4ff;
}

.mm-progress[hidden] {
    display: none !important;
}

.mm-progress__header,
.mm-progress__stage-head,
.mm-progress__stage-meta,
.mm-progress__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mm-progress__eyebrow,
.mm-progress__stage-label,
.mm-progress__stage-state {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mm-progress__eyebrow,
.mm-progress__stage-label {
    color: #8db2d6;
}

.mm-progress__title {
    margin: 3px 0 0;
    color: #f6fbff;
    font-size: 16px;
    font-weight: 850;
}

.mm-progress__list {
    display: grid;
    gap: 8px;
}

.mm-progress__stage {
    overflow: hidden;
    border: 1px solid rgba(121, 190, 245, .14);
    border-radius: 12px;
    background: rgba(11, 31, 59, .60);
}

.mm-progress__stage-head {
    min-height: 48px;
    padding: 11px 13px;
}

.mm-progress__stage-toggle {
    display: grid;
    width: 100%;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.mm-progress__stage-number {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid rgba(109, 195, 255, .24);
    border-radius: 50%;
    background: rgba(30, 76, 122, .38);
    color: #a8dfff;
    font-size: 10px;
    font-weight: 900;
}

.mm-progress__stage-name {
    overflow: hidden;
    color: #eaf4ff;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mm-progress__stage-state {
    color: #91a9c4;
}

.mm-progress__stage-log {
    display: none;
    max-height: 220px;
    overflow: auto;
    padding: 0 13px 12px 46px;
    color: #afc3da;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.mm-progress__stage.is-expanded .mm-progress__stage-log {
    display: block;
}

.mm-progress__stage[data-state="running"] {
    border-color: rgba(55, 217, 255, .36);
    box-shadow: 0 0 24px rgba(55, 217, 255, .09);
}

.mm-progress__stage[data-state="running"] .mm-progress__stage-number {
    border-color: rgba(91, 231, 255, .70);
    background: rgba(22, 157, 193, .30);
    box-shadow: 0 0 14px rgba(55, 217, 255, .38);
    color: #eaffff;
}

.mm-progress__stage[data-state="running"] .mm-progress__stage-state {
    color: #77eaff;
}

.mm-progress__stage[data-state="complete"] .mm-progress__stage-number {
    border-color: rgba(82, 227, 161, .55);
    background: rgba(24, 129, 85, .24);
    color: #c5ffe4;
}

.mm-progress__stage[data-state="complete"] .mm-progress__stage-state {
    color: #9cf1c8;
}

.mm-progress__stage[data-state="error"] {
    border-color: rgba(255, 124, 165, .38);
}

.mm-progress__stage[data-state="error"] .mm-progress__stage-number {
    border-color: rgba(255, 124, 165, .60);
    background: rgba(145, 33, 76, .25);
    color: #ffd2e1;
}

.mm-progress__stage[data-state="error"] .mm-progress__stage-state {
    color: #ffb0c8;
}

.mm-progress__footer {
    color: #92a9c2;
    font-size: 11px;
}

.mm-progress__meter {
    width: min(180px, 40%);
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(149, 190, 234, .14);
}

.mm-progress__meter > span {
    display: block;
    width: var(--mm-progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #37d9ff, #8d7bff);
    box-shadow: 0 0 16px rgba(55, 217, 255, .46);
    transition: width .25s ease;
}

/* =========================================================
   ACTIVITY MODULE — REFERRAL RELATIONSHIP SYSTEM
   Page markup: /pages/activity.php
   Behavior: /assets/js/activity.js
   All visual rules are scoped to #cc-activity.
========================================================= */

#cc-activity {
    --ca-ink: #edf7ff;
    --ca-muted: #9eb1c9;
    --ca-dim: #7389a5;
    --ca-line: rgba(145, 185, 233, .18);
    --ca-line-strong: rgba(83, 214, 255, .34);
    --ca-panel: rgba(10, 23, 48, .84);
    --ca-panel-deep: rgba(5, 14, 31, .92);
    --ca-cyan: #39dcff;
    --ca-violet: #9382ff;
    --ca-green: #58e0a9;
    --ca-amber: #ffcc72;
    --ca-rose: #ff88af;

    position: relative;
    min-height: calc(100vh - 80px);
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(73, 166, 227, .20);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 2%, rgba(54, 216, 255, .16), transparent 28%),
        radial-gradient(circle at 92% 0%, rgba(146, 126, 255, .17), transparent 31%),
        linear-gradient(142deg, #071224 0%, #091830 50%, #061024 100%);
    box-shadow: 0 20px 52px rgba(3, 15, 33, .25);
    color: var(--ca-ink);
    isolation: isolate;
}

#cc-activity::before,
#cc-activity::after {
    position: absolute;
    z-index: -1;
    content: '';
    pointer-events: none;
}

#cc-activity::before {
    inset: 0;
    opacity: .34;
    background-image:
        linear-gradient(rgba(116, 178, 255, .065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 178, 255, .065) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

#cc-activity::after {
    right: -150px;
    bottom: -160px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(54, 216, 255, .13);
    filter: blur(20px);
}

#cc-activity *,
#cc-activity *::before,
#cc-activity *::after {
    box-sizing: border-box;
}

#cc-activity button,
#cc-activity input,
#cc-activity select,
#cc-activity textarea {
    font: inherit;
}

#cc-activity [hidden] {
    display: none !important;
}

.ca-topbar,
.ca-hero,
.ca-tabs,
.ca-panel,
.ca-stat-card,
.ca-contact-result,
.ca-due-card,
.ca-history-card,
.ca-thread-card,
.ca-empty-state {
    border: 1px solid var(--ca-line);
    background: linear-gradient(145deg, rgba(17, 37, 70, .91), rgba(6, 17, 36, .83));
    box-shadow: inset 0 1px rgba(255,255,255,.035), 0 16px 38px rgba(0,0,0,.18);
    backdrop-filter: blur(18px);
}

.ca-topbar,
.ca-tabs,
.ca-panel-head,
.ca-form-actions,
.ca-filter-bar,
.ca-card-actions,
.ca-thread-head,
.ca-history-head,
.ca-sequence-row,
.ca-contact-lock {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ca-topbar {
    justify-content: space-between;
    padding: 12px 14px 12px 16px;
    border-radius: 15px;
}

.ca-brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ca-orb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ca-cyan);
    box-shadow: 0 0 0 5px rgba(57,220,255,.1), 0 0 22px rgba(57,220,255,.9);
}

.ca-kicker,
.ca-label,
.ca-field-label {
    color: #8faecf;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ca-brand-name {
    margin: 1px 0 0;
    color: #f4f9ff;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: .01em;
}

.ca-status-chip,
.ca-chip {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid rgba(158, 198, 247, .18);
    border-radius: 999px;
    background: rgba(25, 49, 85, .45);
    color: #bdcde0;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.ca-status-chip.is-live {
    border-color: rgba(88, 224, 169, .30);
    background: rgba(20, 112, 76, .18);
    color: #b9ffe1;
}

.ca-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
    gap: 20px;
    margin-top: 18px;
    padding: 26px;
    border-radius: 20px;
}

.ca-hero h1 {
    max-width: 740px;
    margin: 6px 0 10px;
    color: #f7fbff;
    font-size: clamp(30px, 4.1vw, 49px);
    line-height: 1.03;
    letter-spacing: -.045em;
}

.ca-hero h1 span {
    background: linear-gradient(96deg, #46e0ff 10%, #a194ff 64%, #ff8cb0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.ca-hero > div > p {
    max-width: 730px;
    margin: 0;
    color: #adbed2;
    font-size: 14px;
    line-height: 1.68;
}

.ca-hero-aside {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(91, 161, 230, .18);
    border-radius: 16px;
    background: radial-gradient(circle at 100% 0%, rgba(73, 217, 255, .10), transparent 38%), rgba(4, 12, 29, .56);
}

.ca-hero-aside h2 {
    margin: 2px 0 0;
    color: #f4f9ff;
    font-size: 18px;
}

.ca-hero-aside p {
    margin: 6px 0 0;
    color: #a7b9cf;
    font-size: 12px;
    line-height: 1.55;
}

.ca-stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.ca-stat-card {
    min-width: 0;
    padding: 11px;
    border-radius: 11px;
    background: rgba(15, 36, 67, .52);
}

.ca-stat-card strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #f5fbff;
    font-size: 18px;
    text-overflow: ellipsis;
}

.ca-tabs {
    justify-content: space-between;
    margin-top: 18px;
    padding: 8px;
    border-radius: 15px;
}

.ca-tab-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.ca-tab {
    min-height: 36px;
    padding: 8px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #9eb4cc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.ca-tab:hover {
    transform: translateY(-1px);
    color: #eff9ff;
}

.ca-tab.is-active {
    background: linear-gradient(135deg, rgba(55,217,255,.18), rgba(141,123,255,.18));
    color: #eff9ff;
    box-shadow: inset 0 0 0 1px rgba(97, 220, 255, .2), 0 7px 18px rgba(21, 137, 209, .10);
}

.ca-pane {
    display: none;
    margin-top: 18px;
}

.ca-pane.is-active {
    display: block;
}

.ca-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    gap: 16px;
}

.ca-panel {
    min-width: 0;
    padding: 18px;
    border-radius: 16px;
}

.ca-panel-head {
    justify-content: space-between;
    margin-bottom: 15px;
}

.ca-panel-title {
    margin: 3px 0 0;
    color: #f4f9ff;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -.02em;
}

.ca-panel-copy {
    max-width: 700px;
    margin: 7px 0 0;
    color: var(--ca-muted);
    font-size: 12px;
    line-height: 1.58;
}

.ca-step {
    display: grid;
    gap: 11px;
    padding-top: 3px;
}

.ca-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.ca-choice-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ca-choice {
    display: grid;
    min-height: 94px;
    align-content: start;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(146, 190, 240, .17);
    border-radius: 13px;
    background: rgba(10, 29, 57, .55);
    color: #c6d9ee;
    cursor: pointer;
    text-align: left;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.ca-choice:hover,
.ca-choice.is-selected {
    transform: translateY(-1px);
    border-color: rgba(82, 225, 255, .37);
    background: linear-gradient(135deg, rgba(55,217,255,.14), rgba(141,123,255,.13)), rgba(10, 29, 57, .67);
    box-shadow: 0 10px 24px rgba(5, 18, 42, .18);
}

.ca-choice strong {
    color: #f1f8ff;
    font-size: 13px;
}

.ca-choice span {
    color: #96afc9;
    font-size: 11px;
    line-height: 1.45;
}

.ca-form {
    display: grid;
    gap: 14px;
}

.ca-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ca-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.ca-field--wide {
    grid-column: 1 / -1;
}

.ca-field input,
.ca-field select,
.ca-field textarea,
.ca-contact-search,
.ca-filter-bar > input,
.ca-filter-bar > select {
    width: 100%;
    border: 1px solid rgba(146, 190, 240, .20);
    border-radius: 10px;
    outline: none;
    background: rgba(5, 18, 38, .62);
    color: #eff8ff;
    font-size: 13px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.ca-field input,
.ca-field select,
.ca-contact-search,
.ca-filter-bar > input,
.ca-filter-bar > select {
    min-height: 42px;
    padding: 10px 12px;
}

.ca-field textarea {
    min-height: 112px;
    padding: 11px 12px;
    resize: vertical;
}

.ca-field input:focus,
.ca-field select:focus,
.ca-field textarea:focus,
.ca-contact-search:focus,
.ca-filter-bar > input:focus,
.ca-filter-bar > select:focus {
    border-color: rgba(75, 219, 255, .62);
    background: rgba(8, 32, 61, .80);
    box-shadow: 0 0 0 4px rgba(55, 217, 255, .10);
}

.ca-field input::placeholder,
.ca-field textarea::placeholder,
.ca-contact-search::placeholder,
.ca-filter-bar > input::placeholder {
    color: #718ca9;
}

.ca-field select option,
.ca-filter-bar select option {
    background: #0d2342;
    color: #eff8ff;
}

.ca-contact-lock {
    justify-content: space-between;
    padding: 12px;
    border: 1px solid rgba(88, 224, 169, .22);
    border-radius: 12px;
    background: rgba(20, 108, 75, .15);
}

.ca-contact-lock > div {
    min-width: 0;
}

.ca-contact-lock strong {
    display: block;
    overflow: hidden;
    color: #e9fff5;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-contact-lock span {
    display: block;
    margin-top: 3px;
    color: #abd8c5;
    font-size: 11px;
    line-height: 1.4;
}

.ca-contact-lock small {
    color: #95c2ae;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.ca-button,
.ca-ghost-button,
.ca-danger-button {
    min-height: 39px;
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}

.ca-button:hover,
.ca-ghost-button:hover,
.ca-danger-button:hover,
.ca-contact-result:hover {
    transform: translateY(-1px);
}

.ca-button:disabled,
.ca-ghost-button:disabled,
.ca-danger-button:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none;
}

.ca-button {
    background: linear-gradient(135deg, #25ceff, #756dff);
    box-shadow: 0 8px 24px rgba(55, 217, 255, .25);
    color: #071225;
}

.ca-ghost-button {
    border-color: rgba(150, 191, 239, .24);
    background: rgba(13, 29, 57, .58);
    color: #c7ddf8;
}

.ca-danger-button {
    border-color: rgba(255, 136, 175, .26);
    background: rgba(143, 31, 75, .20);
    color: #ffd6e3;
}

.ca-form-actions {
    justify-content: flex-end;
    margin-top: 4px;
}

.ca-filter-bar {
    margin: 0 0 13px;
}

.ca-filter-bar > :first-child {
    flex: 1 1 210px;
}

.ca-filter-bar > select,
.ca-filter-bar > input[type="date"] {
    width: auto;
    min-width: 142px;
}

.ca-contact-list,
.ca-today-list,
.ca-history-list {
    display: grid;
    gap: 9px;
}

/* Contact selection in Step 1 is a compact type-ahead, not a full directory. */
.ca-contact-suggest-wrap {
    position: relative;
    z-index: 4;
}

.ca-contact-suggestions {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    max-height: 286px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid rgba(82, 225, 255, .30);
    border-radius: 0 0 12px 12px;
    background: rgba(7, 22, 45, .98);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .34);
}

/* Step 1 shows every existing Contact without requiring a typed search.
   The directory remains collapsed until Chady opens it. */
#cc-activity .ca-log-contact-browse {
    margin-top: 10px;
}

#cc-activity .ca-log-contact-browse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid rgba(150, 191, 239, .24);
    border-radius: 11px;
    background: rgba(13, 29, 57, .58);
    color: #c7ddf8;
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, background .16s ease;
}

#cc-activity .ca-log-contact-browse-toggle:hover,
#cc-activity .ca-log-contact-browse-toggle:focus-visible {
    border-color: rgba(82, 225, 255, .48);
    background: rgba(55, 217, 255, .09);
    outline: none;
}

#cc-activity .ca-log-contact-browse-toggle span {
    font-size: 12px;
    font-weight: 850;
}

#cc-activity .ca-log-contact-browse-toggle small {
    color: #9fc5e9;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

#cc-activity .ca-log-contact-browse-list {
    display: grid;
    gap: 8px;
    max-height: 318px;
    margin-top: 8px;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid rgba(82, 225, 255, .22);
    border-radius: 11px;
    background: rgba(7, 22, 45, .72);
}

#cc-activity .ca-log-contact-browse-list[hidden] {
    display: none;
}

.ca-contact-suggestion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, background .16s ease;
}

.ca-contact-suggestion:hover,
.ca-contact-suggestion:focus-visible {
    border-color: rgba(82, 225, 255, .32);
    outline: none;
    background: rgba(55, 217, 255, .10);
}

.ca-contact-suggestion > div {
    min-width: 0;
}

.ca-contact-suggestion strong {
    display: block;
    overflow: hidden;
    color: #f2f8ff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-contact-suggestion span {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #98aec7;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-contact-suggestion small {
    color: #b7cee7;
    font-size: 10px;
    font-weight: 850;
    text-align: right;
}

.ca-contact-suggestion-empty {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    color: #bdd4eb;
    font-size: 12px;
}

.ca-contact-suggestion-empty strong {
    color: #eef7ff;
    font-size: 12px;
}

.ca-contact-suggestion-empty span {
    color: #95abc4;
    font-size: 11px;
    line-height: 1.4;
}

.ca-create-contact-choice {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(82, 225, 255, .32);
    border-radius: 10px;
    color: inherit;
    background: rgba(55, 217, 255, .09);
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ca-create-contact-choice:hover,
.ca-create-contact-choice:focus-visible {
    border-color: rgba(82, 225, 255, .64);
    outline: none;
    background: rgba(55, 217, 255, .16);
    transform: translateY(-1px);
}

.ca-create-contact-choice strong {
    color: #effaff;
    font-size: 12px;
}

.ca-create-contact-choice span {
    color: #a6c4df;
    font-size: 11px;
    line-height: 1.4;
}

.ca-contact-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.ca-contact-result:hover,
.ca-contact-result.is-selected {
    border-color: rgba(82, 225, 255, .36);
    background: linear-gradient(135deg, rgba(55,217,255,.12), rgba(141,123,255,.11)), rgba(10, 29, 57, .72);
}

.ca-contact-result > div {
    min-width: 0;
}

.ca-contact-result strong {
    display: block;
    overflow: hidden;
    color: #f2f8ff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-contact-result span {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #98aec7;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-contact-result small {
    color: #b7cee7;
    font-size: 10px;
    font-weight: 850;
    text-align: right;
}

.ca-due-card {
    display: grid;
    gap: 11px;
    padding: 14px;
    border-radius: 13px;
}

.ca-due-card-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.ca-due-card-top > div {
    min-width: 0;
}

.ca-due-card strong {
    display: block;
    overflow: hidden;
    color: #f3f9ff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-due-card-top span {
    display: block;
    margin-top: 3px;
    color: #9db3ca;
    font-size: 11px;
    line-height: 1.45;
}

.ca-due-card-top small {
    flex: 0 0 auto;
    color: #ffc86b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}

.ca-due-card > p {
    margin: 0;
    color: #d4e6f7;
    font-size: 12px;
    line-height: 1.5;
}

.ca-card-actions {
    justify-content: flex-end;
}

.ca-detail-block {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.ca-detail-block h3 {
    margin: 0;
    color: #ddecff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ca-sequence-row {
    justify-content: space-between;
    padding: 12px;
    border: 1px solid rgba(145, 185, 233, .15);
    border-radius: 12px;
    background: rgba(7, 24, 49, .54);
}

.ca-sequence-row > div {
    min-width: 0;
}

.ca-sequence-row strong {
    display: block;
    color: #ecf7ff;
    font-size: 12px;
}

.ca-sequence-row span {
    display: block;
    margin-top: 3px;
    color: #93a9c2;
    font-size: 11px;
}

.ca-sequence-row small {
    color: #b9d6f3;
    font-size: 10px;
    font-weight: 850;
}

.ca-thread-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 13px;
}

.ca-thread-head {
    justify-content: space-between;
}

.ca-thread-head strong {
    color: #eff8ff;
    font-size: 12px;
    letter-spacing: .06em;
}

.ca-thread-head small {
    color: #99b2cd;
    font-size: 10px;
    font-weight: 850;
}

.ca-thread-entry {
    max-width: 92%;
    padding: 10px 11px;
    border: 1px solid rgba(145, 185, 233, .16);
    border-radius: 10px 10px 10px 3px;
    background: rgba(5, 19, 40, .62);
}

.ca-thread-entry.is-received {
    justify-self: end;
    border-color: rgba(85, 227, 176, .20);
    border-radius: 10px 10px 3px 10px;
    background: rgba(17, 91, 69, .20);
}

.ca-thread-meta {
    display: block;
    color: #91abca;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ca-thread-entry p {
    margin: 6px 0 0;
    color: #d8e9f9;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ca-history-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 13px;
}

.ca-history-head {
    justify-content: space-between;
}

.ca-history-head > div {
    min-width: 0;
}

.ca-history-head strong {
    display: block;
    overflow: hidden;
    color: #f1f8ff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-history-head span {
    display: block;
    margin-top: 3px;
    color: #9ab1ca;
    font-size: 11px;
    line-height: 1.4;
}

.ca-history-head small {
    flex: 0 0 auto;
    padding: 4px 7px;
    border: 1px solid rgba(144, 187, 237, .18);
    border-radius: 999px;
    color: #bcd3ec;
    font-size: 9px;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

.ca-history-message {
    margin: 0;
    padding: 10px 11px;
    border-left: 2px solid rgba(57, 220, 255, .46);
    border-radius: 0 9px 9px 0;
    background: rgba(7, 26, 53, .52);
    color: #d8e9f9;
    font-size: 12px;
    line-height: 1.58;
    white-space: pre-wrap;
}

.ca-history-detail {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid rgba(145, 185, 233, .13);
    border-radius: 10px;
    background: rgba(6, 20, 43, .45);
}

.ca-history-detail strong {
    color: #bde8fb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ca-history-detail span,
.ca-history-next {
    margin: 0;
    color: #b6c9dc;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.ca-history-next {
    color: #b6e6d2;
}

.ca-empty-state {
    display: grid;
    min-height: 150px;
    place-items: center;
    padding: 24px;
    border-radius: 14px;
    color: #95acc5;
    text-align: center;
}

.ca-empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: #eaf4ff;
    font-size: 14px;
}

.ca-empty-state span {
    display: block;
    max-width: 420px;
    color: #95acc5;
    font-size: 11px;
    line-height: 1.5;
}

.ca-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    max-width: min(430px, calc(100vw - 48px));
    padding: 13px 15px;
    border: 1px solid rgba(82, 225, 255, .30);
    border-radius: 12px;
    background: rgba(9, 29, 58, .97);
    box-shadow: 0 18px 46px rgba(0,0,0,.32);
    color: #eaf8ff;
    font-size: 12px;
    line-height: 1.45;
}

.ca-toast[data-variant="error"] {
    border-color: rgba(255, 136, 175, .52);
    color: #ffe1ea;
}

.ca-toast[data-variant="success"] {
    border-color: rgba(88, 224, 169, .42);
    color: #d7ffe9;
}

.cc-sidebar-link[data-nav-icon="activity"] .cc-sidebar-link-icon::before {
    content: '◉';
}

@media (max-width: 1260px) {
    .ca-choice-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    #cc-activity {
        padding: 22px;
    }

    .ca-hero,
    .ca-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ca-hero-aside {
        grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr);
        align-items: center;
    }
}

@media (max-width: 760px) {
    #cc-activity {
        min-height: auto;
        padding: 16px;
        border-radius: 16px;
    }

    .ca-topbar,
    .ca-tabs,
    .ca-panel-head,
    .ca-history-head,
    .ca-due-card-top {
        align-items: flex-start;
    }

    .ca-hero {
        padding: 20px;
    }

    .ca-choice-grid,
    .ca-choice-grid--four,
    .ca-field-grid,
    .ca-stat-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .ca-hero-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .ca-filter-bar > select,
    .ca-filter-bar > input[type="date"] {
        width: 100%;
    }

    .ca-form-actions {
        justify-content: stretch;
    }

    .ca-form-actions .ca-button,
    .ca-form-actions .ca-ghost-button,
    .ca-form-actions .ca-danger-button {
        width: 100%;
    }

    .ca-thread-entry {
        max-width: 100%;
    }
}


/* -------------------------------------------------------------------------
   ACTIVITY — CONTACT-FIRST LOG FLOW
   Person / Contact is intentionally the first visible required step.
   ------------------------------------------------------------------------- */
#cc-activity .ca-step--contact-first,
#cc-activity .ca-step--activity-type,
#cc-activity .ca-step--details {
    padding: 16px;
    border: 1px solid rgba(146, 190, 240, .14);
    border-radius: 14px;
    background: rgba(5, 18, 38, .24);
}

#cc-activity .ca-step--contact-first {
    border-color: rgba(82, 225, 255, .28);
    background: linear-gradient(135deg, rgba(55, 217, 255, .08), rgba(141, 123, 255, .06)), rgba(5, 18, 38, .32);
}

#cc-activity .ca-step--activity-type {
    margin-top: 2px;
}

#cc-activity .ca-choice:disabled {
    cursor: not-allowed;
    opacity: .46;
    transform: none;
}

#cc-activity .ca-choice:disabled:hover {
    border-color: rgba(146, 190, 240, .17);
    background: rgba(10, 29, 57, .55);
    box-shadow: none;
    transform: none;
}

#cc-activity .ca-new-contact-card {
    padding: 14px;
    border: 1px dashed rgba(82, 225, 255, .32);
    border-radius: 12px;
    background: rgba(8, 32, 61, .34);
}

#cc-activity .ca-new-contact-head {
    display: grid;
    gap: 5px;
    margin-bottom: 12px;
}

#cc-activity .ca-new-contact-head p {
    margin: 0;
    color: var(--ca-muted);
    font-size: 11px;
    line-height: 1.5;
}

/* Activity Hub contact-category model */
.ca-choice[hidden] { display: none !important; }
.ca-drop-warning { margin-top: 12px; border-color: rgba(196, 91, 46, .42); }
.ca-drop-warning strong { color: #b64a1d; }
.ca-rule { border: 0; border-top: 1px solid rgba(26, 38, 54, .12); margin: 24px 0; }
.ca-dialog { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 0; color: inherit; background: #fff; box-shadow: 0 24px 80px rgba(15, 28, 43, .28); }
.ca-dialog::backdrop { background: rgba(12, 20, 30, .5); }
.ca-dialog .ca-form { padding: 24px; }
.ca-dialog .ca-panel-head { margin-bottom: 16px; }
@media (max-width: 720px) {
    .ca-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Activity Hub v2: Contact Category is visible only inside the New Contact form. */
#cc-activity .ca-new-contact-card [data-activity-new-partner-fields],
#cc-activity .ca-new-contact-card [data-activity-new-client-fields] {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(146, 190, 240, .14);
}

#cc-activity .ca-tabs {
    display: flex !important;
    position: relative;
    z-index: 2;
}

#cc-activity .ca-tab {
    display: inline-flex;
}

#cc-activity .ca-pane[hidden] {
    display: none !important;
}

#cc-activity .ca-pane.is-active {
    display: block !important;
}

/* ACTIVITY HUB — OPTIONAL THREADS + ACTIVITY EDITING */
#cc-activity .ca-thread-origin-fields,
#cc-activity .ca-thread-picker {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(79, 203, 255, 0.2);
    border-radius: 12px;
    background: rgba(7, 25, 51, 0.44);
}

#cc-activity .ca-thread-match-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

#cc-activity .ca-thread-match {
    width: 100%;
    display: block;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid rgba(119, 161, 205, 0.28);
    border-radius: 10px;
    background: rgba(9, 28, 57, 0.72);
    color: inherit;
    cursor: pointer;
}

#cc-activity .ca-thread-match:hover,
#cc-activity .ca-thread-match.is-selected {
    border-color: rgba(61, 208, 255, 0.8);
    background: rgba(16, 62, 98, 0.55);
}

#cc-activity .ca-thread-match strong,
#cc-activity .ca-thread-match span,
#cc-activity .ca-thread-match small {
    display: block;
}

#cc-activity .ca-thread-match span {
    margin-top: 4px;
    color: rgba(217, 233, 255, 0.88);
    line-height: 1.45;
}

#cc-activity .ca-thread-match small {
    margin-top: 7px;
    color: rgba(152, 184, 220, 0.86);
}

#cc-activity .ca-editing-activity {
    margin-bottom: 16px;
    border-color: rgba(239, 186, 70, 0.62);
    background: rgba(83, 58, 12, 0.24);
}

#cc-activity .ca-thread-origin-copy {
    margin: 8px 0 6px;
    color: rgba(226, 238, 255, 0.92);
    line-height: 1.5;
}

#cc-activity .ca-thread-entry .ca-card-actions,
#cc-activity .ca-history-card .ca-card-actions {
    margin-top: 10px;
}

/* ============================================================================
   PAGE MODULE STYLES — MOVED FROM PAGE FILES
   Page markup no longer overrides global layout, type, or mobile rules.
   ============================================================================ */


/* ---------- build.php ---------- */
/*
     * Build From Idea visual shell.
     * Self-contained. No external CSS, routes, forms, or existing app logic changed.
     */
    #cc-build-from-idea {
        --cc-ink: #edf7ff;
        --cc-muted: #9bb0c8;
        --cc-line: rgba(142, 184, 230, .18);
        --cc-panel: rgba(10, 25, 52, .86);
        --cc-cyan: #37d9ff;
        --cc-violet: #8d7bff;
        --cc-green: #46e3a1;
        max-width: 1280px;
        min-height: 700px;
        margin: 0 auto;
        padding: clamp(20px, 3vw, 34px);
        overflow: hidden;
        border: 1px solid var(--cc-line);
        border-radius: 20px;
        color: var(--cc-ink);
        background:
            radial-gradient(circle at 8% 0%, rgba(55, 217, 255, .16), transparent 33%),
            radial-gradient(circle at 96% 12%, rgba(141, 123, 255, .18), transparent 31%),
            linear-gradient(145deg, #0e2143 0%, #09182f 52%, #061126 100%);
        box-shadow: 0 24px 72px rgba(2, 8, 24, .30);
        isolation: isolate;
    }

    #cc-build-from-idea * { box-sizing: border-box; }

    #cc-build-from-idea::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -2;
        pointer-events: none;
        opacity: .8;
        background-image:
            linear-gradient(rgba(127, 181, 238, .065) 1px, transparent 1px),
            linear-gradient(90deg, rgba(127, 181, 238, .065) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.88), transparent 90%);
    }

    #cc-build-from-idea::after {
        content: '';
        position: absolute;
        z-index: -1;
        right: -170px;
        bottom: -240px;
        width: 630px;
        height: 630px;
        border: 1px solid rgba(55, 217, 255, .15);
        border-radius: 50%;
        box-shadow:
            0 0 0 52px rgba(55, 217, 255, .022),
            0 0 0 104px rgba(141, 123, 255, .019),
            0 0 82px rgba(55, 217, 255, .10);
        pointer-events: none;
    }

    #cc-build-from-idea .cc-build-hero {
        position: relative;
        max-width: 860px;
        margin-bottom: 28px;
        padding: 4px 0 20px;
        border-bottom: 1px solid var(--cc-line);
    }

    #cc-build-from-idea .cc-build-hero::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 106px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--cc-cyan), var(--cc-violet));
        box-shadow: 0 0 18px rgba(55, 217, 255, .54);
    }

    #cc-build-from-idea .cc-eyebrow,
    #cc-build-from-idea .cc-card-label {
        display: block;
        color: #9ec6ed;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    #cc-build-from-idea .cc-eyebrow { margin-bottom: 10px; }

    #cc-build-from-idea h1 {
        max-width: 760px;
        margin: 0;
        color: #f4faff;
        font-size: clamp(31px, 4.5vw, 49px);
        line-height: .98;
        letter-spacing: -.055em;
    }

    #cc-build-from-idea .cc-build-hero p {
        max-width: 640px;
        margin: 13px 0 0;
        color: var(--cc-muted);
        font-size: 14px;
        line-height: 1.65;
    }

    #cc-build-from-idea .cc-build-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
        gap: 16px;
        align-items: stretch;
    }

    #cc-build-from-idea .cc-build-panel {
        position: relative;
        overflow: hidden;
        padding: 20px;
        border: 1px solid var(--cc-line);
        border-radius: 17px;
        background: linear-gradient(155deg, rgba(16, 38, 74, .90), rgba(8, 20, 43, .88));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 40px rgba(3, 10, 25, .18);
    }

    #cc-build-from-idea .cc-build-panel--main {
        min-height: 410px;
    }

    #cc-build-from-idea .cc-build-panel--main::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 170px;
        height: 170px;
        border-radius: 0 0 0 160px;
        background: radial-gradient(circle at 100% 0%, rgba(55, 217, 255, .13), transparent 68%);
        pointer-events: none;
    }

    #cc-build-from-idea .cc-build-panel--side {
        display: flex;
        flex-direction: column;
        min-height: 410px;
        background: linear-gradient(155deg, rgba(9, 24, 51, .92), rgba(5, 15, 34, .91));
    }

    #cc-build-from-idea .cc-panel-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 19px;
    }

    #cc-build-from-idea .cc-panel-heading h2 {
        margin: 5px 0 0;
        color: #f2f8ff;
        font-size: 21px;
        letter-spacing: -.025em;
    }

    #cc-build-from-idea .cc-ready {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 26px;
        padding: 5px 9px;
        border: 1px solid rgba(70, 227, 161, .24);
        border-radius: 999px;
        color: #c7ffe6;
        background: rgba(16, 107, 74, .18);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #cc-build-from-idea .cc-ready::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: var(--cc-green);
        box-shadow: 0 0 10px rgba(70, 227, 161, .8);
    }

    #cc-build-from-idea .cc-idea-window {
        position: relative;
        min-height: 218px;
        padding: 17px;
        border: 1px dashed rgba(142, 184, 230, .24);
        border-radius: 13px;
        background:
            linear-gradient(180deg, rgba(55, 217, 255, .025), transparent 42%),
            rgba(4, 15, 33, .48);
    }

    #cc-build-from-idea .cc-idea-window::before {
        content: '';
        position: absolute;
        right: 18px;
        bottom: 16px;
        width: 112px;
        height: 112px;
        border: 1px solid rgba(55, 217, 255, .13);
        border-radius: 50%;
        box-shadow:
            0 0 0 23px rgba(55, 217, 255, .018),
            0 0 0 46px rgba(141, 123, 255, .014);
        pointer-events: none;
    }

    #cc-build-from-idea .cc-idea-window p {
        position: relative;
        z-index: 1;
        max-width: 420px;
        margin: 0;
        color: #bfd0e3;
        font-size: 14px;
        line-height: 1.67;
    }

    #cc-build-from-idea .cc-idea-window strong {
        color: #f2f9ff;
    }

    #cc-build-from-idea .cc-build-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 18px;
    }

    #cc-build-from-idea .cc-primary-link,
    #cc-build-from-idea .cc-secondary-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 10px 15px;
        border: 1px solid transparent;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 900;
        text-decoration: none;
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    }

    #cc-build-from-idea .cc-primary-link {
        border-color: rgba(83, 204, 255, .38);
        color: #05152b;
        background: linear-gradient(135deg, var(--cc-cyan), var(--cc-violet));
        box-shadow: 0 12px 28px rgba(55, 217, 255, .22);
    }

    #cc-build-from-idea .cc-primary-link:hover {
        transform: translateY(-1px);
        box-shadow: 0 17px 34px rgba(55, 217, 255, .34);
    }

    #cc-build-from-idea .cc-secondary-link {
        border-color: rgba(142, 184, 230, .27);
        color: #d1e4f8;
        background: rgba(14, 36, 68, .52);
    }

    #cc-build-from-idea .cc-secondary-link:hover {
        transform: translateY(-1px);
        border-color: rgba(55, 217, 255, .48);
        color: #effaff;
        background: rgba(18, 53, 94, .66);
    }

    #cc-build-from-idea .cc-system-path {
        display: grid;
        gap: 10px;
        margin-top: auto;
    }

    #cc-build-from-idea .cc-path-step {
        display: grid;
        grid-template-columns: 31px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 11px;
        border: 1px solid rgba(142, 184, 230, .15);
        border-radius: 11px;
        background: rgba(6, 18, 39, .50);
    }

    #cc-build-from-idea .cc-path-number {
        display: grid;
        width: 31px;
        height: 31px;
        place-items: center;
        border: 1px solid rgba(55, 217, 255, .26);
        border-radius: 9px;
        color: #94eefe;
        background: rgba(55, 217, 255, .08);
        font-size: 11px;
        font-weight: 900;
    }

    #cc-build-from-idea .cc-path-step:nth-child(2) .cc-path-number {
        border-color: rgba(141, 123, 255, .30);
        color: #cbc4ff;
        background: rgba(141, 123, 255, .09);
    }

    #cc-build-from-idea .cc-path-step:nth-child(3) .cc-path-number {
        border-color: rgba(70, 227, 161, .28);
        color: #c5ffe6;
        background: rgba(70, 227, 161, .08);
    }

    #cc-build-from-idea .cc-path-step strong {
        display: block;
        margin: 1px 0 3px;
        color: #eff8ff;
        font-size: 12px;
    }

    #cc-build-from-idea .cc-path-step span {
        display: block;
        color: #90a6c2;
        font-size: 11px;
        line-height: 1.5;
    }

    #cc-build-from-idea .cc-note {
        margin: 15px 0 0;
        padding: 12px 13px;
        border-left: 2px solid var(--cc-violet);
        border-radius: 0 10px 10px 0;
        color: #bdcce1;
        background: rgba(111, 86, 255, .08);
        font-size: 12px;
        line-height: 1.58;
    }

    @media (max-width: 880px) {
        #cc-build-from-idea { min-height: 0; }
        #cc-build-from-idea .cc-build-layout { grid-template-columns: 1fr; }
        #cc-build-from-idea .cc-build-panel--main,
        #cc-build-from-idea .cc-build-panel--side { min-height: 0; }
    }

    @media (max-width: 560px) {
        #cc-build-from-idea { padding: 18px; border-radius: 15px; }
        #cc-build-from-idea .cc-build-panel { padding: 16px; }
        #cc-build-from-idea .cc-panel-heading { align-items: flex-start; flex-direction: column; }
        #cc-build-from-idea .cc-primary-link,
        #cc-build-from-idea .cc-secondary-link { width: 100%; }
    }


/* ---------- dashboard.php ---------- */
/*
     * Chady Coach Dashboard
     * Self-contained visual rebuild. No external CSS or JavaScript.
     */
    #cc-dashboard {
        --db-ink: #edf7ff;
        --db-muted: #9bb0c8;
        --db-line: rgba(142, 184, 230, .18);
        --db-cyan: var(--cc-ui-accent, #37d9ff);
        --db-violet: var(--cc-ui-accent-2, #8d7bff);
        --db-glow: var(--cc-ui-glow, rgba(55, 217, 255, .16));
        --db-green: #46e3a1;
        --db-amber: #ffc86b;
        max-width: 1280px;
        min-height: 720px;
        margin: 0 auto;
        padding: clamp(20px, 3vw, 34px);
        overflow: hidden;
        border: 1px solid var(--db-line);
        border-radius: 20px;
        color: var(--db-ink);
        background:
            radial-gradient(circle at 8% 0%, var(--db-glow), transparent 33%),
            radial-gradient(circle at 96% 12%, rgba(141, 123, 255, .18), transparent 31%),
            linear-gradient(145deg, #0e2143 0%, #09182f 52%, #061126 100%);
        box-shadow: 0 24px 72px rgba(2, 8, 24, .30);
        isolation: isolate;
    }

    #cc-dashboard * {
        box-sizing: border-box;
    }

    #cc-dashboard::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -2;
        pointer-events: none;
        opacity: .8;
        background-image:
            linear-gradient(rgba(127, 181, 238, .065) 1px, transparent 1px),
            linear-gradient(90deg, rgba(127, 181, 238, .065) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.88), transparent 90%);
    }

    #cc-dashboard::after {
        content: '';
        position: absolute;
        z-index: -1;
        right: -170px;
        bottom: -235px;
        width: 625px;
        height: 625px;
        border: 1px solid rgba(55, 217, 255, .15);
        border-radius: 50%;
        box-shadow:
            0 0 0 52px rgba(55, 217, 255, .022),
            0 0 0 104px rgba(141, 123, 255, .019),
            0 0 82px rgba(55, 217, 255, .10);
        pointer-events: none;
    }

    #cc-dashboard .db-hero {
        position: relative;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 27px;
        padding: 4px 0 20px;
        border-bottom: 1px solid var(--db-line);
    }

    #cc-dashboard .db-hero::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 106px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--db-cyan), var(--db-violet));
        box-shadow: 0 0 18px rgba(55, 217, 255, .54);
    }

    #cc-dashboard .db-eyebrow,
    #cc-dashboard .db-card-label,
    #cc-dashboard .db-flow-label {
        display: block;
        color: #9ec6ed;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    #cc-dashboard .db-eyebrow {
        margin-bottom: 10px;
    }

    #cc-dashboard h1 {
        margin: 0;
        color: #f4faff;
        font-size: clamp(31px, 4.5vw, 49px);
        line-height: .98;
        letter-spacing: -.055em;
    }

    #cc-dashboard .db-hero p {
        max-width: 700px;
        margin: 13px 0 0;
        color: var(--db-muted);
        font-size: 14px;
        line-height: 1.65;
    }

    #cc-dashboard .db-system-live {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 31px;
        margin-bottom: 2px;
        padding: 7px 11px;
        border: 1px solid rgba(70, 227, 161, .24);
        border-radius: 999px;
        color: #c7ffe6;
        background: rgba(16, 107, 74, .18);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #cc-dashboard .db-system-live::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--db-green);
        box-shadow: 0 0 11px rgba(70, 227, 161, .85);
    }

    #cc-dashboard .db-metrics {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 29px;
    }

    #cc-dashboard .db-metric {
        position: relative;
        min-height: 146px;
        overflow: hidden;
        padding: 17px;
        border: 1px solid var(--db-line);
        border-radius: 15px;
        background: linear-gradient(155deg, rgba(16, 38, 74, .90), rgba(8, 20, 43, .88));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 14px 34px rgba(3, 10, 25, .16);
    }

    #cc-dashboard .db-metric::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, var(--db-cyan), transparent 75%);
        opacity: .9;
    }

    #cc-dashboard .db-metric:nth-child(2)::before {
        background: linear-gradient(90deg, var(--db-violet), transparent 75%);
    }

    #cc-dashboard .db-metric:nth-child(3)::before {
        background: linear-gradient(90deg, var(--db-green), transparent 75%);
    }

    #cc-dashboard .db-metric:nth-child(4)::before {
        background: linear-gradient(90deg, var(--db-amber), transparent 75%);
    }

    #cc-dashboard .db-metric p {
        margin: 0;
        color: #a8bed6;
        font-size: 11px;
        font-weight: 850;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    #cc-dashboard .db-metric strong {
        display: block;
        margin: 14px 0 7px;
        color: #f5fbff;
        font-size: clamp(29px, 3vw, 37px);
        line-height: 1;
        letter-spacing: -.04em;
    }

    #cc-dashboard .db-metric span {
        display: block;
        color: #90a8c2;
        font-size: 12px;
        line-height: 1.45;
    }

    #cc-dashboard .db-section-heading {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        margin: 0 0 14px;
    }

    #cc-dashboard .db-section-heading h2 {
        margin: 5px 0 0;
        color: #f3faff;
        font-size: 23px;
        letter-spacing: -.035em;
    }

    #cc-dashboard .db-section-heading p {
        max-width: 510px;
        margin: 0;
        color: #9db2cb;
        font-size: 12px;
        line-height: 1.55;
        text-align: right;
    }

    #cc-dashboard .db-module-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    #cc-dashboard .db-module {
        position: relative;
        display: flex;
        flex-direction: column;
        min-height: 218px;
        overflow: hidden;
        padding: 20px;
        border: 1px solid var(--db-line);
        border-radius: 17px;
        background: linear-gradient(155deg, rgba(16, 38, 74, .90), rgba(8, 20, 43, .88));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 40px rgba(3, 10, 25, .18);
    }

    #cc-dashboard .db-module:nth-child(2n) {
        background: linear-gradient(155deg, rgba(9, 24, 51, .92), rgba(5, 15, 34, .91));
    }

    #cc-dashboard .db-module::before {
        content: '';
        position: absolute;
        top: -51px;
        right: -49px;
        width: 172px;
        height: 172px;
        border: 1px solid rgba(55, 217, 255, .15);
        border-radius: 50%;
        box-shadow: 0 0 0 26px rgba(55, 217, 255, .018);
        pointer-events: none;
    }

    #cc-dashboard .db-module:nth-child(2)::before,
    #cc-dashboard .db-module:nth-child(4)::before {
        border-color: rgba(141, 123, 255, .18);
        box-shadow: 0 0 0 26px rgba(141, 123, 255, .018);
    }

    #cc-dashboard .db-module-topline {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    #cc-dashboard .db-module h3 {
        margin: 7px 0 0;
        color: #f1f9ff;
        font-size: 22px;
        letter-spacing: -.032em;
    }

    #cc-dashboard .db-module-state {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 24px;
        padding: 4px 8px;
        border: 1px solid rgba(55, 217, 255, .22);
        border-radius: 999px;
        color: #c8f8ff;
        background: rgba(19, 112, 142, .16);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #cc-dashboard .db-module-state::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--db-cyan);
        box-shadow: 0 0 8px rgba(55, 217, 255, .80);
    }

    #cc-dashboard .db-module:nth-child(2) .db-module-state {
        border-color: rgba(141, 123, 255, .27);
        color: #d2ccff;
        background: rgba(141, 123, 255, .12);
    }

    #cc-dashboard .db-module:nth-child(2) .db-module-state::before {
        background: var(--db-violet);
        box-shadow: 0 0 8px rgba(141, 123, 255, .80);
    }

    #cc-dashboard .db-module:nth-child(3) .db-module-state {
        border-color: rgba(70, 227, 161, .24);
        color: #c7ffe6;
        background: rgba(16, 107, 74, .17);
    }

    #cc-dashboard .db-module:nth-child(3) .db-module-state::before {
        background: var(--db-green);
        box-shadow: 0 0 8px rgba(70, 227, 161, .80);
    }

    #cc-dashboard .db-module p {
        max-width: 430px;
        margin: 14px 0 17px;
        color: #a8bdd4;
        font-size: 13px;
        line-height: 1.62;
    }

    #cc-dashboard .db-module a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: flex-start;
        min-height: 40px;
        margin-top: auto;
        padding: 9px 14px;
        border: 1px solid rgba(83, 204, 255, .36);
        border-radius: 10px;
        color: #06162d;
        background: linear-gradient(135deg, var(--db-cyan), var(--db-violet));
        box-shadow: 0 10px 25px rgba(55, 217, 255, .17);
        font-size: 12px;
        font-weight: 900;
        text-decoration: none;
        transition: transform .18s ease, box-shadow .18s ease;
    }

    #cc-dashboard .db-module a:hover {
        transform: translateY(-1px);
        box-shadow: 0 15px 30px rgba(55, 217, 255, .28);
    }

    #cc-dashboard .db-flow {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        margin-top: 16px;
        padding: 15px;
        border: 1px solid var(--db-line);
        border-radius: 15px;
        background: rgba(5, 17, 37, .54);
    }

    #cc-dashboard .db-flow-step {
        position: relative;
        min-height: 78px;
        padding: 10px 11px;
        border: 1px solid rgba(142, 184, 230, .15);
        border-radius: 11px;
        background: rgba(11, 29, 59, .54);
    }

    #cc-dashboard .db-flow-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -9px;
        width: 8px;
        height: 1px;
        background: rgba(55, 217, 255, .44);
    }

    #cc-dashboard .db-flow-step strong {
        display: block;
        margin: 6px 0 3px;
        color: #eff8ff;
        font-size: 12px;
    }

    #cc-dashboard .db-flow-step span {
        display: block;
        color: #8fa5bf;
        font-size: 10px;
        line-height: 1.42;
    }

    #cc-dashboard .db-flow-step:nth-child(1) .db-flow-label { color: #7cecff; }
    #cc-dashboard .db-flow-step:nth-child(2) .db-flow-label { color: #c9c3ff; }
    #cc-dashboard .db-flow-step:nth-child(3) .db-flow-label { color: #c5ffe6; }
    #cc-dashboard .db-flow-step:nth-child(4) .db-flow-label { color: #ffe2a5; }

    @media (max-width: 980px) {
        #cc-dashboard {
            min-height: 0;
        }

        #cc-dashboard .db-metrics {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        #cc-dashboard .db-flow {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        #cc-dashboard .db-flow-step:nth-child(2)::after {
            display: none;
        }
    }

    @media (max-width: 680px) {
        #cc-dashboard {
            padding: 18px;
            border-radius: 15px;
        }

        #cc-dashboard .db-hero,
        #cc-dashboard .db-section-heading {
            align-items: flex-start;
            flex-direction: column;
        }

        #cc-dashboard .db-section-heading p {
            text-align: left;
        }

        #cc-dashboard .db-metrics,
        #cc-dashboard .db-module-grid,
        #cc-dashboard .db-flow {
            grid-template-columns: 1fr;
        }

        #cc-dashboard .db-flow-step::after {
            display: none;
        }
    }


/* ---------- generator.php ---------- */
/*
     * Content Generator visual layer.
     * Self-contained. No external stylesheet, JavaScript, routes, or IDs changed.
     */
    #cc-generator {
        --cc-ink: #eef7ff;
        --cc-muted: #9aafc8;
        --cc-line: rgba(142, 184, 230, .18);
        --cc-panel: rgba(10, 25, 52, .86);
        --cc-panel-deep: rgba(6, 16, 36, .92);
        --cc-cyan: #37d9ff;
        --cc-violet: #8d7bff;
        --cc-green: #46e3a1;
        position: relative;
        min-height: 720px;
        max-width: 1280px;
        margin: 0 auto;
        overflow: hidden;
        padding: clamp(20px, 3vw, 34px);
        border: 1px solid var(--cc-line);
        border-radius: 20px;
        color: var(--cc-ink);
        background:
            radial-gradient(circle at 9% 0%, rgba(55, 217, 255, .16), transparent 32%),
            radial-gradient(circle at 96% 13%, rgba(141, 123, 255, .18), transparent 31%),
            linear-gradient(145deg, #0e2143 0%, #09182f 52%, #061126 100%);
        box-shadow: 0 24px 72px rgba(2, 8, 24, .30);
        isolation: isolate;
    }

    #cc-generator * { box-sizing: border-box; }

    #cc-generator::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -2;
        opacity: .78;
        pointer-events: none;
        background-image:
            linear-gradient(rgba(126, 177, 230, .065) 1px, transparent 1px),
            linear-gradient(90deg, rgba(126, 177, 230, .065) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 86%);
    }

    #cc-generator::after {
        content: '';
        position: absolute;
        z-index: -1;
        top: 108px;
        right: -210px;
        width: 620px;
        height: 620px;
        border: 1px solid rgba(55, 217, 255, .16);
        border-radius: 50%;
        box-shadow:
            0 0 0 52px rgba(55, 217, 255, .025),
            0 0 0 104px rgba(141, 123, 255, .022),
            0 0 70px rgba(55, 217, 255, .10);
        pointer-events: none;
    }

    #cc-generator .cc-hero {
        position: relative;
        max-width: 820px;
        margin-bottom: 28px;
        padding: 4px 0 20px;
        border-bottom: 1px solid var(--cc-line);
    }

    #cc-generator .cc-hero::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 108px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--cc-cyan), var(--cc-violet));
        box-shadow: 0 0 18px rgba(55, 217, 255, .54);
    }

    #cc-generator .cc-eyebrow,
    #cc-generator .cc-card-label {
        display: block;
        color: #9fc5eb;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    #cc-generator .cc-eyebrow { margin-bottom: 10px; }

    #cc-generator .cc-hero h1 {
        max-width: 720px;
        margin: 0;
        color: #f4faff;
        font-size: clamp(31px, 4.5vw, 48px);
        line-height: .98;
        letter-spacing: -.055em;
    }

    #cc-generator .cc-hero p {
        max-width: 620px;
        margin: 13px 0 0;
        color: var(--cc-muted);
        font-size: 14px;
        line-height: 1.65;
    }

    #cc-generator .cc-workspace {
        display: grid;
        grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
        gap: 16px;
        align-items: stretch;
    }

    #cc-generator .cc-panel {
        position: relative;
        min-height: 390px;
        overflow: hidden;
        padding: 20px;
        border: 1px solid var(--cc-line);
        border-radius: 17px;
        background: linear-gradient(155deg, rgba(16, 38, 74, .90), rgba(8, 20, 43, .88));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 40px rgba(3, 10, 25, .18);
    }

    #cc-generator .cc-panel--input::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 128px;
        height: 128px;
        border-radius: 0 0 0 120px;
        background: radial-gradient(circle at 100% 0%, rgba(55, 217, 255, .13), transparent 66%);
        pointer-events: none;
    }

    #cc-generator .cc-panel--output {
        display: flex;
        flex-direction: column;
        background: linear-gradient(155deg, rgba(9, 24, 51, .92), rgba(5, 15, 34, .91));
    }

    #cc-generator .cc-panel-title {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 19px;
    }

    #cc-generator .cc-panel-title h2 {
        margin: 5px 0 0;
        color: #f1f8ff;
        font-size: 21px;
        letter-spacing: -.025em;
    }

    #cc-generator .cc-status {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 26px;
        padding: 5px 9px;
        border: 1px solid rgba(70, 227, 161, .24);
        border-radius: 999px;
        color: #c8ffe6;
        background: rgba(16, 107, 74, .18);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #cc-generator .cc-status::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: var(--cc-green);
        box-shadow: 0 0 10px rgba(70, 227, 161, .80);
    }

    #cc-generator .form-group {
        margin: 0;
    }

    #cc-generator .form-group + .form-group {
        margin-top: 16px;
    }

    #cc-generator .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #a9c2dd;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    #cc-generator #case-title {
        width: 100%;
        min-height: 54px;
        padding: 14px 15px;
        border: 1px solid rgba(142, 184, 230, .26);
        border-radius: 11px;
        outline: none;
        color: #eff8ff;
        background: rgba(4, 16, 37, .68);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
        font: inherit;
        font-size: 14px;
        transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    }

    #cc-generator #case-title::placeholder {
        color: #728aa5;
    }

    #cc-generator #case-title:focus {
        border-color: rgba(55, 217, 255, .76);
        background: rgba(6, 21, 47, .86);
        box-shadow: 0 0 0 4px rgba(55, 217, 255, .09);
    }

    #cc-generator .cc-helper {
        margin: 9px 0 0;
        color: #8ea6c3;
        font-size: 11px;
        line-height: 1.55;
    }

    #cc-generator #generate-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 168px;
        min-height: 45px;
        padding: 10px 17px;
        border: 1px solid rgba(83, 204, 255, .38);
        border-radius: 10px;
        color: #06152b;
        background: linear-gradient(135deg, var(--cc-cyan), var(--cc-violet));
        box-shadow: 0 12px 28px rgba(55, 217, 255, .22);
        font: inherit;
        font-size: 13px;
        font-weight: 900;
        cursor: pointer;
        transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    }

    #cc-generator #generate-btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
        box-shadow: 0 17px 34px rgba(55, 217, 255, .34);
    }

    #cc-generator #generate-btn:active {
        transform: translateY(0);
    }

    #cc-generator .cc-output-shell {
        position: relative;
        display: grid;
        flex: 1;
        min-height: 280px;
        place-items: center;
        overflow: hidden;
        padding: 20px;
        border: 1px dashed rgba(139, 176, 222, .25);
        border-radius: 13px;
        background:
            linear-gradient(180deg, rgba(55, 217, 255, .025), transparent 38%),
            rgba(4, 15, 33, .46);
    }

    #cc-generator .cc-output-shell::before {
        content: '';
        position: absolute;
        width: 330px;
        height: 330px;
        border: 1px solid rgba(55, 217, 255, .13);
        border-radius: 50%;
        box-shadow:
            0 0 0 36px rgba(55, 217, 255, .018),
            0 0 0 72px rgba(141, 123, 255, .014);
        pointer-events: none;
    }

    #cc-generator .cc-output-shell::after {
        content: '';
        position: absolute;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--cc-cyan);
        box-shadow:
            -94px -60px 0 -2px rgba(55, 217, 255, .48),
            108px -43px 0 -1px rgba(141, 123, 255, .60),
            78px 86px 0 -2px rgba(70, 227, 161, .56),
            -104px 74px 0 -2px rgba(55, 217, 255, .42),
            0 0 22px rgba(55, 217, 255, .76);
        pointer-events: none;
    }

    #cc-generator #generator-output {
        position: relative;
        z-index: 1;
        width: min(440px, 100%);
        min-height: 148px;
        padding: 17px;
        border: 1px solid rgba(142, 184, 230, .18);
        border-radius: 12px;
        color: #c2d2e4;
        background: rgba(7, 20, 44, .78);
        font-size: 13px;
        line-height: 1.62;
        white-space: pre-wrap;
    }

    #cc-generator #generator-output:empty::before {
        content: 'Waiting for a case title...';
        color: #8299b6;
    }

    #cc-generator .cc-output-caption {
        position: relative;
        z-index: 1;
        margin: 13px 0 0;
        color: #8197b3;
        font-size: 11px;
        line-height: 1.55;
        text-align: center;
    }

    #cc-generator .cc-footer-signal {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 16px;
    }

    #cc-generator .cc-footer-signal span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 24px;
        padding: 5px 8px;
        border: 1px solid rgba(142, 184, 230, .17);
        border-radius: 999px;
        color: #95abc5;
        background: rgba(7, 20, 44, .48);
        font-size: 10px;
        font-weight: 800;
    }

    #cc-generator .cc-footer-signal span::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 999px;
        background: #6c8fb8;
    }

    #cc-generator .cc-footer-signal span:nth-child(1)::before { background: var(--cc-cyan); }
    #cc-generator .cc-footer-signal span:nth-child(2)::before { background: var(--cc-violet); }
    #cc-generator .cc-footer-signal span:nth-child(3)::before { background: var(--cc-green); }

    @media (max-width: 880px) {
        #cc-generator { min-height: 0; }
        #cc-generator .cc-workspace { grid-template-columns: 1fr; }
        #cc-generator .cc-panel { min-height: 0; }
    }

    @media (max-width: 560px) {
        #cc-generator { padding: 18px; border-radius: 15px; }
        #cc-generator .cc-panel { padding: 16px; }
        #cc-generator .cc-panel-title { align-items: flex-start; flex-direction: column; }
        #cc-generator #generate-btn { width: 100%; }
    }


/* ---------- mortgage-x-files.php ---------- */
/*
     * Mortgage X Files Library
     * Self-contained visual layer only.
     * No external stylesheet. No PHP or workflow logic changed.
     */
    #mxf-library {
        --mxf-ink: #eaf4ff;
        --mxf-muted: #95a8c0;
        --mxf-line: rgba(139, 176, 222, .18);
        --mxf-panel: rgba(11, 23, 47, .88);
        --mxf-panel-strong: rgba(8, 18, 39, .96);
        --mxf-cyan: #37d9ff;
        --mxf-violet: #8d7bff;
        --mxf-green: #46e3a1;
        --mxf-amber: #ffc86b;
        --mxf-rose: #ff7ca5;
        max-width: 1280px;
        margin: 0 auto;
        padding: 22px;
        overflow: hidden;
        border: 1px solid var(--mxf-line);
        border-radius: 18px;
        background:
            radial-gradient(circle at 8% 0%, rgba(55, 217, 255, .10), transparent 34%),
            radial-gradient(circle at 94% 8%, rgba(141, 123, 255, .10), transparent 30%),
            linear-gradient(155deg, #0d1d3b 0%, #08162e 54%, #071226 100%);
        color: var(--mxf-ink);
        box-shadow: 0 24px 70px rgba(3, 9, 23, .30);
    }

    #mxf-library * { box-sizing: border-box; }
    #mxf-library button,
    #mxf-library input,
    #mxf-library select,
    #mxf-library textarea { font: inherit; }

    #mxf-library .mxf-header {
        position: relative;
        margin: 0 0 20px;
        padding: 4px 0 18px;
        border-bottom: 1px solid var(--mxf-line);
    }

    #mxf-library .mxf-header::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 92px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--mxf-cyan), var(--mxf-violet));
        box-shadow: 0 0 18px rgba(55, 217, 255, .42);
    }

    #mxf-library .mxf-header h1 {
        margin: 0 0 7px;
        color: #f5fbff;
        font-size: clamp(26px, 3.2vw, 34px);
        line-height: 1.06;
        letter-spacing: -.035em;
    }

    #mxf-library .mxf-header h1::before {
        content: 'CASE LIBRARY';
        display: block;
        margin-bottom: 8px;
        color: #9cc7ef;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    #mxf-library .mxf-header p {
        max-width: 760px;
        margin: 0;
        color: var(--mxf-muted);
        font-size: 13px;
        line-height: 1.6;
    }

    #mxf-library .mxf-summary-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
        margin: 0 0 18px;
    }

    #mxf-library .mxf-summary-card,
    #mxf-library .mxf-panel,
    #mxf-library .mxf-filter-panel,
    #mxf-library .mxf-case-card,
    #mxf-library .mxf-series-card,
    #mxf-library .mxf-archived-case,
    #mxf-library .mxf-empty {
        border: 1px solid var(--mxf-line);
        background: var(--mxf-panel);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    }

    #mxf-library .mxf-summary-card {
        position: relative;
        min-height: 106px;
        padding: 14px;
        overflow: hidden;
        border-radius: 13px;
    }

    #mxf-library .mxf-summary-card::after {
        content: '';
        position: absolute;
        top: 13px;
        right: 13px;
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--mxf-cyan);
        box-shadow: 0 0 13px rgba(55, 217, 255, .72);
    }

    #mxf-library .mxf-summary-card:nth-child(2)::after { background: var(--mxf-green); box-shadow: 0 0 13px rgba(70, 227, 161, .72); }
    #mxf-library .mxf-summary-card:nth-child(3)::after { background: var(--mxf-violet); box-shadow: 0 0 13px rgba(141, 123, 255, .72); }
    #mxf-library .mxf-summary-card:nth-child(4)::after { background: var(--mxf-amber); box-shadow: 0 0 13px rgba(255, 200, 107, .72); }
    #mxf-library .mxf-summary-card:nth-child(5)::after { background: var(--mxf-rose); box-shadow: 0 0 13px rgba(255, 124, 165, .72); }

    #mxf-library .mxf-summary-label,
    #mxf-library .mxf-series-code,
    #mxf-library .mxf-source,
    #mxf-library .mxf-case-logic-label,
    #mxf-library .mxf-create-step {
        color: #9ab4d2;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .11em;
        text-transform: uppercase;
    }

    #mxf-library .mxf-summary-value {
        display: block;
        margin-top: 13px;
        color: #f5fbff;
        font-size: 28px;
        font-weight: 900;
        letter-spacing: -.04em;
    }

    #mxf-library .mxf-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.7fr) minmax(320px, .84fr);
        gap: 16px;
        align-items: start;
    }

    #mxf-library .mxf-panel {
        padding: 18px;
        border-radius: 16px;
    }

    #mxf-library .mxf-panel > h2,
    #mxf-library .mxf-filter-panel h2,
    #mxf-library .mxf-archive-topline h2,
    #mxf-library .mxf-modal-card h2 {
        margin: 0 0 6px;
        color: #f3f9ff;
        font-size: 18px;
        letter-spacing: -.02em;
    }

    #mxf-library .mxf-panel-intro {
        margin: 0 0 17px;
        color: var(--mxf-muted);
        font-size: 12px;
        line-height: 1.6;
    }

    #mxf-library .mxf-library-tabs {
        display: flex;
        gap: 8px;
        margin: 18px 0;
        padding: 8px;
        border: 1px solid var(--mxf-line);
        border-radius: 13px;
        background: rgba(6, 15, 32, .54);
    }

    #mxf-library .mxf-library-tab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 36px;
        padding: 8px 12px;
        border: 1px solid transparent;
        border-radius: 9px;
        color: #aabed8;
        background: transparent;
        font-size: 12px;
        font-weight: 850;
        text-decoration: none;
        transition: .18s ease;
    }

    #mxf-library .mxf-library-tab:hover {
        color: #eaf4ff;
        background: rgba(55, 217, 255, .06);
    }

    #mxf-library .mxf-library-tab.is-active {
        border-color: rgba(55, 217, 255, .30);
        color: #dff9ff;
        background: linear-gradient(135deg, rgba(23, 159, 203, .38), rgba(91, 76, 214, .35));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 20px rgba(8, 18, 42, .18);
    }

    #mxf-library .mxf-tab-count {
        display: inline-grid;
        min-width: 20px;
        height: 20px;
        place-items: center;
        padding: 0 6px;
        border-radius: 999px;
        color: #eaf7ff;
        background: rgba(152, 191, 232, .16);
        font-size: 10px;
        font-weight: 900;
    }

    #mxf-library .mxf-library-tab.is-active .mxf-tab-count {
        color: #f7fbff;
        background: rgba(255,255,255,.16);
    }

    #mxf-library .mxf-filter-panel {
        margin: 0 0 16px;
        padding: 15px;
        border-radius: 14px;
        background: rgba(6, 17, 36, .54);
    }

    #mxf-library .mxf-filter-topline,
    #mxf-library .mxf-archive-topline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

    #mxf-library .mxf-filter-count,
    #mxf-library .mxf-archive-count,
    #mxf-library .mxf-search-scope,
    #mxf-library .mxf-field small,
    #mxf-library .mxf-case-card p,
    #mxf-library .mxf-archived-case span {
        color: var(--mxf-muted);
        font-size: 11px;
        line-height: 1.55;
    }

    #mxf-library .mxf-search-scope {
        margin: -3px 0 13px;
    }

    #mxf-library .mxf-filter-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #mxf-library .mxf-filter-field,
    #mxf-library .mxf-field {
        display: grid;
        gap: 6px;
    }

    #mxf-library .mxf-filter-field label,
    #mxf-library .mxf-field label {
        color: #91a9c8;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    #mxf-library input,
    #mxf-library textarea,
    #mxf-library select {
        width: 100%;
        min-height: 40px;
        padding: 9px 10px;
        border: 1px solid rgba(139, 176, 222, .24);
        border-radius: 9px;
        outline: none;
        color: #eaf4ff;
        background: rgba(6, 18, 39, .76);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
        font-size: 13px;
    }

    #mxf-library textarea {
        min-height: 102px;
        resize: vertical;
        line-height: 1.55;
    }

    #mxf-library input::placeholder,
    #mxf-library textarea::placeholder { color: #7188a5; }

    #mxf-library input:focus,
    #mxf-library textarea:focus,
    #mxf-library select:focus {
        border-color: rgba(55,217,255,.72);
        box-shadow: 0 0 0 3px rgba(55,217,255,.10);
    }

    #mxf-library select {
        color-scheme: dark;
        cursor: pointer;
    }

    #mxf-library select option,
    #mxf-library select optgroup {
        color: #eaf4ff;
        background: #102344;
    }

    #mxf-library .mxf-filter-actions,
    #mxf-library .mxf-review-actions,
    #mxf-library .mxf-edit-actions,
    #mxf-library .mxf-modal-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 9px;
    }

    #mxf-library .mxf-filter-actions { grid-column: 1 / -1; }

    #mxf-library .mxf-button,
    #mxf-library .mxf-reset,
    #mxf-library .mxf-secondary-button,
    #mxf-library .mxf-edit-button,
    #mxf-library .mxf-danger-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 8px 12px;
        border: 1px solid transparent;
        border-radius: 9px;
        font: inherit;
        font-size: 12px;
        font-weight: 850;
        text-decoration: none;
        cursor: pointer;
        transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
    }

    #mxf-library .mxf-button {
        border-color: rgba(85, 203, 255, .38);
        color: #031325;
        background: linear-gradient(135deg, var(--mxf-cyan), var(--mxf-violet));
        box-shadow: 0 10px 28px rgba(55, 217, 255, .22);
    }

    #mxf-library .mxf-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 32px rgba(55, 217, 255, .34);
    }

    #mxf-library .mxf-reset,
    #mxf-library .mxf-secondary-button,
    #mxf-library .mxf-edit-button {
        border-color: rgba(139, 176, 222, .28);
        color: #cfe4fa;
        background: rgba(14, 36, 68, .54);
    }

    #mxf-library .mxf-reset:hover,
    #mxf-library .mxf-secondary-button:hover,
    #mxf-library .mxf-edit-button:hover {
        transform: translateY(-1px);
        border-color: rgba(55,217,255,.48);
        color: #effaff;
        background: rgba(18, 53, 94, .66);
    }

    #mxf-library .mxf-edit-button {
        min-height: 30px;
        padding: 6px 9px;
        font-size: 11px;
    }

    #mxf-library .mxf-danger-button {
        border-color: rgba(255, 124, 165, .32);
        color: #fff1f5;
        background: rgba(157, 40, 77, .56);
    }

    #mxf-library .mxf-danger-button:hover {
        transform: translateY(-1px);
        background: rgba(188, 42, 87, .72);
    }

    #mxf-library .mxf-series-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0 0 16px;
    }

    #mxf-library .mxf-series-card {
        min-height: 104px;
        padding: 14px;
        border-radius: 13px;
        background: rgba(10, 27, 55, .68);
    }

    #mxf-library .mxf-series-card h3 {
        margin: 6px 0 5px;
        color: #f1f8ff;
        font-size: 15px;
    }

    #mxf-library .mxf-series-card p {
        margin: 0;
        color: var(--mxf-muted);
        font-size: 11px;
        line-height: 1.5;
    }

    #mxf-library .mxf-case-list,
    #mxf-library .mxf-archived-list,
    #mxf-library .mxf-match-list {
        display: grid;
        gap: 10px;
    }

    #mxf-library .mxf-case-card {
        padding: 15px;
        border-radius: 14px;
        scroll-margin-top: 24px;
        background: rgba(10, 27, 55, .63);
    }

    #mxf-library .mxf-case-topline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 9px;
    }

    #mxf-library .mxf-case-controls {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    #mxf-library .mxf-case-id {
        color: #66e7ff;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    #mxf-library .mxf-status {
        display: inline-flex;
        padding: 4px 7px;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    #mxf-library .mxf-status-open {
        color: #ffe1a7;
        border: 1px solid rgba(255, 200, 107, .26);
        background: rgba(124, 80, 17, .18);
    }

    #mxf-library .mxf-status-solved {
        color: #b7ffe0;
        border: 1px solid rgba(70, 227, 161, .28);
        background: rgba(19, 107, 70, .18);
    }

    #mxf-library .mxf-source {
        display: inline-block;
        margin: 0 0 8px;
        color: #8fa8c9;
    }

    #mxf-library .mxf-case-card h3 {
        margin: 0 0 5px;
        color: #f3f9ff;
        font-size: 17px;
        letter-spacing: -.015em;
    }

    #mxf-library .mxf-case-card p {
        margin: 0;
    }

    #mxf-library .mxf-case-logic {
        display: grid;
        gap: 9px;
        margin-top: 13px;
        padding-top: 13px;
        border-top: 1px solid var(--mxf-line);
    }

    #mxf-library .mxf-case-logic-item {
        display: grid;
        gap: 3px;
    }

    #mxf-library .mxf-case-logic-item p {
        color: #b7c9de;
        font-size: 12px;
    }

    #mxf-library .mxf-case-card-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 14px;
        padding-top: 13px;
        border-top: 1px solid var(--mxf-line);
    }

    #mxf-library .mxf-empty {
        padding: 28px 20px;
        border-style: dashed;
        border-radius: 13px;
        color: #afc1d7;
        text-align: center;
    }

    #mxf-library .mxf-empty a {
        color: #7eeaff;
        font-weight: 800;
        text-decoration: none;
    }

    #mxf-library .mxf-empty a:hover { text-decoration: underline; }

    #mxf-library .mxf-notice {
        margin: 0 0 16px;
        padding: 12px 13px;
        border: 1px solid var(--mxf-line);
        border-radius: 10px;
        font-size: 12px;
        line-height: 1.5;
    }

    #mxf-library .mxf-notice-success {
        border-color: rgba(70, 227, 161, .30);
        color: #bfffe3;
        background: rgba(19, 107, 70, .18);
    }

    #mxf-library .mxf-notice-error {
        border-color: rgba(255, 124, 165, .30);
        color: #ffc2d3;
        background: rgba(133, 34, 70, .20);
    }

    #mxf-library .mxf-create-step {
        margin-bottom: 13px;
        color: #9cc7ef;
    }

    #mxf-library .mxf-match {
        display: block;
        padding: 12px;
        border: 1px solid var(--mxf-line);
        border-radius: 10px;
        color: inherit;
        background: rgba(8, 22, 46, .56);
        text-decoration: none;
        transition: .18s ease;
    }

    #mxf-library .mxf-match:hover {
        border-color: rgba(55,217,255,.48);
        background: rgba(18, 53, 94, .56);
    }

    #mxf-library .mxf-match strong {
        display: block;
        color: #eaf4ff;
        font-size: 12px;
    }

    #mxf-library .mxf-match span {
        display: block;
        margin-top: 4px;
        color: var(--mxf-muted);
        font-size: 11px;
    }

    #mxf-library .mxf-rule-note {
        margin: 18px 0 0;
        padding: 13px;
        border-left: 2px solid var(--mxf-violet);
        border-radius: 0 10px 10px 0;
        color: #bdcce0;
        background: rgba(111, 86, 255, .08);
        font-size: 12px;
        line-height: 1.55;
    }

    #mxf-library .mxf-modal {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(2, 8, 20, .76);
        backdrop-filter: blur(8px);
    }

    #mxf-library .mxf-modal.is-open { display: flex; }

    #mxf-library .mxf-modal-card {
        width: min(680px, 100%);
        max-height: 88vh;
        overflow: auto;
        padding: 22px;
        border: 1px solid rgba(139, 176, 222, .26);
        border-radius: 16px;
        background: linear-gradient(155deg, #102548, #091731);
        box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
    }

    #mxf-library .mxf-modal-card > p,
    #mxf-library .mxf-edit-meta,
    #mxf-library .mxf-archive-warning {
        color: #b6c8dc;
        font-size: 12px;
        line-height: 1.6;
    }

    #mxf-library .mxf-edit-meta,
    #mxf-library .mxf-archive-warning {
        margin: 0 0 16px;
        padding: 12px;
        border: 1px solid var(--mxf-line);
        border-radius: 10px;
        background: rgba(6, 17, 36, .55);
    }

    #mxf-library .mxf-archive-warning {
        border-color: rgba(255, 124, 165, .20);
        color: #ffc8d6;
        background: rgba(133, 34, 70, .14);
    }

    #mxf-library .mxf-modal-actions {
        justify-content: flex-end;
        margin-top: 18px;
    }

    #mxf-library .mxf-archived-case {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
        align-items: center;
        padding: 14px;
        border-radius: 12px;
        background: rgba(10, 27, 55, .63);
    }

    #mxf-library .mxf-archived-case strong {
        display: block;
        color: #eaf4ff;
        font-size: 13px;
    }

    #mxf-library .mxf-restore-button {
        border-color: rgba(70, 227, 161, .30);
        color: #b7ffe0;
        background: rgba(19, 107, 70, .18);
    }

    #mxf-library .mxf-restore-button:hover {
        border-color: rgba(70, 227, 161, .55);
        color: #e9fff4;
        background: rgba(19, 107, 70, .32);
    }

    @media (max-width: 980px) {
        #mxf-library .mxf-layout { grid-template-columns: 1fr; }
        #mxf-library .mxf-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }

    @media (max-width: 660px) {
        #mxf-library { padding: 14px; border-radius: 14px; }
        #mxf-library .mxf-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        #mxf-library .mxf-filter-grid,
        #mxf-library .mxf-series-grid { grid-template-columns: 1fr; }
        #mxf-library .mxf-library-tabs { flex-direction: column; }
        #mxf-library .mxf-library-tab { justify-content: space-between; }
        #mxf-library .mxf-archived-case { grid-template-columns: 1fr; }
        #mxf-library .mxf-case-topline,
        #mxf-library .mxf-filter-topline,
        #mxf-library .mxf-archive-topline { align-items: flex-start; flex-direction: column; }
    }


/* ---------- review.php ---------- */
/*
     * Chady Coach - Content Reviewer
     * Functional local scoring tool. No external CSS, APIs, or separate JS files.
     */
    #cc-reviewer {
        --rv-ink: #edf7ff;
        --rv-muted: #9bb0c8;
        --rv-line: rgba(142, 184, 230, .18);
        --rv-cyan: var(--cc-ui-accent, #37d9ff);
        --rv-violet: var(--cc-ui-accent-2, #8d7bff);
        --rv-glow: var(--cc-ui-glow, rgba(55, 217, 255, .16));
        --rv-green: #46e3a1;
        --rv-amber: #ffc86b;
        --rv-red: #ff7188;
        max-width: 1280px;
        min-height: 720px;
        margin: 0 auto;
        padding: clamp(20px, 3vw, 34px);
        overflow: hidden;
        border: 1px solid var(--rv-line);
        border-radius: 20px;
        color: var(--rv-ink);
        background:
            radial-gradient(circle at 8% 0%, var(--rv-glow), transparent 33%),
            radial-gradient(circle at 96% 12%, rgba(141, 123, 255, .18), transparent 31%),
            linear-gradient(145deg, #0e2143 0%, #09182f 52%, #061126 100%);
        box-shadow: 0 24px 72px rgba(2, 8, 24, .30);
        isolation: isolate;
    }

    #cc-reviewer * { box-sizing: border-box; }

    #cc-reviewer::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -2;
        pointer-events: none;
        opacity: .8;
        background-image:
            linear-gradient(rgba(127, 181, 238, .065) 1px, transparent 1px),
            linear-gradient(90deg, rgba(127, 181, 238, .065) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.88), transparent 90%);
    }

    #cc-reviewer::after {
        content: '';
        position: absolute;
        z-index: -1;
        right: -170px;
        bottom: -235px;
        width: 625px;
        height: 625px;
        border: 1px solid rgba(55, 217, 255, .15);
        border-radius: 50%;
        box-shadow:
            0 0 0 52px rgba(55, 217, 255, .022),
            0 0 0 104px rgba(141, 123, 255, .019),
            0 0 82px rgba(55, 217, 255, .10);
        pointer-events: none;
    }

    #cc-reviewer .rv-hero {
        position: relative;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 27px;
        padding: 4px 0 20px;
        border-bottom: 1px solid var(--rv-line);
    }

    #cc-reviewer .rv-hero::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 106px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--rv-cyan), var(--rv-violet));
        box-shadow: 0 0 18px rgba(55, 217, 255, .54);
    }

    #cc-reviewer .rv-eyebrow,
    #cc-reviewer .rv-label,
    #cc-reviewer .rv-panel-label {
        display: block;
        color: #9ec6ed;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-eyebrow { margin-bottom: 10px; }

    #cc-reviewer h1 {
        margin: 0;
        color: #f4faff;
        font-size: clamp(31px, 4.5vw, 49px);
        line-height: .98;
        letter-spacing: -.055em;
    }

    #cc-reviewer .rv-hero p {
        max-width: 715px;
        margin: 13px 0 0;
        color: var(--rv-muted);
        font-size: 14px;
        line-height: 1.65;
    }

    #cc-reviewer .rv-local-only {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 28px;
        margin-bottom: 2px;
        padding: 5px 9px;
        border: 1px solid rgba(70, 227, 161, .24);
        border-radius: 999px;
        color: #c7ffe6;
        background: rgba(16, 107, 74, .18);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #cc-reviewer .rv-local-only::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--rv-green);
        box-shadow: 0 0 10px rgba(70, 227, 161, .82);
    }

    #cc-reviewer .rv-layout {
        display: grid;
        grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
        gap: 16px;
        align-items: start;
    }

    #cc-reviewer .rv-panel {
        position: relative;
        overflow: hidden;
        padding: 20px;
        border: 1px solid var(--rv-line);
        border-radius: 17px;
        background: linear-gradient(155deg, rgba(16, 38, 74, .90), rgba(8, 20, 43, .88));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 40px rgba(3, 10, 25, .18);
    }

    #cc-reviewer .rv-panel--output {
        min-height: 588px;
        background: linear-gradient(155deg, rgba(9, 24, 51, .92), rgba(5, 15, 34, .91));
    }

    #cc-reviewer .rv-panel--output::before {
        content: '';
        position: absolute;
        top: -90px;
        right: -82px;
        width: 250px;
        height: 250px;
        border: 1px solid rgba(55, 217, 255, .15);
        border-radius: 50%;
        box-shadow: 0 0 0 45px rgba(55, 217, 255, .018);
        pointer-events: none;
    }

    #cc-reviewer .rv-panel-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 18px;
    }

    #cc-reviewer .rv-panel-head h2 {
        margin: 5px 0 0;
        color: #f2f8ff;
        font-size: 21px;
        letter-spacing: -.025em;
    }

    #cc-reviewer .rv-field-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 11px;
    }

    #cc-reviewer .rv-field {
        display: grid;
        gap: 6px;
    }

    #cc-reviewer .rv-field label {
        color: #a8c6e3;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-input,
    #cc-reviewer .rv-select,
    #cc-reviewer .rv-textarea {
        width: 100%;
        border: 1px solid rgba(142, 184, 230, .23);
        border-radius: 10px;
        outline: none;
        color: #eaf4ff;
        background: rgba(5, 17, 37, .68);
        font: inherit;
        font-size: 12px;
        transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    }

    #cc-reviewer .rv-input,
    #cc-reviewer .rv-select {
        min-height: 39px;
        padding: 8px 10px;
    }

    #cc-reviewer .rv-textarea {
        min-height: 300px;
        padding: 12px;
        resize: vertical;
        line-height: 1.6;
    }

    #cc-reviewer .rv-input:focus,
    #cc-reviewer .rv-select:focus,
    #cc-reviewer .rv-textarea:focus {
        border-color: rgba(55, 217, 255, .64);
        box-shadow: 0 0 0 3px rgba(55, 217, 255, .10);
        background: rgba(6, 22, 47, .86);
    }

    #cc-reviewer .rv-select option {
        color: #eaf4ff;
        background: #102344;
    }

    #cc-reviewer .rv-helper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 8px;
        color: #829bb8;
        font-size: 11px;
        line-height: 1.45;
    }

    #cc-reviewer .rv-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 9px;
        margin-top: 18px;
    }

    #cc-reviewer .rv-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 9px 14px;
        border: 1px solid transparent;
        border-radius: 10px;
        font: inherit;
        font-size: 12px;
        font-weight: 900;
        cursor: pointer;
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    }

    #cc-reviewer .rv-button--primary {
        border-color: rgba(83, 204, 255, .36);
        color: #06162d;
        background: linear-gradient(135deg, var(--rv-cyan), var(--rv-violet));
        box-shadow: 0 10px 25px rgba(55, 217, 255, .17);
    }

    #cc-reviewer .rv-button--secondary {
        border-color: rgba(142, 184, 230, .24);
        color: #d2e4f8;
        background: rgba(13, 36, 68, .54);
    }

    #cc-reviewer .rv-button:hover {
        transform: translateY(-1px);
    }

    #cc-reviewer .rv-button--primary:hover {
        box-shadow: 0 15px 30px rgba(55, 217, 255, .29);
    }

    #cc-reviewer .rv-button--secondary:hover {
        border-color: rgba(55, 217, 255, .43);
        background: rgba(18, 53, 94, .66);
    }

    #cc-reviewer .rv-note {
        margin-top: 14px;
        padding: 11px 12px;
        border-left: 2px solid var(--rv-violet);
        border-radius: 0 10px 10px 0;
        color: #b8cbe0;
        background: rgba(111, 86, 255, .08);
        font-size: 11px;
        line-height: 1.55;
    }

    #cc-reviewer .rv-empty {
        display: grid;
        min-height: 430px;
        place-items: center;
        border: 1px dashed rgba(142, 184, 230, .24);
        border-radius: 13px;
        background: rgba(4, 15, 33, .46);
        text-align: center;
    }

    #cc-reviewer .rv-empty-inner {
        max-width: 290px;
        padding: 24px;
    }

    #cc-reviewer .rv-empty-mark {
        display: grid;
        width: 48px;
        height: 48px;
        margin: 0 auto 14px;
        place-items: center;
        border: 1px solid rgba(55, 217, 255, .30);
        border-radius: 13px;
        color: #c8f8ff;
        background: linear-gradient(145deg, rgba(55, 217, 255, .15), rgba(141, 123, 255, .13));
        box-shadow: 0 0 25px rgba(55, 217, 255, .12);
        font-size: 17px;
        font-weight: 900;
    }

    #cc-reviewer .rv-empty h3 {
        margin: 0;
        color: #eef8ff;
        font-size: 17px;
        letter-spacing: -.02em;
    }

    #cc-reviewer .rv-empty p {
        margin: 8px 0 0;
        color: #92a9c2;
        font-size: 12px;
        line-height: 1.58;
    }

    #cc-reviewer .rv-results {
        display: none;
    }

    #cc-reviewer.is-reviewed .rv-empty {
        display: none;
    }

    #cc-reviewer.is-reviewed .rv-results {
        display: block;
    }

    #cc-reviewer .rv-score-summary {
        display: grid;
        grid-template-columns: 144px minmax(0, 1fr);
        gap: 14px;
        align-items: stretch;
        margin-bottom: 14px;
    }

    #cc-reviewer .rv-overall {
        display: grid;
        min-height: 145px;
        place-items: center;
        padding: 14px;
        border: 1px solid rgba(55, 217, 255, .25);
        border-radius: 13px;
        background:
            radial-gradient(circle at 50% 15%, rgba(55, 217, 255, .14), transparent 55%),
            rgba(5, 18, 40, .57);
        text-align: center;
    }

    #cc-reviewer .rv-overall strong {
        display: block;
        color: #f3fbff;
        font-size: 45px;
        line-height: .94;
        letter-spacing: -.06em;
    }

    #cc-reviewer .rv-overall strong small {
        color: #9bc3e6;
        font-size: 15px;
        letter-spacing: 0;
    }

    #cc-reviewer .rv-overall span {
        display: block;
        margin-top: 7px;
        color: #a4c2dd;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-decision {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 13px 14px;
        border: 1px solid rgba(142, 184, 230, .17);
        border-radius: 13px;
        background: rgba(5, 18, 40, .48);
    }

    #cc-reviewer .rv-decision-status {
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        gap: 7px;
        min-height: 24px;
        padding: 4px 8px;
        border: 1px solid rgba(255, 200, 107, .27);
        border-radius: 999px;
        color: #ffe5b5;
        background: rgba(141, 91, 13, .17);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-decision-status::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--rv-amber);
        box-shadow: 0 0 9px rgba(255, 200, 107, .72);
    }

    #cc-reviewer .rv-decision-status.is-ready {
        border-color: rgba(70, 227, 161, .25);
        color: #c9ffe7;
        background: rgba(16, 107, 74, .17);
    }

    #cc-reviewer .rv-decision-status.is-ready::before {
        background: var(--rv-green);
        box-shadow: 0 0 9px rgba(70, 227, 161, .78);
    }

    #cc-reviewer .rv-decision-status.is-rebuild {
        border-color: rgba(255, 113, 136, .30);
        color: #ffd0d9;
        background: rgba(137, 29, 53, .18);
    }

    #cc-reviewer .rv-decision-status.is-rebuild::before {
        background: var(--rv-red);
        box-shadow: 0 0 9px rgba(255, 113, 136, .78);
    }

    #cc-reviewer .rv-decision h3 {
        margin: 10px 0 5px;
        color: #eff8ff;
        font-size: 16px;
        letter-spacing: -.02em;
    }

    #cc-reviewer .rv-decision p {
        margin: 0;
        color: #a6bcd4;
        font-size: 12px;
        line-height: 1.52;
    }

    #cc-reviewer .rv-score-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        margin-bottom: 14px;
    }

    #cc-reviewer .rv-score-card {
        padding: 12px;
        border: 1px solid rgba(142, 184, 230, .16);
        border-radius: 11px;
        background: rgba(5, 18, 40, .45);
    }

    #cc-reviewer .rv-score-card strong {
        display: block;
        margin-top: 5px;
        color: #f2faff;
        font-size: 26px;
        letter-spacing: -.04em;
    }

    #cc-reviewer .rv-score-card strong small {
        color: #91a8c2;
        font-size: 11px;
        letter-spacing: 0;
    }

    #cc-reviewer .rv-score-bar {
        width: 100%;
        height: 5px;
        margin-top: 10px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(142, 184, 230, .14);
    }

    #cc-reviewer .rv-score-bar span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--rv-cyan), var(--rv-violet));
        box-shadow: 0 0 10px rgba(55, 217, 255, .38);
    }

    #cc-reviewer .rv-result-block {
        margin-top: 13px;
        padding-top: 13px;
        border-top: 1px solid rgba(142, 184, 230, .14);
    }

    #cc-reviewer .rv-result-block h3 {
        margin: 5px 0 9px;
        color: #eff8ff;
        font-size: 14px;
        letter-spacing: -.02em;
    }

    #cc-reviewer .rv-signals {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }

    #cc-reviewer .rv-signal {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 26px;
        padding: 5px 8px;
        border: 1px solid rgba(142, 184, 230, .16);
        border-radius: 999px;
        color: #b9cee3;
        background: rgba(5, 18, 40, .47);
        font-size: 10px;
        font-weight: 800;
    }

    #cc-reviewer .rv-signal::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #7e98b6;
    }

    #cc-reviewer .rv-signal.is-positive::before {
        background: var(--rv-green);
        box-shadow: 0 0 7px rgba(70, 227, 161, .70);
    }

    #cc-reviewer .rv-signal.is-warning::before {
        background: var(--rv-amber);
        box-shadow: 0 0 7px rgba(255, 200, 107, .68);
    }

    #cc-reviewer .rv-fixes {
        display: grid;
        gap: 8px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #cc-reviewer .rv-fixes li {
        position: relative;
        padding: 10px 10px 10px 29px;
        border: 1px solid rgba(142, 184, 230, .15);
        border-radius: 9px;
        color: #b8cce0;
        background: rgba(5, 18, 40, .45);
        font-size: 11px;
        line-height: 1.55;
    }

    #cc-reviewer .rv-fixes li::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 12px;
        width: 8px;
        height: 8px;
        border: 1px solid rgba(55, 217, 255, .58);
        border-radius: 50%;
        box-shadow: 0 0 9px rgba(55, 217, 255, .33);
    }

    #cc-reviewer .rv-opening {
        padding: 11px 12px;
        border-left: 2px solid var(--rv-violet);
        border-radius: 0 10px 10px 0;
        color: #d7e7f6;
        background: rgba(111, 86, 255, .08);
        font-size: 12px;
        line-height: 1.55;
    }

    #cc-reviewer .rv-opening strong {
        color: #f0f9ff;
    }


    #cc-reviewer .rv-improve-actions {
        display: none;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid var(--rv-line);
    }

    #cc-reviewer.is-reviewed .rv-improve-actions {
        display: flex;
    }

    #cc-reviewer .rv-improve-note {
        flex: 1 1 240px;
        color: var(--rv-muted);
        font-size: 12px;
        line-height: 1.45;
    }

    #cc-reviewer .rv-button[disabled] {
        cursor: wait;
        opacity: .6;
        transform: none;
    }


    #cc-reviewer .rv-revision-record {
        display: none;
        margin-top: 18px;
        padding-top: 17px;
        border-top: 1px solid var(--rv-line);
    }

    #cc-reviewer.is-revised .rv-revision-record {
        display: block;
    }

    #cc-reviewer .rv-revision-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    #cc-reviewer .rv-revision-head h3 {
        margin: 5px 0 0;
        color: #eff8ff;
        font-size: 15px;
        letter-spacing: -.02em;
    }

    #cc-reviewer .rv-revision-mode {
        flex: 0 0 auto;
        padding: 6px 9px;
        border: 1px solid rgba(70, 227, 161, .30);
        border-radius: 999px;
        color: #bfffe0;
        background: rgba(70, 227, 161, .10);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-revision-score-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 13px;
    }

    #cc-reviewer .rv-revision-score {
        padding: 10px;
        border: 1px solid rgba(142, 184, 230, .15);
        border-radius: 10px;
        background: rgba(5, 18, 40, .44);
    }

    #cc-reviewer .rv-revision-score span,
    #cc-reviewer .rv-revision-score strong,
    #cc-reviewer .rv-revision-score small {
        display: block;
    }

    #cc-reviewer .rv-revision-score span {
        color: var(--rv-muted);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-revision-score strong {
        margin-top: 5px;
        color: #eff9ff;
        font-size: 16px;
    }

    #cc-reviewer .rv-revision-score small {
        margin-top: 2px;
        color: var(--rv-green);
        font-size: 10px;
        font-weight: 800;
    }

    #cc-reviewer .rv-revision-layout {
        display: grid;
        grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
        gap: 12px;
        margin-top: 14px;
    }

    #cc-reviewer .rv-revision-box {
        padding: 13px;
        border: 1px solid rgba(142, 184, 230, .15);
        border-radius: 11px;
        background: rgba(5, 18, 40, .42);
    }

    #cc-reviewer .rv-revision-box h4 {
        margin: 5px 0 8px;
        color: #eff8ff;
        font-size: 13px;
        letter-spacing: -.01em;
    }

    #cc-reviewer .rv-revision-box p {
        margin: 0;
        color: var(--rv-muted);
        font-size: 11px;
        line-height: 1.5;
    }

    #cc-reviewer .rv-revision-reasons {
        display: grid;
        gap: 8px;
        margin-top: 10px;
    }

    #cc-reviewer .rv-revision-reason {
        padding: 9px 10px;
        border-left: 2px solid var(--rv-cyan);
        border-radius: 0 8px 8px 0;
        background: rgba(55, 217, 255, .06);
    }

    #cc-reviewer .rv-revision-reason strong,
    #cc-reviewer .rv-revision-reason span {
        display: block;
    }

    #cc-reviewer .rv-revision-reason strong {
        color: #eaf7ff;
        font-size: 11px;
        line-height: 1.35;
    }

    #cc-reviewer .rv-revision-reason span {
        margin-top: 3px;
        color: var(--rv-muted);
        font-size: 10px;
        line-height: 1.45;
    }

    #cc-reviewer .rv-diff-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-top: 10px;
    }

    #cc-reviewer .rv-diff-pane {
        min-width: 0;
        padding: 10px;
        border: 1px solid rgba(142, 184, 230, .14);
        border-radius: 9px;
        background: rgba(3, 13, 30, .54);
    }

    #cc-reviewer .rv-diff-pane > span {
        display: block;
        margin-bottom: 7px;
        color: var(--rv-muted);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-diff-text {
        max-height: 240px;
        overflow: auto;
        color: #bed2e8;
        font-size: 11px;
        line-height: 1.58;
        white-space: pre-wrap;
        word-break: break-word;
    }

    #cc-reviewer .rv-diff-before del {
        padding: 0 1px;
        border-radius: 2px;
        color: #ffd5dc;
        background: rgba(255, 113, 136, .24);
        text-decoration: line-through;
    }

    #cc-reviewer .rv-diff-after ins {
        padding: 0 1px;
        border-radius: 2px;
        color: #d5ffeb;
        background: rgba(70, 227, 161, .20);
        text-decoration: none;
    }

    #cc-reviewer .rv-revision-diff-note {
        margin-top: 9px;
        color: var(--rv-dim, #7893b0);
        font-size: 10px;
        line-height: 1.45;
    }


    #cc-reviewer .rv-footer-contract {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-top: 12px;
        padding: 11px 12px;
        border: 1px solid rgba(66, 221, 183, .19);
        border-radius: 10px;
        color: var(--rv-muted);
        background: rgba(37, 190, 156, .06);
        font-size: 11px;
        line-height: 1.5;
    }

    #cc-reviewer .rv-footer-contract i {
        flex: 0 0 7px;
        width: 7px;
        height: 7px;
        margin-top: 5px;
        border-radius: 50%;
        background: var(--rv-green);
        box-shadow: 0 0 11px rgba(66, 221, 183, .82);
    }

    #cc-reviewer .rv-footer-contract strong {
        color: #cefdf0;
    }


    #cc-reviewer .rv-quality-gate {
        display: none;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        margin-top: 14px;
        padding: 13px 14px;
        border: 1px solid rgba(72, 231, 173, .28);
        border-radius: 11px;
        background: linear-gradient(90deg, rgba(48, 190, 145, .11), rgba(41, 126, 211, .08));
    }

    #cc-reviewer .rv-quality-gate.is-visible {
        display: flex;
    }

    #cc-reviewer .rv-quality-gate-main {
        display: flex;
        align-items: flex-start;
        gap: 9px;
    }

    #cc-reviewer .rv-quality-gate-dot {
        flex: 0 0 8px;
        width: 8px;
        height: 8px;
        margin-top: 5px;
        border-radius: 50%;
        background: var(--rv-green);
        box-shadow: 0 0 12px rgba(72, 231, 173, .9);
    }

    #cc-reviewer .rv-quality-gate strong,
    #cc-reviewer .rv-quality-gate span {
        display: block;
    }

    #cc-reviewer .rv-quality-gate strong {
        color: #d6fff0;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    #cc-reviewer .rv-quality-gate span {
        margin-top: 3px;
        color: var(--rv-muted);
        font-size: 11px;
        line-height: 1.45;
    }

    #cc-reviewer .rv-quality-gate-metrics {
        display: flex;
        gap: 7px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    #cc-reviewer .rv-quality-gate-metrics b {
        padding: 5px 7px;
        border: 1px solid rgba(116, 219, 255, .19);
        border-radius: 999px;
        color: #d8efff;
        background: rgba(9, 28, 55, .42);
        font-size: 10px;
        font-weight: 800;
        white-space: nowrap;
    }

    @media (max-width: 740px) {
        #cc-reviewer .rv-quality-gate {
            flex-direction: column;
        }

        #cc-reviewer .rv-quality-gate-metrics {
            justify-content: flex-start;
        }
    }

    @media (max-width: 980px) {
        #cc-reviewer { min-height: 0; }
        #cc-reviewer .rv-layout { grid-template-columns: 1fr; }
        #cc-reviewer .rv-panel--output { min-height: 0; }
    }

    @media (max-width: 610px) {
        #cc-reviewer { padding: 18px; border-radius: 15px; }
        #cc-reviewer .rv-hero { align-items: flex-start; flex-direction: column; }
        #cc-reviewer .rv-panel { padding: 16px; }
        #cc-reviewer .rv-field-grid,
        #cc-reviewer .rv-score-summary,
        #cc-reviewer .rv-score-grid { grid-template-columns: 1fr; }
        #cc-reviewer .rv-local-only { white-space: normal; }
    }


/* ---------- settings.php ---------- */
#cc-ui-settings {
        --set-ink: #eef8ff;
        --set-muted: #9db3cc;
        --set-line: rgba(142, 184, 230, .19);
        --set-panel: rgba(10, 25, 52, .87);
        --set-accent: var(--cc-ui-accent, #37d9ff);
        --set-accent-2: var(--cc-ui-accent-2, #8d7bff);
        --set-soft: var(--cc-ui-accent-soft, rgba(55, 217, 255, .16));
        max-width: 1280px;
        min-height: 710px;
        margin: 0 auto;
        padding: clamp(20px, 3vw, 34px);
        overflow: hidden;
        border: 1px solid var(--set-line);
        border-radius: 20px;
        color: var(--set-ink);
        background:
            radial-gradient(circle at 8% 0%, var(--set-soft), transparent 33%),
            radial-gradient(circle at 96% 12%, color-mix(in srgb, var(--set-accent-2) 18%, transparent), transparent 31%),
            linear-gradient(145deg, #0e2143 0%, #09182f 52%, #061126 100%);
        box-shadow: 0 24px 72px rgba(2, 8, 24, .30);
        isolation: isolate;
    }

    #cc-ui-settings * { box-sizing: border-box; }

    #cc-ui-settings::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -2;
        pointer-events: none;
        opacity: .78;
        background-image:
            linear-gradient(rgba(127, 181, 238, .065) 1px, transparent 1px),
            linear-gradient(90deg, rgba(127, 181, 238, .065) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.88), transparent 90%);
    }

    #cc-ui-settings::after {
        content: '';
        position: absolute;
        z-index: -1;
        right: -170px;
        bottom: -235px;
        width: 625px;
        height: 625px;
        border: 1px solid color-mix(in srgb, var(--set-accent) 18%, transparent);
        border-radius: 50%;
        box-shadow:
            0 0 0 52px color-mix(in srgb, var(--set-accent) 2%, transparent),
            0 0 0 104px color-mix(in srgb, var(--set-accent-2) 2%, transparent),
            0 0 82px color-mix(in srgb, var(--set-accent) 12%, transparent);
        pointer-events: none;
    }

    #cc-ui-settings .set-hero {
        position: relative;
        max-width: 900px;
        margin-bottom: 26px;
        padding: 4px 0 20px;
        border-bottom: 1px solid var(--set-line);
    }

    #cc-ui-settings .set-hero::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 106px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--set-accent), var(--set-accent-2));
        box-shadow: 0 0 18px color-mix(in srgb, var(--set-accent) 54%, transparent);
    }

    #cc-ui-settings .set-eyebrow,
    #cc-ui-settings .set-label {
        display: block;
        color: #9ec6ed;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    #cc-ui-settings .set-eyebrow { margin-bottom: 10px; }

    #cc-ui-settings h1 {
        margin: 0;
        color: #f4faff;
        font-size: clamp(31px, 4.5vw, 49px);
        line-height: .98;
        letter-spacing: -.055em;
    }

    #cc-ui-settings .set-hero p {
        max-width: 700px;
        margin: 13px 0 0;
        color: var(--set-muted);
        font-size: 14px;
        line-height: 1.65;
    }

    #cc-ui-settings .set-saved {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin-top: 14px;
        min-height: 26px;
        padding: 5px 9px;
        border: 1px solid rgba(70, 227, 161, .24);
        border-radius: 999px;
        color: #c7ffe6;
        background: rgba(16, 107, 74, .18);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    #cc-ui-settings .set-saved::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #46e3a1;
        box-shadow: 0 0 10px rgba(70, 227, 161, .82);
    }

    #cc-ui-settings .set-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.22fr) minmax(310px, .78fr);
        gap: 16px;
        align-items: start;
    }

    #cc-ui-settings .set-panel {
        padding: 20px;
        border: 1px solid var(--set-line);
        border-radius: 17px;
        background: linear-gradient(155deg, rgba(16, 38, 74, .90), rgba(8, 20, 43, .88));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 40px rgba(3, 10, 25, .18);
    }

    #cc-ui-settings .set-panel + .set-panel { margin-top: 16px; }

    #cc-ui-settings .set-panel-title {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    #cc-ui-settings .set-panel-title h2 {
        margin: 5px 0 0;
        color: #f2f8ff;
        font-size: 21px;
        letter-spacing: -.025em;
    }

    #cc-ui-settings .set-panel-title p {
        margin: 6px 0 0;
        color: #95aac4;
        font-size: 12px;
        line-height: 1.55;
    }

    #cc-ui-settings .theme-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #cc-ui-settings .theme-card,
    #cc-ui-settings .choice-button,
    #cc-ui-settings .set-action {
        border: 1px solid rgba(142, 184, 230, .21);
        color: #d8e8f8;
        background: rgba(7, 20, 44, .50);
        cursor: pointer;
        transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
    }

    #cc-ui-settings .theme-card {
        position: relative;
        min-height: 114px;
        overflow: hidden;
        padding: 14px;
        border-radius: 12px;
        text-align: left;
    }

    #cc-ui-settings .theme-card::before {
        content: '';
        position: absolute;
        top: -40px;
        right: -35px;
        width: 120px;
        height: 120px;
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 50%;
        opacity: .55;
    }

    #cc-ui-settings .theme-card:hover,
    #cc-ui-settings .choice-button:hover,
    #cc-ui-settings .set-action:hover {
        transform: translateY(-1px);
        border-color: color-mix(in srgb, var(--set-accent) 52%, transparent);
        background: rgba(18, 53, 94, .66);
    }

    #cc-ui-settings .theme-card.is-selected,
    #cc-ui-settings .choice-button.is-selected {
        border-color: color-mix(in srgb, var(--set-accent) 62%, transparent);
        background: linear-gradient(135deg, color-mix(in srgb, var(--set-accent) 20%, transparent), color-mix(in srgb, var(--set-accent-2) 18%, transparent));
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--set-accent) 13%, transparent), 0 0 22px color-mix(in srgb, var(--set-accent) 14%, transparent);
    }

    #cc-ui-settings .theme-card strong {
        position: relative;
        z-index: 1;
        display: block;
        color: #f4faff;
        font-size: 13px;
    }

    #cc-ui-settings .theme-card span {
        position: relative;
        z-index: 1;
        display: block;
        margin-top: 5px;
        color: #a7bdd5;
        font-size: 11px;
        line-height: 1.45;
    }

    #cc-ui-settings .theme-card--deep { background: linear-gradient(145deg, #0b2647, #0a1433); }
    #cc-ui-settings .theme-card--aurora { background: linear-gradient(145deg, #113b46, #30153f); }
    #cc-ui-settings .theme-card--ai { background: linear-gradient(145deg, #0a345a, #0b1c45); }
    #cc-ui-settings .theme-card--comfort { background: linear-gradient(145deg, #18375f, #0c1c35); }
    #cc-ui-settings .theme-card--ember { background: linear-gradient(145deg, #42232a, #21112a); }
    #cc-ui-settings .theme-card--glacier { background: linear-gradient(145deg, #123b5a, #0b1d3a); }

    #cc-ui-settings .set-control-row {
        display: grid;
        grid-template-columns: 148px minmax(0, 1fr);
        gap: 14px;
        align-items: center;
        padding: 13px 0;
        border-top: 1px solid rgba(142, 184, 230, .13);
    }

    #cc-ui-settings .set-control-row:first-of-type {
        padding-top: 0;
        border-top: 0;
    }

    #cc-ui-settings .set-control-copy strong {
        display: block;
        color: #eaf4ff;
        font-size: 13px;
    }

    #cc-ui-settings .set-control-copy span {
        display: block;
        margin-top: 4px;
        color: #91a7c1;
        font-size: 11px;
        line-height: 1.45;
    }

    #cc-ui-settings .choice-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
    }

    #cc-ui-settings .choice-button {
        min-height: 34px;
        padding: 7px 10px;
        border-radius: 9px;
        font-size: 11px;
        font-weight: 850;
    }

    #cc-ui-settings .set-select {
        width: 100%;
        min-height: 38px;
        padding: 8px 10px;
        border: 1px solid rgba(142, 184, 230, .23);
        border-radius: 9px;
        outline: none;
        color: #eaf4ff;
        background: rgba(5, 17, 37, .68);
        font: inherit;
        font-size: 12px;
    }

    #cc-ui-settings .set-select:focus {
        border-color: color-mix(in srgb, var(--set-accent) 68%, transparent);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--set-accent) 11%, transparent);
    }

    #cc-ui-settings .set-select option {
        color: #eaf4ff;
        background: #102344;
    }

    #cc-ui-settings .toggle-line {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 9px;
    }

    #cc-ui-settings .toggle-line span {
        color: #b7c9dc;
        font-size: 11px;
        font-weight: 800;
    }

    #cc-ui-settings .toggle-input {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    #cc-ui-settings .toggle {
        position: relative;
        display: inline-block;
        width: 46px;
        height: 26px;
        flex: 0 0 46px;
        border: 1px solid rgba(142, 184, 230, .25);
        border-radius: 999px;
        background: rgba(5, 17, 37, .68);
        cursor: pointer;
        transition: .18s ease;
    }

    #cc-ui-settings .toggle::after {
        content: '';
        position: absolute;
        top: 4px;
        left: 4px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #91a9c3;
        transition: .18s ease;
    }

    #cc-ui-settings .toggle-input:checked + .toggle {
        border-color: color-mix(in srgb, var(--set-accent) 54%, transparent);
        background: linear-gradient(90deg, color-mix(in srgb, var(--set-accent) 38%, transparent), color-mix(in srgb, var(--set-accent-2) 32%, transparent));
        box-shadow: 0 0 16px color-mix(in srgb, var(--set-accent) 15%, transparent);
    }

    #cc-ui-settings .toggle-input:checked + .toggle::after {
        left: 24px;
        background: #effcff;
    }

    #cc-ui-settings .preview-panel {
        position: relative;
        min-height: 298px;
        overflow: hidden;
        padding: 18px;
        border: 1px dashed rgba(142, 184, 230, .24);
        border-radius: 13px;
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--set-accent) 4%, transparent), transparent 40%),
            rgba(4, 15, 33, .47);
    }

    #cc-ui-settings .preview-panel::after {
        content: '';
        position: absolute;
        right: 20px;
        bottom: 18px;
        width: 125px;
        height: 125px;
        border: 1px solid color-mix(in srgb, var(--set-accent) 20%, transparent);
        border-radius: 50%;
        box-shadow:
            0 0 0 24px color-mix(in srgb, var(--set-accent) 2%, transparent),
            0 0 0 48px color-mix(in srgb, var(--set-accent-2) 2%, transparent);
        pointer-events: none;
    }

    #cc-ui-settings .preview-mark {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border: 1px solid color-mix(in srgb, var(--set-accent) 48%, transparent);
        border-radius: 12px;
        color: #eefbff;
        background: linear-gradient(145deg, color-mix(in srgb, var(--set-accent) 28%, transparent), color-mix(in srgb, var(--set-accent-2) 25%, transparent));
        box-shadow: 0 0 22px color-mix(in srgb, var(--set-accent) 22%, transparent);
        font-size: 13px;
        font-weight: 900;
    }

    #cc-ui-settings .preview-panel h3 {
        margin: 17px 0 6px;
        color: #f3faff;
        font-size: 20px;
        letter-spacing: -.03em;
    }

    #cc-ui-settings .preview-panel p {
        max-width: 280px;
        margin: 0;
        color: #9eb2c9;
        font-size: 12px;
        line-height: 1.6;
    }

    #cc-ui-settings .preview-meta {
        position: relative;
        z-index: 1;
        display: grid;
        gap: 8px;
        margin-top: 18px;
    }

    #cc-ui-settings .preview-meta div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-top: 8px;
        border-top: 1px solid rgba(142, 184, 230, .13);
    }

    #cc-ui-settings .preview-meta span {
        color: #89a3c0;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    #cc-ui-settings .preview-meta strong {
        color: #d9e9f9;
        font-size: 11px;
        text-align: right;
    }

    #cc-ui-settings .set-reset {
        width: 100%;
        margin-top: 16px;
        min-height: 40px;
        padding: 9px 12px;
        border: 1px solid rgba(255, 200, 107, .28);
        border-radius: 10px;
        color: #ffe6b8;
        background: rgba(129, 80, 14, .17);
        font: inherit;
        font-size: 12px;
        font-weight: 850;
        cursor: pointer;
        transition: .18s ease;
    }

    #cc-ui-settings .set-reset:hover {
        border-color: rgba(255, 200, 107, .52);
        background: rgba(155, 98, 15, .28);
    }

    @media (max-width: 900px) {
        #cc-ui-settings { min-height: 0; }
        #cc-ui-settings .set-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 600px) {
        #cc-ui-settings { padding: 18px; border-radius: 15px; }
        #cc-ui-settings .set-panel { padding: 16px; }
        #cc-ui-settings .theme-grid { grid-template-columns: 1fr; }
        #cc-ui-settings .set-control-row { grid-template-columns: 1fr; gap: 9px; }
        #cc-ui-settings .choice-group,
        #cc-ui-settings .toggle-line { justify-content: flex-start; }
    }


/* ---------- strategy.php ---------- */
#cc-strategy {
        --st-bg: #041326;
        --st-panel: rgba(8, 29, 58, .88);
        --st-panel-2: rgba(10, 38, 75, .88);
        --st-line: rgba(117, 199, 255, .18);
        --st-text: #f2f8ff;
        --st-muted: #9eb9d9;
        --st-dim: #6b86a7;
        --st-cyan: #6af0da;
        --st-blue: #76b6ff;
        --st-violet: #a18bff;
        position: relative;
        min-height: calc(100vh - 72px);
        padding: 28px;
        overflow: hidden;
        color: var(--st-text);
        background:
            radial-gradient(circle at 7% 0%, rgba(52, 152, 255, .23), transparent 29rem),
            radial-gradient(circle at 96% 15%, rgba(134, 101, 255, .16), transparent 26rem),
            linear-gradient(145deg, #061b37 0%, #031127 56%, #030b1c 100%);
    }

    #cc-strategy::before {
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        content: "";
        opacity: .28;
        background-image:
            linear-gradient(rgba(126, 207, 255, .11) 1px, transparent 1px),
            linear-gradient(90deg, rgba(126, 207, 255, .11) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 86%);
    }

    #cc-strategy * {
        box-sizing: border-box;
    }

    #cc-strategy .st-shell {
        position: relative;
        z-index: 1;
        max-width: 1460px;
        margin: 0 auto;
    }

    #cc-strategy h1,
    #cc-strategy h2,
    #cc-strategy h3,
    #cc-strategy p {
        margin: 0;
    }

    #cc-strategy .st-kicker,
    #cc-strategy .st-label {
        color: var(--st-cyan);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    #cc-strategy .st-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 22px;
        align-items: center;
        padding: 30px;
        border: 1px solid var(--st-line);
        border-radius: 22px;
        background:
            linear-gradient(135deg, rgba(15, 57, 106, .94), rgba(7, 26, 55, .86) 58%, rgba(7, 18, 43, .92));
        box-shadow: 0 22px 55px rgba(0,0,0,.26);
    }

    #cc-strategy .st-hero h1 {
        margin-top: 7px;
        font-size: clamp(32px, 4vw, 51px);
        line-height: .98;
        letter-spacing: -.055em;
    }

    #cc-strategy .st-hero p {
        max-width: 790px;
        margin-top: 14px;
        color: var(--st-muted);
        font-size: 15px;
        line-height: 1.62;
    }

    #cc-strategy .st-status {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        min-height: 42px;
        padding: 0 15px;
        border: 1px solid rgba(118, 182, 255, .31);
        border-radius: 999px;
        color: #c9e1ff;
        background: rgba(68, 135, 224, .11);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .07em;
        white-space: nowrap;
        text-transform: uppercase;
    }

    #cc-strategy .st-status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--st-blue);
        box-shadow: 0 0 12px rgba(118, 182, 255, .96);
    }

    #cc-strategy .st-callout {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        margin-top: 16px;
        padding: 18px 20px;
        border: 1px solid rgba(106, 240, 218, .27);
        border-radius: 16px;
        background: linear-gradient(90deg, rgba(31, 171, 159, .12), rgba(44, 75, 169, .10));
    }

    #cc-strategy .st-callout h2 {
        margin-top: 4px;
        font-size: 18px;
        letter-spacing: -.025em;
    }

    #cc-strategy .st-callout p {
        margin-top: 6px;
        color: var(--st-muted);
        font-size: 12px;
        line-height: 1.52;
    }

    #cc-strategy .st-callout-badge {
        flex: 0 0 auto;
        padding: 8px 11px;
        border: 1px solid rgba(106, 240, 218, .25);
        border-radius: 999px;
        color: #bafff1;
        background: rgba(40, 197, 168, .11);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    #cc-strategy .st-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr);
        gap: 16px;
        margin-top: 18px;
    }

    #cc-strategy .st-panel {
        border: 1px solid var(--st-line);
        border-radius: 18px;
        background: var(--st-panel);
        box-shadow: 0 18px 42px rgba(0,0,0,.18);
        overflow: hidden;
    }

    #cc-strategy .st-panel-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        padding: 21px 22px 18px;
        border-bottom: 1px solid rgba(117, 199, 255, .12);
    }

    #cc-strategy .st-panel-head h2 {
        margin-top: 5px;
        font-size: 19px;
        letter-spacing: -.025em;
    }

    #cc-strategy .st-panel-head p {
        max-width: 570px;
        margin-top: 7px;
        color: var(--st-muted);
        font-size: 12px;
        line-height: 1.55;
    }

    #cc-strategy .st-module-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 16px;
    }

    #cc-strategy .st-module {
        position: relative;
        min-height: 177px;
        padding: 18px;
        border: 1px solid rgba(117, 199, 255, .15);
        border-radius: 16px;
        overflow: hidden;
        background: linear-gradient(145deg, rgba(17, 54, 99, .57), rgba(6, 23, 50, .77));
    }

    #cc-strategy .st-module::after {
        position: absolute;
        right: -50px;
        bottom: -58px;
        width: 145px;
        height: 145px;
        border: 1px solid rgba(116, 227, 255, .14);
        border-radius: 50%;
        content: "";
    }

    #cc-strategy .st-module:nth-child(2)::after {
        border-color: rgba(161, 129, 255, .18);
    }

    #cc-strategy .st-module:nth-child(3)::after {
        border-color: rgba(100, 238, 207, .17);
    }

    #cc-strategy .st-module-number {
        color: rgba(160, 211, 255, .55);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .12em;
    }

    #cc-strategy .st-module h3 {
        position: relative;
        z-index: 1;
        margin-top: 18px;
        font-size: 17px;
        letter-spacing: -.024em;
    }

    #cc-strategy .st-module p {
        position: relative;
        z-index: 1;
        margin-top: 8px;
        color: var(--st-muted);
        font-size: 12px;
        line-height: 1.54;
    }

    #cc-strategy .st-module-state {
        position: relative;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin-top: 15px;
        color: #a9c7eb;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    #cc-strategy .st-module-state i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--st-violet);
        box-shadow: 0 0 10px rgba(161, 139, 255, .9);
    }

    #cc-strategy .st-side {
        display: grid;
        gap: 16px;
    }

    #cc-strategy .st-side-card {
        padding: 20px;
        border: 1px solid var(--st-line);
        border-radius: 18px;
        background: var(--st-panel);
        box-shadow: 0 18px 42px rgba(0,0,0,.18);
    }

    #cc-strategy .st-side-card h2 {
        margin-top: 5px;
        font-size: 18px;
        letter-spacing: -.025em;
    }

    #cc-strategy .st-side-card p {
        margin-top: 9px;
        color: var(--st-muted);
        font-size: 12px;
        line-height: 1.55;
    }

    #cc-strategy .st-list {
        display: grid;
        gap: 11px;
        margin: 17px 0 0;
        padding: 0;
        list-style: none;
    }

    #cc-strategy .st-list li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        color: #c9ddf6;
        font-size: 12px;
        line-height: 1.47;
    }

    #cc-strategy .st-list i {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        margin-top: -1px;
        border: 1px solid rgba(106, 240, 218, .36);
        border-radius: 50%;
        background: rgba(106, 240, 218, .10);
    }

    #cc-strategy .st-list i::before {
        display: block;
        margin: -2px 0 0 4px;
        color: var(--st-cyan);
        font-size: 13px;
        font-weight: 900;
        content: "+";
    }

    #cc-strategy .st-sequence {
        display: grid;
        gap: 10px;
        margin-top: 17px;
    }

    #cc-strategy .st-step {
        display: grid;
        grid-template-columns: 27px 1fr;
        gap: 10px;
        align-items: start;
        padding: 11px 0;
        border-bottom: 1px solid rgba(117, 199, 255, .11);
    }

    #cc-strategy .st-step:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    #cc-strategy .st-step-number {
        display: grid;
        width: 27px;
        height: 27px;
        place-items: center;
        border: 1px solid rgba(118, 182, 255, .36);
        border-radius: 50%;
        color: #c3dcff;
        background: rgba(90, 149, 233, .12);
        font-size: 11px;
        font-weight: 800;
    }

    #cc-strategy .st-step strong,
    #cc-strategy .st-step span {
        display: block;
    }

    #cc-strategy .st-step strong {
        color: #ebf5ff;
        font-size: 12px;
    }

    #cc-strategy .st-step span {
        margin-top: 3px;
        color: var(--st-dim);
        font-size: 11px;
        line-height: 1.42;
    }

    #cc-strategy .st-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin-top: 18px;
        padding: 22px;
        border: 1px solid rgba(106, 240, 218, .25);
        border-radius: 18px;
        background: linear-gradient(90deg, rgba(31, 170, 158, .14), rgba(55, 67, 150, .10)), rgba(6, 28, 55, .84);
        box-shadow: 0 18px 42px rgba(0,0,0,.18);
    }

    #cc-strategy .st-footer h2 {
        margin-top: 5px;
        font-size: 20px;
        letter-spacing: -.025em;
    }

    #cc-strategy .st-footer p {
        margin-top: 7px;
        color: var(--st-muted);
        font-size: 12px;
        line-height: 1.55;
    }

    #cc-strategy .st-footer-tag {
        flex: 0 0 auto;
        padding: 9px 12px;
        border: 1px solid rgba(118, 182, 255, .30);
        border-radius: 999px;
        color: #c8e0ff;
        background: rgba(74, 130, 218, .11);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    @media (max-width: 1040px) {
        #cc-strategy .st-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 760px) {
        #cc-strategy {
            padding: 16px;
        }

        #cc-strategy .st-hero,
        #cc-strategy .st-callout,
        #cc-strategy .st-footer,
        #cc-strategy .st-panel-head {
            align-items: flex-start;
            flex-direction: column;
        }

        #cc-strategy .st-module-grid {
            grid-template-columns: 1fr;
        }
    }


/* ---------- weekly.php ---------- */
/* Weekly Generator background activity panel. Scoped to this page only. */
.wc-command-center .wc-activity-panel {
    margin-top: 16px;
    border: 1px solid rgba(107, 202, 255, .24);
    border-radius: 13px;
    background: rgba(5, 22, 46, .58);
    overflow: hidden;
}
.wc-command-center .wc-activity-toggle {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d8ebff;
    text-align: left;
}
.wc-command-center .wc-activity-toggle:hover {
    background: rgba(39, 151, 218, .08);
}
.wc-command-center .wc-activity-title-wrap {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}
.wc-command-center .wc-activity-orb {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #6b88a7;
    box-shadow: 0 0 0 4px rgba(107, 136, 167, .11);
}
.wc-command-center .wc-activity-panel.is-running .wc-activity-orb {
    background: var(--wc-cyan);
    box-shadow: 0 0 0 4px rgba(55, 217, 255, .12), 0 0 14px rgba(55, 217, 255, .78);
    animation: wcActivityPulse 1.2s ease-in-out infinite;
}
.wc-command-center .wc-activity-panel.is-complete .wc-activity-orb {
    background: var(--wc-green);
    box-shadow: 0 0 0 4px rgba(70, 227, 161, .11), 0 0 14px rgba(70, 227, 161, .58);
}
.wc-command-center .wc-activity-panel.is-error .wc-activity-orb {
    background: var(--wc-rose);
    box-shadow: 0 0 0 4px rgba(255, 124, 165, .11), 0 0 14px rgba(255, 124, 165, .58);
}
.wc-command-center .wc-activity-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #85a9cf;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.wc-command-center .wc-activity-panel strong {
    display: block;
    overflow: hidden;
    color: #edf8ff;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wc-command-center .wc-activity-toggle-copy {
    flex: 0 0 auto;
    color: #8ee6ff;
    font-size: 11px;
    font-weight: 900;
}
.wc-command-center .wc-activity-details {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(137, 185, 231, .14);
}
.wc-command-center .wc-activity-current {
    margin: 12px 0 11px;
    padding: 10px;
    border: 1px solid rgba(62, 193, 255, .17);
    border-radius: 9px;
    background: rgba(24, 78, 123, .17);
    color: #c6e8ff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}
.wc-command-center .wc-activity-steps {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wc-command-center .wc-activity-steps li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #88a6c5;
    font-size: 11px;
    line-height: 1.35;
}
.wc-command-center .wc-activity-step-mark {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    border: 1px solid rgba(139, 177, 219, .22);
    border-radius: 6px;
    background: rgba(9, 30, 59, .62);
    color: #8da9c8;
    font-size: 10px;
    font-weight: 900;
}
.wc-command-center .wc-activity-steps li.is-active {
    color: #ecf8ff;
    font-weight: 800;
}
.wc-command-center .wc-activity-steps li.is-active .wc-activity-step-mark {
    border-color: rgba(55, 217, 255, .58);
    background: rgba(24, 133, 187, .24);
    color: #e5fbff;
    box-shadow: 0 0 14px rgba(55, 217, 255, .20);
}
.wc-command-center .wc-activity-steps li.is-done {
    color: #b9efd5;
}
.wc-command-center .wc-activity-steps li.is-done .wc-activity-step-mark {
    border-color: rgba(70, 227, 161, .40);
    background: rgba(27, 139, 89, .19);
    color: #b8ffe1;
}
.wc-command-center .wc-activity-steps li.is-done .wc-activity-step-mark::before { content: '✓'; }
.wc-command-center .wc-activity-steps li.is-done .wc-activity-step-mark { font-size: 0; }
.wc-command-center .wc-activity-steps li.is-done .wc-activity-step-mark::before { font-size: 12px; }
.wc-command-center .wc-activity-steps li.is-error {
    color: #ffc1d6;
    font-weight: 800;
}
.wc-command-center .wc-activity-steps li.is-error .wc-activity-step-mark {
    border-color: rgba(255, 124, 165, .45);
    background: rgba(146, 34, 77, .19);
    color: #ffd1df;
}
.wc-command-center .wc-activity-error {
    margin: 12px 0 0;
    padding: 10px;
    border: 1px solid rgba(255, 124, 165, .30);
    border-radius: 9px;
    background: rgba(126, 22, 62, .17);
    color: #ffc6d9;
    font-size: 11px;
    line-height: 1.45;
}
@keyframes wcActivityPulse { 50% { transform: scale(.74); opacity: .58; } }
@media (max-width: 520px) {
    .wc-command-center .wc-activity-toggle { align-items: flex-start; }
    .wc-command-center .wc-activity-panel strong { white-space: normal; }
}


/* ============================================================================
   CHADY COACH — GLOBAL APP SHELL
   One source of truth for page width, global typography, themes, density,
   sidebar behavior, desktop fit, and mobile responsiveness.
   ============================================================================ */

:root,
html[data-cc-theme="midnight"] {
    --cc-font-family: "Segoe UI Variable", "Aptos", "Segoe UI", Arial, sans-serif;
    --cc-text-scale: 1;
    --cc-canvas: #07111f;
    --cc-canvas-2: #0a1c31;
    --cc-sidebar: #09182a;
    --cc-surface: #102742;
    --cc-surface-strong: #0b1b30;
    --cc-surface-soft: #163451;
    --cc-surface-hover: #1d405f;
    --cc-input: #0a1a2d;
    --cc-border: #315775;
    --cc-border-strong: #61b5df;
    --cc-text: #f3f8ff;
    --cc-muted: #c4d2e0;
    --cc-subtle: #96adc0;
    --cc-accent: #62dcff;
    --cc-accent-2: #9e8cff;
    --cc-accent-soft: rgba(98, 220, 255, .15);
    --cc-focus: rgba(98, 220, 255, .34);
    --cc-success: #62d99f;
    --cc-warning: #ffc66d;
    --cc-danger: #ff809d;
    --cc-on-accent: #03111d;
    --cc-shadow: 0 14px 36px rgba(0,0,0,.22);
    color-scheme: dark;
}

html[data-cc-theme="aurora"] {
    --cc-canvas: #11112a;
    --cc-canvas-2: #1b1841;
    --cc-sidebar: #151534;
    --cc-surface: #272552;
    --cc-surface-strong: #1a193a;
    --cc-surface-soft: #312d65;
    --cc-surface-hover: #3b3676;
    --cc-input: #181735;
    --cc-border: #645da1;
    --cc-border-strong: #ae9dff;
    --cc-text: #fbfaff;
    --cc-muted: #d4cfeb;
    --cc-subtle: #aaa5cc;
    --cc-accent: #72efcf;
    --cc-accent-2: #cb8aff;
    --cc-accent-soft: rgba(114, 239, 207, .15);
    --cc-focus: rgba(114, 239, 207, .34);
    --cc-success: #78e3af;
    --cc-warning: #ffd477;
    --cc-danger: #ff91b6;
    --cc-on-accent: #07131d;
    --cc-shadow: 0 14px 36px rgba(0,0,0,.25);
    color-scheme: dark;
}

html[data-cc-theme="ai"] {
    --cc-canvas: #041024;
    --cc-canvas-2: #071830;
    --cc-sidebar: #0b1b38;
    --cc-surface: #12264d;
    --cc-surface-strong: #0a1a35;
    --cc-surface-soft: #19355f;
    --cc-surface-hover: #214573;
    --cc-input: #071a33;
    --cc-border: #315f95;
    --cc-border-strong: #58b5e6;
    --cc-text: #f2f8ff;
    --cc-muted: #b5c8e6;
    --cc-subtle: #8faacb;
    --cc-accent: #43e0ff;
    --cc-accent-2: #5797ff;
    --cc-accent-soft: rgba(67, 224, 255, .15);
    --cc-focus: rgba(67, 224, 255, .26);
    --cc-success: #58eab3;
    --cc-warning: #ffd574;
    --cc-danger: #ff83ae;
    --cc-on-accent: #07131d;
    --cc-shadow: 0 16px 42px rgba(0,0,0,.28);
    color-scheme: dark;
}

html[data-cc-theme="ember"] {
    --cc-canvas: #241015;
    --cc-canvas-2: #35161c;
    --cc-sidebar: #281116;
    --cc-surface: #412127;
    --cc-surface-strong: #2c151b;
    --cc-surface-soft: #522a2d;
    --cc-surface-hover: #663631;
    --cc-input: #2b151b;
    --cc-border: #8b5751;
    --cc-border-strong: #ed9a78;
    --cc-text: #fff8f4;
    --cc-muted: #ecd1c7;
    --cc-subtle: #c9a59b;
    --cc-accent: #ffc072;
    --cc-accent-2: #ff7e98;
    --cc-accent-soft: rgba(255, 192, 114, .16);
    --cc-focus: rgba(255, 192, 114, .36);
    --cc-success: #81ddae;
    --cc-warning: #ffd47f;
    --cc-danger: #ff899f;
    --cc-on-accent: #281005;
    --cc-shadow: 0 14px 36px rgba(32,7,7,.26);
    color-scheme: dark;
}

html[data-cc-theme="comfort"] {
    --cc-canvas: #0c1c35;
    --cc-canvas-2: #0d2341;
    --cc-sidebar: #10294a;
    --cc-surface: #18375f;
    --cc-surface-strong: #0d2341;
    --cc-surface-soft: #20466f;
    --cc-surface-hover: #2a5784;
    --cc-input: #0d2341;
    --cc-border: #38608d;
    --cc-border-strong: #91c5ff;
    --cc-text: #f6f8fb;
    --cc-muted: #d4e4f6;
    --cc-subtle: #b7cce4;
    --cc-accent: #7eb2e6;
    --cc-accent-2: #91c5ff;
    --cc-accent-soft: rgba(126, 178, 230, .16);
    --cc-focus: rgba(145, 197, 255, .34);
    --cc-success: #78c995;
    --cc-warning: #ffd18a;
    --cc-danger: #ff9aa8;
    --cc-on-accent: #071327;
    --cc-shadow: 0 14px 36px rgba(3, 14, 31, .30);
    color-scheme: dark;
}

html[data-cc-theme="glacier"] {
    --cc-canvas: #e8f2f9;
    --cc-canvas-2: #d9e9f4;
    --cc-sidebar: #edf6fc;
    --cc-surface: #ffffff;
    --cc-surface-strong: #f5fbff;
    --cc-surface-soft: #e8f3fb;
    --cc-surface-hover: #dcecf7;
    --cc-input: #ffffff;
    --cc-border: #bdd4e4;
    --cc-border-strong: #5e98bc;
    --cc-text: #10233a;
    --cc-muted: #46627b;
    --cc-subtle: #668096;
    --cc-accent: #0f80b9;
    --cc-accent-2: #5e65c9;
    --cc-accent-soft: rgba(15, 128, 185, .12);
    --cc-focus: rgba(15, 128, 185, .30);
    --cc-success: #1d8b5c;
    --cc-warning: #a96314;
    --cc-danger: #bb315b;
    --cc-on-accent: #ffffff;
    --cc-shadow: 0 14px 36px rgba(24,57,84,.12);
    color-scheme: light;
}

html[data-cc-font="command-sans"] { --cc-font-family: "Segoe UI Variable", "Aptos", "Segoe UI", Arial, sans-serif; }
html[data-cc-font="wide-display"] { --cc-font-family: Bahnschrift, "Avenir Next", "Trebuchet MS", Arial, sans-serif; }
html[data-cc-font="tech-mono"] { --cc-font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace; }

html[data-cc-scale="small"] { --cc-text-scale: .90; }
html[data-cc-scale="standard"],
html[data-cc-scale="comfort"] { --cc-text-scale: 1; }
html[data-cc-scale="large"] { --cc-text-scale: 1.18; }
html[data-cc-scale="extra-large"] { --cc-text-scale: 1.32; }

html,
body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
}

body,
#app,
#app :is(button, input, select, textarea) {
    font-family: var(--cc-font-family) !important;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 92% -8%, var(--cc-accent-soft), transparent 34%),
        linear-gradient(145deg, var(--cc-canvas-2), var(--cc-canvas));
    color: var(--cc-text);
    font-size: calc(16px * var(--cc-text-scale));
    line-height: 1.55;
}

#app {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
    background: transparent;
}

#main-content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 100dvh;
    padding: 24px clamp(22px, 2.25vw, 38px);
    overflow-x: hidden;
    background:
        radial-gradient(circle at 100% 0%, var(--cc-accent-soft), transparent 28%),
        linear-gradient(145deg, color-mix(in srgb, var(--cc-canvas-2) 88%, transparent), var(--cc-canvas));
}

/* One full-width page canvas for every route. */
#main-content > :is(
    #cc-dashboard,
    #cc-activity,
    #cc-build-from-idea,
    #cc-generator,
    #mxf-library,
    #cc-reviewer,
    #cc-ui-settings,
    #cc-strategy,
    #cc-reports,
    .wc-command-center
) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100dvh - 48px) !important;
    margin: 0 !important;
}

/* Page containers receive the same theme surface without changing inner content. */
#main-content > :is(
    #cc-dashboard,
    #cc-activity,
    #cc-build-from-idea,
    #cc-generator,
    #mxf-library,
    #cc-reviewer,
    #cc-ui-settings,
    #cc-strategy,
    #cc-reports,
    .wc-command-center
) {
    color: var(--cc-text) !important;
    border-color: var(--cc-border) !important;
    background:
        radial-gradient(circle at 7% 0%, var(--cc-accent-soft), transparent 30%),
        radial-gradient(circle at 96% 12%, color-mix(in srgb, var(--cc-accent-2) 16%, transparent), transparent 30%),
        linear-gradient(145deg, var(--cc-surface-strong), var(--cc-canvas)) !important;
    box-shadow: var(--cc-shadow) !important;
}

/* Feed module-specific tokens from the global palette. */
#cc-dashboard { --db-ink: var(--cc-text); --db-muted: var(--cc-muted); --db-line: var(--cc-border); --db-cyan: var(--cc-accent); --db-violet: var(--cc-accent-2); --db-glow: var(--cc-accent-soft); }
#cc-ui-settings { --set-ink: var(--cc-text); --set-muted: var(--cc-muted); --set-line: var(--cc-border); --set-panel: var(--cc-surface); --set-accent: var(--cc-accent); --set-accent-2: var(--cc-accent-2); --set-soft: var(--cc-accent-soft); }
#cc-build-from-idea,
#cc-generator { --cc-ink: var(--cc-text); --cc-muted: var(--cc-muted); --cc-line: var(--cc-border); --cc-panel: var(--cc-surface); --cc-panel-deep: var(--cc-surface-strong); --cc-cyan: var(--cc-accent); --cc-violet: var(--cc-accent-2); --cc-green: var(--cc-success); }
#cc-reviewer { --rv-ink: var(--cc-text); --rv-muted: var(--cc-muted); --rv-line: var(--cc-border); --rv-cyan: var(--cc-accent); --rv-violet: var(--cc-accent-2); --rv-glow: var(--cc-accent-soft); }
#cc-strategy { --st-bg: var(--cc-canvas); --st-panel: var(--cc-surface); --st-panel-2: var(--cc-surface-soft); --st-line: var(--cc-border); --st-text: var(--cc-text); --st-muted: var(--cc-muted); --st-dim: var(--cc-subtle); --st-cyan: var(--cc-accent); --st-blue: var(--cc-accent); --st-violet: var(--cc-accent-2); }

/* Global type hierarchy. Page-level px values can no longer make Settings or
   any other route tiny after the user selects a size. */
#main-content :is(h1, h2, h3, h4, h5, h6, strong, th, legend) {
    color: var(--cc-text) !important;
    font-family: var(--cc-font-family) !important;
}

#main-content h1 {
    font-size: clamp(calc(30px * var(--cc-text-scale)), calc(3.1vw * var(--cc-text-scale)), calc(50px * var(--cc-text-scale))) !important;
    line-height: 1.08 !important;
    letter-spacing: -.035em !important;
}

#main-content h2 {
    font-size: clamp(calc(22px * var(--cc-text-scale)), calc(1.8vw * var(--cc-text-scale)), calc(32px * var(--cc-text-scale))) !important;
    line-height: 1.2 !important;
}

#main-content h3 {
    font-size: clamp(calc(18px * var(--cc-text-scale)), calc(1.35vw * var(--cc-text-scale)), calc(24px * var(--cc-text-scale))) !important;
    line-height: 1.28 !important;
}

#main-content :is(p, li, td, th, label, input, select, textarea, button, a, small) {
    font-family: var(--cc-font-family) !important;
}

#main-content :is(p, li, td, label, input, select, textarea, button, a) {
    font-size: calc(15px * var(--cc-text-scale)) !important;
    line-height: 1.55 !important;
}

#main-content :is(small, [class*="label"], [class*="kicker"], [class*="eyebrow"], [class*="meta"], [class*="hint"], [class*="note"], [class*="muted"], [class*="subtle"]) {
    color: var(--cc-muted) !important;
    font-size: calc(11px * var(--cc-text-scale)) !important;
    line-height: 1.42 !important;
    letter-spacing: .02em !important;
}

/* Setting page typography: this fixes the exact screenshot problem. */
#cc-ui-settings .set-eyebrow,
#cc-ui-settings .set-label,
#cc-ui-settings .set-control-copy span,
#cc-ui-settings .toggle-line span,
#cc-ui-settings .preview-meta span {
    font-size: calc(12px * var(--cc-text-scale)) !important;
    line-height: 1.42 !important;
}

#cc-ui-settings .set-control-copy strong,
#cc-ui-settings .preview-meta strong,
#cc-ui-settings .theme-card strong,
#cc-ui-settings .choice-button,
#cc-ui-settings .set-action,
#cc-ui-settings .set-select {
    font-size: calc(15px * var(--cc-text-scale)) !important;
    line-height: 1.3 !important;
}

#cc-ui-settings .theme-card span,
#cc-ui-settings .set-panel-title p,
#cc-ui-settings .set-hero p,
#cc-ui-settings .preview-panel p {
    font-size: calc(14px * var(--cc-text-scale)) !important;
    line-height: 1.55 !important;
}

/* Inputs, selectors, cards, and buttons all follow the global palette. */
#main-content :is(input, select, textarea) {
    min-height: 44px !important;
    border-color: var(--cc-border-strong) !important;
    background: var(--cc-input) !important;
    color: var(--cc-text) !important;
    border-radius: 10px !important;
}

#main-content :is(input, select, textarea)::placeholder {
    color: var(--cc-subtle) !important;
    opacity: 1;
}

#main-content :is(input, select, textarea):focus {
    border-color: var(--cc-accent) !important;
    outline: 3px solid var(--cc-focus) !important;
    outline-offset: 1px;
    box-shadow: none !important;
}

#main-content :is(button, .button, .btn, .choice-button, .theme-card, .set-action, .set-reset,
    .primary-btn, .secondary-btn, .strategy-btn, .wc-button, .wc-ghost-button,
    .ca-button, .ca-ghost-button, .ca-danger-button, .module-card a) {
    min-height: 42px !important;
    border-color: var(--cc-border-strong) !important;
    background: var(--cc-surface-soft) !important;
    color: var(--cc-text) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

#main-content :is(.primary-btn, .strategy-btn, .wc-button, .ca-button, .module-card a, .set-action--primary) {
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent-2)) !important;
    color: var(--cc-on-accent) !important;
    box-shadow: 0 9px 20px var(--cc-accent-soft) !important;
}

#main-content :is(.dashboard-header, .stat-card, .module-card, .form-card, .table-card,
    .set-panel, .preview-panel, .theme-card, .choice-button, .wc-topbar, .wc-hero,
    .wc-panel, .wc-plan-card, .wc-status-card, .wc-intelligence-card, .wc-side-intel,
    .ca-topbar, .ca-hero, .ca-tabs, .ca-panel, .ca-history-card, .ca-thread-card,
    .ca-due-card, .ca-contact-result, .ca-thread-match, .ca-empty-state,
    .db-panel, .db-kpi, .rv-panel, .rv-card, .st-panel, .ur-builder-section,
    .ur-report-output, .mxf-panel, .mxf-summary-card) {
    border-color: var(--cc-border) !important;
    background: var(--cc-surface) !important;
    color: var(--cc-text) !important;
    box-shadow: var(--cc-shadow) !important;
}

#main-content :is(.dashboard-header p, .stat-card p, .stat-card span, .module-card p,
    .set-panel p, .set-control-copy span, .preview-panel p, .wc-panel p,
    .wc-plan-card p, .ca-panel-copy, .ca-history-message, .ca-thread-entry p,
    .ca-contact-result span, .ca-thread-match span, .rv-copy, .st-copy, .ur-copy,
    .mxf-panel p) {
    color: var(--cc-muted) !important;
}

/* Sidebar background/spacing. NOTE: on real desktop widths (901px+) the
   DESKTOP FIXED SIDEBAR block further down this file takes over width,
   position, and min/max-width entirely via --cc-desktop-sidebar-width -
   that is the single true source of the sidebar's width on desktop, and
   the draggable resize handle writes to that variable directly. This
   rule intentionally no longer sets width here to avoid ever having two
   competing width systems again. */
.cc-sidebar {
    min-height: 100dvh;
    height: 100dvh;
    padding: 16px 12px 14px !important;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    background:
        radial-gradient(circle at 0% 0%, var(--cc-accent-soft), transparent 34%),
        linear-gradient(180deg, color-mix(in srgb, var(--cc-sidebar) 92%, var(--cc-accent-2)), var(--cc-sidebar)) !important;
    box-shadow: 12px 0 32px rgba(0,0,0,.16) !important;
}

.cc-sidebar :is(.cc-sidebar-brand, .cc-sidebar-footer, .cc-appearance) {
    border-color: var(--cc-border) !important;
}

.cc-sidebar-logo-copy strong,
.cc-sidebar-link,
.cc-sidebar-link.is-active,
.cc-appearance-title {
    color: var(--cc-text) !important;
}

.cc-sidebar-logo-copy small,
.cc-sidebar-group-label,
.cc-sidebar-footer,
.cc-appearance-field {
    color: var(--cc-muted) !important;
}

.cc-sidebar-brand {
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    padding: 3px 4px 13px !important;
}

.cc-sidebar-logo {
    gap: 8px !important;
    min-width: 0;
}

.cc-sidebar-logo-mark {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    border-color: var(--cc-border-strong) !important;
    background: var(--cc-surface-strong) !important;
    color: var(--cc-accent) !important;
    border-radius: 10px !important;
    font-size: 10px !important;
}

.cc-sidebar-logo-copy strong {
    max-width: 126px !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.cc-sidebar-logo-copy small {
    max-width: 132px !important;
    overflow: hidden !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
    letter-spacing: .015em !important;
    text-overflow: ellipsis !important;
    text-transform: none !important;
    white-space: nowrap !important;
}

.cc-sidebar-version {
    margin-left: auto !important;
    padding: 4px 6px !important;
    border-color: var(--cc-border) !important;
    background: var(--cc-surface-strong) !important;
    color: var(--cc-muted) !important;
    font-size: 8px !important;
}

.cc-sidebar-nav {
    gap: 13px !important;
    padding: 0 1px 10px !important;
    overflow: visible !important;
}

.cc-sidebar-group { gap: 3px !important; }
.cc-sidebar-group-label {
    margin: 0 7px 4px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    letter-spacing: .02em !important;
    text-transform: none !important;
}

.cc-sidebar-link {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    min-height: 42px !important;
    gap: 9px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

.cc-sidebar-link:hover,
.cc-sidebar-link.is-active {
    border-color: var(--cc-border-strong) !important;
    background: var(--cc-surface-hover) !important;
    transform: none !important;
}

.cc-sidebar-link.is-active {
    display: flex !important;
    align-items: center !important;
    min-height: 58px !important;
    padding-inline: 12.5% !important;
    gap: 10px !important;
}

.cc-sidebar-link.is-active::before {
    left: -2px !important;
    width: 2px !important;
    height: 22px !important;
    background: linear-gradient(var(--cc-accent), var(--cc-accent-2)) !important;
    box-shadow: 0 0 12px var(--cc-accent-soft) !important;
}

.cc-sidebar-link-icon {
    width: 24px !important;
    height: 24px !important;
    border-color: var(--cc-border) !important;
    background: var(--cc-surface-strong) !important;
    color: var(--cc-accent) !important;
    border-radius: 8px !important;
}

.cc-sidebar-link-label {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.cc-appearance {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
    margin: 12px 1px 10px !important;
    padding: 11px !important;
    border-radius: 12px !important;
    background: var(--cc-surface-strong) !important;
}

.cc-appearance-title { grid-column: 1 / -1; font-size: 12px !important; }
.cc-appearance-field { gap: 4px !important; font-size: 10px !important; }
.cc-appearance select { min-height: 36px !important; padding: 6px 8px !important; font-size: 12px !important; }
.cc-sidebar-footer { min-height: 34px !important; margin: 0 1px !important; padding: 8px 10px !important; font-size: 10px !important; }

/* Density applies to every page canvas, not only one module. */
html[data-cc-density="compact"] #main-content { padding: 18px 22px; }
html[data-cc-density="compact"] #main-content > :is(#cc-dashboard,#cc-activity,#cc-build-from-idea,#cc-generator,#mxf-library,#cc-reviewer,#cc-ui-settings,#cc-strategy,#cc-reports,.wc-command-center) { padding: 20px !important; }
html[data-cc-density="comfortable"] #main-content > :is(#cc-dashboard,#cc-activity,#cc-build-from-idea,#cc-generator,#mxf-library,#cc-reviewer,#cc-ui-settings,#cc-strategy,#cc-reports,.wc-command-center) { padding: clamp(22px, 2.6vw, 34px) !important; }

/* Optional compact sidebar obeys Settings without changing the full layout. */
@media (min-width: 901px) {
    html[data-cc-sidebar="compact"] .cc-sidebar { width: 74px !important; flex-basis: 74px !important; padding: 16px 9px !important; }
    html[data-cc-sidebar="compact"] .cc-sidebar-logo-copy,
    html[data-cc-sidebar="compact"] .cc-sidebar-version,
    html[data-cc-sidebar="compact"] .cc-sidebar-group-label,
    html[data-cc-sidebar="compact"] .cc-sidebar-link-label,
    html[data-cc-sidebar="compact"] .cc-appearance,
    html[data-cc-sidebar="compact"] .cc-sidebar-footer { display: none !important; }
    html[data-cc-sidebar="compact"] .cc-sidebar-brand { justify-content: center !important; }
    html[data-cc-sidebar="compact"] .cc-sidebar-link,
    html[data-cc-sidebar="compact"] .cc-sidebar-link.is-active { display: grid !important; grid-template-columns: 1fr !important; justify-items: center !important; min-height: 44px !important; padding: 8px !important; }
}

html[data-cc-effects="off"] :is(
    .cc-sidebar::before,.cc-sidebar::after,#cc-dashboard::before,#cc-dashboard::after,
    #cc-ui-settings::before,#cc-ui-settings::after,#cc-build-from-idea::before,#cc-build-from-idea::after,
    #cc-generator::before,#cc-generator::after,#cc-reviewer::before,#cc-reviewer::after,
    #cc-strategy::before,#cc-strategy::after,#cc-activity::before,#cc-activity::after,
    .wc-command-center::before,.wc-command-center::after,#mxf-library::before,#mxf-library::after
) { display: none !important; }

html[data-cc-motion="reduced"] *,
html[data-cc-motion="reduced"] *::before,
html[data-cc-motion="reduced"] *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
}

/* Mobile compatibility for the whole application. */
@media (max-width: 900px) {
    #app { display: block !important; min-height: 100dvh; }

    .cc-sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        padding: 12px !important;
        overflow: visible !important;
        box-shadow: none !important;
    }

    .cc-sidebar::before,
    .cc-sidebar::after { display: none !important; }

    .cc-sidebar-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 0 !important;
    }

    .cc-sidebar-group { display: contents !important; }
    .cc-sidebar-group-label { display: none !important; }

    .cc-sidebar-link,
    .cc-sidebar-link.is-active {
        display: grid !important;
        grid-template-columns: 24px minmax(0, 1fr) !important;
        min-height: 48px !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .cc-sidebar-link.is-active::before { left: -1px !important; width: 2px !important; height: 24px !important; }
    .cc-sidebar-footer { display: none !important; }

    #main-content {
        width: 100% !important;
        min-height: auto;
        padding: 14px !important;
    }

    #main-content > :is(#cc-dashboard,#cc-activity,#cc-build-from-idea,#cc-generator,#mxf-library,#cc-reviewer,#cc-ui-settings,#cc-strategy,#cc-reports,.wc-command-center) {
        min-height: auto !important;
        padding: 16px !important;
        border-radius: 15px !important;
    }

    #main-content h1 {
        font-size: clamp(calc(28px * var(--cc-text-scale)), calc(8vw * var(--cc-text-scale)), calc(40px * var(--cc-text-scale))) !important;
    }

    #main-content :is(input,select,textarea,button) { font-size: 16px !important; }

    #main-content :is(.dashboard-header,.db-hero,.set-grid,.wc-hero,.wc-planner-layout,.wc-intelligence-layout,.wc-side-stack,.wc-history-row,.ca-hero,.ca-grid,.ca-hero-aside,.rv-grid,.st-grid,.ur-output-grid,.mxf-layout) {
        grid-template-columns: minmax(0,1fr) !important;
    }

    #main-content :is(.dashboard-header,.db-hero,.wc-topbar,.wc-tabs,.ca-topbar,.ca-tabs,.ca-panel-head,.ca-form-actions,.ca-filter-bar,.ca-card-actions,.set-panel-title,.set-control-row,.ur-topbar,.ur-hero) {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    #main-content :is(.stats-grid,.db-kpi-grid,.wc-status-grid,.wc-side-intel-grid,.wc-filter-grid,.wc-card-detail,.ca-stat-strip,.ca-choice-grid,.ca-choice-grid--four,.ca-field-grid,.theme-grid,.ur-settings-grid,.ur-summary-grid,.mxf-summary-grid) {
        grid-template-columns: minmax(0,1fr) !important;
    }

    #main-content :is(.ca-tab-list,.wc-tab-list,.db-tabs,.st-tabs,.ur-tabs) {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch;
    }

    #main-content :is(.ca-tab,.wc-tab,.db-tab,.st-tab,.ur-tab) { flex: 0 0 auto !important; white-space: nowrap !important; }

    #main-content :is(.ca-form-actions,.ca-card-actions,.wc-top-actions,.wc-card-actions,.wc-review-actions) > :is(button,a) { width: 100% !important; }

    #main-content :is(.table-card,.wc-case-table-wrap,.mxf-table-wrap,.ur-table-wrap,[class*="table-wrap"]) {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #main-content :is(table,.wc-case-table,.mxf-table,.ur-table) { min-width: 640px !important; }

    #main-content :is(dialog,[role="dialog"],[class*="modal"],[class*="dialog"]) {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 560px) {
    #main-content { padding: 10px !important; }
    .cc-sidebar { padding: 10px !important; }
    .cc-sidebar-nav { grid-template-columns: minmax(0,1fr) !important; }
    .cc-appearance { grid-template-columns: minmax(0,1fr) !important; }
    .cc-appearance-title { grid-column: auto !important; }
    #main-content > :is(#cc-dashboard,#cc-activity,#cc-build-from-idea,#cc-generator,#mxf-library,#cc-reviewer,#cc-ui-settings,#cc-strategy,#cc-reports,.wc-command-center) { padding: 13px !important; }
}

/* ============================================================================
   CHADY COACH — TYPOGRAPHY TRUTH SYSTEM
   Final global layer. Every page uses the same display, body, and label scale.
   Large increases small operational text first; it does not make only page
   titles oversized. This deliberately overrides every legacy fixed-pixel font.
   ============================================================================ */

:root,
html[data-cc-scale="standard"],
html[data-cc-scale="comfort"] {
    --cc-type-display: 1;
    --cc-type-heading: 1;
    --cc-type-body: 16px;
    --cc-type-ui: 15px;
    --cc-type-label: 12px;
    --cc-type-detail: 14px;
    --cc-type-page-title: clamp(34px, 3vw, 48px);
    --cc-type-section-title: clamp(24px, 1.9vw, 30px);
    --cc-type-card-title: clamp(19px, 1.35vw, 23px);
}

html[data-cc-scale="small"] {
    --cc-type-display: .92;
    --cc-type-heading: .94;
    --cc-type-body: 14px;
    --cc-type-ui: 14px;
    --cc-type-label: 11px;
    --cc-type-detail: 13px;
    --cc-type-page-title: clamp(31px, 2.8vw, 44px);
    --cc-type-section-title: clamp(22px, 1.7vw, 28px);
    --cc-type-card-title: clamp(18px, 1.25vw, 21px);
}

html[data-cc-scale="large"] {
    /* The old system enlarged the hero but left operational labels too small.
       Large now raises labels and body text more than display text. */
    --cc-type-display: 1.06;
    --cc-type-heading: 1.08;
    --cc-type-body: 18px;
    --cc-type-ui: 17px;
    --cc-type-label: 14px;
    --cc-type-detail: 16px;
    --cc-type-page-title: clamp(38px, 3.2vw, 54px);
    --cc-type-section-title: clamp(27px, 2vw, 34px);
    --cc-type-card-title: clamp(21px, 1.5vw, 26px);
}

html[data-cc-scale="extra-large"] {
    --cc-type-display: 1.12;
    --cc-type-heading: 1.15;
    --cc-type-body: 20px;
    --cc-type-ui: 19px;
    --cc-type-label: 16px;
    --cc-type-detail: 18px;
    --cc-type-page-title: clamp(42px, 3.45vw, 58px);
    --cc-type-section-title: clamp(30px, 2.2vw, 38px);
    --cc-type-card-title: clamp(24px, 1.65vw, 29px);
}

/* The full app, including pages written before the global system. */
body,
#app,
#app :is(button, input, select, textarea, option) {
    font-family: var(--cc-font-family) !important;
}

#main-content {
    font-size: var(--cc-type-body) !important;
    line-height: 1.55 !important;
}

/* Page and section hierarchy is shared across every route. */
#main-content h1,
#main-content [class$="-hero"] h1,
#main-content [class*="-hero"] > h1 {
    font-size: var(--cc-type-page-title) !important;
    line-height: 1.08 !important;
    letter-spacing: -.03em !important;
}

#main-content h2,
#main-content [class*="panel-title"],
#main-content [class*="section-heading"],
#main-content [class*="section-title"],
#main-content [class*="title-small"] {
    font-size: var(--cc-type-section-title) !important;
    line-height: 1.2 !important;
    letter-spacing: -.018em !important;
}

#main-content h3,
#main-content [class*="card-title"],
#main-content [class*="module-title"],
#main-content [class*="panel-heading"],
#main-content [class*="history-title"],
#main-content [class*="thread-title"] {
    font-size: var(--cc-type-card-title) !important;
    line-height: 1.28 !important;
}

/* Operational and explanatory text: one readable floor throughout the app. */
#main-content :is(
    p, li, td, th, dd, dt, label, input, select, textarea, button, a,
    .ca-panel-copy, .ca-history-message, .ca-thread-entry p, .ca-contact-result span,
    .ca-thread-match span, .ca-contact-lock span, .ca-history-detail span,
    .ca-history-next, .ca-thread-origin-copy, .wc-panel p, .wc-plan-card p,
    .wc-history-row p, .wc-empty-card span, .wc-side-intel p, .si-panel p,
    .si-list-item span, .si-action-card p, .set-hero p, .set-panel p,
    .set-control-copy span, .preview-panel p, .rv-copy, .rv-helper, .rv-note,
    .st-copy, .st-module p, .st-side-card p, .ur-copy, .ur-empty-state span,
    .mxf-panel p, .mxf-notice, .mxf-filter-field, .cc-helper, .cc-note,
    [class*="description"], [class*="message"], [class*="detail"],
    [class*="helper"], [class*="instruction"], [class*="explanation"],
    [class*="empty-state"]
) {
    font-size: var(--cc-type-body) !important;
    line-height: 1.58 !important;
}

/* Interactive UI stays a little tighter than paragraphs, but never tiny. */
#main-content :is(
    .choice-button, .theme-card, .set-action, .set-reset, .set-select,
    .ca-button, .ca-ghost-button, .ca-danger-button, .ca-tab,
    .wc-button, .wc-ghost-button, .wc-tab, .si-tab, .rv-button,
    .st-button, .ur-button, .primary-btn, .secondary-btn, .strategy-btn,
    .module-card a, .mxf-library-tab, .mxf-filter-field select
) {
    font-size: var(--cc-type-ui) !important;
    line-height: 1.25 !important;
}

/* Labels, metadata, badges and status text share one deliberate size.
   This catches every previous 9–11px class across all modules. */
#main-content :is(
    small,
    [class*="label"], [class*="kicker"], [class*="eyebrow"],
    [class*="meta"], [class*="hint"], [class*="note"],
    [class*="caption"], [class*="badge"], [class*="chip"],
    [class*="status"], [class*="state"], [class*="tag"],
    [class*="subtle"], [class*="muted"], [class*="count"],
    [class*="code"], [class*="date"], [class*="time"]
) {
    font-size: var(--cc-type-label) !important;
    line-height: 1.42 !important;
    letter-spacing: .015em !important;
}

/* Values should sit between labels and headings. */
#main-content :is(
    [class*="metric"] strong,
    [class*="stat"] strong,
    [class*="summary-value"],
    [class*="status-value"],
    [class*="date-number"],
    [class*="value"]
) {
    font-size: calc(var(--cc-type-ui) * 1.2) !important;
    line-height: 1.15 !important;
}

/* Settings page exact targets — full type ramp now applies to every visible row. */
#cc-ui-settings .set-eyebrow,
#cc-ui-settings .set-label,
#cc-ui-settings .set-control-copy span,
#cc-ui-settings .toggle-line span,
#cc-ui-settings .preview-meta span {
    font-size: var(--cc-type-label) !important;
}

#cc-ui-settings :is(.set-control-copy strong, .preview-meta strong, .theme-card strong) {
    font-size: var(--cc-type-ui) !important;
    line-height: 1.3 !important;
}

#cc-ui-settings :is(.theme-card span, .set-panel-title p, .set-hero p, .preview-panel p) {
    font-size: var(--cc-type-detail) !important;
    line-height: 1.55 !important;
}

/* Sidebar follows the same preference scale instead of staying on fixed tiny text. */
.cc-sidebar-logo-copy strong { font-size: calc(var(--cc-type-ui) * .94) !important; }
.cc-sidebar-logo-copy small,
.cc-sidebar-version,
.cc-sidebar-group-label,
.cc-appearance-field,
.cc-sidebar-footer { font-size: var(--cc-type-label) !important; }
.cc-sidebar-link { font-size: var(--cc-type-ui) !important; }
.cc-appearance-title { font-size: var(--cc-type-ui) !important; }
.cc-appearance select { font-size: var(--cc-type-ui) !important; }

/* Mobile retains the same hierarchy, with sensible page titles. */
@media (max-width: 900px) {
    #main-content h1,
    #main-content [class$="-hero"] h1,
    #main-content [class*="-hero"] > h1 {
        font-size: clamp(30px, 8vw, 44px) !important;
    }
}


/* ============================================================================
   GLOBAL TEXT-SCALE SLIDER
   The slider drives one numeric variable. It replaces discrete size buckets
   without allowing isolated module CSS to stay tiny.
   ============================================================================ */
html {
    --cc-user-text-scale: 1;
}

html[data-cc-text-scale] {
    --cc-text-scale: var(--cc-user-text-scale) !important;
    --cc-type-display: var(--cc-user-text-scale) !important;
    --cc-type-heading: var(--cc-user-text-scale) !important;
    --cc-type-body: calc(16px * var(--cc-user-text-scale)) !important;
    --cc-type-ui: calc(15px * var(--cc-user-text-scale)) !important;
    --cc-type-label: calc(12px * var(--cc-user-text-scale)) !important;
    --cc-type-detail: calc(14px * var(--cc-user-text-scale)) !important;
    --cc-type-page-title: clamp(calc(34px * var(--cc-user-text-scale)), calc(3vw * var(--cc-user-text-scale)), calc(48px * var(--cc-user-text-scale))) !important;
    --cc-type-section-title: clamp(calc(24px * var(--cc-user-text-scale)), calc(1.9vw * var(--cc-user-text-scale)), calc(30px * var(--cc-user-text-scale))) !important;
    --cc-type-card-title: clamp(calc(19px * var(--cc-user-text-scale)), calc(1.35vw * var(--cc-user-text-scale)), calc(23px * var(--cc-user-text-scale))) !important;
}

/* Sidebar is part of the same slider, but keeps its visual hierarchy. */
html[data-cc-text-scale] .cc-sidebar-logo-copy strong,
html[data-cc-text-scale] .cc-sidebar-link,
html[data-cc-text-scale] .cc-appearance-title,
html[data-cc-text-scale] .cc-appearance select {
    font-size: calc(15px * var(--cc-user-text-scale)) !important;
}

html[data-cc-text-scale] .cc-sidebar-logo-copy small,
html[data-cc-text-scale] .cc-sidebar-version,
html[data-cc-text-scale] .cc-sidebar-group-label,
html[data-cc-text-scale] .cc-appearance-field,
html[data-cc-text-scale] .cc-sidebar-footer {
    font-size: calc(12px * var(--cc-user-text-scale)) !important;
}

#cc-ui-settings .set-control-row--text-slider {
    align-items: center;
}

#cc-ui-settings .text-size-slider {
    width: min(100%, 420px);
    min-width: 280px;
    padding: 12px 14px 10px;
    border: 1px solid var(--set-line, var(--cc-border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--cc-surface-strong) 78%, transparent);
}

#cc-ui-settings .text-size-slider-head,
#cc-ui-settings .text-size-slider-ticks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#cc-ui-settings .text-size-slider-head {
    margin-bottom: 10px;
    color: var(--cc-muted);
    font-size: var(--cc-type-label);
    font-weight: 750;
}

#cc-ui-settings .text-size-slider-head output {
    color: var(--cc-text);
    font-size: var(--cc-type-ui);
    font-weight: 850;
    letter-spacing: .01em;
}

#cc-ui-settings .text-size-range {
    display: block;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    background: transparent !important;
}

#cc-ui-settings .text-size-range::-webkit-slider-runnable-track {
    height: 7px;
    border: 1px solid var(--cc-border);
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--cc-accent) 0 var(--cc-range-progress, 17.65%),
        var(--cc-surface-hover) var(--cc-range-progress, 17.65%) 100%
    );
}

#cc-ui-settings .text-size-range::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -9px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid var(--cc-surface);
    border-radius: 50%;
    background: var(--cc-accent);
    box-shadow: 0 0 0 4px var(--cc-accent-soft), 0 4px 12px rgba(0, 0, 0, .30);
}

#cc-ui-settings .text-size-range::-moz-range-track {
    height: 7px;
    border: 1px solid var(--cc-border);
    border-radius: 999px;
    background: var(--cc-surface-hover);
}

#cc-ui-settings .text-size-range::-moz-range-progress {
    height: 7px;
    border-radius: 999px;
    background: var(--cc-accent);
}

#cc-ui-settings .text-size-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid var(--cc-surface);
    border-radius: 50%;
    background: var(--cc-accent);
    box-shadow: 0 0 0 4px var(--cc-accent-soft), 0 4px 12px rgba(0, 0, 0, .30);
}

#cc-ui-settings .text-size-range:focus-visible::-webkit-slider-thumb,
#cc-ui-settings .text-size-range:focus-visible::-moz-range-thumb {
    outline: 3px solid var(--cc-focus);
    outline-offset: 3px;
}

#cc-ui-settings .text-size-slider-ticks {
    margin-top: 4px;
    color: var(--cc-subtle);
    font-size: max(10px, calc(10px * var(--cc-user-text-scale)));
    font-weight: 700;
}

@media (max-width: 900px) {
    #cc-ui-settings .text-size-slider {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    #cc-ui-settings .text-size-slider-ticks span:nth-child(4),
    #cc-ui-settings .text-size-slider-ticks span:nth-child(5) {
        display: none;
    }
}


/* ============================================================================
   ACTIVITY FORM — TWO TEXT ROLES ONLY
   Inside the Log Activity working panel:
   1) heading
   2) supporting text
   No micro-label, tiny metadata, or third text scale remains.
   ============================================================================ */

#cc-activity .ca-panel {
    --ca-form-heading-size: clamp(
        calc(25px * var(--cc-user-text-scale, 1)),
        calc(1.85vw * var(--cc-user-text-scale, 1)),
        calc(31px * var(--cc-user-text-scale, 1))
    );
    --ca-form-support-size: max(
        16px,
        calc(16px * var(--cc-user-text-scale, 1))
    );
    --ca-form-support-line: 1.52;
}

/* Every visible form heading is the same heading role. */
#cc-activity .ca-panel :is(
    h2.ca-panel-title,
    h3.ca-panel-title,
    .ca-panel-title
) {
    color: var(--cc-text) !important;
    font-size: var(--ca-form-heading-size) !important;
    font-weight: 800 !important;
    line-height: 1.16 !important;
    letter-spacing: -.02em !important;
}

/* Everything else inside the working panel is the same readable support role. */
#cc-activity .ca-panel :is(
    p,
    span,
    small,
    label,
    input,
    select,
    textarea,
    button,
    .ca-kicker,
    .ca-field-label,
    .ca-panel-copy,
    .ca-contact-lock strong,
    .ca-contact-lock span,
    .ca-contact-lock small,
    .ca-choice strong,
    .ca-choice span,
    .ca-contact-suggestion strong,
    .ca-contact-suggestion span,
    .ca-contact-suggestion small,
    .ca-thread-match strong,
    .ca-thread-match span,
    .ca-thread-match small,
    .ca-new-contact-head p
) {
    font-size: var(--ca-form-support-size) !important;
    line-height: var(--ca-form-support-line) !important;
    letter-spacing: 0 !important;
}

/* Keep hierarchy through weight and color only, not a third font size. */
#cc-activity .ca-panel :is(
    .ca-kicker,
    .ca-field-label,
    .ca-contact-lock small
) {
    color: var(--cc-muted) !important;
    font-weight: 750 !important;
    text-transform: none !important;
}

#cc-activity .ca-panel :is(
    .ca-contact-lock strong,
    .ca-choice strong,
    .ca-contact-suggestion strong,
    .ca-thread-match strong
) {
    color: var(--cc-text) !important;
    font-weight: 800 !important;
}

#cc-activity .ca-panel :is(
    .ca-panel-copy,
    .ca-contact-lock span,
    .ca-choice span,
    .ca-contact-suggestion span,
    .ca-thread-match span,
    .ca-new-contact-head p
) {
    color: var(--cc-muted) !important;
}

#cc-activity .ca-panel :is(
    .ca-button,
    .ca-ghost-button,
    .ca-danger-button
) {
    min-height: 46px !important;
    padding: 10px 14px !important;
    font-weight: 800 !important;
}

#cc-activity .ca-panel :is(input, select, textarea) {
    font-weight: 600 !important;
}

/* Choice cards are support text only; their distinction is weight and surface. */
#cc-activity .ca-panel .ca-choice {
    min-height: 0 !important;
    padding: 15px !important;
}

/* Do not force giant text on narrow screens. */
@media (max-width: 900px) {
    #cc-activity .ca-panel {
        --ca-form-heading-size: clamp(
            calc(24px * var(--cc-user-text-scale, 1)),
            calc(7vw * var(--cc-user-text-scale, 1)),
            calc(30px * var(--cc-user-text-scale, 1))
        );
    }
}


/* ============================================================================
   SETTINGS TYPE TRUTH + ACTIVITY ACTION COLORS
   The Settings page gets the same two-role reading system as Activity:
   - Heading
   - Supporting text
   The operation buttons retain their meaning by color rather than all becoming
   the same generic blue/gray control.
   ============================================================================ */

/* SETTINGS: no tiny label / metadata type remains inside a Settings panel. */
#cc-ui-settings {
    --set-heading-role: clamp(
        calc(25px * var(--cc-user-text-scale, 1)),
        calc(1.8vw * var(--cc-user-text-scale, 1)),
        calc(31px * var(--cc-user-text-scale, 1))
    );
    --set-support-role: max(16px, calc(16px * var(--cc-user-text-scale, 1)));
    --set-support-leading: 1.5;
}

/* Page and panel headings use the single heading role. */
#cc-ui-settings :is(
    .set-hero h1,
    .set-panel-title h2,
    .preview-panel h2,
    .preview-panel h3
) {
    color: var(--cc-text) !important;
    font-size: var(--set-heading-role) !important;
    font-weight: 800 !important;
    line-height: 1.16 !important;
    letter-spacing: -.02em !important;
}

/* All other visible Settings text is the one supporting role. */
#cc-ui-settings :is(
    p,
    span,
    small,
    label,
    button,
    select,
    option,
    output,
    .set-eyebrow,
    .set-label,
    .set-saved,
    .set-control-copy strong,
    .set-control-copy span,
    .toggle-line span,
    .theme-card strong,
    .theme-card span,
    .choice-button,
    .set-action,
    .set-reset,
    .set-select,
    .preview-meta span,
    .preview-meta strong,
    .text-size-slider-head,
    .text-size-slider-head output,
    .text-size-slider-ticks
) {
    font-size: var(--set-support-role) !important;
    line-height: var(--set-support-leading) !important;
    letter-spacing: 0 !important;
}

/* Preserve hierarchy through weight and color only. */
#cc-ui-settings :is(.set-eyebrow, .set-label, .set-saved, .text-size-slider-head, .text-size-slider-ticks, .preview-meta span) {
    color: var(--cc-muted) !important;
    font-weight: 750 !important;
    text-transform: none !important;
}

#cc-ui-settings :is(.set-control-copy strong, .theme-card strong, .preview-meta strong, .choice-button, .set-action, .set-reset) {
    color: var(--cc-text) !important;
    font-weight: 800 !important;
}

#cc-ui-settings :is(.set-control-copy span, .theme-card span, .set-hero p, .set-panel-title p, .preview-panel p) {
    color: var(--cc-muted) !important;
}

#cc-ui-settings .text-size-slider {
    padding: 14px 16px 12px !important;
}

#cc-ui-settings .theme-card,
#cc-ui-settings .choice-button,
#cc-ui-settings .set-action,
#cc-ui-settings .set-reset,
#cc-ui-settings .set-select {
    min-height: 48px !important;
}

/* ACTIVITY: explicit action colors. Global rules cannot flatten these. */
#main-content :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button) {
    min-height: 42px !important;
    padding: 9px 13px !important;
    border-radius: 9px !important;
    font-size: max(15px, calc(15px * var(--cc-user-text-scale, 1))) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

/* Open Conversation = violet navigation action. */
#main-content .ca-open-button {
    border: 1px solid color-mix(in srgb, var(--cc-accent-2) 78%, var(--cc-border)) !important;
    background: color-mix(in srgb, var(--cc-accent-2) 20%, var(--cc-surface)) !important;
    color: var(--cc-text) !important;
}

/* Edit = cyan information action. */
#main-content .ca-edit-button {
    border: 1px solid color-mix(in srgb, var(--cc-accent) 82%, var(--cc-border)) !important;
    background: color-mix(in srgb, var(--cc-accent) 16%, var(--cc-surface)) !important;
    color: var(--cc-text) !important;
}

/* Reply = green continuation action. */
#main-content .ca-reply-button {
    border: 1px solid color-mix(in srgb, var(--cc-success) 78%, var(--cc-border)) !important;
    background: color-mix(in srgb, var(--cc-success) 17%, var(--cc-surface)) !important;
    color: var(--cc-text) !important;
}

/* Delete = red destructive action. */
#main-content .ca-danger-button {
    border: 1px solid color-mix(in srgb, var(--cc-danger) 82%, var(--cc-border)) !important;
    background: color-mix(in srgb, var(--cc-danger) 18%, var(--cc-surface)) !important;
    color: var(--cc-text) !important;
}

#main-content :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button):hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

@media (max-width: 900px) {
    #cc-ui-settings {
        --set-heading-role: clamp(
            calc(24px * var(--cc-user-text-scale, 1)),
            calc(7.2vw * var(--cc-user-text-scale, 1)),
            calc(30px * var(--cc-user-text-scale, 1))
        );
    }

    #cc-ui-settings :is(.theme-card, .choice-button, .set-action, .set-reset, .set-select) {
        width: 100% !important;
    }
}


/* ============================================================================
   ACTIVITY CONTACTS — ON-DEMAND BROWSE
   The Contacts tab is calm by default. Search or filters pull matching rows.
   ============================================================================ */
#cc-activity .ca-contact-list {
    gap: 10px;
}

#cc-activity .ca-contact-browse-prompt,
#cc-activity .ca-contact-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 15px;
    border: 1px solid var(--cc-border, rgba(145, 185, 233, .18));
    border-radius: 12px;
    background: var(--cc-surface-soft, rgba(7, 24, 49, .54));
}

#cc-activity .ca-contact-browse-prompt > div,
#cc-activity .ca-contact-results-head > div {
    min-width: 0;
}

#cc-activity .ca-contact-browse-prompt strong,
#cc-activity .ca-contact-results-head strong {
    display: block;
    color: var(--cc-text, #edf7ff);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

#cc-activity .ca-contact-browse-prompt span,
#cc-activity .ca-contact-results-head span {
    display: block;
    margin-top: 4px;
    color: var(--cc-muted, #9eb1c9);
    font-size: 14px;
    line-height: 1.45;
}

#cc-activity .ca-contact-browse-prompt .ca-ghost-button,
#cc-activity .ca-contact-results-head .ca-ghost-button {
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 650px) {
    #cc-activity .ca-contact-browse-prompt,
    #cc-activity .ca-contact-results-head {
        align-items: stretch;
        flex-direction: column;
    }

    #cc-activity .ca-contact-browse-prompt .ca-ghost-button,
    #cc-activity .ca-contact-results-head .ca-ghost-button {
        width: 100%;
    }
}

/* ============================================================================
   ACTIVITY ACTION COLORS — RESTORED
   Operation buttons have a permanent visual meaning.
   ============================================================================ */
#cc-activity .ca-card-actions :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button),
#cc-activity .ca-thread-card :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button),
#cc-activity .ca-history-card :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button) {
    min-height: 42px !important;
    margin: 0 !important;
    padding: 9px 13px !important;
    border-radius: 9px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

/* Open Conversation = violet */
#cc-activity .ca-open-button {
    border: 1px solid #a48dff !important;
    background: rgba(135, 105, 255, .22) !important;
    color: #f0ecff !important;
}

/* Edit Activity = cyan */
#cc-activity .ca-edit-button {
    border: 1px solid #4fd8ff !important;
    background: rgba(53, 201, 255, .16) !important;
    color: #e9fbff !important;
}

/* Log a Reply = green */
#cc-activity .ca-reply-button {
    border: 1px solid #63dba5 !important;
    background: rgba(65, 195, 132, .18) !important;
    color: #e5fff1 !important;
}

/* Delete Activity = red */
#cc-activity .ca-danger-button {
    border: 1px solid #ff7796 !important;
    background: rgba(211, 47, 89, .20) !important;
    color: #ffe7ed !important;
}

#cc-activity :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button):hover {
    filter: brightness(1.16) !important;
    transform: translateY(-1px) !important;
}

#cc-activity :is(.ca-open-button, .ca-edit-button, .ca-reply-button, .ca-danger-button):focus-visible {
    outline: 3px solid rgba(255, 255, 255, .48) !important;
    outline-offset: 2px !important;
}


/* ============================================================================
   ACTIVITY ACTION COLORS — HARD RESTORE
   These rules are intentionally last and use direct colors, not theme mixes.
   They target the actual button classes created by activity.js.
   ============================================================================ */

html body #main-content #cc-activity button.ca-open-button,
html body #main-content #cc-activity .ca-open-button {
    border: 1px solid #b09cff !important;
    background: #3b2b86 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(176, 156, 255, .18) inset !important;
}

html body #main-content #cc-activity button.ca-edit-button,
html body #main-content #cc-activity .ca-edit-button {
    border: 1px solid #52d8ff !important;
    background: #075f83 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(82, 216, 255, .16) inset !important;
}

html body #main-content #cc-activity button.ca-reply-button,
html body #main-content #cc-activity .ca-reply-button {
    border: 1px solid #6de1a9 !important;
    background: #146443 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(109, 225, 169, .16) inset !important;
}

html body #main-content #cc-activity button.ca-danger-button,
html body #main-content #cc-activity .ca-danger-button {
    border: 1px solid #ff7895 !important;
    background: #8f2645 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(255, 120, 149, .17) inset !important;
}

html body #main-content #cc-activity :is(
    button.ca-open-button,
    button.ca-edit-button,
    button.ca-reply-button,
    button.ca-danger-button
):hover {
    filter: brightness(1.18) !important;
    transform: translateY(-1px) !important;
}


/* ============================================================================
   DUAL TYPE CONTROLS + COMPACT THREAD ACTIONS
   Heading and supporting text now have independent global controls.
   ============================================================================ */

:root {
    --cc-heading-scale: 1;
    --cc-support-scale: 1;
}

/* Existing fixed-pixel body UI reads the supporting slider through the legacy
   variable. That keeps every old page responsive without changing its markup. */
html[data-cc-support-scale] {
    --cc-text-scale: var(--cc-support-scale) !important;
    --cc-user-text-scale: var(--cc-support-scale) !important;
}

/* Only the visual headline hierarchy reads the Heading slider. */
html[data-cc-heading-scale] #main-content h1 {
    font-size: clamp(
        calc(30px * var(--cc-heading-scale)),
        calc(3.1vw * var(--cc-heading-scale)),
        calc(50px * var(--cc-heading-scale))
    ) !important;
}

html[data-cc-heading-scale] #main-content h2 {
    font-size: clamp(
        calc(22px * var(--cc-heading-scale)),
        calc(1.8vw * var(--cc-heading-scale)),
        calc(32px * var(--cc-heading-scale))
    ) !important;
}

html[data-cc-heading-scale] #main-content h3 {
    font-size: clamp(
        calc(18px * var(--cc-heading-scale)),
        calc(1.35vw * var(--cc-heading-scale)),
        calc(24px * var(--cc-heading-scale))
    ) !important;
}

/* Common non-semantic title elements used by Activity, Weekly, and Settings. */
html[data-cc-heading-scale] #main-content :is(
    .ca-panel-title,
    .ca-hero h1,
    .wc-hero h1,
    .si-hero h1,
    .set-hero h1,
    .set-panel-title h2,
    .preview-panel h2,
    .preview-panel h3,
    .dashboard-header h1,
    .module-card h3,
    .strategy-page-header h1,
    .strategy-card h2
) {
    font-size: calc(1em * var(--cc-heading-scale)) !important;
}

/* Slider labels keep their own readable supporting size and do not turn into
   the heading size when the user increases headlines. */
#cc-ui-settings .set-control-row--text-slider .set-control-copy :is(strong, span),
#cc-ui-settings .set-control-row--text-slider :is(output, .text-size-slider-head, .text-size-slider-ticks) {
    font-size: calc(15px * var(--cc-support-scale)) !important;
    line-height: 1.45 !important;
}

#cc-ui-settings .set-control-row--text-slider .text-size-slider {
    display: grid;
    gap: 7px;
}

#cc-ui-settings .set-control-row--text-slider + .set-control-row--text-slider {
    border-top: 1px solid var(--cc-border) !important;
}

/* Thread actions stay small and move to the upper-right of each message.
   Short visible labels preserve the color meanings without consuming the card. */
#cc-activity .ca-thread-entry {
    position: relative !important;
    min-height: 84px;
    padding: 47px 12px 12px !important;
}

#cc-activity .ca-thread-entry > .ca-thread-meta {
    position: absolute !important;
    top: 11px;
    left: 12px;
    margin: 0 !important;
    font-size: max(10px, calc(10px * var(--cc-support-scale))) !important;
    line-height: 1.1 !important;
}

#cc-activity .ca-thread-entry > p {
    margin: 0 !important;
    padding-right: 0 !important;
}

#cc-activity .ca-thread-entry > .ca-card-actions {
    position: absolute !important;
    top: 8px;
    right: 8px;
    display: flex !important;
    width: auto !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    margin: 0 !important;
    white-space: nowrap;
}

#cc-activity .ca-thread-entry > .ca-card-actions :is(
    .ca-open-button,
    .ca-edit-button,
    .ca-reply-button,
    .ca-danger-button
) {
    min-height: 29px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border-radius: 7px !important;
    font-size: max(11px, calc(11px * var(--cc-support-scale))) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

@media (max-width: 640px) {
    #cc-activity .ca-thread-entry {
        min-height: 0;
        padding: 12px !important;
    }

    #cc-activity .ca-thread-entry > .ca-thread-meta {
        position: static !important;
        display: block;
        margin: 0 0 9px !important;
    }

    #cc-activity .ca-thread-entry > .ca-card-actions {
        position: static !important;
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        margin-top: 10px !important;
        white-space: normal;
    }
}


/* ============================================================================
   ACTIVITY THREAD ALIGNMENT FIX
   Contact / Me reply cards stay inside the thread panel. Action buttons sit
   inside each card's upper-right corner instead of floating outside/overlapping.
   ============================================================================ */

#cc-activity .ca-thread-card {
    overflow: hidden !important;
}

#cc-activity .ca-thread-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start !important;
    gap: 10px !important;
}

#cc-activity .ca-thread-head > div {
    display: grid !important;
    min-width: 0 !important;
    gap: 4px !important;
}

#cc-activity .ca-thread-head :is(strong, span, small) {
    display: block !important;
    white-space: normal !important;
}

#cc-activity .ca-thread-head strong {
    line-height: 1.25 !important;
}

#cc-activity .ca-thread-entry {
    position: relative !important;
    width: min(620px, 100%) !important;
    max-width: calc(100% - 14px) !important;
    min-height: 92px !important;
    padding: 44px 12px 13px !important;
    overflow: hidden !important;
}

#cc-activity .ca-thread-entry.is-received,
#cc-activity .ca-thread-entry[data-direction="received"],
#cc-activity .ca-thread-entry[data-from="contact"] {
    justify-self: end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

#cc-activity .ca-thread-entry.is-sent,
#cc-activity .ca-thread-entry[data-direction="sent"],
#cc-activity .ca-thread-entry[data-from="me"] {
    justify-self: start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

#cc-activity .ca-thread-entry > .ca-thread-meta {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: 178px !important;
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#cc-activity .ca-thread-entry > .ca-card-actions {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    display: flex !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
}

#cc-activity .ca-thread-entry > .ca-card-actions :is(
    .ca-open-button,
    .ca-edit-button,
    .ca-reply-button,
    .ca-danger-button
) {
    width: auto !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 4px 7px !important;
    border-radius: 7px !important;
    font-size: max(11px, calc(11px * var(--cc-support-scale, 1))) !important;
    line-height: 1 !important;
}

#cc-activity .ca-thread-entry > p {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-wrap: anywhere !important;
    white-space: pre-wrap !important;
}

/* On narrow panels or mobile, actions drop under the message so nothing overlaps. */
@media (max-width: 760px) {
    #cc-activity .ca-thread-entry {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        padding: 12px !important;
    }

    #cc-activity .ca-thread-entry > .ca-thread-meta {
        position: static !important;
        right: auto !important;
        margin-bottom: 8px !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }

    #cc-activity .ca-thread-entry > .ca-card-actions {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        margin-top: 10px !important;
        white-space: normal !important;
    }
}


/* ============================================================================
   CONTACTS — CLEAN, ON-DEMAND LAYOUT
   Search results are the important thing. Remove repeated explanations and
   make the actual Contact name the strongest visual element.
   ============================================================================ */

/* Contacts has one title only. */
#cc-activity [data-activity-pane="contacts"] > .ca-grid > .ca-panel:first-child > .ca-panel-head .ca-kicker,
#cc-activity [data-activity-pane="contacts"] > .ca-grid > .ca-panel:first-child > .ca-panel-head .ca-panel-copy,
#cc-activity [data-activity-pane="contacts"] > .ca-grid > aside.ca-panel > .ca-panel-head .ca-kicker {
    display: none !important;
}

#cc-activity [data-activity-pane="contacts"] > .ca-grid > .ca-panel > .ca-panel-head {
    align-items: center !important;
    margin-bottom: 12px !important;
}

#cc-activity [data-activity-pane="contacts"] > .ca-grid > .ca-panel > .ca-panel-head .ca-panel-title {
    margin: 0 !important;
    font-size: clamp(24px, 1.7vw, 30px) !important;
    line-height: 1.15 !important;
}

/* The right side no longer repeats a large explanatory paragraph. */
#cc-activity [data-activity-pane="contacts"] > .ca-grid > aside.ca-panel > .ca-panel-head .ca-panel-copy {
    max-width: 100% !important;
    margin-top: 6px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Search plus filters stay compact; matching results are the focus. */
#cc-activity [data-activity-pane="contacts"] .ca-filter-bar {
    gap: 8px !important;
    margin: 0 0 10px !important;
}

#cc-activity [data-activity-pane="contacts"] .ca-contact-results-head {
    min-height: 42px !important;
    padding: 8px 11px !important;
    border-radius: 10px !important;
}

#cc-activity [data-activity-pane="contacts"] .ca-contact-results-head > div strong {
    font-size: 15px !important;
    line-height: 1.1 !important;
}

#cc-activity [data-activity-pane="contacts"] .ca-contact-results-head .ca-ghost-button {
    min-height: 32px !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
}

/* Contact name is the primary scan target. */
#cc-activity [data-activity-pane="contacts"] .ca-contact-result {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 14px !important;
    min-height: 76px !important;
    padding: 13px 14px !important;
    border-radius: 11px !important;
}

#cc-activity [data-activity-pane="contacts"] .ca-contact-result strong {
    display: block !important;
    overflow: visible !important;
    margin-bottom: 4px !important;
    color: var(--cc-text, #f4f9ff) !important;
    font-size: clamp(19px, 1.35vw, 22px) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

#cc-activity [data-activity-pane="contacts"] .ca-contact-result span {
    color: var(--cc-muted, #b8c9da) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
}

#cc-activity [data-activity-pane="contacts"] .ca-contact-result small {
    align-self: center !important;
    padding: 5px 8px !important;
    border: 1px solid var(--cc-border-strong, #4f92b8) !important;
    border-radius: 999px !important;
    color: var(--cc-text, #f4f9ff) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
}

/* Collapsed conversation row: one clean line of hierarchy, no mashed text. */
#cc-activity .ca-collapsible-thread {
    overflow: hidden !important;
}

#cc-activity .ca-collapsible-thread > .ca-list-summary,
#cc-activity .ca-collapsible-thread > summary.ca-thread-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 86px !important;
    padding: 13px 14px 13px 34px !important;
    list-style: none !important;
}

#cc-activity .ca-collapsible-thread > summary::-webkit-details-marker {
    display: none !important;
}

#cc-activity .ca-collapsible-thread > summary::before {
    content: '›' !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    color: var(--cc-accent, #61d9ff) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    transform: translateY(-50%) !important;
    transition: transform .16s ease !important;
}

#cc-activity .ca-collapsible-thread[open] > summary::before {
    transform: translateY(-50%) rotate(90deg) !important;
}

#cc-activity .ca-collapsible-thread .ca-list-summary > div:first-child {
    display: grid !important;
    min-width: 0 !important;
    gap: 4px !important;
}

#cc-activity .ca-collapsible-thread .ca-list-summary strong {
    color: var(--cc-text, #f4f9ff) !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
}

#cc-activity .ca-collapsible-thread .ca-list-summary span,
#cc-activity .ca-collapsible-thread .ca-list-summary em {
    overflow: hidden !important;
    color: var(--cc-muted, #b8c9da) !important;
    font-size: 14px !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#cc-activity .ca-collapsible-thread .ca-list-summary-meta {
    display: grid !important;
    justify-items: end !important;
    gap: 5px !important;
    color: var(--cc-muted, #b8c9da) !important;
}

#cc-activity .ca-collapsible-thread .ca-list-summary-meta small,
#cc-activity .ca-collapsible-thread .ca-list-summary-toggle {
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

@media (max-width: 760px) {
    #cc-activity [data-activity-pane="contacts"] > .ca-grid > aside.ca-panel > .ca-panel-head .ca-panel-copy {
        white-space: normal !important;
    }

    #cc-activity [data-activity-pane="contacts"] .ca-contact-result {
        min-height: 70px !important;
    }

    #cc-activity [data-activity-pane="contacts"] .ca-contact-result strong {
        font-size: 18px !important;
    }

    #cc-activity .ca-collapsible-thread > .ca-list-summary,
    #cc-activity .ca-collapsible-thread > summary.ca-thread-summary {
        grid-template-columns: minmax(0, 1fr) auto !important;
        min-height: 78px !important;
    }

    #cc-activity .ca-collapsible-thread .ca-list-summary em {
        display: none !important;
    }
}


/* ============================================================================
   ACTIVITY REPLIES — ROOT ACTIVITY ONLY
   A reply starts from the exact Activity's Reply button and automatically
   belongs to that conversation's original activity. The old saved-activity
   picker is retired.
   ============================================================================ */
#cc-activity :is(
    [data-activity-log-mode-step],
    [data-activity-reply-picker],
    [data-activity-selected-reply]
) {
    display: none !important;
}


/* ============================================================================
   ACTIVITY — FOUR STEP LOG FLOW
   1 Contact → 2 Interaction → 3 Date & From → 4 Details & Outcome.
   The old descriptive headers, category cards, and reply picker are retired.
   ============================================================================ */

#cc-activity .ca-form > .ca-step {
    display: grid;
    gap: 14px;
}

#cc-activity .ca-step-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#cc-activity .ca-step > .ca-kicker,
#cc-activity .ca-step-heading > .ca-kicker {
    color: var(--cc-text, #f3f8ff) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
}

/* Once a Contact is picked, only the selected Contact remains in Step 1. */
#cc-activity [data-activity-contact-picker][hidden] { display: none !important; }
#cc-activity [data-activity-selected-contact] {
    min-height: 74px;
    padding: 13px 15px !important;
}
#cc-activity [data-activity-selected-contact-name] {
    color: #f8fcff !important;
    font-size: 22px !important;
    font-weight: 850 !important;
    line-height: 1.12 !important;
}
#cc-activity [data-activity-selected-contact-meta] {
    margin-top: 5px !important;
    color: #c7d7e7 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Interaction selection is the only Step 2 UI. */
#cc-activity [data-activity-action-step] .ca-choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
#cc-activity [data-activity-action-step] .ca-choice {
    min-height: 100px !important;
}

/* Step 3 is deliberately small and task-focused. */
#cc-activity [data-activity-timing-step] .ca-form-actions {
    justify-content: flex-end;
    margin-top: 0;
}

/* Outcome is classification, not a free-text field. */
#cc-activity .ca-outcome-field {
    display: grid;
    gap: 9px;
}
#cc-activity .ca-outcome-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
#cc-activity .ca-outcome-button {
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    color: #f8fcff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
#cc-activity .ca-outcome-button:hover,
#cc-activity .ca-outcome-button.is-selected {
    transform: translateY(-1px);
    filter: brightness(1.12);
}
#cc-activity .ca-outcome-button.is-selected {
    box-shadow: 0 0 0 2px rgba(255,255,255,.18) inset, 0 8px 20px rgba(0,0,0,.18);
}
#cc-activity .ca-outcome-button.is-negative { background: #8f2645; border-color: #ff7895; }
#cc-activity .ca-outcome-button.is-neutral { background: #075f83; border-color: #52d8ff; }
#cc-activity .ca-outcome-button.is-positive { background: #146443; border-color: #6de1a9; }

/* The old UI must never flash or reappear. */
#cc-activity :is(
    [data-activity-log-mode-step],
    [data-activity-category-step],
    [data-activity-reply-picker],
    [data-activity-selected-reply]
) { display: none !important; }

@media (max-width: 760px) {
    #cc-activity .ca-step-heading {
        align-items: stretch;
        flex-direction: column;
    }
    #cc-activity .ca-step-heading .ca-ghost-button {
        width: 100%;
    }
    #cc-activity .ca-outcome-buttons {
        grid-template-columns: 1fr;
    }
    #cc-activity [data-activity-action-step] .ca-choice-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================================
   ACTIVITY OUTCOME COLORS + NO DUPLICATE LATEST CARD
   Outcome choices are classifications and stay visibly color-coded.
   ============================================================================ */

/* Latest activity is redundant: it already lives in the selected Contact's history. */
#cc-activity :is(
    [data-activity-latest-activity],
    .ca-latest-activity
) {
    display: none !important;
}

/* Hard color restore: global button rules must never flatten these choices. */
html body #main-content #cc-activity button.ca-outcome-button.is-negative,
html body #main-content #cc-activity .ca-outcome-button.is-negative {
    border: 1px solid #ff7895 !important;
    background: #8f2645 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(255,120,149,.18) inset !important;
}

html body #main-content #cc-activity button.ca-outcome-button.is-neutral,
html body #main-content #cc-activity .ca-outcome-button.is-neutral {
    border: 1px solid #52d8ff !important;
    background: #075f83 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(82,216,255,.18) inset !important;
}

html body #main-content #cc-activity button.ca-outcome-button.is-positive,
html body #main-content #cc-activity .ca-outcome-button.is-positive {
    border: 1px solid #6de1a9 !important;
    background: #146443 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(109,225,169,.18) inset !important;
}

html body #main-content #cc-activity .ca-outcome-button:is(:hover, .is-selected) {
    filter: brightness(1.16) !important;
    transform: translateY(-1px) !important;
}


/* ============================================================================
   ACTIVITY — SC1 DUE BADGE + COMPACT SELECTED CONTACT HISTORY
   The selected Contact owns the due state. The history below shows only actual
   threads and logged activity, without duplicate section headings or repeated
   Contact names.
   Typography in this surface follows only the two global controls:
   Heading scale and Supporting-text scale.
   ============================================================================ */

#cc-activity .ca-log-contact-history {
    --ca-selected-heading: clamp(
        calc(20px * var(--cc-heading-scale, 1)),
        calc(1.35vw * var(--cc-heading-scale, 1)),
        calc(24px * var(--cc-heading-scale, 1))
    );
    --ca-selected-support: max(
        15px,
        calc(15px * var(--cc-support-scale, 1))
    );
}

#cc-activity .ca-log-contact-history-head {
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

#cc-activity .ca-contact-history-heading {
    display: grid;
    min-width: 0;
    gap: 4px;
}

#cc-activity .ca-contact-history-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

#cc-activity .ca-log-contact-history .ca-panel-title,
#cc-activity .ca-log-contact-history .ca-list-summary strong,
#cc-activity .ca-log-contact-history .ca-thread-summary strong,
#cc-activity .ca-log-contact-history .ca-history-head strong {
    margin: 0 !important;
    color: var(--cc-text, #f3f8ff) !important;
    font-size: var(--ca-selected-heading) !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.015em !important;
}

#cc-activity .ca-log-contact-history .ca-panel-copy,
#cc-activity .ca-log-contact-history .ca-list-summary :is(span, em),
#cc-activity .ca-log-contact-history .ca-thread-summary :is(span, em),
#cc-activity .ca-log-contact-history .ca-history-head span,
#cc-activity .ca-log-contact-history .ca-history-message,
#cc-activity .ca-log-contact-history .ca-history-detail :is(strong, span),
#cc-activity .ca-log-contact-history .ca-history-next,
#cc-activity .ca-log-contact-history .ca-list-summary-toggle,
#cc-activity .ca-log-contact-history .ca-card-actions :is(button, a),
#cc-activity .ca-log-contact-history .ca-thread-origin-copy,
#cc-activity .ca-log-contact-history .ca-thread-origin-meta,
#cc-activity .ca-log-contact-history .ca-thread-meta {
    font-size: var(--ca-selected-support) !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
}

#cc-activity .ca-log-contact-history .ca-panel-copy {
    margin: 0 !important;
    color: var(--cc-muted, #c4d2e0) !important;
    font-weight: 650 !important;
}

#cc-activity .ca-contact-due-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: max(12px, calc(12px * var(--cc-support-scale, 1))) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: .01em !important;
    white-space: nowrap;
}

#cc-activity .ca-contact-due-badge.is-upcoming {
    border-color: rgba(109, 225, 169, .60);
    background: rgba(20, 100, 67, .28);
    color: #b8ffe1;
}

#cc-activity .ca-contact-due-badge.is-today {
    border-color: rgba(255, 214, 92, .68);
    background: rgba(128, 92, 10, .30);
    color: #fff0a8;
}

#cc-activity .ca-contact-due-badge.is-overdue {
    border-color: rgba(255, 120, 149, .68);
    background: rgba(143, 38, 69, .30);
    color: #ffd0dc;
}

#cc-activity .ca-log-contact-history .ca-contact-history-list {
    display: grid;
    gap: 10px;
}

/* The selected-contact drawer is a single summary row: count and Open stay
   at the far right instead of colliding with the title. */
#cc-activity .ca-log-history-disclosure > .ca-list-summary.ca-thread-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: 12px 14px !important;
    list-style: none !important;
}

#cc-activity .ca-log-history-disclosure > .ca-list-summary.ca-thread-summary > strong {
    min-width: 0 !important;
}

#cc-activity .ca-log-history-disclosure > .ca-list-summary.ca-thread-summary .ca-list-summary-meta,
#cc-activity .ca-log-contact-history .ca-collapsible-activity .ca-list-summary-meta {
    display: grid !important;
    justify-items: end !important;
    gap: 5px !important;
    margin-left: auto !important;
    white-space: nowrap !important;
}

#cc-activity .ca-log-history-disclosure > .ca-list-summary.ca-thread-summary .ca-list-summary-meta,
#cc-activity .ca-log-contact-history .ca-collapsible-activity .ca-list-summary-meta {
    color: var(--cc-muted, #c4d2e0) !important;
}

#cc-activity .ca-log-contact-history .ca-detail-block > h3 {
    display: none !important;
}

#cc-activity .ca-log-contact-history .ca-history-card,
#cc-activity .ca-log-contact-history .ca-thread-card {
    margin: 0 !important;
    border-radius: 12px !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity > .ca-list-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 12px 14px 12px 32px !important;
    list-style: none !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity > summary::-webkit-details-marker {
    display: none !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity > .ca-list-summary::before {
    content: '›' !important;
    position: absolute !important;
    top: 50% !important;
    left: 14px !important;
    color: var(--cc-accent, #61d9ff) !important;
    font-size: 21px !important;
    line-height: 1 !important;
    transform: translateY(-50%) !important;
    transition: transform .16s ease !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity[open] > .ca-list-summary::before {
    transform: translateY(-50%) rotate(90deg) !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity .ca-list-summary > div:first-child {
    display: grid !important;
    min-width: 0 !important;
    gap: 3px !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity .ca-list-summary strong {
    font-size: calc(18px * var(--cc-heading-scale, 1)) !important;
}

#cc-activity .ca-log-contact-history .ca-collapsible-activity .ca-list-summary :is(span, em) {
    overflow: hidden !important;
    color: var(--cc-muted, #c4d2e0) !important;
    font-style: normal !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#cc-activity .ca-log-contact-history .ca-list-summary-toggle {
    padding: 4px 7px !important;
    border: 1px solid rgba(145, 185, 233, .22) !important;
    border-radius: 999px !important;
    color: var(--cc-text, #f3f8ff) !important;
    font-weight: 800 !important;
}

#cc-activity .ca-log-contact-history .ca-list-body {
    padding: 0 14px 14px 32px !important;
}

#cc-activity .ca-log-contact-history .ca-history-message {
    margin-top: 8px !important;
}

#cc-activity .ca-log-contact-history .ca-card-actions {
    justify-content: flex-end !important;
    gap: 7px !important;
    margin-top: 10px !important;
}

#cc-activity .ca-log-contact-history .ca-card-actions :is(button, a) {
    min-height: 36px !important;
    padding: 7px 10px !important;
}

@media (max-width: 680px) {
    #cc-activity .ca-log-contact-history-head {
        align-items: flex-start !important;
    }

    #cc-activity .ca-log-contact-history .ca-collapsible-activity > .ca-list-summary {
        grid-template-columns: minmax(0, 1fr) !important;
        padding-right: 12px !important;
    }

    #cc-activity .ca-log-contact-history .ca-list-summary-toggle {
        justify-self: start !important;
    }
}


/* Partner Game Plan — Phase 1 contact link controls */
#cc-activity .ca-contact-link-manager,
#cc-activity .ca-contact-link-summary {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(99, 179, 237, .22);
    border-radius: 14px;
    background: rgba(8, 20, 42, .42);
}

#cc-activity .ca-contact-link-manager-head,
#cc-activity .ca-contact-link-summary-head,
#cc-activity .ca-link-selected-source-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

#cc-activity .ca-contact-link-manager-head small,
#cc-activity .ca-contact-link-summary-head strong,
#cc-activity .ca-link-selected-source strong {
    display: block;
    margin-top: 4px;
    color: var(--ca-copy, #b8c7df);
}

#cc-activity .ca-link-add-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

#cc-activity .ca-source-link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

#cc-activity .ca-source-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    min-height: 32px;
    padding: 4px 8px 4px 10px;
    border: 1px solid rgba(120, 199, 255, .3);
    border-radius: 999px;
    background: rgba(35, 91, 151, .18);
}

#cc-activity .ca-source-link-chip a {
    overflow: hidden;
    max-width: 220px;
    color: #d8efff;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cc-activity .ca-source-link-chip a:hover {
    text-decoration: underline;
}

#cc-activity .ca-source-link-remove {
    border: 0;
    padding: 3px 5px;
    color: #ffbec8;
    background: transparent;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 800;
}

#cc-activity .ca-source-link-empty {
    color: rgba(195, 211, 233, .72);
    font-size: .88rem;
}

#cc-activity .ca-link-dialog {
    width: min(560px, calc(100vw - 32px));
}

#cc-activity .ca-link-source-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    max-height: 320px;
    margin-top: 12px;
    overflow: auto;
}

#cc-activity .ca-link-source-option {
    min-height: 74px;
    padding: 12px;
    border: 1px solid rgba(116, 176, 235, .25);
    border-radius: 12px;
    color: inherit;
    background: rgba(17, 39, 70, .54);
    text-align: left;
    cursor: pointer;
}

#cc-activity .ca-link-source-option:hover,
#cc-activity .ca-link-source-option:focus-visible {
    border-color: rgba(117, 210, 255, .7);
    background: rgba(36, 83, 138, .42);
    outline: none;
}

#cc-activity .ca-link-source-option strong,
#cc-activity .ca-link-source-option span {
    display: block;
}

#cc-activity .ca-link-source-option span {
    margin-top: 5px;
    color: rgba(198, 215, 239, .74);
    font-size: .78rem;
    line-height: 1.35;
}

#cc-activity .ca-link-selected-source {
    margin-top: 14px;
}

#cc-activity .ca-link-selected-source .ca-field {
    margin-top: 14px;
}

@media (max-width: 640px) {
    #cc-activity .ca-contact-link-manager-head,
    #cc-activity .ca-contact-link-summary-head,
    #cc-activity .ca-link-selected-source-head {
        flex-direction: column;
    }

    #cc-activity .ca-link-source-list {
        grid-template-columns: 1fr;
    }
}


/* Partner Game Plan — current result-only contact creation row. */
#cc-partner-game-plan .pgr-create-contact-choice {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(101, 219, 255, .42);
    border-radius: 10px;
    color: #eaf8ff;
    background: rgba(25, 73, 118, .34);
    cursor: pointer;
    text-align: left;
}
#cc-partner-game-plan .pgr-create-contact-choice:hover,
#cc-partner-game-plan .pgr-create-contact-choice:focus-visible {
    border-color: rgba(101, 219, 255, .76);
    outline: none;
    background: rgba(25, 73, 118, .56);
}
#cc-partner-game-plan .pgr-create-contact-choice strong { color: #effaff; }
#cc-partner-game-plan .pgr-create-contact-choice span { color: var(--pgr-copy); }


/* ==========================================================================
   Partner Game Plan — Staged Build → Report
   The page intentionally keeps raw captures and activity context collapsed.
   ========================================================================== */
#cc-partner-game-plan.pgr-app {
    --pgr-panel: rgba(6, 26, 54, .86);
    --pgr-panel-2: rgba(10, 42, 82, .82);
    --pgr-line: rgba(100, 199, 255, .25);
    --pgr-copy: #c6d8e7;
    --pgr-muted: #85a9c5;
    --pgr-bright: #eaf8ff;
    --pgr-cyan: #72dafb;
    --pgr-mint: #8cefc8;
    color: var(--pgr-copy);
}
#cc-partner-game-plan .pgr-hero,
#cc-partner-game-plan .pgr-selection,
#cc-partner-game-plan .pgr-partner-head,
#cc-partner-game-plan .pgr-command,
#cc-partner-game-plan .pgr-runner,
#cc-partner-game-plan .pgr-empty,
#cc-partner-game-plan .pgr-report,
#cc-partner-game-plan .pgr-archive {
    border: 1px solid var(--pgr-line);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(10, 42, 82, .92), rgba(5, 20, 45, .94));
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}
#cc-partner-game-plan .pgr-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 16px;
    padding: 22px 24px;
}
#cc-partner-game-plan .pgr-hero h1,
#cc-partner-game-plan .pgr-selection h2,
#cc-partner-game-plan .pgr-partner-head h2,
#cc-partner-game-plan .pgr-report h2,
#cc-partner-game-plan .pgr-report h3,
#cc-partner-game-plan .pgr-command h3,
#cc-partner-game-plan .pgr-runner h3,
#cc-partner-game-plan .pgr-empty h3,
#cc-partner-game-plan .pgr-archive h3 {
    margin: 2px 0 7px;
    color: var(--pgr-bright);
    line-height: 1.12;
}
#cc-partner-game-plan .pgr-hero p,
#cc-partner-game-plan .pgr-selection p,
#cc-partner-game-plan .pgr-partner-head p,
#cc-partner-game-plan .pgr-command p,
#cc-partner-game-plan .pgr-runner p,
#cc-partner-game-plan .pgr-empty p,
#cc-partner-game-plan .pgr-report p,
#cc-partner-game-plan .pgr-archive p { color: var(--pgr-copy); }
#cc-partner-game-plan .pgr-kicker {
    display: block;
    color: var(--pgr-cyan);
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
#cc-partner-game-plan .pgr-hero-status {
    flex: 0 0 auto;
    padding: 9px 11px;
    border: 1px solid rgba(128, 205, 249, .28);
    border-radius: 999px;
    color: var(--pgr-copy);
    background: rgba(15, 65, 109, .45);
    font-size: .76rem;
    font-weight: 850;
    white-space: nowrap;
}
#cc-partner-game-plan .pgr-hero-status.is-success { color: #baffdf; border-color: rgba(93, 225, 168, .35); background: rgba(19, 127, 83, .25); }
#cc-partner-game-plan .pgr-hero-status.is-error { color: #ffd2d8; border-color: rgba(255, 116, 136, .36); background: rgba(142, 38, 55, .28); }

#cc-partner-game-plan .pgr-selection {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
    gap: 24px;
    padding: 22px;
}
#cc-partner-game-plan .pgr-picker { min-width: 0; }
#cc-partner-game-plan .pgr-field { display: grid; gap: 7px; min-width: 0; }
#cc-partner-game-plan .pgr-field > span { color: #d8edfc; font-size: .77rem; font-weight: 850; }
#cc-partner-game-plan .pgr-field input,
#cc-partner-game-plan .pgr-field textarea {
    width: 100%;
    border: 1px solid rgba(123, 211, 255, .36);
    border-radius: 9px;
    padding: 10px 11px;
    color: #edfbff;
    background: rgba(3, 16, 36, .76);
    font: inherit;
}
#cc-partner-game-plan .pgr-field textarea { resize: vertical; line-height: 1.45; }
#cc-partner-game-plan .pgr-contact-results { display: grid; gap: 8px; max-height: 320px; margin-top: 10px; overflow: auto; }
#cc-partner-game-plan .pgr-contact-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(111, 199, 246, .23);
    border-radius: 10px;
    color: #eaf8ff;
    background: rgba(12, 51, 90, .48);
    cursor: pointer;
    text-align: left;
}
#cc-partner-game-plan .pgr-contact-choice:hover { border-color: rgba(126, 222, 255, .64); background: rgba(16, 75, 122, .55); }
#cc-partner-game-plan .pgr-contact-choice-copy { display: grid; gap: 3px; }
#cc-partner-game-plan .pgr-contact-choice small,
#cc-partner-game-plan .pgr-contact-source-count,
#cc-partner-game-plan .pgr-empty-copy { color: var(--pgr-muted); font-size: .75rem; }
#cc-partner-game-plan .pgr-contact-source-count { white-space: nowrap; }

#cc-partner-game-plan .pgr-workspace { display: grid; gap: 14px; }
#cc-partner-game-plan .pgr-partner-head,
#cc-partner-game-plan .pgr-command,
#cc-partner-game-plan .pgr-runner,
#cc-partner-game-plan .pgr-report { padding: 19px 20px; }
#cc-partner-game-plan .pgr-partner-head,
#cc-partner-game-plan .pgr-command,
#cc-partner-game-plan .pgr-runner-head,
#cc-partner-game-plan .pgr-report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
#cc-partner-game-plan .pgr-partner-actions,
#cc-partner-game-plan .pgr-report-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
#cc-partner-game-plan .pgr-button {
    border: 1px solid rgba(122, 211, 255, .36);
    border-radius: 8px;
    padding: 9px 11px;
    color: #ecfaff;
    background: rgba(14, 64, 106, .76);
    cursor: pointer;
    font: 800 .77rem/1 Arial, Helvetica, sans-serif;
    text-decoration: none;
}
#cc-partner-game-plan .pgr-button:hover { border-color: rgba(142, 229, 255, .75); transform: translateY(-1px); }
#cc-partner-game-plan .pgr-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
#cc-partner-game-plan .pgr-button--primary { border: 0; color: #03263a; background: linear-gradient(90deg, #73ddfb, #8deec8); }
#cc-partner-game-plan .pgr-button--danger { border-color: rgba(255, 118, 139, .45); color: #ffd9de; background: rgba(123, 35, 51, .45); }
#cc-partner-game-plan .pgr-button--quiet { background: rgba(10, 42, 78, .52); }

#cc-partner-game-plan .pgr-command { align-items: center; }
#cc-partner-game-plan .pgr-source-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#cc-partner-game-plan .pgr-source-chip {
    padding: 5px 8px;
    border: 1px solid rgba(126, 202, 246, .22);
    border-radius: 999px;
    color: #aecce1;
    background: rgba(4, 22, 47, .48);
    font-size: .69rem;
    font-weight: 800;
}
#cc-partner-game-plan .pgr-source-chip.is-ready { color: #bde9ff; border-color: rgba(110, 203, 249, .36); }
#cc-partner-game-plan .pgr-source-chip.is-captured { color: #baffdf; border-color: rgba(100, 224, 164, .4); background: rgba(29, 117, 80, .2); }
#cc-partner-game-plan .pgr-source-chip.is-missing { color: #ffc8cc; border-color: rgba(255, 133, 146, .35); background: rgba(110, 34, 49, .15); }

#cc-partner-game-plan .pgr-runner { border-color: rgba(129, 215, 252, .42); }
#cc-partner-game-plan .pgr-run-progress { padding: 8px 10px; border-radius: 999px; color: #dff8ff; background: rgba(24, 105, 150, .42); font-weight: 900; white-space: nowrap; }
#cc-partner-game-plan .pgr-run-steps { display: grid; gap: 8px; margin-top: 16px; }
#cc-partner-game-plan .pgr-run-note { padding: 8px 10px; border: 1px dashed rgba(119, 203, 246, .22); border-radius: 8px; color: var(--pgr-muted); font-size: 12.5px; }
#cc-partner-game-plan .pgr-run-step { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(119, 203, 246, .17); border-radius: 9px; background: rgba(4, 20, 43, .4); }
#cc-partner-game-plan .pgr-run-dot { width: 9px; height: 9px; border-radius: 50%; background: #6f93b0; box-shadow: 0 0 0 4px rgba(111, 147, 176, .12); }
/* Crystal Ball stage lights: gray waiting, pulsing green working, solid green complete, yellow limited, red error, neutral cancelled. */
#cc-partner-game-plan .pgr-run-step.is-waiting .pgr-run-dot { background: #6f93b0; box-shadow: 0 0 0 4px rgba(111, 147, 176, .12); }
#cc-partner-game-plan .pgr-run-step.is-working .pgr-run-dot { background: #84edc2; box-shadow: 0 0 0 4px rgba(132, 237, 194, .14); animation: pgr-run-dot-pulse 1.25s ease-in-out infinite; }
#cc-partner-game-plan .pgr-run-step.is-complete .pgr-run-dot { background: #84edc2; box-shadow: 0 0 0 4px rgba(132, 237, 194, .14); }
#cc-partner-game-plan .pgr-run-step.is-limited .pgr-run-dot { background: #ffc56e; box-shadow: 0 0 0 4px rgba(255, 197, 110, .13); }
#cc-partner-game-plan .pgr-run-step.is-error .pgr-run-dot { background: #ff7185; box-shadow: 0 0 0 4px rgba(255, 113, 133, .15); }
#cc-partner-game-plan .pgr-run-step.is-cancelled .pgr-run-dot { background: #99aabc; box-shadow: 0 0 0 4px rgba(153, 170, 188, .12); }
@keyframes pgr-run-dot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.45); opacity: .72; } }
#cc-partner-game-plan .pgr-run-step-copy { display: grid; gap: 2px; }
#cc-partner-game-plan .pgr-run-step-copy small { color: var(--pgr-muted); }
#cc-partner-game-plan .pgr-run-help { margin-top: 13px; padding: 10px 11px; border-radius: 9px; color: #b9d8e9; background: rgba(9, 52, 86, .45); font-size: .78rem; }
#cc-partner-game-plan .pgr-run-help em { color: #c7f3ff; font-style: normal; font-weight: 850; }

#cc-partner-game-plan .pgr-empty { padding: 30px; text-align: center; }
#cc-partner-game-plan .pgr-report { display: grid; gap: 18px; }
#cc-partner-game-plan .pgr-report-badges { display: flex; align-items: center; gap: 8px; color: var(--pgr-muted); font-size: .74rem; }
#cc-partner-game-plan .pgr-plan-status { padding: 4px 7px; border-radius: 999px; color: #d4efff; background: rgba(34, 105, 156, .42); font-weight: 900; }
#cc-partner-game-plan .pgr-plan-status.is-current { color: #c9ffe4; background: rgba(26, 123, 81, .42); }
#cc-partner-game-plan .pgr-plan-status.is-archived { color: #c4d2df; background: rgba(77, 98, 117, .48); }
#cc-partner-game-plan .pgr-priority {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid rgba(118, 218, 255, .25);
    border-radius: 12px;
    background: linear-gradient(110deg, rgba(14, 77, 118, .58), rgba(7, 31, 65, .42));
}
#cc-partner-game-plan .pgr-priority-label { padding: 8px; border-radius: 9px; color: #d8f7ff; background: rgba(55, 152, 203, .36); font-size: .78rem; font-weight: 900; text-transform: uppercase; }
#cc-partner-game-plan .pgr-priority[data-priority="pursue_now"] .pgr-priority-label { color: #d8ffe8; background: rgba(32, 151, 94, .45); }
#cc-partner-game-plan .pgr-priority[data-priority="watch"] .pgr-priority-label { color: #fff1b7; background: rgba(160, 117, 23, .45); }
#cc-partner-game-plan .pgr-priority[data-priority="skip"] .pgr-priority-label { color: #ffd0d5; background: rgba(145, 47, 62, .45); }
#cc-partner-game-plan .pgr-priority p { margin: 0; }
#cc-partner-game-plan .pgr-confidence { display: grid; gap: 2px; text-align: right; color: var(--pgr-muted); font-size: .68rem; text-transform: uppercase; }
#cc-partner-game-plan .pgr-confidence strong { color: #ecfaff; font-size: 1rem; }

#cc-partner-game-plan .pgr-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#cc-partner-game-plan .pgr-report-section,
#cc-partner-game-plan .pgr-angle,
#cc-partner-game-plan .pgr-next,
#cc-partner-game-plan .pgr-sequence {
    padding: 16px;
    border: 1px solid rgba(111, 197, 244, .18);
    border-radius: 12px;
    background: rgba(5, 23, 49, .45);
}
#cc-partner-game-plan .pgr-findings { display: grid; gap: 8px; margin-top: 10px; }
#cc-partner-game-plan .pgr-finding { padding: 10px 11px; border-left: 3px solid #6fdcfb; border-radius: 0 8px 8px 0; background: rgba(15, 66, 105, .3); }
#cc-partner-game-plan .pgr-finding strong { color: #effbff; }
#cc-partner-game-plan .pgr-finding p { margin: 4px 0 0; }
#cc-partner-game-plan .pgr-angle { display: grid; grid-template-columns: 1.55fr .75fr; gap: 20px; align-items: start; }
#cc-partner-game-plan .pgr-angle p { margin-bottom: 0; }
#cc-partner-game-plan .pgr-avoid { padding: 12px; border-radius: 9px; color: #ffd7da; background: rgba(110, 32, 48, .25); }
#cc-partner-game-plan .pgr-avoid span { font-size: .71rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
#cc-partner-game-plan .pgr-next { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; align-items: stretch; }
#cc-partner-game-plan .pgr-next-copy small { color: var(--pgr-mint); font-weight: 850; }
#cc-partner-game-plan .pgr-draft { padding: 13px; border-radius: 10px; background: rgba(10, 67, 97, .42); }
#cc-partner-game-plan .pgr-draft span { color: #aeeeff; font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
#cc-partner-game-plan .pgr-draft p { margin: 7px 0 0; white-space: pre-wrap; }
#cc-partner-game-plan .pgr-section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
#cc-partner-game-plan .pgr-sequence-list { display: grid; gap: 10px; margin-top: 12px; }
#cc-partner-game-plan .pgr-sequence-step { display: grid; grid-template-columns: 92px 1fr; gap: 13px; padding: 12px 0; border-top: 1px solid rgba(120, 202, 245, .16); }
#cc-partner-game-plan .pgr-sequence-step:first-child { border-top: 0; padding-top: 0; }
#cc-partner-game-plan .pgr-step-day { align-self: start; padding: 6px 8px; border-radius: 7px; color: #bff2ff; background: rgba(13, 83, 126, .5); font-size: .74rem; font-weight: 900; text-align: center; }
#cc-partner-game-plan .pgr-step-copy p { margin: 4px 0; }
#cc-partner-game-plan .pgr-step-draft { margin: 8px 0 0; padding: 9px 11px; border-left: 2px solid #83e8c2; color: #dcfaeb; background: rgba(23, 102, 74, .21); white-space: pre-wrap; }
#cc-partner-game-plan .pgr-step-caution { display: block; margin-top: 7px; color: #f4cfb3; }

#cc-partner-game-plan .pgr-edit {
    border: 1px solid rgba(107, 199, 245, .23);
    border-radius: 11px;
    background: rgba(6, 29, 61, .55);
}
#cc-partner-game-plan .pgr-edit > summary,
#cc-partner-game-plan .pgr-archive > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 15px;
    color: #e9f8ff;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}
#cc-partner-game-plan .pgr-edit > summary::-webkit-details-marker,
#cc-partner-game-plan .pgr-archive > summary::-webkit-details-marker { display: none; }
#cc-partner-game-plan .pgr-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 15px 15px; }
#cc-partner-game-plan .pgr-field--full { grid-column: 1 / -1; }
#cc-partner-game-plan .pgr-edit-sequence { display: grid; gap: 9px; margin-top: 7px; }
#cc-partner-game-plan .pgr-edit-seq-card { display: grid; gap: 7px; padding: 10px; border: 1px solid rgba(119, 200, 242, .18); border-radius: 9px; background: rgba(4, 19, 42, .42); }
#cc-partner-game-plan .pgr-edit-seq-card input,
#cc-partner-game-plan .pgr-edit-seq-card textarea { width: 100%; border: 1px solid rgba(123, 211, 255, .3); border-radius: 7px; padding: 8px; color: #edfbff; background: rgba(2, 15, 34, .75); font: inherit; }

#cc-partner-game-plan .pgr-archive { overflow: hidden; }
#cc-partner-game-plan .pgr-archive > summary small { color: var(--pgr-muted); font-size: .72rem; font-weight: 800; }
#cc-partner-game-plan .pgr-archive-body { display: grid; gap: 18px; padding: 0 16px 17px; }
#cc-partner-game-plan .pgr-archive-head { margin-bottom: 9px; }
#cc-partner-game-plan .pgr-archive-head h3 { font-size: .96rem; }
#cc-partner-game-plan .pgr-archive-sources { display: flex; flex-wrap: wrap; gap: 7px; }
#cc-partner-game-plan .pgr-archive-source { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid rgba(111, 197, 244, .18); border-radius: 8px; color: var(--pgr-muted); background: rgba(3, 17, 38, .45); font-size: .72rem; }
#cc-partner-game-plan .pgr-archive-source.is-captured { color: #caffdf; border-color: rgba(104, 229, 165, .32); }
#cc-partner-game-plan .pgr-archive-source.is-missing { color: #ffc7cc; border-color: rgba(255, 130, 145, .28); }
#cc-partner-game-plan .pgr-evidence-list,
#cc-partner-game-plan .pgr-activity-summary,
#cc-partner-game-plan .pgr-plan-history { display: grid; gap: 8px; }
#cc-partner-game-plan .pgr-evidence-item,
#cc-partner-game-plan .pgr-activity-row,
#cc-partner-game-plan .pgr-history-item { padding: 10px; border: 1px solid rgba(117, 199, 244, .18); border-radius: 9px; background: rgba(4, 19, 42, .46); }
#cc-partner-game-plan .pgr-evidence-item summary { color: #dff5ff; cursor: pointer; font-size: .76rem; font-weight: 850; }
#cc-partner-game-plan .pgr-evidence-item p { margin: 8px 0; white-space: pre-wrap; }
#cc-partner-game-plan .pgr-evidence-item a { color: #94e6ff; font-size: .75rem; font-weight: 800; }
#cc-partner-game-plan .pgr-discard-evidence { margin-left: 12px; border: 0; color: #ffc0ca; background: transparent; cursor: pointer; font: 800 .72rem/1 Arial, Helvetica, sans-serif; }
#cc-partner-game-plan .pgr-discard-evidence:hover { text-decoration: underline; }
#cc-partner-game-plan .pgr-activity-row strong { color: #d7f4ff; font-size: .76rem; }
#cc-partner-game-plan .pgr-activity-row p { margin: 4px 0 0; }
#cc-partner-game-plan .pgr-notes { width: 100%; border: 1px solid rgba(123, 211, 255, .28); border-radius: 9px; padding: 10px; color: #effbff; background: rgba(3, 16, 36, .76); font: inherit; resize: vertical; }
#cc-partner-game-plan .pgr-history-item { color: #e6f7ff; cursor: pointer; text-align: left; }
#cc-partner-game-plan .pgr-history-item.is-selected { border-color: rgba(129, 229, 255, .6); background: rgba(19, 74, 118, .48); }
#cc-partner-game-plan .pgr-history-item strong,
#cc-partner-game-plan .pgr-history-item small { display: block; }
#cc-partner-game-plan .pgr-history-item small { margin-top: 3px; color: var(--pgr-muted); }

#cc-partner-game-plan .pgr-toast { position: fixed; z-index: 10100; right: 22px; bottom: 22px; max-width: min(450px, calc(100vw - 44px)); padding: 12px 14px; border: 1px solid rgba(111, 201, 245, .34); border-radius: 10px; color: #e7f9ff; background: #0b315f; box-shadow: 0 12px 34px rgba(0,0,0,.35); font-weight: 800; }
#cc-partner-game-plan .pgr-toast.is-success { color: #d7ffea; border-color: rgba(106, 231, 170, .44); background: #0c5542; }
#cc-partner-game-plan .pgr-toast.is-error { color: #ffe1e5; border-color: rgba(255, 129, 143, .48); background: #692536; }

@media (max-width: 880px) {
    #cc-partner-game-plan .pgr-selection,
    #cc-partner-game-plan .pgr-report-grid,
    #cc-partner-game-plan .pgr-angle,
    #cc-partner-game-plan .pgr-next,
    #cc-partner-game-plan .pgr-edit-grid { grid-template-columns: 1fr; }
    #cc-partner-game-plan .pgr-field--full { grid-column: auto; }
}
@media (max-width: 640px) {
    #cc-partner-game-plan .pgr-hero,
    #cc-partner-game-plan .pgr-partner-head,
    #cc-partner-game-plan .pgr-command,
    #cc-partner-game-plan .pgr-runner-head,
    #cc-partner-game-plan .pgr-report-head { flex-direction: column; }
    #cc-partner-game-plan .pgr-partner-actions,
    #cc-partner-game-plan .pgr-report-actions { justify-content: flex-start; }
    #cc-partner-game-plan .pgr-priority { grid-template-columns: 1fr; }
    #cc-partner-game-plan .pgr-confidence { text-align: left; }
    #cc-partner-game-plan .pgr-sequence-step { grid-template-columns: 1fr; }
}

/* SC1 — compact link chips in Contact add/edit. Removal is a small explicit icon, not a second text button. */
#cc-activity .ca-source-link-chip { gap: 5px; padding-right: 5px; }
#cc-activity .ca-source-link-remove {
    display: inline-grid;
    width: 21px;
    height: 21px;
    place-items: center;
    margin: 0;
    border: 1px solid rgba(255, 149, 160, .25);
    border-radius: 50%;
    color: #ffc8cf;
    background: rgba(122, 32, 47, .35);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}
#cc-activity .ca-source-link-remove:hover { border-color: rgba(255, 172, 181, .64); background: rgba(152, 42, 61, .55); text-decoration: none; }


/* Partner Game Plan visibility guard
   The component uses the HTML hidden attribute for the workspace, runner, report,
   archive details, modal, and toast. Component display rules must never override it. */
#cc-partner-game-plan [hidden] {
    display: none !important;
}

/* Global list rule: browse/history/result lists start collapsed. */
.cc-list-disclosure {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid rgba(115, 202, 245, .24);
    border-radius: 11px;
    background: rgba(4, 20, 45, .42);
}
.cc-list-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    color: #e5f8ff;
    cursor: pointer;
    list-style: none;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .015em;
}
.cc-list-disclosure > summary::-webkit-details-marker { display: none; }
.cc-list-disclosure > summary::after {
    content: '+';
    order: 3;
    color: #8ce8ff;
    font-size: 1rem;
    line-height: 1;
}
.cc-list-disclosure[open] > summary {
    border-bottom: 1px solid rgba(115, 202, 245, .18);
    background: rgba(18, 70, 112, .22);
}
.cc-list-disclosure[open] > summary::after { content: '−'; }
.cc-list-disclosure__title { min-width: 0; }
.cc-list-disclosure__count {
    margin-left: auto;
    color: #9fc8d7;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .03em;
    white-space: nowrap;
}
.cc-list-disclosure__body { padding: 12px; }
.cc-list-disclosure__body > .ca-today-list,
.cc-list-disclosure__body > .ca-history-list,
.cc-list-disclosure__body > .ca-log-contact-timeline,
.cc-list-disclosure__body > [data-activity-contact-timeline],
.cc-list-disclosure__body > .mxf-case-list,
.cc-list-disclosure__body > .mxf-archived-list,
.cc-list-disclosure__body > .mxf-match-list,
.cc-list-disclosure__body > .wc-history-list,
.cc-list-disclosure__body > .wc-past-review-list,
.cc-list-disclosure__body > .ur-group-list,
.cc-list-disclosure__body > .ur-table-wrap,
.cc-list-disclosure__body > [data-pgr-contact-results] {
    margin-top: 0;
}
@media (max-width: 640px) {
    .cc-list-disclosure > summary { padding: 12px; }
    .cc-list-disclosure__body { padding: 10px; }
    .cc-list-disclosure__count { font-size: .66rem; }
}

/* ============================================================================
   CHADY COACH — STRICT THREE-TYPE TYPOGRAPHY SYSTEM
   Only three visible text roles exist across the application:
   1) Header      — page / feature headers
   2) Sub-header  — section / card / item headers
   3) Body        — every other visible text element

   This final cascade intentionally overrides old module-specific text sizes so
   no page can introduce a fourth tiny-label or oversized-metric type.
   ============================================================================ */
:root {
    --cc-type-header: 38px;
    --cc-type-subheader: 22px;
    --cc-type-body: 16px;
}

#app {
    font-size: var(--cc-type-body) !important;
    line-height: 1.55 !important;
}

/* The full operational interface defaults to Body. This is deliberate: labels,
   controls, badges, helper text, dates, chip text, table text, and status text
   are all one consistent readable size. */
#app #main-content *,
#app .cc-sidebar * {
    font-size: var(--cc-type-body) !important;
}

/* Header: only primary page / feature headers. */
#app #main-content :is(h1, .cc-type-header, [data-text-role="header"]) {
    font-size: var(--cc-type-header) !important;
    line-height: 1.1 !important;
    letter-spacing: -.03em !important;
}

/* Sub-header: every section, card, result, or item title. */
#app #main-content :is(
    h2, h3, h4, h5, h6,
    .cc-type-subheader,
    [data-text-role="subheader"],
    [class*="title"],
    [class*="heading"],
    [class*="headline"],
    [class*="panel-name"],
    [class*="section-name"],
    .ca-list-summary strong,
    .ca-thread-summary strong,
    .ca-history-head strong,
    .ca-contact-result strong,
    .ca-thread-match strong,
    .ca-contact-lock strong,
    .pgp-mini-stat strong,
    .pgr-confidence strong
) {
    font-size: var(--cc-type-subheader) !important;
    line-height: 1.24 !important;
    letter-spacing: -.012em !important;
}

/* Sidebar uses the same two appropriate roles, never a hidden fourth scale. */
#app .cc-sidebar .cc-sidebar-logo-copy strong {
    font-size: var(--cc-type-subheader) !important;
    line-height: 1.15 !important;
}

/* Explicit role classes are available to future dynamic output. */
#app .cc-type-header { font-size: var(--cc-type-header) !important; }
#app .cc-type-subheader { font-size: var(--cc-type-subheader) !important; }
#app .cc-type-body { font-size: var(--cc-type-body) !important; }

/* The few text-bearing pseudo elements also join the same three-role system. */
#app #main-content #cc-generator #generator-output:empty::before,
#app #main-content #mxf-library .mxf-header h1::before {
    font-size: var(--cc-type-body) !important;
}

#app #main-content .wc-coverage-ring::before {
    font-size: var(--cc-type-subheader) !important;
}

/* Weekly headline remains one Header role while the single emphasized word
   is intentionally larger, not downgraded by the global Body default. */
#app #main-content .wc-command-center .wc-hero h1 span {
    font-size: 1.16em !important;
    font-weight: 900 !important;
}

@media (max-width: 760px) {
    .wc-planner-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .wc-planner-toolbar-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .wc-planner-toolbar-actions > button { flex: 1 1 180px; }
}

/* Preserve this icon-only state; it is not a text role. */
#app #main-content .wc-activity-steps li.is-done .wc-activity-step-mark {
    font-size: 0 !important;
}

/* Settings speaks the same three-role language and has no competing scale UI. */
#cc-ui-settings .set-type-system-note {
    display: grid;
    gap: 4px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--cc-accent) 40%, var(--cc-border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--cc-accent-soft) 62%, transparent);
}

#cc-ui-settings .set-type-system-note strong {
    font-size: var(--cc-type-subheader) !important;
    line-height: 1.22 !important;
}

#cc-ui-settings .set-type-system-note span {
    color: var(--cc-muted) !important;
}

#cc-ui-settings .set-control-row--text-slider .set-control-copy :is(strong, span),
#cc-ui-settings .set-control-row--text-slider :is(output, .text-size-slider-head, .text-size-slider-ticks) {
    font-size: var(--cc-type-body) !important;
    line-height: 1.45 !important;
}

#cc-ui-settings .text-size-slider-head output {
    font-weight: 900 !important;
}

#cc-ui-settings .text-size-slider-ticks {
    display: none !important;
}

@media (max-width: 760px) {
    #app #main-content :is(h1, .cc-type-header, [data-text-role="header"]) {
        font-size: min(var(--cc-type-header), 13vw) !important;
    }
}

/* Preserve the locked Contact-link UI while this stylesheet is replaced. */
#cc-activity .ca-link-dialog {
    width: min(560px, calc(100vw - 32px)) !important;
    max-height: min(720px, calc(100dvh - 32px)) !important;
    overflow: hidden !important;
    border: 1px solid rgba(108, 219, 255, .48) !important;
    border-radius: 16px !important;
    color: #edf8ff !important;
    background: linear-gradient(145deg, #10345c, #071a32) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48) !important;
}

#cc-activity .ca-link-dialog::backdrop {
    background: rgba(2, 11, 25, .74) !important;
}

#cc-activity .ca-link-dialog .ca-form,
#cc-activity .ca-link-dialog .ca-panel-head,
#cc-activity .ca-link-dialog label,
#cc-activity .ca-link-dialog p,
#cc-activity .ca-link-dialog small,
#cc-activity .ca-link-dialog strong,
#cc-activity .ca-link-dialog span {
    color: inherit !important;
}

#cc-activity .ca-link-dialog .ca-link-source-list {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

#cc-activity .ca-link-dialog .ca-link-source-option {
    min-width: 0 !important;
    overflow: hidden !important;
}

#cc-activity .ca-link-dialog .ca-link-source-option :is(strong, span) {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#cc-activity .ca-source-link-remove {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #ff3b4f !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: var(--cc-type-body) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

#cc-activity .ca-source-link-remove:hover,
#cc-activity .ca-source-link-remove:focus-visible {
    color: #ff7886 !important;
    background: transparent !important;
    outline: none !important;
    text-decoration: none !important;
}

/* SC2 final cascade guard — saved Contact-link remove glyph must render red.
   Scope is intentionally stronger than global typography/button rules. */
html body #app #main-content #cc-activity button.ca-source-link-remove,
html body #app #main-content #cc-activity .ca-source-link-remove,
html body #app #main-content #cc-activity button.ca-source-link-remove:visited {
    color: #ff2941 !important;
    -webkit-text-fill-color: #ff2941 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    background: transparent !important;
}

html body #app #main-content #cc-activity button.ca-source-link-remove:hover,
html body #app #main-content #cc-activity button.ca-source-link-remove:focus-visible {
    color: #ff6a7a !important;
    -webkit-text-fill-color: #ff6a7a !important;
    background: transparent !important;
}

/* ============================================================================
   REPORT CENTER — REPORTS ONLY
   ============================================================================ */
#cc-reports {
    --rc-panel: color-mix(in srgb, var(--cc-surface) 94%, transparent);
    --rc-panel-soft: color-mix(in srgb, var(--cc-surface-soft) 90%, transparent);
    --rc-line: color-mix(in srgb, var(--cc-border) 88%, transparent);
    --rc-text: var(--cc-text);
    --rc-muted: var(--cc-muted);
    --rc-accent: var(--cc-accent);
    --rc-accent-2: var(--cc-accent-2);
    --rc-danger: var(--cc-danger);
    --rc-success: var(--cc-success);
    --rc-warning: var(--cc-warning);
    position: relative;
    display: grid;
    gap: 18px;
    padding: clamp(18px, 2.1vw, 30px) !important;
    border: 1px solid var(--rc-line) !important;
    border-radius: 22px !important;
}

#cc-reports [hidden] { display: none !important; }

#cc-reports :is(button, input, select) {
    color: var(--rc-text) !important;
    font: inherit;
}

#cc-reports button { cursor: pointer; }
#cc-reports button:disabled { cursor: wait; opacity: .65; }

#cc-reports .rc-hero,
#cc-reports .rc-builder,
#cc-reports .rc-active-report,
#cc-reports .rc-history {
    border: 1px solid var(--rc-line);
    border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--rc-panel) 96%, transparent), color-mix(in srgb, var(--cc-surface-strong) 72%, transparent));
    box-shadow: 0 14px 32px rgba(0, 0, 0, .10);
}

#cc-reports .rc-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(18px, 2.2vw, 28px);
    background:
        radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--rc-accent) 18%, transparent), transparent 34%),
        linear-gradient(145deg, color-mix(in srgb, var(--cc-surface-strong) 94%, transparent), color-mix(in srgb, var(--rc-panel) 86%, transparent));
}

#cc-reports .rc-kicker,
#cc-reports .rc-step {
    display: block;
    color: var(--rc-accent) !important;
    font-weight: 800;
    text-transform: uppercase;
}

#cc-reports .rc-kicker { letter-spacing: .09em !important; }
#cc-reports .rc-step { letter-spacing: .06em !important; }

#cc-reports .rc-hero h1,
#cc-reports .rc-section-head h2,
#cc-reports .rc-output-head h2,
#cc-reports .rc-history-head h2 {
    margin: 4px 0 8px;
    color: var(--rc-text) !important;
}

#cc-reports .rc-hero p,
#cc-reports .rc-section-head p,
#cc-reports .rc-history-head p,
#cc-reports .rc-builder-footer p,
#cc-reports .rc-output-head p,
#cc-reports .rc-type-card span,
#cc-reports .rc-filter-head span {
    margin: 0;
    color: var(--rc-muted) !important;
}

#cc-reports .rc-hero > div:first-child { max-width: 760px; }

#cc-reports .rc-hero-actions,
#cc-reports .rc-output-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
}

#cc-reports .rc-status {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--rc-accent) 55%, var(--rc-line));
    border-radius: 999px;
    color: var(--rc-text) !important;
    background: color-mix(in srgb, var(--rc-accent) 10%, transparent);
    font-weight: 700;
    white-space: nowrap;
}

#cc-reports .rc-status[data-variant="success"] { border-color: color-mix(in srgb, var(--rc-success) 70%, var(--rc-line)); background: color-mix(in srgb, var(--rc-success) 13%, transparent); }
#cc-reports .rc-status[data-variant="warning"] { border-color: color-mix(in srgb, var(--rc-warning) 70%, var(--rc-line)); background: color-mix(in srgb, var(--rc-warning) 13%, transparent); }
#cc-reports .rc-status[data-variant="danger"] { border-color: color-mix(in srgb, var(--rc-danger) 70%, var(--rc-line)); background: color-mix(in srgb, var(--rc-danger) 13%, transparent); }

#cc-reports .rc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    padding: 8px 13px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

#cc-reports .rc-button:hover { transform: translateY(-1px); }

#cc-reports .rc-button--primary {
    border: 1px solid var(--rc-accent);
    background: linear-gradient(135deg, var(--rc-accent), color-mix(in srgb, var(--rc-accent) 72%, var(--rc-accent-2)));
    color: var(--cc-on-accent) !important;
}

#cc-reports .rc-button--secondary {
    border: 1px solid var(--rc-line);
    background: color-mix(in srgb, var(--cc-surface-soft) 70%, transparent);
    color: var(--rc-text) !important;
}

#cc-reports .rc-button--secondary:hover { border-color: var(--rc-accent); background: color-mix(in srgb, var(--rc-accent) 12%, transparent); }

#cc-reports .rc-builder { overflow: hidden; }

#cc-reports .rc-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

#cc-reports .rc-section-head--compact { align-items: center; }
#cc-reports .rc-section-head > p { max-width: 430px; text-align: right; }

#cc-reports .rc-builder > :not(.rc-builder-footer) { padding: 20px clamp(18px, 2.1vw, 27px); }
#cc-reports .rc-builder > :not(:first-child) { border-top: 1px solid var(--rc-line); }

#cc-reports .rc-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}

#cc-reports .rc-type-card {
    min-height: 124px;
    padding: 16px;
    border: 1px solid var(--rc-line);
    border-radius: 13px;
    text-align: left;
    background: linear-gradient(145deg, color-mix(in srgb, var(--cc-surface) 90%, transparent), color-mix(in srgb, var(--cc-surface-strong) 82%, transparent));
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

#cc-reports .rc-type-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--rc-accent) 80%, var(--rc-line));
}

#cc-reports .rc-type-card.is-selected {
    border-color: var(--rc-accent);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--rc-accent) 17%, var(--cc-surface)), color-mix(in srgb, var(--rc-accent-2) 9%, var(--cc-surface-strong)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-accent) 35%, transparent), 0 12px 24px color-mix(in srgb, var(--rc-accent) 11%, transparent);
}

#cc-reports .rc-type-card strong,
#cc-reports .rc-type-card span {
    display: block;
}

#cc-reports .rc-type-card strong { margin-bottom: 7px; color: var(--rc-text) !important; }

#cc-reports .rc-period-block { background: color-mix(in srgb, var(--cc-surface-strong) 48%, transparent); }
#cc-reports .rc-period-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }

#cc-reports .rc-period-button {
    min-height: 37px;
    padding: 7px 12px;
    border: 1px solid var(--rc-line);
    border-radius: 999px;
    background: var(--rc-panel-soft);
    color: var(--rc-text) !important;
    font-weight: 750;
}

#cc-reports .rc-period-button.is-selected {
    border-color: var(--rc-accent);
    background: color-mix(in srgb, var(--rc-accent) 18%, transparent);
}

#cc-reports .rc-custom-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 210px));
    gap: 12px;
    margin-top: 13px;
}

#cc-reports .rc-custom-dates label,
#cc-reports .rc-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--rc-muted) !important;
    font-weight: 700;
}

#cc-reports .rc-field > span,
#cc-reports .rc-custom-dates label > span {
    color: var(--rc-muted) !important;
}

#cc-reports .rc-field :is(input, select),
#cc-reports .rc-custom-dates input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--rc-line);
    border-radius: 9px;
    outline: none;
    background: var(--cc-input);
}

#cc-reports .rc-field :is(input, select):focus,
#cc-reports .rc-custom-dates input:focus { border-color: var(--rc-accent); box-shadow: 0 0 0 3px var(--cc-focus); }

#cc-reports .rc-refine { padding: 0 !important; }

#cc-reports .rc-refine-toggle,
#cc-reports .rc-raw-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 15px clamp(18px, 2.1vw, 27px);
    border: 0;
    background: color-mix(in srgb, var(--cc-surface-soft) 54%, transparent);
    color: var(--rc-text) !important;
    text-align: left;
}

#cc-reports .rc-refine-toggle span,
#cc-reports .rc-raw-toggle span { font-weight: 800; }
#cc-reports .rc-refine-toggle small,
#cc-reports .rc-raw-toggle small { color: var(--rc-muted) !important; text-align: right; }

#cc-reports .rc-refine-body {
    padding: 18px clamp(18px, 2.1vw, 27px) 22px;
    border-top: 1px solid var(--rc-line);
    background: color-mix(in srgb, var(--cc-surface-strong) 42%, transparent);
}

#cc-reports .rc-refine-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#cc-reports .rc-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--rc-line);
}

#cc-reports .rc-filter-head strong,
#cc-reports .rc-filter-head span { display: block; }
#cc-reports .rc-filter-head strong { color: var(--rc-text) !important; }

#cc-reports .rc-filter-list { display: grid; gap: 10px; margin-top: 12px; }

#cc-reports .rc-filter-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(160px, 1.2fr) minmax(160px, 1.2fr) 38px;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--rc-line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--cc-surface) 78%, transparent);
}

#cc-reports .rc-remove-filter {
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, var(--rc-danger) 55%, var(--rc-line));
    border-radius: 9px;
    background: transparent;
    color: var(--rc-danger) !important;
    font-size: 22px !important;
    line-height: 1 !important;
}

#cc-reports .rc-filter-empty { margin: 12px 0 0; color: var(--rc-muted) !important; }

#cc-reports .rc-builder-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px clamp(18px, 2.1vw, 27px);
    border-top: 1px solid var(--rc-line);
    background: linear-gradient(135deg, color-mix(in srgb, var(--rc-accent) 10%, transparent), color-mix(in srgb, var(--cc-surface-strong) 82%, transparent));
}

#cc-reports .rc-builder-footer strong { display: block; margin: 3px 0; color: var(--rc-text) !important; }

#cc-reports .rc-active-report { overflow: hidden; }

#cc-reports .rc-output-head,
#cc-reports .rc-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(18px, 2.1vw, 27px);
}

#cc-reports .rc-output-head { border-bottom: 1px solid var(--rc-line); }

#cc-reports .rc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: clamp(16px, 2vw, 25px);
}

#cc-reports .rc-summary-grid article,
#cc-reports .rc-total-card,
#cc-reports .rc-group-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--rc-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--cc-surface-soft) 62%, transparent);
}

#cc-reports .rc-summary-grid span,
#cc-reports .rc-total-card span,
#cc-reports .rc-group-card span {
    display: block;
    color: var(--rc-muted) !important;
}

#cc-reports .rc-summary-grid strong,
#cc-reports .rc-total-card strong,
#cc-reports .rc-group-card strong {
    display: block;
    margin-top: 3px;
    color: var(--rc-text) !important;
}

#cc-reports .rc-highlights,
#cc-reports .rc-analysis,
#cc-reports .rc-groups { padding: clamp(16px, 2vw, 25px); border-top: 1px solid var(--rc-line); }

#cc-reports .rc-total-grid,
#cc-reports .rc-group-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

#cc-reports .rc-analysis { background: color-mix(in srgb, var(--rc-accent) 6%, transparent); }
#cc-reports .rc-analysis-headline { margin: 6px 0 8px; color: var(--rc-text) !important; }
#cc-reports .rc-analysis-summary { margin: 0 0 15px; color: var(--rc-text) !important; }
#cc-reports .rc-analysis-empty { margin: 10px 0 0; color: var(--rc-muted) !important; }

#cc-reports .rc-analysis-block {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid color-mix(in srgb, var(--rc-accent) 78%, var(--rc-line));
    background: color-mix(in srgb, var(--cc-surface) 62%, transparent);
}

#cc-reports .rc-analysis-block h4 { margin: 0 0 7px; color: var(--rc-text) !important; }
#cc-reports .rc-analysis-block ul { margin: 0; padding-left: 20px; }
#cc-reports .rc-analysis-block li { margin: 5px 0; color: var(--rc-text) !important; }

#cc-reports .rc-raw { border-top: 1px solid var(--rc-line); }
#cc-reports .rc-raw-toggle { padding: 16px clamp(18px, 2.1vw, 27px); background: color-mix(in srgb, var(--cc-surface-strong) 56%, transparent); }
#cc-reports .rc-raw-body { padding: 0 clamp(18px, 2.1vw, 27px) 22px; }
#cc-reports .rc-table-wrap { overflow: auto; border: 1px solid var(--rc-line); border-radius: 11px; }

#cc-reports .rc-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: var(--cc-surface);
}

#cc-reports .rc-table :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--rc-line); text-align: left; vertical-align: top; }
#cc-reports .rc-table th { position: sticky; top: 0; background: var(--cc-surface-soft); color: var(--rc-text) !important; }
#cc-reports .rc-table td { color: var(--rc-text) !important; }
#cc-reports .rc-table-empty { color: var(--rc-muted) !important; text-align: center !important; }

#cc-reports .rc-history { overflow: hidden; }
#cc-reports .rc-history-head { background: color-mix(in srgb, var(--cc-surface-strong) 66%, transparent); }
#cc-reports .rc-history-body { padding: 0 clamp(18px, 2.1vw, 27px) 23px; border-top: 1px solid var(--rc-line); }

#cc-reports .rc-history-filters {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(130px, .8fr) minmax(130px, .8fr) minmax(200px, 1.5fr);
    gap: 10px;
    padding: 17px 0;
}

#cc-reports .rc-field--search { grid-column: auto; }
#cc-reports .rc-history-list { display: grid; gap: 9px; }

#cc-reports .rc-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    border: 1px solid var(--rc-line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--cc-surface) 82%, transparent);
}

#cc-reports .rc-history-copy { min-width: 0; }
#cc-reports .rc-history-copy strong,
#cc-reports .rc-history-copy span { display: block; }
#cc-reports .rc-history-copy strong { color: var(--rc-text) !important; }
#cc-reports .rc-history-copy span { margin-top: 2px; color: var(--rc-muted) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cc-reports .rc-history-empty { padding: 18px; color: var(--rc-muted) !important; text-align: center; border: 1px dashed var(--rc-line); border-radius: 10px; }

/* The opened report stays inside the expanded History drawer. */
#cc-reports .rc-history-report {
    margin-top: 16px;
}


#cc-reports .rc-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    max-width: min(440px, calc(100vw - 48px));
    padding: 12px 15px;
    border: 1px solid var(--rc-accent);
    border-radius: 11px;
    color: var(--rc-text) !important;
    background: var(--cc-surface-strong);
    box-shadow: var(--cc-shadow);
    font-weight: 750;
}

#cc-reports .rc-toast[data-variant="success"] { border-color: var(--rc-success); }
#cc-reports .rc-toast[data-variant="error"] { border-color: var(--rc-danger); }

@media (max-width: 1120px) {
    #cc-reports .rc-type-grid,
    #cc-reports .rc-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #cc-reports .rc-total-grid,
    #cc-reports .rc-group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #cc-reports .rc-history-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    #cc-reports { padding: 13px !important; border-radius: 15px !important; }
    #cc-reports .rc-hero,
    #cc-reports .rc-section-head,
    #cc-reports .rc-builder-footer,
    #cc-reports .rc-output-head,
    #cc-reports .rc-history-head,
    #cc-reports .rc-filter-head { flex-direction: column; align-items: stretch; }
    #cc-reports .rc-hero-actions,
    #cc-reports .rc-output-actions { justify-content: flex-start; }
    #cc-reports .rc-section-head > p { text-align: left; }
    #cc-reports .rc-type-grid,
    #cc-reports .rc-refine-grid,
    #cc-reports .rc-summary-grid,
    #cc-reports .rc-total-grid,
    #cc-reports .rc-group-grid,
    #cc-reports .rc-history-filters,
    #cc-reports .rc-custom-dates { grid-template-columns: minmax(0, 1fr); }
    #cc-reports .rc-filter-row { grid-template-columns: minmax(0, 1fr); }
    #cc-reports .rc-remove-filter { width: 100%; }
    #cc-reports .rc-history-item { align-items: stretch; flex-direction: column; }
    #cc-reports .rc-history-actions .rc-button { width: 100%; }
}

/* Reports: each saved report expands and collapses inside its own History row. */
#cc-reports .rc-history-item {
    display: block;
    padding: 0;
    overflow: hidden;
}

#cc-reports .rc-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
}

#cc-reports .rc-history-summary-button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit !important;
    text-align: left;
}

#cc-reports .rc-history-summary-button:hover .rc-history-copy strong,
#cc-reports .rc-history-summary-button:focus-visible .rc-history-copy strong {
    color: var(--rc-accent) !important;
}

#cc-reports .rc-history-summary-button:focus-visible {
    outline: 2px solid var(--rc-accent);
    outline-offset: 4px;
    border-radius: 6px;
}

#cc-reports .rc-history-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

#cc-reports .rc-history-item-body {
    border-top: 1px solid var(--rc-line);
    background: color-mix(in srgb, var(--cc-surface-strong) 36%, transparent);
}

#cc-reports .rc-history-item-body[hidden] {
    display: none !important;
}

#cc-reports .rc-history-report {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#cc-reports .rc-history-loading {
    margin: 0;
    padding: 18px clamp(18px, 2.1vw, 27px);
    color: var(--rc-muted) !important;
}

#cc-reports .rc-button--danger {
    border-color: color-mix(in srgb, var(--rc-danger) 72%, var(--rc-line)) !important;
    background: color-mix(in srgb, var(--rc-danger) 12%, transparent) !important;
    color: #ff6b6b !important;
}

#cc-reports .rc-button--danger:hover,
#cc-reports .rc-button--danger:focus-visible {
    border-color: #ff6b6b !important;
    background: color-mix(in srgb, var(--rc-danger) 23%, transparent) !important;
    color: #ffd3d3 !important;
}

@media (max-width: 760px) {
    #cc-reports .rc-history-summary,
    #cc-reports .rc-history-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #cc-reports .rc-history-actions {
        width: 100%;
    }

    #cc-reports .rc-history-actions .rc-button {
        width: 100%;
    }
}


/* Reports selection visibility and destructive-action guard. */
#cc-reports .rc-type-card,
#cc-reports .rc-period-button {
    position: relative;
}

#cc-reports .rc-type-card.is-selected,
#cc-reports .rc-type-card[data-selected="true"] {
    border: 2px solid #38c8ff !important;
    background: linear-gradient(145deg, #123e64 0%, #0b2742 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(56, 200, 255, .38), 0 0 0 2px rgba(56, 200, 255, .13), 0 12px 26px rgba(19, 151, 225, .18) !important;
}

#cc-reports .rc-type-card.is-selected::after,
#cc-reports .rc-type-card[data-selected="true"]::after {
    content: "✓ SELECTED";
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 4px 7px;
    border: 1px solid #5dd6ff;
    border-radius: 999px;
    background: #092b47;
    color: #d9f6ff !important;
    font-size: .72em;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1;
}

#cc-reports .rc-type-card.is-selected strong,
#cc-reports .rc-type-card[data-selected="true"] strong {
    color: #ffffff !important;
    padding-right: 104px;
}

#cc-reports .rc-period-button.is-selected,
#cc-reports .rc-period-button[data-selected="true"] {
    border: 2px solid #38c8ff !important;
    background: #0e426a !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(56, 200, 255, .3), 0 4px 15px rgba(19, 151, 225, .16) !important;
}

#cc-reports .rc-period-button.is-selected::before,
#cc-reports .rc-period-button[data-selected="true"]::before {
    content: "✓";
    margin-right: 6px;
    color: #7ae1ff !important;
    font-weight: 900;
}

#cc-reports .rc-history-actions .rc-button.rc-button--danger,
#cc-reports .rc-button.rc-button--danger {
    border: 1px solid #ff5b73 !important;
    background: #9f2134 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

#cc-reports .rc-history-actions .rc-button.rc-button--danger:hover,
#cc-reports .rc-history-actions .rc-button.rc-button--danger:focus-visible,
#cc-reports .rc-button.rc-button--danger:hover,
#cc-reports .rc-button.rc-button--danger:focus-visible {
    border-color: #ff9aaa !important;
    background: #c72c45 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Reports builder v2: actual records, explicit output mode, and multi-select filters. */
#cc-reports .rc-builder-section {
    padding: 20px clamp(18px, 2.1vw, 27px);
}

#cc-reports .rc-builder > .rc-builder-section + .rc-builder-section,
#cc-reports .rc-builder > .rc-refine,
#cc-reports .rc-builder > .rc-builder-footer {
    border-top: 1px solid var(--rc-line);
}

#cc-reports .rc-builder > .rc-builder-section {
    background: transparent;
}

#cc-reports .rc-output-choice {
    background: color-mix(in srgb, var(--rc-accent) 4%, transparent);
}

#cc-reports .rc-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}

#cc-reports .rc-mode-card {
    position: relative;
    min-height: 104px;
    padding: 16px;
    border: 1px solid var(--rc-line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--cc-surface) 90%, transparent);
    color: var(--rc-text) !important;
    text-align: left;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

#cc-reports .rc-mode-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--rc-accent) 80%, var(--rc-line));
}

#cc-reports .rc-mode-card strong,
#cc-reports .rc-mode-card span {
    display: block;
}

#cc-reports .rc-mode-card strong {
    margin-bottom: 7px;
    color: var(--rc-text) !important;
}

#cc-reports .rc-mode-card span {
    color: var(--rc-muted) !important;
}

#cc-reports .rc-mode-card.is-selected,
#cc-reports .rc-mode-card[data-selected="true"] {
    border: 2px solid #38c8ff !important;
    background: linear-gradient(145deg, #123e64 0%, #0b2742 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(56, 200, 255, .38), 0 0 0 2px rgba(56, 200, 255, .13), 0 12px 26px rgba(19, 151, 225, .18) !important;
}

#cc-reports .rc-mode-card.is-selected::after,
#cc-reports .rc-mode-card[data-selected="true"]::after {
    content: "✓ SELECTED";
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 4px 7px;
    border: 1px solid #5dd6ff;
    border-radius: 999px;
    background: #092b47;
    color: #d9f6ff !important;
    font-size: .72em;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1;
}

#cc-reports .rc-mode-card.is-selected strong,
#cc-reports .rc-mode-card[data-selected="true"] strong {
    padding-right: 104px;
    color: #ffffff !important;
}

#cc-reports .rc-contact-picker,
#cc-reports .rc-picker-mount {
    min-width: 0;
}

#cc-reports .rc-contact-picker {
    max-width: 620px;
}

#cc-reports .rc-multi-picker {
    position: relative;
    min-width: 0;
    border: 1px solid var(--rc-line);
    border-radius: 10px;
    background: var(--cc-input);
}

#cc-reports .rc-multi-picker[open] {
    border-color: var(--rc-accent);
    box-shadow: 0 0 0 3px var(--cc-focus);
}

#cc-reports .rc-multi-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 8px 10px;
    cursor: pointer;
    list-style: none;
    color: var(--rc-text) !important;
}

#cc-reports .rc-multi-summary::-webkit-details-marker {
    display: none;
}

#cc-reports .rc-multi-summary::after {
    content: "⌄";
    flex: 0 0 auto;
    color: var(--rc-muted) !important;
    font-weight: 900;
}

#cc-reports .rc-multi-picker[open] .rc-multi-summary::after {
    transform: rotate(180deg);
}

#cc-reports .rc-multi-title {
    min-width: 0;
    overflow: hidden;
    color: var(--rc-text) !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cc-reports .rc-multi-count {
    min-width: 0;
    overflow: hidden;
    color: var(--rc-muted) !important;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cc-reports .rc-multi-panel {
    display: grid;
    gap: 9px;
    padding: 10px;
    border-top: 1px solid var(--rc-line);
    background: color-mix(in srgb, var(--cc-surface-strong) 94%, transparent);
}

#cc-reports .rc-multi-tools {
    display: flex;
    gap: 8px;
}

#cc-reports .rc-multi-tool {
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid var(--rc-line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--cc-surface-soft) 70%, transparent);
    color: var(--rc-text) !important;
    font-weight: 800;
}

#cc-reports .rc-multi-tool:hover {
    border-color: var(--rc-accent);
}

#cc-reports .rc-multi-search {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--rc-line);
    border-radius: 8px;
    outline: none;
    background: var(--cc-input);
    color: var(--rc-text) !important;
}

#cc-reports .rc-multi-search:focus {
    border-color: var(--rc-accent);
    box-shadow: 0 0 0 3px var(--cc-focus);
}

#cc-reports .rc-multi-options {
    display: grid;
    gap: 4px;
    max-height: 240px;
    overflow: auto;
    padding-right: 2px;
}

#cc-reports .rc-multi-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 8px 7px;
    border-radius: 7px;
    color: var(--rc-text) !important;
    cursor: pointer;
}

#cc-reports .rc-multi-option:hover {
    background: color-mix(in srgb, var(--rc-accent) 10%, transparent);
}

#cc-reports .rc-multi-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--rc-accent);
}

#cc-reports .rc-multi-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cc-reports .rc-multi-empty,
#cc-reports .rc-picker-loading {
    margin: 0;
    padding: 8px;
    color: var(--rc-muted) !important;
}

#cc-reports .rc-refine-grid {
    grid-template-columns: minmax(240px, 420px);
}

#cc-reports .rc-filter-row {
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.6fr) auto;
    align-items: end;
}

#cc-reports .rc-filter-row .rc-remove-filter {
    min-height: 40px;
}

#cc-reports .rc-button.rc-button--danger,
#cc-reports .rc-history-actions .rc-button.rc-button--danger {
    border-color: #ff455f !important;
    background: #b91f38 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

#cc-reports .rc-button.rc-button--danger:hover,
#cc-reports .rc-button.rc-button--danger:focus-visible,
#cc-reports .rc-history-actions .rc-button.rc-button--danger:hover,
#cc-reports .rc-history-actions .rc-button.rc-button--danger:focus-visible {
    border-color: #ff9aaa !important;
    background: #d32643 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

@media (max-width: 900px) {
    #cc-reports .rc-mode-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #cc-reports .rc-filter-row {
        grid-template-columns: minmax(0, 1fr);
    }

    #cc-reports .rc-filter-row .rc-remove-filter {
        width: 100%;
    }
}


/* Reports: multi-record-type selection. */
#cc-reports .rc-type-grid::before {
    content: "Select one or more";
    grid-column: 1 / -1;
    color: var(--rc-muted) !important;
    font-weight: 750;
    letter-spacing: .02em;
}
#cc-reports .rc-raw--composite {
    display: grid;
    gap: 12px;
}
#cc-reports .rc-raw--composite > .rc-raw {
    border: 1px solid var(--rc-line);
    border-radius: 12px;
    overflow: hidden;
}
#cc-reports .rc-raw-section-label {
    padding: 14px 16px 0;
}
#cc-reports .rc-raw-section-label h4 {
    margin: 4px 0 0;
    color: var(--rc-text) !important;
}

#cc-reports .rc-filter-row {
    grid-template-columns: minmax(150px, .7fr) minmax(170px, .85fr) minmax(260px, 1.45fr) auto;
}
@media (max-width: 1020px) {
    #cc-reports .rc-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================================
   REPORT CENTER — ACCESSIBILITY / SC1 + SC2 REBUILD
   Final scoped rules. These intentionally replace the earlier hard-coded
   midnight-blue selected states so every Chady Coach theme stays readable.
   ============================================================================ */
#cc-reports {
    --rc-panel: var(--cc-surface);
    --rc-panel-soft: var(--cc-surface-soft);
    --rc-line: var(--cc-border);
    --rc-text: var(--cc-text);
    --rc-muted: var(--cc-muted);
    --rc-accent: var(--cc-accent);
    --rc-accent-2: var(--cc-accent-2);
    background: var(--cc-canvas) !important;
    color: var(--rc-text) !important;
    gap: 16px;
    font-size: calc(15px * var(--cc-text-scale)) !important;
    line-height: 1.45;
}

#cc-reports .rc-hero,
#cc-reports .rc-builder,
#cc-reports .rc-active-report,
#cc-reports .rc-history {
    background: var(--rc-panel) !important;
    border: 1px solid var(--rc-line) !important;
    box-shadow: none !important;
}

#cc-reports .rc-hero {
    background: var(--cc-surface-strong) !important;
    padding: 22px clamp(20px, 2.2vw, 30px);
}

#cc-reports .rc-hero h1 {
    font-size: calc(28px * var(--cc-heading-scale)) !important;
    line-height: 1.15 !important;
}

#cc-reports .rc-section-head h2,
#cc-reports .rc-output-head h2,
#cc-reports .rc-history-head h2 {
    font-size: calc(20px * var(--cc-heading-scale)) !important;
    line-height: 1.2 !important;
}

#cc-reports .rc-kicker,
#cc-reports .rc-step {
    color: var(--rc-accent) !important;
    font-size: calc(12px * var(--cc-text-scale)) !important;
    letter-spacing: .05em !important;
    line-height: 1.25 !important;
}

#cc-reports .rc-hero p,
#cc-reports .rc-section-head p,
#cc-reports .rc-history-head p,
#cc-reports .rc-builder-footer p,
#cc-reports .rc-output-head p,
#cc-reports .rc-type-card span,
#cc-reports .rc-mode-card span,
#cc-reports .rc-filter-head span,
#cc-reports .rc-summary-grid span,
#cc-reports .rc-total-card span,
#cc-reports .rc-group-card span,
#cc-reports .rc-history-copy span,
#cc-reports .rc-multi-count {
    color: var(--rc-muted) !important;
    font-size: calc(14px * var(--cc-text-scale)) !important;
    line-height: 1.45 !important;
}

#cc-reports .rc-builder > :not(.rc-builder-footer) {
    padding: 22px clamp(20px, 2.2vw, 30px) !important;
}

#cc-reports .rc-type-grid,
#cc-reports .rc-mode-grid {
    gap: 12px;
    margin-top: 16px;
}

#cc-reports .rc-type-card,
#cc-reports .rc-mode-card {
    min-height: 112px;
    padding: 18px;
    background: var(--cc-surface-strong) !important;
    border: 1px solid var(--rc-line) !important;
    color: var(--rc-text) !important;
    box-shadow: none !important;
}

#cc-reports .rc-type-card strong,
#cc-reports .rc-mode-card strong {
    margin-bottom: 8px;
    padding-right: 0 !important;
    color: var(--rc-text) !important;
    font-size: calc(16px * var(--cc-text-scale)) !important;
    line-height: 1.25 !important;
}

#cc-reports .rc-type-card.is-selected,
#cc-reports .rc-type-card[data-selected="true"],
#cc-reports .rc-mode-card.is-selected,
#cc-reports .rc-mode-card[data-selected="true"] {
    background: color-mix(in srgb, var(--rc-accent) 15%, var(--cc-surface-strong)) !important;
    border: 2px solid var(--rc-accent) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-accent) 28%, transparent) !important;
}

#cc-reports .rc-type-card.is-selected::after,
#cc-reports .rc-type-card[data-selected="true"]::after,
#cc-reports .rc-mode-card.is-selected::after,
#cc-reports .rc-mode-card[data-selected="true"]::after {
    content: "Selected" !important;
    top: 12px;
    right: 12px;
    padding: 5px 8px;
    border: 0 !important;
    border-radius: 999px;
    background: var(--rc-accent) !important;
    color: var(--cc-on-accent) !important;
    -webkit-text-fill-color: var(--cc-on-accent) !important;
    font-size: calc(11px * var(--cc-text-scale)) !important;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.1;
}

#cc-reports .rc-type-card.is-selected strong,
#cc-reports .rc-type-card[data-selected="true"] strong,
#cc-reports .rc-mode-card.is-selected strong,
#cc-reports .rc-mode-card[data-selected="true"] strong {
    padding-right: 82px !important;
    color: var(--rc-text) !important;
}

#cc-reports .rc-period-block,
#cc-reports .rc-output-choice,
#cc-reports .rc-builder-footer,
#cc-reports .rc-history-head,
#cc-reports .rc-refine-body,
#cc-reports .rc-raw-toggle {
    background: var(--cc-surface-strong) !important;
}

#cc-reports .rc-period-button,
#cc-reports .rc-button--secondary,
#cc-reports .rc-multi-tool,
#cc-reports .rc-refine-toggle {
    background: var(--cc-surface-soft) !important;
    border: 1px solid var(--rc-line) !important;
    color: var(--rc-text) !important;
}

#cc-reports .rc-period-button.is-selected,
#cc-reports .rc-period-button[data-selected="true"] {
    background: var(--rc-accent) !important;
    border: 2px solid var(--rc-accent) !important;
    color: var(--cc-on-accent) !important;
    box-shadow: none !important;
}

#cc-reports .rc-period-button.is-selected::before,
#cc-reports .rc-period-button[data-selected="true"]::before {
    color: var(--cc-on-accent) !important;
}

#cc-reports .rc-contact-picker {
    max-width: 700px;
}

#cc-reports .rc-multi-picker {
    background: var(--cc-input) !important;
    border: 1px solid var(--rc-line) !important;
}

#cc-reports .rc-multi-picker[open] {
    border-color: var(--rc-accent) !important;
    box-shadow: 0 0 0 3px var(--cc-focus) !important;
}

#cc-reports .rc-multi-summary {
    min-height: 48px;
    padding: 11px 13px;
}

#cc-reports .rc-multi-title {
    font-size: calc(16px * var(--cc-text-scale)) !important;
    font-weight: 850;
}

#cc-reports .rc-multi-count {
    font-size: calc(13px * var(--cc-text-scale)) !important;
}

#cc-reports .rc-multi-panel {
    background: var(--cc-surface-strong) !important;
    padding: 12px;
}

#cc-reports .rc-multi-tools {
    gap: 9px;
}

#cc-reports .rc-multi-tool {
    min-height: 36px;
    padding: 7px 11px;
    font-size: calc(14px * var(--cc-text-scale)) !important;
}

#cc-reports .rc-multi-tool--all {
    border-color: var(--rc-accent) !important;
    background: color-mix(in srgb, var(--rc-accent) 14%, var(--cc-surface-soft)) !important;
}

#cc-reports .rc-multi-search,
#cc-reports .rc-field :is(input, select),
#cc-reports .rc-custom-dates input {
    min-height: 42px;
    background: var(--cc-input) !important;
    border: 1px solid var(--rc-line) !important;
    color: var(--rc-text) !important;
    font-size: calc(15px * var(--cc-text-scale)) !important;
}

#cc-reports .rc-multi-options {
    max-height: 290px;
    gap: 5px;
}

#cc-reports .rc-multi-option {
    min-height: 42px;
    padding: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--rc-text) !important;
    font-size: calc(15px * var(--cc-text-scale)) !important;
}

#cc-reports .rc-multi-option:has(input:checked) {
    background: color-mix(in srgb, var(--rc-accent) 14%, var(--cc-surface)) !important;
    border-color: color-mix(in srgb, var(--rc-accent) 68%, var(--rc-line)) !important;
}

#cc-reports .rc-multi-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--rc-accent);
}

#cc-reports .rc-builder-footer {
    background: var(--cc-surface-soft) !important;
}

#cc-reports .rc-builder-footer strong,
#cc-reports .rc-output-head h2,
#cc-reports .rc-history-head h2,
#cc-reports .rc-analysis-headline,
#cc-reports .rc-analysis-summary,
#cc-reports .rc-analysis-block h4,
#cc-reports .rc-analysis-block li,
#cc-reports .rc-table th,
#cc-reports .rc-table td {
    color: var(--rc-text) !important;
}

#cc-reports .rc-analysis,
#cc-reports .rc-history-item,
#cc-reports .rc-summary-grid article,
#cc-reports .rc-total-card,
#cc-reports .rc-group-card,
#cc-reports .rc-raw--composite > .rc-raw {
    background: var(--cc-surface-strong) !important;
    border-color: var(--rc-line) !important;
}

#cc-reports .rc-table th {
    background: var(--cc-surface-soft) !important;
}

#cc-reports .rc-table td {
    background: var(--cc-surface) !important;
}

#cc-reports .rc-status,
#cc-reports .rc-toast {
    color: var(--rc-text) !important;
    background: var(--cc-surface-strong) !important;
}

@media (max-width: 900px) {
    #cc-reports .rc-type-grid,
    #cc-reports .rc-mode-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* ============================================================================
   REPORT CENTER — COMFORT / CONTRAST RESET
   Reports uses one calm page surface with distinct functional layers. This
   intentionally overrides the earlier hard-coded dark-blue selected states.
   ============================================================================ */
#cc-reports {
    --rc-panel: transparent;
    --rc-panel-soft: transparent;
    --rc-line: var(--cc-border);
    --rc-text: var(--cc-text);
    --rc-muted: var(--cc-muted);
    --rc-accent: var(--cc-accent);
    --rc-accent-2: var(--cc-accent-2);
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    gap: 16px !important;
}

/* Only the major working areas receive a surface. Inner sections are separated
   by whitespace and rules instead of another same-color card. */
#cc-reports .rc-hero {
    background: var(--cc-surface-strong) !important;
    border: 1px solid var(--cc-border-strong) !important;
    box-shadow: var(--cc-shadow) !important;
}

#cc-reports .rc-builder,
#cc-reports .rc-active-report,
#cc-reports .rc-history {
    background: var(--cc-surface) !important;
    border: 1px solid var(--cc-border) !important;
    box-shadow: none !important;
}

#cc-reports .rc-builder > :not(.rc-builder-footer),
#cc-reports .rc-output-choice,
#cc-reports .rc-period-block,
#cc-reports .rc-refine-body,
#cc-reports .rc-history-head,
#cc-reports .rc-raw-toggle,
#cc-reports .rc-builder-footer {
    background: transparent !important;
}

#cc-reports .rc-builder > :not(:first-child),
#cc-reports .rc-active-report > :not(:first-child),
#cc-reports .rc-history-body,
#cc-reports .rc-history-item-body,
#cc-reports .rc-raw,
#cc-reports .rc-highlights,
#cc-reports .rc-analysis,
#cc-reports .rc-groups {
    border-top-color: var(--cc-border) !important;
}

#cc-reports .rc-type-card,
#cc-reports .rc-mode-card,
#cc-reports .rc-history-item,
#cc-reports .rc-summary-grid article,
#cc-reports .rc-total-card,
#cc-reports .rc-group-card,
#cc-reports .rc-raw--composite > .rc-raw,
#cc-reports .rc-analysis-block {
    background: var(--cc-surface-strong) !important;
    border-color: var(--cc-border) !important;
    box-shadow: none !important;
}

#cc-reports .rc-type-card,
#cc-reports .rc-mode-card {
    min-height: 110px !important;
}

#cc-reports .rc-type-card:hover,
#cc-reports .rc-mode-card:hover,
#cc-reports .rc-history-item:hover {
    background: var(--cc-surface-soft) !important;
    border-color: var(--cc-border-strong) !important;
    transform: none !important;
}

/* Selected means a clean accent edge + outline, not an entire second theme. */
#cc-reports .rc-type-card.is-selected,
#cc-reports .rc-type-card[data-selected="true"],
#cc-reports .rc-mode-card.is-selected,
#cc-reports .rc-mode-card[data-selected="true"] {
    background: var(--cc-surface-hover) !important;
    border: 2px solid var(--cc-accent) !important;
    box-shadow: inset 4px 0 0 var(--cc-accent) !important;
}

#cc-reports .rc-type-card.is-selected::after,
#cc-reports .rc-type-card[data-selected="true"]::after,
#cc-reports .rc-mode-card.is-selected::after,
#cc-reports .rc-mode-card[data-selected="true"]::after {
    background: var(--cc-surface-strong) !important;
    border: 1px solid var(--cc-accent) !important;
    color: var(--cc-accent) !important;
    -webkit-text-fill-color: var(--cc-accent) !important;
    box-shadow: none !important;
}

#cc-reports .rc-type-card.is-selected strong,
#cc-reports .rc-type-card[data-selected="true"] strong,
#cc-reports .rc-mode-card.is-selected strong,
#cc-reports .rc-mode-card[data-selected="true"] strong {
    color: var(--cc-text) !important;
}

#cc-reports .rc-period-button,
#cc-reports .rc-button--secondary,
#cc-reports .rc-multi-tool,
#cc-reports .rc-refine-toggle {
    background: var(--cc-surface-strong) !important;
    border-color: var(--cc-border) !important;
    color: var(--cc-text) !important;
}

#cc-reports .rc-period-button.is-selected,
#cc-reports .rc-period-button[data-selected="true"] {
    background: var(--cc-surface-hover) !important;
    border: 2px solid var(--cc-accent) !important;
    color: var(--cc-text) !important;
    box-shadow: inset 3px 0 0 var(--cc-accent) !important;
}

#cc-reports .rc-period-button.is-selected::before,
#cc-reports .rc-period-button[data-selected="true"]::before {
    color: var(--cc-accent) !important;
}

#cc-reports .rc-contact-picker,
#cc-reports .rc-multi-picker,
#cc-reports .rc-multi-panel,
#cc-reports .rc-table-wrap {
    background: var(--cc-surface-strong) !important;
    border-color: var(--cc-border) !important;
}

#cc-reports .rc-multi-picker[open] {
    border-color: var(--cc-border-strong) !important;
}

#cc-reports .rc-multi-summary,
#cc-reports .rc-multi-option,
#cc-reports .rc-history-summary,
#cc-reports .rc-history-item-body {
    background: transparent !important;
}

#cc-reports .rc-multi-option:has(input:checked) {
    background: var(--cc-surface-hover) !important;
    border-color: var(--cc-accent) !important;
}

#cc-reports .rc-multi-tool--all {
    background: var(--cc-surface-hover) !important;
    border-color: var(--cc-accent) !important;
}

#cc-reports .rc-multi-search,
#cc-reports .rc-field :is(input, select),
#cc-reports .rc-custom-dates input {
    background: var(--cc-input) !important;
    border-color: var(--cc-border-strong) !important;
    color: var(--cc-text) !important;
}

#cc-reports .rc-analysis {
    background: transparent !important;
}

#cc-reports .rc-analysis-block {
    border-left: 4px solid var(--cc-accent) !important;
}

#cc-reports .rc-table {
    background: var(--cc-surface-strong) !important;
}

#cc-reports .rc-table th {
    background: var(--cc-surface-soft) !important;
    color: var(--cc-text) !important;
}

#cc-reports .rc-table td {
    background: transparent !important;
    color: var(--cc-text) !important;
}

#cc-reports .rc-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--cc-surface-soft) 48%, transparent) !important;
}

#cc-reports .rc-kicker,
#cc-reports .rc-step {
    color: var(--cc-accent) !important;
}

#cc-reports .rc-hero p,
#cc-reports .rc-section-head p,
#cc-reports .rc-history-head p,
#cc-reports .rc-builder-footer p,
#cc-reports .rc-output-head p,
#cc-reports .rc-type-card span,
#cc-reports .rc-mode-card span,
#cc-reports .rc-filter-head span,
#cc-reports .rc-multi-count,
#cc-reports .rc-history-copy span {
    color: var(--cc-muted) !important;
}

#cc-reports .rc-button--danger,
#cc-reports .rc-history-actions .rc-button.rc-button--danger {
    background: color-mix(in srgb, var(--cc-danger) 18%, var(--cc-surface-strong)) !important;
    border-color: var(--cc-danger) !important;
    color: var(--cc-text) !important;
    -webkit-text-fill-color: var(--cc-text) !important;
}


/* ============================================================================
   REPORTS COMFORT LAYERS + ACTIVITY THREAD COMPACT MESSAGE CONTROLS
   ============================================================================ */

/* Reports must read as layered work areas, not one continuous wall of the
   same color. Each theme keeps its own identity while cards separate clearly
   from the page and section surfaces. */
#cc-reports {
    --rc-work-surface: var(--cc-surface);
    --rc-card-surface: var(--cc-surface-soft);
    --rc-card-hover: var(--cc-surface-hover);
    --rc-selected-surface: color-mix(in srgb, var(--cc-accent) 12%, var(--cc-surface-soft));
}

html[data-cc-theme="midnight"] #cc-reports {
    --rc-card-surface: linear-gradient(135deg, color-mix(in srgb, var(--cc-accent) 9%, var(--cc-surface-soft)), var(--cc-surface-soft));
    --rc-selected-surface: linear-gradient(135deg, color-mix(in srgb, var(--cc-accent) 20%, var(--cc-surface-hover)), color-mix(in srgb, var(--cc-accent-2) 9%, var(--cc-surface-hover)));
}

html[data-cc-theme="aurora"] #cc-reports {
    --rc-card-surface: linear-gradient(135deg, color-mix(in srgb, var(--cc-accent-2) 10%, var(--cc-surface-soft)), var(--cc-surface-soft));
    --rc-selected-surface: linear-gradient(135deg, color-mix(in srgb, var(--cc-accent) 16%, var(--cc-surface-hover)), color-mix(in srgb, var(--cc-accent-2) 12%, var(--cc-surface-hover)));
}

html[data-cc-theme="ai"] #cc-reports {
    --rc-card-surface: linear-gradient(135deg, color-mix(in srgb, var(--cc-accent-2) 10%, var(--cc-surface-soft)), var(--cc-surface-soft));
    --rc-selected-surface: linear-gradient(135deg, color-mix(in srgb, var(--cc-accent) 16%, var(--cc-surface-hover)), color-mix(in srgb, var(--cc-accent-2) 12%, var(--cc-surface-hover)));
}

html[data-cc-theme="ember"] #cc-reports {
    --rc-card-surface: color-mix(in srgb, var(--cc-surface-soft) 88%, var(--cc-canvas));
    --rc-selected-surface: color-mix(in srgb, var(--cc-accent) 13%, var(--cc-surface-soft));
}

html[data-cc-theme="glacier"] #cc-reports {
    --rc-work-surface: color-mix(in srgb, var(--cc-surface) 92%, var(--cc-canvas));
    --rc-card-surface: #ffffff;
    --rc-card-hover: var(--cc-surface-soft);
    --rc-selected-surface: color-mix(in srgb, var(--cc-accent) 10%, #ffffff);
}

#cc-reports .rc-builder,
#cc-reports .rc-active-report,
#cc-reports .rc-history {
    background: var(--rc-work-surface) !important;
}

#cc-reports .rc-type-card,
#cc-reports .rc-mode-card,
#cc-reports .rc-history-item,
#cc-reports .rc-summary-grid article,
#cc-reports .rc-total-card,
#cc-reports .rc-group-card,
#cc-reports .rc-raw--composite > .rc-raw,
#cc-reports .rc-analysis-block,
#cc-reports .rc-contact-picker,
#cc-reports .rc-multi-picker,
#cc-reports .rc-multi-panel,
#cc-reports .rc-table-wrap {
    background: var(--rc-card-surface) !important;
    border-color: var(--cc-border-strong) !important;
}

#cc-reports .rc-type-card:hover,
#cc-reports .rc-mode-card:hover,
#cc-reports .rc-history-item:hover {
    background: var(--rc-card-hover) !important;
}

#cc-reports .rc-type-card.is-selected,
#cc-reports .rc-type-card[data-selected="true"],
#cc-reports .rc-mode-card.is-selected,
#cc-reports .rc-mode-card[data-selected="true"] {
    background: var(--rc-selected-surface) !important;
    border-color: var(--cc-accent) !important;
    box-shadow: inset 4px 0 0 var(--cc-accent), 0 0 0 1px color-mix(in srgb, var(--cc-accent) 26%, transparent) !important;
}

#cc-reports .rc-multi-option:has(input:checked),
#cc-reports .rc-multi-tool--all,
#cc-reports .rc-period-button.is-selected,
#cc-reports .rc-period-button[data-selected="true"] {
    background: var(--rc-selected-surface) !important;
}

/* Activity thread: actions occupy a real header row, never absolute space on
   top of message text. Long messages begin as a four-line preview. */
#cc-activity .ca-thread-entry {
    display: block !important;
    min-height: 0 !important;
    padding: 11px 12px 12px !important;
    overflow: visible !important;
}

#cc-activity .ca-thread-entry > .ca-thread-entry-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 10px !important;
    flex-wrap: wrap !important;
}

#cc-activity .ca-thread-entry .ca-thread-meta {
    position: static !important;
    flex: 1 1 135px !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#cc-activity .ca-thread-entry .ca-card-actions {
    position: static !important;
    display: flex !important;
    width: auto !important;
    max-width: 100% !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 1 auto !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin: 0 !important;
    white-space: normal !important;
}

#cc-activity .ca-thread-entry .ca-card-actions :is(
    .ca-edit-button,
    .ca-reply-button,
    .ca-danger-button,
    .ca-thread-expand-button
) {
    width: auto !important;
    min-width: 0 !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 4px 7px !important;
    border-radius: 7px !important;
    font-size: max(11px, calc(11px * var(--cc-support-scale, 1))) !important;
    line-height: 1 !important;
}

#cc-activity .ca-thread-expand-button {
    border-color: var(--cc-border-strong) !important;
    background: var(--cc-surface-hover) !important;
    color: var(--cc-text) !important;
    -webkit-text-fill-color: var(--cc-text) !important;
}

#cc-activity .ca-thread-copy {
    max-width: 100% !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    overflow-wrap: anywhere !important;
    white-space: pre-wrap !important;
}

#cc-activity .ca-thread-copy.is-collapsed {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 4 !important;
    overflow: hidden !important;
}

@media (max-width: 760px) {
    #cc-activity .ca-thread-entry > .ca-thread-entry-head {
        align-items: flex-start !important;
    }

    #cc-activity .ca-thread-entry .ca-thread-meta {
        flex-basis: 100% !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }

    #cc-activity .ca-thread-entry .ca-card-actions {
        justify-content: flex-start !important;
    }
}

/* ============================================================================
   REPORTS: TRUE THEME LAYERS — FINAL VISIBILITY PASS
   Every theme gets a distinct page, section, card, and raised-detail layer.
   ============================================================================ */
#cc-reports {
    --rc-page-surface: var(--cc-surface-strong);
    --rc-section-surface: var(--cc-surface);
    --rc-card-surface-final: var(--cc-surface-soft);
    --rc-detail-surface: var(--cc-surface-strong);
    --rc-selected-surface-final: var(--cc-surface-hover);
    --rc-layer-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

html[data-cc-theme="midnight"] #cc-reports {
    --rc-page-surface: #09182c;
    --rc-section-surface: #0e2a49;
    --rc-card-surface-final: #173d66;
    --rc-detail-surface: #10233f;
    --rc-selected-surface-final: #164f79;
    --rc-layer-shadow: 0 14px 30px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(126, 220, 255, .08);
}

html[data-cc-theme="aurora"] #cc-reports {
    --rc-page-surface: #191733;
    --rc-section-surface: #292656;
    --rc-card-surface-final: #3a3674;
    --rc-detail-surface: #211f48;
    --rc-selected-surface-final: #47418c;
    --rc-layer-shadow: 0 14px 30px rgba(6, 4, 24, .31), inset 0 1px 0 rgba(210, 194, 255, .07);
}

html[data-cc-theme="ai"] #cc-reports {
    --rc-page-surface: #081933;
    --rc-section-surface: #102b50;
    --rc-card-surface-final: #173d6d;
    --rc-detail-surface: #0a1f3d;
    --rc-selected-surface-final: #1b5487;
    --rc-layer-shadow: 0 14px 30px rgba(1, 9, 23, .34), inset 0 1px 0 rgba(115, 228, 255, .08);
}

html[data-cc-theme="ember"] #cc-reports {
    --rc-page-surface: #2b151b;
    --rc-section-surface: #412128;
    --rc-card-surface-final: #65372f;
    --rc-detail-surface: #351a21;
    --rc-selected-surface-final: #794336;
    --rc-layer-shadow: 0 13px 28px rgba(28, 7, 10, .34), inset 0 1px 0 rgba(255, 200, 171, .07);
}

html[data-cc-theme="glacier"] #cc-reports {
    --rc-page-surface: #e9f3f9;
    --rc-section-surface: #f8fcff;
    --rc-card-surface-final: #dcecf6;
    --rc-detail-surface: #ffffff;
    --rc-selected-surface-final: #c5e0ef;
    --rc-layer-shadow: 0 11px 25px rgba(28, 71, 100, .12), inset 0 1px 0 rgba(255, 255, 255, .92);
}

#cc-reports .rc-hero,
#cc-reports .rc-builder,
#cc-reports .rc-active-report,
#cc-reports .rc-history {
    background: var(--rc-page-surface) !important;
}

#cc-reports .rc-builder > .rc-builder-section,
#cc-reports .rc-output-choice,
#cc-reports .rc-period-block,
#cc-reports .rc-refine,
#cc-reports .rc-refine-body,
#cc-reports .rc-builder-footer,
#cc-reports .rc-history-head,
#cc-reports .rc-history-body {
    background: var(--rc-section-surface) !important;
    border-color: var(--cc-border-strong) !important;
}

#cc-reports .rc-type-card,
#cc-reports .rc-mode-card,
#cc-reports .rc-contact-picker,
#cc-reports .rc-multi-picker,
#cc-reports .rc-multi-panel,
#cc-reports .rc-history-item,
#cc-reports .rc-summary-grid article,
#cc-reports .rc-total-card,
#cc-reports .rc-group-card,
#cc-reports .rc-analysis-block,
#cc-reports .rc-table-wrap {
    background: var(--rc-card-surface-final) !important;
    border-color: var(--cc-border-strong) !important;
    box-shadow: var(--rc-layer-shadow) !important;
}

#cc-reports .rc-analysis,
#cc-reports .rc-raw,
#cc-reports .rc-raw--composite,
#cc-reports .rc-history-item-body,
#cc-reports .rc-raw-body,
#cc-reports .rc-highlights,
#cc-reports .rc-groups {
    background: var(--rc-detail-surface) !important;
    border-color: var(--cc-border) !important;
}

#cc-reports .rc-type-card.is-selected,
#cc-reports .rc-type-card[data-selected="true"],
#cc-reports .rc-mode-card.is-selected,
#cc-reports .rc-mode-card[data-selected="true"],
#cc-reports .rc-period-button.is-selected,
#cc-reports .rc-period-button[data-selected="true"],
#cc-reports .rc-multi-option:has(input:checked),
#cc-reports .rc-multi-tool--all {
    background: var(--rc-selected-surface-final) !important;
    border-color: var(--cc-accent) !important;
    box-shadow: inset 4px 0 0 var(--cc-accent), var(--rc-layer-shadow) !important;
}

#cc-reports .rc-type-card:hover,
#cc-reports .rc-mode-card:hover,
#cc-reports .rc-history-item:hover {
    filter: brightness(1.07);
}

/* ============================================================================
   DESKTOP FIXED SIDEBAR
   The sidebar remains in view while the document/main content scrolls.
   The navigation list becomes the only scrollable area inside the sidebar.
   Mobile keeps its existing top-navigation layout.
   ============================================================================ */
@media (min-width: 901px) {
    html {
        --cc-desktop-sidebar-width: 270px;
    }

    html[data-cc-sidebar="compact"] {
        --cc-desktop-sidebar-width: 74px;
    }

    #app {
        display: block !important;
        min-height: 100dvh !important;
    }

    .cc-sidebar {
        position: fixed !important;
        inset: 0 auto 0 0 !important;
        z-index: 1000 !important;
        width: var(--cc-desktop-sidebar-width) !important;
        min-width: var(--cc-desktop-sidebar-width) !important;
        max-width: var(--cc-desktop-sidebar-width) !important;
        height: 100dvh !important;
        min-height: 0 !important;
        padding: 16px 12px 14px !important;
        overflow: hidden !important;
        overscroll-behavior: contain;
    }

    .cc-sidebar-brand,
    .cc-appearance,
    .cc-sidebar-footer {
        flex: 0 0 auto !important;
    }

    .cc-sidebar-nav {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    #main-content {
        width: calc(100% - var(--cc-desktop-sidebar-width)) !important;
        min-height: 100dvh !important;
        margin-left: var(--cc-desktop-sidebar-width) !important;
    }
}


/* ============================================================================
   MOBILE NAVIGATION DRAWER
   On phones and narrow windows, the sidebar is an off-canvas drawer opened by
   Menu. It never renders as a full navigation page before the app content.
   ============================================================================ */
.cc-mobile-nav-toggle,
.cc-mobile-nav-close,
.cc-mobile-nav-scrim {
    display: none;
}

@media (max-width: 900px) {
    body.cc-mobile-nav-open {
        overflow: hidden !important;
    }

    .cc-mobile-nav-toggle {
        position: fixed;
        top: max(12px, env(safe-area-inset-top));
        left: max(12px, env(safe-area-inset-left));
        z-index: 1200;
        display: inline-flex !important;
        min-height: 42px;
        align-items: center;
        gap: 9px;
        padding: 9px 12px;
        border: 1px solid var(--cc-border-strong);
        border-radius: 11px;
        background: var(--cc-surface-strong);
        box-shadow: var(--cc-shadow);
        color: var(--cc-text);
        font: inherit;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }

    .cc-mobile-nav-toggle:focus-visible,
    .cc-mobile-nav-close:focus-visible {
        outline: 3px solid var(--cc-focus);
        outline-offset: 2px;
    }

    .cc-mobile-nav-toggle-icon {
        display: grid;
        width: 18px;
        gap: 3px;
    }

    .cc-mobile-nav-toggle-icon i {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--cc-accent);
    }

    .cc-mobile-nav-scrim {
        position: fixed;
        z-index: 1190;
        inset: 0;
        display: block !important;
        visibility: hidden;
        background: rgba(3, 10, 20, .58);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease, visibility .2s ease;
    }

    body.cc-mobile-nav-open .cc-mobile-nav-scrim {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .cc-sidebar {
        position: fixed !important;
        z-index: 1210 !important;
        inset: 0 auto 0 0 !important;
        display: flex !important;
        width: min(86vw, 340px) !important;
        min-width: min(86vw, 340px) !important;
        max-width: min(86vw, 340px) !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        padding: max(16px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)) !important;
        overflow: hidden !important;
        transform: translateX(-105%) !important;
        visibility: hidden;
        box-shadow: 18px 0 46px rgba(0, 0, 0, .32) !important;
        transition: transform .22s ease, visibility .22s ease;
        will-change: transform;
    }

    body.cc-mobile-nav-open .cc-sidebar {
        transform: translateX(0) !important;
        visibility: visible;
    }

    .cc-sidebar::before,
    .cc-sidebar::after {
        display: block !important;
    }

    .cc-sidebar-brand {
        flex: 0 0 auto;
        align-items: center !important;
        margin-bottom: 14px !important;
        padding-bottom: 13px !important;
    }

    .cc-sidebar-version {
        display: none !important;
    }

    .cc-mobile-nav-close {
        display: inline-flex !important;
        min-height: 36px;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        padding: 7px 9px;
        border: 1px solid var(--cc-border);
        border-radius: 9px;
        background: var(--cc-surface-strong);
        color: var(--cc-text);
        font: inherit;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }

    .cc-mobile-nav-close > span:first-child {
        color: var(--cc-accent);
        font-size: 22px !important;
        font-weight: 500;
        line-height: .7;
    }

    .cc-sidebar-nav {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        flex: 1 1 auto;
        min-height: 0;
        gap: 16px !important;
        padding: 0 2px 12px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    .cc-sidebar-group {
        display: grid !important;
        gap: 4px !important;
    }

    .cc-sidebar-group-label {
        display: block !important;
        margin: 0 7px 4px !important;
    }

    .cc-sidebar-link,
    .cc-sidebar-link.is-active {
        display: grid !important;
        grid-template-columns: 24px minmax(0, 1fr) !important;
        min-height: 44px !important;
        gap: 9px !important;
        padding: 9px 10px !important;
    }

    .cc-sidebar-link.is-active::before {
        left: -2px !important;
        width: 2px !important;
        height: 24px !important;
    }

    .cc-appearance {
        display: grid !important;
        flex: 0 0 auto;
        grid-template-columns: minmax(0, 1fr) !important;
        margin: 10px 1px 8px !important;
    }

    .cc-sidebar-footer {
        display: flex !important;
        flex: 0 0 auto;
        min-height: 40px !important;
    }

    #main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 72px 14px 14px !important;
    }
}

@media (max-width: 560px) {
    #main-content {
        padding: 70px 10px 10px !important;
    }

    .cc-mobile-nav-toggle {
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-mobile-nav-toggle,
    .cc-mobile-nav-scrim,
    .cc-sidebar {
        transition: none !important;
    }
}

/* Reports: clean saved-report insights and explicit History filter scope. */
#cc-reports .rc-history-scope {
    display: inline-flex;
    width: 100%;
    gap: 6px;
}

#cc-reports .rc-history-scope-button {
    flex: 1 1 0;
    min-width: 0;
}

#cc-reports .rc-history-scope-button.is-selected {
    border-color: var(--rc-accent) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc-accent) 65%, transparent), 0 0 14px color-mix(in srgb, var(--rc-accent) 34%, transparent);
}

#cc-reports .rc-summary-grid--insights {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

#cc-reports .rc-summary-grid--insights .rc-insight-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--rc-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--cc-surface-soft) 62%, transparent);
}

#cc-reports .rc-summary-grid--insights .rc-insight-card span {
    display: block;
    color: var(--rc-muted) !important;
}

#cc-reports .rc-summary-grid--insights .rc-insight-card strong {
    display: block;
    margin-top: 3px;
    color: var(--rc-text) !important;
}

#cc-reports .rc-summary-grid--insights .rc-insight-card--wins {
    border-color: color-mix(in srgb, var(--rc-accent) 78%, var(--rc-line));
    animation: cc-report-win-pulse 2.2s ease-in-out infinite;
}

@keyframes cc-report-win-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rc-accent) 0%, transparent); }
    50% { box-shadow: 0 0 16px 2px color-mix(in srgb, var(--rc-accent) 36%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    #cc-reports .rc-summary-grid--insights .rc-insight-card--wins { animation: none; }
}



/* ============================================================================
   AI THEME — APPROVED CYAN/BLUE GLOBAL SELECTED STATE
   This preserves Aurora as-is and gives AI the original cyan/blue glow.
   ============================================================================ */
html[data-cc-theme="ai"] #app :is(
    .cc-sidebar-link.is-active,
    .ca-tab.is-active,
    .ca-choice.is-selected,
    .ca-outcome-button.is-selected,
    .ca-contact-result.is-selected,
    .ca-thread-match.is-selected,
    .wc-tab.is-active,
    .si-tab.is-active,
    .mxf-library-tab.is-active,
    .theme-card.is-selected,
    .choice-button.is-selected,
    .pgr-history-item.is-selected,
    .rc-type-card.is-selected,
    .rc-mode-card.is-selected,
    .rc-period-button.is-selected,
    .rc-history-scope-button.is-selected,
    [role="tab"][aria-selected="true"],
    [data-selected="true"]
) {
    border-color: var(--cc-accent) !important;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--cc-accent) 20%, var(--cc-surface-soft)),
        color-mix(in srgb, var(--cc-accent-2) 16%, var(--cc-surface))
    ) !important;
    box-shadow:
        0 0 0 1px rgba(67, 224, 255, .90),
        inset 0 0 0 1px rgba(214, 250, 255, .32),
        0 0 18px rgba(67, 224, 255, .52),
        0 0 36px rgba(87, 151, 255, .24) !important;
    color: var(--cc-text) !important;
}

html[data-cc-theme="ai"] #app .cc-sidebar-link.is-active::before {
    background: linear-gradient(180deg, var(--cc-accent), var(--cc-accent-2)) !important;
    box-shadow: 0 0 16px rgba(67, 224, 255, .80), 0 0 28px rgba(87, 151, 255, .38) !important;
}


/* ==========================================================================
   Partner Game Plan V2 — evidence assessment, long-text safety, PDF export.
   Scoped to this page only; no shared Activity or Weekly styling is changed.
   ========================================================================== */
#cc-partner-game-plan .pgr-field textarea {
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
#cc-partner-game-plan .pgr-field--next-action textarea {
    min-height: 96px;
}
#cc-partner-game-plan .pgr-intelligence,
#cc-partner-game-plan .pgr-meeting,
#cc-partner-game-plan .pgr-roadmap {
    padding: 16px;
    border: 1px solid rgba(111, 197, 244, .18);
    border-radius: 12px;
    background: rgba(5, 23, 49, .45);
}
#cc-partner-game-plan .pgr-intelligence .pgr-section-head,
#cc-partner-game-plan .pgr-roadmap .pgr-section-head {
    align-items: flex-start;
}
#cc-partner-game-plan .pgr-intelligence-note {
    max-width: 360px;
    margin: 0;
    color: var(--pgr-muted);
}
#cc-partner-game-plan .pgr-intelligence-grid,
#cc-partner-game-plan .pgr-strategy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
#cc-partner-game-plan .pgr-intelligence-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(111, 197, 244, .18);
    border-radius: 10px;
    background: rgba(4, 19, 42, .42);
}
#cc-partner-game-plan .pgr-intelligence-card h4 {
    margin: 3px 0 9px;
    color: var(--pgr-bright);
}
#cc-partner-game-plan .pgr-intelligence-card p,
#cc-partner-game-plan .pgr-assessment-item p,
#cc-partner-game-plan .pgr-priming-copy p,
#cc-partner-game-plan .pgr-roadmap-copy p,
#cc-partner-game-plan .pgr-meeting p,
#cc-partner-game-plan .pgr-outreach-plan p {
    overflow-wrap: anywhere;
}
#cc-partner-game-plan .pgr-intelligence-copy,
#cc-partner-game-plan .pgr-signal-stack,
#cc-partner-game-plan .pgr-fit-detail {
    display: grid;
    gap: 8px;
}
#cc-partner-game-plan .pgr-intelligence-copy p,
#cc-partner-game-plan .pgr-signal-stack p,
#cc-partner-game-plan .pgr-fit-detail p {
    margin: 0;
}
#cc-partner-game-plan .pgr-signal-stack > div {
    padding: 9px 10px;
    border-left: 3px solid rgba(111, 220, 251, .72);
    border-radius: 0 8px 8px 0;
    background: rgba(15, 66, 105, .22);
}
#cc-partner-game-plan .pgr-signal-stack strong,
#cc-partner-game-plan .pgr-fit-detail strong {
    color: #effbff;
}
#cc-partner-game-plan .pgr-evidence-note,
#cc-partner-game-plan .pgr-disc-disclaimer {
    margin: 10px 0 0;
    color: var(--pgr-muted);
}
#cc-partner-game-plan .pgr-disc-disclaimer {
    font-style: italic;
}
#cc-partner-game-plan .pgr-intelligence-card small,
#cc-partner-game-plan .pgr-assessment-item small,
#cc-partner-game-plan .pgr-roadmap-copy small {
    display: block;
    color: var(--pgr-muted);
}
#cc-partner-game-plan .pgr-assessment-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
#cc-partner-game-plan .pgr-assessment-list--muted {
    margin-top: 10px;
}
#cc-partner-game-plan .pgr-assessment-item {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(119, 200, 242, .15);
    border-radius: 8px;
    background: rgba(3, 17, 38, .42);
}
#cc-partner-game-plan .pgr-assessment-item strong {
    color: #e8f8ff;
}
#cc-partner-game-plan .pgr-assessment-item p {
    margin: 4px 0;
}
#cc-partner-game-plan .pgr-fit-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
#cc-partner-game-plan .pgr-fit-head h4 {
    margin-bottom: 0;
}
#cc-partner-game-plan .pgr-fit-head span {
    color: var(--pgr-muted);
}
#cc-partner-game-plan .pgr-priming-list,
#cc-partner-game-plan .pgr-roadmap-list {
    display: grid;
    gap: 10px;
    margin-top: 11px;
}
#cc-partner-game-plan .pgr-priming-item,
#cc-partner-game-plan .pgr-roadmap-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(119, 200, 242, .16);
    border-radius: 9px;
    background: rgba(4, 19, 42, .42);
}
#cc-partner-game-plan .pgr-roadmap-item {
    grid-template-columns: 102px minmax(0, 1fr);
}
#cc-partner-game-plan .pgr-priming-number {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    color: #043149;
    background: var(--pgr-mint);
    font-weight: 900;
}
#cc-partner-game-plan .pgr-priming-copy,
#cc-partner-game-plan .pgr-roadmap-copy {
    min-width: 0;
}
#cc-partner-game-plan .pgr-priming-copy strong,
#cc-partner-game-plan .pgr-roadmap-item > strong {
    color: #effbff;
}
#cc-partner-game-plan .pgr-priming-copy p,
#cc-partner-game-plan .pgr-roadmap-copy p {
    margin: 4px 0;
}
#cc-partner-game-plan .pgr-priming-copy small {
    display: block;
    margin-top: 5px;
    color: var(--pgr-muted);
}
#cc-partner-game-plan .pgr-priming-copy .pgr-priming-guardrail {
    color: #f4cfb3;
}
#cc-partner-game-plan .pgr-outreach-plan {
    display: grid;
    gap: 9px;
    min-width: 0;
}
#cc-partner-game-plan .pgr-outreach-plan p {
    margin: 0;
}
#cc-partner-game-plan .pgr-outreach-plan > small {
    color: #f4cfb3;
}
#cc-partner-game-plan .pgr-meeting {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 16px;
}
#cc-partner-game-plan .pgr-meeting-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
#cc-partner-game-plan .pgr-meeting-columns > div {
    min-width: 0;
    padding: 11px;
    border-radius: 9px;
    background: rgba(4, 19, 42, .42);
}
#cc-partner-game-plan .pgr-meeting-columns ul {
    margin: 8px 0 0;
    padding-left: 19px;
}
#cc-partner-game-plan .pgr-meeting-columns li {
    margin-top: 5px;
    overflow-wrap: anywhere;
}
#cc-partner-game-plan .pgr-meeting-opening,
#cc-partner-game-plan .pgr-meeting-transition {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(15, 66, 105, .22);
}
#cc-partner-game-plan .pgr-meeting-opening p,
#cc-partner-game-plan .pgr-meeting-transition {
    margin-bottom: 0;
}
@media (max-width: 880px) {
    #cc-partner-game-plan .pgr-intelligence-grid,
    #cc-partner-game-plan .pgr-strategy-grid,
    #cc-partner-game-plan .pgr-meeting {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    #cc-partner-game-plan .pgr-meeting-columns {
        grid-template-columns: 1fr;
    }
    #cc-partner-game-plan .pgr-roadmap-item {
        grid-template-columns: 1fr;
    }
}


/* Partner Game Plan disclosures: one explicit selected/open state. */
#cc-partner-game-plan .pgr-report-disclosure {
    overflow: hidden;
    border: 1px solid rgba(111, 197, 244, .22);
    border-radius: 12px;
    background: rgba(5, 23, 49, .45);
    box-shadow: inset 0 0 0 1px transparent;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, outline-color .16s ease;
}
#cc-partner-game-plan .pgr-report-disclosure.is-selected,
#cc-partner-game-plan .pgr-report-disclosure[open] {
    border: 2px solid var(--cc-accent, #43dcff);
    outline: 1px solid var(--cc-accent, #43dcff);
    outline-offset: -3px;
    background: rgba(10, 43, 76, .88);
    box-shadow:
        0 0 0 2px rgba(67, 220, 255, .38),
        0 0 20px rgba(67, 220, 255, .38),
        inset 0 0 24px rgba(67, 220, 255, .12);
}
#cc-partner-game-plan .pgr-report-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #e9f8ff;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
    transition: color .16s ease, background-color .16s ease;
}
#cc-partner-game-plan .pgr-report-disclosure.is-selected > summary,
#cc-partner-game-plan .pgr-report-disclosure[open] > summary {
    color: #ffffff;
    background: rgba(67, 220, 255, .14);
}
#cc-partner-game-plan .pgr-report-disclosure > summary:focus-visible {
    outline: 2px solid var(--cc-accent, #43dcff);
    outline-offset: -2px;
}
#cc-partner-game-plan .pgr-report-disclosure > summary::-webkit-details-marker { display: none; }
#cc-partner-game-plan .pgr-report-disclosure > summary::after {
    content: '+';
    flex: 0 0 auto;
    color: var(--pgr-mint);
    font-size: 1.1rem;
    line-height: 1;
}
#cc-partner-game-plan .pgr-report-disclosure.is-selected > summary::after,
#cc-partner-game-plan .pgr-report-disclosure[open] > summary::after {
    content: '–';
    color: var(--cc-accent, #43dcff);
    text-shadow: 0 0 12px rgba(67, 220, 255, .85);
}
#cc-partner-game-plan .pgr-report-disclosure > summary small {
    margin-left: auto;
    color: var(--pgr-muted);
    font-size: .72rem;
    font-weight: 800;
}
#cc-partner-game-plan .pgr-report-disclosure-body { padding: 0 16px 16px; }
#cc-partner-game-plan .pgr-report-disclosure-body > :first-child { margin-top: 0; }
#cc-partner-game-plan .pgr-report-grid > .pgr-report-disclosure,
#cc-partner-game-plan .pgr-strategy-grid > .pgr-report-disclosure { min-width: 0; }
#cc-partner-game-plan .pgr-report-disclosure .pgr-report-section { border: 0; background: transparent; }
#cc-partner-game-plan .pgr-source-findings-note {
    margin: 0 0 12px;
    color: var(--pgr-muted);
    overflow-wrap: anywhere;
}
#cc-partner-game-plan .pgr-source-findings-cost-total {
    margin: 0 0 12px;
    padding: 8px 11px;
    border: 1px solid rgba(119, 200, 242, .22);
    border-radius: 8px;
    background: rgba(4, 19, 42, .55);
    color: var(--pgr-muted);
    font-size: 12.5px;
}
#cc-partner-game-plan .pgr-source-findings-cost-total strong { color: #cfe9ff; }
#cc-partner-game-plan .pgr-source-finding-cost {
    margin: 0 0 10px;
    padding: 6px 9px;
    border-radius: 7px;
    background: rgba(119, 200, 242, .08);
    color: var(--pgr-muted);
    font-size: 11.5px;
}
#cc-partner-game-plan .pgr-source-findings-list { display: grid; gap: 9px; }
#cc-partner-game-plan .pgr-source-finding {
    overflow: hidden;
    border: 1px solid rgba(119, 200, 242, .16);
    border-radius: 9px;
    background: rgba(4, 19, 42, .42);
}
#cc-partner-game-plan .pgr-source-finding > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    color: #e8f8ff;
    cursor: pointer;
    list-style: none;
}
#cc-partner-game-plan .pgr-source-finding > summary::-webkit-details-marker { display: none; }
#cc-partner-game-plan .pgr-source-finding > summary::after {
    content: '+';
    flex: 0 0 auto;
    color: var(--pgr-mint);
    font-size: 1rem;
}
#cc-partner-game-plan .pgr-source-finding[open] > summary::after { content: '–'; }
#cc-partner-game-plan .pgr-source-finding > summary strong { overflow-wrap: anywhere; }
#cc-partner-game-plan .pgr-source-finding > summary small {
    margin-left: auto;
    color: var(--pgr-muted);
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}
#cc-partner-game-plan .pgr-source-finding-body {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}
#cc-partner-game-plan .pgr-source-finding-group {
    min-width: 0;
    padding: 9px 10px;
    border-left: 3px solid rgba(111, 220, 251, .72);
    border-radius: 0 8px 8px 0;
    background: rgba(15, 66, 105, .22);
}
#cc-partner-game-plan .pgr-source-finding-group strong { color: #effbff; }
#cc-partner-game-plan .pgr-source-finding-group ul { margin: 6px 0 0; padding-left: 18px; }
#cc-partner-game-plan .pgr-source-finding-group li { overflow-wrap: anywhere; }
@media (max-width: 720px) {
    #cc-partner-game-plan .pgr-report-disclosure > summary,
    #cc-partner-game-plan .pgr-source-finding > summary { align-items: flex-start; }
    #cc-partner-game-plan .pgr-report-disclosure > summary small,
    #cc-partner-game-plan .pgr-source-finding > summary small { white-space: normal; }
}
#cc-partner-game-plan details.pgr-report-section.pgr-report-disclosure { padding: 0; }
#cc-partner-game-plan .pgr-report-disclosure-body.pgr-intelligence,
#cc-partner-game-plan .pgr-report-disclosure-body.pgr-angle,
#cc-partner-game-plan .pgr-report-disclosure-body.pgr-next,
#cc-partner-game-plan .pgr-report-disclosure-body.pgr-sequence,
#cc-partner-game-plan .pgr-report-disclosure-body.pgr-meeting,
#cc-partner-game-plan .pgr-report-disclosure-body.pgr-roadmap {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Activity source-link classification is shown only for legacy generic Facebook links. */
#cc-activity .ca-source-link-classify {
  appearance: none;
  border: 0;
  background: transparent;
  color: #71d8ff;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  line-height: 1;
  padding: 0 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cc-activity .ca-source-link-classify:hover,
#cc-activity .ca-source-link-classify:focus-visible {
  color: #b9ecff;
}

/* Activity selected-contact editing: the one editor is a modal so it stays in the current workspace tab. */
#cc-activity .ca-contact-edit-dialog {
    width: min(840px, calc(100vw - 32px));
    max-height: min(860px, calc(100vh - 32px));
    padding: 0;
    color: var(--ca-ink);
    background: var(--ca-panel-deep);
    border: 1px solid var(--ca-line-strong);
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
}
#cc-activity .ca-contact-edit-dialog::backdrop { background: rgba(3, 10, 20, .68); }
#cc-activity .ca-contact-edit-dialog .ca-form {
    max-height: min(860px, calc(100vh - 32px));
    overflow-y: auto;
}
#cc-activity .ca-contact-edit-dialog-head { margin-bottom: 18px; }

/* Crystal Ball version selection lives above the report as two real selectors, not a stacked history list. */
#cc-partner-game-plan .pgr-version-selector {
    display: grid;
    gap: 11px;
    padding: 14px 20px;
    border: 1px solid rgba(119, 203, 246, .22);
    border-radius: 12px;
    background: rgba(5, 23, 49, .46);
}
#cc-partner-game-plan .pgr-version-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
#cc-partner-game-plan .pgr-version-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(122, 211, 255, .26);
    border-radius: 8px;
    color: #dff5ff;
    background: rgba(4, 19, 42, .34);
    cursor: pointer;
    font: 850 .78rem/1 Arial, Helvetica, sans-serif;
    text-align: left;
}
#cc-partner-game-plan .pgr-version-tab:hover:not(:disabled) { border-color: rgba(142, 229, 255, .72); }
/* Crystal Ball version choice must remain visually obvious despite the global button baseline. */
#main-content #cc-partner-game-plan .pgr-version-tab.is-selected {
    border-color: var(--cc-accent) !important;
    color: var(--cc-text) !important;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--cc-accent) 23%, var(--cc-surface-soft)),
        color-mix(in srgb, var(--cc-accent-2) 18%, var(--cc-surface))
    ) !important;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--cc-accent) 72%, transparent),
        inset 0 0 0 1px color-mix(in srgb, var(--cc-accent) 22%, transparent),
        0 0 16px color-mix(in srgb, var(--cc-accent) 42%, transparent) !important;
}
#main-content #cc-partner-game-plan .pgr-version-tab.is-selected .pgr-version-tab-count {
    color: var(--cc-on-accent) !important;
    background: var(--cc-accent) !important;
    box-shadow: 0 0 10px color-mix(in srgb, var(--cc-accent) 48%, transparent) !important;
}
#cc-partner-game-plan .pgr-version-tab:disabled {
    opacity: .48;
    cursor: default;
}
#cc-partner-game-plan .pgr-version-tab-count {
    display: inline-grid;
    min-width: 24px;
    min-height: 24px;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    color: #c8f4ff;
    background: rgba(0, 0, 0, .20);
    font-size: .72rem;
}
#cc-partner-game-plan .pgr-version-group { min-width: 0; }
#cc-partner-game-plan .pgr-version-list { display: flex; flex-wrap: wrap; gap: 8px; }
#cc-partner-game-plan .pgr-version-empty { margin: 0; color: var(--pgr-muted); }
#cc-partner-game-plan .pgr-version-option {
    border: 1px solid rgba(122, 211, 255, .30);
    border-radius: 8px;
    padding: 8px 10px;
    color: #e6f7ff;
    background: rgba(4, 19, 42, .46);
    cursor: pointer;
    font: 800 .76rem/1 Arial, Helvetica, sans-serif;
}
#cc-partner-game-plan .pgr-version-option:hover { border-color: rgba(142, 229, 255, .72); }
#main-content #cc-partner-game-plan .pgr-version-option.is-selected {
    border-color: var(--cc-accent) !important;
    color: var(--cc-text) !important;
    background: color-mix(in srgb, var(--cc-accent) 20%, var(--cc-surface-soft)) !important;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--cc-accent) 62%, transparent),
        0 0 13px color-mix(in srgb, var(--cc-accent) 30%, transparent) !important;
}
#cc-partner-game-plan .pgr-version-option.is-current { color: #c9ffe4; border-color: rgba(123, 228, 173, .56); }
@media (max-width: 640px) {
    #cc-activity .ca-contact-edit-dialog { width: min(100vw - 20px, 840px); max-height: calc(100vh - 20px); }
    #cc-activity .ca-contact-edit-dialog .ca-form { max-height: calc(100vh - 20px); }
}

/* ==========================================================================
   Weekly Generator - quality scores, Needs Review, activity chips, run report
   (added in the v13 rebuild)
   ========================================================================== */

.wc-needs-review-badge {
    background: rgba(255, 176, 32, 0.16);
    border: 1px solid rgba(255, 176, 32, 0.55);
    color: #ffcf7d;
    margin-left: 8px;
}

.wc-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.wc-score-pill {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
}

.wc-score-pill > span {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}

.wc-score-pill > strong {
    display: block;
    font-size: 1.15rem;
    margin-top: 2px;
}

.wc-score-pill.is-pass {
    border-color: rgba(84, 214, 152, 0.5);
}

.wc-score-pill.is-pass > strong {
    color: #7ee2ae;
}

.wc-score-pill.is-fail {
    border-color: rgba(255, 118, 118, 0.5);
}

.wc-score-pill.is-fail > strong {
    color: #ff9d9d;
}

.wc-score-pill.is-na {
    opacity: 0.6;
}

.wc-score-points {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.74rem;
    line-height: 1.5;
}

.wc-score-points li.is-earned {
    opacity: 0.65;
}

.wc-score-points li.is-missed {
    color: #ffb9b9;
}

.wc-score-note {
    margin: 8px 0 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

.wc-score-issues-panel {
    border-left: 3px solid rgba(255, 176, 32, 0.6);
}

.wc-score-issues {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 0.86rem;
    line-height: 1.6;
}

.wc-day-chips {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
}

.wc-day-chip {
    font-style: normal;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    border-radius: 6px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    opacity: 0.85;
}

.wc-day-chip.is-done {
    border-color: rgba(84, 214, 152, 0.55);
    color: #7ee2ae;
}

.wc-day-chip.is-repairing {
    border-color: rgba(120, 170, 255, 0.55);
    color: #a9c8ff;
}

.wc-day-chip.is-review {
    border-color: rgba(255, 176, 32, 0.6);
    color: #ffcf7d;
}

.wc-day-chip.is-pending {
    opacity: 0.45;
}

.wc-activity-report {
    margin-top: 12px;
}

.wc-activity-report-toggle {
    font-size: 0.78rem;
}

.wc-run-report {
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.25);
}

.wc-run-report-note {
    margin: 0 0 8px;
    font-size: 0.78rem;
    opacity: 0.75;
}

.wc-run-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.wc-run-report-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.wc-run-report-row.is-failed .wc-run-report-body {
    color: #ff9d9d;
}

.wc-run-report-time {
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.wc-run-report-body em {
    opacity: 0.75;
}

/* ==========================================================================
   Weekly Generator v14 - one-column expanded cards, combined score boxes,
   word-for-word issue evidence
   ========================================================================== */

.wc-command-center .wc-card-detail {
    grid-template-columns: 1fr;
    gap: 12px;
}

.wc-command-center .wc-detail-item strong {
    font-size: 12px;
    line-height: 1.55;
}

.wc-score-boxes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.wc-score-box {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
}

.wc-score-box.is-pass {
    border-color: rgba(84, 214, 152, 0.45);
}

.wc-score-box.is-fail {
    border-color: rgba(255, 118, 118, 0.55);
}

.wc-score-box.is-na {
    opacity: 0.65;
}

.wc-score-box-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.wc-score-box-head span {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.wc-score-box-head strong {
    font-size: 1.1rem;
    margin: 0;
}

.wc-score-box.is-pass .wc-score-box-head strong {
    color: #7ee2ae;
}

.wc-score-box.is-fail .wc-score-box-head strong {
    color: #ff9d9d;
}

.wc-score-phrases {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wc-score-phrases-title {
    flex-basis: 100%;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.65;
}

.wc-phrase {
    font-size: 0.76rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.2);
}

.wc-score-tests {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.wc-score-tests li {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: start;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.wc-score-tests li i {
    font-style: normal;
    font-weight: 700;
}

.wc-score-tests li.is-earned i {
    color: #7ee2ae;
}

.wc-score-tests li.is-earned span {
    opacity: 0.75;
}

.wc-score-tests li.is-missed i,
.wc-score-tests li.is-missed span {
    color: #ffb9b9;
}

.wc-score-tests li em {
    font-style: normal;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.wc-issue-message {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #ffd9a8;
}

.wc-issue-evidence {
    margin: 4px 0 0;
    font-size: 0.82rem;
}

.wc-issue-evidence mark {
    background: rgba(255, 118, 118, 0.25);
    color: #ffd2d2;
    padding: 1px 6px;
    border-radius: 5px;
}

.wc-issue-context {
    margin: 6px 0 0;
    padding: 6px 10px;
    border-left: 3px solid rgba(255, 176, 32, 0.55);
    font-size: 0.8rem;
    line-height: 1.55;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 8px 8px 0;
}

.wc-issue-fix {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #9fd8ff;
}

.wc-score-issues > li + li {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wc-score-issues {
    list-style: none;
    padding-left: 0;
}

/* ==========================================================================
   Weekly Generator v15 - collapsible day sections, EO Engagement headline
   ========================================================================== */

.wc-command-center .wc-card-grid[data-weekly-day-head] {
    cursor: pointer;
}

.wc-command-center .wc-card-grid[data-weekly-day-head]:hover .wc-day-index {
    color: #9fd8ff;
}

.wc-collapsible {
    padding: 0;
    overflow: hidden;
}

.wc-section-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.wc-section-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wc-section-toggle .wc-card-label {
    flex: 1;
}

.wc-section-meta {
    font-size: 0.72rem;
    opacity: 0.65;
    white-space: nowrap;
}

.wc-caret {
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.55);
    border-bottom: 2px solid rgba(255, 255, 255, 0.55);
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
    flex: none;
}

.wc-collapsible.is-open > .wc-section-toggle .wc-caret {
    transform: rotate(45deg);
}

.wc-section-body {
    padding: 0 12px 12px;
}

.wc-score-issues-panel .wc-section-meta {
    color: #ffcf7d;
    opacity: 1;
}

.wc-score-box.is-headline {
    border-width: 2px;
    background: rgba(159, 216, 255, 0.05);
}

/* ==========================================================================
   v16 - sidebar version line + draggable resize
   ========================================================================== */

.cc-sidebar-logo-copy {
    position: relative;
}

/* Several rules earlier in this file truncate the sidebar brand text and
   nav labels with ellipsis, and one of them (.cc-sidebar-logo-copy strong)
   pins an absolute 126px max-width that has nothing to do with the
   sidebar's actual width - that is why "Chady Coach" cut off even when
   there was visibly more room. Rather than chase every place a width
   number could be hiding in a file this size again, text wraps instead
   of truncating: wrapping cannot be "too narrow" the way a fixed pixel
   width can, so no label can ever be cut off again regardless of the
   sidebar's width, the font-size setting, or any rule still undiscovered
   elsewhere in this stylesheet. Matching !important weight, last in the
   file, wins over everything earlier.  */
.cc-sidebar-logo-copy strong,
.cc-sidebar-logo-copy small {
    max-width: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.cc-sidebar-link-label {
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.25 !important;
}

/* Several older rules elsewhere in this file give .cc-sidebar-version a
   pill shape (border, background, padding, border-radius), and one of
   them carries !important. Every box property is explicitly zeroed out
   with !important here so none of them can quietly bring the oval back -
   the same disease as the sidebar-width bug, same cure. */
.cc-sidebar-version {
    display: block !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #6f8caa !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-align: left !important;
}

.cc-sidebar-resize-handle {
    /* Kept fully INSIDE the sidebar's own box on purpose: .cc-sidebar has
       overflow-x: hidden (needed to clip its decorative background glow),
       so anything positioned outside that box - even by a few pixels -
       is silently clipped and cannot receive clicks. This is the exact
       bug that made the first version of this handle unclickable. */
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 100%;
    background: transparent;
    cursor: col-resize;
    z-index: 20;
    touch-action: none;
    -webkit-user-drag: none;
    user-select: none;
    outline: none;
}

.cc-sidebar-resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 6px;
    width: 2px;
    height: 100%;
    background: rgba(108, 211, 255, .22);
    transition: background .15s ease, width .15s ease, left .15s ease;
}

.cc-sidebar-resize-handle:hover::after,
.cc-sidebar-resize-handle:active::after,
.cc-sidebar-resize-handle:focus-visible::after,
body.is-resizing-sidebar .cc-sidebar-resize-handle::after {
    left: 5px;
    width: 6px;
    background: rgba(108, 211, 255, .7);
}

body.is-resizing-sidebar {
    cursor: col-resize !important;
    user-select: none !important;
}

body.is-resizing-sidebar .cc-sidebar {
    box-shadow: 18px 0 46px rgba(9, 31, 56, .12), 0 0 0 1px rgba(108, 211, 255, .18);
}

@media (min-width: 901px) {
    html[data-cc-sidebar="compact"] .cc-sidebar-resize-handle {
        display: none;
    }
}

@media (max-width: 900px) {
    .cc-sidebar-resize-handle {
        display: none;
    }
}

/* ==========================================================================
   v16 - Activity Hub: color the due list the same way the contact badge is
   colored, and support showing upcoming items (not just overdue/today)
   ========================================================================== */

#cc-activity .ca-due-card {
    border-left: 3px solid transparent;
}

#cc-activity .ca-due-card.is-overdue {
    border-left-color: rgba(255, 120, 149, .68);
}

#cc-activity .ca-due-card.is-today {
    border-left-color: rgba(255, 214, 92, .68);
}

#cc-activity .ca-due-card.is-upcoming {
    border-left-color: rgba(109, 225, 169, .60);
}

#cc-activity .ca-due-date {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900 !important;
    white-space: nowrap;
}

#cc-activity .ca-due-date.is-upcoming {
    border-color: rgba(109, 225, 169, .60);
    background: rgba(20, 100, 67, .28);
    color: #b8ffe1;
}

#cc-activity .ca-due-date.is-today {
    border-color: rgba(255, 214, 92, .68);
    background: rgba(128, 92, 10, .30);
    color: #fff0a8;
}

#cc-activity .ca-due-date.is-overdue {
    border-color: rgba(255, 120, 149, .68);
    background: rgba(143, 38, 69, .30);
    color: #ffd0dc;
}

#cc-activity .ca-due-date.is-decision {
    border-color: rgba(159, 216, 255, .5);
    background: rgba(20, 60, 100, .3);
    color: #cbeaff;
}

#cc-activity .ca-due-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 2px 0 12px;
}

#cc-activity .ca-due-filter-chip {
    padding: 5px 12px;
    border: 1px solid rgba(132, 188, 234, .28);
    border-radius: 999px;
    background: rgba(5, 20, 40, .4);
    color: #b3cae3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
}

#cc-activity .ca-due-filter-chip:hover {
    border-color: rgba(108, 211, 255, .5);
    color: #e8fbff;
}

#cc-activity .ca-due-filter-chip.is-active {
    border-color: rgba(108, 211, 255, .7);
    background: rgba(20, 70, 110, .45);
    color: #e8fbff;
}

/* ==========================================================================
   v20 - Edit Caption panel (caption body + CTA as one editable block,
   Check & Save with zero AI calls, optional one-call script/story sync)
   ========================================================================== */

.wc-caption-edit-panel .wc-edit-hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #9fb8d4;
}

.wc-caption-edit-panel .wc-edit-hint-quiet {
    margin: 10px 0 0;
    opacity: .75;
}

.wc-command-center .wc-caption-edit-input {
    display: block;
    width: 100%;
    min-height: 160px;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid rgba(139, 193, 244, .27);
    border-radius: 10px;
    outline: none;
    background: rgba(4, 17, 36, .80);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    color: #e4f2ff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    resize: vertical;
}

.wc-command-center .wc-caption-edit-input:focus {
    border-color: rgba(108, 211, 255, .6);
}

.wc-caption-edit-actions {
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Portal reports list (Contacts tab, selected contact panel)
   ========================================================================== */

.ca-portal-report-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(140, 190, 235, .1);
}

.ca-portal-report-row:last-child {
    border-bottom: none;
}

.ca-portal-report-label {
    font-weight: 700;
    min-width: 120px;
}

.ca-portal-report-meta {
    flex: 1;
    opacity: .7;
}
