:root {
  color-scheme: light;
  --rules-bg: #f6f7fb;
  --rules-card: #ffffff;
  --rules-ink: #171923;
  --rules-muted: #5f687d;
  --rules-line: #e1e7f1;
  --rules-accent: #5b3ff2;
  --rules-accent-soft: #f0edff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--rules-bg);
  color: var(--rules-ink);
  font-family: Inter, Arial, sans-serif;
}

.seller-rules-document {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.seller-rules-header {
  display: grid;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--rules-line);
  border-radius: 22px;
  background: var(--rules-card);
  box-shadow: 0 18px 48px rgba(17, 21, 36, 0.05);
}

.seller-rules-header p,
.seller-rules-footer p {
  margin: 0;
  color: var(--rules-accent);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.seller-rules-header h1 {
  max-width: 860px;
  margin: 8px 0 0;
  font-size: 54px;
  line-height: 1.06;
}

.seller-rules-header span {
  display: block;
  max-width: 820px;
  margin-top: 16px;
  color: var(--rules-muted);
  font-size: 20px;
  line-height: 1.5;
}

.seller-rules-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

.seller-rules-header nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #343b4d;
  font-weight: 780;
  text-decoration: none;
}

.seller-rules-header nav a:hover,
.seller-rules-header nav a.active {
  background: var(--rules-accent-soft);
  color: var(--rules-accent);
}

.seller-rules-section {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 28px;
  margin-top: 18px;
  padding: 28px 34px;
  border: 1px solid var(--rules-line);
  border-radius: 20px;
  background: var(--rules-card);
  scroll-margin-top: 18px;
}

.seller-rules-num {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--rules-accent-soft);
  color: var(--rules-accent);
  font-size: 18px;
  font-weight: 900;
}

.seller-rules-body {
  display: grid;
  gap: 14px;
}

.seller-rules-body h2 {
  margin: 0 0 2px;
  font-size: 30px;
  line-height: 1.18;
}

.seller-rules-body p {
  max-width: 920px;
  margin: 0;
  color: #3f4658;
  font-size: 17px;
  line-height: 1.7;
}

.seller-rules-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 26px 34px;
  border: 1px solid var(--rules-line);
  border-radius: 20px;
  background: var(--rules-card);
}

.seller-rules-footer p {
  max-width: 760px;
  color: var(--rules-muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: none;
}

.seller-rules-footer a {
  flex: 0 0 auto;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--rules-accent);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 760px) {
  .seller-rules-document {
    width: min(100% - 24px, 680px);
    padding: 18px 0 34px;
  }

  .seller-rules-header,
  .seller-rules-section,
  .seller-rules-footer {
    border-radius: 18px;
  }

  .seller-rules-header {
    padding: 24px;
  }

  .seller-rules-header h1 {
    font-size: 34px;
  }

  .seller-rules-header span {
    font-size: 17px;
  }

  .seller-rules-header nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px 4px;
  }

  .seller-rules-section {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px;
  }

  .seller-rules-body h2 {
    font-size: 24px;
  }

  .seller-rules-body p {
    font-size: 16px;
  }

  .seller-rules-footer {
    display: grid;
    padding: 22px;
  }

  .seller-rules-footer a {
    width: 100%;
    text-align: center;
  }
}
