:root {
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #5b5b73;
  --accent: #4a4ae0;
  --accent-hover: #3838c4;
  --border: #e5e5ee;
  --shadow: 0 1px 3px rgba(20, 20, 40, 0.04), 0 4px 12px rgba(20, 20, 40, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 40px;
}

header.site-header a.home {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 14px;
  transition: color 0.15s;
}
header.site-header a.home:hover { color: var(--accent); }

h1.site-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

h1.page-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

p.page-lead {
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 15px;
}

/* Список материалов на главной */
ul.materials {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

ul.materials li a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
ul.materials li a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(20, 20, 40, 0.06), 0 8px 20px rgba(20, 20, 40, 0.08);
}

ul.materials .title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
ul.materials .external::after {
  content: "↗";
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}
ul.materials .desc {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* Контент внутренних страниц */
article.content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
article.content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 10px;
}
article.content h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
}
article.content p { margin: 0 0 14px; }
article.content ul, article.content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
article.content li { margin-bottom: 6px; }
article.content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 74, 224, 0.3);
}
article.content a:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }
article.content strong { font-weight: 600; }
article.content em { color: var(--muted); }
article.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Карточки сервисов на странице "Как считать охваты" */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 14px;
  box-shadow: var(--shadow);
}
.tool-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.tool-card h3 a { color: var(--accent); border-bottom: none; }
.tool-card h3 a:hover { color: var(--accent-hover); }
.tool-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 16px;
  font-size: 14px;
}
.tool-card dt { color: var(--muted); font-weight: 500; }
.tool-card dd { margin: 0; }
.tool-card .warn { color: #b6541e; font-size: 13px; margin-top: 8px; font-weight: 500; }

@media (max-width: 600px) {
  .container { padding: 24px 16px 60px; }
  h1.site-title { font-size: 26px; }
  h1.page-title { font-size: 22px; }
  .tool-card dl { grid-template-columns: 1fr; gap: 2px 0; }
  .tool-card dt { margin-top: 8px; }
}

footer.site-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
