/* Документы кабинета и 404 (макет «Кабинет - документы») */
.lg { padding-bottom: clamp(48px, 6vw, 88px); }
.lg-head { padding: clamp(24px, 3.5vw, 40px) 0 22px; border-bottom: 4px solid var(--ink); display: flex; flex-direction: column; gap: 10px; }
.lg-back { align-self: flex-start; font-size: 14px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.lg-h1 { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.lg-ed { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.lg-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px 64px; padding-top: 24px; align-items: start; }
.lg-nav { position: sticky; top: 20px; border-top: 4px solid var(--ink); padding-top: 10px; display: flex; flex-direction: column; font-size: 14px; }
.lg-nav-h { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 6px; }
.lg-nav a, .lg-toc a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px; padding: 8px 0; border-top: 1px solid var(--rule); line-height: 1.35; }
.lg-nav a span:first-child, .lg-toc a span:first-child { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lg-toc { display: none; }
.lg-doc { min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 36px; font-family: var(--serif); }
.lg-doc .legal-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 20px; }
.lg-doc h2 { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: clamp(23px, 2.2vw, 28px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.lg-doc h2 .lg-n { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--signal); }
.lg-doc h3 { margin: 8px 0 0; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.lg-doc p { margin: 0; font-size: 18px; line-height: 1.6; color: #222; text-wrap: pretty; }
.lg-doc a { text-decoration: underline; text-underline-offset: 3px; }
.lg-doc ul, .lg-doc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lg-doc li { position: relative; padding-left: 18px; font-size: 18px; line-height: 1.55; color: #222; }
.lg-doc li::before { content: ''; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; background: var(--ink); }
.lg-doc li ul { margin-top: 10px; }
.lg-doc li li::before { background: var(--paper); border: 1.5px solid var(--ink); }
.lg-table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.lg-doc .legal-table { width: 100%; min-width: 520px; border-collapse: collapse; font-family: var(--sans); font-size: 15px; line-height: 1.45; }
.lg-doc .legal-table th { text-align: left; vertical-align: bottom; padding: 10px 16px 8px 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.lg-doc .legal-table td { padding: 10px 16px 10px 0; vertical-align: top; border-top: 1px solid var(--rule); }
.lg-doc .legal-table td:first-child { font-weight: 600; }
.lg-doc .legal-table tr:first-child td { border-top: 0; }
@media (max-width: 899px) {
  .lg-body { grid-template-columns: minmax(0, 1fr); }
  .lg-nav { display: none !important; }
  .lg-toc:not([hidden]) { display: block; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .lg-toc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; font-size: 15px; font-weight: 600; cursor: pointer; }
  .lg-toc summary::-webkit-details-marker { display: none; }
  .lg-toc summary::after { content: '▾'; }
  .lg-toc[open] summary::after { content: '▴'; }
  .lg-toc ol { list-style: none; margin: 0; padding: 0 0 10px; }
  .lg-toc a { min-height: 44px; align-items: center; font-size: 15px; padding: 0; }
}
/* 404 */
.nf { padding-top: clamp(40px, 8vw, 112px); padding-bottom: clamp(40px, 8vw, 112px); display: flex; flex-direction: column; gap: 18px; max-width: calc(640px + 2 * var(--gutter)); margin-left: max(0px, calc((100% - var(--wrap)) / 2)); }
.nf-code { font-family: var(--mono); font-size: 14px; color: var(--signal); }
.nf-h1 { margin: 0; font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.nf-text { margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--body); padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.nf-btn { align-self: flex-start; min-height: 52px; padding: 0 26px; font-size: 16px; }
