@font-face {
  font-family: "Onest";
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: #141414;
  --ink: #f3f1ec;
  --muted: rgba(243, 241, 236, .62);
  --line: rgba(255, 255, 255, .11);
  --accent: #f94137;
  --warning: #e6b95c;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Onest", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(54rem 30rem at 82% -5%, rgba(249, 65, 55, .09), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.legal-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 76px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.legal-brand {
  width: 88px;
  height: auto;
  filter: brightness(0) invert(1);
}

.legal-back {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, transform .2s ease;
}

.legal-back:hover { color: var(--ink); transform: translateX(-2px); }

.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: end;
  padding: clamp(56px, 9vw, 118px) 0 44px;
}

.legal-eyebrow,
.legal-meta,
.legal-section-number {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: clamp(44px, 7.2vw, 96px);
  font-weight: 680;
  line-height: .92;
  letter-spacing: -.065em;
}

.legal-intro {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.5;
}

.legal-grid { border-top: 1px solid var(--line); }

.legal-section {
  display: grid;
  grid-template-columns: minmax(150px, .28fr) minmax(0, .72fr);
  gap: clamp(24px, 5vw, 78px);
  padding: clamp(34px, 5vw, 62px) 0;
  border-bottom: 1px solid var(--line);
}

.legal-section h2 {
  margin: 8px 0 0;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.legal-copy { min-width: 0; overflow-wrap: anywhere; }
.legal-copy > :first-child { margin-top: 0; }
.legal-copy > :last-child { margin-bottom: 0; }

.legal-copy p,
.legal-copy li,
.legal-copy dd,
.legal-copy td,
.legal-copy th {
  font-size: 15px;
  line-height: 1.62;
}

.legal-copy p,
.legal-copy li,
.legal-copy dd { color: var(--muted); }

.legal-copy strong { color: var(--ink); font-weight: 620; }

.legal-copy ul,
.legal-copy ol { margin: 18px 0; padding-left: 21px; }
.legal-copy li + li { margin-top: 9px; }

.legal-copy a {
  color: var(--ink);
  text-decoration-color: rgba(249, 65, 55, .7);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease, text-underline-offset .2s ease;
}

.legal-copy a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}

.legal-copy code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .88em;
}

.legal-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  table-layout: fixed;
}

.legal-table th,
.legal-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.legal-table th:nth-child(1),
.legal-table td:nth-child(1) { width: 18%; }
.legal-table th:nth-child(2),
.legal-table td:nth-child(2) { width: 26%; }
.legal-table th:nth-child(3),
.legal-table td:nth-child(3) { width: 29%; }
.legal-table th:nth-child(4),
.legal-table td:nth-child(4) { width: 27%; }

.legal-table th,
.legal-table td {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

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

.legal-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}

.legal-details div {
  padding: 16px;
  background: var(--panel);
  transition: background-color .22s ease;
}
.legal-details div:hover { background: #181818; }
.legal-details dt { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.legal-details dd { margin: 7px 0 0; color: var(--ink); }

.legal-signature {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.legal-footer nav { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.legal-footer a { text-decoration: none; transition: color .2s ease; }
.legal-footer a:hover { color: var(--ink); }

@keyframes legal-intro-reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes legal-section-reveal {
  from { opacity: .72; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.legal-hero > *,
.legal-meta {
  animation: legal-intro-reveal .52s cubic-bezier(.2,.75,.25,1) both;
}

.legal-hero > :last-child { animation-delay: .07s; }
.legal-meta { animation-delay: .12s; }

@supports (animation-timeline: view()) {
  .legal-section {
    animation: legal-section-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 18%;
  }
}

@media (max-width: 720px) {
  .legal-shell { width: min(100% - 28px, 1120px); padding-top: 12px; }
  .legal-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 56px; }
  .legal-section { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .legal-details { grid-template-columns: minmax(0, 1fr); }
  .legal-hero h1, .legal-intro, .legal-details dd { overflow-wrap: anywhere; }
  .legal-footer { flex-direction: column; }

  .legal-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .legal-table,
  .legal-table tbody {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  .legal-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .legal-table tr {
    display: block;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .legal-table tr:last-child { margin-bottom: 0; }

  .legal-table td,
  .legal-table tr:last-child td {
    display: grid;
    grid-template-columns: minmax(96px, .36fr) minmax(0, .64fr);
    gap: 14px;
    width: 100% !important;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .legal-table td:last-child,
  .legal-table tr:last-child td:last-child { border-bottom: 0; }

  .legal-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 9px;
    font-weight: 680;
    line-height: 1.35;
    letter-spacing: .055em;
    text-transform: uppercase;
  }

  html[lang="en"] .legal-table td:nth-child(1)::before { content: "Situation"; }
  html[lang="en"] .legal-table td:nth-child(2)::before { content: "Data"; }
  html[lang="en"] .legal-table td:nth-child(3)::before { content: "Purpose and basis"; }
  html[lang="en"] .legal-table td:nth-child(4)::before { content: "Retention"; }
}

@media (max-width: 300px) {
  .legal-shell { width: calc(100% - 20px); }
  .legal-topbar { gap: 8px; }
  .legal-brand { width: 58px; }
  .legal-back { font-size: 10px; letter-spacing: 0; text-align: right; }
  .legal-hero { padding-top: 38px; }
  .legal-hero h1 { font-size: 35px; }
  .legal-table-wrap { max-width: 100%; }
}

@media (max-width: 360px) {
  .legal-table td,
  .legal-table tr:last-child td {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legal-hero > *,
  .legal-meta,
  .legal-section { animation: none; }
  .legal-back,
  .legal-copy a,
  .legal-details div,
  .legal-footer a { transition: none; }
}

@media print {
  :root { color-scheme: light; }
  body { color: #111; background: white; }
  .legal-shell { width: 100%; padding: 0; }
  .legal-topbar, .legal-footer nav { display: none; }
  .legal-hero { padding: 0 0 24px; }
  .legal-hero h1, .legal-copy strong, .legal-section h2, .legal-details dd { color: #111; }
  .legal-intro, .legal-copy p, .legal-copy li, .legal-copy dd, .legal-meta, .legal-eyebrow { color: #444; }
  .legal-grid, .legal-section, .legal-details, .legal-table-wrap, .legal-table th, .legal-table td { border-color: #ccc; }
  .legal-details { background: #ccc; }
  .legal-details div { background: white; }
}
