* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color: #111;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

body { margin: 0; }
a { color: inherit; }

.topbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 clamp(20px, 5vw, 96px);
  color: #fff;
  background: #090000;
  font-size: 13px;
  font-weight: 700;
}

.topbar > * {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 clamp(12px, 1.6vw, 24px);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  line-height: 1.25;
  white-space: nowrap;
}

.topbar > :first-child { border-left: 0; }
.topbar a { color: #fff; text-underline-offset: 4px; }
.topbar .group-note { color: #79d3df; }

.legal-header { border-bottom: 1px solid #ddd; }
.legal-header-inner,
.legal-hero,
.legal-layout,
.legal-footer { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.legal-header-inner {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.legal-brand img { width: 62px; height: 62px; object-fit: contain; }
.legal-brand strong { display: block; font-size: 20px; }
.legal-brand small { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.back-link,
.language-link { font-size: 13px; font-weight: 700; text-decoration: none; }
.language-link { padding: 8px 10px; border: 1px solid #ccc; }
.back-link:hover,
.language-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.legal-hero { padding: 68px 0 48px; border-bottom: 1px solid #ddd; }
.legal-kicker { margin: 0 0 12px; font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1 { max-width: 880px; margin: 0; font-size: clamp(38px, 6vw, 62px); line-height: 1.08; }
.legal-summary { max-width: 820px; margin: 22px 0 0; color: #444; font-size: 16px; line-height: 1.75; }
.translation-note { max-width: 860px; margin: 26px 0 0; padding: 16px 18px; border: 1px solid #aaa; font-size: 13px; line-height: 1.65; }
.legal-meta { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 18px 52px; margin: 30px 0 0; }
.legal-meta div { display: grid; gap: 6px; }
.legal-meta dt { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.legal-meta dd { margin: 0; font-size: 14px; font-weight: 700; }

.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 70px; padding: 54px 0 88px; }
.legal-toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; padding-right: 18px; }
.legal-toc strong { display: block; margin-bottom: 14px; font-size: 12px; text-transform: uppercase; }
.legal-toc a { display: block; padding: 7px 0; color: #444; font-size: 12px; line-height: 1.45; text-decoration: none; }
.legal-toc a:hover,
.legal-toc a:focus-visible { color: #000; text-decoration: underline; text-underline-offset: 4px; }
.legal-content { min-width: 0; }
.legal-content section { padding: 0 0 38px; scroll-margin-top: 24px; }
.legal-content section + section { padding-top: 38px; border-top: 1px solid #ddd; }
.legal-content h2 { margin: 0 0 20px; font-size: 25px; line-height: 1.3; }
.legal-content h3 { margin: 26px 0 12px; font-size: 17px; line-height: 1.45; }
.legal-content p,
.legal-content li { font-size: 15px; line-height: 1.85; }
.legal-content p { margin: 0 0 14px; }
.legal-content ul,
.legal-content ol { margin: 0 0 16px; padding-left: 22px; }
.legal-content li + li { margin-top: 8px; }
.legal-content .notice { margin: 6px 0 18px; padding: 18px 20px; border: 1px solid #aaa; font-weight: 700; }

.site-footer { padding: 46px max(20px, calc((100vw - 1500px) / 2)) 24px; color: rgba(255, 255, 255, 0.74); background: #050505; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, 190px) minmax(300px, 400px); gap: clamp(34px, 5vw, 78px); align-items: start; max-width: 1500px; margin: 0 auto; }
.site-footer strong { color: #fff; }
.footer-profile { max-width: 680px; }
.footer-profile p { max-width: 620px; margin: 20px 0 0; font-size: 14px; line-height: 1.8; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 58px; height: 58px; object-fit: contain; border-radius: 4px; }
.footer-links { display: grid; gap: 13px; align-content: start; }
.footer-links h2 { margin: 0 0 5px; color: #fff; font-size: 14px; }
.footer-links a { width: fit-content; color: rgba(255, 255, 255, 0.74); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.footer-community { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 22px; align-items: start; padding-left: 34px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.footer-community h2 { margin: 0 0 12px; color: rgba(255, 255, 255, 0.58); font-size: 12px; }
.footer-community-copy strong { display: block; font-size: 18px; }
.footer-community-copy p { margin: 8px 0 13px; color: rgba(255, 255, 255, 0.56); font-size: 12px; line-height: 1.6; }
.footer-community-copy a { color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.footer-community-code { display: block; padding: 7px; background: #fff; border-radius: 4px; }
.footer-community-code img { display: block; width: 112px; height: 112px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; max-width: 1500px; margin: 38px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.52); font-size: 13px; }

@media (max-width: 860px) {
  .topbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .topbar > * { min-width: 0; min-height: 40px; justify-content: center; padding: 7px 14px; text-align: center; white-space: normal; }
  .topbar > :nth-child(odd) { border-left: 0; }
  .topbar > :nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.18); }
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; max-height: none; padding: 0 0 28px; border-bottom: 1px solid #ddd; columns: 2; column-gap: 26px; }
  .legal-toc strong { column-span: all; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-profile { grid-column: 1 / -1; }
  .footer-community { padding-left: 24px; }
}

@media (max-width: 620px) {
  .topbar { display: flex; min-height: 40px; }
  .topbar .markets,
  .topbar .services { display: none; }
  .topbar > * { min-height: 40px; padding: 0 14px; border-top: 0; white-space: nowrap; }
  .legal-header-inner { min-height: 76px; }
  .legal-brand img { width: 50px; height: 50px; }
  .legal-brand strong { font-size: 17px; }
  .header-actions { gap: 9px; }
  .back-link { display: none; }
  .legal-hero { padding: 48px 0 38px; }
  .legal-layout { padding: 38px 0 62px; }
  .legal-toc { columns: 1; }
  .site-footer { padding: 38px 20px 22px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-profile { grid-column: auto; }
  .footer-community { grid-template-columns: minmax(0, 1fr) 108px; padding: 24px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.16); border-left: 0; }
  .footer-community-code img { width: 94px; height: 94px; }
  .footer-bottom { margin-top: 30px; }
}
