:root {
  color-scheme: light;
  --bg: #f8f8f8;
  --paper: #ffffff;
  --ink: #0b0b0d;
  --muted: #5d5d63;
  --soft: #ededed;
  --line: #dedede;
  --red: #e51b20;
  --red-dark: #c41518;
  --blue: #229ed9;
  --radius: 5px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.wrap {
  width: min(1160px, calc(100% - 80px));
  margin: 0 auto;
}

.top-strip {
  background: var(--bg);
}

.top-strip__inner {
  min-height: 53px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 0 0 14px 14px;
  background: #464646;
  color: #f2f2f2;
  padding: 0 38px;
  font-size: 16px;
}

.top-strip__login {
  margin-left: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 248, 248, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  height: 112px;
  display: flex;
  align-items: center;
  gap: 44px;
}

.brand img {
  width: 155px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3vw, 46px);
  flex: 1;
  /* Меню во всю высоту шапки — вместе с пунктами: тогда выпадающая панель
     начинается ровно под шапкой и по дороге к ней нет зазора. */
  align-self: stretch;
  color: #242424;
  font-size: 15px;
}

.nav a,
.mobile-nav a {
  transition: color 0.18s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--red);
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  /* На всю высоту шапки: тогда панель, отсчитанная от низа пункта, примыкает
     к ней вплотную и курсор не проваливается в зазор по дороге к списку. */
  align-self: stretch;
}

.nav__item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__caret {
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.55;
  transition: transform 0.18s ease;
}

.nav__item--drop:hover .nav__caret {
  transform: rotate(225deg) translateY(2px);
}

/* Появление как на core247.kz: проявление со сдвигом вниз, 0.3s.
   Прячем через display, а не прозрачностью: иначе браузер тянет иконки меню
   с чужого хранилища на каждой странице, даже если меню не открывали.
   Анимацию при этом даёт `display ... allow-discrete` + `@starting-style`. */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 234px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.16);
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 1px;
  z-index: 40;
  opacity: 0;
  transform: translate(-50%, -20px);
  transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s allow-discrete;
}

.dropdown--wide {
  min-width: 470px;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
}

.nav__item--drop:hover > .dropdown,
.nav__item--drop:focus-within > .dropdown {
  display: grid;
  opacity: 1;
  transform: translate(-50%, 0);
}

@starting-style {
  .nav__item--drop:hover > .dropdown,
  .nav__item--drop:focus-within > .dropdown {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 14px;
  color: #242424;
  white-space: nowrap;
}

/* Иконки пунктов — те же файлы, что на core247.kz. */
.dropdown__icon {
  width: 28px;
  height: 28px;
  flex: none;
}

.dropdown a:hover {
  background: #f4f4f4;
  color: var(--red);
}

/* Мега-меню «Услуги» и «Решения» — повторяет оригинал core247.kz:
   слева вкладки-разделы, справа заголовок раздела и карточки услуг.
   Переключение вкладок — на радиокнопках, без JS (как в оригинале). */
.nav__item--mega {
  position: static;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 0.18s ease;
}

.nav__item--mega:hover .nav__link,
.nav__item--mega:focus-within .nav__link {
  color: var(--red);
}

.nav__item--mega:hover .nav__caret,
.nav__item--mega:focus-within .nav__caret {
  transform: rotate(225deg) translateY(2px);
}

/* мост под пунктом: курсор не «проваливается» в зазор до панели */
.mega {
  position: absolute;
  /* Вплотную к шапке — иначе курсор по дороге к панели попадает в зазор
     и меню схлопывается (как было до этого на 12px отступе). */
  top: 100%;
  left: 50%;
  width: min(1120px, calc(100vw - 48px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.17);
  padding: 18px;
  display: none;
  z-index: 40;
  opacity: 0;
  transform: translate(-50%, -20px);
  transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s allow-discrete;
}

.nav__item--mega:hover > .mega,
.nav__item--mega:focus-within > .mega {
  display: block;
  opacity: 1;
  transform: translate(-50%, 0);
}

@starting-style {
  .nav__item--mega:hover > .mega,
  .nav__item--mega:focus-within > .mega {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

.mega__tabs {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 0 26px;
  align-items: start;
}

.mega__radio {
  display: none;
}

.mega__tab {
  grid-column: 1;
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  color: #242424;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.mega__tab:hover {
  background: #f4f4f4;
  color: var(--red);
}

.mega__radio:checked + .mega__tab {
  background: #f4f4f4;
  color: var(--red);
  font-weight: 600;
}

.mega__panel {
  grid-column: 2;
  grid-row: 1 / span 40;
  display: none;
  border-left: 1px solid var(--line);
  padding-left: 26px;
  min-height: 260px;
}

#svc1:checked ~ #svcpanel1,
#svc2:checked ~ #svcpanel2,
#svc3:checked ~ #svcpanel3,
#svc4:checked ~ #svcpanel4,
#svc5:checked ~ #svcpanel5,
#svc6:checked ~ #svcpanel6,
#svc7:checked ~ #svcpanel7,
#svc8:checked ~ #svcpanel8,
#svc9:checked ~ #svcpanel9,
#sol1:checked ~ #solpanel1,
#sol2:checked ~ #solpanel2,
#sol3:checked ~ #solpanel3,
#sol4:checked ~ #solpanel4,
#sol5:checked ~ #solpanel5,
#sol6:checked ~ #solpanel6 {
  display: block;
}

.mega__title {
  margin: 2px 0 6px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.mega__descr {
  margin: 0 0 16px;
  max-width: 620px;
  color: #5d5d63;
  font-size: 14px;
  line-height: 1.45;
}

.mega__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.mega__card {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  transition: background 0.16s ease;
}

.mega__card:hover {
  background: #f4f4f4;
}

.mega__card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Иконки услуг — те же файлы, что на core247.kz (бакет клиента). */
.mega__card-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.mega__card-title {
  display: block;
  color: #242424;
  font-size: 14px;
  font-weight: 600;
}

.mega__card:hover .mega__card-title {
  color: var(--red);
}

.mega__card-descr {
  display: block;
  margin-top: 3px;
  padding-left: 31px;
  color: #6d6d73;
  font-size: 12.5px;
  line-height: 1.4;
}

.mega__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 22px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-size: 14px;
  transition: background 0.18s ease;
}

.mega__button:hover {
  background: var(--red-dark);
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 32px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-size: 15px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.contact-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.mobile-nav {
  display: none;
}

.app {
  min-height: 58vh;
}

.hero {
  padding: 104px 0 48px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 34px;
  color: #151515;
  font-size: 16px;
}

.breadcrumbs a:hover {
  color: var(--red);
}

.hero h1,
.article h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0;
}

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 78px auto 48px;
}

.filter {
  min-height: 36px;
  border: 1px solid #101010;
  border-radius: 999px;
  background: transparent;
  color: #111;
  padding: 0 20px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.filter:hover,
.filter.is-active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 84px 39px;
  padding-bottom: 96px;
}

.post-card {
  display: block;
  min-width: 0;
}

.post-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #171717;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Плашка рубрики поверх обложки — как в ленте на core247.kz. */
.post-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-card:hover .post-card__image img {
  transform: scale(1.035);
}

.post-card h2 {
  margin: 22px 0 9px;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

.post-card p {
  margin: 0;
  color: #4d4d4d;
  font-size: 15px;
  line-height: 1.52;
}

.post-card time {
  display: block;
  margin-top: 15px;
  color: #828282;
  font-size: 12px;
}

.empty-state,
.error-state {
  width: min(720px, 100%);
  margin: 42px auto 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 30px;
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.2;
}

.empty-state p,
.error-state p {
  margin: 0;
  color: var(--muted);
}

.article {
  padding: 62px 0 40px;
}

.article__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 26px;
  color: #606060;
  font-size: 14px;
}

.article__preview-badge {
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--red);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.article__dek {
  width: min(760px, 100%);
  margin: 24px auto 0;
  color: #454545;
  text-align: center;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.article__author {
  width: min(760px, 100%);
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.article__author-name {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 16px;
}

.article__author-title {
  color: #8a8a8a;
  font-size: 14px;
}

.article__cover {
  position: relative;
  width: min(920px, 100%);
  margin: 56px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #171717;
}

.article__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #171717;
}

.article__body {
  width: min(760px, 100%);
  margin: 58px auto 0;
  color: #1c1c1f;
  font-size: 18px;
  line-height: 1.78;
}

.article__body blockquote {
  margin: 30px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--red);
  color: #2b2b2f;
  font-size: 20px;
  line-height: 1.6;
}

.article__body blockquote p {
  margin: 0;
}

.article__body .article-video {
  position: relative;
  margin: 28px 0;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.article__body .article-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article__body h2,
.article__body h3 {
  margin: 44px 0 14px;
  line-height: 1.22;
  font-weight: 800;
  /* переход по оглавлению: заголовок не должен уехать под липкую шапку */
  scroll-margin-top: 132px;
}

.article__body h2 {
  font-size: 30px;
}

.article__body h3 {
  font-size: 24px;
}

.article__body p {
  margin: 0 0 20px;
}

.article__body ul,
.article__body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.article__body li + li {
  margin-top: 8px;
}

.article__body a {
  color: var(--red);
  border-bottom: 1px solid rgba(217, 39, 46, 0.35);
}

.article__body blockquote {
  margin: 34px 0;
  border-left: 4px solid var(--red);
  padding: 4px 0 4px 22px;
  color: #3d3d42;
  font-weight: 600;
}

.article-table-wrap {
  width: min(920px, calc(100vw - 64px));
  margin: 34px 0;
  margin-left: 50%;
  overflow-x: auto;
  border-top: 1px solid rgba(23, 23, 23, 0.14);
  border-bottom: 1px solid rgba(23, 23, 23, 0.14);
  transform: translateX(-50%);
}

.article__body table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  color: #1c1c1f;
  font-size: 16px;
  line-height: 1.45;
}

.article__body th,
.article__body td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  text-align: left;
  vertical-align: top;
}

.article__body th {
  background: #f5f5f5;
  color: #141416;
  font-weight: 800;
}

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

.article__body pre {
  margin: 0 0 24px;
  padding: 18px 20px;
  overflow-x: auto;
  background: #0d1117;
  color: #c9d1d9;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.article__body pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.article__body code {
  padding: 2px 6px;
  background: rgba(23, 23, 23, 0.07);
  border-radius: 5px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.article-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: clamp(24px, 4vw, 56px);
  width: min(1080px, calc(100vw - 64px));
  margin: 46px 0;
  margin-left: 50%;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 120px 100%,
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 100% 86px,
    var(--red);
  color: #fff;
  padding: clamp(26px, 4vw, 46px);
  transform: translateX(-50%);
}

.article-cta--footer {
  margin-top: 38px;
  margin-bottom: 8px;
}

.article-cta__content {
  min-width: 0;
  align-self: center;
}

.article-cta__label {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-cta h2,
.article__body .article-cta h2 {
  max-width: 800px;
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.article-cta p,
.article__body .article-cta p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.45;
}

.article-cta__button,
.article__body .article-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin-top: 28px;
  border: 0;
  border-radius: 10px;
  background: #000;
  color: #fff;
  padding: 0 34px;
  font-size: 18px;
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease;
}

.article-cta__button:hover {
  background: #171717;
  transform: translateY(-1px);
}

.article-cta__visual {
  position: relative;
  align-self: center;
  justify-self: center;
  display: grid;
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 38%, transparent 39%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 58%, transparent 59%),
    conic-gradient(from 0deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.32));
}

.article-cta__visual::before {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 18px;
  background: #4767e8;
  transform: rotate(8deg);
}

.article-cta__visual span {
  position: relative;
  color: #fff;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0;
}

.article-cta__visual--art {
  background: none;
}

.article-cta__visual--art::before {
  display: none;
}

.article-cta__art {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 220px;
}

.article__sources {
  width: min(760px, 100%);
  margin: 40px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.article__sources h2,
.related h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.article__sources a {
  display: block;
  color: var(--red);
  word-break: break-word;
}

.article__sources a + a {
  margin-top: 10px;
}

.article__back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  /* По центру статьи: ширина по содержимому плюс поля auto по бокам. */
  width: fit-content;
  margin: 40px auto 0;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 0 18px;
  transition: background 0.16s ease, color 0.16s ease;
}

.article__back:hover {
  background: #000;
  color: #fff;
}

.related {
  width: min(1160px, calc(100% - 80px));
  margin: 0 auto 100px;
}

.related .blog-grid {
  padding-bottom: 0;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 39px;
  margin-top: 78px;
}

.skeleton-grid div {
  aspect-ratio: 1 / 1;
  background: linear-gradient(90deg, #ececec, #f7f7f7, #ececec);
  background-size: 240% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -240% 0;
  }
}

.footer {
  background: #272727;
  color: #c5c5c5;
  margin-top: 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr 1.2fr 0.95fr;
  gap: 30px;
  padding: 56px 0 44px;
  align-items: start;
}

.footer__h4-gap {
  margin-top: 26px !important;
}

.footer__about {
  max-width: 300px;
}

.footer__brand {
  display: inline-flex;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer__brand span {
  color: var(--red);
}

.footer p {
  margin: 0 0 14px;
  color: #9c9c9c;
  font-size: 14px;
  line-height: 1.55;
}

.footer__about h4 {
  margin: 4px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.footer__social {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 12px;
  width: max-content;
}

.footer__social a {
  display: inline-flex;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.footer__social a:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.footer__social img {
  width: 34px;
  height: 34px;
  display: block;
}

.footer__badges-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 4px;
}

.footer__badges-col img {
  max-width: 100%;
  height: 40px;
  width: auto;
  opacity: 0.9;
}

.footer__contacts p {
  color: #b6b6b6;
  font-weight: 400;
  margin: 0 0 7px;
  line-height: 1.5;
}

.footer__col h4 {
  margin: 2px 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.footer__col a {
  display: block;
  padding: 5px 0;
  color: #ededed;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.16s ease;
}

.footer__col a:hover {
  color: var(--red);
}

.footer__contacts a {
  color: #fff;
  font-weight: 600;
}

.footer__contacts a:hover {
  color: var(--red);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 13px;
  color: #8f8f8f;
}

.footer__legal {
  display: flex;
  gap: 22px;
}

.footer__legal a {
  color: #8f8f8f;
}

.footer__legal a:hover {
  color: #fff;
}

@media (max-width: 960px) {
  .wrap,
  .related {
    width: min(100% - 40px, 720px);
  }

  .top-strip__inner {
    padding: 0 20px;
    font-size: 14px;
  }

  .site-header__inner {
    height: 90px;
    gap: 20px;
  }

  .nav,
  .contact-button {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-nav {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    border-top: 1px solid var(--line);
    background: var(--line);
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .mobile-nav a {
    background: var(--bg);
    padding: 15px 20px;
  }

  /* «Услуги» и «Решения» на мобильном — аккордеон с теми же разделами
     и пунктами, что и в мега-меню на десктопе. */
  .mobile-nav__group {
    grid-column: 1 / -1;
    background: var(--bg);
  }

  .mobile-nav__group > summary {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

  .mobile-nav__group > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav__group > summary::after {
    content: "+";
    float: right;
    opacity: 0.5;
  }

  .mobile-nav__group[open] > summary::after {
    content: "–";
  }

  .mobile-nav__head {
    display: block;
    padding: 14px 20px 4px;
    color: #7a7a80;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* вне грид-контейнера ссылки остаются строчными и налезают друг на друга */
  .mobile-nav__group a {
    display: block;
    padding: 9px 20px 9px 32px;
  }

  .hero {
    padding-top: 70px;
  }

  .filters {
    margin-top: 48px;
  }

  .blog-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 58px 28px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px 24px;
  }

  .footer__about {
    grid-column: 1 / -1;
    max-width: 420px;
  }

  .article-cta {
    grid-template-columns: minmax(0, 1fr) 150px;
    width: min(100vw - 40px, 720px);
    padding: 30px;
  }

  .article-cta__visual {
    width: 148px;
  }
}

@media (max-width: 640px) {
  .wrap,
  .related {
    width: min(100% - 28px, 520px);
  }

  .top-strip__inner {
    min-height: 46px;
    border-radius: 0;
    justify-content: center;
  }

  .top-strip__inner span,
  .top-strip__inner a:nth-of-type(2) {
    display: none;
  }

  .top-strip__login {
    margin-left: 0;
  }

  .site-header__inner {
    height: 78px;
  }

  .brand img {
    width: 126px;
  }

  .hero {
    padding: 48px 0 30px;
  }

  .article-cta {
    grid-template-columns: 1fr;
    width: min(100vw - 28px, 520px);
    gap: 24px;
    border-radius: 10px;
    padding: 24px;
  }

  .article-cta__visual {
    justify-self: start;
    width: 118px;
  }

  .article-cta__button,
  .article__body .article-cta__button {
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    font-size: 16px;
  }

  .breadcrumbs {
    margin-bottom: 26px;
    font-size: 14px;
  }

  .hero h1,
  .article h1 {
    /* На телефоне фиксированные 40px разворачивали длинный заголовок в стену
       текста — размер тянется от ширины экрана. Длинные технические слова
       (pg_dump) переносим, иначе строка выпирает за край. */
    font-size: clamp(25px, 6.8vw, 38px);
    line-height: 1.14;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin: 38px -14px 34px;
    padding: 0 14px 4px;
  }

  .filter {
    flex: 0 0 auto;
  }

  .blog-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .post-card h2 {
    font-size: 23px;
  }

  .article {
    padding-top: 46px;
  }

  .article__dek {
    font-size: 18px;
  }

  .article__cover {
    margin-top: 38px;
    aspect-ratio: 16 / 9;
  }

  .article__body {
    margin-top: 40px;
    font-size: 16px;
    line-height: 1.72;
  }

  .article__body h2 {
    font-size: 25px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding: 40px 0 30px;
  }

  .footer__about {
    grid-column: 1 / -1;
    max-width: none;
  }

  .footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Карточка автора — как на прежней площадке: фото, должность, биография, ссылки. */
.author-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 26px 0 34px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.author-card__photo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-card__name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.author-card__title {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.author-card__bio {
  margin: 8px 0 0;
  color: #4a4a50;
  font-size: 14px;
  line-height: 1.5;
}

.author-card__links {
  margin: 10px 0 0;
  font-size: 14px;
}

.author-card__links a {
  color: var(--red);
}

.author-card__links a:hover {
  text-decoration: underline;
}

.author-card__sep {
  margin: 0 8px;
  color: var(--line);
}

@media (max-width: 640px) {
  .author-card {
    flex-direction: column;
  }
}

/* Отступ якоря оглавления под шапку: она ниже на планшете и телефоне. */
@media (max-width: 960px) {
  .article__body h2,
  .article__body h3 {
    scroll-margin-top: 108px;
  }
}

@media (max-width: 640px) {
  .article__body h2,
  .article__body h3 {
    scroll-margin-top: 96px;
  }
}

/* Уведомление о cookie — как на прежней площадке: сообщение и крестик,
   выбор запоминаем, чтобы не мозолило глаза на каждой статье. */
.cookie-note {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 400px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  color: #14161a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-note[hidden] {
  display: none;
}

.cookie-note p {
  margin: 0;
}

.cookie-note a {
  color: inherit;
  text-decoration: underline;
}

.cookie-note__close {
  flex: none;
  border: 0;
  background: none;
  padding: 0 2px;
  font-size: 18px;
  line-height: 1;
  color: #14161a;
  cursor: pointer;
}

@media (max-width: 600px) {
  .cookie-note {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
}
