*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg2: #f6f8fb;
  --bg3: #f4f8fb;
  --border: rgba(10,14,20,0.08);
  --border2: rgba(10,14,20,0.14);
  --text: #0a0e14;
  --text2: rgba(10,14,20,0.68);
  --text3: rgba(10,14,20,0.42);
  --accent: #00A8C8;
  --accent-bright: #00C4E8;
  --r: 4px;
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(24px, 6vw, 80px);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.nav-logo,
.fl-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
}

.wordmark {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  color: var(--text2);
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
  border-color: rgba(0,168,200,0.24);
  background: rgba(0,168,200,0.06);
}

.legal-main {
  padding-top: 68px;
}

.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.42fr);
  gap: clamp(36px, 7vw, 112px);
  padding: clamp(86px, 12vw, 138px) clamp(24px, 6vw, 80px) clamp(64px, 8vw, 100px);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(rgba(10,14,20,0.025) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(10,14,20,0.025) 1px, transparent 1px) 0 0 / 42px 42px,
    #ffffff;
}

.legal-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-title {
  max-width: 820px;
  font-size: clamp(42px, 8vw, 92px);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: 0;
}

.legal-subtitle {
  max-width: 720px;
  margin-top: 28px;
  color: var(--text2);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
}

.legal-meta {
  align-self: end;
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 2px solid var(--text);
}

.meta-row {
  display: grid;
  gap: 6px;
}

.meta-label {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(38px, 7vw, 96px);
  padding: clamp(58px, 8vw, 108px) clamp(24px, 6vw, 80px);
}

.legal-toc {
  align-self: start;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
}

.toc-title {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc-link {
  width: fit-content;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.18s ease;
}

.toc-link:hover,
.toc-link:focus-visible {
  color: var(--accent);
}

.legal-content {
  display: grid;
  gap: 42px;
  max-width: 850px;
}

.legal-section {
  padding-top: 28px;
  border-top: 1px solid var(--border2);
}

.legal-section h2 {
  margin-bottom: 16px;
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0;
}

.legal-section p,
.legal-section li {
  color: var(--text2);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.72;
}

.legal-section p + p,
.legal-section ul + p,
.legal-section p + ul {
  margin-top: 12px;
}

.legal-section ul {
  display: grid;
  gap: 8px;
  padding-left: 19px;
}

.legal-section strong {
  color: var(--text);
  font-weight: 500;
}

.legal-note {
  padding: 22px;
  border: 1px solid rgba(0,168,200,0.24);
  border-radius: 8px;
  background: #f3fbfd;
}

.legal-note p {
  color: rgba(10,14,20,0.74);
  font-size: 14px;
}

.legal-link {
  color: var(--text);
  text-decoration-color: rgba(0,168,200,0.55);
  text-underline-offset: 3px;
}

.legal-link:hover,
.legal-link:focus-visible {
  color: var(--accent);
}

footer {
  padding: 32px clamp(24px, 6vw, 80px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-left,
.footer-links,
.footer-creator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text3);
  font-size: 13px;
}

.footer-left .fl-logo {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  opacity: 0.6;
}

.footer-link {
  color: var(--text2);
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--accent);
}

@media (max-width: 900px) {
  .legal-hero,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-meta {
    align-self: start;
    max-width: 520px;
  }

  .legal-toc {
    position: static;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 620px) {
  nav {
    height: auto;
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-actions {
    flex-wrap: wrap;
  }

  .legal-main {
    padding-top: 108px;
  }

  .legal-title {
    font-size: 42px;
    line-height: 1.08;
  }

  .legal-subtitle {
    font-size: 16px;
  }

  footer,
  .footer-left,
  .footer-links,
  .footer-creator {
    align-items: flex-start;
    flex-direction: column;
  }
}
