/* Раздел «Статьи»: список-«листы чертежа» и страница статьи (шпаргалка цифр, оглавление-шахта, таблицы-карточки, слово мастера). Префикс .k-st- */

/* ---------- Список статей ---------- */
.k-st-top { padding: 20px 0 40px; background: linear-gradient(var(--paper), rgba(251, 252, 250, .6) 70%, var(--paper)), repeating-linear-gradient(0deg, transparent 0 31px, rgba(0, 128, 74, .07) 31px 32px), repeating-linear-gradient(90deg, transparent 0 31px, rgba(0, 128, 74, .07) 31px 32px), var(--paper); }
.k-st-top__grid { display: grid; gap: 22px; }
.k-st-top .k-h1 { font-size: clamp(36px, 5vw, 68px); margin-bottom: 16px; max-width: 860px; }
.k-st-top__lead { font-size: 19px; line-height: 1.6; color: var(--ink-3); max-width: 640px; }
.k-st-rub { display: flex; gap: 12px; margin: 0 -16px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.k-st-rub::-webkit-scrollbar { display: none; }
.k-st-rub button { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); font: 700 16px/1 var(--f-b); transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.k-st-rub button b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--g-ll); color: var(--g-dd); font: 700 14px/1 var(--f-h); }
.k-st-rub button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.k-st-rub button[aria-pressed="true"] b { background: var(--g-btn); color: var(--white); }
.k-st-rub button:hover { background: var(--ink-3); color: var(--white); }
.k-st-ask { display: none; padding: 20px; border-radius: var(--r); background: var(--ink); color: var(--white); }
.k-st-ask__t { margin-bottom: 6px; font: 700 22px/1.2 var(--f-h); }
.k-st-ask__x { margin-bottom: 16px; font-size: 17px; line-height: 1.5; color: #cfc6c2; }
.k-st-ask__btns { display: grid; gap: 12px; }
.k-st-ask .k-btn { padding: 0 20px; white-space: nowrap; }
.k-st-ask .k-btn--line { border-color: var(--white); color: var(--white); }
.k-st-ask .k-btn--line:hover { background: var(--white); color: var(--ink); }

.k-st-listsec { padding: 8px 0 var(--pad); }
.k-st-list { display: grid; gap: 18px; }
.k-st-list[data-empty] { display: none; }

/* Карточка — лист чертежа: рамка, обложка, вопрос, короткий ответ, штамп */
.k-st-sheet { position: relative; display: flex; flex-direction: column; padding: 10px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--white); color: var(--ink); text-decoration: none; box-shadow: 6px 6px 0 var(--g-l); transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
.k-st-sheet[hidden] { display: none; }
.k-st-sheet:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--g); }
.k-st-sheet__pic { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid var(--ink); background: var(--stone); }
.k-st-sheet__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.k-st-sheet:hover .k-st-sheet__pic img { transform: scale(1.05); }
.k-st-sheet__no { position: absolute; left: 0; top: 0; padding: 8px 12px; background: var(--ink); color: var(--white); font: 700 14px/1 var(--f-h); letter-spacing: .06em; }
.k-st-sheet__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 8px 16px; }
.k-st-sheet__t { font: 700 clamp(22px, 2.2vw, 26px)/1.15 var(--f-h); }
.k-st-sheet__a { font-size: 17px; line-height: 1.55; color: var(--mute); }
.k-st-sheet__a b { color: var(--ink); }
.k-st-sheet__go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-weight: 800; color: var(--g-d); }
.k-st-sheet:hover .k-st-sheet__go .k-i { transform: translateX(4px); }
.k-st-sheet__go .k-i { transition: transform var(--t) var(--ease-out); }
.k-st-stamp { display: grid; grid-template-columns: 1.4fr 1fr .8fr; border: 1px solid var(--ink); font-size: 13px; line-height: 1.2; }
.k-st-stamp span { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-left: 1px solid var(--ink); }
.k-st-stamp span:first-child { border-left: 0; }
.k-st-stamp small { font: 600 11px/1 var(--f-h); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.k-st-stamp b { font: 700 15px/1.15 var(--f-h); }

/* Короткие ответы: вопрос → раздел статьи */
.k-st-quick { background: var(--ink); color: var(--white); }
.k-st-quick__grid { display: grid; gap: 28px; }
.k-st-quick .k-h2 { color: var(--white); }
.k-st-quick__list { display: grid; gap: 1px; background: var(--ink-3); border: 1px solid var(--ink-3); border-radius: 16px; overflow: hidden; }
.k-st-quick__list a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px; min-height: 64px; padding: 16px 18px; background: var(--ink-2); color: var(--white); text-decoration: none; transition: background-color var(--t-fast) var(--ease-out); }
.k-st-quick__list a:hover { background: var(--ink-3); }
.k-st-quick__list b { font: 700 18px/1.25 var(--f-h); }
.k-st-quick__list span { grid-column: 1; font-size: 16px; line-height: 1.45; color: #cfc6c2; }
.k-st-quick__list i { grid-row: 1 / span 2; grid-column: 2; font: 800 22px/1 var(--f-h); font-style: normal; color: #8ff0bf; white-space: nowrap; }

/* ---------- Статья: шапка ---------- */
.k-st-head { padding: 20px 0 36px; background: radial-gradient(110% 70% at 90% 10%, var(--g-ll) 0%, rgba(238, 249, 243, 0) 60%), var(--paper); }
.k-st-head__grid { display: grid; gap: 24px; }
.k-st-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.k-st-meta li { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 15px; font-weight: 700; color: var(--ink-3); }
.k-st-meta li:first-child { border-color: var(--ink); background: var(--ink); color: var(--white); }
.k-st-head .k-h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.04; margin-bottom: 18px; }
.k-st-lead { font-size: 20px; line-height: 1.6; color: var(--ink-2); max-width: 700px; }
.k-st-lead b { color: var(--ink); }
.k-st-cover { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 3 / 2; background: var(--stone); box-shadow: var(--sh); }
.k-st-cover img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.k-st-cover figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(23, 19, 18, .84); color: #e7e0dd; font-size: 14px; line-height: 1.4; }

/* Шпаргалка: цифры статьи с источником */
.k-st-cheat { padding: 0 0 8px; }
.k-st-cheat__box { padding: 20px 16px; border-radius: var(--r); background: var(--ink); color: var(--white); }
.k-st-cheat__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 16px; }
.k-st-cheat__head p { font: 700 14px/1.2 var(--f-h); text-transform: uppercase; letter-spacing: .1em; color: #9fe3c2; }
.k-st-cheat__head span { font-size: 15px; color: #cfc6c2; }
.k-st-cheat__list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.k-st-cheat__list li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--ink-3); }
.k-st-cheat__list b { font: 800 clamp(28px, 3.2vw, 40px)/1 var(--f-h); color: #8ff0bf; }
.k-st-cheat__list span { font-size: 16px; line-height: 1.35; color: var(--white); }
.k-st-cheat__list small { font-size: 13px; line-height: 1.3; color: #b9b0ac; }

/* ---------- Статья: оглавление-шахта и текст ---------- */
.k-st-main { padding: 40px 0 var(--pad); }
.k-st-layout { display: grid; gap: 28px; }
.k-st-toc { align-self: start; }
.k-st-toc > p:first-child { margin-bottom: 10px; font: 700 14px/1 var(--f-h); text-transform: uppercase; letter-spacing: .1em; color: var(--g-d); }
.k-st-toc ol { position: relative; display: grid; padding: 0 14px 18px; background: linear-gradient(90deg, #c9cbc4 0 12px, transparent 12px calc(100% - 12px), #c9cbc4 calc(100% - 12px)); border-radius: 0 0 8px 8px; }
.k-st-toc ol::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 18px; background: linear-gradient(180deg, #7ec9cf, #2f7c86); }
.k-st-toc li { border-bottom: 2px solid #9fa199; }
.k-st-toc li:first-child { border-top: 2px solid #9fa199; }
.k-st-toc a { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.3; transition: background-color var(--t-fast) var(--ease-out); }
.k-st-toc a i { font: 700 14px/1 var(--f-h); font-style: normal; color: var(--g-d); }
.k-st-toc a:hover, .k-st-toc a.is-on { background: var(--g-ll); }
.k-st-toc__depth { margin-top: 8px; font-size: 14px; color: var(--mute); }

.k-st-body { min-width: 0; max-width: 780px; }
.k-st-body > p, .k-st-body li { font-size: 18px; line-height: 1.7; color: #3a3532; }
.k-st-body > p { margin-bottom: 16px; }
.k-st-body a:not(.k-btn) { color: var(--g-d); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.k-st-h2 { margin: 48px 0 14px; font: 700 clamp(26px, 3vw, 38px)/1.12 var(--f-h); letter-spacing: -.01em; scroll-margin-top: 20px; }
.k-st-body > .k-st-h2:first-child { margin-top: 0; }
.k-st-h3 { margin: 28px 0 10px; font: 700 clamp(20px, 2vw, 24px)/1.2 var(--f-h); }
.k-st-body > p.k-st-ans { padding-left: 16px; border-left: 4px solid var(--g); font-size: 19px; color: var(--ink); }
.k-st-list2 { display: grid; gap: 10px; margin: 0 0 18px; counter-reset: sl; }
.k-st-list2 li { position: relative; padding-left: 44px; counter-increment: sl; }
.k-st-list2 li::before { content: counter(sl); position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--white); font: 700 15px/1 var(--f-h); }
.k-st-list2--dot li::before { content: ""; top: 11px; width: 12px; height: 12px; border-radius: 3px; background: var(--g); left: 8px; }

/* Таблицы: на телефоне — карточки «колонка: значение» */
.k-st-tbl { margin: 8px 0 22px; }
.k-st-tbl table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.k-st-tbl caption { margin-bottom: 10px; text-align: left; font: 700 15px/1.3 var(--f-h); text-transform: uppercase; letter-spacing: .06em; color: var(--g-d); }
.k-st-tbl thead { display: none; }
.k-st-tbl tr { display: grid; gap: 4px; margin-bottom: 8px; padding: 14px 16px; border-radius: 14px; background: var(--stone); }
.k-st-tbl td, .k-st-tbl th { display: block; padding: 0; text-align: left; }
.k-st-tbl tbody th { font: 700 17px/1.3 var(--f-h); color: var(--ink); }
.k-st-tbl td::before { content: attr(data-l) ": "; font-weight: 700; color: var(--mute); }
.k-st-tbl td.k-st-num { font: 800 18px/1.3 var(--f-h); color: var(--g-d); }
.k-st-tbl__src { margin-top: -10px; margin-bottom: 22px; font-size: 14px; line-height: 1.5; color: var(--mute); }

/* Иллюстрации */
.k-st-fig { margin: 10px 0 26px; }
.k-st-fig img { width: 100%; height: auto; border-radius: 16px; background: var(--stone); cursor: zoom-in; }
.k-st-fig figcaption { position: relative; margin-top: 10px; padding-left: 24px; font-size: 16px; line-height: 1.5; color: var(--mute); }
.k-st-fig figcaption::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 3px; background: var(--g); }
.k-st-fig--pair { display: grid; gap: 10px; }
.k-st-fig--pair figure { margin: 0; }
.k-st-fig--real figcaption b { color: var(--ink); }

/* Врезки */
.k-st-note { margin: 18px 0 24px; padding: 18px 20px; border-radius: 16px; background: var(--g-ll); font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.k-st-note b:first-child { display: block; margin-bottom: 4px; font: 700 15px/1.2 var(--f-h); text-transform: uppercase; letter-spacing: .08em; color: var(--g-dd); }
.k-st-note--warn { background: #fff3e2; }
.k-st-note--warn b:first-child { color: #8a4b00; }

/* Слово мастера — бланк наряда */
.k-st-master { margin: 30px 0; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--white); box-shadow: 6px 6px 0 var(--g-l); }
.k-st-master__top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--ink); color: var(--white); }
.k-st-master__mono { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 10px; background: var(--g-btn); font: 800 24px/1 var(--f-h); color: var(--white); }
.k-st-master__top b { display: block; font: 700 18px/1.2 var(--f-h); }
.k-st-master__top div span { font-size: 14px; color: #cfc6c2; }
.k-st-master blockquote { margin: 0; padding: 18px 18px 6px; }
.k-st-master blockquote p { margin-bottom: 12px; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.k-st-master__foot { padding: 0 18px 16px; font-size: 14px; color: var(--mute); }

/* Переход к услуге */
.k-st-cta { display: grid; gap: 14px; margin: 30px 0; padding: 20px; border-radius: var(--r); background: var(--g-btn); color: var(--white); }
.k-st-cta p { font: 700 clamp(22px, 2.4vw, 28px)/1.2 var(--f-h); }
.k-st-cta span { font-size: 17px; line-height: 1.5; }
.k-st-cta__btns { display: grid; gap: 12px; }
.k-st-cta .k-btn--dark { background: var(--white); color: var(--ink); }
.k-st-cta .k-btn--dark:hover { background: var(--g-ll); }
.k-st-cta .k-btn--ghost { border-color: var(--white); color: var(--white); }
.k-st-cta .k-btn--ghost:hover { background: rgba(255, 255, 255, .14); }

/* Схема-план и разрезы кодом */
.k-st-plan { margin: 10px 0 26px; padding: 14px; border-radius: 16px; background: var(--stone); }
.k-st-plan svg { display: block; width: 100%; height: auto; }
.k-st-plan figcaption { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--mute); }
.k-st-plan text { font-family: var(--f-b); }

/* Проверка места и разбор банки: кнопки-ответы и вывод */
.k-st-tool { margin: 18px 0 28px; padding: 18px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--white); }
.k-st-tool__h { margin-bottom: 4px; font: 700 20px/1.2 var(--f-h); }
.k-st-tool__sub { margin-bottom: 14px; font-size: 16px; line-height: 1.5; color: var(--mute); }
.k-st-tool__opts { display: grid; gap: 8px; }
.k-st-tool__opts label { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 56px; padding: 14px 14px 14px 52px; border-radius: 12px; background: var(--stone); font-size: 17px; line-height: 1.35; cursor: pointer; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.k-st-tool__opts input { position: absolute; opacity: 0; pointer-events: none; }
.k-st-tool__opts label::before { content: ""; position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 7px; background: var(--white); }
.k-st-tool__opts--radio label::before { border-radius: 50%; }
.k-st-tool__opts label:has(input:checked) { background: var(--ink); color: var(--white); }
.k-st-tool__opts label:has(input:checked)::before { border-color: var(--g); background: var(--g) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.k-st-tool__opts label:has(input:focus-visible) { outline: 3px solid var(--g); outline-offset: 2px; }
.k-st-tool__out { margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--g-ll); font-size: 17px; line-height: 1.55; animation: k-up .35s var(--ease); }
.k-st-tool__out b { display: block; margin-bottom: 4px; font: 700 19px/1.25 var(--f-h); }
.k-st-tool__out.is-bad { background: #fff3e2; }
.k-st-tool__out p + p { margin-top: 6px; }
.k-st-tool__cta { display: grid; gap: 12px; margin-top: 12px; }

/* Калькулятор колец в статье */
.k-st-calc { display: grid; gap: 16px; margin: 18px 0 28px; padding: 18px; border-radius: var(--r); background: var(--ink); color: var(--white); }
.k-st-calc .k-field__label { color: var(--white); }
.k-st-calc__form { display: grid; gap: 22px; align-content: start; }
.k-st-calc__side { display: grid; gap: 14px; align-content: start; }
.k-st-calc .k-step { color: var(--ink); }
.k-st-calc .k-field__val { color: #8ff0bf; }
.k-st-calc .k-field__hint { color: #cfc6c2; }
.k-st-calc__seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.k-st-calc__seg label { position: relative; display: grid; place-items: center; min-height: 56px; padding: 8px 10px; border-radius: 12px; background: var(--ink-3); text-align: center; font-size: 16px; line-height: 1.25; cursor: pointer; transition: background-color var(--t-fast) var(--ease-out); }
.k-st-calc__seg input { position: absolute; opacity: 0; pointer-events: none; }
.k-st-calc__seg label:has(input:checked) { background: var(--g-btn); }
.k-st-calc__seg label:has(input:focus-visible) { outline: 3px solid #8ff0bf; outline-offset: 2px; }
.k-st-calc__out { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: var(--ink-2); }
.k-st-calc__svg { width: 100%; height: auto; }
.k-st-calc__res dl { display: grid; gap: 8px; }
.k-st-calc__res div { display: flex; flex-direction: column; }
.k-st-calc__res dt { font-size: 14px; color: #cfc6c2; }
.k-st-calc__res dd { margin: 0; font: 800 24px/1.1 var(--f-h); color: var(--white); }
.k-st-calc__res dd.is-g { color: #8ff0bf; font-size: 28px; }
.k-st-calc__note { font-size: 15px; line-height: 1.5; color: #cfc6c2; }
.k-st-calc__cta { display: grid; gap: 12px; }
.k-st-calc .k-btn--line { border-color: var(--white); color: var(--white); }
.k-st-calc .k-btn--line:hover { background: var(--white); color: var(--ink); }
.k-st-calc .k-range input { touch-action: none; }

/* Читайте также */
.k-st-more { background: var(--stone); }
.k-st-more__grid { display: grid; gap: 18px; }

/* ---------- Компьютер и планшет ---------- */
@media (min-width: 700px) {
	.k-st-list { grid-template-columns: 1fr 1fr; }
	.k-st-more__grid { grid-template-columns: 1fr 1fr; }
	.k-st-cheat__box { padding: 26px; }
	.k-st-cheat__list { grid-template-columns: repeat(3, 1fr); }
	.k-st-tbl thead { display: table-header-group; }
	.k-st-tbl tr { display: table-row; margin: 0; padding: 0; background: none; }
	.k-st-tbl td, .k-st-tbl th { display: table-cell; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
	.k-st-tbl thead th { padding-top: 0; font: 600 13px/1.2 var(--f-h); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); border-bottom: 2px solid var(--ink); }
	.k-st-tbl td::before { content: none; }
	.k-st-tbl td:first-child, .k-st-tbl th:first-child { padding-left: 0; }
	.k-st-tbl tbody th { font-size: 16px; }
	.k-st-fig--pair { grid-template-columns: 1fr 1fr; }
	.k-st-cta { grid-template-columns: 1fr auto; align-items: center; padding: 26px 28px; }
	.k-st-tool__opts--two { grid-template-columns: 1fr 1fr; }
	.k-st-tool__cta, .k-st-ask__btns { grid-template-columns: auto auto; justify-content: start; }
	.k-st-calc { padding: 26px; }
	.k-st-calc__out { grid-template-columns: 160px 1fr; }
	.k-st-quick__list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
	.k-st-top { padding: 28px 0 56px; }
	.k-st-top__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px 48px; align-items: end; }
	.k-st-rub { grid-column: 1 / -1; flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
	.k-st-ask { display: block; }
	.k-st-list { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	.k-st-more__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	.k-st-head { padding: 28px 0 48px; }
	.k-st-head__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
	.k-st-cheat__list { grid-template-columns: repeat(6, 1fr); }
	.k-st-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 64px; }
	.k-st-quick__grid { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
	.k-st-calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
	.k-st-sheet, .k-st-sheet__pic img, .k-st-tool__out { transition: none; animation: none; }
}
