/* vacansija UX refresh — lead design system 2026 */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface2: #eef1f6;
  --surface3: #e6ebf2;
  --text: #0f1419;
  --text2: #5a6570;
  --muted: #8a94a0;
  --line: #e3e8ef;
  --line2: #d5dde8;
  --blue: #1f5eff;
  --blue2: #1648d0;
  --blueSoft: #e8efff;
  --blueGlow: rgba(31, 94, 255, 0.14);
  --green: #0f9f6e;
  --greenSoft: #e6f7f0;
  --amber: #c47f00;
  --amberSoft: #fff6e5;
  --red: #d92d20;
  --redSoft: #fef3f2;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(15, 20, 25, 0.04), 0 8px 24px rgba(15, 20, 25, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 20, 25, 0.1);
  --max: 1200px;
  --header-h: 64px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
}
@media (min-width: 921px) {
  body { padding-bottom: 0; }
}

.container { width: min(var(--max), calc(100% - 32px)); }

/* Header */
.site-header {
  backdrop-filter: saturate(1.2) blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.header-row { min-height: var(--header-h); gap: 20px; }
.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.brand span { color: var(--blue); }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  padding: 8px 10px;
  border-radius:8px;
  transition: background .15s, color .15s;
}
.main-nav a:hover,
.main-nav a.is-current {
  color: var(--blue);
  background: var(--blueSoft);
}

/* Buttons */
.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius:var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: transform .12s ease, background .15s, box-shadow .15s;
  gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px var(--blueGlow);
}
.btn.primary:hover { background: var(--blue2); }
.btn.large { min-height: 52px; padding: 0 22px; font-size: 15px; }
.role-btn { min-height: 36px; font-size: 12px; font-weight: 600; padding: 0 12px; }
.role-form { border-radius:12px; padding: 4px; background: var(--surface2); }

/* Fields */
.field, input.field, select.field, textarea.field,
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
select, textarea {
  min-height: 48px;
  border-radius:var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line2);
  padding: 0 14px;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.field, textarea { min-height: 120px; padding: 12px 14px; }
.field:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blueGlow);
  outline: none;
  background: #fff;
}

/* Search */
.search-box {
  gap: 10px;
  padding: 12px;
  border-radius:var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--blue);
}
@media (max-width: 800px) {
  .search-box {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .search-box .btn { width: 100%; min-height: 52px; }
}

/* Cards & lists */
.card, .vacancy-card, .job-card, .shift-card, .project-card, .resume-card,
.auth-card, .composer-section, .readiness-card, .data-card {
  border-radius:var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.vacancy-card, .job-card, .shift-card, .project-card {
  padding: 18px 20px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.vacancy-card:hover, .job-card:hover, .shift-card:hover, .project-card:hover {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* Typography */
h1 {
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.035em;
  font-weight: 800;
  line-height: 1.12;
}
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.lead, .hero p { font-size: 16px; color: var(--text2); line-height: 1.6; }

/* Auth */
.auth-page {
  min-height: calc(100vh - var(--header-h) - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}
.auth-card {
  width: min(440px, 100%);
  padding: 32px 28px;
  border-radius:var(--radius-lg);
}
.auth-card h1 { font-size: 26px; margin-bottom: 8px; }
.auth-field { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 500; font-size: 14px; }
.auth-field .field { width: 100%; }

/* Filters sidebar */
.results-grid { gap: 20px; }
@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr !important; }
  .filters, .sidebar-filters { order: 2; }
}

/* Chips */
.chip, .selected-chips span, .tag {
  border-radius:999px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--blueSoft);
  color: var(--blue2);
}

/* Autocomplete */
.autocomplete-menu {
  border-radius:var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 40;
}
.autocomplete-menu [role="option"],
.autocomplete-menu a,
.autocomplete-menu button {
  padding: 12px 14px;
  font-size: 14px;
  min-height: 44px;
}
.autocomplete-menu [role="option"]:hover,
.autocomplete-menu a:hover {
  background: var(--blueSoft);
}

/* Mobile bottom tab bar */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0 6px var(--safe-bottom);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(15,20,25,0.06);
}
@media (max-width: 920px) {
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
  }
  .site-footer { margin-bottom: 12px; }
}
.mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  min-height: var(--tabbar-h);
  border-radius:12px;
  transition: color .15s, background .15s;
}
.mobile-tabbar a svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mobile-tabbar a.is-active,
.mobile-tabbar a:hover {
  color: var(--blue);
  background: var(--blueSoft);
}

/* Mobile nav drawer polish */
.mobile-nav > summary {
  min-height: 44px;
  min-width: 44px;
  border-radius:12px;
  font-weight: 700;
}
.mobile-nav-panel {
  border-radius:var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}
.mobile-nav-panel > a {
  min-height: 48px;
  border-radius:10px;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 14px;
}

/* Page sections */
.section-page, .hero { padding-top: 28px; }
.page-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Composer / forms */
.composer-section {
  padding: 22px;
  margin-bottom: 16px;
}
.composer-section header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.composer-section header > span {
  width: 32px; height: 32px;
  border-radius:10px;
  background: var(--blueSoft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .span-2 { grid-column: auto; }
}

/* Footer — light shell (single calm surface, hh-style); adapts to dark theme */
.site-footer {
  margin-top: 56px;
  padding-top: 48px;
  background: #f7f9fc;
  border-top: 1px solid var(--line);
  color: var(--text2);
}
.site-footer a { color: var(--text2); }
.site-footer a:hover { color: var(--blue); }
.footer-brand { color: var(--text); }
.footer-brand span { color: var(--blue); }
.footer-nav strong { color: var(--text); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-nav a, .footer-nav .footer-link-button { font-size: 13px; color: var(--text2); }
.footer-nav .footer-link-button:hover { color: var(--blue); }
.footer-note { border: 0; border-radius:0; background: transparent; padding: 0; }
.footer-bottom { font-size: 12px; }
.footer-bottom a { font-size: 12px !important; }
html[data-theme="dark"] .site-footer { background: var(--surface-muted, #111821); border-top-color: var(--line); color: var(--text2); }
html[data-theme="dark"] .site-footer a { color: var(--text2); }
html[data-theme="dark"] .site-footer a:hover { color: var(--blue); }
html[data-theme="dark"] .footer-brand { color: var(--text); }
html[data-theme="dark"] .footer-brand span { color: var(--blue); }
html[data-theme="dark"] .footer-nav strong { color: var(--text); }
html[data-theme="dark"] .footer-nav a, html[data-theme="dark"] .footer-nav .footer-link-button { color: var(--text2); }
html[data-theme="dark"] .footer-note { background: transparent; border: 0; }
html[data-theme="dark"] .footer-trust { background: var(--greenSoft); border-color: var(--line); }

/* Empty / error states */
.auth-card h1 + p, .empty-state p { color: var(--text2); }

/* Skeleton / loading feel for htmx */
.htmx-request { opacity: 0.7; transition: opacity .2s; }

/* Touch-friendly table scroll */
.table-wrap, .data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius:var(--radius);
}

/* PWA / Android WebView safe areas */
body.is-standalone, body.is-android-app {
  padding-top: env(safe-area-inset-top, 0px);
}

/* Focus visible for a11y */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== Lead design pass 2: screens & density ========== */

/* Typography scale */
h1, .page-title { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; font-weight: 650; }

/* Sticky search on mobile lists */
@media (max-width: 920px) {
  .search-box {
    position: sticky;
    top: calc(var(--header-h) - 4px);
    z-index: 30;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius:var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
  }
  .search-box .field { min-height: 48px; font-size: 16px; /* prevent iOS zoom */ }
  .city-chips, .quick-facets {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .city-chips::-webkit-scrollbar, .quick-facets::-webkit-scrollbar { display: none; }
  .quick-facet { flex: 0 0 auto; white-space: nowrap; }
}

/* Job / freelance cards */
.job-card, .vacancy-card, .shift-card, .deal-card, .card.job, article.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius:var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.job-card:hover, .vacancy-card:hover, .shift-card:hover, .deal-card:hover, article.card:hover {
  border-color: #c9d5ef;
  box-shadow: var(--shadow-lg);
}
.job-card a.title, .vacancy-card .title, .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.job-card .salary, .vacancy-card .salary, .meta-salary {
  color: var(--blue);
  font-weight: 700;
  font-size: 1rem;
}
.job-card .meta, .vacancy-card .meta, .muted-meta {
  color: var(--text2);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.badge, .tag, .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 10px;
  border-radius:999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text2);
}
.badge.blue, .tag.primary { background: var(--blueSoft); color: var(--blue2); }
.badge.green { background: var(--greenSoft); color: var(--green); }
.badge.amber { background: var(--amberSoft); color: var(--amber); }

/* Detail hero */
.detail-hero, .vacancy-hero, .page-hero {
  background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 28px 0 20px;
  margin-bottom: 20px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.detail-actions .btn { flex: 1 1 auto; min-width: 140px; }

/* Forms */
.auth-card, .form-card, .panel-form {
  max-width: 440px;
  margin: 24px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius:var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 8px; }
.auth-card .lead { color: var(--text2); margin-bottom: 20px; }
label { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; display: block; }
.field, input[type=text], input[type=email], input[type=password], input[type=search],
input[type=tel], input[type=number], select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line2);
  border-radius:var(--radius-sm);
  padding: 10px 14px;
  background: var(--surface);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blueGlow);
}
textarea { min-height: 120px; resize: vertical; }
.form-row { margin-bottom: 14px; }
.errorlist, .form-error, .alert-error {
  background: var(--redSoft);
  color: var(--red);
  border-radius:var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.alert-success {
  background: var(--greenSoft);
  color: var(--green);
  border-radius:var(--radius-sm);
  padding: 10px 12px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--line2);
  border-radius:var(--radius-lg);
}
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--text2); max-width: 360px; margin: 0 auto 18px; }

/* Lists density */
.results-list, .job-list, .shift-list, .deal-list {
  display: grid;
  gap: 12px;
}
@media (min-width: 921px) {
  .results-list, .job-list { gap: 14px; }
}

/* Sidebar filters desktop */
.filters-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius:var(--radius);
  padding: 16px;
}
.filters-panel .filter-group { margin-bottom: 16px; }
.filters-panel .filter-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }

/* Account / cabinet */
.cabinet-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.cabinet-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius:999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text2);
  font-weight: 600;
  font-size: 13px;
}
.cabinet-nav a.is-active, .cabinet-nav a:hover {
  background: var(--blueSoft);
  border-color: transparent;
  color: var(--blue2);
}

/* Notifications panel */
.notifications-panel {
  border-radius:var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: var(--blueSoft); }

/* Mobile tab bar polish */
/* Новая карточная навигация заменяет старую панель: гасим двойной бар */
body:has(.mobile-bottom-nav) .mobile-tabbar{display:none!important}

.mobile-tabbar {
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 24px rgba(15,20,25,0.06);
}
.mobile-tabbar a {
  min-height: 48px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  gap: 4px;
}
.mobile-tabbar a.is-active { color: var(--blue); }
.mobile-tabbar .tab-icon { font-size: 18px; line-height: 1; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, #f8fafc 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: sk 1.2s ease-in-out infinite;
  border-radius:8px;
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Touch targets */
@media (max-width: 920px) {
  a, button, .btn, .quick-facet { min-height: 44px; }
  .main-content { padding-bottom: 12px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* WebView / Android chrome */
html.android-webview body {
  overscroll-behavior-y: contain;
}
html.android-webview .site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

/* ========== Lead design pass 3 ========== */

/* Home hero */
.home-hero, .hero, section.hero {
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(31,94,255,.16), transparent 60%),
    radial-gradient(900px 360px at 90% 0%, rgba(15,159,110,.1), transparent 55%),
    linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
  padding: 36px 0 28px;
  margin-bottom: 8px;
}
.home-hero h1, .hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.home-hero .lead, .hero .lead {
  color: var(--text2);
  font-size: 1.05rem;
  max-width: 40ch;
  margin-top: 10px;
}

/* Search box elevated */
.search-box {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius:var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 920px) {
  .search-box { grid-template-columns: 1fr; }
}

/* Section headers */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}
.section-head a { font-weight: 600; font-size: 14px; color: var(--blue); }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius:var(--radius);
  padding: 14px 16px;
}
.stat-card .n { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .l { font-size: 12px; color: var(--text2); margin-top: 2px; }
@media (max-width: 640px) {
  .stats-strip { grid-template-columns: 1fr; }
}

/* Bottom sheet style filters (mobile) */
@media (max-width: 920px) {
  .filters-panel {
    border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* Application status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius:999px;
  font-size: 12px;
  font-weight: 700;
}
.status-pill.new { background: var(--blueSoft); color: var(--blue2); }
.status-pill.progress { background: var(--amberSoft); color: var(--amber); }
.status-pill.ok { background: var(--greenSoft); color: var(--green); }
.status-pill.bad { background: var(--redSoft); color: var(--red); }

/* Safer links */
a { text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--blueGlow);
  outline-offset: 2px;
}

/* Footer compact on mobile */
@media (max-width: 920px) {
  .site-footer { padding-bottom: calc(24px + var(--tabbar-h) + var(--safe-bottom)); }
}

/* ========== Lead design pass 4: vacancy list & detail ========== */

.results {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius:var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.enhanced-results-head, .results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
}
.enhanced-results-head strong { font-size: 15px; font-weight: 700; }
.enhanced-results-head span { color: var(--text2); font-size: 13px; margin-left: 8px; }
.sort-select {
  min-height: 40px;
  border-radius:10px;
  border: 1px solid var(--line2);
  padding: 0 12px;
  background: var(--surface);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
}

.vacancy-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius:0;
  background: var(--surface);
  box-shadow: none;
  transition: background .15s ease;
}
.vacancy-card:last-of-type { border-bottom: 0; }
.vacancy-card:hover {
  background: #f8faff;
  box-shadow: none;
  transform: none;
  border-color: transparent;
}
.vacancy-card.promoted {
  background: linear-gradient(90deg, #fff8eb 0%, var(--surface) 48%);
}
.promotion-label {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amberSoft);
  padding: 2px 8px;
  border-radius:999px;
}

.vacancy-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
}
.vacancy-title {
  display: inline-block;
  font-size: 17px !important;
  font-weight: 750 !important;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  line-height: 1.3;
  text-decoration: none;
}
.vacancy-title:hover { color: var(--blue) !important; }
.company-line {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text2);
}
.company-line a { color: var(--text2); font-weight: 600; text-decoration: none; }
.company-line a:hover { color: var(--blue); }
.verified {
  display: inline-flex;
  margin-left: 6px;
  padding: 0px 6px;
  border-radius:999px;
  background: var(--greenSoft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}
.meta, .vacancy-card .meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--text2);
}
.meta-item::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 8px;
  border-radius:50%;
  background: var(--muted);
  vertical-align: middle;
}
.meta-item:first-child::before { display: none; }

.salary-block { text-align: right; min-width: 7.5rem; }
.vacancy-card .salary {
  display: block;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--blue) !important;
  letter-spacing: -0.02em;
  white-space: normal;
}

.vacancy-excerpt {
  margin: 0;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vacancy-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vacancy-card .tags span,
.vacancy-card .tag {
  background: var(--surface2);
  color: var(--text2);
  border-radius:999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.vacancy-search-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-signal {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  padding: 4px 10px;
  border-radius:8px;
}
.search-signal.low-competition {
  background: var(--greenSoft);
  color: var(--green);
}
.search-signal.responsive {
  background: var(--blueSoft);
  color: var(--blue2);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.card-actions .btn { min-height: 40px; }
.card-actions .btn.primary { box-shadow: 0 2px 10px var(--blueGlow); }

@media (max-width: 720px) {
  .vacancy-top { grid-template-columns: 1fr; }
  .salary-block { text-align: left; }
  .vacancy-card { padding: 16px 14px; }
  .vacancy-title { font-size: 16px !important; }
  .card-actions .btn { flex: 1 1 auto; }
  .promotion-label { position: static; width: fit-content; margin-bottom: 4px; }
}

/* Detail apply sticky on desktop */
@media (min-width: 921px) {
  .detail-grid > aside,
  .apply-panel,
  .detail-side {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}
.apply-panel .btn.primary.full,
.btn.primary.full {
  min-height: 48px;
  font-size: 15px;
}
.success-box, .info-box, .notice {
  border-radius:var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
}
.success-box { background: var(--greenSoft); color: var(--green); }
.info-box, .notice { background: var(--blueSoft); color: var(--blue2); }

/* List layout breathing room */
.results-grid {
  gap: 20px;
}
.search-hero h1 {
  max-width: 18ch;
}

/* Signup consent: flex row (beats .auth-card p display:grid) + styled checkbox */
.auth-card .legal-consent { display: flex; align-items: flex-start; gap: 10px; }
.legal-consent input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px !important; min-height: 0 !important; height: 20px; flex: 0 0 auto; margin: 0px 0 0; padding: 0; border: 2px solid #c6cedb; border-radius:8px; background: #fff; cursor: pointer; position: relative; }
.legal-consent input[type="checkbox"]:checked { background: var(--blue); border-color: var(--blue); }
.legal-consent input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* --- Compact top navigation: 4 primary items + "Ещё" dropdown --- */
.main-nav{overflow:visible}
.main-nav details.nav-more{position:relative}
.main-nav details.nav-more>summary{list-style:none;cursor:pointer;user-select:none;display:inline-flex;align-items:center;gap:4px;color:var(--text2);font-size:12px}
.main-nav details.nav-more>summary::-webkit-details-marker{display:none}
.main-nav details.nav-more>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-1px);transition:transform var(--motion-fast) ease}
.main-nav details.nav-more[open]>summary{color:var(--text)}
.main-nav details.nav-more[open]>summary::after{transform:rotate(-135deg) translateY(-1px)}
.nav-more-panel{position:absolute;top:calc(100% + 12px);left:50%;transform:translateX(-50%);min-width:215px;padding:8px;display:grid;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-md);z-index:80}
.nav-more-panel::before{content:"";position:absolute;top:-5.5px;left:50%;width:10px;height:10px;transform:translateX(-50%) rotate(45deg);background:var(--surface);border-left:1px solid var(--line);border-top:1px solid var(--line);border-top-left-radius:2px}
.nav-more-panel a{padding:8px 12px;border-radius:8px;color:var(--text2);font-size:12px;white-space:nowrap}
.nav-more-panel a:hover{background:var(--surface2);color:var(--text)}

/* --- Resume directory landing --- */
.promo-card .btn{margin-top:12px;width:100%}

/* --- Public resume catalog (anonymized cards) --- */
.resume-filters{max-width:none;margin:16px 0 4px}
.resume-filters .search-box{margin-bottom:10px}
.resume-filters .filter-strip select.field{min-height:40px;max-width:240px}
.resume-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-top:14px}
.resume-card{display:flex;flex-direction:column;gap:10px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm,0 1px 3px rgba(16,24,40,.08));transition:transform var(--motion-fast) ease,box-shadow var(--motion-fast) ease}
.resume-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.rc-head{display:flex;gap:12px;align-items:flex-start}
.rc-avatar{width:44px;height:44px;border-radius:12px;background:color-mix(in srgb,var(--blue) 12%,transparent);color:var(--blue);display:grid;place-items:center;font-weight:700;font-size:18px;flex:none}
.rc-headline{min-width:0}
.rc-title{font-size:15px;font-weight:600;line-height:1.3;margin:0}
.rc-title a{color:var(--text)}
.rc-title a:hover{color:var(--blue)}
.rc-status{display:inline-block;margin-top:2px;font-size:11px;color:var(--text2)}
.rc-meta{display:flex;flex-wrap:wrap;gap:4px 0;font-size:12.5px;color:var(--text2)}
.rc-meta span+span::before{content:"·";margin:0 8px;color:var(--text3,var(--text2))}
.rc-salary{font-size:14px;font-weight:600;color:var(--text)}
.rc-formats{font-size:12px;color:var(--text2)}
.rc-skills{display:flex;flex-wrap:wrap;gap:6px}
.rc-skills .chip{font-size:11px;padding:2px 8px}
.rc-skills .chip.more{color:var(--text2);background:var(--surface2)}
.rc-foot{margin-top:auto;padding-top:10px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px}
.rc-updated{font-size:11.5px;color:var(--text2)}
.access-banner{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-top:14px;padding:12px 16px;border:1px solid color-mix(in srgb,var(--blue) 30%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--blue) 6%,var(--surface))}
.access-banner span{font-size:13px;color:var(--text2)}
.rcat-empty{grid-column:1/-1;margin:8px 0}
@media(max-width:640px){
  .resume-card{padding:14px}
  .resume-filters .filter-strip select.field{max-width:none}
  .rc-foot{flex-wrap:wrap}
}

/* Dark-theme adaptation for hard-coded light surfaces on the catalog page */
html[data-theme="dark"] .metric-strip>div{background:var(--surface-muted,var(--surface))}
html[data-theme="dark"] .promo-card{background:var(--surface-muted,var(--surface))}
html[data-theme="dark"] .rc-avatar{background:rgba(72,123,255,.16);color:#7ba0ff}
html[data-theme="dark"] .resume-filters .search-box{background:var(--surface)}

/* ========== Lead design pass 5: single-frame surfaces & dark fixes ========== */

/* Search wells: one outer frame, fields stay flat — no frame-in-frame */
.search-box .field,
.freelance-search .field {
  background: var(--surface2);
  border-color: transparent;
  box-shadow: none;
}
.search-box .field:focus,
.freelance-search .field:focus {
  background: var(--surface);
  border-color: var(--blue);
}
html[data-theme="dark"] .search-box .field,
html[data-theme="dark"] .freelance-search .field {
  background: var(--surface2);
  border-color: transparent;
}

/* Filters sidebar: salary/dates fields flat too */
.filters .field.small { border-color: transparent; background: var(--surface2); }
.filters .field.small:focus { border-color: var(--blue); background: var(--surface); }
html[data-theme="dark"] .filters .field.small { border-color: transparent; }

/* Results panel: flush rows instead of card-in-card; popover must not clip */
.results { padding: 0; overflow: visible; }
.results-head { border-radius:var(--radius-sm); }
.results .results-head { border-radius:calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0; }

/* Resume directory: panel wrapper dissolves — search-box stays the single frame */
.resume-filters { padding: 0; border: 0; background: transparent; box-shadow: none; }
.resume-filters .filter-strip { border: 0; background: transparent; padding: 0; margin-top: 12px; }

/* Application filter bar: fields flat inside the panel */
.application-filter-bar .field { background: var(--surface2); border-color: transparent; }
.application-filter-bar .field:focus { background: var(--surface); border-color: var(--blue); }

/* Dark theme: heroes were hard-coded light gradients (washed-out in dark) */
html[data-theme="dark"] .hero,
html[data-theme="dark"] .search-hero,
html[data-theme="dark"] .detail-hero,
html[data-theme="dark"] .vacancy-hero,
html[data-theme="dark"] .page-hero {
  background: linear-gradient(180deg, #18202c 0%, var(--bg) 100%);
  border-bottom-color: var(--line);
}

/* Dark theme: vacancy row hover/promoted were hard-coded light */
html[data-theme="dark"] .vacancy-card:hover { background: #1a232f; }
html[data-theme="dark"] .vacancy-card.promoted { background: linear-gradient(90deg, #2a2416 0%, var(--surface) 48%); }

/* Closed <details> panels must not participate in layout (ghost panel in older
   WebViews renders the absolute dropdown under the sticky header). */
.mobile-nav:not([open]) .mobile-nav-panel,
.nav-more:not([open]) .nav-more-panel { display: none; }


/* ========== Lead design pass 6: no double frames in dark wells ==========
   site.css dark catch-all html[data-theme=dark] input:not(...):not(...) has
   specificity (0,3,2) and re-adds borders inside single-frame wells.
   Mirror the guards here so flat-well rules win in both themes. */
.search-box input.field:not([type="checkbox"]):not([type="radio"]),
.freelance-search input.field:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .search-box input.field:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .freelance-search input.field:not([type="checkbox"]):not([type="radio"]),
.search-box select.field,
.freelance-search select.field,
html[data-theme="dark"] .search-box select.field,
html[data-theme="dark"] .freelance-search select.field {
  border-color: transparent;
  background: var(--surface2);
  box-shadow: none;
}
.search-box input.field:not([type="checkbox"]):not([type="radio"]):focus,
.freelance-search input.field:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] .search-box input.field:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] .freelance-search input.field:not([type="checkbox"]):not([type="radio"]):focus,
.search-box select.field:focus,
.freelance-search select.field:focus,
html[data-theme="dark"] .search-box select.field:focus,
html[data-theme="dark"] .freelance-search select.field:focus {
  border-color: var(--blue);
  background: var(--surface);
}
.filters input.field.small:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .filters input.field.small:not([type="checkbox"]):not([type="radio"]),
.filters select.field.small,
html[data-theme="dark"] .filters select.field.small {
  border-color: transparent;
  background: var(--surface2);
}
.filters input.field.small:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] .filters input.field.small:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--blue);
  background: var(--surface);
}
.application-filter-bar input.field:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] .application-filter-bar input.field:not([type="checkbox"]):not([type="radio"]),
.application-filter-bar select.field,
html[data-theme="dark"] .application-filter-bar select.field {
  border-color: transparent;
  background: var(--surface2);
}
.application-filter-bar input.field:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] .application-filter-bar input.field:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--blue);
  background: var(--surface);
}


/* — lead UI/UX fix: base (0,4,1) :not() selectors outscored all :focus rules, focus frame never appeared — */
.form-card input:focus:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-card select:focus,
.form-card textarea:focus,
.auth-card input:focus:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.auth-card select:focus,
.auth-card textarea:focus,
.composer-section input:focus:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.composer-section select:focus,
.composer-section textarea:focus,
.application-filter-bar .field:focus,
.candidate-search input:focus,
.candidate-search select:focus,
.field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blueGlow);
  outline: none;
}

/* === Универсальный поиск: все вертикали одним запросом (превосходит hh.ru и fl.ru) === */
.search-page { padding-bottom: 56px; }
.usearch-hero { padding: 38px 0 8px; }
.usearch-hero h1 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -0.02em; }
.usearch-sub { margin: 0 0 20px; color: var(--text2); font-size: 16px; }
.usearch-form { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 8px; max-width: 720px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius:var(--radius-lg, 16px); box-shadow: var(--shadow-sm); }
.usearch-input { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 14px; border-radius:10px; transition: background-color .18s ease, box-shadow .18s ease; }
.usearch-input svg { flex: 0 0 20px; width: 20px; fill: var(--muted); }
.usearch-input input { width: 100%; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.usearch-input input::placeholder { color: var(--muted); }
.usearch-input:focus-within { background: var(--surface2); box-shadow: inset 0 0 0 2px var(--focus); }
.usearch-button { min-height: 50px; padding: 0 22px; border: 0; border-radius:12px; background: var(--blue); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.usearch-button:hover { background: var(--blue2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.usearch-button:active { transform: translateY(0); }
.search-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 4px; }
.search-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius:999px; background: var(--surface); color: var(--text2); font-size: 14px; font-weight: 600; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.search-tab b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.search-tab:hover { border-color: var(--blue); color: var(--text); }
.search-tab.is-active { background: var(--blueSoft); border-color: transparent; color: var(--blue2); }
.search-tab.is-active b { color: var(--blue2); }
.search-section { margin-top: 28px; }
.search-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.search-section-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.search-count { display: inline-block; margin-left: 6px; padding: 0px 8px; border-radius:999px; background: var(--surface2); color: var(--text2); font-size: 13px; font-weight: 600; }
.search-more { white-space: nowrap; font-weight: 600; }
.search-grid { display: grid; gap: 12px; }
.search-verticals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 24px; }
.search-vertical { display: block; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius:14px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.search-vertical:hover { border-color: var(--blue); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.search-vertical h2 { margin: 0 0 4px; font-size: 17px; }
.search-vertical p { margin: 0; color: var(--text2); font-size: 14px; line-height: 1.45; }
@media (max-width: 640px) {
  .usearch-hero { padding: 26px 0 6px; }
  .usearch-form { grid-template-columns: 1fr; }
  .usearch-button { width: 100%; }
  .search-tab { padding: 6px 12px; font-size: 13px; }
  .search-section-head h2 { font-size: 18px; }
}
.search-head-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-loc { padding: 2px 10px; border-radius:999px; background: var(--blueSoft); color: var(--blue2); font-size: 13px; font-weight: 600; }

/* === Массовые приглашения кандидатов (паритет hh.ru) === */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius:12px; }
.bulk-bar .bulk-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text2); cursor: pointer; }
.bulk-bar .bulk-all input, .bulk-pick input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.bulk-bar .bulk-vacancy { display: flex; align-items: center; min-width: 220px; }
.bulk-bar .bulk-vacancy select, .bulk-bar .bulk-message { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius:10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.bulk-bar .bulk-vacancy select { max-width: 260px; }
.bulk-bar .bulk-message { flex: 1 1 220px; min-width: 200px; }
.bulk-bar .btn[disabled] { opacity: .55; cursor: not-allowed; }
.bulk-pick { display: inline-flex; align-items: center; flex: 0 0 auto; padding-top: 2px; cursor: pointer; }

/* [UI-fix] Двойная рамка в командной палитре: поле поиска не рисует
   собственную рамку — контейнер подсвечивается через :focus-within */
.command-search input,
.command-search input:focus,
.command-search input:focus-visible {
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
}

/* === r13: аватары компаний и цветные теги навыков === */
.company-avatar {
  --h: 210;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius:12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  color: hsl(var(--h) 45% 32%);
  background: hsl(var(--h) 70% 94%);
  border: 1px solid hsl(var(--h) 50% 85%);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  user-select: none;
}
.company-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px hsl(var(--h) 60% 80% / .55);
}
.company-avatar-lg {
  width: 62px;
  height: 62px;
  border-radius:16px;
  font-size: 20px;
}
.vacancy-card .vacancy-top { align-items: flex-start; }
.vacancy-card .vacancy-top .company-avatar { margin-top: 2px; }
.detail-headline { display: flex; gap: 16px; align-items: flex-start; }
.detail-headline h1 { margin: 0 0 4px; }
.detail-headline .company-line { margin-top: 0; }

/* Цветные теги навыков — визуальные якоря в списке */
.tags .tag-skill {
  background: hsl(215 65% 95%);
  color: hsl(215 60% 34%);
  border: 1px solid hsl(215 50% 88%);
  font-weight: 600;
}
.tags .tag-skill-more { opacity: .92; }

/* Повышенная контрастность вторичного текста карточек */
.vacancy-card .meta { color: #6b7480; }
html[data-theme="dark"] .vacancy-card .meta { color: #9aa5b1; }
.vacancy-card p.vacancy-excerpt { color: #5d6672; }

/* Скелетон для аватара в тёмной теме */
html[data-theme="dark"] .company-avatar {
  color: hsl(var(--h) 45% 74%);
  background: hsl(var(--h) 32% 22%);
  border-color: hsl(var(--h) 30% 30%);
}
html[data-theme="dark"] .tags .tag-skill {
  background: hsl(215 32% 20%);
  color: hsl(215 55% 78%);
  border-color: hsl(215 30% 28%);
}

/* Home live-карточки: мягкие цветные полосы-акценты по типу */
.home-live-card { position: relative; overflow: hidden; }
.home-live-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius:3px;
  background: linear-gradient(180deg, var(--blue), transparent);
}
@media (max-width: 640px) {
  .company-avatar { width: 40px; height: 40px; font-size: 13px; border-radius:10px; }
  .company-avatar-lg { width: 52px; height: 52px; font-size: 17px; }
  .detail-headline { gap: 12px; }
}

/* r13: home live-карточки с аватарами — flex-структура */
.home-live-card { display: flex; gap: 14px; align-items: center; }
.home-live-card .company-avatar { flex: 0 0 auto; }
.home-live-card .home-live-body { min-width: 0; flex: 1; }
.home-live-card .home-live-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-live-shift::before { background: linear-gradient(180deg, #d97706, transparent); }

/* === r13: каталог компаний === */
.company-search-box { grid-template-columns: minmax(280px,1fr) auto; }
.quick-facet-static { padding: 6px 12px; color: var(--text2); font-size: 13px; }
.alphabet-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 4px; }
.alpha-chip {
  min-width: 34px; min-height: 34px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius:10px;
  background: var(--surface); color: var(--text2);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: all .12s ease;
}
.alpha-chip:hover { border-color: var(--blue); color: var(--blue); }
.alpha-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.alpha-clear { color: var(--muted); font-size: 12px; }
.company-catalog-head { margin-top: 18px; border-top: 1px solid var(--line); }
.company-catalog-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px;
  background: transparent;
}
.company-catalog-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius:14px;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.company-catalog-card:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  box-shadow: 0 6px 20px rgba(20, 45, 90, .08);
  transform: translateY(-2px);
}
.company-catalog-card .company-avatar { flex: 0 0 auto; }
.company-catalog-body { min-width: 0; flex: 1; }
.company-catalog-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 15px; color: var(--text);
}
.company-catalog-body p {
  margin: 6px 0 0; color: var(--text2); font-size: 13px; line-height: 1.5;
}
.company-catalog-meta { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.company-vacancies-count {
  color: var(--blue); font-weight: 650;
  background: var(--blueSoft); padding: 2px 10px; border-radius:999px;
}
.company-vacancies-zero { color: var(--muted); }
.company-rating { color: #b45309; font-weight: 650; }
.company-rating small { color: var(--muted); font-weight: 500; }
.company-catalog-empty { grid-column: 1 / -1; }
html[data-theme="dark"] .company-catalog-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.35); }
@media (max-width: 720px) {
  .company-catalog-grid { grid-template-columns: 1fr; }
  .company-search-box { grid-template-columns: 1fr; }
}

/* r13: теги отрасли и города в каталоге компаний */
.company-catalog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.company-industry {
  padding: 2px 8px; border-radius:999px;
  background: hsl(160 55% 95%); color: hsl(160 60% 28%);
  border: 1px solid hsl(160 45% 86%);
  font-size: 12px; font-weight: 600;
}
.company-city { color: var(--text2); font-size: 12.5px; }
html[data-theme="dark"] .company-industry {
  background: hsl(160 30% 18%); color: hsl(160 45% 70%); border-color: hsl(160 30% 26%);
}

/* r14: страница смены — двухколоночная раскладка, факты, похожие смены */
.shift-facts { margin-top: 4px; }
.shift-facts .market-context-grid { margin: 6px 0 10px; }
.shift-address { margin: 4px 0 0; color: var(--text2); font-size: 14px; }
.shift-address strong { color: var(--text); }

.shift-pay-big { font-size: 28px; letter-spacing: -.8px; }
.apply-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.shift-fee-note {
  margin-top: 12px; padding: 10px 12px; border-radius:10px;
  background: var(--surface2); display: grid; gap: 2px;
}
.shift-fee-note span { font-size: 13.5px; font-weight: 650; color: var(--text); }
.shift-fee-note small { color: var(--muted); font-size: 12px; }

.shift-progress { margin-top: 14px; display: grid; gap: 6px; }
.shift-progress-bar {
  height: 7px; border-radius:999px; background: var(--surface2); overflow: hidden;
}
.shift-progress-bar i { display: block; height: 100%; background: var(--blue); border-radius:999px; }
.shift-progress small { color: var(--muted); font-size: 12px; }

.shift-escrow-box {
  margin-top: 12px; padding: 12px; border-radius:10px;
  background: var(--blueSoft); font-size: 13.5px;
}
.shift-escrow-box p { margin: 6px 0 0; font-size: 12.5px; }

.similar-shifts { display: grid; gap: 8px; }
.similar-shift {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius:12px;
  text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.similar-shift:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  box-shadow: 0 4px 14px rgba(20, 45, 90, .07);
}
.similar-shift strong { font-size: 14px; color: var(--text); }
.similar-shift .meta { margin: 0; grid-column: 1; }
.similar-shift-pay { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--blue); font-size: 15px; white-space: nowrap; }
.small-note { margin-top: 8px; font-size: 12px; }
.center-note { display: block; text-align: center; margin-top: 8px; }
.escrow-hint { margin: 12px 0 0; font-size: 12px; line-height: 1.5; }

@media (max-width: 560px) {
  .similar-shift { grid-template-columns: 1fr; }
  .similar-shift-pay { grid-row: auto; grid-column: 1; }
}
html[data-theme="dark"] .similar-shift:hover { box-shadow: 0 4px 14px rgba(0,0,0,.35); }

/* r14: polish — каталог компаний: нечётная последняя карточка на всю ширину */
@media (min-width: 721px) {
  .company-catalog-grid .company-catalog-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* r14: polish — бейдж «Мало откликов»: мягкий янтарный вместо тревожного зелёного */
.search-signal.low-competition {
  background: #fdf3e2;
  color: #92600a;
  border: 1px solid #f3ddb4;
}
html[data-theme="dark"] .search-signal.low-competition {
  background: hsl(38 40% 16%);
  color: hsl(38 60% 70%);
  border-color: hsl(38 30% 26%);
}

/* r14: polish — SEO-карточки на главной: стрелка и акцент при ховере */
.home-seo-card { position: relative; }
.home-seo-card::after {
  content: "→"; position: absolute; top: 16px; right: 16px;
  color: var(--muted); font-size: 15px; opacity: 0; transform: translateX(-4px);
  transition: opacity .15s ease, transform .15s ease, color .15s ease;
}
.home-seo-card:hover::after { opacity: 1; transform: translateX(0); color: #2457b2; }
.home-seo-card strong { padding-right: 26px; }
.home-seo-card:hover { border-color: #2457b2; }

/* r14: блок доверия в сайдбаре смены */
.shift-trust {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  display: grid; gap: 10px;
}
.shift-trust-item { display: flex; gap: 10px; align-items: flex-start; }
.shift-trust-item svg {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 0px;
  color: var(--blue);
}
.shift-trust-item strong { display: block; font-size: 12.5px; color: var(--text); }
.shift-trust-item span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
