/* Страницы документов: юридические тексты и документация к ПО.
   Подключается вместе с site.css (шапка, подвал и токены — оттуда). */

.doc {
  padding: 56px 0 90px;
}

.doc__wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.doc__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--grey);
  text-decoration: none;
  margin-bottom: 28px;
}
.doc__back:hover { color: var(--ink); }

/* Шапка документа: правообладатели */
.doc__owners {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
}
.doc__owner-label {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 8px;
}
.doc__owner-name {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 6px;
}
.doc__owner-meta {
  font-size: 14px;
  line-height: 1.5;
  color: #4a4a4a;
}

.doc__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.doc__meta {
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey);
  margin-bottom: 8px;
}

.doc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 40px;
}
.doc__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border-radius: 100px;
  padding: 12px 22px;
}
.doc__action:hover { background: #ecebf0; }

/* Оглавление */
.doc__toc {
  border-left: 3px solid var(--lime);
  padding: 4px 0 4px 20px;
  margin: 0 0 40px;
}
.doc__toc-title {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 12px;
}
.doc__toc ol { margin: 0; padding-left: 18px; }
.doc__toc li { margin-bottom: 6px; font-size: 15px; line-height: 1.4; }
.doc__toc a { color: var(--ink); text-decoration: none; }
.doc__toc a:hover { text-decoration: underline; }

/* Текст документа */
.doc__body {
  font-size: 16px;
  line-height: 1.65;
  color: #1c1c1c;
}
.doc__body h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  margin: 44px 0 16px;
  scroll-margin-top: 110px;
}
.doc__body h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  margin: 32px 0 12px;
  scroll-margin-top: 110px;
}
.doc__body h2:first-child, .doc__body h3:first-child { margin-top: 0; }
.doc__body p { margin: 0 0 14px; }
.doc__body ul, .doc__body ol { margin: 0 0 16px; padding-left: 26px; }
.doc__body li { margin-bottom: 6px; }
.doc__body a { color: #1f5fbf; }
.doc__body strong { font-weight: 700; }
.doc__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
}
.doc__body th, .doc__body td {
  border: 1px solid #e6e4ea;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.doc__body th { background: #fafafa; font-weight: 700; }
.doc__body tbody tr:nth-child(even) { background: #fbfbfc; }
.doc__table-scroll { overflow-x: auto; margin-bottom: 24px; }
.doc__table-scroll table { margin-bottom: 0; }

.doc__body figure {
  margin: 26px 0 30px;
}
.doc__body figure img {
  width: 100%;
  border: 1px solid #ececf0;
  border-radius: 12px;
}
.doc__body figcaption {
  font-size: 13px;
  line-height: 1.45;
  color: var(--grey);
  margin-top: 10px;
}

.doc__body pre {
  background: var(--card);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.doc__body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.92em;
  background: var(--card);
  border-radius: 4px;
  padding: 1px 5px;
}
.doc__body pre code { background: none; padding: 0; }

.doc__note {
  background: #fff8e6;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 24px;
}

.doc__updated {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid #ececf0;
  font-size: 14px;
  color: var(--grey);
}

@media (max-width: 720px) {
  .doc { padding: 32px 0 60px; }
  .doc__title { font-size: 27px; }
  .doc__owners { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .doc__body { font-size: 15px; }
  .doc__body h2 { font-size: 21px; }
}

@media print {
  .site-header, .site-footer, .doc__back, .doc__actions, .nav-toggle { display: none !important; }
  body { font-size: 11pt; }
  .doc { padding: 0; }
  .doc__wrap { max-width: none; padding: 0; }
  .doc__owners { background: none; border: 1px solid #ccc; break-inside: avoid; }
  .doc__body h2, .doc__body h3 { break-after: avoid; }
  .doc__body figure, .doc__body table { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
