/*
 * Документы FORMA WIN: одно белое окно для всех пяти документов.
 *
 * Интервалы, размеры и цвета взяты из макета legal-documents-v94.css.
 * Мобильная раскладка базовая, боковое содержание подключается с 700px.
 */

html body.fw36 .fw-lg-shade {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: rgba(8, 7, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color-scheme: light;
}

html body.fw36 .fw-lg-shade[hidden] {
  display: none;
}

html body.fw36 .fw-lg-modal {
  position: relative;
  width: 100%;
  max-width: 1080px;
  height: min(920px, calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom))));
  max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  color: #292633;
  color-scheme: light;
  font-family: ManropeFW, Manrope, sans-serif;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.33);
}

html body.fw36 .fw-lg-modal:focus {
  outline: none;
}

html body.fw36 .fw-lg-x {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f3f1f8;
  color: #615b70;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

html body.fw36 .fw-lg-x:hover {
  background: #ebe7f4;
  color: #4a4357;
}

html body.fw36 .fw-lg-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
}

html body.fw36 .fw-lg-head {
  padding: 24px 22px 16px;
}

html body.fw36 .fw-lg-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 46px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
  color: #292633;
}

html body.fw36 .fw-lg-brand > b {
  color: #6b4eff;
  font-weight: 800;
}

html body.fw36 .fw-lg-brand > span {
  margin-left: 9px;
  padding-left: 13px;
  border-left: 1px solid #dedbe6;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: #706a7e;
}

html body.fw36 .fw-lg-modal h2 {
  margin: 20px 0 12px;
  max-width: 95%;
  font-size: 27px;
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: #292633;
}

html body.fw36 .fw-lg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b6578;
}

html body.fw36 .fw-lg-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 16px;
}

html body.fw36 .fw-lg-switch {
  position: relative;
  display: block;
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
}

html body.fw36 .fw-lg-switch select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 42px 10px 13px;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f4f2f8 !important;
  color: #423b51 !important;
  color-scheme: light;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

html body.fw36 .fw-lg-switch svg {
  position: absolute;
  top: 12px;
  right: 13px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  fill: none;
  stroke: #80768f;
  stroke-width: 1.7;
}

html body.fw36 .fw-lg-toc-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #6b4eff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

html body.fw36 .fw-lg-toc-toggle svg,
html body.fw36 .fw-lg-download svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

html body.fw36 .fw-lg-current {
  margin-left: auto;
  color: #81798d;
  font-size: 12px;
}

html body.fw36 .fw-lg-layout {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid #eeecf2;
}

html body.fw36 .fw-lg-toc {
  display: none;
  flex: none;
  max-height: min(42dvh, 320px);
  padding: 10px 13px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f9f8fc;
}

html body.fw36 .fw-lg-toc.is-open {
  display: block;
}

html body.fw36 .fw-lg-toc-label {
  display: none;
}

html body.fw36 .fw-lg-toc button {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 12px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #655e73;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

html body.fw36 .fw-lg-toc button > span:first-child {
  min-width: 20px;
  color: #9a90aa;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 21px;
}

html body.fw36 .fw-lg-toc button[aria-current] {
  background: #efebfb;
  color: #6043e8;
  font-weight: 650;
}

html body.fw36 .fw-lg-toc button[aria-current] > span:first-child {
  color: #6b4eff;
}

html body.fw36 .fw-lg-reader {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 24px 22px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-top: 22px;
  scrollbar-width: thin;
  scrollbar-color: #d8d3e3 transparent;
}

html body.fw36 .fw-lg-reader:focus {
  outline: none;
}

html body.fw36 .fw-lg-reader:focus-visible {
  outline: 2px solid #9c8be9;
  outline-offset: -3px;
}

html body.fw36 .fw-lg-intro {
  padding-bottom: 25px;
  border-bottom: 1px solid #eeecf2;
}

html body.fw36 .fw-lg-intro > span {
  display: block;
  margin-bottom: 10px;
  color: #7b708b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html body.fw36 .fw-lg-intro p {
  margin: 0;
  color: #514a5e;
  font-size: 16px;
  line-height: 1.75;
}

html body.fw36 .fw-lg-section {
  padding-top: 29px;
}

html body.fw36 .fw-lg-section h3 {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 0 0 18px;
  color: #292633;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  scroll-margin-top: 24px;
}

html body.fw36 .fw-lg-section h3 > span {
  flex: none;
  color: #998ab9;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
}

html body.fw36 .fw-lg-section p,
html body.fw36 .fw-lg-section li {
  margin: 0 0 17px;
  color: #494353;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

html body.fw36 .fw-lg-section ul {
  margin: 0;
  padding-left: 22px;
}

html body.fw36 .fw-lg-section li::marker {
  color: #8b74dc;
}

html body.fw36 .fw-lg-section a {
  color: #6545df;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

html body.fw36 .fw-lg-related {
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid #eeecf2;
}

html body.fw36 .fw-lg-related strong {
  display: block;
  margin-bottom: 12px;
  color: #322c40;
  font-size: 17px;
}

html body.fw36 .fw-lg-related button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: #6b4eff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

html body.fw36 .fw-lg-related button > span,
html body.fw36 .fw-lg-related button > .fw-arrow-ne,
html body.fw36 .fw-lg-support > .fw-arrow-ne {
  flex: none;
}

html body.fw36 .fw-lg-related button > .fw-arrow-ne,
html body.fw36 .fw-lg-support > .fw-arrow-ne {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

html body.fw36 .fw-lg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #eeecf2;
  background: #fff !important;
}

html body.fw36 .fw-lg-download,
html body.fw36 .fw-lg-back,
html body.fw36 .fw-lg-support {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  background: none !important;
  color: #655c76;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

html body.fw36 .fw-lg-support {
  color: #6b4eff;
  white-space: nowrap;
}

html body.fw36 .fw-lg-back {
  max-width: 70%;
  color: #6b4eff;
  text-align: left;
}

html body.fw36 .fw-lg-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  height: 100%;
  padding: 24px 22px;
  text-align: left;
}

html body.fw36 .fw-lg-state p {
  margin: 0;
  color: #514a5e;
  font-size: 16px;
  line-height: 1.7;
}

html body.fw36 .fw-lg-state strong {
  color: #292633;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}

html body.fw36 .fw-lg-retry {
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: #6b4eff;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

html body.fw36 .fw-lg-retry:hover {
  background: #5a3cf0;
}

html body.fw36 .fw-lg-modal button:focus-visible,
html body.fw36 .fw-lg-modal a:focus-visible,
html body.fw36 .fw-lg-modal select:focus-visible,
html body.fw36 .fw-lg-section h3:focus-visible {
  outline: 2px solid #8d73ed;
  outline-offset: 2px;
}

html body.fw36 .fw-lg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 700px) {
  html body.fw36 .fw-lg-shade {
    padding: 24px;
  }

  html body.fw36 .fw-lg-modal {
    height: min(850px, calc(100dvh - 48px));
    max-height: calc(100dvh - 48px);
    border-radius: 28px;
  }

  html body.fw36 .fw-lg-x {
    top: 22px;
    right: 22px;
  }

  html body.fw36 .fw-lg-head {
    padding: 32px 36px 20px;
  }

  html body.fw36 .fw-lg-modal h2 {
    max-width: calc(100% - 44px);
    margin: 20px 0 14px;
    font-size: 34px;
  }

  html body.fw36 .fw-lg-meta {
    gap: 18px;
    font-size: 13px;
  }

  html body.fw36 .fw-lg-tools {
    padding: 0 36px 22px;
  }

  html body.fw36 .fw-lg-switch {
    flex: 0 1 340px;
  }

  html body.fw36 .fw-lg-toc-toggle {
    display: none;
  }

  html body.fw36 .fw-lg-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
  }

  html body.fw36 .fw-lg-toc,
  html body.fw36 .fw-lg-toc.is-open {
    display: block;
    max-height: none;
    min-height: 0;
    padding: 24px 14px 28px 20px;
    border-right: 1px solid #eeecf2;
    background: #fcfbfe;
  }

  html body.fw36 .fw-lg-toc-label {
    display: block;
    padding: 0 10px 14px;
    color: #8c819b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  html body.fw36 .fw-lg-toc button {
    gap: 9px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.45;
  }

  html body.fw36 .fw-lg-reader {
    padding: 30px 36px 40px;
  }

  html body.fw36 .fw-lg-section {
    padding-top: 32px;
  }

  html body.fw36 .fw-lg-section h3 {
    font-size: 23px;
  }

  html body.fw36 .fw-lg-section p,
  html body.fw36 .fw-lg-section li {
    font-size: 17px;
    line-height: 1.8;
  }

  html body.fw36 .fw-lg-intro p {
    font-size: 17px;
  }

  html body.fw36 .fw-lg-foot {
    padding: 12px 36px;
  }

  html body.fw36 .fw-lg-download,
  html body.fw36 .fw-lg-back,
  html body.fw36 .fw-lg-support {
    font-size: 14px;
  }
}

/* Короткий ландшафт: шапка поджимается, но текст и кнопки остаются доступны. */
@media (max-height: 550px) {
  html body.fw36 .fw-lg-head {
    padding-top: 16px;
    padding-bottom: 10px;
  }

  html body.fw36 .fw-lg-modal h2 {
    margin: 12px 42px 7px 0;
    font-size: 23px;
  }

  html body.fw36 .fw-lg-brand,
  html body.fw36 .fw-lg-brand > span {
    font-size: 10px;
  }

  html body.fw36 .fw-lg-tools {
    flex-wrap: nowrap;
    gap: 4px;
    padding-bottom: 8px;
  }

  html body.fw36 .fw-lg-switch {
    flex: 1;
  }

  html body.fw36 .fw-lg-toc-toggle {
    width: auto;
  }

  html body.fw36 .fw-lg-current,
  html body.fw36 .fw-lg-toc-toggle svg {
    display: none;
  }

  html body.fw36 .fw-lg-foot {
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.fw36 .fw-lg-shade {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
