/* Светлый «дашборд»: тёплый серый фон, белые карточки, шалфейный акцент, мятные и чёрные пилюли. */
:root {
  --bg: #e6e5e0;
  --surface: #ffffff;
  --surface-2: #f4f4f1;
  --line: #ecece7;
  --line-strong: #dcdcd5;
  --text: #191b1a;
  --muted: #6a6f6b;
  --faint: #9b9f9b;
  --accent: #5e7d68;
  --accent-strong: #4b6955;
  --accent-ink: #ffffff;
  --accent-soft: #e4ece6;
  --mint: #d5e9e2;
  --mint-ink: #2f5a4b;
  --ink: #161816;
  --ink-text: #ffffff;
  --good: #3c7d55;
  --good-soft: #e1efe5;
  --mid: #9a6a24;
  --mid-soft: #f5ecdc;
  --low: #7f847f;
  --low-soft: #efefeb;
  --law: #6b55ad;
  --law-soft: #ece5f7;
  --danger: #b9473f;
  --danger-soft: #f8e4e1;
  --shadow: 0 1px 2px rgba(25, 27, 26, .03);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #121413;
    --surface: #1c1f1d;
    --surface-2: #242826;
    --line: #2b2f2c;
    --line-strong: #3a3f3b;
    --text: #edf0ed;
    --muted: #a7ada8;
    --faint: #7c827d;
    --accent: #8db299;
    --accent-strong: #a5c6af;
    --accent-ink: #102017;
    --accent-soft: #24332a;
    --mint: #20352e;
    --mint-ink: #a9d8c7;
    --ink: #edf0ed;
    --ink-text: #121413;
    --good: #7fc79a;
    --good-soft: #1f3327;
    --mid: #e0b067;
    --mid-soft: #382d1a;
    --low: #a7ada8;
    --low-soft: #2a2e2b;
    --law: #b9a4ef;
    --law-soft: #2c2640;
    --danger: #f08b80;
    --danger-soft: #3b2220;
    --shadow: none;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.015em; }
h2 { font-size: 24px; font-weight: 800; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Каркас ---------- */
.shell { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 22px; max-width: 1380px; margin: 0 auto; padding: 22px; }
.rail {
  position: sticky; top: 22px; height: calc(100vh - 44px); min-height: 460px;
  background: var(--surface); border-radius: 40px; padding: 16px 0;
  display: flex; flex-direction: column; align-items: center; gap: 18px; box-shadow: var(--shadow);
}
.rail-logo { color: var(--accent); display: grid; place-items: center; height: 44px; }
.rail-nav { display: flex; flex-direction: column; gap: 10px; }
.rail-nav button {
  position: relative; width: 46px; height: 46px; border-radius: 50%; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s;
}
.rail-nav button svg { width: 22px; height: 22px; }
.rail-nav button > span:not(.badge) { display: none; }
.rail-nav button:hover { background: var(--surface-2); color: var(--text); }
.rail-nav button[aria-selected="true"] { background: var(--ink); color: var(--ink-text); }
.rail-nav .badge {
  position: absolute; top: -2px; right: -6px; background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--surface); border-radius: 99px; font-size: 10.5px; font-weight: 800; padding: 0 5px; min-width: 20px; line-height: 16px; text-align: center;
}
.rail-spacer { flex: 1; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--mint); color: var(--mint-ink); font-weight: 800; font-size: 14px;
}

.content { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; min-height: 60px; }
.hello { flex: 1; min-width: 220px; }
.hello h1 { font-size: 28px; font-weight: 800; }
.hello p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.search-pill {
  display: flex; align-items: center; gap: 0; background: var(--surface); border-radius: 99px;
  padding: 6px 6px 6px 22px; width: min(520px, 100%); box-shadow: var(--shadow); border: 1px solid transparent;
}
.search-pill:focus-within { border-color: var(--accent); }
.search-pill input { border: 0; outline: none; background: none; min-width: 0; padding: 8px 0; font-size: 14.5px; }
.search-pill input:first-child { flex: 1; }
.search-pill .sp-city { width: 120px; padding-left: 14px; }
.sp-div { width: 1px; height: 22px; background: var(--line-strong); }
.sp-go, .round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; flex: none;
}
.sp-go { background: var(--ink); color: var(--ink-text); }
.sp-go svg, .round-btn svg { width: 19px; height: 19px; stroke-width: 2.1; }
.round-btn { background: var(--surface); color: var(--text); width: 52px; height: 52px; box-shadow: var(--shadow); }
.round-btn:hover { color: var(--accent-strong); }
.round-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.save-state { color: var(--faint); font-size: 12.5px; white-space: nowrap; min-width: 70px; }
.profile-btn {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 4px 18px 4px 4px; border: 1px solid transparent;
  border-radius: 99px; background: var(--surface); cursor: pointer; text-align: left; box-shadow: var(--shadow);
}
.profile-btn:hover { border-color: var(--accent); }
.profile-btn.active { background: var(--ink); color: var(--ink-text); }
.pb-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.pb-text { display: flex; flex-direction: column; line-height: 1.2; }
.pb-text b { font-size: 14px; }
.pb-text small { font-size: 12px; color: var(--muted); font-weight: 600; }
.profile-btn.active .pb-text small { color: inherit; opacity: .75; }
.back-link { border: 0; background: none; padding: 0; margin-bottom: 6px; color: var(--accent-strong); font-weight: 700; font-size: 14px; cursor: pointer; }
.back-link:hover { text-decoration: underline; }
.exp-note { color: var(--muted); font-weight: 600; margin-left: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.related-btn { background: var(--mint); color: var(--mint-ink); border-color: transparent; }
.related-btn:hover { color: var(--mint-ink); border-color: var(--accent); }
.related-btn.active { background: var(--ink); color: var(--ink-text); }
.related-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rchip { border: 0; background: var(--surface); color: var(--text); border-radius: 99px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.rchip span { background: var(--surface-2); border-radius: 99px; padding: 0 7px; font-size: 12px; color: var(--muted); }
.rchip:hover { color: var(--accent-strong); }
.rchip[aria-pressed="true"] { background: var(--ink); color: var(--ink-text); }
.rchip[aria-pressed="true"] span { background: color-mix(in srgb, var(--ink-text) 18%, transparent); color: inherit; }
.sec-head .btn { margin-left: auto; }
.account-card { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 16px 20px; }
.acc-text { flex: 1; min-width: 240px; color: var(--muted); font-size: 14px; }
.acc-text b { color: var(--text); }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

main { padding-bottom: 110px; }
.tab { display: none; }
.tab.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Общие элементы ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; }
.card h3 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.card .hint, .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); padding: 9px 18px; border-radius: 99px; cursor: pointer; font-weight: 700; text-decoration: none;
  color: var(--text); font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn.ghost { border-color: transparent; background: var(--surface-2); }
.btn.small { padding: 6px 13px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 10px; color: var(--faint); font-size: 18px; line-height: 1; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 16px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Плитки статистики ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stats:empty { display: none; }
.stat {
  background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); min-height: 92px; border: 0; text-align: left; color: var(--text); font: inherit;
}
.stat > div { min-width: 0; }
.stat-label { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.stat-icon { width: 50px; height: 50px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; flex: none; }
.stat-icon.warm { background: var(--mid-soft); color: var(--mid); }
.stat-icon svg { width: 22px; height: 22px; }
.mini-bars { margin-left: auto; display: flex; align-items: flex-end; gap: 5px; height: 44px; }
.mini-bars span { width: 6px; border-radius: 99px; background: var(--accent); opacity: .85; }
.mini-bars span.today { background: var(--ink); opacity: 1; }
.stat.accent { background: var(--accent); color: var(--accent-ink); cursor: pointer; position: relative; overflow: hidden; }
.stat.accent .stat-label { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.stat.accent .wave { margin-left: auto; width: 90px; height: 40px; stroke: var(--accent-ink); stroke-width: 2.5; opacity: .9; flex: none; }
.stat.accent:hover { background: var(--accent-strong); }

/* ---------- Анкета ---------- */
.completion { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; background: var(--surface); border-radius: 99px; padding: 12px 22px; }
.completion .meter { flex: 1; min-width: 180px; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.completion .meter span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.completion .pct { font-weight: 700; color: var(--muted); font-size: 14px; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-grid .wide { grid-column: 1 / -1; }
.prefs-card { background: var(--mint); }
.prefs-card .hint { color: var(--mint-ink); opacity: .85; }
.prefs-card h3 { color: var(--mint-ink); }
.prefs-card .chips, .prefs-card label.f input { background: var(--surface); border-color: transparent; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fields .full { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.f-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
label.f input, label.f select, label.f textarea, .chips, .row-item input, .row-item select, .row-item textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px;
  font-weight: 500; color: var(--text); font-size: 14.5px;
}
label.f textarea, .row-item textarea { resize: vertical; min-height: 76px; }
label.f input:focus, label.f select:focus, label.f textarea:focus, .row-item input:focus, .row-item textarea:focus, .row-item select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 99px; padding: 6px 14px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text); user-select: none; }
.prefs-card .check { border-color: transparent; }
.check input { accent-color: var(--accent); margin: 0; }
.check:has(input:checked) { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; cursor: text; min-height: 46px; align-items: center; }
.chips:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-strong); border-radius: 99px; padding: 4px 4px 4px 12px; font-size: 13.5px; font-weight: 700; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 6px; border-radius: 99px; opacity: .65; }
.chip button:hover { opacity: 1; }
.chips input { border: 0 !important; outline: none; box-shadow: none !important; flex: 1; min-width: 150px; padding: 4px !important; background: transparent !important; }
.chips.neg .chip { background: var(--danger-soft); color: var(--danger); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.suggest button { border: 0; background: var(--surface); opacity: .8; border-radius: 99px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--mint-ink); cursor: pointer; }
.suggest button:hover { opacity: 1; }

.rows { display: flex; flex-direction: column; gap: 12px; }
.row-item { border-radius: var(--r-md); padding: 14px; background: var(--surface-2); position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.row-item .full { grid-column: 1 / -1; }
.row-item .lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.row-item .remove { position: absolute; top: 6px; right: 6px; }
.row-item.lang { grid-template-columns: 1fr 1fr auto; align-items: end; }
.row-item.lang .remove { position: static; }
.add-row { margin-top: 12px; }
.empty-note { color: var(--faint); font-size: 13.5px; padding: 6px 0; }

.sticky-actions {
  position: fixed; bottom: 18px; left: calc(50% + 49px); transform: translateX(-50%); z-index: 15;
  width: min(1180px, calc(100% - 164px)); padding: 10px 10px 10px 22px;
  background: var(--surface); border-radius: 99px; box-shadow: 0 8px 30px rgba(25, 27, 26, .12);
}
.sticky-actions .inner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-actions .spacer { flex: 1; }
.sticky-actions .note { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ---------- Подбор ---------- */
.qs-current { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.qs-current .chip { background: var(--ink); color: var(--ink-text); }
.progress { margin-bottom: 16px; background: var(--surface); border-radius: var(--r-md); padding: 12px 16px; }
.progress .bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; border-radius: 99px; }
.progress .ptext { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 8px; font-weight: 600; }
.progress details { margin-top: 6px; font-size: 13px; color: var(--muted); }
.progress summary { cursor: pointer; }
.progress details ul { margin: 8px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.progress details li { break-inside: avoid; padding: 1px 0; }
.st-ok { color: var(--good); } .st-error { color: var(--danger); } .st-loading { color: var(--faint); }

.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--surface); border-radius: 99px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 99px; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); }
.filters select, select.btn { border: 0; background: var(--surface); border-radius: 99px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.filters .switch-row { background: var(--surface); border-radius: 99px; padding: 8px 16px; font-size: 13.5px; }

.notice { border-radius: var(--r-md); padding: 12px 16px; background: var(--mid-soft); color: var(--text); font-size: 14px; margin-bottom: 12px; font-weight: 500; }
.notice.info { background: var(--mint); color: var(--mint-ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.sec-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.sec-head h3 { font-size: 19px; font-weight: 800; }
.sec-head span { color: var(--muted); font-size: 13.5px; }
.vcard { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: transform .15s, box-shadow .15s; }
.vcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(25, 27, 26, .07); }
.vcard.applied { opacity: .78; }
.vc-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); flex-wrap: wrap; font-weight: 600; }
.vc-top .spacer { flex: 1; }
.score { font-weight: 800; border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
.score.high { background: var(--mint); color: var(--mint-ink); }
.score.mid { background: var(--mid-soft); color: var(--mid); }
.score.low { background: var(--low-soft); color: var(--low); }
.src { border-radius: 99px; padding: 3px 10px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.vcard h3 { font-size: 17.5px; font-weight: 800; overflow-wrap: anywhere; }
.vcard h3 a { color: inherit; text-decoration: none; }
.vcard h3 a:hover { color: var(--accent-strong); }
.vc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.vc-meta .salary { color: var(--text); font-weight: 800; }
.vc-snippet { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; border-radius: 99px; padding: 2px 10px; background: var(--good-soft); color: var(--good); font-weight: 700; }
.hr { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; overflow-wrap: anywhere; }
.hr .lbl { font-weight: 800; color: var(--text); }
.hr a { text-decoration: none; font-weight: 600; }
.hr a:hover { text-decoration: underline; }
.hr.none { color: var(--faint); }
.vc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.star[aria-pressed="true"] { color: #d69a00; }
.more-wrap { text-align: center; margin: 20px 0; }

.sites { margin-top: 26px; }
.sites h3 { margin-bottom: 4px; }
.sites p { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px; }

.empty { text-align: center; padding: 52px 20px; color: var(--muted); background: var(--surface); border-radius: var(--r-lg); }
.empty h3 { color: var(--text); font-size: 20px; font-weight: 800; margin-bottom: 8px; justify-content: center; display: flex; }
.empty .btn { margin-top: 16px; }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }

/* ---------- Лента ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fitem { background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; box-shadow: var(--shadow); }
.ficon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: var(--mint); color: var(--mint-ink); }
.fitem.news .ficon { background: var(--law-soft); color: var(--law); }
.fmeta { font-size: 12.5px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-weight: 600; }
.fmeta .kind { font-weight: 800; color: var(--accent-strong); }
.fitem.news .fmeta .kind { color: var(--law); }
.ftitle { font-weight: 750; font-size: 15.5px; color: var(--text); text-decoration: none; display: block; margin: 3px 0; overflow-wrap: anywhere; }
a.ftitle:hover { color: var(--accent-strong); }
.fbody { font-size: 13.5px; color: var(--muted); display: flex; gap: 4px 12px; flex-wrap: wrap; }
.fbody button { padding: 0; border: 0; background: none; color: var(--accent-strong); cursor: pointer; font-weight: 700; font-size: 13.5px; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.side-card { position: sticky; top: 22px; }
.side-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.side-card li { margin-bottom: 6px; }
.side-card a { color: var(--accent-strong); font-weight: 600; }
.side-sub { margin: 14px 0 0; font-size: 14px; }
.forig { font-size: 12.5px; color: var(--faint); margin: 2px 0 4px; overflow-wrap: anywhere; }
.fbody a { color: var(--accent-strong); font-weight: 700; }
.law-topics { margin: -4px 0 14px; }
.law-topics[hidden] { display: none; }
.law-topics button[data-topic=""][aria-pressed="true"]::before { content: none; }

/* ---------- Резюме ---------- */
.paper { background: #fff; color: #1d2330; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 44px 48px; max-width: 840px; }
.resume-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }

/* ---------- Окно вакансии ---------- */
dialog { border: 0; padding: 0; border-radius: 26px; width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(20, 22, 21, .45); backdrop-filter: blur(3px); }
.dlg-head { position: sticky; top: 0; background: var(--surface); padding: 22px 24px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; z-index: 2; }
.dlg-head h2 { font-size: 22px; overflow-wrap: anywhere; }
.dlg-head .grow { flex: 1; min-width: 0; }
.dlg-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dlg-col { padding: 20px 24px; min-width: 0; }
.dlg-col + .dlg-col { background: var(--surface-2); }
.dlg-col h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.vtext { white-space: pre-wrap; font-size: 14px; color: var(--text); overflow-wrap: anywhere; max-height: 46vh; overflow: auto; padding-right: 6px; }
.contact-box { border-radius: var(--r-md); padding: 14px; margin-bottom: 18px; background: var(--mint); color: var(--mint-ink); }
.contact-box .person { font-weight: 800; margin-bottom: 8px; color: var(--text); }
.contact-box .hint { color: var(--mint-ink); }
.contact-list { display: flex; flex-direction: column; gap: 7px; }
.contact-list a { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; overflow-wrap: anywhere; color: var(--mint-ink); font-weight: 700; }
.contact-list a:hover { text-decoration: underline; }
.adapt-list { margin: 0 0 14px; padding-left: 18px; font-size: 13.5px; }
.adapt-list li { margin-bottom: 5px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
textarea.letter { width: 100%; min-height: 220px; border: 0; border-radius: var(--r-md); padding: 14px; font-size: 13.5px; background: var(--surface); resize: vertical; }
.mini-paper { background: #fff; color: #1d2330; border-radius: var(--r-md); padding: 18px 20px; margin-top: 10px; max-height: 50vh; overflow: auto; }
.mini-paper .cv { font-size: 12px; }
.mini-paper .cv h1 { font-size: 20px; }

.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--ink-text); padding: 11px 20px; border-radius: 99px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Адаптивность ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .profile-grid, .feed-layout, .resume-layout, .dlg-body { grid-template-columns: minmax(0, 1fr); }
  .side-card { position: static; }
  .progress details ul { columns: 1; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 96px; gap: 0; }
  .rail {
    position: fixed; top: auto; bottom: 12px; left: 12px; right: 12px; height: auto; min-height: 0; z-index: 30;
    flex-direction: row; padding: 8px; border-radius: 99px; box-shadow: 0 8px 30px rgba(25, 27, 26, .15);
  }
  .rail-logo, .rail-spacer, .avatar { display: none; }
  .rail-nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .rail-nav button { width: auto; height: auto; border-radius: 99px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .rail-nav button > span:not(.badge) { display: block; font-size: 11px; font-weight: 700; }
  .rail-nav button svg { width: 20px; height: 20px; }
  .rail-nav .badge { right: 4px; }
  .hello h1 { font-size: 23px; }
  .search-pill { width: 100%; order: 3; }
  .profile-btn { padding-right: 14px; height: 48px; }
  .pb-avatar { width: 38px; height: 38px; }
  .pb-text small { display: none; }
  .search-pill .sp-city { width: 90px; }
  .save-state { display: none; }
  .stats { gap: 10px; }
  .stat { padding: 14px; min-height: 80px; gap: 10px; }
  .stat-value { font-size: 22px; }
  .stat-icon { display: none; }
  .mini-bars, .stat.accent .wave { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .fields, .row-item, .row-item.lang { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  .paper { padding: 24px 18px; }
  .sticky-actions { left: 50%; width: calc(100% - 24px); bottom: 84px; border-radius: var(--r-lg); padding: 10px 12px; }
  .sticky-actions .note { display: none; }
  .toast { bottom: 150px; }
  .dlg-head, .dlg-col { padding-left: 16px; padding-right: 16px; }
}

/* ================= Главная: обновлённая выдача ================= */
.rail-theme { width: 46px; height: 46px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.rail-theme:hover { background: var(--surface-2); color: var(--text); }
.rail-theme svg { width: 20px; height: 20px; }

/* плитки — это кнопки-фильтры */
button.stat { cursor: pointer; transition: box-shadow .15s, transform .15s, background .15s; outline-offset: 3px; }
button.stat:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(25, 27, 26, .07); }
.stat.on { box-shadow: inset 0 0 0 2px var(--ink); }
.stat.accent.on { box-shadow: inset 0 0 0 2px var(--accent-ink); }
.stat-hint { font-size: 12px; opacity: .85; margin-top: 2px; font-weight: 600; }

.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.rh-meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.rh-left .qs-current { margin-top: 10px; }

.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.views { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-strong); }
.views button { border: 0; background: none; padding: 10px 14px; font-size: 14.5px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2.5px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.views button:hover { color: var(--text); }
.views button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--ink); }
.views #relatedBtn { color: var(--accent-strong); }
.views #relatedBtn[aria-pressed="true"] { border-bottom-color: var(--accent); }
.vcount { background: var(--surface); color: var(--muted); border-radius: 99px; font-size: 12px; padding: 0 7px; }
.vcount:empty { display: none; }

.qfilters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qfilters button { border: 1px solid transparent; background: var(--surface); color: var(--text); border-radius: 99px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.qfilters button:hover { border-color: var(--accent); }
.qfilters button[aria-pressed="true"] { background: var(--ink); color: var(--ink-text); }
.qfilters select { margin-left: auto; border: 0; background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text); }

.live-progress { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.live-progress .bar { flex: 1; max-width: 360px; height: 4px; background: var(--line-strong); border-radius: 99px; overflow: hidden; }
.live-progress .bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .25s; }

.sec-head .cnt { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 99px; padding: 1px 9px; vertical-align: middle; }

/* карточка вакансии */
.vcard { gap: 12px; }
.vc-head { display: flex; gap: 12px; align-items: flex-start; }
.vc-logo { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: hsl(var(--lh) 28% 90%); color: hsl(var(--lh) 32% 30%); }
:root[data-theme="dark"] .vc-logo { background: hsl(var(--lh) 18% 24%); color: hsl(var(--lh) 40% 80%); }
.vc-titles { flex: 1; min-width: 0; }
.vc-titles h3 { font-size: 16.5px; }
.vc-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-orig { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.vc-head .score { flex: none; }
.vc-salary { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.vc-snippet { -webkit-line-clamp: 2; }
.vc-info { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.vc-actions { align-items: center; }
.vc-actions .spacer { flex: 1; }
.sq-btn { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; font-size: 17px; text-decoration: none; }
.sq-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.sq-btn svg { width: 18px; height: 18px; }
.sq-btn.star[aria-pressed="true"] { color: #d69a00; border-color: #e8c66a; }
.hr { padding: 8px 12px; }
.hr .lbl { background: var(--ink); color: var(--ink-text); border-radius: 6px; padding: 0 6px; font-size: 11.5px; }

/* заглушки во время загрузки */
.skeleton { pointer-events: none; }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 10px; }
.sk-head { height: 44px; width: 70%; }
.sk-line { height: 12px; }
.sk-line.short { width: 55%; }
.sk-btn { height: 32px; width: 140px; border-radius: 99px; margin-top: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* пустая главная: популярные профессии */
.popular { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.popular button { border: 0; background: var(--mint); color: var(--mint-ink); border-radius: 99px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 14px; }
.popular button:hover { background: var(--ink); color: var(--ink-text); }

.src-details { margin-top: 14px; font-size: 13px; color: var(--muted); }
.src-details summary { cursor: pointer; font-weight: 600; }
.src-details ul { margin: 8px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.src-details li { break-inside: avoid; padding: 1px 0; }

@media (max-width: 760px) {
  .rail-theme { display: none; }
  .qfilters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .qfilters button, .qfilters select { flex: none; }
  .src-details ul { columns: 1; }
}
.vc-info .translate { color: var(--accent-strong); text-decoration: none; font-weight: 700; } .vc-info .translate:hover { text-decoration: underline; }

/* ================= Иконки ================= */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; stroke-width: 1.9; }
.card h3 .ic { width: 22px; height: 22px; color: var(--accent); }
.prefs-card h3 .ic { color: var(--mint-ink); }
.hr a, .contact-list a, .fbody span, .vc-meta span, .back-link, #findBtn, .views button, .site-links .btn, .dl-row .btn, .tag { display: inline-flex; align-items: center; gap: 5px; }
.hr a .ic, .contact-list a .ic { width: 16px; height: 16px; }
.ficon .ic { width: 21px; height: 21px; }
.sq-btn .ic { width: 18px; height: 18px; }
.sq-btn.star[aria-pressed="true"] .ic, .star[aria-pressed="true"] .ic { fill: currentColor; }
.stat-icon .ic { width: 22px; height: 22px; }
.avatar .ic, .pb-avatar .ic { width: 20px; height: 20px; }
.src-details .ic { width: 13px; height: 13px; color: var(--good); }
/* приветствие ушло в шапку — заголовок раздела в шапке, дубль над выдачей прячем */
body.greeted .rh-title, body.greeted #matchSummary { display: none; }
body.greeted .rh-left .qs-current { margin-top: 0; }
.letter-hint { margin: -4px 0 8px; font-size: 12.5px; }

/* ================= Фото и резюме по шаблону ================= */
.photo-field { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.photo-preview { width: 72px; height: 96px; border-radius: 12px; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview .ic { width: 28px; height: 28px; }
.paper { padding: 48px 56px; }
.paper .cv, .mini-paper .cv { background: transparent; }
.mini-paper .cv { font-size: 12px; }
.mini-paper .cv h1 { font-size: 20px; }
.mini-paper .cv h3 { font-size: 13px; }
.mini-paper .cv .cv-photo { width: 72px; height: 96px; }
.mini-paper .cv .cv-ind { padding-left: 24px; }
@media (max-width: 640px) {
  .paper .cv .cv-head { flex-direction: column-reverse; }
  .paper .cv .cv-row { flex-wrap: wrap; }
}
@media (max-width: 760px) { .paper { padding: 22px 16px; } }

/* ================= Цветовые темы ================= */
:root { --card-border: transparent; }
:root[data-theme="sky"] {
  --bg: #DDE9F7; --surface: #FFFFFF; --surface-2: #F1F6FC; --line: #E4ECF6; --line-strong: #C8D7EB;
  --text: #13213A; --muted: #566781; --faint: #8C9AB0;
  --accent: #3D6DB0; --accent-strong: #2D5895; --accent-ink: #FFFFFF; --accent-soft: #E6EFFA;
  --mint: #DDE9F7; --mint-ink: #24497E; --ink: #13213A; --ink-text: #FFFFFF;
}
:root[data-theme="wine"] {
  --bg: #EFE7E6; --surface: #FFFFFF; --surface-2: #F8F2F1; --line: #EEE2E1; --line-strong: #DCC8C6;
  --text: #1F1213; --muted: #6F5B5B; --faint: #A38E8D;
  --accent: #5F0008; --accent-strong: #4A0006; --accent-ink: #FFFFFF; --accent-soft: #F4E2E3;
  --mint: #F2DEDF; --mint-ink: #5F0008; --ink: #2B0A0D; --ink-text: #FFFFFF;
}
:root[data-theme="beige"] {
  --bg: #E9DED4; --surface: #FFFCF9; --surface-2: #F6EFE9; --line: #EEE4DB; --line-strong: #DCCABD;
  --text: #2A1F18; --muted: #75655A; --faint: #A69689;
  --accent: #C7AE9C; --accent-strong: #7E5F4A; --accent-ink: #2A1F18; --accent-soft: #F2E8E0;
  --mint: #EFE4DA; --mint-ink: #6A4C38; --ink: #2A1F18; --ink-text: #FFFFFF;
}
:root[data-theme="white"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F5F5F5; --line: #EDEDED; --line-strong: #DADADA;
  --text: #111111; --muted: #5E5E5E; --faint: #9A9A9A;
  --accent: #111111; --accent-strong: #000000; --accent-ink: #FFFFFF; --accent-soft: #F2F2F2;
  --mint: #F2F2F2; --mint-ink: #111111; --ink: #111111; --ink-text: #FFFFFF;
  --card-border: #E6E6E6;
}
:root[data-theme="black"] {
  --bg: #000000; --surface: #121212; --surface-2: #1C1C1C; --line: #262626; --line-strong: #383838;
  --text: #F2F2F2; --muted: #A6A6A6; --faint: #757575;
  --accent: #F2F2F2; --accent-strong: #FFFFFF; --accent-ink: #000000; --accent-soft: #1F1F1F;
  --mint: #1F1F1F; --mint-ink: #F2F2F2; --ink: #F2F2F2; --ink-text: #000000;
  --good: #7fc79a; --good-soft: #1b2a20; --mid: #e0b067; --mid-soft: #2e2615; --low: #a6a6a6; --low-soft: #1f1f1f;
  --law: #b9a4ef; --law-soft: #241f33; --danger: #f08b80; --danger-soft: #331d1b; --shadow: none;
  --card-border: #222222;
  color-scheme: dark;
}
:root[data-theme="black"] .vc-logo { background: hsl(var(--lh) 12% 18%); color: hsl(var(--lh) 30% 82%); }
.card, .stat, .vcard, .fitem, .search-pill, .profile-btn, .round-btn, .rail, .progress, .seg, .qfilters button, .qfilters select, .sticky-actions { border: 1px solid var(--card-border); }
.stat.on { box-shadow: inset 0 0 0 2px var(--ink); }

/* выбор темы */
.theme-pop {
  position: fixed; z-index: 60; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18); width: 236px;
}
.theme-pop h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.theme-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-list button { border: 1px solid var(--line-strong); background: none; border-radius: 12px; padding: 8px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--text); }
.theme-list button[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
/* выбор языка: список в две колонки, сверху — языки страны */
.lang-pop { width: 300px; max-height: min(520px, calc(100vh - 16px)); overflow-y: auto; }
.lang-pop .theme-list { grid-template-columns: 1fr 1fr; gap: 6px; }
.lang-pop .theme-list button { flex-direction: row; justify-content: flex-start; padding: 7px 9px; font-size: 13px; text-align: left; }
.lang-code { font-size: 10.5px; font-weight: 800; color: var(--muted); min-width: 20px; }
.lang-sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); position: relative; overflow: hidden; }
.swatch::after { content: ""; position: absolute; right: 0; bottom: 0; width: 50%; height: 50%; background: var(--sw-accent); }
.qfilters .qn { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 2px; } .qfilters .qn:empty { display: none; } .qfilters button[aria-pressed="true"] .qn { color: inherit; opacity: .75; }

/* ================= Обратная связь ================= */
dialog.fb-dialog { width: min(520px, calc(100vw - 32px)); }
.fb-form { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
.fb-form .hint { margin: 0; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-head h2 { font-size: 21px; }
.fb-text textarea { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; font-weight: 500; color: var(--text); font-size: 14.5px; resize: vertical; min-height: 120px; }
.fb-text textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-note { font-size: 12.5px; }

/* ================= Закон: выжимка ================= */
.fitem.news { cursor: pointer; }
.fitem.news:hover .ftitle { color: var(--accent-strong); }
.fsum { margin: 4px 0 6px; font-size: 13.5px; color: var(--text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fsum.muted { color: var(--muted); }
.fsum .lbl { font-weight: 800; color: var(--law); margin-right: 4px; }
dialog.law-dialog { width: min(760px, calc(100vw - 32px)); }
.law-dialog .dlg-head .fmeta { margin-bottom: 6px; }
.law-dialog .forig { margin-top: 6px; }
.law-body { padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 18px; }
.law-sec h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.law-sec p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.law-sec ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.law-sec li { font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.law-sec li::marker { color: var(--law); }
.law-sec .plain { color: var(--muted); }
.law-force { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--law-soft); color: var(--text); font-size: 14px; line-height: 1.5; }
.law-force .ic { color: var(--law); flex: none; margin-top: 2px; }
.law-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.law-note { font-size: 12.5px; color: var(--faint); margin: 0; line-height: 1.5; }
.law-loading { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.law-loading .sk { flex: 1; height: 12px; border-radius: 6px; }
.tr-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.tr-note button { padding: 0; border: 0; background: none; color: var(--accent-strong); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.vc-tr { font-size: 11.5px; color: var(--faint); font-weight: 700; }

/* ================= Правка резюме прямо в просмотре ================= */
.cv [contenteditable="true"] { border-radius: 3px; cursor: text; transition: background-color .15s; }
.cv [contenteditable="true"]:hover { background: #f3f6fb; box-shadow: 0 0 0 1px #d4deec; }
.cv [contenteditable="true"]:focus { outline: none; background: #fffbe8; box-shadow: 0 0 0 2px #e6c55c; }
.edit-hint { margin: 10px 0 8px; font-size: 13px; }
.link-btn { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--accent-strong); font-weight: 700; font-size: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
#dlgPreview .mini-paper { margin-top: 0; }

/* ================= Выбор дат: месяц и год списками ================= */
.ym { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; }
.ym.dmy { grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1fr); }
.ym select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm);
  padding: 10px 10px; font-weight: 500; color: var(--text); font-size: 14.5px; cursor: pointer;
}
.ym select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ym select:disabled { opacity: .5; cursor: default; }
div.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.exp-total { margin: -6px 0 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.exp-total:empty { display: none; }

/* Зарплата и валюта в одной строке */
.money-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.money-row input, .money-row select {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm);
  padding: 10px 12px; font-weight: 500; color: var(--text); font-size: 14.5px;
}
.prefs-card .money-row input, .prefs-card .money-row select { border-color: transparent; }
.money-row select { font-weight: 600; cursor: pointer; min-width: 96px; }
.money-row input:focus, .money-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ================= Главная: список + вакансия рядом ================= */
/* Рабочий экран, как в почте: слева короткие строки для быстрого просмотра, справа — выбранная вакансия целиком. */
.split { display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
.split.solo { grid-template-columns: minmax(0, 1fr); }
.split.solo .vdetail { display: none; }
.vlist-col { min-width: 0; }
.vlist {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.vlist > .empty { border-radius: 0; background: none; }
.vlist .sec-head {
  margin: 0; padding: 16px 18px 8px; gap: 4px 10px; background: var(--surface);
  border-top: 1px solid var(--line);
}
.vlist .sec-head:first-child { border-top: 0; }
.vlist .sec-head h3 { font-size: 15px; }
.vlist .sec-head > span { font-size: 12.5px; width: 100%; }
.vlist .sec-head .btn { margin-left: 0; }
.vlist .sec-head .cnt { background: var(--surface-2); }

.vrow {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 14px 16px 14px 18px; border-top: 1px solid var(--line); cursor: pointer;
  transition: background-color .15s ease-out;
}
.vlist .sec-head + .vrow { border-top: 0; }
.vrow:hover { background: var(--surface-2); }
.vrow.selected { background: var(--accent-soft); }
.vrow .vc-logo { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
.vr-main { min-width: 0; }
.vr-title { font-size: 15px; font-weight: 750; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.vr-title a { color: inherit; text-decoration: none; }
.vr-title a:focus-visible { outline-offset: 3px; border-radius: 4px; }
.vrow.selected .vr-title a { color: var(--accent-strong); }
.vrow.applied .vr-title a { color: var(--muted); }
.vr-sub { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 7px; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.vr-salary { color: var(--text); font-weight: 800; font-size: 13.5px; }
.vr-hr { display: inline-flex; gap: 5px; color: var(--good); }
.vr-hr .ic { width: 14px; height: 14px; }
.vr-applied { display: inline-flex; align-items: center; gap: 4px; color: var(--good); }
.vr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.vr-side .sq-btn { width: 32px; height: 32px; border-radius: 10px; border-color: transparent; background: none; }
.vr-side .sq-btn:hover { border-color: var(--line-strong); }
.vrow .sk-logo { width: 40px; height: 40px; border-radius: 12px; }
.vrow .sk-line { width: 72%; height: 13px; }
.vrow .sk-line.short { width: 48%; margin-top: 9px; }
.vrow .sk-score { width: 44px; height: 22px; border-radius: 99px; }
.vlist-col .more-wrap { margin: 14px 0 0; }

/* Вакансия справа: не уходит при прокрутке списка, внутри — своя прокрутка. */
.vdetail {
  position: sticky; top: 22px; max-height: calc(100vh - 44px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.vdetail [data-act="close"] { display: none; }
.dlg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.dlg-actions .btn.done { background: var(--good-soft); color: var(--good); border-color: transparent; }
.vdetail .dlg-head { padding: 22px 26px 16px; }
.vdetail .dlg-body { grid-template-columns: minmax(0, 1fr); }
.vdetail .dlg-col { padding: 20px 26px; }
.vdetail .dlg-col + .dlg-col { border-top: 1px solid var(--line); }
.vdetail .vtext { max-height: none; overflow: visible; line-height: 1.6; max-width: 75ch; }
.vdetail .contact-box { margin-bottom: 22px; }

/* Мелочи браузера — тоже из палитры темы. */
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--text); }
html { scrollbar-color: var(--line-strong) transparent; }
input, textarea { caret-color: var(--accent); }
.score, .qn, .vcount, .badge, .cnt, .vr-meta, .vr-salary { font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  /* Телефон: сначала поиск, потом кнопки анкеты и обновления. */
  .search-pill { order: 1; }
  .profile-btn, .round-btn { order: 2; }
  .vrow { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px 14px 14px; }
  .vrow .vc-logo { width: 36px; height: 36px; font-size: 14px; }
  .vlist .sec-head { padding: 14px 14px 6px; }
  /* В окне на телефоне шапка с кнопками не залипает, а описание не прокручивается отдельно. */
  .dlg-head { position: static; }
  dialog .vtext { max-height: none; overflow: visible; }
}
.split.solo .vrow.selected { background: none; }
.split.solo .vrow.selected .vr-title a { color: inherit; }

/* Вложенный пункт под переключателем (например, «Страна не важна» под удалёнкой). */
.sub-switch { padding-left: 28px; color: var(--muted); }

/* ================= Бренд offr ================= */
/* Знак в боковой панели; пока идёт поиск — вместо него «перемотка». */
/* Надпись offr без круга: цвет текста темы (в светлых — чёрная, в тёмных — светлая, иначе её не видно). */
.rail-logo { height: 44px; width: 100%; display: grid; place-items: center; color: var(--text); }
.rail-word { width: 54px; height: auto; fill: currentColor; overflow: visible; }
/* Пока идёт поиск — две f «перематываются» вперёд. */
.rail-word .rf { transform-box: fill-box; }
body.searching .rail-word .rf { animation: rail-ff .9s cubic-bezier(.5,0,.3,1) infinite; }
body.searching .rail-word .rf2 { animation-delay: .1s; }
@keyframes rail-ff { 0%, 100% { transform: translateX(0); } 45% { transform: translateX(14%); opacity: .35; } 46% { transform: translateX(-14%); opacity: .35; } }
@media (prefers-reduced-motion: reduce) { body.searching .rail-word .rf { animation: none; } }

/* Тема offr (светлая): бумажный фон, лаймовые кнопки с чёрным текстом, чёрные «нажатые» пилюли с лаймом. */
:root[data-theme="offr"] {
  --bg: #F3F4EE; --surface: #FFFFFF; --surface-2: #F3F4EE; --line: #E7E9DF; --line-strong: #D5D8CB;
  --text: #0B0B0B; --muted: #5C6157; --faint: #8E9387;
  --accent: #C6F432; --accent-strong: #4F6200; --accent-ink: #0B0B0B; --accent-soft: #EEFBC7;
  --mint: #EEFBC7; --mint-ink: #3D4A00; --ink: #0B0B0B; --ink-text: #C6F432;
  --card-border: transparent;
}
/* Тема offr dark: чёрный фон, графитовые карточки, лайм — главный акцент. */
:root[data-theme="offr-dark"] {
  --bg: #0B0B0B; --surface: #161715; --surface-2: #1F201D; --line: #262823; --line-strong: #34372F;
  --text: #F4F5EE; --muted: #A9ADA2; --faint: #7A7E73;
  --accent: #C6F432; --accent-strong: #D4F75E; --accent-ink: #0B0B0B; --accent-soft: #23290F;
  --mint: #23290F; --mint-ink: #D4F75E; --ink: #C6F432; --ink-text: #0B0B0B;
  --good: #9FD86B; --good-soft: #1C2A12; --mid: #E0B067; --mid-soft: #2E2615; --low: #A9ADA2; --low-soft: #1F201D;
  --law: #B9A4EF; --law-soft: #241F33; --danger: #F08B80; --danger-soft: #331D1B; --shadow: none;
  --card-border: #222420;
  color-scheme: dark;
}
:root[data-theme="offr-dark"] .vc-logo { background: hsl(var(--lh) 12% 18%); color: hsl(var(--lh) 30% 82%); }
/* Лайм на белом не виден — в светлой теме фокус и ссылки тёмные. */
:root[data-theme="offr"] :focus-visible { outline-color: #0B0B0B; }
:root[data-theme="offr"] .btn.primary:hover { background: #B4E21F; border-color: #B4E21F; color: #0B0B0B; }
:root[data-theme="offr"] .views button[aria-pressed="true"] { border-bottom-color: #0B0B0B; }
:root[data-theme^="offr"] .hello h1, :root[data-theme^="offr"] .rh-title { font-family: "Unbounded", "Manrope", sans-serif; font-weight: 800; letter-spacing: -.03em; }