/* ============================================================
   Blog post page — Mobile-First (320 → 768 → 1024 → 1440)
   Extends platform.css tokens (--bg, --text, --accent…)
   ============================================================ */

.blog-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.blog-page .footer {
    margin-top: auto;
}

.blog-page .blog-main,
.blog-page .blog-index-main {
    flex: 1;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Header --- */
.blog-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(10, 14, 20, 0.9);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-bottom: 1px solid var(--border);
}

.blog-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 48rem; /* ~768px reading column */
    margin: 0 auto;
    padding: 0.75rem 1rem; /* ≥16px sides */
}

.blog-brand {
    font-weight: 700;
    font-size: clamp(1rem, 2.8vw, 1.15rem);
    text-decoration: none;
    color: var(--text);
}

.blog-header__nav .btn {
    text-decoration: none;
}

.blog-header__actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

button.lang-toggle {
    min-height: 44px;
    min-width: 44px;
}

.blog-article .post-digging-list {
    margin: 1rem 0 1.5rem;
    padding: 1.15rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}

.blog-article .post-digging-list p {
    margin: 0 0 0.4rem;
    color: var(--text2);
    font-size: 1rem;
}

.blog-article .post-digging-list p:last-child {
    margin-bottom: 0;
}

.blog-article .post-digging-list__q {
    font-weight: 500;
    color: var(--text);
}

.blog-article .post-quote__attr {
    margin: 0.5rem 0 0;
    font-style: normal;
    font-weight: 500;
    color: var(--text2);
}

.blog-article .post__body code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--surface2);
    font-size: 0.92em;
}

.blog-article .post__subtitle {
    margin: 0.35rem 0 0.75rem;
    color: var(--text2);
    font-size: clamp(1rem, 2.8vw, 1.15rem);
    line-height: 1.45;
}

.post-pillars {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.post-pillar {
    padding: 1.15rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    text-align: center;
}

.post-pillar__icon {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    line-height: 1;
}

.post-pillar h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: var(--text);
    border-top: none;
    padding-top: 0;
}

.post-pillar p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text2);
}

.post-story {
    margin: 1.5rem 0;
    padding: 1.25rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}

.post-story__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.post-story__name {
    font-weight: 700;
    color: var(--text);
    font-size: 1.05rem;
}

.post-story__tag {
    font-size: 0.8rem;
    padding: 2px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    font-weight: 500;
}

.post-story__sub {
    font-size: 0.85rem;
    color: var(--text2);
    margin: 0 0 0.75rem;
}

.post-story p:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .post-pillars {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Touch targets ≥ 44px */
.btn-touch {
    min-height: 2.75rem; /* 44px */
    min-width: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 1rem;
    box-sizing: border-box;
}

/* --- Main column --- */
.blog-main {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
    width: 100%;
    box-sizing: border-box;
}

/* Хлебные крошки — g-breadcrumbs; здесь отступ и цель нажатия 44px */
.blog-page .breadcrumbs {
    margin-bottom: 1.25rem;
}
.blog-page .g-breadcrumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* --- Article typography (mobile-first) --- */
.blog-article .post__title {
    font-size: clamp(1.4rem, 5.2vw, 2.15rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
}

.blog-article .post__body {
    font-size: clamp(1rem, 2.4vw, 1.0625rem); /* ≥16px */
    line-height: 1.75;
    color: var(--text2);
}

.blog-article .post__body h2:not(.g-toc__title) {
    font-size: clamp(1.2rem, 3.6vw, 1.5rem);
    color: var(--text);
    margin: 2rem 0 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    scroll-margin-top: 4.5rem;
}

.blog-article .post__body h3 {
    font-size: clamp(1.05rem, 2.8vw, 1.15rem);
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.blog-article .post__body section {
    margin-bottom: 0.5rem;
}

.blog-article .post__body p {
    margin-bottom: 1rem;
}

.blog-article .post-muted {
    color: var(--text3);
    font-style: italic;
}

.blog-article .post-figure img,
.blog-article .post-figure picture {
    max-width: 100%;
    height: auto;
    display: block;
}

.blog-article .post-figure picture img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: #fff;
}

.blog-article .post-figure--cover img,
.blog-article .post-figure--cover-full img {
    aspect-ratio: auto;
    object-fit: contain;
    height: auto;
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
}

/* Stats: 1 col mobile → 3 col tablet+ */
.blog-article .post-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.blog-article .post-stat {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    text-align: center;
}

.blog-article .post-example {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--radius-card);
    overflow-wrap: anywhere;
}

.blog-article .post-cta {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding: 1.4rem 1.25rem;
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 2px dashed var(--ln, var(--border));
    min-width: 0;
}

.blog-article .post-cta h2 {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.blog-article .post-cta__lead {
    font-weight: 500;
    color: var(--text);
}

.blog-article .post-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    min-width: 0;
}

.blog-article .post-cta__actions .g-btn {
    width: 100%;
    min-width: 0;
    text-decoration: none;
}

.blog-article .post-try-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin: 1.6rem 0 2rem;
    min-width: 0;
}

.blog-article .post-try-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.05rem 1.15rem;
    border-radius: var(--radius-card, 12px);
    border: 1px solid var(--border);
    background: var(--surface, rgba(255, 255, 255, 0.03));
    text-decoration: none;
    color: inherit;
    min-height: 44px;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-article .post-try-card:hover,
.blog-article .post-try-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    color: inherit;
}

.blog-article .post-try-card__label {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.blog-article .post-try-card__title {
    font-weight: 650;
    font-size: 1.02rem;
    line-height: 1.35;
}

.blog-article .post-try-card__desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.45;
}

@media (min-width: 640px) {
    .blog-article .post-try-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.blog-article-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.blog-updated {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text3);
}

.blog-site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.blog-site-footer__inner {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text3);
}

.blog-site-footer__inner a {
    color: var(--text2);
    text-decoration: none;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}

.blog-site-footer__inner a:hover,
.blog-site-footer__inner a:focus-visible {
    color: var(--accent);
}

.blog-article .post-answer {
    margin: 1.5rem 0;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius-card, 12px);
    background: var(--surface, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border, rgba(37, 43, 54, 0.5));
    border-left: 3px solid var(--accent, var(--accent));
}

.blog-article .post-answer h3 {
    border-top: none;
    padding-top: 0;
    margin: 0 0 0.75rem;
    font-size: clamp(1.05rem, 2.8vw, 1.25rem);
}

.blog-article .post-code {
    overflow-x: auto;
    margin: 1.5rem 0;
    padding: 1.2rem 1.15rem 1.3rem;
    min-width: 0;
    border-radius: var(--radius-card, 12px);
    border: 1px solid var(--border, rgba(37, 43, 54, 0.5));
    background: var(--surface2, rgba(255, 255, 255, 0.04));
    font-size: 0.88rem;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}
.blog-article .post-code code {
    padding: 0;
    background: transparent;
    font-size: inherit;
    white-space: pre;
}

.blog-article .post-table-wrap {
    overflow-x: auto;
    margin: 1.25rem 0;
    border-radius: var(--radius-card, 12px);
    border: 1px solid var(--border, rgba(37, 43, 54, 0.5));
    -webkit-overflow-scrolling: touch;
}

.blog-article .post-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 280px;
}

.blog-article .post-table-wrap th,
.blog-article .post-table-wrap td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--border, rgba(37, 43, 54, 0.35));
}

.blog-article .post-table-wrap th {
    background: var(--surface, rgba(255, 255, 255, 0.04));
    font-weight: 600;
}

.blog-article .post-faq {
    margin: 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border, rgba(37, 43, 54, 0.35));
}

.blog-article .post-faq:last-of-type {
    border-bottom: none;
}

.blog-article .post-faq h3,
.blog-article .post-faq h4 {
    border-top: none;
    padding-top: 0;
    margin: 0 0 0.5rem;
    font-size: clamp(1.05rem, 2.8vw, 1.2rem);
}

/* FAQ accordion inside blog articles — same pattern as platform /faq/ */
.blog-article .post-flow {
    list-style: none;
    margin: 1.1rem 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.blog-article .post-flow > li {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.75rem 0.9rem;
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border, rgba(37, 43, 54, 0.35));
    border-radius: 10px;
    background: var(--surface2, rgba(26, 31, 43, 0.45));
}
.blog-article .post-flow__n {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent, var(--accent));
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    flex-shrink: 0;
}
.blog-article .post-flow h3 {
    margin: 0.15rem 0 0.35rem;
    padding: 0;
    border: 0;
    font-size: clamp(1.02rem, 2.6vw, 1.15rem);
    line-height: 1.35;
    min-width: 0;
}
.blog-article .post-flow p {
    margin: 0;
    min-width: 0;
}
.blog-article .post-tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
}
.blog-article .post-tool-row a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface, rgba(19, 24, 32, 0.6));
    color: inherit;
    text-decoration: none;
    font-size: 0.92rem;
}
.blog-article .post-tool-row a:hover,
.blog-article .post-tool-row a:focus-visible {
    border-color: var(--accent, var(--accent));
    color: inherit;
}

.blog-article .post-faq-section {
    margin: 2rem 0 0;
}
.blog-article .post-faq-section .faq-sub.post-faq-hint {
    text-align: left;
    margin: 0.4rem 0 1.1rem;
    max-width: 42rem;
    color: var(--text2, #a8b0c0);
    font-size: 0.95rem;
    line-height: 1.5;
}
.blog-article .post-faq-section .faq-list {
    max-width: none;
    margin: 0;
    gap: 10px;
}
.blog-article .post-faq-section .faq-item {
    border-radius: 10px;
    background: var(--surface2, rgba(26, 31, 43, 0.45));
}
.blog-article .post-faq-section .faq-item:hover {
    border-color: var(--accent, var(--accent));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
.blog-article .post-faq-section .faq-item.active,
.blog-article .post-faq-section details.faq-item[open] {
    border-color: var(--accent, var(--accent));
    background: var(--surface, rgba(19, 24, 32, 0.75));
}
.blog-article .post-faq-section .faq-item .question {
    min-height: 52px;
    padding: 16px 18px;
    font-size: clamp(1rem, 2.5vw, 1.08rem);
    gap: 14px;
    list-style: none;
}
.blog-article .post-faq-section details.faq-item > summary.question {
    cursor: pointer;
}
.blog-article .post-faq-section details.faq-item > summary.question::-webkit-details-marker {
    display: none;
}
.blog-article .post-faq-section details.faq-item > summary.question:focus-visible {
    outline: 2px solid var(--accent, var(--accent));
    outline-offset: 2px;
}
.blog-article .post-faq-section .faq-item .question span:first-child {
    flex: 1;
    min-width: 0;
}
.blog-article .post-faq-section .faq-item .question .icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent, var(--accent));
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.2s ease;
}
.blog-article .post-faq-section .faq-item.active .question .icon,
.blog-article .post-faq-section details.faq-item[open] .question .icon {
    transform: rotate(180deg);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.blog-article .post-faq-section .faq-item .question:hover .icon {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.blog-article .post-faq-section .faq-item .answer {
    padding: 0 18px;
}
.blog-article .post-faq-section .faq-item.active .answer,
.blog-article .post-faq-section details.faq-item[open] .answer {
    max-height: none;
    overflow: visible;
    padding: 0 18px 18px;
}
.blog-article .post-faq-section .faq-item .answer p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.65;
}
.blog-article .post-faq-section .faq-item .answer a {
    color: var(--accent, var(--accent));
    text-decoration: underline;
    text-underline-offset: 2px;
}
@media (max-width: 540px) {
    .blog-article .post-faq-section .faq-item .question {
        min-height: 48px;
        padding: 14px 14px;
    }
    .blog-article .post-faq-section .faq-item .answer,
    .blog-article .post-faq-section .faq-item.active .answer,
    .blog-article .post-faq-section details.faq-item[open] .answer {
        padding-left: 14px;
        padding-right: 14px;
    }
    .blog-article .post-faq-section .faq-item.active .answer,
    .blog-article .post-faq-section details.faq-item[open] .answer {
        padding-bottom: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .blog-article .post-faq-section .faq-item .question .icon {
        transition: none;
    }
}

.blog-article .post-framework {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    border-left: 3px solid var(--accent, var(--accent));
    background: var(--surface2, rgba(26, 31, 43, 0.55));
    border-radius: 0 10px 10px 0;
}
.blog-article .post-framework h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    border: 0;
    padding: 0;
}
.blog-article .post-checklist {
    margin: 1rem 0;
    padding: 1rem 1.1rem 1rem 2rem;
    background: var(--surface2, rgba(26, 31, 43, 0.45));
    border-radius: 10px;
    border: 1px solid var(--border, rgba(37, 43, 54, 0.35));
}
.blog-article .post-checklist li {
    margin-bottom: 0.45rem;
}

.blog-article .post-drill {
    margin: 1.25rem 0;
    padding: 1.2rem 1.15rem 1.3rem;
    min-width: 0;
    border-radius: var(--radius-card, 12px);
    border: 1px solid var(--border, rgba(37, 43, 54, 0.5));
    background: var(--surface2, rgba(255, 255, 255, 0.04));
}

.blog-article .post-drill p {
    margin: 0 0 0.9rem;
    line-height: 1.6;
}

.blog-article .post-drill p:last-child {
    margin-bottom: 0;
}

.blog-article .post-drill__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.55rem;
    margin: 0 0 1.15rem;
    padding: 0;
    list-style: none;
}

.blog-article .post-drill__topics li {
    min-width: 0;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    border: 1px solid var(--border, rgba(37, 43, 54, 0.45));
    background: var(--surface, rgba(10, 14, 20, 0.35));
    line-height: 1.4;
    font-size: 0.9rem;
}

.blog-article .post-drill__steps {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1.15rem;
    padding: 0 0 0 1.45rem;
}

.blog-article .post-drill__steps li {
    padding-left: 0.4rem;
    line-height: 1.55;
}

@media (min-width: 768px) {
    .blog-article .post-drill {
        padding: 1.4rem 1.45rem 1.5rem;
    }

    .blog-article .post-drill__steps {
        padding-left: 1.7rem;
    }
}

.blog-article .post-tip {
    margin: 1.85rem 0;
    padding: 1.3rem 1.15rem;
    min-width: 0;
}

.blog-article .post-tip h2 {
    border-top: none;
    padding-top: 0;
    margin: 0.35rem 0 0.75rem;
    font-size: clamp(1.15rem, 3.2vw, 1.35rem);
}

@media (min-width: 768px) {
    .blog-article .post-tip {
        padding: 1.35rem 1.35rem;
    }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blog-page *,
    .blog-page *::before,
    .blog-page *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Tablet: 768px+ ---------- */
@media (min-width: 768px) {
    .blog-header__inner {
        padding: 0.875rem 1.5rem;
    }

    .blog-main {
        padding: 1.75rem 1.5rem 4rem;
    }

    .blog-article .post-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .blog-article .post-cta {
        padding: 1.75rem 2rem;
    }

    .blog-article .post-cta__actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }

    .blog-article .post-cta__actions .g-btn {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }

    .blog-article-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ---------- Desktop: 1024px+ ---------- */
@media (min-width: 1024px) {
    .blog-header__inner,
    .blog-main,
    .blog-site-footer__inner {
        max-width: 50rem;
    }

    .blog-main {
        padding: 2.25rem 0 5rem;
    }

    .blog-header__inner {
        padding-inline: 0;
    }
}

/* ---------- Wide: 1440px+ ---------- */
@media (min-width: 1440px) {
    .blog-header__inner,
    .blog-main,
    .blog-site-footer__inner {
        max-width: 52rem;
    }
}

/* Container queries for article blocks (progressive enhancement) */
@supports (container-type: inline-size) {
    .blog-article {
        container-type: inline-size;
        container-name: article;
    }

    @container article (max-width: 36rem) {
        .post-stats {
            grid-template-columns: 1fr;
        }
    }
}

/* Блок рассылки в конце статьи — стикер g-card--note; поле и кнопка — g-input и g-btn */
.blog-newsletter-block {
    margin: 2.5rem 0 1.5rem;
}

.blog-newsletter-block__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: inherit;
}

.blog-newsletter-block .blog-newsletter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.blog-newsletter-block .blog-newsletter__privacy {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.45;
}

/* на жёлтом стикере цвета текста фиксированы: тема сайта стикер не перекрашивает */
.g-card--note .blog-newsletter__privacy {
    color: #4a4430;
}
.g-card--note .blog-newsletter__privacy a {
    color: var(--ink);
    text-decoration: underline;
}
.g-card--note .g-input {
    border-color: var(--ink);
    background: #fffdf3;
    color: var(--ink);
}

.blog-newsletter__hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.blog-form-message {
    font-size: 0.85rem;
    display: none;
}

.blog-form-message.is-success {
    display: block;
    color: #66bb6a;
}

.blog-form-message.is-error {
    display: block;
    color: #ef5350;
}

/* --- Share buttons --- */
.blog-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.75rem;
    margin: 1.25rem 0;
}

.blog-share--compact {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.blog-share--footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.blog-share__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text3);
    flex: 0 0 auto;
}

.blog-share__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* кнопки «Поделиться» — g-btn--secondary g-btn--icon g-btn--sm; здесь только состояние «ссылка скопирована» */
.blog-share__btn.is-copied {
    border-style: solid;
    color: var(--green);
}

.blog-share__icon {
    display: block;
    flex-shrink: 0;
}

.blog-share__status:not(.visually-hidden) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 420px) {
    .blog-share__actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
        padding-bottom: 2px;
    }

    .blog-share__actions::-webkit-scrollbar {
        display: none;
    }
}

.blog-related-posts {
    margin-top: 16px;
}

.blog-related-posts__title {
    margin: 0 0 8px;
    color: var(--text2);
}

.blog-related-posts ul {
    margin: 0;
    padding-left: 1.25rem;
}

.blog-related-posts li + li {
    margin-top: 6px;
}

.blog-related-posts a {
    color: var(--accent);
    text-decoration: none;
}

.blog-related-posts a:hover {
    text-decoration: underline;
}

/* ============================================================
   Страница статьи — раскладка как у .ru «Журнал», оформление Whiteboard.
   Шапка: метка-стикер, заголовок, автор и даты, «Поделиться»; справа обложка, приклеенная скотчем.
   Тело: оглавление слева (липкое, собирается скриптом, если его нет в разметке), текст 720px справа.
   Полоса прогресса чтения — линия маркером сверху. Без градиентов и свечений.
   ============================================================ */

.blog-page .blog-main {
    width: 100%;
    max-width: var(--container, 1200px);
    margin-inline: auto;
    padding: var(--space-5) var(--gutter, 24px) var(--space-11);
}

/* .post из platform.css ограничен 780px — ширину задают шапка и сетка тела */
.blog-page .blog-article {
    max-width: none;
    margin: 0;
}

.blog-page .blog-article .post__head {
    max-width: 900px;
    margin-top: var(--space-5);
    padding: 0;
    border: 0;
}

/* метка рубрики — g-label--note */
.blog-page .blog-article .post__tag {
    margin-bottom: var(--space-5);
}

.blog-page .blog-article .post__title {
    margin: 0 0 var(--space-4);
    font: 800 clamp(1.9rem, 4.6vw, 3.4rem) / 1.08 var(--font-head);
    letter-spacing: -0.035em;
    text-wrap: balance;
    color: var(--text);
}

.blog-page .blog-article .post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font: 500 var(--fs-sm) / 1.4 var(--font-body);
    color: var(--text2);
    font-variant-numeric: tabular-nums;
}
.blog-page .blog-article .post__author {
    color: var(--text);
    font-weight: 600;
}

.blog-page .blog-article .blog-share--compact {
    margin: var(--space-5) 0;
    padding-block: var(--space-4);
    border-block: 2px dashed var(--ln-soft);
}

/* обложка целиком, в рамке маркером и на скотче */
.blog-page .blog-article .post-figure--cover {
    position: relative;
    margin: var(--space-6) 0 0;
    max-width: 640px;
}
.blog-page .blog-article .post-figure--cover::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -12px;
    left: 50%;
    width: 120px;
    height: 26px;
    background: var(--tape);
    transform: translateX(-50%) rotate(-3deg);
    pointer-events: none;
}
.blog-page .blog-article .post-figure--cover picture img,
.blog-page .blog-article .post-figure--cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    max-height: none;
    object-fit: contain;
    background: var(--surface2);
    border: 2px solid var(--ln);
    border-radius: var(--radius-lg);
}
/* подпись под фото — от руки */
.blog-page .blog-article .post-figure--cover figcaption {
    margin-top: var(--space-2);
    font: 700 1.2rem / 1.25 var(--font-hand);
    color: var(--text2);
    text-align: left;
}

@media (min-width: 1000px) {
    .blog-page .blog-article {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
        column-gap: var(--space-9);
        align-items: start;
    }
    .blog-page .blog-article > * {
        grid-column: 1 / -1;
        min-width: 0;
    }
    .blog-page .blog-article > .post__head {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
    }
    .blog-page .blog-article > .blog-share--compact {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
    }
    .blog-page .blog-article > .post-figure--cover {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
        max-width: none;
        margin-top: var(--space-6);
    }
    .blog-page .blog-article .post__title {
        font-size: clamp(1.9rem, 3.4vw, 3rem);
    }
}

/* ---------- тело: оглавление слева, текст справа ---------- */
.blog-page .blog-article .post__body {
    margin-top: var(--space-7);
}

.blog-page .blog-article .post__body > .post-toc {
    margin: 0 0 var(--space-6);
}
/* типографика заголовков статьи не должна задевать заголовок оглавления */
.blog-page .blog-article .post__body .g-toc__title {
    margin: 0;
    padding: 0;
    border: 0;
}

@media (min-width: 1100px) {
    .blog-page .blog-article .post__body {
        display: grid;
        grid-template-columns: 240px minmax(0, 720px);
        column-gap: var(--space-9);
        row-gap: 0;
        justify-content: start;
    }
    .blog-page .blog-article .post__body > * {
        grid-column: 2;
        min-width: 0;
    }
    .blog-page .blog-article .post__body > .post-toc {
        grid-column: 1;
        grid-row: 1 / span 400;
        align-self: start;
        position: sticky;
        top: calc(var(--header-h, 72px) + 20px);
        max-height: calc(100vh - var(--header-h, 72px) - 40px);
        overflow: auto;
        scrollbar-width: thin;
        padding: 0 var(--space-3) 0 0;
    }
    /* без оглавления — центрированная колонка текста */
    .blog-page .blog-article .post__body:not(:has(> .post-toc)) {
        grid-template-columns: minmax(0, 720px);
        justify-content: center;
    }
    .blog-page .blog-article .post__body:not(:has(> .post-toc)) > * {
        grid-column: 1;
    }
}

/* заголовки разделов — шрифтом заголовков сайта */
.blog-page .blog-article .post__body h2:not(.g-toc__title) {
    font: 800 clamp(1.4rem, 2.6vw, 2rem) / 1.15 var(--font-head);
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.blog-page .blog-article .post__body h3 {
    font: 700 clamp(1.05rem, 1.8vw, 1.25rem) / 1.28 var(--font-head);
    letter-spacing: -0.015em;
    text-wrap: balance;
}
