html, body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ---- Signal Intelligence Workspace ---- */

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e5e8;
}

.topbar-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.app-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.scenario-name {
    color: #5f6b73;
    font-size: 0.82rem;
}

.topbar-spacer {
    flex: 1;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    font-size: 0.9rem;
}

.lang-link {
    color: #5f6b73;
    text-decoration: none;
    padding: 2px 4px;
}

.lang-link:hover {
    color: #1c5d99;
}

.lang-active {
    color: #1c5d99;
    font-weight: 700;
}

.lang-sep {
    color: #c4ccd1;
}

.app-drawer-items {
    padding: 0;
}

.app-drawer-items li {
    list-style: none;
}

.app-drawer-item {
    color: inherit;
    text-decoration: none;
}

.k-drawer-mini .app-drawer-item .k-item-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
}

.app-drawer-item:hover,
.app-drawer-item:focus {
    color: inherit;
    text-decoration: none;
}

.page-body {
    padding: 20px 24px 40px;
    max-width: 1280px;
}

.page-body:has(.cockpit-page) {
    width: 100%;
    max-width: 1680px;
    box-sizing: border-box;
}

.muted {
    color: #5f6b73;
}

.kpi {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 4px 0;
}

.command-json {
    background: #f4f6f7;
    border: 1px solid #e0e5e8;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8f1fb;
    border: 1px solid #b9d7f3;
    border-radius: 999px;
    padding: 4px 8px 4px 14px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-drafted {
    background: #e8f1fb;
    color: #1c5d99;
}

.badge-needsreview {
    background: #fdf3dc;
    color: #8a6116;
}

.badge-approved {
    background: #e2f4e5;
    color: #1f7a33;
}

.badge-rejected {
    background: #fbe5e5;
    color: #a33030;
}

.review-card {
    margin-bottom: 12px;
}

.draft-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fafbfc;
    border: 1px solid #eef1f3;
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0 0;
}

.section-title {
    margin: 28px 0 8px;
}

.cockpit-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.cockpit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cockpit-header h2,
.cockpit-section-head h3 {
    margin: 0;
}

.cockpit-date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #44505a;
    font-size: 0.86rem;
    white-space: nowrap;
}

.cockpit-source-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 250px;
    border: 1px solid #d6e1ea;
    border-radius: 8px;
    background: #fbfcfe;
    padding: 14px;
    color: #52606b;
    font-size: 0.84rem;
}

.cockpit-source-card strong {
    color: #152432;
    font-size: 1.25rem;
}

.cockpit-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cockpit-policy {
    color: #5f6b73;
    font-size: 0.88rem;
}

.cockpit-truth-panel {
    display: grid;
    gap: 4px;
    border: 1px solid #d6e1ea;
    border-left: 4px solid #1c5d99;
    border-radius: 8px;
    background: #f7fbff;
    padding: 14px;
    color: #3f4d57;
    font-size: 0.9rem;
}

.cockpit-interview-queue {
    border: 1px solid #b8d8cf;
    border-radius: 10px;
    background: linear-gradient(135deg, #f4fbf8 0%, #ffffff 70%);
    padding: 18px;
}

.cockpit-interview-queue__head {
    align-items: flex-end;
}

.cockpit-interview-queue__head p {
    margin: 5px 0 0;
    color: #52606b;
}

.cockpit-interview-queue__head > strong {
    color: #0f6b55;
    white-space: nowrap;
}

.cockpit-interview-queue__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #0f6b55;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.cockpit-interview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cockpit-interview-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    border: 1px solid #d8e4df;
    border-top: 3px solid #14866d;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.cockpit-interview-card > div {
    display: grid;
    gap: 3px;
}

.cockpit-interview-card span {
    color: #0f6b55;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.cockpit-interview-card strong {
    color: #152432;
    font-size: 1.02rem;
}

.cockpit-interview-card small,
.cockpit-interview-card p {
    color: #52606b;
    line-height: 1.4;
}

.cockpit-interview-card p {
    margin: 0;
    flex: 1;
    font-size: 0.88rem;
}

.cockpit-interview-link {
    width: fit-content;
    color: #0b6f79;
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}

.cockpit-interview-link:hover {
    text-decoration: underline;
}

.cockpit-detail-link {
    display: inline-flex;
    margin-top: 14px;
}

.cockpit-band,
.cockpit-chart-panel,
.cockpit-grid-panel,
.cockpit-detail-panel,
.cockpit-digest-panel,
.cockpit-assistant-panel {
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    min-width: 0;
}

.cockpit-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cockpit-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cockpit-summary-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.cockpit-summary-tile span,
.cockpit-summary-tile small {
    color: #5f6b73;
}

.cockpit-summary-tile strong {
    color: #162532;
    font-size: 1.8rem;
}

.cockpit-summary-primary {
    border-color: #b9d7f3;
    background: #f4f9fe;
}

.cockpit-timeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.cockpit-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 56px;
    border: 1px solid #e0e5e8;
    border-radius: 8px;
    padding: 10px;
    background: #f9fafb;
}

.cockpit-step-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 700;
    color: #65727d;
    background: #e8ecef;
}

.cockpit-step-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cockpit-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.cockpit-step-count {
    color: #65727d;
    font-size: 0.82rem;
}

.cockpit-step-complete {
    border-color: #1f7a33;
    background: #f1f8f2;
}

.cockpit-step-complete .cockpit-step-marker {
    background: #1f7a33;
    color: white;
}

.cockpit-step-progress {
    border-color: #c98b20;
    background: #fff8e8;
}

.cockpit-step-progress .cockpit-step-marker {
    background: #c98b20;
    color: white;
}

.cockpit-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cockpit-kpi-card {
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfd;
    min-height: 112px;
}

.cockpit-kpi-primary {
    border-color: #b9d7f3;
    background: #f4f9fe;
}

.cockpit-kpi-title {
    color: #5f6b73;
    font-size: 0.88rem;
    font-weight: 700;
}

.cockpit-kpi-value {
    margin: 8px 0 12px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.cockpit-kpi-value span {
    color: #65727d;
    font-size: 1rem;
    font-weight: 600;
}

.cockpit-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6ebef;
}

.cockpit-progress div {
    height: 100%;
    border-radius: inherit;
    background: #1c5d99;
}

.cockpit-main {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.15fr);
    grid-template-areas:
        "chart detail"
        "grid grid"
        "digest digest"
        "assistant assistant";
    gap: 16px;
    align-items: stretch;
}

.cockpit-chart-panel {
    grid-area: chart;
}

.cockpit-grid-panel {
    grid-area: grid;
    overflow: hidden;
}

.application-tracker {
    --tracker-navy: #1e3a5f;
    --tracker-teal: #0b7f73;
    --tracker-blue: #2563a8;
    --tracker-amber: #9a5b08;
    --tracker-red: #a43a3a;
    --tracker-border: #dce3e8;
    --tracker-muted: #5b6872;
    --tracker-surface: #f7f9fb;
    --tracker-hover: #f4f8fb;
    --tracker-focus: #1f6fa8;
}

.application-tracker .cockpit-section-head {
    align-items: flex-start;
    gap: 18px;
}

.application-tracker .cockpit-section-head h3 {
    margin: 2px 0 0;
    color: #172a3a;
    font-size: 1.2rem;
}

.application-tracker-eyebrow {
    color: var(--tracker-teal);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.application-tracker-subtitle {
    max-width: 720px;
    margin: 5px 0 0;
    color: var(--tracker-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.application-tracker-stages {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.application-tracker-stage {
    min-width: 0;
    border: 1px solid var(--tracker-border);
    border-radius: 8px;
    background: var(--tracker-surface);
    padding: 10px 12px;
}

.application-tracker-stage__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #35434e;
    font-size: 0.82rem;
}

.application-tracker-stage__head strong {
    color: #172a3a;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.application-tracker-stage__dot,
.application-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.application-tracker-stage--waiting {
    color: var(--tracker-amber);
    border-color: #ead5b4;
    background: #fffaf1;
}

.application-tracker-stage--interview {
    color: var(--tracker-blue);
    border-color: #c9dcef;
    background: #f5f9fd;
}

.application-tracker-stage--offer {
    color: var(--tracker-teal);
    border-color: #bedfd9;
    background: #f2faf8;
}

.application-tracker-stage--closed {
    color: var(--tracker-red);
    border-color: #e7cece;
    background: #fff7f7;
}

.application-tracker-stage .k-progressbar,
.application-fit-cell .k-progressbar {
    min-height: 6px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: #e5eaee;
}

.application-tracker .k-grid {
    border-color: var(--tracker-border);
    border-radius: 8px;
    color: #243440;
}

.application-tracker .k-grid-header,
.application-tracker .k-grid-header-wrap {
    background: #f2f5f7;
}

.application-tracker .k-grid-header .k-table-th {
    color: #44525d;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.application-tracker .k-grid .k-table-td {
    padding-top: 11px;
    padding-bottom: 11px;
    border-color: #ebeff2;
    vertical-align: middle;
}

.application-tracker .k-grid .k-table-row:hover {
    background: var(--tracker-hover);
}

.application-tracker .k-grid .k-table-row.k-selected {
    color: #142b3c;
    background: #eaf3f8;
}

.application-tracker .k-grid :focus-visible {
    outline: 2px solid var(--tracker-focus);
    outline-offset: -2px;
}

.application-role-cell {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.application-company-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #ffffff;
    background: var(--tracker-navy);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.application-role-copy,
.application-date-cell,
.application-meta-cell,
.application-action-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.application-role-copy strong,
.application-action-cell strong {
    overflow: hidden;
    color: #172a3a;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.application-role-copy span,
.application-date-cell span,
.application-meta-cell span,
.application-action-cell span {
    overflow: hidden;
    color: var(--tracker-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.application-role-copy span,
.application-action-cell span {
    white-space: nowrap;
}

.application-date-cell strong,
.application-meta-cell strong,
.application-salary {
    color: #2b3a45;
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
}

.application-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.application-status--waiting {
    color: #81500c;
    background: #fff1d6;
}

.application-status--interview {
    color: #1d568d;
    background: #e4f0fb;
}

.application-status--offer {
    color: #08675e;
    background: #daf3ef;
}

.application-status--closed {
    color: #8e3434;
    background: #f8e4e4;
}

.application-status--neutral {
    color: #4c5963;
    background: #edf1f3;
}

.application-source {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #d6dfe5;
    border-radius: 999px;
    padding: 3px 8px;
    color: #40515d;
    background: #f7f9fa;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.application-fit-cell {
    display: grid;
    gap: 7px;
}

.application-fit-cell__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--tracker-muted);
    font-size: 0.76rem;
}

.application-fit-cell__label strong {
    color: var(--tracker-navy);
    font-variant-numeric: tabular-nums;
}

.application-action-cell strong {
    color: var(--tracker-navy);
}

.cockpit-detail-panel {
    grid-area: detail;
}

.cockpit-detail-panel {
    min-height: 300px;
}

.cockpit-digest-panel {
    grid-area: digest;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 300px;
    overflow: hidden;
}

.cockpit-assistant-panel {
    grid-area: assistant;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 620px;
    overflow: hidden;
}

.cockpit-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cockpit-assistant-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cockpit-assistant-title .k-svg-icon {
    color: #1c5d99;
}

.cockpit-assistant-title h3 {
    margin: 0;
    font-size: 1rem;
}

.cockpit-assistant-context {
    border-radius: 6px;
    padding: 8px 10px;
    color: #4f5d66;
    background: #f4f7fa;
    font-size: 0.84rem;
    line-height: 1.35;
}

.cockpit-assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cockpit-assistant-chip {
    border: 1px solid #d5dde3;
    border-radius: 999px;
    padding: 5px 10px;
    color: #32424d;
    background: #ffffff;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
}

.cockpit-assistant-chip:hover,
.cockpit-assistant-chip:focus {
    border-color: #9fc2df;
    color: #164d7f;
    background: #f3f8fc;
}

.cockpit-assistant-chip:disabled {
    cursor: default;
    opacity: 0.55;
}

.cockpit-assistant-status {
    color: #4f5d66;
    font-size: 0.86rem;
}

.cockpit-assistant-status-error {
    color: #8a2727;
}

.cockpit-assistant-chat {
    flex: 1;
    min-height: 0;
}

.cockpit-assistant-chat .k-chat {
    height: 100%;
}

.cockpit-digest-output {
    flex: 1;
    min-height: 180px;
    margin: 0;
    border: 1px solid #e7ecef;
    border-radius: 6px;
    background: #fbfcfd;
    padding: 12px;
    color: #2f3d47;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.48;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: auto;
}

.cockpit-digest-meta {
    color: #65727d;
    font-size: 0.8rem;
}

.cockpit-readiness-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.application-readiness-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.application-readiness-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 14px;
    min-width: 0;
}

.application-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.application-card-head div,
.application-card-meta,
.application-card-block {
    min-width: 0;
}

.application-card-head div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.application-card-head span,
.application-card-meta,
.application-card-block small {
    color: #5f6b73;
    font-size: 0.84rem;
}

.application-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.application-card-meta span,
.application-card-block span {
    overflow-wrap: anywhere;
}

.application-score {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: #33424d;
    font-weight: 700;
}

.application-score-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4ebef;
}

.application-score-track div {
    height: 100%;
    border-radius: inherit;
    background: #1c5d99;
}

.application-card-block {
    display: grid;
    gap: 3px;
}

.cockpit-grid-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.cockpit-grid-count {
    color: #65727d;
    font-size: 0.86rem;
    white-space: nowrap;
}

.cockpit-semantic-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.cockpit-semantic-input-wrap {
    min-width: 0;
}

/* The Telerik theme owns the border, padding, and focus ring for this input;
   duplicating them here would draw a second frame around the textbox. */
.cockpit-semantic-input {
    width: 100%;
}

.cockpit-semantic-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cockpit-semantic-chip {
    border: 1px solid #d5dde3;
    border-radius: 999px;
    padding: 5px 10px;
    color: #32424d;
    background: #f8fafb;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
}

.cockpit-semantic-chip:hover,
.cockpit-semantic-chip:focus {
    border-color: #9fc2df;
    color: #164d7f;
    background: #f3f8fc;
}

.cockpit-semantic-status {
    color: #4f5d66;
    font-size: 0.86rem;
}

.cockpit-semantic-status-error {
    color: #8a2727;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cockpit-detail-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.cockpit-detail-title span {
    color: #4f5d66;
}

.cockpit-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #5f6b73;
    font-size: 0.86rem;
}

.cockpit-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: normal;
}

.cockpit-pill-good {
    background: #e2f4e5;
    color: #1f7a33;
}

.cockpit-pill-watch {
    background: #fdf3dc;
    color: #8a6116;
}

.cockpit-pill-done {
    background: #e8f1fb;
    color: #1c5d99;
}

.cockpit-pill-neutral {
    background: #eef1f3;
    color: #44505a;
}

.cockpit-evidence-block {
    border-top: 1px solid #eef1f3;
    padding-top: 12px;
    margin-top: 12px;
}

.cockpit-evidence-block h4 {
    margin: 0 0 6px;
    font-size: 0.9rem;
}

.cockpit-evidence-block p {
    margin: 0;
    color: #3d4951;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.cockpit-path {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
    padding: 10px;
    border-radius: 6px;
    background: #f4f6f7;
    color: #4f5d66;
    font-size: 0.86rem;
}

.cockpit-path code {
    overflow-wrap: anywhere;
}

.cockpit-loading,
.cockpit-empty,
.cockpit-alert {
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfd;
    color: #5f6b73;
}

.cockpit-alert {
    border-color: #efc1c1;
    background: #fff5f5;
    color: #8a2727;
}

.cockpit-meta {
    color: #4f5d66;
    font-size: 0.92rem;
    text-align: center;
}

/* ---- HubSpot CRM cockpit ---- */

.page-body:has(.hubspot-page) {
    width: 100%;
    max-width: 1680px;
    box-sizing: border-box;
}

.hubspot-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.hubspot-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.hubspot-header h2 {
    margin: 0 0 6px;
}

.hubspot-kicker {
    color: #0f7b55;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hubspot-source-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 240px;
    border: 1px solid #d8e4dd;
    border-radius: 8px;
    background: #fbfdfb;
    padding: 14px;
    color: #52615a;
    font-size: 0.84rem;
}

.hubspot-source-card strong {
    color: #15251e;
    font-size: 1.25rem;
}

.hubspot-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hubspot-link-button,
.hubspot-record-link {
    color: #0c5f45;
    font-weight: 700;
    text-decoration: none;
}

.hubspot-link-button {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border: 1px solid #b9d9cb;
    border-radius: 8px;
    background: #f4fbf7;
    padding: 0 12px;
}

.hubspot-link-button:hover,
.hubspot-record-link:hover {
    color: #093f30;
    text-decoration: underline;
}

.hubspot-policy {
    color: #5f6b73;
    font-size: 0.88rem;
}

.hubspot-truth-panel {
    display: grid;
    gap: 4px;
    border: 1px solid #d8e4dd;
    border-left: 4px solid #0f7b55;
    border-radius: 8px;
    background: #f7fbf8;
    padding: 14px;
    color: #3f4d46;
    font-size: 0.9rem;
}

.hubspot-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hubspot-summary-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.hubspot-summary-tile span,
.hubspot-summary-tile small {
    color: #5f6b73;
}

.hubspot-summary-tile strong {
    color: #16261f;
    font-size: 1.8rem;
}

.hubspot-summary-primary {
    border-color: #f0d28a;
    background: #fffaf0;
}

.hubspot-pill-blocked {
    background: #fbe5e5;
    color: #8a2727;
}

.hubspot-grid-stack {
    display: grid;
    gap: 16px;
}

.hubspot-panel {
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    min-width: 0;
}

.hubspot-assistant-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 560px;
    overflow: hidden;
}

.hubspot-assistant-panel .cockpit-assistant-title .k-svg-icon {
    color: #0f7b55;
}

.hubspot-assistant-panel .cockpit-assistant-chat {
    min-height: 360px;
}

.hubspot-readiness-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hubspot-readiness-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 14px;
    min-width: 0;
}

.hubspot-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.hubspot-card-head div,
.hubspot-card-meta,
.hubspot-card-block {
    min-width: 0;
}

.hubspot-card-head div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hubspot-card-head span,
.hubspot-card-meta,
.hubspot-card-block small {
    color: #5f6b73;
    font-size: 0.84rem;
}

.hubspot-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}

.hubspot-card-meta span,
.hubspot-card-block span {
    overflow-wrap: anywhere;
}

.hubspot-score {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: #33423b;
    font-weight: 700;
}

.hubspot-score-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4ebe8;
}

.hubspot-score-track div {
    height: 100%;
    border-radius: inherit;
    background: #0f7b55;
}

.hubspot-card-block {
    display: grid;
    gap: 3px;
}

.hubspot-note {
    margin: 0;
    border: 1px solid #e7ecef;
    border-radius: 6px;
    background: #ffffff;
    padding: 10px;
    color: #33423b;
    font: inherit;
    font-size: 0.84rem;
    line-height: 1.42;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.hubspot-quality-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 20px;
    align-items: stretch;
    border: 1px solid #d7e2df;
    border-radius: 8px;
    background: #ffffff;
    padding: 22px;
}

.hubspot-quality-hero h2 {
    margin: 0 0 8px;
    color: #17231f;
}

.hubspot-quality-hero p {
    max-width: 760px;
    margin: 0;
    color: #52615a;
    line-height: 1.55;
}

.hubspot-quality-status {
    display: grid;
    align-content: center;
    gap: 6px;
    border: 1px solid #f0d28a;
    border-radius: 8px;
    background: #fffaf0;
    padding: 16px;
}

.hubspot-quality-status span,
.hubspot-quality-status small {
    color: #6f5b28;
}

.hubspot-quality-status strong {
    color: #392f15;
    font-size: 1.24rem;
    line-height: 1.25;
}

.hubspot-use-case-panel,
.hubspot-next-move,
.hubspot-loading-panel {
    display: grid;
    gap: 12px;
    border: 1px solid #d7e2df;
    border-radius: 8px;
    background: #ffffff;
    padding: 16px 18px;
}

.hubspot-use-case-panel {
    grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
    align-items: start;
    border-left: 4px solid #0f7b55;
}

.hubspot-use-case-panel div,
.hubspot-next-move div,
.hubspot-loading-panel {
    min-width: 0;
}

.hubspot-use-case-panel span,
.hubspot-next-move span {
    display: block;
    margin-bottom: 4px;
    color: #0f7b55;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hubspot-use-case-panel strong,
.hubspot-next-move strong,
.hubspot-loading-panel strong {
    color: #17231f;
    font-size: 1.05rem;
    line-height: 1.35;
}

.hubspot-use-case-panel ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: #33423b;
}

.hubspot-use-case-panel li {
    line-height: 1.4;
}

.hubspot-next-move {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    background: #f7fbf8;
}

.hubspot-next-move small,
.hubspot-loading-panel span {
    display: block;
    margin-top: 4px;
    color: #5f6b73;
}

.hubspot-jump-button {
    border: 1px solid #b9d9cb;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
    color: #0c5f45;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.hubspot-jump-button:hover,
.hubspot-jump-button:focus {
    border-color: #0f7b55;
    outline: none;
}

.hubspot-quality-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hubspot-quality-tile {
    display: grid;
    gap: 5px;
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
    min-width: 0;
}

.hubspot-quality-tile span,
.hubspot-quality-tile small {
    color: #5f6b73;
    overflow-wrap: anywhere;
}

.hubspot-quality-tile strong {
    color: #16261f;
    font-size: 1.9rem;
    line-height: 1;
}

.hubspot-quality-good {
    border-color: #bde5cc;
    background: #f4fbf6;
}

.hubspot-quality-watch {
    border-color: #f0d28a;
    background: #fffaf0;
}

.hubspot-quality-blocked {
    border-color: #efc5c5;
    background: #fff5f5;
}

.hubspot-review-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
}

.hubspot-proposal-queue,
.hubspot-case-detail {
    min-height: 520px;
}

.hubspot-proposal-group {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.hubspot-proposal-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #52615a;
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hubspot-proposal-button,
.hubspot-representative-case {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 8px;
    border: 1px solid #e1e7e5;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 12px;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.hubspot-proposal-button:hover,
.hubspot-proposal-button:focus,
.hubspot-proposal-button.is-selected,
.hubspot-representative-case:hover,
.hubspot-representative-case:focus {
    border-color: #88b8a7;
    background: #f4fbf7;
    outline: none;
}

.hubspot-proposal-button strong,
.hubspot-representative-case strong {
    color: #17231f;
    overflow-wrap: anywhere;
}

.hubspot-proposal-button small,
.hubspot-representative-case small {
    color: #5f6b73;
    overflow-wrap: anywhere;
}

.hubspot-proposal-button em,
.hubspot-representative-case em {
    color: #3f4d46;
    font-size: 0.84rem;
    font-style: normal;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.hubspot-case-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.hubspot-case-head h3 {
    margin: 4px 0 0;
}

.hubspot-case-head span:first-child {
    color: #5f6b73;
    font-size: 0.78rem;
    font-weight: 800;
}

.hubspot-case-summary {
    color: #3f4d46;
    line-height: 1.5;
}

.hubspot-case-section {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.hubspot-case-section small {
    color: #5f6b73;
    font-weight: 800;
    text-transform: uppercase;
}

.hubspot-case-section ul {
    margin: 0;
    padding-left: 18px;
    color: #33423b;
}

.hubspot-case-section li {
    margin: 3px 0;
    overflow-wrap: anywhere;
}

.hubspot-case-section p {
    margin: 0;
    color: #33423b;
}

.hubspot-policy-box {
    border: 1px solid #e3e8ec;
    border-radius: 8px;
    background: #fbfcfd;
    padding: 12px;
}

.hubspot-representative-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hubspot-audit-list {
    display: grid;
    gap: 8px;
}

.hubspot-audit-row {
    display: grid;
    grid-template-columns: 54px 150px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #edf1f3;
    padding: 10px 0;
}

.hubspot-audit-row span {
    color: #5f6b73;
    font-size: 0.82rem;
}

.hubspot-audit-row strong {
    color: #17231f;
}

.hubspot-audit-row small {
    color: #5f6b73;
    overflow-wrap: anywhere;
}

.hubspot-source-records {
    display: grid;
    gap: 14px;
}

/* ---- HM-facing Application Intelligence prototype ---- */

.page-body:has(.application-intelligence-page) {
    width: 100%;
    max-width: 1680px;
    box-sizing: border-box;
}

.application-intelligence-page {
    --ai-primary: #0f766e;
    --ai-primary-dark: #0b4f4a;
    --ai-primary-soft: #d7f1ee;
    --ai-blue: #2563eb;
    --ai-blue-soft: #dbeafe;
    --ai-green: #15803d;
    --ai-green-soft: #ddf7e8;
    --ai-amber: #a16207;
    --ai-amber-soft: #fff1d6;
    --ai-red: #b42318;
    --ai-red-soft: #fee4e2;
    --ai-ink: #1f2933;
    --ai-muted: #5b6470;
    --ai-line: #dce3e8;
    --ai-panel: #ffffff;
    --ai-soft: #f7f9fa;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    color: var(--ai-ink);
}

.application-intelligence-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    align-items: stretch;
}

.application-intelligence-hero-copy {
    border: 1px solid var(--ai-line);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f6fbfa 100%);
    padding: 22px;
}

.application-intelligence-backlink {
    display: block;
    width: fit-content;
    margin-bottom: 12px;
    color: var(--ai-primary-dark);
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
}

.application-intelligence-backlink:hover {
    text-decoration: underline;
}

.application-intelligence-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--ai-primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.application-intelligence-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: 2rem;
    line-height: 1.12;
    letter-spacing: 0;
}

.application-intelligence-hero p {
    max-width: 920px;
    margin: 10px 0 0;
    color: var(--ai-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.application-intelligence-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.application-intelligence-chip,
.application-intelligence-caption {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #b9d9d4;
    border-radius: 999px;
    background: var(--ai-primary-soft);
    padding: 4px 10px;
    color: var(--ai-primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
}

.application-intelligence-source {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--ai-line);
    border-left: 4px solid var(--ai-primary);
    border-radius: 8px;
    background: var(--ai-panel);
    padding: 18px;
    color: var(--ai-muted);
    font-size: 0.86rem;
}

.application-intelligence-source strong {
    color: var(--ai-ink);
    font-size: 1.25rem;
}

.application-intelligence-read-guide {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid #c8dfe6;
    border-left: 4px solid var(--ai-blue);
    border-radius: 8px;
    background: #f4fbfd;
    padding: 12px 14px;
    color: #31444d;
    font-size: 0.92rem;
}

.application-intelligence-read-guide strong {
    color: var(--ai-ink);
    white-space: nowrap;
}

.application-intelligence-read-guide span {
    min-width: 0;
    color: var(--ai-muted);
    line-height: 1.45;
}

.application-intelligence-boundary {
    display: grid;
    gap: 4px;
    border: 1px solid #d8e4dd;
    border-left: 4px solid var(--ai-green);
    border-radius: 8px;
    background: #f7fbf8;
    padding: 14px;
    color: #3f4d46;
    font-size: 0.9rem;
}

.application-intelligence-live-strip {
    display: grid;
    gap: 4px;
    border: 1px solid var(--ai-line);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.9rem;
}

.application-intelligence-live-strip strong {
    color: var(--ai-ink);
}

.application-intelligence-live-strip span {
    color: var(--ai-muted);
}

.application-intelligence-live-strip-success {
    border-left: 4px solid var(--ai-blue);
    background: var(--ai-blue-soft);
}

.application-intelligence-live-strip-loading {
    border-left: 4px solid var(--ai-amber);
    background: var(--ai-amber-soft);
}

.application-intelligence-live-strip-fallback {
    border-left: 4px solid var(--ai-red);
    background: var(--ai-red-soft);
}

.application-intelligence-role-lens {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.7fr);
    gap: 18px;
    border: 1px solid #c9d9e6;
    border-radius: 8px;
    background: linear-gradient(135deg, #f4f8fc 0%, #ffffff 72%);
    padding: 18px;
}

.application-intelligence-role-lens__lead > span {
    color: var(--ai-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.application-intelligence-role-lens h2 {
    margin: 6px 0 8px;
    color: var(--ai-ink);
    font-size: 1.25rem;
}

.application-intelligence-role-lens p,
.application-intelligence-role-lens dd {
    margin: 0;
    color: var(--ai-muted);
    line-height: 1.45;
}

.application-intelligence-role-lens dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.application-intelligence-role-lens dl > div {
    border-left: 2px solid #bed4e5;
    padding-left: 12px;
}

.application-intelligence-role-lens dt {
    margin-bottom: 5px;
    color: var(--ai-ink);
    font-size: 0.78rem;
    font-weight: 800;
}

.application-intelligence-role-lens dd {
    font-size: 0.86rem;
}

.application-intelligence-kpi-grid,
.application-intelligence-funnel,
.application-intelligence-pipeline,
.application-intelligence-learning-grid {
    display: grid;
    gap: 12px;
}

.application-intelligence-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.application-intelligence-kpi,
.application-intelligence-funnel-step,
.application-intelligence-pipeline-step,
.application-intelligence-learning-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    border: 1px solid var(--ai-line);
    border-radius: 8px;
    background: var(--ai-panel);
    padding: 14px;
}

.application-intelligence-kpi span,
.application-intelligence-kpi small,
.application-intelligence-funnel-step small,
.application-intelligence-pipeline-step small,
.application-intelligence-learning-item p {
    color: var(--ai-muted);
}

.application-intelligence-kpi strong {
    color: var(--ai-ink);
    font-size: 1.8rem;
    line-height: 1.1;
}

.application-intelligence-kpi-primary {
    border-color: var(--ai-primary);
    background: var(--ai-primary);
}

.application-intelligence-kpi-primary span,
.application-intelligence-kpi-primary strong,
.application-intelligence-kpi-primary small {
    color: #ffffff;
}

.application-intelligence-kpi-breakdown {
    display: grid;
    gap: 5px;
    margin: 6px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid #e8eef1;
    list-style: none;
}

.application-intelligence-kpi-breakdown li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    font-size: 0.78rem;
}

.application-intelligence-kpi-breakdown span {
    overflow: hidden;
    color: var(--ai-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.application-intelligence-kpi-breakdown strong {
    flex: 0 0 auto;
    color: var(--ai-ink);
    font-size: 0.82rem;
    line-height: 1.2;
}

.application-intelligence-panel {
    min-width: 0;
    border: 1px solid var(--ai-line);
    border-radius: 8px;
    background: var(--ai-panel);
    padding: 18px;
}

.application-intelligence-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.application-intelligence-section-head h2 {
    margin: 0;
    font-size: 1rem;
}

.application-intelligence-section-head p {
    margin: 4px 0 0;
}

.application-intelligence-funnel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.application-intelligence-funnel-step {
    position: relative;
    min-height: 116px;
    background: var(--ai-soft);
}

.application-intelligence-funnel-step::after {
    content: "->";
    position: absolute;
    top: 40px;
    right: -11px;
    z-index: 1;
    color: var(--ai-muted);
    font-weight: 800;
}

.application-intelligence-funnel-step:last-child::after {
    display: none;
}

.application-intelligence-funnel-value {
    color: var(--ai-primary);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.application-intelligence-pipeline {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.application-intelligence-pipeline-step span:first-child {
    color: var(--ai-primary);
    font-size: 0.76rem;
    font-weight: 800;
}

.application-intelligence-progress-wrap {
    margin-top: auto;
}

.application-intelligence-progress.k-progressbar {
    height: 8px;
}

.application-intelligence-progress .k-progress-status,
.application-intelligence-progress .k-progress-status-wrap {
    display: none;
}

.application-intelligence-workbench {
    display: grid;
    grid-template-columns: minmax(320px, 0.75fr) minmax(520px, 1.25fr);
    grid-template-areas:
        "readout readout"
        "chart grid"
        "detail grid";
    gap: 16px;
    align-items: stretch;
}

.application-intelligence-campaign-readout {
    grid-area: readout;
}

.application-intelligence-chart-panel {
    grid-area: chart;
}

.application-intelligence-empty-chart {
    display: grid;
    min-height: 280px;
    place-items: center;
    border: 1px dashed var(--ai-line);
    border-radius: 8px;
    color: var(--ai-muted);
    font-size: 0.9rem;
    text-align: center;
}

.application-intelligence-grid-panel {
    grid-area: grid;
    overflow: hidden;
}

.application-intelligence-detail-panel {
    grid-area: detail;
}

.application-intelligence-grid-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.application-intelligence-grid-title span {
    color: var(--ai-muted);
    font-size: 0.84rem;
    line-height: 1.3;
}

.application-intelligence-score {
    color: var(--ai-ink);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.application-intelligence-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: normal;
}

.application-intelligence-status-good {
    background: var(--ai-green-soft);
    color: var(--ai-green);
}

.application-intelligence-status-done {
    background: var(--ai-blue-soft);
    color: var(--ai-blue);
}

.application-intelligence-status-watch {
    background: var(--ai-amber-soft);
    color: var(--ai-amber);
}

.application-intelligence-status-risk {
    background: var(--ai-red-soft);
    color: var(--ai-red);
}

.application-intelligence-status-neutral {
    background: #eef1f3;
    color: #44505a;
}

.application-intelligence-case-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.application-intelligence-case-head div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.application-intelligence-case-head div > span {
    color: var(--ai-muted);
}

.application-intelligence-case-source {
    display: grid;
    gap: 8px;
    border: 1px solid #e6edf1;
    border-radius: 8px;
    background: var(--ai-soft);
    padding: 12px;
}

.application-intelligence-case-source p {
    margin: 0;
    color: var(--ai-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.application-intelligence-evidence-chain {
    border-top: 1px solid #eef1f3;
    padding-top: 12px;
    margin-top: 12px;
}

.application-intelligence-evidence-chain h3 {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.application-intelligence-evidence-chain ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.application-intelligence-evidence-chain li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #edf1f4;
    border-radius: 8px;
    padding: 10px;
}

.application-intelligence-evidence-chain li > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.application-intelligence-evidence-chain small {
    color: var(--ai-muted);
    line-height: 1.35;
}

.application-intelligence-evidence-block {
    border-top: 1px solid #eef1f3;
    padding-top: 12px;
    margin-top: 12px;
}

.application-intelligence-evidence-block h3 {
    margin: 0 0 6px;
    font-size: 0.9rem;
}

.application-intelligence-evidence-block p {
    margin: 0;
    color: #3d4951;
    font-size: 0.9rem;
    line-height: 1.45;
}

.application-intelligence-learning {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    gap: 16px;
}

.application-intelligence-learning-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.application-intelligence-learning-item p {
    margin: 0;
    line-height: 1.4;
}

.application-intelligence-claims {
    display: grid;
    gap: 12px;
    margin: 0;
}

.application-intelligence-claims div {
    border-top: 1px solid #eef1f3;
    padding-top: 10px;
}

.application-intelligence-claims div:first-child {
    border-top: 0;
    padding-top: 0;
}

.application-intelligence-claims dt {
    margin-bottom: 4px;
    color: var(--ai-ink);
    font-weight: 800;
}

.application-intelligence-claims dd {
    margin: 0;
    color: var(--ai-muted);
    line-height: 1.4;
}

@media (min-width: 1450px) {
    .cockpit-main {
        grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1fr) minmax(360px, 0.95fr);
        grid-template-areas:
            "chart detail digest"
            "grid grid grid"
            "assistant assistant assistant";
    }

    .cockpit-detail-panel {
        min-height: 300px;
    }
}

@media (max-width: 980px) {
    .cockpit-main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "chart"
            "grid"
            "detail"
            "digest"
            "assistant";
    }

    .cockpit-detail-panel {
        min-height: 0;
    }

    .cockpit-assistant-panel {
        min-height: 560px;
    }
}

@media (max-width: 900px) {
    .cockpit-timeline,
    .cockpit-interview-grid,
    .cockpit-kpi-grid,
    .cockpit-summary-grid,
    .application-readiness-grid,
    .hubspot-summary-grid,
    .hubspot-readiness-grid,
    .hubspot-quality-grid,
    .hubspot-representative-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .application-tracker-stages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hubspot-quality-hero,
    .hubspot-review-layout,
    .hubspot-use-case-panel,
    .hubspot-next-move {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .page-body {
        padding: 16px;
        max-width: none;
    }

    .cockpit-header,
    .hubspot-header {
        flex-direction: column;
    }

    .cockpit-date {
        align-items: flex-start;
    }

    .cockpit-timeline,
    .cockpit-interview-grid,
    .cockpit-kpi-grid,
    .cockpit-summary-grid,
    .application-readiness-grid,
    .hubspot-summary-grid,
    .hubspot-readiness-grid,
    .hubspot-quality-grid,
    .hubspot-representative-grid {
        grid-template-columns: 1fr;
    }

    .hubspot-quality-hero,
    .hubspot-review-layout,
    .hubspot-audit-row,
    .hubspot-use-case-panel,
    .hubspot-next-move {
        grid-template-columns: 1fr;
    }

    .cockpit-semantic-row {
        grid-template-columns: 1fr;
    }

    .application-tracker-stages {
        grid-template-columns: 1fr;
    }

    .cockpit-source-card,
    .hubspot-source-card {
        width: 100%;
        box-sizing: border-box;
    }

    .application-card-meta,
    .application-score,
    .hubspot-card-meta,
    .hubspot-score,
    .application-intelligence-case-head {
        grid-template-columns: 1fr;
    }

    .cockpit-interview-queue__head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 1120px) {
    .application-intelligence-kpi-grid,
    .application-intelligence-funnel,
    .application-intelligence-pipeline,
    .application-intelligence-learning-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .application-intelligence-workbench {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "chart"
            "grid"
            "detail";
    }

    .application-intelligence-learning {
        grid-template-columns: minmax(0, 1fr);
    }

    .application-intelligence-role-lens {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .application-intelligence-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .application-intelligence-kpi-grid,
    .application-intelligence-funnel,
    .application-intelligence-pipeline,
    .application-intelligence-learning-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .application-intelligence-funnel-step::after {
        display: none;
    }

    .application-intelligence-section-head,
    .application-intelligence-case-head {
        flex-direction: column;
    }

    .application-intelligence-role-lens dl {
        grid-template-columns: minmax(0, 1fr);
    }

    .application-intelligence-hero h1 {
        font-size: 1.7rem;
    }
}

/* Public deep views (main.ppv) use in-page anchors — the /system-data verify
   strip's schema card lands on #data-model. Smooth scroll is scoped to pages
   that actually carry the .ppv main so cockpit behavior is untouched. */
html:has(main.ppv) {
    scroll-behavior: smooth;
}

/* Sticky-header anchor offset. .public-nav is position:sticky, so a fragment
   jump parks the target underneath it: measured at 375px, the header CTA's
   /#cta jump left 81px of the CTA headline behind the 112px header. How much
   it hides depends on how far the page can actually scroll — at 1280x720 the
   same jump clamps at the document bottom and hides only padding, which is why
   this reads as intermittent rather than broken. (The site's other anchor,
   /system-data#data-model, is the first section on its page, so it needs no
   scroll and never showed the defect. It is covered here anyway.)
   scroll-padding-top on the scroll container fixes every anchor at once,
   including ids a later view links to, instead of one scroll-margin rule per
   target that the next anchor has to remember to add. Scoped to pages carrying
   the public shell for the same reason as the smooth-scroll rule above: the
   cockpit's root scroller is left alone.
   The values are the measured header height rounded up — 117.2px above 720px,
   111.8px at or below — plus a 12px gap. Overshooting only drops the target a
   little lower; undershooting is the bug, so keep these >= the real height. */
html:has(.public-shell) {
    --public-sticky-offset: 118px;
    scroll-padding-top: calc(var(--public-sticky-offset) + 12px);
}

@media (max-width: 720px) {
    html:has(.public-shell) {
        --public-sticky-offset: 112px;
    }
}
