/* Текстовые страницы: юридические документы, жалобы, 404 */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease), fill .45s, stroke .45s, box-shadow .45s !important;
}

.page-doc { background: var(--bg); }
.page-doc::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(700px 400px at 12% -5%, rgba(122, 92, 255, .14), transparent 70%), radial-gradient(600px 360px at 95% 0%, rgba(61, 139, 255, .1), transparent 70%); }
.doc-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 66px; padding: 0 max(20px, calc((100vw - 1120px) / 2));
  background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--border);
}
.doc-top-nav { display: flex; align-items: center; gap: 12px; }
.doc-wrap { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 56px; justify-content: center; max-width: 1120px; margin: 0 auto; padding: 48px 20px 80px; }
.doc-wrap:not(:has(.doc-toc)) { grid-template-columns: minmax(0, 720px); }
.doc-wide { grid-template-columns: minmax(0, 880px); }
.doc-toc { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; max-height: calc(100vh - 120px); overflow: auto; font-size: 13.5px; }
.doc-toc-title { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.doc-toc-docs { display: grid; gap: 2px; margin-top: 26px; }
.doc-toc a.on { color: var(--text); border-color: var(--accent); font-weight: 600; }
.doc-toc a { padding: 6px 12px; border-left: 2px solid var(--border); color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.doc-toc a:hover { color: var(--text); border-color: var(--accent); background: var(--surface-2); }

.doc h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -.035em; }
.doc .meta { margin: 0 0 36px; color: var(--muted); font-size: 14px; }
.doc h2 { margin: 44px 0 14px; padding-top: 8px; font-size: 22px; letter-spacing: -.02em; scroll-margin-top: 90px; }
.doc h3 { margin: 26px 0 10px; font-size: 17px; }
.doc p, .doc li { color: var(--text-2); line-height: 1.7; font-size: 15.5px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 7px; }
.doc li::marker { color: var(--accent); }
.doc a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.doc a:hover { text-decoration-color: currentColor; }
.doc strong { color: var(--text); }
.doc blockquote { margin: 18px 0; padding: 14px 18px; border-radius: var(--r-sm); border-left: 3px solid var(--accent); background: var(--surface); }
.doc blockquote p { margin: 0; }
.doc table { width: 100%; margin: 16px 0 22px; border-collapse: collapse; font-size: 14px; border-radius: var(--r-sm); overflow: hidden; }
.doc th, .doc td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--text-2); }
.doc th { background: var(--surface-2); color: var(--text); font-weight: 650; }
.doc code { font-family: var(--mono); font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); }
.doc mark.todo { padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); font-weight: 600; }
.doc hr { margin: 36px 0; border: 0; border-top: 1px solid var(--border); }
.doc .docs-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 28px; }
.doc .docs-index a { display: block; padding: 20px; border-radius: var(--r-lg); text-decoration: none; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: transform .3s var(--ease), border-color .25s, box-shadow .3s; }
.doc .docs-index a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.doc .docs-index b { display: block; margin-bottom: 4px; font-size: 16px; }
.doc .docs-index span { font-size: 13px; color: var(--muted); }

.doc-foot { padding: 32px 20px 44px; text-align: center; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.doc-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 14px; }
.doc-foot a { transition: color .2s; } .doc-foot a:hover { color: var(--text); }
.doc-foot p { margin: 0; }

/* Форма жалобы */
.report-form { display: grid; gap: 18px; margin-top: 28px; padding: 28px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--card-glow); }
.report-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.report-ok { padding: 28px; border-radius: var(--r-xl); text-align: center; background: color-mix(in srgb, var(--mint) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mint) 28%, transparent); }

/* 404 */
.nf { display: grid; justify-items: center; gap: 12px; padding: 40px 0; text-align: center; }
.nf h1 { font-size: clamp(64px, 14vw, 120px); margin: 0; line-height: 1; }

@media (max-width: 900px) {
  .doc-wrap { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .doc-toc { position: static; max-height: none; padding: 14px; border-radius: var(--r); background: var(--surface); }
  .doc-top-nav .link-muted { display: none; }
}
