:root {
  color-scheme: dark;
  --bg: #090a0d;
  --panel: rgba(21, 23, 28, 0.88);
  --panel-strong: #17191f;
  --panel-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f8f8f7;
  --muted: #a6a7ad;
  --accent: #ff7a1a;
  --accent-light: #ffa45f;
  --accent-soft: rgba(255, 122, 26, 0.13);
  --max: 1180px;
  --content: 900px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 7%, rgba(255, 122, 26, 0.16), transparent 31rem),
    radial-gradient(circle at 2% 88%, rgba(255, 166, 89, 0.07), transparent 28rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.7 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

a:hover {
  color: #ffc18e;
}

a:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
  border-radius: 4px;
}

.legal-hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 14, 18, 0.58);
  overflow: hidden;
}

.legal-hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  top: -190px;
  right: 8%;
  border: 1px solid rgba(255, 122, 26, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 72px rgba(255, 122, 26, 0.025);
  pointer-events: none;
}

.legal-hero-inner,
.legal-layout,
.policy-index-main {
  position: relative;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.legal-hero-inner {
  padding: 30px 0 50px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 58px;
  font-size: 13px;
  font-weight: 680;
}

.legal-topbar a {
  color: var(--muted);
  text-decoration: none;
}

.legal-topbar a:hover {
  color: var(--text);
}

.legal-topbar .legal-home {
  color: var(--accent-light);
}

.legal-brand {
  margin: 0 0 13px;
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(36px, 5.8vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.effective-date {
  margin: 20px 0 0;
  color: var(--muted);
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, var(--content));
  gap: 44px;
  align-items: start;
  padding: 42px 0 78px;
}

.legal-toc {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.legal-toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--text);
}

.legal-content {
  min-width: 0;
}

.legal-intro {
  margin-bottom: 34px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 18px;
  background: var(--accent-soft);
}

.legal-intro p:last-child,
.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section {
  scroll-margin-top: 24px;
  padding: 5px 0 27px;
  border-bottom: 1px solid var(--line);
}

.legal-section:last-of-type {
  border-bottom: 0;
}

h2 {
  margin: 28px 0 12px;
  font-size: clamp(21px, 2.4vw, 29px);
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0 0 14px;
}

.document-note {
  margin-top: 30px;
  color: var(--muted);
  font-size: 13px;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.action-link:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.policy-index-main {
  padding: 46px 0 80px;
}

.language-section + .language-section {
  margin-top: 54px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.language-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.language-heading h2 {
  margin: 0;
  font-size: 25px;
}

.language-heading span {
  color: var(--muted);
  font-size: 13px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.document-card {
  display: flex;
  min-height: 174px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.document-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 26, 0.36);
  background: rgba(29, 30, 36, 0.94);
  color: var(--text);
}

.document-number {
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.document-card h3 {
  margin: 15px 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.document-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 880px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
    max-height: none;
    columns: 2;
  }

  .legal-toc strong {
    column-span: all;
  }
}

@media (max-width: 640px) {
  .legal-hero-inner,
  .legal-layout,
  .policy-index-main {
    width: min(calc(100% - 32px), var(--max));
  }

  .legal-hero-inner {
    padding: 24px 0 38px;
  }

  .legal-topbar {
    margin-bottom: 44px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 50px);
  }

  .legal-layout {
    gap: 26px;
    padding-top: 28px;
  }

  .legal-toc {
    columns: 1;
  }

  .legal-intro {
    padding: 20px;
  }

  .document-grid {
    grid-template-columns: 1fr;
  }

  .language-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media print {
  :root {
    --bg: #fff;
    --panel: #fff;
    --panel-strong: #fff;
    --text: #111;
    --muted: #555;
    --line: #ddd;
    --accent-light: #111;
    --accent-soft: #f5f5f5;
  }

  body {
    background: #fff;
  }

  body::before,
  .legal-topbar,
  .legal-toc,
  .document-actions {
    display: none;
  }

  .legal-hero-inner,
  .legal-layout {
    width: 100%;
  }

  .legal-hero-inner {
    padding: 22px 36px;
  }

  .legal-layout {
    display: block;
    padding: 24px 36px;
  }

  .legal-section {
    break-inside: avoid;
  }
}
