@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  background:
    radial-gradient(820px 400px at 78% -10%, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0) 65%),
    linear-gradient(180deg, #0a1220 0%, #142544 320px, #0f1a2e 100%);
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* --- Shared site chrome (static pages + ml-static-shell.js) --- */

.ml-shell-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(59, 74, 107, 0.85);
  background: rgba(10, 18, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ml-shell-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px 16px;
}

.ml-shell-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 10px;
}

.ml-shell-brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #f8fafc;
  text-decoration: none;
}

.ml-shell-brand:hover {
  color: #bfdbfe;
}

.ml-shell-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.ml-shell-locale {
  font-size: 0.9rem;
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ml-shell-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: #2563eb;
  border: 1px solid rgba(147, 197, 253, 0.45);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.ml-shell-cta:hover {
  background: #1d4ed8;
}

.ml-shell-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  position: relative;
}

.ml-shell-header__primary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.ml-shell-header__primary a {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  color: #e2e8f0;
  text-decoration: none;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 74, 107, 0.8);
  white-space: nowrap;
}

.ml-shell-header__primary a:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(147, 197, 253, 0.35);
}

.ml-shell-more {
  flex: 0 0 auto;
}

.ml-shell-more__summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 24, 41, 0.9);
  border: 1px solid rgba(59, 74, 107, 0.95);
  font-weight: 500;
}

.ml-shell-more__summary::-webkit-details-marker {
  display: none;
}

.ml-shell-more__summary::after {
  content: " ▾";
  font-size: 0.65em;
  opacity: 0.85;
}

.ml-shell-more[open] .ml-shell-more__summary {
  border-color: rgba(147, 197, 253, 0.4);
  color: #f1f5f9;
}

.ml-shell-more__summary:hover {
  border-color: rgba(147, 197, 253, 0.35);
  color: #f8fafc;
}

.ml-shell-more__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  box-sizing: border-box;
  width: max-content;
  max-width: min(20rem, calc(100vw - 24px));
  min-width: min(12rem, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(17, 29, 51, 0.98);
  border: 1px solid rgba(59, 74, 107, 0.95);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.ml-shell-more__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ml-shell-more__links a {
  font-size: 0.88rem;
  padding: 8px 6px;
  border-radius: 8px;
  color: #e2e8f0;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: normal;
}

.ml-shell-more__links a:hover {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}

@media (max-width: 640px) {
  .ml-shell-header__primary a {
    font-size: 0.78rem;
    padding: 5px 8px;
  }

  .ml-shell-more__panel {
    left: 0;
    right: 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

.ml-shell-footer {
  border-top: 1px solid rgba(59, 74, 107, 0.85);
  background: rgba(8, 14, 26, 0.55);
  margin-top: 0;
}

.ml-shell-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.ml-shell-footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  min-width: 200px;
}

.ml-shell-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
  font-size: 0.9rem;
}

.ml-shell-footer__nav a {
  color: #93c5fd;
}

@media (max-width: 640px) {
  .ml-shell-footer__inner {
    flex-direction: column;
  }

  .ml-shell-footer__nav {
    justify-content: flex-start;
  }
}

/* Хлебные крошки (из JSON-LD, вставляет ml-static-shell.js) */
.ml-breadcrumb {
  margin: 0 0 14px 0;
}

.ml-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #b8c5d6;
}

.ml-breadcrumb__item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.ml-breadcrumb__item:not(:last-child)::after {
  content: '›';
  color: rgba(148, 163, 184, 0.65);
  font-weight: 500;
  user-select: none;
}

.ml-breadcrumb__link {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.ml-breadcrumb__link:hover {
  color: #bfdbfe;
  border-bottom-color: rgba(147, 197, 253, 0.45);
}

.ml-breadcrumb__link:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

.ml-breadcrumb__current {
  font-weight: 600;
  color: #e2e8f0;
}

.ml-breadcrumb__text {
  color: #cbd5e1;
}

/* Page toolbar: back / language (не подхватывает nav.ml-breadcrumb) */
#main-content > nav:not(.ml-breadcrumb) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 22px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(17, 29, 51, 0.55);
  border: 1px solid #3b4a6b;
}

#main-content > nav:not(.ml-breadcrumb) .back {
  margin-bottom: 0;
}

/* Длинные SEO-гайды: несколько div.card подряд выглядят как одна колонка лонгрида */
#main-content.ml-seo-longread {
  max-width: 44rem;
}

#main-content.ml-seo-longread > div.card:not(.ml-longread) {
  margin-bottom: 0;
  border-radius: 0;
  border-bottom: none;
  box-shadow: none;
}

#main-content.ml-seo-longread > div.card:not(.ml-longread):first-of-type {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

#main-content.ml-seo-longread > div.card:not(.ml-longread):last-of-type {
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  border-bottom: 1px solid #3b4a6b;
  margin-bottom: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

#main-content.ml-seo-longread > div.card:not(.ml-longread):only-of-type {
  border-radius: 24px;
  border: 1px solid #3b4a6b;
  margin-bottom: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

#main-content.ml-seo-longread > div.card:not(.ml-longread) h1 {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin-bottom: 14px;
}

#main-content.ml-seo-longread > div.card:not(.ml-longread) .cta-block {
  margin-top: 18px;
}

#main-content.ml-seo-longread ol {
  margin: 10px 0 0 0;
  padding-left: 22px;
}

#main-content.ml-seo-longread ol li + li {
  margin-top: 8px;
}

/* Обложка статьи блога / гайда */
.ml-cover {
  margin: -24px -24px 20px -24px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: #0b1424;
  border-bottom: 1px solid rgba(59, 74, 107, 0.55);
  line-height: 0;
}

.ml-cover__img {
  width: 100%;
  height: auto;
  max-height: min(240px, 40vw);
  object-fit: cover;
  object-position: center;
  display: block;
}

article.ml-longread.card .ml-cover--longread {
  margin: -24px -24px 18px -24px;
  border-radius: 24px 24px 0 0;
}

.ml-blog-hero .ml-cover {
  margin: -24px -24px 18px -24px;
  border-radius: 24px 24px 0 0;
}

@media (max-width: 520px) {
  .ml-cover__img {
    max-height: 200px;
  }
}

/* Материалы блога: мета, оглавление, якоря под sticky-шапку */
#main-content.ml-seo-longread.ml-blog-post .ml-cover__img {
  max-height: min(280px, 44vw);
}

@media (max-width: 520px) {
  #main-content.ml-seo-longread.ml-blog-post .ml-cover__img {
    max-height: 200px;
  }
}

#main-content.ml-seo-longread.ml-blog-post h2,
#main-content.ml-seo-longread.ml-blog-post h3 {
  scroll-margin-top: 112px;
}

.ml-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0 0 14px 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #94a3b8;
}

.ml-article-meta__kind {
  font-weight: 600;
  color: #cbd5e1;
}

.ml-article-meta__sep {
  color: rgba(148, 163, 184, 0.65);
  user-select: none;
}

.ml-article-meta time {
  color: #94a3b8;
}

.ml-article-meta__read {
  color: #94a3b8;
}

.ml-longread__hero .ml-article-meta {
  margin-bottom: 12px;
}

.ml-article-toc {
  margin: 16px 0 0 0;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(59, 74, 107, 0.55);
  background: rgba(10, 18, 32, 0.55);
}

#main-content.ml-seo-longread.ml-blog-post .card > .ml-article-toc {
  margin-top: 0;
}

.ml-article-toc__title {
  margin: 0 0 10px 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ml-article-toc ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.ml-article-toc li + li {
  margin-top: 6px;
}

.ml-article-toc a {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.ml-article-toc a:hover {
  color: #bfdbfe;
  border-bottom-color: rgba(147, 197, 253, 0.45);
}

.ml-article-toc a:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

.ml-article-toc--collapsible summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ml-article-toc--collapsible summary::-webkit-details-marker {
  display: none;
}

.ml-article-toc--collapsible summary::after {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin-left: 0.35em;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  vertical-align: 0.15em;
  transition: transform 0.15s ease;
}

.ml-article-toc--collapsible[open] summary::after {
  transform: rotate(225deg);
  vertical-align: 0.05em;
}

.ml-article-toc--collapsible .ml-article-toc__title {
  display: inline;
  margin: 0;
}

.ml-article-toc--collapsible > summary + * {
  margin-top: 12px;
}

.card {
  background: linear-gradient(180deg, #111d33 0%, #0f1829 100%);
  border: 1px solid #3b4a6b;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

h1,
h2 {
  margin-top: 0;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  color: #e2e8f0;
}

p {
  line-height: 1.55;
  margin: 0 0 12px 0;
}

ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

li + li {
  margin-top: 6px;
}

a {
  color: #93c5fd;
}

.cta {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #2563eb;
  border: 1px solid rgba(147, 197, 253, 0.45);
  color: #fff;
  text-decoration: none;
}

.back {
  display: inline-block;
  margin-bottom: 14px;
  margin-right: 12px;
}

.card-media {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #3b4a6b;
  margin-top: 12px;
}

.muted {
  color: #a8b8ca;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -44px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 6px;
}

.site-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #3b4a6b;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.toc-card {
  border-left: 3px solid #2563eb;
}

.toc-title {
  font-size: 1rem;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin-top: 8px;
}

.toc li:first-child {
  margin-top: 0;
}

.toc a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

h2[id],
h3[id] {
  scroll-margin-top: 1.25rem;
}

.cta-block {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.35);
}

.cta-block p:last-child {
  margin-bottom: 0;
}

/* Секции списка статей: /ru/blog-stati/index.html */
.blog-section-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: #e2e8f0;
}

.blog-section-title--secondary {
  margin-top: 1.25rem;
  color: #94a3b8;
}

.blog-section-lead {
  margin: 0.35rem 0 0.75rem 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Long-form article (blog posts) */
.ml-longread {
  margin-bottom: 8px;
}

.ml-kicker {
  display: inline-block;
  margin: 0 0 10px 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #60a5fa;
}

.ml-longread__hero h1 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.2;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.ml-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0 0 10px 0;
}

.ml-lead:last-child {
  margin-bottom: 0;
}

.ml-longread__body {
  padding: 0;
  overflow: hidden;
}

.ml-section {
  padding: 22px 24px 4px;
  border-top: 1px solid rgba(59, 74, 107, 0.65);
}

.ml-section:first-of-type {
  border-top: none;
  padding-top: 20px;
}

.ml-section:last-of-type {
  padding-bottom: 24px;
}

.ml-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #f1f5f9;
}

.ml-section p:last-child,
.ml-section ul:last-child {
  margin-bottom: 0;
}

.ml-longread__body .ml-section p {
  color: #cbd5e1;
}

/* Blog index */
.ml-blog-hero h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  margin-bottom: 12px;
}

.ml-blog-hero p:last-child {
  margin-bottom: 0;
}

.ml-article-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ml-article-list li {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid rgba(59, 74, 107, 0.5);
  line-height: 1.55;
}

.ml-article-list li:first-child {
  padding-top: 4px;
}

.ml-article-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ml-article-list a {
  font-weight: 600;
  text-decoration: none;
  color: #93c5fd;
}

.ml-article-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Индекс блога: сетка карточек */
#main-content.ml-seo-longread.ml-blog-index {
  max-width: 72rem;
}

.ml-blog-directory h2 {
  margin-bottom: 0.35rem;
}

.ml-blog-directory .blog-section-title {
  margin-top: 1.35rem;
}

.ml-blog-directory .ml-blog-section--primary > .blog-section-title {
  margin-top: 0.75rem;
}

.ml-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.ml-blog-grid--secondary {
  margin-top: 10px;
}

.ml-blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(59, 74, 107, 0.95);
  background: linear-gradient(165deg, rgba(17, 29, 51, 0.98) 0%, rgba(11, 20, 36, 0.98) 100%);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.ml-blog-card:hover {
  border-color: rgba(147, 197, 253, 0.38);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
  transform: translateY(-2px);
}

.ml-blog-card--secondary {
  border-color: rgba(59, 74, 107, 0.75);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.ml-blog-card--secondary:hover {
  border-color: rgba(148, 163, 184, 0.35);
}

.ml-blog-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1424;
  border-bottom: 1px solid rgba(59, 74, 107, 0.55);
  outline: none;
}

.ml-blog-card__thumb:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: -3px;
}

.ml-blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.ml-blog-card:hover .ml-blog-card__img {
  transform: scale(1.03);
}

.ml-blog-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ml-blog-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.ml-blog-card__title a {
  color: #f1f5f9;
  text-decoration: none;
}

.ml-blog-card__title a:hover {
  color: #93c5fd;
}

.ml-blog-card__excerpt {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #94a3b8;
}

@media (max-width: 520px) {
  .ml-blog-grid {
    grid-template-columns: 1fr;
  }

  .ml-blog-card:hover {
    transform: none;
  }
}

/* Блог: индекс — больше воздуха, меньше декора (см. /ru/blog-stati/index.html) */
#main-content.ml-seo-longread.ml-blog-index {
  max-width: 48rem;
  padding: 40px clamp(18px, 4vw, 40px) 88px;
}

.ml-blog-index nav .back {
  margin-bottom: 8px;
}

.ml-blog-index .card {
  box-shadow: none;
  background: rgba(15, 24, 41, 0.42);
  border-color: rgba(59, 74, 107, 0.5);
  margin-bottom: 36px;
  padding: 28px 30px 34px;
  border-radius: 20px;
}

.ml-blog-index .ml-kicker {
  margin-bottom: 12px;
}

.ml-blog-index .ml-blog-hero h1 {
  margin-bottom: 16px;
}

.ml-blog-index .ml-blog-hero p {
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 52ch;
}

.ml-blog-index .ml-blog-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 6px;
  max-width: 52ch;
}

.ml-blog-index .ml-blog-toc__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.ml-blog-index .ml-blog-toc__link:hover {
  color: #bfdbfe;
  border-bottom-color: rgba(147, 197, 253, 0.45);
}

.ml-blog-index .ml-blog-toc__link:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
  border-radius: 6px;
}

.ml-blog-index .ml-blog-toc__sep {
  color: rgba(148, 163, 184, 0.7);
  user-select: none;
}

.ml-blog-index #blog-primary,
.ml-blog-index #blog-secondary {
  scroll-margin-top: 112px;
}

.ml-blog-index .ml-blog-section--secondary {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(59, 74, 107, 0.5);
}

.ml-blog-index .ml-blog-directory h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.ml-blog-index .ml-blog-section--primary .blog-section-title {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

.ml-blog-index .ml-blog-section--secondary .blog-section-title {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

.ml-blog-index .blog-section-lead {
  margin: 0.15rem 0 1.5rem 0;
  line-height: 1.65;
  max-width: 62ch;
}

.ml-blog-index .ml-blog-card__thumb {
  display: none;
}

.ml-blog-index .ml-blog-grid {
  gap: 18px 22px;
  margin-top: 14px;
}

.ml-blog-index .ml-blog-grid--secondary {
  margin-top: 12px;
}

.ml-blog-index .ml-blog-card {
  border-radius: 14px;
  border: 1px solid rgba(59, 74, 107, 0.45);
  border-left: 3px solid rgba(37, 99, 235, 0.5);
  background: rgba(11, 20, 36, 0.5);
  box-shadow: none;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.ml-blog-index .ml-blog-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(130, 163, 214, 0.35);
  background: rgba(17, 29, 51, 0.55);
}

.ml-blog-index .ml-blog-card--secondary {
  border-color: rgba(59, 74, 107, 0.4);
  border-left-color: rgba(148, 163, 184, 0.55);
  box-shadow: none;
}

.ml-blog-index .ml-blog-card--secondary:hover {
  border-color: rgba(148, 163, 184, 0.28);
  border-left-color: rgba(186, 198, 214, 0.55);
}

.ml-blog-index .ml-blog-card__body {
  padding: 18px 20px 22px;
  gap: 10px;
}

.ml-blog-index .ml-blog-card__excerpt {
  line-height: 1.58;
  color: #b3bfd4;
}

@media (min-width: 768px) {
  .ml-blog-index .ml-blog-card__thumb {
    display: block;
    aspect-ratio: 1;
    width: 100%;
    min-height: 0;
    border-bottom: none;
    border-right: 1px solid rgba(59, 74, 107, 0.45);
    border-radius: 11px 0 0 11px;
  }

  .ml-blog-index .ml-blog-card {
    display: grid;
    grid-template-columns: minmax(100px, 120px) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }

  .ml-blog-index .ml-blog-card__img {
    height: 100%;
  }

  .ml-blog-index .ml-blog-card__body {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  #main-content.ml-seo-longread.ml-blog-index {
    padding-top: 28px;
    padding-bottom: 64px;
  }

  .ml-blog-index .card {
    padding: 22px 18px 26px;
    margin-bottom: 28px;
  }

  .ml-blog-index .ml-blog-grid {
    gap: 14px;
  }
}

/* Статьи и SEO-лонгриды (не индекс блога): воздух между блоками и строками */
#main-content.ml-seo-longread:not(.ml-blog-index) {
  padding: 38px clamp(18px, 4vw, 42px) 88px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) > nav:not(.ml-breadcrumb) {
  margin-bottom: 26px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) > .card,
#main-content.ml-seo-longread:not(.ml-blog-index) > article.ml-longread.card {
  padding: 30px 30px 36px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) .card .ml-cover {
  margin: -30px -30px 24px -30px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) article.ml-longread.card .ml-cover.ml-cover--longread {
  margin: -30px -30px 22px -30px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) p {
  line-height: 1.68;
  margin-bottom: 18px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) h2 {
  margin-bottom: 14px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) h3 {
  margin-top: 1.1rem;
  margin-bottom: 0.6rem;
}

#main-content.ml-seo-longread:not(.ml-blog-index) ul,
#main-content.ml-seo-longread:not(.ml-blog-index) ol {
  margin-top: 12px;
  margin-bottom: 18px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) li + li {
  margin-top: 10px;
}

#main-content.ml-seo-longread:not(.ml-blog-index) .cta-block {
  margin-top: 22px;
  padding: 18px 22px;
}

/* Разметка article.ml-longread + .ml-section */
#main-content.ml-seo-longread article.ml-longread .ml-section {
  padding: 34px 8px 18px;
}

#main-content.ml-seo-longread article.ml-longread .ml-section:first-of-type {
  padding-top: 28px;
}

#main-content.ml-seo-longread article.ml-longread .ml-section:last-of-type {
  padding-bottom: 36px;
}

#main-content.ml-seo-longread article.ml-longread .ml-section h2 {
  margin-bottom: 14px;
}

#main-content.ml-seo-longread article.ml-longread .ml-longread__hero .ml-kicker {
  margin-bottom: 14px;
}

#main-content.ml-seo-longread article.ml-longread .ml-longread__hero h1 {
  margin-bottom: 18px;
}

#main-content.ml-seo-longread article.ml-longread .ml-lead {
  margin-bottom: 16px;
  line-height: 1.68;
}

@media (max-width: 520px) {
  #main-content.ml-seo-longread:not(.ml-blog-index) {
    padding-top: 28px;
    padding-bottom: 72px;
  }

  #main-content.ml-seo-longread:not(.ml-blog-index) > .card,
  #main-content.ml-seo-longread:not(.ml-blog-index) > article.ml-longread.card {
    padding: 24px 20px 28px;
  }

  #main-content.ml-seo-longread:not(.ml-blog-index) .card .ml-cover {
    margin: -24px -20px 20px -20px;
  }

  #main-content.ml-seo-longread:not(.ml-blog-index) article.ml-longread.card .ml-cover.ml-cover--longread {
    margin: -24px -20px 18px -20px;
  }

  #main-content.ml-seo-longread article.ml-longread .ml-section {
    padding-left: 2px;
    padding-right: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ml-blog-card,
  .ml-blog-card__img,
  .ml-article-toc--collapsible summary::after {
    transition: none !important;
  }

  .ml-blog-card:hover {
    transform: none;
  }

  .ml-blog-card:hover .ml-blog-card__img {
    transform: none;
  }

  .ml-shell-more__summary::after {
    transition: none;
  }
}
