/* st89.ru — внутренние страницы в стиле главной (дополнение к style.css).
   Только чёрный, белый, серый и красный акцент. Все углы прямоугольные. */
*,*::before,*::after{border-radius:0!important}

/* заголовки разделов внутри текста */
.sec>h2{font-size:clamp(30px,3vw,44px);margin-bottom:18px}
.sec>h2+p{color:var(--g);font-size:17px;max-width:760px;line-height:1.55}
.prose h2{font-size:clamp(26px,2.3vw,34px);line-height:1.08;font-weight:500;letter-spacing:-.035em;margin:clamp(36px,3.6vw,56px) 0 18px}
.prose>h2:first-child{margin-top:0}
.prose h3{font-size:22px;margin:28px 0 12px}
.prose strong{font-weight:500;color:var(--ink)}
.prose ul,.prose ol:not(.steps){padding-left:22px;list-style:disc}
.prose ol:not(.steps){list-style:decimal}
.prose li+li{margin-top:8px}

/* нумерованные шаги — как список в макете: моноширинный номер и линия сверху */
ol.steps{list-style:none;margin-top:18px;padding:0;counter-reset:st}
ol.steps[start="2"]{counter-reset:st 1}
ol.steps[start="3"]{counter-reset:st 2}
ol.steps[start="4"]{counter-reset:st 3}
ol.steps[start="5"]{counter-reset:st 4}
ol.steps[start="6"]{counter-reset:st 5}
ol.steps[start="7"]{counter-reset:st 6}
ol.steps>li{counter-increment:st;position:relative;padding:16px 0 16px 52px;border-top:1px solid var(--rule);font-size:17px;line-height:1.55;color:#2A2A2A}
ol.steps>li::before{position:absolute;left:0;top:16px}
ol.steps>li:last-child{border-bottom:1px solid var(--rule)}
ol.steps>li::before{content:counter(st,decimal-leading-zero);font-family:var(--m);font-size:14px;color:var(--g2);line-height:1.9}
ol.steps a{border-bottom:1px solid currentColor}

/* примечание — красная черта слева, как .note на /ofd/ */
.note{font-size:17px}
.note a{border-bottom:1px solid currentColor}
.sec>.note,.note+.sec{margin-top:clamp(32px,3.4vw,48px)}

/* кнопки в тексте */
.row-cta{margin-top:28px;gap:12px}
.phead .row-cta{margin-top:28px}
.prose .btn{margin-top:8px}

/* сетка карточек товаров/услуг — как .sgrid на главной */
.grid{display:grid;border-top:1px solid var(--ink)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid>.card{padding:32px 32px 34px;border-bottom:1px solid var(--rule);display:flex;flex-direction:column;min-width:0}
.grid-3>.card:nth-child(3n+1),.grid-2>.card:nth-child(2n+1){padding-left:0}
.grid-3>.card:nth-child(3n),.grid-2>.card:nth-child(2n){padding-right:0}
.grid-3>.card:not(:nth-child(3n+1)),.grid-2>.card:not(:nth-child(2n+1)){border-left:1px solid var(--rule)}
.card h2,.card h3{font-size:24px;font-weight:500;letter-spacing:-.03em;line-height:1.15;margin-top:4px}
.card p{font-size:15.5px;color:var(--g);margin-top:12px;line-height:1.5}
.card p a:not(.btn){color:var(--ink);border-bottom:1px solid currentColor}
.card .shot{display:block;width:100%;aspect-ratio:4/3;height:auto;object-fit:contain;background:var(--soft);margin-bottom:22px;filter:grayscale(1);mix-blend-mode:multiply;border:0}
.card .price{margin-top:auto;padding-top:24px;font-size:20px;font-weight:500;letter-spacing:-.02em;color:var(--ink);text-transform:none}
.card p:has(> .btn),.card p:has(> a.btn){margin-top:24px}
.card .btn{align-self:flex-start}

/* снимки экрана в инструкциях */
.shot-fig{margin:28px 0 32px;border-top:1px solid var(--ink);padding-top:14px;max-width:960px}
.shot-fig img{display:block;width:100%;height:auto;background:var(--soft);filter:grayscale(1)}
.shot-fig.shot-narrow img{width:auto;max-width:min(100%,26rem)}
.shot-fig figcaption{font-size:14px;color:var(--g);margin-top:12px;line-height:1.5;max-width:760px}

/* список сведений (регистрация ККТ) — как реквизиты */
.defs{border-top:1px solid var(--ink);margin-bottom:28px}
.defs>div{display:grid;grid-template-columns:minmax(180px,1fr) 2fr;gap:24px;padding:22px 0;border-bottom:1px solid var(--rule)}
.defs dt{font-size:14px;color:var(--g)}
.defs dd{margin:0;font-size:19px;font-weight:500;letter-spacing:-.015em;line-height:1.4}

/* таблицы */
table{width:100%;border-collapse:collapse;margin:24px 0;font-size:16px}
caption{text-align:left;font-family:var(--m);font-size:13px;color:var(--g);padding-bottom:10px}
th,td{text-align:left;padding:14px 16px 14px 0;border-bottom:1px solid var(--rule);vertical-align:top}
thead th{border-bottom:1px solid var(--ink);font-family:var(--m);font-weight:400;font-size:13px;color:var(--g);text-transform:uppercase;letter-spacing:.04em}
tbody th{font-family:var(--m);font-weight:400}

@media (max-width:1024px){
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .grid-3>.card:nth-child(3n+1){padding-left:32px;border-left:1px solid var(--rule)}
  .grid-3>.card:nth-child(2n+1){padding-left:0;border-left:0}
  .grid-3>.card:nth-child(3n){padding-right:32px}
  .grid-3>.card:nth-child(2n){padding-right:0}
}
@media (max-width:720px){
  .grid-3,.grid-2{grid-template-columns:1fr}
  .grid>.card,.grid-3>.card:nth-child(n),.grid-2>.card:nth-child(n){padding:26px 0 28px;border-left:0}
  .defs>div{grid-template-columns:1fr;gap:6px}
}

/* если в сетке есть карточки со снимком — у карточек без снимка оставляем такое же место сверху */
.grid:has(> .card > .shot) > .card:not(:has(> .shot))::before{content:"";display:block;width:100%;aspect-ratio:4/3;background:var(--soft);margin-bottom:22px}
/* кнопка карточки прижата к низу, чтобы кнопки в ряду были на одной линии */
.card>p:has(> .btn){margin-top:auto;padding-top:24px}

/* каналы магазина в конце страниц /ofd/ и /ofd/* — красные ссылки столбиком, Onest, прямые углы */
nav.ofd-channels{
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:12px;
  margin-top:clamp(40px,5vw,72px);
  padding-top:24px;
  border-top:1px solid var(--ink);
  font-family:var(--f);
}
nav.ofd-channels a,
nav.ofd-channels a:link,
nav.ofd-channels a:visited{
  display:block;
  color:#FF4A1C !important;
  font-size:19px;
  font-weight:500;
  letter-spacing:-.01em;
  border-bottom:1px solid currentColor;
  padding-bottom:2px;
  text-decoration:none;
}
nav.ofd-channels a:hover,
nav.ofd-channels a:focus-visible,
nav.ofd-channels a:active{
  color:#D63B14 !important;
}

/* ссылки на наши ресурсы: каналы и другие наши сайты. Чужие официальные (ФНС, КриптоПро и т.п.) не трогаем. */
:is(
  a[href*="help.st89.ru"],
  a[href*="bot.st89.ru"],
  a[href*="files.st89.ru"],
  a[href*="posts.st89.ru"],
  a[href*="crm.st89.ru"],
  a[href*="dzen.ru/id/6b0d8690a7f4e71d45950dd5"],
  a[href*="max.ru/id890408297861_biz"],
  a[href*="max.ru/id890408297861_bot"],
  a[href*="t.me/ofdbistro"],
  a[href*="t.me/kktnu"],
  a[href*="t.me/kktcto"],
  a[href*="t.me/kktctogr"],
  a[href*="vk.com/kktnu"],
  a[href*="vk.com/kktcto"]
):not(.btn):not(.primary-btn):not(.nav-toggle):link,
:is(
  a[href*="help.st89.ru"],
  a[href*="bot.st89.ru"],
  a[href*="files.st89.ru"],
  a[href*="posts.st89.ru"],
  a[href*="crm.st89.ru"],
  a[href*="dzen.ru/id/6b0d8690a7f4e71d45950dd5"],
  a[href*="max.ru/id890408297861_biz"],
  a[href*="max.ru/id890408297861_bot"],
  a[href*="t.me/ofdbistro"],
  a[href*="t.me/kktnu"],
  a[href*="t.me/kktcto"],
  a[href*="t.me/kktctogr"],
  a[href*="vk.com/kktnu"],
  a[href*="vk.com/kktcto"]
):not(.btn):not(.primary-btn):not(.nav-toggle):visited{
  color:#FF4A1C !important;
}
:is(
  a[href*="help.st89.ru"],
  a[href*="bot.st89.ru"],
  a[href*="files.st89.ru"],
  a[href*="posts.st89.ru"],
  a[href*="crm.st89.ru"],
  a[href*="dzen.ru/id/6b0d8690a7f4e71d45950dd5"],
  a[href*="max.ru/id890408297861_biz"],
  a[href*="max.ru/id890408297861_bot"],
  a[href*="t.me/ofdbistro"],
  a[href*="t.me/kktnu"],
  a[href*="t.me/kktcto"],
  a[href*="t.me/kktctogr"],
  a[href*="vk.com/kktnu"],
  a[href*="vk.com/kktcto"]
):not(.btn):not(.primary-btn):not(.nav-toggle):hover,
:is(
  a[href*="help.st89.ru"],
  a[href*="bot.st89.ru"],
  a[href*="files.st89.ru"],
  a[href*="posts.st89.ru"],
  a[href*="crm.st89.ru"],
  a[href*="dzen.ru/id/6b0d8690a7f4e71d45950dd5"],
  a[href*="max.ru/id890408297861_biz"],
  a[href*="max.ru/id890408297861_bot"],
  a[href*="t.me/ofdbistro"],
  a[href*="t.me/kktnu"],
  a[href*="t.me/kktcto"],
  a[href*="t.me/kktctogr"],
  a[href*="vk.com/kktnu"],
  a[href*="vk.com/kktcto"]
):not(.btn):not(.primary-btn):not(.nav-toggle):focus-visible,
:is(
  a[href*="help.st89.ru"],
  a[href*="bot.st89.ru"],
  a[href*="files.st89.ru"],
  a[href*="posts.st89.ru"],
  a[href*="crm.st89.ru"],
  a[href*="dzen.ru/id/6b0d8690a7f4e71d45950dd5"],
  a[href*="max.ru/id890408297861_biz"],
  a[href*="max.ru/id890408297861_bot"],
  a[href*="t.me/ofdbistro"],
  a[href*="t.me/kktnu"],
  a[href*="t.me/kktcto"],
  a[href*="t.me/kktctogr"],
  a[href*="vk.com/kktnu"],
  a[href*="vk.com/kktcto"]
):not(.btn):not(.primary-btn):not(.nav-toggle):active{
  color:#D63B14 !important;
}
