:root {
  color-scheme: light;
  --background: #f7f8fb;
  --surface: #ffffff;
  --text: #202432;
  --heading: #0b0d14;
  --muted: #62697a;
  --line: #dfe3eb;
  --accent: #315bdb;
  --accent-dark: #2144af;
  --max-width: 920px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

a:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(49, 91, 219, 0.22);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent-dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  color: #ffffff;
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner,
.legal-document,
.footer-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--heading);
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  font-weight: 700;
}

.legal-document {
  margin-top: 48px;
  margin-bottom: 48px;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(31, 38, 54, 0.07);
}

.document-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.3;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.035em;
}

h2 {
  margin: 38px 0 12px;
  padding-top: 4px;
  font-size: 25px;
  letter-spacing: -0.015em;
}

h3 {
  margin: 24px 0 8px;
  font-size: 19px;
}

p,
li {
  font-size: 16px;
}

p {
  margin: 12px 0;
}

ul {
  padding-left: 24px;
}

li {
  margin: 8px 0;
}

strong {
  color: var(--heading);
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef0f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.document-meta {
  margin: 0;
  color: var(--muted);
}

hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--heading);
  background: #f0f2f7;
}

tr:last-child td {
  border-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.footer-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-inner {
    padding: 18px 0;
  }

  .legal-document {
    width: min(calc(100% - 24px), var(--max-width));
    margin-top: 20px;
    padding: 24px 20px 36px;
    border-radius: 10px;
  }

  .footer-inner {
    padding: 22px 0;
  }

  th,
  td {
    min-width: 150px;
  }
}
