:root {
  --ink: #292b2a;
  --muted: #545850;
  --line: #d9d9d2;
  --paper: #f4f3ee;
  --brand: #b30202;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
/* Перед этим файлом подключён style.css сайта: он оформляет шапку и подвал и сбрасывает отступы,
   подчёркивание и шрифт у всех элементов. Оформление статьи задано внутри main. */
body.guide-page { margin: 0; background: #fff; }
.guide-page main { color: var(--ink); font: 16px/1.55 "Open Sans", Arial, sans-serif; }
img { display: block; max-width: 100%; }
:where(.guide-page main) a { color: var(--brand); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
:where(.guide-page main) a:hover { text-decoration-thickness: 2px; }
:where(.guide-page main) a:focus-visible { outline: 3px solid #a22617; outline-offset: 4px; border-radius: 2px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; z-index: 10; top: 0; left: 1rem; translate: 0 -160%; padding: .6rem 1rem; background: white; }
.skip:focus { translate: 0 .4rem; }
.crumbs a, .contents a { color: inherit; text-decoration: none; }
.crumbs a:hover, .contents a:hover { text-decoration: underline; }
.crumbs { padding-block: 24px; font-size: .9rem; color: var(--muted); }
.crumbs ol, .contents ul, .related ul { list-style: none; padding: 0; margin: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs li + li::before { content: "/"; margin-inline-end: 10px; color: #8e918a; }
.lead { display: grid; grid-template-columns: 1.55fr 1fr; background: var(--paper); }
.lead-copy { align-self: center; padding: clamp(24px,4vw,56px); }
.lead > img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.lead > img.lead-drawing { object-fit: contain; background: #e9e6df; }
:where(.guide-page main) :where(h1, h2, h3, p, ul, dl, dd) { margin: 0; }
:where(.guide-page main) :is(h1, h2, h3) { font-weight: 700; line-height: 1.13; }
:where(.guide-page main) h1 { font-size: clamp(2.2rem,4.2vw,3.9rem); letter-spacing: -.047em; }
.lead-copy p { margin-top: 1.25rem; font-size: clamp(1.05rem,1.6vw,1.29rem); line-height: 1.5; }
.guide-layout { display: grid; grid-template-columns: minmax(190px,.36fr) minmax(0,1fr); gap: clamp(32px,6vw,88px); margin-block: clamp(36px,6vw,80px); }
.contents { align-self: start; position: sticky; top: 20px; border-top: 3px solid var(--brand); padding-top: 16px; max-width: 250px; }
.contents p { font-weight: 700; margin-bottom: 12px; }
.contents li + li { margin-top: 12px; }
.contents a { display: inline-block; font-size: .97rem; line-height: 1.4; color: var(--muted); }
.guide-body { max-width: 760px; font-size: clamp(1.04rem,1.5vw,1.18rem); overflow-wrap: break-word; }
.guide-body section { scroll-margin-top: 24px; }
.guide-body section + section { margin-top: clamp(32px,5vw,60px); }
:where(.guide-page main) h2 { font-size: clamp(1.7rem,3vw,2.55rem); letter-spacing: -.035em; text-wrap: balance; }
.guide-body h2 + *, .guide-body p + p, .guide-body dl + p { margin-top: 1.1rem; }
.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: minmax(130px,.46fr) minmax(0,1fr); gap: 25px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.reference { color: var(--muted); }
.example { background: var(--paper); border-inline-start: 4px solid var(--brand); padding: clamp(18px,3vw,30px); margin-top: 22px; }
.example h3 { font-size: 1.13em; margin-bottom: 8px; }
.related { border-top: 2px solid var(--brand); padding-top: 22px; }
.related ul { margin-top: 16px; }
.related li { border-bottom: 1px solid var(--line); }
.related li a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 0; color: var(--ink); font-weight: 650; text-decoration: none; }
.related li a::after { content: "→"; color: var(--brand); }
.related li a:hover { color: var(--brand); text-decoration: underline; }
/* Шапка сайта без обложки: тёмный фон под белые иконки, на компьютере — отступ под фиксированную шапку */
.nav-wrapper-mobile.nav-wrapper-plain { min-height: 0; padding-block: 10px; background: #2a2b2a; }
@media (min-width: 1025px) {
  .guide-page main { padding-top: 107px; }
  .contents { top: 127px; }
  .guide-body section { scroll-margin-top: 130px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .crumbs { padding-block: 16px; }
  .lead { grid-template-columns: 1fr; }
  .lead > img { height: clamp(124px,32vw,200px); }
  .guide-layout { display: block; }
  .contents { position: static; max-width: none; border-top: 0; padding: 0 0 24px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
  .contents li + li { margin-top: 8px; }
  .contents a { text-decoration: underline; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 32px); }
  .lead-copy { padding: 23px 18px; }
  :where(.guide-page main) h1 { font-size: 2rem; }
  .facts > div { display: block; }
  .facts dd { margin-top: 5px; }
}
@media print {
  nav, .skip, .footer, .primary-header, .related { display: none; }
  .wrap { width: 100%; }
  .lead, .guide-layout { display: block; }
  .lead-copy { padding: 0; }
  .lead > img { display: none; }
  .guide-body { max-width: none; }
  h2, h3 { break-after: avoid; }
}
