:root {
  --ink: #2c3340;
  --muted: #6b7585;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --blue: #253b80;
  --blue-2: #1565c0;
  --green: #009761;
  --green-d: #007a4e;
  --red: #e53935;
  --line: #dde3ee;
  --shadow: 0 4px 12px rgba(37, 59, 128, 0.06);
  --r: 6px;
  --wrap: 1140px;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--soft);
  line-height: 1.6;
}
a { color: var(--blue-2); text-decoration: none; transition: .2s; }
a:hover { color: var(--blue); }
img { max-width: 100%; }
.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }

/* Top bar */
.top-bar {
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  padding: 8px 0;
}
.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.top-bar a { color: #e9eef6; }
.top-bar a:hover { color: #fff; text-decoration: underline; }
.top-bar-contacts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.top-bar-sep { opacity: .45; }

/* Header */
.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--blue);
  text-decoration: none;
  min-width: 0;
}
.logo:hover { color: var(--blue); }
.logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.logo b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--blue);
}
.logo small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

nav.main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
}
nav.main a {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
}
nav.main a:hover,
nav.main a.is-on { color: var(--blue); }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink);
}

/* Hero */
.hero { padding: 48px 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: start;
}
.badge {
  display: inline-block;
  background: #e5f6ef;
  color: var(--green-d);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--blue);
}
h1 {
  font-size: clamp(28px, 3.6vw, 36px);
  margin: 0 0 16px;
  line-height: 1.2;
}
h2, .section-title {
  font-size: clamp(22px, 2.6vw, 28px);
  margin: 0 0 28px;
  color: var(--ink);
}
h3 { font-size: 20px; margin: 0 0 10px; }
.hero-desc, .lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 600px;
}
.kicker { display: none; }

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--r);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: .2s;
}
.btn-primary, .btn-s { background: var(--green); color: #fff; }
.btn-primary:hover, .btn-s:hover { background: var(--green-d); color: #fff; }
.btn-secondary, .btn-p { background: var(--blue); color: #fff; }
.btn-secondary:hover, .btn-p:hover { background: var(--blue-2); color: #fff; }
.btn-outline, .btn-g {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ink);
}
.btn-outline:hover, .btn-g:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.meter-card {
  background: var(--paper);
  padding: 24px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
}
.meter-card h3 { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.meter-dates, .meter-card .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue);
  margin: 0 0 8px;
  line-height: 1.1;
}
.meter-card > p { color: var(--muted); font-size: 15px; margin: 0; }
.emergency {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.emergency-icon {
  background: #ffebee;
  color: var(--red);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.emergency-text { font-size: 14px; color: var(--muted); }
.emergency-phone {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
  display: block;
}
.emergency-phone:hover { color: #c62828; }

/* Stats */
.stats {
  background: var(--paper);
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid, .stats.wrap, .wrap.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num, .stat b {
  font-size: 36px;
  font-weight: 800;
  color: var(--blue);
  display: block;
  line-height: 1.1;
}
.stat-label, .stat span {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}
.stat {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* Sections & cards */
.section { padding: 56px 0; }
.section.alt, .section-paper { background: var(--paper); }
.grid-3, .cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; }
.card, .panel {
  background: var(--paper);
  padding: 28px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .2s;
}
a.card:hover { transform: translateY(-4px); color: inherit; }
.card h3 { color: var(--blue); }
.card p, .muted { color: var(--muted); }
.card-link {
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-link:hover { color: var(--green-d); }

.page-hero {
  padding: 32px 0 8px;
  background: var(--soft);
}
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: inherit; }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 12px; }
.prose h2, .prose h3, .prose h4 { margin: 22px 0 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  font-size: 14px;
  box-shadow: var(--shadow);
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--soft);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue);
}
tr:last-child td { border-bottom: 0; }
.price { white-space: nowrap; font-weight: 700; }

.house {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  margin: 0 0 8px;
  box-shadow: var(--shadow);
}
.house summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.house summary::-webkit-details-marker { display: none; }
.house summary:after { content: "+"; color: var(--blue-2); font-size: 20px; font-weight: 400; }
.house[open] summary:after { content: "–"; }
.docs { padding: 0 16px 16px; display: grid; gap: 6px; }
.docs a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 10px;
  background: var(--soft);
  border-radius: 4px;
  font-size: 14px;
}
.docs a:hover { background: #e8eef8; color: var(--blue); }
.search {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  font: inherit;
  margin: 0 0 16px;
  background: #fff;
}

/* News */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item {
  background: var(--paper);
  padding: 20px;
  border-radius: var(--r);
  border-left: 3px solid var(--blue);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
a.news-item:hover { transform: none; }
a.news-item:hover strong,
a.news-item:hover h3,
a.news-item:hover h4 { color: var(--blue-2); }
.news-item time,
.news-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  min-width: 80px;
  padding-top: 2px;
}
.news-item strong,
.news-item h3,
.news-content h4 {
  display: block;
  font-size: 17px;
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 800;
}
.news-item p,
.news-content p { font-size: 14px; color: var(--muted); margin: 0; }
.news-more { text-align: center; margin-top: 24px; }

.form { display: grid; gap: 10px; }
.form input, .form textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
}
.ok-msg { display: none; padding: 12px; background: #e5f6ef; border-radius: var(--r); }
.ok-msg.show { display: block; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phone { font-size: 22px; font-weight: 800; text-decoration: none; color: var(--blue); }
.eds-banner {
  display: block;
  margin: 12px 0 18px;
  max-width: 100%;
  line-height: 0;
}
.eds-banner img {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 12px;
}

/* Footer */
footer, .footer {
  background: var(--ink);
  color: #b7c5df;
  padding: 48px 0 24px;
  font-size: 14px;
  margin-top: 0;
}
footer a, .footer a { color: #b7c5df; display: block; margin-bottom: 8px; }
footer a:hover, .footer a:hover { color: #fff; }
.f-grid, .footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.f-grid h4, .footer h4 {
  color: #fff;
  margin: 0 0 16px;
  font-size: 16px;
  font-family: var(--sans);
  font-weight: 800;
}
.f-grid p { margin: 0 0 10px; }
.copy, .copyright {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #3a4250;
  font-size: 13px;
  opacity: .9;
}

@media (max-width: 900px) {
  .hero-grid,
  .stats-grid,
  .wrap.stats,
  .stats.wrap,
  .cards-grid,
  .grid-3,
  .grid-2,
  .contacts-grid,
  .f-grid,
  .footer-grid,
  .news-item {
    grid-template-columns: 1fr;
  }
  .stats-grid, .wrap.stats, .stats.wrap { grid-template-columns: repeat(2, 1fr); }
  .top-bar .wrap { flex-direction: column; align-items: flex-start; }
  nav.main { display: none; }
  nav.main.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
    gap: 0;
    box-shadow: var(--shadow);
  }
  nav.main.open a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .burger { display: inline-flex; }
  .site-head { position: relative; }
  h1 { font-size: 28px; }
}
