* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: #111827;
  background: #f5f7fb;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: #111827;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
  color: #4b5563;
}

.nav a:hover {
  color: #2563eb;
}

.hero {
  padding: 76px 0 54px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.16), transparent 30%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 640px;
  margin: 22px 0 0;
  font-size: 20px;
  line-height: 1.6;
  color: #4b5563;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  border: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  transition: 0.2s ease;
}

.btn.primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.btn.primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.btn.secondary:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.btn.full {
  width: 100%;
  margin-top: 8px;
}

.hero-card,
.result-card,
.calc-form,
.assistant-box,
.info-card,
.ad-placeholder {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.hero-card {
  padding: 28px;
}

.hero-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.muted {
  color: #6b7280;
}

.mini-stats {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.mini-stats div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.mini-stats strong {
  color: #2563eb;
}

.mini-stats span {
  color: #6b7280;
}

.section {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: 38px;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.5;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.tab {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  color: #4b5563;
}

.tab.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.calculator {
  display: none;
}

.calculator.active {
  display: block;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.calc-form,
.result-card {
  padding: 28px;
}

.calc-form h3,
.result-card h3 {
  margin: 0 0 20px;
  font-size: 24px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 16px;
  color: #374151;
}

input {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.big-result {
  margin: 12px 0 22px;
  font-size: 40px;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.04em;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: #f9fafb;
  border-radius: 16px;
}

.result-list span {
  color: #6b7280;
}

.result-list strong {
  text-align: right;
}

.hint {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  color: #374151;
  background: #eff6ff;
  line-height: 1.5;
}

.assistant-section {
  background: #ffffff;
}

.assistant-box {
  padding: 20px;
}

.chat-window {
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 12px;
}

.message {
  max-width: 78%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.5;
}

.message.bot {
  background: #f3f4f6;
  color: #111827;
  border-bottom-left-radius: 6px;
}

.message.user {
  background: #2563eb;
  color: #ffffff;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-card {
  padding: 24px;
}

.info-card h3 {
  margin: 0 0 10px;
}

.info-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.ad-placeholder-section {
  padding-top: 0;
}

.ad-placeholder {
  padding: 30px;
  text-align: center;
  color: #6b7280;
  background:
    repeating-linear-gradient(
      -45deg,
      #ffffff,
      #ffffff 10px,
      #f9fafb 10px,
      #f9fafb 20px
    );
}

.footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.footer-inner {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6b7280;
}

@media (max-width: 820px) {
  .nav {
    display: none;
  }

  .hero-inner,
  .calc-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .chat-input {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 92%;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
}
.legal-text {
  margin-top: 28px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.legal-text h3 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.legal-text h3:first-child {
  margin-top: 0;
}

.legal-text p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.7;
}

.legal-text a {
  color: #2563eb;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.footer-links a {
  color: #6b7280;
  font-size: 14px;
}

.footer-links a:hover {
  color: #2563eb;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(980px, calc(100% - 32px));
  display: none;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: #111827;
  color: #ffffff;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}

.cookie-banner.show {
  display: grid;
}

.cookie-text {
  font-size: 14px;
  line-height: 1.5;
  color: #e5e7eb;
}

.cookie-text a {
  color: #93c5fd;
  font-weight: 800;
}

@media (max-width: 820px) {
  .footer-links {
    justify-content: center;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
  }

  .cookie-banner .btn {
    width: 100%;
  }
}
.doc-date {
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 700;
}

/* Единые интервалы для текстовых блоков и карточек */
.section {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 30px;
}

.section-head h2 {
  line-height: 1.15;
}

.section-head p {
  max-width: 920px;
  margin-top: 12px;
  line-height: 1.65;
}

.cards {
  align-items: stretch;
}

.info-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.info-card h3 {
  margin: 0 0 12px;
  line-height: 1.25;
}

.info-card p {
  margin: 0 0 18px;
  line-height: 1.65;
}

.info-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Единый ритм для SEO/FAQ/информационных текстов под калькуляторами */
.section .container > h3 {
  margin: 28px 0 10px;
  line-height: 1.25;
}

.section .container > p {
  margin: 0 0 16px;
  line-height: 1.7;
  color: #4b5563;
}

/* Исправление интервалов в блоке финансовой подушки */
#cushion-guide {
  padding-top: 24px;
}

#cushion-guide .section-head {
  margin-bottom: 24px;
}

#cushion-guide .cards + .section-head {
  margin-top: 52px;
}

#cushion-guide .section-head h2 {
  line-height: 1.18;
}

#cushion-guide .section-head p {
  max-width: 920px;
  line-height: 1.65;
}

#cushion-guide .cards {
  margin-bottom: 0;
}
select {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  font-size: 16px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.next-step-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.next-step-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  color: #111827;
}

.next-step-card p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.55;
}

.next-step-card .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.compact-docs {
  display: grid;
  gap: 14px;
}

.compact-docs details {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.compact-docs summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 800;
  color: #111827;
  list-style: none;
  position: relative;
}

.compact-docs summary::-webkit-details-marker {
  display: none;
}

.compact-docs summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #2563eb;
}

.compact-docs details[open] summary::after {
  content: "−";
}

.compact-docs .legal-text {
  margin-top: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
}

