/* Справочник МЗКРС (/blog/spravochnik/) — стили раздела. 25.10.2026.
   Шрифты и цвета — из шаблона сайта: Golos Text (текст), Inter (заголовки, интерфейс), оранжевый #fe4f32.
   Всё под префиксом .sp-, чтобы не задевать стили сайта. */

.sp {
  --sp-ink: #1c1a1f;
  --sp-text: #2f2d33;
  --sp-muted: #636168;
  --sp-line: #e6e4e1;
  --sp-fill: #f3f2f0;
  --sp-paper: #fafaf9;
  --sp-card: #ffffff;
  --sp-accent: #fe4f32;
  --sp-accent-hover: #e3401d;
  --sp-link: #c2361b;
  --sp-dark: #1d1d1f;
  --sp-r: 20px;
  --sp-r-s: 12px;
  --sp-ease: cubic-bezier(.23, 1, .32, 1);
  --sp-ease-move: cubic-bezier(.77, 0, .175, 1);
  interpolate-size: allow-keywords;
  --sp-head: 'Inter', Arial, sans-serif;
  --sp-body: 'Golos Text', 'Inter', Arial, sans-serif;
  font-family: var(--sp-body);
  color: var(--sp-text);
  padding-bottom: 56px;
}
.sp *, .sp *::before, .sp *::after { box-sizing: border-box; }
.sp-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp a { -webkit-tap-highlight-color: transparent; }
.sp :focus-visible { outline: 2px solid var(--sp-accent); outline-offset: 3px; border-radius: 6px; }
.sp h1, .sp h2, .sp h3 { font-family: var(--sp-head); color: var(--sp-ink); text-transform: none; }

/* ---------- общие элементы ---------- */
.sp-eyebrow { font-family: var(--sp-head); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-muted); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.sp-eyebrow::before { content: ''; width: 28px; height: 2px; border-radius: 2px; background: var(--sp-accent); }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sp-head); font-size: 13px; font-weight: 600; color: var(--sp-ink); background: var(--sp-fill); border-radius: 999px; padding: 6px 12px; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: background-color .2s var(--sp-ease), color .2s var(--sp-ease); }
.sp-chip:hover { background: #ebe9e6; }
.sp-section-title { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin: 0 0 24px; }
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 10px; border: 0; background: var(--sp-accent); color: #fff; font-family: var(--sp-head); font-size: 19px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .2s var(--sp-ease), transform .16s var(--sp-ease); }
.sp-btn:hover { background: var(--sp-accent-hover); color: #fff; }
.sp-btn:active { transform: scale(.97); }
.sp-arrow { width: 18px; height: 18px; flex: none; transition: transform .25s var(--sp-ease); }
a:hover > .sp-arrow, a:hover .sp-arrow { transform: translateX(3px); }

/* ---------- хаб: шапка ---------- */
.sp-hero { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; background: var(--sp-card); border-radius: 28px; padding: 56px 56px 48px; margin: 8px 0 24px; }
.sp-hero__title { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; margin: 0 0 20px; max-width: 13ch; }
.sp-hero__lead { font-size: 19px; line-height: 1.55; color: var(--sp-muted); margin: 0 0 32px; max-width: 54ch; }
.sp-hero__art { position: relative; margin: 0; align-self: stretch; display: grid; place-items: center; min-height: 280px; }
.sp-hero__art::before { content: ''; position: absolute; inset: 12% 0 12% 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(254, 79, 50, .12), rgba(254, 79, 50, 0)); }
.sp-hero__art img { position: relative; width: 100%; height: auto; aspect-ratio: 1200 / 680; object-fit: contain; }
.sp-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 0; padding: 0; list-style: none; font-family: var(--sp-head); font-size: 15px; color: var(--sp-muted); }
.sp-stats b { color: var(--sp-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- поиск ---------- */
.sp-search { position: relative; max-width: 640px; }
.sp-search__field { position: relative; }
.sp-search__icon { position: absolute; left: 20px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--sp-muted); pointer-events: none; }
.sp-search input { width: 100%; height: 62px; border: 1.5px solid var(--sp-line); border-radius: 999px; background: var(--sp-paper); padding: 0 24px 0 56px; font-family: var(--sp-body); font-size: 17px; color: var(--sp-ink); transition: border-color .2s var(--sp-ease), box-shadow .2s var(--sp-ease), background-color .2s var(--sp-ease); -webkit-appearance: none; appearance: none; }
.sp-search input::placeholder { color: #6f6d73; }
.sp-search input:focus { outline: none; border-color: var(--sp-ink); background: #fff; box-shadow: 0 0 0 4px rgba(28, 26, 31, .06); }
.sp-search input::-webkit-search-cancel-button { cursor: pointer; }
.sp-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 18px; box-shadow: 0 16px 40px rgba(28, 26, 31, .16), 0 2px 6px rgba(28, 26, 31, .06); padding: 8px; max-height: min(460px, 60vh); overflow-y: auto; transform-origin: top center; }
.sp-results[hidden] { display: none; }
.sp-result { display: block; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--sp-ink); }
.sp-result__rubric { display: block; font-family: var(--sp-head); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--sp-muted); margin-bottom: 4px; }
.sp-result__title { display: block; font-family: var(--sp-head); font-size: 16px; font-weight: 600; line-height: 1.35; }
.sp-result mark { background: rgba(254, 79, 50, .16); color: inherit; border-radius: 3px; padding: 0 1px; }
.sp-result[aria-selected="true"], .sp-result:hover { background: var(--sp-fill); }
.sp-results__empty { padding: 14px; font-size: 15px; line-height: 1.5; color: var(--sp-muted); }
.sp-results__empty a { color: var(--sp-link); }
.sp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-family: var(--sp-head); font-size: 14px; color: var(--sp-muted); }
.sp-quick a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 500; color: var(--sp-ink); text-decoration: none; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sp-line); background: #fff; transition: border-color .2s var(--sp-ease); }
.sp-quick a:hover { border-color: var(--sp-ink); }

/* ---------- хаб: «С чего начать» ---------- */
.sp-block { background: var(--sp-card); border-radius: var(--sp-r); padding: 40px; margin-bottom: 24px; }
.sp-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: sp-start; }
.sp-start li { counter-increment: sp-start; }
.sp-start a { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px 24px 22px; border-radius: 16px; background: var(--sp-paper); border: 1px solid var(--sp-line); text-decoration: none; color: var(--sp-ink); transition: border-color .2s var(--sp-ease), transform .2s var(--sp-ease), background-color .2s var(--sp-ease); }
.sp-start a::before { content: counter(sp-start, decimal-leading-zero); font-family: var(--sp-head); font-size: 13px; font-weight: 700; color: var(--sp-link); letter-spacing: .04em; }
.sp-start a:hover { border-color: #cfccc8; background: #fff; }
.sp-start__title { font-family: var(--sp-head); font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.sp-start__text { font-size: 15px; line-height: 1.5; color: var(--sp-muted); }
.sp-start__more { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--sp-head); font-size: 14px; font-weight: 600; color: var(--sp-link); }

/* ---------- хаб: рубрики ---------- */
.sp-rubrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.sp-rubrics a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 20px 18px; border-radius: 16px; background: var(--sp-paper); border: 1px solid var(--sp-line); text-decoration: none; color: var(--sp-ink); transition: border-color .2s var(--sp-ease), background-color .2s var(--sp-ease); }
.sp-rubrics a:hover { border-color: #cfccc8; background: #fff; }
.sp-rubrics__count { font-family: var(--sp-head); font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--sp-ink); line-height: 1; }
.sp-rubrics__count small { font-size: 13px; font-weight: 500; color: var(--sp-muted); letter-spacing: 0; margin-left: 4px; }
.sp-rubrics__name { font-family: var(--sp-head); font-size: 17px; font-weight: 700; margin-top: 10px; }
.sp-rubrics__desc { font-size: 14px; line-height: 1.45; color: var(--sp-muted); }

.sp-rubric { scroll-margin-top: 110px; }
.sp-rubric__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.sp-rubric__head .sp-section-title { margin: 0; }
.sp-rubric__count { font-family: var(--sp-head); font-size: 15px; color: var(--sp-muted); white-space: nowrap; }
.sp-rubric__desc { font-size: 16px; color: var(--sp-muted); margin: 0 0 20px; }
.sp-list { columns: 2; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.sp-list li { break-inside: avoid; border-top: 1px solid var(--sp-line); }
.sp-list li[hidden] { display: none; }
.sp-list li.sp-in { animation: sp-in 220ms var(--sp-ease) both; }
@keyframes sp-in { from { opacity: 0; transform: translateY(4px); } }
.sp-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0; text-decoration: none; color: var(--sp-ink); font-family: var(--sp-head); font-size: 16px; line-height: 1.4; font-weight: 500; transition: color .2s var(--sp-ease); }
.sp-list a:hover { color: var(--sp-link); }
.sp-list__min { flex: none; font-size: 13px; font-weight: 500; color: var(--sp-muted); font-variant-numeric: tabular-nums; }
.sp-more { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--sp-line); background: #fff; font-family: var(--sp-head); font-size: 15px; font-weight: 600; color: var(--sp-ink); cursor: pointer; transition: border-color .2s var(--sp-ease); }
.sp-more:hover { border-color: var(--sp-ink); }

/* ---------- словарь ---------- */
.sp-abc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sp-abc a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--sp-paper); border: 1px solid var(--sp-line); font-family: var(--sp-head); font-size: 17px; font-weight: 600; color: var(--sp-ink); text-decoration: none; transition: background-color .2s var(--sp-ease), color .2s var(--sp-ease), border-color .2s var(--sp-ease); }
.sp-abc a:hover { background: var(--sp-ink); border-color: var(--sp-ink); color: #fff; }

/* ---------- призыв ---------- */
.sp-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--sp-dark); color: #fff; border-radius: var(--sp-r); padding: 40px; margin-top: 24px; position: relative; overflow: hidden; }
.sp-cta::after { content: ''; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(254, 79, 50, .28), rgba(254, 79, 50, 0)); pointer-events: none; }
.sp-cta__title { font-family: var(--sp-head); font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; color: #fff !important; }
.sp-cta__text { font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, .78); margin: 0; max-width: 56ch; }
.sp-cta .sp-btn { flex: none; position: relative; z-index: 1; }
.sp-note { font-size: 14px; line-height: 1.5; color: var(--sp-muted); margin: 20px 4px 0; }

/* ---------- статья ---------- */
.sp-progress { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 3px; pointer-events: none; }
.sp-progress span { display: block; height: 100%; background: var(--sp-accent); transform-origin: 0 50%; transform: scaleX(0); }
.sp-head { background: var(--sp-card); border-radius: 28px; padding: 48px 56px 40px; margin: 8px 0 24px; }
.sp-head__title { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 18px 0 18px; max-width: 24ch; }
.sp-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-family: var(--sp-head); font-size: 14px; color: var(--sp-muted); }
.sp-meta li { display: inline-flex; align-items: center; gap: 7px; }
.sp-meta svg { width: 16px; height: 16px; flex: none; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.sp-sheet { background: var(--sp-card); border-radius: var(--sp-r); padding: 48px 56px 56px; min-width: 0; }
.sp-aside { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 16px; }
.sp-aside__box { background: var(--sp-card); border-radius: var(--sp-r); padding: 24px; }

/* оглавление-нить */
.sp-toc__title { font-family: var(--sp-head); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-muted); margin: 0 0 14px; }
.sp-toc { position: relative; }
.sp-toc ol { position: relative; margin: 0; padding: 0 0 0 18px; list-style: none; max-height: calc(100vh - 360px); overflow-y: auto; scrollbar-width: thin; }
.sp-toc ol::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--sp-line); }
.sp-toc__knot { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--sp-accent); box-shadow: 0 0 0 4px rgba(254, 79, 50, .16); transform: translateY(var(--sp-knot, 9px)); transition: transform 240ms var(--sp-ease-move), opacity .2s ease; opacity: 0; }
.sp-toc.has-active .sp-toc__knot { opacity: 1; }
.sp-toc a { display: block; padding: 6px 0; font-family: var(--sp-head); font-size: 14px; line-height: 1.4; color: var(--sp-muted); text-decoration: none; transition: color .2s var(--sp-ease); }
.sp-toc a:hover { color: var(--sp-ink); }
.sp-toc a[aria-current="true"] { color: var(--sp-ink); font-weight: 600; }
.sp-toc-m { display: none; }
.sp-toc__glossary { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sp-line); width: 100%; font-family: var(--sp-head); font-size: 14px; font-weight: 600; color: var(--sp-link); text-decoration: none; }
@media (max-width: 1100px) { .sp-toc__glossary { margin-top: 0; padding-top: 0; border-top: 0; } }

.sp-aside-cta__title { font-family: var(--sp-head); font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--sp-ink); margin: 0 0 8px; }
.sp-aside-cta__text { font-size: 14px; line-height: 1.5; color: var(--sp-muted); margin: 0 0 16px; }
.sp-aside-cta .sp-btn { width: 100%; min-height: 48px; padding: 0 16px; }

/* типографика текста статьи */
.sp-prose { font-size: 18px; line-height: 1.7; color: var(--sp-text); overflow-wrap: break-word; }
.sp-prose > * { max-width: 760px; }
.sp-prose > .table-wrap, .sp-prose > .sp-products, .sp-prose > .sp-faq, .sp-prose > .sp-sources, .sp-prose > .sp-toc-m { max-width: none; }
.sp-prose > *:first-child { margin-top: 0; }
.sp-prose > p:first-of-type { font-size: 20px; line-height: 1.6; color: var(--sp-ink); }
.sp-prose p { margin: 0 0 1em; }
.sp-prose h2 { font-size: 28px; line-height: 1.22; font-weight: 700; letter-spacing: -.02em; margin: 2em 0 .6em; scroll-margin-top: 110px; }
.sp-prose h3 { font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; margin: 1.6em 0 .5em; scroll-margin-top: 110px; }
.sp-prose a { color: var(--sp-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(194, 54, 27, .35); transition: text-decoration-color .2s var(--sp-ease), color .2s var(--sp-ease); }
.sp-prose a:hover { text-decoration-color: currentColor; color: #a52b14; }
.sp-prose ul, .sp-prose ol { margin: 0 0 1.1em; padding: 0; list-style: none; }
.sp-prose li { position: relative; padding-left: 26px; margin: 0 0 .45em; }
.sp-prose ul > li::before { content: ''; position: absolute; left: 6px; top: .72em; width: 8px; height: 2px; border-radius: 2px; background: var(--sp-accent); }
.sp-prose ol { counter-reset: sp-ol; }
.sp-prose ol > li { padding-left: 32px; }
.sp-prose ol > li { counter-increment: sp-ol; }
.sp-prose ol > li::before { content: counter(sp-ol) '.'; position: absolute; left: 0; top: 0; font-family: var(--sp-head); font-weight: 700; font-size: .9em; color: var(--sp-link); font-variant-numeric: tabular-nums; }
.sp-prose strong { color: var(--sp-ink); font-weight: 600; }
.sp-prose code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .86em; background: var(--sp-fill); border-radius: 6px; padding: .12em .42em; color: var(--sp-ink); white-space: nowrap; }
.sp-prose blockquote { margin: 1.4em 0; padding: 18px 22px; border-radius: 14px; background: var(--sp-paper); color: var(--sp-ink); }
.sp-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.sp-prose hr { border: 0; height: 1px; background: var(--sp-line); margin: 2em 0; }

/* таблицы */
.sp-prose .table-wrap { position: relative; margin: 1.5em 0 1.8em; border: 1px solid var(--sp-line); border-radius: 14px; overflow-x: auto; background: #fff; -webkit-overflow-scrolling: touch; }
.sp-prose .table-wrap.is-scrollable { background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left/40px 100% no-repeat local, linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right/40px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.12), transparent) left/12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.12), transparent) right/12px 100% no-repeat scroll; background-color: #fff; }
.sp-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.sp-prose th, .sp-prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sp-line); }
.sp-prose th { font-family: var(--sp-head); font-weight: 600; font-size: 14px; color: var(--sp-ink); background: var(--sp-paper); }
.sp-prose tbody tr:last-child td { border-bottom: 0; }
.sp-prose tbody tr:hover td { background: #fcfbfa; }

/* «Нити МЗКРС по теме» — карточки */
.sp-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 1.2em 0 1.4em; padding: 0; list-style: none; }
.sp-products li { padding: 0; margin: 0; }
.sp-products li::before { display: none; }
.sp-product { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: center; height: 100%; padding: 14px 18px 14px 14px; border-radius: 16px; background: var(--sp-paper); border: 1px solid var(--sp-line); text-decoration: none !important; color: var(--sp-text) !important; transition: border-color .2s var(--sp-ease), background-color .2s var(--sp-ease), transform .2s var(--sp-ease); }
.sp-product:hover { border-color: #cfccc8; background: #fff; }
.sp-product img { width: 84px; height: 84px; object-fit: cover; object-position: 40% 50%; border-radius: 12px; background: #fff; }
.sp-product__name { display: flex; align-items: center; gap: 6px; font-family: var(--sp-head); font-size: 17px; font-weight: 700; color: var(--sp-ink); line-height: 1.25; }
.sp-product__code { font-size: 12px; font-weight: 600; color: var(--sp-muted); letter-spacing: .02em; }
.sp-product__type { display: block; font-family: var(--sp-head); font-size: 12.5px; font-weight: 500; color: var(--sp-muted); margin: 3px 0 6px; }
.sp-product__text { display: block; font-size: 14px; line-height: 1.45; color: var(--sp-muted); }

/* частые вопросы */
.sp-faq { margin: 1em 0 1.6em; display: grid; gap: 10px; }
.sp-faq details { border-radius: 14px; background: var(--sp-paper); border: 1px solid var(--sp-line); overflow: hidden; transition: background-color .2s var(--sp-ease), border-color .2s var(--sp-ease); }
.sp-faq details[open] { background: #fff; border-color: #d9d6d2; }
.sp-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary h3 { margin: 0 !important; font-size: 17px !important; line-height: 1.4 !important; }
.sp-faq__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--sp-line); transition: transform 200ms var(--sp-ease), background-color .2s ease, color .2s ease; }
.sp-faq details::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size 240ms var(--sp-ease), opacity 200ms ease, content-visibility 240ms allow-discrete; }
.sp-faq details[open]::details-content { block-size: auto; opacity: 1; }
.sp-faq__icon svg { width: 14px; height: 14px; }
.sp-faq details[open] .sp-faq__icon { transform: rotate(45deg); background: var(--sp-ink); border-color: var(--sp-ink); color: #fff; }
.sp-faq__body { padding: 0 20px 18px; font-size: 16px; line-height: 1.65; }
.sp-faq__body > :last-child { margin-bottom: 0; }

/* источники */
.sp-sources { margin-top: 1em; padding: 22px 26px; border-radius: 16px; background: var(--sp-paper); border: 1px solid var(--sp-line); font-size: 14px; line-height: 1.55; color: var(--sp-muted); }
.sp-sources ol > li { margin-bottom: .55em; padding-left: 28px; }
.sp-sources ol > li::before { color: var(--sp-muted); font-size: 13px; }
.sp-sources, .sp-sources a { overflow-wrap: anywhere; }

/* «Читайте также», листание */
.sp-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.sp-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px 22px 20px; border-radius: 16px; background: var(--sp-paper); border: 1px solid var(--sp-line); text-decoration: none; color: var(--sp-ink); transition: border-color .2s var(--sp-ease), background-color .2s var(--sp-ease), transform .2s var(--sp-ease); }
.sp-card:hover { border-color: #cfccc8; background: #fff; }
@media (hover: hover) and (pointer: fine) { .sp-start a:hover, .sp-product:hover, .sp-card:hover { transform: translateY(-2px); } }
.sp-card__rubric { font-family: var(--sp-head); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sp-muted); }
.sp-card__title { font-family: var(--sp-head); font-size: 18px; line-height: 1.32; font-weight: 700; letter-spacing: -.01em; }
.sp-card__text { font-size: 15px; line-height: 1.5; color: var(--sp-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-card__min { margin-top: auto; padding-top: 4px; font-family: var(--sp-head); font-size: 13px; color: var(--sp-muted); }
.sp-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.sp-pager a { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px; border-radius: 16px; background: var(--sp-card); text-decoration: none; color: var(--sp-ink); border: 1px solid transparent; transition: border-color .2s var(--sp-ease); }
.sp-pager a:hover { border-color: var(--sp-line); }
.sp-pager__dir { font-family: var(--sp-head); font-size: 13px; font-weight: 600; color: var(--sp-muted); display: inline-flex; align-items: center; gap: 6px; }
.sp-pager__title { font-family: var(--sp-head); font-size: 16px; font-weight: 600; line-height: 1.35; }
.sp-pager__next { text-align: right; align-items: flex-end; }
.sp-pager__prev .sp-arrow { transform: scaleX(-1); }
.sp-pager__prev:hover .sp-arrow { transform: scaleX(-1) translateX(3px); }

/* блок «Статьи по теме» в карточке товара */
.sp-product-articles { margin-top: 24px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .sp-grid { grid-template-columns: minmax(0, 1fr); }
  .sp-aside { position: static; }
  .sp-aside .sp-toc { display: none; }
  .sp-toc-m { display: block; margin: 0 0 28px; border-radius: 14px; background: var(--sp-paper); border: 1px solid var(--sp-line); }
  .sp-toc-m summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 14px 18px; font-family: var(--sp-head); font-size: 15px; font-weight: 600; color: var(--sp-ink); }
  .sp-toc-m summary::-webkit-details-marker { display: none; }
  .sp-toc-m[open] summary .sp-faq__icon { transform: rotate(45deg); }
  .sp-toc-m ol { margin: 0; padding: 0 18px 16px 40px; list-style: decimal; }
  .sp-toc-m li { padding-left: 0; margin: 0 0 .35em; }
  .sp-toc-m li::before { display: none; }
  .sp-toc-m a { font-family: var(--sp-head); font-size: 15px; line-height: 1.4; color: var(--sp-ink); text-decoration: none; }
  .sp-rubrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-hero { grid-template-columns: minmax(0, 1fr); }
  .sp-hero__art { display: none; }
}
@media (max-width: 900px) {
  .sp-start { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sp-related { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sp-list { columns: 1; }
  .sp-cta { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .sp { padding-bottom: 40px; }
  .sp-start a { padding: 20px 18px 18px; }
  .sp-start__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .sp-start__title { font-size: 18px; }
  .sp-hero { padding: 32px 20px 28px; border-radius: 22px; }
  .sp-hero__lead { font-size: 17px; margin-bottom: 24px; }
  .sp-search input { height: 56px; font-size: 16px; }
  .sp-block, .sp-cta { padding: 28px 20px; }
  .sp-section-title { font-size: 24px; }
  .sp-start, .sp-related, .sp-products, .sp-pager { grid-template-columns: minmax(0, 1fr); }
  .sp-rubrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sp-rubrics a { padding: 16px; }
  .sp-rubrics__desc { display: none; }
  .sp-head { padding: 28px 20px 24px; border-radius: 22px; }
  .sp-sheet { padding: 28px 20px 36px; }
  .sp-prose { font-size: 17px; }
  .sp-prose > p:first-of-type { font-size: 18px; }
  .sp-prose h2 { font-size: 23px; }
  .sp-prose h3 { font-size: 18px; }
  .sp-prose .table-wrap { margin-left: -4px; margin-right: -4px; }
  .sp-pager__next { text-align: left; align-items: flex-start; }
  .sp-cta__title { font-size: 23px; }
}

/* ---------- уважение к настройке «уменьшить движение» ---------- */
@media (prefers-reduced-motion: reduce) {
  .sp-start a:hover, .sp-card:hover, .sp-product:hover, .sp-btn:active { transform: none !important; }
  .sp-arrow, a:hover > .sp-arrow, a:hover .sp-arrow { transform: none !important; transition: none; }
  .sp-toc__knot { transition: opacity .2s ease; }
  .sp-faq details::details-content { transition: opacity 150ms ease; }
  .sp-list li.sp-in { animation: none; }
}

/* ---------- списки статей: «С чего начать», «Читайте также», блок в карточке товара ---------- */
.sp-reads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; margin: 0; padding: 0; list-style: none; }
.sp-reads li { border-top: 1px solid var(--sp-line); }
.sp-reads a { display: flex; flex-direction: column; gap: 6px; padding: 18px 0 20px; text-decoration: none; color: var(--sp-ink); }
.sp-reads__title { font-family: var(--sp-head); font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; transition: color .2s ease; }
.sp-reads a:hover .sp-reads__title { color: var(--sp-link); }
.sp-reads__text { font-size: 15px; line-height: 1.5; color: var(--sp-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-reads__meta { font-family: var(--sp-head); font-size: 13px; color: var(--sp-muted); }
.sp-reads--lead .sp-reads__title { font-size: 21px; }
.sp-reads--lead .sp-reads__text { -webkit-line-clamp: 3; }

/* ---------- оглавление рубрик ---------- */
.sp-index { columns: 2; column-gap: 48px; margin: 0; padding: 0; list-style: none; }
.sp-index li { break-inside: avoid; border-top: 1px solid var(--sp-line); }
.sp-index a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 0 18px; text-decoration: none; color: var(--sp-ink); }
.sp-index__name { font-family: var(--sp-head); font-size: 19px; line-height: 1.3; font-weight: 700; transition: color .2s ease; }
.sp-index__count { font-family: var(--sp-head); font-size: 15px; font-weight: 600; color: var(--sp-muted); font-variant-numeric: tabular-nums; }
.sp-index__desc { grid-column: 1 / -1; font-size: 15px; line-height: 1.45; color: var(--sp-muted); }
.sp-index a:hover .sp-index__name { color: var(--sp-link); }

/* ---------- поверхности браузера в палитре ---------- */
.sp ::selection { background: rgba(254, 79, 50, .2); color: var(--sp-ink); }
.sp input { caret-color: var(--sp-accent); }
.sp-toc ol, .sp-results { scrollbar-width: thin; scrollbar-color: #d6d3cf transparent; }
.sp-toc ol::-webkit-scrollbar, .sp-results::-webkit-scrollbar { width: 6px; }
.sp-toc ol::-webkit-scrollbar-thumb, .sp-results::-webkit-scrollbar-thumb { background: #d6d3cf; border-radius: 6px; }
.sp-meta a { color: inherit; text-decoration: underline; text-decoration-color: rgba(99, 97, 104, .4); text-underline-offset: 3px; }
.sp-meta a:hover { color: var(--sp-ink); }

@media (max-width: 900px) { .sp-reads { grid-template-columns: minmax(0, 1fr); } .sp-index { columns: 1; } }

/* =========================================================================
   Акценты «шов и нить» — 26.10.2026.
   Рамки: тонкая линия у всех белых панелей. Оранжевый — только маркер:
   стежки на краю панели и на разделах статьи, нить по строке при наведении,
   номера и счётчики, состояния (фокус, открытый вопрос). Заливка — только у кнопки.
   Мелкий оранжевый текст — #c2361b (контраст 5:1), яркий #fe4f32 — линии и точки.
   ========================================================================= */
.sp {
  --sp-frame: rgba(28, 26, 31, .11);
  --sp-frame-hover: rgba(254, 79, 50, .55);
  --sp-num: #c2361b;
  /* сметочный шов: ровно три стежка по 12px с шагом 18px */
  --sp-stitch: linear-gradient(90deg, var(--sp-accent) 0 12px, transparent 12px 18px, var(--sp-accent) 18px 30px, transparent 30px 36px, var(--sp-accent) 36px 48px);
}

/* рамки панелей */
.sp-hero, .sp-block, .sp-head, .sp-sheet, .sp-aside__box, .sp-pager a { box-shadow: inset 0 0 0 1px var(--sp-frame); }
.sp-pager a { border-color: transparent; }

/* шов: три стежка прямо по верхней линии рамки большой панели, по линии текста */
.sp-hero, .sp-block, .sp-head, .sp-sheet { position: relative; }
.sp-hero::before, .sp-block::before, .sp-head::before, .sp-sheet::before, .sp-cta::before {
  content: ''; position: absolute; top: -1px; left: var(--sp-seam, 40px); width: 48px; height: 3px; border-radius: 1px;
  background: var(--sp-stitch); pointer-events: none;
}
/* хвост нити: после стежков тонкая линия идёт по рамке и тает */
.sp-hero::after, .sp-block::after, .sp-head::after, .sp-sheet::after {
  content: ''; position: absolute; top: 0; left: calc(var(--sp-seam, 40px) + 54px); width: 140px; height: 1px;
  background: linear-gradient(90deg, rgba(254, 79, 50, .7), rgba(254, 79, 50, 0)); pointer-events: none;
}
.sp-hero, .sp-head, .sp-sheet { --sp-seam: 56px; }
.sp-cta::before { z-index: 1; }

/* шов на разделах статьи: тонкая линия, у начала — те же три стежка */
.sp-prose h2 { margin-top: 1.7em; }
.sp-prose h2::before {
  content: ''; display: block; height: 3px; margin: 0 0 26px;
  background: var(--sp-stitch) left top / 48px 3px no-repeat,
    linear-gradient(90deg, rgba(254, 79, 50, .7), rgba(254, 79, 50, 0)) 54px center / 140px 1px no-repeat,
    linear-gradient(var(--sp-line), var(--sp-line)) left center / 100% 1px no-repeat;
}

/* нить: при наведении/фокусе по верхней линии строки протягивается оранжевая нить */
.sp-reads a, .sp-list a, .sp-index a { position: relative; }
.sp-reads a::before, .sp-list a::before, .sp-index a::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; border-radius: 2px;
  background: var(--sp-accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 160ms var(--sp-ease); pointer-events: none;
}
.sp-reads a:hover::before, .sp-list a:hover::before, .sp-index a:hover::before,
.sp-reads a:focus-visible::before, .sp-list a:focus-visible::before, .sp-index a:focus-visible::before {
  transform: scaleX(1); transition-duration: 280ms;
}
.sp-reads a:focus-visible, .sp-list a:focus-visible, .sp-index a:focus-visible { outline-offset: 6px; }

/* номера и счётчики */
.sp-reads--lead { counter-reset: sp-lead; }
.sp-reads--lead li { counter-increment: sp-lead; }
.sp-reads--lead .sp-reads__title::before {
  content: counter(sp-lead, decimal-leading-zero);
  content: counter(sp-lead, decimal-leading-zero) / '';
  display: block; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--sp-num); font-variant-numeric: tabular-nums;
}
.sp-stats b, .sp-index__count { color: var(--sp-num); }
.sp-sources ol > li::before { color: var(--sp-num); }
.sp-meta svg { color: var(--sp-accent); }

/* состояния */
.sp-search input:focus { border-color: var(--sp-accent); box-shadow: 0 0 0 4px rgba(254, 79, 50, .12); }
.sp-quick a:hover, .sp-more:hover { border-color: var(--sp-accent); }
.sp-card:hover, .sp-product:hover, .sp-pager a:hover { border-color: var(--sp-frame-hover); }
.sp-pager a:hover { box-shadow: inset 0 0 0 1px var(--sp-frame-hover); }
.sp-faq details[open] { border-color: var(--sp-frame-hover); }
.sp-faq details[open] .sp-faq__icon { background: var(--sp-accent); border-color: var(--sp-accent); }
.sp-abc a:hover { background: #fff; border-color: var(--sp-accent); color: var(--sp-num); }

@media (max-width: 640px) {
  .sp-block, .sp-hero, .sp-head, .sp-sheet, .sp-cta { --sp-seam: 20px; }
  .sp-prose h2::before { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-reads a::before, .sp-list a::before, .sp-index a::before { transition: none; }
}

/* =========================================================================
   «Стежок и нить» — второй цвет и разделители. 26.10.2026.
   Петроль (хирургическая бирюза, тон ~186°, напротив оранжевого 9°) — нить: все линии-разделители
   внутри панелей. Оранжевый — стежок и действие (метка, наведение, фокус). Рамки, таблицы, FAQ — нейтральные.
   Петроль только линией или тёмным текстом: без заливок, иконок и кнопок.
   ========================================================================= */
.sp {
  --sp-pair: #2f7a80;       /* нить у стежка; к оранжевому 1,5:1 по светлоте — не рябит */
  --sp-pair-line: #d2e2e4;  /* тело нити, 1,33:1 к белому */
  --sp-pair-dot: #6f9ea2;   /* маркеры списков в тексте */
  --sp-pair-ink: #17595e;   /* тёмный тон для текста, 8:1 к белому */
  --sp-thread-hover: var(--sp-accent);
  /* строка: оранжевый стежок 12×2, зазор 6, нить 1px — у стежка гуще, через 72px светлая */
  --sp-row-seam:
    linear-gradient(var(--sp-accent), var(--sp-accent)) 0 0 / 12px 2px no-repeat,
    linear-gradient(90deg, var(--sp-pair), var(--sp-pair-line) 72px) 18px 0 / calc(100% - 18px) 1px no-repeat;
}

/* строки списков: рамка прозрачная — высота строк и место нити не меняются; шов — тонкий слой поверх рамки */
.sp-reads li, .sp-list li, .sp-index li { position: relative; border-top-color: transparent; }
.sp-reads li::before, .sp-list li::before, .sp-index li::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: var(--sp-row-seam); pointer-events: none;
}
/* наведение и фокус: стежок остаётся, от него затягивается оранжевая нить */
.sp-reads a::before, .sp-list a::before, .sp-index a::before { left: 18px; background: var(--sp-thread-hover); }
.sp-reads a:focus-visible .sp-reads__title, .sp-index a:focus-visible .sp-index__name, .sp-list a:focus-visible { color: var(--sp-link); }

/* хвост шва панели — петролем: стежки оранжевые, нить парная */
.sp-hero::after, .sp-block::after, .sp-head::after, .sp-sheet::after {
  background: linear-gradient(90deg, var(--sp-pair), rgba(47, 122, 128, 0));
}
/* шов раздела статьи: три стежка, за ними нить петролем до конца строки */
.sp-prose h2::before {
  background: var(--sp-stitch) left top / 48px 3px no-repeat,
    linear-gradient(90deg, var(--sp-pair), var(--sp-pair-line) 120px) 54px center / calc(100% - 54px) 1px no-repeat;
}
.sp-toc ol::before { background: var(--sp-pair-line); }
.sp-toc__glossary { border-top-color: var(--sp-pair-line); }
.sp-prose hr { height: 2px; background: var(--sp-row-seam); }
.sp-prose ul > li::before { background: var(--sp-pair-dot); }

/* контрастная тема Windows: фоновые линии пропадают — возвращаем системным цветом */
@media (forced-colors: active) {
  .sp-reads li, .sp-list li, .sp-index li { border-top-color: GrayText; }
  .sp-prose hr { border-top: 1px solid GrayText; }
}
