:root {
  --bg: #f7f3f7;
  --card: #ffffff;
  --text: #1f1f29;
  --muted: #5f5f6d;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --border: #ead8e2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(circle at top left, #ffe1ef 0, transparent 32rem), var(--bg);
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(70, 35, 55, 0.10);
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 span { color: var(--accent); }

h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

p { margin: 0 0 16px; }

.lead {
  padding: 18px 20px;
  background: var(--accent-soft);
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  margin-bottom: 22px;
}

.section-intro {
  margin-top: 24px;
  font-size: 18px;
}

ul {
  margin: 8px 0 22px;
  padding-left: 24px;
}

li { margin: 0 0 12px; }

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

strong { font-weight: 700; }

.spacer { height: 6px; }

/* Верхнее меню сайта.
   Все ссылки меню находятся в menu.js, поэтому их нужно менять только там. */
.top-menu {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(70, 35, 55, 0.07);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-menu__inner {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.top-menu__link {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.top-menu__link:hover,
.top-menu__link.active {
  background: var(--accent);
  color: #ffffff;
}

.site-header {
  width: min(920px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 18px 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(70, 35, 55, 0.08);
}

.site-header h1 {
  margin: 0 0 14px;
  font-size: 28px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  background: var(--accent);
  color: #ffffff;
}

.hero {
  text-align: center;
}

.button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  opacity: 0.9;
}

@media (max-width: 640px) {

  .top-menu__inner {
    width: min(100% - 18px, 920px);
    overflow-x: auto;
    padding: 8px 0;
  }

  .top-menu__link {
    white-space: nowrap;
    padding: 8px 12px;
  }

  .page {
    width: min(100% - 18px, 920px);
    margin: 9px auto;
    padding: 20px;
    border-radius: 18px;
  }

  .site-header {
    width: min(100% - 18px, 920px);
    margin: 9px auto 0;
    padding: 16px;
    border-radius: 18px;
  }

  .site-header h1 {
    font-size: 23px;
  }
}

.container {
  width: min(920px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(70, 35, 55, 0.08);
}

.card h2 {
  margin-top: 0;
}

.footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 14px;
}

.footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 18px, 920px);
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .footer {
    width: min(100% - 18px, 920px);
  }
}