/* Сравнение конкурентов Bindl. Цвета и шрифт — Figma UI kit (design-system/figma-kit.md).
   Lato из Google Fonts без кириллицы, поэтому шрифт лежит рядом: assets/fonts (Lato 2.0). */
@font-face { font-family: "Lato"; src: url("assets/fonts/lato-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("assets/fonts/lato-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Layout: синяя шапка с вкладками категорий → карточки сервисов → фильтры → таблица со своей прокруткой */
:root {
  --brand: #3774dd; --brand-600: #2256ae; --brand-100: #e1ecfb; --brand-50: #f5f8fd;
  --accent: #ef8c34;                                   /* Sub color: только точечно — колонка Bindl */
  --ink-900: #212529; --ink-700: #535659; --ink-500: #6c6e71;
  --line: #dde6f0; --line-strong: #b7c9de; --surface: #ffffff; --surface-2: #f5f8fd;
  --top-bg: #3774dd; --top-text: #e6eefb; --top-active: #2256ae;
  --ok: #00964b; --ok-bg: #e2f4ea;
  --warn: #8a5f00; --warn-bg: #fdf6e6;
  --bad: #c1121f; --bad-bg: #fbe7e8;
  --info: #2256ae; --info-bg: #e1ecfb;
  --none: #6c6e71; --none-bg: #ebebeb;
  --shadow: 0 1px 2px rgba(33,37,41,.06), 0 1px 3px rgba(33,37,41,.04);
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-control: 8px; --r-card: 12px; --r-pill: 999px;
  --max: 1280px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6f9ff0; --brand-600: #93b7f4; --brand-100: #1b2b4d; --brand-50: #142039;
    --ink-900: #e8ecf3; --ink-700: #c3cad6; --ink-500: #949eae;
    --line: #2a3445; --line-strong: #3a4a62; --surface: #151c28; --surface-2: #0d121b;
    --top-bg: #142a52; --top-text: #c7d6f2; --top-active: #1f3a6e;
    --ok: #5cc285; --ok-bg: #143323; --warn: #f0b457; --warn-bg: #35280e;
    --bad: #f07a7a; --bad-bg: #3d1a1a; --info: #8ab0f4; --info-bg: #1b2b4d;
    --none: #949eae; --none-bg: #222b39;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #6f9ff0; --brand-600: #93b7f4; --brand-100: #1b2b4d; --brand-50: #142039;
  --ink-900: #e8ecf3; --ink-700: #c3cad6; --ink-500: #949eae;
  --line: #2a3445; --line-strong: #3a4a62; --surface: #151c28; --surface-2: #0d121b;
  --top-bg: #142a52; --top-text: #c7d6f2; --top-active: #1f3a6e;
  --ok: #5cc285; --ok-bg: #143323; --warn: #f0b457; --warn-bg: #35280e;
  --bad: #f07a7a; --bad-bg: #3d1a1a; --info: #8ab0f4; --info-bg: #1b2b4d;
  --none: #949eae; --none-bg: #222b39;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.57; color: var(--ink-900); background: var(--surface-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; text-wrap: balance; }

/* Шапка */
.top { background: var(--top-bg); color: #fff; }
.top__inner { max-width: var(--max); margin: 0 auto; padding: 12px 16px 0; }
.top__brand { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.top__brand img { height: 26px; width: auto; display: block; }
.top__brand > span { color: var(--top-text); font-size: 13px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { color: var(--top-text); padding: 10px 14px; border-radius: 8px 8px 0 0; white-space: nowrap; font-weight: 700; }
.tabs a:hover { color: #fff; text-decoration: none; background: var(--top-active); }
.tabs a[aria-current="page"] { color: var(--ink-900); background: var(--surface-2); }

/* Переключатель разделов сайта для коллег (Роадмап / Конкуренты) — только на Cloudflare Pages */
.sitenav { margin-left: auto; display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: rgba(255,255,255,.16); }
.sitenav a { color: #fff; font-size: 13px; font-weight: 700; padding: 5px 14px; border-radius: var(--r-pill); white-space: nowrap; }
.sitenav a:hover { text-decoration: none; background: rgba(255,255,255,.16); }
.sitenav a[aria-current="page"] { background: #fff; color: var(--brand-600); }

main { max-width: var(--max); margin: 0 auto; padding: 24px 16px 48px; }
main h1 { font-size: 28px; }
.lead { color: var(--ink-700); max-width: 760px; margin: 8px 0 0; font-size: 16px; }
.muted { color: var(--ink-500); }
.small { font-size: 12px; }
section + section { margin-top: 32px; }
.section-title { font-size: 20px; margin-bottom: 12px; }

/* Карточки сервисов */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.card--bindl { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.card h3 { font-size: 16px; }
.card__type { color: var(--ink-700); font-size: 13px; flex: 1; }
.card__links { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.sim { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.sim__bar { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--none-bg); overflow: hidden; }
.sim__bar i { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); }

/* Панель фильтров */
.filters { padding: 12px 0; margin-top: 24px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 13px; font-weight: 700; height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-700); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:focus-visible, .search:focus-visible, .toggle input:focus-visible, .sitenav a:focus-visible, .tabs a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(55,116,221,.35); }
.filters__row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 10px; }
.search { font: inherit; height: 40px; padding: 0 12px; border-radius: var(--r-control); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-900); width: 260px; max-width: 100%; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-700); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }

/* Легенда и бейджи */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--ink-500); margin-top: 12px; }
.legend > span:last-child { align-self: center; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.s-yes { color: var(--ok); background: var(--ok-bg); }
.s-part { color: var(--warn); background: var(--warn-bg); }
.s-dev { color: var(--info); background: var(--info-bg); }
.s-no { color: var(--bad); background: var(--bad-bg); }
.s-none { color: var(--none); background: var(--none-bg); font-weight: 400; }

/* Таблица прокручивается внутри себя: так шапка с названиями сервисов и колонка функций остаются на месте */
.table-wrap { overflow: auto; max-height: calc(100vh - 32px); overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); margin-top: 16px; scroll-margin-top: 16px; }
table.cmp { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; }
.cmp th, .cmp td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; font-size: 13px; min-width: 170px; box-shadow: inset 0 -1px 0 var(--line-strong); }
.cmp thead th a { font-weight: 700; color: var(--ink-900); }
.cmp thead th .small { font-weight: 400; display: block; margin-top: 2px; }
.cmp th.feat { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 200px; max-width: 240px; font-weight: 700; font-size: 13px; }
.cmp thead th.feat { z-index: 3; color: var(--ink-500); font-weight: 400; }
.cmp .col-bindl { background: var(--brand-50); }
.cmp thead th.col-bindl { background: var(--brand-50); box-shadow: inset 0 -3px 0 var(--accent); }
.cmp tr.group th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); padding: 8px 12px; position: sticky; left: 0; }
.cmp tr.group td { background: var(--surface-2); }
.cmp td .note { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-700); }
.cmp td.text { font-size: 13px; color: var(--ink-700); }
/* Описательная строка «как работает»: текст без бейджа, чуть выделенный фон */
.cmp tr.text-row td, .cmp tr.text-row th.feat { background: var(--surface-2); }
.cmp tr.text-row td.col-bindl { background: var(--brand-100); }
.desc { font-size: 13px; color: var(--ink-900); }
.cmp tbody tr:not(.group):hover td, .cmp tbody tr:not(.group):hover th.feat { background: var(--brand-100); }
.hide-notes .note { display: none !important; }
.empty { padding: 32px; text-align: center; color: var(--ink-500); }

/* Страница сервиса */
.back { display: inline-block; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.hero { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }
.hero h1 { font-size: 30px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 20px; border-radius: var(--r-control); background: var(--brand); color: #fff; font-weight: 700; white-space: nowrap; }
.btn:hover { background: var(--brand-600); text-decoration: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; min-width: 0; }
.fact dt { font-size: 12px; color: var(--ink-500); margin-bottom: 4px; }
.fact dd { margin: 0; font-size: 14px; }
.usp { margin-top: 16px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r-card); padding: 16px; font-size: 16px; font-weight: 700; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; min-width: 0; }
.panel h2 { font-size: 16px; margin-bottom: 4px; }
.panel > p { margin: 0 0 12px; font-size: 12px; color: var(--ink-500); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list b { font-weight: 700; }
.list .note { display: block; font-size: 12px; color: var(--ink-700); margin-top: 2px; }
.list .vs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.feat-table { width: 100%; border-collapse: collapse; }
.feat-table th, .feat-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.feat-table th { font-weight: 400; width: 40%; }
.feat-table tr.group th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); background: var(--surface-2); }
.feat-table tr.text-row th, .feat-table tr.text-row td { background: var(--surface-2); }
.feat-table .note { display: block; font-size: 12px; color: var(--ink-700); margin-top: 4px; }

footer { max-width: var(--max); margin: 0 auto; padding: 0 16px 32px; font-size: 12px; color: var(--ink-500); }

@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .search { width: 100%; }
  .sitenav { margin-left: 0; }
  .cmp th.feat { min-width: 140px; }
  .cmp thead th { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
