/* ============================================================================
 * BigBreakingWire Prime — Premium: Company Profile
 * ----------------------------------------------------------------------------
 * Scoped override layer for /prime/company/{SYMBOL}/ (#cpContent root +
 * .cp-header). Section routing, deal feeds, pagination dispatch and the
 * canonical-URL contract are untouched (PHP/JS unmodified).
 *
 * SAFETY CONTRACT: cosmetic only. #cpPriceRow display is JS-owned (never
 * touched); .cp-change.pos/.neg already encode direction (hues kept);
 * loading/error/empty states keep their behavior. No !important, z-index,
 * position, canvas/SVG rules, or display/overflow/height/width on
 * functional containers (sticky-thead exception documented).
 * ========================================================================== */

.cp-header { margin-bottom: 14px; }
.cp-header-inner { gap: 10px; }
.cp-back {
    font-family: inherit; font-size: 12.5px; font-weight: 700;
    color: var(--bbw-ink-2, #46556c);
    background: var(--bbw-surface, #ffffff);
    border: 1px solid var(--bbw-border, #e2e7ee);
    border-radius: 9px; padding: 7px 13px; cursor: pointer;
}
.cp-back:hover { border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); }
.cp-symbol { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.cp-name { font-size: 13.5px; font-weight: 600; }
.cp-price { font-size: 23px; font-weight: 800; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
.cp-change { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cp-meta { font-size: 12px; gap: 10px; font-variant-numeric: tabular-nums; }
#cpSectionNav { gap: 6px; margin: 12px 0 14px; }
#cpSectionNav .cp-section-tab {
    font-family: inherit; font-size: 12.5px; font-weight: 700;
    color: var(--bbw-ink-2, #46556c);
    background: var(--bbw-surface, #ffffff);
    border: 1px solid var(--bbw-border, #e2e7ee);
    border-radius: 9px; padding: 8px 15px; cursor: pointer;
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}
#cpSectionNav .cp-section-tab:hover { border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); }
#cpSectionNav .cp-section-tab.active {
    border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); background: var(--bbw-blue-soft, #eef3ff);
}
#cpContent .cp-section {
    background: var(--bbw-surface, #ffffff);
    border: 1px solid var(--bbw-border, #e2e7ee);
    border-radius: 12px; padding: 16px 18px; margin-bottom: 14px;
    box-shadow: var(--bbw-shadow-sm, 0 1px 2px rgba(11, 21, 38, .05));
}
#cpContent .cp-section-head { margin-bottom: 10px; }
/* STEP 6/Phase 7: deal tables (~700px, 6 cols) overflow narrow viewports and
   the base .cp-section-body has no scroll containment. A touch-friendly
   in-card scroll region keeps every column reachable without page overflow. */
#cpContent .cp-section-body { overflow-x: auto; }
#cpContent .cp-section-title { font-size: 15px; font-weight: 800; letter-spacing: -.1px; color: var(--bbw-ink, #0b1526); }
#cpContent .cp-badge {
    font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
    color: var(--bbw-blue, #1e56e0); background: var(--bbw-blue-soft, #eef3ff);
    border: 1px solid rgba(30, 86, 224, .25); padding: 3px 10px; border-radius: 999px;
}
#cpContent .cp-grid { gap: 10px; }
#cpContent .cp-grid .stat {
    background: var(--bbw-surface-2, #f7f9fb);
    border: 1px solid var(--bbw-border, #e2e7ee);
    border-radius: 10px; padding: 11px 14px; min-width: 0;
}
#cpContent .cp-grid .label {
    font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
    color: var(--bbw-ink-3-text, #5c6b80); margin-bottom: 3px;
}
#cpContent .cp-grid .value { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
#cpContent .cp-grid .value.pos { color: var(--bbw-up, #0e9f6e); }
#cpContent .cp-grid .value.neg { color: var(--bbw-down, #d90429); }
#cpContent .cp-grid .sub { font-size: 11.5px; color: var(--bbw-ink-2, #46556c); }
#cpContent .cp-table thead th {
    position: sticky; top: 0;
    font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
    color: var(--bbw-ink-3-text, #5c6b80); background: var(--bbw-surface-2, #f7f9fb);
    padding: 10px 14px; white-space: nowrap;
}
#cpContent .cp-table tbody td { padding: 10px 14px; font-variant-numeric: tabular-nums; }
#cpContent .cp-table tbody tr:hover td { background: var(--bbw-surface-2, #f7f9fb); }
#cpContent .cp-pagination { gap: 8px; padding-top: 10px; }
#cpContent .cp-pagination .pg-btn {
    font-family: inherit; font-size: 12.5px; font-weight: 700;
    border: 1px solid var(--bbw-border, #e2e7ee); border-radius: 8px;
    background: var(--bbw-surface, #ffffff); color: var(--bbw-ink-2, #46556c);
    padding: 6px 13px; cursor: pointer; font-variant-numeric: tabular-nums;
}
#cpContent .cp-pagination .pg-btn:hover:not([disabled]) { border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); }
#cpContent .cp-pagination .pg-btn.active {
    border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); background: var(--bbw-blue-soft, #eef3ff);
}
#cpContent .cp-pagination .pg-btn[disabled] { opacity: .45; cursor: default; }
#cpContent .pg-info { font-size: 12px; color: var(--bbw-ink-2, #46556c); font-variant-numeric: tabular-nums; }
#cpContent .cp-deal-tools { gap: 8px; margin-bottom: 10px; }
#cpContent .cp-deal-tools input, #cpContent .cp-deal-tools select {
    font-family: inherit; font-size: 12.5px;
    border: 1px solid var(--bbw-border-strong, #cfd8e3); border-radius: 9px;
    padding: 8px 12px; background: var(--bbw-surface, #ffffff); color: var(--bbw-ink, #0b1526);
}
#cpContent .cp-deal-tools input:focus, #cpContent .cp-deal-tools select:focus {
    border-color: var(--bbw-blue, #1e56e0); box-shadow: 0 0 0 3px rgba(30, 86, 224, .12); outline: none;
}
#cpContent .btn.primary {
    font-family: inherit; font-size: 12.5px; font-weight: 800;
    border-radius: 9px; padding: 8px 16px; cursor: pointer;
    background: var(--bbw-blue, #1e56e0); border: 1px solid var(--bbw-blue, #1e56e0); color: #fff;
}
#cpContent .btn.primary:hover { background: var(--bbw-blue-strong, #1745b5); border-color: var(--bbw-blue-strong, #1745b5); }
#cpContent .cp-note { font-size: 11.5px; color: var(--bbw-ink-3-text, #5c6b80); }
#cpContent .cp-links { gap: 10px; }
#cpContent .cp-link {
    border: 1px solid var(--bbw-border, #e2e7ee); border-radius: 10px;
    padding: 11px 14px; gap: 10px; text-decoration: none;
    transition: border-color .12s ease, background .12s ease;
}
#cpContent .cp-link:hover { border-color: var(--bbw-blue, #1e56e0); background: var(--bbw-blue-soft, #eef3ff); }
#cpContent .cp-link .title { font-size: 13.5px; font-weight: 800; color: var(--bbw-ink, #0b1526); }
#cpContent .cp-link .desc { font-size: 12px; color: var(--bbw-ink-2, #46556c); }
#cpContent .cp-loading { padding: 28px 20px; text-align: center; }
#cpContent .cp-loading .spinner {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--bbw-border-strong, #cfd8e3);
    border-top-color: var(--bbw-blue, #1e56e0);
    animation: bbw-prem-cp-spin .8s linear infinite;
    display: inline-block;
}
@keyframes bbw-prem-cp-spin { to { transform: rotate(360deg); } }
#cpContent .cp-error {
    border-left: 3px solid var(--bbw-down, #d90429);
    background: var(--bbw-down-soft, #fdeef1);
    border-radius: 0 10px 10px 0; padding: 12px 16px;
    font-size: 13px; font-weight: 600;
}
#cpContent .cp-section-empty { font-size: 13px; color: var(--bbw-ink-2, #46556c); padding: 16px; text-align: center; }

@media (max-width: 700px) {
    .cp-symbol { font-size: 21px; }
    .cp-price { font-size: 20px; }
    #cpContent .cp-section { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    #cpContent .cp-loading .spinner { animation: none; border-top-color: var(--bbw-border-strong, #cfd8e3); }
    #cpSectionNav .cp-section-tab, #cpContent .cp-link, #cpContent .cp-pagination .pg-btn { transition: none; }
}
.cp-header button:focus-visible, #cpSectionNav button:focus-visible,
#cpContent button:focus-visible, #cpContent a:focus-visible,
#cpContent input:focus-visible, #cpContent select:focus-visible {
    outline: 2px solid var(--bbw-blue, #1e56e0); outline-offset: 2px;
}
