:root {
  --navy: #0d304b;
  --navy-deep: #081f32;
  --ink: #1d2a32;
  --body: #344650;
  --muted: #667780;
  --line: #d8e0e4;
  --line-strong: #aebbc2;
  --paper: #ffffff;
  --canvas: #edf1f3;
  --soft: #f5f7f8;
  --link: #0b527b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--navy-deep);
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(13, 48, 75, 0.24);
  outline-offset: 3px;
}

.top {
  border-top: 4px solid var(--navy);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.top-inner {
  width: min(1180px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-deep);
  text-decoration: none;
}

.identity img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.identity-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}

.brand-caption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.back::before {
  content: "←";
  margin-right: 8px;
  font-size: 18px;
  font-weight: 400;
}

.back-short {
  display: none;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 44px 28px 64px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 232px) minmax(0, 790px);
  justify-content: center;
  align-items: start;
  gap: 48px;
}

.legal-layout-single {
  grid-template-columns: minmax(0, 790px);
}

.toc-desktop {
  position: sticky;
  top: 24px;
  padding-top: 14px;
  border-top: 2px solid var(--navy);
}

.toc-title {
  margin: 0 0 12px;
  color: var(--navy-deep);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list li {
  border-bottom: 1px solid rgba(174, 187, 194, 0.55);
}

.toc-list a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  padding: 9px 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--navy);
}

.toc-number {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.toc-mobile {
  display: none;
}

.document {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 52px 60px 44px;
}

.document-header {
  padding-bottom: 30px;
  border-bottom: 2px solid var(--navy);
}

.document-type {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 700px;
  margin: 0;
  color: var(--navy-deep);
  font-size: clamp(34px, 4vw, 40px);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.document-meta {
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.document-meta > div {
  min-width: 0;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
}

.document-meta > div:nth-child(even) {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.document-meta dt {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.document-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.document-section {
  padding: 31px 0 4px;
  scroll-margin-top: 24px;
}

.document-section + .document-section {
  margin-top: 25px;
  border-top: 1px solid var(--line);
}

.section-title {
  margin: 0 0 17px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  color: var(--navy-deep);
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.section-number {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.clause {
  margin: 0 0 13px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.clause-number {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.clause p {
  min-width: 0;
  margin: 0;
  color: var(--body);
}

.document-list {
  margin: 0 0 15px 50px;
  padding-left: 20px;
  color: var(--body);
}

.document-list li {
  margin: 6px 0;
  padding-left: 3px;
}

.requisites {
  margin: 20px 0 4px;
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--line-strong);
  overflow-x: auto;
}

.requisites table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.requisites caption {
  padding: 12px 0 9px;
  color: var(--navy-deep);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.requisites th,
.requisites td {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.requisites th {
  width: 31%;
  color: var(--navy-deep);
  background: var(--soft);
  font-weight: 700;
}

.requisites td {
  color: var(--body);
  overflow-wrap: anywhere;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

.revision-table {
  margin-top: 16px;
}

.document-note {
  margin: 20px 0 0 50px;
  padding: 14px 16px;
  border-left: 3px solid var(--navy);
  background: var(--soft);
  color: var(--body);
  font-size: 14px;
}

.document-end {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  width: min(1180px, 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer a {
  color: var(--navy);
}

@media (max-width: 900px) {
  .page {
    max-width: 830px;
    padding-top: 28px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .toc-desktop {
    display: none;
  }

  .toc-mobile {
    display: block;
    border: 1px solid var(--line);
    background: var(--paper);
  }

  .toc-mobile summary {
    min-height: 48px;
    padding: 12px 16px;
    color: var(--navy-deep);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
  }

  .toc-mobile .toc-list {
    padding: 0 16px 12px;
  }

  .toc-mobile .toc-list a {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 10px 0;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  body {
    background: var(--paper);
  }

  .top-inner {
    min-height: 68px;
    padding: 10px 16px;
    gap: 12px;
  }

  .identity {
    gap: 9px;
  }

  .identity img {
    width: 34px;
    height: 34px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-caption {
    display: none;
  }

  .back {
    min-height: 44px;
    font-size: 13px;
  }

  .back .back-long {
    display: none;
  }

  .back .back-short {
    display: inline;
  }

  .page {
    padding: 18px 0 44px;
  }

  .toc-mobile {
    margin: 0 16px;
  }

  .document {
    border-right: 0;
    border-left: 0;
    padding: 30px 18px 34px;
  }

  .document-header {
    padding-bottom: 24px;
  }

  h1 {
    font-size: 29px;
    line-height: 1.2;
  }

  .lead {
    font-size: 16px;
  }

  .document-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-meta > div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .section-title {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 5px;
    font-size: 19px;
  }

  .clause {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 5px;
  }

  .clause-number {
    font-size: 13px;
  }

  .document-list {
    margin-left: 39px;
    padding-left: 17px;
  }

  .document-note {
    margin-left: 39px;
  }

  .requisites {
    overflow: visible;
  }

  .requisites table,
  .requisites tbody,
  .requisites tr,
  .requisites th,
  .requisites td {
    display: block;
    width: 100%;
  }

  .requisites tr {
    padding: 9px 0;
    border-top: 1px solid var(--line);
  }

  .requisites th,
  .requisites td {
    padding: 2px 0;
    border: 0;
    background: transparent;
  }

  .requisites th {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.045em;
    text-transform: uppercase;
  }

  .requisites td {
    color: var(--ink);
    font-size: 14px;
  }

  .document-end {
    display: grid;
    gap: 3px;
  }

  .footer-inner {
    min-height: 0;
    padding: 22px 16px;
    display: grid;
    gap: 10px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@page {
  size: A4;
  margin: 18mm 16mm 18mm 20mm;
}

@media print {
  :root {
    --ink: #111111;
    --body: #222222;
    --muted: #4a4a4a;
    --line: #b7b7b7;
    --line-strong: #777777;
    --paper: #ffffff;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #ffffff;
    color: #111111;
    font-family: "Times New Roman", Times, serif;
    font-size: 10.5pt;
    line-height: 1.45;
    widows: 3;
    orphans: 3;
  }

  .top,
  .footer,
  .toc-mobile {
    display: none !important;
  }

  .page {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .legal-layout {
    display: block;
  }

  .toc-desktop {
    position: static;
    margin: 0 0 9mm;
    padding-top: 3mm;
    border-top: 1pt solid #111111;
    break-inside: avoid;
  }

  .toc-title {
    color: #111111;
    font-family: Arial, sans-serif;
    font-size: 8pt;
  }

  .toc-list {
    columns: 2;
    column-gap: 10mm;
  }

  .toc-list li {
    border-bottom: 0;
    break-inside: avoid;
  }

  .toc-list a {
    padding: 1.2mm 0;
    color: #111111;
    font-size: 9pt;
  }

  .document {
    border: 0;
    padding: 0;
  }

  .document-header {
    padding-bottom: 6mm;
    border-bottom: 1.2pt solid #111111;
  }

  .document-type {
    color: #333333;
    font-family: Arial, sans-serif;
    font-size: 8pt;
  }

  h1 {
    max-width: none;
    color: #111111;
    font-size: 18pt;
    letter-spacing: 0;
  }

  .lead {
    max-width: none;
    margin-top: 4mm;
    color: #222222;
    font-size: 10.5pt;
  }

  .document-meta {
    margin-top: 5mm;
  }

  .document-meta dt {
    color: #444444;
    font-family: Arial, sans-serif;
    font-size: 7.5pt;
  }

  .document-meta dd {
    color: #111111;
    font-size: 9.5pt;
  }

  .document-section {
    padding-top: 7mm;
    scroll-margin-top: 0;
  }

  .document-section + .document-section {
    margin-top: 5mm;
    border-top: 0.5pt solid #999999;
  }

  .section-title {
    margin-bottom: 3.5mm;
    grid-template-columns: 9mm minmax(0, 1fr);
    color: #111111;
    font-size: 12.5pt;
    letter-spacing: 0;
    break-after: avoid;
    page-break-after: avoid;
  }

  .clause {
    margin-bottom: 2.5mm;
    grid-template-columns: 9mm minmax(0, 1fr);
    break-inside: avoid;
  }

  .clause-number {
    color: #333333;
    font-size: 9.5pt;
  }

  .clause p,
  .document-list {
    color: #222222;
  }

  .document-list {
    margin-left: 9mm;
  }

  .requisites {
    break-inside: avoid;
  }

  .requisites table {
    font-size: 9.5pt;
  }

  .requisites caption {
    color: #111111;
    font-family: Arial, sans-serif;
    font-size: 8pt;
  }

  .requisites th {
    color: #111111;
    background: transparent;
  }

  .requisites th,
  .requisites td {
    padding: 2.2mm 2.5mm;
  }

  .document-note {
    margin-left: 9mm;
    border-left: 1.5pt solid #111111;
    background: transparent;
    color: #222222;
    font-size: 9.5pt;
  }

  .document-end {
    margin-top: 8mm;
    color: #333333;
    font-family: Arial, sans-serif;
    font-size: 8pt;
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
