  :root {
    --bg: #f5f6f8; --card: #fff; --text: #1c1e24; --muted: #6b7280;
    --line: #e3e6ea; --accent: #2563eb; --accent-dark: #1d4ed8;
    --accent-soft: #e8efff; --chip: #f0f2f5; --good: #067647;
    --danger: #b42318; --danger-soft: #fef3f2; --danger-line: #fecdca;
    --warn: #93370d; --warn-soft: #fffaeb; --warn-line: #fedf89;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; background: var(--bg); color: var(--text);
    font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
  header { padding: 26px 28px 8px; max-width: 1280px; margin: 0 auto; }
  h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.3px; }
  .sub { color: #667085; font-size: 13.5px; }
  main { max-width: 1280px; margin: 0 auto; padding: 12px 28px 60px; }
  .card { background: var(--card); border: 1px solid var(--line);
    border-radius: 14px; padding: 18px; margin-bottom: 18px; }
  .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
  .field { display: flex; flex-direction: column; gap: 6px; }
  .field.grow { flex: 1 1 100%; }
  .field label, .field .field-title { font-size: 12px; color: var(--muted);
    font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
  .field-hint { font-size: 11.5px; color: var(--muted); }
  input[type=text], input[type=number], select, textarea {
    border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
    font: inherit; background: #fff; color: var(--text); }
  input[type=text] { min-width: 0; }
  textarea { resize: vertical; line-height: 1.4; }
  .profilebar { display: flex; flex-wrap: wrap; gap: 10px;
    align-items: flex-end; margin-bottom: 16px; padding-bottom: 14px;
    border-bottom: 1px solid var(--line); }
  .profilebar .field { min-width: 250px; }
  .profilebar select { min-width: 250px; }
  .save-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .save-box input { min-width: 220px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .chip { display: inline-flex; align-items: center; gap: 3px;
    border: 1px solid var(--line); background: #fff; color: var(--text);
    padding: 6px 11px; border-radius: 999px; font-size: 13.5px;
    font-weight: 500; line-height: 1.3; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s; }
  .chip:hover { background: #f7f9fc; border-color: #cfd5dd; }
  .chip[aria-pressed="true"] { background: var(--accent-soft);
    border-color: #c7d7ff; color: var(--accent-dark); }
  .chip.custom { background: #f7f9fc; }
  .chip.selected { background: var(--accent-soft);
    border-color: #c7d7ff; color: var(--accent-dark); }
  .chip-x { border: 0; background: transparent; color: inherit;
    padding: 0 2px; margin-left: 2px; border-radius: 50%; font-size: 15px;
    line-height: 1; cursor: pointer; }
  .chip-x:hover { color: var(--danger); }
  .custom-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-top: 2px; }
  .custom-row input { flex: 1 1 280px; max-width: 460px; }
  .linklike { background: transparent; color: var(--accent); padding: 4px 2px;
    font-size: 12.5px; font-weight: 600; }
  .linklike:hover { text-decoration: underline; }
  .region-line { display: flex; flex-wrap: wrap; gap: 8px;
    align-items: center; }
  .region-wrap { position: relative; max-width: 520px; }
  .region-wrap input { width: 100%; min-width: 260px; }
  .region-results { position: absolute; z-index: 30; top: calc(100% + 4px);
    left: 0; right: 0; max-height: 300px; overflow: auto; background: #fff;
    border: 1px solid var(--line); border-radius: 10px; padding: 4px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .12); }
  .region-item { display: flex; flex-direction: column; align-items: flex-start;
    gap: 1px; width: 100%; text-align: left; padding: 8px 10px; border: 0;
    border-radius: 7px; background: #fff; color: var(--text);
    font-size: 13.5px; font-weight: 500; }
  .region-item:hover { background: #f5f8ff; }
  .region-item .path { font-size: 11.5px; color: var(--muted);
    font-weight: 400; }
  .region-empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }
  .inline-check { display: flex; gap: 7px; align-items: center;
    font-size: 13.5px; color: var(--text); margin-top: 4px; }
  .selection-bar { display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center; margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--line); }
  .selection-bar .summary-text { color: var(--muted); font-size: 12.5px;
    flex: 1 1 260px; }
  .selection-bar .primary { margin-left: auto; }
  .save-error { color: var(--danger); font-size: 12.5px; font-weight: 600; }
  .profile-state { color: var(--warn); font-size: 12px; font-weight: 600; }
  .checks { display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 9px; }
  .checks label { display: flex; gap: 7px; align-items: center; font-size: 14px;
    text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 500; }
  button { border: 0; border-radius: 10px; padding: 10px 18px; font: inherit;
    font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
  .primary { background: var(--accent); color: #fff; }
  .primary:hover { background: var(--accent-dark); }
  .primary:active { background: #1e40af; }
  .ghost { background: var(--chip); color: var(--text); }
  .ghost:hover { background: #e4e7ec; }
  .ghost:active { background: #d9dde3; }
  button:disabled { opacity: .55; cursor: default; }
  .primary:disabled:hover { background: var(--accent); }
  .ghost:disabled:hover { background: var(--chip); }
  .small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
  button:focus-visible, input:focus-visible, select:focus-visible,
  textarea:focus-visible, summary:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px; }
  .th-sort:focus-visible { outline-offset: -2px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0; }
  fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
  fieldset:disabled .field label, fieldset:disabled .checks,
  fieldset:disabled .hint { opacity: .6; }
  .form-error { display: none; margin-top: 10px; color: var(--danger);
    font-size: 13px; font-weight: 600; }
  .form-error.show { display: block; }
  .hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
  #status { display: none; }
  .bar { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; }
  .bar > i { display: block; height: 100%; width: 0; background: var(--accent);
    transition: width .35s; }
  .statusline { display: flex; justify-content: space-between; gap: 12px;
    align-items: center; font-size: 13.5px; color: var(--muted);
    margin-bottom: 8px; }
  #status-text { flex: 1 1 auto; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  .status-side { display: flex; align-items: center; gap: 10px; flex: none; }
  #status-count { white-space: nowrap; }
  .status-actions { display: flex; gap: 8px; }
  #status.collapsed .bar, #status.collapsed pre.log { display: none; }
  .error-box { border: 1px solid var(--danger-line); background: var(--danger-soft);
    color: var(--danger); border-radius: 10px; padding: 10px 12px;
    font-size: 13.5px; margin-top: 12px; }
  .error-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .error-line .err-icon { font-size: 16px; }
  .error-line .grow { flex: 1; }
  .err-details { margin-top: 6px; color: #7a271a; }
  .err-details summary { cursor: pointer; font-size: 12.5px; }
  .err-details pre { margin: 8px 0 0; white-space: pre-wrap; font-size: 12px;
    background: #fff; border: 1px solid var(--danger-line); border-radius: 8px;
    padding: 8px 10px; max-height: 160px; overflow: auto; }
  .warnings { border: 1px solid var(--warn-line); background: var(--warn-soft);
    color: var(--warn); border-radius: 10px; padding: 10px 12px;
    font-size: 13px; margin-top: 12px; display: flex; flex-direction: column;
    gap: 4px; }
  .warnings .w { display: flex; gap: 8px; }
  pre.log { margin: 12px 0 0; max-height: 132px; overflow: auto; font-size: 12.5px;
    color: #4b5563; background: #fafbfc; border: 1px solid var(--line);
    border-radius: 9px; padding: 10px 12px; white-space: pre-wrap; }
  #results { display: none; }
  .summary { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
  .stat b { font-size: 22px; display: block; }
  .stat span { color: var(--muted); font-size: 13px; }
  .tabs { display: flex; gap: 6px; margin-bottom: 14px; }
  .tab { background: transparent; color: var(--muted); padding: 8px 14px;
    border-radius: 9px; font-weight: 600; }
  .tab:hover { background: var(--chip); }
  .tab.active { background: var(--accent-soft); color: var(--accent); }
  .toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    margin: 12px 0; }
  .filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    flex: 1 1 560px; min-width: 0; }
  .filters #f-text { flex: 1 1 320px; min-width: 220px; max-width: 520px; }
  .filters select { max-width: 210px; }
  .export { display: flex; gap: 8px; margin-left: auto; }
  .tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: 11px;
    max-height: 68vh; }
  table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  th { position: sticky; top: 0; background: #fafbfc; text-align: left;
    border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
    color: var(--muted); text-transform: uppercase; letter-spacing: .3px;
    font-weight: 700; }
  th[data-sort] { padding: 0; }
  th:not([data-sort]) { padding: 10px 12px; }
  .th-sort { display: block; width: 100%; padding: 10px 12px; border: 0;
    border-radius: 0; background: transparent; color: inherit; font: inherit;
    font-weight: inherit; letter-spacing: inherit; text-transform: inherit;
    text-align: left; white-space: nowrap; cursor: pointer; }
  .th-sort:hover { color: var(--text); }
  th.sorted .th-sort { color: var(--text); }
  th[data-dir="asc"] .th-sort::after { content: " ↑"; font-size: 11px; }
  th[data-dir="desc"] .th-sort::after { content: " ↓"; font-size: 11px; }
  td { padding: 9px 12px; border-bottom: 1px solid #f0f2f4; vertical-align: top; }
  td.salary { white-space: nowrap; }
  tr:hover td { background: #fafcff; }
  .small-text { font-size: 11.5px; }
  .src { display: inline-block; padding: 2px 8px; border-radius: 99px;
    background: var(--chip); font-size: 11.5px; font-weight: 600;
    color: #4b5563; white-space: nowrap; }
  .src.hh-api, .src.hh { background: #ffe9e5; color: #b42318; }
  .src.habr { background: #e8f1ff; color: #1d4ed8; }
  .src.trudvsem { background: #e7f7ee; color: #067647; }
  .src.superjob { background: #eef2ff; color: #4338ca; }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  .muted { color: var(--muted); }
  @media (max-width: 1100px) {
    .filters { flex-basis: 100%; }
  }
  @media (max-width: 720px) {
    input[type=text] { min-width: 100%; }
    .filters #f-text { max-width: none; }
    .export { margin-left: 0; }
  }
  .spacer { flex: 1; }
  .mt16 { margin-top: 16px; }
  .ml-auto { margin-left: auto; }
  .salary-input { width: 150px; }
  .headrow { display: flex; align-items: flex-start;
    justify-content: space-between; gap: 16px; }
  .logout { margin: 0; }
  body.login-page { display: flex; align-items: center;
    justify-content: center; min-height: 100vh; padding: 20px; }
  .login-wrap { width: 100%; max-width: 380px; }
  .login-card { display: flex; flex-direction: column; gap: 8px;
    padding: 26px; }
  .login-card h1 { font-size: 22px; margin: 0; }
  .login-card .sub { margin-bottom: 6px; }
  .login-card label { font-size: 13.5px; color: var(--muted);
    margin-top: 8px; }
  .login-card input { padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 10px; font: inherit; width: 100%; }
  .login-card .primary { margin-top: 12px; }
  .login-error { min-height: 20px; color: var(--danger);
    font-size: 13.5px; }
