:root {
  --indigo: #625BE7;
  --indigo-dark: #4941CF;
  --indigo-ink: #332C9F;
  --lavender: #ECEAFF;
  --amber: #FFB43D;
  --ink: #202532;
  --muted: #687184;
  --faint: #9097A5;
  --line: #E3E6ED;
  --canvas: #F3F5F9;
  --surface: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo-dark); }

.shell {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark img { width: 100%; height: 100%; }

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(227, 230, 237, .76);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}

.site-header .shell {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #596274;
  font-size: 14px;
  font-weight: 650;
}

.site-header nav a { color: inherit; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--indigo); }

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 114px;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 180, 61, .2), transparent 25%),
    radial-gradient(circle at 12% 90%, rgba(98, 91, 231, .12), transparent 30%),
    linear-gradient(145deg, #FBFAFF 0%, #F2F0FF 62%, #F2F4F9 100%);
}

.legal-hero::after {
  position: absolute;
  top: -240px;
  right: -150px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(98, 91, 231, .14);
  border-radius: 50%;
  content: "";
}

.legal-label {
  display: inline-flex;
  margin-bottom: 19px;
  padding: 7px 11px;
  color: var(--indigo-ink);
  border: 1px solid #DAD7FF;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -.055em;
}

.legal-hero p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.legal-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  margin-top: -58px;
  padding-bottom: 84px;
}

.toc,
.legal-card {
  border: 1px solid rgba(227, 230, 237, .92);
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(38, 38, 80, .08);
}

.toc {
  position: sticky;
  top: 24px;
  padding: 22px;
  border-radius: 20px;
}

.toc-title {
  display: block;
  margin-bottom: 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.toc nav { display: grid; gap: 3px; }

.toc a {
  padding: 7px 9px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  color: var(--indigo-ink);
  background: var(--lavender);
}

.legal-card {
  padding: clamp(30px, 5vw, 64px);
  border-radius: 28px;
}

.lead {
  margin: 0 0 38px;
  padding-bottom: 34px;
  color: #505A6D;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  line-height: 1.7;
}

.legal-section {
  scroll-margin-top: 24px;
}

.legal-section + .legal-section {
  margin-top: 38px;
  padding-top: 4px;
}

h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -.025em;
}

h3 {
  margin: 25px 0 5px;
  color: #343B49;
  font-size: 16px;
  letter-spacing: -.01em;
}

p,
li {
  color: #4B5568;
  font-size: 15.5px;
}

p { margin: 10px 0; }
ul { margin: 12px 0; padding-left: 22px; }
li { margin: 8px 0; padding-left: 3px; }

table {
  width: 100%;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  font-size: 14px;
}

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

th + th,
td + td { border-left: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }

th {
  color: #5D6678;
  background: var(--canvas);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-card {
  margin-top: 42px;
  padding: 21px 23px;
  border: 1px solid #DAD7FF;
  border-radius: 16px;
  background: #F7F6FF;
}

.contact-card strong { display: block; margin-bottom: 4px; color: var(--ink); }
.contact-card p { margin: 0; font-size: 14px; }

footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

footer .shell {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

footer .brand { font-size: 14px; }
footer .brand-mark { width: 34px; height: 34px; }
footer .brand-mark img { width: 100%; height: 100%; }

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

footer nav a { color: inherit; text-decoration: none; }
.copyright { color: var(--faint); font-size: 12px; }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1080px); }
  .site-header .shell { min-height: 70px; }
  .site-header nav a:first-child { display: none; }
  .brand-text { max-width: 160px; line-height: 1.1; }
  .legal-hero { padding: 52px 0 94px; }
  .legal-layout { margin-top: -48px; padding-bottom: 58px; }
  .toc { padding: 17px; }
  .toc nav { grid-template-columns: 1fr; }
  .legal-card { border-radius: 22px; }
  table { display: block; overflow-x: auto; white-space: normal; }
  footer .shell { align-items: flex-start; flex-direction: column; padding-block: 28px; }
}

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