/* Inter variable, self-hosted (OFL, see fonts/OFL.txt): no third-party request blocking the first paint */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #f0f3f2;
  --text: #14201b;
  --muted: #58655f;
  --line: #e2e8e5;
  --accent: #0b7a5c;
  --accent-hover: #086349;
  --accent-soft: #e3f3ed;
  --accent-text: #ffffff;
  --salary: #9a5b00;
  --salary-bg: #fff4e0;
  --shadow: 0 1px 2px rgba(16, 32, 26, .04), 0 4px 16px rgba(16, 32, 26, .05);
  --shadow-hover: 0 2px 4px rgba(16, 32, 26, .06), 0 10px 28px rgba(16, 32, 26, .09);
  --radius: 14px;
  --tag-l: 92%;
  --tag-tl: 25%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1412;
    --surface: #161e1b;
    --surface-2: #1d2724;
    --text: #e6ece9;
    --muted: #92a19a;
    --line: #26322e;
    --accent: #34c495;
    --accent-hover: #4fd6a8;
    --accent-soft: #173229;
    --accent-text: #08130f;
    --salary: #f3b55a;
    --salary-bg: #33260f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .4);
    --tag-l: 20%;
    --tag-tl: 78%;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
/* links inside running text must not rely on color alone */
.hero-sub a, .footer a, .body a, .stale-note a { text-decoration: underline; text-underline-offset: 2px; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-text); font-size: 18px; line-height: 1;
}
.topsearch {
  flex: 1; max-width: 560px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.topsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.topsearch svg { color: var(--muted); }
.topsearch input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; padding: 6px 0; }
.topsearch button, .btn {
  border: 0; border-radius: 9px; background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 600; padding: 7px 16px; cursor: pointer; transition: background .15s;
}
.topsearch button:hover, .btn:hover { background: var(--accent-hover); color: var(--accent-text); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 28px; }
.hero h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; line-height: 1.15; }
.hero-sub { margin: 8px 0 24px; color: var(--muted); font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; padding-bottom: 56px; }
.sidebar { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; scrollbar-width: thin; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters summary {
  list-style: none; cursor: default; padding: 14px 18px; font-weight: 700; font-size: 15px;
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px;
}
.filters summary::-webkit-details-marker { display: none; }
.badge { background: var(--accent); color: var(--accent-text); border-radius: 99px; font-size: 12px; padding: 0 8px; line-height: 20px; }
.fgroup { padding: 14px 12px 12px; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h3 { margin: 0 6px 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.opt {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
  color: var(--text); font-size: 14px; transition: background .12s;
}
.opt:hover { background: var(--surface-2); color: var(--text); }
.opt.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.opt small { margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 60% 50%); flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.seg a {
  padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); font-size: 13px;
  transition: border-color .12s, background .12s;
}
.seg a:hover { border-color: var(--accent); color: var(--text); }
.seg a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* ---------- results ---------- */
.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; min-height: 34px; }
.count { font-size: 15px; color: var(--muted); }
.count b { color: var(--text); font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 12px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600;
}
.chip span { font-size: 16px; line-height: 1; opacity: .7; }
.chip:hover span { opacity: 1; }
.chip-reset { background: none; color: var(--muted); font-weight: 500; }

.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); transition: box-shadow .18s, border-color .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-1px); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.tag-dir {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: hsl(var(--h) 55% var(--tag-l)); color: hsl(var(--h) 60% var(--tag-tl));
}
.card-title { margin: 10px 0 6px; font-size: 17.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:hover .card-title a { color: var(--accent); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; }
.card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.salary { background: var(--salary-bg); color: var(--salary); border-radius: 6px; padding: 0 8px; font-weight: 600; }
.card-desc {
  margin: 10px 0 0; color: var(--muted); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); max-width: 560px; }
.results .empty { max-width: none; }
.empty-icon { font-size: 40px; }
.empty h2 { margin: 8px 0 4px; }
.empty .btn { display: inline-block; margin-top: 16px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span {
  min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.pager a { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .cur { background: var(--accent); color: var(--accent-text); }

.card-date { display: inline-flex; align-items: center; gap: 8px; }
.tag-new { background: var(--accent); color: var(--accent-text); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 700; }
.tag-old { background: var(--salary-bg); color: var(--salary); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.card.stale { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.card.stale .card-title a { color: var(--muted); }
.card.stale:hover .card-title a { color: var(--accent); }
.stale-note { background: var(--salary-bg); color: var(--salary); border-radius: 10px; padding: 12px 14px; margin: -6px 0 20px; font-size: 14px; font-weight: 500; }

/* ---------- vacancy page ---------- */
.detail { padding: 24px 20px 56px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; margin-bottom: 16px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; }
.detail-title { margin: 12px 0 20px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.02em; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px;
  padding: 16px 18px; background: var(--surface-2); border-radius: 12px; margin-bottom: 24px;
}
.facts div { display: flex; flex-direction: column; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.facts span { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.salary-text { color: var(--salary); }
.body { font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
.body p { margin: 0 0 12px; }
.body h2 { margin: 22px 0 8px; font-size: 16px; }
.body ul { margin: 0 0 14px; padding-left: 22px; }
.body li { margin: 4px 0; }
.body li::marker { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.btn { display: inline-block; padding: 10px 18px; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.detail-grid > aside { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }
.side { padding: 20px; }
.contacts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.contacts dt { color: var(--muted); }
.contacts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.btn-call { display: block; text-align: center; margin-top: 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 20px; }
.gallery img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.src-link { margin-left: auto; }
.side h2 { margin: 0 0 8px; font-size: 15px; }
.side-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.side-item b { color: var(--text); font-size: 14px; line-height: 1.35; font-weight: 600; }
.side-item:hover b { color: var(--accent); }
.side-item span { font-size: 12.5px; }
.side-more { display: block; margin-top: 12px; font-weight: 600; font-size: 14px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0; font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .layout, .detail-grid { grid-template-columns: 1fr; }
  .sidebar, .detail-grid > aside { position: static; max-height: none; }
  .src-link { margin-left: 0; }
  .filters summary { cursor: pointer; border-bottom: 0; }
  .filters[open] summary { border-bottom: 1px solid var(--line); }
  .filters summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
  .filters[open] summary::after { content: "▴"; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .detail { padding: 16px 16px 40px; }
  .topbar-in { gap: 12px; }
  .logo span:last-child { display: none; }
  .topsearch button { display: none; }
  .hero { padding: 24px 0 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 10px 14px; }
  .stat b { font-size: 21px; }
  .card { padding: 16px; }
  .panel { padding: 20px 18px; }
}
