:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #e8edf5;
    --text: #0f172a;
    --muted: #64748b;
    --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    --radius: 18px;
    --primary: #2563eb;
    --primary-2: #7c3aed;
    --kpi-bg: #0f2747;
    --kpi-text: #ffffff;
    --panel-grad-start: rgba(255, 255, 255, 0.98);
    --panel-grad-end: rgba(248, 250, 252, 0.96);
    --panel-elevated-start: rgba(255, 255, 255, 0.99);
    --panel-elevated-end: rgba(241, 245, 249, 0.96);
    --topic-card-start: rgba(255, 255, 255, 0.98);
    --topic-card-end: rgba(241, 245, 249, 0.96);
    --topic-card-hover-start: rgba(255, 255, 255, 1);
    --topic-card-hover-end: rgba(239, 246, 255, 0.84);
    --topic-track: rgba(15, 23, 42, 0.025);
    --topic-badge-bg: rgba(15, 23, 42, 0.04);
    --topic-badge-border: rgba(148, 163, 184, 0.18);
    --soft-chip-bg: rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] {
    --bg: #09111f;
    --surface: #0f172a;
    --surface-soft: #131e33;
    --line: rgba(255, 255, 255, 0.08);
    --text: #e5edf7;
    --muted: #93a4bc;
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    --primary: #38bdf8;
    --primary-2: #8b5cf6;
    --kpi-bg: #13294b;
    --kpi-text: #ffffff;
    --panel-grad-start: rgba(15, 23, 42, 0.98);
    --panel-grad-end: rgba(19, 30, 51, 0.98);
    --panel-elevated-start: rgba(17, 27, 47, 0.98);
    --panel-elevated-end: rgba(10, 19, 35, 0.98);
    --topic-card-start: rgba(20, 32, 57, 0.98);
    --topic-card-end: rgba(11, 21, 39, 0.98);
    --topic-card-hover-start: rgba(24, 38, 67, 0.99);
    --topic-card-hover-end: rgba(10, 29, 57, 0.99);
    --topic-track: rgba(255, 255, 255, 0.025);
    --topic-badge-bg: rgba(148, 163, 184, 0.12);
    --topic-badge-border: rgba(148, 163, 184, 0.24);
    --soft-chip-bg: rgba(148, 163, 184, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 24%),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.05), transparent 20%),
        var(--bg);
    color: var(--text);
}

.page-shell {
    width: 100%;
    margin: 0;
    padding: 10px 12px 16px;
    display: grid;
    gap: 12px;
}

.topbar,
.filters-header,
.table-header,
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.subtitle,
.panel-subtitle,
.card-head span,
.table-header p,
.table-note {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card {
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filters-panel,
.chart-card,
.table-panel {
    padding: 16px;
}

.topbar-actions,
.theme-switcher,
.filters-right,
.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switcher {
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.theme-btn,
.ghost-button,
.primary-button,
.modal-close {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.theme-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.primary-button {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.status-pill {
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill.loading {
    color: var(--primary);
}

.search-box {
    position: relative;
    width: min(420px, 100%);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-box input {
    padding-left: 40px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

select,
input {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    outline: none;
}

select:focus,
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.kpi-card {
    background: linear-gradient(180deg, var(--kpi-bg), #16345d);
    color: var(--kpi-text);
    border-radius: 18px;
    padding: 16px 14px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.kpi-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kpi-card span {
    font-size: 13px;
    opacity: 0.9;
}

.kpi-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 13px;
}

.kpi-card h2 {
    margin: 8px 0 0;
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1;
    letter-spacing: -0.03em;
}

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

.chart-card-sm {
    grid-column: span 4;
}

.chart-card-lg {
    grid-column: span 12;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.card-head h3,
.filters-header h3,
.table-header h3 {
    margin: 0;
    font-size: 18px;
}

.chart-body {
    position: relative;
    height: 280px;
}

.chart-body-lg {
    height: 340px;
}

.table-wrap {
    margin-top: 12px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}

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

thead {
    background: rgba(148, 163, 184, 0.08);
}

th,
td {
    padding: 10px 8px;
    text-align: left;
    font-size: 12px;
    border-bottom: 1px solid var(--line);
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-weight: 700;
}

.table-head-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-head-label i {
    color: var(--primary);
}

tbody tr:hover {
    background: rgba(148, 163, 184, 0.05);
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.empty-row,
.chart-empty {
    text-align: center;
    color: var(--muted);
    padding: 22px 16px;
}

body.modal-open {
    overflow: hidden;
}

.intelligence-modal {
    background: linear-gradient(180deg, #071a33 0%, #0b2241 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    color: #f4f7fb;
    border-radius: 24px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #d9e7f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.modal-close:hover {
    background: rgba(255,255,255,0.08);
}
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(10px);
    z-index: 999999;
}

.modal-overlay.is-open {
    display: flex;
}

.contact-modal.enterprise-modal {
    width: min(1440px, 98vw);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    padding: 0;
    border-radius: 28px;
    background: linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end));
    border: 1px solid var(--line);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
    color: var(--text);
}

.enterprise-modal-shell {
    padding: 28px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.modal-close:hover {
    background: var(--surface);
    color: var(--text);
    transform: translateY(-1px);
}

.enterprise-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-right: 56px;
    margin-bottom: 24px;
}

.enterprise-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
}

.enterprise-modal-header h3 {
    margin: 0;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
}

.enterprise-subtitle {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
    max-width: 680px;
}

.enterprise-helper {
    min-width: 240px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr 1.15fr 0.85fr;
    gap: 16px;
    margin-bottom: 22px;
}

.summary-card {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, var(--panel-elevated-start), var(--panel-elevated-end));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.summary-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.summary-card-name strong {
    font-size: 30px;
    letter-spacing: -0.03em;
}

.enterprise-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}
.enterprise-main,
.enterprise-rail {
    display: grid;
    gap: 18px;
    align-self: start;
    align-content: start;
}

.enterprise-main,
.enterprise-rail,
.content-panel,
.content-card-grid,
.content-card,
.content-topic-list,
.content-topic-card {
    min-width: 0;
}

.enterprise-main {
    overflow: hidden;
}

.content-topic-list {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.enterprise-rail {
    position: sticky;
    top: 22px;
    max-height: calc(92vh - 96px);
    overflow-y: auto;
    padding-right: 6px;
}

.enterprise-rail::-webkit-scrollbar {
    width: 8px;
}

.enterprise-rail::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.24);
    border-radius: 999px;
}

.content-panel,
.interest-panel,
.rail-panel {
    height: auto;
}

.content-panel,
.interest-panel,
.rail-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--panel-grad-start), var(--panel-grad-end));
    padding: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading.compact {
    margin-bottom: 16px;
}

.section-kicker {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.section-heading h4 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    color: var(--text);
}

.section-note {
    margin: 8px 0 0;
    max-width: 820px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.content-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.content-card {
    min-height: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--panel-elevated-start), var(--panel-elevated-end));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.content-card,
.content-card-wide,
.content-card-full {
    grid-column: 1 / -1;
}

.content-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.content-card-head span {
    display: inline-block;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.content-card[data-topic-count] .content-card-head::after {
    content: attr(data-topic-count) " topics";
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    background: var(--topic-badge-bg);
    border: 1px solid var(--topic-badge-border);
}

.intel-chip-wrap,
.interest-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.content-topic-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 290px);
    gap: 14px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 10px 0;
    scroll-snap-type: x proximity;
    background: var(--topic-track);
    border-radius: 18px;
}

.content-topic-list::-webkit-scrollbar {
    height: 8px;
}

.content-topic-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
}

.intel-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.08);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.intel-hover-chip {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.intel-hover-chip:hover,
.intel-hover-chip:focus {
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.11);
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10);
    outline: none;
}

.intel-empty {
    display: inline-block;
    padding: 10px 0;
    color: var(--muted);
    font-size: 13px;
}

.content-topic-card {
    width: 100%;
    min-height: 190px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    align-content: space-between;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, var(--topic-card-start), var(--topic-card-end));
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    cursor: pointer;
    scroll-snap-align: start;
}

.content-topic-card:hover,
.content-topic-card:focus {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.14);
    background: linear-gradient(180deg, var(--topic-card-hover-start), var(--topic-card-hover-end));
    outline: none;
}

.content-topic-main {
    min-width: 0;
}

.content-topic-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.content-topic-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
}

.content-topic-side {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.content-topic-source,
.content-topic-link,
.content-topic-hover-note {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.content-topic-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.content-topic-source {
    color: var(--muted);
    background: var(--soft-chip-bg);
    border: 1px solid var(--line);
}

.content-topic-hover-note {
    color: var(--muted);
    background: var(--soft-chip-bg);
    border: 1px dashed rgba(148, 163, 184, 0.24);
    gap: 6px;
}

.content-topic-link {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.16);
    text-decoration: none;
    white-space: nowrap;
}

.content-topic-link:hover {
    background: rgba(37, 99, 235, 0.12);
}

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

.metric-card {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--panel-elevated-start), var(--panel-elevated-end));
    border: 1px solid var(--line);
}

.metric-card span {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.metric-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    color: var(--text);
}

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

.role-card {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--panel-elevated-start), var(--panel-elevated-end));
    border: 1px solid var(--line);
}

.role-card-full {
    grid-column: 1 / -1;
}

.role-card span {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.role-card strong {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--muted);
}

.role-card strong.is-yes {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.22);
}

.role-card strong.is-no {
    color: var(--muted);
    background: var(--surface-soft);
    border-color: var(--line);
}

.chip-tooltip {
    position: fixed;
    z-index: 1000000;
    min-width: 250px;
    max-width: 320px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.chip-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chip-tooltip-title {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
}

.chip-tooltip-name {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}


.chip-tooltip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.chip-tooltip-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chip-tooltip-pill.is-engaged {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.16);
}

.chip-tooltip-pill.is-idle {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.16);
}

.chip-tooltip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.chip-tooltip-grid div {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.chip-tooltip-grid span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.68);
}

.chip-tooltip-grid strong {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

@media (max-width: 1200px) {
    .profile-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .enterprise-body-grid {
        grid-template-columns: 1fr;
    }

    .enterprise-rail {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .content-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .enterprise-modal-header {
        display: block;
        padding-right: 52px;
    }

    .enterprise-helper {
        margin-top: 14px;
        min-width: 0;
    }

    .content-card-grid {
        grid-template-columns: 1fr;
    }

    .content-topic-list {
        grid-auto-columns: minmax(220px, 260px);
    }

    .content-topic-card {
        min-height: 176px;
    }
}

@media (max-width: 700px) {
    .modal-overlay {
        padding: 12px;
    }

    .contact-modal.enterprise-modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 22px;
    }

    .enterprise-modal-shell {
        padding: 18px;
    }

    .profile-summary-grid,
    .metric-grid,
    .role-grid {
        grid-template-columns: 1fr;
    }

    .content-card-grid {
        grid-template-columns: 1fr;
    }

    .content-topic-list {
        grid-auto-flow: row;
        grid-auto-columns: unset;
        overflow: visible;
        padding-right: 0;
        background: transparent;
    }

    .content-topic-card {
        min-height: auto;
    }

    .summary-card-name strong {
        font-size: 24px;
    }
}


.brand-block {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo-image {
    background: white;
    box-shadow: none;
    padding: 0;
}

.brand-logo-image img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}
.brand-copy {
    min-width: 0;
}

.brand-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.brand-d {
    color: #38bdf8;
}

.brand-g {
    color: #8b5cf6;
}



.kpi-card-direct {
    background: linear-gradient(180deg, #0f3a2f, #14532d);
    border: 1px solid rgba(134, 239, 172, 0.18);
}

.kpi-card-linkedin {
    background: linear-gradient(180deg, #0a3a66, #0a66c2);
    border: 1px solid rgba(125, 211, 252, 0.2);
}

.kpi-card-direct .kpi-icon,
.kpi-card-linkedin .kpi-icon {
    background: rgba(255, 255, 255, 0.14);  
}

html[data-theme="dark"] .modal-close {
    background: rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] .content-topic-link {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.20);
}

html[data-theme="dark"] .content-topic-link:hover {
    background: rgba(56, 189, 248, 0.18);
}
.content-topic-label {
    display: none !important;
}


.content-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.content-card-head > span:first-child {
    flex: 1;
    min-width: 0;
}

.content-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #dbeafe;
    flex-shrink: 0;
}

.content-card-icon i {
    font-size: 22px;
    line-height: 1;
}

.content-card[data-topic-count] .content-card-head::after,
.content-card[data-topic-icon] .content-card-head::after {
    display: none !important;
    content: none !important;
}


/* ===== Premium popup colors ===== */

.modal-overlay {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 24%),
        rgba(2, 8, 23, 0.76);
    backdrop-filter: blur(18px);
}

.contact-modal.enterprise-modal {
    background:
        linear-gradient(135deg, #081427 0%, #0b1b34 38%, #13284a 100%);
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow:
        0 32px 90px rgba(2, 8, 23, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    color: #eef6ff;
}

.enterprise-eyebrow,
.section-kicker {
    color: #67e8f9;
}

.enterprise-modal-header h3,
.section-heading h4,
.summary-card strong,
.metric-card strong,
.role-card strong,
.content-card-head span,
.content-topic-title {
    color: #f8fbff;
}

.enterprise-subtitle,
.section-note,
.summary-label,
.metric-card span,
.role-card span {
    color: #a9bdd7;
}

.summary-card,
.content-panel,
.interest-panel,
.rail-panel,
.content-card,
.metric-card,
.role-card {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(17, 24, 39, 0.96) 100%);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow:
        0 12px 28px rgba(2, 8, 23, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.summary-card {
    background:
        linear-gradient(135deg, rgba(14, 37, 68, 0.96), rgba(17, 24, 39, 0.96));
}

.content-card {
    background:
        linear-gradient(180deg, rgba(15, 28, 52, 0.96), rgba(11, 22, 40, 0.98));
}

.content-topic-list {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
}

.content-topic-card {
    background:
        linear-gradient(180deg, rgba(18, 32, 58, 0.96), rgba(10, 22, 42, 0.98));
    border: 1px solid rgba(125, 211, 252, 0.10);
    box-shadow: 0 14px 28px rgba(2, 8, 23, 0.26);
}

.content-topic-card:hover {
    border-color: rgba(56, 189, 248, 0.32);
    box-shadow:
        0 18px 34px rgba(2, 8, 23, 0.34),
        0 0 0 1px rgba(56, 189, 248, 0.06);
    background:
        linear-gradient(180deg, rgba(20, 38, 68, 0.98), rgba(11, 26, 50, 0.98));
}

.metric-card {
    background:
        linear-gradient(135deg, rgba(10, 56, 86, 0.70), rgba(15, 23, 42, 0.96));
    border-color: rgba(56, 189, 248, 0.18);
}

.role-card {
    background:
        linear-gradient(135deg, rgba(76, 29, 149, 0.24), rgba(15, 23, 42, 0.96));
    border-color: rgba(168, 85, 247, 0.16);
}

.role-card strong {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.14);
}

.role-card strong.is-yes {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.28);
}

.role-card strong.is-no {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.16);
}


.modal-close {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.modal-close:hover {
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.18));
    color: #ffffff;
    border-color: rgba(125, 211, 252, 0.24);
}