/* Freedom Digital: юридические страницы и 404.
   Тот же язык, что у сайта: Inter Tight, чёрный и белый, оранжевый акцент, радиусы 10 и 16. */
:root {
  --k: #0a0a0a; --w: #fff;
  --s1: #f4f4f4; --s2: #ebebeb; --ln: #e3e3e3; --mu: #8c8c8c; --tx2: #555;
  --ac: #ff9f80; --ac-2: #d9623d; --ac-soft: #fff0e8;
  --r-s: 10px; --r-m: 16px; --pad: clamp(12px, 1.4vw, 20px); --gap: 16px;
  --mark: url('assets/mark-w.png');
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font-family: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 17px; line-height: 1.6; letter-spacing: -.01em; color: var(--k); background: var(--w); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; }
.mark { display: block; width: 26px; aspect-ratio: 256 / 224; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; background: currentColor; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-s); background: var(--k); color: #fff; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- шапка: тот же отступ и логотип, что на главной ---------- */
.lg-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; padding: 0 var(--pad); background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.lg-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: -.02em; text-decoration: none; transition: color .2s; }
.lg-logo .mark { width: 30px; }
.lg-logo:hover .mark { background: var(--ac); }
.lg-right { display: flex; align-items: center; gap: 8px; }
.lg-lang { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-s); background: var(--s1); }
.lg-lang a { display: grid; place-items: center; min-width: 38px; height: 32px; padding: 0 8px; border-radius: 7px; font-size: 14px; color: var(--mu); text-decoration: none; transition: color .2s; }
.lg-lang a:hover { color: var(--k); }
.lg-lang a[aria-current] { background: #fff; color: var(--k); box-shadow: 0 0 0 1px var(--ln); }
.lg-home { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-s); background: var(--ac); color: var(--k); font-size: 15px; text-decoration: none; transition: filter .2s, transform .2s; }
.lg-home:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ---------- заголовок документа ---------- */
.lg-head { padding: clamp(40px, 7vw, 96px) var(--pad) 0; }
.lg-k { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: var(--r-s); background: var(--s1); font-size: 14px; color: var(--tx2); }
.lg-k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ac); }
.lg-head h1 { max-width: 16ch; margin: 22px 0 0; font-size: clamp(34px, 6.6vw, 88px); font-weight: 400; line-height: 1.06; letter-spacing: -.035em; overflow-wrap: anywhere; hyphens: auto; }
.lg-lead { max-width: 56ch; margin: 24px 0 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--tx2); }
.lg-date { margin: 20px 0 0; font-size: 14px; color: var(--mu); }

/* ---------- содержание и текст ---------- */
.lg-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: clamp(40px, 6vw, 80px) var(--pad) clamp(64px, 9vw, 120px); }
.lg-toc { grid-column: 1 / span 3; position: sticky; top: 96px; align-self: start; }
.lg-toc b { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--mu); }
.lg-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--ln); }
.lg-toc li a { display: flex; gap: 10px; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; line-height: 1.35; color: var(--mu); text-decoration: none; transition: color .2s, border-color .2s; }
.lg-toc li a span { flex: none; width: 22px; font-variant-numeric: tabular-nums; }
.lg-toc li a:hover { color: var(--k); border-left-color: var(--k); }
.lg-doc { grid-column: 4 / span 7; min-width: 0; }
.lg-s { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 8px; padding: 36px 0; border-top: 1px solid var(--ln); }
.lg-s:first-child { border-top: 0; padding-top: 0; }
.lg-n { padding-top: 7px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--mu); }
.lg-s h2 { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; }
.lg-s p { margin: 0 0 14px; color: var(--tx2); }
.lg-s p:last-child { margin-bottom: 0; }
.lg-s ul { margin: 0 0 14px; padding-left: 20px; color: var(--tx2); }
.lg-s li { margin-bottom: 6px; }
.lg-s li::marker { color: var(--ac); }
.lg-s a { text-underline-offset: 3px; }
.lg-s a:hover { color: var(--ac); }
.lg-s code { padding: 1px 6px; border-radius: 6px; background: var(--s1); font-size: .9em; color: var(--k); }
.lg-card { margin-top: 12px; padding: clamp(20px, 3vw, 36px); border: 0; border-radius: var(--r-m); background: var(--s1); }
.lg-todo { padding: 1px 6px; border-radius: 6px; background: var(--ac-soft); color: var(--ac-2); }

/* ---------- подвал: как на главной, ночное фото и крупная надпись ---------- */
.lg-ft { position: relative; overflow: hidden; min-height: min(100svh, 760px); background: #0b0d14; color: #fff; }
.lg-ft-bg { position: absolute; left: 0; top: -20%; width: 100%; height: 125%; object-fit: cover; object-position: 50% 100%; filter: brightness(.6) saturate(1.1); }
.lg-ft::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(9, 9, 9, .82) 0, rgba(9, 9, 9, .5) 55%, rgba(9, 9, 9, .15) 100%); pointer-events: none; }
.lg-ft-in { position: relative; z-index: 2; padding: clamp(48px, 8vh, 96px) var(--pad) 0; }
.lg-ft h2 { max-width: 12em; margin: 0; font-size: clamp(34px, 5.6vw, 88px); font-weight: 400; line-height: 1.04; letter-spacing: -.03em; }
.lg-ft-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); margin-top: clamp(28px, 6vh, 64px); }
.lg-ft-c { grid-column: span 4; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lg-ft-c span { margin-bottom: 6px; font-size: 14px; color: rgba(255, 255, 255, .66); }
.lg-ft-c a { font-size: 17px; line-height: 1.3; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s; }
.lg-ft-c a:hover { background-size: 100% 1px; }
.lg-ft-bot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: clamp(24px, 5vh, 48px); padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .22); font-size: 14px; }
.lg-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.lg-legal a, .lg-legal button { padding: 0; border: 0; background: none; color: inherit; font: inherit; opacity: .62; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: opacity .2s; }
.lg-legal a:hover, .lg-legal button:hover { opacity: 1; }
.lg-legal span { opacity: .9; }
.lg-langs { display: flex; gap: 18px; }
.lg-langs a { color: inherit; opacity: .62; text-decoration: none; transition: opacity .2s; }
.lg-langs a:hover, .lg-langs a[aria-current] { opacity: 1; }
.lg-ft-word { position: relative; z-index: 2; margin-top: clamp(16px, 4vh, 40px); padding: 0 var(--pad); overflow: hidden; white-space: nowrap; font-size: 15.9vw; line-height: .8; letter-spacing: -.025em; font-weight: 400; color: transparent; background: linear-gradient(180deg, #fff 22%, rgba(255, 255, 255, .62) 62%, rgba(255, 255, 255, .14) 100%); -webkit-background-clip: text; background-clip: text; pointer-events: none; padding-top: .12em; margin-bottom: -.06em; }

/* ---------- 404 ---------- */
.nf { display: grid; min-height: calc(100svh - 72px); place-items: center; padding: 48px var(--pad); text-align: center; }
.nf-num { font-size: clamp(120px, 26vw, 320px); font-weight: 400; line-height: .9; letter-spacing: -.06em; }
.nf h1 { margin: 12px 0 0; font-size: clamp(26px, 3.6vw, 44px); font-weight: 400; line-height: 1.15; letter-spacing: -.03em; }
.nf p { max-width: 44ch; margin: 14px auto 0; color: var(--tx2); }
.nf .lg-home { margin-top: 30px; height: 52px; padding: 0 26px; font-size: 16px; }
.nf-alt { margin-top: 26px; font-size: 14px; color: var(--mu); }
.nf-alt a { margin: 0 6px; }

@media (max-width: 880px) {
  .lg-toc { display: none; }
  .lg-doc { grid-column: 1 / -1; }
  .lg-ft-c { grid-column: span 6; }
  .lg-s { grid-template-columns: 40px minmax(0, 1fr); padding: 28px 0; }
}
@media (max-width: 520px) {
  .lg-bar { height: 60px; }
  .lg-ft-c { grid-column: 1 / -1; margin-bottom: 18px; }
  .lg-ft-word { font-size: 15.2vw; }
  .lg-bar .lg-home { display: none; }
  .lg-logo { font-size: 15px; gap: 9px; }
  .lg-logo .mark { width: 22px; }
  .lg-lang a { min-width: 34px; font-size: 13px; }
  .lg-s { grid-template-columns: minmax(0, 1fr); }
  .lg-n { padding: 0 0 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
