:root {
  color-scheme: light;
  --page: #fff;
  --panel: #f7f8fc;
  --ink: #17171b;
  --muted: #62646d;
  --faint: #92949d;
  --line: #e8e9ee;
  --accent: #655cf5;
  --accent-red: #ff4d59;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(calc(100% - 56px), var(--max)); margin: 0 auto; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  border-bottom: 1px solid rgba(23,23,27,.06);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 136px; height: auto; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.back-link {
  padding: 10px 16px;
  border: 1px solid #dedfe5;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #34353b;
  font-size: 13px;
  font-weight: 650;
  transition: border-color .2s ease, background .2s ease;
}
.back-link:hover { border-color: #bfc1ca; background: #fff; }

.legal-main { width: min(calc(100% - 56px), var(--max)); margin: 0 auto; padding: 34px 0 96px; }
.legal-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 58px 60px;
  border: 1px solid rgba(23,23,27,.05);
  border-radius: 28px;
  background-color: #fafbfe;
  background-image: url("./newsfi-legal-hero-v1.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.legal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251,252,255,.99) 0%, rgba(251,252,255,.94) 45%, rgba(251,252,255,.28) 67%, rgba(251,252,255,0) 82%);
  pointer-events: none;
}
.legal-intro { position: relative; z-index: 1; width: min(58%, 650px); }
.kicker { color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 25px 0 18px; font-size: clamp(46px, 5vw, 64px); line-height: 1.02; letter-spacing: -.052em; font-weight: 650; }
.lead { margin: 0; color: #555761; font-size: 17px; line-height: 1.75; }
.updated { margin-top: 26px; color: var(--faint); font-size: 12px; }

.legal-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; padding-top: 58px; }
.legal-sidenav { position: sticky; top: 98px; align-self: start; display: grid; gap: 7px; }
.legal-sidenav-label { margin-bottom: 12px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.legal-sidenav a { padding: 11px 13px; border-radius: 10px; color: #6a6c75; font-size: 13px; transition: background .2s ease, color .2s ease; }
.legal-sidenav a:hover { color: var(--ink); background: #f6f7fa; }
.legal-sidenav a[aria-current="page"] { color: var(--ink); background: #f1f2f7; font-weight: 700; }
.legal-content { min-width: 0; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 32px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.legal-toc a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: #666872; background: #fff; font-size: 12px; }
.legal-toc a:hover { border-color: #cfd1da; color: var(--ink); }
.legal-section { padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: 92px; }
.legal-content > .legal-section:first-child { padding-top: 0; border-top: 0; }
.legal-toc + .legal-section { border-top: 0; }
.legal-section h2 { margin: 0 0 20px; font-size: 26px; line-height: 1.3; letter-spacing: -.02em; font-weight: 650; }
.legal-section h3 { margin: 30px 0 11px; font-size: 17px; line-height: 1.45; }
.legal-section p, .legal-section li { color: var(--muted); font-size: 15px; line-height: 1.9; }
.legal-section p { margin: 12px 0; }
.legal-section ul { margin: 15px 0 0; padding-left: 23px; }
.legal-section li + li { margin-top: 7px; }
.boundary { margin: 22px 0; padding: 20px 22px; border: 1px solid rgba(101,92,245,.12); border-radius: 16px; background: linear-gradient(135deg, rgba(247,246,255,.96), rgba(248,251,255,.96)); color: #454650; font-size: 14px; line-height: 1.85; box-shadow: 0 14px 40px rgba(83,86,128,.035); }
.contact { color: #3930d8; text-decoration: underline; text-underline-offset: 4px; }

.footer { padding: 44px 0 48px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 36px; }
.footer-company { max-width: 620px; color: #858790; font-size: 11px; line-height: 1.7; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; color: #666871; font-size: 12px; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; padding-top: 38px; }
  .legal-sidenav { position: static; display: flex; overflow-x: auto; gap: 7px; padding-bottom: 4px; scrollbar-width: none; }
  .legal-sidenav::-webkit-scrollbar { display: none; }
  .legal-sidenav-label { display: none; }
  .legal-sidenav a { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; }
}

@media (max-width: 640px) {
  .wrap, .legal-main { width: min(calc(100% - 28px), var(--max)); }
  .brand img { width: 118px; }
  .back-link { padding: 9px 13px; font-size: 12px; }
  .legal-main { padding: 18px 0 70px; }
  .legal-hero { min-height: 430px; align-items: flex-start; padding: 38px 24px; border-radius: 22px; background-position: 68% bottom; background-size: auto 70%; }
  .legal-hero::after { background: linear-gradient(180deg, rgba(251,252,255,.99) 0%, rgba(251,252,255,.96) 52%, rgba(251,252,255,.5) 72%, rgba(251,252,255,.08) 100%); }
  .legal-intro { width: 100%; }
  h1 { margin-top: 21px; font-size: 43px; line-height: 1.05; }
  .lead { font-size: 15px; line-height: 1.72; }
  .updated { margin-top: 20px; }
  .legal-section { padding: 34px 0; }
  .legal-section h2 { font-size: 23px; }
  .legal-section p, .legal-section li { font-size: 14px; line-height: 1.86; }
  .footer-inner { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}
