/* Legal pages common styles */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/manrope-500-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/manrope-500-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/manrope-700-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/manrope-700-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Токены: та же палитра семьи index.html (чёрно-белая + оранжевый), светлый фон */
:root {
  --ink: #141414;        /* заголовки и выделение — surface из index.html */
  --text: #3D3D3D;       /* основной текст на светлом фоне */
  --muted: #808080;      /* второстепенное — ink-3 из index.html */
  --line: #E4E4E4;       /* линии и рамки */
  --acc: #FF9D00;        /* акцент — как в index.html */
  --acc-dark: #D98500;   /* ссылки на светлом фоне (acc-dark из index.html) */
  --acc-darker: #B26F00; /* hover ссылок */
}

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1140px, 100% - 44px);
  margin-inline: auto;
}

a {
  color: var(--acc-dark);
}

a:hover {
  color: var(--acc-darker);
  text-decoration: underline;
}

/* Header — sticky с блюром, как шапка index.html */
.terms-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.terms-header-inner {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.terms-header a {
  color: var(--acc-dark);
  text-decoration: none;
  font-size: .95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.terms-header a:hover {
  color: var(--acc-darker);
  text-decoration: underline;
}

.terms-header h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

/* Content */
.terms-content {
  max-width: 800px;
  margin: 48px auto 72px;
  padding: 0 22px;
}

.terms-content.wide {
  max-width: 900px;
}

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

/* Заголовок раздела — с оранжевым подчёркиванием, как в index.html */
.terms-section h2 {
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--acc);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--ink);
}

.terms-section p {
  margin: 0 0 10px;
}

/* Выделение в тексте — темнее, как жирные акценты index.html */
.terms-content b, .terms-content strong {
  color: var(--ink);
}

/* Subsections */
.terms-subsection {
  margin-left: 20px;
}

.terms-subsection-deep {
  margin-left: 40px;
  font-size: .9375rem;
}

.terms-subsection-sub {
  margin-left: 40px;
  font-size: .875rem;
}

/* Lists with dashes */
.terms-list {
  margin: 0 0 10px 20px;
  padding: 0;
  list-style: none;
}

.terms-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
}

.terms-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* Tables */
.services-table-wrapper {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-top: 16px;
  margin-bottom: 28px;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 0 12px;
}

.legal-table, .services-table, .consent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin-bottom: 28px;
}

.services-table {
  min-width: 700px;
}

.legal-table thead th, .services-table thead th, .consent-table thead th {
  background: var(--ink);
  color: #FFFFFF;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .2);
}

.services-table thead th {
  white-space: nowrap;
}

.legal-table tbody td, .services-table tbody td, .consent-table tbody td {
  padding: 10px 12px;
  vertical-align: top;
  border: 1px solid var(--line);
  color: var(--text);
}

.legal-table tbody tr:nth-child(even), .services-table tbody tr:nth-child(even), .consent-table tbody tr:nth-child(even) {
  background: #F7F7F7;
}

.legal-table tbody tr:hover, .services-table tbody tr:hover, .consent-table tbody tr:hover {
  background: rgba(255, 157, 0, .1);
}

.legal-table td ul, .services-table td ul, .consent-table td ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-table td ul li, .services-table td ul li, .consent-table td ul li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 2px;
}

.legal-table td ul li::before, .services-table td ul li::before, .consent-table td ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

@media (max-width: 1142px) {
  .terms-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .terms-header h1 {
    font-size: 1.125rem;
  }
}

@media (max-width: 640px) {
  .terms-content {
    margin-top: 32px;
    padding: 0 18px;
  }
}
