@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --brand: #2563eb;
  --brand-dark: #0f172a;
  --brand-strong: #1d4ed8;
  --brand-soft: #eff6ff;
  --ink: #111827;
  --muted: #64748b;
  --paper: #ffffff;
  --line: rgba(37, 99, 235, 0.16);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 36rem),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #eff6ff 100%);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 70%);
  z-index: -1;
}

a { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

.legal-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-link img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}
.brand-link small { display: block; color: var(--muted); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.01em; }
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}
.back-link:hover { background: var(--brand-soft); color: var(--brand-strong); }

.legal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 6vw, 72px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.94)),
    radial-gradient(circle at 82% 12%, rgba(96,165,250,0.36), transparent 22rem);
  box-shadow: var(--shadow);
}
.legal-hero::after {
  content: '';
  position: absolute;
  inset: auto -12% -46% auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.24);
  border: 1px solid rgba(191, 219, 254, 0.32);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.legal-hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}
.legal-hero .lead {
  max-width: 780px;
  margin: 22px 0 0;
  color: rgba(255,255,255,0.86);
  font-size: clamp(1rem, 2vw, 1.22rem);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(191, 219, 254, 0.24);
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  font-size: 0.92rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin: 28px auto 58px;
}
.toc {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}
.toc strong { display: block; margin-bottom: 12px; color: var(--brand-dark); }
.toc a {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: #334155;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
}
.toc a:hover { background: var(--brand-soft); color: var(--brand-strong); }

.legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.legal-content { padding: clamp(24px, 4vw, 48px); }
.notice {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid var(--line);
  color: #334155;
}
.notice strong { color: var(--brand-dark); }

section { scroll-margin-top: 20px; }
section + section { margin-top: 36px; padding-top: 30px; border-top: 1px solid rgba(37, 99, 235, 0.12); }
h2 {
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-size: clamp(1.32rem, 2.5vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
h3 { margin: 24px 0 10px; color: #1e3a8a; font-size: 1.05rem; }
p { margin: 0 0 14px; color: #334155; }
ul, ol { margin: 0 0 16px; padding-left: 1.25rem; color: #334155; }
li + li { margin-top: 8px; }
strong { color: #0f172a; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.info-box {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #f8fbff;
}
.info-box span { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.info-box b { display: block; margin-top: 4px; color: var(--brand-dark); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); margin: 18px 0; }
table { width: 100%; border-collapse: collapse; min-width: 620px; background: #fff; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid rgba(37, 99, 235, 0.1); vertical-align: top; }
th { background: #eff6ff; color: var(--brand-dark); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: 0; }

.legal-footer {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}
.legal-links { display: flex; flex-wrap: wrap; gap: 12px 18px; }

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

@media (max-width: 620px) {
  .legal-shell { width: min(100% - 22px, 1180px); }
  .legal-topbar { flex-direction: column; align-items: stretch; }
  .back-link { width: 100%; }
  .brand-link { justify-content: center; text-align: center; }
  .legal-hero { padding: 28px 20px; border-radius: 22px; }
  .hero-meta { gap: 8px; }
  .meta-pill { width: 100%; justify-content: center; text-align: center; }
  .toc nav { grid-template-columns: 1fr; }
  .legal-content { padding: 22px 16px; }
  .info-grid { grid-template-columns: 1fr; }
  body { line-height: 1.68; }
}
