/* Whitepaper: экран и печать в PDF */
.wp { max-width: 1180px; margin: 0 auto; padding: 32px var(--gutter) 96px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 28px; position: relative; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc) '.'; position: absolute; inset-inline-start: 0; color: #5a6c94; font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.on { color: var(--moon); }
.toc a.on::before { color: var(--amber); }
.wp-doc { max-width: 760px; }
.cover { padding: 28px 0 36px; border-bottom: 1px solid var(--line); }
.cover .tk { font: 700 15px var(--display); color: var(--amber); letter-spacing: .04em; }
.cover h1 { margin-top: 12px; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; }
.cover .sub { margin-top: 14px; font-size: 19px; color: #C9D4EA; max-width: 46ch; }
.cover .meta { margin-top: 18px; color: var(--muted); font-size: 14px; }
.notice { margin-top: 22px; padding: 14px 16px; border-radius: 14px; border: 1px dashed rgba(242, 165, 65, .6); background: rgba(242, 165, 65, .07);
  color: #F5D3A3; font-size: 14px; line-height: 1.55; }
.wp-doc section { padding-top: 40px; scroll-margin-top: 84px; }
.wp-doc h2 { font: 600 24px/1.25 var(--text); letter-spacing: 0; max-width: none; }
.wp-doc h2 .n { color: var(--amber); margin-inline-end: 10px; font-variant-numeric: tabular-nums; }
.wp-doc h3 { margin-top: 22px; font: 600 17px/1.35 var(--text); }
.wp-doc p, .wp-doc li { color: #C9D4EA; line-height: 1.7; }
.wp-doc p { margin-top: 12px; }
.wp-doc ul, .wp-doc ol { margin: 12px 0 0; padding-inline-start: 22px; }
.wp-doc li { margin-top: 6px; }
.wp-doc li b, .wp-doc p b { color: var(--moon); }
.wp-doc a { color: var(--cyan); }
.wp-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.wp-table th { text-align: start; font-weight: 500; color: var(--muted); font-size: 13px; padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
.wp-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: #C9D4EA; }
.wp-table td.num { text-align: end; font-variant-numeric: tabular-nums; color: var(--moon); font-weight: 600; white-space: nowrap; }
.wp-table .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-end: 8px; vertical-align: -1px; }
.kv { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kv > div { padding: 12px 14px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line); }
.kv dt { font-size: 12.5px; color: var(--muted); }
.kv dd { margin: 4px 0 0; font-weight: 600; color: var(--moon); }

@media (max-width: 900px) {
  .wp { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
  .kv { grid-template-columns: 1fr 1fr; }
  #joinBtn { display: none; }
}

/* Печать / сохранение в PDF: светлая страница, без навигации */
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .top, .toc { display: none !important; }
  .wp { display: block; padding: 0; max-width: none; }
  .wp-doc { max-width: none; }
  .wp-doc p, .wp-doc li, .wp-table td, .cover .sub { color: #222; }
  .wp-doc li b, .wp-doc p b, .wp-table td.num, .kv dd, .cover h1, .wp-doc h2, .wp-doc h3 { color: #000; }
  .cover { border-color: #ccc; page-break-after: always; padding-top: 60mm; }
  .cover .tk, .wp-doc h2 .n { color: #B8701A; }
  .notice { color: #5a3d00; background: #fff6e8; border-color: #e0a85a; }
  .wp-doc section { page-break-inside: auto; padding-top: 18pt; }
  .wp-doc h2, .wp-doc h3 { page-break-after: avoid; }
  .wp-table th, .wp-table td { border-color: #ddd; color: #222; }
  .kv > div { background: #fafafa; border-color: #ddd; }
  .wp-doc a { color: #1a4fa8; text-decoration: none; }
}

.wp-doc { min-width: 0; }
.wp-table { display: block; overflow-x: auto; }
.wp-table tbody, .wp-table thead { display: table; width: 100%; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; } .wp-table { font-size: 14px; } }
