/* sravnizub.ru — design tokens + components. Палитра «Fresh Teal» (вариант A).
   Сменить тему = поменять значения в :root. */

:root {
  /* brand */
  --brand:        #0EA5A4;
  --brand-dark:   #0B7E7D;
  --brand-soft:   #E6F7F6;
  --accent:       #F97316;

  /* price + semantics */
  --price:        #0F172A;
  --good-bg:      #DCFCE7;
  --good-fg:      #15803D;
  --warn-bg:      #FEF3C7;
  --warn-fg:      #B45309;
  --neutral-bg:   #F1F5F9;
  --neutral-fg:   #475569;

  /* text */
  --ink:          #0F172A;
  --body:         #334155;
  --muted:        #64748B;
  --faint:        #94A3B8;

  /* surfaces */
  --surface:      #FFFFFF;
  --bg:           #F4F7FA;
  --border:       #E2E8F0;
  --border-soft:  #EEF2F6;

  /* shape */
  --r-chip:  8px;
  --r:       12px;
  --r-card:  16px;
  --r-pill:  999px;
  --shadow:  0 1px 3px rgba(15,23,42,.05);
  --shadow-h:0 8px 20px rgba(15,23,42,.08);

  /* type */
  --font-head: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --maxw: 800px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--body);
  background: var(--bg);
  padding-bottom: 88px; /* место под compare-bar */
}

.ic { width: 1em; height: 1em; stroke: currentColor; fill: none;
      stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
      vertical-align: -0.15em; flex-shrink: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244,247,250,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.hdr-in { display: flex; align-items: center; justify-content: space-between;
          height: 58px; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 20px;
        letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--brand); }
.city { display: inline-flex; align-items: center; gap: 5px;
        background: none; border: none; cursor: pointer;
        font-family: var(--font-body); font-size: 14px; color: var(--neutral-fg); }
.city .ic:first-child { color: var(--brand); }
.city .chev { width: .8em; height: .8em; color: var(--faint); }

/* ---------- hero / search ---------- */
.hero { padding: 26px 0 20px; }
.hero h1 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em;
           font-size: 28px; line-height: 1.15; color: var(--ink); margin: 0 0 8px; }
.hero .sub { font-size: 15px; color: var(--muted); margin: 0 0 18px; max-width: 46ch; }

.search { display: flex; align-items: center; gap: 8px;
          background: var(--surface); border: 1px solid var(--border);
          border-radius: var(--r); padding: 7px 7px 7px 14px; box-shadow: var(--shadow); }
.search .ic { color: var(--faint); width: 20px; height: 20px; }
.search input { flex: 1; border: none; outline: none; background: none;
                font-family: var(--font-body); font-size: 15px; color: var(--ink);
                min-width: 0; padding: 8px 0; }
.search input::placeholder { color: var(--faint); }
.search button { background: var(--brand); color: #fff; border: none; cursor: pointer;
                 font-family: var(--font-body); font-weight: 600; font-size: 14px;
                 padding: 10px 18px; border-radius: 9px; white-space: nowrap; }
.search button:hover { background: var(--brand-dark); }

.stats { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px;
           -ms-overflow-style: none; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
        background: var(--surface); border: 1px solid var(--border); color: var(--body);
        font-size: 13px; padding: 7px 12px; border-radius: var(--r-pill); cursor: pointer; }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .ic { width: 15px; height: 15px; }

/* ---------- results bar + summary ---------- */
.results { display: flex; align-items: baseline; justify-content: space-between;
           gap: 12px; flex-wrap: wrap; margin: 16px 0 12px; }
.results h2 { font-family: var(--font-head); font-weight: 700; font-size: 18px;
              color: var(--ink); margin: 0; }
.results .count { font-size: 13px; color: var(--muted); }
.sort { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
        background: none; border: none; font-family: var(--font-body);
        font-size: 13px; color: var(--body); }
.sort .ic:first-child { color: var(--brand); width: 15px; height: 15px; }

.summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.summary .cell { background: var(--surface); border: 1px solid var(--border-soft);
                 border-radius: var(--r); padding: 10px 12px; }
.summary .lbl { font-size: 12px; color: var(--muted); }
.summary .val { font-family: var(--font-head); font-weight: 800; font-size: 18px;
                margin-top: 2px; color: var(--ink); }
.summary .cell.lo .val { color: var(--brand-dark); }
.summary .cell.hi .val { color: var(--neutral-fg); }

/* ---------- listing + card ---------- */
.listing { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.card { background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--r-card); padding: 16px 18px; box-shadow: var(--shadow);
        transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--brand); box-shadow: var(--shadow-h); }
.card.is-best { border: 2px solid var(--brand); }
.card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,165,164,.18); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.brand-id { display: flex; align-items: center; gap: 12px; }
.logo-sq { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft);
           color: var(--brand-dark); font-family: var(--font-head); font-weight: 700;
           font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink); }
.brand-meta { font-size: 13px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
         font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: var(--r-pill); }
.badge .ic { width: 15px; height: 15px; }
.badge.verify { background: var(--brand-soft); color: var(--brand-dark); }
.badge.good   { background: var(--good-bg);  color: var(--good-fg); padding: 4px 9px; }
.badge.low    { background: var(--warn-bg);  color: var(--warn-fg); padding: 4px 9px; }
.badge.neutral{ background: var(--neutral-bg); color: var(--neutral-fg); padding: 4px 9px; }

.price-block { margin-top: 12px; }
.price-label { font-size: 13px; color: var(--muted); }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.price-row .from { font-size: 14px; color: var(--muted); }
.price { font-family: var(--font-head); font-weight: 800; font-size: 26px;
         letter-spacing: -.01em; color: var(--price); }

.meta-line { margin-top: 10px; font-size: 13px; color: var(--body);
             display: flex; align-items: center; gap: 6px; }
.meta-line.fresh { font-size: 12.5px; color: var(--muted); }
.meta-line .ic { width: 15px; height: 15px; color: var(--faint); }
.meta-line.fresh .ic { color: var(--brand); width: 14px; height: 14px; }

.card-prices { display: flex; align-items: center; justify-content: space-between; gap: 10px;
               margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.card-prices .mini { font-size: 12.5px; color: var(--muted); }
.card-prices a { font-size: 13px; color: var(--brand); font-weight: 500; text-decoration: none; white-space: nowrap; }

.card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.compare-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
                  font-size: 13px; color: var(--muted); user-select: none; }
.compare-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.compare-toggle .box { width: 18px; height: 18px; border: 1.5px solid var(--faint);
                       border-radius: 5px; display: inline-flex; align-items: center;
                       justify-content: center; color: #fff; transition: .15s; }
.compare-toggle .box .ic { width: 13px; height: 13px; opacity: 0; stroke-width: 3; }
.compare-toggle input:checked + .box { background: var(--brand); border-color: var(--brand); }
.compare-toggle input:checked + .box .ic { opacity: 1; }

.acts { display: flex; gap: 8px; }
.btn { font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
       border-radius: 11px; border: 1px solid transparent; display: inline-flex;
       align-items: center; gap: 6px; }
.btn-primary { background: var(--brand); color: #fff; padding: 9px 18px; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-icon { background: var(--surface); border-color: #CBD5E1; color: var(--brand-dark); padding: 9px 12px; }
.btn-icon:hover { background: var(--brand-soft); }
.btn-icon .ic { width: 17px; height: 17px; }

.note { margin: 16px 0 8px; font-size: 12px; color: var(--muted);
        display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.note .ic { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; margin-top: 1px; }

/* ---------- compare bar ---------- */
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
               display: flex; justify-content: center; padding: 14px 16px;
               background: linear-gradient(to top, var(--bg) 60%, rgba(244,247,250,0));
               pointer-events: none; transform: translateY(120%); transition: transform .2s; }
.compare-bar.show { transform: translateY(0); }
.compare-bar button { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px;
                      background: var(--brand-dark); color: #fff; border: none; cursor: pointer;
                      font-family: var(--font-body); font-weight: 600; font-size: 14px;
                      padding: 12px 24px; border-radius: var(--r-pill); box-shadow: var(--shadow-h); }
.compare-bar .ic { width: 17px; height: 17px; }

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
          font-size: 13px; color: var(--muted); padding: 16px 0 2px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { color: var(--faint); }

/* ---------- page heading (service/provider) ---------- */
.page-h1 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em;
           font-size: 26px; line-height: 1.15; color: var(--ink); margin: 6px 0 6px; }
.page-sub { font-size: 14px; color: var(--muted); margin: 0 0 14px; max-width: 52ch; }

/* ---------- homepage service tiles ---------- */
.svc-tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0 8px; }
.svc-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px;
            background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
            padding: 16px 18px; text-decoration: none; box-shadow: var(--shadow);
            transition: border-color .15s, box-shadow .15s; }
.svc-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-h); }
.svc-tile .t-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); }
.svc-tile .t-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.svc-tile .t-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.svc-tile .from { font-size: 13px; color: var(--muted); }
.svc-tile .val { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--price); }
.svc-tile .t-arrow .ic { width: 18px; height: 18px; color: var(--brand); }

/* ---------- provider page ---------- */
.prov-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
             padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 6px; }
.prov-id { display: flex; align-items: center; gap: 14px; }
.prov-id .logo-sq { width: 52px; height: 52px; font-size: 18px; border-radius: 12px; }
.prov-name { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--ink); }
.prov-meta { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prov-meta .dot { color: var(--faint); }
.prov-actions { display: flex; gap: 10px; margin-top: 16px; }

.block-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); margin: 22px 0 10px; }
.addr-list { display: flex; flex-direction: column; gap: 10px; }
.addr { display: flex; align-items: flex-start; gap: 10px; background: var(--surface);
        border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.addr .ic { width: 17px; height: 17px; color: var(--brand); margin-top: 1px; flex-shrink: 0; }
.addr .a-loc { font-size: 14px; color: var(--ink); font-weight: 500; }
.addr .a-lic { font-size: 12px; color: var(--muted); margin-top: 1px; }

.ptable { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.ptable .prow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
                padding: 13px 16px; border-bottom: 1px solid var(--border-soft); }
.ptable .prow:last-child { border-bottom: none; }
.ptable .p-name { font-size: 14px; color: var(--body); }
.ptable .p-name .unit { font-size: 12px; color: var(--faint); margin-left: 6px; }
.ptable .p-name .tk { font-size: 11px; background: var(--brand-soft); color: var(--brand-dark);
                      padding: 2px 7px; border-radius: var(--r-pill); margin-left: 6px; }
.ptable .p-val { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--price); white-space: nowrap; }
.ptable .p-val .from { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--muted); margin-right: 4px; }
.fresh-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.fresh-note .ic { width: 14px; height: 14px; color: var(--brand); }

/* ---------- desktop ---------- */
@media (min-width: 700px) {
  .hero { padding: 36px 0 22px; }
  .hero h1 { font-size: 36px; }
  .card { padding: 18px 20px; }
  .svc-tiles { grid-template-columns: 1fr 1fr; }
  .page-h1 { font-size: 30px; }
}

/* ---------- footer (юр-дисклеймер: противопоказания + оферта) ---------- */
.site-foot { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 0 40px; }
.site-foot .foot-warn { font-size: 13px; color: var(--body); font-weight: 500; margin: 0 0 8px; }
.site-foot .foot-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0 0 10px; max-width: 70ch; }
.site-foot .foot-copy { font-size: 12px; color: var(--faint); margin: 0; }
