:root {
  --ink: #101936;
  --ink-2: #526078;
  --blue: #356cf6;
  --blue-dark: #2455d8;
  --mint: #18b7a0;
  --pearl: #f5f8fd;
  --paper: rgba(255,255,255,.86);
  --line: #dce4f0;
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--pearl);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-150%); border-radius: 8px; color: #fff; background: var(--blue); }
.skip-link:focus { transform: none; }

.legal-header { position: sticky; z-index: 10; top: 0; padding: 12px 20px; border-bottom: 1px solid rgba(220,228,240,.8); background: rgba(245,248,253,.82); backdrop-filter: blur(18px) saturate(150%); }
.legal-nav { width: min(100%, var(--max)); min-height: 56px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 650; text-decoration: none; letter-spacing: 0; }
.brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 8px 24px rgba(53,108,246,.2); }
.brand strong { color: var(--blue); }
.legal-nav-actions { display: flex; align-items: center; gap: 10px; }
.back-link, .store-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 650; text-decoration: none; }
.back-link { color: var(--ink-2); }
.back-link:hover { color: var(--ink); background: #fff; }
.store-link { color: #fff; background: var(--blue); box-shadow: 0 8px 22px rgba(53,108,246,.2); }
.store-link:hover { background: var(--blue-dark); }

.legal-hero { position: relative; overflow: hidden; padding: 92px 20px 82px; border-bottom: 1px solid var(--line); background: #eef4ff; }
.legal-hero::after { content: ""; position: absolute; inset: 0 0 0 52%; background: url("/assets/hero-collage-v2.webp") center / cover no-repeat; opacity: .18; mask-image: linear-gradient(90deg, transparent, #000 32%); }
.legal-hero-inner { position: relative; z-index: 1; width: min(100%, var(--max)); margin: auto; }
.eyebrow { margin: 0 0 14px; display: flex; align-items: center; gap: 9px; color: var(--blue); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 99px; background: var(--mint); }
h1 { max-width: 760px; margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: 1.02; letter-spacing: 0; }
.legal-hero p:last-child { max-width: 650px; margin: 22px 0 0; color: var(--ink-2); font-size: 18px; }

.legal-layout { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 64px 0 100px; display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 72px; align-items: start; }
.toc { position: sticky; top: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.68); }
.toc strong { display: block; margin-bottom: 8px; font-size: 13px; text-transform: uppercase; color: var(--ink-2); }
.toc a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 14px; line-height: 1.35; text-decoration: none; }
.toc a:hover { color: var(--blue); }
.legal-article { min-width: 0; }
.updated { margin: 0 0 28px; color: var(--ink-2); font-size: 14px; }
.notice { margin: 0 0 40px; padding: 22px 24px; border: 1px solid #bce8df; border-left: 4px solid var(--mint); border-radius: 10px; background: #effbf8; }
.notice strong { display: block; margin-bottom: 4px; }
.legal-section { padding: 12px 0 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.legal-section + .legal-section { padding-top: 34px; }
.legal-section:last-child { border-bottom: 0; }
h2 { margin: 0 0 12px; font-size: 27px; line-height: 1.25; letter-spacing: 0; }
h3 { margin: 24px 0 6px; font-size: 18px; line-height: 1.35; }
p { margin: 0 0 14px; }
ul { margin: 10px 0 16px; padding-left: 22px; }
li { margin: 7px 0; }
.legal-article p, .legal-article li { color: #394861; }
.legal-article a { color: var(--blue-dark); text-underline-offset: 3px; }

.legal-footer { padding: 48px 20px 28px; color: #fff; background: #0b1227; }
.legal-footer-inner { width: min(100%, var(--max)); margin: auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.legal-footer .brand { color: #fff; }
.legal-footer p { max-width: 390px; margin: 12px 0 0; color: #aeb9cd; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: #dce3ef; font-size: 14px; }
.copyright { width: min(100%, var(--max)); margin: 38px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #8190a9; font-size: 12px; }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; gap: 34px; }
  .toc { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .toc strong { grid-column: 1 / -1; }
  .legal-footer-inner { flex-direction: column; }
}

@media (max-width: 560px) {
  .legal-header { padding: 8px 12px; }
  .legal-nav { gap: 8px; }
  .brand { font-size: 16px; }
  .brand img { width: 38px; height: 38px; border-radius: 10px; }
  .back-link { display: none; }
  .store-link { padding-inline: 13px; }
  .legal-hero { padding: 68px 16px 58px; }
  .legal-hero::after { left: 30%; opacity: .1; }
  h1 { font-size: 44px; }
  .legal-hero p:last-child { font-size: 17px; }
  .legal-layout { width: calc(100% - 32px); padding: 42px 0 72px; }
  .toc { grid-template-columns: 1fr; }
  h2 { font-size: 24px; }
  .notice { padding: 18px; }
  .footer-links { flex-direction: column; }
}

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