:root {
    --bg: #f5f7fa;
    --card: #fff;
    --line: #e1e7ef;
    --ink: #172b43;
    --muted: #607086;
    --accent: #315bdf;
    --accent-dark: #2347b8;
    --surface-soft: #f8fafd;
    --shadow: 0 4px 20px rgb(23 43 67 / 4%);
}

.app-admin .sync-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 16px 0; }
.app-admin .sync-source { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); overflow-wrap: anywhere; }
.app-admin .sync-source h3 { margin: 0 0 10px; font-size: 15px; }
.app-admin .sync-source p { margin: 8px 0; line-height: 1.5; }
.app-admin .sync-source ul { padding-left: 18px; font-size: 13px; line-height: 1.8; }
.app-admin .sync-state { font-weight: 650; }
.app-admin .sync-state.success { color: #196540; }
.app-admin .sync-state.partial, .app-admin .sync-state.failed { color: #9c3a21; }
.app-admin .sync-notice { padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface-soft); line-height: 1.6; }
.app-admin .sync-details { margin: 16px 0; }
.app-admin .sync-details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.app-admin #jobSummary span { overflow-wrap: anywhere; min-width: 0; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.workspace-hint { color: var(--muted); font-size: 14px; line-height: 1.6; }
.field-error { color: #9c2626; font-size: 14px; line-height: 1.5; }
[aria-invalid="true"] { border-color: #b73535; outline-color: #b73535; }
.workspace-field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; }
.workspace-field input, .workspace-field select { width: 100%; min-width: 0; padding: 10px 12px; font-size: 14px; font-weight: 400; }
.workspace-check { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; line-height: 1.5; }
.workspace-check input { flex-shrink: 0; width: 18px; height: 18px; }
.workspace-dialog {
    width: min(1100px, calc(100vw - 48px)); max-height: calc(100dvh - 48px);
    padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink);
    background: var(--card); box-shadow: 0 20px 70px rgb(23 43 67 / 18%);
}
.workspace-dialog::backdrop { background: rgb(23 43 67 / 42%); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.dialog-heading button { flex-shrink: 0; }
.dialog-body { padding: 20px 24px; overflow: auto; max-height: calc(100dvh - 150px); overscroll-behavior: contain; }
.candidate-drawer { width: min(760px, calc(100vw - 32px)); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 16px 0 0 16px; }
.candidate-drawer .dialog-body { max-height: calc(100dvh - 90px); }
.candidate-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.candidate-tabs button[aria-selected="true"] { background: #edf2ff; color: var(--accent-dark); border-color: #b7c7f2; }
#searchMain .name { min-width: 0; overflow-wrap: anywhere; }
#applyDesktopFilters { margin-top: 16px; }
.filters-dialog #applyDesktopFilters { display: none; }
.candidate-field-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.candidate-field-grid > div { min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.candidate-field-grid dt { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.candidate-field-grid dd { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.resume-text { font-family: inherit; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.assessment-axes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.assessment-axes > div { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.assessment-axes h4 { font-size: 14px; margin: 0 0 7px; }
.assessment-axes p { font-size: 13px; line-height: 1.5; margin: 0; }
.requirement-verdict { display: flex; flex-wrap: wrap; gap: 8px 12px; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 14px; }
.requirement-verdict strong { flex-basis: 100%; }
.verdict-status { color: #745211; }
.verdict-status.met { color: #146b52; }
.verdict-status.not_met { color: #9c2626; }
.evidence-link { color: var(--accent-dark); text-decoration: underline; }
.evidence-quote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid #bacbf2; background: var(--surface-soft); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence-quote:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.requirements-editor { margin: 16px 0; padding: 18px 24px; }
.requirements-editor summary { cursor: pointer; font-size: 15px; font-weight: 650; }
.requirements-editor .workspace-field { margin-top: 14px; }
.requirement-editor-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.requirement-editor-row .workspace-field { margin-top: 0; }
.requirement-terms { grid-column: 1 / -1; }
.results-state { padding: 12px 16px; background: #fff6df; border: 1px solid #eed7a1; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.results-conditions { font-size: 14px; color: var(--muted); line-height: 1.6; padding: 0 2px 12px; overflow-wrap: anywhere; }
.selection-tray { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border: 1px solid #b6c7f1; border-radius: 14px; background: var(--card); box-shadow: 0 8px 36px rgb(23 43 67 / 16%); z-index: 30; }
.selection-tray > span { font-size: 14px; font-weight: 650; white-space: nowrap; }
.has-selection main { padding-bottom: 140px; }
.workspace-toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 14px 20px; background: #172b43; color: #fff; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; font-size: 14px; line-height: 1.5; }
.workspace-save-form { display: grid; gap: 14px; }
.workspace-save-form .search-submit { justify-self: start; min-height: 42px; }
.workspace-dialog .search-submit { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.workspace-dialog .search-submit:hover { background: var(--accent-dark); }
.saved-search-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.saved-search-row h3 { font-size: 17px; margin: 0 0 10px; }
.saved-search-row button { margin-right: 8px; margin-top: 6px; }
.comparison-scroll { overflow-x: auto; max-width: 100%; overscroll-behavior: contain; }
.comparison-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; line-height: 1.55; }
.comparison-table th, .comparison-table td { min-width: 180px; max-width: 320px; padding: 14px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.comparison-table th { background: var(--surface-soft); font-weight: 600; }
.comparison-table thead th { position: sticky; top: 0; z-index: 1; }
.comparison-table thead button { margin-top: 10px; }
.comparison-table th:first-child { position: sticky; left: 0; min-width: 150px; z-index: 2; }
.comparison-table thead th:first-child { z-index: 3; }
.unknown-value { color: #745211; }
.has-search-results .workspace-intro { margin-bottom: 16px; }
.has-search-results .workspace-intro h2 { font-size: 23px; margin: 0; }
.has-search-results .search-panel textarea { min-height: 72px; height: 72px; }
.has-search-results .search-panel textarea:focus { height: 126px; }
.vacancy-context { padding: 16px 24px; }
.vacancy-context summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.vacancy-context .vacancy { margin-top: 16px; margin-bottom: 0; }
.has-search-results .workspace-intro p, .has-search-results .workspace-intro .eyebrow, .has-search-results .workspace-sources { display: none; }
#advancedSearchControls button, .workspace-dialog button:not(.search-submit) { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; }
#advancedSearchControls input { width: min(100%, 440px); padding: 10px 12px; font: inherit; }
.workspace-dialog button:disabled, .selection-tray button:disabled, #compareCandidates:disabled { opacity: .55; cursor: not-allowed; }
#searchMain .card-facts .chip-item, #searchMain .stack-pills .chip-item { background: #f1f4f8; border-color: #e1e7ef; color: #344b65; font-size: 12px; }
#searchMain .score-details p { font-size: 13px; line-height: 1.5; }

@media (max-width: 700px) {
    .workspace-dialog, .candidate-drawer { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
    .dialog-heading { padding: 14px 16px; min-height: 74px; }
    .dialog-heading h2 { font-size: 18px; }
    .dialog-body, .candidate-drawer .dialog-body { padding: 16px; max-height: calc(100dvh - 90px); }
    .candidate-field-grid, .requirement-editor-row, .assessment-axes { grid-template-columns: minmax(0, 1fr); }
    .candidate-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .candidate-tabs button { width: 100%; }
    .requirements-editor { padding: 16px; }
    .filters-dialog .dialog-body { max-height: calc(100dvh - 160px); padding: 0 12px; }
    .filters-dialog #filtersPanel { padding: 12px 4px; border: 0; box-shadow: none; }
    .filters-dialog > .search-submit { min-height: 44px; margin: 12px 16px; width: calc(100% - 32px); }
    .selection-tray { bottom: 0; width: 100%; max-width: 100%; transform: none; left: 0; border-radius: 14px 14px 0 0; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); flex-wrap: wrap; gap: 7px; }
    .selection-tray > span { flex: 1 0 100%; }
    .selection-tray button { flex: 1; }
    .has-selection main { padding-bottom: 180px; }
    #searchMain button:not(.pill-menu-opt), .workspace-dialog button, #workspaceFiltersDialog .pill { min-height: 44px; }
    #searchMain .pill, #workspaceFiltersDialog .pill { font-size: 12px; padding: 8px; }
    .pill-controls { flex-wrap: wrap; }
    #searchMain .card { padding: 16px; }
    #searchMain .card-facts, #searchMain .stack-pills { margin-top: 9px; }
    #searchMain .card-facts label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
    .has-search-results .workspace-intro { flex-wrap: wrap; gap: 10px; }
    .has-search-results .workspace-intro h2 { font-size: 20px; }
    .workspace-intro { flex-wrap: wrap; }
    .saved-searches-nav { margin-left: auto; }
    .comparison-table th, .comparison-table td { min-width: 165px; padding: 12px; }
    .comparison-table th:first-child { min-width: 120px; max-width: 140px; }
    #exportScope { margin-left: 0; width: 100%; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
}

body > header {
    min-height: 80px;
    padding: 14px max(24px, calc((100vw - 1200px) / 2));
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    position: relative;
}

header .logo-link {
    padding: 7px;
    border-radius: 14px;
    background: #eef3ff;
}

header .logo { width: 36px; height: 36px; }
header h1 { font-size: 18px; letter-spacing: -.5px; font-weight: 750; }
header p { color: var(--muted); opacity: 1; font-size: 12px; }
header a, .header-nav-link { color: var(--muted); }
header a:hover { color: var(--accent-dark); }
.header-nav-link { border-color: var(--line); border-radius: 9px; padding: 9px 12px; }
.header-nav-link:hover { color: var(--accent); background: #eff4ff; }
.header-actions .ghost, .search-logout {
    background: #fff; border: 1px solid var(--line); color: var(--muted);
    border-radius: 9px; padding: 9px 12px;
}
.header-actions .ghost:hover, .search-logout:hover { background: #eff4ff; color: var(--accent-dark); }
header .header-session { color: var(--muted); }

main, .index-stale-banner { max-width: 1200px; }
main { padding: 36px 24px 72px; }
.index-stale-banner { padding: 0 24px; margin-top: 20px; }
.index-stale-banner .panel { border-radius: 10px; padding: 12px 16px; box-shadow: none; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .15em; color: var(--accent-dark); }
.workspace-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.workspace-intro h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -1.1px; margin: 7px 0 8px; font-weight: 750; line-height: 1.2; }
.workspace-intro p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.workspace-sources { display: flex; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex-shrink: 0; }
.workspace-sources span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; }
.workspace-sources span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jira); }
.workspace-sources span:last-child::before { background: var(--huntflow); }

.panel, .card { border-radius: 16px; box-shadow: var(--shadow); }
#searchForm { gap: 16px; }
.search-panel { padding: 24px; border-color: #d5dfef; }
.search-head { gap: 12px; margin-bottom: 20px; }
.panel-title { letter-spacing: -.3px; }
button.search-submit { height: 42px; padding: 0 22px; border-radius: 10px; box-shadow: 0 3px 8px rgb(49 91 223 / 15%); }
.search-submit:hover { box-shadow: 0 4px 12px rgb(49 91 223 / 24%); }
.vacancy-mode { background: #f0f3f8; border: 0; border-radius: 10px; height: 38px; padding: 3px; }
.vacancy-mode-btn { border-radius: 8px; padding: 7px 14px; }
.vacancy-mode-btn.on { color: var(--accent-dark); }
.filters-reveal, .results-settings-btn { border-radius: 9px; min-height: 36px; }
input[type=text], input[type=password], input[type=number], textarea, select {
    border-radius: 9px; color: var(--ink); background: var(--surface-soft);
}
input::placeholder, textarea::placeholder { color: #738197; opacity: 1; }
.vacancy-box-inline input[type=text] { height: 46px; padding: 10px 14px; }
.search-panel textarea { min-height: 126px; padding: 14px 16px; line-height: 1.65; }
input[type=checkbox] { accent-color: var(--accent); }
.sources-panel, .filters-panel { padding: 22px 24px; }
.sources-head-main { gap: 14px; }
.sources-summary { flex: 0 1 auto; padding: 4px 10px; background: var(--surface-soft); }
.sources-body { margin-top: 18px; }
.sources { gap: 16px; }
.source-config { padding: 18px; gap: 14px; border-radius: 12px; background: var(--surface-soft); }
.source-config.jira { border-top: 2px solid var(--jira); }
.source-config.huntflow { border-top: 2px solid var(--huntflow); }
.source-enable h3 { font-size: 14px; }
.source-hint { font-size: 12px; }
.source-tools { border-top: 1px solid var(--line); padding-top: 12px; }
.source-global-footer { padding-top: 16px; margin-top: 16px; }
.pill, .topk-preset { min-height: 26px; padding: 4px 10px; font-size: 11px; }
.pill-more { background: #fff; }
.pill-menu-opt { padding: 7px 10px; }
.filter-card { padding: 16px; background: var(--surface-soft); border-radius: 12px; }
.source-rerank-block { background: #f3f6fc; border-radius: 10px; }
.report-details { padding: 16px 18px; border-radius: 12px; }
.report-details summary { line-height: 1.5; }
.report-details > p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.report-details > label { margin-top: 16px; }

.results-section { margin-top: 28px; }
.results-toolbar { position: relative; top: auto; padding: 14px; gap: 14px; border-radius: 14px; backdrop-filter: none; margin-bottom: 18px; }
.results-tabs { border: 0; border-radius: 10px; background: #f0f3f8; padding: 4px; }
.results-tab { padding: 8px 12px; border-radius: 7px; }
.results-toolbar-actions { gap: 6px; width: 100%; margin-left: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.results-toolbar-actions select { width: auto; max-width: 100%; margin-left: auto; padding: 8px 10px; font-size: 12px; }
.summary-grid { gap: 18px; }
.card { padding: 22px; margin-bottom: 16px; }
.card:not(.vacancy):not(.already-submitted):hover { border-color: #bdcbe1; }
.card-head { row-gap: 10px; }
.name { font-size: 16px; letter-spacing: -.2px; }
.card-role { margin-top: 8px; font-weight: 550; }
.card-facts, .stack-pills, .fit-pills { gap: 5px; margin-top: 12px; }
.chip-item, .status-badge { padding: 3px 8px; line-height: 1.4; }
.fit-pct { padding: 4px 9px; }
.source-badge { border-radius: 6px; padding: 4px 7px; }
.card-more { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.vacancy { border-radius: 16px; box-shadow: var(--shadow); }
.vacancy-hero { padding: 22px 24px 16px; background: #f8faff; }
.vacancy-body { padding: 18px 24px 22px; }
dialog { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 80px rgb(23 43 67 / 22%); color: var(--ink); }
dialog::backdrop { background: rgb(16 32 54 / 45%); }

.auth-screen { max-width: 1100px; margin: 0 auto; min-height: calc(100svh - 80px); display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 80px; padding: 48px 24px; }
.auth-intro { align-self: stretch; display: flex; flex-direction: column; justify-content: center; position: relative; padding: 44px 0; }
.auth-intro h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.16; letter-spacing: -1.6px; margin: 18px 0; font-weight: 750; }
.auth-intro > p { max-width: 390px; color: var(--muted); font-size: 15px; line-height: 1.8; margin: 0; }
.auth-intro-footer { color: var(--muted); font-size: 12px; margin-top: 26px; }
.radar-visual { position: relative; width: 220px; height: 130px; overflow: hidden; margin-top: 28px; }
.radar-visual span { position: absolute; border: 1px solid #c9d7ee; border-radius: 50%; width: 210px; height: 210px; left: 0; top: 4px; }
.radar-visual span:nth-child(2) { width: 150px; height: 150px; left: 30px; top: 34px; }
.radar-visual span:nth-child(3) { width: 90px; height: 90px; left: 60px; top: 64px; background: #edf2ff; }
.radar-visual i { position: absolute; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #315bdf; top: 43px; left: 149px; box-shadow: 0 0 0 5px #e1e9fc; }
.auth-card { width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 64px rgb(23 43 67 / 7%); }
.auth-accent { background: var(--accent); height: 3px; }
.auth-body { padding: 36px; }
.auth-card h2 { font-size: 25px; letter-spacing: -.6px; }
.auth-lead { margin: 8px 0 28px; font-size: 13px; line-height: 1.6; }
.auth-fields input { background: var(--surface-soft); height: 46px; }
.auth-card button[type=submit] { height: 46px; margin-top: 8px; }

.app-admin main { max-width: 1200px; }
.app-admin .auth-card { margin: 60px auto; }
.app-admin .panel { padding: 24px; }
.admin-nav { position: relative; top: auto; gap: 8px; padding: 6px; background: #eaf0f7; border-radius: 12px; }
.admin-nav button { border-radius: 8px; padding: 11px 16px; }
.status-card, .op-card { border-radius: 12px; }
.status-card { padding: 18px; }
.status-dot { width: 9px; height: 9px; padding: 0; flex-shrink: 0; }
.status-metric { letter-spacing: -.8px; }
.op-card { background: var(--surface-soft); }

:is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid #6384ed; outline-offset: 3px; }
button, a, input, select, textarea { transition: background-color .15s, border-color .15s, box-shadow .15s; }

@media (max-width: 800px) {
    .auth-screen { gap: 32px; grid-template-columns: 1fr 1fr; }
    .auth-intro h2 { font-size: 32px; }
    .auth-body { padding: 28px; }
    .workspace-sources { display: none; }
    .summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body > header { padding: 12px 16px; gap: 10px; min-height: 72px; }
    header h1 { font-size: 16px; }
    header .brand { gap: 10px; }
    header .logo-link { padding: 5px; }
    header .logo { width: 30px; height: 30px; }
    .header-actions { width: auto; margin-left: auto; flex-wrap: wrap; }
    main { padding: 24px 14px 48px; }
    .index-stale-banner { padding: 0 14px; }
    .workspace-intro { margin-bottom: 22px; }
    .workspace-intro h2 { font-size: 26px; letter-spacing: -.7px; }
    .workspace-intro p { font-size: 13px; }
    .search-panel, .sources-panel, .filters-panel { padding: 18px 16px; }
    .search-head { gap: 10px; }
    .vacancy-box-inline { grid-template-columns: 1fr; gap: 8px; }
    button.search-submit { width: 100%; }
    .source-config { padding: 14px; }
    .sources-head-main { gap: 8px; }
    .sources-summary { font-size: 11px; }
    .results-toolbar-actions select { margin-left: 0; width: 100%; }
    .card { padding: 18px; }
    .card-kicker { flex-wrap: wrap; }
    .auth-screen { display: flex; gap: 0; padding: 36px 20px; min-height: calc(100svh - 72px); }
    .auth-intro { display: none; }
    .auth-body { padding: 28px 24px; }
    .app-admin .panel { padding: 18px 16px; }
    .app-admin .auth-card { margin: 24px auto; }
    .admin-nav { flex-wrap: wrap; }
}

.search-tools { padding: 18px 24px; margin: 16px 0; }
.search-tools summary { cursor: pointer; font-weight: 600; }
.search-tools summary .workspace-hint { display: block; margin: 6px 0 0 18px; font-weight: 400; }
.search-tools-grid { display: grid; gap: 12px; margin-top: 16px; }
.search-tool { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); min-width: 0; }
.search-tool[open] { background: var(--card); }
.search-tool .workspace-field { margin: 16px 0; }
.search-tools input, .search-tools textarea, .search-tools select { width: 100%; min-width: 0; box-sizing: border-box; }
.search-tools textarea { padding: 10px 12px; font-size: 14px; font-weight: 400; }
.search-expert { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.search-expert > summary { color: var(--muted); font-size: 13px; }
.search-expert pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.requirement-editor-row { grid-template-columns: minmax(0, 1fr) minmax(170px, .55fr); align-items: start; }
.requirement-editor-row .requirement-terms { grid-column: auto; }
.requirement-refinements { grid-column: 1 / -1; min-width: 0; }
.requirement-refinements > summary { color: var(--accent); font-size: 13px; font-weight: 500; }
.requirement-refinements .workspace-field { margin-top: 12px; }
.search-tools summary:focus-visible, .requirement-refinements summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 700px) {
    .search-tools { padding: 16px; }
    .requirement-editor-row { grid-template-columns: minmax(0, 1fr); }
    .search-tool { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* Раскладка оценки и покрытие требований без зависимости от внешних графиков. */
.score-explanation, .coverage-radar { margin:12px 0; }
.score-explanation summary, .coverage-radar summary { cursor:pointer; font-weight:600; }
.score-component-table { border-collapse:collapse; width:100%; font-size:12px; margin:8px 0; }
.score-component-table td, .score-component-table th { text-align:left; padding:6px; border-bottom:1px solid var(--line,#dce3ee); }
.score-contribution-bar { display:flex; height:18px; background:#e7edf5; border-radius:5px; overflow:hidden; margin:10px 0; }
.score-segment.semantic { background:#2457a7; }
.score-segment.hard_skills { background:#13795b; }
.score-segment.direction { background:#8854a2; }
.score-segment.location { background:#a66a00; }
.score-segment.llm { background:#617385; }
.score-validation { padding:6px 10px; border-left:3px solid #617385; background:#eef3f9; }
.score-validation.agree { border-color:#13795b; }
.score-validation.disagree { border-color:#a66a00; }
.score-feedback-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:8px 0; }
.coverage-radar svg { width:100%; max-width:360px; display:block; margin:auto; font-size:12px; }
.radar-grid { fill:none; stroke:#bac8dc; stroke-width:1; }
.radar-upper { fill:#2457a722; stroke:#2457a7; stroke-dasharray:5 3; }
.radar-lower { fill:#13795b44; stroke:#13795b; stroke-width:2; }
