:root {
  color-scheme: light dark;
  --app: #f8f7ff;
  --card: #ffffff;
  --surface: #f2f0fd;
  --border: #e4e2ed;
  --heading: #1e1b2e;
  --body: #383546;
  --muted: #6b6880;
  --brand: #5e53ef;
  --brand-soft: #eeecff;
  --shadow: 0 12px 36px rgba(57, 48, 130, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --app: #131120;
    --card: #1d1a2e;
    --surface: #272338;
    --border: #332e4c;
    --heading: #f5f3ff;
    --body: #cfcbe4;
    --muted: #8f8ba8;
    --brand: #8b7df8;
    --brand-soft: #2c2748;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--app);
  color: var(--body);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--heading);
  color: var(--card);
  font-weight: 700;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  background: color-mix(in srgb, var(--app) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--heading);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.page-shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 80px;
}

.hero {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--heading);
  letter-spacing: -0.025em;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1.08;
}

.updated {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.legal-switcher {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 22px;
  padding: 5px;
  display: flex;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.legal-switcher a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.legal-switcher a:hover {
  color: var(--heading);
}

.legal-switcher a[aria-current="page"] {
  background: var(--card);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(42, 36, 91, 0.08);
}

.document {
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.document > :first-child {
  margin-top: 0;
}

.document p,
.document li {
  color: var(--body);
}

.document p {
  margin: 0 0 16px;
}

.document h2 {
  margin: 42px 0 13px;
  padding-top: 2px;
  font-size: 21px;
  line-height: 1.3;
}

.document h2::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  display: inline-block;
  border-radius: 999px;
  background: var(--brand);
  vertical-align: 3px;
}

.document ul {
  margin: 0 0 18px;
  padding-left: 24px;
}

.document li {
  margin: 6px 0;
  padding-left: 4px;
}

.document li::marker {
  color: var(--brand);
}

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

.summary-card,
.contact-card {
  margin: 24px 0;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  border-radius: 16px;
  background: var(--brand-soft);
}

.summary-card {
  margin-top: 0;
}

.summary-card p,
.contact-card p {
  margin: 0;
}

/* Lead-in line above the summary text (used on About). */
.summary-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.contact-card a {
  font-weight: 750;
}

.site-footer {
  padding: 0 20px 42px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer a {
  color: inherit;
}

@media (max-width: 600px) {
  .header-inner,
  .page-shell {
    width: min(100% - 28px, 920px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  .back-link {
    min-height: 36px;
    padding-inline: 11px;
    font-size: 13px;
  }

  .page-shell {
    padding: 46px 0 56px;
  }

  .hero {
    margin-bottom: 24px;
  }

  .legal-switcher {
    width: 100%;
  }

  .legal-switcher a {
    flex: 1;
  }

  .document {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .document h2 {
    margin-top: 34px;
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Support on Telegram: a corner button on every public page, and a large one
   on the support page. Telegram's own blue is a brand colour, the same in both
   schemes. The label shows only where there is room for it beside the text. */
.tg-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(20, 16, 60, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tg-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(20, 16, 60, 0.24);
}

.tg-fab__mark {
  display: block;
  width: 54px;
  height: 54px;
}

.tg-fab__label {
  display: none;
}

@media (min-width: 1100px) {
  .tg-fab {
    padding: 5px 5px 5px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--heading);
    font-weight: 700;
    font-size: 14px;
  }

  .tg-fab__label {
    display: inline;
  }

  .tg-fab__mark {
    width: 44px;
    height: 44px;
  }
}

.tg-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: #2AABEE;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
}

.tg-button:hover {
  filter: brightness(1.06);
}

.tg-button__mark {
  display: block;
  width: 30px;
  height: 30px;
}

@media print {
  .tg-fab {
    display: none;
  }
}

.tg-button {
  white-space: nowrap;
}

/* The corner button floats over the page on a phone; the footer keeps a
   button's height of room so the last line is never hidden under it. */
@media (max-width: 1099px) {
  .site-footer {
    padding-bottom: 84px;
  }
}
