/* Match Insights — Fast Match signal + Deep Match (dark + light) */
/* Dialog chrome (glow border/background) comes from global .mud-dialog in app-shell.css */

.mud-dialog.jt-match-insights-dialog,
.jt-match-insights-dialog.mud-dialog {
    width: min(1100px, calc(100vw - 32px)) !important;
    max-width: min(1100px, calc(100vw - 32px)) !important;
}

.mud-dialog.jt-match-insights-dialog .mud-dialog-title,
.jt-match-insights-dialog .mud-dialog-title {
    padding: 1rem 1.25rem 0.5rem !important;
}

.mud-dialog.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-header,
.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-header {
    --mi-muted: #94a3b8;
    --mi-title: #f5f3ff;
    --mi-title-accent: #c4b5fd;
    --mi-meta-icon: #a78bfa;
    min-width: 0;
    padding-right: 2rem;
}

.mud-dialog.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-kicker,
.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-kicker {
    margin: 0 0 4px;
    font-family: Outfit, Inter, sans-serif;
    font-size: 0.7rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--mi-muted) !important;
}

.mud-dialog.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-title,
.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-title,
.mud-dialog.jt-match-insights-dialog .mud-dialog-title h2.jt-match-insights-title,
.jt-match-insights-dialog .mud-dialog-title h2.jt-match-insights-title {
    margin: 0 !important;
    font-family: Outfit, Inter, sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 750 !important;
    letter-spacing: -0.025em;
    line-height: 1.2 !important;
    color: var(--mi-title) !important;
}

html[data-theme="light"] .mud-dialog.jt-match-insights-dialog .mud-dialog-title .jt-match-insights-header,
html[data-theme="light"] .jt-match-insights-dialog .mud-dialog-title .jt-match-insights-header {
    --mi-muted: #64748b;
    --mi-title: #1e1b4b;
    --mi-title-accent: #5b21b6;
    --mi-meta-icon: #7c3aed;
}

.mud-dialog.jt-match-insights-dialog .mud-dialog-content,
.jt-match-insights-dialog .mud-dialog-content {
    padding: 0.5rem 1.25rem 1.25rem !important;
    max-height: min(82dvh, 920px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.jt-match-insights {
    --mi-teal: #00e5ff;
    --mi-yellow: #ca8a04;
    --mi-red: #ff4d6d;
    --mi-purple: #a855f7;
    --mi-blue: #3b82f6;
    --mi-border: rgba(139, 92, 246, 0.38);
    --mi-surface: rgba(15, 23, 42, 0.72);
    --mi-surface-2: rgba(12, 18, 34, 0.9);
    --mi-muted: #94a3b8;
    --mi-text: #f8fafc;
    --mi-title: #f5f3ff;
    --mi-title-accent: #c4b5fd;
    --mi-meta-icon: #a78bfa;
    --mi-chip-matched-fg: #a5f3fc;
    --mi-chip-partial-fg: #fef08a;
    --mi-chip-gaps-fg: #fecdd3;
    --mi-donut-label: #fff;
    --mi-donut-sub: #c4b5fd;
    --mi-bar-label: #cbd5e1;
    --mi-bar-value: #e9d5ff;
    --mi-count: #e2e8f0;
    --mi-needle: #ffffff;
    --mi-hub-fill: #f8fafc;
    color: var(--mi-text);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.jt-match-insights-kicker {
    margin: 0 0 4px;
    font-family: Outfit, Inter, sans-serif;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--mi-muted);
}

.jt-match-insights-title {
    margin: 0;
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--mi-title);
}

.jt-match-insights-title span {
    color: var(--mi-title-accent);
    font-weight: 650;
}

.jt-match-insights-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 8px;
    color: var(--mi-muted);
    font-size: 0.86rem;
}

.jt-match-insights-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jt-match-insights-meta-item .mud-icon-root {
    color: var(--mi-meta-icon);
}

.jt-match-insights-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.jt-match-insights-resume-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: 4px 0 12px;
}

.jt-match-insights-actions .jt-match-insights-resume-bar {
    margin: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.jt-match-insights-actions .jt-mi-back.mud-button-root {
    border-radius: 999px !important;
    border: 1px solid rgba(96, 165, 250, 0.45) !important;
    background: rgba(30, 58, 138, 0.35) !important;
    color: #dbeafe !important;
    text-transform: none !important;
    padding-inline: 14px !important;
    font-family: Outfit, Inter, sans-serif !important;
    font-weight: 600 !important;
}

.jt-match-insights .jt-mi-upload.mud-button-root {
    text-transform: none !important;
    font-family: Outfit, Inter, sans-serif !important;
    font-weight: 600 !important;
    min-height: 40px;
    white-space: nowrap;
}

.jt-match-insights-actions .analysis-resume-picker,
.jt-match-insights-resume-bar .analysis-resume-picker,
.jt-match-insights .analysis-resume-picker {
    min-width: min(100%, 220px);
    max-width: 280px;
    margin: 0;
    font-family: Outfit, Inter, sans-serif;
}

.jt-match-insights .analysis-resume-picker .mud-input-control,
.jt-match-insights .analysis-resume-picker .mud-input-outlined,
.jt-match-insights .analysis-resume-picker .mud-input,
.jt-match-insights .analysis-resume-picker .mud-input-slot,
.jt-match-insights .analysis-resume-picker .mud-select-input,
.jt-match-insights .analysis-resume-picker input.mud-select-input {
    color: var(--mi-text) !important;
    font-family: Outfit, Inter, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: -0.015em;
}

.jt-match-insights .analysis-resume-picker .mud-input-slot,
.jt-match-insights .analysis-resume-picker .mud-select-input,
.jt-match-insights .analysis-resume-picker input.mud-select-input {
    font-size: 0.95rem !important;
}

.jt-match-insights .analysis-resume-picker .mud-input-outlined {
    border-radius: 999px !important;
}

.jt-match-insights .analysis-resume-picker .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--mi-border) !important;
}

.jt-match-insights .analysis-resume-picker .mud-input-label {
    color: var(--mi-title-accent) !important;
    font-family: Outfit, Inter, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: -0.015em !important;
    font-size: 1rem !important;
}

.jt-match-insights .analysis-resume-picker .mud-input-adornment-end .mud-icon-root {
    color: var(--mi-title-accent);
}

.jt-match-insights-resume-popover,
.jt-match-insights-resume-popover .mud-list,
.jt-match-insights-resume-popover .mud-list-item,
.jt-match-insights-resume-popover .mud-list-item-text,
.jt-match-insights-resume-popover .mud-typography,
.jt-match-insights-resume-popover .mud-typography-body1,
.jt-match-insights-resume-popover .mud-typography-body2,
.jt-match-insights-resume-popover .jt-ci-select-option,
.jt-match-insights-resume-popover .analysis-resume-picker__option,
.jt-match-insights-resume-popover .mud-list-item > *,
.jt-match-insights-resume-popover .mud-list-item-text > * {
    font-family: Outfit, Inter, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: -0.015em;
    color: inherit;
}

.jt-match-insights-resume-popover .jt-ci-select-option,
.jt-match-insights-resume-popover .analysis-resume-picker__option,
.jt-match-insights-resume-popover .mud-list-item-text,
.jt-match-insights-resume-popover .mud-list-item {
    font-size: 0.88rem !important;
}

.jt-match-insights-resume-popover .mud-list-item {
    min-height: 2.5rem;
}

html[data-theme="light"] .jt-match-insights-resume-popover {
    color: #0f172a;
}

html[data-theme="dark"] .jt-match-insights-resume-popover {
    color: #f5f3ff;
}

.jt-match-insights-panel {
    border: 1px solid var(--mi-border);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(88, 28, 135, 0.16), transparent 42%),
        var(--mi-surface);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.08);
    padding: 16px 18px;
}

.jt-mi-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.jt-mi-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: none;
}

.jt-mi-section-icon.is-fast {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    box-shadow: 0 0 18px rgba(74, 222, 128, 0.25);
}

.jt-mi-section-icon.is-deep {
    background: rgba(168, 85, 247, 0.16);
    color: #9333ea;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
}

.jt-mi-section-copy h3 {
    margin: 0;
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mi-text);
}

.jt-mi-section-copy p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--mi-muted);
}

/* ---- Fast Match signal gauge ---- */

.jt-fast-signal {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(180px, 0.9fr);
    gap: 18px 24px;
    align-items: center;
}

.jt-fast-signal-gauge {
    position: relative;
    width: min(100%, 220px);
    margin-inline: auto;
    aspect-ratio: 2 / 1.15;
    color: var(--mi-needle);
}

.jt-fast-signal-gauge svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.jt-fast-signal-needle {
    transform-origin: 140px 120px;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.45));
}

.jt-fast-signal-hub {
    fill: var(--mi-hub-fill);
    stroke: rgba(168, 85, 247, 0.7);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.55));
}

.jt-fast-signal-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.jt-fast-signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.08);
    color: var(--mi-text);
    font-family: Outfit, Inter, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.jt-fast-signal-badge strong {
    font-family: inherit;
    font-weight: 700;
}

.jt-fast-signal-badge.is-low {
    border-color: rgba(255, 77, 109, 0.45);
    background: rgba(255, 77, 109, 0.12);
    color: #ff4d6d;
}

.jt-fast-signal-badge.is-limited {
    border-color: rgba(251, 146, 60, 0.5);
    background: rgba(251, 146, 60, 0.14);
    color: #ea580c;
}

.jt-fast-signal-badge.is-early {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.14);
    color: #ca8a04;
}

.jt-fast-signal-badge.is-partial {
    border-color: rgba(250, 204, 21, 0.5);
    background: rgba(250, 204, 21, 0.16);
    color: #a16207;
}

.jt-fast-signal-badge.is-some {
    border-color: rgba(134, 239, 172, 0.5);
    background: rgba(134, 239, 172, 0.16);
    color: #16a34a;
}

.jt-fast-signal-badge.is-building {
    border-color: rgba(45, 212, 191, 0.5);
    background: rgba(45, 212, 191, 0.14);
    color: #0d9488;
}

.jt-fast-signal-badge.is-solid {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.14);
    color: #2563eb;
}

.jt-fast-signal-badge.is-very-strong {
    border-color: rgba(168, 85, 247, 0.55);
    background: rgba(168, 85, 247, 0.16);
    color: #9333ea;
}

.jt-fast-signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
    flex: none;
}

.jt-fast-signal-side p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--mi-muted);
}

.jt-fast-signal-legend {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    padding-top: 4px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.jt-fast-signal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--mi-muted);
}

.jt-fast-signal-legend i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.jt-fast-signal-empty {
    color: var(--mi-muted);
    font-size: 0.9rem;
}

.jt-fast-signal-stale {
    grid-column: 1 / -1;
}

/* ---- Deep Match ---- */

.jt-deep-match-summary {
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) auto minmax(0, 1.35fr);
    gap: 18px 22px;
    align-items: center;
    margin-bottom: 16px;
}

.jt-deep-donut {
    position: relative;
    width: min(100%, 220px);
    aspect-ratio: 1;
    margin-inline: auto;
}

.jt-deep-donut svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.jt-deep-donut-track {
    stroke: rgba(148, 163, 184, 0.14);
}

.jt-deep-donut-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.jt-deep-donut-label strong {
    font-family: Outfit, Inter, sans-serif;
    font-size: 2.35rem;
    font-weight: 750;
    line-height: 1;
    color: var(--mi-donut-label);
    text-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

.jt-deep-donut-label span {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--mi-donut-sub);
    font-weight: 650;
    font-family: Outfit, Inter, sans-serif;
}

.jt-deep-donut-label span.is-excellent { color: #0f766e; }
.jt-deep-donut-label span.is-good { color: #1d4ed8; }
.jt-deep-donut-label span.is-fair { color: #b45309; }
.jt-deep-donut-label span.is-stretch { color: #475569; }

.jt-deep-counts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 7.5rem;
}

.jt-deep-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--mi-count);
}

.jt-deep-count .mud-icon-root {
    font-size: 1.15rem !important;
}

.jt-deep-count.is-matched { color: #0d9488; }
.jt-deep-count.is-partial { color: #ca8a04; }
.jt-deep-count.is-gaps { color: var(--mi-red); }

.jt-deep-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.jt-deep-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
}

.jt-deep-bar-row > span:first-child {
    grid-column: 1;
    font-size: 0.82rem;
    color: var(--mi-bar-label);
}

.jt-deep-bar-row > b {
    grid-column: 2;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    color: var(--mi-bar-value);
}

.jt-deep-bar-track {
    grid-column: 1 / -1;
    height: 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.jt-deep-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #a855f7, #3b82f6);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

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

.jt-deep-category {
    border: 1px solid var(--mi-border);
    border-radius: 14px;
    background: var(--mi-surface-2);
    overflow: hidden;
}

.jt-deep-category-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font-family: Outfit, Inter, sans-serif;
}

.jt-deep-category-toggle:hover {
    background: rgba(168, 85, 247, 0.08);
}

.jt-deep-category-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(168, 85, 247, 0.14);
    color: #9333ea;
    flex: none;
}

.jt-deep-category-toggle strong {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.jt-deep-category-toggle em {
    font-style: normal;
    font-size: 0.78rem;
    color: var(--mi-muted);
    white-space: nowrap;
}

.jt-deep-category-body {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0 14px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.jt-deep-category.is-open .jt-deep-category-body {
    display: grid;
    padding-top: 12px;
}

.jt-deep-bucket h4 {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mi-muted);
    font-family: Outfit, Inter, sans-serif;
}

.jt-deep-bucket.is-matched h4 { color: #0d9488; }
.jt-deep-bucket.is-partial h4 { color: #ca8a04; }
.jt-deep-bucket.is-gaps h4 { color: var(--mi-red); }

.jt-deep-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.jt-deep-chip {
    display: inline-flex;
    align-items: flex-start;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 11px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.jt-deep-chip.is-matched {
    border: 1px solid rgba(13, 148, 136, 0.4);
    color: var(--mi-chip-matched-fg);
    background: rgba(0, 229, 255, 0.1);
}

.jt-deep-chip.is-partial {
    border: 1px solid rgba(202, 138, 4, 0.4);
    color: var(--mi-chip-partial-fg);
    background: rgba(255, 214, 0, 0.12);
}

.jt-deep-chip.is-gaps {
    border: 1px solid rgba(255, 77, 109, 0.4);
    color: var(--mi-chip-gaps-fg);
    background: rgba(255, 77, 109, 0.1);
}

.jt-deep-none {
    font-size: 0.8rem;
    color: var(--mi-muted);
}

.jt-match-insights .mud-alert {
    border-radius: 12px;
}

.jt-match-insights .mud-button-filled.mud-button-filled-primary {
    border-radius: 999px !important;
    text-transform: none !important;
    font-family: Outfit, Inter, sans-serif !important;
    /* fill/glow from global .jt-app filled-primary */
}

.jt-match-insights .mud-button-outlined {
    border-radius: 999px !important;
    text-transform: none !important;
    border-color: var(--mi-border) !important;
    color: var(--mi-title-accent) !important;
    font-family: Outfit, Inter, sans-serif !important;
}

.jt-deep-match-workspace.jt-match-insights {
    min-width: 0;
}

/* ---- Light mode ---- */

html[data-theme="light"] .jt-match-insights {
    --mi-border: rgba(124, 58, 237, 0.22);
    --mi-surface: rgba(255, 255, 255, 0.86);
    --mi-surface-2: #ffffff;
    --mi-muted: #64748b;
    --mi-text: #0f172a;
    --mi-title: #1e1b4b;
    --mi-title-accent: #6d28d9;
    --mi-meta-icon: #7c3aed;
    --mi-chip-matched-fg: #0f766e;
    --mi-chip-partial-fg: #a16207;
    --mi-chip-gaps-fg: #be123c;
    --mi-donut-label: #1e1b4b;
    --mi-donut-sub: #7c3aed;
    --mi-bar-label: #475569;
    --mi-bar-value: #6d28d9;
    --mi-count: #1e293b;
    --mi-needle: #312e81;
    --mi-hub-fill: #ffffff;
}

html[data-theme="light"] .jt-match-insights-panel {
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.14), transparent 42%),
        var(--mi-surface);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), inset 0 0 0 1px rgba(124, 58, 237, 0.06);
}

html[data-theme="light"] .jt-match-insights-actions .jt-mi-back.mud-button-root {
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    background: rgba(238, 242, 255, 0.95) !important;
    color: #3730a3 !important;
}

html[data-theme="light"] .jt-mi-section-icon.is-fast {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.12);
    box-shadow: none;
}

html[data-theme="light"] .jt-mi-section-icon.is-deep {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
    box-shadow: none;
}

html[data-theme="light"] .jt-deep-donut-track {
    stroke: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .jt-deep-donut-label strong {
    text-shadow: none;
}

html[data-theme="light"] .jt-deep-bar-track {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .jt-deep-count.is-matched { color: #0f766e; }
html[data-theme="light"] .jt-deep-count.is-partial { color: #a16207; }
html[data-theme="light"] .jt-deep-count.is-gaps { color: #e11d48; }

html[data-theme="light"] .jt-deep-chip.is-matched {
    border-color: rgba(13, 148, 136, 0.35);
    background: rgba(45, 212, 191, 0.12);
}

html[data-theme="light"] .jt-deep-chip.is-partial {
    border-color: rgba(202, 138, 4, 0.35);
    background: rgba(250, 204, 21, 0.16);
}

html[data-theme="light"] .jt-deep-chip.is-gaps {
    border-color: rgba(225, 29, 72, 0.3);
    background: rgba(255, 77, 109, 0.1);
}

html[data-theme="light"] .jt-fast-signal-legend {
    border-top-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .jt-deep-count.is-matched { color: #2dd4bf; }
html[data-theme="dark"] .jt-deep-count.is-partial { color: #facc15; }
html[data-theme="dark"] .jt-deep-donut-label span.is-excellent { color: #5eead4; }
html[data-theme="dark"] .jt-deep-donut-label span.is-good { color: #93c5fd; }
html[data-theme="dark"] .jt-deep-donut-label span.is-fair { color: #fcd34d; }
html[data-theme="dark"] .jt-deep-donut-label span.is-stretch { color: #cbd5e1; }
html[data-theme="dark"] .jt-fast-signal-badge.is-low { color: #fda4af; }
html[data-theme="dark"] .jt-fast-signal-badge.is-limited { color: #fdba74; }
html[data-theme="dark"] .jt-fast-signal-badge.is-early { color: #fde68a; }
html[data-theme="dark"] .jt-fast-signal-badge.is-partial { color: #fef08a; }
html[data-theme="dark"] .jt-fast-signal-badge.is-some { color: #bbf7d0; }
html[data-theme="dark"] .jt-fast-signal-badge.is-building { color: #99f6e4; }
html[data-theme="dark"] .jt-fast-signal-badge.is-solid { color: #bfdbfe; }
html[data-theme="dark"] .jt-fast-signal-badge.is-very-strong { color: #e9d5ff; }
html[data-theme="dark"] .jt-mi-section-icon.is-fast { color: #4ade80; }
html[data-theme="dark"] .jt-mi-section-icon.is-deep { color: #c084fc; }
html[data-theme="dark"] .jt-deep-category-icon { color: #c084fc; }

@media (max-width: 900px) {
    .jt-fast-signal,
    .jt-deep-match-summary,
    .jt-deep-category-grid {
        grid-template-columns: 1fr;
    }

    .jt-deep-category-body {
        grid-template-columns: 1fr !important;
    }

    .jt-deep-counts {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px 18px;
    }
}

@media (max-width: 640px) {
    .mud-dialog.jt-match-insights-dialog,
    .jt-match-insights-dialog.mud-dialog {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        margin: 8px !important;
    }

    .mud-dialog.jt-match-insights-dialog .mud-dialog-content,
    .jt-match-insights-dialog .mud-dialog-content {
        padding: 0.5rem 0.85rem 1rem !important;
    }

    .jt-deep-donut {
        width: min(100%, 200px);
    }
}
