@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/GolosText-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/GolosText-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/GolosText-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Golos Text";
  src: url("/assets/fonts/GolosText-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Golos Display";
  src: url("/assets/fonts/GolosText-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --graphite: #1F2B36;
  --graphite-soft: #3B4954;
  --green: #11B760;
  --green-dark: #078143;
  --green-soft: #EAF8F0;
  --mist: #F7F9FB;
  --paper: #FFFFFF;
  --rail: #DCE3E8;
  --muted: #687680;
  --muted-soft: #EEF2F5;
  --amber: #C47B16;
  --display: "Golos Display", Arial, sans-serif;
  --body: "Golos Text", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(31, 43, 54, 0.09);
  --shadow-layer: 0 24px 72px rgba(31, 43, 54, 0.2);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--mist);
}

body {
  margin: 0;
  color: var(--graphite);
  background: var(--mist);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body.layer-open { overflow: hidden; }

button,
input,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(17, 183, 96, 0.34);
  outline-offset: 2px;
}

.shell {
  width: min(1440px, calc(100% - 44px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--paper);
  background: var(--graphite);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--rail);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.header-main {
  min-height: 72px;
  display: grid;
  grid-template-columns: 160px minmax(420px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: block;
  width: 152px;
  height: 54px;
  overflow: hidden;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(200px, 0.85fr) auto;
  gap: 8px;
}

.search-field {
  min-width: 0;
  height: 46px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  border: 1px solid var(--rail);
  border-radius: 999px;
  background: var(--paper);
}

.search-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(17, 183, 96, 0.12); }
.search-field i { color: var(--muted); font-style: normal; font-size: 17px; text-align: center; }
.search-field input { min-width: 0; width: 100%; height: 40px; padding: 0; border: 0; color: var(--graphite); background: transparent; outline: 0; }
.search-field input::placeholder { color: #89959E; }

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.primary-button { border: 1px solid var(--green); color: var(--paper); background: var(--green); }
.primary-button:hover { border-color: var(--green-dark); background: var(--green-dark); }
.secondary-button { border: 1px solid var(--rail); color: var(--graphite); background: var(--paper); }
.secondary-button:hover { border-color: var(--green); color: var(--green-dark); }

.saved-toggle {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--rail);
  border-radius: 999px;
  color: var(--graphite-soft);
  background: var(--paper);
  cursor: pointer;
  white-space: nowrap;
}

.saved-toggle > span:first-child { margin-right: 4px; color: var(--green-dark); font-size: 18px; }
.saved-toggle[aria-pressed="true"] { border-color: #A6DEBE; color: var(--green-dark); background: var(--green-soft); }

.filter-rail { border-top: 1px solid var(--rail); }

.filter-strip {
  min-height: 62px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 10px;
  scrollbar-width: thin;
}

.filter-button,
.filter-check {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid var(--rail);
  border-radius: 999px;
  color: var(--graphite-soft);
  background: var(--paper);
  font-size: 12px;
  white-space: nowrap;
}

button.filter-button { cursor: pointer; }
.filter-button-main { border-color: #AAB6BE; font-weight: 600; }
.filter-button.is-active,
.filter-check:has(input:checked) { border-color: #9BDDB9; color: var(--green-dark); background: var(--green-soft); }

.filter-button select {
  max-width: 132px;
  height: 30px;
  padding: 0 17px 0 0;
  border: 0;
  color: var(--graphite);
  background: transparent;
  outline: 0;
  cursor: pointer;
}

.filter-check { cursor: pointer; }
.filter-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--green-dark); }

.catalog { padding-block: 34px 64px; }

.results-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}

.results-head p { margin: 0; color: var(--muted); font-size: 13px; }
.results-head p strong { color: var(--graphite); }
.updated { text-align: center; }
.sort-control { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.sort-control select { padding: 3px 18px 3px 3px; border: 0; color: var(--graphite); background: transparent; outline: 0; }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin: -5px 0 15px;
}

.active-filter {
  padding: 4px 8px;
  border: 1px solid #A6DEBE;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 11px;
}

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

.vacancy-card {
  position: relative;
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(31, 43, 54, 0.045);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.vacancy-card:hover { border-color: #B6C3CA; box-shadow: var(--shadow); transform: translateY(-2px); }

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.card-topline time { white-space: nowrap; }

.card-save {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rail);
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--paper);
  font-size: 18px;
  cursor: pointer;
}

.card-save[aria-pressed="true"] { border-color: #9BDDB9; background: var(--green-soft); }

.card-open {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.vacancy-title {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.28;
  letter-spacing: -0.012em;
}

.card-open:hover .vacancy-title { color: var(--green-dark); }

.vacancy-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.vacancy-tag {
  padding: 3px 6px;
  border: 1px solid var(--rail);
  border-radius: 5px;
  color: var(--graphite-soft);
  background: var(--mist);
  font-size: 10px;
}

.company-block {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.company-logo,
.company-fallback {
  width: 52px;
  height: 52px;
  border: 1px solid var(--rail);
  border-radius: 9px;
  background: var(--paper);
}

.company-logo { display: block; padding: 5px; object-fit: contain; }
.company-fallback { display: grid; place-items: center; color: var(--green-dark); background: var(--green-soft); font-weight: 700; }
.company-block strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.company-block p { display: -webkit-box; margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.vacancy-summary {
  display: -webkit-box;
  margin: 16px 0 0;
  overflow: hidden;
  color: var(--graphite-soft);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.card-freshness {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 500;
}

.card-freshness::before { content: ""; width: 34px; height: 3px; border-radius: 3px; background: var(--green); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rail);
}

.card-footer span { color: var(--muted); font-size: 10px; }
.card-footer strong { color: var(--green-dark); font-size: 11px; }

.load-more {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  color: var(--graphite);
  background: var(--paper);
  font-weight: 600;
  cursor: pointer;
}

.load-more:hover { border-color: var(--green); color: var(--green-dark); }

.empty-state {
  display: grid;
  justify-items: center;
  padding: 70px 24px;
  border: 1px solid var(--rail);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
}

.empty-state[hidden] { display: none; }
.empty-state img { width: 92px; height: 58px; object-fit: contain; opacity: 0.72; }
.empty-state h2 { margin: 16px 0 0; font-family: var(--display); font-size: 22px; }
.empty-state p { margin: 7px 0 18px; color: var(--muted); }
.empty-state button { padding: 9px 13px; border: 1px solid var(--rail); border-radius: 999px; background: var(--paper); cursor: pointer; }

.filter-drawer,
.detail-pane {
  position: fixed;
  z-index: 90;
  top: 0;
  bottom: 0;
  width: min(520px, 94vw);
  padding: 22px;
  overflow-y: auto;
  background: var(--paper);
  box-shadow: var(--shadow-layer);
  transition: transform 180ms ease;
}

.filter-drawer { left: 0; transform: translateX(-105%); }
.detail-pane { right: 0; width: min(650px, 96vw); transform: translateX(105%); }
.filter-drawer.is-open,
.detail-pane.is-open { transform: translateX(0); }

.drawer-heading,
.detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rail);
}

.drawer-heading p { margin: 0; color: var(--green-dark); font-size: 11px; text-transform: uppercase; }
.drawer-heading h2 { margin: 2px 0 0; font-family: var(--display); font-size: 28px; }

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rail);
  border-radius: 50%;
  color: var(--graphite);
  background: var(--paper);
  font-size: 22px;
  cursor: pointer;
}

.drawer-field {
  display: grid;
  gap: 7px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rail);
}

.drawer-field > span,
.filter-drawer legend { font-size: 12px; font-weight: 600; }
.drawer-field select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--rail); border-radius: 9px; background: var(--paper); }
.filter-drawer fieldset { display: grid; gap: 10px; margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--rail); }
.filter-drawer fieldset label { display: flex; align-items: center; gap: 9px; }
.filter-drawer input { width: 17px; height: 17px; margin: 0; accent-color: var(--green-dark); }

.drawer-actions {
  position: sticky;
  bottom: -22px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
  margin: 20px -22px -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--rail);
  background: var(--paper);
}

.detail-card { padding-bottom: 36px; }
.detail-company { min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px; }
.detail-company strong { display: block; font-size: 15px; }
.detail-company span { display: block; color: var(--muted); font-size: 11px; }
.detail-age { margin: 20px 0 0; color: var(--green-dark); font-size: 12px; font-weight: 600; }
.detail-card h2 { margin: 8px 0 0; font-family: var(--display); font-size: clamp(27px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.025em; }
.detail-description { margin: 18px 0 0; color: var(--graphite-soft); font-size: 14px; white-space: pre-line; }

.freshness { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rail); }
.freshness-track { display: grid; grid-template-columns: 8px 1fr 8px 1fr 8px; align-items: center; }
.freshness-track i { display: block; width: 8px; height: 8px; border: 2px solid var(--green); border-radius: 50%; background: var(--paper); }
.freshness-track span { display: block; height: 3px; background: var(--green); transform-origin: left center; animation: freshness-pass 520ms ease-out both; }
.freshness-facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 9px; }
.freshness-facts div { min-width: 0; }
.freshness-facts span { display: block; color: var(--muted); font-size: 10px; }
.freshness-facts strong { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 11px; font-weight: 600; }

@keyframes freshness-pass {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.detail-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 30px; }
.apply-link { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.save-button { min-height: 44px; padding: 0 15px; border: 1px solid var(--rail); border-radius: 999px; color: var(--green-dark); background: var(--paper); font-weight: 600; cursor: pointer; }
.save-button[aria-pressed="true"] { border-color: #9BDDB9; background: var(--green-soft); }
.destination-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.layer-overlay { position: fixed; z-index: 80; inset: 0; background: rgba(31, 43, 54, 0.44); }
.layer-overlay[hidden] { display: none; }

.site-footer { border-top: 1px solid var(--rail); background: var(--paper); }
.footer-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 26px; color: var(--muted); font-size: 12px; }
.footer-inner img { width: 116px; height: 44px; object-fit: contain; }
.footer-inner p { margin: 0; text-align: right; }

@media (max-width: 1160px) {
  .header-main { grid-template-columns: 142px minmax(380px, 1fr) auto; }
  .brand { width: 138px; }
  .vacancy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .site-header { position: relative; }
  .header-main { grid-template-columns: 1fr auto; padding-block: 8px 12px; }
  .brand { width: 140px; height: 50px; }
  .search-panel { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr auto; }
  .filter-strip { flex-wrap: nowrap; overflow-x: auto; padding-block: 9px; }
  .vacancy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-head { grid-template-columns: 1fr auto; }
  .updated { display: none; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1440px); }
  .header-main { gap: 8px; }
  .saved-label { display: none; }
  .saved-toggle { min-width: 48px; padding-inline: 10px; }
  .search-panel { grid-template-columns: 1fr; }
  .search-field { height: 44px; }
  .search-panel .primary-button { min-height: 44px; }
  .filter-strip { min-height: 56px; }
  .catalog { padding-block: 22px 42px; }
  .results-head { align-items: start; grid-template-columns: 1fr; gap: 7px; }
  .sort-control { justify-self: start; }
  .vacancy-grid { grid-template-columns: 1fr; }
  .vacancy-card { min-height: 350px; }
  .filter-drawer,
  .detail-pane { width: 100%; padding: 18px; }
  .drawer-actions { margin-right: -18px; margin-bottom: -18px; margin-left: -18px; padding-inline: 18px; }
  .detail-card { padding-bottom: 92px; }
  .detail-actions { position: fixed; right: 0; bottom: 0; left: 0; padding: 12px; border-top: 1px solid var(--rail); background: var(--paper); }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 20px; }
  .footer-inner p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
