/* SolvIT — дизайн-система v3 (ориентир Sortlist: светлый, воздушный, синий акцент, пилюли; светлая и тёмная темы) */

:root {
  --bg: #fbfaf9;
  --surface: #ffffff;
  --surface-2: #f6f8fe;
  --side: #f7f6f5;
  --side-active: #ecebe8;
  --chip: #f1efed;
  --text: #0f0d0a;
  --ink: #0f0d0a;
  --muted: #76716d;
  --muted-strong: #43403c;
  --line: #e7e5e4;
  --accent: #305ef3;
  --accent-strong: #2649de;
  --accent-2: #477ffc;
  --accent-soft: #eef3ff;
  --accent-line: #c4dafc;
  --accent-text: #2649de;
  --ok: #3b6732;
  --ok-soft: #e6f2e1;
  --warn: #9a5b05;
  --warn-soft: #fff4db;
  --danger: #b42318;
  --star: #f5bc1e;
  --mark: #fde68a;
  --hero: linear-gradient(180deg, #f6f8fe 0%, #e9f0fe 100%);
  --title-1: #0f0d0a;
  --title-2: #477ffc;
  --hero-sub: #2b2825; --hero-wave: #9bc4fe;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 13, 10, .04);
  --shadow-hover: 0 1px 3px rgba(15, 13, 10, .06), 0 12px 32px rgba(48, 94, 243, .1);
  --glow: 0 0 0 4px rgba(71, 127, 252, .08), 0 18px 48px rgba(71, 127, 252, .16);
  --sidebar: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e16; --surface: #121722; --surface-2: #172036; --side: #0f131c; --side-active: #1c2333; --chip: #1c2333;
    --text: #f1f0ee; --ink: #f1f0ee; --muted: #a4a09c; --muted-strong: #d5d3d1; --line: #252c3b;
    --accent: #3e6df5; --accent-strong: #5b86ff; --accent-2: #6e9bff; --accent-soft: rgba(71, 127, 252, .16);
    --accent-line: #2b3f75; --accent-text: #9bc4fe;
    --ok: #8fd07f; --ok-soft: rgba(143, 208, 127, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
    --danger: #f87171; --mark: rgba(245, 188, 30, .35);
    --hero: linear-gradient(180deg, #121a30 0%, #0f1526 100%); --title-1: #f1f0ee; --title-2: #6e9bff; --hero-sub: #d5d3d1; --hero-wave: #5577c4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-hover: 0 1px 3px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    --glow: 0 0 0 4px rgba(71, 127, 252, .12), 0 18px 48px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e16; --surface: #121722; --surface-2: #172036; --side: #0f131c; --side-active: #1c2333; --chip: #1c2333;
  --text: #f1f0ee; --ink: #f1f0ee; --muted: #a4a09c; --muted-strong: #d5d3d1; --line: #252c3b;
  --accent: #3e6df5; --accent-strong: #5b86ff; --accent-2: #6e9bff; --accent-soft: rgba(71, 127, 252, .16);
  --accent-line: #2b3f75; --accent-text: #9bc4fe;
  --ok: #8fd07f; --ok-soft: rgba(143, 208, 127, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --danger: #f87171; --mark: rgba(245, 188, 30, .35);
  --hero: linear-gradient(180deg, #121a30 0%, #0f1526 100%); --title-1: #f1f0ee; --title-2: #6e9bff; --hero-sub: #d5d3d1; --hero-wave: #5577c4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-hover: 0 1px 3px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  --glow: 0 0 0 4px rgba(71, 127, 252, .12), 0 18px 48px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; font-weight: 600; }
a { color: var(--accent-text); }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- каркас: боковое меню + контент ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px; background: var(--side); border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -.04em; text-decoration: none; color: var(--text); }
.logo b { color: var(--accent); font-weight: 700; }
.logo-mark { width: 36px; height: 36px; flex: none; display: block; object-fit: contain; }  /* знак SolvIT, brand/mark-128.png */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--muted-strong); text-decoration: none; font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.side-nav a .icon { color: var(--muted); }
.side-nav a:hover { background: color-mix(in srgb, var(--side-active) 60%, transparent); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--side-active); color: var(--text); }
.side-nav a[aria-current="page"] .icon { color: var(--text); }
.side-label { font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 10px; margin-bottom: 4px; }
.side-card { margin-top: auto; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.side-card b { color: var(--text); font-size: 15px; font-weight: 600; display: block; }
.theme-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); font-size: 14px;
  border-radius: var(--radius-sm); background: var(--surface); color: var(--muted-strong); cursor: pointer; transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent-line); color: var(--text); }

.main { min-width: 0; padding: 28px 36px 44px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -.035em; }
.page-sub { color: var(--muted); margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted-strong); font-size: 13px; font-weight: 500; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

/* ---------- герой: светлый блок с поиском-пилюлей ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 52px 44px 36px; text-align: left;
  background: var(--hero); border: 1px solid color-mix(in srgb, var(--accent-line) 55%, transparent); margin-bottom: 20px;
}
.hero::before {  /* концентрические круги, медленно «дышат» */
  content: ""; position: absolute; left: 88%; top: 100%; width: 520px; height: 520px; border-radius: 50%;
  background: rgba(71, 127, 252, .06); box-shadow: 0 0 0 120px rgba(71, 127, 252, .04), 0 0 0 240px rgba(71, 127, 252, .025);
  transform: translate(-50%, -50%); animation: breathe 9s ease-in-out infinite alternate; pointer-events: none;
}
.hero::after {  /* пунктирная волна на фоне */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='none'%3E%3Cpath d='M-20 210 C 120 80 260 60 330 150 S 520 300 640 170 S 900 20 1010 110 S 1160 220 1230 120' fill='none' stroke='%239bc4fe' stroke-width='2' stroke-dasharray='8 10' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero > * { position: relative; z-index: 1; }
/* живой фон (hero-fx.js): canvas под содержимым; статичная волна из ::after прячется */
.hero > canvas.hero-fx { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero.fx-on::after { visibility: hidden; }
.hero-title { font-size: 56px; font-weight: 500; line-height: 1.08; letter-spacing: -.035em; max-width: 760px; margin: 0; color: var(--title-1); }
.hero-title span { display: block; color: var(--title-2); }
.hero-sub { margin: 18px 0 28px; max-width: 560px; font-size: 18px; line-height: 1.45; color: var(--hero-sub); }
.search {
  display: flex; align-items: center; gap: 6px; max-width: 760px; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--accent-line); border-radius: 999px; box-shadow: var(--glow);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(71, 127, 252, .18), 0 18px 48px rgba(71, 127, 252, .2); }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.search input {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 12px 12px 46px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; }
.search button {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; border: 0; border-radius: 999px; padding: 0 22px 0 24px;
  font-size: 15px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; transition: transform .15s, background .15s;
}
.search button::after { content: "→"; font-weight: 500; }
.search button:hover { background: var(--accent-strong); }
.search button:active { transform: scale(.97); }
.examples { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; max-width: 820px; margin: 18px 0 0; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted-strong); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s, transform .15s;
}
.chip:hover { border-color: var(--accent-line); color: var(--accent-text); transform: translateY(-1px); }
.chip.more-examples { display: none; border-style: dashed; }
.trust { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; font-size: 14px; color: var(--muted-strong); }
.trust:empty { display: none; }
.trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft); animation: ping 2.4s ease-in-out infinite; }
.trust b { color: var(--text); font-weight: 600; }

/* ---------- карточки показателей ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi {
  display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s;
}
.kpi:hover { border-color: var(--accent-line); box-shadow: var(--shadow-hover); }
.kpi-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.kpi-icon.ok { background: var(--ok-soft); color: var(--ok); }
.kpi-icon.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-icon.sky { background: var(--chip); color: var(--muted-strong); }
.kpi b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; }

/* ---------- фильтры (горизонтальная панель) ---------- */
.filters {
  display: block; padding: 14px 18px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.filters-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 10px; }
.filters-head { display: flex; align-items: center; gap: 10px; list-style: none; width: 100%; }
.filters-head::-webkit-details-marker { display: none; }
.filters-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.filters-head .link { margin-left: auto; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); min-width: 170px; flex: 1; }
.filters select {
  font: inherit; font-size: 14px; color: var(--text); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); transition: border-color .15s;
}
.filters select:hover { border-color: var(--accent-line); }
.filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filters .check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; flex: none; min-width: 0; padding-bottom: 8px; }
.filters-note { width: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.filters-active { font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 8px; }
.filters-active:empty { display: none; }
.note { font-size: 11px; font-weight: 500; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 0 7px; }
.link { background: none; border: 0; color: var(--accent-text); cursor: pointer; font-size: 13px; padding: 0; font-weight: 600; }

/* ---------- список и карта ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 42%); gap: 20px; align-items: start; }
.results, .map-wrap { min-width: 0; }
.results-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; flex-wrap: wrap; }
.results-head h2 { font-size: 20px; letter-spacing: -.02em; }
/* сортировка каталога: переключатель-пилюля, как остальные сегменты */
.seg.sort { margin-left: auto; align-self: center; border-radius: 999px; }
.seg.sort button { border-radius: 999px; font-size: 13px; padding: 6px 13px; white-space: nowrap; }
.seg.sort[hidden] { display: none; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-toggle { display: none; border: 1px solid var(--accent-line); background: var(--surface); color: var(--accent-text); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 14px; font-weight: 500; cursor: pointer; }
.list { display: flex; flex-direction: column; gap: 12px; }

.item {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s;
  animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--accent-line); }
.item.active { border-color: var(--accent); }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.item h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 225) 72% 58%), hsl(calc(var(--h, 225) + 30) 78% 50%));
}
.rank { color: var(--muted); font-weight: 500; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.about { margin: 10px 0 0; color: var(--muted-strong); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 12px; font-weight: 500; background: var(--chip); color: var(--muted-strong); border-radius: 6px; padding: 2px 8px; }
.tag.ind { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.badge { font-size: 12px; border-radius: 999px; padding: 2px 9px; white-space: nowrap; font-weight: 500; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.mid { background: var(--accent-soft); color: var(--accent-text); }
.badge.no { background: var(--warn-soft); color: var(--warn); }
.badge.dead { background: var(--chip); color: var(--muted); }
.why { margin-top: 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--accent-line) 60%, transparent); border-radius: 12px; font-size: 13.5px; }
.why-label { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-text); margin-bottom: 4px; }
.why-label .icon { width: 15px; height: 15px; color: var(--accent-2); }
.why-src { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 3px; }
.match { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.match i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: inline-block; }
.match i.on { background: var(--accent); }
.match.strong { color: var(--accent-text); font-weight: 600; }

/* рейтинг */
.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); }
.rating .icon { width: 15px; height: 15px; fill: var(--star); stroke: var(--star); }
.rating span { color: var(--muted); font-weight: 500; }
.stars { display: inline-flex; gap: 2px; }
.stars .icon { width: 16px; height: 16px; stroke: var(--star); }
.stars .icon.on { fill: var(--star); }

.empty { background: var(--surface); border: 1px dashed var(--accent-line); border-radius: var(--radius); padding: 24px; animation: rise .4s both; }
.empty h3 { margin-bottom: 8px; }
.empty ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.more { align-self: center; margin-top: 4px; }

/* скелетон во время поиска */
.skeleton { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.skeleton i { display: block; height: 12px; border-radius: 6px; margin: 8px 0; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 45%, var(--surface-2) 65%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton i:first-child { width: 40%; height: 16px; }
.skeleton i:nth-child(3) { width: 75%; }

.map-wrap { position: sticky; top: 20px; }
#map { height: calc(100vh - 60px); min-height: 440px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.map-wrap p { margin: 6px 2px 0; }
:root[data-theme="dark"] .leaflet-tile { filter: brightness(.75) invert(1) contrast(.9) hue-rotate(200deg) saturate(.6); }
.leaflet-container { background: var(--surface-2) !important; font-family: inherit !important; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: color-mix(in srgb, var(--accent) 28%, transparent) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: var(--accent) !important; color: #fff !important; font-weight: 600; }
.pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 12px Inter, "Segoe UI", sans-serif; color: #fff; background: var(--accent); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.pin.dot { width: 14px; height: 14px; }

/* ---------- карточка компании (выезжающая панель) ---------- */
.drawer { position: fixed; inset: 0; z-index: 2000; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 13, 10, .35); animation: fade .2s both; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(580px, 100%); background: var(--surface); padding: 28px 30px 40px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg); overflow-y: auto; box-shadow: -12px 0 48px rgba(15, 13, 10, .16);
  animation: slide .28s cubic-bezier(.2, .7, .2, 1) both;
}
.close { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.close:hover { color: var(--text); border-color: var(--accent-line); }
.card-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.card-head .avatar { width: 52px; height: 52px; border-radius: 14px; font-size: 20px; }
.drawer h2 { font-size: 24px; letter-spacing: -.03em; }
.legal { color: var(--muted); font-size: 13px; margin-top: 2px; }
.section { margin-top: 22px; }
.section h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.props { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.props dt { color: var(--muted); }
.props dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 16px;
  font-size: 14px; font-weight: 600; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 13, 10, .1); transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--accent-text); border-color: var(--accent-line); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); box-shadow: none; }
.btn.danger:hover { border-color: var(--danger); }
.source { font-size: 12px; color: var(--muted); margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }

/* блок рейтинга в карточке */
.rating-box { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.rating-big { text-align: center; min-width: 88px; }
.rating-big b { display: block; font-size: 38px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.rating-big > span { display: block; font-size: 12px; color: var(--muted); }
.rating-big .stars { display: flex; justify-content: center; margin: 6px 0 2px; }
.crit { display: grid; grid-template-columns: 130px 1fr 32px; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.crit + .crit { margin-top: 6px; }
.crit .track { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.crit .track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--star), #f59e0b); width: 0; transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.crit b { color: var(--text); text-align: right; font-weight: 600; }
.rating-wait { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--accent-line); color: var(--muted); font-size: 14px; }
.rating-wait .progress { display: flex; gap: 4px; }
.rating-wait .progress i { width: 22px; height: 6px; border-radius: 999px; background: var(--line); }
.rating-wait .progress i.on { background: var(--star); }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.review-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.review-head b { color: var(--text); font-weight: 600; }
.review p { margin: 6px 0 0; font-size: 14px; }
/* оценки на других площадках — второстепенный блок, не смешивается с рейтингом SolvIT */
.ext { display: flex; flex-direction: column; gap: 6px; }
.ext-row > * { white-space: nowrap; }
.ext-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; transition: border-color .15s, background .15s;
}
.ext-row:hover { border-color: var(--accent-line); background: var(--surface-2); }
.ext-src { font-weight: 600; min-width: 108px; }
.ext-date { margin-left: auto; font-size: 12px; color: var(--muted); }
.ext-go { color: var(--accent-text); }
.ext-sub { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted-strong); }
.ext-sub span { font-weight: 400; color: var(--muted); }
.ext-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.demo-flag { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 0 7px; }

/* формы: заявка и отзыв */
.request { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); animation: rise .3s both; }
.request h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.request p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.request label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--muted-strong); margin-bottom: 12px; }
.request input, .request textarea {
  font: inherit; font-weight: 400; color: var(--text); padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.request textarea { min-height: 100px; resize: vertical; border-radius: 12px; }
.request input:focus, .request textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.request .check { flex-direction: row; align-items: flex-start; gap: 8px; color: var(--text); font-weight: 400; }
.request .check input { margin-top: 3px; }
.request .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.error { color: var(--danger); font-size: 13px; margin: 0 0 10px; }
.done { padding: 14px 16px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); margin-top: 18px; animation: rise .3s both; }
.done a { color: inherit; font-weight: 600; }
.star-input { display: flex; gap: 4px; }
.star-input button { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--star); transition: transform .12s; }
.star-input button:hover { transform: scale(1.18); }
.star-input .icon { width: 26px; height: 26px; stroke: var(--star); }
.star-input button.on .icon { fill: var(--star); }
.score-row { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text); font-size: 14px; }

/* ---------- аналитика ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; animation: rise .45s both; }
.panel h2 { font-size: 17px; letter-spacing: -.02em; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.panel .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 14px; }
.bar-label { position: relative; padding: 5px 10px; border-radius: var(--radius-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bar-label i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 26%, transparent)); border-radius: var(--radius-sm); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.bar-label span { position: relative; }
.bar b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar.gap .bar-label i { background: linear-gradient(90deg, var(--warn-soft), color-mix(in srgb, var(--star) 30%, transparent)); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut circle { fill: none; stroke-width: 14; transition: stroke-dasharray 1s cubic-bezier(.2, .7, .2, 1); }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.legend b { color: var(--text); font-weight: 600; margin-left: auto; padding-left: 12px; }
table.list { display: table; width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-note { color: var(--muted); font-size: 14px; padding: 6px 0; }
.mod-item { padding: 12px 0; border-top: 1px solid var(--line); }
.mod-item:first-child { border-top: 0; }
.mod-actions { display: flex; gap: 8px; margin-top: 8px; }

.foot { padding: 20px 0 0; color: var(--muted); font-size: 12.5px; }
.review-page { max-width: 640px; }

/* ---------- аккаунт ---------- */
/* без карточки базы (страница кабинета) кнопку входа прижимает вниз она сама */
.side-nav + .side-account { margin-top: auto; }
.side-account {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s;
}
.side-account:hover, .side-account[aria-current="page"] { border-color: var(--accent-line); }
.side-account .icon { color: var(--accent-text); }
.side-account .label { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-account .label b { font-size: 14px; font-weight: 600; }
.side-account .label span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge.claimed { display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: #fff; }
.badge.claimed .icon { width: 12px; height: 12px; stroke-width: 3; }

.account-page { max-width: 980px; }
.auth { padding: 36px 0 20px; animation: rise .4s both; }
.auth.narrow { max-width: 520px; }
.auth-title { font-size: 44px; font-weight: 500; line-height: 1.1; letter-spacing: -.035em; color: var(--title-1); }
.auth-title span { color: var(--title-2); }
.auth-title.small { font-size: 28px; margin: 18px 0 6px; }
.auth-sub { margin: 12px 0 24px; font-size: 17px; color: var(--hero-sub); max-width: 560px; }
.back { display: inline-block; margin-bottom: 14px; }
/* выбор роли перед входом: карточка по центру, как на hh */
.role-pick { display: flex; justify-content: center; padding-top: 40px; }
.role-box {
  width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; padding: 32px 28px 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(15, 13, 10, .06);
}
.role-logo { align-self: center; }
.role-title { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--title-1); margin: 2px 0 8px; }
.role-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.role-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.role-row:hover { border-color: var(--accent-line); }
.role-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.role-row.on { border: 2px solid var(--accent); padding: 13px 15px; }
.role-ava { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.role-ava .icon { width: 24px; height: 24px; }
.role-text { display: flex; flex-direction: column; gap: 2px; }
.role-text b { font-size: 16px; font-weight: 600; }
.role-text span { font-size: 13px; color: var(--muted); }
.role-main { justify-content: center; width: 100%; padding: 13px 18px; font-size: 15px; }
.btn.soft { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.btn.soft:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent-line)); }
.auth-next { min-width: 200px; justify-content: center; padding: 12px 22px; font-size: 15px; }
.auth-next:disabled { opacity: .45; cursor: not-allowed; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted-strong); }
.auth-form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--text); }
.auth-form input:not([type=checkbox]), .claim-input {
  font: inherit; font-size: 16px; color: var(--text); padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.auth-form input:focus, .claim-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* поле кода: шесть ячеек, прозрачное настоящее поле поверх них */
.otp { position: relative; width: 100%; max-width: 380px; }
.otp .otp-input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: transparent !important; caret-color: transparent; font-size: 16px !important; letter-spacing: 0; outline: none; cursor: text;
  -webkit-text-fill-color: transparent;
}
.otp-input::selection { background: transparent; }
.otp-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-cells span {
  height: 58px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s;
}
.otp-cells span.filled { border-color: var(--accent-line); }
.otp.focus .otp-cells span.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.otp.focus .otp-cells span.on:empty::after { content: ""; width: 2px; height: 26px; border-radius: 1px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.row-form { flex-direction: row; flex-wrap: wrap; }
.row-form input { flex: 1; min-width: 220px; }
.hint { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted-strong); }
.hint .icon { color: var(--accent-text); width: 16px; height: 16px; margin-top: 2px; }
.resend { align-self: flex-start; }
.forgot { align-self: flex-start; margin-top: -6px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 46px !important; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--accent-text); background: var(--accent-soft); }
.pw-toggle .icon { width: 18px; height: 18px; }
.badge.icon-only { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; vertical-align: middle; }
.badge.icon-only .icon { width: 13px; height: 13px; stroke-width: 3; }
.resend:disabled { color: var(--muted); cursor: default; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--chip); align-self: flex-start; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted-strong); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 13, 10, .1); }
.demo-code { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.demo-code span { display: inline-block; margin-left: 4px; font-size: 18px; font-weight: 700; letter-spacing: .2em; color: var(--text); }
.acc-top { align-items: center; }
.acc-top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.acc-h2 { font-size: 20px; letter-spacing: -.02em; margin: 26px 0 12px; }
.acc-h2 .muted { font-weight: 500; }
.acc-list { display: flex; flex-direction: column; gap: 12px; }
.acc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; animation: rise .35s both; }
.acc-card-head { display: flex; align-items: center; gap: 12px; }
.acc-card-head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acc-card-head .badge { margin-left: auto; }
.acc-card-head > div > .demo-flag { align-self: flex-start; }
.acc-msg { margin: 10px 0 0; color: var(--muted-strong); font-size: 14px; white-space: pre-line; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.acc-company { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.acc-company-name { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.acc-kpis { margin: 16px 0 0; }
.acc-foot { margin-top: 18px; }
.plaque { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--radius); font-size: 14px; }
.plaque.warn { background: var(--warn-soft); color: var(--warn); }
.plaque b { display: block; color: var(--text); margin-bottom: 2px; }
.plaque .link { display: block; margin-top: 8px; }
.claim-input { width: 100%; }
.claim-results { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.claim-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.claim-item:hover { border-color: var(--accent-line); background: var(--surface-2); }
.claim-item > span { display: flex; flex-direction: column; }
.method { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.method h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 4px; }
.method h3 .icon { color: var(--accent-text); }
.method .muted { margin: 0 0 12px; }

/* ---------- помощник: плавающая кнопка и окно диалога ---------- */
.as-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 1800; display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 24px 0 16px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 16px; color: var(--muted);
  border: 3px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(90deg, #477ffc, #1e3a8a) border-box;
  box-shadow: 0 10px 30px rgba(48, 94, 243, .25); transition: transform .2s, box-shadow .2s;
  animation: rise .5s .6s cubic-bezier(.2, .7, .2, 1) both;
}
.as-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(48, 94, 243, .32); color: var(--text); }
.as-fab[hidden] { display: none; }
.as-fab-short { display: none; }
.as-sparkle { width: 26px; height: 26px; flex: none; }

.as-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 1900; width: 400px; height: min(620px, calc(100vh - 48px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgba(15, 13, 10, .18), 0 0 0 4px rgba(71, 127, 252, .06);
  overflow: hidden; transform-origin: bottom right; animation: pop .22s cubic-bezier(.2, .7, .2, 1) both;
}
.as-panel[hidden] { display: none; }
.as-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--hero); }
.as-head b { display: block; font-weight: 600; letter-spacing: -.01em; }
.as-head span { font-size: 13px; color: var(--muted); }
.as-ava { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--accent-line); flex: none; }
.as-ava .as-sparkle { width: 22px; height: 22px; }
.as-close { margin-left: auto; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 18px; cursor: pointer; }
.as-close:hover { color: var(--text); border-color: var(--accent-line); }
.as-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.as-msg { max-width: 88%; padding: 10px 14px; font-size: 14px; line-height: 1.5; animation: rise .3s both; }
.as-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--accent-line) 60%, transparent); border-radius: 16px 16px 16px 4px; }
.as-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.as-msg.chips, .as-msg.cards { max-width: 100%; padding: 0; align-self: stretch; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-chip { border: 1px solid var(--accent-line); background: var(--surface); color: var(--accent-text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s; }
.as-chip:hover { background: var(--accent-soft); }
.as-cards { display: flex; flex-direction: column; gap: 8px; }
.as-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.as-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-hover); }
.as-card-head { display: flex; align-items: center; gap: 8px; }
.as-card-head .avatar { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
.as-card-name { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; }
.as-card-meta { display: flex; gap: 6px; }
.as-card-why { font-size: 13px; color: var(--muted-strong); }
.as-card-go { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.as-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.as-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); animation: blink 1s infinite both; }
.as-typing i:nth-child(2) { animation-delay: .15s; }
.as-typing i:nth-child(3) { animation-delay: .3s; }
.as-form { display: flex; gap: 6px; margin: 0 12px; padding: 5px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--surface); }
.as-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.as-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); padding: 8px 12px; }
.as-form input:focus { outline: none; }
.as-form button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 17px; cursor: pointer; flex: none; }
.as-form button:hover { background: var(--accent-strong); }
.as-note { margin: 8px 16px 12px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- анимации ---------- */
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes breathe { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -50%) scale(1.08); } }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); } 50% { box-shadow: 0 0 0 7px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .map-wrap { position: static; order: -1; }
  #map { height: 340px; min-height: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 1500; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-label, .side-card { display: none; }
  .side-nav { flex-direction: row; gap: 2px; margin-left: auto; }
  .side-nav a { padding: 7px 10px; font-size: 14px; }
  .side-nav a .label-long { display: none; }
  .theme-toggle { width: auto; padding: 7px 9px; }
  .theme-toggle .label { display: none; }
  .side-account { padding: 7px 9px; }
  .side-nav + .side-account { margin-top: 0; }
  .side-account .label { display: none; }
  .main { padding: 18px 16px 30px; }
}
@media (max-width: 760px) {
  .logo > span:not(.logo-mark) { display: none; }
  .page-title { font-size: 24px; }
  .hero { padding: 30px 16px 22px; border-radius: 20px; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 15px; margin: 12px 0 18px; }
  .hero-sub br { display: none; }
  .hero::after { opacity: .35; }
  .search { padding: 4px; }
  .search button { height: 42px; padding: 0 14px 0 16px; }
  .search button::after { display: none; }
  .search input { font-size: 15px; padding: 10px 8px 10px 38px; }
  .search-field .icon { left: 12px; }
  .examples .chip:nth-child(n + 4):not(.more-examples) { display: none; }
  .examples.all .chip { display: inline-block !important; }
  .examples .chip.more-examples { display: inline-block; }
  .examples.all .chip.more-examples { display: none !important; }
  .trust { display: block; text-align: left; font-size: 13px; }
  .trust .dot { display: inline-block; margin-right: 6px; vertical-align: middle; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-icon { width: 34px; height: 34px; }
  .kpi b { font-size: 19px; }
  .filters-head { cursor: pointer; }
  .filters-head h2::after { content: "▾"; color: var(--muted); font-weight: 400; }
  .filters[open] .filters-head h2::after { content: "▴"; }
  .filters label { min-width: 100%; }
  .map-wrap { display: none; }
  .layout.show-map .map-wrap { display: block; }
  #map { height: 300px; }
  .map-toggle { display: inline-block; }
  .sort { margin-left: 0; }
  .item-head { flex-wrap: wrap; row-gap: 6px; }
  .drawer-panel { border-radius: 0; padding: 24px 18px 36px; }
  .ext-src { min-width: 0; }
  .role-pick { padding-top: 8px; }
  .role-box { padding: 24px 18px 20px; }
  .auth-title { font-size: 32px; }
  .auth { padding-top: 16px; }
  .acc-top-actions { width: 100%; justify-content: space-between; }
  .acc-card-head { flex-wrap: wrap; row-gap: 8px; }
  .acc-card-head > div { min-width: 150px; }
  .sidebar { gap: 8px; padding: 10px 12px; }
  .logo { padding: 0; }
  .side-nav a { gap: 6px; padding: 7px 8px; }
  .as-fab { right: 16px; bottom: 16px; height: 50px; padding: 0 18px 0 12px; font-size: 15px; }
  .as-fab-long { display: none; }
  .as-fab-short { display: inline; }
  .as-panel { right: 0; bottom: 0; left: 0; width: auto; height: 86vh; border-radius: 20px 20px 0 0; }
  .props { grid-template-columns: 1fr; }
  .props dt { margin-top: 6px; }
  .request .row { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .rating-box { grid-template-columns: 1fr; }
  .crit { grid-template-columns: 110px 1fr 30px; }
  .score-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 380px) {
  .side-nav a .icon { display: none; }
}

/* ---------- главная (index.html, landing.js): по мотивам Sortlist, DESIGN.md 3 и 4.13 ---------- */
a.chip { text-decoration: none; display: inline-block; }
.btn .icon { width: 16px; height: 16px; }
.l-section { margin-top: 64px; }
.l-head { max-width: 720px; margin-bottom: 24px; }
.l-title { font-size: 40px; font-weight: 500; line-height: 1.1; letter-spacing: -.035em; color: var(--title-1); margin: 0; }
.l-title span { color: var(--title-2); }
.l-sub { font-size: 17px; line-height: 1.5; color: var(--hero-sub); margin: 12px 0 0; max-width: 620px; }
.l-more { display: flex; justify-content: center; margin-top: 22px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile, .sc-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover, .tile:focus-visible, .sc-card:hover, .sc-card:focus-visible {
  border-color: var(--accent-line); box-shadow: 0 12px 32px rgba(48, 94, 243, .1); transform: translateY(-2px); outline: none;
}
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tile-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.tile-ico .icon { width: 22px; height: 22px; }
.tile-go { color: var(--muted); transition: color .15s, transform .15s; }
.tile:hover .tile-go { color: var(--accent-text); transform: translate(2px, -2px); }
.tile h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--accent-text); margin: 4px 0 0; }
.tile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); flex: 1; }
.tile li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-count { font-size: 13px; font-weight: 600; color: var(--muted-strong); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--accent-line) 60%, transparent); border-radius: var(--radius); padding: 22px; }
.steps b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; }
.steps h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin: 14px 0 6px; }
.steps p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted-strong); }

.demand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.demand-text .btn { margin-top: 4px; }

/* лента частых запросов: строка вспыхивает, когда луч радара проходит её метку */
.feed { list-style: none; margin: 22px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s;
  animation: feed-hit var(--p, 6s) linear infinite; animation-delay: var(--delay, 0s);
}
.feed-item:hover, .feed-item:focus-visible { border-color: var(--accent-line); transform: translateX(3px); outline: none; }
.feed-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.feed-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.feed-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-text small { font-size: 12px; color: var(--muted); }
.feed-go { color: var(--muted); display: grid; } .feed-go .icon { width: 16px; height: 16px; }
.feed-item:hover .feed-go { color: var(--accent-text); }
.feed-empty { padding: 14px; border: 1px dashed var(--accent-line); border-radius: 14px; font-size: 14px; color: var(--muted); }
@keyframes feed-hit {
  0% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 26px rgba(48, 94, 243, .14); }
  24%, 100% { border-color: var(--line); box-shadow: 0 0 0 0 transparent; }
}

/* радар: кольца, вращающийся луч со следом, метки запросов, проверенные компании на орбитах */
.radar {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 540px; justify-self: center; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--hero); border: 1px solid color-mix(in srgb, var(--accent-line) 55%, transparent);
}
.radar::before {  /* мягкое свечение в центре */
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(71, 127, 252, .16), transparent 46%);
}
.radar-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%);
  border: 1px dashed color-mix(in srgb, var(--accent-2) 38%, transparent);
}
.radar-ring.r1 { width: 30%; height: 30%; }
.radar-ring.r2 { width: 58%; height: 58%; }
.radar-ring.r3 { width: 86%; height: 86%; border-style: solid; border-color: color-mix(in srgb, var(--accent-2) 22%, transparent); }
.radar-sweep {
  position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; border-radius: 50%; z-index: 2; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg 270deg, rgba(71, 127, 252, .05) 300deg, rgba(71, 127, 252, .34) 360deg);
  animation: sweep var(--p, 6s) linear infinite;
}
.radar-sweep::after {  /* ведущая кромка луча */
  content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 50%; transform: translateX(-50%); border-radius: 2px;
  background: linear-gradient(to top, rgba(71, 127, 252, 0), var(--accent-2));
}
@keyframes sweep { to { transform: rotate(360deg); } }
.orbit { position: absolute; left: 50%; top: 50%; border-radius: 50%; z-index: 1; animation: orbit 80s linear infinite; }
.orbit.o3 { width: 86%; height: 86%; }
.orbit.o2 { width: 58%; height: 58%; animation-duration: 55s; animation-direction: reverse; }
@keyframes orbit { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.orbit-dot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); }
.orbit-dot .avatar {
  width: 32px; height: 32px; border-radius: 50%; font-size: 13px; border: 2px solid var(--surface);
  box-shadow: 0 4px 14px rgba(15, 13, 10, .16); animation: spin 80s linear infinite reverse;  /* компенсирует поворот орбиты */
}
.orbit.o2 .orbit-dot .avatar { animation-duration: 55s; animation-direction: normal; }
@keyframes spin { to { transform: rotate(360deg); } }
.blip {
  position: absolute; left: var(--x); top: var(--y); z-index: 3; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); transition: transform .2s;
  animation: blip-hit var(--p, 6s) linear infinite; animation-delay: var(--delay, 0s);
}
.blip::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent-2); opacity: 0;
  animation: blip-ping var(--p, 6s) ease-out infinite; animation-delay: var(--delay, 0s);
}
.blip.on { transform: scale(1.3); }
@keyframes blip-ping { 0% { transform: scale(1); opacity: .9; } 22% { transform: scale(3.4); opacity: 0; } 100% { opacity: 0; } }
@keyframes blip-hit { 0% { filter: brightness(1.35); } 15%, 100% { filter: none; } }
.radar-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent), 0 10px 30px rgba(48, 94, 243, .28);
}
.radar-core img { width: 62px; height: 62px; }

.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sc-card { padding: 18px 20px; gap: 12px; }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sc-name b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-name span { font-size: 12px; color: var(--muted); }
.sc-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted-strong); flex: 1; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-foot .tags { margin-top: 0; }

.l-cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.cta-card { padding: 32px; border-radius: var(--radius-lg); background: var(--hero); border: 1px solid color-mix(in srgb, var(--accent-line) 55%, transparent); }
.cta-card.alt { background: var(--surface); border-color: var(--line); }
.cta-card h2 { font-size: 28px; font-weight: 500; letter-spacing: -.03em; color: var(--title-1); margin: 0 0 8px; }
.cta-card p { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--hero-sub); max-width: 440px; }

/* ---------- каталог (catalog.html): компактный поиск вместо hero ---------- */
.catalog-search { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.catalog-search .search { max-width: none; box-shadow: none; }
.catalog-search .examples { margin-top: 12px; max-width: none; }

@media (max-width: 1100px) {
  .tiles, .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demand { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .l-section, .l-cta { margin-top: 44px; }
  .l-title { font-size: 28px; }
  .l-sub { font-size: 15px; }
  .tiles, .showcase, .steps, .l-cta { grid-template-columns: minmax(0, 1fr); }
  .radar { max-width: 360px; }
  .orbit-dot .avatar { width: 26px; height: 26px; font-size: 11px; }
  .radar-core { width: 64px; height: 64px; }
  .radar-core img { width: 48px; height: 48px; }
  .cta-card { padding: 24px 20px; }
  .catalog-search { padding: 12px; }
}
