:root {
    --primary: #24508f;
    --primary-dark: #1d4075;
    --primary-soft: #edf3fb;
    --success: #15803d;
    --warning: #b45309;
    --danger: #dc2626;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-hover: #f9fbff;
    --border: #e5ebf3;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --tag-blue-bg: #edf3fb;
    --tag-blue-text: #24508f;
    --tag-gray-bg: #f1f5f9;
    --tag-gray-text: #475569;
    --tag-green-bg: #ecfdf5;
    --tag-green-text: #166534;
    --tag-yellow-bg: #fff7ed;
    --tag-yellow-text: #9a3412;
    --tag-red-bg: #fef2f2;
    --tag-red-text: #991b1b;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 22px rgba(42, 65, 105, 0.04);
    --shadow-hover: 0 16px 36px rgba(42, 65, 105, 0.09);
    --radius: 10px;
    --radius-sm: 6px;
    --sidebar-width: 248px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(36, 80, 143, 0.06), transparent 28%),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 46%, #eef3f8 100%);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--sidebar-width);
    padding: 0 12px 16px;
    border-right: 1px solid #1e293b;
    background: #020617;
    color: #e2e8f0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 72px;
    padding: 0 8px;
    border-bottom: 1px solid #1e293b;
    width: 100%;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
}

.brand-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
}

.brand-subtitle {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

.side-nav {
    display: grid;
    gap: 6px;
    padding: 16px 0;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    text-align: left;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-nav-item i {
    flex: 0 0 18px;
    width: 18px;
    text-align: center;
    font-size: 17px;
}

.side-nav-item strong {
    margin-left: auto;
    color: inherit;
    font-size: 11px;
    font-weight: 700;
}

.side-nav-item:hover,
.side-nav-item.active {
    background: var(--primary);
    color: #ffffff;
}

.side-nav-switch {
    margin-top: 6px;
    border-top: 1px solid #26354b;
    border-radius: 0 0 8px 8px;
    color: #cbd5e1;
}

.side-nav-switch:hover {
    background: #1e3a5f;
}

.history-mode-note {
    margin: 4px 0 0;
    color: var(--text3);
    font-size: 11px;
    font-weight: 650;
}

.side-nav-item:active,
.btn:active,
.preset-chip:active,
.link-button:active {
    transform: scale(0.98);
}

.side-panel {
    margin-top: auto;
    padding: 14px;
    border-radius: var(--radius);
    background: #0f172a;
}

.side-panel-title {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.system-actions-card {
    margin: 10px 0 0;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid #1e293b;
    background: rgba(15, 23, 42, 0.85);
}

.system-actions-title {
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.system-user-line {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.system-user-line i {
    color: #94a3b8;
}

.sidebar-api-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0;
    padding: 8px 9px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.72);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-api-status strong {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    font-size: 11px;
}

.sidebar-api-status.ok strong {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 650;
}

.pipeline-step + .pipeline-step {
    margin-top: 10px;
}

.pipeline-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #1e293b;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.pipeline-step.done span {
    background: var(--primary);
    color: #ffffff;
}

.main-area {
    min-width: 0;
    padding-left: var(--sidebar-width);
}

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(135deg, #071a35 0%, #123462 52%, #eef4fb 52%, #f6f8fb 100%);
    background-size: 32px 32px, 32px 32px, auto;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-shell {
    width: min(1040px, 94vw);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: stretch;
    gap: 24px;
}

.login-hero {
    min-height: 520px;
    padding: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    color: #ffffff;
    background: rgba(7, 26, 53, 0.45);
    box-shadow: 0 24px 70px rgba(7, 26, 53, 0.26);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 800;
}

.login-hero h1 {
    max-width: 520px;
    margin: 32px 0 14px;
    font-size: 48px;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: 0;
}

.login-hero-slogan {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.8;
    font-weight: 650;
}

.login-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 42px;
}

.login-proof-grid div {
    min-height: 92px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.login-proof-grid strong,
.login-proof-grid span {
    display: block;
}

.login-proof-grid strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.login-proof-grid span {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(10, 28, 62, 0.18);
    align-self: center;
}

.login-brand-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #1b3f77);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
}

.login-brand {
    font-size: 26px;
    margin: 0;
    color: #0f172a;
    font-weight: 900;
}

.login-kicker {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.login-slogan {
    font-size: 13px;
    color: #475569;
    margin: 6px 0 16px;
    line-height: 1.7;
    font-weight: 650;
}

.login-form .form-label {
    margin-top: 8px;
    margin-bottom: 4px;
}

.login-form .form-control {
    min-height: 44px;
    border-radius: 10px;
}

.login-form .btn {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 850;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 14px 32px;
    border-bottom: 1px solid rgba(213, 222, 234, 0.8);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(150%);
}

.topbar h1 {
    margin: 0;
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.18;
    letter-spacing: 0;
}

.topbar p {
    margin: 4px 0 0;
    color: var(--text2);
    font-size: 13px;
    font-weight: 560;
}

.eyebrow,
.banner-label,
.selector-kicker,
.preset-title,
.selected-editor-label {
    color: var(--text3);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0;
}

.topbar .eyebrow {
    display: none;
}

.topbar-actions,
.search-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn-sm {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary,
.btn-success {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-bg: #cbd5e1;
    --bs-btn-disabled-border-color: #cbd5e1;
    --bs-btn-disabled-color: #ffffff;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-secondary {
    --bs-btn-bg: var(--surface);
    --bs-btn-color: var(--text2);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-bg: var(--primary-soft);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-hover-color: var(--primary);
    --bs-btn-active-bg: var(--primary-soft);
    --bs-btn-active-border-color: var(--primary);
    --bs-btn-active-color: var(--primary);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.preset-chip:focus-visible,
.side-nav-item:focus-visible,
.link-button:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(36, 80, 143, 0.1);
    outline: 0;
}

.workbench-banner {
    display: none;
}

.summary-grid,
.workspace-grid,
.results-surface,
.empty-panel,
.overseas-board,
.detail-page {
    width: min(1320px, calc(100% - 64px));
    margin-right: auto;
    margin-left: auto;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 24px 0;
    scroll-margin-top: 86px;
}

.metric-card,
.selector-card,
.history-surface,
.results-surface,
.empty-panel,
.overseas-step,
.detail-card,
.detail-header-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-card);
}

.metric-card {
    display: grid;
    gap: 6px;
    min-height: 132px;
    padding: 18px 20px;
}

.metric-card i {
    color: var(--primary);
    font-size: 19px;
}

.metric-card span {
    color: var(--text2);
    font-size: 12px;
    font-weight: 700;
}

.metric-card strong {
    color: var(--text);
    font-size: 34px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-card .metric-status-value {
    align-self: end;
    font-size: 24px;
    line-height: 1.15;
}

.metric-card small {
    color: var(--text3);
    font-size: 12px;
}

.metric-card.accent {
    background: var(--surface);
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 360px);
    gap: 14px;
    align-items: start;
}

.surface-header,
.results-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.surface-header {
    margin-bottom: 14px;
}

.surface-header.compact {
    margin-bottom: 0;
}

.surface-header h2,
.results-toolbar h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 850;
    line-height: 1.22;
}

.surface-header p,
.results-toolbar p {
    max-width: 620px;
    margin: 5px 0 0;
    color: var(--text2);
    font-size: 13px;
    font-weight: 560;
}

.max-results-control {
    display: grid;
    gap: 4px;
    min-width: 210px;
}

.max-results-row {
    display: flex;
    gap: 8px;
}

.max-results-row .form-select,
.max-results-row .form-control {
    min-width: 96px;
}

.workflow-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.map-workflow-card {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.map-workflow-card .detail-card-head {
    margin-bottom: 10px;
}

.map-workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.map-workflow-steps li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.map-workflow-steps li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.map-workflow-steps strong,
.map-workflow-steps small {
    display: block;
}

.map-workflow-steps strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.map-workflow-steps small {
    margin-top: 2px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.4;
}

.results-surface {
    scroll-margin-top: 86px;
}

.workflow-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.workflow-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 850;
}

.workflow-item strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.workflow-item small {
    display: block;
    margin-top: 2px;
    color: var(--text3);
    font-size: 12px;
    font-weight: 560;
}

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

.selector-card {
    padding: 18px;
}

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

.selector-card h3 {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.3;
}

.selector-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

.field-counter {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
}

.link-button {
    min-height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 750;
}

.preset-panel {
    display: grid;
    gap: 12px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
}

.peer-equipment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.peer-equipment-grid .preset-chip {
    min-height: 38px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
}

.direct-solution-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f3f6fa;
}

.direct-solution-tab {
    display: grid;
    min-width: 0;
    min-height: 48px;
    padding: 7px 8px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text2);
    line-height: 1.2;
}

.direct-solution-tab span {
    font-size: 12px;
    font-weight: 850;
}

.direct-solution-tab small {
    margin-top: 3px;
    color: var(--text3);
    font-size: 10px;
    font-weight: 650;
}

.direct-solution-tab:hover {
    color: var(--primary);
}

.direct-solution-tab.active {
    border-color: #c9d8eb;
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 7px rgba(28, 53, 87, .08);
}

.direct-solution-tab.active small {
    color: #5d7493;
}

.direct-solution-panels {
    min-height: 146px;
}

.direct-solution-panel {
    display: none;
    padding-top: 12px;
}

.direct-solution-panel.active {
    display: block;
}

.direct-solution-intro {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 9px;
}

.direct-solution-intro strong {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.direct-solution-intro span {
    color: var(--text3);
    font-size: 10px;
    line-height: 1.45;
}

.direct-industry-intro {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text2);
}

.direct-industry-intro strong {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.direct-industry-intro span {
    font-size: 11px;
    line-height: 1.5;
}

.direct-industry-primary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.direct-industry-primary {
    display: flex;
    min-width: 0;
    min-height: 44px;
    padding: 7px 9px;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text2);
    text-align: left;
}

.direct-industry-primary span {
    min-width: 0;
    font-size: 11px;
    font-weight: 800;
}

.direct-industry-primary small {
    flex: 0 0 auto;
    color: var(--text3);
    font-size: 9px;
    font-weight: 650;
}

.direct-industry-primary:hover,
.direct-industry-primary.active {
    border-color: #8eacd2;
    background: #eef5ff;
    color: var(--primary);
}

.direct-industry-primary.selected::after {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--primary);
    content: "";
}

.direct-industry-primary.selected small {
    display: none;
}

.direct-subcategory-shell {
    min-height: 116px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #d9e4f1;
    border-radius: 7px;
    background: #f8fafd;
}

.direct-subcategory-panel {
    display: none;
}

.direct-subcategory-panel.active {
    display: block;
}

.direct-subcategory-head {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.direct-subcategory-head > div {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.direct-subcategory-head strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.direct-subcategory-head span,
.direct-subcategory-head small {
    color: var(--text3);
    font-size: 10px;
    font-weight: 650;
}

.direct-subcategory-head b {
    color: var(--primary);
}

.direct-subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.direct-subcategory-chip {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #d6e0ec;
    border-radius: 6px;
    background: var(--surface);
    color: var(--text2);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
}

.direct-subcategory-chip:hover {
    border-color: #9bb5d5;
    color: var(--primary);
}

.direct-subcategory-chip.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

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

.direct-industry-grid .preset-chip {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.3;
    white-space: normal;
}

.preset-section {
    display: grid;
    gap: 7px;
}

.preset-title {
    position: sticky;
    top: 0;
    z-index: 1;
    width: fit-content;
    padding-right: 8px;
    background: var(--surface);
}

.preset-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text2);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.preset-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.preset-chip.active,
.region-province-chip.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.region-province-chip.expanded {
    border-color: var(--primary);
    background: #f8fbff;
    color: var(--primary);
    box-shadow: inset 0 -2px 0 var(--primary);
}

.province-city-section {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.province-city-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.province-city-heading .preset-title {
    margin: 0;
}

.city-group {
    padding: 10px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.industry-intelligence {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d8e4f4;
    border-radius: 8px;
    background: #f8fbff;
}

.industry-intelligence-head,
.industry-intelligence-input,
.industry-preview-row,
.industry-preview-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.industry-intelligence-head {
    justify-content: space-between;
}

.industry-intelligence-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.industry-intelligence-head strong,
.industry-intelligence-head small {
    display: block;
}

.industry-intelligence-head strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.industry-intelligence-head small {
    margin-top: 2px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 600;
}

.ai-source-badge {
    flex: 0 0 auto;
    padding: 4px 7px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--text3);
    font-size: 10px;
    font-weight: 800;
}

.ai-source-badge.active {
    border-color: #b8cdeb;
    background: var(--primary-soft);
    color: var(--primary);
}

.industry-intelligence-input {
    align-items: stretch;
}

.industry-intelligence-input textarea.form-control {
    min-height: 46px;
    max-height: 96px;
    resize: vertical;
}

.industry-intelligence-input .btn {
    flex: 0 0 78px;
}

.industry-conversation {
    display: grid;
    gap: 8px;
    max-height: 228px;
    min-height: 70px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e1e8f2;
    border-radius: 7px;
    background: var(--surface);
    scrollbar-width: thin;
}

.industry-message {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.industry-message.user {
    flex-direction: row-reverse;
}

.industry-message-avatar {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 5px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
}

.industry-message.user .industry-message-avatar {
    background: #eef1f5;
    color: var(--text2);
}

.industry-message-bubble {
    max-width: min(84%, 520px);
    padding: 7px 9px;
    border: 1px solid #e1e7ef;
    border-radius: 3px 7px 7px 7px;
    background: #f7f9fc;
    color: var(--text2);
    font-size: 11px;
    font-weight: 620;
    line-height: 1.5;
    white-space: pre-wrap;
}

.industry-message.user .industry-message-bubble {
    border-color: #bed1eb;
    border-radius: 7px 3px 7px 7px;
    background: var(--primary-soft);
    color: #183d70;
}

.industry-message.pending .industry-message-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
}

.industry-message.pending .industry-message-bubble span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8ba4c7;
    animation: industryTyping 1s infinite ease-in-out;
}

.industry-message.pending .industry-message-bubble span:nth-child(2) { animation-delay: .14s; }
.industry-message.pending .industry-message-bubble span:nth-child(3) { animation-delay: .28s; }

@keyframes industryTyping {
    0%, 70%, 100% { opacity: .35; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-2px); }
}

.industry-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.industry-quick-reply {
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #c8d7ea;
    border-radius: 5px;
    background: var(--surface);
    color: var(--primary);
    font-size: 10px;
    font-weight: 750;
}

.industry-quick-reply:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.industry-chat-composer {
    padding-top: 2px;
}

.industry-chat-composer .btn.is-loading {
    opacity: .82;
}

.industry-preview {
    display: grid;
    gap: 8px;
    padding: 11px;
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    background: var(--surface);
}

.industry-preview-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    border: 1px solid #ead8a7;
    border-radius: 6px;
    background: #fffaf0;
}

.industry-proposal-heading,
.industry-proposal-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.industry-proposal-heading > div {
    display: grid;
    gap: 2px;
}

.industry-proposal-heading strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.industry-proposal-heading small {
    color: var(--text3);
    font-size: 10px;
    font-weight: 600;
}

.industry-proposal-list {
    display: grid;
    gap: 7px;
    max-height: 330px;
    overflow-y: auto;
}

.industry-proposal-card {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    background: #fbfcfe;
}

.industry-proposal-card-head > strong {
    flex: 0 0 auto;
    color: var(--text3);
    font-size: 10px;
    font-weight: 800;
}

.industry-proposal-card-head > span {
    overflow: hidden;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.industry-proposal-card p {
    margin: 0;
    color: var(--text2);
    font-size: 10px;
    line-height: 1.45;
}

.industry-preview-title {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.industry-preview p {
    margin: 0;
    color: var(--text2);
    font-size: 11px;
}

.industry-preview-row {
    align-items: flex-start;
}

.industry-preview-row > strong {
    flex: 0 0 70px;
    color: var(--text3);
    font-size: 11px;
}

.industry-preview-row > div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.industry-preview-row span,
.industry-preview-row code {
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: inherit;
    font-size: 10px;
    font-weight: 750;
}

.industry-preview-row span.exclude {
    background: #f4f5f7;
    color: #5d6675;
}

.industry-preview-actions {
    justify-content: flex-end;
}

.industry-preview-empty {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text2);
    font-size: 11px;
}

.selected-editor {
    margin-top: 14px;
}

.selected-editor-label {
    display: block;
    margin-bottom: 6px;
}

.selected-industry-display {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 7px;
    min-height: 54px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
}

.selected-industry-solution-group {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    width: 100%;
    gap: 8px;
    align-items: start;
}

.selected-industry-solution-group + .selected-industry-solution-group {
    padding-top: 7px;
    border-top: 1px solid #e7ecf2;
}

.selected-industry-solution-label {
    padding-top: 6px;
    color: var(--text2);
    font-size: 10px;
    font-weight: 850;
}

.selected-industry-solution-chips {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.selected-industry-empty {
    align-self: center;
    color: var(--text3);
    font-size: 11px;
    font-weight: 600;
}

.selected-industry-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 5px 4px 9px;
    border: 1px solid #bed1eb;
    border-radius: 5px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 780;
}

.selected-industry-chip small {
    max-width: 170px;
    overflow: hidden;
    color: #567399;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-industry-chip button {
    display: grid;
    width: 20px;
    height: 20px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: inherit;
}

.selected-industry-chip button:hover {
    background: rgba(36, 80, 143, .12);
}

.form-control,
.form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
}

textarea.form-control {
    min-height: 112px;
    padding: 10px 12px;
    resize: vertical;
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
}

.progress-strip {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.progress {
    overflow: hidden;
    border-radius: 999px;
    background-color: var(--border);
}

.progress-bar {
    background-color: var(--primary);
}

.progress-bar-striped {
    background-image: none;
}

.spinner-border {
    color: var(--primary) !important;
}

.history-surface {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.history-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 14px;
    max-height: 560px;
    overflow-x: hidden;
    overflow-y: auto;
}

.history-list .history-item {
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    overflow: hidden;
}

.history-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.history-item-id {
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.history-item-head .badge {
    margin-left: auto;
    flex: 0 0 auto;
}

.history-item-details {
    display: grid;
    gap: 7px;
    margin: 0;
}

.history-item-details > div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
}

.history-item-details dt,
.history-item-details dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.history-item-details dt {
    color: var(--text3);
    font-weight: 750;
}

.history-item-details dd {
    min-width: 0;
    color: var(--text2);
    font-weight: 650;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.history-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
    color: var(--text3);
    font-size: 11px;
}

.history-item-stats strong {
    color: var(--text);
    font-weight: 850;
}

.history-item-time {
    display: block;
    margin-top: 7px;
    color: var(--text3);
    font-size: 11px;
}

.list-group-item {
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: var(--surface-soft) !important;
    color: var(--text) !important;
}

.list-group-item:hover {
    border-color: var(--primary) !important;
    background: var(--surface-hover) !important;
}

.badge {
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--tag-gray-bg) !important;
    color: var(--tag-gray-text) !important;
    font-size: 11px;
    font-weight: 750;
}

.results-surface {
    margin-top: 18px !important;
    padding: 18px;
}

.results-toolbar {
    align-items: center;
    margin-bottom: 14px;
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.filters-bar .form-control,
.filters-bar .form-select {
    width: auto;
    min-width: 132px;
}

.lead-search-input {
    min-width: 210px !important;
}

.table-responsive {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.lead-table {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    --bs-table-hover-bg: var(--surface-hover);
}

.lead-table thead th {
    padding: 11px 14px;
    border-bottom: 2px solid var(--border);
    background: var(--surface);
    color: var(--text3);
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.lead-table tbody td {
    height: 50px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    vertical-align: middle;
}

.lead-table tbody tr:hover td {
    background: var(--surface-hover);
}

.lead-table tbody tr {
    cursor: pointer;
}

.lead-table tbody tr.selected-row td {
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.map-relevance-cell {
    min-width: 190px;
    max-width: 230px;
}

.map-relevance-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.map-relevance-badge b {
    padding-left: 7px;
    border-left: 1px solid currentColor;
    font-size: 11px;
}

.map-relevance-badge.high {
    color: #135f3d;
    background: #eaf7ef;
    border-color: #b9dfc8;
}

.map-relevance-badge.medium {
    color: #24508f;
    background: #edf4ff;
    border-color: #c9daf3;
}

.map-relevance-badge.pending {
    color: #75530a;
    background: #fff8e6;
    border-color: #ecd99f;
}

.map-relevance-badge.unrated {
    color: #667085;
    background: #f2f4f7;
    border-color: #dfe3e8;
}

.map-relevance-reason {
    margin-top: 5px;
    overflow: hidden;
    color: #667085;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fw-semibold {
    color: var(--text);
    font-weight: 800 !important;
}

.small,
small {
    font-size: 12px;
    line-height: 1.35;
}

.text-muted {
    color: var(--text3) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.source-tag,
.level-badge,
.qcc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--tag-blue-bg);
    color: var(--tag-blue-text);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.source-tag.muted,
.level-pending,
.qcc-pending {
    background: var(--tag-gray-bg);
    color: var(--tag-gray-text);
}

.level-high,
.qcc-ok {
    background: var(--tag-green-bg);
    color: var(--tag-green-text);
}

.level-medium,
.qcc-running,
.qcc-review {
    background: var(--tag-yellow-bg);
    color: var(--tag-yellow-text);
}

.level-low,
.qcc-failed,
.qcc-manual {
    background: var(--tag-red-bg);
    color: var(--tag-red-text);
}

.lead-toolbar-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.lead-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.selected-lead-hint {
    max-width: 160px;
    color: var(--text3);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-detail-action {
    min-height: 32px;
    padding: 6px 12px;
    font-weight: 800;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
}

.table-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

#pagination {
    gap: 5px;
}

#pagination .btn {
    min-width: 34px;
    min-height: 30px;
    padding: 6px 10px;
}

.page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-jump .form-control {
    width: 78px;
    min-height: 30px;
    padding: 5px 8px;
    text-align: center;
}

.empty-panel {
    margin-top: 18px;
    padding: 44px 18px !important;
}

.empty-panel i {
    color: var(--primary);
}

.overseas-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1320px, calc(100% - 64px));
    margin: 24px auto 0;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.overseas-hero h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 850;
}

.overseas-hero p {
    max-width: 680px;
    margin: 6px 0 0;
    color: var(--text2);
    font-size: 13px;
    font-weight: 560;
}

.overseas-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px !important;
    padding-bottom: 32px;
}

.overseas-step {
    display: grid;
    gap: 10px;
    min-height: 170px;
    padding: 18px;
}

.overseas-step i {
    color: var(--primary);
    font-size: 20px;
}

.overseas-step strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.overseas-step span {
    color: var(--text2);
    font-size: 12px;
    font-weight: 560;
}

.detail-page {
    padding: 24px 0 32px;
}

.detail-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
}

.detail-header-card h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 850;
    line-height: 1.2;
}

.detail-header-card p {
    margin: 6px 0 0;
    color: var(--text2);
    font-size: 13px;
    font-weight: 560;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.detail-card {
    padding: 18px;
}

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

.detail-card-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.detail-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}

.detail-list div {
    min-width: 0;
    max-width: 100%;
}

.detail-list .wide {
    grid-column: 1 / -1;
}

.detail-list dt {
    margin-bottom: 3px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 850;
}

.detail-list dd {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-list-grid dd {
    max-height: 96px;
    overflow: auto;
    padding-right: 2px;
}

.detail-list-grid .wide dd {
    max-height: 150px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.score-panel {
    display: grid;
    gap: 12px;
}

.score-panel p {
    margin: 0;
    color: var(--text2);
    font-size: 13px;
}

.score-reasons {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: var(--text2);
    font-size: 13px;
}

.score-reasons span {
    color: var(--primary);
    font-weight: 800;
}

.enhancement-page {
    width: min(1320px, calc(100% - 64px));
    margin: 24px auto 32px;
}

.enhancement-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr)) minmax(260px, 1.6fr);
    gap: 12px;
    margin-bottom: 14px;
    scroll-margin-top: 94px;
}

.summary-card {
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.summary-card span,
.summary-card small {
    display: block;
    color: var(--text3);
    font-size: 12px;
    font-weight: 800;
}

.summary-card strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.1;
}

.summary-card.wide strong {
    font-size: 16px;
}

.summary-card small {
    margin-top: 5px;
    color: var(--text2);
    font-weight: 650;
}

.workflow-guide-card {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.workflow-guide-steps {
    margin: 8px 0 0 20px;
    padding: 0;
    color: var(--text2);
    font-size: 12px;
    line-height: 1.65;
}

.workflow-guide-steps li {
    margin-bottom: 4px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
}

.workflow-guide-steps li:last-child {
    margin-bottom: 0;
}

.workflow-guide-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.enhancement-workbench {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.enhancement-list-panel,
.enhancement-detail-panel,
.rule-panel {
    min-width: 0;
}

.enhancement-list-panel,
.rule-panel {
    position: sticky;
    top: 92px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.enhancement-list-panel {
    scroll-margin-top: 94px;
}

.rule-panel-wide {
    position: static;
    top: auto;
    margin-bottom: 14px;
}

.current-rule-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 24px;
    align-items: end;
    margin: 18px -16px -16px;
    padding: 22px 20px 20px;
    border-top: 1px solid #d9e3ef;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #f5f8fc;
}

.current-rule-summary h3 {
    margin: 0;
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
}

.rule-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.rule-summary-ready {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #247256;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.rule-summary-matrix {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    margin-top: 2px;
    border-top: 1px solid #d9e3ef;
}

.rule-summary-item {
    min-width: 0;
    padding: 17px 0 16px;
}

.rule-summary-item:nth-child(odd) {
    padding-right: 24px;
    border-right: 1px solid #d9e3ef;
}

.rule-summary-item:nth-child(even) {
    padding-left: 24px;
}

.rule-summary-matrix.is-peer .rule-summary-item:nth-child(-n + 2),
.rule-summary-matrix.is-direct .rule-summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid #d9e3ef;
}

.rule-summary-matrix.is-direct .precondition-summary-item {
    grid-column: 1 / -1;
    padding-left: 0;
    border-right: 0;
}

.rule-summary-item h4 {
    margin: 0 0 11px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
}

.rule-summary-item > strong {
    display: block;
    color: var(--text);
    font-weight: 900;
    line-height: 1.35;
}

.rule-summary-theme-value {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rule-summary-threshold-item > strong {
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.peer-gate-summary-item > strong {
    font-size: 15px;
}

.peer-gate-summary-item p {
    margin: 4px 0 0;
    max-width: 56ch;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.rule-summary-condition-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.rule-summary-condition-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #ccd8e6;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.risk-inline-explain {
    margin-top: 7px;
}

.risk-inline-explain summary {
    width: fit-content;
    cursor: pointer;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.risk-inline-explain span {
    display: block;
    margin-top: 5px;
    max-width: 780px;
    color: var(--text3);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.risk-form-explain {
    margin: 0;
    padding: 2px 0 8px 4px;
}

.risk-form-explain summary {
    font-size: 13px;
}

.risk-form-explain span {
    margin-top: 7px;
    padding-left: 14px;
    border-left: 2px solid #c8d8eb;
    line-height: 1.65;
}

.rule-summary-actions {
    display: grid;
    align-content: end;
    gap: 8px;
}

.rule-summary-actions > span {
    color: var(--text3);
    font-size: 11px;
    font-weight: 750;
    text-align: center;
}

.rule-summary-actions .btn {
    min-height: 42px;
    font-size: 13px;
    font-weight: 850;
}

.rule-summary-risk {
    margin-top: 9px;
}

@media (max-width: 760px) {
    .rule-summary-matrix {
        grid-template-columns: 1fr;
    }

    .rule-summary-item,
    .rule-summary-item:nth-child(odd),
    .rule-summary-item:nth-child(even),
    .rule-summary-matrix.is-direct .precondition-summary-item {
        grid-column: auto;
        padding: 15px 0;
        border-right: 0;
        border-bottom: 1px solid #d9e3ef;
    }

    .rule-summary-item:last-child {
        border-bottom: 0;
    }
}

.nullable-number-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.na-select {
    width: 76px;
    color: var(--text2);
    font-size: 11px;
    font-weight: 850;
}

.nullable-number-field input:disabled {
    background: #eef3f8;
    color: var(--text3);
}

.intersection-help {
    margin-top: 7px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.template-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.template-section-head .btn.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.template-check-wrap {
    display: inline-flex;
    align-items: center;
    margin: 0 8px 0 0;
}

.template-select-check {
    width: 15px;
    height: 15px;
    margin: 0;
}

.rule-high-threshold {
    display: grid;
    gap: 6px;
}

.rule-config-details {
    margin-top: 0;
}

.rule-config-header {
    align-items: flex-start;
    margin-bottom: 4px;
}

.rule-config-header h3 {
    font-size: 19px;
    line-height: 1.3;
}

.rule-config-header p {
    margin: 4px 0 0;
    color: var(--text3);
    font-size: 12px;
    font-weight: 650;
}

.rule-threshold-priority {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0 16px;
    border-bottom: 1px solid #dce4ee;
}

.rule-control-heading,
.rule-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rule-section-heading {
    margin-top: 9px;
    padding-top: 8px;
}

.rule-control-order {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    min-width: 27px;
    height: 24px;
    padding: 0 6px;
    border-radius: 5px;
    background: #e8f0fa;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

.rule-control-heading h4,
.rule-section-heading h4 {
    margin: 0;
    color: #1f2d40;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
}

.rule-control-heading p,
.rule-section-heading p {
    margin: 4px 0 0;
    color: #6d7b8f;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.peer-fixed-gate {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 12px 0 4px;
    padding: 11px 12px;
    border-left: 3px solid #24508f;
    background: #f3f7fc;
}

.peer-fixed-gate-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 6px;
    background: #dfeaf7;
    color: #24508f;
}

.peer-fixed-gate strong {
    color: #1f2d40;
    font-size: 13px;
    font-weight: 900;
}

.peer-fixed-gate p {
    margin: 2px 0 0;
    color: #64748a;
    font-size: 11px;
    line-height: 1.45;
}

.peer-fixed-gate-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #24508f;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.threshold-primary-control {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.threshold-primary-control input {
    width: 76px;
    height: 42px;
    border-color: #9cb7d8;
    color: #173f76;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.company-sort-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 10px 0 12px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.company-export-menu {
    position: relative;
    margin: 10px 0 8px;
}
.company-directory-search {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 36px;
    margin: 9px 0 8px;
    padding: 0 8px 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text3);
}

.company-directory-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(36, 80, 143, 0.1);
}

.company-directory-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0 7px;
    background: transparent;
    color: var(--text1);
    font-size: 11px;
}

.company-directory-search input::-webkit-search-cancel-button {
    display: none;
}

.company-directory-search-clear {
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text3);
}

.company-directory-search-clear:hover {
    background: var(--surface-soft);
    color: var(--text1);
}


.company-status-filter {
    display: grid;
    gap: 5px;
    margin: 9px 0 8px;
}

.company-status-filter label {
    color: var(--text3);
    font-size: 10px;
    font-weight: 850;
}

.company-status-filter select {
    min-height: 32px;
    color: var(--text2);
    font-size: 11px;
    font-weight: 750;
}

.export-popover {
    position: absolute;
    z-index: 10;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(16, 31, 54, 0.16);
}

.export-popover .btn {
    justify-content: center;
    font-size: 12px;
    font-weight: 850;
}

.export-popover small {
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.rank-export-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 6px;
}

.rank-export-row input {
    font-size: 12px;
    font-weight: 800;
}

.company-sort-tab {
    min-width: 0;
    padding: 6px 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text2);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.company-sort-tab.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(36, 80, 143, 0.16);
}

.company-list {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 190px);
    overflow: auto;
    padding-right: 4px;
}

.company-list-item {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    text-align: left;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.company-list-item:hover,
.company-list-item.active {
    border-color: rgba(36, 80, 143, 0.32);
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.company-list-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.company-list-main .company-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(36, 80, 143, 0.1);
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.company-list-main .company-rank.muted {
    min-width: 46px;
    background: #eef3f8;
    color: var(--text3);
    font-size: 10px;
}

.company-list-item strong,
.company-list-item span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-list-item strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.company-list-item > span {
    margin-top: 3px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
}

.company-list-main .company-rank {
    display: inline-flex;
    overflow: visible;
    text-overflow: clip;
}

.company-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.company-list-tags .qcc-badge,
.company-list-tags .level-badge {
    display: inline-flex;
}

.rank-hint {
    margin-top: 3px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
}

.compact-detail-header {
    padding: 18px;
}

.compact-detail-header h2 {
    font-size: 20px;
}

.enhancement-detail-grid {
    grid-template-columns: 1fr 1fr;
}

.detail-card-wide {
    grid-column: 1 / -1;
}

.session-ai-summary {
    margin: 0;
    color: var(--text2);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.6;
}

.rule-form {
    display: grid;
    gap: 9px;
}

.rule-form label {
    margin-bottom: -3px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 850;
}

.field-help {
    display: block;
    margin-top: 4px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.api-config-modal .modal-header {
    align-items: flex-start;
}

.api-config-subtitle {
    display: block;
    margin-top: 3px;
    color: var(--text3);
    font-size: 12px;
    font-weight: 700;
}

.api-status-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.api-status-label {
    display: block;
    color: var(--text3);
    font-size: 11px;
    font-weight: 850;
}

.api-status-panel strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
}

.api-status-panel p {
    margin: 4px 0 0;
    color: var(--text2);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.api-status-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--text3);
    font-size: 12px;
    font-weight: 850;
}

.api-status-pill.ok {
    background: #dcfce7;
    color: #15803d;
}

.api-provider-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.api-provider-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text2);
    font-size: 13px;
    font-weight: 800;
}

.api-provider-tab strong {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--text3);
    font-size: 11px;
}

.api-provider-tab.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(36, 80, 143, 0.11);
    color: var(--primary);
}

.api-provider-tab.active strong {
    background: rgba(36, 80, 143, 0.1);
    color: var(--primary);
}

.api-provider-panel {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.map-source-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    color: #24508f;
    font-size: 12px;
    font-weight: 750;
}

.map-source-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 9px 11px;
    border: 1px solid #f2c66d;
    border-radius: 7px;
    background: #fff8e8;
    color: #8a5700;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.api-guide-card {
    margin-top: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(36, 80, 143, 0.16);
    border-radius: 10px;
    background: #f7fbff;
}

.api-guide-card strong {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.api-guide-card strong i {
    color: var(--primary);
}

.api-guide-card ol {
    margin: 10px 0 0 18px;
    padding: 0;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.7;
}

.api-guide-card a {
    display: inline-flex;
    margin-top: 9px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.api-guide-card a:hover {
    text-decoration: underline;
}

.api-key-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text3);
    font-size: 12px;
    font-weight: 750;
}

.api-effect-card,
.api-auth-hint {
    margin-top: 14px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.api-effect-card {
    display: flex;
    gap: 10px;
}

.api-auth-hint {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.api-auth-hint i {
    color: var(--primary);
    font-size: 16px;
}

.api-auth-modal .modal-header {
    align-items: flex-start;
}

.api-auth-modal .modal-title {
    font-size: 16px;
    font-weight: 900;
}

.api-auth-modal small {
    display: block;
    margin-top: 4px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.api-effect-card i {
    color: var(--primary);
    font-size: 18px;
}

.api-effect-card strong,
.api-auth-head strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.api-effect-card span,
.api-auth-head span {
    display: block;
    margin-top: 3px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.api-auth-head {
    margin-bottom: 10px;
}

.rule-form textarea {
    resize: vertical;
}

.rule-template-card,
.rule-preview-block,
.risk-explain-card {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.rule-template-card strong,
.risk-explain-card strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.rule-template-card p,
.rule-preview-block p,
.rule-assist-note,
.risk-explain-card p {
    margin: 5px 0 0;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.rule-preview-block {
    margin-top: 8px;
}

.rule-preview-block span,
.rule-section-title {
    color: var(--text3);
    font-size: 11px;
    font-weight: 850;
}

.rule-section-title {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

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

.template-choice-card {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    cursor: pointer;
    text-align: left;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.template-choice-card:hover,
.template-choice-card.active {
    border-color: rgba(36, 80, 143, 0.34);
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.template-choice-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-choice-head strong {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-choice-head span {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
}

.template-choice-card p,
.template-choice-card small {
    display: block;
    margin: 5px 0 0;
    color: var(--text2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.template-choice-card small {
    color: var(--text3);
    font-size: 11px;
}

.custom-template-card {
    grid-column: 1 / -1;
}

.template-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.custom-rule-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.template-detail-toggle {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
}

.template-detail-toggle:hover {
    text-decoration: underline;
}

.template-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border: 1px solid rgba(204, 68, 75, 0.22);
    border-radius: 7px;
    background: #fff;
    color: #b4232c;
    font-size: 11px;
    font-weight: 850;
}

.template-delete-btn:hover {
    border-color: rgba(204, 68, 75, 0.36);
    background: #fff5f5;
}

.template-detail-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(36, 80, 143, 0.16);
    cursor: default;
}

.template-factor-list {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.template-factor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 6px 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.template-factor-row span {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.template-factor-row strong {
    justify-self: end;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.template-factor-row small {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text3);
    font-size: 11px;
    font-weight: 650;
}

.rule-switch-row {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.rule-switch-row .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 24px;
}

.rule-switch-row .form-check-input {
    margin: 0;
}

.factor-list {
    display: grid;
    gap: 10px;
}

.factor-item {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

.factor-head strong {
    display: block;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.factor-value-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.factor-value-box span {
    min-width: 38px;
    padding: 5px 9px;
    border: 1px solid rgba(36, 80, 143, 0.18);
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.factor-range {
    appearance: none;
    width: 100%;
    height: 18px;
    margin: 12px 0 1px;
    accent-color: var(--primary);
    background: transparent;
    cursor: pointer;
    --factor-fill: 0%;
}

.factor-range::-webkit-slider-runnable-track {
    height: 7px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, #d7e6fb 0%, #24508f var(--factor-fill), #e7edf6 var(--factor-fill), #e7edf6 100%);
    box-shadow: inset 0 0 0 1px rgba(36, 80, 143, 0.08);
}

.factor-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -5.5px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 3px 8px rgba(36, 80, 143, 0.28);
}

.factor-range::-moz-range-track {
    height: 7px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, #d7e6fb 0%, #24508f var(--factor-fill), #e7edf6 var(--factor-fill), #e7edf6 100%);
}

.factor-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 3px 8px rgba(36, 80, 143, 0.28);
}

.factor-item small {
    display: block;
    color: var(--text3);
    font-size: 11px;
    font-weight: 650;
}

.factor-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ai-guide-grid .wide {
    grid-column: 1 / -1;
}

.factor-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--tag-blue-bg);
    color: var(--tag-blue-text);
    font-size: 11px;
    font-weight: 850;
}

.ai-guide-grid {
    display: grid;
    gap: 8px;
}

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

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

    .workspace-grid,
    .detail-grid,
    .enhancement-workbench {
        grid-template-columns: 1fr;
    }

    .history-surface {
        position: static;
    }

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

    .enhancement-list-panel,
    .rule-panel {
        position: static;
    }

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

    .current-rule-summary,
    .template-card-grid {
        grid-template-columns: 1fr;
    }

    .rule-summary-actions {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .rule-summary-actions > span {
        text-align: left;
    }

    .map-workflow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .map-workflow-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 833px) {
    .login-page {
        padding: 18px;
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
            linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
            linear-gradient(180deg, #071a35 0%, #123462 44%, #f6f8fb 44%, #f6f8fb 100%);
        background-size: 28px 28px, 28px 28px, auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .login-hero {
        min-height: auto;
        padding: 28px;
    }

    .login-hero h1 {
        margin-top: 24px;
        font-size: 34px;
    }

    .login-proof-grid {
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .login-card {
        padding: 26px;
    }

    .api-provider-tabs {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        width: auto;
        padding: 0 12px;
    }

    .brand-block {
        height: 58px;
    }

    .side-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }

    .side-panel {
        display: none;
    }

    .main-area {
        padding-left: 0;
    }

    .topbar,
    .surface-header,
    .results-toolbar,
    .detail-header-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar,
    .summary-grid,
    .workspace-grid,
    .results-surface,
    .empty-panel,
    .overseas-board,
    .overseas-hero,
    .detail-page,
    .enhancement-page {
        width: min(100% - 32px, 1320px);
    }

    .topbar {
        width: auto;
        padding: 14px 16px;
    }

    .workflow-strip,
    .map-workflow-steps,
    .search-grid,
    .summary-grid,
    .overseas-board,
    .detail-list-grid,
    .enhancement-summary,
    .enhancement-detail-grid,
    .rule-number-grid {
        grid-template-columns: 1fr;
    }

    .rule-summary-actions {
        grid-template-columns: 1fr;
    }

    .rule-summary-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-toolbar-actions,
    .lead-toolbar-panel,
    .lead-action-group,
    .table-footer-actions,
    .page-jump,
    .filters-bar,
    .filters-bar .form-control,
    .filters-bar .form-select,
    .search-start-btn,
    .max-results-control {
        width: 100%;
    }

    .max-results-row {
        flex-direction: column;
    }

    .preset-panel {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .lead-toolbar-panel,
    .lead-action-group,
    .table-footer-actions,
    .page-jump {
        justify-content: flex-start;
        width: 100%;
    }

    .selected-lead-hint {
        max-width: none;
    }

    .industry-intelligence-input,
    .industry-intelligence-head {
        align-items: stretch;
        flex-direction: column;
    }

    .industry-intelligence-input .btn {
        flex-basis: auto;
        width: 100%;
    }

    .ai-source-badge {
        width: fit-content;
    }
}

/* Dual acquisition entry */
.mode-select-page { min-height: 100vh; background: #f3f6fa; color: #172033; }
.mode-select-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 32px; }
.mode-select-header { display: flex; align-items: flex-start; gap: 18px; max-width: 720px; margin-bottom: 32px; }
.mode-select-header span { color: #24508f; font-size: 13px; font-weight: 700; }
.mode-select-header strong { display: block; margin-top: 6px; font-size: 32px; line-height: 1.2; }
.mode-select-header p { margin: 10px 0 0; color: #687386; }
.mode-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mode-choice-card { position: relative; min-height: 310px; display: flex; flex-direction: column; justify-content: space-between; padding: 34px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 14px 36px rgba(25, 46, 78, .08); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.mode-choice-card:hover { color: inherit; transform: translateY(-3px); border-color: #88a8d2; box-shadow: 0 20px 44px rgba(25, 46, 78, .13); }
.mode-choice-card.peer { border-top: 4px solid #16846c; }
.mode-choice-card.direct { border-top: 4px solid #24508f; }
.mode-choice-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 8px; background: #eaf1fb; color: #24508f; font-size: 24px; }
.mode-choice-card.peer .mode-choice-icon { background: #e7f5f1; color: #13725e; }
.mode-choice-copy small { color: #7b8798; font-weight: 700; }
.mode-choice-copy h1 { margin: 7px 0 10px; font-size: 27px; }
.mode-choice-copy p { max-width: 500px; color: #667286; line-height: 1.7; }
.mode-choice-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.mode-choice-tags span { padding: 4px 8px; border-radius: 4px; background: #f0f3f7; color: #526176; font-size: 12px; font-weight: 700; }
.mode-choice-arrow { position: absolute; right: 30px; top: 32px; font-size: 23px; color: #98a5b6; }
.mode-select-footer { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 22px; color: #697689; font-size: 13px; }
.mode-select-footer a { color: #526176; }

/* Collapsible navigation */
.sidebar { transition: width .2s ease; }
.sidebar-collapse-btn { position: absolute; top: 18px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 6px; background: rgba(255,255,255,.08); color: #fff; }
body.sidebar-collapsed { --sidebar-width: 72px; }
body.sidebar-collapsed .sidebar .brand-block > div:last-child,
body.sidebar-collapsed .sidebar .side-nav-item span,
body.sidebar-collapsed .sidebar .side-nav-item strong,
body.sidebar-collapsed .sidebar .side-panel,
body.sidebar-collapsed .sidebar .system-actions-card { display: none; }
body.sidebar-collapsed .sidebar .brand-block { justify-content: center; padding-inline: 8px; }
body.sidebar-collapsed .sidebar .side-nav-item { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar-collapse-btn { display: none; }
body.sidebar-collapsed .sidebar .brand-block { padding-inline: 4px; }
body.sidebar-collapsed .sidebar .brand-mark { flex: 0 0 40px; }

/* Enhancement workflow and rule inspector */
.workflow-command-bar {
    overflow: hidden;
    padding: 0;
}

.workflow-stage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px 19px;
    border-bottom: 1px solid #dce4ee;
    background: #f7f9fc;
}

.workflow-stage-kicker {
    display: block;
    margin-bottom: 5px;
    color: #24508f;
    font-size: 11px;
    font-weight: 900;
}

.workflow-stage-header h2 {
    margin: 0;
    color: #1f2d40;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.workflow-stage-header p {
    max-width: 680px;
    margin: 6px 0 0;
    color: #68778b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.workflow-stage-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #c7d5e6;
    border-radius: 5px;
    background: #fff;
    color: #24508f;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.workflow-stage-status.is-complete {
    border-color: #b9dccb;
    background: #eef8f2;
    color: #216647;
}

.workflow-stage-status.is-loading {
    border-color: #bfd0e7;
    background: #edf4fc;
}

.enhancement-flow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 20px 20px;
}

.flow-step-action {
    position: relative;
    display: grid;
    grid-template-columns: 28px 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 5px 9px;
    min-height: 126px;
    padding: 18px 15px 14px;
    border: 1px solid #d7e0ec;
    border-radius: 7px;
    background: #fff;
    color: #27364a;
    text-align: left;
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.flow-step-action:hover {
    border-color: #91abcd;
    color: #24508f;
    box-shadow: 0 6px 16px rgba(36, 80, 143, .08);
}

.flow-step-action:active {
    transform: translateY(1px);
}

.flow-step-action > .flow-step-number {
    display: grid;
    grid-row: 1 / 3;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #e9eff8;
    color: #24508f;
    font-size: 12px;
    font-weight: 900;
}

.flow-step-action > i {
    grid-row: 1 / 3;
    color: #24508f;
    font-size: 21px;
}

.flow-step-action strong {
    align-self: end;
    padding-right: 78px;
    font-size: 14px;
    font-weight: 900;
}

.flow-step-action small {
    grid-column: 3;
    align-self: start;
    color: #748197;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.4;
}

.flow-step-state {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    background: #f0f3f7;
    color: #768397;
    font-size: 10px;
    font-weight: 850;
}

.flow-step-action.is-active {
    border-color: #24508f;
    background: #24508f;
    color: #fff;
    box-shadow: 0 10px 24px rgba(36, 80, 143, .2);
}

.flow-step-action.is-active > i,
.flow-step-action.is-active:hover {
    color: #fff;
}

.flow-step-action.is-active > .flow-step-number,
.flow-step-action.is-loading > .flow-step-number {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.flow-step-action.is-active small,
.flow-step-action.is-loading small {
    color: #dce8f7;
}

.flow-step-action.is-active .flow-step-state,
.flow-step-action.is-loading .flow-step-state {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.flow-step-action.is-complete {
    border-color: #bfdccc;
    background: #f3faf6;
}

.flow-step-action.is-complete > .flow-step-number {
    background: #d8eee2;
    color: #216647;
}

.flow-step-action.is-complete > i,
.flow-step-action.is-complete .flow-step-state {
    color: #216647;
}

.flow-step-action.is-complete .flow-step-state {
    background: #dff1e7;
}

.flow-step-action.is-waiting {
    background: #fbfcfd;
    color: #66758a;
}

.flow-step-action.is-loading {
    border-color: #24508f;
    background: #24508f;
    color: #fff;
    cursor: wait;
}

.flow-step-action.is-loading > i {
    color: #fff;
    animation: workflow-spin 1.1s linear infinite;
}

.flow-upload-dropzone {
    border-style: dashed;
}

.flow-upload-dropzone.is-active,
.flow-upload-dropzone.is-loading {
    border-style: solid;
}

.flow-upload-dropzone.is-dragover {
    border-color: #24508f;
    background: #eaf2fc;
    color: #24508f;
    box-shadow: inset 0 0 0 2px rgba(36, 80, 143, .12);
}

.aiqicha-batch-panel {
    margin: 0 20px 18px;
    border: 1px solid #d7e0ec;
    border-radius: 7px;
    background: #f8fafc;
}

.aiqicha-batch-panel:empty {
    display: none;
}

.aiqicha-batch-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 15px;
    border-bottom: 1px solid #e1e7ef;
    background: #fff;
}

.aiqicha-batch-summary span,
.aiqicha-batch-summary strong,
.aiqicha-batch-summary small {
    display: block;
}

.aiqicha-batch-summary span {
    color: #718096;
    font-size: 10px;
    font-weight: 800;
}

.aiqicha-batch-summary strong {
    margin-top: 2px;
    color: #24344a;
    font-size: 14px;
    font-weight: 900;
}

.aiqicha-batch-summary small {
    margin-top: 3px;
    color: #6c7a8f;
    font-size: 11px;
    font-weight: 650;
}

.aiqicha-batch-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
}

.aiqicha-batch-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 11px;
    border: 1px solid #dbe3ed;
    border-radius: 6px;
    background: #fff;
}

.aiqicha-batch-item.is-complete {
    border-color: #bcd9c9;
    background: #f7fcf9;
}

.aiqicha-batch-item.is-error {
    border-color: #e4b8b8;
    background: #fff8f8;
}

.aiqicha-batch-index {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 5px;
    background: #e9eff8;
    color: #24508f;
    font-size: 11px;
    font-weight: 900;
}

.aiqicha-batch-item.is-complete .aiqicha-batch-index {
    background: #dff1e7;
    color: #216647;
}

.aiqicha-batch-copy {
    min-width: 0;
}

.aiqicha-batch-copy > div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.aiqicha-batch-copy strong {
    color: #26364b;
    font-size: 12px;
    font-weight: 900;
}

.aiqicha-batch-copy span {
    color: #68778b;
    font-size: 10px;
    font-weight: 800;
}

.aiqicha-batch-item.is-complete .aiqicha-batch-copy span {
    color: #216647;
}

.aiqicha-batch-copy small,
.aiqicha-batch-copy em {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    font-size: 10px;
    line-height: 1.4;
}

.aiqicha-batch-copy small {
    color: #718096;
    font-weight: 650;
}

.aiqicha-batch-copy em {
    color: #9b3535;
    font-style: normal;
}

.aiqicha-batch-document {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin-top: 6px;
    color: #287454;
    font-size: 10px;
    font-weight: 750;
}

.aiqicha-batch-document span {
    overflow: hidden;
    min-width: 0;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aiqicha-batch-actions {
    display: flex;
    gap: 6px;
}

.workflow-inline-feedback {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 20px 20px;
    padding: 10px 12px;
    border: 1px solid #cfdae7;
    border-radius: 6px;
    background: #f7f9fc;
    color: #526176;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.workflow-inline-feedback.is-success { border-color: #bfdccc; background: #f0f8f4; color: #216647; }
.workflow-inline-feedback.is-warning { border-color: #ead39b; background: #fff9ea; color: #815d13; }
.workflow-inline-feedback.is-error { border-color: #e7bcbc; background: #fff3f3; color: #9b3535; }
.workflow-inline-feedback.is-loading { border-color: #bfd0e7; background: #edf4fc; color: #24508f; }
.workflow-inline-feedback.is-loading i { animation: workflow-spin 1.1s linear infinite; }

.profile-reuse-notice { display: flex; align-items: center; gap: 8px; margin-top: 11px; padding: 9px 11px; border: 1px solid #bdd8ca; border-radius: 6px; background: #f0f8f4; color: #255f43; font-size: 12px; line-height: 1.5; }
.profile-reuse-notice.is-partial { border-color: #c8d8eb; background: #f3f7fc; color: #315a86; }
.profile-reuse-notice i { flex: 0 0 auto; font-size: 15px; }
.profile-refresh-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 20px 14px; color: #718096; font-size: 11px; font-weight: 650; }
.profile-refresh-actions .btn { white-space: nowrap; }
.aiqicha-no-pending-batches { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid #b9dfcc; border-radius: 8px; background: #f3fbf7; color: #184f3a; }
.aiqicha-no-pending-batches i { font-size: 20px; }
.aiqicha-no-pending-batches div { display: grid; gap: 2px; }
.aiqicha-no-pending-batches span { color: #557267; font-size: 13px; }

.website-enrichment-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 18px 16px;
    padding: 12px 14px;
    border: 1px solid #c8d9ee;
    border-radius: 8px;
    background: #f2f7fd;
    color: #234f89;
}
.website-enrichment-progress.d-none { display: none; }
.website-enrichment-progress.is-complete { border-color: #bedccb; background: #f1f8f4; color: #226448; }
.website-enrichment-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 50%; background: #fff; }
.website-enrichment-progress.is-running .website-enrichment-icon i { animation: workflow-spin 1.5s linear infinite; }
.website-enrichment-progress strong, .website-enrichment-progress span { display: block; }
.website-enrichment-progress strong { margin-bottom: 2px; font-size: 13px; }
.website-enrichment-progress div > span { font-size: 12px; line-height: 1.5; }
.business-website-link { color: #24508f; font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.business-website-link:hover { text-decoration: underline; }
.detail-list-grid .website-manual-check {
    padding: 9px 10px;
    border: 1px solid #ead39b;
    border-radius: 8px;
    border-color: #ead39b;
    background: #fff9ea;
}
.website-manual-check dd strong,
.website-manual-check dd span { display: block; }
.website-manual-check dd strong { margin-bottom: 3px; color: #815d13; }
.website-manual-check dd span { color: #725f32; font-size: 11px; line-height: 1.45; }

.manual-review-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 20px 20px;
    padding: 13px 14px;
    border: 1px solid #ead39b;
    border-radius: 7px;
    background: #fff9ea;
    color: #6e5116;
}

.manual-review-copy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.manual-review-copy > i {
    margin-top: 2px;
    color: #9b6a0d;
    font-size: 18px;
}

.manual-review-copy strong,
.manual-review-copy span {
    display: block;
}

.manual-review-copy strong {
    color: #59400f;
    font-size: 13px;
    font-weight: 900;
}

.manual-review-copy span {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.45;
}

.manual-review-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
}

@keyframes workflow-spin { to { transform: rotate(360deg); } }

.rule-stage-locked {
    display: grid;
    grid-template-columns: 28px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 112px;
    padding: 20px 22px;
    background: #f7f9fc;
    color: #677589;
}

.rule-stage-number,
.rule-stage-lock-icon {
    display: grid;
    place-items: center;
}

.rule-stage-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e6ebf1;
    color: #66758a;
    font-size: 12px;
    font-weight: 900;
}

.rule-stage-lock-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #d5dde7;
    border-radius: 6px;
    background: #fff;
    font-size: 17px;
}

.rule-stage-locked div > span {
    color: #7b8798;
    font-size: 10px;
    font-weight: 900;
}

.rule-stage-locked h3 {
    margin: 2px 0 3px;
    color: #3f4d60;
    font-size: 17px;
    font-weight: 900;
}

.rule-stage-locked p {
    margin: 0;
    color: #7a8798;
    font-size: 12px;
}

.rule-stage-locked > b {
    padding: 5px 8px;
    border: 1px solid #d5dde7;
    border-radius: 4px;
    background: #fff;
    color: #718095;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.rule-panel.is-locked {
    padding: 0;
    border-color: #dde4ed;
    box-shadow: none;
}
.template-card-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.template-choice-card { min-height: 142px; }
.template-detail-block { display: none !important; }
.template-inspector { margin-top: 12px; padding: 18px; border: 1px solid #dce4ee; border-radius: 7px; background: #f8fafc; }
.template-inspector:empty { display: none; }
.template-inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.template-inspector-head span { color: #24508f; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.template-inspector-head h3 { margin: 3px 0 0; font-size: 18px; }
.template-inspector-head p { max-width: 560px; margin: 0; color: #68768a; font-size: 13px; }
.template-factor-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.template-factor-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px; border: 1px solid #e0e6ee; border-radius: 6px; background: #fff; }
.template-factor-row small { grid-column: 1 / -1; color: #7b8797; font-size: 11px; }
.custom-inspector-tabs, .company-detail-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 7px; background: #e9eef5; }
.custom-inspector-tabs button, .company-detail-tabs button { flex: 1; border: 0; border-radius: 5px; padding: 8px 10px; background: transparent; color: #5d6b7e; font-size: 13px; font-weight: 700; }
.custom-inspector-tabs button.active, .company-detail-tabs button.active { background: #fff; color: #24508f; box-shadow: 0 1px 4px rgba(23, 42, 72, .12); }
.custom-inspector-pane { display: none; margin-top: 16px; }
.custom-inspector-pane.active { display: block; }
.factor-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.factor-range { --factor-fill: 0%; background: linear-gradient(90deg, #24508f var(--factor-fill), #dce4ef var(--factor-fill)); }

.search-depth-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    background: #f8fafc;
}
.search-depth-copy { display: grid; gap: 2px; min-width: 0; }
.search-depth-copy > span { color: #24508f; font-size: 11px; font-weight: 800; }
.search-depth-copy > strong { color: #1f2d40; font-size: 14px; }
.search-depth-copy > small { color: #6b788b; font-size: 12px; line-height: 1.45; }
.search-depth-segment { display: grid; grid-template-columns: repeat(2, 150px); gap: 5px; padding: 4px; border: 1px solid #d6deea; border-radius: 8px; background: #e9eef5; }
.search-depth-segment label { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 7px 10px; border-radius: 6px; color: #59677a; cursor: pointer; transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.search-depth-segment label i { font-size: 16px; }
.search-depth-segment label span { display: grid; line-height: 1.2; }
.search-depth-segment label strong { font-size: 12px; }
.search-depth-segment label small { margin-top: 2px; font-size: 10px; }
.search-depth-segment .btn-check:checked + label { background: #fff; color: #24508f; box-shadow: 0 2px 7px rgba(30, 54, 88, .12); }
.search-depth-segment label:active { transform: translateY(1px); }

.rule-template-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #dce4ee;
}
.rule-template-toolbar > div:first-child { display: grid; gap: 2px; }
.rule-template-toolbar > div:first-child > span { display: flex; align-items: center; gap: 10px; color: #26364b; font-size: 17px; font-weight: 900; }
.rule-template-toolbar > div:first-child > small { color: #748196; font-size: 11px; }

.template-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.template-choice-card { display: flex; min-height: 142px; flex-direction: column; }
.template-choice-card .template-card-actions { margin-top: auto; padding-top: 8px; }
.custom-template-card { grid-column: auto; }
.template-inspector-head { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(260px, 1fr) auto; align-items: center; gap: 16px; }
.template-inspector-close { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #d0d9e5; border-radius: 6px; background: #fff; color: #526176; font-size: 11px; font-weight: 800; white-space: nowrap; }
.template-inspector-close:hover { border-color: #9fb5d1; color: #24508f; }
.custom-template-name-block { display: grid; grid-template-columns: auto minmax(120px, 220px); align-items: center; gap: 3px 9px; }
.custom-template-name-block > span { grid-column: 1 / -1; }
.custom-template-name-block label { margin: 0; color: #6d7a8d; font-size: 11px; font-weight: 800; }
.custom-template-name-block input { font-weight: 800; }
.custom-inspector-intro strong { color: #26364b; font-size: 14px; }
.custom-inspector-intro p { margin: 3px 0 0; color: #728095; font-size: 11px; }
.custom-inspector-tabs { width: min(100%, 360px); }
.ai-guide-compact-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ai-guide-compact-head strong { color: #26364b; font-size: 13px; }
.ai-guide-compact-head span { color: #778498; font-size: 11px; }
.ai-guide-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ai-guide-grid.compact > div { min-width: 0; }
.ai-guide-grid.compact label, .ai-preference-row label { margin-bottom: 3px; color: #66758a; font-size: 11px; font-weight: 800; }
.ai-preference-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid #dce4ee; border-radius: 7px; background: #fff; }
.ai-preference-row > div { min-width: 0; }
.ai-preference-row .btn { min-width: 104px; white-space: nowrap; }
.ai-guide-result-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ai-guide-result-row .rule-assist-note { margin: 0; }
.ai-guide-result-row .btn { flex: 0 0 auto; white-space: nowrap; }
.custom-inspector-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #dce4ee; }
.custom-inspector-footer span { margin-right: auto; color: #778498; font-size: 11px; }
.custom-inspector-footer .btn { min-width: 102px; white-space: nowrap; }

/* Company workbench */
.enhancement-workbench { grid-template-columns: 260px minmax(0, 1fr); }
.enhancement-list-panel { min-width: 0; transition: width .2s ease; }
body.company-directory-collapsed .enhancement-workbench { grid-template-columns: 58px minmax(0, 1fr); }
body.company-directory-collapsed .enhancement-list-panel .company-export-menu,
body.company-directory-collapsed .enhancement-list-panel .company-directory-search,
body.company-directory-collapsed .enhancement-list-panel .company-status-filter,
body.company-directory-collapsed .enhancement-list-panel .company-sort-tabs,
body.company-directory-collapsed .enhancement-list-panel .company-list,
body.company-directory-collapsed .enhancement-list-panel h3 { display: none; }
.icon-button { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid #d5dde8; border-radius: 6px; background: #fff; color: #556478; }
.icon-button.danger { color: #b24343; }
.company-detail-tabs { margin: 14px 0; }

.research-status-bar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #d6e1ef;
    border-left: 3px solid #24508f;
    border-radius: 8px;
    background: #fff;
}
.research-status-bar.is-running { background: #f6f9fd; }
.research-status-bar.is-complete { border-left-color: #2f7d5b; }
.research-status-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 7px;
    color: #24508f;
    background: #eaf1fb;
    font-size: 18px;
}
.research-status-copy div { display: flex; align-items: center; gap: 10px; }
.research-status-copy strong { color: #17243a; font-size: 15px; }
.research-status-copy span { color: #24508f; font-size: 12px; font-weight: 700; }
.research-status-copy p { margin: 3px 0 0; color: #67758a; font-size: 12px; }
.research-status-metrics { display: flex; gap: 16px; color: #657389; font-size: 12px; white-space: nowrap; }
.research-status-metrics b { color: #17243a; font-size: 14px; }

.focus-next-stage {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin: 16px 0 20px;
    padding: 20px 22px;
    border: 1px solid #d8e2ef;
    border-left: 4px solid #aab6c7;
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.focus-next-stage.is-ready { border-color: #b8cce6; border-left-color: #24508f; background: #fff; box-shadow: 0 8px 24px rgba(30, 57, 91, .07); }
.focus-next-stage-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; color: #7b8798; background: #e8edf3; font-size: 21px; }
.focus-next-stage.is-ready .focus-next-stage-icon { color: #24508f; background: #eaf1fb; }
.focus-next-stage-copy > span { display: block; color: #64748b; font-size: 11px; font-weight: 800; }
.focus-next-stage-copy h2 { margin: 3px 0 4px; color: #0f172a; font-size: 20px; font-weight: 850; }
.focus-next-stage-copy p { max-width: 760px; margin: 0; color: #5e6d82; font-size: 12px; line-height: 1.6; }
.focus-next-stage-metrics { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; color: #64748b; font-size: 11px; }
.focus-next-stage-metrics b { color: #17243a; font-size: 13px; }
.focus-next-stage-metrics #focusStageState { font-weight: 800; }
.focus-next-stage.is-ready #focusStageState { color: #246648; }
.focus-next-stage-action { min-width: 190px; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 800; }
.focus-next-stage-action.disabled { pointer-events: none; color: #8a96a7; border-color: #d7dee8; background: #e7ebf0; opacity: 1; }

/* High-potential focus workspace */
.focus-page { padding: 24px 28px 40px; }
.focus-page-step { display: block; margin-bottom: 2px; color: #24508f; font-size: 11px; font-weight: 800; }
.focus-summary { display: grid; grid-template-columns: 150px 150px 150px minmax(260px, 1fr); gap: 12px; }
.focus-summary > div { min-height: 92px; padding: 17px 18px; border: 1px solid #e0e7f0; border-radius: 8px; background: #fff; }
.focus-summary span { display: block; color: #64748b; font-size: 11px; font-weight: 750; }
.focus-summary strong { display: block; margin-top: 5px; color: #0f172a; font-size: 25px; font-weight: 850; font-variant-numeric: tabular-nums; }
.focus-summary .wide strong { font-size: 17px; }
.focus-summary small { display: block; margin-top: 4px; color: #7a8798; font-size: 10px; line-height: 1.45; }
.focus-gate-message { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border: 1px solid #e1e7ef; border-radius: 8px; background: #f8fafc; }
.focus-gate-message > i { color: #7b8798; font-size: 20px; }
.focus-gate-message > div { display: grid; flex: 1; gap: 2px; }
.focus-gate-message strong { color: #26364b; font-size: 13px; }
.focus-gate-message span { color: #6d7a8e; font-size: 11px; }
.focus-setup-panel { margin-top: 16px; border: 1px solid #dbe3ed; border-radius: 8px; background: #fff; overflow: hidden; }
.focus-setup-panel.is-locked { opacity: .58; pointer-events: none; }
.focus-setup-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 16px; border-bottom: 1px solid #e5ebf3; }
.focus-setup-panel > header > div > span { color: #24508f; font-size: 10px; font-weight: 800; }
.focus-setup-panel h2 { margin: 3px 0 4px; color: #0f172a; font-size: 18px; font-weight: 850; }
.focus-setup-panel header p { margin: 0; color: #64748b; font-size: 11px; line-height: 1.55; }
.focus-api-state { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 8px; border-radius: 5px; color: #8a6218; background: #fff4d8; font-size: 10px; font-weight: 800; white-space: nowrap; }
.focus-api-state.is-ready { color: #246648; background: #e7f4ed; }
.focus-runtime-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 10px 20px; border-bottom: 1px solid #e5ebf3; background: #f8fafc; }
.focus-runtime-strip > span { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 7px; border: 1px solid #dce4ee; border-radius: 5px; color: #6b778a; background: #fff; font-size: 10px; font-weight: 750; }
.focus-runtime-strip > span.is-ready { color: #246648; border-color: #c5e3d3; background: #edf8f2; }
.focus-runtime-strip > span.is-unavailable { color: #8a6218; border-color: #ead8aa; background: #fff9e9; }
.focus-runtime-strip button { margin-left: auto; }
.focus-runtime-strip > small { flex-basis: 100%; color: #6b778a; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.focus-setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.focus-scope-fieldset { display: grid; gap: 8px; margin: 0; padding: 18px 20px 20px; border: 0; }
.focus-scope-fieldset legend { margin: 0 0 2px; color: #334155; font-size: 12px; font-weight: 800; }
.focus-scope-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; border: 1px solid #dfe6ef; border-radius: 7px; background: #fff; cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease; }
.focus-scope-option:hover { border-color: #b7c8dd; }
.focus-scope-option.active { border-color: #7fa2ce; background: #f1f6fc; box-shadow: inset 3px 0 #24508f; }
.focus-scope-option > input { position: absolute; opacity: 0; pointer-events: none; }
.focus-scope-option > span { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 1px 9px; }
.focus-scope-option i { grid-row: 1 / 3; color: #24508f; font-size: 18px; }
.focus-scope-option strong { color: #17243a; font-size: 13px; }
.focus-scope-option small { color: #738095; font-size: 10px; line-height: 1.4; }
.focus-scope-option > b { color: #24508f; font-size: 12px; white-space: nowrap; }
.focus-scope-option:focus-within { outline: 3px solid rgba(36, 80, 143, .12); outline-offset: 1px; }
.focus-quantity-panel { display: flex; flex-direction: column; padding: 20px; border-left: 1px solid #e5ebf3; background: #f8fafc; }
.focus-quantity-panel > label { margin-bottom: 7px; color: #334155; font-size: 12px; font-weight: 800; }
.focus-quantity-panel .form-select, .focus-quantity-panel .form-control { height: 40px; border-radius: 8px; font-size: 12px; }
.focus-mode-summary { display: grid; gap: 3px; padding-bottom: 14px; border-bottom: 1px solid #dfe6ef; }
.focus-mode-summary > span { color: #64748b; font-size: 10px; font-weight: 700; }
.focus-mode-summary > strong { color: #17243a; font-size: 15px; font-weight: 850; }
.focus-mode-summary > small { color: #718096; font-size: 10px; }
.focus-rank-range { display: grid; gap: 7px; margin-top: 14px; }
.focus-rank-range > label { color: #334155; font-size: 11px; font-weight: 800; }
.focus-rank-range > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.focus-rank-range > div > span { color: #64748b; font-size: 10px; }
.focus-rank-range > small { color: #77859a; font-size: 9px; line-height: 1.45; }
.focus-rank-range input { text-align: center; font-weight: 800; }
.focus-selection-preview { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 12px; padding-top: 14px; border-top: 1px solid #dfe6ef; }
.focus-selection-preview span { color: #64748b; font-size: 11px; }
.focus-selection-preview strong { color: #0f172a; font-size: 19px; }
.focus-quantity-panel .btn { height: 40px; font-size: 12px; font-weight: 800; }
.focus-quantity-panel > small { margin-top: 8px; color: #77859a; font-size: 10px; line-height: 1.5; }
.focus-setup-panel.is-running { background: #fbfcfe; }
.focus-progress { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(180px, .7fr) auto auto; align-items: center; gap: 20px; margin-top: 16px; padding: 14px 16px; border: 1px solid #cbd9ea; border-left: 3px solid #24508f; border-radius: 8px; background: #fff; }
.focus-progress-copy { display: flex; align-items: center; gap: 11px; }
.focus-progress-copy > i { color: #24508f; font-size: 20px; }
.focus-progress-copy div { display: grid; gap: 2px; }
.focus-progress-copy strong { color: #17243a; font-size: 13px; }
.focus-progress-copy span { color: #64748b; font-size: 10px; }
.focus-progress-track { height: 7px; overflow: hidden; border-radius: 4px; background: #e3e9f1; }
.focus-progress-track span { display: block; width: 0; height: 100%; background: #24508f; transition: width 240ms ease; }
.focus-progress-metrics { display: flex; flex-wrap: wrap; gap: 7px 12px; color: #64748b; font-size: 10px; white-space: nowrap; }
.focus-progress-metrics b { color: #17243a; font-size: 12px; }
.focus-progress-metrics small { color: #64748b; font-size: 10px; }
.focus-progress-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.focus-progress-actions .btn { white-space: nowrap; }
.focus-history-panel { margin-top: 16px; border: 1px solid #dbe3ed; border-radius: 8px; background: #fff; overflow: hidden; }
.focus-history-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid #e5ebf3; }
.focus-history-panel > header span { color: #24508f; font-size: 10px; font-weight: 800; }
.focus-history-panel > header h2 { margin: 2px 0 1px; color: #17243a; font-size: 16px; font-weight: 850; }
.focus-history-panel > header p { margin: 0; color: #718096; font-size: 10px; }
.focus-history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 12px; background: #f8fafc; }
.focus-history-item { display: grid; gap: 9px; min-height: 118px; padding: 13px 14px; border: 1px solid #dfe6ef; border-radius: 7px; color: inherit; background: #fff; text-align: left; }
.focus-history-item:hover { border-color: #9bb5d4; background: #fdfefe; }
.focus-history-item.active { border-color: #7197c6; box-shadow: inset 3px 0 #24508f; }
.focus-history-item-head, .focus-history-item-stats { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.focus-history-item-head strong { color: #17243a; font-size: 12px; }
.focus-history-item-head span { padding: 3px 6px; border-radius: 4px; color: #526176; background: #e9eef5; font-size: 9px; font-weight: 800; }
.focus-history-item-head span.running { color: #24508f; background: #eaf1fb; }
.focus-history-item-head span.done { color: #246648; background: #e4f3eb; }
.focus-history-item-head span.stopped { color: #8a6218; background: #fff1cf; }
.focus-history-item p { margin: 0; color: #64748b; font-size: 10px; line-height: 1.45; }
.focus-history-item-stats { justify-content: flex-start; flex-wrap: wrap; color: #718096; font-size: 9px; }
.focus-history-item-stats b { color: #17243a; font-size: 11px; }
.focus-history-item time { color: #94a3b8; font-size: 9px; }
.focus-history-empty { grid-column: 1 / -1; padding: 18px; color: #718096; font-size: 11px; text-align: center; }
.focus-reuse-modal .modal-body > p { margin-bottom: 14px; color: #526176; font-size: 12px; line-height: 1.65; }
.focus-reuse-counts { margin-bottom: 14px; }
.focus-reuse-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.focus-reuse-options.single-option { grid-template-columns: 1fr; }
.focus-reuse-options article { display: grid; gap: 4px; padding: 12px; border: 1px solid #dfe6ef; border-radius: 7px; background: #f8fafc; }
.focus-reuse-options strong { color: #17243a; font-size: 12px; }
.focus-reuse-options span { color: #64748b; font-size: 10px; line-height: 1.5; }
.focus-reuse-options em { color: #24508f; font-size: 9px; font-style: normal; font-weight: 750; }
.focus-workbench { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: clamp(760px, 82vh, 960px); min-height: 760px; margin-top: 16px; border: 1px solid #dbe3ed; border-radius: 8px; background: #fff; overflow: hidden; }
.focus-directory { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border-right: 1px solid #e5ebf3; background: #f8fafc; }
.focus-directory-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 12px 13px; border-bottom: 1px solid #e5ebf3; }
.focus-directory-header > div { min-width: 0; }
.focus-directory-header strong { display: block; color: #17243a; font-size: 14px; font-weight: 850; }
.focus-directory-header span { display: block; margin-top: 2px; color: #64748b; font-size: 10px; }
.focus-directory-search { display: flex; align-items: center; height: 36px; margin: 10px 12px 8px; padding: 0 9px; border: 1px solid #d9e1eb; border-radius: 7px; color: #7b8798; background: #fff; }
.focus-directory-search:focus-within { border-color: #24508f; box-shadow: 0 0 0 3px rgba(36, 80, 143, .1); }
.focus-directory-search input { min-width: 0; width: 100%; border: 0; outline: 0; padding-left: 7px; color: #17243a; background: transparent; font-size: 11px; }
.focus-directory-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0 12px 8px; color: #64748b; font-size: 10px; }
.focus-directory-filter > span { font-weight: 750; white-space: nowrap; }
.focus-directory-filter select { min-width: 0; height: 32px; border: 1px solid #d9e1eb; border-radius: 7px; padding: 0 28px 0 9px; color: #334155; background-color: #fff; font-size: 10px; }
.focus-directory-filter select:focus { border-color: #24508f; outline: 0; box-shadow: 0 0 0 3px rgba(36, 80, 143, .1); }
.focus-select-all { display: flex; align-items: center; gap: 7px; margin: 0 12px 8px; color: #526176; font-size: 10px; font-weight: 750; }
.focus-directory-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.focus-directory-row { position: relative; border-bottom: 1px solid #e5ebf3; }
.focus-directory-row.active { background: #edf3fb; box-shadow: inset 3px 0 #24508f; }
.focus-directory-row > button { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; width: 100%; min-height: 122px; border: 0; padding: 12px 11px; color: inherit; background: transparent; text-align: left; }
.focus-directory-row > button:hover { background: rgba(237, 243, 251, .72); }
.focus-directory-row > button:focus-visible { outline: 3px solid rgba(36, 80, 143, .16); outline-offset: -3px; }
.focus-row-check { position: absolute; z-index: 2; top: 13px; left: 10px; }
.focus-directory-row:has(.focus-row-check) > button { padding-left: 39px; }
.focus-directory-rank { color: #7a8798; font-size: 10px; font-weight: 800; }
.focus-directory-copy { display: grid; min-width: 0; gap: 3px; padding-right: 68px; }
.focus-directory-copy strong { overflow: hidden; color: #17243a; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.focus-directory-copy small { overflow: hidden; color: #77859a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.focus-directory-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.focus-directory-tags > span { padding: 2px 5px; border-radius: 4px; color: #24508f; background: #eaf1fb; font-size: 8px; font-weight: 800; line-height: 1.4; }
.focus-directory-tags > span + span { color: #526176; background: #e9eef5; }
.focus-directory-copy em { display: -webkit-box; overflow: hidden; color: #526176; font-size: 9px; font-style: normal; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.focus-directory-state { position: absolute; top: 11px; right: 10px; padding: 3px 5px; border-radius: 4px; font-size: 8px; font-weight: 800; }
.focus-directory-state.verified { color: #246648; background: #e4f3eb; }
.focus-directory-state.review { color: #8a6218; background: #fff1cf; }
.focus-directory-state.pending { color: #526176; background: #e9eef5; }
.focus-directory-more { padding: 11px; color: #77859a; font-size: 9px; line-height: 1.5; text-align: center; }
.focus-directory-pagination { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; gap: 7px; min-height: 48px; padding: 8px 12px; border-top: 1px solid #e5ebf3; background: #fff; }
.focus-directory-pagination button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #d9e1eb; border-radius: 7px; color: #24508f; background: #fff; transition: background-color 160ms ease, border-color 160ms ease; }
.focus-directory-pagination button:hover:not(:disabled) { border-color: #b9c9de; background: #edf3fb; }
.focus-directory-pagination button:focus-visible { outline: 3px solid rgba(36, 80, 143, .14); outline-offset: 1px; }
.focus-directory-pagination button:disabled { color: #aeb9c7; background: #f8fafc; cursor: not-allowed; }
.focus-directory-pagination label { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; color: #526176; font-size: 10px; white-space: nowrap; }
.focus-directory-pagination input { width: 46px; height: 30px; border: 1px solid #d9e1eb; border-radius: 6px; color: #17243a; background: #fff; font-size: 11px; font-weight: 750; text-align: center; }
.focus-directory-pagination input:focus { border-color: #24508f; outline: 0; box-shadow: 0 0 0 3px rgba(36, 80, 143, .1); }
.focus-directory-pagination b { color: #17243a; font-weight: 800; }
.focus-directory-pagination.is-empty { opacity: .7; }
.focus-reader { min-width: 0; overflow-y: auto; background: #fff; }
.focus-reader-pending { display: grid; justify-items: center; gap: 5px; padding: 52px 20px; color: #77859a; text-align: center; }
.focus-reader-pending i { color: #24508f; font-size: 24px; }
.focus-reader-pending strong { color: #334155; font-size: 13px; }
.focus-reader-pending span { font-size: 11px; }

@media (max-width: 1100px) {
    .focus-summary { grid-template-columns: repeat(3, 1fr); }
    .focus-summary .wide { grid-column: 1 / -1; }
    .focus-setup-grid { grid-template-columns: 1fr; }
    .focus-quantity-panel { border-top: 1px solid #e5ebf3; border-left: 0; }
    .focus-progress { grid-template-columns: 1fr; gap: 10px; }
    .focus-workbench { grid-template-columns: 260px minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .focus-page { padding: 16px 12px 28px; }
    .focus-next-stage { grid-template-columns: 42px minmax(0, 1fr); padding: 16px; }
    .focus-next-stage-icon { width: 40px; height: 40px; }
    .focus-next-stage-action { grid-column: 1 / -1; width: 100%; }
    .focus-summary { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .focus-summary > div { min-height: 76px; padding: 12px; }
    .focus-summary strong { font-size: 20px; }
    .focus-gate-message { align-items: flex-start; flex-wrap: wrap; }
    .focus-gate-message .btn { width: 100%; }
    .focus-setup-panel > header { flex-direction: column; }
    .focus-scope-fieldset { padding: 14px; }
    .focus-workbench { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .focus-directory { height: min(620px, 70vh); min-height: 480px; border-right: 0; border-bottom: 1px solid #e5ebf3; }
    .focus-reader { overflow: visible; }
    .focus-progress-metrics { flex-wrap: wrap; white-space: normal; }
    .focus-history-list, .focus-reuse-options { grid-template-columns: 1fr; }
}

.research-results-workspace {
    margin: 0 0 20px;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    scroll-margin-top: 18px;
}
.research-results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px 15px;
    border-bottom: 1px solid #e5ebf3;
}
.research-results-kicker { display: block; margin-bottom: 4px; color: #24508f; font-size: 11px; font-weight: 800; }
.research-results-header h2 { margin: 0; color: #0f172a; font-size: 18px; font-weight: 800; }
.research-results-header p { margin: 5px 0 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.research-results-actions { display: flex; align-items: center; gap: 8px; }
.research-results-search {
    display: flex;
    align-items: center;
    width: 250px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d5deea;
    border-radius: 7px;
    background: #fff;
    color: #77859a;
}
.research-results-search:focus-within { border-color: #24508f; box-shadow: 0 0 0 3px rgba(36, 80, 143, .1); }
.research-results-search input { min-width: 0; width: 100%; border: 0; outline: 0; padding-left: 7px; color: #17243a; background: transparent; font-size: 12px; }
.research-results-actions select { height: 36px; min-width: 118px; border: 1px solid #d5deea; border-radius: 7px; padding: 0 30px 0 10px; color: #334155; background-color: #fff; font-size: 12px; }
.research-results-summary { display: flex; align-items: baseline; gap: 8px; padding: 10px 20px; border-bottom: 1px solid #edf1f5; background: #f8fafc; }
.research-results-summary strong { color: #17243a; font-size: 14px; }
.research-results-summary span { color: #6b788c; font-size: 11px; }
.research-reader-workbench {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 680px;
    max-height: 78vh;
    background: #fff;
}
.research-directory {
    min-width: 0;
    overflow: hidden;
    border-right: 1px solid #e5ebf3;
    background: #f8fafc;
}
.research-directory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid #e5ebf3;
    background: #fff;
}
.research-directory-toolbar > div { min-width: 0; }
.research-directory-toolbar strong { display: block; color: #0f172a; font-size: 14px; font-weight: 800; }
.research-directory-toolbar span { display: block; margin-top: 2px; color: #64748b; font-size: 10px; line-height: 1.4; }
.research-directory-toolbar .btn { flex: 0 0 auto; height: 34px; border-radius: 7px; font-size: 11px; font-weight: 800; }
.research-directory-list { height: calc(78vh - 60px); min-height: 620px; overflow-y: auto; }
.research-directory-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    width: 100%;
    min-height: 106px;
    padding: 13px 12px 12px;
    border: 0;
    border-bottom: 1px solid #e5ebf3;
    background: transparent;
    color: #475569;
    text-align: left;
    cursor: pointer;
    transition: background-color 180ms ease;
}
.research-directory-item:hover { background: #f1f5f9; }
.research-directory-item.active { background: #edf3fb; }
.research-directory-item.active::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: #24508f; content: ""; }
.research-directory-item:focus-visible { z-index: 1; outline: 3px solid rgba(36, 80, 143, .16); outline-offset: -3px; }
.research-directory-rank { color: #7a8798; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.research-directory-copy { display: grid; min-width: 0; gap: 3px; padding-right: 52px; }
.research-directory-copy strong { overflow: hidden; color: #17243a; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.research-directory-copy small { overflow: hidden; color: #77859a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.research-directory-copy em { display: -webkit-box; overflow: hidden; margin-top: 4px; color: #526176; font-size: 10px; font-style: normal; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.research-directory-state { position: absolute; top: 12px; right: 11px; padding: 3px 6px; border-radius: 5px; font-size: 9px; font-weight: 800; }
.research-directory-state.verified { color: #246648; background: #e4f3eb; }
.research-directory-state.review { color: #8a6218; background: #fff1cf; }
.research-reader { min-width: 0; overflow-y: auto; background: #fff; }
.research-reader-empty { display: grid; place-items: center; align-content: center; min-height: 100%; padding: 48px; color: #77859a; text-align: center; }
.research-reader-empty i { margin-bottom: 12px; color: #9aa8ba; font-size: 30px; }
.research-reader-empty strong { color: #334155; font-size: 15px; }
.research-reader-empty span { max-width: 420px; margin-top: 6px; font-size: 12px; line-height: 1.6; }
.research-reader-header {
    padding: 24px 28px 22px;
    border-bottom: 1px solid #e5ebf3;
}
.research-reader-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 9px; margin-bottom: 10px; }
.research-reader-status-row > span:last-child { color: #64748b; font-size: 11px; font-weight: 700; }
.research-fit-label, .research-business-role { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border-radius: 5px; color: #24508f; background: #eaf1fb; font-size: 10px; font-weight: 800; }
.research-business-role { color: #526176; background: #e9eef5; }
.research-reader-header h3 { margin: 0; color: #0f172a; font-size: 20px; font-weight: 820; line-height: 1.35; }
.research-reader-header p { margin: 7px 0 0; color: #64748b; font-size: 12px; }
.research-manual-banner { display: flex; gap: 10px; margin: 18px 28px 0; padding: 12px 14px; border-left: 3px solid #b7791f; background: #fff9e9; color: #7a5618; }
.research-manual-banner i { margin-top: 1px; }
.research-manual-banner div { display: grid; gap: 3px; }
.research-manual-banner strong { font-size: 12px; }
.research-manual-banner span { font-size: 11px; line-height: 1.55; }
.research-reader-section { padding: 22px 28px; border-bottom: 1px solid #e5ebf3; }
.research-reader-section:last-child { border-bottom: 0; }
.research-reader-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.research-reader-section-head h4 { margin: 0; color: #0f172a; font-size: 15px; font-weight: 820; }
.research-reader-section-head span { color: #7a8798; font-size: 10px; }
.research-business-overview > p { margin: 0; color: #526176; font-size: 12px; line-height: 1.72; }
.research-business-overview .research-reader-lead { margin-bottom: 7px; color: #1f3657; font-size: 14px; font-weight: 760; }
.research-business-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 18px 0 0; }
.research-business-fields div { min-width: 0; }
.research-business-fields dt { margin-bottom: 7px; color: #64748b; font-size: 10px; font-weight: 800; }
.research-business-fields dd { margin: 0; color: #334155; font-size: 12px; line-height: 1.6; }
.research-reader-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.research-reader-tags span { padding: 4px 7px; border: 1px solid #d9e4f1; border-radius: 5px; color: #24508f; background: #f4f8fd; font-size: 10px; font-weight: 700; }
.research-reader-muted { color: #8793a4; font-size: 11px; }
.research-reader-contact-list { display: grid; }
.research-reader-contact { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr); gap: 18px; padding: 12px 0; border-top: 1px solid #edf1f5; }
.research-reader-contact:first-child { padding-top: 0; border-top: 0; }
.research-reader-contact > div { display: grid; align-content: start; gap: 4px; }
.research-reader-contact strong { color: #17243a; font-size: 12px; }
.research-reader-contact span { color: #64748b; font-size: 11px; }
.research-reader-contact a { color: #24508f; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.research-reader-contact i { margin-right: 6px; }
.research-evidence-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.research-evidence-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 10px 0; border-top: 1px solid #edf1f5; }
.research-evidence-list li:nth-child(-n+2) { border-top: 0; }
.research-evidence-list li > span { color: #334155; font-size: 11px; font-weight: 750; }
.research-evidence-list li > strong { font-size: 10px; }
.research-evidence-list li > p { grid-column: 1 / -1; margin: 0; color: #77859a; font-size: 10px; line-height: 1.5; }
.research-evidence-list .is-match > strong { color: #246648; }
.research-evidence-list .is-conflict > strong { color: #a13b3b; }
.research-evidence-list .is-unknown > strong { color: #8a6218; }
.research-ai-section { position: relative; padding-top: 26px; padding-bottom: 26px; background: #f7f9fc; }
.research-ai-section::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #24508f; content: ""; }
.research-ai-section-head { align-items: flex-end; margin-bottom: 16px; }
.research-ai-section-head > div { display: grid; gap: 3px; }
.research-ai-section-head h4 { color: #0f172a; font-size: 19px; font-weight: 850; }
.research-section-kicker { color: #24508f !important; font-size: 10px !important; font-weight: 850; }
.research-ai-summary { margin: 0; max-width: 980px; color: #111827; font-size: 14px; font-weight: 620; line-height: 1.85; white-space: pre-line; }
.research-sales-angle,
.research-suggested-roles,
.research-missing-info { display: grid; gap: 8px; margin-top: 17px; padding-top: 15px; border-top: 1px solid #dce4ee; }
.research-sales-angle { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; margin-top: 20px; padding: 16px 18px; border: 1px solid #cfdbea; border-radius: 7px; background: #fff; }
.research-sales-angle > div { display: grid; align-content: start; gap: 4px; }
.research-sales-angle strong,
.research-suggested-roles > strong,
.research-missing-info > strong { color: #111827; font-size: 12px; font-weight: 850; }
.research-sales-angle small { color: #7a8798; font-size: 10px; line-height: 1.45; }
.research-sales-angle p { margin: 0; color: #17243a; font-size: 13px; font-weight: 620; line-height: 1.78; white-space: pre-line; }
.research-verification-website { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 20px; margin-bottom: 14px; padding: 13px 0; border-bottom: 1px solid #e5ebf3; }
.research-verification-website > div { display: grid; align-content: start; gap: 5px; }
.research-verification-website span { color: #64748b; font-size: 10px; font-weight: 800; }
.research-verification-website a { color: #24508f; font-size: 12px; font-weight: 760; overflow-wrap: anywhere; }
.research-verification-website strong { color: #17243a; font-size: 12px; font-weight: 800; }
.research-reader-sources ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.research-reader-sources li { display: grid; gap: 3px; padding-top: 9px; border-top: 1px solid #edf1f5; }
.research-reader-sources li:first-child { padding-top: 0; border-top: 0; }
.research-reader-sources a,
.research-reader-sources strong { color: #24508f; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.research-reader-sources span { color: #77859a; font-size: 10px; line-height: 1.5; }
.research-trace { border-top: 1px solid #e5ebf3; background: #f8fafc; }
.research-trace summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 28px; color: #17243a; cursor: pointer; list-style: none; }
.research-trace summary::-webkit-details-marker { display: none; }
.research-trace summary span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.research-trace summary small { color: #718096; font-size: 10px; font-weight: 600; }
.research-trace > div { padding: 0 28px 20px; }
.research-trace dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 9px 15px; margin: 0; }
.research-trace dt { color: #64748b; font-size: 10px; font-weight: 750; }
.research-trace dd { margin: 0; color: #334155; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.research-trace a { color: #24508f; }
.research-results-table-wrap { position: relative; overflow-x: auto; }
.research-results-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.research-results-table th { padding: 11px 12px; border-bottom: 1px solid #dce4ee; color: #526176; background: #f8fafc; font-size: 11px; font-weight: 800; text-align: left; }
.research-results-table th:nth-child(1) { width: 16%; }
.research-results-table th:nth-child(2) { width: 15%; }
.research-results-table th:nth-child(3) { width: 22%; }
.research-results-table th:nth-child(4) { width: 18%; }
.research-results-table th:nth-child(5) { width: 19%; }
.research-results-table th:nth-child(6) { width: 10%; }
.research-results-table td { padding: 13px 12px; border-bottom: 1px solid #edf1f5; vertical-align: top; color: #475569; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.research-results-table tbody tr:last-child td { border-bottom: 0; }
.research-results-table tbody tr:hover { background: #f8fbff; }
.research-company-cell button { display: block; border: 0; padding: 0; color: #17243a; background: transparent; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.research-company-cell button:hover { color: #24508f; text-decoration: underline; }
.research-company-cell span,
.research-website-cell small,
.research-status-cell small { display: block; margin-top: 5px; color: #77859a; font-size: 10px; line-height: 1.45; }
.research-website-cell a { color: #24508f; font-size: 11px; font-weight: 700; text-decoration: none; }
.research-website-cell a:hover { text-decoration: underline; }
.research-business-cell strong { display: block; color: #25364d; font-size: 12px; }
.research-business-cell p { margin: 5px 0 0; color: #64748b; font-size: 11px; line-height: 1.55; }
.research-table-contact { display: grid; gap: 2px; padding-bottom: 7px; }
.research-table-contact:last-of-type { padding-bottom: 0; }
.research-table-contact strong { color: #334155; font-size: 11px; }
.research-table-contact span { color: #64748b; font-size: 10px; }
.research-table-contact i { margin-right: 5px; color: #7c8ca2; }
.research-results-table td > small { color: #77859a; font-size: 10px; }
.research-table-roles { display: flex; flex-wrap: wrap; gap: 5px; }
.research-table-roles span { padding: 3px 6px; border-radius: 4px; color: #24508f; background: #edf3fb; font-size: 10px; font-weight: 700; }
.research-table-roles span.is-muted { color: #6b788c; background: #f0f3f7; }
.research-followup-cell p { margin: 8px 0 0; color: #475569; font-size: 11px; line-height: 1.55; }
.research-result-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.research-result-status.is-verified { color: #246648; background: #e8f5ee; }
.research-result-status.is-review { color: #8a6218; background: #fff5db; }
.research-result-status.is-failed { color: #a13b3b; background: #fdecec; }
.research-table-muted { color: #8491a3; font-size: 11px; }
.research-results-empty { display: grid; justify-items: center; gap: 4px; padding: 40px 20px; color: #7a8798; text-align: center; }
.research-results-empty i { font-size: 22px; }
.research-results-empty strong { color: #334155; font-size: 13px; }
.research-results-empty span { font-size: 11px; }

.research-detail-panel { display: grid; gap: 14px; }
.research-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
    gap: 22px;
    align-items: start;
}
.research-kicker { color: #24508f; font-size: 12px; font-weight: 800; }
.research-hero-copy h3 { margin: 7px 0; color: #17243a; font-size: 18px; line-height: 1.45; }
.research-hero-copy p,
.research-body-copy,
.research-verification { margin: 0; color: #5e6d82; font-size: 13px; line-height: 1.7; }
.research-website-box { padding-left: 18px; border-left: 1px solid #e1e7ef; }
.research-website-box > span,
.research-website-box small { display: block; color: #77849a; font-size: 11px; font-weight: 700; }
.research-website-box a,
.research-website-box strong { display: block; margin: 7px 0; color: #24508f; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.research-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.research-contact-list { display: grid; gap: 8px; }
.research-contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .9fr); gap: 12px; padding: 10px 0; border-top: 1px solid #edf1f5; }
.research-contact-row:first-child { border-top: 0; padding-top: 0; }
.research-contact-row div { display: grid; gap: 3px; }
.research-contact-row strong { color: #17243a; font-size: 13px; }
.research-contact-row span { color: #69778b; font-size: 12px; overflow-wrap: anywhere; }
.research-role-list { display: flex; flex-wrap: wrap; gap: 7px; }
.research-role-list span { padding: 5px 8px; border-radius: 5px; color: #24508f; background: #edf3fb; font-size: 12px; font-weight: 700; }
.research-role-list span.muted { color: #718096; background: #f1f4f7; }
.research-subtitle { margin: 16px 0 6px; color: #17243a; font-size: 13px; }
.research-source-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.research-source-list li { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid #edf1f5; }
.research-source-list a { color: #24508f; font-size: 12px; font-weight: 700; }
.research-source-list span,
.research-muted { margin: 0; color: #768398; font-size: 12px; line-height: 1.55; }
.research-empty-state { padding: 54px 24px; text-align: center; color: #6e7d91; }
.research-empty-state i { display: block; margin-bottom: 10px; color: #9eabc0; font-size: 28px; }
.research-empty-state strong { display: block; color: #26364f; font-size: 15px; }
.research-empty-state p { max-width: 520px; margin: 7px auto 0; font-size: 12px; line-height: 1.6; }

@media (max-width: 900px) {
    .research-status-bar,
    .research-hero-card,
    .research-detail-grid { grid-template-columns: 1fr; }
    .research-status-icon { display: none; }
    .research-status-metrics { flex-wrap: wrap; white-space: normal; }
    .research-results-header { align-items: stretch; flex-direction: column; gap: 14px; }
    .research-results-actions { align-items: stretch; flex-wrap: wrap; }
    .research-results-search { width: 100%; }
    .research-results-actions select { flex: 1; }
    .research-reader-workbench { grid-template-columns: 1fr; max-height: none; }
    .research-directory { border-right: 0; border-bottom: 1px solid #e5ebf3; }
    .research-directory-list { height: auto; min-height: 0; max-height: 360px; }
    .research-reader { overflow: visible; }
    .research-reader-header { padding: 20px; }
    .research-reader-section { padding: 20px; }
    .research-manual-banner { margin: 16px 20px 0; }
    .research-business-fields,
    .research-evidence-list { grid-template-columns: 1fr; }
    .research-evidence-list li:nth-child(2) { border-top: 1px solid #edf1f5; }
    .research-reader-contact { grid-template-columns: 1fr; gap: 8px; }
    .research-sales-angle { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
    .research-verification-website { grid-template-columns: 1fr; gap: 12px; }
    .research-website-box { padding: 12px 0 0; border-left: 0; border-top: 1px solid #e1e7ef; }
}
.company-detail-tab-pane { display: none; }
.company-detail-tab-pane.active { display: block; }
.contact-intro { margin: 4px 0 0; color: #455468 !important; font-size: 12px; font-weight: 800; }
.contact-readonly-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #d8e0ea; border-radius: 6px; background: #f7f9fc; color: #66758a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.person-contact-section { padding-top: 2px; }
.person-contact-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid #e3e8ef; }
.person-contact-section-head h4 { margin: 0; color: #172033; font-size: 14px; font-weight: 800; }
.person-contact-section-head span { color: #7a8799; font-size: 11px; }
.person-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.person-contact-card { min-width: 0; padding: 14px; border: 1px solid #dbe3ed; border-radius: 7px; background: #fff; box-shadow: 0 3px 10px rgba(30, 52, 82, .04); }
.person-contact-card.is-other-contact { background: #fbfcfe; box-shadow: none; }
.person-contact-card.is-other-contact .person-contact-avatar { background: #eef2f7; color: #596b82; }
.person-contact-card-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #edf0f4; }
.person-contact-avatar { width: 34px; height: 34px; display: inline-grid; flex: 0 0 34px; place-items: center; border-radius: 7px; background: #eaf1fa; color: #24508f; font-size: 18px; }
.person-contact-card-head > div { min-width: 0; }
.person-contact-card-head strong { display: block; overflow: hidden; color: #172033; font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.person-contact-card-head span { display: block; margin-top: 2px; color: #66758a; font-size: 11px; }
.person-contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 12px 0; }
.person-contact-details div { min-width: 0; }
.person-contact-details dt { margin-bottom: 3px; color: #7a8799; font-size: 10px; font-weight: 700; }
.person-contact-details dd { margin: 0; overflow-wrap: anywhere; color: #26364b; font-size: 12px; font-weight: 650; line-height: 1.45; }
.person-contact-details a, .person-contact-source a { color: #24508f; font-weight: 700; text-decoration: none; }
.person-contact-details a:hover, .person-contact-source a:hover { text-decoration: underline; }
.person-contact-source { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid #edf0f4; color: #7a8799; font-size: 10px; }
.person-contact-source a { font-size: 11px; white-space: nowrap; }
.person-contact-note { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; padding: 8px 9px; background: #f6f8fb; color: #66758a; font-size: 10px; line-height: 1.5; }
.other-contact-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 10px; padding-top: 15px; border-top: 1px solid #e3e8ef; }
.other-contact-heading strong { color: #26364b; font-size: 13px; font-weight: 800; }
.other-contact-heading span { color: #7a8799; font-size: 11px; }
.empty-contact-state { padding: 30px; border: 1px dashed #ced7e3; border-radius: 6px; color: #7c899a; text-align: center; }
.score-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.screening-eligibility-note {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-left: 3px solid #8b95a5;
    background: #f5f7fa;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.55;
}
.lead-ai-summary { margin: 0 0 12px; padding: 12px 14px; border-left: 3px solid #24508f; background: #f5f8fc; color: #334155; line-height: 1.75; white-space: pre-line; }
.score-reasons li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.score-reasons li > span { color: var(--text2); font-weight: 500; }
.score-reasons li strong { flex: 0 0 auto; color: #24508f; font-size: 12px; }
.score-reason-context { border-left: 3px solid #8a99ac; background: #f7f8fa; }
.score-reason-context span { color: #374151; font-weight: 650; }

.search-filter-insight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: -2px 0 16px;
    padding: 13px 16px;
    border: 1px solid #bfd6f4;
    border-left: 4px solid #24508f;
    border-radius: 8px;
    background: #f5f9ff;
    color: #17243a;
}
.search-filter-insight-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: #24508f; color: #fff; }
.search-filter-insight-body { min-width: 0; flex: 1; }
.search-filter-insight > .search-filter-insight-body > strong { display: block; margin-bottom: 3px; font-size: 15px; }
.search-funnel-scope { color: #62738c; font-size: 12px; font-weight: 650; }
.search-funnel-flow { display: flex; align-items: stretch; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.search-funnel-flow > i { align-self: center; flex: 0 0 auto; color: #91a0b5; font-size: 12px; }
.search-funnel-step { display: grid; min-width: 116px; padding: 9px 11px; border: 1px solid #d7e2f0; border-radius: 7px; background: #fff; }
.search-funnel-step b { color: #17243a; font-size: 18px; line-height: 1.15; }
.search-funnel-step small { margin-top: 3px; color: #66778f; font-size: 11px; font-weight: 700; }
.search-funnel-step.is-total { border-color: #aac8ee; background: #edf5ff; }
.search-funnel-step.is-rejected b,
.search-funnel-step.is-merged b { color: #8a5a12; }
.search-funnel-step.is-final { border-color: #8fc8a8; background: #edf8f2; }
.search-funnel-step.is-final b { color: #16663a; }
.search-filter-insight .search-funnel-note { margin: 8px 0 0; color: #52647c; font-size: 12px; font-weight: 550; line-height: 1.55; }
.history-filtered-stat { color: #24508f; }

.historical-enhancement-modal { border: 0; border-radius: 8px; box-shadow: 0 24px 70px rgba(18, 38, 67, .22); }
.historical-enhancement-modal .modal-header { align-items: flex-start; padding: 22px 24px 14px; border-bottom: 0; }
.historical-enhancement-modal .modal-kicker { display: block; margin-bottom: 5px; color: #24508f; font-size: 11px; font-weight: 800; }
.historical-enhancement-modal .modal-title { color: #17243a; font-size: 20px; font-weight: 800; }
.historical-enhancement-modal .modal-body { padding: 4px 24px 20px; }
.historical-enhancement-modal .modal-body > p { margin-bottom: 16px; color: #56677f; font-size: 13px; }
.historical-enhancement-modal .modal-body > small { display: block; margin-top: 12px; color: #738198; }
.historical-session-summary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #dbe4ef; border-radius: 7px; overflow: hidden; }
.historical-session-summary > div { display: grid; gap: 2px; padding: 12px; border-right: 1px solid #e4eaf2; background: #f8fafc; }
.historical-session-summary > div:last-child { border-right: 0; }
.historical-session-summary span { color: #718096; font-size: 11px; font-weight: 700; }
.historical-session-summary strong { color: #17243a; font-size: 18px; }
.historical-session-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: #52647c; font-size: 12px; font-weight: 700; }
.historical-enhancement-modal .modal-footer { padding: 14px 24px 20px; border-top: 1px solid #edf1f5; }
.profile-reuse-choice-modal .profile-reuse-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-reuse-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.profile-reuse-options article { display: grid; align-content: start; gap: 6px; padding: 13px 14px; border: 1px solid #d7e1ed; border-radius: 7px; background: #f8fafc; }
.profile-reuse-options article:first-child { border-color: #b8cdea; background: #f3f7fc; }
.profile-reuse-options strong { color: #17243a; font-size: 14px; }
.profile-reuse-options span { color: #586a80; font-size: 12px; line-height: 1.55; }
.profile-reuse-options em { color: #24508f; font-size: 11px; font-style: normal; font-weight: 750; }

@media (max-width: 768px) {
    .search-filter-insight { padding: 12px; }
    .search-filter-insight-icon { display: none; }
    .search-funnel-flow { gap: 6px; }
    .search-funnel-step { min-width: 104px; }
    .historical-session-summary { grid-template-columns: repeat(2, 1fr); }
    .historical-session-summary > div:nth-child(2) { border-right: 0; }
    .historical-session-summary > div:nth-child(-n+2) { border-bottom: 1px solid #e4eaf2; }
    .profile-reuse-choice-modal .profile-reuse-counts { grid-template-columns: 1fr; }
    .profile-reuse-choice-modal .profile-reuse-counts > div { border-right: 0; border-bottom: 1px solid #e4eaf2; }
    .profile-reuse-choice-modal .profile-reuse-counts > div:last-child { border-bottom: 0; }
    .profile-reuse-options { grid-template-columns: 1fr; }
    .profile-refresh-actions { align-items: stretch; flex-direction: column; }
}

.source-search-funnel {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 11px 13px;
    border-left: 3px solid #24508f;
    background: #f5f9ff;
    color: #17243a;
}
.source-search-funnel > i { margin-top: 1px; color: #24508f; }
.source-search-funnel strong { display: block; font-size: 13px; }
.source-search-funnel small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; color: #52647d; font-size: 12px; font-weight: 600; }
.source-search-funnel small i { color: #91a3bb; font-size: 10px; }

@media (max-width: 980px) {
    .mode-choice-grid, .enhancement-flow-steps { grid-template-columns: 1fr 1fr; }
    .template-factor-list, .factor-list { grid-template-columns: 1fr 1fr; }
    .enhancement-workbench { grid-template-columns: 220px minmax(0, 1fr); }
    .ai-guide-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aiqicha-batch-list { grid-template-columns: 1fr; }
    .direct-industry-primary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .mode-select-shell { width: min(100% - 24px, 1180px); padding-top: 32px; }
    .mode-choice-grid, .enhancement-flow-steps, .template-factor-list, .factor-list { grid-template-columns: 1fr; }
    .mode-choice-card { min-height: 260px; padding: 24px; }
    .template-inspector-head { display: block; }
    .template-inspector-head p { margin-top: 8px; }
    .enhancement-workbench, body.company-directory-collapsed .enhancement-workbench { grid-template-columns: 1fr; }
    .person-contact-grid { grid-template-columns: 1fr; }
    .person-contact-section-head, .other-contact-heading, .score-panel-head { align-items: flex-start; flex-direction: column; }
    .search-depth-control { grid-template-columns: 1fr; }
    .search-depth-segment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rule-template-toolbar { grid-template-columns: 1fr auto; }
    .rule-template-toolbar > div:first-child { grid-column: 1 / -1; }
    .template-card-grid { grid-template-columns: 1fr; }
    .template-inspector-head { grid-template-columns: 1fr; }
    .ai-guide-grid.compact { grid-template-columns: 1fr; }
    .ai-preference-row { grid-template-columns: 1fr; }
    .ai-preference-row .btn { justify-self: start; }
    .ai-guide-result-row, .custom-inspector-footer { align-items: flex-start; flex-direction: column; }
    .rule-threshold-priority { align-items: flex-start; flex-direction: column; gap: 12px; }
    .peer-fixed-gate { grid-template-columns: 32px minmax(0, 1fr); }
    .peer-fixed-gate-lock { grid-column: 2; }
    .workflow-stage-header { align-items: flex-start; flex-direction: column; gap: 12px; padding: 19px 17px 16px; }
    .enhancement-flow-steps { padding: 14px; }
    .flow-step-action { min-height: 112px; }
    .workflow-inline-feedback { margin: 0 14px 14px; }
    .aiqicha-batch-panel { margin: 0 14px 14px; }
    .aiqicha-batch-summary { align-items: flex-start; flex-direction: column; }
    .aiqicha-batch-item { grid-template-columns: 32px minmax(0, 1fr); }
    .aiqicha-batch-actions { grid-column: 2; flex-wrap: wrap; }
    .manual-review-callout { align-items: stretch; flex-direction: column; margin: 0 14px 14px; }
    .manual-review-actions { display: grid; grid-template-columns: 1fr; }
    .rule-stage-locked { grid-template-columns: 26px 34px minmax(0, 1fr); padding: 17px 15px; }
    .rule-stage-locked > b { grid-column: 3; width: fit-content; }
    .peer-equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .direct-solution-tabs { grid-template-columns: 1fr; }
    .direct-solution-tab { min-height: 42px; grid-template-columns: 1fr auto; }
    .direct-solution-tab small { margin-top: 0; }
    .direct-industry-grid { grid-template-columns: 1fr; }
    .direct-industry-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .direct-industry-primary { min-height: 40px; }
    .direct-subcategory-head { align-items: flex-start; flex-direction: column; gap: 3px; }
    .selected-industry-solution-group { grid-template-columns: 1fr; gap: 3px; }
    .selected-industry-solution-label { padding-top: 0; }
}
