/* Базовый слой: структура и поведение. Цвета, шрифты и композиция задаются темой theme-vN.css */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(17px, 15.4px + 0.11vw, 20px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; padding-inline: var(--gut); }


a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-h); }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.95rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin-top: 0; }
h3 { font-size: 1.18rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

ul, ol { padding-left: 1.1em; }
li { margin-bottom: .4em; }
svg { flex: none; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border: 1px solid transparent; border-radius: var(--r-ctl);
  font: inherit; font-weight: 600; font-size: .97rem; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-h); color: var(--on-accent); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Выезжающая стрелка: двигаем только transform и opacity, без перекомпоновки */
.btn--expand { padding-right: 40px; }
.btn__label { display: inline-block; transition: transform .22s cubic-bezier(.16, 1, .3, 1); }
.btn__ic {
  position: absolute; right: 16px; display: inline-flex; opacity: 0;
  transform: translateX(-8px);
  transition: opacity .22s ease, transform .22s cubic-bezier(.16, 1, .3, 1);
}
.btn__ic svg { width: 17px; height: 17px; }
.btn--expand:hover .btn__label, .btn--expand:focus-visible .btn__label { transform: translateX(-7px); }
.btn--expand:hover .btn__ic, .btn--expand:focus-visible .btn__ic { opacity: 1; transform: translateX(0); }

/* ---------- Хедер ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--hdr-bg); border-bottom: 1px solid var(--hdr-line); }
.hdr__in { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; color: var(--hdr-ink); text-decoration: none; white-space: nowrap; }
.logo__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-mark); background: var(--accent); color: var(--on-accent); }
.logo__mark svg { width: 18px; height: 18px; }
.logo i { font-style: normal; }
.logo em { font-style: normal; font-weight: 400; color: var(--hdr-dim); }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--hdr-dim); text-decoration: none; font-size: .94rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--hdr-active); }
.burger { display: none; margin-left: auto; width: 42px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.burger svg { width: 18px; height: 18px; }
/* Меню живёт внутри залипшей шапки, иначе на прокрученной странице оно раскрывалось
   вверху документа — вне экрана. Высоту ограничиваем: пунктов больше, чем экрана. */
.mnav { display: none; border-top: 1px solid var(--line); background: var(--surface); max-height: calc(100vh - 62px); max-height: calc(100dvh - 62px); overflow-y: auto; overscroll-behavior: contain; }
.mnav.open { display: block; }
.mnav ul { list-style: none; margin: 0; padding: 8px 0; }
.mnav li { margin: 0; }
.mnav a { display: block; padding: 11px 20px; color: var(--ink); text-decoration: none; }
/* Логотип и меню требуют 726 px (после того, как процедурные страницы ушли в подвал):
   на планшете меню помещается, ниже — бургер. */
@media (max-width: 940px) { .nav { display: none; } .burger { display: inline-flex; } }

/* ---------- Первый экран ---------- */
.hero { position: relative; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-block: 52px 56px; }
.hero__main h1 { margin-bottom: .35em; }
.hero .lead { font-size: 1.1rem; color: var(--dim); margin-bottom: 24px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.hero__hint { font-size: .88rem; color: var(--dim); }

/* Поиск по вопросам */
.hsearch { position: relative; }
.hsearch label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hsearch__row { display: flex; gap: 10px; align-items: stretch; }
.hsearch__field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.hsearch__field svg { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--dim); pointer-events: none; }
.hsearch input {
  width: 100%; padding: 15px 16px 15px 44px; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-line);
  border-radius: var(--r-ctl);
}
.hsearch input::placeholder { color: var(--dim); }
.hsearch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hsearch__res {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 380px; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-block); box-shadow: var(--shadow-lg);
}
.hsearch__res[hidden] { display: none; }
.hsearch__res a { display: block; padding: 12px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.hsearch__res a:last-child { border-bottom: 0; }
.hsearch__res a:hover, .hsearch__res a.is-active { background: var(--accent-soft); }
.hsearch__res b { display: block; font-weight: 600; font-size: .96rem; line-height: 1.35; }
.hsearch__res span { display: block; margin-top: 3px; font-size: .84rem; color: var(--dim); }
.hsearch__res mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }
.hsearch__none { padding: 16px; color: var(--dim); font-size: .93rem; }

/* Плитки разделов */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 8px; text-align: center; text-decoration: none; color: var(--tile-ink); border-radius: var(--r-block); transition: transform .15s ease, background-color .15s ease; }
.tile:hover { color: var(--tile-ink); transform: translateY(-2px); }
.tile__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-tile); background: var(--tile-ic-bg); color: var(--tile-ic); }
.tile__ic svg { width: 21px; height: 21px; }
.tile span { font-size: .84rem; line-height: 1.25; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 30px; padding-block: 30px 34px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; } .tile { padding: 12px 4px; } }

/* ---------- Секции ---------- */
.sec { padding: 52px 0; }
.sec + .sec { border-top: 1px solid var(--line-2); }
.sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
/* min-width: 0 не даёт тексту схлопнуться в узкую колонку, а ссылка при нехватке места
   переносится на строку ниже вместо того, чтобы выталкивать всё за край. */
.sec__head > div { max-width: 78ch; flex: 1 1 30ch; min-width: 0; }
.sec__head > .sec__more { flex: 0 0 auto; }
.sec__head p { color: var(--dim); margin-bottom: 0; }
.sec__more { font-size: .93rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
/* На узком экране шапка секции встаёт в колонку: длинная ссылка вроде «Открыть список:
   5917 вопросов» с nowrap вылезала за правый край на 10 px. */
@media (max-width: 560px) {
  .sec__head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sec__more { white-space: normal; }
}
.sec--tint { background: var(--tint); }

/* Карточки разделов: фотография заливает карточку, текст поверх затемнения */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 22vw, 400px), 1fr)); gap: 16px; }
.cat { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 250px; padding: 22px 22px 56px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-block); transition: transform .18s ease, box-shadow .18s ease; }
.cat:hover { transform: translateY(-3px); color: var(--ink); }
.cat__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-tile); background: var(--accent-soft); color: var(--accent); }
.cat__ic svg { width: 24px; height: 24px; }
.cat__t { font-weight: 700; font-size: 1.16rem; letter-spacing: -.015em; }
.cat__d { font-size: .9rem; color: var(--dim); }
.cat__n { position: absolute; right: 18px; bottom: 16px; font-size: .82rem; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .cats { grid-template-columns: 1fr; } .cat { min-height: 210px; } }

/* ---------- Фильтр и карточки вопросов ---------- */
.filter { position: sticky; top: 68px; z-index: 30; background: var(--bg); padding: 12px 0; margin-bottom: 20px; border-bottom: 1px solid var(--line-2); }
.filter__in { display: flex; align-items: center; gap: 12px; }
.filter label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.filter input { flex: 1; min-width: 0; padding: 11px 14px; font: inherit; font-size: .97rem; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-line); border-radius: var(--r-ctl); }
.filter input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter__count { font-size: .85rem; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }

.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-block); padding: 20px 22px; margin-bottom: 12px; scroll-margin-top: 140px; }
.qa[hidden] { display: none; }
.qa__top { display: flex; gap: 12px; align-items: baseline; }
.qa__n { font-size: .78rem; color: var(--dim); padding-top: 3px; font-variant-numeric: tabular-nums; }
.qa__q { margin: 0 0 12px; font-size: 1.06rem; }
.qa__a { position: relative; padding: 13px 15px 13px 44px; background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--r-ctl); }
.qa__a svg { position: absolute; left: 15px; top: 15px; width: 18px; height: 18px; color: var(--ok); }
.qa__a b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; color: var(--ok); margin-bottom: 2px; }
.qa__a p { margin: 0; font-weight: 500; }
.qa__why { margin-top: 12px; }
.qa__why summary { cursor: pointer; font-size: .92rem; color: var(--link); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.qa__why summary::-webkit-details-marker { display: none; }
.qa__why summary::after { content: '+'; }
.qa__why[open] summary::after { content: '–'; }
.qa__why > div { padding-top: 10px; color: var(--dim); font-size: .96rem; }
.qa__oth { color: var(--dim); font-size: .92rem; }
/* неверные варианты из теста: видны сразу, приглушены, с крестом */
.qa__wrong { list-style: none; margin: 8px 0 0; padding: 0; }
.qa__wrong li { position: relative; padding: 9px 14px 9px 40px; margin-top: 6px; background: var(--bad-bg); border: 1px solid transparent; border-radius: var(--r-ctl); color: var(--dim); font-size: .93rem; }
.qa__wrong li::before { content: '✕'; position: absolute; left: 16px; top: 8px; color: var(--bad); font-weight: 600; opacity: .7; }
/* список вариантов на странице вопроса (/otvet/) */
.qa__opts { list-style: none; margin: 12px 0 20px; padding: 0; }
.qa__opts li { position: relative; padding: 11px 15px 11px 42px; margin-top: 7px; border-radius: var(--r-ctl); border: 1px solid var(--line); }
.qa__opts li.is-right { background: var(--ok-bg); border-color: var(--ok-line); font-weight: 500; }
.qa__opts li.is-right::before { content: '✓'; position: absolute; left: 16px; color: var(--ok); font-weight: 700; }
.qa__opts li.is-wrong { background: var(--bad-bg); border-color: transparent; color: var(--dim); }
.qa__opts li.is-wrong::before { content: '✕'; position: absolute; left: 16px; color: var(--bad); font-weight: 600; opacity: .7; }
/* карточка-ссылка в результатах поиска по другим страницам набора */
.qfound__head { margin: 18px 0 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 600; }
.qa--link { display: block; text-decoration: none; color: inherit; }
.qa--link .qa__q { margin-bottom: 6px; }
.qa--link:hover { border-color: var(--accent); }
.qa--link__a { margin: 0 0 8px; color: var(--dim); font-size: .93rem; }
.qa--link__p { font-size: .88rem; color: var(--link); font-weight: 500; }
/* пагинация списков */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
.pager a, .pager .pager__cur { min-width: 40px; padding: 9px 12px; text-align: center; border-radius: var(--r-ctl); border: 1px solid var(--line); font-size: .95rem; font-variant-numeric: tabular-nums; }
.pager a { background: var(--surface); text-decoration: none; }
.pager a:hover { border-color: var(--accent); }
.pager .pager__cur { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager .pager__step { min-width: auto; font-weight: 500; }
/* заголовок лёгких страниц пагинации в размере h2 */
.h1--list { font-size: 1.55rem; margin: 0 0 6px; }
.qa__more { display: inline-block; margin-top: 12px; font-size: .93rem; font-weight: 500; }
.qa:target, .qa.is-hit { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip { display: inline-block; font-family: var(--mono); font-size: .74rem; padding: 4px 10px; border-radius: var(--r-chip); background: var(--chip-bg); color: var(--dim); border: 1px solid var(--line); }
.chip--warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.empty { padding: 26px; text-align: center; color: var(--dim); border: 1px dashed var(--line); border-radius: var(--r-block); }

/* ---------- Тренажёр ---------- */
.tr { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.tr__main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-block); padding: 26px; }
.tr__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tr__step { font-size: .85rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.tr__bar { height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.tr__bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.tr__q { font-size: 1.12rem; font-weight: 600; line-height: 1.4; margin-bottom: 18px; }
.tr__opts { display: grid; gap: 9px; }
.topt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border: 1px solid var(--opt-line); border-radius: var(--r-ctl); background: var(--opt-bg); color: var(--ink); font: inherit; font-size: .96rem; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.topt:hover:not(:disabled) { border-color: var(--accent); }
.topt:disabled { cursor: default; }
.topt i { font-style: normal; font-weight: 600; color: var(--dim); min-width: 1.1em; }
.topt.is-right { border-color: var(--ok); background: var(--ok-bg); }
.topt.is-right i { color: var(--ok); }
.topt.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.topt.is-wrong i { color: var(--bad); }
.tr__fb { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-ctl); background: var(--tint); font-size: .94rem; color: var(--dim); }
.tr__fb p { margin: 0 0 .5em; }
.tr__fb p:last-child { margin: 0; }
.tr__nav { display: flex; gap: 10px; margin-top: 18px; }

.tr__side { position: sticky; top: 84px; display: grid; gap: 14px; }
.tr__score { padding: 18px; background: var(--score-bg); border-radius: var(--r-block); text-align: center; }
.tr__score b { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tr__score span { font-size: .84rem; color: var(--dim); }
.tr__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr__list li { margin: 0; }
.tr__list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; font: inherit; font-size: .88rem; text-align: left; color: var(--dim); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: default; }
.tr__list svg { width: 16px; height: 16px; }
.tr__list .is-right { color: var(--ink); }
.tr__list .is-right svg { color: var(--ok); }
.tr__list .is-wrong { color: var(--ink); }
.tr__list .is-wrong svg { color: var(--bad); }
.tr__list .is-current { border-color: var(--accent); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 3px var(--accent-soft); }
.tr__list .is-future { opacity: .55; }
.tr__dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.tr__mob { display: none; }
.tr__res { text-align: center; padding: 14px 0; }
.tr__res b { display: block; font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; }
@media (max-width: 860px) {
  .tr { grid-template-columns: 1fr; }
  .tr__side { position: static; order: -1; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
  .tr__list { display: none; }
  .tr__mob { display: block; margin: 0; font-size: .92rem; font-weight: 600; color: var(--ink); }
  .tr__score { padding: 12px 16px; text-align: left; }
  .tr__score b { font-size: 1.4rem; }
}

/* ---------- Статьи ---------- */
.crumbs { font-size: .87rem; color: var(--dim); padding: 18px 0 0; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.art__main { padding-block: 30px 12px; }
.art__main h2 { margin-top: 1.8em; }
.art__main h3 { margin-top: 1.5em; }
.art__main > *:first-child { margin-top: 0; }

/* Врезка-фотография в процедурных страницах: идёт сразу под лидом */
.art__fig { margin: 0 0 26px; }
.art__fig img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-block); }
.art__fig figcaption { margin-top: 10px; font-size: .84rem; color: var(--dim); }



.art__main table th, .article table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }

.answer-box { background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--r-block); padding: 20px 22px; margin: 0 0 26px; }
.answer-box__k { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ok); font-weight: 600; margin-bottom: 8px; }
.answer-box__v { font-size: 1.16rem; font-weight: 600; margin: 0; }
.callout { background: var(--warn-bg); border-radius: var(--r-block); padding: 16px 20px; margin: 24px 0; font-size: .96rem; }
.callout b { color: var(--warn); }
.related { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: 8px; }

/* ---------- Подвал ---------- */
.foot { margin-top: 40px; padding: 40px 0 46px; background: var(--foot-bg); color: var(--foot-ink); }
.foot__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.foot h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--foot-dim); font-weight: 600; margin-bottom: 12px; }
.foot p { color: var(--foot-dim); font-size: .9rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 7px; }
.foot a { color: var(--foot-ink); text-decoration: none; font-size: .9rem; }
.foot a:hover { color: var(--foot-active); }
.foot__note { padding-top: 20px; border-top: 1px solid var(--foot-line); font-size: .84rem; color: var(--foot-dim); }
/* Профессий двенадцать — в один столбец это простыня, поэтому колонки. Не grid:
   колоночная вёрстка сама доливает остаток, и список не надо резать пополам руками. */
.foot__two { columns: 2; column-gap: 26px; }
.foot__two li { break-inside: avoid; }
@media (max-width: 960px) { .foot__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .foot__cols { grid-template-columns: 1fr; gap: 22px; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ---------- Переключатель тем (только в предпросмотре) ---------- */
.vswitch { position: fixed; z-index: 90; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; background: #14161a; border-radius: 999px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.vswitch button { padding: 7px 14px; font: inherit; font-size: .82rem; font-weight: 600; color: #cfd3d8; background: transparent; border: 0; border-radius: 999px; cursor: pointer; }
.vswitch button.on { background: #fff; color: #14161a; }

/* Ссылка на полный список разделов под плитками */
.hero__all { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font-size: .9rem; font-weight: 500; text-decoration: none; color: inherit; opacity: .82; }
.hero__all:hover { opacity: 1; color: inherit; }
.hero__all svg { width: 15px; height: 15px; transition: transform .2s cubic-bezier(.16,1,.3,1); }
.hero__all:hover svg { transform: translateX(3px); }

/* ---------- Статья в две колонки: текст занимает ширину без искусственного ограничения ---------- */
.art { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1.4fr); gap: clamp(32px, 3vw, 64px); align-items: start; padding-block: 30px 12px; }
.art__main > *:first-child { margin-top: 0; }
.art__side { position: sticky; top: 88px; display: grid; gap: 18px; font-size: .93rem; }
.art__box { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-block); }
.art__box h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600; margin-bottom: 12px; }
.art__box ul { list-style: none; padding: 0; margin: 0; }
.art__box li { margin-bottom: 9px; line-height: 1.4; }
.art__box li:last-child { margin-bottom: 0; }
.art__box a { text-decoration: none; }
.art__box a:hover { text-decoration: underline; }
.art__box p { margin: 0; color: var(--dim); font-size: .89rem; }
@media (max-width: 900px) {
  .art { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .art__side { position: static; }
}

/* Три шага аттестации: заполняют ширину вместо узкой колонки текста */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step__ic { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px; border-radius: var(--r-tile); background: var(--accent-soft); color: var(--accent); }
.step__ic svg { width: 20px; height: 20px; }
.step h3 { margin-bottom: .4em; }
.step p { color: var(--dim); margin: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; gap: 22px; } }

/* Широкие экраны: слева появляется оглавление, страница заполняется без центрирования */
.art__toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.art__toc h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; margin-bottom: 12px; }
.art__toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.art__toc li { margin-bottom: 9px; line-height: 1.35; padding-left: 12px; position: relative; }
.art__toc li::before { content: ""; position: absolute; left: 0; top: .55em; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.art__toc a { color: var(--ink-2, var(--dim)); text-decoration: none; display: block; }
.art__toc a:hover, .art__toc a.is-here { color: var(--accent); }

/* Очень широкие экраны: место забирает не длина строки, а вторая колонка карточек сбоку.
   Так страница остаётся заполненной, а строка держится читаемой длины. */



/* ---------- Таблицы в статьях ---------- */
/* Обёртку со скроллом навешивает сборка, поэтому сама таблица остаётся обычной таблицей
   и не теряет семантику из-за display:block. */
.tbl { margin: 26px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-block); background: var(--surface); }
.tbl table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .95rem; }
.tbl thead th {
  position: sticky; top: 0; background: var(--tint); text-align: left; font-weight: 600;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--dim);
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 16px; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--tint); }
.tbl td:first-child { font-weight: 600; color: var(--ink); }
.tbl .chip { white-space: nowrap; }
@media (max-width: 600px) {
  .tbl { border-radius: var(--r-ctl); }
  .tbl table { font-size: .9rem; }
  .tbl thead th, .tbl td { padding: 10px 12px; }
}

/* Длинные тексты: с 1700px ограничиваем ширину ЧИТАЕМОЙ зоны, иначе строка уезжает за 120 знаков.
   Ограничение живёт только на страницах-статьях; главная, разделы и первый экран остаются во всю ширину. */
@media (min-width: 1700px) {
  .art { max-width: 1480px; margin-inline: auto; }
}

/* Короткий ответ под вариантом из теста: самостоятельный абзац, который читают первым */
.short { font-size: 1.06rem; line-height: 1.6; color: var(--ink); margin: 0 0 1.4em; }

/* Обязательная юридическая плашка: видна сразу под шапкой, не тонет в подвале */
.notice { background: var(--tint); border-bottom: 1px solid var(--line); font-size: .84rem; color: var(--dim); }
.notice .wrap { padding-block: 9px; }
.notice a { color: var(--link); text-decoration: none; white-space: nowrap; }
.notice a:hover { text-decoration: underline; }

/* --- дорисованные вопросы (extra) и хабы разделов --- */
.qa--extra .qa__n { color: var(--dim); }
.hub__year { margin: 22px 0 10px; font-size: 1.05em; }
.hub__n { color: var(--dim); font-size: .85em; white-space: nowrap; }
.hsearch__plain { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.hsearch__plain b { display: block; }
.hsearch__plain span { color: var(--dim); font-size: .9em; }
.qa-more-note { color: var(--dim); margin: 14px 0; }
