:root {
  color-scheme: light;
  --navy-950: #020b21;
  --navy-900: #061636;
  --navy-800: #0a2454;
  --blue: #075cff;
  --blue-strong: #0046ff;
  --blue-soft: #eaf1ff;
  --ink: #102957;
  --muted: #627696;
  --line: #dce6f4;
  --surface: #ffffff;
  --page: #f3f7fc;
  --shadow: 0 24px 70px rgba(9, 34, 78, 0.09);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--navy-950); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
a { color: var(--blue-strong); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button, a { -webkit-tap-highlight-color: transparent; }

.legal-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 50% 115%, rgba(0, 70, 255, 0.8), transparent 42%),
    radial-gradient(circle at 86% 5%, rgba(40, 103, 255, 0.23), transparent 30%),
    linear-gradient(145deg, var(--navy-950), #071c48 72%, #09255c);
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(118, 157, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 157, 255, 0.18) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(to bottom, transparent 7%, black 70%);
}
.legal-hero-inner,
.legal-main,
.legal-footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.legal-hero-inner { position: relative; z-index: 1; padding: max(20px, env(safe-area-inset-top)) 0 78px; }

.legal-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(157, 184, 242, 0.25);
  border-radius: 20px;
  background: rgba(5, 19, 49, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.legal-brand { display: inline-flex; align-items: center; gap: 11px; color: white; font-size: 1.03rem; font-weight: 850; letter-spacing: -0.02em; text-decoration: none; }
.legal-brand img { width: 42px; height: 42px; border-radius: 13px; object-fit: contain; background: white; }
.legal-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.legal-nav a { padding: 9px 11px; border-radius: 11px; color: #b9c8e7; font-size: 0.79rem; font-weight: 760; text-decoration: none; white-space: nowrap; }
.legal-nav a[aria-current='page'], .legal-nav a:hover { color: white; background: rgba(255, 255, 255, 0.1); }
.legal-home-link { border: 1px solid rgba(255, 255, 255, 0.14); }

.legal-heading { max-width: 890px; margin-top: clamp(64px, 9vw, 104px); }
.legal-kicker { margin: 0 0 13px; color: #83a9ff; font-size: 0.76rem; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; }
h1 { margin: 0; color: white; font-size: clamp(2.35rem, 7vw, 5.2rem); line-height: 0.98; letter-spacing: -0.055em; text-wrap: balance; }
.legal-intro { max-width: 760px; margin: 24px 0 0; color: #c0ccea; font-size: clamp(1rem, 2.2vw, 1.18rem); line-height: 1.65; }
.legal-meta { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 25px; }
.legal-meta span { display: inline-flex; align-items: center; min-height: 31px; padding: 0 11px; border: 1px solid rgba(156, 184, 244, 0.25); border-radius: 999px; color: #dce6fb; background: rgba(255,255,255,0.07); font-size: 0.76rem; font-weight: 700; }

.legal-main { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: start; padding: 42px 0 80px; }
.legal-toc { position: sticky; top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,0.88); box-shadow: 0 15px 45px rgba(21, 47, 91, 0.06); backdrop-filter: blur(14px); }
.legal-toc strong { display: block; margin-bottom: 10px; color: var(--navy-900); font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase; }
.legal-toc nav { display: grid; gap: 3px; }
.legal-toc a { padding: 7px 9px; border-radius: 9px; color: #647898; font-size: 0.78rem; line-height: 1.35; text-decoration: none; }
.legal-toc a:hover { color: var(--blue-strong); background: var(--blue-soft); }

.legal-article { min-width: 0; }
.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.legal-summary article { min-height: 116px; padding: 18px; border: 1px solid #d9e5f6; border-radius: 20px; background: linear-gradient(145deg, #fff, #f4f8ff); }
.legal-summary span { display: grid; width: 32px; height: 32px; place-items: center; margin-bottom: 11px; border-radius: 10px; color: var(--blue-strong); background: #e8f0ff; font-size: 0.85rem; font-weight: 900; }
.legal-summary strong { display: block; color: var(--navy-900); font-size: 0.88rem; line-height: 1.35; }
.legal-summary small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.73rem; line-height: 1.45; }

.legal-content { display: grid; gap: 14px; }
.legal-section { scroll-margin-top: 24px; padding: clamp(23px, 4vw, 38px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 14px 45px rgba(20, 50, 95, 0.055); }
.legal-section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.legal-section-number { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--blue-strong); background: var(--blue-soft); font-size: 0.76rem; font-weight: 900; }
.legal-section h2 { margin: 2px 0 0; color: var(--navy-900); font-size: clamp(1.18rem, 2.6vw, 1.5rem); line-height: 1.2; letter-spacing: -0.025em; }
.legal-section h3 { margin: 24px 0 8px; color: #173a73; font-size: 1rem; }
.legal-section p, .legal-section ul { margin: 11px 0 0; }
.legal-section ul { padding-left: 1.22rem; }
.legal-section li + li { margin-top: 8px; }
.legal-section strong { color: #183a70; }
.legal-note { margin-top: 18px !important; padding: 16px 18px; border: 1px solid #cdddff; border-left: 4px solid var(--blue-strong); border-radius: 14px; color: #294d85; background: #f1f6ff; }
.legal-warning { border-color: #f1dfb1; border-left-color: #d59a18; background: #fffaf0; color: #725315; }
.legal-contact { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 9px 12px; border-radius: 11px; background: var(--blue-soft); font-weight: 800; text-decoration: none; }

.legal-table-wrap { width: 100%; margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
.legal-table { width: 100%; min-width: 600px; border-collapse: collapse; background: white; font-size: 0.84rem; }
.legal-table th, .legal-table td { padding: 13px 14px; border-bottom: 1px solid #e6edf7; text-align: left; vertical-align: top; }
.legal-table th { color: #36527e; background: #f5f8fc; font-size: 0.73rem; letter-spacing: 0.04em; text-transform: uppercase; }
.legal-table tr:last-child td { border-bottom: 0; }

.legal-footer { color: #9aacca; background: var(--navy-950); }
.legal-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 112px; padding: 22px 0 max(22px, env(safe-area-inset-bottom)); font-size: 0.78rem; }
.legal-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 17px; }
.legal-footer a { color: #c7d2e9; text-decoration: none; }
.legal-footer a:hover { color: white; }

@media (max-width: 900px) {
  .legal-main { grid-template-columns: 1fr; padding-top: 26px; }
  .legal-toc { position: relative; top: auto; padding: 11px; overflow: hidden; }
  .legal-toc strong { padding: 2px 7px; }
  .legal-toc nav { display: flex; overflow-x: auto; scrollbar-width: none; }
  .legal-toc nav::-webkit-scrollbar { display: none; }
  .legal-toc a { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 680px) {
  .legal-hero-inner, .legal-main, .legal-footer-inner { width: min(100% - 20px, 1180px); }
  .legal-hero { min-height: 400px; }
  .legal-header { align-items: flex-start; flex-direction: column; gap: 7px; }
  .legal-nav { width: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .legal-nav::-webkit-scrollbar { display: none; }
  .legal-nav a { flex: 0 0 auto; }
  .legal-heading { margin-top: 52px; }
  .legal-hero-inner { padding-bottom: 58px; }
  .legal-summary { grid-template-columns: 1fr; }
  .legal-summary article { min-height: 0; }
  .legal-section { padding: 22px 18px; border-radius: 20px; }
  .legal-section-heading { gap: 10px; }
  .legal-footer-inner { align-items: flex-start; flex-direction: column; }
  .legal-footer-links { justify-content: flex-start; }
}

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