/* Страница материала - ритм как linear.app/now/.../slug */

.page-blog--article .blog-inner {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
    padding-bottom: clamp(4rem, 10vw, 6rem);
}

.page-blog--article .blog-inner.blog-inner--article {
    max-width: 1080px;
}

/* Если blog.css не подгрузился: skip-link не должен ломать вёрстку */
.page-blog--article .blog-skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.page-blog--article .blog-skip:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 10000;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.75rem 1rem;
    overflow: visible;
    clip: auto;
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #000;
    background: #f7f8f8;
    border-radius: 6px;
    outline: none;
}

.blog-article {
    flex: 1;
    background: var(--lb-bg, #fff);
    color: #000000;
}

.blog-article-inner {
    margin: 0;
}

/* Крошки: Последние новости → материал */
.blog-article-breadcrumb {
    margin-bottom: 1.5rem;
}

.blog-article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.6875rem;
    font-weight: 700;
    color: #000000;
}

.blog-article-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--lb-faint);
    opacity: 0.6;
}

.blog-article-breadcrumb a {
    color: #000000;
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-article-breadcrumb a:hover {
    color: #000000;
    opacity: 0.65;
}

.blog-article-breadcrumb [aria-current="page"] {
    color: #000000;
    font-weight: 800;
}

/* Заголовок статьи */
.blog-article-title {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #000000;
    margin: 0 0 1.5rem;
}

/* Hero (обложка) - плейсхолдер под фото/видео */
.blog-article-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: var(--lb-hero-bg, #e8eaef);
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-bottom: 1.75rem;
}

.blog-article-hero--empty {
    min-height: 0;
}

.blog-article-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-article-hero--cover {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #0a0a0c;
}

/* Лид под заголовком (опционально) */
.blog-article-lead {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.65;
    color: #000000;
    margin: 0 0 1.25rem;
}

/* Автор · дата */
.blog-article-byline {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.875rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 2.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.blog-article-byline-sep {
    opacity: 0.7;
}

.blog-article-byline time {
    color: inherit;
}

/* Тело статьи */
.blog-article-body {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.7;
    color: #000000;
}

.blog-article-body > p {
    margin: 0 0 1.25rem;
}

.blog-article-body > h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #000000;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.blog-article-body > h2:first-of-type {
    margin-top: 0;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
    color: #000000;
}

.blog-article-body li {
    margin-bottom: 0.5rem;
}

.blog-article-body li::marker {
    color: #000000;
}

.blog-article-body strong {
    font-weight: 800;
    color: #000000;
}

.blog-article-body a {
    color: var(--lb-accent, #ff2d78);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-article-body a:hover {
    color: var(--lb-accent-hover, #e5266e);
}

/* Подвал статьи */
.blog-article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.blog-article-footer .blog-article-byline {
    margin-bottom: 1rem;
}

.blog-article-copy {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #000000;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--lb-border, rgba(15, 23, 42, 0.12));
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-article-copy:hover {
    background: rgba(15, 23, 42, 0.08);
    color: var(--lb-text, #0f172a);
}

/* Сетка: оглавление + статья */
.blog-inner--article {
    display: block;
    max-width: 1080px;
}

@media (min-width: 1100px) {
    .blog-inner--article {
        display: grid;
        grid-template-columns: minmax(0, 240px) minmax(0, 720px);
        gap: clamp(1.25rem, 3vw, 2.5rem);
        align-items: start;
        justify-content: center;
        padding-left: clamp(1rem, 3vw, 2rem);
        padding-right: clamp(1rem, 3vw, 2rem);
    }

    .blog-toc-shell {
        position: sticky;
        top: 5.5rem;
    }
}

.blog-toc-shell[hidden] {
    display: none !important;
}

/* Оглавление: стеклянная карточка */
.blog-toc-shell:not([hidden]) {
    margin-bottom: 1.25rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

@media (min-width: 1100px) {
    .blog-toc-shell:not([hidden]) {
        margin-bottom: 0;
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .blog-toc-shell:not([hidden]),
    .blog-related {
        background: rgba(255, 255, 255, 0.94);
    }
}

.blog-toc-heading {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0f172a;
    opacity: 0.5;
    margin: 0 0 0.65rem;
}

.blog-toc-list {
    margin: 0;
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
}

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

ol.blog-toc-list.blog-toc-list--numbered {
    list-style: decimal;
    list-style-position: outside;
    padding-left: 1.35rem;
    margin: 0;
}

.blog-toc-list li {
    margin-bottom: 0.5rem;
    padding-left: 0.15rem;
}

.blog-toc-list li::marker {
    color: rgba(15, 23, 42, 0.45);
    font-weight: 700;
}

.blog-toc-list a {
    color: #0f172a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, opacity 0.15s ease;
}

.blog-toc-list a:hover {
    border-bottom-color: rgba(var(--lb-accent-rgb, 255, 45, 120), 0.45);
    opacity: 0.85;
}

.blog-article-read {
    font-weight: 700;
    opacity: 0.75;
}

/* Шаринг — одна строка (на очень узком экране допускается гориз. прокрутка без переноса) */
.blog-article-share {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.blog-article-share::-webkit-scrollbar {
    display: none;
}

.blog-article-share-label {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000000;
    opacity: 0.55;
    flex: 0 0 auto;
    white-space: nowrap;
}

.blog-share-tg,
.blog-share-copy {
    box-sizing: border-box;
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #000000;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.blog-share-tg {
    text-decoration: none;
}

.blog-share-copy {
    margin: 0;
    appearance: none;
    font: inherit;
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 700;
}

@media (max-width: 520px) {
    .blog-article-share {
        gap: 0.35rem 0.45rem;
    }

    .blog-article-share-label {
        font-size: 0.625rem;
        letter-spacing: 0.05em;
    }

    .blog-share-tg,
    .blog-share-copy {
        padding: 0.38rem 0.55rem;
        font-size: 0.6875rem;
    }
}

.blog-share-tg:hover,
.blog-share-copy:hover {
    background: rgba(var(--lb-accent-rgb, 255, 45, 120), 0.1);
    border-color: rgba(var(--lb-accent-rgb, 255, 45, 120), 0.35);
}

/* Связанные материалы — та же стеклянная карточка, что у оглавления */
.blog-related {
    margin-top: 2.75rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.blog-related-title {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #000000;
    margin: 0 0 1rem;
}

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

.blog-related-list li {
    margin-bottom: 0.65rem;
}

.blog-related-list a {
    font-family: var(--lb-font, "Inter", sans-serif);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--lb-accent, #ff2d78);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-related-list a:hover {
    color: var(--lb-accent-hover, #e5266e);
}

.blog-article-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

/* Страница материала всегда светлая: глобальная data-theme=dark не тёмнит текст/фон статьи
   (на мобильном localStorage часто без ключа → дефолт dark в script.js). */
