:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe3ee;
  --accent: #1746a2;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
  color: var(--accent);
}

.legal-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 20px;
}

.legal-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
}

.legal-back:hover {
  color: var(--accent);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 34px 0 14px;
  font-size: 24px;
  line-height: 1.22;
}

h3 {
  margin: 24px 0 10px;
  font-size: 18px;
  line-height: 1.28;
}

p,
ul,
ol,
table,
dl {
  margin: 0 0 16px;
}

li + li {
  margin-top: 6px;
}

.legal-lede,
.muted {
  color: var(--muted);
}

.legal-meta {
  display: grid;
  gap: 4px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.legal-panel {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .07);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}

.legal-table th,
.legal-table td {
  padding: 12px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: #f1f5f9;
}

.pricing-table td:last-child,
.pricing-table th:last-child {
  width: 150px;
  white-space: nowrap;
}

.requisites {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.requisites dt,
.requisites dd {
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.requisites dt {
  color: var(--muted);
  font-weight: 650;
  background: #f8fafc;
}

.requisites dd {
  border-left: 1px solid var(--border);
}

.requisites dt:last-of-type,
.requisites dd:last-of-type {
  border-bottom: 0;
}

.legal-footer {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .legal-page {
    padding: 42px 16px;
  }

  .legal-panel {
    padding: 18px;
  }

  .legal-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .pricing-table {
    display: table;
    overflow: visible;
    white-space: normal;
  }

  .pricing-table thead {
    display: none;
  }

  .pricing-table,
  .pricing-table tbody,
  .pricing-table tr,
  .pricing-table td {
    display: block;
    width: 100%;
  }

  .pricing-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .pricing-table tr:last-child {
    border-bottom: 0;
  }

  .pricing-table td {
    border: 0;
    padding: 4px 0;
  }

  .pricing-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
  }

  .pricing-table td:last-child {
    color: var(--accent);
    font-size: 18px;
  }

  .requisites {
    grid-template-columns: 1fr;
  }

  .requisites dd {
    border-left: 0;
    background: var(--surface);
  }
}
