.doc-content {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 15px;
  line-height: 1.72;
  color: #222;
  text-rendering: optimizeLegibility;
  hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
}

.doc-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.85rem;
  line-height: 1.38;
  text-wrap: balance;
}

.doc-meta {
  text-align: center;
  font-size: 0.95rem;
  color: #5c5c5c;
  margin: 0 0 1.75rem;
  font-style: italic;
  line-height: 1.55;
}

.doc-meta-city,
.doc-meta-revision {
  display: block;
}

.doc-preamble {
  margin-bottom: 1.75rem;
  padding-bottom: 0.25rem;
}

.doc-paragraph,
.doc-clause-body {
  margin: 0 0 0.9rem;
  text-align: justify;
  text-align-last: left;
  text-indent: 1.5em;
}

.doc-preamble .doc-paragraph:first-child,
.doc-clause-body:first-child,
.doc-paragraph.doc-intro:first-child {
  text-indent: 0;
}

.doc-paragraph.doc-intro:last-child,
.doc-preamble .doc-paragraph:last-child {
  margin-bottom: 0;
}

.doc-preamble .doc-paragraph + .doc-paragraph {
  text-indent: 1.5em;
  margin-top: 0.65rem;
}

.doc-section {
  margin-bottom: 1.75rem;
}

.doc-section-title {
  font-size: 1.06rem;
  font-weight: 700;
  margin: 1.5rem 0 0.85rem;
  color: #1a1a1a;
  border-bottom: 1px solid #d4cfc4;
  padding-bottom: 0.4rem;
  text-align: left;
}

.doc-clause {
  margin-bottom: 1rem;
  padding-left: 0.15rem;
}

mark.doc-emphasis,
.doc-emphasis {
  background: rgba(14, 90, 67, 0.16);
  color: #0a4634;
  padding: 0.12em 0.32em;
  border-radius: 0.25em;
  font-weight: 600;
  line-height: 1.55;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.doc-clause-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  text-align: left;
  line-height: 1.45;
}

.doc-clause-body {
  text-indent: 0;
  padding-left: 1.25rem;
}

.doc-clause-body + .doc-var-list {
  margin-top: -0.15rem;
}

.doc-var-list {
  margin: 0.35rem 0 0.9rem 0;
  padding: 0.65rem 0 0.65rem 1.1rem;
  list-style: none;
  border-left: 3px solid rgba(14, 90, 67, 0.18);
  background: rgba(14, 90, 67, 0.03);
  border-radius: 0 8px 8px 0;
}

.doc-var-list li {
  margin: 0 0 0.45rem;
  padding-left: 0.35rem;
  text-align: justify;
  text-align-last: left;
  line-height: 1.62;
}

.doc-var-list li:last-child {
  margin-bottom: 0;
}

.doc-var-intro {
  text-indent: 0;
  padding-left: 1.25rem;
}

.doc-requisites {
  margin: 0.75rem 0 0;
}

.doc-req-row {
  display: grid;
  grid-template-columns: minmax(150px, 32%) 1fr;
  gap: 0.5rem 1.25rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(212, 207, 196, 0.65);
  align-items: start;
}

.doc-req-row:last-of-type {
  border-bottom: none;
}

.doc-req-row dt {
  margin: 0;
  font-weight: 700;
  color: #333;
  text-align: left;
}

.doc-req-row dd {
  margin: 0;
  text-align: left;
  line-height: 1.55;
}

.doc-req-sign {
  margin-top: 1.35rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #d4cfc4;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
}

.doc-req-sign-block {
  margin-top: 1.35rem;
  padding-top: 0.35rem;
}

.doc-req-sign-block .doc-req-sign {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.doc-sign-field {
  display: inline;
  white-space: nowrap;
}

.doc-sign-line-wrap {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
}

.doc-sign-line {
  display: inline;
  letter-spacing: 0.06em;
  color: #333;
}

.doc-sign-name {
  display: inline;
  white-space: nowrap;
}

.doc-signature {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: 12rem;
  height: auto;
  opacity: 0.95;
  pointer-events: none;
  transform: translate(-62%, 35%);
  mix-blend-mode: multiply;
}

.doc-stamp {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 10.5rem;
  height: auto;
  opacity: 0.92;
  pointer-events: none;
  transform: translate(-42%, 25%) rotate(-8deg);
  mix-blend-mode: multiply;
}

.doc-math-display {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 0.5rem;
  overflow-x: auto;
  text-align: center;
}

.doc-math-inline {
  white-space: nowrap;
}

.doc-clause-body .katex,
.doc-paragraph .katex,
.doc-var-list .katex {
  font-size: 1.02em;
}

@media (max-width: 640px) {
  .doc-paragraph,
  .doc-clause-body {
    text-indent: 1em;
  }

  .doc-clause-body,
  .doc-var-intro {
    padding-left: 0.75rem;
  }

  .doc-req-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .doc-signature {
    width: 10rem;
  }

  .doc-stamp {
    width: 9rem;
  }
}
