/* Выбранная пара: Р05 «Закладка» и П08 «Ромб». */
body.aw-light.aw-soft {
  --noir-heading-ink: #292931;
  --noir-heading-muted: #858590;
  --noir-heading-size: 34px;
  --noir-subheading-size: 26px;
  --noir-heading-ribbon-width: 42px;
  --noir-heading-gap: 23px;
}

/* Нумерация начинается заново в каждом самостоятельном сообщении. */
body.aw-light.aw-soft .bbWrapper { counter-reset: noir-section; }

body.aw-light.aw-soft .bbWrapper h2.bbHeading.aw-sectionHeading {
  counter-increment: noir-section;
  position: relative;
  display: grid;
  grid-template-columns: var(--noir-heading-ribbon-width) minmax(0, 1fr);
  align-items: center;
  gap: var(--noir-heading-gap);
  box-sizing: border-box;
  max-width: 100%;
  min-height: 127px;
  margin: 42px 0 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--noir-heading-ink);
  font: 650 var(--noir-heading-size)/1.22 var(--ns-font);
  font-weight: 650 !important;
  letter-spacing: -.035em;
  text-transform: none;
  overflow-wrap: anywhere;
}

body.aw-light.aw-soft .bbWrapper h2.bbHeading.aw-sectionHeading::before {
  content: 'NOIR';
  position: static;
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--noir-heading-ribbon-width);
  height: auto;
  min-height: 127px;
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-radius: 14px 14px 5px 14px;
  outline: none;
  transform: none;
  background: var(--noir-heading-ink);
  box-shadow: 4px 4px 0 #e7e7ed;
  color: #fff;
  font: 600 11px/1 var(--ns-font);
  letter-spacing: .22em;
  writing-mode: vertical-rl;
}

body.aw-light.aw-soft .bbWrapper h2.bbHeading.aw-sectionHeading > span {
  display: block;
  min-width: 0;
  padding: 17px 0;
}

body.aw-light.aw-soft .bbWrapper h2.bbHeading.aw-sectionHeading > span::before {
  content: counter(noir-section, decimal-leading-zero) ' / РАЗДЕЛ';
  display: block;
  margin-bottom: 14px;
  color: var(--noir-heading-muted);
  font: 600 10px/1.4 var(--ns-font);
  letter-spacing: .16em;
}

body.aw-light.aw-soft .bbWrapper h3.bbHeading.aw-subHeading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  box-sizing: border-box;
  max-width: 100%;
  margin: 30px 0 22px;
  padding: 9px 4px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--noir-heading-ink);
  font: 650 var(--noir-subheading-size)/1.3 var(--ns-font);
  font-weight: 650 !important;
  letter-spacing: -.025em;
  text-transform: none;
  overflow-wrap: anywhere;
}

/* Стрелка повёрнута обратно внутри SVG, чтобы наклонялся только ромб. */
body.aw-light.aw-soft .bbWrapper h3.bbHeading.aw-subHeading::before {
  content: '';
  position: static;
  display: block;
  flex: 0 0 31px;
  align-self: center;
  box-sizing: border-box;
  width: 31px;
  height: 31px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  outline: none;
  transform: rotate(45deg);
  background: var(--noir-heading-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-45 12 12)'%3E%3Cpath d='M7 5v9a3 3 0 0 0 3 3h8m-4-4 4 4-4 4'/%3E%3C/g%3E%3C/svg%3E") center/18px no-repeat;
  box-shadow: 3px 3px 0 #e1e1e9;
}

body.aw-light.aw-soft .bbWrapper h3.bbHeading.aw-subHeading > span {
  flex: 0 1 auto;
  min-width: 0;
}

body.aw-light.aw-soft .bbWrapper :is(h2.aw-sectionHeading, h3.aw-subHeading)::after,
body.aw-light.aw-soft .bbWrapper :is(h2.aw-sectionHeading, h3.aw-subHeading) > span::after {
  content: none;
  display: none;
}

body.aw-light.aw-soft .bbWrapper h2.aw-sectionHeading:first-child { margin-top: 24px; }
body.aw-light.aw-soft .bbWrapper h3.aw-subHeading:first-child { margin-top: 4px; }
/* Запас учитывает верхнюю навигацию при переходе к вложенному якорю. */
body.aw-light.aw-soft .bbWrapper :is(h2.aw-sectionHeading, h3.aw-subHeading) .u-anchorTarget {
  scroll-margin-top: 135px;
}

@media (max-width: 650px) {
  body.aw-light.aw-soft {
    --noir-heading-size: 26px;
    --noir-subheading-size: 23px;
    --noir-heading-ribbon-width: 33px;
    --noir-heading-gap: 18px;
  }
  body.aw-light.aw-soft .bbWrapper h2.bbHeading.aw-sectionHeading { margin: 34px 0 24px; }
  body.aw-light.aw-soft .bbWrapper h3.bbHeading.aw-subHeading { margin: 27px 0 20px; }
  body.aw-light.aw-soft .bbWrapper h2.aw-sectionHeading:first-child { margin-top: 24px; }
}
