/* ==========================================================================
   ПродАй — блог: лента статей и страница статьи
   ========================================================================== */

.blog,
.article {
  background: var(--paper);
}

/* --- Шапка ленты ----------------------------------------------------------- */

.bhero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(20px, 3vw, 32px);
}

.bhero__inner {
  display: grid;
  gap: 24px;
  align-items: end;
}

.bhero__issue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bhero__issue b {
  color: var(--signal);
  font-weight: 500;
}

.bhero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.bhero__sub {
  max-width: 54ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.55;
}

.bsearch {
  position: relative;
  display: block;
  width: 100%;
}

.bsearch svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.bsearch input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 500 1rem/1.2 var(--body);
}

.bsearch input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(13, 18, 32, 0.08);
}

@media (min-width: 900px) {
  .bhero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  }
}

/* Рубрики */
.bcats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
}

.bcat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 0.9rem/1 var(--body);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bcat:hover {
  border-color: var(--ink);
}

.bcat small {
  color: var(--muted);
  font: 500 0.72rem/1 var(--mono);
}

.bcat[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.bcat[aria-pressed="true"] small {
  color: rgba(255, 255, 255, 0.6);
}

.bcats__count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.86rem;
}

/* --- Карточки статей -------------------------------------------------------- */

.post {
  position: relative;
  min-width: 0;
}

.post__link {
  display: grid;
  align-content: start;
  gap: 16px;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.post__link:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 6px;
  border-radius: var(--radius-lg);
}

.post .bcover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post__link:hover .bcover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -24px rgba(13, 18, 32, 0.45);
}

.post__link:hover .post__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.post__body {
  display: grid;
  align-content: start;
  gap: 10px;
}

.post__cat {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: 500 0.68rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post__title {
  font-family: var(--body);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post__excerpt {
  color: var(--muted);
  line-height: 1.55;
}

.post__meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 3.4vw, 44px) clamp(20px, 2.4vw, 32px);
}

/* Главная статья выпуска */
.post--featured {
  margin-bottom: clamp(36px, 5vw, 64px);
}

.post--featured .post__link {
  gap: clamp(18px, 3vw, 40px);
}

.post--featured .post__title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.post--featured .post__excerpt {
  font-size: 1.05rem;
}

.post--featured .post__body::before {
  content: "Главное в выпуске";
  color: var(--signal);
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .post--featured .post__link {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
  }
}

.bempty {
  padding: 48px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

.bempty b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.1rem;
}

.bempty button {
  margin-top: 14px;
}

.bmore[hidden],
.bempty[hidden],
.post[hidden] {
  display: none;
}

/* Светлые обложки на светлом фоне — с тонкой рамкой */
.bcover--title,
.bcover--phone {
  box-shadow: inset 0 0 0 1px var(--line);
}

.bmore {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* --- Подписка --------------------------------------------------------------- */

.bsub {
  margin: clamp(56px, 8vw, 96px) 0 clamp(56px, 8vw, 96px);
  padding: clamp(28px, 4.4vw, 56px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 122, 24, 0.28), transparent 45%),
    radial-gradient(circle at 10% 100%, rgba(43, 140, 255, 0.24), transparent 45%),
    var(--ink);
  color: #fff;
}

.bsub__inner {
  display: grid;
  gap: 24px;
  align-items: center;
}

.bsub__title {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
}

.bsub__text {
  margin-top: 10px;
  color: var(--muted-dark);
  max-width: 44ch;
}

.bsub__form {
  display: grid;
  gap: 12px;
}

.bsub__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bsub__row input {
  flex: 1 1 220px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: 500 1rem/1.2 var(--body);
}

.bsub__row input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.bsub__row input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.bsub__row input[aria-invalid="true"] {
  border-color: #ff8a80;
}

.bsub__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted-dark);
  font-size: 0.84rem;
  line-height: 1.45;
  cursor: pointer;
}

.bsub__consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--signal);
}

.bsub__consent a {
  color: #fff;
}

.bsub__status {
  min-height: 1.4em;
  font-size: 0.9rem;
}

.bsub__status.is-error {
  color: #ff9a91;
}

.bsub__status.is-ok {
  color: #7ee2b8;
}

@media (min-width: 900px) {
  .bsub__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 48px;
  }
}

/* --- Обложки: CSS-иллюстрации вместо стоковых картинок ---------------------- */

.bcover {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
  container-type: inline-size;
  isolation: isolate;
}

.bcover * {
  box-sizing: border-box;
}

.bcover__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 6cqw 6cqw;
}

.bcover__glow {
  position: absolute;
  z-index: -1;
  width: 70cqw;
  height: 70cqw;
  border-radius: 50%;
  filter: blur(8cqw);
  opacity: 0.55;
}

.bcover__label {
  position: absolute;
  left: 5cqw;
  bottom: 4.5cqw;
  color: rgba(255, 255, 255, 0.55);
  font: 500 2.2cqw/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* AI проверяет карточку */
.bcover--ai .bcover__glow { left: -10cqw; top: -30cqw; background: var(--signal); }
.bcover--ai .bcover__glow + .bcover__glow { left: auto; right: -20cqw; top: 10cqw; background: var(--wb); }

.cv-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56cqw;
  padding: 3.4cqw;
  border-radius: 3cqw;
  background: #fff;
  color: var(--ink);
  transform: translate(-50%, -54%) rotate(-3deg);
  box-shadow: 0 4cqw 8cqw rgba(0, 0, 0, 0.35);
}

.cv-card__row {
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 1.6cqw 0;
  border-bottom: 1px solid #e6e9ef;
}

.cv-card__row:last-child {
  border-bottom: 0;
}

.cv-card__row i {
  flex: 1;
  height: 1.8cqw;
  border-radius: 1cqw;
  background: #e3e6ec;
}

.cv-card__row i.is-short { flex: 0.55; }

.cv-tag {
  flex: 0 0 auto;
  padding: 0.6cqw 1.4cqw;
  border-radius: 1cqw;
  font: 600 1.9cqw/1 var(--mono);
}

.cv-tag--ai { background: rgba(255, 122, 24, 0.16); color: #d85a00; }
.cv-tag--ok { background: rgba(31, 170, 110, 0.14); color: #148a57; }
.cv-tag--no { background: rgba(230, 72, 60, 0.12); color: #c43a2f; }

.cv-spark {
  position: absolute;
  right: 12cqw;
  top: 8cqw;
  width: 11cqw;
  height: 11cqw;
  border-radius: 3cqw;
  background: linear-gradient(135deg, var(--signal), var(--wb));
  box-shadow: 0 2cqw 6cqw rgba(255, 122, 24, 0.45);
}

.cv-spark::after {
  content: "";
  position: absolute;
  inset: 25%;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* Название до 60 символов */
.bcover--title {
  background: linear-gradient(160deg, #fdf2fb, #f1f3f7 60%);
}

.bcover--title .bcover__grid {
  background-image:
    linear-gradient(rgba(13, 18, 32, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 18, 32, 0.05) 1px, transparent 1px);
}

.bcover--title .bcover__label { color: rgba(13, 18, 32, 0.5); }

.cv-field {
  position: absolute;
  left: 7cqw;
  right: 7cqw;
  top: 26cqw;
  padding: 3cqw 3.4cqw;
  border: 0.4cqw solid var(--wb);
  border-radius: 2.4cqw;
  background: #fff;
  color: var(--ink);
  font: 600 3.6cqw/1.2 var(--body);
  box-shadow: 0 3cqw 8cqw rgba(203, 17, 171, 0.18);
  white-space: nowrap;
}

.cv-field::after {
  content: "";
  display: inline-block;
  width: 0.4cqw;
  height: 4cqw;
  margin-left: 0.4cqw;
  background: var(--wb);
  vertical-align: -0.6cqw;
}

.cv-field__label {
  position: absolute;
  left: 7cqw;
  top: 18cqw;
  color: var(--muted);
  font: 600 2.6cqw/1 var(--body);
}

.cv-count {
  position: absolute;
  right: 7cqw;
  top: 18cqw;
  color: var(--wb);
  font: 600 2.8cqw/1 var(--mono);
}

.cv-meter {
  position: absolute;
  left: 7cqw;
  right: 7cqw;
  top: 42cqw;
  height: 1.4cqw;
  border-radius: 1cqw;
  background: #e6e9ef;
}

.cv-meter i {
  display: block;
  width: 88%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wb), var(--signal));
}

/* Склады FBO и FBS */
.bcover--warehouse .bcover__glow { left: 20cqw; top: -20cqw; background: var(--vk); }

.cv-box {
  position: absolute;
  top: 17cqw;
  width: 34cqw;
  height: 30cqw;
  padding: 3cqw;
  border-radius: 3cqw;
  border: 0.3cqw solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.cv-box--left { left: 9cqw; }
.cv-box--right { right: 9cqw; border-color: rgba(255, 122, 24, 0.7); background: rgba(255, 122, 24, 0.12); }

.cv-box b {
  display: block;
  font: 700 6cqw/1 var(--display);
  letter-spacing: -0.03em;
}

.cv-box span {
  display: block;
  margin-top: 1.6cqw;
  color: rgba(255, 255, 255, 0.65);
  font: 500 2.3cqw/1.3 var(--body);
}

.cv-box em {
  position: absolute;
  left: 3cqw;
  right: 3cqw;
  bottom: 3cqw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2cqw;
}

.cv-box em::before,
.cv-box em::after,
.cv-box em i {
  content: "";
  height: 6cqw;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.2);
}

.cv-box--right em::before,
.cv-box--right em::after,
.cv-box--right em i {
  background: rgba(255, 122, 24, 0.45);
}

.cv-vs {
  position: absolute;
  left: 50%;
  top: 30cqw;
  display: grid;
  place-items: center;
  width: 9cqw;
  height: 9cqw;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font: 700 2.6cqw/1 var(--display);
  transform: translateX(-50%);
}

/* Остатки на трёх площадках */
.bcover--stock .bcover__glow { left: -20cqw; top: 10cqw; background: var(--oz); }
.bcover--stock .bcover__glow + .bcover__glow { left: auto; right: -25cqw; top: -30cqw; background: var(--wb); }

.cv-tiles {
  position: absolute;
  left: 8cqw;
  right: 8cqw;
  top: 16cqw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3cqw;
}

.cv-tile {
  padding: 3cqw 2.6cqw;
  border-radius: 3cqw;
  background: rgba(255, 255, 255, 0.08);
  border: 0.3cqw solid rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cv-tile span {
  display: inline-grid;
  place-items: center;
  width: 7cqw;
  height: 7cqw;
  border-radius: 2cqw;
  font: 700 2.3cqw/1 var(--body);
}

.cv-tile b {
  display: block;
  margin-top: 3cqw;
  font: 700 7cqw/1 var(--display);
  letter-spacing: -0.04em;
}

.cv-tile small {
  color: rgba(255, 255, 255, 0.55);
  font: 500 2cqw/1 var(--mono);
}

.cv-tile--vk span { background: var(--vk); }
.cv-tile--wb span { background: var(--wb); }
.cv-tile--oz span { background: #5b50ff; }

.cv-sync {
  position: absolute;
  left: 8cqw;
  right: 8cqw;
  top: 47cqw;
  height: 0.5cqw;
  background: repeating-linear-gradient(90deg, var(--signal) 0 3cqw, transparent 3cqw 5cqw);
}

/* Ключ API */
.bcover--key {
  background: linear-gradient(150deg, #10192e, #0d1220 55%, #1a1230);
}

.bcover--key .bcover__glow { right: -10cqw; top: -30cqw; background: #5b50ff; }

/* Ключ: кольцо, стержень и две бородки */
.cv-key {
  position: absolute;
  left: 8cqw;
  top: 18cqw;
  width: 18cqw;
  height: 18cqw;
  border-radius: 50%;
  border: 3cqw solid var(--signal);
}

.cv-key::before,
.cv-key::after {
  content: "";
  position: absolute;
  background: var(--signal);
  border-radius: 0.6cqw;
}

.cv-key::before {
  left: calc(100% + 2.6cqw);
  top: calc(50% - 1.5cqw);
  width: 18cqw;
  height: 3cqw;
}

.cv-key::after {
  left: calc(100% + 14cqw);
  top: calc(50% + 1cqw);
  width: 3cqw;
  height: 5cqw;
  box-shadow: -5cqw 0 0 var(--signal);
}

.cv-secret {
  position: absolute;
  right: 7cqw;
  top: 21cqw;
  width: 38cqw;
  padding: 3cqw;
  border-radius: 2.4cqw;
  background: rgba(255, 255, 255, 0.08);
  border: 0.3cqw solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  font: 600 3cqw/1 var(--mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.cv-secret small {
  display: block;
  margin-bottom: 2cqw;
  color: rgba(255, 255, 255, 0.5);
  font: 500 2cqw/1 var(--body);
  letter-spacing: 0;
}

.cv-lock {
  position: absolute;
  right: 8cqw;
  top: 38cqw;
  color: #7ee2b8;
  font: 600 2.4cqw/1 var(--body);
}

/* Инфографика на телефоне */
.bcover--phone {
  background: linear-gradient(160deg, #fff6ee, #f1f3f7 65%);
}

.bcover--phone .bcover__grid {
  background-image:
    linear-gradient(rgba(13, 18, 32, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 18, 32, 0.05) 1px, transparent 1px);
}

.bcover--phone .bcover__label { color: rgba(13, 18, 32, 0.5); }

.cv-phone {
  position: absolute;
  left: 50%;
  top: 6cqw;
  width: 28cqw;
  height: 50cqw;
  padding: 2cqw;
  border-radius: 4.6cqw;
  background: var(--ink);
  transform: translateX(-50%) rotate(6deg);
  box-shadow: 0 4cqw 10cqw rgba(13, 18, 32, 0.3);
}

.cv-phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 3.4cqw;
  background: linear-gradient(170deg, #ffe7d2, #ffd0a8);
}

.cv-phone__screen b {
  position: absolute;
  left: 2.6cqw;
  top: 3cqw;
  right: 2.6cqw;
  color: var(--ink);
  font: 700 3.8cqw/1.05 var(--display);
  letter-spacing: -0.03em;
}

.cv-phone__screen i {
  position: absolute;
  left: 5cqw;
  right: 5cqw;
  top: 17cqw;
  height: 17cqw;
  border-radius: 50% 50% 3cqw 3cqw;
  background: linear-gradient(160deg, #5f7da6, #2d3340);
}

.cv-phone__screen span {
  position: absolute;
  left: 2.6cqw;
  bottom: 3cqw;
  padding: 1cqw 1.8cqw;
  border-radius: 1.4cqw;
  background: var(--ink);
  color: #fff;
  font: 600 2.2cqw/1 var(--body);
}

.cv-rule {
  position: absolute;
  padding: 1.6cqw 2.4cqw;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 2.2cqw/1 var(--body);
  box-shadow: 0 1.6cqw 4cqw rgba(13, 18, 32, 0.12);
  white-space: nowrap;
}

.cv-rule--1 { left: 7cqw; top: 16cqw; }
.cv-rule--2 { right: 7cqw; top: 30cqw; }
.cv-rule--3 { left: 10cqw; top: 44cqw; }

/* Битрикс24 */
.bcover--b24 .bcover__glow { left: 10cqw; top: -30cqw; background: #2fc6f6; }
.bcover--b24 .bcover__glow + .bcover__glow { left: auto; right: -10cqw; top: 20cqw; background: var(--signal); }

.cv-app {
  position: absolute;
  top: 17cqw;
  display: grid;
  place-items: center;
  width: 24cqw;
  height: 24cqw;
  border-radius: 6cqw;
  font: 700 6.4cqw/1 var(--display);
  letter-spacing: -0.03em;
  box-shadow: 0 3cqw 8cqw rgba(0, 0, 0, 0.35);
}

.cv-app--b24 { left: 18cqw; background: #2fc6f6; color: #062a38; }

.cv-app--prod {
  right: 18cqw;
  background: #fff;
}

.cv-app--prod .brand__mark {
  grid-template-columns: repeat(2, 5cqw);
  grid-template-rows: repeat(2, 5cqw);
  gap: 1.2cqw;
}

.cv-app--prod .brand__mark i:nth-child(4) {
  background: var(--signal);
}

.cv-plus {
  position: absolute;
  left: 50%;
  top: 29cqw;
  color: #fff;
  font: 600 6cqw/1 var(--body);
  transform: translate(-50%, -50%);
}

/* --- Страница статьи --------------------------------------------------------- */

.ahero {
  padding: clamp(28px, 5vw, 64px) 0 clamp(24px, 3vw, 36px);
}

.ahero__inner {
  max-width: 860px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.crumbs a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.crumbs a:hover {
  text-decoration: underline;
}

.ahero__title {
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.ahero__lead {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.ameta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.ameta__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
}

.ameta__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
}

.ameta__avatar .brand__mark {
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
}

.ameta__share {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.ashare {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 0.84rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
}

.ashare:hover {
  border-color: var(--ink);
}

.acover {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.alayout {
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 1040px) {
  .alayout {
    grid-template-columns: 240px minmax(0, 720px);
    justify-content: space-between;
    gap: 64px;
  }
}

.atoc {
  display: none;
}

@media (min-width: 1040px) {
  .atoc {
    position: sticky;
    top: 96px;
    display: block;
  }
}

.atoc__title {
  margin-bottom: 12px;
  color: var(--muted);
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.atoc ol {
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line-strong);
}

.atoc a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}

.atoc a:hover {
  color: var(--text);
}

.atoc a[aria-current="true"] {
  border-left-color: var(--signal);
  color: var(--text);
  font-weight: 650;
}

/* Текст статьи */
.prose {
  min-width: 0;
  color: #232b3a;
  font-size: 1.08rem;
  line-height: 1.72;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  color: var(--text);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 96px;
}

.prose h3 {
  margin-top: 1.8em;
  color: var(--text);
  font-family: var(--body);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.5em;
  padding-left: 1.3em;
}

.prose ul {
  list-style: none;
  padding-left: 0;
}

.prose ul li {
  position: relative;
  padding-left: 1.4em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--signal);
}

.prose ol {
  list-style: decimal;
}

.prose ol li::marker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.9em;
}

.prose a {
  color: var(--text);
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--text);
}

.prose code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: #e6e9ef;
  font-family: var(--mono);
  font-size: 0.86em;
}

.callout {
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 4px solid var(--signal);
  background: var(--surface);
  font-size: 1rem;
  line-height: 1.6;
}

.callout b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.compare {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .compare {
    grid-template-columns: 1fr 1fr;
  }
}

.compare div {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.98rem;
  line-height: 1.55;
}

.compare b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare .is-bad b { color: #c43a2f; }
.compare .is-good b { color: #148a57; }

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.prose th,
.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.prose tr:last-child td {
  border-bottom: 0;
}

/* Призыв в конце статьи */
.acta {
  display: grid;
  gap: 18px;
  margin-top: 3em;
  padding: clamp(22px, 3.4vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
}

.acta__title {
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.2;
}

.acta p {
  color: var(--muted-dark);
  font-size: 1rem;
}

.acta .btn {
  justify-self: start;
}

.arelated {
  padding: clamp(56px, 8vw, 96px) 0;
}

.arelated__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 28px;
}

.arelated__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.arelated__head a {
  color: var(--text);
  font-weight: 650;
}
