/* AI Toolbox: раздел /stati/ и текст под калькулятором. Подключается после /chertezh.css (стиль «Чертёж»).
   Цвета, кегли (12-40, 56 - заголовок первого экрана), отступы (шаг 4px), скругления - rules/design/brand.md. */

/* ---------- шапка: тёмно-синяя полоса, как первый экран главной ---------- */
.st-band { padding-bottom: 64px; }
.st-band ::selection { background: var(--orange); color: var(--navy-dark); }
.st-band :focus-visible { outline-color: var(--orange); }
.st-head { padding-top: 24px; display: grid; grid-template-columns: 240px minmax(0, var(--col)); column-gap: 48px; justify-content: center; }
.st-head-plain { display: block; max-width: var(--wide); }
.st-head-plain .st-lead { max-width: var(--col); }
.st-head > * { grid-column: 2; }
.st-head h1 { color: var(--white); font-size: 40px; line-height: 1.2; }
.st-crumbs { font-size: 14px; color: rgba(255, 255, 255, 0.82); margin-bottom: 16px; }
.st-crumbs a { color: rgba(255, 255, 255, 0.82); }
.st-crumbs a:hover { color: var(--white); }
.st-crumbs span { color: var(--white); }
.st-lead { font-size: 20px; line-height: 1.5; color: var(--white); margin-bottom: 16px; }
.st-meta { font-size: 14px; color: var(--orange-light); font-weight: 700; margin: 0; }

/* ---------- раскладка: оглавление слева, колонка текста 720 ---------- */
.st-layout { display: grid; grid-template-columns: 240px minmax(0, var(--col)); gap: 48px; justify-content: center; padding-top: 48px; padding-bottom: 64px; }
.st-aside { position: sticky; top: 24px; align-self: start; }
.st-toc, .st-toc:first-child { border: 0; }
.st-toc summary { padding: 0; pointer-events: none; }
.st-toc summary::after { display: none; }
.st-toc summary { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 14px; color: var(--navy); cursor: pointer; list-style: none; margin-bottom: 12px; }
.st-toc summary::-webkit-details-marker { display: none; }
.st-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.st-toc li a { display: block; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; padding: 8px 0 8px 16px; margin-left: -2px; border-left: 2px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.st-toc li a:hover { color: var(--navy); }
.st-toc li a.is-here { color: var(--navy); border-left-color: var(--orange); font-weight: 600; }
.st-mini { display: block; margin-top: 24px; padding: 16px; border-radius: var(--r-card); background: var(--bg2); font-size: 14px; font-weight: 700; color: var(--navy); text-decoration: none; transition: background-color .2s var(--ease); }
.st-mini:hover { background: var(--border); }

/* ---------- текст статьи ---------- */
.st-cover { margin: 0 0 40px; }
.st-cover img { border-radius: var(--r-card); box-shadow: var(--shadow); }
.st-prose { font-size: 16px; line-height: 1.75; }
.st-prose h2 { font-size: 28px; margin: 48px 0 16px; scroll-margin-top: 24px; }
.st-prose h3 { font-size: 20px; margin: 32px 0 12px; }
.st-prose ul, .st-prose ol { padding-left: 24px; margin: 0 0 16px; }
.st-prose li { margin-bottom: 8px; }
.st-prose li::marker { color: var(--navy); font-weight: 700; }
.st-prose strong { color: var(--navy); }
.st-formula { background: var(--bg2); border-radius: var(--r-sm); padding: 16px 20px; font-weight: 700; color: var(--navy); }
.st-table { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--white); }
.st-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.st-table th, .st-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.st-table tr:last-child td { border-bottom: 0; }
.st-table th { background: var(--bg2); color: var(--navy); font-weight: 700; }

/* «Коротко»: первый абзац статьи - короткий ответ на вопрос из поиска */
.st-prose > p:first-child { position: relative; font-size: 20px; line-height: 1.6; color: var(--navy); font-weight: 500; padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); }
.st-prose > p:first-child::before { content: "Коротко: "; font-weight: 700; color: var(--navy); }

/* ползунок «сколько клиентов можно потерять» */
.st-raise { margin: 24px 0 32px; padding: 24px; border-radius: var(--r-card); background: var(--navy); color: var(--white); }
.st-raise p { margin: 0; }
.st-raise-q { font-size: 16px; }
.st-raise-q b { font: 700 28px/1.2 "Unbounded", sans-serif; color: var(--orange-light); margin-left: 8px; }
.st-raise input { width: 100%; margin: 16px 0; accent-color: var(--orange); }
.st-raise-a output { font: 700 20px/1.3 "Unbounded", sans-serif; color: var(--white); }
.st-calc-article { padding-top: 64px; padding-bottom: 32px; }
.st-calc-article .st-prose { max-width: var(--col); }

/* готовые тексты сообщений: карточка с кнопкой «Скопировать» */
.st-prose blockquote { position: relative; margin: 16px 0 24px; padding: 20px 20px 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); }
.st-prose blockquote p:last-of-type { margin-bottom: 12px; }
.st-copy { font: 700 14px/1 "Montserrat", sans-serif; color: var(--navy); background: transparent; border: 0; border-radius: var(--r-sm); box-shadow: inset 0 0 0 2px var(--navy); padding: 8px 12px; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.st-copy:hover { background: var(--navy); color: var(--white); }
.st-copy:active { transform: translateY(1px); }

/* ---------- предложение продукта ---------- */
.st-offer { margin-top: 64px; padding: 40px; border-radius: var(--r-card); color: var(--white); }
.st-offer h2 { color: var(--white); font-size: 28px; margin-bottom: 12px; }
.st-offer p { margin-bottom: 24px; }
.st-offer-kicker { font-size: 14px; font-weight: 700; color: var(--orange-light); margin-bottom: 8px !important; }
.st-offer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.st-offer-more { color: var(--white); font-weight: 700; }
.st-offer :focus-visible { outline-color: var(--orange); }

/* ---------- карточки статей ---------- */
.st-more { background: var(--bg2); padding: 64px 0; }
.st-more h2 { font-size: 28px; margin-bottom: 24px; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.st-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); color: var(--text); text-decoration: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.st-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.st-card:active { transform: translateY(-2px); }
.st-card img { border-radius: var(--r-sm); margin-bottom: 8px; }
.st-card b { font-family: "Unbounded", sans-serif; font-size: 16px; line-height: 1.3; color: var(--navy); padding: 0 4px; }
.st-card span { font-size: 14px; color: var(--muted); padding: 0 4px; }
.st-list { padding-top: 48px; padding-bottom: 64px; }
.st-list .st-offer { max-width: var(--col); }

@media (max-width: 960px) {
  .st-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .st-aside { position: static; }
  .st-toc { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
  .st-head { display: block; }
  .st-toc, .st-toc:first-child { border: 1px solid var(--border); }
  .st-toc summary { margin-bottom: 0; pointer-events: auto; padding-right: 32px; }
  .st-toc summary { position: relative; }
  .st-toc summary::after { content: ""; display: block; position: absolute; right: 4px; top: 2px; width: 10px; height: 10px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg); transition: transform .3s var(--ease); }
  .st-toc[open] summary::after { transform: rotate(225deg); top: 8px; }
  .st-toc[open] summary { margin-bottom: 12px; }
  .st-mini { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .st-nav { gap: 16px; }
  .st-nav a[href="/kalkulyator/"] { display: none; }
  .st-head h1 { font-size: 28px; }
  .st-lead { font-size: 16px; }
  .st-prose h2 { font-size: 20px; margin-top: 40px; }
  .st-offer { padding: 24px; }
  .st-offer .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .st-card, .st-toc li a { transition: none; } .st-card:hover { transform: none; } }
