@font-face { font-family: Onest; src: url('/fonts/Onest-Cyrillic.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url('/fonts/Onest-Latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; 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: Unbounded; src: url('/fonts/Unbounded_700Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --legal-bg: #f0f1f3;
  --legal-surface: #ffffff;
  --legal-surface-soft: #f7f8fa;
  --legal-text: #111315;
  --legal-muted: #737b87;
  --legal-line: #e6e8ec;
  --legal-accent: #0049ff;
  --legal-accent-soft: #e9efff;
  --legal-shadow: 0 10px 30px rgba(20, 26, 38, .08);
  --legal-shadow-soft: 0 5px 16px rgba(20, 26, 38, .07);
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  scroll-behavior: smooth;
  color-scheme: light;
  background: var(--legal-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--legal-bg);
  color: var(--legal-text);
  font-family: Onest, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}
a { color: inherit; }

.legal-header,
.legal-toc,
.docs-page,
.back-link,
.legal-site-footer {
  font-family: Onest, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: calc(68px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
  align-items: center;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 rgba(17, 19, 21, .05), 0 7px 24px rgba(20, 26, 38, .05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.legal-logo {
  grid-column: 2;
  font: 700 17px/1 Unbounded, sans-serif;
  letter-spacing: -.8px;
  text-decoration: none;
  white-space: nowrap;
}
.legal-logo span { color: var(--legal-accent); }
.legal-header-link,
.legal-header-back {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--legal-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.legal-header-back { grid-column: 1; justify-self: start; gap: 8px; }
.legal-header-back::before {
  content: '';
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--legal-surface-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23111315' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center/20px 20px no-repeat;
  box-shadow: var(--legal-shadow-soft);
}
.legal-header-link { grid-column: 3; justify-self: end; color: var(--legal-muted); }
.legal-header-link:hover, .legal-header-back:hover { color: var(--legal-accent); }

.legal-documents-button {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 30;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--legal-surface);
  box-shadow: 0 7px 20px rgba(20, 26, 38, .16);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.legal-documents-button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(20, 26, 38, .2); }
.legal-documents-button:active { transform: scale(.96); }
.legal-documents-button:focus-visible { outline: 3px solid rgba(0, 73, 255, .28); outline-offset: 3px; }
.legal-documents-icon {
  width: 23px;
  height: 23px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23111315' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h8'/%3E%3C/svg%3E");
}

html.legal-embedded body { background: var(--legal-bg); }
html.legal-embedded .docs-page { padding-top: 24px; }
html.legal-embedded .page,
html.legal-embedded .wrap { padding-top: 16px; }
html.legal-embedded article { padding-top: 32px; }
html.legal-embedded article > h1,
html.legal-embedded .legal-version { padding-right: 58px; }

.page, .wrap { width: min(1180px, 100%); margin: 0 auto; padding: 42px 24px 86px; }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 780px); gap: 42px; justify-content: center; align-items: start; }
.legal-toc {
  position: sticky;
  top: calc(94px + env(safe-area-inset-top));
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .68);
  box-shadow: var(--legal-shadow-soft);
}
.legal-toc-title { margin: 0 0 11px; padding: 0 10px; color: var(--legal-muted); font-size: 12px; font-weight: 700; }
.legal-toc a {
  display: block;
  margin: 3px 0;
  padding: 9px 10px;
  border-radius: 11px;
  color: var(--legal-muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.legal-toc a:hover, .legal-toc a.is-active { color: var(--legal-accent); background: var(--legal-accent-soft); }

article {
  min-width: 0;
  padding: 46px 50px 56px;
  border: 0;
  border-radius: 28px;
  background: var(--legal-surface);
  box-shadow: var(--legal-shadow);
}
h1 {
  max-width: 700px;
  margin: 0;
  color: var(--legal-text);
  font-family: Onest, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(31px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.3px;
}
.legal-version, .updated { margin: 16px 0 38px; color: var(--legal-muted); font-size: 14px; line-height: 1.5; }
h2 {
  margin: 46px 0 15px;
  padding-top: 2px;
  color: var(--legal-text);
  font-family: Onest, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.35px;
  scroll-margin-top: calc(92px + env(safe-area-inset-top));
}
h3 { margin: 28px 0 10px; font-size: 18px; line-height: 1.4; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 20px; padding-left: 25px; }
li { margin: 8px 0; padding-left: 3px; }
article a { color: var(--legal-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
b, strong { font-weight: 700; }
.note, .warn { margin: 22px 0; padding: 18px 20px; border: 0; border-radius: 18px; color: var(--legal-text); background: var(--legal-accent-soft); }
.placeholder { padding: 0; border-radius: 0; background: transparent; color: inherit; font-weight: 700; }
.section-num { color: var(--legal-accent); }
.req-box { margin-top: 18px; padding: 4px 20px; border: 0; border-radius: 20px; background: var(--legal-surface-soft); }
.req-row { display: grid; grid-template-columns: minmax(150px, .8fr) 1.2fr; gap: 22px; padding: 14px 0; border-bottom: 1px solid var(--legal-line); font-size: 14px; }
.req-row:last-child { border-bottom: 0; }
.req-k { color: var(--legal-muted); }
.req-v { text-align: left; font-weight: 700; overflow-wrap: anywhere; }
.back-link {
  min-height: 48px;
  margin-top: 36px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: var(--legal-accent);
  box-shadow: 0 8px 20px rgba(0, 73, 255, .22);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.legal-site-footer {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 max(34px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--legal-muted);
  font-size: 12px;
}
.legal-site-footer a { text-decoration: none; }

.docs-page { width: min(1050px, 100%); margin: 0 auto; padding: 54px 24px 86px; }
.docs-page h1 { max-width: none; }
.docs-lead { max-width: 650px; margin: 16px 0 38px; color: var(--legal-muted); font-size: 17px; line-height: 1.55; }
.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.doc-card {
  min-height: 150px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-radius: 24px;
  background: var(--legal-surface);
  box-shadow: var(--legal-shadow-soft);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.doc-card:hover { transform: translateY(-2px); box-shadow: var(--legal-shadow); }
.doc-title { display: block; color: var(--legal-text); font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.3px; }
.doc-note { display: block; margin-top: 8px; color: var(--legal-muted); font-size: 14px; line-height: 1.45; }

@media (max-width: 900px) {
  .page, .wrap { padding-top: 24px; }
  .legal-layout { display: block; }
  .legal-toc {
    position: relative;
    top: auto;
    max-height: none;
    margin: 0 0 14px;
    padding: 0 0 8px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-width: none;
  }
  .legal-toc::-webkit-scrollbar { display: none; }
  .legal-toc-title { display: none; }
  .legal-toc a { flex: none; margin: 0; padding: 9px 13px; border-radius: 15px; background: var(--legal-surface); box-shadow: var(--legal-shadow-soft); font-size: 12px; }
}

@media (max-width: 680px) {
  body { font-size: 15.5px; line-height: 1.68; }
  .legal-header { min-height: calc(60px + env(safe-area-inset-top)); padding-inline: 12px; }
  .legal-header-back span { display: none; }
  .legal-header-link { font-size: 12px; }
  .page, .wrap { padding: 14px 12px 58px; }
  article { padding: 30px 21px 38px; border-radius: 24px; }
  h1 { font-size: 30px; line-height: 1.1; letter-spacing: -.85px; }
  .legal-version, .updated { margin: 14px 0 30px; font-size: 13px; }
  h2 { margin-top: 38px; font-size: 20px; scroll-margin-top: calc(78px + env(safe-area-inset-top)); }
  .req-box { padding-inline: 16px; }
  .req-row { grid-template-columns: 1fr; gap: 3px; }
  .legal-site-footer { width: calc(100% - 32px); flex-direction: column; gap: 5px; }
  .docs-page { padding: 36px 14px 62px; }
  .docs-lead { margin-bottom: 30px; font-size: 15.5px; }
  .docs-grid { grid-template-columns: 1fr; gap: 12px; }
  .doc-card { min-height: 136px; padding: 22px; border-radius: 22px; }
  html.legal-embedded .page,
  html.legal-embedded .wrap { padding-top: 10px; }
  html.legal-embedded .docs-page { padding-top: 20px; }
  html.legal-embedded article { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .doc-card { transition: none; }
}

/* Full embedded workspace and unobtrusive scrolling, r303. */
html, body, * { scrollbar-width: none !important; -ms-overflow-style: none; scrollbar-gutter: auto !important; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html.legal-embedded .page, html.legal-embedded .wrap { width: 100%; max-width: none; margin: 0; padding: 24px; }
html.legal-embedded article { width: 100%; max-width: none; border-radius: 0; box-shadow: none; }
